public class PropertyField extends AbstractField
Constructor and Description |
---|
PropertyField(AmberBeanType statefulType) |
PropertyField(AmberBeanType statefulType,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
AmberExpr |
createExpr(QueryParser parser,
PathExpr parent)
Creates the expression for the field.
|
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
|
int |
generateLoadNative(JavaWriter out,
int index)
Generates loading code
|
java.lang.String |
generateLoadSelect(AmberTable table,
java.lang.String id)
Generates the select clause.
|
void |
generateNativeColumnNames(java.util.ArrayList<java.lang.String> names)
Generates loading code
|
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.
|
AmberColumn |
getColumn()
Gets the column.
|
protected java.lang.String |
getFieldName()
Returns the field name.
|
EntityType |
getRelatedSourceType()
Returns the source type as
entity or mapped-superclass.
|
AmberTable |
getTable()
Returns the table containing the field's columns.
|
AmberType |
getType()
Sets the result type.
|
void |
init()
Initializes the property.
|
boolean |
isInsert() |
boolean |
isUpdate() |
AmberField |
override(AmberBeanType type)
Creates a copy of the field for a parent
|
void |
setColumn(AmberColumn column)
Sets the column.
|
void |
setInsert(boolean isInsert)
Set true if the property should be saved on an insert.
|
void |
setType(AmberType type)
Sets the result type.
|
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, generateMergeFrom, generatePostConstructor, generatePostDelete, generatePostLoadSelect, generatePreDelete, generatePrePersist, generatePrologue, generateSet, generateSet, generateStatementSet, generateSuperGetter, generateSuperGetterMethod, generateSuperSetter, generateSuperSetterMethod, generateUpdate, generateUpdateFromObject, getBeanClass, getCreateLoadMask, getEntitySourceType, getGetterMethod, getGetterName, getIndex, getJavaClass, getJavaType, getJavaTypeName, getLoadGroupIndex, getName, getPersistenceUnit, getSetterMethod, getSetterName, getSourceType, hasLoadGroup, isAbstract, isCascadable, isFieldAccess, isKey, isLazy, isOverride, isUpdateable, link, setIndex, setJavaType, setLazy, setLoadGroupIndex, setName, setOverride, toObject, toString
public PropertyField(AmberBeanType statefulType, java.lang.String name) throws ConfigException
ConfigException
public PropertyField(AmberBeanType statefulType)
public void setType(AmberType type)
public AmberType getType()
public EntityType getRelatedSourceType()
public AmberTable getTable()
getTable
in interface AmberField
getTable
in class AbstractField
public void setColumn(AmberColumn column)
setColumn
in class AbstractField
public AmberColumn getColumn()
getColumn
in interface AmberField
getColumn
in class AbstractField
public void setInsert(boolean isInsert)
public boolean isInsert()
public void setUpdate(boolean isUpdate)
public boolean isUpdate()
public AmberField override(AmberBeanType type)
override
in interface AmberField
override
in class AbstractField
public void init() throws ConfigException
init
in interface AmberField
init
in class AbstractField
ConfigException
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 java.lang.String generateNull()
generateNull
in class AbstractField
protected java.lang.String getFieldName()
getFieldName
in class AbstractField
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 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 generateLoadNative(JavaWriter out, int index) throws java.io.IOException
generateLoadNative
in interface AmberField
generateLoadNative
in class AbstractField
java.io.IOException
public void generateNativeColumnNames(java.util.ArrayList<java.lang.String> names)
generateNativeColumnNames
in interface AmberField
generateNativeColumnNames
in class AbstractField
public AmberExpr createExpr(QueryParser parser, PathExpr parent)
createExpr
in interface AmberField
createExpr
in class AbstractField