public interface WrapperPolicy
extends java.io.Serializable
Purpose: The wrapper policy can be used to wrap all objects read from the database in another object. This allows for EclipseLink to utilize one version of the class for its purposes and allows for the application to deal with another version of the object. The wrapper policy is used for things such as EJB Entity Beans and is directly used by the TopLink for WebLogic product for EJB Container Managed Persistence. It is assumed that relationships must be through the wrapper objects. Object identity is not maintained on the wrapper objects, only the wrapped object.
Modifier and Type | Method and Description |
---|---|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
PUBLIC:
Required: Lets the policy perform initialization.
|
boolean |
isTraversable()
PUBLIC:
Required: Return true if the wrapped value should be traversed.
|
boolean |
isWrapped(java.lang.Object object)
PUBLIC:
Required: Return true if the object is already wrapped.
|
void |
setDescriptor(ClassDescriptor descriptor)
PUBLIC:
Required: Set the descriptor.
|
java.lang.Object |
unwrapObject(java.lang.Object proxy,
org.eclipse.persistence.internal.sessions.AbstractSession session)
PUBLIC:
Required: Unwrap the object to return the implementation that is meant to be used by EclipseLink.
|
java.lang.Object |
wrapObject(java.lang.Object original,
org.eclipse.persistence.internal.sessions.AbstractSession session)
PUBLIC:
Required: Wrap the object to return the implementation that the application requires.
|
void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
session
- the session to initialize againstDescriptorException
boolean isTraversable()
boolean isWrapped(java.lang.Object object)
void setDescriptor(ClassDescriptor descriptor)
descriptor
- the descriptor for the object being wrappedjava.lang.Object unwrapObject(java.lang.Object proxy, org.eclipse.persistence.internal.sessions.AbstractSession session)
proxy
- the wrapped objectsession
- the session to unwrap intojava.lang.Object wrapObject(java.lang.Object original, org.eclipse.persistence.internal.sessions.AbstractSession session)
original,
- the object to be wrappedsession
- the session to wrap the object against.