Class SerialJavaObject
java.lang.Object
javax.sql.rowset.serial.SerialJavaObject
- All Implemented Interfaces:
Serializable, Cloneable
A serializable mapping in the Java programming language of an SQL
JAVA_OBJECT value. Assuming the Java object
implements the Serializable interface, this class simply wraps the
serialization process.
If however, the serialization is not possible because
the Java object is not immediately serializable, this class will
attempt to serialize all non-static members to permit the object
state to be serialized.
Static or transient fields cannot be serialized; an attempt to serialize
them will result in a SerialException object being thrown.
Thread safety
A SerialJavaObject is not safe for use by multiple concurrent threads. If a SerialJavaObject is to be used by more than one thread then access to the SerialJavaObject should be controlled by appropriate synchronization.- Since:
- 1.5
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a clone of thisSerialJavaObject.booleanCompares this SerialJavaObject to the specified object.Field[]Returns an array ofFieldobjects that contains each field of the object that this helper class is serializing.Returns anObjectthat is a copy of thisSerialJavaObjectobject.inthashCode()Returns a hash code for this SerialJavaObject.Methods declared in class Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
SerialJavaObject
Constructor forSerialJavaObjecthelper class.- Parameters:
obj- the JavaObjectto be serialized- Throws:
SerialException- if the object is found not to be serializable
-
-
Method Details
-
getObject
Returns anObjectthat is a copy of thisSerialJavaObjectobject.- Returns:
- a copy of this
SerialJavaObjectobject as anObjectin the Java programming language - Throws:
SerialException- if the instance is corrupt
-
getFields
Returns an array ofFieldobjects that contains each field of the object that this helper class is serializing.- Returns:
- an array of
Fieldobjects - Throws:
SerialException- if an error is encountered accessing the serialized object- See Also:
-
equals
Compares this SerialJavaObject to the specified object. The result istrueif and only if the argument is notnulland is aSerialJavaObjectobject that is identical to this object -
hashCode
-
clone
-