|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.EmptyInterceptor edu.nrao.sss.dao.UpdateInterceptor
public class UpdateInterceptor
UpdateInterceptor intercepts the onSave
and
onFlushDirty
events in order to automatically set the fields
of the UserAccountable interface.
Interceptor
,
UserAccountable
,
Serialized FormField Summary |
---|
Fields inherited from class org.hibernate.EmptyInterceptor |
---|
INSTANCE |
Constructor Summary | |
---|---|
UpdateInterceptor(Long userId)
Creates an UpdateInterceptor that changes the fields of the UserAccountable interface using userId. |
Method Summary | |
---|---|
boolean |
onFlushDirty(Object entity,
Serializable id,
Object[] currentState,
Object[] previousState,
String[] propertyNames,
org.hibernate.type.Type[] types)
This method updates the LastUpdatedOn and LastUpdatedBy fields of UserAccountable entities. |
boolean |
onSave(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
org.hibernate.type.Type[] types)
This method updates the CreatedOn and CreatedBy fields of UserAccountable entities, as well as their LastUpdatedOn and LastUpdatedBy fields. |
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 |
---|
public UpdateInterceptor(Long userId)
IllegalArgumentException
- if userId is null or <= 0.UserAccountable
Method Detail |
---|
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, org.hibernate.type.Type[] types)
onSave
in interface org.hibernate.Interceptor
onSave
in class org.hibernate.EmptyInterceptor
public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, org.hibernate.type.Type[] types)
onFlushDirty
in interface org.hibernate.Interceptor
onFlushDirty
in class org.hibernate.EmptyInterceptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |