| Package | Description |
|---|---|
| org.tentackle.model |
Entity model.
|
| org.tentackle.model.impl |
Default model implementation.
|
| org.tentackle.model.migrate |
Database migration support.
|
| org.tentackle.model.print |
Model pretty printing.
|
| Modifier and Type | Method and Description |
|---|---|
Entity |
EntityFactory.createEntity(SourceInfo sourceInfo)
Creates an empty entity.
|
Entity |
EntityFactory.createEntity(String model,
ModelDefaults modelDefaults)
Creates an entity from a model source.
|
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.
|
Entity |
EntityOptions.getEntity()
Gets the entity this option-set belongs to.
|
Entity |
Attribute.getEntity()
Gets the entity this attribute belongs to.
|
Entity |
Index.getEntity()
Gets the entity this index belongs to.
|
Entity |
Relation.getEntity()
Gets the entity this relation belongs to.
|
Entity |
Relation.getForeignEntity()
Gets the related entity.
|
Entity |
ForeignKey.getReferencedEntity()
Gets the referenced entity.
|
Entity |
ForeignKey.getReferencedTableProvidingEntity()
Gets the entity that provides the table for the referenced entity.
|
Entity |
ForeignKey.getReferencingEntity()
Gets the referencing entity.
|
Entity |
ForeignKey.getReferencingTableProvidingEntity()
Gets the entity that provides the table for the referencing entity.
|
Entity |
Entity.getRootEntity()
Returns the single root entity if there is exactly one and it is not abstract.
|
Entity |
Entity.getSuperEntity()
Gets the super class entity if inherited.
|
Entity |
Entity.getTableProvidingEntity()
Gets the entity that provides the database table.
|
Entity |
Entity.getTopSuperEntity()
Gets the top most entity of the inheritance tree.
Returns this entity if there is no inheritance. |
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. |
| Modifier and Type | Method and Description |
|---|---|
Set<Entity> |
Entity.getAllComponents()
Gets all direct and indirect components of this entity.
|
Collection<Entity> |
Model.getAllEntitites()
Gets all cached entities.
|
List<Entity> |
Entity.getAllSubEntities()
Gets all sub entities.
|
Set<Entity> |
Entity.getAssociatedEntities()
Gets a set of all entities that are associated to this entity.
The kind of association can be a relation, a foreign relation or some hierarchy dependency or a combination of. |
Set<Entity> |
Entity.getComponents()
Gets the direct components of this entity.
|
Set<Entity> |
Entity.getComponentsIncludingInherited()
Gets the direct and inherited components of this entity.
|
List<Entity> |
Entity.getInheritanceChain(Entity subEntity)
Gets the inheritance chain from this entity down to given sub entity.
|
List<Entity> |
Entity.getLeafEntities()
Gets the list of non-abstract leaf sub entities.
If this entity is already non-abstract the list consists of this entity. |
Set<Entity> |
Entity.getRootEntities()
Returns the root entities.
Returns all roots, even abstract ones. |
List<Entity> |
Entity.getSubEntities()
Gets the direct sub entities.
|
List<Entity> |
Entity.getSuperEntities()
Gets all super entities.
|
| Modifier and Type | Method and Description |
|---|---|
Attribute |
EntityFactory.createAttribute(Entity entity,
SourceInfo sourceInfo,
boolean implicit)
Creates an attribute.
|
String |
Index.createDatabaseIndexName(Entity entity)
Creates the database index name for given entity.
|
EntityOptions |
EntityFactory.createEntityOptions(Entity entity,
SourceInfo sourceInfo)
Creates entity options.
|
Index |
EntityFactory.createIndex(Entity entity,
SourceInfo sourceInfo)
Creates an index.
|
Relation |
EntityFactory.createRelation(Entity entity,
SourceInfo sourceInfo)
Creates a relation.
|
List<Entity> |
Entity.getInheritanceChain(Entity subEntity)
Gets the inheritance chain from this entity down to given sub entity.
|
List<Relation> |
Entity.getRelations(Entity entity,
boolean all)
Gets all relations for a given entity type.
|
String |
Index.sqlCreateIndex(Backend backend,
Entity entity)
Creates the index creation sql code.
|
| Modifier and Type | Class and Description |
|---|---|
class |
EntityImpl
The entity model implementation.
|
| Modifier and Type | Method and Description |
|---|---|
Entity |
EntityFactoryImpl.createEntity(String model,
ModelDefaults modelDefaults) |
Entity |
ModelImpl.getByClassId(int classId) |
Entity |
ModelImpl.getByEntityName(String entityName) |
Entity |
ModelImpl.getByFileName(String fileName) |
Entity |
AttributeImpl.getEntity() |
Entity |
ModelEntity.getEntity()
Gets the entity.
|
Entity |
RelationImpl.getEntity() |
Entity |
IndexImpl.getEntity() |
Entity |
EntityOptionsImpl.getEntity() |
Entity |
ModelEntityImpl.getEntity()
Gets the entity.
|
Entity |
RelationImpl.getForeignEntity() |
Entity |
ForeignKeyImpl.getReferencedEntity() |
Entity |
ForeignKeyImpl.getReferencedTableProvidingEntity() |
Entity |
ForeignKeyImpl.getReferencingEntity() |
Entity |
ForeignKeyImpl.getReferencingTableProvidingEntity() |
Entity |
EntityImpl.getRootEntity() |
Entity |
EntityImpl.getSuperEntity() |
Entity |
EntityImpl.getTableProvidingEntity() |
Entity |
EntityImpl.getTopSuperEntity() |
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. |
protected Entity |
ModelImpl.parseEntity(ModelDefaults defaults,
String fileName)
Parses the given file and returns the created entity.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Entity> |
EntityImpl.getAllComponents() |
Collection<Entity> |
ModelImpl.getAllEntitites() |
List<Entity> |
EntityImpl.getAllSubEntities() |
Set<Entity> |
EntityImpl.getAssociatedEntities() |
Set<Entity> |
EntityImpl.getComponents() |
Set<Entity> |
EntityImpl.getComponentsIncludingInherited() |
List<Entity> |
EntityImpl.getInheritanceChain(Entity childEntity) |
List<Entity> |
EntityImpl.getLeafEntities() |
Set<Entity> |
EntityImpl.getRootEntities() |
List<Entity> |
EntityImpl.getSubEntities() |
List<Entity> |
EntityImpl.getSuperEntities() |
| Modifier and Type | Method and Description |
|---|---|
protected List<Attribute> |
EntityImpl.appendIdSerial(Entity entity,
List<Attribute> attributes)
Appends id and serial from another entity.
|
protected void |
EntityImpl.collectAssociatedEntities(Set<Entity> associates,
Entity entity,
Set<Entity> processedEntities)
Recursively collects the associated entities for a given entity.
|
protected void |
EntityImpl.collectLeafEntities(List<Entity> leafs,
Entity entity)
Recursivly collects the leaf childs.
|
protected void |
EntityImpl.collectSubEntities(List<Entity> subEntities,
Entity entity)
Recursivly collects all sub entities.
|
AttributeImpl |
EntityFactoryImpl.createAttribute(Entity entity,
SourceInfo sourceInfo,
boolean implicit) |
String |
IndexImpl.createDatabaseIndexName(Entity entity) |
EntityOptionsImpl |
EntityFactoryImpl.createEntityOptions(Entity entity,
SourceInfo sourceInfo) |
IndexImpl |
EntityFactoryImpl.createIndex(Entity entity,
SourceInfo sourceInfo) |
protected ModelEntity |
ModelImpl.createModelEntity(Entity entity,
String fileName)
Creates a model entity wrapper.
|
RelationImpl |
EntityFactoryImpl.createRelation(Entity entity,
SourceInfo sourceInfo) |
List<Entity> |
EntityImpl.getInheritanceChain(Entity childEntity) |
List<Relation> |
EntityImpl.getRelations(Entity entity,
boolean all) |
protected void |
EntityImpl.getUniqueDomainKeyImpl(List<Attribute> uniqueDomainKeys,
Entity entity)
Adds the unique domain keys recursively for given entity to the list.
|
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.
|
void |
RelationImpl.setForeignEntity(Entity foreignEntity) |
void |
EntityImpl.setSuperEntity(Entity superEntity)
Sets the super entity.
|
String |
IndexImpl.sqlCreateIndex(Backend backend,
Entity entity) |
protected void |
ModelImpl.updateCompositePath(List<Relation> compositePath,
Entity entity)
Updates the composite path.
|
protected void |
ModelImpl.validateComponents(Entity entity,
Integrity integrity,
Set<ModelError> errors)
Verifies that the integrity is the same within a given composite hierarchy.
|
protected void |
ModelImpl.validateInheritanceHierarchy(Entity entity,
InheritanceType inheritanceType,
TrackType trackType,
Integrity integrity,
Set<ModelError> errors)
Verifies that the inheritance, integrity and track type is the same within a given interitance hierarchy.
Notice that concrete classes (the leafs of the hierarchy) must have InheritanceType.NONE defined! |
| Modifier and Type | Method and Description |
|---|---|
protected void |
EntityImpl.collectAssociatedEntities(Set<Entity> associates,
Entity entity,
Set<Entity> processedEntities)
Recursively collects the associated entities for a given entity.
|
protected void |
EntityImpl.collectAssociatedEntities(Set<Entity> associates,
Entity entity,
Set<Entity> processedEntities)
Recursively collects the associated entities for a given entity.
|
protected void |
EntityImpl.collectLeafEntities(List<Entity> leafs,
Entity entity)
Recursivly collects the leaf childs.
|
protected void |
EntityImpl.collectSubEntities(List<Entity> subEntities,
Entity entity)
Recursivly collects all sub entities.
|
| Constructor and Description |
|---|
AttributeImpl(EntityFactoryImpl factory,
Entity entity,
SourceInfo sourceInfo,
boolean implicit)
Creates an attribute.
|
EntityOptionsImpl(EntityFactory factory,
Entity entity,
SourceInfo sourceInfo)
Creates entity options.
|
ForeignKeyImpl(Entity referencingEntity,
Attribute referencingAttribute,
Entity referencedEntity,
Attribute referencedAttribute,
boolean composite)
Creates a foreign key.
|
IndexImpl(EntityFactoryImpl factory,
Entity entity,
SourceInfo sourceInfo)
Creates an index.
|
ModelEntityImpl(Entity entity,
String fileName)
Creates a model entity.
|
RelationImpl(Entity entity,
SourceInfo sourceInfo)
Creates a relation.
|
| Modifier and Type | Method and Description |
|---|---|
Entity |
TableMigrator.getEntity()
Gets the model's entity.
|
| Constructor and Description |
|---|
ColumnMigrator(Entity entity,
Attribute attribute,
Backend backend,
Collection<ColumnMetaData> columns)
Creates a column migrator.
|
ColumnMigrator(Entity entity,
Attribute attribute,
Backend backend,
ColumnMetaData... columns)
Creates a column migrator.
|
IndexMigrator(Entity entity,
Index index,
Backend backend,
IndexMetaData indexMetaData)
Creates a migrator.
|
TableMigrator(Entity entity,
Collection<ForeignKey> foreignKeys,
Backend backend,
TableMetaData table)
Creates a table migrator.
|
| Constructor and Description |
|---|
AttributeSectionPrinter(Entity entity,
PrintConfiguration configuration)
Creates a section printer.
|
EntityPrinter(Entity entity,
PrintConfiguration configuration)
Creates an entity printer.
|
GlobalOptionsPrinter(Entity entity,
PrintConfiguration configuration)
Creates the printer.
|
Tentackle - a domain driven enterprise framework