KickJava   Java API By Example, From Geeks To Geeks.

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


1 package in.co.daffodil.db.jdbc;
2
3 import java.sql.*;
4 import com.daffodilwoods.database.resource.*;
5 import java.util.*;
6 import java.io.PrintWriter JavaDoc;
7 import com.daffodilwoods.daffodildb.server.serversystem.*;
8 import java.util.Locale JavaDoc;
9 import java.lang.reflect.*;
10
11 /**
12  * <P>A connection (session) with a specific
13  * database. SQL statements are executed and results are returned
14  * within the context of a connection.
15  * <P>
16  * A <code>Connection</code> object's database is able to provide information
17  * describing its tables, its supported SQL grammar, its stored
18  * procedures, the capabilities of this connection, and so on. This
19  * information is obtained with the <code>getMetaData</code> method.
20  *
21  * <P><B>Note:</B> By default a <code>Connection</code> object is in
22  * auto-commit mode, which means that it automatically commits changes
23  * after executing each statement. If auto-commit mode has been
24  * disabled, the method <code>commit</code> must be called explicitly in
25  * order to commit changes; otherwise, database changes will not be saved.
26  * <P>
27  * A new <code>Connection</code> object created using the JDBC 2.1 core API
28  * has an initially empty type map associated with it. A user may enter a
29  * custom mapping for a UDT in this type map.
30  * When a UDT is retrieved from a data source with the
31  * method <code>ResultSet.getObject</code>, the <code>getObject</code> method
32  * will check the connection's type map to see if there is an entry for that
33  * UDT. If so, the <code>getObject</code> method will map the UDT to the
34  * class indicated. If there is no entry, the UDT will be mapped using the
35  * standard mapping.
36  * <p>
37  * A user may create a new type map, which is a <code>java.util.Map</code>
38  * object, make an entry in it, and pass it to the <code>java.sql</code>
39  * methods that can perform custom mapping. In this case, the method
40  * will use the given type map instead of the one associated with
41  * the connection.
42  * <p>
43  * For example, the following code fragment specifies that the SQL
44  * type <code>ATHLETES</code> will be mapped to the class
45  * <code>Athletes</code> in the Java programming language.
46  * The code fragment retrieves the type map for the <code>Connection
47  * </code> object <code>con</code>, inserts the entry into it, and then sets
48  * the type map with the new entry as the connection's type map.
49  * <pre>
50  * java.util.Map map = con.getTypeMap();
51  * map.put("mySchemaName.ATHLETES", Class.forName("Athletes"));
52  * con.setTypeMap(map);
53  * </pre>
54  *
55  * @see DriverManager#getConnection
56  * @see Statement
57  * @see ResultSet
58  * @see DatabaseMetaData
59  *
60  * <br><br>
61  * <B>Last Updated </B>
62  * <U> Dec. 20,2004 | Feb. 9,2004 (pstmt pooling)</U><br>
63  * <I>Purpose :To provide method synchronization . </I><br>
64  * <B>Author</B> Manoj Kr. Sheoran<br>
65  *
66  *
67  *
68  */

