Class StatementKey
- java.lang.Object
-
- org.apache.derby.client.am.stmtcache.StatementKey
-
public class StatementKey extends java.lang.ObjectA key representing ajava.sql.PreparedStatementor ajava.sql.CallableStatement.The key takes a number of statement related attributes into account, and is used to insert and look up cached statement objects in the JDBC statement cache.
Key instances are created by a statement key factory.
- See Also:
StatementKeyFactory
-
-
Field Summary
Fields Modifier and Type Field Description private intautogeneratedKeysTells if the associated statement returns auto-generated keys.private intconcurrencyThe result set concurrency for the statement.private intholdabilityResult set holdability for the statement.private booleanisCallableStatementTells if the key represents aCallableStatement.private java.lang.StringschemaThe compilation schema for the statement.private java.lang.StringsqlThe SQL query of the statement.private inttypeThe result set type for the statement.
-
Constructor Summary
Constructors Constructor Description StatementKey(boolean isCallableStatement, java.lang.String sql, java.lang.String schema, int rsType, int rsConcurrency, int rsHoldability, int autogeneratedKeys)Creates a statement key with all the common properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
isCallableStatement
private final boolean isCallableStatement
Tells if the key represents aCallableStatement.
-
sql
private final java.lang.String sql
The SQL query of the statement.
-
schema
private final java.lang.String schema
The compilation schema for the statement.
-
type
private final int type
The result set type for the statement.
-
concurrency
private final int concurrency
The result set concurrency for the statement.
-
holdability
private final int holdability
Result set holdability for the statement.
-
autogeneratedKeys
private final int autogeneratedKeys
Tells if the associated statement returns auto-generated keys.
-
-
Constructor Detail
-
StatementKey
StatementKey(boolean isCallableStatement, java.lang.String sql, java.lang.String schema, int rsType, int rsConcurrency, int rsHoldability, int autogeneratedKeys)Creates a statement key with all the common properties.- Parameters:
isCallableStatement-trueis this is a key for ajava.sql.CallableStatementsql- SQL query stringschema- compilation schemarsType- result set typersConcurrency- result set concurrencyrsHoldability- result set holdabilityautogeneratedKeys- if auto-generated keys are returned- Throws:
java.lang.IllegalArgumentException- ifschemaisnull
-
-