Interface java.sql.SQLData
- public abstract interface SQLData
JDBC 2.0
The SQLData interface is implemented by a Java class that is
registered in a type mapping.
Method Summary
|
String
|
getSQLTypeName()
Called by the JDBC driver to determine the fully qualified
name of the SQL user-defined type that this object represents. |
void
|
readSQL(SQLInput stream,
String typeName)
Populate this object with data read from the database.
|
void
|
writeSQL(SQLOutput stream)
Write this object to the given SQL data stream.
|
getSQLTypeName
public String getSQLTypeName()
throws SQLException
- Called by the JDBC driver to determine the fully qualified
name of the SQL user-defined type that this object represents.
readSQL
public void readSQL(SQLInput stream,
String typeName)
throws SQLException
- Populate this object with data read from the database.
The implementation of the method must follow this protocol:
Read each of the attributes or elements of the SQL
type, by calling a method of the input stream to read each
item, in the order that they appear in the SQL definition
of the type. Assign those data to appropriate fields or
elements (of this or other objects).
Specifically, make these method calls:
for a Distinct Type: read a single data element.
for a Structured Type: read each attribute of the SQL type.
The JDBC driver initializes the input stream with a type map
before calling this method which is used by the appropriate
readXXX() methods on the stream.
- Parameters:
stream
- the input SQL data stream
descriptor
- the SQL type of the value on the data stream
writeSQL
public void writeSQL(SQLOutput stream)
throws SQLException
- Write this object to the given SQL data stream.
The implementation of the method must follow this protocol:
Write each of the attributes of the SQL type, by calling a
method of the output stream to write each item, in the order that
they appear in the SQL definition of the type.
Specifically, make these method calls:
for a Distinct Type: write its single data element.
for a Structured Type: write a value for each attribute of the SQL type.
- Parameters:
stream
- the output SQL data stream
Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.