net.incongru.berkano.user.hibernate
Class UpdateDateInterceptor
java.lang.Object
org.hibernate.EmptyInterceptor
net.incongru.berkano.user.hibernate.UpdateDateInterceptor
- All Implemented Interfaces:
- java.io.Serializable, org.hibernate.Interceptor
public class UpdateDateInterceptor
- extends org.hibernate.EmptyInterceptor
Maintains the creationDate and updateDate fields of UserImpl
TODO : this might be better as an EventListener? Not sure there's a real difference in "betterness",
but the interfaces of listeners are simpler/cleaner.
- Version:
- $Revision: $
- Author:
- gjoseph, $Author: $ (last edit)
- See Also:
- Serialized Form
| Fields inherited from class org.hibernate.EmptyInterceptor |
INSTANCE |
|
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)
|
boolean |
onSave(java.lang.Object entity,
java.io.Serializable id,
java.lang.Object[] state,
java.lang.String[] propertyNames,
org.hibernate.type.Type[] types)
|
| 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 |
UpdateDateInterceptor
public UpdateDateInterceptor()
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)
- Specified by:
onSave in interface org.hibernate.Interceptor- Overrides:
onSave in class org.hibernate.EmptyInterceptor
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)
- Specified by:
onFlushDirty in interface org.hibernate.Interceptor- Overrides:
onFlushDirty in class org.hibernate.EmptyInterceptor
Copyright © 2004-2007. All Rights Reserved.