public class EmbeddedIdField extends EntityEmbeddedField implements IdField
Constructor and Description |
---|
EmbeddedIdField(EntityType ownerType,
EmbeddableType embeddableType) |
EmbeddedIdField(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 |
generateCheckCreateKey(JavaWriter out)
Generates the set clause.
|
java.lang.String |
generateEquals(java.lang.String left,
java.lang.String right)
Generates code to test the equals.
|
java.lang.String |
generateGetKeyProperty(java.lang.String key)
Generates the getter for a key property
|
java.lang.String |
generateGetProxyProperty(java.lang.String value)
Generates the property getter for an EJB proxy
|
java.lang.String |
generateIsNull(java.lang.String value)
Returns a test for null.
|
int |
generateLoad(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index)
Generates loading code
|
int |
generateLoadForeign(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index)
Returns the foreign type.
|
int |
generateLoadForeign(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index,
java.lang.String name)
Returns the foreign type.
|
void |
generateLoadFromObject(JavaWriter out,
java.lang.String obj)
Generates loading cache
|
java.lang.String |
generateLoadSelect(AmberTable table,
java.lang.String id)
Generates the select clause.
|
void |
generateMatch(JavaWriter out,
java.lang.String key)
Generates code for a match.
|
java.lang.String |
generateMatchArgWhere(java.lang.String id)
Returns the where code
|
void |
generatePrologue(JavaWriter out,
java.util.HashSet<java.lang.Object> completedSet)
Generates any prologue.
|
java.lang.String |
generateRawWhere(java.lang.String id)
Returns the where code
|
void |
generateSetGeneratedKeys(JavaWriter out,
java.lang.String pstmt)
Generates the set clause.
|
void |
generateSetInsert(JavaWriter out,
java.lang.String pstmt,
java.lang.String index)
Generates the set clause.
|
java.lang.String |
generateSetKeyProperty(java.lang.String key,
java.lang.String value)
Generates the setter for a key property
|
java.lang.String |
generateSetNull(java.lang.String obj)
Generates loading cache
|
void |
generateStatementSet(JavaWriter out,
java.lang.String pstmt,
java.lang.String index,
java.lang.String value)
Generates the set clause.
|
java.util.ArrayList<AmberColumn> |
getColumns()
Returns the columns
|
int |
getComponentCount()
Returns the component count.
|
java.lang.String |
getForeignTypeName()
Returns the foreign type.
|
java.lang.String |
getGenerator()
Returns the generator.
|
boolean |
isAutoGenerate()
Returns true for a generator.
|
void |
setKeyField(boolean isKeyField)
Set true if key fields are accessed through fields.
|
java.lang.String |
toObject(java.lang.String value)
Converts to an object.
|
java.lang.String |
toValue(java.lang.String value)
Converts from an object.
|
generateCopy, generateGetPrimaryKey, generateGetterMethod, generateInsertColumns, generateInsertSet, generateNull, generateSelect, generateSetterMethod, generateUpdate, generateUpdateSet, generateWhere, getEmbeddableType, getSubFields, getType, init, isEmbeddedId, setEmbeddableType, setInsert, setUpdate
childDelete, generateCastFromObject, generateCopyLoadObject, generateCopyUpdateObject, generateCreateTableSQL, generateDetach, generateDumpRelationships, generateExpire, generateGet, generateGet, generateInsert, generateInvalidateForeign, generateJavaSelect, generateLoadNative, generateMergeFrom, generateNativeColumnNames, generatePostConstructor, generatePostDelete, generatePostLoadSelect, generatePreDelete, generatePrePersist, 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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
generateCopy, getJavaTypeName, getType
childDelete, generateCastFromObject, generateCopyLoadObject, generateCopyUpdateObject, generateCreateTableSQL, generateDetach, generateDumpRelationships, generateExpire, generateGet, generateGet, generateGetterMethod, generateInsertColumns, generateInsertSet, generateInvalidateForeign, generateJavaSelect, generateLoadNative, generateMergeFrom, generateNativeColumnNames, generatePostConstructor, generatePostDelete, generatePostLoadSelect, generatePreDelete, generatePrePersist, generateSelect, generateSet, generateSet, generateSetterMethod, generateStatementSet, generateSuperGetter, generateSuperGetterMethod, generateSuperSetter, generateSuperSetterMethod, generateUpdate, generateUpdate, generateUpdateFromObject, generateUpdateSet, generateWhere, getColumn, getCreateLoadMask, getGetterMethod, getGetterName, getIndex, getJavaClass, getJavaType, getLoadGroupIndex, getName, getSetterMethod, getSetterName, getSourceType, getTable, hasLoadGroup, init, isAbstract, isCascadable, isLazy, isUpdateable, link, override, setIndex
public EmbeddedIdField(EntityType ownerType, EmbeddableType embeddableType)
public EmbeddedIdField(EntityType ownerType, EmbeddableType embeddableType, java.lang.String name) throws ConfigException
ConfigException
protected EmbeddedSubField createSubField(AmberField field, int index)
createSubField
in class EntityEmbeddedField
public java.util.ArrayList<AmberColumn> getColumns()
getColumns
in interface IdField
public boolean isAutoGenerate()
isAutoGenerate
in interface IdField
public void setKeyField(boolean isKeyField)
setKeyField
in interface IdField
public int getComponentCount()
getComponentCount
in interface IdField
public java.lang.String getForeignTypeName()
getForeignTypeName
in interface IdField
public java.lang.String getGenerator()
getGenerator
in interface IdField
public java.lang.String generateSetKeyProperty(java.lang.String key, java.lang.String value) throws java.io.IOException
generateSetKeyProperty
in interface IdField
java.io.IOException
public java.lang.String generateGetKeyProperty(java.lang.String key) throws java.io.IOException
generateGetKeyProperty
in interface IdField
java.io.IOException
public java.lang.String generateGetProxyProperty(java.lang.String value)
generateGetProxyProperty
in interface IdField
value
- the non-null valuepublic 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 generateSetGeneratedKeys(JavaWriter out, java.lang.String pstmt) throws java.io.IOException
generateSetGeneratedKeys
in interface IdField
java.io.IOException
public java.lang.String generateMatchArgWhere(java.lang.String id)
generateMatchArgWhere
in interface IdField
public java.lang.String generateRawWhere(java.lang.String id)
generateRawWhere
in interface IdField
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 EntityEmbeddedField
java.io.IOException
public int generateLoadForeign(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index) throws java.io.IOException
generateLoadForeign
in interface IdField
java.io.IOException
public void generateLoadFromObject(JavaWriter out, java.lang.String obj) throws java.io.IOException
generateLoadFromObject
in interface AmberField
generateLoadFromObject
in class AbstractField
java.io.IOException
public java.lang.String generateLoadSelect(AmberTable table, java.lang.String id)
generateLoadSelect
in interface AmberField
generateLoadSelect
in class EntityEmbeddedField
public java.lang.String generateSetNull(java.lang.String obj) throws java.io.IOException
java.io.IOException
public java.lang.String generateIsNull(java.lang.String value)
generateIsNull
in interface IdField
public int generateLoadForeign(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index, java.lang.String name) throws java.io.IOException
generateLoadForeign
in interface IdField
java.io.IOException
public void generateStatementSet(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String value) throws java.io.IOException
generateStatementSet
in interface AmberField
generateStatementSet
in class EntityEmbeddedField
java.io.IOException
public void generateMatch(JavaWriter out, java.lang.String key) throws java.io.IOException
java.io.IOException
public java.lang.String generateEquals(java.lang.String left, java.lang.String right)
generateEquals
in interface AmberField
generateEquals
in class AbstractField
public void generateSetInsert(JavaWriter out, java.lang.String pstmt, java.lang.String index) throws java.io.IOException
generateSetInsert
in interface IdField
java.io.IOException
public void generateCheckCreateKey(JavaWriter out) throws java.io.IOException
generateCheckCreateKey
in interface IdField
java.io.IOException
public AmberExpr createExpr(QueryParser parser, PathExpr parent)
createExpr
in interface AmberField
createExpr
in class EntityEmbeddedField
public java.lang.String toObject(java.lang.String value)
toObject
in interface AmberField
toObject
in class AbstractField