|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.db.JcmsHibernateEventListener
public class JcmsHibernateEventListener
This class is a singleton that dispatches Hibernate events to JCMS DBListeners
Field Summary | |
---|---|
static String |
REVISION
|
Method Summary | |
---|---|
void |
addListener(DBListener listener)
Adds a DBListener for all the classes. |
void |
addListener(DBListener listener,
Class clazz)
Adds a DBListener for the given class. |
Map<Class,Set<DBListener>> |
getDBListenerClassMap()
Returns an unmodifiable view of the Map of class / listener. |
Set<DBListener> |
getDBListenerSet()
Returns an unmodifiable view of the listener set. |
static JcmsHibernateEventListener |
getInstance()
Returns the singleton. |
boolean |
isClassListen(Class clazz)
Returns true if the given class is explicitly listen by a DBListener. |
void |
onPostDelete(org.hibernate.event.PostDeleteEvent event)
|
void |
onPostDelete(org.hibernate.event.PostDeleteEvent event,
boolean firstTime)
|
void |
onPostInsert(org.hibernate.event.PostInsertEvent event)
|
void |
onPostInsert(org.hibernate.event.PostInsertEvent event,
boolean firstTime)
|
void |
onPostUpdate(org.hibernate.event.PostUpdateEvent event)
|
void |
onPostUpdate(org.hibernate.event.PostUpdateEvent event,
boolean firstTime)
|
boolean |
onPreUpdate(org.hibernate.event.PreUpdateEvent event)
|
boolean |
onPreUpdateInternal(org.hibernate.event.PreUpdateEvent event)
|
void |
removeListener(DBListener listener)
Removes a DBListener for all the classes. |
void |
removeListener(DBListener listener,
Class clazz)
Removes a DBListener for the given class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
Method Detail |
---|
public static JcmsHibernateEventListener getInstance()
public void addListener(DBListener listener)
listener
- the listenerpublic void addListener(DBListener listener, Class clazz)
listener
- the listenerclazz
- the classpublic void removeListener(DBListener listener)
listener
- the listenerpublic void removeListener(DBListener listener, Class clazz)
listener
- the listenerclazz
- the classpublic Set<DBListener> getDBListenerSet()
public Map<Class,Set<DBListener>> getDBListenerClassMap()
public boolean isClassListen(Class clazz)
clazz
- the class.
public void onPostInsert(org.hibernate.event.PostInsertEvent event)
onPostInsert
in interface org.hibernate.event.PostInsertEventListener
public void onPostInsert(org.hibernate.event.PostInsertEvent event, boolean firstTime)
public boolean onPreUpdate(org.hibernate.event.PreUpdateEvent event)
onPreUpdate
in interface org.hibernate.event.PreUpdateEventListener
public boolean onPreUpdateInternal(org.hibernate.event.PreUpdateEvent event)
public void onPostUpdate(org.hibernate.event.PostUpdateEvent event)
onPostUpdate
in interface org.hibernate.event.PostUpdateEventListener
public void onPostUpdate(org.hibernate.event.PostUpdateEvent event, boolean firstTime)
public void onPostDelete(org.hibernate.event.PostDeleteEvent event)
onPostDelete
in interface org.hibernate.event.PostDeleteEventListener
public void onPostDelete(org.hibernate.event.PostDeleteEvent event, boolean firstTime)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |