Class StatementKey

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

public class StatementKey extends 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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
    Tells if the associated statement returns auto-generated keys.
    private final int
    The result set concurrency for the statement.
    private final int
    Result set holdability for the statement.
    private final boolean
    Tells if the key represents a CallableStatement.
    private final String
    The compilation schema for the statement.
    private final String
    The SQL query of the statement.
    private final int
    The result set type for the statement.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StatementKey(boolean isCallableStatement, String sql, String schema, int rsType, int rsConcurrency, int rsHoldability, int autogeneratedKeys)
    Creates a statement key with all the common properties.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • isCallableStatement

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

      private final String sql
      The SQL query of the statement.
    • schema

      private final 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 Details

    • StatementKey

      StatementKey(boolean isCallableStatement, String sql, 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:
      IllegalArgumentException - if schema is null
  • Method Details