com.jalios.jcms.db
Class BasicDBListener

java.lang.Object
  extended by com.jalios.jcms.db.BasicDBListener
All Implemented Interfaces:
DBConstants, DBListener, PluginComponent
Direct Known Subclasses:
BasicDBListenerStoreListener, CacheDBListener, DBEventLogManager, ReaderTrackerManager, ReviewListener, StrongLockManager

public class BasicDBListener
extends Object
implements DBListener, DBConstants, PluginComponent

This class is an default implementation of DBListener.

Since:
jcms-6.0.0
Version:
$Revision: 24480 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
Fields inherited from interface com.jalios.jcms.db.DBConstants
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_WORKSPACE_ID, MDATE_FIELD, PSTATUS_FIELD, ROW_ID_FIELD, SCROLL_FETCH_SIZE, WORKSPACE_ID_FIELD
 
Constructor Summary
BasicDBListener()
           
 
Method Summary
 Date getAdateFromState(Object[] state)
          Returns the adate from the given hibernate state.
 String getAuthorIdFromState(Object[] state)
          Returns the authorId from the given hibernate state.
 Date getCdateFromState(Object[] state)
          Returns the cdate from the given hibernate state.
 Date getEdateFromState(Object[] state)
          Returns the edate from the given hibernate state.
 Date getMdateFromState(Object[] state)
          Returns the mdate from the given hibernate state.
 Date getPdateFromState(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(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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

BasicDBListener

public BasicDBListener()
Method Detail

init

public boolean init(Plugin plugin)
Description copied from interface: PluginComponent
Initialize the component with the given plugin configuration

Specified by:
init in interface PluginComponent
Parameters:
plugin - the calling plugin
Returns:
true if the component has been correctly initialized.
Since:
jcms-6.0.0
See Also:
PluginComponent.init(Plugin)

onPostInsert

public void onPostInsert(DBData data,
                         org.hibernate.event.PostInsertEvent event,
                         boolean firstTime)
Specified by:
onPostInsert in interface DBListener
Since:
jcms-6.0.0
See Also:
DBListener.onPostInsert(DBData, PostInsertEvent, boolean)

onPreUpdate

public void onPreUpdate(DBData data,
                        org.hibernate.event.PreUpdateEvent event)
Specified by:
onPreUpdate in interface DBListener
Since:
jcms-6.0.0
See Also:
DBListener.onPreUpdate(DBData, PreUpdateEvent)

onPostUpdate

public void onPostUpdate(DBData data,
                         org.hibernate.event.PostUpdateEvent event,
                         boolean firstTime)
Specified by:
onPostUpdate in interface DBListener
Since:
jcms-6.0.0
See Also:
DBListener.onPostUpdate(DBData, PostUpdateEvent, boolean)

onPostDelete

public void onPostDelete(DBData data,
                         org.hibernate.event.PostDeleteEvent event,
                         boolean firstTime)
Specified by:
onPostDelete in interface DBListener
Since:
jcms-6.0.0
See Also:
DBListener.onPostDelete(DBData, PostDeleteEvent, boolean)

hasNoChange

public boolean hasNoChange(org.hibernate.event.PreUpdateEvent event)

hasNoChange

public boolean hasNoChange(org.hibernate.event.PostUpdateEvent event)

getCdateFromState

public Date getCdateFromState(Object[] state)
Returns the cdate from the given hibernate state.

Parameters:
state - the state
Returns:
the cdate from the given hibernate state.
Since:
jcms-6.0.0

getMdateFromState

public Date getMdateFromState(Object[] state)
Returns the mdate from the given hibernate state.

Parameters:
state - the state
Returns:
the mdate from the given hibernate state.
Since:
jcms-6.0.0

getAuthorIdFromState

public String getAuthorIdFromState(Object[] state)
Returns the authorId from the given hibernate state.

Parameters:
state - the state
Returns:
the authorId from the given hibernate state.
Since:
jcms-6.0.0

getPstatusFromState

public int getPstatusFromState(Object[] state)
Returns the pstatus from the given hibernate state.

Parameters:
state - the state
Returns:
the pstatus from the given hibernate state.
Since:
jcms-6.0.0

getPdateFromState

public Date getPdateFromState(Object[] state)
Returns the pdate from the given hibernate state.

Parameters:
state - the state
Returns:
the pdate from the given hibernate state.
Since:
jcms-6.0.0

getEdateFromState

public Date getEdateFromState(Object[] state)
Returns the edate from the given hibernate state.

Parameters:
state - the state
Returns:
the edate from the given hibernate state.
Since:
jcms-6.0.0

getAdateFromState

public Date getAdateFromState(Object[] state)
Returns the adate from the given hibernate state.

Parameters:
state - the state
Returns:
the adate from the given hibernate state.
Since:
jcms-6.0.0

getPrePstatus

public int getPrePstatus(org.hibernate.event.PreUpdateEvent event)
Returns the pstatus from the given PreUpdateEvent.

Parameters:
event - the event
Returns:
the pstatus from the given PreUpdateEvent.
Since:
jcms-6.0.0

getPrePstatus

public int getPrePstatus(org.hibernate.event.PostUpdateEvent event)
Returns the pstatus from the given PostUpdateEvent.

Parameters:
event - the event
Returns:
the pstatus from the given PostUpdateEvent.
Since:
jcms-6.0.0


Copyright © 2001-2010 Jalios SA. All Rights Reserved.