public class DependentEntityOneToOneField extends CascadableField
Constructor and Description |
---|
DependentEntityOneToOneField(EntityType relatedType,
java.lang.String name) |
DependentEntityOneToOneField(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.
|
void |
generateGetterMethod(JavaWriter out)
Generates the set property.
|
void |
generateInvalidateForeign(JavaWriter out)
Generates code for foreign entity create/delete
|
void |
generateJoin(CharBuffer cb,
java.lang.String sourceTable,
java.lang.String targetTable)
Generates the linking for a join
|
int |
generateLoad(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index)
Generates loading code
|
void |
generateLoadProperty(JavaWriter out,
java.lang.String index,
java.lang.String session)
Generates the set property.
|
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 |
generatePreCascade(JavaWriter out,
java.lang.String aConn,
CascadeType cascadeType)
Generates the (pre) cascade operation from
parent to this child.
|
void |
generatePrologue(JavaWriter out,
java.util.HashSet<java.lang.Object> completedSet)
Generates any prologue.
|
void |
generateSetterMethod(JavaWriter out)
Generates the set property.
|
void |
generateStatementSet(JavaWriter out,
java.lang.String pstmt,
java.lang.String index)
Generates the set clause.
|
void |
generateUpdateFromObject(JavaWriter out,
java.lang.String obj)
Generates loading cache
|
ForeignColumn |
getColumn(IdField targetField)
Gets the column corresponding to the target field.
|
EntityType |
getEntitySourceType()
Returns the source type as
entity or mapped-superclass.
|
EntityType |
getEntityTargetType()
Returns the target type as
entity or mapped-superclass.
|
java.lang.String |
getForeignTypeName()
Returns the foreign type.
|
ManyToOneField |
getTargetField()
Sets the target field.
|
long |
getTargetLoadIndex()
Gets the target load index.
|
AmberType |
getType()
Returns the target type.
|
void |
init()
Initialize the field.
|
boolean |
isCascadeDelete()
Returns the cascade-delete property.
|
void |
setCascadeDelete(boolean isCascadeDelete)
Sets the cascade-delete property.
|
void |
setColumn(AmberColumn column)
Sets the column.
|
void |
setTargetField(ManyToOneField targetField)
Sets the target field.
|
generateFlushCheck, generateInternalCascade, getCascadeType, isCascadable, isCascade, setCascadeType
childDelete, generateCastFromObject, generateCopyLoadObject, generateCreateTableSQL, generateDetach, generateDumpRelationships, generateEquals, generateExpire, generateGet, generateGet, generateInsert, generateInsertColumns, generateInsertSet, generateJavaSelect, generateLoadFromObject, generateLoadNative, generateLoadSelect, generateNativeColumnNames, generateNull, generatePostConstructor, generatePostDelete, generatePreDelete, generatePrePersist, generateSelect, generateSet, generateSet, generateStatementSet, generateSuperGetter, generateSuperGetterMethod, generateSuperSetter, generateSuperSetterMethod, generateUpdate, generateUpdate, 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, setIndex, setJavaType, setLazy, setLoadGroupIndex, setName, setOverride, toObject, toString
public DependentEntityOneToOneField(EntityType relatedType, java.lang.String name) throws ConfigException
ConfigException
public DependentEntityOneToOneField(EntityType relatedType, java.lang.String name, CascadeType[] cascadeTypes) throws ConfigException
ConfigException
public void setTargetField(ManyToOneField targetField)
public ManyToOneField getTargetField()
public long getTargetLoadIndex()
public EntityType getEntitySourceType()
getEntitySourceType
in class AbstractField
public EntityType getEntityTargetType()
public AmberType getType()
public java.lang.String getForeignTypeName()
public void setColumn(AmberColumn column)
setColumn
in class AbstractField
public void setCascadeDelete(boolean isCascadeDelete)
public boolean isCascadeDelete()
public void init() throws ConfigException
AbstractField
init
in interface AmberField
init
in class AbstractField
ConfigException
public AmberExpr createExpr(QueryParser parser, PathExpr parent)
createExpr
in interface AmberField
createExpr
in class AbstractField
public ForeignColumn getColumn(IdField targetField)
public void generatePrologue(JavaWriter out, java.util.HashSet<java.lang.Object> completedSet) throws java.io.IOException
generatePrologue
in interface AmberField
generatePrologue
in class AbstractField
java.io.IOException
public void generateJoin(CharBuffer cb, java.lang.String sourceTable, java.lang.String targetTable)
public int generateLoad(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index) throws java.io.IOException
generateLoad
in interface AmberField
generateLoad
in class AbstractField
java.io.IOException
public int generatePostLoadSelect(JavaWriter out, int index) throws java.io.IOException
generatePostLoadSelect
in interface AmberField
generatePostLoadSelect
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 generateLoadProperty(JavaWriter out, java.lang.String index, java.lang.String session) throws java.io.IOException
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 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 generateSetterMethod(JavaWriter out) throws java.io.IOException
generateSetterMethod
in interface AmberField
generateSetterMethod
in class AbstractField
java.io.IOException
public void generateStatementSet(JavaWriter out, java.lang.String pstmt, java.lang.String index) throws java.io.IOException
generateStatementSet
in interface AmberField
generateStatementSet
in class AbstractField
java.io.IOException
public void generateUpdateFromObject(JavaWriter out, java.lang.String obj) throws java.io.IOException
generateUpdateFromObject
in interface AmberField
generateUpdateFromObject
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 generatePreCascade(JavaWriter out, java.lang.String aConn, CascadeType cascadeType) throws java.io.IOException
CascadableField
generatePreCascade
in class CascadableField
java.io.IOException
public void generatePostCascade(JavaWriter out, java.lang.String aConn, CascadeType cascadeType) throws java.io.IOException
CascadableField
generatePostCascade
in class CascadableField
java.io.IOException