javax.sql.rowset.serial
Class SerialStruct

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.sql.rowset.serial.SerialStruct
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , Struct sample code for java.sql.Struct definition code for java.sql.Struct

public class SerialStruct
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Struct sample code for java.sql.Struct definition code for java.sql.Struct , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable

A serialized mapping in the Java programming language of an SQL structured type. Each attribute that is not already serialized is mapped to a serialized form, and if an attribute is itself a structured type, each of its attributes that is not already serialized is mapped to a serialized form.

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.

See Also:
Serialized Form

Constructor Summary
SerialStruct sample code for javax.sql.rowset.serial.SerialStruct.SerialStruct(java.sql.SQLData, java.util.Map) definition code for javax.sql.rowset.serial.SerialStruct.SerialStruct(java.sql.SQLData, java.util.Map) (SQLData sample code for java.sql.SQLData definition code for java.sql.SQLData  in, Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,Class sample code for java.lang.Class definition code for java.lang.Class <?>> map)
          Constructs a SerialStruct object from the given SQLData object, using the given type map to custom map it to a class in the Java programming language.
SerialStruct sample code for javax.sql.rowset.serial.SerialStruct.SerialStruct(java.sql.Struct, java.util.Map) definition code for javax.sql.rowset.serial.SerialStruct.SerialStruct(java.sql.Struct, java.util.Map) (Struct sample code for java.sql.Struct definition code for java.sql.Struct  in, Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,Class sample code for java.lang.Class definition code for java.lang.Class <?>> map)
          Constructs a SerialStruct object from the given Struct object, using the given java.util.Map object for custom mapping the SQL structured type or any of its attributes that are SQL structured types.
 
Method Summary
 Object sample code for java.lang.Object definition code for java.lang.Object [] getAttributes sample code for javax.sql.rowset.serial.SerialStruct.getAttributes() definition code for javax.sql.rowset.serial.SerialStruct.getAttributes() ()
          Retrieves an array of Object values containing the attributes of the SQL structured type that this SerialStruct object represents.
 Object sample code for java.lang.Object definition code for java.lang.Object [] getAttributes sample code for javax.sql.rowset.serial.SerialStruct.getAttributes(java.util.Map) definition code for javax.sql.rowset.serial.SerialStruct.getAttributes(java.util.Map) (Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,Class sample code for java.lang.Class definition code for java.lang.Class <?>> map)
          Retrieves the attributes for the SQL structured type that this SerialStruct represents as an array of Object values, using the given type map for custom mapping if appropriate.
 String sample code for java.lang.String definition code for java.lang.String getSQLTypeName sample code for javax.sql.rowset.serial.SerialStruct.getSQLTypeName() definition code for javax.sql.rowset.serial.SerialStruct.getSQLTypeName() ()
          Retrieves the SQL type name for this SerialStruct object.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

SerialStruct sample code for javax.sql.rowset.serial.SerialStruct(java.sql.Struct, java.util.Map<java.lang.String, java.lang.Class<?>>) definition code for javax.sql.rowset.serial.SerialStruct(java.sql.Struct, java.util.Map<java.lang.String, java.lang.Class<?>>)

public SerialStruct(Struct sample code for java.sql.Struct definition code for java.sql.Struct  in,
                    Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,Class sample code for java.lang.Class definition code for java.lang.Class <?>> map)
             throws SerialException sample code for javax.sql.rowset.serial.SerialException definition code for javax.sql.rowset.serial.SerialException 
Constructs a SerialStruct object from the given Struct object, using the given java.util.Map object for custom mapping the SQL structured type or any of its attributes that are SQL structured types.

Parameters:
map - a 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 mapped
Throws:
SerialException sample code for javax.sql.rowset.serial.SerialException definition code for javax.sql.rowset.serial.SerialException - if an error occurs
See Also:
Struct sample code for java.sql.Struct definition code for java.sql.Struct

SerialStruct sample code for javax.sql.rowset.serial.SerialStruct(java.sql.SQLData, java.util.Map<java.lang.String, java.lang.Class<?>>) definition code for javax.sql.rowset.serial.SerialStruct(java.sql.SQLData, java.util.Map<java.lang.String, java.lang.Class<?>>)

