org.objectweb.jac.aspects.persistence
Class CollectionWrapper
java.lang.Object
org.objectweb.jac.core.Wrapper
org.objectweb.jac.aspects.persistence.AbstractPersistenceWrapper
org.objectweb.jac.aspects.persistence.CollectionWrapper
- All Implemented Interfaces:
- Advice, ConstructorInterceptor, Interceptor, MethodInterceptor, Serializable
- Direct Known Subclasses:
- ListWrapper, MapWrapper, SetWrapper
- public abstract class CollectionWrapper
- extends AbstractPersistenceWrapper
Base class for collection wrappers
- See Also:
- Serialized Form
Fields inherited from class org.objectweb.jac.core.Wrapper |
ac, cr |
CollectionWrapper
public CollectionWrapper(AspectComponent ac,
Object substance,
CollectionItem collection,
boolean isLoaded)
load
public void load(Wrappee wrappee)
throws Exception
- Load the whole collection if it is not already loaded
- Throws:
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.
- Throws:
Exception
clear
public abstract Object clear(Interaction interaction)
throws Exception
- Remove all instances from the collection
- Throws:
Exception
preload
public Object preload(Interaction interaction)
throws Exception
- Throws:
Exception
size
public Object size(Interaction interaction)
throws Exception
- Throws:
Exception
getCollectionSize
protected abstract long getCollectionSize(OID oid)
throws Exception
- Throws:
Exception
isEmpty
public Object isEmpty(Interaction interaction)
throws Exception
- Throws:
Exception
getUseDate
public long getUseDate(Wrappee wrappee)
touch
protected void touch()
- Sets useDate to current time
iterator
public abstract Object iterator(Interaction interaction)
isCache
public boolean isCache()
setCache
public void setCache(boolean b)
convert
protected Object convert(Object value,
Object wrappee)
throws Exception
- Throws:
Exception