com.caucho.amber.field
Interface IdField

All Superinterfaces:
AmberField
All Known Implementing Classes:
EmbeddedIdField, IdentifyingKeyPropertyField, KeyEmbeddedSubField, KeyManyToOneField, KeyPropertyField

public interface IdField
extends AmberField

Configuration for a bean's field


Method Summary
 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.
 java.lang.String getJavaTypeName()
          Returns the java type name.
 AmberType getType()
          Returns 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.
 
Methods inherited from interface com.caucho.amber.field.AmberField
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
 

Method Detail

getColumns

java.util.ArrayList<AmberColumn> getColumns()
Returns the columns


getType

AmberType getType()
Returns type


isAutoGenerate

boolean isAutoGenerate()
Returns true for a generator.


setKeyField

void setKeyField(boolean isKey)
Sets true if there are multiple keys.


getForeignTypeName

java.lang.String getForeignTypeName()
Returns the foreign type.


getJavaTypeName

java.lang.String getJavaTypeName()
Returns the java type name.

Specified by:
getJavaTypeName in interface AmberField

getComponentCount

int getComponentCount()
Returns the component count.


getGenerator

java.lang.String getGenerator()
Returns the generator.


generateCheckCreateKey

void generateCheckCreateKey(JavaWriter out)
                            throws java.io.IOException
Generates the set for an insert.

Throws:
java.io.IOException

generateCopy

void generateCopy(JavaWriter out,
                  java.lang.String dest,
                  java.lang.String source)
                  throws java.io.IOException
Generates code to copy to an object.

Throws:
java.io.IOException

generateGetKeyProperty

java.lang.String generateGetKeyProperty(java.lang.String key)
                                        throws java.io.IOException
Generates the getter for a key property

Throws:
java.io.IOException

generateGetProxyProperty

java.lang.String generateGetProxyProperty(java.lang.String value)
Generates the property getter for an EJB proxy

Parameters:
value - the non-null value

generateIsNull

java.lang.String generateIsNull(java.lang.String value)
Returns a test for null.


generateLoadForeign

int generateLoadForeign(JavaWriter out,
                        java.lang.String rs,
                        java.lang.String indexVar,
                        int index)
                        throws java.io.IOException
Returns the foreign type.

Throws:
java.io.IOException

generateLoadForeign

int generateLoadForeign(JavaWriter out,
                        java.lang.String rs,
                        java.lang.String indexVar,
                        int index,
                        java.lang.String name)
                        throws java.io.IOException
Returns the foreign type.

Throws:
java.io.IOException

generateSetGeneratedKeys

void generateSetGeneratedKeys(JavaWriter out,
                              java.lang.String pstmt)
                              throws java.io.IOException
Generates the set clause.

Throws:
java.io.IOException

generateSetKeyProperty

java.lang.String generateSetKeyProperty(java.lang.String key,
                                        java.lang.String value)
                                        throws java.io.IOException
Generates the setter for a key property

Throws:
java.io.IOException

generateSetInsert

void generateSetInsert(JavaWriter out,
                       java.lang.String pstmt,
                       java.lang.String index)
                       throws java.io.IOException
Generates the set for an insert.

Throws:
java.io.IOException

generateRawWhere

java.lang.String generateRawWhere(java.lang.String id)
Returns the where code


generateMatchArgWhere

java.lang.String generateMatchArgWhere(java.lang.String id)
Returns the key code


toValue

java.lang.String toValue(java.lang.String value)
Converts from an object.