com.caucho.amber.type
Class EntityType

java.lang.Object
  extended by com.caucho.amber.type.AmberType
      extended by com.caucho.amber.type.AbstractEnhancedType
          extended by com.caucho.amber.type.AmberBeanType
              extended by com.caucho.amber.type.EntityType
Direct Known Subclasses:
MappedSuperclassType, SubEntityType

public class EntityType
extends AmberBeanType

Base for entity or mapped-superclass types.


Field Summary
protected  int _defaultLoadGroupIndex
           
protected  int _dirtyIndex
           
protected  boolean _hasLoadCallback
           
protected  int _loadGroupIndex
           
protected  int _minDirtyIndex
           
 
Constructor Summary
EntityType(AmberPersistenceUnit amberPersistenceUnit)
           
 
Method Summary
 void addField(AmberField field)
          Adds a new field.
 void addListener(ListenerType listener)
          Adds an entity listener.
 void addMappedSuperclassField(AmberField field)
          Adds a mapped superclass field.
 void addSecondaryTable(AmberTable table)
          Adds a secondary table.
 void addSubClass(EntityType type)
          Adds a sub-class.
 Entity createBean()
          Creates a new entity for this specific instance type.
 AmberCompletion createManyToOneCompletion(java.lang.String name, Entity source, java.lang.Object newTarget)
          Returns a completion for the given field.
 void delete(AmberConnection aConn, java.lang.Object key)
          Deletes by the primary key.
 EntityItem findItem(AmberConnection aConn, java.sql.ResultSet rs, int index)
          Finds the object
 java.lang.String generateAutoCreateSQL(AmberTable table)
          Generates the auto insert sql.
 void generateCopyLoadObject(JavaWriter out, java.lang.String dst, java.lang.String src, int loadGroup)
          Copy from an object.
 void generateCopyUpdateObject(JavaWriter out, java.lang.String dst, java.lang.String src, int updateIndex)
          Copy from an object.
 java.lang.String generateCreateSQL(AmberTable table)
          Generates the insert sql.
 void generateDumpRelationships(JavaWriter out, int updateIndex)
          Checks entity-relationships from an object.
 java.lang.String generateFullLoadSelect(java.lang.String id)
          Generates the select clause for a load.
 java.lang.String generateIdSelect(java.lang.String id)
          Generates the select clause for a load.
protected  void generateInsertColumns(AmberTable table, java.util.ArrayList<java.lang.String> columns)
           
 void generateInsertSet(JavaWriter out, AmberTable table, java.lang.String pstmt, java.lang.String query, java.lang.String obj)
          Generates the update sql.
 java.lang.String generateKeyLoadSelect(java.lang.String id)
          Generates the select clause for a load.
 int generateLoad(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index)
          Generates a string to load the field.
 void generateLoadFromObject(JavaWriter out, java.lang.String obj)
          Loads from an object.
 void generateLoadNative(JavaWriter out)
          Generates the load code for native fields
 java.lang.String generateLoadSelect(AmberTable table, java.lang.String id)
          Generates the select clause for a load.
 java.lang.String generateLoadSelect(java.lang.String id)
          Generates the select clause for a load.
 void generateLoadSelect(java.lang.StringBuilder sb, AmberTable table, java.lang.String id, int loadGroup)
          Generates the select clause for a load.
 void generateMergeFrom(JavaWriter out, java.lang.String dst, java.lang.String src)
          Copy from an object.
 void generateNativeColumnNames(java.util.ArrayList<java.lang.String> names)
          Generates the load code for native fields
 void generatePostDelete(JavaWriter out)
          Generates code after the remove.
 int generatePostLoadSelect(JavaWriter out, int index, int loadGroupIndex)
          Generates loading code after the basic fields.
 void generatePreDelete(JavaWriter out)
          Generates code after the remove.
 void generateSet(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String value)
          Generates a string to set the field.
 java.lang.String generateUpdateSQL(long mask)
          Generates the update sql.
 boolean generateUpdateSQLComponent(CharBuffer sql, int group, long mask, boolean isFirst)
          Generates the update sql.
 void generateUpdateSQLPrefix(CharBuffer sql)
          Generates the update sql.
 void generateUpdateSQLSuffix(CharBuffer sql)
          Generates the update sql.
 long getCacheTimeout()
          Returns the cache timeout.
 java.util.ArrayList<AmberColumn> getColumns()
          Returns the columns.
 ClassComponent getComponentGenerator()
          Gets a component generator.
 java.lang.String getComponentInterfaceName()
          Returns the component interface name.
 int getDefaultLoadGroupIndex()
          Returns the current load group.
 int getDirtyIndex()
          Returns the current dirty group.
 java.lang.String getDiscriminatorValue()
          Sets the discriminator value.
 java.util.HashSet<java.lang.String> getEagerFieldNames()
          Gets the EAGER field names.
 boolean getExcludeDefaultListeners()
          Gets the exclude default listeners flag.
 boolean getExcludeSuperclassListeners()
          Gets the exclude superclass listeners flag.
 AmberField getField(java.lang.String name)
          Returns the field with a given name.
 java.util.ArrayList<AmberField> getFields()
          returns the merged fields
 int getFlushPriority()
          Returns the flush priority.
 java.lang.String getForeignTypeName()
          Returns the java type.
 IdGenerator getGenerator(java.lang.String name)
          Sets the named generator.
 boolean getHasLoadCallback()
          True if the load lifecycle callback should be generated.
 AmberEntityHome getHome()
          Returns the home.
 Id getId()
          Returns the id.
 java.lang.Class getInstanceClass()
          Gets the instance class.
 java.util.ArrayList<ListenerType> getListeners()
          Gets the entity listeners.
 int getLoadGroupIndex()
          Returns the current load group.
 java.lang.Object getLoadObject(AmberConnection aConn, java.sql.ResultSet rs, int index)
          Gets the value.
 AmberField getMappedSuperclassField(java.lang.String name)
          Returns the mapped superclass field with a given name.
 java.util.ArrayList<AmberField> getMappedSuperclassFields()
          Returns the mapped superclass fields.
