public static interface Entity.Definition
extends java.io.Serializable
Modifier and Type | Interface and Description |
---|---|
static interface |
Entity.Definition.Builder
Builds a Entity.Definition
|
Modifier and Type | Field and Description |
---|---|
static PropertyValue<java.lang.Boolean> |
STRICT_FOREIGN_KEYS
Specifies that it should not be possible to define foreign keys referencing entities that have
not been defined, this can be disabled in case of entities with circular references
Value type: Boolean Default value: true |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Entity entity,
Entity entityToCompare)
Compares the given entities.
|
java.lang.Class |
getBeanClass()
Returns the bean class associated with this entity type
|
java.lang.String |
getCaption() |
java.lang.Object |
getColor(Entity entity,
Property property) |
java.util.List<ColumnProperty> |
getColumnProperties() |
java.util.List<ColumnProperty> |
getColumnProperties(java.util.List<java.lang.String> propertyIds)
Returns the
ColumnProperty s identified
by the propertyIds in propertyIds |
ColumnProperty |
getColumnProperty(java.lang.String propertyId) |
java.util.Comparator<Entity> |
getComparator() |
Entity.ConditionProvider |
getConditionProvider(java.lang.String conditionId)
Returns the
Entity.ConditionProvider associated with the given id |
java.util.List<DenormalizedProperty> |
getDenormalizedProperties(java.lang.String foreignKeyPropertyId)
Retrieves the denormalized properties which values originate from the entity referenced by the given foreign key property
|
java.util.Collection<DerivedProperty> |
getDerivedProperties(java.lang.String propertyId)
Returns the properties which values are derived from the value of the given property,
an empty collection if no such derived properties exist
|
java.lang.String |
getDomainId() |
java.lang.String |
getEntityId() |
java.util.List<ForeignKeyProperty> |
getForeignKeyProperties() |
java.util.List<ForeignKeyProperty> |
getForeignKeyProperties(java.lang.String foreignEntityId)
Returns the foreign key properties referencing entities of the given type
|
ForeignKeyProperty |
getForeignKeyProperty(java.lang.String propertyId) |
java.lang.String |
getGroupByClause() |
java.lang.String |
getHavingClause() |
Entity.KeyGenerator |
getKeyGenerator() |
Entity.KeyGenerator.Type |
getKeyGeneratorType() |
Entity.OrderBy |
getOrderBy() |
java.util.List<ColumnProperty> |
getPrimaryKeyProperties() |
java.util.Map<java.lang.String,ColumnProperty> |
getPrimaryKeyPropertyMap() |
java.util.List<Property> |
getProperties() |
java.util.List<Property> |
getProperties(boolean includeHidden)
Returns all
Property s for the given entity |
java.util.List<Property> |
getProperties(java.util.Collection<java.lang.String> propertyIds)
Returns the
Property s identified by the propertyIds in propertyIds |
Property |
getProperty(java.lang.String propertyId) |
java.util.Map<java.lang.String,Property> |
getPropertyMap() |
java.util.Collection<ColumnProperty> |
getSearchProperties()
Returns the properties to search by when looking up entities of the type identified by
entityId |
java.util.Collection<java.lang.String> |
getSearchPropertyIds() |
java.util.List<ColumnProperty> |
getSelectableColumnProperties() |
java.util.List<ColumnProperty> |
getSelectableColumnProperties(java.util.Collection<java.lang.String> propertyIds)
Returns the selectable
ColumnProperty s identified
by the propertyIds in propertyIds |
ColumnProperty |
getSelectableColumnProperty(java.lang.String propertyId) |
java.lang.String |
getSelectQuery() |
java.lang.String |
getSelectTableName() |
Entity.ToString |
getStringProvider() |
java.lang.String |
getTableName() |
java.util.List<TransientProperty> |
getTransientProperties() |
java.util.List<Property> |
getUpdatableProperties() |
Entity.Validator |
getValidator() |
java.util.List<Property> |
getVisibleProperties() |
java.util.List<ColumnProperty> |
getWritableColumnProperties(boolean includePrimaryKeyProperties,
boolean includeNonUpdatable)
Retrieves the writable (non read-only) column properties comprising this entity type
|
boolean |
hasDenormalizedProperties() |
boolean |
hasDenormalizedProperties(java.lang.String foreignKeyPropertyId) |
boolean |
hasDerivedProperties() |
boolean |
hasDerivedProperties(java.lang.String propertyId)
Returns true if this entity contains properties which values are derived from the value of the given property
|
boolean |
hasSingleIntegerPrimaryKey() |
boolean |
isPrimaryKeyAutoGenerated()
Returns true if the value for the primary key of this entity is automatically generated, either by the framework,
such as values queried from sequences or set by triggers.
|
boolean |
isReadOnly() |
boolean |
isSmallDataset() |
boolean |
isStaticData() |
boolean |
selectQueryContainsWhereClause() |
java.lang.String |
toString(Entity entity) |
static final PropertyValue<java.lang.Boolean> STRICT_FOREIGN_KEYS
java.lang.String getEntityId()
java.lang.String getTableName()
Entity.ConditionProvider getConditionProvider(java.lang.String conditionId)
Entity.ConditionProvider
associated with the given idconditionId
- the condition idjava.lang.IllegalArgumentException
- in case no ConditionProvider is associated with the given conditionIdjava.lang.String getDomainId()
Entity.Validator getValidator()
java.lang.String getCaption()
java.lang.Class getBeanClass()
boolean isSmallDataset()
boolean isStaticData()
boolean isReadOnly()
Entity.KeyGenerator getKeyGenerator()
Entity.KeyGenerator.Type getKeyGeneratorType()
boolean isPrimaryKeyAutoGenerated()
Entity.OrderBy getOrderBy()
java.lang.String getGroupByClause()
java.lang.String getHavingClause()
java.lang.String getSelectTableName()
java.lang.String getSelectQuery()
boolean selectQueryContainsWhereClause()
Entity.ToString getStringProvider()
java.util.Comparator<Entity> getComparator()
java.util.Collection<java.lang.String> getSearchPropertyIds()
java.util.Map<java.lang.String,Property> getPropertyMap()
java.util.List<Property> getProperties()
boolean hasDerivedProperties()
boolean hasDerivedProperties(java.lang.String propertyId)
propertyId
- the ID of the propertyjava.util.Collection<DerivedProperty> getDerivedProperties(java.lang.String propertyId)
propertyId
- the ID of the propertyjava.util.List<ColumnProperty> getPrimaryKeyProperties()
java.util.Map<java.lang.String,ColumnProperty> getPrimaryKeyPropertyMap()
java.util.List<Property> getVisibleProperties()
java.util.List<ColumnProperty> getColumnProperties()
java.util.List<ColumnProperty> getSelectableColumnProperties()
java.util.List<TransientProperty> getTransientProperties()
java.util.List<ForeignKeyProperty> getForeignKeyProperties()
boolean hasDenormalizedProperties()
boolean hasDenormalizedProperties(java.lang.String foreignKeyPropertyId)
foreignKeyPropertyId
- the ID of the foreign key propertyjava.util.List<DenormalizedProperty> getDenormalizedProperties(java.lang.String foreignKeyPropertyId)
foreignKeyPropertyId
- the foreign key property IDjava.util.Collection<ColumnProperty> getSearchProperties()
entityId
Entity.Definition.Builder.setSearchPropertyIds(String...)
ColumnProperty getColumnProperty(java.lang.String propertyId)
propertyId
- the property idjava.lang.IllegalArgumentException
- in case the propertyId does not represent a ColumnProperty
Property getProperty(java.lang.String propertyId)
propertyId
- the property idpropertyId
in the entity identified by entityId
java.lang.IllegalArgumentException
- in case no such property existsjava.util.List<Property> getProperties(java.util.Collection<java.lang.String> propertyIds)
Property
s identified by the propertyIds in propertyIds
propertyIds
- the ids of the properties to retrievepropertyIds
, found in
the entity identified by entityId
ColumnProperty getSelectableColumnProperty(java.lang.String propertyId)
propertyId
- the property idjava.lang.IllegalArgumentException
- in case the propertyId does not represent a ColumnProperty
or if it is not selectableColumnProperty.isSelectable()
java.util.List<ColumnProperty> getColumnProperties(java.util.List<java.lang.String> propertyIds)
ColumnProperty
s identified
by the propertyIds in propertyIds
propertyIds
- the ids of the properties to retrieveentityId
,
that is, properties that map to database columns, an empty list if none existboolean hasSingleIntegerPrimaryKey()
java.util.List<ColumnProperty> getWritableColumnProperties(boolean includePrimaryKeyProperties, boolean includeNonUpdatable)
includePrimaryKeyProperties
- if true primary key properties are included, non-updatable primary key properties
are only included if includeNonUpdatable
is trueincludeNonUpdatable
- if true then non updatable properties are includedentityId
java.util.List<Property> getUpdatableProperties()
java.util.List<Property> getProperties(boolean includeHidden)
Property
s for the given entityincludeHidden
- true if hidden properties should be included in the resultentityId
java.util.List<ColumnProperty> getSelectableColumnProperties(java.util.Collection<java.lang.String> propertyIds)
ColumnProperty
s identified
by the propertyIds in propertyIds
propertyIds
- the ids of the properties to retrieveentityId
,
that is, properties that map to database columns, an empty list if none existjava.util.List<ForeignKeyProperty> getForeignKeyProperties(java.lang.String foreignEntityId)
foreignEntityId
- the id of the referenced entityForeignKeyProperty getForeignKeyProperty(java.lang.String propertyId)
propertyId
- the property idjava.lang.IllegalArgumentException
- in case no such property existsint compareTo(Entity entity, Entity entityToCompare)
entity
- the first entityentityToCompare
- the second entityjava.lang.String toString(Entity entity)
entity
- the entity