public class KeyEmbeddedSubField extends EmbeddedSubField implements IdField
log
Constructor and Description |
---|
KeyEmbeddedSubField(EntityEmbeddedField embeddedField,
AmberField embeddableField,
int index) |
Modifier and Type | Method and Description |
---|---|
void |
generateCheckCreateKey(JavaWriter out)
Generates the set for an insert.
|
void |
generateCopy(JavaWriter out,
java.lang.String dest,
java.lang.String source)
Generates code to copy to an object.
|
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 |
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.
|
java.lang.String |
generateMatchArgWhere(java.lang.String id)
Returns the key code
|
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 for an insert.
|
java.lang.String |
generateSetKeyProperty(java.lang.String key,
java.lang.String value)
Generates the setter for a key property
|
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.
|
AmberType |
getType()
Returns the column type
|
boolean |
isAutoGenerate()
Returns true for a generator.
|
void |
setKeyField(boolean isKey)
Sets true if there are multiple keys.
|
java.lang.String |
toValue(java.lang.String value)
Converts from an object.
|
childDelete, createExpr, generateCastFromObject, generateCopyLoadObject, generateCopyUpdateObject, generateCreateTableSQL, generateDetach, generateDumpRelationships, generateEquals, generateExpire, generateGet, generateGet, generateGetterMethod, generateInsertColumns, generateInsertSet, generateInvalidateForeign, generateJavaSelect, generateLoad, generateLoadFromObject, generateLoadNative, generateLoadSelect, generateMergeFrom, generateNativeColumnNames, generatePostConstructor, generatePostDelete, generatePostLoadSelect, generatePreDelete, generatePrePersist, generatePrologue, generateSelect, generateSet, generateSet, generateSetterMethod, generateStatementSet, generateStatementSet, generateSuperGetter, generateSuperGetterMethod, generateSuperSetter, generateSuperSetterMethod, generateUpdate, generateUpdate, generateUpdateFromObject, generateUpdateSet, generateWhere, getColumn, getCreateLoadMask, getGetterMethod, getGetterName, getIndex, getJavaClass, getJavaType, getJavaTypeName, getLoadGroupIndex, getName, getSetterMethod, getSetterName, getSourceType, getTable, hasLoadGroup, init, isAbstract, isCascadable, isLazy, isUpdateable, link, override, setIndex, toObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getJavaTypeName
childDelete, createExpr, generateCastFromObject, generateCopyLoadObject, generateCopyUpdateObject, generateCreateTableSQL, generateDetach, generateDumpRelationships, generateEquals, generateExpire, generateGet, generateGet, generateGetterMethod, generateInsertColumns, generateInsertSet, generateInvalidateForeign, generateJavaSelect, generateLoad, generateLoadFromObject, generateLoadNative, generateLoadSelect, generateMergeFrom, generateNativeColumnNames, generatePostConstructor, generatePostDelete, generatePostLoadSelect, generatePreDelete, generatePrePersist, generatePrologue, generateSelect, generateSet, generateSet, generateSetterMethod, generateStatementSet, 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, toObject
public KeyEmbeddedSubField(EntityEmbeddedField embeddedField, AmberField embeddableField, int index) throws ConfigException
ConfigException
public java.util.ArrayList<AmberColumn> getColumns()
getColumns
in interface IdField
public AmberType getType()
public boolean isAutoGenerate()
isAutoGenerate
in interface IdField
public void setKeyField(boolean isKey)
setKeyField
in interface IdField
public java.lang.String getForeignTypeName()
getForeignTypeName
in interface IdField
public int getComponentCount()
getComponentCount
in interface IdField
public java.lang.String getGenerator()
getGenerator
in interface IdField
public void generateCopy(JavaWriter out, java.lang.String dest, java.lang.String source) throws java.io.IOException
generateCopy
in interface IdField
java.io.IOException
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 generateSetGeneratedKeys(JavaWriter out, java.lang.String pstmt) throws java.io.IOException
generateSetGeneratedKeys
in interface IdField
java.io.IOException
public void generateCheckCreateKey(JavaWriter out) throws java.io.IOException
generateCheckCreateKey
in interface IdField
java.io.IOException
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 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 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 java.lang.String generateIsNull(java.lang.String value)
generateIsNull
in interface IdField
public java.lang.String generateRawWhere(java.lang.String id)
generateRawWhere
in interface IdField
public java.lang.String generateMatchArgWhere(java.lang.String id)
generateMatchArgWhere
in interface IdField