public abstract class BeanPropertyAssoc<T> extends BeanProperty
isAssocPropertyEXCLUDE_FROM_DELETE_WHERE, EXCLUDE_FROM_INSERT, EXCLUDE_FROM_UPDATE, EXCLUDE_FROM_UPDATE_WHEREROOT_ELPREFIX| Constructor and Description |
|---|
BeanPropertyAssoc(BeanDescriptorMap owner,
BeanDescriptor<?> descriptor,
DeployBeanPropertyAssoc<T> deploy)
Construct the property.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInnerJoin(String a1,
String a2,
DbSqlContext ctx)
Add table join with explicit table alias.
|
boolean |
addJoin(boolean forceOuterJoin,
String prefix,
DbSqlContext ctx)
Add table join with table alias based on prefix.
|
boolean |
addJoin(boolean forceOuterJoin,
String a1,
String a2,
DbSqlContext ctx)
Add table join with explicit table alias.
|
protected ElPropertyValue |
createElPropertyValue(String propName,
String remainder,
ElPropertyChainBuilder chain,
boolean propertyDeploy)
Create a ElPropertyValue for a *ToOne or *ToMany.
|
protected ImportedId |
createImportedId(BeanPropertyAssoc<?> owner,
BeanDescriptor<?> target,
TableJoin join)
Build the list of imported property.
|
BeanTable |
getBeanTable()
Return the BeanTable for this association.
|
BeanCascadeInfo |
getCascadeInfo()
Get the persist info.
|
String |
getExtraWhere()
Return an extra clause to add to the query for loading or joining
to this bean type.
|
String |
getMappedBy()
Return the mappedBy property.
|
TableJoin |
getTableJoin()
return the join to use for the bean.
|
BeanDescriptor<T> |
getTargetDescriptor()
Return the BeanDescriptor of the target.
|
String |
getTargetIdProperty()
Return the Id property of the target entity type.
|
Class<?> |
getTargetType()
Return the type of the target.
|
boolean |
hasId(Object bean)
Return true if the unique id properties are all not null for this bean.
|
void |
initialise()
Initialise post construction.
|
boolean |
isDeleteRecurseSkippable()
Similar to isSaveRecurseSkippable but in terms of delete.
|
boolean |
isInsertable()
Return true if this association is insertable.
|
boolean |
isOuterJoin()
Return if this association should use an Outer join.
|
boolean |
isSaveRecurseSkippable()
Return true if save can be skipped for unmodified bean(s) of this
property.
|
boolean |
isSaveRecurseSkippable(Object bean) |
boolean |
isScalar()
Return false.
|
boolean |
isUpdateable()
Return true if this association is updateable.
|
appendFrom, appendSelect, bind, buildElPropertyValue, buildSelectExpressionChain, containsFormulaWithJoin, containsMany, containsManySince, convertToLogicalType, copyProperty, elConvertType, elGetReference, elGetValue, elSetReference, elSetValue, getAssocIdInExpr, getAssocIdInValueExpr, getAssocOneIdExpr, getAssocOneIdValues, getBeanDescriptor, getBeanProperty, getCacheDataValue, getDbBind, getDbColumn, getDbColumnDefn, getDbConstraintExpression, getDbEncryptedType, getDbLength, getDbScale, getDbType, getDecryptProperty, getDecryptProperty, getDecryptSql, getDecryptSql, getDefaultValue, getDeployOrder, getDeployProperty, getElName, getElPlaceholder, getElPrefix, getEncryptKey, getExtraAttribute, getField, getFullBeanName, getGeneratedProperty, getJdbcType, getName, getPropertyType, getReadMethod, getScalarType, getSecondaryTableJoinPrefix, getStringFormatter, getStringParser, getValue, getValueIntercept, getValueViaReflection, getValueWithInheritance, getWriteMethod, hasChanged, isAssignableFrom, isAssocId, isAssocProperty, isCascadeValidate, isDateTimeCapable, isDbEncrypted, isDbInsertable, isDbRead, isDbUpdatable, isDDLNotNull, isDeployOnly, isEmbedded, isFetchEager, isFormula, isId, isInherited, isLob, isLocal, isLocalEncrypted, isNaturalKey, isNullable, isSecondaryTable, isTransient, isUnique, isValueLoaded, isVersion, jsonRead, jsonWrite, load, loadIgnore, parseDateTime, read, readData, readSet, readSetOwning, renderDbType, setCacheDataValue, setDeployOrder, setValue, setValueIntercept, toBeanType, toString, writeDatapublic BeanPropertyAssoc(BeanDescriptorMap owner, BeanDescriptor<?> descriptor, DeployBeanPropertyAssoc<T> deploy)
public void initialise()
initialise in class BeanPropertyprotected ElPropertyValue createElPropertyValue(String propName, String remainder, ElPropertyChainBuilder chain, boolean propertyDeploy)
public boolean addJoin(boolean forceOuterJoin,
String prefix,
DbSqlContext ctx)
public boolean addJoin(boolean forceOuterJoin,
String a1,
String a2,
DbSqlContext ctx)
public void addInnerJoin(String a1, String a2, DbSqlContext ctx)
public boolean isScalar()
isScalar in class BeanPropertypublic String getMappedBy()
public String getTargetIdProperty()
This will return null for multiple Id properties.
public BeanDescriptor<T> getTargetDescriptor()
public boolean isSaveRecurseSkippable(Object bean)
public boolean isSaveRecurseSkippable()
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.
public boolean isDeleteRecurseSkippable()
public boolean hasId(Object bean)
public Class<?> getTargetType()
This is the class of the associated bean, or beans contained in a list, set or map.
public String getExtraWhere()
public boolean isOuterJoin()
public boolean isUpdateable()
public boolean isInsertable()
public TableJoin getTableJoin()
public BeanTable getBeanTable()
This has the table name which is used to determine the relationship for this association.
public BeanCascadeInfo getCascadeInfo()
protected ImportedId createImportedId(BeanPropertyAssoc<?> owner, BeanDescriptor<?> target, TableJoin join)
Copyright © 2014. All Rights Reserved.