java.lang.Object
io.ebeaninternal.server.deploy.BeanProperty
io.ebeaninternal.server.deploy.BeanPropertyAssoc<T>
io.ebeaninternal.server.deploy.BeanPropertyAssocOne<T>
- All Implemented Interfaces:
ScalarDataReader<Object>,ExpressionPath,Property,ElPropertyDeploy,ElPropertyValue,STreeProperty,STreePropertyAssoc,STreePropertyAssocOne
- Direct Known Subclasses:
BeanPropertyIdClass
Property mapped to a joined bean.
-
Field Summary
Fields inherited from class io.ebeaninternal.server.deploy.BeanProperty
idFields inherited from interface io.ebeaninternal.server.el.ElPropertyDeploy
ROOT_ELPREFIX -
Constructor Summary
ConstructorsModifierConstructorDescriptionBeanPropertyAssocOne(BeanDescriptorMap owner, BeanDescriptor<?> descriptor, DeployBeanPropertyAssocOne<T> deploy) Create the property.BeanPropertyAssocOne(BeanDescriptorMap owner, DeployBeanPropertyAssocOne<T> deploy) Create based on deploy information of an EmbeddedId.protectedBeanPropertyAssocOne(BeanPropertyAssocOne<T> source, io.ebeaninternal.server.deploy.BeanPropertyOverride override) -
Method Summary
Modifier and TypeMethodDescriptionaddJoin(SqlJoinType joinType, String a1, String a2, DbSqlContext ctx) Add table join with explicit table alias.voidAdd the tenantId predicate to the query.voidappendFrom(DbSqlContext ctx, SqlJoinType joinType, String manyWhere) Add any extra joins required to support this property.voidappendSelect(DbSqlContext ctx, boolean subQuery) Append to the select clause.assocIdExpression(String prefix, String operator) Return the Id expression to add to where clause etc.assocIdInExpr(String prefix) Return the logical id in expression taking into account embedded id's.assocIdInValueExpr(boolean not, int size) Return the logical id value expression taking into account embedded id's.Object[]assocIdValues(EntityBean bean) Return the Id values from the given bean.buildElPropertyValue(String propName, String remainder, ElPropertyChainBuilder chain, boolean propertyDeploy) voidbuildRawSqlSelectChain(String prefix, List<String> selectChain) For RawSql build the select chain.Create a bean of the target type to be used as an embeddedId value.deleteByParentId(Object parentId) Create SqlUpdate statement to delete all child beans of the parentid.deleteByParentIdList(List<Object> parentIds) Create SqlUpdate statement to delete all child beans of the parent ids inidList.voiddiff(String prefix, Map<String, ValuePair> map, EntityBean newBean, EntityBean oldBean) Populate diff map comparing the property values between the beans.elPlaceholder(boolean encrypted) Return the place holder in the form of ${elPrefix}dbColumn.findIdsByParentId(Object parentId, Transaction t, boolean includeSoftDeletes) Find child beans of the parentid.findIdsByParentIdList(List<Object> parentIds, Transaction t, boolean includeSoftDeletes) Find child beans of the parent ids inidList.findMatchImport(String dbCol) Find and return a matching imported id property.Return the value in String format (for bean cache key).getCacheDataValue(EntityBean bean) Return the value for this property which we hold in the L2 cache entry.Return the bean cache value for this property using original values.booleanhasCircularImportedId(BeanDescriptor<?> sourceDesc) booleanReturns true, if this relation has a foreign key.idReader()Return the scalar type of the associated id property.voidinitialise(io.ebeaninternal.server.deploy.BeanDescriptorInitContext initContext) Initialise post construction.booleanReturn true if this is an ManyToOne or OneToOne associated bean property.booleanReturn true if any path of this path contains a Associated One or Many.booleanReturn true if this a OneToOne property.booleanReturn true if this is the exported side of a OneToOne.booleanbooleanisReference(Object detailBean) jsonRead(SpiJsonReader readJson) voidjsonRead(SpiJsonReader readJson, EntityBean bean) voidjsonWrite(SpiJsonWriter writeJson, EntityBean bean) JSON write the bean property.voidjsonWriteForInsert(SpiJsonWriter writeJson, EntityBean bean) JSON write property (non-recursive to other beans).voidjsonWriteValue(SpiJsonWriter writeJson, Object value) JSON write property value (non-recursive to other beans).voidload(SqlBeanLoad sqlBeanLoad) Load into the bean (from the DataReader/ResultSet).voidloadIgnore(DbReadContext ctx) Ignore the property (moving the column index position without reading).override(io.ebeaninternal.server.deploy.BeanPropertyOverride override) pathGetNested(Object bean) Return the value ensuring objects prior to the top scalar property are automatically populated.Return meta data for the deployment of the embedded bean specific to this property.read(DataReader reader) read(DbReadContext ctx) readSet(DataReader reader, EntityBean bean) readSet(DbReadContext ctx, EntityBean bean) voidregisterColumn(BeanDescriptor<?> desc, String prefix) voidsetCacheDataValue(EntityBean bean, Object cacheData, PersistenceContext context) Read the value for this property from L2 cache entry and set it to the bean.voidsetParentBeanToChild(EntityBean parent, EntityBean child) Set the parent bean to the child bean if it has not already been set.voidsetTenantValue(EntityBean entityBean, Object tenantId) Set the tenantId onto the bean.voidsetValue(EntityBean bean, Object value) Set the value of the property without interception or PropertyChangeSupport.voidsetValueIntercept(EntityBean bean, Object value) Set the value of the property.Class<?> Same as getPropertyType().valueAsEntityBean(EntityBean owner) Return the property value as an entity bean.Methods inherited from class io.ebeaninternal.server.deploy.BeanPropertyAssoc
addJoin, beanTable, cascadeInfo, extraWhere, fetchPreference, foreignKey, hasForeignKeyConstraint, hasForeignKeyIndex, hasId, idBinder, isInsertable, isSaveRecurseSkippable, isSaveRecurseSkippable, isScalar, isTargetSoftDelete, isUpdateable, mappedBy, newQuery, softDeletePredicate, tableJoin, target, targetDescriptor, targetIdPropertyMethods inherited from class io.ebeaninternal.server.deploy.BeanProperty
assocIsEmpty, beanProperty, bind, containsFormulaWithJoin, containsMany, containsManySince, convert, createMutableInfo, dbBind, dbCheckConstraintValues, dbColumn, dbColumnDefault, dbColumnDefn, dbComment, dbEncryptedType, dbLength, dbMigrationInfos, dbScale, dbType, decryptProperty, deployOrder, descriptor, elName, elPrefix, encryptKey, encryptKeyAsString, fullName, generatedProperty, getValue, getValueIntercept, isAggregation, isArrayType, isAssignableFrom, isAssocMany, isCacheDataInclude, isDbEncrypted, isDbInsertable, isDbUpdatable, isDDLColumn, isDDLNotNull, isDiscriminator, isEmbedded, isExcludedFromHistory, isFetchEager, isFormula, isGenerated, isId, isImportedPrimaryKey, isJsonSerialize, isLoadProperty, isLob, isLobForPlatform, isLobType, isLocal, isLocalEncrypted, isMany, isMutableScalarType, isNaturalKey, isNullable, isSecondaryTable, isSoftDelete, isTenantId, isTransient, isUnique, isUnmappedJson, isVersion, jdbcType, localEncrypt, merge, name, parse, pathGet, pathSet, property, propertyIndex, readData, renderDbType, scalarType, secondaryTableJoinPrefix, setDeployOrder, setValueChanged, stringParser, toString, type, value, writeDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.ebeaninternal.server.query.STreeProperty
elPrefix, encryptKeyAsString, extraIncludes, fullName, isAggregation, isAggregationManyToOne, isEmbedded, isFormula, isId, isLobForPlatform, name, scalarTypeMethods inherited from interface io.ebeaninternal.server.query.STreePropertyAssoc
addJoin, extraWhere, idBinder, isTargetSoftDelete, softDeletePredicate, target
-
Constructor Details
-
BeanPropertyAssocOne
Create based on deploy information of an EmbeddedId. -
BeanPropertyAssocOne
public BeanPropertyAssocOne(BeanDescriptorMap owner, BeanDescriptor<?> descriptor, DeployBeanPropertyAssocOne<T> deploy) Create the property. -
BeanPropertyAssocOne
protected BeanPropertyAssocOne(BeanPropertyAssocOne<T> source, io.ebeaninternal.server.deploy.BeanPropertyOverride override)
-
-
Method Details
-
override
public BeanPropertyAssocOne<?> override(io.ebeaninternal.server.deploy.BeanPropertyOverride override) - Overrides:
overridein classBeanProperty
-
initialise
public void initialise(io.ebeaninternal.server.deploy.BeanDescriptorInitContext initContext) Description copied from class:BeanPropertyAssocInitialise post construction.- Overrides:
initialisein classBeanPropertyAssoc<T>
-
valueAsEntityBean
Return the property value as an entity bean.- Specified by:
valueAsEntityBeanin interfaceSTreePropertyAssocOne
-
buildElPropertyValue
public ElPropertyValue buildElPropertyValue(String propName, String remainder, ElPropertyChainBuilder chain, boolean propertyDeploy) - Overrides:
buildElPropertyValuein classBeanProperty
-
elPlaceholder
Description copied from interface:ElPropertyDeployReturn the place holder in the form of ${elPrefix}dbColumn.The ${elPrefix} is replaced by the appropriate table alias.
- Specified by:
elPlaceholderin interfaceElPropertyDeploy- Overrides:
elPlaceholderin classBeanProperty
-
deleteByParentIdList
Description copied from class:BeanPropertyAssocCreate SqlUpdate statement to delete all child beans of the parent ids inidList.- Specified by:
deleteByParentIdListin classBeanPropertyAssoc<T>
-
deleteByParentId
Description copied from class:BeanPropertyAssocCreate SqlUpdate statement to delete all child beans of the parentid.- Specified by:
deleteByParentIdin classBeanPropertyAssoc<T>
-
findIdsByParentId
Description copied from class:BeanPropertyAssocFind child beans of the parentid.- Specified by:
findIdsByParentIdin classBeanPropertyAssoc<T>
-
findIdsByParentIdList
public List<Object> findIdsByParentIdList(List<Object> parentIds, Transaction t, boolean includeSoftDeletes) Description copied from class:BeanPropertyAssocFind child beans of the parent ids inidList.- Specified by:
findIdsByParentIdListin classBeanPropertyAssoc<T>
-
registerColumn
- Overrides:
registerColumnin classBeanProperty
-
properties
Return meta data for the deployment of the embedded bean specific to this property. -
buildRawSqlSelectChain
Description copied from interface:STreePropertyFor RawSql build the select chain.- Specified by:
buildRawSqlSelectChainin interfaceSTreeProperty- Overrides:
buildRawSqlSelectChainin classBeanProperty
-
hasForeignKey
public boolean hasForeignKey()Description copied from interface:STreePropertyAssocOneReturns true, if this relation has a foreign key.- Specified by:
hasForeignKeyin interfaceSTreePropertyAssocOne
-
isOneToOne
public boolean isOneToOne()Return true if this a OneToOne property. Otherwise assumed ManyToOne. -
isOneToOneExported
public boolean isOneToOneExported()Return true if this is the exported side of a OneToOne. -
isOrphanRemoval
public boolean isOrphanRemoval() -
diff
Description copied from class:BeanPropertyPopulate diff map comparing the property values between the beans.- Overrides:
diffin classBeanProperty
-
targetType
Same as getPropertyType(). Return the type of the bean this property represents.- Overrides:
targetTypein classBeanPropertyAssoc<T>
-
getCacheDataValueOrig
Return the bean cache value for this property using original values.- Overrides:
getCacheDataValueOrigin classBeanProperty
-
getCacheDataValue
Description copied from class:BeanPropertyReturn the value for this property which we hold in the L2 cache entry.This uses format() where possible to store the value as a string and this is done to make any resulting Java object serialisation content smaller as strings get special treatment.
- Overrides:
getCacheDataValuein classBeanProperty
-
format
Description copied from class:BeanPropertyReturn the value in String format (for bean cache key).- Overrides:
formatin classBeanProperty
-
setCacheDataValue
Description copied from class:BeanPropertyRead the value for this property from L2 cache entry and set it to the bean.This uses parse() as per the comment in getCacheDataValue().
- Overrides:
setCacheDataValuein classBeanProperty
-
idReader
Description copied from interface:STreePropertyAssocOneReturn the scalar type of the associated id property.- Specified by:
idReaderin interfaceSTreePropertyAssocOne
-
assocIdValues
Return the Id values from the given bean.- Specified by:
assocIdValuesin interfaceExpressionPath- Overrides:
assocIdValuesin classBeanProperty
-
assocIdExpression
Return the Id expression to add to where clause etc.- Specified by:
assocIdExpressionin interfaceExpressionPath- Overrides:
assocIdExpressionin classBeanProperty
-
assocIdInValueExpr
Return the logical id value expression taking into account embedded id's.- Specified by:
assocIdInValueExprin interfaceElPropertyValue- Overrides:
assocIdInValueExprin classBeanProperty
-
assocIdInExpr
Return the logical id in expression taking into account embedded id's.- Specified by:
assocIdInExprin interfaceElPropertyValue- Overrides:
assocIdInExprin classBeanProperty
-
isAssocId
public boolean isAssocId()Description copied from interface:ElPropertyValueReturn true if this is an ManyToOne or OneToOne associated bean property.- Specified by:
isAssocIdin interfaceElPropertyValue- Specified by:
isAssocIdin interfaceExpressionPath- Specified by:
isAssocIdin interfaceSTreePropertyAssocOne- Overrides:
isAssocIdin classBeanProperty
-
isAssocProperty
public boolean isAssocProperty()Description copied from interface:ElPropertyValueReturn true if any path of this path contains a Associated One or Many.- Specified by:
isAssocPropertyin interfaceElPropertyValue- Overrides:
isAssocPropertyin classBeanProperty
-
createEmbeddedId
Create a bean of the target type to be used as an embeddedId value. -
pathGetNested
Description copied from interface:ElPropertyValueReturn the value ensuring objects prior to the top scalar property are automatically populated.- Specified by:
pathGetNestedin interfaceElPropertyValue- Overrides:
pathGetNestedin classBeanProperty
-
importedId
-
findMatchImport
Find and return a matching imported id property. -
appendSelect
Description copied from interface:STreePropertyAppend to the select clause.- Specified by:
appendSelectin interfaceSTreeProperty- Overrides:
appendSelectin classBeanProperty
-
addJoin
Add table join with explicit table alias.- Specified by:
addJoinin interfaceSTreePropertyAssoc- Overrides:
addJoinin classBeanPropertyAssoc<T>
-
appendFrom
Description copied from class:BeanPropertyAdd any extra joins required to support this property. Generally a no operation except for a OneToOne exported.- Specified by:
appendFromin interfaceSTreeProperty- Overrides:
appendFromin classBeanProperty
-
readSet
- Overrides:
readSetin classBeanProperty- Throws:
SQLException
-
read
- Specified by:
readin interfaceScalarDataReader<T>- Overrides:
readin classBeanProperty- Throws:
SQLException
-
readSet
- Overrides:
readSetin classBeanProperty- Throws:
SQLException
-
read
- Overrides:
readin classBeanProperty- Throws:
SQLException
-
addTenant
Description copied from class:BeanPropertyAdd the tenantId predicate to the query.- Overrides:
addTenantin classBeanProperty
-
setTenantValue
Description copied from class:BeanPropertySet the tenantId onto the bean.- Overrides:
setTenantValuein classBeanProperty
-
setValue
Description copied from class:BeanPropertySet the value of the property without interception or PropertyChangeSupport.- Specified by:
setValuein interfaceSTreePropertyAssoc- Overrides:
setValuein classBeanProperty
-
setValueIntercept
Description copied from class:BeanPropertySet the value of the property.- Overrides:
setValueInterceptin classBeanProperty
-
loadIgnore
Description copied from interface:STreePropertyIgnore the property (moving the column index position without reading).- Specified by:
loadIgnorein interfaceSTreeProperty- Overrides:
loadIgnorein classBeanProperty
-
load
Description copied from interface:STreePropertyLoad into the bean (from the DataReader/ResultSet).- Specified by:
loadin interfaceSTreeProperty- Overrides:
loadin classBeanProperty
-
jsonWriteForInsert
JSON write property (non-recursive to other beans).- Overrides:
jsonWriteForInsertin classBeanProperty- Throws:
IOException
-
jsonWriteValue
JSON write property value (non-recursive to other beans).- Overrides:
jsonWriteValuein classBeanProperty- Throws:
IOException
-
jsonWrite
Description copied from class:BeanPropertyJSON write the bean property.- Overrides:
jsonWritein classBeanProperty- Throws:
IOException
-
jsonRead
- Overrides:
jsonReadin classBeanProperty- Throws:
IOException
-
jsonRead
- Overrides:
jsonReadin classBeanProperty- Throws:
IOException
-
isReference
-
setParentBeanToChild
Set the parent bean to the child bean if it has not already been set. -
hasCircularImportedId
-