protected  java.util.ArrayList<AmberField> getMergedFields()
           
 int getMinDirtyIndex()
          Returns the min dirty group.
 java.lang.Object getObject(AmberConnection aConn, java.sql.ResultSet rs, int index)
          Gets the value.
 EntityType getParentType()
          Returns the parent type.
 java.lang.Class getProxyClass()
          Gets the proxy class.
 java.lang.String getRootTableName()
          Returns the root table name.
 EntityType getRootType()
          Returns the root type.
 AmberTable getSecondaryTable(java.lang.String name)
          Gets a secondary table.
 java.util.ArrayList<AmberTable> getSecondaryTables()
          Gets the secondary tables.
 EntityType getSubClass(java.lang.String discriminator)
          Gets a sub-class.
 AmberTable getTable()
          Returns the table.
 VersionField getVersionField()
          Returns the version field.
 boolean hasDependent()
          Returns true if and only if it has a many-to-one, one-to-one or embedded field/property.
 boolean hasLoadGroup(int loadGroupIndex)
          Returns true if there's a field with the matching load group.
 void init()
          Initialize the entity.
protected  void initId()
           
 boolean isAbstractClass()
          Returns true if the corresponding class is abstract.
 boolean isDirtyIndexOwnedByType(int i)
          Returns true if the load group is owned by this type (not a subtype).
 boolean isEJBProxy(java.lang.String typeName)
          XXX: temp hack.
 boolean isEntity()
          returns true for a loadable entity
 boolean isIdentityGenerator()
          Returns true for sequence generator
 boolean isJoinedSubClass()
          Set true for joined-subclass
 boolean isLoadGroupOwnedByType(int i)
          Returns true if the load group is owned by this type (not a subtype).
 boolean isReadOnly()
          Returns true if read-only
 boolean isSequenceGenerator()
          Returns true for sequence generator
 void nextDefaultLoadGroupIndex()
          Sets the next default loadGroupIndex
 int nextDirtyIndex()
          Returns the next dirty index
 long nextGeneratorId(AmberConnection aConn, java.lang.String name)
          Gets the named generator.
 int nextLoadGroupIndex()
          Returns the next load group.
 void postLoad(Entity entity)
          Callbacks after an entity is loaded
 void postPersist(Entity entity)
          Callbacks after an entity is persisted
 void postRemove(Entity entity)
          Callbacks after an entity is removeed
 void postUpdate(Entity entity)
          Callbacks after an entity is updated
 void prePersist(Entity entity)
          Callbacks before an entity is persisted
 void preRemove(Entity entity)
          Callbacks before an entity is removeed
 void preUpdate(Entity entity)
          Callbacks before an entity is updateed
 void setCacheTimeout(long timeout)
          Sets the cache timeout.
 void setDiscriminatorValue(java.lang.String value)
          Sets the discriminator value.
 void setExcludeDefaultListeners(boolean b)
          Sets the exclude default listeners flag.
 void setExcludeSuperclassListeners(boolean b)
          Sets the exclude superclass listeners flag.
 void setGenerator(java.lang.String name, IdGenerator gen)
          Sets the named generator.
 void setHasDependent(boolean hasDependent)
          Sets true if and only if it has a many-to-one, one-to-one or embedded field/property.
 void setHasLoadCallback(boolean hasCallback)
          True if the load lifecycle callback should be generated.
 void setId(Id id)
          Sets the id.
 void setJoinedSubClass(boolean isJoinedSubClass)
          Set true for joined-subclass
 void setParentType(EntityType parentType)
          Returns the parent type.
 void setProxyClass(java.lang.Class proxyClass)
          Gets the proxy class.
 void setReadOnly(boolean isReadOnly)
          Sets true if read-only
 void setRootTableName(java.lang.String rootTableName)
          Sets the root table name.
 void setTable(AmberTable table)
          Sets the table.
 void setVersionField(VersionField versionField)
          Sets the version field.
 void start()
          Start the entry.
 void update(Entity entity)
          Deletes by the primary key.
 int updateFlushPriority(java.util.ArrayList<EntityType> updatingEntities)
          Updates global (persistence unit) entity priorities for flushing.
 
