java.lang.Object
io.ebeaninternal.server.deploy.BeanProperty
io.ebeaninternal.server.deploy.BeanPropertyAssoc<T>
- All Implemented Interfaces:
ScalarDataReader<Object>,ExpressionPath,Property,ElPropertyDeploy,ElPropertyValue,STreeProperty,STreePropertyAssoc
- Direct Known Subclasses:
BeanPropertyAssocMany,BeanPropertyAssocOne
Abstract base for properties mapped to an associated bean, list, set or map.
-
Field Summary
Fields inherited from class io.ebeaninternal.server.deploy.BeanProperty
idFields inherited from interface io.ebeaninternal.server.el.ElPropertyDeploy
ROOT_ELPREFIX -
Method Summary
Modifier and TypeMethodDescriptionaddJoin(SqlJoinType joinType, String prefix, DbSqlContext ctx) Add table join with table alias based on prefix.addJoin(SqlJoinType joinType, String a1, String a2, DbSqlContext ctx) Add table join with explicit table alias.Return the underlying BeanTable for this property.Get the persist info.abstract SqlUpdateCreate SqlUpdate statement to delete all child beans of the parentid.abstract SqlUpdatedeleteByParentIdList(List<Object> idList) Create SqlUpdate statement to delete all child beans of the parent ids inidList.Return an extra clause to add to the query for loading or joining to this bean type.intReturn the fetch preference.findIdsByParentId(Object id, Transaction transaction, boolean includeSoftDeletes) Find child beans of the parentid.findIdsByParentIdList(List<Object> idList, Transaction transaction, boolean includeSoftDeletes) Find child beans of the parent ids inidList.Return the extra configuration for the foreign key.booleanReturn true if foreign key constraint is enabled on this relationship (not disabled).booleanReturn true if foreign key index is enabled on this relationship (not disabled).booleanhasId(EntityBean bean) Return true if the unique id properties are all not null for this bean.idBinder()Return the IdBinder of the underlying type.voidinitialise(io.ebeaninternal.server.deploy.BeanDescriptorInitContext initContext) Initialise post construction.booleanReturn true if this association is insertable.booleanReturn true if save can be skipped for unmodified bean(s) of this property.booleanisSaveRecurseSkippable(Object bean) booleanisScalar()Return false.booleanReturn true if the target side has soft delete.booleanReturn true if this association is updateable.mappedBy()Return the mappedBy property.newQuery(SpiEbeanServer server) Create a new query for the target type.softDeletePredicate(String tableAlias) Return the soft delete predicate.return the join to use for the bean.target()Return the type of the target (other side).Return the BeanDescriptor of the target.Return the Id property of the target entity type.Class<?> Return the type of the target.Methods inherited from class io.ebeaninternal.server.deploy.BeanProperty
addTenant, appendFrom, appendSelect, assocIdExpression, assocIdInExpr, assocIdInValueExpr, assocIdValues, assocIsEmpty, beanProperty, bind, buildElPropertyValue, buildRawSqlSelectChain, containsFormulaWithJoin, containsMany, containsManySince, convert, createMutableInfo, dbBind, dbCheckConstraintValues, dbColumn, dbColumnDefault, dbColumnDefn, dbComment, dbEncryptedType, dbLength, dbMigrationInfos, dbScale, dbType, decryptProperty, deployOrder, descriptor, diff, elName, elPlaceholder, elPrefix, encryptKey, encryptKeyAsString, format, fullName, generatedProperty, getCacheDataValue, getCacheDataValueOrig, getValue, getValueIntercept, isAggregation, isArrayType, isAssignableFrom, isAssocId, isAssocMany, isAssocProperty, 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, jsonRead, jsonRead, jsonWrite, jsonWriteForInsert, jsonWriteValue, load, loadIgnore, localEncrypt, merge, name, override, parse, pathGet, pathGetNested, pathSet, property, propertyIndex, read, read, readData, readSet, readSet, registerColumn, renderDbType, scalarType, secondaryTableJoinPrefix, setCacheDataValue, setDeployOrder, setTenantValue, setValue, setValueChanged, setValueIntercept, 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.ebean.core.type.ScalarDataReader
readMethods inherited from interface io.ebeaninternal.server.query.STreeProperty
appendFrom, appendSelect, buildRawSqlSelectChain, elPrefix, encryptKeyAsString, extraIncludes, fullName, isAggregation, isAggregationManyToOne, isEmbedded, isFormula, isId, isLobForPlatform, load, loadIgnore, name, scalarTypeMethods inherited from interface io.ebeaninternal.server.query.STreePropertyAssoc
setValue
-
Method Details
-
initialise
public void initialise(io.ebeaninternal.server.deploy.BeanDescriptorInitContext initContext) Initialise post construction.- Overrides:
initialisein classBeanProperty
-
fetchPreference
public int fetchPreference()Description copied from interface:ElPropertyDeployReturn the fetch preference. This can be used to control which ToMany relationship is left as a 'join' and which get converted to query join.- Specified by:
fetchPreferencein interfaceElPropertyDeploy- Overrides:
fetchPreferencein classBeanProperty
-
foreignKey
Return the extra configuration for the foreign key. -
hasForeignKeyConstraint
public boolean hasForeignKeyConstraint()Return true if foreign key constraint is enabled on this relationship (not disabled). -
hasForeignKeyIndex
public boolean hasForeignKeyIndex()Return true if foreign key index is enabled on this relationship (not disabled). -
addJoin
Add table join with table alias based on prefix.- Specified by:
addJoinin interfaceSTreePropertyAssoc
-
addJoin
Add table join with explicit table alias.- Specified by:
addJoinin interfaceSTreePropertyAssoc
-
isScalar
public boolean isScalar()Return false.- Overrides:
isScalarin classBeanProperty
-
mappedBy
Return the mappedBy property. This will be null on the owning side. -
targetIdProperty
Return the Id property of the target entity type.This will return null for multiple Id properties.
-
targetDescriptor
Return the BeanDescriptor of the target. -
newQuery
Create a new query for the target type.We use target descriptor rather than target property type to support ElementCollection.
-
idBinder
Description copied from interface:STreePropertyAssocReturn the IdBinder of the underlying type.- Specified by:
idBinderin interfaceSTreePropertyAssoc
-
target
Description copied from interface:STreePropertyAssocReturn the type of the target (other side).- Specified by:
targetin interfaceSTreePropertyAssoc
-
isTargetSoftDelete
public boolean isTargetSoftDelete()Return true if the target side has soft delete.- Specified by:
isTargetSoftDeletein interfaceSTreePropertyAssoc
-
softDeletePredicate
Description copied from interface:STreePropertyAssocReturn the soft delete predicate.- Specified by:
softDeletePredicatein interfaceSTreePropertyAssoc
-
isSaveRecurseSkippable
-
isSaveRecurseSkippable
public boolean isSaveRecurseSkippable()Return true if save can be skipped for unmodified bean(s) of this property.That is, if a bean of this property is unmodified we don't need to saveRecurse because none of its associated beans have cascade save set to true.
-
hasId
Return true if the unique id properties are all not null for this bean. -
targetType
Return the type of the target.This is the class of the associated bean, or beans contained in a list, set or map.
-
extraWhere
Return an extra clause to add to the query for loading or joining to this bean type.- Specified by:
extraWherein interfaceSTreePropertyAssoc
-
isUpdateable
public boolean isUpdateable()Return true if this association is updateable. -
isInsertable
public boolean isInsertable()Return true if this association is insertable. -
beanTable
Return the underlying BeanTable for this property. -
tableJoin
return the join to use for the bean. -
cascadeInfo
Get the persist info. -
deleteByParentId
Create SqlUpdate statement to delete all child beans of the parentid. -
deleteByParentIdList
Create SqlUpdate statement to delete all child beans of the parent ids inidList. -
findIdsByParentId
public abstract List<Object> findIdsByParentId(Object id, Transaction transaction, boolean includeSoftDeletes) Find child beans of the parentid. -
findIdsByParentIdList
public abstract List<Object> findIdsByParentIdList(List<Object> idList, Transaction transaction, boolean includeSoftDeletes) Find child beans of the parent ids inidList.
-