- All Implemented Interfaces:
BeanType<T>,SpiBeanType,STreeType
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(BeanFkeyProperty fkey) Add objects to ElPropertyDeploy etc.Collection<? extends Property> voidappendOrderById(SpiQuery<T> query) Appends the Id property to the OrderBy clause if it is not believed to be already contained in the order by.Return the base table.Return the base table to use given the query temporal mode.Return the base table alias.Return the beanFinder (Migrate over to getFindController).beanProperty(String propName) Get a BeanProperty by its name.BeanType<?> beanTypeAtPath(String path) voidbindElementValue(SqlUpdate insert, Object value) Bind all the property values to the SqlUpdate.voidBind the idValue to the preparedStatement.Object[]bindIdValues(Object idValue) Return the id as an array of scalar bindable values.voidcacheApplyBeanUpdate(String key, Map<String, Object> changes, boolean updateNaturalKey, long version) Apply the update to the cache.voidRemove a collection of beans from the cache given the ids.cacheBeanGet(Object id, Boolean readOnly, PersistenceContext context) Return a bean from the bean cache (or null).booleancacheBeanLoad(EntityBean bean, EntityBeanIntercept ebi, Object id, PersistenceContext context) Returns true if it managed to populate/load the bean from the cache.cacheBeanLoadAll(Set<EntityBeanIntercept> batch, PersistenceContext persistenceContext, int lazyLoadProperty, String propertyName) Hit the bean cache trying to load a list/batch of entities.voidcacheBeanPut(EntityBean bean) Put a bean into the bean cache (taking into account inheritance).voidcacheBeanPut(T bean) Put the bean into the cache.voidcacheBeanPutAll(Collection<?> beans) Extract the raw cache data from the embedded bean.cacheEmbeddedBeanLoad(CachedBeanData data, PersistenceContext context) Load the embedded bean (taking into account inheritance).cacheIdLookup(PersistenceContext context, Collection<?> ids) Return the cache key for the given id value.cacheKeyForBean(EntityBean bean) Return the cache key for the given bean (based on id value).voidcacheManyPropClear(String propertyName) booleancacheManyPropLoad(BeanPropertyAssocMany<?> many, BeanCollection<?> bc, String parentKey, Boolean readOnly) Try to load the beanCollection from cache return true if successful.voidcacheManyPropPut(BeanPropertyAssocMany<?> many, BeanCollection<?> bc, String parentKey) Put the beanCollection into the cache.voidcacheManyPropPut(String name, String parentKey, CachedManyIds entry) Update the bean collection entry in the cache.voidcacheManyPropRemove(String propertyName, String parentKey) voidcacheNaturalKeyPut(String key, String newKey) Return the cache options.voidcachePersistDelete(Object id, PersistRequestBean<T> deleteRequest, CacheChangeSet changeSet) Remove a bean from the cache given its Id.voidcachePersistDeleteByIds(Collection<Object> ids, CacheChangeSet changeSet) Remove a bean from the cache given its Id.voidcachePersistInsert(PersistRequestBean<T> insertRequest, CacheChangeSet changeSet) Add the insert changes to the changeSet.voidcachePersistUpdate(Object id, PersistRequestBean<T> updateRequest, CacheChangeSet changeSet) Add the update to the changeSet.voidcacheUpdateQuery(boolean update, SpiTransaction transaction) Check if bulk update or delete query has a cache impact.changeLogBean(PersistRequestBean<T> request) Return true if this request should be included in the change log.voidCheck all mutable scalar types and mark as dirty if necessary.voidReturn true if any mutable properties are dirty.voidvoidClear the query cache.voidReset the statistics on all the query plans.config()Return the DatabaseConfig.voidClear a bean from the persistence context.voidcontextClear(PersistenceContext pc, Object idValue) Clear a bean from the persistence context.voidcontextDeleted(PersistenceContext pc, Object idValue) Delete a bean from the persistence context (such that we don't fetch it in the same transaction).contextGet(PersistenceContext pc, Object id) Get the bean from the persistence context.Get the bean from the persistence context with delete check option.voidcontextPut(PersistenceContext pc, Object id, Object bean) Put the bean into the persistence context.contextPutIfAbsent(PersistenceContext pc, Object id, EntityBean localBean) Put the bean into the persistence context if it is absent.contextRef(PersistenceContext pc, Boolean readOnly, boolean disableLazyLoad, Object id) Create a reference bean and put it in the persistence context (and return it).Convert the type of the idValue if required.convertOrmUpdateToSql(String ormUpdateStatement) Convert the logical orm update statement into sql by converting the bean properties and bean name to database columns and table.convertSetId(Object idValue, EntityBean bean) Convert and set the id value.Creates a new entity bean without invokingBeanPostConstructListener.postCreate(Object)createEntityBean2(boolean readOnlyNoIntercept) Create a new entity bean instance with option for read only optimisation.Create an entity bean for JSON marshalling (which differs for the element collection case).createRef(Object id, PersistenceContext pc) createReference(Boolean readOnly, boolean disableLazyLoad, Object id, PersistenceContext pc) Create a reference bean based on the id.createReference(Boolean readOnly, Object id, PersistenceContext pc) Create a reference with a check for the bean in the persistence context.createReference(Object id, PersistenceContext pc) Create a non read only reference bean without checking cacheSharableBeans.Return the DB comment for the base table.Return the default order by that may need to be added if a many property is included in the query.Return the default select clause.deleteById(Object id, List<Object> idList, DeleteMode mode) Return the "delete by id" sql.String[]Return the dependent tables for a view based entity.voidderegister(BeanPersistController controller) De-register the BeanPersistController.voidderegister(BeanPersistListener listener) De-register the BeanPersistListener.<U> BeanDescriptor<U> descriptor(Class<U> otherType) Return the BeanDescriptor of another bean type.descriptor(String path) Return the BeanDescriptor for a given path of Associated One or Many beans.Return bean class name.diff(EntityBean newBean, EntityBean oldBean) Return the diff comparing the bean values.voiddiff(String prefix, Map<String, ValuePair> map, EntityBean newBean, EntityBean oldBean) Populate the diff for updates with flattened non-null property values.Return the EbeanServer instance that owns this BeanDescriptor.elComparator(String propNameOrSortBy) elGetValue(String propName) Get an Expression language Value object.elPropertyDeploy(String propName) Similar to ElPropertyValue but also uses foreign key shortcuts.Return the Encrypt key given the BeanProperty.encryptKey(String tableName, String columnName) Return the Encrypt key given the table and column name.Return the type of this domain object.expressionPath(String path) Return an extra join if the property path requires it.findBeanPath(String schemaName, String tableName, String columnName) Return the property path given the db table and column.Return the find controller (SPI interface).findProperty(String propName) Find a BeanProperty including searching the inheritance hierarchy.findPropertyFromPath(String path) Return the bean property traversing the object graph and taking into account inheritance.findPropertyWithDynamic(String propName, String path) Return a property that is part of the SQL tree.fullName()Return the bean class name this descriptor is used for.getId(EntityBean bean) Helper method to return the unique property.longgetVersion(EntityBean entityBean) Return the version value in primitive long form (if exists and set).booleanReturn true if this bean type has a default select clause that is not simply select all properties.booleanhasId()Return true if the underlying type has an Id property.booleanReturn false for IdClass case with multiple @Id properties.idBinder()Return the IdBinder which is helpful for handling the various types of Id.idBinderIdSql(String alias) Return the sql for binding an id.Return the sql for binding id's using an IN clause.Return the Id value for the bean with embeddedId beans converted into maps.idName()Return the Id property name or null if no Id property exists.idSelect()idType()Return the identity generation type.booleanincludesAggregation(OrmQueryDetail detail) Return true if the query detail includes an aggregation property.Return the compound unique constraints.voidinheritanceLoad(SqlBeanLoad sqlBeanLoad, STreeProperty property, DbReadContext ctx) Load the property taking into account inheritance.voidinitialiseOther(io.ebeaninternal.server.deploy.BeanDescriptorInitContext initContext) Initialise the exported and imported parts for associated properties.booleanReturn true if queries for beans of this type are auto tunable.booleanReturn true if this type is a base table entity type.booleanReturn false if JDBC batch can't be implicitly escalated to.booleanReturn true if there is currently bean caching for this type of bean.booleanReturn true if the persist request needs to notify the cache.booleanReturn true if this bean can cache sharable instances.booleanbooleanbooleanReturn true if delete can use a single SQL statement.booleanReturn true if this is a "Doc Store only" entity bean.booleanReturn true if this is an embedded bean.booleanisEmbeddedPath(String propertyPath) Return true if the given path is an embedded bean.booleanisGeneratedProperty(int propertyIndex) Return true if this is a generated property.booleanReturn true if this entity bean has history support.booleanReturn true if the Id value is marked as a@GeneratedValue.booleanbooleanisInsertMode(EntityBeanIntercept ebi, boolean insertMode) Return true if this bean should be inserted rather than updated.booleanbooleanbooleanbooleanReturn true if this type is tenant aware.booleanReturn true if this type has a simple Id and the platform supports mutli-value binding.booleanReturn true if there is a natural key defined for this bean type.booleanReturn true if Id IN expression should have bind parameters padded.booleanReturn true if there is query caching for this type of bean.booleanReturns true if this bean is based on RawSql.booleanbooleanReturn true if the type uses soft delete.booleanisTableManaged(String tableName) Returns true, if the table is managed (i.e.booleanisToManyDirty(EntityBean bean) Return true if the bean contains a many property that has modifications.booleanReturn true if this bean type should use IdGeneration.booleanisValidExpression(String propertyName) jsonRead(SpiJsonReader jsonRead, String path, T target) jsonReadCollection(SpiJsonReader readJson, EntityBean parentBean) voidjsonWrite(SpiJsonWriter writeJson, EntityBean bean) voidjsonWrite(SpiJsonWriter writeJson, EntityBean bean, String key) voidjsonWriteDirty(SpiJsonWriter writeJson, EntityBean bean, boolean[] dirtyProps) voidjsonWriteElement(SpiJsonWriter ctx, Object element) voidjsonWriteMapEntry(SpiJsonWriter ctx, Map.Entry<?, ?> entry) booleanReturn true if the lazy loading property is a Many in which case just define a Reference for the collection and not invoke a query.booleanlazyLoadMany(EntityBeanIntercept ebi, LoadBeanContext parent) voidlazyLoadRegister(String prefix, EntityBeanIntercept ebi, EntityBean bean, LoadContext loadContext) Register all the assoc many properties on this bean that are not populated with the load context.manyProperty(SpiQuery<?> query) Return the many property included in the query or null if one is not.voidmarkAsDeleted(EntityBean bean) Mark the bean as deleted by setting the softDelete property to true.voidmerge(EntityBean bean, EntityBean existing) voidmetricPersistBatch(PersistRequest.Type type, long startNanos, int size) voidmetricPersistNoBatch(PersistRequest.Type type, long startNanos) name()Return the short name of the entity bean.Return the natural key.naturalKeyLookup(PersistenceContext context, Set<Object> keys) Use natural key lookup to hit the bean cache.Return the order column property.parser()Return the partition details of the bean.Return the "path map" to toMany or toOne properties using the given prefix.Return the Controller.Return the beanListener.voidExecute the postLoad if a BeanPostLoad exists for this bean.voidpreAllocateIds(int batchSize) voidprepareQuery(SpiQuery<T> query) Prepare the query for multi-tenancy check for document store only use.Return a collection of all BeanProperty.Scalar properties without the unique id or secondary table properties.BeanPropertyAssocOne<?>[]Return the beans that are embedded.Return the properties set as generated values on insert.Return the properties set as generated values on update.All Assoc Many's for this descriptor.Assoc Many's with delete cascade.Assoc Many's with save cascade.Assoc ManyToMany's.All Non Assoc Many's for this descriptor.Return the non transient non id properties.BeanPropertyAssocOne<?>[]All the BeanPropertyAssocOne that are not embedded.BeanPropertyAssocOne<?>[]Exported assoc ones with delete cascade.BeanPropertyAssocOne<?>[]Exported assoc ones with cascade save.BeanPropertyAssocOne<?>[]Returns ManyToOnes and OneToOnes on the imported owning side.BeanPropertyAssocOne<?>[]Imported Assoc Ones with cascade delete true.BeanPropertyAssocOne<?>[]Imported Assoc Ones with cascade save true.Return the transient properties.propertyByIndex(int pos) Return the property that holds unmapped JSON content.Return the scalar properties.Return the embedded bean properties.Return the associated many properties.propsOne()Return the associated one properties.Return the BeanQueryAdapter or null if none is defined.queryCacheGet(Object id) Get a query result from the query cache.voidqueryCachePut(Object id, QueryCacheEntry entry) Put a query result into the query cache.queryPlan(CQueryPlanKey key) voidqueryPlan(CQueryPlanKey key, CQueryPlan plan) booleanvoidregister(BeanPersistController newController) Register the new BeanPersistController.voidregister(BeanPersistListener newPersistListener) Register the new BeanPersistController.voidresetManyProperties(Object dbBean) Reset the many properties to empty state ready for reloading.ScalarType<?> scalarType(int jdbcType) Return the Scalar type for the given JDBC type.ScalarType<?> scalarType(String cast) Return the SQL used to return the last inserted id.voidsetAllLoaded(EntityBean bean) Set all properties to be loaded (recurse to embedded beans).voidsetEbeanServer(SpiEbeanServer ebeanServer) Set the server.voidsetGeneratedId(EntityBean entityBean, Transaction transaction) Set the generated Id value if appropriate.voidsetId(Object idValue, EntityBean bean) Set the Id value to the bean (without type conversion).voidSet the bean id value converting if necessary.voidsetTenantId(EntityBean entityBean, Object tenantId) Set the Tenant Id value to the bean.longsetVersion(EntityBean entityBean, Object versionValue) Set the version value returning it in primitive long form.Return the simple name of the entity bean.softDeletePredicate(String tableAlias) Return the soft delete predicate using the given table alias.voidsoftDeleteValue(EntityBean bean) voidReturn the storage engine.booleanReturn true if this bean uses a SQL select to fetch the last inserted id value.booleanReturn true if foreign keys to the base table should be suppressed.Return the tablespace details of the bean.Return the tenant property when multi-tenant partitioning support is used.toString()Summary description.type()Return the class type this BeanDescriptor describes.Return the "shadow" property to support unidirectional relationships.List<BeanProperty[]> Return a Sql update statement to set the importedId value (deferred execution).updatePlan(String key) Get a UpdatePlan for a given hash.voidupdatePlan(String key, SpiUpdatePlan plan) Add a UpdatePlan to the cache with a given hash.Return the first version property that exists on the bean.voidvisitMetrics(MetricVisitor visitor) Visit all the ORM query plan metrics (includes UpdateQuery with updates and deletes).Return the 'when created' property if there is one defined.Return the 'when modified' property if there is one defined.Return the "where id in" sql (for use with UpdateQuery).
-
Constructor Details
-
BeanDescriptor
-
-
Method Details
-
idSelect
-
isJacksonCorePresent
public boolean isJacksonCorePresent() -
config
Return the DatabaseConfig. -
setEbeanServer
Set the server. Primarily so that the Many's can lazy load. -
ebeanServer
Return the EbeanServer instance that owns this BeanDescriptor. -
isDocStoreOnly
public boolean isDocStoreOnly()Return true if this is a "Doc Store only" entity bean.- Specified by:
isDocStoreOnlyin interfaceBeanType<T>
-
entityType
Return the type of this domain object. -
propertyByIndex
-
initialiseOther
public void initialiseOther(io.ebeaninternal.server.deploy.BeanDescriptorInitContext initContext) Initialise the exported and imported parts for associated properties. -
isBatchEscalateOnCascade
Return false if JDBC batch can't be implicitly escalated to. This happens when we have circular import id situation (need to defer setting identity value). -
metricPersistBatch
-
metricPersistNoBatch
-
merge
-
bindElementValue
Bind all the property values to the SqlUpdate. -
isChangeLog
public boolean isChangeLog() -
changeLogBean
Return true if this request should be included in the change log. -
deleteById
-
whereIdInSql
Return the "where id in" sql (for use with UpdateQuery). -
deleteByIdInSql
Return the "delete by id" sql. -
add
Add objects to ElPropertyDeploy etc. These are used so that expressions on foreign keys don't require an extra join. -
cacheOptions
Return the cache options. -
encryptKey
Return the Encrypt key given the BeanProperty. -
encryptKey
Return the Encrypt key given the table and column name. -
scalarType
Return the Scalar type for the given JDBC type. -
scalarType
-
hasDefaultSelectClause
public boolean hasDefaultSelectClause()Return true if this bean type has a default select clause that is not simply select all properties. -
defaultSelectClause
Return the default select clause. -
prepareQuery
Prepare the query for multi-tenancy check for document store only use. -
naturalKey
Return the natural key. -
isBeanCaching
public boolean isBeanCaching()Return true if there is currently bean caching for this type of bean.- Specified by:
isBeanCachingin interfaceBeanType<T>
-
isNaturalKeyCaching
public boolean isNaturalKeyCaching()Return true if there is a natural key defined for this bean type. -
isQueryCaching
public boolean isQueryCaching()Return true if there is query caching for this type of bean.- Specified by:
isQueryCachingin interfaceBeanType<T>
-
isManyPropCaching
public boolean isManyPropCaching() -
isCacheNotify
Return true if the persist request needs to notify the cache. -
clearBeanCache
public void clearBeanCache()- Specified by:
clearBeanCachein interfaceBeanType<T>
-
clearQueryCache
public void clearQueryCache()Clear the query cache.- Specified by:
clearQueryCachein interfaceBeanType<T>
-
queryCacheGet
Get a query result from the query cache. -
queryCachePut
Put a query result into the query cache. -
cacheManyPropLoad
public boolean cacheManyPropLoad(BeanPropertyAssocMany<?> many, BeanCollection<?> bc, String parentKey, Boolean readOnly) Try to load the beanCollection from cache return true if successful. -
cacheManyPropPut
Put the beanCollection into the cache. -
cacheManyPropPut
Update the bean collection entry in the cache. -
cacheManyPropRemove
-
cacheManyPropClear
-
cacheEmbeddedBeanExtract
Extract the raw cache data from the embedded bean. -
cacheEmbeddedBeanLoad
Load the embedded bean (taking into account inheritance). -
cacheBeanPut
Put the bean into the cache. -
cacheBeanPut
Put a bean into the bean cache (taking into account inheritance). -
cacheBeanPutAll
-
cacheBeanGet
Return a bean from the bean cache (or null). -
cacheApplyInvalidate
Remove a collection of beans from the cache given the ids. -
cacheBeanLoadAll
public Set<EntityBeanIntercept> cacheBeanLoadAll(Set<EntityBeanIntercept> batch, PersistenceContext persistenceContext, int lazyLoadProperty, String propertyName) Hit the bean cache trying to load a list/batch of entities. Return the set of entities that were successfully loaded from L2 cache. -
cacheBeanLoad
public boolean cacheBeanLoad(EntityBean bean, EntityBeanIntercept ebi, Object id, PersistenceContext context) Returns true if it managed to populate/load the bean from the cache. -
cacheIdLookup
-
naturalKeyLookup
Use natural key lookup to hit the bean cache. -
cacheNaturalKeyPut
-
cacheUpdateQuery
Check if bulk update or delete query has a cache impact. -
cachePersistDeleteByIds
Remove a bean from the cache given its Id. -
cachePersistDelete
public void cachePersistDelete(Object id, PersistRequestBean<T> deleteRequest, CacheChangeSet changeSet) Remove a bean from the cache given its Id. -
cachePersistInsert
Add the insert changes to the changeSet. -
cachePersistUpdate
public void cachePersistUpdate(Object id, PersistRequestBean<T> updateRequest, CacheChangeSet changeSet) Add the update to the changeSet. -
cacheApplyBeanUpdate
public void cacheApplyBeanUpdate(String key, Map<String, Object> changes, boolean updateNaturalKey, long version) Apply the update to the cache. -
baseTableAlias
Return the base table alias. This is always the first letter of the bean name. -
preAllocateIds
public void preAllocateIds(int batchSize) -
nextId
-
parser
-
convertOrmUpdateToSql
Convert the logical orm update statement into sql by converting the bean properties and bean name to database columns and table. -
visitMetrics
Visit all the ORM query plan metrics (includes UpdateQuery with updates and deletes). -
clearQueryStatistics
public void clearQueryStatistics()Reset the statistics on all the query plans. -
postLoad
Execute the postLoad if a BeanPostLoad exists for this bean. -
queryPlan
-
queryPlan
-
updatePlan
Get a UpdatePlan for a given hash. -
updatePlan
Add a UpdatePlan to the cache with a given hash. -
updateImportedIdSql
Return a Sql update statement to set the importedId value (deferred execution). -
isDeleteByStatement
public boolean isDeleteByStatement()Return true if delete can use a single SQL statement.This implies cascade delete does not continue depth wise and that this is no associated L2 bean caching.
-
isDeleteByBulk
public boolean isDeleteByBulk() -
whenModifiedProperty
Return the 'when modified' property if there is one defined.- Specified by:
whenModifiedPropertyin interfaceBeanType<T>
-
whenCreatedProperty
Return the 'when created' property if there is one defined.- Specified by:
whenCreatedPropertyin interfaceBeanType<T>
-
manyProperty
Return the many property included in the query or null if one is not. -
idBinder
Return the IdBinder which is helpful for handling the various types of Id. -
hasId
public boolean hasId()Description copied from interface:STreeTypeReturn true if the underlying type has an Id property. -
hasSingleIdProperty
public boolean hasSingleIdProperty()Return false for IdClass case with multiple @Id properties. -
isMultiValueIdSupported
public boolean isMultiValueIdSupported()Return true if this type has a simple Id and the platform supports mutli-value binding. -
isPadInExpression
public boolean isPadInExpression()Return true if Id IN expression should have bind parameters padded. -
idBinderIdSql
Return the sql for binding an id. This is the columns with table alias that make up the id. -
idBinderInLHSSql
Return the sql for binding id's using an IN clause. -
bindId
public void bindId(io.ebeaninternal.server.bind.DataBind dataBind, Object idValue) throws SQLException Bind the idValue to the preparedStatement.This takes care of the various id types such as embedded beans etc.
- Throws:
SQLException
-
bindIdValues
Return the id as an array of scalar bindable values.This 'flattens' any EmbeddedId or multiple Id property cases.
-
createBean
- Specified by:
createBeanin interfaceBeanType<T>
-
createEntityBean
Creates a new entity bean without invokingBeanPostConstructListener.postCreate(Object)- Specified by:
createEntityBeanin interfaceSTreeType
-
createEntityBean2
Description copied from interface:STreeTypeCreate a new entity bean instance with option for read only optimisation.- Specified by:
createEntityBean2in interfaceSTreeType
-
createEntityBeanForJson
Create an entity bean for JSON marshalling (which differs for the element collection case). -
createReference
Create a reference with a check for the bean in the persistence context. -
createReference
public T createReference(Boolean readOnly, boolean disableLazyLoad, Object id, PersistenceContext pc) Create a reference bean based on the id. -
createReference
Create a non read only reference bean without checking cacheSharableBeans. -
createRef
-
findPropertyFromPath
Return the bean property traversing the object graph and taking into account inheritance.- Specified by:
findPropertyFromPathin interfaceSTreeType
-
beanTypeAtPath
- Specified by:
beanTypeAtPathin interfaceBeanType<T>
-
descriptor
Return the BeanDescriptor for a given path of Associated One or Many beans. -
descriptor
Return the BeanDescriptor of another bean type. -
isTableManaged
Returns true, if the table is managed (i.e. an existing m2m relation). -
orderColumn
Return the order column property. -
unidirectional
Return the "shadow" property to support unidirectional relationships.For bidirectional this is a real property on the bean. For unidirectional relationships we have this 'shadow' property which is not externally visible.
-
isUseIdGenerator
public boolean isUseIdGenerator()Return true if this bean type should use IdGeneration.If this is false and the Id is null it is assumed that a database auto increment feature is being used to populate the id.
-
descriptorId
Return bean class name. -
type
Return the class type this BeanDescriptor describes. -
fullName
Return the bean class name this descriptor is used for.If this BeanDescriptor is for a table then this returns the table name instead.
-
name
Return the short name of the entity bean. -
simpleName
Return the simple name of the entity bean. -
toString
Summary description. -
contextGet
Get the bean from the persistence context. -
contextGetWithOption
Get the bean from the persistence context with delete check option. -
contextPut
Put the bean into the persistence context. -
contextPutIfAbsent
Put the bean into the persistence context if it is absent.- Specified by:
contextPutIfAbsentin interfaceSTreeType
-
contextRef
public Object contextRef(PersistenceContext pc, Boolean readOnly, boolean disableLazyLoad, Object id) Create a reference bean and put it in the persistence context (and return it). -
contextClear
Clear a bean from the persistence context. -
contextClear
Clear a bean from the persistence context. -
contextDeleted
Delete a bean from the persistence context (such that we don't fetch it in the same transaction). -
idName
Return the Id property name or null if no Id property exists. -
getId
Helper method to return the unique property. If only one property makes up the unique id then it's value is returned. If there is a concatenated unique id then a Map is built with the keys being the names of the properties that make up the unique id. -
cacheKeyForBean
Return the cache key for the given bean (based on id value). -
cacheKey
Return the cache key for the given id value. -
id
-
idForJson
Return the Id value for the bean with embeddedId beans converted into maps.The usage is to provide simple id types for JSON processing (for embeddedId's).
-
defaultOrderBy
Return the default order by that may need to be added if a many property is included in the query. -
convertId
Convert the type of the idValue if required. -
setId
Set the bean id value converting if necessary. -
convertSetId
Convert and set the id value.If the bean is not null, the id value is set to the id property of the bean after it has been converted to the correct type.
-
setId
Set the Id value to the bean (without type conversion). -
property
-
beanProperty
Get a BeanProperty by its name. -
sort
-
elComparator
-
lazyLoadRegister
public void lazyLoadRegister(String prefix, EntityBeanIntercept ebi, EntityBean bean, LoadContext loadContext) Register all the assoc many properties on this bean that are not populated with the load context.This provides further lazy loading via the load context.
-
lazyLoadMany
Return true if the lazy loading property is a Many in which case just define a Reference for the collection and not invoke a query. -
lazyLoadMany
-
isGeneratedProperty
public boolean isGeneratedProperty(int propertyIndex) Return true if this is a generated property. -
isValidExpression
- Specified by:
isValidExpressionin interfaceBeanType<T>
-
elGetValue
Get an Expression language Value object. -
expressionPath
- Specified by:
expressionPathin interfaceBeanType<T>
-
elPropertyDeploy
Similar to ElPropertyValue but also uses foreign key shortcuts.The foreign key shortcuts means we can avoid unnecessary joins.
-
findBeanPath
Return the property path given the db table and column. -
findPropertyWithDynamic
Return a property that is part of the SQL tree.The property can be a dynamic formula or a well known bean property.
- Specified by:
findPropertyWithDynamicin interfaceSTreeType
-
findProperty
Find a BeanProperty including searching the inheritance hierarchy.This searches this BeanDescriptor and then searches further down the inheritance tree (not up).
- Specified by:
findPropertyin interfaceSTreeType
-
resetManyProperties
Reset the many properties to empty state ready for reloading. -
isCacheSharableBeans
public boolean isCacheSharableBeans()Return true if this bean can cache sharable instances.This means is has no relationships and has readOnly=true in its cache options.
-
isAutoTunable
public boolean isAutoTunable()Return true if queries for beans of this type are auto tunable. -
isEmbedded
public boolean isEmbedded()Return true if this is an embedded bean. -
indexDefinitions
Return the compound unique constraints. -
persistListener
Return the beanListener.- Specified by:
persistListenerin interfaceBeanType<T>
-
beanFinder
Return the beanFinder (Migrate over to getFindController). -
findController
Return the find controller (SPI interface).- Specified by:
findControllerin interfaceBeanType<T>
-
queryAdapter
Return the BeanQueryAdapter or null if none is defined.- Specified by:
queryAdapterin interfaceBeanType<T>
-
deregister
De-register the BeanPersistListener. -
deregister
De-register the BeanPersistController. -
register
Register the new BeanPersistController. -
register
Register the new BeanPersistController. -
persistController
Return the Controller.- Specified by:
persistControllerin interfaceBeanType<T>
-
isRawSqlBased
public boolean isRawSqlBased()Returns true if this bean is based on RawSql.- Specified by:
isRawSqlBasedin interfaceSTreeType
-
dbComment
Return the DB comment for the base table. -
suppressForeignKey
public boolean suppressForeignKey()Return true if foreign keys to the base table should be suppressed. -
partitionMeta
Return the partition details of the bean. -
tablespaceMeta
Return the tablespace details of the bean. -
storageEngine
Return the storage engine. -
dependentTables
Return the dependent tables for a view based entity. -
baseTable
Return the base table. Only properties mapped to the base table are by default persisted. -
isBaseTable
public boolean isBaseTable()Return true if this type is a base table entity type. -
baseTable
Return the base table to use given the query temporal mode. -
isSoftDelete
public boolean isSoftDelete()Description copied from interface:STreeTypeReturn true if the type uses soft delete.- Specified by:
isSoftDeletein interfaceSTreeType
-
softDeleteValue
-
softDeletePredicate
Description copied from interface:STreeTypeReturn the soft delete predicate using the given table alias.- Specified by:
softDeletePredicatein interfaceSTreeType
-
markAsDeleted
Description copied from interface:STreeTypeMark the bean as deleted by setting the softDelete property to true. This works also, if there is only a virtual softDelete property computed by a formula. If there is no soft delete property, it sets the lazyLoadFailure flag in EBI.- Specified by:
markAsDeletedin interfaceSTreeType
-
pathMap
Description copied from interface:STreeTypeReturn the "path map" to toMany or toOne properties using the given prefix. -
isEmbeddedPath
Description copied from interface:STreeTypeReturn true if the given path is an embedded bean.- Specified by:
isEmbeddedPathin interfaceSTreeType
-
extraJoin
Description copied from interface:STreeTypeReturn an extra join if the property path requires it. -
inheritanceLoad
Description copied from interface:STreeTypeLoad the property taking into account inheritance.- Specified by:
inheritanceLoadin interfaceSTreeType
-
setTenantId
Set the Tenant Id value to the bean. -
isToManyDirty
Description copied from interface:SpiBeanTypeReturn true if the bean contains a many property that has modifications.That is a ManyToMany or a OneToMany with orphan removal with additions or removals from the collection.
- Specified by:
isToManyDirtyin interfaceSpiBeanType
-
isHistorySupport
public boolean isHistorySupport()Return true if this entity bean has history support.- Specified by:
isHistorySupportin interfaceSTreeType
-
idType
Return the identity generation type. -
setGeneratedId
Set the generated Id value if appropriate. -
isIdGeneratedValue
public boolean isIdGeneratedValue()Return true if the Id value is marked as a@GeneratedValue. -
identityMode
-
selectLastInsertedId
Return the SQL used to return the last inserted id.This is only used with Identity columns and getGeneratedKeys is not supported.
-
supportsSelectLastInsertedId
public boolean supportsSelectLastInsertedId()Return true if this bean uses a SQL select to fetch the last inserted id value. -
allProperties
- Specified by:
allPropertiesin interfaceBeanType<T>
-
propertiesAll
Return a collection of all BeanProperty. This includes transient properties. -
propertyUnmappedJson
Return the property that holds unmapped JSON content. -
propertiesNonTransient
Return the non transient non id properties. -
propertiesTransient
Return the transient properties. -
propertiesEmbedded
Return the beans that are embedded. These share the base table with the owner bean. -
includesAggregation
Return true if the query detail includes an aggregation property. -
setAllLoaded
Set all properties to be loaded (recurse to embedded beans). -
-
idProperty
- Specified by:
idPropertyin interfaceBeanType<T>
-
isInsertMode
Return true if this bean should be inserted rather than updated.- Parameters:
ebi- The entity bean interceptinsertMode- true if the 'root request' was an insert rather than an update
-
isReference
-
referenceIdPropertyOnly
-
isIdLoaded
-
setVersion
Set the version value returning it in primitive long form. -
getVersion
Return the version value in primitive long form (if exists and set). -
checkAllMutableProperties
Check all mutable scalar types and mark as dirty if necessary. -
checkAnyMutableProperties
Return true if any mutable properties are dirty. -
concurrencyMode
-
diff
Return the diff comparing the bean values. -
diff
Populate the diff for updates with flattened non-null property values. -
appendOrderById
Appends the Id property to the OrderBy clause if it is not believed to be already contained in the order by.This is primarily used for paging queries to ensure that an order by clause is provided and that the order by provides unique ordering of the rows (so that the paging is predicable).
-
propsBaseScalar
Description copied from interface:STreeTypeReturn the scalar properties.- Specified by:
propsBaseScalarin interfaceSTreeType
-
propsEmbedded
Description copied from interface:STreeTypeReturn the embedded bean properties.- Specified by:
propsEmbeddedin interfaceSTreeType
-
propsOne
Description copied from interface:STreeTypeReturn the associated one properties. -
propsMany
Description copied from interface:STreeTypeReturn the associated many properties. -
propertiesOne
All the BeanPropertyAssocOne that are not embedded. These are effectively joined beans. For ManyToOne and OneToOne associations. -
propertiesOneImported
Returns ManyToOnes and OneToOnes on the imported owning side.Excludes OneToOnes on the exported side.
-
propertiesOneImportedSave
Imported Assoc Ones with cascade save true. -
propertiesOneImportedDelete
Imported Assoc Ones with cascade delete true. -
propertiesOneExportedSave
Exported assoc ones with cascade save. -
propertiesOneExportedDelete
Exported assoc ones with delete cascade. -
propertiesNonMany
All Non Assoc Many's for this descriptor. -
propertiesMany
All Assoc Many's for this descriptor. -
propertiesManySave
Assoc Many's with save cascade. -
propertiesManyDelete
Assoc Many's with delete cascade. -
propertiesManyToMany
Assoc ManyToMany's. -
versionProperty
Return the first version property that exists on the bean. Returns null if no version property exists on the bean.Note that this DOES NOT find a version property on an embedded bean.
-
isMultiTenant
public boolean isMultiTenant()Return true if this type is tenant aware. -
tenantProperty
Return the tenant property when multi-tenant partitioning support is used. -
propertiesBaseScalar
Scalar properties without the unique id or secondary table properties. -
propertiesGenInsert
Return the properties set as generated values on insert. -
propertiesGenUpdate
Return the properties set as generated values on update. -
jsonWriteDirty
public void jsonWriteDirty(SpiJsonWriter writeJson, EntityBean bean, boolean[] dirtyProps) throws IOException - Throws:
IOException
-
jsonWriteMapEntry
- Throws:
IOException
-
jsonWriteElement
-
jsonReadCollection
- Throws:
IOException
-
isJsonReadCollection
public boolean isJsonReadCollection() -
jsonWrite
- Throws:
IOException
-
jsonWrite
- Throws:
IOException
-
jsonRead
- Throws:
IOException
-
uniqueProps
-