Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.test.interceptor
Class PropertyInterceptor  view PropertyInterceptor download PropertyInterceptor.java

java.lang.Object
  extended byorg.hibernate.EmptyInterceptor
      extended byorg.hibernate.test.interceptor.PropertyInterceptor
All Implemented Interfaces:
org.hibernate.Interceptor, java.io.Serializable

public class PropertyInterceptor
extends org.hibernate.EmptyInterceptor


Field Summary
 
Fields inherited from class org.hibernate.EmptyInterceptor
INSTANCE
 
Constructor Summary
PropertyInterceptor()
           
 
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)
          Called when an object is detected to be dirty, during a flush.
 boolean onSave(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
          Called before an object is saved.
 
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

PropertyInterceptor

public PropertyInterceptor()
Method Detail

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)
Description copied from interface: org.hibernate.Interceptor
Called when an object is detected to be dirty, during a flush. The interceptor may modify the detected currentState, which will be propagated to both the database and the persistent object. Note that not all flushes end in actual synchronization with the database, in which case the new currentState will be propagated to the object, but not necessarily (immediately) to the database. It is strongly recommended that the interceptor not modify the previousState.


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)
Description copied from interface: org.hibernate.Interceptor
Called before an object is saved. The interceptor may modify the state, which will be used for the SQL INSERT and propagated to the persistent object.