public class CollectionField extends CascadableField
Constructor and Description |
---|
CollectionField(EntityType relatedType) |
CollectionField(EntityType relatedType,
java.lang.String name,
CascadeType[] cascadeTypes) |
Modifier and Type | Method and Description |
---|---|
AmberExpr |
createExpr(QueryParser parser,
PathExpr parent)
Creates the expression for the field.
|
void |
generateCopyUpdateObject(JavaWriter out,
java.lang.String dst,
java.lang.String src,
int updateIndex)
Updates the cached copy.
|
java.lang.String |
generateJoin(java.lang.String sourceTable,
java.lang.String targetTable)
Generates the linking for a join
|
java.lang.String |
generateLoadSelect(java.lang.String id)
Generates the select clause.
|
void |
generatePostCascade(JavaWriter out,
java.lang.String aConn,
CascadeType cascadeType)
Generates the (post) cascade operation from
parent to this child.
|
void |
generatePreCascade(JavaWriter out,
java.lang.String aConn,
CascadeType cascadeType)
Generates the (pre) cascade operation from
parent to this child.
|
void |
generateStatementSet(JavaWriter out,
java.lang.String pstmt,
java.lang.String obj,
java.lang.String index)
Generates the set clause.
|
java.lang.String |
generateTargetSelect(java.lang.String id)
Generates the target select.
|
void |
generateUpdate(JavaWriter out,
java.lang.String mask,
java.lang.String pstmt,
java.lang.String index)
Generates loading cache
|
LinkColumns |
getLinkColumns()
Gets the key columns.
|
ForeignColumn |
getSourceColumn(AmberColumn key)
Returns the source column for a given target key.
|
java.lang.String |
getTableName()
Gets the collection table.
|
AmberType |
getTargetType()
Returns the target type.
|
void |
setLinkColumns(LinkColumns linkColumns)
Sets the key columns.
|
void |
setTable(java.lang.String table)
Sets the collection table.
|
void |
setType(AmberType targetType)
Sets the target type.
|
generateFlushCheck, generateInternalCascade, getCascadeType, isCascadable, isCascade, setCascadeType
childDelete, generateCastFromObject, generateCopyLoadObject, generateCreateTableSQL, generateDetach, generateDumpRelationships, generateEquals, generateExpire, generateGet, generateGet, generateGetterMethod, generateInsert, generateInsertColumns, generateInsertSet, generateInvalidateForeign, generateJavaSelect, generateLoad, generateLoadFromObject, generateLoadNative, generateLoadSelect, generateMergeFrom, generateNativeColumnNames, generateNull, generatePostConstructor, generatePostDelete, generatePostLoadSelect, generatePreDelete, generatePrePersist, generatePrologue, generateSelect, generateSet, generateSet, generateSetterMethod, generateStatementSet, generateSuperGetter, generateSuperGetterMethod, generateSuperSetter, generateSuperSetterMethod, generateUpdate, generateUpdateFromObject, generateUpdateSet, generateWhere, getBeanClass, getColumn, getCreateLoadMask, getEntitySourceType, getFieldName, getGetterMethod, getGetterName, getIndex, getJavaClass, getJavaType, getJavaTypeName, getLoadGroupIndex, getName, getPersistenceUnit, getSetterMethod, getSetterName, getSourceType, getTable, hasLoadGroup, init, isAbstract, isFieldAccess, isKey, isLazy, isOverride, isUpdateable, link, override, setColumn, setIndex, setJavaType, setLazy, setLoadGroupIndex, setName, setOverride, toObject, toString
public CollectionField(EntityType relatedType, java.lang.String name, CascadeType[] cascadeTypes) throws ConfigException
ConfigException
public CollectionField(EntityType relatedType)
public void setTable(java.lang.String table)
public java.lang.String getTableName()
public void setType(AmberType targetType)
public AmberType getTargetType()
public void setLinkColumns(LinkColumns linkColumns)
public LinkColumns getLinkColumns()
public void generatePreCascade(JavaWriter out, java.lang.String aConn, CascadeType cascadeType) throws java.io.IOException
generatePreCascade
in class CascadableField
java.io.IOException
public void generatePostCascade(JavaWriter out, java.lang.String aConn, CascadeType cascadeType) throws java.io.IOException
generatePostCascade
in class CascadableField
java.io.IOException
public void generateStatementSet(JavaWriter out, java.lang.String pstmt, java.lang.String obj, java.lang.String index) throws java.io.IOException
generateStatementSet
in interface AmberField
generateStatementSet
in class AbstractField
java.io.IOException
public void generateUpdate(JavaWriter out, java.lang.String mask, java.lang.String pstmt, java.lang.String index) throws java.io.IOException
generateUpdate
in interface AmberField
generateUpdate
in class AbstractField
java.io.IOException
public void generateCopyUpdateObject(JavaWriter out, java.lang.String dst, java.lang.String src, int updateIndex) throws java.io.IOException
generateCopyUpdateObject
in interface AmberField
generateCopyUpdateObject
in class AbstractField
java.io.IOException
public java.lang.String generateLoadSelect(java.lang.String id)
public java.lang.String generateTargetSelect(java.lang.String id)
public AmberExpr createExpr(QueryParser parser, PathExpr parent)
createExpr
in interface AmberField
createExpr
in class AbstractField
public java.lang.String generateJoin(java.lang.String sourceTable, java.lang.String targetTable)
public ForeignColumn getSourceColumn(AmberColumn key)