org.olat.core.commons.persistence
Class AuditInterceptor

java.lang.Object
  extended by org.hibernate.EmptyInterceptor
      extended by org.olat.core.commons.persistence.AuditInterceptor
All Implemented Interfaces:
java.io.Serializable, org.hibernate.Interceptor

public class AuditInterceptor
extends org.hibernate.EmptyInterceptor
implements org.hibernate.Interceptor, java.io.Serializable

Author:
Andreas Ch. Kapp
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hibernate.EmptyInterceptor
INSTANCE
 
Constructor Summary
AuditInterceptor()
           
 
Method Summary
 int[] findDirty(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)
           
 java.lang.Object instantiate(java.lang.String arg0, org.hibernate.EntityMode arg1, java.io.Serializable arg2)
           
 java.lang.Boolean isUnsaved(java.lang.Object entity)
           
 void onDelete(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
           
 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 onLoad(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, 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)
           
 void postFlush(java.util.Iterator entities)
           
 void preFlush(java.util.Iterator entities)
           
 
Methods inherited from class org.hibernate.EmptyInterceptor
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, getEntity, getEntityName, isTransient, onCollectionRecreate, onCollectionRemove, onCollectionUpdate, onPrepareStatement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.Interceptor
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, getEntity, getEntityName, isTransient, onCollectionRecreate, onCollectionRemove, onCollectionUpdate, onPrepareStatement
 

Constructor Detail

AuditInterceptor

public AuditInterceptor()
Method Detail

instantiate

public java.lang.Object instantiate(java.lang.String arg0,
                                    org.hibernate.EntityMode arg1,
                                    java.io.Serializable arg2)
                             throws org.hibernate.CallbackException
Specified by:
instantiate in interface org.hibernate.Interceptor
Overrides:
instantiate in class org.hibernate.EmptyInterceptor
Throws:
org.hibernate.CallbackException

onDelete

public void onDelete(java.lang.Object entity,
                     java.io.Serializable id,
                     java.lang.Object[] state,
                     java.lang.String[] propertyNames,
                     org.hibernate.type.Type[] types)
Specified by:
onDelete in interface org.hibernate.Interceptor
Overrides:
onDelete in class org.hibernate.EmptyInterceptor
See Also:
Interceptor.onDelete(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)
Specified by:
onFlushDirty in interface org.hibernate.Interceptor
Overrides:
onFlushDirty in class org.hibernate.EmptyInterceptor
See Also:
Interceptor.onFlushDirty(java.lang.Object, java.io.Serializable, java.lang.Object[], java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])

onLoad

public boolean onLoad(java.lang.Object entity,
                      java.io.Serializable id,
                      java.lang.Object[] state,
                      java.lang.String[] propertyNames,
                      org.hibernate.type.Type[] types)
Specified by:
onLoad in interface org.hibernate.Interceptor
Overrides:
onLoad in class org.hibernate.EmptyInterceptor
See Also:
Interceptor.onLoad(java.lang.Object, java.io.Serializable, java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])

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
See Also:
Interceptor.onSave(java.lang.Object, java.io.Serializable, java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])

findDirty

public int[] findDirty(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:
findDirty in interface org.hibernate.Interceptor
Overrides:
findDirty in class org.hibernate.EmptyInterceptor
See Also:
Interceptor.findDirty(java.lang.Object, java.io.Serializable, java.lang.Object[], java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])

postFlush

public void postFlush(java.util.Iterator entities)
Specified by:
postFlush in interface org.hibernate.Interceptor
Overrides:
postFlush in class org.hibernate.EmptyInterceptor
See Also:
Interceptor.postFlush(java.util.Iterator)

preFlush

public void preFlush(java.util.Iterator entities)
Specified by:
preFlush in interface org.hibernate.Interceptor
Overrides:
preFlush in class org.hibernate.EmptyInterceptor
See Also:
Interceptor.preFlush(java.util.Iterator)

isUnsaved

public java.lang.Boolean isUnsaved(java.lang.Object entity)
See Also:
org.hibernate.Interceptor#isUnsaved(java.lang.Object)