69 public class DaffodilDBConnection
70     implements java.sql.Connection JavaDoc {
71
72   private _Connection connection;
73   private boolean close;
74   private SQLWarning sqlWarnings;
75
76   private int transactionIsolationLevel = TRANSACTION_READ_COMMITTED;
77   private boolean readOnly;
78   private boolean autoCommit;
79   private String JavaDoc url;
80   static boolean verbose;
81   private static PrintWriter JavaDoc printWriter;
82   Locale JavaDoc locale;
83   private DatabaseMetaData dataBaseMetaData;
84   boolean statementCached = false;
85
86   HashMap cached_pstmt = new HashMap();
87
88   public DaffodilDBConnection(boolean isCacheEnabled, String JavaDoc url,
89                               _Connection connection) throws SQLException {
90     this(url, connection);
91     statementCached = isCacheEnabled;
92   }
93
94   public DaffodilDBConnection(String JavaDoc url, _Connection connection) throws
95       SQLException {
96     this.connection = connection;
97     this.close = false;
98     this.autoCommit = true;
99     this.url = url;
100     try {
101       String JavaDoc countryString = System.getProperty("country");
102       String JavaDoc languageString = System.getProperty("language");
103       if (countryString != null && languageString != null)
104         locale = new Locale JavaDoc(languageString, countryString);
105       else
106         locale = Locale.getDefault();
107       connection.setTransactionIsolation(transactionIsolationLevel);
108       connection.setAutoCommit(true);
109     }
110     catch (DException ex) {
111       throw ex.getSqlException(getLocale());
112     }
113   }
114
115   public DaffodilDBConnection(String JavaDoc url, _Connection connection,
116                               boolean autoCommit0) throws
117       SQLException {
118     this.connection = connection;
119     this.close = false;
120     this.autoCommit = autoCommit0;
121     this.url = url;
122     try {
123       String JavaDoc countryString = System.getProperty("country");
124       String JavaDoc languageString = System.getProperty("language");
125       if (countryString != null && languageString != null)
126         locale = new Locale JavaDoc(languageString, countryString);
127       else
128         locale = Locale.getDefault();
129       connection.setTransactionIsolation(transactionIsolationLevel);
130       connection.setAutoCommit(autoCommit0);
131     }
132     catch (DException ex) {
133       throw ex.getSqlException(getLocale());
134     }
135   }
136
137   /**
138    * Used for External Java Procedures.*/

139   public DaffodilDBConnection(_Connection connection) throws
140       SQLException {
141     this.connection = connection;
142     this.close = false;
143     this.url = url;
144   }
145
146   protected void finalize() {
147     try {
148       if (printWriter != null) {
149         printWriter.flush();
150         printWriter.close();
151       }
152     }
153     catch (Exception JavaDoc e) {
154     }
155   }
156
157   /**
158    * Creates a <code>Statement</code> object for sending
159    * SQL statements to the database.
160    * SQL statements without parameters are normally
161    * executed using <code>Statement</code> objects. If the same SQL statement
162    * is executed many times, it may be more efficient to use a
163    * <code>PreparedStatement</code> object.
164    * <P>
165    * Result sets created using the returned <code>Statement</code>
166    * object will by default be type <code>TYPE_FORWARD_ONLY</code>
167    * and have a concurrency level of <code>CONCUR_READ_ONLY</code>.
168    *
169    * @return a new default <code>Statement</code> object
170    * @exception SQLException if a database access error occurs
171    */

172   public synchronized Statement createStatement() throws SQLException {
173     verifyConnection();
174     return new DaffodilDBStatement(this);
175   }
176
177   /**
178    * Creates a <code>PreparedStatement</code> object for sending
179    * parameterized SQL statements to the database.
180    * <P>
181    * A SQL statement with or without IN parameters can be
182    * pre-compiled and stored in a <code>PreparedStatement</code> object. This
183    * object can then be used to efficiently execute this statement
184    * multiple times.
185    *
186    * <P><B>Note:</B> This method is optimized for handling
187    * parametric SQL statements that benefit from precompilation. If
188    * the driver supports precompilation,
189    * the method <code>prepareStatement</code> will send
190    * the statement to the database for precompilation. Some drivers
191    * may not support precompilation. In this case, the statement may
192    * not be sent to the database until the <code>PreparedStatement</code>
193    * object is executed. This has no direct effect on users; however, it does
194    * affect which methods throw certain <code>SQLException</code> objects.
195    * <P>
196    * Result sets created using the returned <code>PreparedStatement</code>
197    * object will by default be type <code>TYPE_FORWARD_ONLY</code>
198    * and have a concurrency level of <code>CONCUR_READ_ONLY</code>.
199    *
200    * @param sql an SQL statement that may contain one or more '?' IN
201    * parameter placeholders
202    * @return a new default <code>PreparedStatement</code> object containing the
203    * pre-compiled SQL statement
204    * @exception SQLException if a database access error occurs
205    */

206   public synchronized java.sql.PreparedStatement JavaDoc prepareStatement(String JavaDoc sql) throws
207       SQLException {
208     verifyConnection();
209     if (!statementCached)
210       return new DaffodilDBPreparedStatement(this, sql);
211     Object JavaDoc pstmt = getCachedPreparedStatement(Utilities.calculatehashCode(sql,ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY,1));
212     return pstmt != null ? returnPreparedStatement( (DaffodilDBPreparedStatement) pstmt) :
213         new DaffodilDBPreparedStatement(this, sql);
214   }
215
216   /**
217    * Creates a <code>CallableStatement</code> object for calling
218    * database stored procedures.
219    * The <code>CallableStatement</code> object provides
220    * methods for setting up its IN and OUT parameters, and
221    * methods for executing the call to a stored procedure.
222    *
223    * <P><B>Note:</B> This method is optimized for handling stored
224    * procedure call statements. Some drivers may send the call
225    * statement to the database when the method <code>prepareCall</code>
226    * is done; others
227    * may wait until the <code>CallableStatement</code> object
228    * is executed. This has no
229    * direct effect on users; however, it does affect which method
230    * throws certain SQLExceptions.
231    * <P>
232    * Result sets created using the returned <code>CallableStatement</code>
233    * object will by default be type <code>TYPE_FORWARD_ONLY</code>
234    * and have a concurrency level of <code>CONCUR_READ_ONLY</code>.
235    *
236    * @param sql an SQL statement that may contain one or more '?'
237    * parameter placeholders. Typically this statement is a JDBC
238    * function call escape string.
239    * @return a new default <code>CallableStatement</code> object containing the
240    * pre-compiled SQL statement
241    * @exception SQLException if a database access error occurs
242    */

243   public synchronized CallableStatement prepareCall(String JavaDoc sql) throws
244       SQLException {
245     verifyConnection();
246     return new DaffodilDBCallableStatement(this, sql);
247   }
248
249   /**
250    * Converts the given SQL statement into the system's native SQL grammar.
251    * A driver may convert the JDBC SQL grammar into its system's
252    * native SQL grammar prior to sending it. This method returns the
253    * native form of the statement that the driver would have sent.
254    *
255    * @param sql an SQL statement that may contain one or more '?'
256    * parameter placeholders
257    * @return the native form of this statement
258    * @exception SQLException if a database access error occurs
259    *
260        * to convert sqlString in Native String i.e ? to be replaced by % in our case
261    * @ todo nativeSQL
262    * To be supported and not to return same as given
263    */

264   public synchronized String JavaDoc nativeSQL(String JavaDoc sql) throws SQLException {
265     verifyConnection();
266     return EscapeParser.parse(sql);
267   }
268
269   /**
270    * Sets this connection's auto-commit mode to the given state.
271    * If a connection is in auto-commit mode, then all its SQL
272    * statements will be executed and committed as individual
273    * transactions. Otherwise, its SQL statements are grouped into
274    * transactions that are terminated by a call to either
275    * the method <code>commit</code> or the method <code>rollback</code>.
276    * By default, new connections are in auto-commit
277    * mode.
278    * <P>
279    * The commit occurs when the statement completes or the next
280    * execute occurs, whichever comes first. In the case of
281    * statements returning a <code>ResultSet</code> object,
282    * the statement completes when the last row of the
283    * <code>ResultSet</code> object has been retrieved or the
284    * <code>ResultSet</code> object has been closed. In advanced cases, a single
285    * statement may return multiple results as well as output
286    * parameter values. In these cases, the commit occurs when all results and
287    * output parameter values have been retrieved.
288    * <P>
289    * <B>NOTE:</B> If this method is called during a transaction, the
290    * transaction is committed.
291    *
292    * @param autoCommit <code>true</code> to enable auto-commit mode;
293    * <code>false</code> to disable it
294    * @exception SQLException if a database access error occurs
295    * @see #getAutoCommit
296    */

297   public synchronized void setAutoCommit(boolean autoCommit) throws
298       SQLException {
299     verifyConnection();
300     try {
301       if (this.autoCommit != autoCommit) {
302         this.autoCommit = autoCommit;
303         connection.setAutoCommit(autoCommit);
304       }
305     }
306     catch (DException ex) {
307       throw ex.getSqlException(getLocale());
308     }
309   }
310
311   /**
312    * Retrieves the current auto-commit mode for this <code>Connection</code>
313    * object.
314    *
315    * @return the current state of this <code>Connection</code> object's
316    * auto-commit mode
317    * @exception SQLException if a database access error occurs
318    * @see #setAutoCommit
319    */

320   public synchronized boolean getAutoCommit() throws SQLException {
321     verifyConnection();
322     return autoCommit;
323   }
324
325   /**
326    * Makes all changes made since the previous
327    * commit/rollback permanent and releases any database locks
328    * currently held by this <code>Connection</code> object.
329    * This method should be
330    * used only when auto-commit mode has been disabled.
331    *
332    * @exception SQLException if a database access error occurs or this
333    * <code>Connection</code> object is in auto-commit mode
334    * @see #setAutoCommit
335    */

336
337   /**
338    * the Exception is not throw in case connection object is auto-commit as,
339    * it was not thrown on jdbc.odbc sql driver and also on pointbase
340    */

341
342   /** @todo pradeep What about the warning case */
343   public synchronized void commit() throws SQLException {
344     verifyConnection();
345     if (autoCommit) {
346       DException dex = new DException("DSE28", null);
347       addWarning(new SQLWarning(dex.getMessage(locale), "01000"));
348     }
349     try {
350       connection.commit();
351     }
352     catch (DException e) {
353       throw e.getSqlException(getLocale());
354     }
355   }
356
357   /**
358    * Undoes all changes made in the current transaction
359    * and releases any database locks currently held
360    * by this <code>Connection</code> object. This method should be
361    * used only when auto-commit mode has been disabled.
362    *
363    * @exception SQLException if a database access error occurs or this
364    * <code>Connection</code> object is in auto-commit mode
365    * @see #setAutoCommit
366    */

367   /** @todo pradeep What about the warning case */
368   public synchronized void rollback() throws SQLException {
369     verifyConnection();
370     try {
371       if (autoCommit) {
372         DException dex = new DException("DSE28", null);
373         addWarning(new SQLWarning(dex.getMessage(locale), "01000"));
374       }
375       connection.rollback();
376     }
377     catch (DException e) {
378       throw e.getSqlException(getLocale());
379     }
380   }
381
382   /**
383    * Releases this <code>Connection</code> object's database and JDBC resources
384    * immediately instead of waiting for them to be automatically released.
385    * <P>
386    * Calling the method <code>close</code> on a <code>Connection</code>
387    * object that is already closed is a no-op.
388    * <P>
389    * <B>Note:</B> A <code>Connection</code> object is automatically
390    * closed when it is garbage collected. Certain fatal errors also
391    * close a <code>Connection</code> object.
392    *
393    * @exception SQLException if a database access error occurs
394    */

395   public synchronized void close() throws SQLException {
396     if (isClosed())
397       return;
398     try {
399       try {
400         if (printWriter != null) {
401           printWriter.flush();
402           printWriter.close();
403         }
404       }
405       catch (Exception JavaDoc e) {
406       }
407       synchronized (connection) {
408         connection.close();
409       }
410       connection = null;
411       close = true;
412       System.gc();
413       Runtime.getRuntime().gc();
414     }
415     catch (DException e) {
416       throw e.getSqlException(getLocale());
417     }
418   }
419
420   /**
421    * Retrieves whether this <code>Connection</code> object has been
422    * closed. A connection is closed if the method <code>close</code>
423    * has been called on it or if certain fatal errors have occurred.
424    * This method is guaranteed to return <code>true</code> only when
425    * it is called after the method <code>Connection.close</code> has
426    * been called.
427    * <P>
428    * This method generally cannot be called to determine whether a
429    * connection to a database is valid or invalid. A typical client
430    * can determine that a connection is invalid by catching any
431    * exceptions that might be thrown when an operation is attempted.
432    *
433    * @return <code>true</code> if this <code>Connection</code> object
434    * is closed; <code>false</code> if it is still open
435    * @exception SQLException if a database access error occurs
436    */

437   public synchronized boolean isClosed() throws SQLException {
438     return close;
439   }
440
441
442   /**
443    * Retrieves a <code>DatabaseMetaData</code> object that contains
444    * metadata about the database to which this
445    * <code>Connection</code> object represents a connection.
446    * The metadata includes information about the database's
447    * tables, its supported SQL grammar, its stored
448    * procedures, the capabilities of this connection, and so on.
449    *
450    * @return a <code>DatabaseMetaData</code> object for this
451    * <code>Connection</code> object
452    * @exception SQLException if a database access error occurs
453    */

454   public synchronized DatabaseMetaData getMetaData() throws SQLException {
455     verifyConnection();
456     if (dataBaseMetaData == null) {
457       try {
458         dataBaseMetaData = new DaffodilDBDatabaseMetaData(this,
459             new DaffodilDBConnection(url, connection.getSystemConnection(), false),
460             url);
461       }
462       catch (DException ex) {
463         throw ex.getSqlException(getLocale());
464       }
465     }
466     return dataBaseMetaData;
467   }
468
469   /**
470    * Puts this connection in read-only mode as a hint to the driver to enable
471    * database optimizations.
472    *
473    * <P><B>Note:</B> This method cannot be called during a transaction.
474    *
475    * @param readOnly <code>true</code> enables read-only mode;
476    * <code>false</code> disables it
477    * @exception SQLException if a database access error occurs or this
478    * method is called during a transaction
479    */

480   public synchronized void setReadOnly(boolean readOnly0) throws SQLException {
481     verifyConnection();
482     /*Work done for Compiere branch because due to some problem in Compiere CRM -- Manoj kr. ; Nov. 30 ,2004 ; 1:13 P.M.*/
483     /* try {
484              if (readOnly0 != readOnly) {
485                 connection.execute("SET TRANSACTION " +
486          (readOnly0 ? "READ ONLY" : "READ WRITE"), 0, 0);
487              }
488           } catch (DException ex) {
489              throw ex.getSqlException(locale);
490           }
491           this.readOnly = readOnly0;
492      */

493   }
494
495   /**
496    * Retrieves whether this <code>Connection</code>
497    * object is in read-only mode.
498    *
499    * @return <code>true</code> if this <code>Connection</code> object
500    * is read-only; <code>false</code> otherwise
501    * @exception SQLException if a database access error occurs
502    */

503   public synchronized boolean isReadOnly() throws SQLException {
504     verifyConnection();
505     return readOnly;
506   }
507
508   /**
509    * Sets the given catalog name in order to select
510    * a subspace of this <code>Connection</code> object's database
511    * in which to work.
512    * <P>
513    * If the driver does not support catalogs, it will
514    * silently ignore this request.
515    *
516    * @param catalog the name of a catalog (subspace in this
517    * <code>Connection</code> object's database) in which to work
518    * @exception SQLException if a database access error occurs
519    * @see #getCatalog
520    */

521   public synchronized void setCatalog(String JavaDoc catalog) throws SQLException {
522     try {
523       verifyConnection();
524       connection.setCurrentCatalog(catalog);
525     }
526     catch (DException e) {
527       throw e.getSqlException(getLocale());
528     }
529   }
530
531   /**
532    * Retrieves this <code>Connection</code> object's current catalog name.
533    *
534    * @return the current catalog name or <code>null</code> if there is none
535    * @exception SQLException if a database access error occurs
536    * @see #setCatalog
537    */

538   public synchronized String JavaDoc getCatalog() throws SQLException {
539     try {
540       verifyConnection();
541       return connection.getCurrentCatalog();
542     }
543     catch (DException e) {
544       throw e.getSqlException(getLocale());
545     }
546   }
547
548   /**
549    * Attempts to change the transaction isolation level for this
550    * <code>Connection</code> object to the one given.
551    * The constants defined in the interface <code>Connection</code>
552    * are the possible transaction isolation levels.
553    * <P>
554    * <B>Note:</B> If this method is called during a transaction, the result
555    * is implementation-defined.
556    *
557    * @param level one of the following <code>Connection</code> constants:
558    * <code>Connection.TRANSACTION_READ_UNCOMMITTED</code>,
559    * <code>Connection.TRANSACTION_READ_COMMITTED</code>,
560    * <code>Connection.TRANSACTION_REPEATABLE_READ</code>, or
561    * <code>Connection.TRANSACTION_SERIALIZABLE</code>.
562    * (Note that <code>Connection.TRANSACTION_NONE</code> cannot be used
563    * because it specifies that transactions are not supported.)
564    * @exception SQLException if a database access error occurs
565        * or the given parameter is not one of the <code>Connection</code>
566    * constants
567    * @see DatabaseMetaData#supportsTransactionIsolationLevel
568    * @see #getTransactionIsolation
569    */

570   public synchronized void setTransactionIsolation(int level) throws
571       SQLException {
572     verifyConnection();
573     try {
574       if (getTransactionIsolation() != level) {
575         synchronized (cached_pstmt) {
576           cached_pstmt.clear();
577         }
578       }
579
580       transactionIsolationLevel = level;
581       connection.setTransactionIsolation(level);
582     }
583     catch (DException e) {
584       throw e.getSqlException(getLocale());
585     }
586   }
587
588   /**
589    * Retrieves this <code>Connection</code> object's current
590    * transaction isolation level.
591    *
592    * @return the current transaction isolation level, which will be one
593    * of the following constants:
594    * <code>Connection.TRANSACTION_READ_UNCOMMITTED</code>,
595    * <code>Connection.TRANSACTION_READ_COMMITTED</code>,
596    * <code>Connection.TRANSACTION_REPEATABLE_READ</code>,
597    * <code>Connection.TRANSACTION_SERIALIZABLE</code>, or
598    * <code>Connection.TRANSACTION_NONE</code>.
599    * @exception SQLException if a database access error occurs
600    * @see #setTransactionIsolation
601    */

602   public synchronized int getTransactionIsolation() throws SQLException {
603     verifyConnection();
604     try {
605       return connection.getIsolationLevel();
606     }
607     catch (DException e) {
608       throw e.getSqlException(getLocale());
609     }
610   }
611
612   /**
613    * Retrieves the first warning reported by calls on this
614    * <code>Connection</code> object. If there is more than one
615    * warning, subsequent warnings will be chained to the first one
616    * and can be retrieved by calling the method
617    * <code>SQLWarning.getNextWarning</code> on the warning
618    * that was retrieved previously.
619    * <P>
620    * This method may not be
621    * called on a closed connection; doing so will cause an
622    * <code>SQLException</code> to be thrown.
623    *
624    * <P><B>Note:</B> Subsequent warnings will be chained to this
625    * SQLWarning.
626    *
627    * @return the first <code>SQLWarning</code> object or <code>null</code>
628    * if there are none
629    * @exception SQLException if a database access error occurs or
630    * this method is called on a closed connection
631    * @see SQLWarning
632    */

633   public synchronized SQLWarning getWarnings() throws SQLException {
634     verifyConnection();
635     return sqlWarnings;
636   }
637
638   /**
639    * Clears all warnings reported for this <code>Connection</code> object.
640    * After a call to this method, the method <code>getWarnings</code>
641    * returns <code>null</code> until a new warning is
642    * reported for this <code>Connection</code> object.
643    *
644    * @exception SQLException if a database access error occurs
645    */

646   public synchronized void clearWarnings() throws SQLException {
647     verifyConnection();
648     sqlWarnings = null;
649   }
650
651
652   /**
653    * Creates a <code>Statement</code> object that will generate
654    * <code>ResultSet</code> objects with the given type and concurrency.
655    * This method is the same as the <code>createStatement</code> method
656    * above, but it allows the default result set
657    * type and concurrency to be overridden.
658    *
659    * @param resultSetType a result set type; one of
660    * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
661    * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
662    * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
663    * @param resultSetConcurrency a concurrency type; one of
664    * <code>ResultSet.CONCUR_READ_ONLY</code> or
665    * <code>ResultSet.CONCUR_UPDATABLE</code>
666    * @return a new <code>Statement</code> object that will generate
667    * <code>ResultSet</code> objects with the given type and
668    * concurrency
669    * @exception SQLException if a database access error occurs
670    * or the given parameters are not <code>ResultSet</code>
671    * constants indicating type and concurrency
672    * @since 1.2
673    */

674   public synchronized Statement createStatement(int resultSetType,
675                                                 int resultSetConcurrency) throws
676       SQLException {
677     verifyConnection();
678     return new DaffodilDBStatement(this, resultSetType, resultSetConcurrency);
679   }
680
681   /**
682    *
683    * Creates a <code>PreparedStatement</code> object that will generate
684    * <code>ResultSet</code> objects with the given type and concurrency.
685    * This method is the same as the <code>prepareStatement</code> method
686    * above, but it allows the default result set
687    * type and concurrency to be overridden.
688    *
689    * @param sql a <code>String</code> object that is the SQL statement to
690    * be sent to the database; may contain one or more ? IN
691    * parameters
692    * @param resultSetType a result set type; one of
693    * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
694    * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
695    * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
696    * @param resultSetConcurrency a concurrency type; one of
697    * <code>ResultSet.CONCUR_READ_ONLY</code> or
698    * <code>ResultSet.CONCUR_UPDATABLE</code>
699    * @return a new PreparedStatement object containing the
700    * pre-compiled SQL statement that will produce <code>ResultSet</code>
701    * objects with the given type and concurrency
702    * @exception SQLException if a database access error occurs
703    * or the given parameters are not <code>ResultSet</code>
704    * constants indicating type and concurrency
705    * @since 1.2
706    */

707   public synchronized java.sql.PreparedStatement JavaDoc prepareStatement(String JavaDoc sql,
708       int resultSetType, int resultSetConcurrency) throws SQLException {
709     verifyConnection();
710     if (!statementCached)
711       return new DaffodilDBPreparedStatement(this, sql, resultSetType,
712                                              resultSetConcurrency);
713
714     Object JavaDoc pstmt = getCachedPreparedStatement(Utilities.calculatehashCode(sql,resultSetType,resultSetConcurrency,1));
715     return pstmt != null ? returnPreparedStatement( (DaffodilDBPreparedStatement) pstmt) :
716         new DaffodilDBPreparedStatement(this, sql, resultSetType,
717                                         resultSetConcurrency);
718   }
719
720   /**
721    * Creates a <code>CallableStatement</code> object that will generate
722    * <code>ResultSet</code> objects with the given type and concurrency.
723    * This method is the same as the <code>prepareCall</code> method
724    * above, but it allows the default result set
725    * type and concurrency to be overridden.
726    *
727    * @param sql a <code>String</code> object that is the SQL statement to
728    * be sent to the database; may contain on or more ? parameters
729    * @param resultSetType a result set type; one of
730    * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
731    * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
732    * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
733    * @param resultSetConcurrency a concurrency type; one of
734    * <code>ResultSet.CONCUR_READ_ONLY</code> or
735    * <code>ResultSet.CONCUR_UPDATABLE</code>
736    * @return a new <code>CallableStatement</code> object containing the
737    * pre-compiled SQL statement that will produce <code>ResultSet</code>
738    * objects with the given type and concurrency
739    * @exception SQLException if a database access error occurs
740    * or the given parameters are not <code>ResultSet</code>
741    * constants indicating type and concurrency
742    * @since 1.2
743    */

744   public synchronized CallableStatement prepareCall(String JavaDoc sql,
745       int resultSetType,
746       int resultSetConcurrency) throws
747       SQLException {
748     verifyConnection();
749     return new DaffodilDBCallableStatement(this, sql, resultSetType,
750                                            resultSetConcurrency);
751   }
752
753   /**
754    * Retrieves the <code>Map</code> object associated with this
755    * <code>Connection</code> object.
756    * Unless the application has added an entry, the type map returned
757    * will be empty.
758    *
759    * @return the <code>java.util.Map</code> object associated
760    * with this <code>Connection</code> object
761    * @exception SQLException if a database access error occurs
762    * @since 1.2
763    * @see #setTypeMap
764    */

765   public synchronized java.util.Map JavaDoc getTypeMap() throws SQLException {
766     return new HashMap();
767   }
768
769   /**
770    * Installs the given <code>TypeMap</code> object as the type map for
771    * this <code>Connection</code> object. The type map will be used for the
772    * custom mapping of SQL structured types and distinct types.
773    *
774    * @param map the <code>java.util.Map</code> object to install
775    * as the replacement for this <code>Connection</code>
776    * object's default type map
777    * @exception SQLException if a database access error occurs or
778    * the given parameter is not a <code>java.util.Map</code>
779    * object
780    * @since 1.2
781    * @see #getTypeMap
782    */

783   public synchronized void setTypeMap(java.util.Map JavaDoc map) throws SQLException {
784     DException dex = new DException("DSE16", new Object JavaDoc[] {"setTypeMap"});
785     throw dex.getSqlException(getLocale());
786   }
787
788   /**--------------------------
789    * JDBC 3.0
790    * --------------------------
791    */

792
793   /**
794    * Changes the holdability of <code>ResultSet</code> objects
795    * created using this <code>Connection</code> object to the given
796    * holdability.
797    *
798    * @param holdability a <code>ResultSet</code> holdability constant; one of
799    * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
800    * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
801    * @throws SQLException if a database access occurs, the given parameter
802    * is not a <code>ResultSet</code> constant indicating holdability,
803    * or the given holdability is not supported
804    * @see #getHoldability
805    * @see ResultSet
806    * @since 1.4
807    */

808
809   /** @todo pradeep Unsupported */
810   public synchronized void setHoldability(int holdability) throws SQLException {
811     throw new SQLException("Feature Not Supported", "0A000");
812   }
813
814   /**
815    * Retrieves the current holdability of <code>ResultSet</code> objects
816    * created using this <code>Connection</code> object.
817    *
818    * @return the holdability, one of
819    * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
820    * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
821    * @throws SQLException if a database access occurs
822    * @see #setHoldability
823    * @see ResultSet
824    * @since 1.4
825    */

826   /** @todo pradeep Unsupported */
827   public synchronized int getHoldability() throws SQLException {
828     throw new SQLException("Feature Not Supported", "0A000");
829   }
830
831   /**
832    * Creates an unnamed savepoint in the current transaction and
833    * returns the new <code>Savepoint</code> object that represents it.
834    *
835    * @return the new <code>Savepoint</code> object
836    * @exception SQLException if a database access error occurs
837    * or this <code>Connection</code> object is currently in
838    * auto-commit mode
839    * @see Savepoint
840    * @since 1.4
841    */

842   public synchronized Savepoint setSavepoint() throws SQLException {
843     try {
844       String JavaDoc savePointName = connection.setSavePoint();
845       Class JavaDoc cl = Class.forName("in.co.daffodil.db.jdbc.DaffodilDBSavepoint");
846       Constructor cons = cl.getConstructor(new Class JavaDoc[] {String JavaDoc.class});
847       Object JavaDoc obj = cons.newInstance(new Object JavaDoc[] {savePointName});
848       return (Savepoint) obj;
849     }
850     catch (DException ex) {
851       throw ex.getSqlException(getLocale());
852     }
853     catch (Exception JavaDoc ex) {
854       return null;
855     }
856   }
857
858   /**
859    * Creates a savepoint with the given name in the current transaction
860    * and returns the new <code>Savepoint</code> object that represents it.
861    *
862    * @param name a <code>String</code> containing the name of the savepoint
863    * @return the new <code>Savepoint</code> object
864    * @exception SQLException if a database access error occurs
865    * or this <code>Connection</code> object is currently in
866    * auto-commit mode
867    * @see Savepoint
868    * @since 1.4
869    */

870   public synchronized Savepoint setSavepoint(String JavaDoc savePointName) throws
871       SQLException {
872     try {
873       connection.setSavePoint(savePointName);
874       Class JavaDoc cl = Class.forName("in.co.daffodil.db.jdbc.DaffodilDBSavepoint");
875       Constructor cons = cl.getConstructor(new Class JavaDoc[] {String JavaDoc.class});
876       Object JavaDoc obj = cons.newInstance(new Object JavaDoc[] {savePointName});
877       return (Savepoint) obj;
878     }
879     catch (DException ex) {
880       throw ex.getSqlException(getLocale());
881     }
882     catch (Exception JavaDoc ex) {
883       return null;
884     }
885   }
886
887   /**
888    * Undoes all changes made after the given <code>Savepoint</code> object
889    * was set.
890    * <P>
891    * This method should be used only when auto-commit has been disabled.
892    *
893    * @param savepoint the <code>Savepoint</code> object to roll back to
894    * @exception SQLException if a database access error occurs,
895    * the <code>Savepoint</code> object is no longer valid,
896    * or this <code>Connection</code> object is currently in
897    * auto-commit mode
898    * @see Savepoint
899    * @see #rollback
900    * @since 1.4
901    */

902   public synchronized void rollback(Savepoint savepoint) throws SQLException {
903     try {
904       connection.rollbackSavePoint(savepoint.getSavepointName());
905     }
906     catch (DException ex) {
907       throw ex.getSqlException(getLocale());
908     }
909   }
910
911   /**
912    * Removes the given <code>Savepoint</code> object from the current
913    * transaction. Any reference to the savepoint after it have been removed
914    * will cause an <code>SQLException</code> to be thrown.
915    *
916    * @param savepoint the <code>Savepoint</code> object to be removed
917    * @exception SQLException if a database access error occurs or
918    * the given <code>Savepoint</code> object is not a valid
919    * savepoint in the current transaction
920    * @since 1.4
921    */

922   public synchronized void releaseSavepoint(Savepoint savepoint) throws
923       SQLException {
924     try {
925       connection.releaseSavePoint(savepoint.getSavepointName());
926     }
927     catch (DException ex) {
928       throw ex.getSqlException(getLocale());
929     }
930   }
931
932   /**
933    * Creates a <code>Statement</code> object that will generate
934    * <code>ResultSet</code> objects with the given type, concurrency,
935    * and holdability.
936    * This method is the same as the <code>createStatement</code> method
937    * above, but it allows the default result set
938    * type, concurrency, and holdability to be overridden.
939    *
940    * @param resultSetType one of the following <code>ResultSet</code>
941    * constants:
942    * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
943    * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
944    * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
945    * @param resultSetConcurrency one of the following <code>ResultSet</code>
946    * constants:
947    * <code>ResultSet.CONCUR_READ_ONLY</code> or
948    * <code>ResultSet.CONCUR_UPDATABLE</code>
949    * @param resultSetHoldability one of the following <code>ResultSet</code>
950    * constants:
951    * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
952    * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
953    * @return a new <code>Statement</code> object that will generate
954    * <code>ResultSet</code> objects with the given type,
955    * concurrency, and holdability
956    * @exception SQLException if a database access error occurs
957    * or the given parameters are not <code>ResultSet</code>
958    * constants indicating type, concurrency, and holdability
959    * @see ResultSet
960    * @since 1.4
961    */

962   public synchronized Statement createStatement(int resultSetType,
963                                                 int resultSetConcurrency,
964                                                 int resultSetHoldability) throws
965       SQLException {
966     verifyConnection();
967     return new DaffodilDBStatement(this, resultSetType, resultSetConcurrency,
968                                    resultSetHoldability);
969   }
970
971   /**
972    * Creates a <code>PreparedStatement</code> object that will generate
973    * <code>ResultSet</code> objects with the given type, concurrency,
974    * and holdability.
975    * <P>
976    * This method is the same as the <code>prepareStatement</code> method
977    * above, but it allows the default result set
978    * type, concurrency, and holdability to be overridden.
979    *
980    * @param sql a <code>String</code> object that is the SQL statement to
981    * be sent to the database; may contain one or more ? IN
982    * parameters
983    * @param resultSetType one of the following <code>ResultSet</code>
984    * constants:
985    * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
986    * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
987    * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
988    * @param resultSetConcurrency one of the following <code>ResultSet</code>
989    * constants:
990    * <code>ResultSet.CONCUR_READ_ONLY</code> or
991    * <code>ResultSet.CONCUR_UPDATABLE</code>
992    * @param resultSetHoldability one of the following <code>ResultSet</code>
993    * constants:
994    * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
995    * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
996    * @return a new <code>PreparedStatement</code> object, containing the
997    * pre-compiled SQL statement, that will generate
998    * <code>ResultSet</code> objects with the given type,
999    * concurrency, and holdability
1000   * @exception SQLException if a database access error occurs
1001   * or the given parameters are not <code>ResultSet</code>
1002   * constants indicating type, concurrency, and holdability
1003   * @see ResultSet
1004   * @since 1.4
1005   */

1006  public synchronized java.sql.PreparedStatement JavaDoc prepareStatement(String JavaDoc sql,
1007      int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws
1008      SQLException {
1009    verifyConnection();
1010
1011    if (!statementCached)
1012      return new DaffodilDBPreparedStatement(this, sql, resultSetType,
1013                                             resultSetConcurrency,
1014                                             resultSetHoldability);
1015
1016    Object JavaDoc pstmt = getCachedPreparedStatement(Utilities.calculatehashCode(sql,resultSetType,resultSetConcurrency,resultSetHoldability));
1017    return pstmt != null ?returnPreparedStatement( (DaffodilDBPreparedStatement) pstmt):
1018        new DaffodilDBPreparedStatement(this, sql, resultSetType,
1019                                        resultSetConcurrency,
1020                                        resultSetHoldability);
1021  }
1022
1023  /**
1024   * Creates a <code>CallableStatement</code> object that will generate
1025   * <code>ResultSet</code> objects with the given type and concurrency.
1026   * This method is the same as the <code>prepareCall</code> method
1027   * above, but it allows the default result set
1028   * type, result set concurrency type and holdability to be overridden.
1029   *
1030   * @param sql a <code>String</code> object that is the SQL statement to
1031   * be sent to the database; may contain on or more ? parameters
1032   * @param resultSetType one of the following <code>ResultSet</code>
1033   * constants:
1034   * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
1035   * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
1036   * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
1037   * @param resultSetConcurrency one of the following <code>ResultSet</code>
1038   * constants:
1039   * <code>ResultSet.CONCUR_READ_ONLY</code> or
1040   * <code>ResultSet.CONCUR_UPDATABLE</code>
1041   * @param resultSetHoldability one of the following <code>ResultSet</code>
1042   * constants:
1043   * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
1044   * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
1045   * @return a new <code>CallableStatement</code> object, containing the
1046   * pre-compiled SQL statement, that will generate
1047   * <code>ResultSet</code> objects with the given type,
1048   * concurrency, and holdability
1049   * @exception SQLException if a database access error occurs
1050   * or the given parameters are not <code>ResultSet</code>
1051   * constants indicating type, concurrency, and holdability
1052   * @see ResultSet
1053   * @since 1.4
1054   */

1055  public synchronized CallableStatement prepareCall(String JavaDoc sql,
1056      int resultSetType,
1057      int resultSetConcurrency,
1058      int resultSetHoldability) throws
1059      SQLException {
1060    verifyConnection();
1061    return new DaffodilDBCallableStatement(this, sql, resultSetType,
1062                                           resultSetConcurrency,
1063                                           resultSetHoldability);
1064  }
1065
1066  /**
1067   * Creates a default <code>PreparedStatement</code> object that has
1068   * the capability to retrieve auto-generated keys. The given constant
1069   * tells the driver whether it should make auto-generated keys
1070   * available for retrieval. This parameter is ignored if the SQL
1071   * statement is not an <code>INSERT</code> statement.
1072   * <P>
1073   * <B>Note:</B> This method is optimized for handling
1074   * parametric SQL statements that benefit from precompilation. If
1075   * the driver supports precompilation,
1076   * the method <code>prepareStatement</code> will send
1077   * the statement to the database for precompilation. Some drivers
1078   * may not support precompilation. In this case, the statement may
1079   * not be sent to the database until the <code>PreparedStatement</code>
1080   * object is executed. This has no direct effect on users; however, it does
1081   * affect which methods throw certain SQLExceptions.
1082   * <P>
1083   * Result sets created using the returned <code>PreparedStatement</code>
1084   * object will by default be type <code>TYPE_FORWARD_ONLY</code>
1085   * and have a concurrency level of <code>CONCUR_READ_ONLY</code>.
1086   *
1087   * @param sql an SQL statement that may contain one or more '?' IN
1088   * parameter placeholders
1089   * @param autoGeneratedKeys a flag indicating whether auto-generated keys
1090   * should be returned; one of the following <code>Statement</code>
1091   * constants:
1092   * @param autoGeneratedKeys a flag indicating that auto-generated keys should be returned, one of
1093   * <code>Statement.RETURN_GENERATED_KEYS</code> or
1094   * <code>Statement.NO_GENERATED_KEYS</code>.
1095   * @return a new <code>PreparedStatement</code> object, containing the
1096   * pre-compiled SQL statement, that will have the capability of
1097   * returning auto-generated keys
1098   * @exception SQLException if a database access error occurs
1099   * or the given parameter is not a <code>Statement</code>
1100   * constant indicating whether auto-generated keys should be
1101   * returned
1102   * @since 1.4
1103   */

1104  public synchronized java.sql.PreparedStatement JavaDoc prepareStatement(String JavaDoc sql,
1105      int autoGeneratedKeys) throws SQLException {
1106    verifyConnection();
1107    return new DaffodilDBPreparedStatement(this, sql, autoGeneratedKeys);
1108  }
1109
1110  /**
1111   * Creates a default <code>PreparedStatement</code> object capable
1112   * of returning the auto-generated keys designated by the given array.
1113   * This array contains the indexes of the columns in the target
1114   * table that contain the auto-generated keys that should be made
1115   * available. This array is ignored if the SQL
1116   * statement is not an <code>INSERT</code> statement.
1117   * <P>
1118   * An SQL statement with or without IN parameters can be
1119   * pre-compiled and stored in a <code>PreparedStatement</code> object. This
1120   * object can then be used to efficiently execute this statement
1121   * multiple times.
1122   * <P>
1123   * <B>Note:</B> This method is optimized for handling
1124   * parametric SQL statements that benefit from precompilation. If
1125   * the driver supports precompilation,
1126   * the method <code>prepareStatement</code> will send
1127   * the statement to the database for precompilation. Some drivers
1128   * may not support precompilation. In this case, the statement may
1129   * not be sent to the database until the <code>PreparedStatement</code>
1130   * object is executed. This has no direct effect on users; however, it does
1131   * affect which methods throw certain SQLExceptions.
1132   * <P>
1133   * Result sets created using the returned <code>PreparedStatement</code>
1134   * object will by default be type <code>TYPE_FORWARD_ONLY</code>
1135   * and have a concurrency level of <code>CONCUR_READ_ONLY</code>.
1136   *
1137   * @param sql an SQL statement that may contain one or more '?' IN
1138   * parameter placeholders
1139   * @param columnIndexes an array of column indexes indicating the columns
1140   * that should be returned from the inserted row or rows
1141   * @return a new <code>PreparedStatement</code> object, containing the
1142   * pre-compiled statement, that is capable of returning the
1143   * auto-generated keys designated by the given array of column
1144   * indexes
1145   * @exception SQLException if a database access error occurs
1146   *
1147   * @since 1.4
1148   */

1149  public synchronized java.sql.PreparedStatement JavaDoc prepareStatement(String JavaDoc sql,
1150      int columnIndexes[]) throws SQLException {
1151    verifyConnection();
1152       return new DaffodilDBPreparedStatement(this, sql, columnIndexes);
1153  }
1154
1155  /**
1156   * Creates a default <code>PreparedStatement</code> object capable
1157   * of returning the auto-generated keys designated by the given array.
1158   * This array contains the names of the columns in the target
1159   * table that contain the auto-generated keys that should be returned.
1160   * This array is ignored if the SQL
1161   * statement is not an <code>INSERT</code> statement.
1162   * <P>
1163   * An SQL statement with or without IN parameters can be
1164   * pre-compiled and stored in a <code>PreparedStatement</code> object. This
1165   * object can then be used to efficiently execute this statement
1166   * multiple times.
1167   * <P>
1168   * <B>Note:</B> This method is optimized for handling
1169   * parametric SQL statements that benefit from precompilation. If
1170   * the driver supports precompilation,
1171   * the method <code>prepareStatement</code> will send
1172   * the statement to the database for precompilation. Some drivers
1173   * may not support precompilation. In this case, the statement may
1174   * not be sent to the database until the <code>PreparedStatement</code>
1175   * object is executed. This has no direct effect on users; however, it does
1176   * affect which methods throw certain SQLExceptions.
1177   * <P>
1178   * Result sets created using the returned <code>PreparedStatement</code>
1179   * object will by default be type <code>TYPE_FORWARD_ONLY</code>
1180   * and have a concurrency level of <code>CONCUR_READ_ONLY</code>.
1181   *
1182   * @param sql an SQL statement that may contain one or more '?' IN
1183   * parameter placeholders
1184   * @param columnNames an array of column names indicating the columns
1185   * that should be returned from the inserted row or rows
1186   * @return a new <code>PreparedStatement</code> object, containing the
1187   * pre-compiled statement, that is capable of returning the
1188   * auto-generated keys designated by the given array of column
1189   * names
1190   * @exception SQLException if a database access error occurs
1191   *
1192   * @since 1.4
1193   */

1194  public synchronized java.sql.PreparedStatement JavaDoc prepareStatement(String JavaDoc sql,
1195      String JavaDoc columnNames[]) throws SQLException {
1196      verifyConnection();
1197      return new DaffodilDBPreparedStatement(this, sql, columnNames);
1198  }
1199
1200  /*-------------- Methods for personal use of DaffodilDBConnection ----------------*/
1201
1202  public _Connection getServerConnection() {
1203    return connection;
1204  }
1205
1206  void setServerConnection(_Connection con) {
1207    connection = con;
1208  }
1209
1210  public _Connection get_Connection() throws SQLException {
1211    try {
1212      return connection.getSystemConnection();
1213    }
1214    catch (DException ex) {
1215      throw ex.getSqlException(locale);
1216    }
1217  }
1218
1219  void addWarning(SQLWarning warning) {
1220    if (sqlWarnings == null)
1221      sqlWarnings = warning;
1222    else
1223      sqlWarnings.setNextWarning(warning);
1224  }
1225
1226  static void println(String JavaDoc qry) {
1227    if (verbose)
1228         ;//// Removed By Program ** System.out.println("Processing : DaffodilDBCallableStatement.execute(" +
1229
}
1230
1231  /**
1232   *
1233       * @param modifier String Connection identification string (done for Arjuna Tech)
1234   * @param qry String
1235   */

1236  static void println(String JavaDoc modifier, String JavaDoc qry) {
1237    if (verbose)
1238         ;//// Removed By Program ** System.out.println("Processing : DaffodilDBCallableStatement.execute" +
1239
}
1240
1241  private final void verifyConnection() throws SQLException {
1242    if (close) {
1243      DException dex = new DException("DSE279", null);
1244      throw dex.getSqlException(getLocale());
1245    }
1246  }
1247
1248  Locale JavaDoc getLocale() {
1249    return locale;
1250  }
1251
1252  private Object JavaDoc getCachedPreparedStatement(Object JavaDoc key) {
1253    synchronized(cached_pstmt) {
1254      return cached_pstmt.remove(key);
1255    }
1256  }
1257
1258  public void addToCache(Object JavaDoc key, Object JavaDoc pstmt) {
1259    synchronized (cached_pstmt) {
1260      cached_pstmt.put(key, pstmt);
1261    }
1262  }
1263
1264  public boolean isStatementCachedEnabled(){
1265    return statementCached;
1266  }
1267
1268  public void enableStatementCache() {
1269    statementCached = true;
1270  }
1271
1272  public void disableStatementCache() {
1273    statementCached = false;
1274    synchronized (cached_pstmt) {
1275      cached_pstmt.clear();
1276    }
1277  }
1278
1279  private java.sql.PreparedStatement JavaDoc returnPreparedStatement(DaffodilDBPreparedStatement pstmt /*I will not null*/) throws SQLException{
1280      pstmt.setConnection(this);
1281      return pstmt;
1282  }
1283
1284
1285}
1286
Popular Tags