Methods inherited from class com.caucho.amber.type.AmberBeanType
addCompletionField, addDependency, addDependency, containsCompletionField, generateCastFromObject, generateExpire, generateInvalidateForeign, generateLoad, generateLoadSelect, generatePrePersist, getCreateLoadMask, getDependencies, getDiscriminator, getField, getGetter, getGetter, getJavaTypeName, getSelfFields, getSetter, isEmbeddable, isFieldAccess, removeAllCompletionFields, setBeanClass, setDiscriminator, setFieldAccess, startConfigure
 
Methods inherited from class com.caucho.amber.type.AbstractEnhancedType
addCallback, addPostLoadCallback, addPostPersistCallback, addPostRemoveCallback, addPostUpdateCallback, addPrePersistCallback, addPreRemoveCallback, addPreUpdateCallback, addStubMethod, getBeanClass, getCallbacks, getClassName, getConfigException, getInstance, getInstanceClass, getInstanceClassName, getJavaBeanClass, getMethods, getName, getPersistenceUnit, getPostLoadCallbacks, getPostPersistCallbacks, getPostRemoveCallbacks, getPostUpdateCallbacks, getPrePersistCallbacks, getPreRemoveCallbacks, getPreUpdateCallbacks, isEnhanced, isGenerated, isIdClass, isInit, setConfigException, setEnhanced, setGenerated, setIdClass, setInstance, setInstanceClassLoader, setInstanceClassName, setName, toString
 
Methods inherited from class com.caucho.amber.type.AmberType
fromObject, generateCreateColumnSQL, generateEquals, generateIncrementVersion, generateIsNull, generateLoad, generateLoadForeign, generateLoadNative, generateNull, generateSetNull, generateSetVersion, getColumnCount, getForeignType, getObject, isAssignableTo, isAutoIncrement, isBoolean, isNumeric, setParameter, toObject, toObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_defaultLoadGroupIndex

protected int _defaultLoadGroupIndex

_loadGroupIndex

protected int _loadGroupIndex

_minDirtyIndex

protected int _minDirtyIndex

_dirtyIndex

protected int _dirtyIndex

_hasLoadCallback

protected boolean _hasLoadCallback
Constructor Detail

EntityType

public EntityType(AmberPersistenceUnit amberPersistenceUnit)
Method Detail

isEntity

public boolean isEntity()
returns true for a loadable entity

Overrides:
isEntity in class AmberBeanType

setTable

public void setTable(AmberTable table)
Sets the table.


getTable

public AmberTable getTable()
Returns the table.


getInstanceClass

public java.lang.Class getInstanceClass()
Gets the instance class.

Overrides:
getInstanceClass in class AbstractEnhancedType

getComponentInterfaceName

public java.lang.String getComponentInterfaceName()
Returns the component interface name.

Overrides:
getComponentInterfaceName in class AbstractEnhancedType

getComponentGenerator

public ClassComponent getComponentGenerator()
Gets a component generator.

Overrides:
getComponentGenerator in class AbstractEnhancedType

getFlushPriority

