public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T>
| Type | Property and Description |
|---|---|
boolean |
isAssoc
Return true if any path of this path contains a Associated One or Many.
|
EXCLUDE_FROM_DELETE_WHERE, EXCLUDE_FROM_INSERT, EXCLUDE_FROM_UPDATE, EXCLUDE_FROM_UPDATE_WHEREROOT_ELPREFIX| Constructor and Description |
|---|
BeanPropertyAssocMany(BeanDescriptorMap owner,
BeanDescriptor<?> descriptor,
DeployBeanPropertyAssocMany<T> deploy)
Create this property.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(BeanCollection<?> collection,
Object bean) |
void |
addBeanToCollectionWithCreate(Object parentBean,
Object detailBean)
Add the bean to the appropriate collection on the parent bean.
|
void |
addSelectExported(DbSqlContext ctx,
String tableAlias) |
void |
addWhereParentIdIn(SpiQuery<?> query,
List<Object> parentIds)
Add a where clause to the query for a given list of parent Id's.
|
void |
appendSelect(DbSqlContext ctx,
boolean subQuery) |
ElPropertyValue |
buildElPropertyValue(String propName,
String remainder,
ElPropertyChainBuilder chain,
boolean propertyDeploy) |
IntersectionRow |
buildManyDeleteChildren(Object parentBean,
ArrayList<Object> excludeDetailIds) |
IntersectionRow |
buildManyToManyDeleteChildren(Object parentBean) |
IntersectionRow |
buildManyToManyMapBean(Object parent,
Object other) |
boolean |
containsMany()
Returns true.
|
Object |
createEmpty(boolean vanilla) |
BeanCollection<?> |
createReference(Object parentBean) |
BeanCollection<?> |
createReferenceIfNull(Object parentBean) |
SqlUpdate |
deleteByParentId(Object parentId,
List<Object> parentIdist) |
List<Object> |
findIdsByParentId(Object parentId,
List<Object> parentIdist,
Transaction t,
ArrayList<Object> excludeDetailIds)
Find the Id's of detail beans given a parent Id or list of parent Id's.
|
String |
getAssocIdInExpr(String prefix)
Return the logical id in expression taking into account embedded id's.
|
String |
getAssocIdInValueExpr(int size)
Return the logical id value expression taking into account embedded id's.
|
String |
getAssocOneIdExpr(String prefix,
String operator)
Return the Id expression to add to where clause etc.
|
Object[] |
getAssocOneIdValues(Object bean)
Return the Id values from the given bean.
|
BeanCollectionAdd |
getBeanCollectionAdd(Object bc,
String mapKey) |
List<Object> |
getBindParentIds(List<Object> parentIds) |
String |
getFetchOrderBy()
Return the order by clause used to order the fetching of the data for
this list, set or map.
|
TableJoin |
getIntersectionTableJoin()
ManyToMany only, join from local table to intersection table.
|
ManyType |
getManyType()
Return the many type.
|
String |
getMapKey()
Return the default mapKey when returning a Map.
|
BeanCollection.ModifyListenMode |
getModifyListenMode()
Return the mode for listening to modifications to collections for this
association.
|
Object |
getParentId(Object parentBean) |
Object |
getValue(Object bean)
Return the value of the property method.
|
Object |
getValueIntercept(Object bean) |
boolean |
hasChanged(Object bean,
Object oldValues)
Ignore changes for Many properties.
|
boolean |
hasImportedId(Object otherBean)
Return true if the otherBean has an Id value.
|
void |
initialise()
Initialise post construction.
|
boolean |
isAssocId()
Return true if this is an ManyToOne or OneToOne associated bean property.
|
boolean |
isAssocProperty()
Return true if any path of this path contains a Associated One or Many.
|
boolean |
isManyToMany()
Return true if this is many to many.
|
boolean |
isValueLoaded(Object value)
Checks to see if a bean is a reference (will be lazy loaded) or a
BeanCollection that has not yet been populated.
|
void |
jsonRead(ReadJsonContext ctx,
Object bean) |
void |
jsonWrite(WriteJsonContext ctx,
Object bean) |
void |
load(SqlBeanLoad sqlBeanLoad) |
void |
loadIgnore(DbReadContext ctx) |
Object |
read(DbReadContext ctx) |
Object |
readSet(DbReadContext ctx,
Object bean,
Class<?> type) |
void |
refresh(BeanCollection<?> bc,
Object parentBean)
Apply the refreshed BeanCollection to the property of the parentBean.
|
void |
refresh(EbeanServer server,
Query<?> query,
Transaction t,
Object parentBean)
Refresh the appropriate list set or map.
|
void |
setJoinValuesToChild(Object parent,
Object child,
Object mapKeyValue)
Set the join properties from the parent bean to the child bean.
|
void |
setLoader(BeanCollectionLoader loader)
Set the lazy load server to help create reference collections (that lazy
load on demand).
|
void |
setPredicates(SpiQuery<?> query,
Object parentBean) |
void |
setValue(Object bean,
Object value)
Set the value of the property without interception or
PropertyChangeSupport.
|
void |
setValueIntercept(Object bean,
Object value)
Set the value of the property.
|
addInnerJoin, addJoin, addJoin, createElPropertyValue, createImportedId, getBeanTable, getCascadeInfo, getExtraWhere, getMappedBy, getTableJoin, getTargetDescriptor, getTargetIdProperty, getTargetType, hasId, isDeleteRecurseSkippable, isInsertable, isOuterJoin, isSaveRecurseSkippable, isSaveRecurseSkippable, isScalar, isUpdateableappendFrom, bind, buildSelectExpressionChain, containsFormulaWithJoin, containsManySince, convertToLogicalType, copyProperty, elConvertType, elGetReference, elGetValue, elSetReference, elSetValue, 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, getValueViaReflection, getValueWithInheritance, getWriteMethod, isAssignableFrom, isCascadeValidate, isDateTimeCapable, isDbEncrypted, isDbInsertable, isDbRead, isDbUpdatable, isDDLNotNull, isDeployOnly, isEmbedded, isFetchEager, isFormula, isId, isInherited, isLob, isLocal, isLocalEncrypted, isNaturalKey, isNullable, isSecondaryTable, isTransient, isUnique, isVersion, parseDateTime, readData, readSetOwning, renderDbType, setCacheDataValue, setDeployOrder, toBeanType, toString, writeDataisAssocProperty in interface ElPropertyValueisAssocProperty in class BeanPropertypublic BeanPropertyAssocMany(BeanDescriptorMap owner, BeanDescriptor<?> descriptor, DeployBeanPropertyAssocMany<T> deploy)
public void initialise()
BeanPropertyAssocinitialise in class BeanPropertyAssoc<T>public void addBeanToCollectionWithCreate(Object parentBean, Object detailBean)
public Object getValue(Object bean)
BeanPropertygetValue in class BeanPropertypublic Object getValueIntercept(Object bean)
getValueIntercept in class BeanPropertypublic void setValue(Object bean, Object value)
BeanPropertysetValue in class BeanPropertypublic void setValueIntercept(Object bean, Object value)
BeanPropertysetValueIntercept in class BeanPropertypublic ElPropertyValue buildElPropertyValue(String propName, String remainder, ElPropertyChainBuilder chain, boolean propertyDeploy)
buildElPropertyValue in class BeanPropertypublic List<Object> findIdsByParentId(Object parentId, List<Object> parentIdist, Transaction t, ArrayList<Object> excludeDetailIds)
public void addWhereParentIdIn(SpiQuery<?> query, List<Object> parentIds)
public void setLoader(BeanCollectionLoader loader)
public BeanCollection.ModifyListenMode getModifyListenMode()
public boolean hasChanged(Object bean, Object oldValues)
hasChanged in class BeanPropertypublic void appendSelect(DbSqlContext ctx, boolean subQuery)
appendSelect in class BeanPropertypublic void loadIgnore(DbReadContext ctx)
loadIgnore in class BeanPropertypublic void load(SqlBeanLoad sqlBeanLoad) throws SQLException
load in class BeanPropertySQLExceptionpublic Object readSet(DbReadContext ctx, Object bean, Class<?> type) throws SQLException
readSet in class BeanPropertySQLExceptionpublic Object read(DbReadContext ctx) throws SQLException
read in class BeanPropertySQLExceptionpublic boolean isValueLoaded(Object value)
BeanPropertyFor base types this returns true.
isValueLoaded in class BeanPropertypublic void add(BeanCollection<?> collection, Object bean)
public void refresh(EbeanServer server, Query<?> query, Transaction t, Object parentBean)
public void refresh(BeanCollection<?> bc, Object parentBean)
public Object[] getAssocOneIdValues(Object bean)
getAssocOneIdValues in interface ElPropertyValuegetAssocOneIdValues in class BeanPropertypublic String getAssocOneIdExpr(String prefix, String operator)
getAssocOneIdExpr in interface ElPropertyValuegetAssocOneIdExpr in class BeanPropertypublic String getAssocIdInValueExpr(int size)
getAssocIdInValueExpr in interface ElPropertyValuegetAssocIdInValueExpr in class BeanPropertypublic String getAssocIdInExpr(String prefix)
getAssocIdInExpr in interface ElPropertyValuegetAssocIdInExpr in class BeanPropertypublic boolean isAssocId()
ElPropertyValueisAssocId in interface ElPropertyValueisAssocId in class BeanPropertypublic boolean isAssocProperty()
ElPropertyValueisAssocProperty in interface ElPropertyValueisAssocProperty in class BeanPropertypublic boolean containsMany()
containsMany in interface ElPropertyDeploycontainsMany in class BeanPropertypublic ManyType getManyType()
public boolean isManyToMany()
public TableJoin getIntersectionTableJoin()
public void setJoinValuesToChild(Object parent, Object child, Object mapKeyValue)
public String getFetchOrderBy()
public String getMapKey()
public BeanCollection<?> createReferenceIfNull(Object parentBean)
public BeanCollection<?> createReference(Object parentBean)
public Object createEmpty(boolean vanilla)
public BeanCollectionAdd getBeanCollectionAdd(Object bc, String mapKey)
public void addSelectExported(DbSqlContext ctx, String tableAlias)
public IntersectionRow buildManyDeleteChildren(Object parentBean, ArrayList<Object> excludeDetailIds)
public IntersectionRow buildManyToManyDeleteChildren(Object parentBean)
public IntersectionRow buildManyToManyMapBean(Object parent, Object other)
public boolean hasImportedId(Object otherBean)
public void jsonWrite(WriteJsonContext ctx, Object bean)
jsonWrite in class BeanPropertypublic void jsonRead(ReadJsonContext ctx, Object bean)
jsonRead in class BeanPropertyCopyright © 2014. All Rights Reserved.