org.objectweb.jac.aspects.persistence
Class MapWrapper

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.MapWrapper
All Implemented Interfaces:
Advice, ConstructorInterceptor, Interceptor, MethodInterceptor, Serializable

public class MapWrapper
extends CollectionWrapper

A wrapper for the Map 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
MapWrapper(AspectComponent ac, Object substance, CollectionItem collection, boolean isLoaded)
           
 
Method Summary
 Object clear(Interaction interaction)
          Remove all instances from the collection
 Object containsKey(Interaction interaction)
           
 Object containsValue(Interaction interaction)
           
protected  void doLoad(Wrappee wrappee)
          Really load the whole collection.
 Object get(Interaction interaction)
           
protected  long getCollectionSize(OID oid)
           
 Object invoke(MethodInvocation invocation)
           
 Object iterator(Interaction interaction)
           
 Object put(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

MapWrapper

public MapWrapper(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

containsKey

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

containsValue

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

put

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

get

public Object get(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