39 |
package java.sql; |
package java.sql; |
40 |
|
|
41 |
/** |
/** |
42 |
* This interface is used for mapping SQL data to user defined datatypes. |
* This interface is used for mapping SQL data to user defined datatypes. |
43 |
* |
* |
44 |
* @author Aaron M. Renn (arenn@urbanophile.com) |
* @author Aaron M. Renn (arenn@urbanophile.com) |
45 |
*/ |
*/ |
46 |
public interface SQLData |
public interface SQLData |
47 |
{ |
{ |
48 |
|
/** |
49 |
/** |
* This method returns the user defined datatype name for this object. |
50 |
* This method returns the user defined datatype name for this object. |
* |
51 |
* |
* @return The user defined data type name for this object. |
52 |
* @return The user defined data type name for this object. |
* @exception SQLException If an error occurs. |
53 |
* |
*/ |
54 |
* @exception SQLException If an error occurs. |
public String getSQLTypeName() throws SQLException; |
55 |
*/ |
|
56 |
public abstract String |
/** |
57 |
getSQLTypeName() throws SQLException; |
* This method populates the data in the object from the specified stream. |
58 |
|
* |
59 |
/*************************************************************************/ |
* @param stream The stream to read the data from. |
60 |
|
* @param name The data type name of the data on the stream. |
61 |
/** |
* @exception SQLException If an error occurs. |
62 |
* This method populates the data in the object from the specified stream. |
*/ |
63 |
* |
public void readSQL(SQLInput stream, String typeName) throws SQLException; |
64 |
* @param stream The stream to read the data from. |
|
65 |
* @param name The data type name of the data on the stream. |
/** |
66 |
* |
* This method writes the data in this object to the specified stream. |
67 |
* @exception SQLException If an error occurs. |
* |
68 |
*/ |
* @param stream The stream to write the data to. |
69 |
public abstract void |
* @exception SQLException If an error occurs. |
70 |
readSQL(SQLInput stream, String name) throws SQLException; |
*/ |
71 |
|
public void writeSQL(SQLOutput stream) throws SQLException; |
72 |
/*************************************************************************/ |
} |
|
|
|
|
/** |
|
|
* This method writes the data in this object to the specified stream. |
|
|
* |
|
|
* @param stream The stream to write the data to. |
|
|
* |
|
|
* @exception SQLException If an error occurs. |
|
|
*/ |
|
|
public abstract void |
|
|
writeSQL(SQLOutput stream) throws SQLException; |
|
|
|
|
|
} // interface SQLData |
|
|
|
|