| Package | Description |
|---|---|
| org.tentackle.model |
Entity model.
|
| org.tentackle.model.impl |
Default model implementation.
|
| org.tentackle.model.migrate |
Database migration support.
|
| org.tentackle.model.parse |
Model parsing.
|
| Modifier and Type | Method and Description |
|---|---|
Entity |
EntityFactory.createEntity(String model,
ModelDefaults modelDefaults)
Creates an entity from a model source.
|
Collection<Entity> |
Model.getAllEntitites()
Gets all cached entities.
|
String |
Attribute.getApplicationType()
Gets the application specific type.
|
Entity |
Model.getByClassId(int classId)
Gets the entity by its id.
|
Entity |
Model.getByEntityName(String entityName)
Gets the entity by its name.
|
Entity |
Model.getByFileName(String fileName)
Gets the entity by the mapfile name.
|
DataType |
Attribute.getEffectiveType()
Gets the effective type exposed to the backend.
If this is an application specific type, the inner type will be returned. |
Collection<ForeignKey> |
Model.getForeignKeys()
Gets all foreign keys.
|
List<Entity> |
Entity.getInheritanceChain(Entity subEntity)
Gets the inheritance chain from this entity down to given sub entity.
|
String |
Attribute.getInnerName()
Gets the inner name.
This is either the generic inner type or the wrapped type used by application specific types, for example enums. |
DataType |
Attribute.getInnerType()
Gets the innertype for application specific types.
|
String |
Attribute.getJavaType()
Gets the java type.
Returns the java type with optional generic info. |
boolean |
Attribute.isNullable()
Returns whether database column is nullable.
|
Entity |
Model.loadByFileName(String fileName,
ModelDefaults defaults,
EntityAliases aliases)
Loads an entity for a given mapfile name.
Entities are cached so they are loaded and parsed only once. |
void |
Model.loadModel(String modelDir,
ModelDefaults defaults,
EntityAliases aliases)
Loads the whole model from the model directory if not yet done.
|
void |
EntityAliases.parse(String str)
Parses the aliases from a string.
|
void |
ModelDefaults.parse(String str)
Parses the defaults from a string.
|
void |
Model.refreshModel()
Refreshes the model.
Checks for changes and reloads if necessary. |
String |
Entity.sqlCreateTable(Backend backend)
Creates the table creation sql code.
|
void |
CommonOptions.validate()
Validates the options.
|
void |
Attribute.validate()
Validates the attribute.
|
void |
Index.validate()
Validates the index.
|
void |
Relation.validate()
Validates the relation.
|
| Constructor and Description |
|---|
EntityAliases(String str)
Creates the aliases from a string.
|
ModelDefaults(String str)
Creates the defaults from a string.
|
| Modifier and Type | Method and Description |
|---|---|
ModelException |
AttributeImpl.createModelException(String message)
Creates a model exception.
|
ModelException |
CommonOptionsImpl.createModelException(String message) |
ModelException |
RelationImpl.createModelException(String message)
Creates a model exception.
|
ModelException |
IndexImpl.createModelException(String message)
Creates a model exception.
|
ModelException |
AttributeOptionsImpl.createModelException(String message) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ModelImpl.addModelEntity(ModelEntity modelEntity)
Adds an entity to the model.
|
boolean |
CommonOptionsImpl.applyOption(String option,
Boolean ctrl)
Applies given option string.
|
boolean |
AttributeOptionsImpl.applyOption(String option,
Boolean ctrl) |
boolean |
EntityOptionsImpl.applyOption(String option,
Boolean ctrl) |
Entity |
EntityFactoryImpl.createEntity(String model,
ModelDefaults modelDefaults) |
protected ModelDirectory |
ModelImpl.createModelDirectory(String modelDir,
ModelDefaults defaults,
EntityAliases aliases)
Creates a model directory object.
|
protected ModelEntity |
ModelImpl.createModelEntity(Entity entity,
String fileName)
Creates a model entity wrapper.
|
protected Reader |
ModelImpl.createReader(String name)
Creates a reader for given name.
|
Collection<Entity> |
ModelImpl.getAllEntitites() |
String |
AttributeImpl.getApplicationType()
Gets the application specific type.
|
Entity |
ModelImpl.getByClassId(int classId) |
Entity |
ModelImpl.getByEntityName(String entityName) |
Entity |
ModelImpl.getByFileName(String fileName) |
DataType |
AttributeImpl.getEffectiveType() |
Collection<ForeignKey> |
ModelImpl.getForeignKeys() |
List<Entity> |
EntityImpl.getInheritanceChain(Entity childEntity) |
String |
AttributeImpl.getInnerName()
Returns the inner type.
|
DataType |
AttributeImpl.getInnerType()
Gets the innertype for application specific types.
|
String |
AttributeImpl.getJavaType()
Gets the java type.
Returns the java type with optional generic info. |
boolean |
AttributeImpl.isNullable() |
Entity |
ModelImpl.loadByFileName(String fileName,
ModelDefaults defaults,
EntityAliases aliases) |
protected Entity |
ModelImpl.loadByFileName(String fileName,
ModelDefaults defaults,
EntityAliases aliases,
boolean updateRelations)
Loads an entity for a given mapfile name.
Entities are cached so they are loaded and parsed only once. |
void |
ModelImpl.loadModel(String modelDir,
ModelDefaults defaults,
EntityAliases aliases) |
void |
IndexImpl.parse(Entity entity)
Parses a configuration line.
|
void |
AttributeImpl.parse(Entity entity,
AttributeLine line)
Parses an attribute line.
|
void |
RelationImpl.parse(Entity entity,
RelationLine line)
Parses a relation line.
|
boolean |
EntityImpl.parseConfiguration(ConfigurationLine line)
Parses a configuration line.
|
protected Entity |
ModelImpl.parseEntity(ModelDefaults defaults,
String fileName)
Parses the given file and returns the created entity.
|
protected void |
EntityFactoryImpl.processAttribute(EntityImpl entity,
AttributeLine line)
Processes an attribute line.
|
protected void |
EntityFactoryImpl.processAttributeOption(EntityImpl entity,
OptionLine line)
Processes an attribute option line.
|
protected void |
EntityFactoryImpl.processConfiguration(EntityImpl entity,
ConfigurationLine line)
Processes a configuration line.
|
protected void |
EntityFactoryImpl.processGlobalOptions(EntityImpl entity,
GlobalOptionLine line)
Processes a global option line.
|
protected void |
EntityFactoryImpl.processIndexConfiguration(EntityImpl entity,
ConfigurationLine line)
Processes an index configuration line.
Requires the attribute already processed. |
boolean |
CommonOptionsImpl.processOption(String option)
Processes an option string.
If the option string starts with ! or -, the option is considered to be turned off. |
protected void |
EntityFactoryImpl.processRelation(EntityImpl entity,
RelationLine line)
Processes a relation line.
|
protected void |
EntityFactoryImpl.processRelationOption(EntityImpl entity,
OptionLine line)
Processes a relation option line.
|
void |
ModelImpl.refreshModel() |
void |
AttributeImpl.setApplicationType(String applicationType)
Sets the application specific type.
Only allowed DataType.APPLICATION. |
void |
AttributeImpl.setInnerName(String innerType)
Sets the inner type.
|
String |
EntityImpl.sqlCreateTable(Backend backend) |
protected void |
ModelImpl.updateRelations(ModelDefaults defaults,
EntityAliases aliases)
Updates the inheritance links and relations of all entities in the model.
|
protected void |
ModelImpl.updateRelations(ModelDefaults defaults,
EntityAliases aliases,
ModelEntity loadedModelEntity)
Updates all relations.
|
void |
AttributeImpl.validate() |
void |
CommonOptionsImpl.validate() |
void |
EntityImpl.validate()
Validates the entity without relation dependent settings.
|
void |
RelationImpl.validate() |
void |
IndexImpl.validate() |
void |
EntityImpl.validateRelated()
Validates the relation dependent settings.
Assumes ModelImpl.updateRelations(org.tentackle.model.ModelDefaults, org.tentackle.model.EntityAliases) applied successfully. |
| Constructor and Description |
|---|
ModelDirectoryImpl(String modelDir,
ModelDefaults defaults,
EntityAliases aliases)
Creates a model directory object.
|
ModelEntityImpl(Entity entity,
String fileName)
Creates a model entity.
|
| Modifier and Type | Method and Description |
|---|---|
String |
ColumnMigrator.migrate()
Migrates the column.
|
String |
ForeignKeyMigrator.migrate()
Migrates the foreign key.
|
TableMigrator.Result |
TableMigrator.migrate(Collection<Pattern> hints,
Collection<ColumnMigration> columnMigrations)
Create SQL code to migrate the table.
|
| Modifier and Type | Method and Description |
|---|---|
ModelException |
Line.createModelException(String message)
Creates a model exception.
|
ModelException |
Line.createModelException(String message,
Throwable cause)
Creates a model exception.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
Line.assertParsed()
Asserts that this line is parsed.
|
String |
RelationLine.getClassName()
Gets the classname.
|
String |
AttributeLine.getColumnName()
Gets the column name in database table.
|
String |
CommentLine.getComment()
Gets the comment.
The leading hash and whitespaces and trailing whitespaces are removed. |
String |
AttributeLine.getComment()
Gets the comment.
|
String |
AttributeLine.getInnerName()
Gets the generic type.
|
String |
AttributeLine.getJavaName()
Gets the Java attribute name.
|
String |
AttributeLine.getJavaType()
Gets the java type.
|
String |
ConfigurationLine.getKey()
Gets the key's name.
|
int |
Line.getLength()
Gets the length of the parsed line.
|
List<Line> |
Document.getLines()
Gets the parsed lines.
|
String |
OptionLine.getName()
Gets the attribute or relation name.
|
List<String> |
GlobalOptionLine.getOptions()
Gets the option strings.
|
List<String> |
OptionLine.getOptions()
Gets the options.
|
List<String> |
AttributeLine.getOptions()
Gets the options.
|
Map<String,String> |
RelationLine.getProperties()
Gets the properties.
|
Integer |
AttributeLine.getScale()
Gets the numeric scale.
|
Integer |
AttributeLine.getSize()
Gets the size.
|
List<String> |
GlobalOptionLine.getSortings()
Gets the sorting strings.
|
String |
Line.getText()
Gets the line's text.
|
String |
ConfigurationLine.getValue()
Gets the key's value.
|
protected Line |
Document.nextLine(Line currentLine)
Gets the next line.
|
void |
ConfigurationLine.parse() |
protected List<Line> |
Document.parse()
Parses the document and returns a list of lines.
|
void |
MultiLine.parse() |
void |
GlobalOptionLine.parse() |
void |
SingleLine.parse() |
void |
RelationLine.parse() |
void |
CommentLine.parse() |
void |
OptionLine.parse() |
void |
AttributeLine.parse() |
abstract void |
Line.parse()
Parses a line.
|
Tentackle - a domain driven enterprise framework