public class OneToManyField extends CollectionField
Constructor and Description |
---|
OneToManyField(EntityType entityType) |
OneToManyField(EntityType entityType,
java.lang.String name) |
OneToManyField(EntityType entityType,
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 |
generateCopyLoadObject(JavaWriter out,
java.lang.String dst,
java.lang.String src,
int loadIndex)
Updates from the cached copy.
|
void |
generateExpire(JavaWriter out)
Generates the expire code
ejb/06hi
|
void |
generateGetterMethod(JavaWriter out)
Generates the set property.
|
protected void |
generateInternalCascade(JavaWriter out,
java.lang.String aConn,
CascadeType cascadeType) |
void |
generateInvalidateForeign(JavaWriter out)
Generates code for foreign entity create/delete
|
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.
|
int |
generatePostLoadSelect(JavaWriter out,
int index)
Generates loading code after the basic fields.
|
void |
generatePreCascade(JavaWriter out,
java.lang.String aConn,
CascadeType cascadeType)
Generates the (pre) cascade operation from
parent to this child.
|
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.
|
java.lang.String |
generateTargetSelect(java.lang.String id)
Generates the target select.
|
EntityType |
getEntitySourceType()
Returns the source type as
entity or mapped-superclass.
|
EntityType |
getEntityTargetType()
Returns the target type as
entity or mapped-superclass.
|
LinkColumns |
getLinkColumns()
Returns the link.
|
java.lang.String |
getMapKey()
Gets the map key.
|
ManyToOneField |
getSourceField()
Gets the source field.
|
AmberType |
getTargetType()
Returns the target type as entity.
|
void |
init()
Initialize.
|
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 |
setSourceField(ManyToOneField sourceField)
Sets the source field.
|
generateCopyUpdateObject, generateJoin, generateUpdate, getSourceColumn, getTableName, setLinkColumns, setTable, setType
generateFlushCheck, getCascadeType, isCascadable, isCascade, setCascadeType
childDelete, generateCastFromObject, generateCreateTableSQL, generateDetach, generateDumpRelationships, generateEquals, generateGet, generateGet, generateInsert, generateInsertColumns, generateInsertSet, generateJavaSelect, generateLoad, generateLoadFromObject, generateLoadNative, generateLoadSelect, generateMergeFrom, generateNativeColumnNames, generateNull, generatePostConstructor, generatePostDelete, generatePreDelete, generatePrePersist, generatePrologue, generateSelect, generateSet, generateSet, generateStatementSet, generateSuperGetter, generateSuperGetterMethod, generateSuperSetter, generateSuperSetterMethod, generateUpdate, generateUpdateFromObject, generateUpdateSet, generateWhere, getBeanClass, getColumn, getCreateLoadMask, 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 OneToManyField(EntityType entityType, java.lang.String name, CascadeType[] cascadeTypes) throws ConfigException
ConfigException
public OneToManyField(EntityType entityType, java.lang.String name) throws ConfigException
ConfigException
public OneToManyField(EntityType entityType)
public void setOrderBy(java.util.ArrayList<java.lang.String> orderByFields, java.util.ArrayList<java.lang.Boolean> orderByAscending)
public EntityType getEntitySourceType()
getEntitySourceType
in class AbstractField
public EntityType getEntityTargetType()
public AmberType getTargetType()
getTargetType
in class CollectionField
public ManyToOneField getSourceField()
public void setSourceField(ManyToOneField sourceField)
public LinkColumns getLinkColumns()
getLinkColumns
in class CollectionField
public java.lang.String getMapKey()
public void setMapKey(java.lang.String mapKey)
public void init()
init
in interface AmberField
init
in class AbstractField
public AmberExpr createExpr(QueryParser parser, PathExpr parent)
createExpr
in interface AmberField
createExpr
in class CollectionField
public void generatePreCascade(JavaWriter out, java.lang.String aConn, CascadeType cascadeType) throws java.io.IOException
generatePreCascade
in class CollectionField
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
protected void generateInternalCascade(JavaWriter out, java.lang.String aConn, CascadeType cascadeType) throws java.io.IOException
generateInternalCascade
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 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 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 java.lang.String generateTargetSelect(java.lang.String id)
generateTargetSelect
in class CollectionField
public void generateGetterMethod(JavaWriter out) throws java.io.IOException
generateGetterMethod
in interface AmberField
generateGetterMethod
in class AbstractField
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