DODS 6.5 API

com.lutris.appserver.server.sql
Interface ExtendedDBConnection

All Superinterfaces:
DBConnection
All Known Implementing Classes:
DataSourceDBConnection, SimpleDataSourceDBConnection, SimpleDBConnection, StandardDBConnection

public interface ExtendedDBConnection
extends DBConnection

Extensions of DBConnection interface needed to avoid explicit casting to implementation class.


Method Summary
 long getConnectionEnterPoolTime()
          Return value off ConnectionEnterPoolTime.
 int getConnectionUsageCounter()
          Return value off connectionUsageCounter.
 int getMaxPreparedStmts()
           
 boolean isClosed()
          Is connection closed.
 boolean isDroped()
          Is connection droped.
 java.sql.PreparedStatement prepareStatement(java.lang.String sql, int iResultSetType, int iResultSetConcurrency)
          Get a prepared statement given an SQL string.
 void setConnectionEnterPoolTime(long i)
          Set new value for ConnectionEnterPoolTime.
 void setConnectionUsageCounter(int i)
          Set new value for connectionUsageCounter.
 
Methods inherited from interface com.lutris.appserver.server.sql.DBConnection
allocate, close, commit, execute, executeQuery, executeQuery, executeUpdate, executeUpdate, getConnection, getDatabaseName, getGeneration, getUrl, getUser, handleException, incrRequestCount, isMarkedForDrop, prepareCall, prepareStatement, release, reset, rollback, setAutoCommit, validate, warningCheck
 

Method Detail

setConnectionEnterPoolTime

public void setConnectionEnterPoolTime(long i)
Set new value for ConnectionEnterPoolTime.

Parameters:
i - New value.

getConnectionEnterPoolTime

public long getConnectionEnterPoolTime()
Return value off ConnectionEnterPoolTime.

Returns:
ConnectionEnterPoolTime value.

setConnectionUsageCounter

public void setConnectionUsageCounter(int i)
Set new value for connectionUsageCounter.

Parameters:
i - New value.

getConnectionUsageCounter

public int getConnectionUsageCounter()
Return value off connectionUsageCounter.

Returns:
ConnectionUsageCounter value.

isDroped

public boolean isDroped()
Is connection droped.

Returns:
Is connection droped.

isClosed

public boolean isClosed()
Is connection closed.

Returns:
Is connection closed.

prepareStatement

public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
                                                   int iResultSetType,
                                                   int iResultSetConcurrency)
                                            throws java.sql.SQLException
Get a prepared statement given an SQL string. If the statement is cached, return that statement, otherwise prepare and save in the cache.

Parameters:
sql - The SQL statement to prepared.
iResultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE.
iResultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE.
Returns:
The prepared statement, which is associated only with this connection and must not be used once the connection is released.
Throws:
java.sql.SQLException - If a SQL error occured compiling the statement.

getMaxPreparedStmts

public int getMaxPreparedStmts()
Returns:
Returns the maxPreparedStmts.

DODS 6.5 API