net.sf.jzeno.aop
Class OriginalValuesAspect

java.lang.Object
  extended by net.sf.jzeno.aop.AbstractAspect
      extended by net.sf.jzeno.aop.OriginalValuesAspect
All Implemented Interfaces:
Aspect

public class OriginalValuesAspect
extends AbstractAspect

This aspect stores the original values of the returning objects. This allows us to have modification detection on the object that live in the presentation layer, or are passed into a second business operation. We are not capable of detecting this in an abstract fashion on the AbstractEntity because we never know which collections get initialized. Key operations are AbstractEntity.snapshot(), AbstractEntity.isChanged(). An object is considered changed if any of it's persistent parts have been modified. A freshly loaded object also receives a snapshot, to allow change detection inside of business methods. An updated object is also snapshot, to allow change detection compared to the last update in the database.


Field Summary
 
Fields inherited from class net.sf.jzeno.aop.AbstractAspect
afterException, beforeException, his, nextAspect, primaryException
 
Constructor Summary
OriginalValuesAspect(Aspect nextAspect)
           
 
Method Summary
static void addLoadedEntity(Entity ae)
           
 void postProcess(java.lang.reflect.Method method, java.lang.Object[] arguments)
           
 void preProcess(java.lang.reflect.Method method, java.lang.Object[] arguments)
           
 
Methods inherited from class net.sf.jzeno.aop.AbstractAspect
getNextAspect, invoke, process, setNextAspect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OriginalValuesAspect

public OriginalValuesAspect(Aspect nextAspect)
Parameters:
nextAspect -
target -
Method Detail

preProcess

public void preProcess(java.lang.reflect.Method method,
                       java.lang.Object[] arguments)
                throws java.lang.Exception
Overrides:
preProcess in class AbstractAspect
Throws:
java.lang.Exception

postProcess

public void postProcess(java.lang.reflect.Method method,
                        java.lang.Object[] arguments)
                 throws java.lang.Exception
Overrides:
postProcess in class AbstractAspect
Throws:
java.lang.Exception
See Also:
AbstractAspect.postProcess(Method, Object[])

addLoadedEntity

public static void addLoadedEntity(Entity ae)
Parameters:
ae -