KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > appserver > server > sql > ExtendedDBConnection


1 /*
2  * Created on Jun 7, 2004
3  *
4  */

5 package com.lutris.appserver.server.sql;
6
7 import java.sql.*;
8
9 /**
10  * Extensions of DBConnection interface needed to avoid explicit casting
11  * to implementation class.
12  */

13 public interface ExtendedDBConnection extends DBConnection{
14     
15
16     /**
17      * Set new value for ConnectionEnterPoolTime.
18      *
19      * @param i New value.
20      */

21     public void setConnectionEnterPoolTime(long i);
22     
23     /**
24      * Return value off ConnectionEnterPoolTime.
25      *
26      * @return ConnectionEnterPoolTime value.
27      */

28     public long getConnectionEnterPoolTime();
29     
30
31     /**
32      * Set new value for connectionUsageCounter.
33      *
34      * @param i New value.
35      */

36     public void setConnectionUsageCounter(int i);
37     
38     /**
39      * Return value off connectionUsageCounter.
40      * @return ConnectionUsageCounter value.
41      */

42     public int getConnectionUsageCounter();
43
44     
45     /**
46      * Is connection droped.
47      *
48      * @return Is connection droped.
49      */

50     public boolean isDroped();
51     
52     /**
53      * Is connection closed.
54      *
55      * @return Is connection closed.
56      */

57     public boolean isClosed();
58
59
60     /**
61      * Get a prepared statement given an SQL string. If the statement is
62      * cached, return that statement, otherwise prepare and save in the
63      * cache.
64      *
65      * @param sql The SQL statement to prepared.
66      * @param iResultSetType a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE.
67      * @param iResultSetConcurrency a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE.
68      * @return The prepared statement, which is associated only with this
69      * connection and must not be used once the connection is released.
70      * @exception java.sql.SQLException If a SQL error occured compiling the
71      * statement.
72      */

73    public PreparedStatement prepareStatement(String JavaDoc sql, int iResultSetType, int iResultSetConcurrency)
74         throws SQLException;
75
76
77     /**
78      * @return Returns the maxPreparedStmts.
79      */

80     public int getMaxPreparedStmts() ;
81    
82 }
83
Popular Tags