pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.util.search
Class SitemapNodeInterceptor

java.lang.Object
  extended by org.hibernate.EmptyInterceptor
      extended by org.torweg.pulse.util.search.SitemapNodeInterceptor
All Implemented Interfaces:
java.io.Serializable, org.hibernate.Interceptor

public class SitemapNodeInterceptor
extends org.hibernate.EmptyInterceptor

intercepts the storing of SitemapNode to maintain the id of the Content referenced by the View as a field in the LuceneTM index.

This field is required for SitemapNodeUniqueContentFilter.

Version:
$Revision: 1510 $
Author:
Thomas Weber
See Also:
SitemapNodeUniqueContentFilter, Serialized Form

Field Summary
 
Fields inherited from class org.hibernate.EmptyInterceptor
INSTANCE
 
Constructor Summary
SitemapNodeInterceptor()
           
 
Method Summary
 boolean onFlushDirty(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] currentState, java.lang.Object[] previousState, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
          executed on save operations.
 boolean onSave(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
          executed on save operations.
 
Methods inherited from class org.hibernate.EmptyInterceptor
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, getEntity, getEntityName, instantiate, isTransient, onCollectionRecreate, onCollectionRemove, onCollectionUpdate, onDelete, onLoad, onPrepareStatement, postFlush, preFlush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SitemapNodeInterceptor

public SitemapNodeInterceptor()
Method Detail

onSave

public boolean onSave(java.lang.Object entity,
                      java.io.Serializable id,
                      java.lang.Object[] state,
                      java.lang.String[] propertyNames,
                      org.hibernate.type.Type[] types)
executed on save operations.

Specified by:
onSave in interface org.hibernate.Interceptor
Overrides:
onSave in class org.hibernate.EmptyInterceptor
Parameters:
entity - the entity to be saved
id - the primary key of the entity
propertyNames - the names of the properties
state - the values of the properties
types - the types of the properties
Returns:
true, if the user modified the currentState in any way
See Also:
EmptyInterceptor.onSave(java.lang.Object, java.io.Serializable, java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])

onFlushDirty

public boolean onFlushDirty(java.lang.Object entity,
                            java.io.Serializable id,
                            java.lang.Object[] currentState,
                            java.lang.Object[] previousState,
                            java.lang.String[] propertyNames,
                            org.hibernate.type.Type[] types)
executed on save operations.

Specified by:
onFlushDirty in interface org.hibernate.Interceptor
Overrides:
onFlushDirty in class org.hibernate.EmptyInterceptor
Parameters:
entity - the entity to be saved
id - the primary key of the entity
propertyNames - the names of the properties
previousState - the previous values of the properties
currentState - the current values of the properties
types - the types of the properties
Returns:
true, if the user modified the currentState in any way
See Also:
EmptyInterceptor.onFlushDirty(java.lang.Object, java.io.Serializable, java.lang.Object[], java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])