public class EntityListener 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 |
Constructor and Description |
---|
EntityListener(java.lang.Class listenerClass,
java.lang.Class entityClass) |
Modifier and Type | Method and Description |
---|---|
void |
addEventMethod(java.lang.String event,
java.lang.reflect.Method method)
INTERNAL:
You can have multiple event methods for the same event, however, only
one event method per class is permitted.
|
java.util.Hashtable<java.lang.String,java.util.List<java.lang.reflect.Method>> |
getAllEventMethods()
INTERNAL:
|
java.lang.Class |
getEntityClass()
INTERNAL:
|
java.lang.Object |
getListener(AbstractSession session) |
java.lang.Class |
getListenerClass()
INTERNAL:
|
AbstractSession |
getOwningSession()
INTERNAL:
|
boolean |
hasCallbackMethods()
INTERNAL:
|
boolean |
isOverriddenEvent(DescriptorEvent event,
java.util.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(java.util.Hashtable<java.lang.String,java.util.List<java.lang.reflect.Method>> methods)
INTERNAL:
|
void |
setOwningSession(AbstractSession owningSession)
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:
|
java.lang.String |
toString()
INTERNAL:
Used in the debugger.
|
aboutToDelete, aboutToInsert, aboutToUpdate, postMerge, postWrite, preDelete, preInsert, preUpdate, preWrite
public 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
public EntityListener(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()
public java.util.Hashtable<java.lang.String,java.util.List<java.lang.reflect.Method>> getAllEventMethods()
public void setAllEventMethods(java.util.Hashtable<java.lang.String,java.util.List<java.lang.reflect.Method>> methods)
public void setOwningSession(AbstractSession owningSession)
public java.lang.Object getListener(AbstractSession session)
public java.lang.Class getListenerClass()
public AbstractSession getOwningSession()
public boolean hasCallbackMethods()
public boolean isOverriddenEvent(DescriptorEvent event, java.util.Vector eventManagers)
isOverriddenEvent
in interface DescriptorEventListener
isOverriddenEvent
in class DescriptorEventAdapter
public void postBuild(DescriptorEvent event)
postBuild
in interface DescriptorEventListener
postBuild
in class DescriptorEventAdapter
public void postClone(DescriptorEvent event)
postClone
in interface DescriptorEventListener
postClone
in class DescriptorEventAdapter
public void postDelete(DescriptorEvent event)
postDelete
in interface DescriptorEventListener
postDelete
in class DescriptorEventAdapter
public void postInsert(DescriptorEvent event)
postInsert
in interface DescriptorEventListener
postInsert
in class DescriptorEventAdapter
public void postRefresh(DescriptorEvent event)
postRefresh
in interface DescriptorEventListener
postRefresh
in class DescriptorEventAdapter
public void postUpdate(DescriptorEvent event)
postUpdate
in interface DescriptorEventListener
postUpdate
in class DescriptorEventAdapter
public void prePersist(DescriptorEvent event)
prePersist
in interface DescriptorEventListener
prePersist
in class DescriptorEventAdapter
public void preRemove(DescriptorEvent event)
preRemove
in interface DescriptorEventListener
preRemove
in class DescriptorEventAdapter
public void preUpdateWithChanges(DescriptorEvent event)
preUpdateWithChanges
in interface DescriptorEventListener
preUpdateWithChanges
in class DescriptorEventAdapter
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)
public java.lang.String toString()
toString
in class java.lang.Object
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference