org.apache.derby.client.am.stmtcache
Class StatementKey

java.lang.Object
  extended by org.apache.derby.client.am.stmtcache.StatementKey

public class StatementKey
extends java.lang.Object

A key representing a java.sql.PreparedStatement or a java.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
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 a CallableStatement.
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
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
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

isCallableStatement

private final boolean isCallableStatement
Tells if the key represents a CallableStatement.


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 a java.sql.CallableStatement
sql - SQL query string
schema - compilation schema
rsType - result set type
rsConcurrency - result set concurrency
rsHoldability - result set holdability
autogeneratedKeys - if auto-generated keys are returned
Throws:
java.lang.IllegalArgumentException - if schema is null
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.