|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) E28847-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
org.eclipse.persistence.sdo.SDOResolvable
public class SDOResolvable
INTERNAL:
Purpose:
This class performs serialization/deserialization of an SDODataObject.
Responsibilities:
Serialization Process
Serialization and de-serialization of objects occurs during DAS transactions, Web Service transactions in the SOAP envelope, EJB container passivation, web container session saving or directly in an application using the function ObjectOutputStream.writeObject(Object). The Serializable and Externalizable framework handles automatic or user defined reading/writing of streams depending on which interface functions are realized in the implementing classes.
The Serializable interface has no operations - therefore a class that implements it needs to add no additional functionality. Why do this? - For security. The security manager in the JVM will only serialize objects at runtime if they are flagged as Serializable (or Externalizable) so that by default java classes do not expose themselves to serialization. (See p49 of Java Security 2nd edition).
There are 3 levels of serialization control.
The SDO 2.01 specification details the high level structure of the serialization format on page 64, section 6 - Java Serialization of DataObjects. The process will involve gzip serialization of the xml data with UTF representation of the Xpath address of the current DataObject inside the entire tree along with its identification as root/no-root in binary 1/0 format as follows.
Field Summary | |
---|---|
private HelperContext |
aHelperContext hold the context containing all helpers so that we can preserve inter-helper relationships |
static java.lang.String |
DEFAULT_ROOT_ELEMENT_NAME Root element name for all DataObjects undergoing serialization = sdo:dataObject |
static int |
SDO_HELPER_CONTEXT_ID_IDENTIFIER root object with helper context id identifier |
static int |
SDO_INTERNAL_OBJECT_IDENTIFIER internal object serialization type identifier = 0 |
static int |
SDO_ROOT_OBJECT_IDENTIFIER root object serialization type identifier = 1 |
private static long |
serialVersionUID Unique hash ID of this Externalizable class. |
private SDODataObject |
theSDODataObject member field holding DataObject being serialized/deserialized |
Constructor Summary | |
---|---|
SDOResolvable() |
|
SDOResolvable(HelperContext aContext) Default constructor for deserialization |
|
SDOResolvable(java.lang.Object target, HelperContext aContext) Constructor for serialization |
Method Summary | |
---|---|
HelperContext |
getHelperContext() |
void |
readExternal(java.io.ObjectInput objectInput) Purpose: Deserialize from an ObjectInputStream into an SDODataObject This function is mandated by the Externalizable interface. |
java.lang.Object |
readResolve() Purpose: This function is called after readExternal to return the recently deserialized object retrieved from the ObjectInputStream. |
void |
setHelperContext(HelperContext helperContext) |
void |
writeExternal(java.io.ObjectOutput objectOutput) Purpose: Serialize an SDODataObject to an ObjectOutputStream This function is mandated by the Externalizable interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
public static final java.lang.String DEFAULT_ROOT_ELEMENT_NAME
public static final int SDO_HELPER_CONTEXT_ID_IDENTIFIER
public static final int SDO_ROOT_OBJECT_IDENTIFIER
public static final int SDO_INTERNAL_OBJECT_IDENTIFIER
private transient SDODataObject theSDODataObject
private transient HelperContext aHelperContext
Constructor Detail |
---|
public SDOResolvable()
public SDOResolvable(HelperContext aContext)
public SDOResolvable(java.lang.Object target, HelperContext aContext)
Method Detail |
---|
public java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
public void writeExternal(java.io.ObjectOutput objectOutput) throws java.io.IOException
java.io.IOException
public void readExternal(java.io.ObjectInput objectInput) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public HelperContext getHelperContext()
public void setHelperContext(HelperContext helperContext)
helperContext
-
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |