- java.lang.Object
-
- javax.sql.rowset.serial.SerialJavaObject
-
- All Implemented Interfaces:
- Serializable, Cloneable
public class SerialJavaObject extends Object implements Serializable, Cloneable
A serializable mapping in the Java programming language of an SQLJAVA_OBJECT
value. Assuming the Java object implements theSerializable
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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description SerialJavaObject(Object obj)
Constructor forSerialJavaObject
helper class.
-
-
-
Constructor Detail
-
SerialJavaObject
public SerialJavaObject(Object obj) throws SerialException
Constructor forSerialJavaObject
helper class.- Parameters:
obj
- the JavaObject
to be serialized- Throws:
SerialException
- if the object is found not to be serializable
-
-
Method Detail
-
getObject
public Object getObject() throws SerialException
Returns anObject
that is a copy of thisSerialJavaObject
object.- Returns:
- a copy of this
SerialJavaObject
object as anObject
in the Java programming language - Throws:
SerialException
- if the instance is corrupt
-
getFields
public Field[] getFields() throws SerialException
Returns an array ofField
objects that contains each field of the object that this helper class is serializing.- Returns:
- an array of
Field
objects - Throws:
SerialException
- if an error is encountered accessing the serialized object- See Also:
Class.getFields()
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/sql/rowset/serial/SerialJavaObject.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.