public interface IStatementCache
| Modifier and Type | Method and Description |
|---|---|
String |
calculateCacheKey(String sql,
int autoGeneratedKeys)
Returns a cache key.
|
String |
calculateCacheKey(String sql,
int[] columnIndexes)
Returns a cache key.
|
String |
calculateCacheKey(String sql,
int resultSetType,
int resultSetConcurrency)
Returns a cache key.
|
String |
calculateCacheKey(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Returns a cache key.
|
String |
calculateCacheKey(String sql,
String[] columnNames)
Calculates a cache key.
|
void |
checkForProperClosure()
Checks that the entries in the cache have been properly closed when the connection dies down.
|
void |
clear()
Clears the cache
|
StatementHandle |
get(String sql)
Retrieves the cached statement identified by the given key
|
StatementHandle |
get(String sql,
int autoGeneratedKeys)
Retrieves the cached statement identified by the given key
|
StatementHandle |
get(String sql,
int[] columnIndexes)
Retrieves the cached statement identified by the given key
|
StatementHandle |
get(String sql,
int resultSetType,
int resultSetConcurrency)
Retrieves the cached statement identified by the given key
|
StatementHandle |
get(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Retrieves the cached statement identified by the given key
|
StatementHandle |
get(String sql,
String[] columnNames)
Retrieves the cached statement identified by the given key
|
void |
putIfAbsent(String cacheKey,
StatementHandle statementHandle)
Wrapper for map putIfAbsent.
|
int |
size()
Returns size of the cache.
|
StatementHandle get(String sql)
sql - SQL statementint size()
void clear()
StatementHandle get(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
sql - SQL StatementresultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEresultSetHoldability - a ResultSet holdability constant; one of ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMITStatementHandle get(String sql, int resultSetType, int resultSetConcurrency)
sql - SQL StatementresultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEStatementHandle get(String sql, int autoGeneratedKeys)
sql - SQL StatementautoGeneratedKeys - a flag indicating whether auto-generated keys should be returned; one of Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYSStatementHandle get(String sql, int[] columnIndexes)
sql - SQL StatementcolumnIndexes - an array of column indexes indicating the columns that should be returned from the inserted row or rowsStatementHandle get(String sql, String[] columnNames)
sql - SQL StatementcolumnNames - an array of column names indicating the columns that should be returned from the inserted row or rowsString calculateCacheKey(String sql, String[] columnNames)
sql - SQL StatementcolumnNames - an array of column names indicating the columns that should be returned from the inserted row or rowsString calculateCacheKey(String sql, int[] columnIndexes)
sql - SQL StatementcolumnIndexes - an array of column indexes indicating the columns that should be returned from the inserted row or rowsString calculateCacheKey(String sql, int autoGeneratedKeys)
sql - SQL StatementautoGeneratedKeys - String calculateCacheKey(String sql, int resultSetType, int resultSetConcurrency)
sql - SQL StatementresultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEString calculateCacheKey(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
sql - SQL StatementresultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEresultSetHoldability - a ResultSet holdability constant; one of ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMITvoid checkForProperClosure()
void putIfAbsent(String cacheKey, StatementHandle statementHandle)
cacheKey - statementHandle - Copyright © 2009-2013 JolBox. All Rights Reserved.