org.objectweb.jac.aspects.integrity
Class PrimaryKeyWrapper

java.lang.Object
  extended byorg.objectweb.jac.core.Wrapper
      extended byorg.objectweb.jac.aspects.integrity.PrimaryKeyWrapper
All Implemented Interfaces:
Advice, ConstructorInterceptor, Interceptor, MethodInterceptor, Serializable

public class PrimaryKeyWrapper
extends Wrapper

This wrapper provides a key scheme to limit fields doubles.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jac.core.Wrapper
ac, cr
 
Constructor Summary
PrimaryKeyWrapper(AspectComponent ac)
           
 
Method Summary
 Object checkDoubles(Interaction interaction)
          This wrapping method checks if the added Object's fields match with an Object in the added collection, and throws an exception if there is one.
 Object construct(ConstructorInvocation invocation)
           
 Object invoke(MethodInvocation invocation)
           
 
Methods inherited from class org.objectweb.jac.core.Wrapper
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrimaryKeyWrapper

public PrimaryKeyWrapper(AspectComponent ac)
Method Detail

checkDoubles

public Object checkDoubles(Interaction interaction)
                    throws Exception
This wrapping method checks if the added Object's fields match with an Object in the added collection, and throws an exception if there is one.

Throws:
Exception

invoke

public Object invoke(MethodInvocation invocation)
              throws Throwable
Specified by:
invoke in interface MethodInterceptor
Overrides:
invoke in class Wrapper
Throws:
Throwable

construct

public Object construct(ConstructorInvocation invocation)
                 throws Throwable
Specified by:
construct in interface ConstructorInterceptor
Overrides:
construct in class Wrapper
Throws:
Throwable