public SerialStruct(SQLData sample code for java.sql.SQLData definition code for java.sql.SQLData  in,
                    Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,Class sample code for java.lang.Class definition code for java.lang.Class <?>> map)
             throws SerialException sample code for javax.sql.rowset.serial.SerialException definition code for javax.sql.rowset.serial.SerialException 
Constructs a SerialStruct object from the given SQLData object, using the given type map to custom map it to a class in the Java programming language. The type map gives the SQL type and the class to which it is mapped. The SQLData object defines the class to which the SQL type will be mapped.

Parameters:
in - an instance of the SQLData class that defines the mapping of the SQL structured type to one or more objects in the Java programming language
map - a 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 mapped
Throws:
SerialException sample code for javax.sql.rowset.serial.SerialException definition code for javax.sql.rowset.serial.SerialException - if an error occurs
Method Detail

getSQLTypeName sample code for javax.sql.rowset.serial.SerialStruct.getSQLTypeName() definition code for javax.sql.rowset.serial.SerialStruct.getSQLTypeName()

public String sample code for java.lang.String definition code for java.lang.String  getSQLTypeName()
                      throws SerialException sample code for javax.sql.rowset.serial.SerialException definition code for javax.sql.rowset.serial.SerialException 
Retrieves the SQL type name for this SerialStruct object. This is the name used in the SQL definition of the structured type

Specified by:
getSQLTypeName sample code for java.sql.Struct.getSQLTypeName() definition code for java.sql.Struct.getSQLTypeName() in interface Struct sample code for java.sql.Struct definition code for java.sql.Struct
Returns:
a String object representing the SQL type name for the SQL structured type that this SerialStruct object represents
Throws:
SerialException sample code for javax.sql.rowset.serial.SerialException definition code for javax.sql.rowset.serial.SerialException - if an error occurs

getAttributes sample code for javax.sql.rowset.serial.SerialStruct.getAttributes() definition code for javax.sql.rowset.serial.SerialStruct.getAttributes()

public Object sample code for java.lang.Object definition code for java.lang.Object [] getAttributes()
                       throws SerialException sample code for javax.sql.rowset.serial.SerialException definition code for javax.sql.rowset.serial.SerialException 
Retrieves an array of Object values containing the attributes of the SQL structured type that this SerialStruct object represents.

Specified by:
getAttributes sample code for java.sql.Struct.getAttributes() definition code for java.sql.Struct.getAttributes() in interface Struct sample code for java.sql.Struct definition code for java.sql.Struct
Returns:
an array of Object values, with each element being an attribute of the SQL structured type that this SerialStruct object represents
Throws:
SerialException sample code for javax.sql.rowset.serial.SerialException definition code for javax.sql.rowset.serial.SerialException - if an error occurs

getAttributes sample code for javax.sql.rowset.serial.SerialStruct.getAttributes(java.util.Map<java.lang.String, java.lang.Class<?>>) definition code for javax.sql.rowset.serial.SerialStruct.getAttributes(java.util.Map<java.lang.String, java.lang.Class<?>>)

public Object sample code for java.lang.Object definition code for java.lang.Object [] getAttributes(Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,Class sample code for java.lang.Class definition code for java.lang.Class <?>> map)
                       throws SerialException sample code for javax.sql.rowset.serial.SerialException definition code for javax.sql.rowset.serial.SerialException 
Retrieves the attributes for the SQL structured type that this SerialStruct represents as an array of Object values, using the given type map for custom mapping if appropriate.

Specified by:
getAttributes sample code for java.sql.Struct.getAttributes(java.util.Map) definition code for java.sql.Struct.getAttributes(java.util.Map) in interface Struct sample code for java.sql.Struct definition code for java.sql.Struct
Parameters:
map - a 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 mapped
Returns:
an array of Object values, with each element being an attribute of the SQL structured type that this SerialStruct object represents
Throws:
SerialException sample code for javax.sql.rowset.serial.SerialException definition code for javax.sql.rowset.serial.SerialException - if an error occurs