public int getFlushPriority()
Returns the flush priority.


addMappedSuperclassField

public void addMappedSuperclassField(AmberField field)
Adds a mapped superclass field.


getMappedSuperclassFields

public java.util.ArrayList<AmberField> getMappedSuperclassFields()
Returns the mapped superclass fields.


getMappedSuperclassField

public AmberField getMappedSuperclassField(java.lang.String name)
Returns the mapped superclass field with a given name.


getFields

public java.util.ArrayList<AmberField> getFields()
returns the merged fields

Overrides:
getFields in class AmberBeanType

getRootTableName

public java.lang.String getRootTableName()
Returns the root table name.


setRootTableName

public void setRootTableName(java.lang.String rootTableName)
Sets the root table name.


getVersionField

public VersionField getVersionField()
Returns the version field.


setVersionField

public void setVersionField(VersionField versionField)
Sets the version field.


addSecondaryTable

public void addSecondaryTable(AmberTable table)
Adds a secondary table.


getSecondaryTables

public java.util.ArrayList<AmberTable> getSecondaryTables()
Gets the secondary tables.


addListener

public void addListener(ListenerType listener)
Adds an entity listener.


getListeners

public java.util.ArrayList<ListenerType> getListeners()
Gets the entity listeners.


getSecondaryTable

public AmberTable getSecondaryTable(java.lang.String name)
Gets a secondary table.


hasDependent

public boolean hasDependent()
Returns true if and only if it has a many-to-one, one-to-one or embedded field/property.


setHasDependent

public void setHasDependent(boolean hasDependent)
Sets true if and only if it has a many-to-one, one-to-one or embedded field/property.


getForeignTypeName

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

Overrides:
getForeignTypeName in class AmberType

getProxyClass

public java.lang.Class getProxyClass()
Gets the proxy class.


setProxyClass

public void setProxyClass(java.lang.Class proxyClass)
Gets the proxy class.


isAbstractClass

public boolean isAbstractClass()
Returns true if the corresponding class is abstract.


setId

public void setId(Id id)
Sets the id.


getId

public Id getId()
Returns the id.


setJoinedSubClass

public void setJoinedSubClass(boolean isJoinedSubClass)
Set true for joined-subclass


isJoinedSubClass

public boolean isJoinedSubClass()
Set true for joined-subclass


getDiscriminatorValue

public java.lang.String getDiscriminatorValue()
Sets the discriminator value.


setDiscriminatorValue

public void setDiscriminatorValue(java.lang.String value)
Sets the discriminator value.


isReadOnly

public boolean isReadOnly()
Returns true if read-only


setReadOnly

public void setReadOnly(boolean isReadOnly)
Sets true if read-only


getCacheTimeout

public long getCacheTimeout()
Returns the cache timeout.


setCacheTimeout

public void setCacheTimeout(long timeout)
Sets the cache timeout.


addField

public void addField(AmberField field)
Adds a new field.

Overrides:
addField in class AmberBeanType

getEagerFieldNames

public java.util.HashSet<java.lang.String> getEagerFieldNames()
Gets the EAGER field names.


getField

public AmberField getField(java.lang.String name)
Returns the field with a given name.

Overrides:
getField in class AmberBeanType

getColumns

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


getExcludeDefaultListeners

public boolean getExcludeDefaultListeners()
Gets the exclude default listeners flag.


setExcludeDefaultListeners

public void setExcludeDefaultListeners(boolean b)
Sets the exclude default listeners flag.


getExcludeSuperclassListeners

public boolean getExcludeSuperclassListeners()
Gets the exclude superclass listeners flag.


setExcludeSuperclassListeners

public void setExcludeSuperclassListeners(boolean b)
Sets the exclude superclass listeners flag.


setHasLoadCallback

public void setHasLoadCallback(boolean hasCallback)
True if the load lifecycle callback should be generated.


getHasLoadCallback

public boolean getHasLoadCallback()
True if the load lifecycle callback should be generated.


getRootType

public EntityType getRootType()
Returns the root type.


getParentType

public EntityType getParentType()
Returns the parent type.


setParentType

public void setParentType(EntityType parentType)
Returns the parent type.


addSubClass

public void addSubClass(EntityType type)
Adds a sub-class.


getSubClass

public EntityType getSubClass(java.lang.String discriminator)
Gets a sub-class.


createBean

public Entity createBean()
Creates a new entity for this specific instance type.


getHome

