In addition, the structured type is custom mapped to a class in the Java programming language if there is such a mapping, as are its attributes, if appropriate.
The SerialStruct class provides a constructor for creating
an instance from a Struct object, a method for retrieving
the SQL type name of the SQL structured type in the database, and methods
for retrieving its attribute values.
| Modifier and Type | Field and Description |
|---|---|
| private Object[] | attribs
An array of |
| pack-priv static final long | serialVersionUID
The identifier that assists in the serialization of this
|
| private String | SQLTypeName
The SQL type name for the structured type that this
|
| Access | Constructor and Description |
|---|---|
| public | SerialStruct(Struct
an instance of in, Map<String, Class<?>> Structa map)java.util.Map object in which
each entry consists of 1) a String object
giving the fully qualified name of a UDT and 2) the
Class object for the SQLData implementation
that defines how the UDT is to be mappedConstructs a |
| public | SerialStruct(SQLData
an instance of the in, Map<String, Class<?>> SQLData class
that defines the mapping of the SQL structured
type to one or more objects in the Java programming languagea map)java.util.Map object in which
each entry consists of 1) a String object
giving the fully qualified name of a UDT and 2) the
Class object for the SQLData implementation
that defines how the UDT is to be mappedConstructs a |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: a clone of this SerialStructOverrides java. Returns a clone of this |
| public boolean | Returns: true if the given object represents a SerialStruct
equivalent to this SerialStruct, false otherwiseThe object to compare this obj)SerialStruct againstOverrides java. Compares this SerialStruct to the specified object. |
| public Object[] | Returns: an array ofObject values, with each
element being an attribute of the SQL structured type
that this SerialStruct object representsImplements java. Retrieves an array of |
| public Object[] | Returns: an array ofObject values, with each
element being an attribute of the SQL structured
type that this SerialStruct object
representsa map)java.util.Map object in which
each entry consists of 1) a String object
giving the fully qualified name of a UDT and 2) the
Class object for the SQLData implementation
that defines how the UDT is to be mappedImplements java. Retrieves the attributes for the SQL structured type that
this |
| public String | Returns: aString object representing the SQL
type name for the SQL structured type that this
SerialStruct object representsImplements java. Retrieves the SQL type name for this |
| public int | Returns: a hash code value for this object.Overrides java. Returns a hash code for this |
| private void | mapToSerial(Map<String, Class<?>>
a map)java.util.Map object in which
each entry consists of 1) a String object
giving the fully qualified name of a UDT and 2) the
Class object for the SQLData implementation
that defines how the UDT is to be mappedMaps attributes of an SQL structured type that are not serialized to a serialized form, using the given type map for custom mapping when appropriate. |
| private void | readObject(ObjectInputStream
the s)ObjectInputStream to read from.readObject is called to restore the state of the |
| private void | writeObject(ObjectOutputStream
the s)ObjectOutputStream to write to.writeObject is called to save the state of the |
| attribs | back to summary |
|---|---|
| private Object[] attribs An array of
| |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID The identifier that assists in the serialization of this
| |
| SQLTypeName | back to summary |
|---|---|
| private String SQLTypeName The SQL type name for the structured type that this
| |
| SerialStruct | back to summary |
|---|---|
| public SerialStruct(Struct in, Map<String, Class<?>> map) throws SerialException Constructs a
| |
| SerialStruct | back to summary |
|---|---|
| public SerialStruct(SQLData in, Map<String, Class<?>> map) throws SerialException Constructs a
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Returns a clone of this
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Compares this SerialStruct to the specified object. The result is
| |
| getAttributes | back to summary |
|---|---|
| public Object[] getAttributes() throws SerialException Implements java. Retrieves an array of
| |
| getAttributes | back to summary |
|---|---|
| public Object[] getAttributes(Map<String, Class<?>> map) throws SerialException Implements java. Retrieves the attributes for the SQL structured type that
this
| |
| getSQLTypeName | back to summary |
|---|---|
| public String getSQLTypeName() throws SerialException Implements java. Retrieves the SQL type name for this
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code for this
| |
| mapToSerial | back to summary |
|---|---|
| private void mapToSerial(Map<String, Class<?>> map) throws SerialException Maps attributes of an SQL structured type that are not
serialized to a serialized form, using the given type map
for custom mapping when appropriate. The following types
in the Java programming language are mapped to their
serialized forms: This method is called internally and is not used by an application programmer.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException readObject is called to restore the state of the
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream s) throws IOException writeObject is called to save the state of the
| |