public class MetadataEntityListener extends DescriptorEventAdapter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
POST_BUILD |
static java.lang.String |
POST_CLONE |
static java.lang.String |
POST_DELETE |
static java.lang.String |
POST_INSERT |
static java.lang.String |
POST_REFRESH |
static java.lang.String |
POST_UPDATE |
static java.lang.String |
PRE_PERSIST |
static java.lang.String |
PRE_REMOVE |
static java.lang.String |
PRE_UPDATE_WITH_CHANGES |
| Modifier | Constructor and Description |
|---|---|
protected |
MetadataEntityListener()
INTERNAL:
The default constructor should not be used.
|
protected |
MetadataEntityListener(java.lang.Class entityClass)
INTERNAL:
|
|
MetadataEntityListener(java.lang.Class listenerClass,
java.lang.Class entityClass)
INTERNAL:
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEventMethod(java.lang.String event,
java.lang.reflect.Method method)
INTERNAL:
|
java.lang.Class |
getEntityClass()
INTERNAL:
|
protected java.lang.reflect.Method |
getEventMethod(int eventCode)
INTERNAL:
|
protected java.lang.reflect.Method |
getEventMethod(java.lang.String event)
INTERNAL:
|
protected java.lang.String |
getEventMethodName(java.lang.String eventName)
INTERNAL:
|
java.lang.Class |
getListenerClass()
INTERNAL:
|
java.util.Hashtable |
getMethods()
INTERNAL:
|
java.lang.String |
getPostBuildMethodName()
INTERNAL:
|
java.lang.String |
getPostCloneMethodName()
INTERNAL:
|
java.lang.String |
getPostDeleteMethodName()
INTERNAL:
|
java.lang.String |
getPostInsertMethodName()
INTERNAL:
|
java.lang.String |
getPostRefreshMethodName()
INTERNAL:
|
java.lang.String |
getPostUpdateMethodName()
INTERNAL:
|
java.lang.String |
getPrePersistMethodName()
INTERNAL:
|
java.lang.String |
getPreRemoveMethodName()
INTERNAL:
|
java.lang.String |
getPreUpdateWithChangesMethodName()
INTERNAL:
|
boolean |
hasCallbackMethods()
INTERNAL:
|
boolean |
hasOverriddenEventMethod(java.lang.reflect.Method eventMethod,
int eventCode)
INTERNAL:
|
protected boolean |
hasOverriddenEventMethod(java.lang.reflect.Method eventMethod1,
java.lang.reflect.Method eventMethod2)
INTERNAL:
|
boolean |
hasOverriddenEventMethod(java.lang.reflect.Method eventMethod,
java.lang.String eventCode)
INTERNAL:
|
void |
initializeCallbackMethods(java.lang.ClassLoader classLoader)
INTERNAL:
Sub-classes should implement where necessary.
|
protected void |
invokeMethod(java.lang.reflect.Method method,
java.lang.Object onObject,
java.lang.Object[] objectList,
DescriptorEvent event)
INTERNAL:
|
protected void |
invokeMethod(java.lang.String event,
DescriptorEvent descriptorEvent)
INTERNAL:
|
boolean |
isEntityClassListener()
INTERNAL:
|
boolean |
isOverriddenEvent(DescriptorEvent event,
java.util.Vector eventManagers)
INTERNAL:
Return true is listener has a lifecycle callback method that is
overridden in a subclass.
|
protected boolean |
isSessionPostBuildEvent(DescriptorEvent event)
INTERNAL:
|
protected boolean |
noCallbackMethodAlreadySetFor(java.lang.String event,
java.lang.reflect.Method method)
INTERNAL:
Checks if the user already set this call back method via XML.
|
void |
postBuild(DescriptorEvent event)
INTERNAL:
|
void |
postClone(DescriptorEvent event)
INTERNAL:
|
void |
postDelete(DescriptorEvent event)
INTERNAL:
|
void |
postInsert(DescriptorEvent event)
INTERNAL:
|
void |
postRefresh(DescriptorEvent event)
INTERNAL:
|
void |
postUpdate(DescriptorEvent event)
INTERNAL:
|
void |
prePersist(DescriptorEvent event)
INTERNAL:
|
void |
preRemove(DescriptorEvent event)
INTERNAL:
|
void |
preUpdateWithChanges(DescriptorEvent event)
INTERNAL:
|
void |
setEntityClass(java.lang.Class entityClass)
INTERNAL:
|
void |
setListener(java.lang.Object listener)
INTERNAL:
|
void |
setPostBuildMethod(java.lang.reflect.Method method)
INTERNAL:
|
void |
setPostCloneMethod(java.lang.reflect.Method method)
INTERNAL:
|
void |
setPostDeleteMethod(java.lang.reflect.Method method)
INTERNAL:
|
void |
setPostInsertMethod(java.lang.reflect.Method method)
INTERNAL:
|
void |
setPostRefreshMethod(java.lang.reflect.Method method)
INTERNAL:
|
void |
setPostUpdateMethod(java.lang.reflect.Method method)
INTERNAL:
|
void |
setPrePersistMethod(java.lang.reflect.Method method)
INTERNAL:
|
void |
setPreRemoveMethod(java.lang.reflect.Method method)
INTERNAL:
|
void |
setPreUpdateWithChangesMethod(java.lang.reflect.Method method)
INTERNAL:
|
protected void |
validateMethod(java.lang.reflect.Method method)
INTERNAL:
|
protected void |
validateMethodModifiers(java.lang.reflect.Method method)
INTERNAL:
|
aboutToDelete, aboutToInsert, aboutToUpdate, postMerge, postWrite, preDelete, preInsert, preUpdate, preWritepublic static final java.lang.String POST_BUILD
public static final java.lang.String POST_CLONE
public static final java.lang.String POST_DELETE
public static final java.lang.String POST_INSERT
public static final java.lang.String POST_REFRESH
public static final java.lang.String POST_UPDATE
public static final java.lang.String PRE_PERSIST
public static final java.lang.String PRE_REMOVE
public static final java.lang.String PRE_UPDATE_WITH_CHANGES
protected MetadataEntityListener()
protected MetadataEntityListener(java.lang.Class entityClass)
public MetadataEntityListener(java.lang.Class listenerClass,
java.lang.Class entityClass)
public void addEventMethod(java.lang.String event,
java.lang.reflect.Method method)
public java.lang.Class getEntityClass()
protected java.lang.reflect.Method getEventMethod(int eventCode)
protected java.lang.reflect.Method getEventMethod(java.lang.String event)
protected java.lang.String getEventMethodName(java.lang.String eventName)
public java.lang.Class getListenerClass()
public java.util.Hashtable getMethods()
public java.lang.String getPostBuildMethodName()
public java.lang.String getPostCloneMethodName()
public java.lang.String getPostDeleteMethodName()
public java.lang.String getPostInsertMethodName()
public java.lang.String getPostRefreshMethodName()
public java.lang.String getPostUpdateMethodName()
public java.lang.String getPrePersistMethodName()
public java.lang.String getPreRemoveMethodName()
public java.lang.String getPreUpdateWithChangesMethodName()
public boolean hasCallbackMethods()
public boolean hasOverriddenEventMethod(java.lang.reflect.Method eventMethod,
int eventCode)
protected boolean hasOverriddenEventMethod(java.lang.reflect.Method eventMethod1,
java.lang.reflect.Method eventMethod2)
public boolean hasOverriddenEventMethod(java.lang.reflect.Method eventMethod,
java.lang.String eventCode)
public void initializeCallbackMethods(java.lang.ClassLoader classLoader)
protected void invokeMethod(java.lang.reflect.Method method,
java.lang.Object onObject,
java.lang.Object[] objectList,
DescriptorEvent event)
protected void invokeMethod(java.lang.String event,
DescriptorEvent descriptorEvent)
public boolean isEntityClassListener()
public boolean isOverriddenEvent(DescriptorEvent event, java.util.Vector eventManagers)
isOverriddenEvent in interface DescriptorEventListenerisOverriddenEvent in class DescriptorEventAdapterprotected boolean isSessionPostBuildEvent(DescriptorEvent event)
protected boolean noCallbackMethodAlreadySetFor(java.lang.String event,
java.lang.reflect.Method method)
public void postBuild(DescriptorEvent event)
postBuild in interface DescriptorEventListenerpostBuild in class DescriptorEventAdapterpublic void postClone(DescriptorEvent event)
postClone in interface DescriptorEventListenerpostClone in class DescriptorEventAdapterpublic void postDelete(DescriptorEvent event)
postDelete in interface DescriptorEventListenerpostDelete in class DescriptorEventAdapterpublic void postInsert(DescriptorEvent event)
postInsert in interface DescriptorEventListenerpostInsert in class DescriptorEventAdapterpublic void postRefresh(DescriptorEvent event)
postRefresh in interface DescriptorEventListenerpostRefresh in class DescriptorEventAdapterpublic void postUpdate(DescriptorEvent event)
postUpdate in interface DescriptorEventListenerpostUpdate in class DescriptorEventAdapterpublic void prePersist(DescriptorEvent event)
prePersist in interface DescriptorEventListenerprePersist in class DescriptorEventAdapterpublic void preRemove(DescriptorEvent event)
preRemove in interface DescriptorEventListenerpreRemove in class DescriptorEventAdapterpublic void preUpdateWithChanges(DescriptorEvent event)
preUpdateWithChanges in interface DescriptorEventListenerpreUpdateWithChanges in class DescriptorEventAdapterpublic void setEntityClass(java.lang.Class entityClass)
public void setListener(java.lang.Object listener)
public void setPostBuildMethod(java.lang.reflect.Method method)
public void setPostCloneMethod(java.lang.reflect.Method method)
public void setPostDeleteMethod(java.lang.reflect.Method method)
public void setPostInsertMethod(java.lang.reflect.Method method)
public void setPostRefreshMethod(java.lang.reflect.Method method)
public void setPostUpdateMethod(java.lang.reflect.Method method)
public void setPrePersistMethod(java.lang.reflect.Method method)
public void setPreRemoveMethod(java.lang.reflect.Method method)
public void setPreUpdateWithChangesMethod(java.lang.reflect.Method method)
protected void validateMethod(java.lang.reflect.Method method)
protected void validateMethodModifiers(java.lang.reflect.Method method)