public AmberEntityHome getHome()
Returns the home.


nextLoadGroupIndex

public int nextLoadGroupIndex()
Returns the next load group.


getLoadGroupIndex

public int getLoadGroupIndex()
Returns the current load group.


nextDefaultLoadGroupIndex

public void nextDefaultLoadGroupIndex()
Sets the next default loadGroupIndex


getDefaultLoadGroupIndex

public int getDefaultLoadGroupIndex()
Returns the current load group.


isLoadGroupOwnedByType

public boolean isLoadGroupOwnedByType(int i)
Returns true if the load group is owned by this type (not a subtype).


nextDirtyIndex

public int nextDirtyIndex()
Returns the next dirty index


getDirtyIndex

public int getDirtyIndex()
Returns the current dirty group.


getMinDirtyIndex

public int getMinDirtyIndex()
Returns the min dirty group.


isDirtyIndexOwnedByType

public boolean isDirtyIndexOwnedByType(int i)
Returns true if the load group is owned by this type (not a subtype).


init

public void init()
          throws ConfigException
Initialize the entity.

Overrides:
init in class AmberBeanType
Throws:
ConfigException

initId

protected void initId()

getMergedFields

protected java.util.ArrayList<AmberField> getMergedFields()

start

public void start()
           throws ConfigException
Start the entry.

Throws:
ConfigException

generateLoad

public int generateLoad(JavaWriter out,
                        java.lang.String rs,
                        java.lang.String indexVar,
                        int index)
                 throws java.io.IOException
Generates a string to load the field.

Overrides:
generateLoad in class AmberType
Throws:
java.io.IOException

hasLoadGroup

public boolean hasLoadGroup(int loadGroupIndex)
Returns true if there's a field with the matching load group.


generatePostLoadSelect

public int generatePostLoadSelect(JavaWriter out,
                                  int index,
                                  int loadGroupIndex)
                           throws java.io.IOException
Generates loading code after the basic fields.

Throws:
java.io.IOException

generateLoadNative

public void generateLoadNative(JavaWriter out)
                        throws java.io.IOException
Generates the load code for native fields

Throws:
java.io.IOException

generateNativeColumnNames

public void generateNativeColumnNames(java.util.ArrayList<java.lang.String> names)
                               throws java.io.IOException
Generates the load code for native fields

Throws:
java.io.IOException

generateSet

public void generateSet(JavaWriter out,
                        java.lang.String pstmt,
                        java.lang.String index,
                        java.lang.String value)
                 throws java.io.IOException
Generates a string to set the field.

Overrides:
generateSet in class AmberType
Throws:
java.io.IOException

getObject

public java.lang.Object getObject(AmberConnection aConn,
                                  java.sql.ResultSet rs,
                                  int index)
                           throws java.sql.SQLException
Gets the value.

Overrides:
getObject in class AmberType
Throws:
java.sql.SQLException

findItem

public EntityItem findItem(AmberConnection aConn,
                           java.sql.ResultSet rs,
                           int index)
                    throws java.sql.SQLException
Finds the object

Overrides:
findItem in class AmberType
Throws:
java.sql.SQLException

getLoadObject

public java.lang.Object getLoadObject(AmberConnection aConn,
                                      java.sql.ResultSet rs,
                                      int index)
                               throws java.sql.SQLException
Gets the value.

Throws:
java.sql.SQLException

isSequenceGenerator

public boolean isSequenceGenerator()
Returns true for sequence generator


isIdentityGenerator

public boolean isIdentityGenerator()
Returns true for sequence generator


setGenerator

public void setGenerator(java.lang.String name,
                         IdGenerator gen)
Sets the named generator.


getGenerator

public IdGenerator getGenerator(java.lang.String name)
Sets the named generator.


nextGeneratorId

public long nextGeneratorId(AmberConnection aConn,
                            java.lang.String name)
                     throws java.sql.SQLException
Gets the named generator.

Throws:
java.sql.SQLException

generateLoadFromObject

public void generateLoadFromObject(JavaWriter out,
                                   java.lang.String obj)
                            throws java.io.IOException
Loads from an object.

Throws:
java.io.IOException

generateCopyLoadObject

public void generateCopyLoadObject(JavaWriter out,
                                   java.lang.String dst,
                                   java.lang.String src,
                                   int loadGroup)
                            throws java.io.IOException
Copy from an object.

Throws:
java.io.IOException

generateMergeFrom

public void generateMergeFrom(JavaWriter out,
                              java.lang.String dst,
                              java.lang.String src)
                       throws java.io.IOException
Copy from an object.

Throws:
java.io.IOException

generateCopyUpdateObject

public void generateCopyUpdateObject(JavaWriter out,
                                     java.lang.String dst,
                                     java.lang.String src,
                                     int updateIndex)
                              throws java.io.IOException
Copy from an object.

Throws:
java.io.IOException

generateDumpRelationships

public void generateDumpRelationships(JavaWriter out,
                                      int updateIndex)
                               throws java.io.IOException
Checks entity-relationships from an object.

Throws:
java.io.IOException

generateKeyLoadSelect

public java.lang.String generateKeyLoadSelect(java.lang.String id)
Generates the select clause for a load.


generateFullLoadSelect

public java.lang.String generateFullLoadSelect(java.lang.String id)
Generates the select clause for a load.


generateLoadSelect

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


generateLoadSelect

public java.lang.String generateLoadSelect(AmberTable table,
                                           java.lang.String id)
Generates the select clause for a load.

Specified by:
generateLoadSelect in class AmberBeanType

generateLoadSelect

public void generateLoadSelect(java.lang.StringBuilder sb,
                               AmberTable table,
                               java.lang.String id,
                               int loadGroup)
Generates the select clause for a load.

Overrides:
generateLoadSelect in class AmberBeanType

generateAutoCreateSQL

public java.lang.String generateAutoCreateSQL(AmberTable table)
Generates the auto insert sql.


generateCreateSQL

public java.lang.String generateCreateSQL(AmberTable table)
Generates the insert sql.


generateInsertColumns

protected void generateInsertColumns(AmberTable table,
                                     java.util.ArrayList<java.lang.String> columns)

generateInsertSet

public void generateInsertSet(JavaWriter out,
                              AmberTable table,
                              java.lang.String pstmt,
                              java.lang.String query,
                              java.lang.String obj)
                       throws java.io.IOException
Generates the update sql.

Throws:
java.io.IOException

generateIdSelect

public java.lang.String generateIdSelect(java.lang.String id)
Generates the select clause for a load.


generateUpdateSQLPrefix

public void generateUpdateSQLPrefix(CharBuffer sql)
Generates the update sql.


generateUpdateSQLComponent

public boolean generateUpdateSQLComponent(CharBuffer sql,
                                          int group,
                                          long mask,
                                          boolean isFirst)
Generates the update sql.

Parameters:
sql - the partially built sql
group - the dirty group
mask - the group's mask
isFirst - marks the first set group

generateUpdateSQLSuffix

public void generateUpdateSQLSuffix(CharBuffer sql)
Generates the update sql.


generateUpdateSQL

public java.lang.String generateUpdateSQL(long mask)
Generates the update sql.


generatePreDelete

public void generatePreDelete(JavaWriter out)
                       throws java.io.IOException
Generates code after the remove.

Throws:
java.io.IOException

generatePostDelete

public void generatePostDelete(JavaWriter out)
                        throws java.io.IOException
Generates code after the remove.

Throws:
java.io.IOException

delete

public void delete(AmberConnection aConn,
                   java.lang.Object key)
            throws java.sql.SQLException
Deletes by the primary key.

Throws:
java.sql.SQLException

update

public void update(Entity entity)
            throws java.sql.SQLException
Deletes by the primary key.

Throws:
java.sql.SQLException

updateFlushPriority

public int updateFlushPriority(java.util.ArrayList<EntityType> updatingEntities)
Updates global (persistence unit) entity priorities for flushing.


createManyToOneCompletion

public AmberCompletion createManyToOneCompletion(java.lang.String name,
                                                 Entity source,
                                                 java.lang.Object newTarget)
Returns a completion for the given field.


isEJBProxy

public boolean isEJBProxy(java.lang.String typeName)
XXX: temp hack.


prePersist

public void prePersist(Entity entity)
Callbacks before an entity is persisted


postPersist

public void postPersist(Entity entity)
Callbacks after an entity is persisted


preUpdate

public void preUpdate(Entity entity)
Callbacks before an entity is updateed


postUpdate

public void postUpdate(Entity entity)
Callbacks after an entity is updated


preRemove

public void preRemove(Entity entity)
Callbacks before an entity is removeed


postRemove

public void postRemove(Entity entity)
Callbacks after an entity is removeed


postLoad

public void postLoad(Entity entity)
Callbacks after an entity is loaded