public class MetadataEntityListener extends DescriptorEventAdapter
| Modifier and Type | Field and Description |
|---|---|
static String |
POST_BUILD |
static String |
POST_CLONE |
static String |
POST_DELETE |
static String |
POST_INSERT |
static String |
POST_REFRESH |
static String |
POST_UPDATE |
static String |
PRE_PERSIST |
static String |
PRE_REMOVE |
static String |
PRE_UPDATE_WITH_CHANGES |
| Modifier | Constructor and Description |
|---|---|
protected |
MetadataEntityListener()
INTERNAL:
The default constructor should not be used.
|
protected |
MetadataEntityListener(Class entityClass)
INTERNAL:
|
|
MetadataEntityListener(Class listenerClass,
Class entityClass)
INTERNAL:
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEventMethod(String event,
Method method)
INTERNAL:
|
Class |
getEntityClass()
INTERNAL:
|
protected Method |
getEventMethod(int eventCode)
INTERNAL:
|
protected Method |
getEventMethod(String event)
INTERNAL:
|
protected String |
getEventMethodName(String eventName)
INTERNAL:
|
Class |
getListenerClass()
INTERNAL:
|
Hashtable |
getMethods()
INTERNAL:
|
String |
getPostBuildMethodName()
INTERNAL:
|
String |
getPostCloneMethodName()
INTERNAL:
|
String |
getPostDeleteMethodName()
INTERNAL:
|
String |
getPostInsertMethodName()
INTERNAL:
|
String |
getPostRefreshMethodName()
INTERNAL:
|
String |
getPostUpdateMethodName()
INTERNAL:
|
String |
getPrePersistMethodName()
INTERNAL:
|
String |
getPreRemoveMethodName()
INTERNAL:
|
String |
getPreUpdateWithChangesMethodName()
INTERNAL:
|
boolean |
hasCallbackMethods()
INTERNAL:
|
boolean |
hasOverriddenEventMethod(Method eventMethod,
int eventCode)
INTERNAL:
|
protected boolean |
hasOverriddenEventMethod(Method eventMethod1,
Method eventMethod2)
INTERNAL:
|
boolean |
hasOverriddenEventMethod(Method eventMethod,
String eventCode)
INTERNAL:
|
void |
initializeCallbackMethods(ClassLoader classLoader)
INTERNAL:
Sub-classes should implement where necessary.
|
protected void |
invokeMethod(Method method,
Object onObject,
Object[] objectList,
DescriptorEvent event)
INTERNAL:
|
protected void |
invokeMethod(String event,
DescriptorEvent descriptorEvent)
INTERNAL:
|
boolean |
isEntityClassListener()
INTERNAL:
|
boolean |
isOverriddenEvent(DescriptorEvent event,
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(String event,
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(Class entityClass)
INTERNAL:
|
void |
setListener(Object listener)
INTERNAL:
|
void |
setPostBuildMethod(Method method)
INTERNAL:
|
void |
setPostCloneMethod(Method method)
INTERNAL:
|
void |
setPostDeleteMethod(Method method)
INTERNAL:
|
void |
setPostInsertMethod(Method method)
INTERNAL:
|
void |
setPostRefreshMethod(Method method)
INTERNAL:
|
void |
setPostUpdateMethod(Method method)
INTERNAL:
|
void |
setPrePersistMethod(Method method)
INTERNAL:
|
void |
setPreRemoveMethod(Method method)
INTERNAL:
|
void |
setPreUpdateWithChangesMethod(Method method)
INTERNAL:
|
protected void |
validateMethod(Method method)
INTERNAL:
|
protected void |
validateMethodModifiers(Method method)
INTERNAL:
|
aboutToDelete, aboutToInsert, aboutToUpdate, postMerge, postWrite, preDelete, preInsert, preUpdate, preWritepublic static final String POST_BUILD
public static final String POST_CLONE
public static final String POST_DELETE
public static final String POST_INSERT
public static final String POST_REFRESH
public static final String POST_UPDATE
public static final String PRE_PERSIST
public static final String PRE_REMOVE
public static final String PRE_UPDATE_WITH_CHANGES
protected MetadataEntityListener()
protected MetadataEntityListener(Class entityClass)
public Class getEntityClass()
protected Method getEventMethod(int eventCode)
public Class getListenerClass()
public Hashtable getMethods()
public String getPostBuildMethodName()
public String getPostCloneMethodName()
public String getPostDeleteMethodName()
public String getPostInsertMethodName()
public String getPostRefreshMethodName()
public String getPostUpdateMethodName()
public String getPrePersistMethodName()
public String getPreRemoveMethodName()
public String getPreUpdateWithChangesMethodName()
public boolean hasCallbackMethods()
public boolean hasOverriddenEventMethod(Method eventMethod, int eventCode)
protected boolean hasOverriddenEventMethod(Method eventMethod1, Method eventMethod2)
public boolean hasOverriddenEventMethod(Method eventMethod, String eventCode)
public void initializeCallbackMethods(ClassLoader classLoader)
protected void invokeMethod(Method method, Object onObject, Object[] objectList, DescriptorEvent event)
protected void invokeMethod(String event, DescriptorEvent descriptorEvent)
public boolean isEntityClassListener()
public boolean isOverriddenEvent(DescriptorEvent event, Vector eventManagers)
isOverriddenEvent in interface DescriptorEventListenerisOverriddenEvent in class DescriptorEventAdapterprotected boolean isSessionPostBuildEvent(DescriptorEvent event)
protected boolean noCallbackMethodAlreadySetFor(String event, 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(Class entityClass)
public void setListener(Object listener)
public void setPostBuildMethod(Method method)
public void setPostCloneMethod(Method method)
public void setPostDeleteMethod(Method method)
public void setPostInsertMethod(Method method)
public void setPostRefreshMethod(Method method)
public void setPostUpdateMethod(Method method)
public void setPrePersistMethod(Method method)
public void setPreRemoveMethod(Method method)
public void setPreUpdateWithChangesMethod(Method method)
protected void validateMethod(Method method)
protected void validateMethodModifiers(Method method)
Copyright © 2023. All rights reserved.