public interface SQLData
This interface must be implemented by any Java class that is registered in a type mapping.
getSQLTypeName
public String getSQLTypeName() throws SQLException
This gets the fully qualified name of the user-defined type represented by the object.
Returns: The type name as used when the object was created. A SQLException is thrown if an error occurs while accessing this value.
readSQL
public void readSQL(SQLInput stream, String typeName) throws SQLException
Reads values from the SQLInput stream and assigns values for all elements of the SQL type. A SQLException is thrown if an error occurs while accessing this value.
Parameters:
stream: | The SQLInput object from which to read the data |
typeName: | The SQL type name of the value on the data stream |
writeSQL
public void writeSQL(SQLOutput stream) throws SQLException
This writes the value of the object to a SQLOutput stream, converting it back to its SQL value in the data source. A SQLException is thrown if an error occurs while accessing this value.
Parameters:
stream: | The SQLOutput object to which to write the data |