JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.persistence
Class CollectionWrapper

java.lang.Object
  |
  +--org.objectweb.jac.core.Wrapper
        |
        +--org.objectweb.jac.aspects.persistence.PersistenceWrapper
              |
              +--org.objectweb.jac.aspects.persistence.CollectionWrapper
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ListWrapper, MapWrapper, SetWrapper

public abstract class CollectionWrapper
extends PersistenceWrapper

Base class for collection wrappers

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.objectweb.jac.aspects.persistence.PersistenceWrapper
PersistenceWrapper.InvalidOidException
 
Field Summary
 
Fields inherited from class org.objectweb.jac.aspects.persistence.PersistenceWrapper
ATTR_ADDED
 
Fields inherited from class org.objectweb.jac.core.Wrapper
ac
 
Constructor Summary
CollectionWrapper(AspectComponent ac, boolean isLoaded)
           
 
Method Summary
abstract  Object clear(Interaction interaction)
          Remove all instances from the collection
protected abstract  void doLoad(Wrappee wrappee)
          Really load the whole collection.
protected abstract  long getCollectionSize(OID oid)
           
 Date getUseDate(Wrappee wrappee)
           
 Object isEmpty(Interaction interaction)
           
 boolean isLoaded()
           
abstract  Object iterator(Interaction interaction)
           
 void load(Wrappee wrappee)
          Load the whole collection if it is not already loaded
 Object memorizeUseDate(Interaction i)
           
 Object preload(Interaction interaction)
           
 Object size(Interaction interaction)
           
 void unload(Wrappee wrappee)
          Unload the collection.
 
Methods inherited from class org.objectweb.jac.aspects.persistence.PersistenceWrapper
addToCollection, applyPersistence, checkOid, getAC, getCollection, getOID, getReference, getStorage, handleStatic, initAllFields, initCollections, isPersistent, loadAllFields, makePersistent, normalizeInput, normalizeOutput, removeFromCollection, setField, setReference, updateCollection, wrapCollections
 
Methods inherited from class org.objectweb.jac.core.Wrapper
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, setAspectComponent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionWrapper

public CollectionWrapper(AspectComponent ac,
                         boolean isLoaded)
Method Detail

load

public void load(Wrappee wrappee)
          throws Exception
Load the whole collection if it is not already loaded

Exception

isLoaded

public boolean isLoaded()

unload

public void unload(Wrappee wrappee)
Unload the collection.


doLoad

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

Exception

clear

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

Exception

preload

public Object preload(Interaction interaction)
               throws Exception
Exception

size

public Object size(Interaction interaction)
            throws Exception
Exception

getCollectionSize

protected abstract long getCollectionSize(OID oid)
                                   throws Exception
Exception

isEmpty

public Object isEmpty(Interaction interaction)
               throws Exception
Exception

memorizeUseDate

public Object memorizeUseDate(Interaction i)

getUseDate

public Date getUseDate(Wrappee wrappee)

iterator

public abstract Object iterator(Interaction interaction)

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli