public class BasicDBListener extends java.lang.Object implements DBListener, DBConstants, PluginComponent
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_HASNOREADRIGHTS, HIBERNATE_MAPPING_MAJORVERSION, HIBERNATE_MAPPING_MDATE, HIBERNATE_MAPPING_MINORVERSION, HIBERNATE_MAPPING_PDATE, HIBERNATE_MAPPING_PSTATUS, HIBERNATE_MAPPING_READERCOUNT, HIBERNATE_MAPPING_ROLEMAPSTR, HIBERNATE_MAPPING_TITLE, HIBERNATE_MAPPING_TRACKED, HIBERNATE_MAPPING_UDATE, HIBERNATE_MAPPING_VOTECOUNT, HIBERNATE_MAPPING_VOTESCORE, HIBERNATE_MAPPING_WORKFLOW_ID, HIBERNATE_MAPPING_WORKSPACE_ID, MAX_HIBERNATE_MAPPING_PUBLICATION, MDATE_FIELD, PSTATUS_FIELD, ROW_ID_FIELD, SCROLL_FETCH_SIZE, WORKFLOW_ID_FIELD, WORKSPACE_ID_FIELD
Constructor and Description |
---|
BasicDBListener() |
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getAdateFromState(java.lang.Object[] state)
Returns the adate from the given hibernate state.
|
java.lang.String |
getAuthorIdFromState(java.lang.Object[] state)
Returns the authorId from the given hibernate state.
|
java.util.Date |
getCdateFromState(java.lang.Object[] state)
Returns the cdate from the given hibernate state.
|
java.util.Date |
getDateFromState(java.lang.Object[] state,
int index)
Returns the given date from the given hibernate state.
|
java.util.Date |
getEdateFromState(java.lang.Object[] state)
Returns the edate from the given hibernate state.
|
java.util.Date |
getMdateFromState(java.lang.Object[] state)
Returns the mdate from the given hibernate state.
|
java.util.Date |
getPdateFromState(java.lang.Object[] state)
Returns the pdate from the given hibernate state.
|
int |
getPrePstatus(org.hibernate.event.PostUpdateEvent event)
Returns the pstatus from the given PostUpdateEvent.
|
int |
getPrePstatus(org.hibernate.event.PreUpdateEvent event)
Returns the pstatus from the given PreUpdateEvent.
|
int |
getPstatusFromState(java.lang.Object[] state)
Returns the pstatus from the given hibernate state.
|
boolean |
hasNoChange(org.hibernate.event.PostUpdateEvent event) |
boolean |
hasNoChange(org.hibernate.event.PreUpdateEvent event) |
boolean |
init(Plugin plugin)
Initialize the component with the given plugin configuration
|
void |
onPostDelete(DBData data,
org.hibernate.event.PostDeleteEvent event,
boolean firstTime) |
void |
onPostInsert(DBData data,
org.hibernate.event.PostInsertEvent event,
boolean firstTime) |
void |
onPostUpdate(DBData data,
org.hibernate.event.PostUpdateEvent event,
boolean firstTime) |
void |
onPreUpdate(DBData data,
org.hibernate.event.PreUpdateEvent event) |
public static final java.lang.String REVISION
public boolean init(Plugin plugin)
PluginComponent
init
in interface PluginComponent
plugin
- the calling pluginPluginComponent.init(Plugin)
public void onPostInsert(DBData data, org.hibernate.event.PostInsertEvent event, boolean firstTime)
onPostInsert
in interface DBListener
DBListener.onPostInsert(DBData, PostInsertEvent, boolean)
public void onPreUpdate(DBData data, org.hibernate.event.PreUpdateEvent event)
onPreUpdate
in interface DBListener
DBListener.onPreUpdate(DBData, PreUpdateEvent)
public void onPostUpdate(DBData data, org.hibernate.event.PostUpdateEvent event, boolean firstTime)
onPostUpdate
in interface DBListener
DBListener.onPostUpdate(DBData, PostUpdateEvent, boolean)
public void onPostDelete(DBData data, org.hibernate.event.PostDeleteEvent event, boolean firstTime)
onPostDelete
in interface DBListener
DBListener.onPostDelete(DBData, PostDeleteEvent, boolean)
public boolean hasNoChange(org.hibernate.event.PreUpdateEvent event)
public boolean hasNoChange(org.hibernate.event.PostUpdateEvent event)
public java.util.Date getCdateFromState(java.lang.Object[] state)
state
- the statepublic java.util.Date getMdateFromState(java.lang.Object[] state)
state
- the statepublic java.lang.String getAuthorIdFromState(java.lang.Object[] state)
state
- the statepublic int getPstatusFromState(java.lang.Object[] state)
state
- the statepublic java.util.Date getPdateFromState(java.lang.Object[] state)
state
- the statepublic java.util.Date getEdateFromState(java.lang.Object[] state)
state
- the statepublic java.util.Date getAdateFromState(java.lang.Object[] state)
state
- the statepublic int getPrePstatus(org.hibernate.event.PreUpdateEvent event)
event
- the eventpublic int getPrePstatus(org.hibernate.event.PostUpdateEvent event)
event
- the eventpublic java.util.Date getDateFromState(java.lang.Object[] state, int index)
state
- the stateindex
- the index of the date field in the stateCopyright © 2001-2010 Jalios SA. All Rights Reserved.