com.caucho.amber.type
Class AbstractEnhancedType

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

public abstract class AbstractEnhancedType
extends AmberType

Represents an abstract enhanced type. Known subclasses: EntityType and ListenerType.


Constructor Summary
AbstractEnhancedType(AmberPersistenceUnit amberPersistenceUnit)
           
 
Method Summary
 void addCallback(int callbackIndex, java.lang.reflect.Method callback)
          Adds a callback.
 void addPostLoadCallback(java.lang.reflect.Method callback)
          Adds a @PostLoad callback.
 void addPostPersistCallback(java.lang.reflect.Method callback)
          Adds a post-persist callback.
 void addPostRemoveCallback(java.lang.reflect.Method callback)
          Adds a post-remove callback.
 void addPostUpdateCallback(java.lang.reflect.Method callback)
          Adds a post-update callback.
 void addPrePersistCallback(java.lang.reflect.Method callback)
          Adds a pre-persist callback.
 void addPreRemoveCallback(java.lang.reflect.Method callback)
          Adds a pre-remove callback.
 void addPreUpdateCallback(java.lang.reflect.Method callback)
          Adds a pre-update callback.
 void addStubMethod(StubMethod method)
          Adds a stub method
 java.lang.Class getBeanClass()
          Gets the bean class.
 java.util.ArrayList<java.lang.reflect.Method> getCallbacks(int callbackIndex)
          Gets the callbacks.
 java.lang.String getClassName()
          Returns the class name.
 ClassComponent getComponentGenerator()
          Gets a component generator.
 java.lang.String getComponentInterfaceName()
          Returns the component interface name.
 java.lang.Throwable getConfigException()
           
 java.lang.Object getInstance()
          Gets the instance.
 java.lang.Class getInstanceClass()
          Gets the instance class.
protected  java.lang.Class getInstanceClass(java.lang.Class validationInterface)
          Gets the instance class.
 java.lang.String getInstanceClassName()
          Gets the instance class name.
 java.lang.Class getJavaBeanClass()
          Returns the java bean class
 java.util.ArrayList<StubMethod> getMethods()
          Returns the methods
 java.lang.String getName()
          Gets the name.
 AmberPersistenceUnit getPersistenceUnit()
          Returns the persistence unit.
 java.util.ArrayList<java.lang.reflect.Method> getPostLoadCallbacks()
          Gets the post-load callback.
 java.util.ArrayList<java.lang.reflect.Method> getPostPersistCallbacks()
          Gets the post-persist callback.
 java.util.ArrayList<java.lang.reflect.Method> getPostRemoveCallbacks()
          Gets the post-remove callback.
 java.util.ArrayList<java.lang.reflect.Method> getPostUpdateCallbacks()
          Gets the post-update callback.
 java.util.ArrayList<java.lang.reflect.Method> getPrePersistCallbacks()
          Gets the pre-persist callback.
 java.util.ArrayList<java.lang.reflect.Method> getPreRemoveCallbacks()
          Gets the pre-remove callback.
 java.util.ArrayList<java.lang.reflect.Method> getPreUpdateCallbacks()
          Gets the pre-update callback.
 boolean isEnhanced()
          Returns true if the class is enhanced.
 boolean isGenerated()
          Returns true if generated.
 boolean isIdClass()
          Returns true if the class is a key class.
 boolean isInit()
           
 void setBeanClass(java.lang.Class beanClass)
          Sets the bean class.
 void setConfigException(java.lang.Throwable e)
           
 void setEnhanced(boolean isEnhanced)
          Sets true if the class is enhanced.
 void setGenerated(boolean isGenerated)
          Set true if generated.
 void setIdClass(boolean isIdClass)
          Sets true if the class is a key class, i.e., some entity is annotated with @IdClass(this.class)
 void setInstance(java.lang.Object instance)
          Sets the instance.
 void setInstanceClassLoader(java.lang.ClassLoader loader)
          Sets the instance class loader
 void setInstanceClassName(java.lang.String className)
          Sets the instance class name.
 void setName(java.lang.String name)
          Sets the name.
 java.lang.String toString()
          Printable version of the listener.
 
Methods inherited from class com.caucho.amber.type.AmberType
findItem, fromObject, generateCastFromObject, generateCreateColumnSQL, generateEquals, generateIncrementVersion, generateIsNull, generateLoad, generateLoad, generateLoadForeign, generateLoadNative, generateNull, generateSet, generateSetNull, generateSetVersion, getColumnCount, getForeignType, getForeignTypeName, getJavaTypeName, getObject, getObject, init, isAssignableTo, isAutoIncrement, isBoolean, isNumeric, setParameter, toObject, toObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractEnhancedType

public AbstractEnhancedType(AmberPersistenceUnit amberPersistenceUnit)
Method Detail

getPersistenceUnit

public AmberPersistenceUnit getPersistenceUnit()
Returns the persistence unit.


getConfigException

public java.lang.Throwable getConfigException()

setConfigException

public void setConfigException(java.lang.Throwable e)

setBeanClass

public void setBeanClass(java.lang.Class beanClass)
Sets the bean class.


getBeanClass

public java.lang.Class getBeanClass()
Gets the bean class.


getClassName

public java.lang.String getClassName()
Returns the class name.


getJavaBeanClass

public java.lang.Class getJavaBeanClass()
Returns the java bean class


getComponentInterfaceName

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


getComponentGenerator

public ClassComponent getComponentGenerator()
Gets a component generator.


setName

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


getName

public java.lang.String getName()
Gets the name.

Specified by:
getName in class AmberType

setInstance

public void setInstance(java.lang.Object instance)
Sets the instance.


getInstance

public java.lang.Object getInstance()
Gets the instance.


setInstanceClassLoader

public void setInstanceClassLoader(java.lang.ClassLoader loader)
Sets the instance class loader


isInit

public boolean isInit()

getInstanceClass

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


getInstanceClass

protected java.lang.Class getInstanceClass(java.lang.Class validationInterface)
Gets the instance class.


setInstanceClassName

public void setInstanceClassName(java.lang.String className)
Sets the instance class name.


getInstanceClassName

public java.lang.String getInstanceClassName()
Gets the instance class name.


setEnhanced

public void setEnhanced(boolean isEnhanced)
Sets true if the class is enhanced.


isEnhanced

public boolean isEnhanced()
Returns true if the class is enhanced.


setIdClass

public void setIdClass(boolean isIdClass)
Sets true if the class is a key class, i.e., some entity is annotated with @IdClass(this.class)


isIdClass

public boolean isIdClass()
Returns true if the class is a key class.


isGenerated

public boolean isGenerated()
Returns true if generated.


setGenerated

public void setGenerated(boolean isGenerated)
Set true if generated.


addStubMethod

public void addStubMethod(StubMethod method)
Adds a stub method


getMethods

public java.util.ArrayList<StubMethod> getMethods()
Returns the methods


addPostLoadCallback

public void addPostLoadCallback(java.lang.reflect.Method callback)
Adds a @PostLoad callback.


getPostLoadCallbacks

public java.util.ArrayList<java.lang.reflect.Method> getPostLoadCallbacks()
Gets the post-load callback.


addPrePersistCallback

public void addPrePersistCallback(java.lang.reflect.Method callback)
Adds a pre-persist callback.


getPrePersistCallbacks

public java.util.ArrayList<java.lang.reflect.Method> getPrePersistCallbacks()
Gets the pre-persist callback.


addPostPersistCallback

public void addPostPersistCallback(java.lang.reflect.Method callback)
Adds a post-persist callback.


getPostPersistCallbacks

public java.util.ArrayList<java.lang.reflect.Method> getPostPersistCallbacks()
Gets the post-persist callback.


addPreUpdateCallback

public void addPreUpdateCallback(java.lang.reflect.Method callback)
Adds a pre-update callback.


getPreUpdateCallbacks

public java.util.ArrayList<java.lang.reflect.Method> getPreUpdateCallbacks()
Gets the pre-update callback.


addPostUpdateCallback

public void addPostUpdateCallback(java.lang.reflect.Method callback)
Adds a post-update callback.


getPostUpdateCallbacks

public java.util.ArrayList<java.lang.reflect.Method> getPostUpdateCallbacks()
Gets the post-update callback.


addPreRemoveCallback

public void addPreRemoveCallback(java.lang.reflect.Method callback)
Adds a pre-remove callback.


getPreRemoveCallbacks

public java.util.ArrayList<java.lang.reflect.Method> getPreRemoveCallbacks()
Gets the pre-remove callback.


addPostRemoveCallback

public void addPostRemoveCallback(java.lang.reflect.Method callback)
Adds a post-remove callback.


getPostRemoveCallbacks

public java.util.ArrayList<java.lang.reflect.Method> getPostRemoveCallbacks()
Gets the post-remove callback.


getCallbacks

public java.util.ArrayList<java.lang.reflect.Method> getCallbacks(int callbackIndex)
Gets the callbacks.


addCallback

public void addCallback(int callbackIndex,
                        java.lang.reflect.Method callback)
Adds a callback.


toString

public java.lang.String toString()
Printable version of the listener.

Overrides:
toString in class java.lang.Object