|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.EmptyInterceptor
com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
gov.nih.nci.caarray.util.CaArrayAuditLogInterceptor
public class CaArrayAuditLogInterceptor
Interceptor that adds audit log records for audits. The username that identifies
the actor of the change request is determined with UsernameHolder
.
Don't forget to define a sequence "AUDIT_ID_SEQ", if your database supports it.
This class was copied and modified from AuditLogInterceptor in nci-commons v1.2.24.
This should be removed and integrated back into nci-commons when caArray updates to the newest version.
Tracked in JIRA ticket ARRAY-2496.
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
SEQUENCE_NAME
Name of the database sequence defined for audit transaction id. |
Fields inherited from class org.hibernate.EmptyInterceptor |
---|
INSTANCE |
Constructor Summary | |
---|---|
CaArrayAuditLogInterceptor()
default ctor. |
|
CaArrayAuditLogInterceptor(com.fiveamsolutions.nci.commons.util.HibernateHelper helper)
|
Method Summary | |
---|---|
void |
afterTransactionCompletion(org.hibernate.Transaction arg0)
|
com.fiveamsolutions.nci.commons.util.HibernateHelper |
getHibernateHelper()
|
com.fiveamsolutions.nci.commons.audit.DefaultProcessor |
getProcessor()
|
void |
onCollectionUpdate(java.lang.Object collection,
java.io.Serializable key)
|
void |
onDelete(java.lang.Object obj,
java.io.Serializable id,
java.lang.Object[] newValues,
java.lang.String[] properties,
org.hibernate.type.Type[] types)
|
boolean |
onFlushDirty(java.lang.Object obj,
java.io.Serializable id,
java.lang.Object[] newValues,
java.lang.Object[] oldValues,
java.lang.String[] properties,
org.hibernate.type.Type[] types)
|
boolean |
onSave(java.lang.Object obj,
java.io.Serializable id,
java.lang.Object[] newValues,
java.lang.String[] properties,
org.hibernate.type.Type[] types)
|
void |
postFlush(java.util.Iterator arg0)
|
void |
setHibernateHelper(com.fiveamsolutions.nci.commons.util.HibernateHelper hibernateHelper)
|
void |
setProcessor(com.fiveamsolutions.nci.commons.audit.DefaultProcessor processor)
|
Methods inherited from class org.hibernate.EmptyInterceptor |
---|
afterTransactionBegin, beforeTransactionCompletion, findDirty, getEntity, getEntityName, instantiate, isTransient, onCollectionRecreate, onCollectionRemove, onLoad, onPrepareStatement, preFlush |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SEQUENCE_NAME
Constructor Detail |
---|
public CaArrayAuditLogInterceptor(com.fiveamsolutions.nci.commons.util.HibernateHelper helper)
helper
- the helper used for persistence operations.public CaArrayAuditLogInterceptor()
Method Detail |
---|
public com.fiveamsolutions.nci.commons.util.HibernateHelper getHibernateHelper()
getHibernateHelper
in class com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
public void setHibernateHelper(com.fiveamsolutions.nci.commons.util.HibernateHelper hibernateHelper)
setHibernateHelper
in class com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
hibernateHelper
- the helper to use for persistence operations.public void setProcessor(com.fiveamsolutions.nci.commons.audit.DefaultProcessor processor)
setProcessor
in class com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
processor
- replace the default selector.public com.fiveamsolutions.nci.commons.audit.DefaultProcessor getProcessor()
getProcessor
in class com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
public boolean onFlushDirty(java.lang.Object obj, java.io.Serializable id, java.lang.Object[] newValues, java.lang.Object[] oldValues, java.lang.String[] properties, org.hibernate.type.Type[] types)
onFlushDirty
in interface org.hibernate.Interceptor
onFlushDirty
in class com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
public boolean onSave(java.lang.Object obj, java.io.Serializable id, java.lang.Object[] newValues, java.lang.String[] properties, org.hibernate.type.Type[] types)
onSave
in interface org.hibernate.Interceptor
onSave
in class com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
public void onDelete(java.lang.Object obj, java.io.Serializable id, java.lang.Object[] newValues, java.lang.String[] properties, org.hibernate.type.Type[] types)
onDelete
in interface org.hibernate.Interceptor
onDelete
in class com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
public void onCollectionUpdate(java.lang.Object collection, java.io.Serializable key)
onCollectionUpdate
in interface org.hibernate.Interceptor
onCollectionUpdate
in class com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
public void postFlush(java.util.Iterator arg0)
postFlush
in interface org.hibernate.Interceptor
postFlush
in class com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
public void afterTransactionCompletion(org.hibernate.Transaction arg0)
afterTransactionCompletion
in interface org.hibernate.Interceptor
afterTransactionCompletion
in class com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |