com.lutris.appserver.server.sql.pscache
Class PreparedStatementCache
java.lang.Object
com.lutris.appserver.server.sql.pscache.PreparedStatementCache
public class PreparedStatementCache
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PreparedStatementCache
public PreparedStatementCache(ExtendedDBConnection conn,
int maxPSCount)
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
extendedConnection and must not be used once the extendedConnection is released.
- Throws:
java.sql.SQLException
- If a SQL error occured compiling the
statement.
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
boolean autogenerate)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int iResultSetType,
int iResultSetConcurrency,
boolean tuned,
boolean autogenerated)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
releaseStatement
public void releaseStatement(CachedPreparedStatement psForRelease)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
close
public void close()
clean
public void clean()