public class ElementCollectionField extends AssociationField
Constructor and Description |
---|
ElementCollectionField(EntityType sourceType,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
AmberExpr |
createExpr(QueryParser parser,
PathExpr parent)
Creates the expression for the field.
|
void |
generateAmberAdd(JavaWriter out)
Generates the set property.
|
void |
generateAmberRemove(JavaWriter out)
Generates the remove property.
|
void |
generateAmberRemoveTargetAll(JavaWriter out)
Generates the remove property.
|
void |
generateCopyLoadObject(JavaWriter out,
java.lang.String dst,
java.lang.String src,
int loadIndex)
Updates from the cached copy.
|
void |
generateDetach(JavaWriter out)
Generates the detach property.
|
void |
generateExpire(JavaWriter out)
Generates code for the object expire
|
void |
generateGetterMethod(JavaWriter out)
Generates the set property.
|
void |
generateInvalidateForeign(JavaWriter out)
Generates code for foreign entity create/delete
|
java.lang.String |
generateLoadSelect(java.lang.String id)
Generates the select clause.
|
void |
generateMergeFrom(JavaWriter out,
java.lang.String dst,
java.lang.String src)
Updates the cached copy.
|
void |
generatePostCascade(JavaWriter out,
java.lang.String aConn,
CascadeType cascadeType)
Generates the (post) cascade operation from
parent to this child.
|
int |
generatePostLoadSelect(JavaWriter out,
int index)
Generates loading code after the basic fields.
|
void |
generateSetterMethod(JavaWriter out)
Generates the set property.
|
void |
generateStatementSet(JavaWriter out,
java.lang.String pstmt,
java.lang.String obj,
java.lang.String index)
Generates the set clause.
|
AmberTable |
getAssociationTable()
Returns the association table
|
java.lang.String |
getMapKey()
Gets the map key.
|
EntityType |
getRelatedType()
Returns the source type as
entity or mapped-superclass.
|
LinkColumns |
getSourceLink()
Returns the source link.
|
AmberType |
getTargetType()
Returns the type argument for the target
|
void |
init()
Initializes the field.
|
void |
setAssociationTable(AmberTable table)
Sets the association table
|
void |
setMapKey(java.lang.String mapKey)
Sets the map key.
|
void |
setOrderBy(java.util.ArrayList<java.lang.String> orderByFields,
java.util.ArrayList<java.lang.Boolean> orderByAscending)
Sets the order by.
|
void |
setSourceLink(LinkColumns link)
Adds a column from the association table to the source side.
|
void |
setType(AmberType targetType)
Sets the target type.
|
generateTargetSelect, getLinkColumns, hasInverseJoinColumns, hasJoinColumns, setInverseJoinColumns, setJoinColumns, setLinkColumns
generateCopyUpdateObject, generateJoin, generatePreCascade, generateUpdate, getSourceColumn, getTableName, setTable
generateFlushCheck, generateInternalCascade, getCascadeType, isCascadable, isCascade, setCascadeType
childDelete, generateCastFromObject, generateCreateTableSQL, generateDumpRelationships, generateEquals, generateGet, generateGet, generateInsert, generateInsertColumns, generateInsertSet, generateJavaSelect, generateLoad, generateLoadFromObject, generateLoadNative, generateLoadSelect, generateNativeColumnNames, generateNull, generatePostConstructor, generatePostDelete, generatePreDelete, generatePrePersist, generatePrologue, generateSelect, generateSet, generateSet, 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, isAbstract, isFieldAccess, isKey, isLazy, isOverride, isUpdateable, link, override, setColumn, setIndex, setJavaType, setLazy, setLoadGroupIndex, setName, setOverride, toObject, toString
public ElementCollectionField(EntityType sourceType, java.lang.String name) throws ConfigException
ConfigException
public java.lang.String getMapKey()
public void setMapKey(java.lang.String mapKey)
public void setType(AmberType targetType)
setType
in class CollectionField
public EntityType getRelatedType()
public AmberType getTargetType()
getTargetType
in class CollectionField
public AmberTable getAssociationTable()
public void setAssociationTable(AmberTable table)
public void setSourceLink(LinkColumns link)
public LinkColumns getSourceLink()
public void setOrderBy(java.util.ArrayList<java.lang.String> orderByFields, java.util.ArrayList<java.lang.Boolean> orderByAscending)
public void init() throws ConfigException
init
in interface AmberField
init
in class AbstractField
ConfigException
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 CollectionField
java.io.IOException
public java.lang.String generateLoadSelect(java.lang.String id)
generateLoadSelect
in class CollectionField
public int generatePostLoadSelect(JavaWriter out, int index) throws java.io.IOException
generatePostLoadSelect
in interface AmberField
generatePostLoadSelect
in class AbstractField
java.io.IOException
public AmberExpr createExpr(QueryParser parser, PathExpr parent)
createExpr
in interface AmberField
createExpr
in class CollectionField
public void generateCopyLoadObject(JavaWriter out, java.lang.String dst, java.lang.String src, int loadIndex) throws java.io.IOException
generateCopyLoadObject
in interface AmberField
generateCopyLoadObject
in class AbstractField
java.io.IOException
public void generateMergeFrom(JavaWriter out, java.lang.String dst, java.lang.String src) throws java.io.IOException
generateMergeFrom
in interface AmberField
generateMergeFrom
in class AbstractField
java.io.IOException
public void generateGetterMethod(JavaWriter out) throws java.io.IOException
generateGetterMethod
in interface AmberField
generateGetterMethod
in class AbstractField
java.io.IOException
public void generatePostCascade(JavaWriter out, java.lang.String aConn, CascadeType cascadeType) throws java.io.IOException
generatePostCascade
in class CollectionField
java.io.IOException
public void generateAmberAdd(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateAmberRemove(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateAmberRemoveTargetAll(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateSetterMethod(JavaWriter out) throws java.io.IOException
generateSetterMethod
in interface AmberField
generateSetterMethod
in class AbstractField
java.io.IOException
public void generateInvalidateForeign(JavaWriter out) throws java.io.IOException
generateInvalidateForeign
in interface AmberField
generateInvalidateForeign
in class AbstractField
java.io.IOException
public void generateExpire(JavaWriter out) throws java.io.IOException
generateExpire
in interface AmberField
generateExpire
in class AbstractField
java.io.IOException
public void generateDetach(JavaWriter out) throws java.io.IOException
generateDetach
in interface AmberField
generateDetach
in class AbstractField
java.io.IOException