org.objectweb.jac.aspects.persistence
Class AbstractPersistenceWrapper
java.lang.Object
|
+--org.objectweb.jac.core.Wrapper
|
+--org.objectweb.jac.aspects.persistence.AbstractPersistenceWrapper
- All Implemented Interfaces:
- Advice, ConstructorInterceptor, Interceptor, MethodInterceptor, Serializable
- Direct Known Subclasses:
- CollectionWrapper, PersistenceWrapper
- public abstract class AbstractPersistenceWrapper
- extends Wrapper
This wrapper defines persistence extensions for objects that a
defined persitent by a persistent aspect component.
- See Also:
- Serialized Form
Fields inherited from class org.objectweb.jac.core.Wrapper |
ac, cr |
ATTR_ADDED
public static final String ATTR_ADDED
- See Also:
- Constant Field Values
AbstractPersistenceWrapper
public AbstractPersistenceWrapper(AspectComponent ac)
normalizeOutput
public final Object normalizeOutput(Object value)
throws Exception
- Gets the object in memory object for a "storage" value.
- Parameters:
value
- the "storage" value
- Returns:
- if value is an OID, a reference to the object with that
OID is returned, otherwise, value is returned.
Exception
- See Also:
normalizeInput(Object)
normalizeInput
public final Object normalizeInput(Object value)
throws Exception
- Performs various stuff before storing a value in a storage. If
the value is a Wrappee, it is made persistent.
- Parameters:
value
- the value to be stored
- Returns:
- if value is a wrappee, the OID of the object is
returned, otherwise, value is returned.
Exception
- See Also:
normalizeInput(Object)
getOID
public final OID getOID(Wrappee wrappee)
isPersistent
public final boolean isPersistent(Wrappee wrappee)
- Tells if the current object is persistent (role method).
- Returns:
- true if persistent
getStorage
public final Storage getStorage(ClassItem cli)
- Returns the storage for a given class
- Parameters:
cli
- a class
- Returns:
- the storage of the class, or null.
getAC
public final PersistenceAC getAC()
checkOid
public final void checkOid(Wrappee wrappee)
throws AbstractPersistenceWrapper.InvalidOidException
AbstractPersistenceWrapper.InvalidOidException