au.edu.archer.services.icat.impl
Class AuditInfoImpl

java.lang.Object
  extended by au.edu.archer.services.icat.impl.AuditInfoImpl
All Implemented Interfaces:
java.io.Serializable, org.hibernate.event.PreInsertEventListener, org.hibernate.event.PreUpdateEventListener

public class AuditInfoImpl
extends java.lang.Object
implements org.hibernate.event.PreInsertEventListener, org.hibernate.event.PreUpdateEventListener

This class replace the AuditInfo base class which is responsible for updating the MOD_TIME and CREATE_TIME on all elements.

Author:
nigel
See Also:
Serialized Form

Constructor Summary
AuditInfoImpl()
           
 
Method Summary
 boolean onPreInsert(org.hibernate.event.PreInsertEvent event)
          When an item is inserted we want to set the create and modify time.
 boolean onPreUpdate(org.hibernate.event.PreUpdateEvent event)
          When an item is updated we want to set the modify time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditInfoImpl

public AuditInfoImpl()
Method Detail

onPreInsert

public boolean onPreInsert(org.hibernate.event.PreInsertEvent event)
When an item is inserted we want to set the create and modify time. Returns false to allow transaction

Specified by:
onPreInsert in interface org.hibernate.event.PreInsertEventListener

onPreUpdate

public boolean onPreUpdate(org.hibernate.event.PreUpdateEvent event)
When an item is updated we want to set the modify time. Returns false to allow transaction

Specified by:
onPreUpdate in interface org.hibernate.event.PreUpdateEventListener


Copyright © 2008 ARCHER - James Cook University. All Rights Reserved.