Name
SQLData
Synopsis
Interface
Name: java.sql.SQLData
Superclass: None
Immediate Subclasses: None
Interfaces Implemented: None
Availability: New as of JDK 1.2
Description
This interface is implemented by custom Java objects designed to be stored as Java objects in a Java-relational database. Any Java class registered in a type mapping must implement this interface. Programmers should never make direct calls to these methods.
Class Summary
public interface SQLData {
String getSQLTypeName( ) throws SQLException;
void readSQL(SQLInput input, String tname)
throws SQLException;
void writeSQL(SQLOutput output) throws SQLException;
}Object Methods
getSQLTypeName( )
public String getSQLTypeName( ) throws SQLException;
- Description
This method provides the name of the SQL user-defined type to which this implementation of
SQLDatamaps.
void readSQL( )
public void readSQL(SQLInput input, String tname) throws SQLException;
- Description
Using data of the relational database from the input stream, this method assigns values to the object’s attributes. This method reads values from the input stream by calling the appropriate
readXXX()methods in theSQLInputinstance.
void writeSQL( )
public void writeSQL(SQLOutput output) throws SQLException;
- Description
This method writes the attributes of this object to the specified output stream using the
writeXXX()methods of theSQLOutputinstance.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access