public class EntityEmbeddedField extends AbstractField
Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
log |
Constructor and Description |
---|
EntityEmbeddedField(EntityType ownerType,
EmbeddableType embeddableType) |
EntityEmbeddedField(EntityType ownerType,
EmbeddableType embeddableType,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
AmberExpr |
createExpr(QueryParser parser,
PathExpr parent)
Creates the expression for the field.
|
protected EmbeddedSubField |
createSubField(AmberField field,
int index) |
void |
generateCopy(JavaWriter out,
java.lang.String dest,
java.lang.String source)
Generates code to copy to an object.
|
void |
generateGetPrimaryKey(CharBuffer cb)
Generates get property.
|
void |
generateGetterMethod(JavaWriter out)
Generates the set property.
|
void |
generateInsertColumns(java.util.ArrayList<java.lang.String> columns)
Generates the insert.
|
void |
generateInsertSet(JavaWriter out,
java.lang.String pstmt,
java.lang.String index,
java.lang.String obj)
Generates the set clause for the insert clause.
|
int |
generateLoad(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index)
Generates loading code
|
java.lang.String |
generateLoadSelect(AmberTable table,
java.lang.String id)
Generates the select clause.
|
java.lang.String |
generateNull()
Returns the null value.
|
java.lang.String |
generateSelect(java.lang.String id)
Generates the select clause.
|
void |
generateSetterMethod(JavaWriter out)
Generates the set property.
|
void |
generateStatementSet(JavaWriter out,
java.lang.String pstmt,
java.lang.String index,
java.lang.String obj)
Generates the set clause.
|
void |
generateUpdate(CharBuffer sql)
Generates the update set clause
|
void |
generateUpdateSet(JavaWriter out,
java.lang.String pstmt,
java.lang.String index,
java.lang.String obj)
Generates the set clause for the insert clause.
|
java.lang.String |
generateWhere(java.lang.String id)
Generates the where clause.
|
EmbeddableType |
getEmbeddableType() |
java.util.ArrayList<EmbeddedSubField> |
getSubFields()
Returns the subfields.
|
AmberType |
getType()
Sets the result type.
|
void |
init()
Initializes the property.
|
boolean |
isEmbeddedId()
Returns true if the property is an @EmbeddedId.
|
void |
setEmbeddableType(EmbeddableType type)
Sets the result type.
|
void |
setInsert(boolean isInsert)
Set true if the property should be saved on an insert.
|
void |
setUpdate(boolean isUpdate)
Set true if the property should be saved on an update.
|
childDelete, generateCastFromObject, generateCopyLoadObject, generateCopyUpdateObject, generateCreateTableSQL, generateDetach, generateDumpRelationships, generateEquals, generateExpire, generateGet, generateGet, generateInsert, generateInvalidateForeign, generateJavaSelect, generateLoadFromObject, generateLoadNative, generateMergeFrom, generateNativeColumnNames, generatePostConstructor, generatePostDelete, generatePostLoadSelect, generatePreDelete, generatePrePersist, generatePrologue, generateSet, generateSet, generateStatementSet, generateSuperGetter, generateSuperGetterMethod, generateSuperSetter, generateSuperSetterMethod, generateUpdate, generateUpdateFromObject, getBeanClass, getColumn, getCreateLoadMask, getEntitySourceType, getFieldName, getGetterMethod, getGetterName, getIndex, getJavaClass, getJavaType, getJavaTypeName, getLoadGroupIndex, getName, getPersistenceUnit, getSetterMethod, getSetterName, getSourceType, getTable, hasLoadGroup, isAbstract, isCascadable, isFieldAccess, isKey, isLazy, isOverride, isUpdateable, link, override, setColumn, setIndex, setJavaType, setLazy, setLoadGroupIndex, setName, setOverride, toObject, toString
public EntityEmbeddedField(EntityType ownerType, EmbeddableType embeddableType, java.lang.String name) throws ConfigException
ConfigException
public EntityEmbeddedField(EntityType ownerType, EmbeddableType embeddableType)
public EmbeddableType getEmbeddableType()
public void setEmbeddableType(EmbeddableType type)
protected EmbeddedSubField createSubField(AmberField field, int index)
public AmberType getType()
public java.util.ArrayList<EmbeddedSubField> getSubFields()
public boolean isEmbeddedId()
public void setInsert(boolean isInsert)
public void setUpdate(boolean isUpdate)
public void init() throws ConfigException
init
in interface AmberField
init
in class AbstractField
ConfigException
public java.lang.String generateNull()
generateNull
in class AbstractField
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 generateCopy(JavaWriter out, java.lang.String dest, java.lang.String source) throws java.io.IOException
java.io.IOException
public java.lang.String generateLoadSelect(AmberTable table, java.lang.String id)
generateLoadSelect
in interface AmberField
generateLoadSelect
in class AbstractField
public java.lang.String generateSelect(java.lang.String id)
generateSelect
in interface AmberField
generateSelect
in class AbstractField
public java.lang.String generateWhere(java.lang.String id)
generateWhere
in interface AmberField
generateWhere
in class AbstractField
public void generateInsertColumns(java.util.ArrayList<java.lang.String> columns)
generateInsertColumns
in interface AmberField
generateInsertColumns
in class AbstractField
public void generateUpdate(CharBuffer sql)
generateUpdate
in interface AmberField
generateUpdate
in class AbstractField
public void generateInsertSet(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String obj) throws java.io.IOException
generateInsertSet
in interface AmberField
generateInsertSet
in class AbstractField
java.io.IOException
public void generateUpdateSet(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String obj) throws java.io.IOException
generateUpdateSet
in interface AmberField
generateUpdateSet
in class AbstractField
java.io.IOException
public void generateStatementSet(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String obj) throws java.io.IOException
generateStatementSet
in interface AmberField
generateStatementSet
in class AbstractField
java.io.IOException
public void generateGetPrimaryKey(CharBuffer cb)
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 AmberExpr createExpr(QueryParser parser, PathExpr parent)
createExpr
in interface AmberField
createExpr
in class AbstractField