Class StatementKey
- java.lang.Object
-
- org.apache.derby.client.am.stmtcache.StatementKey
-
public class StatementKey extends java.lang.Object
A key representing ajava.sql.PreparedStatement
or 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 int
autogeneratedKeys
Tells if the associated statement returns auto-generated keys.private int
concurrency
The result set concurrency for the statement.private int
holdability
Result set holdability for the statement.private boolean
isCallableStatement
Tells if the key represents aCallableStatement
.private java.lang.String
schema
The compilation schema for the statement.private java.lang.String
sql
The SQL query of the statement.private int
type
The 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 boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
-
-
-
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
-true
is this is a key for ajava.sql.CallableStatement
sql
- SQL query stringschema
- compilation schemarsType
- result set typersConcurrency
- result set concurrencyrsHoldability
- result set holdabilityautogeneratedKeys
- if auto-generated keys are returned- Throws:
java.lang.IllegalArgumentException
- ifschema
isnull
-
-