KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > in > co > daffodil > db > jdbc > DaffodilDBSQLData


1 package in.co.daffodil.db.jdbc;
2
3 import java.sql.*;
4 import com.daffodilwoods.database.resource.*;
5
6 public class DaffodilDBSQLData{ /*implements SQLData{
7
8    /**
9   * Returns the fully-qualified
10   * name of the SQL user-defined type that this object represents.
11   * This method is called by the JDBC driver to get the name of the
12   * UDT instance that is being mapped to this instance of
13   * <code>SQLData</code>.
14   *
15   * @return the type name that was passed to the method <code>readSql</code>
16   * when this object was constructed and populated
17   * @exception SQLException if there is a database access error
18   * @since 1.2
19   *
20   public String getSQLTypeName() throws SQLException{
21      P.pln(" method not implemented ");
22      return null;
23   }
24
25  /**
26   * Populates this object with data read from the database.
27   * The implementation of the method must follow this protocol:
28   * <UL>
29   * <LI>It must read each of the attributes or elements of the SQL
30   * type from the given input stream. This is done
31   * by calling a method of the input stream to read each
32   * item, in the order that they appear in the SQL definition
33   * of the type.
34   * <LI>The method <code>readSQL</code> then
35   * assigns the data to appropriate fields or
36   * elements (of this or other objects).
37   * Specifically, it must call the appropriate <i>reader</i> method
38   * (<code>SQLInput.readString</code>, <code>SQLInput.readBigDecimal</code>,
39   * and so on) method(s) to do the following:
40   * for a distinct type, read its single data element;
41   * for a structured type, read a value for each attribute of the SQL type.
42   * </UL>
43   * The JDBC driver initializes the input stream with a type map
44   * before calling this method, which is used by the appropriate
45   * <code>SQLInput</code> reader method on the stream.
46   *
47   * @param stream the <code>SQLInput</code> object from which to read the data for
48   * the value that is being custom mapped
49   * @param typeName the SQL type name of the value on the data stream
50   * @exception SQLException if there is a database access error
51   * @see SQLInput
52   *
53   public void readSQL (SQLInput stream, String typeName) throws SQLException{
54
55   }
56
57   /**
58   * Writes this object to the given SQL data stream, converting it back to
59   * its SQL value in the data source.
60   * The implementation of the method must follow this protocol:<BR>
61   * It must write each of the attributes of the SQL type
62   * to the given output stream. This is done by calling a
63   * method of the output stream to write each item, in the order that
64   * they appear in the SQL definition of the type.
65   * Specifically, it must call the appropriate <code>SQLOutput</code> writer
66   * method(s) (<code>writeInt</code>, <code>writeString</code>, and so on)
67   * to do the following: for a Distinct Type, write its single data element;
68   * for a Structured Type, write a value for each attribute of the SQL type.
69   *
70   * @param stream the <code>SQLOutput</code> object to which to write the data for
71   * the value that was custom mapped
72   * @exception SQLException if there is a database access error
73   * @see SQLOutput
74   * @since 1.2
75   *
76   public void writeSQL (SQLOutput stream) throws SQLException{
77
78   }*/

79
80 }
81
Popular Tags