public interface AmberField
Modifier and Type | Method and Description |
---|---|
void |
childDelete(AmberConnection aConn,
java.io.Serializable primaryKey)
Deletes the children
|
AmberExpr |
createExpr(QueryParser parser,
PathExpr parent)
Creates the expression for the field.
|
java.lang.String |
generateCastFromObject(java.lang.String value)
Generates code to convert to the type from the object.
|
void |
generateCopyLoadObject(JavaWriter out,
java.lang.String dst,
java.lang.String src,
int loadIndex)
Updates the cached copy.
|
void |
generateCopyUpdateObject(JavaWriter out,
java.lang.String dst,
java.lang.String src,
int updateIndex)
Updates the cached copy.
|
java.lang.String |
generateCreateTableSQL(AmberPersistenceUnit manager)
Generates the table create.
|
void |
generateDetach(JavaWriter out)
Generates detachment code
|
void |
generateDumpRelationships(JavaWriter out,
int updateIndex)
Checks entity-relationships from an object.
|
java.lang.String |
generateEquals(java.lang.String leftBase,
java.lang.String value)
Generates code to test the equals.
|
void |
generateExpire(JavaWriter out)
Generates the expire code.
|
void |
generateGet(JavaWriter out,
java.lang.String objThis)
Generates the field getter.
|
java.lang.String |
generateGet(java.lang.String objThis)
Generates the field getter.
|
void |
generateGetterMethod(JavaWriter out)
Generates the get property implementation.
|
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.
|
void |
generateInvalidateForeign(JavaWriter out)
Generates code for foreign entity create/delete
|
java.lang.String |
generateJavaSelect(java.lang.String id)
Generates the JPA QL select clause.
|
int |
generateLoad(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int loadGroupIndex)
Generates loading code
|
void |
generateLoadFromObject(JavaWriter out,
java.lang.String obj)
Generates loading cache
|
int |
generateLoadNative(JavaWriter out,
int index)
Generates loading code
|
java.lang.String |
generateLoadSelect(AmberTable table,
java.lang.String id)
Generates the select clause for an entity load.
|
void |
generateMergeFrom(JavaWriter out,
java.lang.String dst,
java.lang.String src)
Updates the cached copy.
|
void |
generateNativeColumnNames(java.util.ArrayList<java.lang.String> names)
Generates loading code
|
void |
generatePostConstructor(JavaWriter out)
Generates the post constructor fixup
|
void |
generatePostDelete(JavaWriter out)
Generates the delete foreign
|
int |
generatePostLoadSelect(JavaWriter out,
int index)
Generates loading code after the basic fields.
|
void |
generatePreDelete(JavaWriter out)
Generates the delete foreign
|
void |
generatePrePersist(JavaWriter out)
Generates any code needed before a persist occurs
|
void |
generatePrologue(JavaWriter out,
java.util.HashSet<java.lang.Object> completedSet)
Generates any prologue.
|
java.lang.String |
generateSelect(java.lang.String id)
Generates the select clause.
|
void |
generateSet(JavaWriter out,
java.lang.String objThis,
java.lang.String value)
Generates loading cache
|
java.lang.String |
generateSet(java.lang.String objThis,
java.lang.String value)
Generates the field setter.
|
void |
generateSetterMethod(JavaWriter out)
Generates the set property implementation.
|
void |
generateStatementSet(JavaWriter out,
java.lang.String pstmt,
java.lang.String index)
Generates the set clause.
|
void |
generateStatementSet(JavaWriter out,
java.lang.String pstmt,
java.lang.String index,
java.lang.String obj)
Generates the set clause.
|
java.lang.String |
generateSuperGetter(java.lang.String objThis)
Returns the actual data.
|
void |
generateSuperGetterMethod(JavaWriter out)
Generates the get property
|
java.lang.String |
generateSuperSetter(java.lang.String objThis,
java.lang.String value)
Sets the actual data.
|
void |
generateSuperSetterMethod(JavaWriter out)
Generates the get property
|
void |
generateUpdate(CharBuffer sql)
Generates the where clause.
|
void |
generateUpdate(JavaWriter out,
java.lang.String mask,
java.lang.String pstmt,
java.lang.String index)
Generates loading cache
|
void |
generateUpdateFromObject(JavaWriter out,
java.lang.String obj)
Generates loading cache
|
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()
Returns the column for the field.
|
long |
getCreateLoadMask(int group)
Returns the load group mask.
|
java.lang.reflect.Method |
getGetterMethod()
Returns the getter method.
|
java.lang.String |
getGetterName()
Returns the getter name.
|
int |
getIndex()
Returns the property index.
|
java.lang.Class |
getJavaClass()
Returns the class of the field
|
JType |
getJavaType()
Returns the type of the field
|
java.lang.String |
getJavaTypeName()
Returns the name of the java type.
|
int |
getLoadGroupIndex()
Returns the property's group index.
|
java.lang.String |
getName()
Returns the field name.
|
java.lang.reflect.Method |
getSetterMethod()
Returns the setter method.
|
java.lang.String |
getSetterName()
Returns the setter name.
|
AmberBeanType |
getSourceType()
Returns the owning entity class.
|
AmberTable |
getTable()
Returns the table containing the value (or null)
|
boolean |
hasLoadGroup(int index)
Generates loading code
|
void |
init()
Links to the target.
|
boolean |
isAbstract()
Returns true if the methods are abstract.
|
boolean |
isCascadable()
Returns true if the field is cascadable.
|
boolean |
isLazy()
Returns true if and only if this is a LAZY field.
|
boolean |
isUpdateable()
Returns true for an updateable field.
|
void |
link()
Links to the target.
|
AmberField |
override(AmberBeanType entityType)
Override the field
|
void |
setIndex(int index)
Links to the target.
|
java.lang.String |
toObject(java.lang.String value)
Converts to an object.
|
AmberBeanType getSourceType()
java.lang.String getName()
boolean isLazy()
AmberTable getTable()
AmberColumn getColumn()
int getIndex()
int getLoadGroupIndex()
long getCreateLoadMask(int group)
java.lang.Class getJavaClass()
JType getJavaType()
java.lang.String getJavaTypeName()
boolean isAbstract()
boolean isCascadable()
boolean isUpdateable()
void setIndex(int index)
AmberField override(AmberBeanType entityType)
void init() throws ConfigException
ConfigException
void generatePrologue(JavaWriter out, java.util.HashSet<java.lang.Object> completedSet) throws java.io.IOException
java.io.IOException
java.lang.reflect.Method getGetterMethod()
java.lang.reflect.Method getSetterMethod()
java.lang.String getGetterName()
java.lang.String getSetterName()
java.lang.String generateSuperGetter(java.lang.String objThis)
java.lang.String generateSuperSetter(java.lang.String objThis, java.lang.String value)
java.lang.String generateGet(java.lang.String objThis)
value
- the non-null valuejava.lang.String generateSet(java.lang.String objThis, java.lang.String value)
value
- the non-null valuevoid generateGet(JavaWriter out, java.lang.String objThis) throws java.io.IOException
value
- the non-null valuejava.io.IOException
void generateSet(JavaWriter out, java.lang.String objThis, java.lang.String value) throws java.io.IOException
java.io.IOException
void generateSuperGetterMethod(JavaWriter out) throws java.io.IOException
java.io.IOException
void generateSuperSetterMethod(JavaWriter out) throws java.io.IOException
java.io.IOException
void generateGetterMethod(JavaWriter out) throws java.io.IOException
java.io.IOException
void generateSetterMethod(JavaWriter out) throws java.io.IOException
java.io.IOException
void generateDetach(JavaWriter out) throws java.io.IOException
java.io.IOException
void generatePostConstructor(JavaWriter out) throws java.io.IOException
java.io.IOException
java.lang.String generateLoadSelect(AmberTable table, java.lang.String id)
java.lang.String generateSelect(java.lang.String id)
java.lang.String generateJavaSelect(java.lang.String id)
java.lang.String generateWhere(java.lang.String id)
void generateUpdate(CharBuffer sql)
void generateUpdate(JavaWriter out, java.lang.String mask, java.lang.String pstmt, java.lang.String index) throws java.io.IOException
java.io.IOException
boolean hasLoadGroup(int index)
int generateLoad(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int loadGroupIndex) throws java.io.IOException
java.io.IOException
int generatePostLoadSelect(JavaWriter out, int index) throws java.io.IOException
java.io.IOException
void generateLoadFromObject(JavaWriter out, java.lang.String obj) throws java.io.IOException
java.io.IOException
int generateLoadNative(JavaWriter out, int index) throws java.io.IOException
java.io.IOException
void generateNativeColumnNames(java.util.ArrayList<java.lang.String> names)
void generateUpdateFromObject(JavaWriter out, java.lang.String obj) throws java.io.IOException
java.io.IOException
void generateInsertColumns(java.util.ArrayList<java.lang.String> columns)
java.lang.String generateCreateTableSQL(AmberPersistenceUnit manager)
void generateStatementSet(JavaWriter out, java.lang.String pstmt, java.lang.String index) throws java.io.IOException
java.io.IOException
void generateInsertSet(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String obj) throws java.io.IOException
java.io.IOException
void generateUpdateSet(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String obj) throws java.io.IOException
java.io.IOException
void generatePrePersist(JavaWriter out) throws java.io.IOException
java.io.IOException
void generateCopyUpdateObject(JavaWriter out, java.lang.String dst, java.lang.String src, int updateIndex) throws java.io.IOException
java.io.IOException
void generateCopyLoadObject(JavaWriter out, java.lang.String dst, java.lang.String src, int loadIndex) throws java.io.IOException
java.io.IOException
void generateMergeFrom(JavaWriter out, java.lang.String dst, java.lang.String src) throws java.io.IOException
java.io.IOException
void generateDumpRelationships(JavaWriter out, int updateIndex) throws java.io.IOException
java.io.IOException
void generateStatementSet(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String obj) throws java.io.IOException
java.io.IOException
java.lang.String toObject(java.lang.String value)
void link()
void generatePreDelete(JavaWriter out) throws java.io.IOException
java.io.IOException
void generatePostDelete(JavaWriter out) throws java.io.IOException
java.io.IOException
void generateExpire(JavaWriter out) throws java.io.IOException
java.io.IOException
void generateInvalidateForeign(JavaWriter out) throws java.io.IOException
java.io.IOException
void childDelete(AmberConnection aConn, java.io.Serializable primaryKey) throws java.sql.SQLException
java.sql.SQLException
java.lang.String generateCastFromObject(java.lang.String value)
java.lang.String generateEquals(java.lang.String leftBase, java.lang.String value)
AmberExpr createExpr(QueryParser parser, PathExpr parent)