java.lang.Object
io.ebeaninternal.server.deploy.meta.DeployBeanDescriptor<T>
Describes Beans including their deployment information.
-
Constructor Summary
ConstructorsConstructorDescriptionDeployBeanDescriptor(BeanDescriptorManager manager, Class<T> beanType, DatabaseBuilder.Settings config) Construct the BeanDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionAdd a bean property.voidAdd a compound unique constraint.voidaddPersistController(BeanPersistController controller) voidaddPersistListener(BeanPersistListener listener) voidaddPostConstructListener(BeanPostConstructListener postConstructListener) voidaddPostLoad(BeanPostLoad postLoad) voidaddQueryAdapter(BeanQueryAdapter queryAdapter) Return the immutable IdentityMode.findJoinToTable(String tableName) Return the base table.Return the base table with as of suffix.Return the base table with full structure.Return the base table with versions between suffix.Return the beanFinder.getBeanProperty(String propName) Get a BeanProperty by its name.Return the class type this BeanDescriptor describes.Return the cache options.Return the concurrency mode used for beans of this type.Return the defaultSelectClause using FetchType.LAZY and FetchType.EAGER.String[]For view based entity return the dependant tables.Return the bean class name this descriptor is used for.Return the actual IdGenerator for this bean type (can be null).Return the compound unique constraints (can be null).getName()Return the bean short name.Return the BeanPersistController (could be a chain of them, 1 or null).Return the BeanPersistListener (could be a chain of them, 1 or null).Return the BeanPostCreate(could be a chain of them, 1 or null).Return the BeanPostLoad (could be a chain of them, 1 or null).Return the SQL used to return the last inserted Id.Return the Primary Key column assuming it is a single column (not compound).Return the BeanProperty that is the Id.booleanbooleanbooleanbooleanReturn true if this is an @History entity bean.booleanReturn true for automatic Id generation strategy.booleanReturn true if the primary key is a compound key or if it's database type is non-numeric (and hence not suitable for db identity or sequence.Parse the aggregation formula into expressions with table alias placeholders.voidReturn a collection of all BeanProperty deployment information.Return BeanPropertyAssocMany for this descriptor.Return an Iterator of BeanPropertyAssocOne that are not embedded.base properties without the unique id properties.String[]voidsetBaseTable(TableName baseTableFull, String asOfSuffix, String versionsBetweenSuffix) Set the base table.voidsetBeanFinder(BeanFindController beanFinder) Set the BeanFinder to use for beans of this type.voidsetCache(io.ebean.annotation.Cache cache) Enable L2 bean and query caching based on Cache annotation.voidsetChangeLogFilter(ChangeLogFilter changeLogFilter) voidsetConcurrencyMode(ConcurrencyMode concurrencyMode) Set the concurrency mode used for beans of this type.voidsetCustomIdGenerator(PlatformIdGenerator idGenerator) Assign a custom external IdGenerator.voidsetDbComment(String dbComment) voidsetEntityType(BeanDescriptor.EntityType entityType) voidSet to true for @History entity beans that have history.voidsetIdClass(Class<?> idClass) Set the IdClass to use.voidsetIdentityMode(io.ebean.annotation.Identity identity) voidsetIdentitySequence(int initialValue, int allocationSize, String seqName) Set from@SequenceintsetIdentitySequenceBatchMode(boolean sequenceBatchMode) Return the sequence increment to use given sequence batch mode.voidsetIdentitySequenceGenerator(String genName) Potentially set sequence name from@GeneratedValue.voidsetIdentityType(IdType type) voidSet when GeneratedValue explicitly mapped on Id property.voidsetIdGenerator(PlatformIdGenerator idGenerator) Set the actual IdGenerator for this bean type.voidsetInvalidateQueryCache(String region) Set that this type invalidates query caches.voidSet the bean shortName.voidsetOrderColumn(DeployBeanProperty orderColumn) voidsetPartitionMeta(PartitionMeta partitionMeta) voidsetPrimaryKeyJoin(TableJoin join) PK is also a FK.voidsetPropertyNames(String[] properties) voidsetSelectLastInsertedId(String selectLastInsertedId) Set the SQL used to return the last inserted Id.voidsetStorageEngine(String storageEngine) voidsetTablespaceMeta(TablespaceMeta tablespaceMeta) voidsetUnidirectional(DeployBeanPropertyAssocOne<?> unidirectional) voidAssign the standard UUID generator if one has not been set.voidSet when entity is based on a view.voidtoString()Summary description.
-
Constructor Details
-
DeployBeanDescriptor
public DeployBeanDescriptor(BeanDescriptorManager manager, Class<T> beanType, DatabaseBuilder.Settings config) Construct the BeanDescriptor.
-
-
Method Details
-
bindMaxLength
-
setPropertyNames
-
propertyNames
-
setIdClass
Set the IdClass to use. -
setPrimaryKeyJoin
PK is also a FK. -
getPrimaryKeyJoin
-
setStorageEngine
-
getStorageEngine
-
setHistorySupport
public void setHistorySupport()Set to true for @History entity beans that have history. -
isHistorySupport
public boolean isHistorySupport()Return true if this is an @History entity bean. -
setDbComment
-
getDbComment
-
setPartitionMeta
-
getPartitionMeta
-
setTablespaceMeta
-
getTablespaceMeta
-
createDeployBeanTable
-
setEntityType
-
isEmbedded
public boolean isEmbedded() -
isBaseTableType
public boolean isBaseTableType() -
isDocStoreOnly
public boolean isDocStoreOnly() -
getEntityType
-
buildIdentityMode
Return the immutable IdentityMode. -
getIdentityMode
-
setIdentityMode
public void setIdentityMode(io.ebean.annotation.Identity identity) -
setIdentitySequence
Set from@Sequence -
setIdentitySequenceGenerator
Potentially set sequence name from@GeneratedValue. -
setIdentitySequenceBatchMode
public int setIdentitySequenceBatchMode(boolean sequenceBatchMode) Return the sequence increment to use given sequence batch mode. -
setIdentityType
-
getBeanType
Return the class type this BeanDescriptor describes. -
setChangeLogFilter
-
getChangeLogFilter
-
setInvalidateQueryCache
Set that this type invalidates query caches. -
setCache
public void setCache(io.ebean.annotation.Cache cache) Enable L2 bean and query caching based on Cache annotation. -
getCacheOptions
Return the cache options. -
getUnidirectional
-
setUnidirectional
-
setOrderColumn
-
getConcurrencyMode
Return the concurrency mode used for beans of this type. -
setConcurrencyMode
Set the concurrency mode used for beans of this type. -
addIndex
Add a compound unique constraint. -
getIndexDefinitions
Return the compound unique constraints (can be null). -
getBeanFinder
Return the beanFinder. Usually null unless overriding the finder. -
setBeanFinder
Set the BeanFinder to use for beans of this type. This is set to override the finding from the default. -
getPersistController
Return the BeanPersistController (could be a chain of them, 1 or null). -
getPersistListener
Return the BeanPersistListener (could be a chain of them, 1 or null). -
getQueryAdapter
-
getPostLoad
Return the BeanPostLoad (could be a chain of them, 1 or null). -
getPostConstructListener
Return the BeanPostCreate(could be a chain of them, 1 or null). -
addPersistController
-
addPersistListener
-
addQueryAdapter
-
addPostLoad
-
addPostConstructListener
-
getDependentTables
For view based entity return the dependant tables. -
getBaseTable
Return the base table. Only properties mapped to the base table are by default persisted. -
getBaseTableAsOf
Return the base table with as of suffix. -
getBaseTableVersionsBetween
Return the base table with versions between suffix. -
getBaseTableFull
Return the base table with full structure. -
setView
Set when entity is based on a view. -
setBaseTable
Set the base table. Only properties mapped to the base table are by default persisted. -
sortProperties
public void sortProperties() -
postAnnotations
public void postAnnotations() -
addBeanProperty
Add a bean property. -
properties
-
getBeanProperty
Get a BeanProperty by its name. -
getFullName
Return the bean class name this descriptor is used for.If this BeanDescriptor is for a table then this returns the table name instead.
-
getName
Return the bean short name. -
setName
Set the bean shortName. -
getSelectLastInsertedId
Return the SQL used to return the last inserted Id.Used with Identity columns where getGeneratedKeys is not supported.
-
setSelectLastInsertedId
Set the SQL used to return the last inserted Id. -
getIdGenerator
Return the actual IdGenerator for this bean type (can be null). -
setIdGenerator
Set the actual IdGenerator for this bean type. -
isIdGeneratedValue
public boolean isIdGeneratedValue()Return true for automatic Id generation strategy. -
setIdGeneratedValue
public void setIdGeneratedValue()Set when GeneratedValue explicitly mapped on Id property. -
setUuidGenerator
public void setUuidGenerator()Assign the standard UUID generator if one has not been set. -
setCustomIdGenerator
Assign a custom external IdGenerator. -
toString
Summary description. -
propertiesAll
Return a collection of all BeanProperty deployment information. -
getDefaultSelectClause
Return the defaultSelectClause using FetchType.LAZY and FetchType.EAGER. -
isPrimaryKeyCompoundOrNonNumeric
public boolean isPrimaryKeyCompoundOrNonNumeric()Return true if the primary key is a compound key or if it's database type is non-numeric (and hence not suitable for db identity or sequence. -
getSinglePrimaryKeyColumn
Return the Primary Key column assuming it is a single column (not compound). This is for the purpose of defining a sequence name. -
idProperty
Return the BeanProperty that is the Id. -
findJoinToTable
-
propertiesAssocOne
Return an Iterator of BeanPropertyAssocOne that are not embedded. These are effectively joined beans. For ManyToOne and OneToOne associations. -
propertiesAssocMany
Return BeanPropertyAssocMany for this descriptor. -
propertiesBase
base properties without the unique id properties. -
parse
Parse the aggregation formula into expressions with table alias placeholders.
-