public class JcmsHibernateEventListener extends java.lang.Object implements org.hibernate.event.PreUpdateEventListener, org.hibernate.event.PostInsertEventListener, org.hibernate.event.PostUpdateEventListener, org.hibernate.event.PostDeleteEventListener, DBConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
ALL_CATEGORIES_SET_FIELD, AUTH_GRP_SET_FIELD, AUTH_MBR_SET_FIELD, AUTHOR_ID_FIELD, CATEGORIES_SET_FIELD, CDATE_FIELD, CHANNEL_JCMSDB_PROP, DBDATA_URID, HAS_NO_READ_RIGHTS, HIBERNATE_MAPPING_ADATE, HIBERNATE_MAPPING_AUTHOR, HIBERNATE_MAPPING_CDATE, HIBERNATE_MAPPING_EDATE, HIBERNATE_MAPPING_MDATE, HIBERNATE_MAPPING_PDATE, HIBERNATE_MAPPING_PSTATUS, HIBERNATE_MAPPING_TITLE, HIBERNATE_MAPPING_WORKFLOW_ID, HIBERNATE_MAPPING_WORKSPACE_ID, MDATE_FIELD, PSTATUS_FIELD, ROW_ID_FIELD, SCROLL_FETCH_SIZE, WORKFLOW_ID_FIELD, WORKSPACE_ID_FIELD
Modifier and Type | Method and Description |
---|---|
void |
addListener(DBListener listener)
Adds a DBListener for all the classes.
|
void |
addListener(DBListener listener,
java.lang.Class clazz)
Adds a DBListener for the given class.
|
java.util.Map<java.lang.Class,java.util.Set<DBListener>> |
getDBListenerClassMap()
Returns an unmodifiable view of the Map of class / listener.
|
java.util.Set<DBListener> |
getDBListenerSet()
Returns an unmodifiable view of the listener set.
|
static JcmsHibernateEventListener |
getInstance()
Returns the singleton.
|
boolean |
isClassListen(java.lang.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,
java.lang.Class clazz)
Removes a DBListener for the given class.
|
public static final java.lang.String REVISION
public static JcmsHibernateEventListener getInstance()
public void addListener(DBListener listener)
listener
- the listenerpublic void addListener(DBListener listener, java.lang.Class clazz)
listener
- the listenerclazz
- the classpublic void removeListener(DBListener listener)
listener
- the listenerpublic void removeListener(DBListener listener, java.lang.Class clazz)
listener
- the listenerclazz
- the classpublic java.util.Set<DBListener> getDBListenerSet()
public java.util.Map<java.lang.Class,java.util.Set<DBListener>> getDBListenerClassMap()
public boolean isClassListen(java.lang.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)
Copyright © 2001-2010 Jalios SA. All Rights Reserved.