|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IStatementCache
Interface to the JDBC statement cache.
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
StatementHandle get(String sql)
sql - SQL statement
int 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_COMMIT
StatementHandle 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_UPDATABLE
StatementHandle 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_KEYS
StatementHandle 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 rows
StatementHandle 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 rows
String 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 rows
String 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 rows
String 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_UPDATABLE
String 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_COMMIT
void checkForProperClosure()
void putIfAbsent(String cacheKey,
StatementHandle statementHandle)
cacheKey - statementHandle -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||