Uses of Interface
org.tentackle.model.Entity
Packages that use Entity
Package
Description
Entity model.
Default model implementation.
Database migration support.
Model pretty printing.
-
Uses of Entity in org.tentackle.model
Methods in org.tentackle.model that return EntityModifier and TypeMethodDescriptionEntityFactory.createEntity(String model, ModelDefaults modelDefaults) Creates an entity from a model source.EntityFactory.createEntity(SourceInfo sourceInfo) Creates an empty entity.Model.getByClassId(int classId) Gets the entity by its class id.Model.getByEntityName(String entityName) Gets the entity by its name.Model.getByFilePath(String filePath) Gets the entity by the mapfile path.Model.getByTableName(String tableName) Gets the entity by its table name.Attribute.getEntity()Gets the entity this attribute belongs to.EntityOptions.getEntity()Gets the entity this option-set belongs to.Index.getEntity()Gets the entity this index belongs to.Relation.getEntity()Gets the entity this relation belongs to.Relation.getForeignEntity()Gets the related entity.ForeignKey.getReferencedEntity()Gets the referenced entity.ForeignKey.getReferencedTableProvidingEntity()Gets the entity that provides the table for the referenced entity.ForeignKey.getReferencingEntity()Gets the referencing entity.ForeignKey.getReferencingTableProvidingEntity()Gets the entity that provides the table for the referencing entity.Entity.getRootEntity()Returns the single root entity if there is exactly one and it is not abstract.Entity.getSuperEntity()Gets the super class entity if inherited.Entity.getTableProvidingEntity()Gets the entity that provides the database table.Entity.getTopSuperEntity()Gets the top most entity of the inheritance tree.
Returns this entity if there is no inheritance.Model.loadByFilePath(String filePath, ModelDefaults defaults, EntityAliases aliases) Loads an entity for a given mapfile name.
Entities are cached so they are loaded and parsed only once.Methods in org.tentackle.model that return types with arguments of type EntityModifier and TypeMethodDescriptionEntity.getAllComponents()Gets all direct and indirect components of this entity.Model.getAllEntitites()Gets all cached entities.Entity.getAllSubEntities()Gets all sub entities.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.Entity.getComponents()Gets the direct components of this entity.Entity.getComponentsIncludingInherited()Gets the direct and inherited components of this entity.Entity.getInheritanceChain(Entity subEntity) Gets the inheritance chain from this entity down to given sub 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.Entity.getRootEntities()Returns the root entities.
Returns all roots, even abstract ones.Entity.getSubEntities()Gets the direct sub entities.Entity.getSuperEntities()Gets all super entities.Methods in org.tentackle.model with parameters of type EntityModifier and TypeMethodDescriptionEntityFactory.createAttribute(Entity entity, SourceInfo sourceInfo, boolean implicit) Creates an attribute.Index.createDatabaseIndexName(Entity entity) Creates the database index name for given entity.EntityFactory.createEntityOptions(Entity entity, SourceInfo sourceInfo) Creates entity options.EntityFactory.createIndex(Entity entity, SourceInfo sourceInfo) Creates an index.EntityFactory.createRelation(Entity entity, SourceInfo sourceInfo) Creates a relation.CodeFactory.createSqlIndex(Backend backend, Entity entity, Index index) Creates the SQL code to create an index.CodeFactory.createSqlTable(Entity entity, Backend backend) Creates the table creation sql code.Entity.getInheritanceChain(Entity subEntity) Gets the inheritance chain from this entity down to given sub entity.Entity.getRelations(Entity entity, boolean all) Gets all relations for a given entity type.Index.sqlCreateIndex(Backend backend, Entity entity) Creates the index creation sql code.NameVerifier.verifyEntityName(Entity entity) Verifies the Java name of an entity.NameVerifier.verifyTableAlias(Entity entity) Verifies the table alias of an entity.NameVerifier.verifyTableName(Entity entity) Verifies the table name of an entity. -
Uses of Entity in org.tentackle.model.impl
Classes in org.tentackle.model.impl that implement EntityMethods in org.tentackle.model.impl that return EntityModifier and TypeMethodDescriptionEntityFactoryImpl.createEntity(String model, ModelDefaults modelDefaults) ModelImpl.getByClassId(int classId) ModelImpl.getByEntityName(String entityName) ModelImpl.getByFilePath(String filePath) ModelImpl.getByTableName(String tableName) AttributeImpl.getEntity()EntityOptionsImpl.getEntity()IndexImpl.getEntity()ModelEntity.getEntity()Gets the entity.ModelEntityImpl.getEntity()RelationImpl.getEntity()RelationImpl.getForeignEntity()ForeignKeyImpl.getReferencedEntity()ForeignKeyImpl.getReferencedTableProvidingEntity()ForeignKeyImpl.getReferencingEntity()ForeignKeyImpl.getReferencingTableProvidingEntity()EntityImpl.getRootEntity()EntityImpl.getSuperEntity()EntityImpl.getTableProvidingEntity()EntityImpl.getTopSuperEntity()ModelImpl.loadByFilePath(String filePath, ModelDefaults defaults, EntityAliases aliases) protected EntityModelImpl.loadByFilePath(String filePath, ModelDefaults defaults, EntityAliases aliases, boolean updateRelations) Loads an entity for a given mapfile path.
Entities are cached so they are loaded and parsed only once.protected EntityModelImpl.parseEntity(ModelDefaults defaults, String fileName) Parses the given file and returns the created entity.Methods in org.tentackle.model.impl that return types with arguments of type EntityModifier and TypeMethodDescriptionEntityImpl.getAllComponents()ModelImpl.getAllEntitites()EntityImpl.getAllSubEntities()EntityImpl.getAssociatedEntities()EntityImpl.getComponents()EntityImpl.getComponentsIncludingInherited()EntityImpl.getInheritanceChain(Entity childEntity) EntityImpl.getLeafEntities()EntityImpl.getRootEntities()EntityImpl.getSubEntities()EntityImpl.getSuperEntities()Methods in org.tentackle.model.impl with parameters of type EntityModifier and TypeMethodDescriptionEntityImpl.appendIdSerial(Entity entity, List<Attribute> attributes) Appends id and serial from another entity.protected booleanApplies the table alias if unique and valid.protected voidEntityImpl.collectAssociatedEntities(Set<Entity> associates, Entity entity, Set<Entity> processedEntities) Recursively collects the associated entities for a given entity.protected voidEntityImpl.collectLeafEntities(List<Entity> leafs, Entity entity) Recursivly collects the leaf childs.protected voidEntityImpl.collectSubEntities(List<Entity> subEntities, Entity entity) Recursivly collects all sub entities.EntityFactoryImpl.createAttribute(Entity entity, SourceInfo sourceInfo, boolean implicit) IndexImpl.createDatabaseIndexName(Entity entity) EntityFactoryImpl.createEntityOptions(Entity entity, SourceInfo sourceInfo) EntityFactoryImpl.createIndex(Entity entity, SourceInfo sourceInfo) protected ModelEntityModelImpl.createModelEntity(Entity entity, String fileName) Creates a model entity wrapper.EntityFactoryImpl.createRelation(Entity entity, SourceInfo sourceInfo) EntityImpl.getInheritanceChain(Entity childEntity) EntityImpl.getRelations(Entity entity, boolean all) protected voidEntityImpl.getUniqueDomainKeyImpl(List<Attribute> uniqueDomainKeys, Entity entity) Adds the unique domain keys recursively for given entity to the list.protected booleanNameVerifierImpl.isAllUpperOrLowerCase(String name, Entity entity) Checks whether the given name is all upper- or all lowercase.
The backends are usually not case-sensitive (unless the SQL names are quoted), but it is good style to either use all upper- or all lowercase.protected booleanNameVerifierImpl.isNotQuotedOrProvided(String name, Entity entity) Checks whether the name is quoted.voidAttributeImpl.parse(Entity entity, AttributeLine line) Parses an attribute line.voidParses a configuration line.voidRelationImpl.parse(Entity entity, RelationLine line) Parses a relation line.voidRelationImpl.setForeignEntity(Entity foreignEntity) voidEntityImpl.setSuperEntity(Entity superEntity) Sets the super entity.IndexImpl.sqlCreateIndex(Backend backend, Entity entity) protected voidModelImpl.updateCompositePath(List<Relation> compositePath, Entity entity) Updates the composite path.protected voidModelImpl.validateComponents(Entity entity, Integrity integrity, Set<ModelError> errors) Verifies that the integrity is the same within a given composite hierarchy.protected voidModelImpl.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!NameVerifierImpl.verifyEntityName(Entity entity) NameVerifierImpl.verifyTableAlias(Entity entity) NameVerifierImpl.verifyTableName(Entity entity) Method parameters in org.tentackle.model.impl with type arguments of type EntityModifier and TypeMethodDescriptionprotected booleanApplies the table alias if unique and valid.protected voidEntityImpl.collectAssociatedEntities(Set<Entity> associates, Entity entity, Set<Entity> processedEntities) Recursively collects the associated entities for a given entity.protected voidEntityImpl.collectLeafEntities(List<Entity> leafs, Entity entity) Recursivly collects the leaf childs.protected voidEntityImpl.collectSubEntities(List<Entity> subEntities, Entity entity) Recursivly collects all sub entities.Constructors in org.tentackle.model.impl with parameters of type EntityModifierConstructorDescriptionAttributeImpl(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 filePath) Creates a model entity.RelationImpl(Entity entity, SourceInfo sourceInfo) Creates a relation. -
Uses of Entity in org.tentackle.model.migrate
Methods in org.tentackle.model.migrate that return EntityConstructors in org.tentackle.model.migrate with parameters of type EntityModifierConstructorDescriptionColumnMigrator(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. -
Uses of Entity in org.tentackle.model.print
Constructors in org.tentackle.model.print with parameters of type EntityModifierConstructorDescriptionAttributeSectionPrinter(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.