public class PStmtKey extends Object
PreparedStatement
s.Constructor and Description |
---|
PStmtKey(String sql)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
int resultSetType,
int resultSetConcurrency)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
String catalog)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
String catalog,
int autoGeneratedKeys)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
String catalog,
int[] columnIndexes)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
String catalog,
int resultSetType,
int resultSetConcurrency)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
String catalog,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
String catalog,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
PoolingConnection.StatementType statementType)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
String catalog,
int resultSetType,
int resultSetConcurrency,
PoolingConnection.StatementType statementType)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
String catalog,
PoolingConnection.StatementType statementType)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
String catalog,
PoolingConnection.StatementType statementType,
Integer autoGeneratedKeys)
Constructs a key to uniquely identify a prepared statement.
|
PStmtKey(String sql,
String catalog,
String[] columnNames)
Constructs a key to uniquely identify a prepared statement.
|
Modifier and Type | Method and Description |
---|---|
Statement |
createStatement(Connection connection)
Creates a new Statement from the given Connection.
|
boolean |
equals(Object obj) |
Integer |
getAutoGeneratedKeys()
Gets a flag indicating whether auto-generated keys should be returned; one of
Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS . |
String |
getCatalog()
The catalog.
|
int[] |
getColumnIndexes()
Gets an array of column indexes indicating the columns that should be returned from the inserted row or rows.
|
String[] |
getColumnNames()
Gets an array of column names indicating the columns that should be returned from the inserted row or rows.
|
Integer |
getResultSetConcurrency()
Gets the result set concurrency type; one of
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLE . |
Integer |
getResultSetHoldability()
Gets the result set holdability, one of the following
ResultSet constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT . |
Integer |
getResultSetType()
Gets the result set type, one of
ResultSet.TYPE_FORWARD_ONLY ,
ResultSet.TYPE_SCROLL_INSENSITIVE , or ResultSet.TYPE_SCROLL_SENSITIVE . |
String |
getSql()
Gets the SQL statement.
|
PoolingConnection.StatementType |
getStmtType()
The SQL statement type.
|
int |
hashCode() |
String |
toString() |
public PStmtKey(String sql)
sql
- The SQL statement.public PStmtKey(String sql, String catalog)
sql
- The SQL statement.catalog
- The catalog.public PStmtKey(String sql, String catalog, PoolingConnection.StatementType statementType)
sql
- The SQL statement.catalog
- The catalog.statementType
- The SQL statement type, prepared or callable.public PStmtKey(String sql, String catalog, int autoGeneratedKeys)
sql
- The SQL statement.catalog
- The catalog.autoGeneratedKeys
- A flag indicating whether auto-generated keys should be returned; one of
Statement.RETURN_GENERATED_KEYS
or Statement.NO_GENERATED_KEYS
.public PStmtKey(String sql, String catalog, PoolingConnection.StatementType statementType, Integer autoGeneratedKeys)
sql
- The SQL statement.catalog
- The catalog.statementType
- The SQL statement type, prepared or callable.autoGeneratedKeys
- A flag indicating whether auto-generated keys should be returned; one of
Statement.RETURN_GENERATED_KEYS
or Statement.NO_GENERATED_KEYS
.public PStmtKey(String sql, String catalog, int[] columnIndexes)
sql
- The SQL statement.catalog
- The catalog.columnIndexes
- An array of column indexes indicating the columns that should be returned from the inserted row or
rows.public PStmtKey(String sql, String catalog, String[] columnNames)
sql
- The SQL statement.catalog
- The catalog.columnNames
- An array of column names indicating the columns that should be returned from the inserted row or rows.public PStmtKey(String sql, int resultSetType, int resultSetConcurrency)
sql
- The SQL statement.resultSetType
- A result set type; one of ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or ResultSet.TYPE_SCROLL_SENSITIVE
.resultSetConcurrency
- A concurrency type; one of ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
.public PStmtKey(String sql, String catalog, int resultSetType, int resultSetConcurrency)
sql
- The SQL statement.catalog
- The catalog.resultSetType
- A result set type; one of ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or ResultSet.TYPE_SCROLL_SENSITIVE
.resultSetConcurrency
- A concurrency type; one of ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
.public PStmtKey(String sql, String catalog, int resultSetType, int resultSetConcurrency, PoolingConnection.StatementType statementType)
sql
- The SQL statement.catalog
- The catalog.resultSetType
- A result set type; one of ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or ResultSet.TYPE_SCROLL_SENSITIVE
.resultSetConcurrency
- A concurrency type; one of ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
.statementType
- The SQL statement type, prepared or callable.public PStmtKey(String sql, String catalog, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
sql
- The SQL statement.catalog
- The catalog.resultSetType
- a result set type; one of ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or ResultSet.TYPE_SCROLL_SENSITIVE
.resultSetConcurrency
- A concurrency type; one of ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
resultSetHoldability
- One of the following ResultSet
constants: ResultSet.HOLD_CURSORS_OVER_COMMIT
or ResultSet.CLOSE_CURSORS_AT_COMMIT
.public PStmtKey(String sql, String catalog, int resultSetType, int resultSetConcurrency, int resultSetHoldability, PoolingConnection.StatementType statementType)
sql
- The SQL statement.catalog
- The catalog.resultSetType
- a result set type; one of ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetConcurrency
- A concurrency type; one of ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
.resultSetHoldability
- One of the following ResultSet
constants: ResultSet.HOLD_CURSORS_OVER_COMMIT
or ResultSet.CLOSE_CURSORS_AT_COMMIT
.statementType
- The SQL statement type, prepared or callable.public Integer getResultSetType()
ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or ResultSet.TYPE_SCROLL_SENSITIVE
.public Integer getResultSetConcurrency()
ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
.public Integer getResultSetHoldability()
ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT
or ResultSet.CLOSE_CURSORS_AT_COMMIT
.public Integer getAutoGeneratedKeys()
Statement.RETURN_GENERATED_KEYS
or Statement.NO_GENERATED_KEYS
.public int[] getColumnIndexes()
public String[] getColumnNames()
public String getCatalog()
public PoolingConnection.StatementType getStmtType()
public Statement createStatement(Connection connection) throws SQLException
connection
- The Connection to use to create the statement.SQLException
- Thrown when there is a problem creating the statement.Copyright © 2001–2018 The Apache Software Foundation. All rights reserved.