org.objectweb.jac.aspects.persistence
Class SetWrapper

java.lang.Object
  extended byorg.objectweb.jac.core.Wrapper
      extended byorg.objectweb.jac.aspects.persistence.AbstractPersistenceWrapper
          extended byorg.objectweb.jac.aspects.persistence.CollectionWrapper
              extended byorg.objectweb.jac.aspects.persistence.SetWrapper
All Implemented Interfaces:
Advice, ConstructorInterceptor, Interceptor, MethodInterceptor, Serializable

public class SetWrapper
extends CollectionWrapper

A wrapper for the Set interface.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.objectweb.jac.aspects.persistence.AbstractPersistenceWrapper
AbstractPersistenceWrapper.InvalidOidException
 
Field Summary
 
Fields inherited from class org.objectweb.jac.aspects.persistence.AbstractPersistenceWrapper
ATTR_ADDED
 
Fields inherited from class org.objectweb.jac.core.Wrapper
ac, cr
 
Constructor Summary
SetWrapper(AspectComponent ac, Object substance, CollectionItem collection, boolean isLoaded)
           
 
Method Summary
 boolean add(Interaction interaction)
           
 Object clear(Interaction interaction)
          Remove all instances from the collection
 Object contains(Interaction interaction)
           
protected  void doLoad(Wrappee wrappee)
          Really load the whole collection.
protected  long getCollectionSize(OID oid)
           
 Object invoke(MethodInvocation invocation)
           
 Object iterator(Interaction interaction)
           
 Object remove(Interaction interaction)
           
 
Methods inherited from class org.objectweb.jac.aspects.persistence.CollectionWrapper
convert, getUseDate, isCache, isEmpty, isLoaded, load, preload, setCache, size, touch, unload
 
Methods inherited from class org.objectweb.jac.aspects.persistence.AbstractPersistenceWrapper
checkOid, getAC, getOID, getStorage, isPersistent, normalizeInput, normalizeOutput
 
Methods inherited from class org.objectweb.jac.core.Wrapper
attr, attrdef, construct, 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

SetWrapper

public SetWrapper(AspectComponent ac,
                  Object substance,
                  CollectionItem collection,
                  boolean isLoaded)
Method Detail

doLoad

protected void doLoad(Wrappee wrappee)
               throws Exception
Description copied from class: CollectionWrapper
Really load the whole collection. This is an abstract method must be overriden by subclasses.

Specified by:
doLoad in class CollectionWrapper
Throws:
Exception

contains

public Object contains(Interaction interaction)
                throws Exception
Throws:
Exception

add

public boolean add(Interaction interaction)
            throws Exception
Throws:
Exception

remove

public Object remove(Interaction interaction)
              throws Exception
Throws:
Exception

clear

public Object clear(Interaction interaction)
             throws Exception
Remove all instances from the collection

Specified by:
clear in class CollectionWrapper
Throws:
Exception

getCollectionSize

protected long getCollectionSize(OID oid)
                          throws Exception
Specified by:
getCollectionSize in class CollectionWrapper
Throws:
Exception

iterator

public Object iterator(Interaction interaction)
Specified by:
iterator in class CollectionWrapper

invoke

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