Spec-Zone .ru
спецификации, руководства, описания, API
|
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface used for the custom mapping of SQL user-defined types. This interface must be implemented by any Java class that is registered in a type mapping. It is expected that this interface will normally be implemented by a tool. The methods in this interface are called by the driver and are never called by a programmer directly.
Method Summary | |
String |
getSQLTypeName()
Returns the fully-qualified name of the SQL user-defined type that this object represents. |
void |
readSQL(SQLInput stream,
String typeName)
Populates this object with data read from the database. |
void |
writeSQL(SQLOutput stream)
Writes this object to the given SQL data stream, converting it back to its SQL value in the data source. |
Method Detail |
public String getSQLTypeName() throws SQLException
SQLData
.readSql
when this object was constructed and populatedSQLException
- if there is a database access errorpublic void readSQL(SQLInput stream, String typeName) throws SQLException
readSQL
then
assigns the data to appropriate fields or
elements (of this or other objects).
Specifically, it must call the appropriate SQLInput.readXXX
method(s) to do the following:
for a distinct type, read its single data element;
for a structured type, read a value for each attribute of the SQL type.
SQLInput.readXXX
method on the stream.stream
- the SQLInput
object from which to read the data for
the value that is being custom mappedtypeName
- the SQL type name of the value on the data streamSQLException
- if there is a database access errorSQLInput
public void writeSQL(SQLOutput stream) throws SQLException
SQLOutput.writeXXX
method(s) to do the following:
for a Distinct Type, write its single data element;
for a Structured Type, write a value for each attribute of the SQL type.stream
- the SQLOutput
object to which to write the data for
the value that was custom mappedSQLException
- if there is a database access errorSQLOutput
,
What Is in the JDBC
2.0 API
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.