All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oracle.sql.StructDescriptor

java.lang.Object
   |
   +----oracle.sql.StructDescriptor

public class StructDescriptor
extends Object
Descriptor of a SQL structured object. (That is an SQL Object type). Its main responsibility is understanding how to convert between various representations of such a struct.

There should be a method to return information about the fields (beyond their number. But there is no public representation for that.


Constructor Index

 o StructDescriptor(SQLName, OracleTypeADT, Connection)
(INTERNAL) Constructor.

Method Index

 o createDescriptor(String, Connection)
Descriptor factory.
 o getLength()
The number of fields in the Object Type.
 o getMetaData()
Gets the metadata regarding this type.
 o getName()
Return fully qualified type name.

Constructors

 o StructDescriptor
 public StructDescriptor(SQLName name,
                         OracleTypeADT type,
                         Connection connection) throws SQLException
(INTERNAL) Constructor. Create a brand new StructDescriptor.

Parameters:
name - the String that names the type (fully qualified name).
OracleConnection - the connection to the data base to locate the type.

Methods

 o createDescriptor
 public static StructDescriptor createDescriptor(String name,
                                                 Connection conn) throws SQLException
Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.

Parameters:
name - a String naming the type. (Not necessarily fully qualified)
connection - a Connection to a database
 o getName
 public String getName() throws SQLException
Return fully qualified type name.

 o getLength
 public int getLength() throws SQLException
The number of fields in the Object Type.

Returns:
the size.
 o getMetaData
 public ResultSetMetaData getMetaData() throws SQLException
Gets the metadata regarding this type. The return ResultSetMetaData contains the attribute name, attribute type id and attribute type precision information. The column index in ResultSetMetaData maps to the position of the attribute in a Struct (with the first attribute being at index 1).

Returns:
a ResultSetMetaData object that contains the type info
Throws: if
database access error occurs

All Packages  Class Hierarchy  This Package  Previous  Next  Index