org.apache.commons.dbcp2

## Class PStmtKey

- java.lang.Object
- - org.apache.commons.dbcp2.PStmtKey

- Direct Known Subclasses:
    PStmtKeyCPDS

      public class PStmtKey
      extends Object

  A key uniquely identifying `PreparedStatement`s.
  Since:
    2.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PStmtKey(String sql)`
    `PStmtKey(String sql, int resultSetType, int resultSetConcurrency)`
    `PStmtKey(String sql, String catalog)`
    `PStmtKey(String sql, String catalog, int autoGeneratedKeys)`
    `PStmtKey(String sql, String catalog, int[] columnIndexes)`
    `PStmtKey(String sql, String catalog, int resultSetType, int resultSetConcurrency)`
    `PStmtKey(String sql, String catalog, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
    `PStmtKey(String sql, String catalog, int resultSetType, int resultSetConcurrency, int resultSetHoldability, PoolingConnection.StatementType stmtType)`
    `PStmtKey(String sql, String catalog, int resultSetType, int resultSetConcurrency, PoolingConnection.StatementType stmtType)`
    `PStmtKey(String sql, String catalog, PoolingConnection.StatementType stmtType)`
    `PStmtKey(String sql, String catalog, PoolingConnection.StatementType stmtType, Integer autoGeneratedKeys)`
    `PStmtKey(String sql, String catalog, String[] columnNames)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Statement` | `createStatement(Connection connection)`
    `boolean` | `equals(Object obj)`
    `Integer` | `getAutoGeneratedKeys()`
    `String` | `getCatalog()`
    `int[]` | `getColumnIndexes()`
    `String[]` | `getColumnNames()`
    `Integer` | `getResultSetConcurrency()`
    `Integer` | `getResultSetHoldability()`
    `Integer` | `getResultSetType()`
    `String` | `getSql()`
    `PoolingConnection.StatementType` | `getStmtType()`
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PStmtKey

          public PStmtKey(String sql)

    - #### PStmtKey

          public PStmtKey(String sql,
                  String catalog)

    - #### PStmtKey

          public PStmtKey(String sql,
                  String catalog,
                  PoolingConnection.StatementType stmtType)

    - #### PStmtKey

          public PStmtKey(String sql,
                  String catalog,
                  int autoGeneratedKeys)

    - #### PStmtKey

          public PStmtKey(String sql,
                  String catalog,
                  PoolingConnection.StatementType stmtType,
                  Integer autoGeneratedKeys)

    - #### PStmtKey

          public PStmtKey(String sql,
                  String catalog,
                  int[] columnIndexes)

    - #### PStmtKey

          public PStmtKey(String sql,
                  String catalog,
                  String[] columnNames)

    - #### PStmtKey

          public PStmtKey(String sql,
                  int resultSetType,
                  int resultSetConcurrency)

    - #### PStmtKey

          public PStmtKey(String sql,
                  String catalog,
                  int resultSetType,
                  int resultSetConcurrency)

    - #### PStmtKey

          public PStmtKey(String sql,
                  String catalog,
                  int resultSetType,
                  int resultSetConcurrency,
                  PoolingConnection.StatementType stmtType)

    - #### PStmtKey

          public PStmtKey(String sql,
                  String catalog,
                  int resultSetType,
                  int resultSetConcurrency,
                  int resultSetHoldability)

    - #### PStmtKey

          public PStmtKey(String sql,
                  String catalog,
                  int resultSetType,
                  int resultSetConcurrency,
                  int resultSetHoldability,
                  PoolingConnection.StatementType stmtType)

  - ### Method Detail

    - #### getSql

          public String getSql()

    - #### getResultSetType

          public Integer getResultSetType()

    - #### getResultSetConcurrency

          public Integer getResultSetConcurrency()

    - #### getResultSetHoldability

          public Integer getResultSetHoldability()

    - #### getAutoGeneratedKeys

          public Integer getAutoGeneratedKeys()

    - #### getColumnIndexes

          public int[] getColumnIndexes()

    - #### getColumnNames

          public String[] getColumnNames()

    - #### getCatalog

          public String getCatalog()

    - #### getStmtType

          public PoolingConnection.StatementType getStmtType()

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### createStatement

          public Statement createStatement(Connection connection)
                                    throws SQLException

      Throws:
        `SQLException`

Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.