Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Interface java.sql.SQLData

Subinterfaces:
Struct

public interface SQLData
JDBC 2.0 The SQLData interface is implemented by a Java class that is registered in a type mapping.


Method Summary
SQLType  getSQLType()
Called by the JDBC driver to determine the name of the SQL user-defined type that is being passed to the database.
void  readSQL(SQLInput stream, SQLType descriptor)
Populate this object with data read from the database.
void  writeSQL(SQLOutput stream)
Write this object to the given SQL data stream.
 

Method Detail

getSQLType

public SQLType getSQLType()
Called by the JDBC driver to determine the name of the SQL user-defined type that is being passed to the database. The JDBC driver must accept an SQLType object that was created by someone else.

readSQL

public void readSQL(SQLInput stream,
                    SQLType descriptor) 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 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

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

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.