All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oracle.sql.STRUCT

oracle.sql.STRUCT

public class STRUCT
implements Struct
This class has two roles. Like other classes in oracle.sql. it is a value class. That is, once it is constructed the user should not change its contents.


Constructor Index

 o STRUCT(StructDescriptor, Connection, Object[])
Constructor.

Method Index

 o getAttributes()
Implements the Struct interface function.
 o getAttributes(Dictionary)
Implements the Struct interface function.
 o getConnection()
Oracle extension.
 o getDescriptor()
Oracle extension.
 o getOracleAttributes()
Oracle extension.
 o getSQLTypeName()
Implements the Struct interface function Retrieves the SQL type name of the SQL structured type that this Struct object represents.
 o isConvertibleTo(Class)
Determines if datum object can be converted to a particular class
 o toJdbc()
Oracle extension.

Constructors

 o STRUCT
 public STRUCT(StructDescriptor type,
               Connection conn,
               Object attributes[]) throws SQLException
Constructor. The raw bytes are computed at this time or a copy of attributes is made. In any event the caller is free to modify the array without affecting the values held in the STRUCT.

Parameters:
type - the SQLStructType used to convert the type to
attributes - the array specifying the attributes to be converted to raw bytes.
See Also:
SQLStructType

Methods

 o getSQLTypeName
 public String getSQLTypeName() throws SQLException
Implements the Struct interface function Retrieves the SQL type name of the SQL structured type that this Struct object represents.

Returns:
s the fully-qualified type name of the SQL structured type for which this Struct object is the generic representation
Throws: SQLException
if a database access error occurs
 o getAttributes
 public Object[] getAttributes() throws SQLException
Implements the Struct interface function. Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents. Each call returns a fresh array. This method uses the type map associated with the connection for customizations of the type mappings. If there is no entry in the connection's type map that matches the structured type that this Struct object represents, the driver uses the standard mapping.

Conceptually, this method calls the method getObject on each attribute of the structured type and returns a Java array containing the result.

Returns:
an array containing the ordered attribute values
Throws: SQLException
if a database access error occurs
 o getAttributes
 public Object[] getAttributes(Dictionary map) throws SQLException
Implements the Struct interface function. Produces the ordered values of the attributes of the SQL structurec type that this Struct object represents. Each call returns a fresh array. This method uses the given type map for customizations of the type mappings. If there is no entry in the given type map that matches the structured type that this Struct object represents, the driver uses the standard mapping.

Conceptually, this method calls the method getObject on each attribute of the structured type and returns a Java array containing the result.

Parameters:
map - a mapping of SQL type names to Java classes
Returns:
an array containing the ordered attribute values
Throws: SQLException
if a database access error occurs
 o getDescriptor
 public StructDescriptor getDescriptor() throws SQLException
Oracle extension. Return the StructDescriptor object that contains the type information.

Returns:
the type descriptor
 o getOracleAttributes
 public Datum[] getOracleAttributes() throws SQLException
Oracle extension. Retrun the array of Attributes as oracle.sql.XXX's. A fresh array is returned each time getOracleAttributes is called.

Returns:
datum array that containing the ordered attribute values as oracle.sql.Datum objects.
 o getConnection
 public OracleConnection getConnection()
Oracle extension. Return current connection.

 o toJdbc
 public Object toJdbc() throws SQLException
Oracle extension. Returns the JDBC representation of the datum object

Returns:
an object containing the JDBC value
Throws: SQLException
if conversion to JDBC representation results in an error
 o isConvertibleTo
 public boolean isConvertibleTo(Class jClass)
Determines if datum object can be converted to a particular class

Parameters:
cls - Class to convert to
Returns:
true, if conversion to cls is permitted false, if conversion to cls is not permitted

All Packages  Class Hierarchy  This Package  Previous  Next  Index