public interface IStatementCache
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
calculateCacheKey(java.lang.String sql,
int autoGeneratedKeys)
Returns a cache key.
|
java.lang.String |
calculateCacheKey(java.lang.String sql,
int[] columnIndexes)
Returns a cache key.
|
java.lang.String |
calculateCacheKey(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Returns a cache key.
|
java.lang.String |
calculateCacheKey(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Returns a cache key.
|
java.lang.String |
calculateCacheKey(java.lang.String sql,
java.lang.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(java.lang.String sql)
Retrieves the cached statement identified by the given key
|
StatementHandle |
get(java.lang.String sql,
int autoGeneratedKeys)
Retrieves the cached statement identified by the given key
|
StatementHandle |
get(java.lang.String sql,
int[] columnIndexes)
Retrieves the cached statement identified by the given key
|
StatementHandle |
get(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Retrieves the cached statement identified by the given key
|
StatementHandle |
get(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Retrieves the cached statement identified by the given key
|
StatementHandle |
get(java.lang.String sql,
java.lang.String[] columnNames)
Retrieves the cached statement identified by the given key
|
void |
putIfAbsent(java.lang.String cacheKey,
StatementHandle statementHandle)
Wrapper for map putIfAbsent.
|
int |
size()
Returns size of the cache.
|
StatementHandle get(java.lang.String sql)
sql
- SQL statementint size()
void clear()
StatementHandle get(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String sql, java.lang.String[] columnNames)
sql
- SQL StatementcolumnNames
- an array of column names indicating the columns that should be returned from the inserted row or rowsjava.lang.String calculateCacheKey(java.lang.String sql, java.lang.String[] columnNames)
sql
- SQL StatementcolumnNames
- an array of column names indicating the columns that should be returned from the inserted row or rowsjava.lang.String calculateCacheKey(java.lang.String sql, int[] columnIndexes)
sql
- SQL StatementcolumnIndexes
- an array of column indexes indicating the columns that should be returned from the inserted row or rowsjava.lang.String calculateCacheKey(java.lang.String sql, int autoGeneratedKeys)
sql
- SQL StatementautoGeneratedKeys
- java.lang.String calculateCacheKey(java.lang.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_UPDATABLEjava.lang.String calculateCacheKey(java.lang.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(java.lang.String cacheKey, StatementHandle statementHandle)
cacheKey
- statementHandle
-