| Package | Description |
|---|---|
| org.tentackle.model |
Entity model.
|
| org.tentackle.model.impl |
Default model implementation.
|
| org.tentackle.model.migrate |
Database migration support.
|
| org.tentackle.model.parser |
Model parser.
|
| 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.
|
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(ModelDefaults defaults,
String fileName)
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)
Loads the whole model from the model directory if not yet done.
|
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 |
Attribute.validate()
Validates the attribute.
|
void |
Relation.validate()
Validates the relation.
|
void |
Index.validate()
Validates the index.
|
void |
CommonOptions.validate()
Validates the options.
|
| Modifier and Type | Method and Description |
|---|---|
ModelException |
RelationImpl.createModelException(String message)
Creates a model exception.
|
ModelException |
AttributeOptionsImpl.createModelException(String message) |
ModelException |
IndexImpl.createModelException(String message)
Creates a model exception.
|
ModelException |
CommonOptionsImpl.createModelException(String message) |
ModelException |
AttributeImpl.createModelException(String message)
Creates a model exception.
|
| Modifier and Type | Method and Description |
|---|---|
Entity |
EntityFactoryImpl.createEntity(String model,
ModelDefaults modelDefaults) |
protected Reader |
ModelImpl.createFileReader(String fileName)
Creates a reader for given filename.
|
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) |
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(ModelDefaults defaults,
String fileName) |
protected Entity |
ModelImpl.loadByFileName(ModelDefaults defaults,
String fileName,
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) |
void |
AttributeImpl.parse(Entity entity,
AttributeLine line)
Parses an attribute line.
|
void |
IndexImpl.parse(Entity entity,
ConfigurationLine line)
Parses a configuration line.
|
void |
RelationImpl.parse(Entity entity,
RelationLine line)
Parses a relation line.
|
boolean |
EntityImpl.parseConfiguration(ConfigurationLine line)
Parses a configuration line.
|
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.processGlobalOption(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. |
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)
Updates the inheritance links and relations of all entities in the model.
|
protected void |
ModelImpl.updateRelations(ModelDefaults defaults,
ModelEntity loadedModelEntity)
Updates all relations.
|
void |
RelationImpl.validate() |
void |
EntityImpl.validate()
Validates the entity without relation dependent settings.
|
void |
IndexImpl.validate() |
void |
CommonOptionsImpl.validate() |
void |
AttributeImpl.validate() |
void |
EntityImpl.validateRelated()
Validates the relation dependent settings.
Assumes ModelImpl.updateRelations(org.tentackle.model.ModelDefaults) applied successfully. |
| Constructor and Description |
|---|
ModelDirectory(String modelDir,
ModelDefaults defaults)
Creates a model directory object.
|
ModelEntity(Entity entity,
String fileName)
Creates a model entity.
|
| Modifier and Type | Method and Description |
|---|---|
IndexMigrator.Result |
IndexMigrator.migrate()
Migrates the index.
|
String |
ForeignKeyMigrator.migrate()
Migrates the foreign key.
|
String |
ColumnMigrator.migrate()
Migrates the column.
|
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 |
AttributeLine.getComment()
Gets the comment.
|
String |
CommentLine.getComment()
Gets the comment.
The leading hash and whitespaces and trailing whitespaces are removed. |
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> |
OptionLine.getOptions()
Gets the options.
|
List<String> |
AttributeLine.getOptions()
Gets the options.
|
List<String> |
GlobalOptionLine.getOptions()
Gets the option strings.
|
Map<String,String> |
RelationLine.getProperties()
Gets the properties.
|
Integer |
AttributeLine.getScale()
Gets the numeric scale.
|
Integer |
AttributeLine.getSize()
Gets the size.
|
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 |
OptionLine.parse() |
void |
AttributeLine.parse() |
abstract void |
Line.parse()
Parses a line.
|
void |
CommentLine.parse() |
void |
GlobalOptionLine.parse() |
void |
MultiLine.parse() |
void |
ConfigurationLine.parse() |
protected List<Line> |
Document.parse()
Parses the document and returns a list of lines.
|
void |
RelationLine.parse() |
void |
SingleLine.parse() |
Copyright © 2016 Krake Softwaretechnik. All rights reserved.