public class EntityListener 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 |
| Constructor and Description |
|---|
EntityListener(Class listenerClass,
Class entityClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventMethod(String event,
Method method)
INTERNAL:
You can have multiple event methods for the same event, however, only
one event method per class is permitted.
|
Hashtable<String,List<Method>> |
getAllEventMethods()
INTERNAL:
|
Class |
getEntityClass()
INTERNAL:
|
Object |
getListener(AbstractSession session) |
Class |
getListenerClass()
INTERNAL:
|
AbstractSession |
getOwningSession()
INTERNAL:
|
boolean |
hasCallbackMethods()
INTERNAL:
|
boolean |
isOverriddenEvent(DescriptorEvent event,
Vector eventManagers)
INTERNAL:
Return true if listener has a lifecycle callback method that is
overridden in a subclass.
|
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 |
setAllEventMethods(Hashtable<String,List<Method>> methods)
INTERNAL:
|
void |
setOwningSession(AbstractSession owningSession)
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:
|
String |
toString()
INTERNAL:
Used in the debugger.
|
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
public void addEventMethod(String event, Method method)
public Class getEntityClass()
public void setOwningSession(AbstractSession owningSession)
public Object getListener(AbstractSession session)
public Class getListenerClass()
public AbstractSession getOwningSession()
public boolean hasCallbackMethods()
public boolean isOverriddenEvent(DescriptorEvent event, Vector eventManagers)
isOverriddenEvent in interface DescriptorEventListenerisOverriddenEvent in class DescriptorEventAdapterpublic 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 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)
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference