com.caucho.amber.field
Class EntityMapField

java.lang.Object
  extended by com.caucho.amber.field.AbstractField
      extended by com.caucho.amber.field.EntityMapField
All Implemented Interfaces:
AmberField

public class EntityMapField
extends AbstractField

Represents a map to entities.


Field Summary
protected static java.util.logging.Logger log
           
 
Constructor Summary
EntityMapField(EntityType entityType)
           
 
Method Summary
 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.
 void generateGetterMethod(JavaWriter out)
          Generates the set property.
 void generateLoadFromObject(JavaWriter out, java.lang.String obj)
          Generates loading cache
 java.lang.String generateLoadSelect(java.lang.String id)
          Generates the select clause.
 void generateSuperGetterMethod(JavaWriter out)
          Generates the get property.
 void generateSuperSetterMethod(JavaWriter out)
          Generates the get property.
 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
 java.util.ArrayList<AmberColumn> getIndexColumns()
          Sets the index columns.
 boolean isUpdateable()
          Returns true if the methods are abstract.
 void setId(IdField id)
          Sets the id field.
 void setIndex(IdField index)
          Sets the index field.
 void setIndexColumns(java.util.ArrayList<AmberColumn> columns)
          Sets the index columns.
 void setMapMethod(JMethod method)
          Sets the map method.
 void setName(java.lang.String name)
          Sets the field name.
 void setTargetType(EntityType type)
          Sets the target type.
 
Methods inherited from class com.caucho.amber.field.AbstractField
childDelete, createExpr, generateCastFromObject, generateCreateTableSQL, generateDetach, generateDumpRelationships, generateEquals, generateExpire, generateGet, generateGet, generateInsert, generateInsertColumns, generateInsertSet, generateInvalidateForeign, generateJavaSelect, generateLoad, generateLoadNative, generateLoadSelect, generateMergeFrom, generateNativeColumnNames, generateNull, generatePostConstructor, generatePostDelete, generatePostLoadSelect, generatePreDelete, generatePrePersist, generatePrologue, generateSelect, generateSet, generateSet, generateSetterMethod, generateStatementSet, generateStatementSet, generateSuperGetter, generateSuperSetter, generateUpdate, generateUpdateSet, generateWhere, getBeanClass, getColumn, getCreateLoadMask, getEntitySourceType, getFieldName, getGetterMethod, getGetterName, getIndex, getJavaClass, getJavaType, getJavaTypeName, getLoadGroupIndex, getName, getPersistenceUnit, getSetterMethod, getSetterName, getSourceType, getTable, hasLoadGroup, init, isAbstract, isCascadable, isFieldAccess, isKey, isLazy, isOverride, link, override, setColumn, setIndex, setJavaType, setLazy, setLoadGroupIndex, setOverride, toObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

EntityMapField

public EntityMapField(EntityType entityType)
Method Detail

setName

public void setName(java.lang.String name)
Sets the field name.

Overrides:
setName in class AbstractField

setTargetType

public void setTargetType(EntityType type)
Sets the target type.


isUpdateable

public boolean isUpdateable()
Returns true if the methods are abstract.

Specified by:
isUpdateable in interface AmberField
Overrides:
isUpdateable in class AbstractField

setMapMethod

public void setMapMethod(JMethod method)
Sets the map method.


setId

public void setId(IdField id)
Sets the id field.


setIndex

public void setIndex(IdField index)
Sets the index field.


setIndexColumns

public void setIndexColumns(java.util.ArrayList<AmberColumn> columns)
Sets the index columns.


getIndexColumns

public java.util.ArrayList<AmberColumn> getIndexColumns()
Sets the index columns.


generateUpdate

public void generateUpdate(JavaWriter out,
                           java.lang.String mask,
                           java.lang.String pstmt,
                           java.lang.String index)
                    throws java.io.IOException
Generates loading cache

Specified by:
generateUpdate in interface AmberField
Overrides:
generateUpdate in class AbstractField
Throws:
java.io.IOException

generateLoadFromObject

public void generateLoadFromObject(JavaWriter out,
                                   java.lang.String obj)
                            throws java.io.IOException
Generates loading cache

Specified by:
generateLoadFromObject in interface AmberField
Overrides:
generateLoadFromObject in class AbstractField
Throws:
java.io.IOException

generateUpdateFromObject

public void generateUpdateFromObject(JavaWriter out,
                                     java.lang.String obj)
                              throws java.io.IOException
Generates loading cache

Specified by:
generateUpdateFromObject in interface AmberField
Overrides:
generateUpdateFromObject in class AbstractField
Throws:
java.io.IOException

generateLoadSelect

public java.lang.String generateLoadSelect(java.lang.String id)
Generates the select clause.


generateCopyUpdateObject

public void generateCopyUpdateObject(JavaWriter out,
                                     java.lang.String dst,
                                     java.lang.String src,
                                     int updateIndex)
                              throws java.io.IOException
Updates the cached copy.

Specified by:
generateCopyUpdateObject in interface AmberField
Overrides:
generateCopyUpdateObject in class AbstractField
Throws:
java.io.IOException

generateCopyLoadObject

public void generateCopyLoadObject(JavaWriter out,
                                   java.lang.String dst,
                                   java.lang.String src,
                                   int loadIndex)
                            throws java.io.IOException
Updates the cached copy.

Specified by:
generateCopyLoadObject in interface AmberField
Overrides:
generateCopyLoadObject in class AbstractField
Throws:
java.io.IOException

generateSuperGetterMethod

public void generateSuperGetterMethod(JavaWriter out)
                               throws java.io.IOException
Generates the get property.

Specified by:
generateSuperGetterMethod in interface AmberField
Overrides:
generateSuperGetterMethod in class AbstractField
Throws:
java.io.IOException

generateSuperSetterMethod

public void generateSuperSetterMethod(JavaWriter out)
                               throws java.io.IOException
Generates the get property.

Specified by:
generateSuperSetterMethod in interface AmberField
Overrides:
generateSuperSetterMethod in class AbstractField
Throws:
java.io.IOException

generateGetterMethod

public void generateGetterMethod(JavaWriter out)
                          throws java.io.IOException
Generates the set property.

Specified by:
generateGetterMethod in interface AmberField
Overrides:
generateGetterMethod in class AbstractField
Throws:
java.io.IOException