org.apache.openjpa.kernel
Class Audited

java.lang.Object
  extended by org.apache.openjpa.kernel.Audited

public final class Audited
extends Object

Carries immutable information about an audited persistent instance.

Author:
Pinaki Poddar

Constructor Summary
Audited(StateManagerImpl sm, PersistenceCapable o)
          Supply a state manager and a transient copy.
 
Method Summary
 Object getManagedObject()
          Gets the current state of the persistent instance.
 Object getOriginalObject()
          Gets the original state of the persistent instance as a transient instance.
 AuditableOperation getType()
          Gets the type of this audit.
 String[] getUpdatedFields()
          Gets the name of the updated fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Audited

Audited(StateManagerImpl sm,
        PersistenceCapable o)
Supply a state manager and a transient copy.

Parameters:
sm - a state manager, must not be null.
o - the transient copy
Method Detail

getManagedObject

public Object getManagedObject()
Gets the current state of the persistent instance.


getOriginalObject

public Object getOriginalObject()
Gets the original state of the persistent instance as a transient instance.


getUpdatedFields

public String[] getUpdatedFields()
Gets the name of the updated fields.

Returns:
persistent property names that are modified. For deleted instances the array is empty and for newly created instances the array contains all the fields.

getType

public AuditableOperation getType()
Gets the type of this audit.



Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.