Class StatementKeyFactory
- java.lang.Object
-
- org.apache.derby.client.am.stmtcache.StatementKeyFactory
-
public final class StatementKeyFactory extends java.lang.ObjectA factory for creating JDBC statement keys for use with the JDBC statement cache.- See Also:
JDBCStatementCache
-
-
Constructor Summary
Constructors Modifier Constructor Description privateStatementKeyFactory()Instantiation not allowed.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StatementKeynewCallable(java.lang.String sql, java.lang.String schema, int holdability)Creates a key for a callable statement.static StatementKeynewCallable(java.lang.String sql, java.lang.String schema, int rst, int rsc, int rsh)Creates a key for a callable statement specifying result set type and concurrency.static StatementKeynewPrepared(java.lang.String sql, java.lang.String schema, int holdability)Creates a key for a query with default settings.static StatementKeynewPrepared(java.lang.String sql, java.lang.String schema, int holdability, int autogeneratedKeys)Creates a key for a query specifying whether auto-generated keys shall be returned.static StatementKeynewPrepared(java.lang.String sql, java.lang.String schema, int rst, int rsc, int rsh)Creates a key for a query specifying result set type and concurrency.
-
-
-
Field Detail
-
CALLABLE
private static final boolean CALLABLE
- See Also:
- Constant Field Values
-
PREPARED
private static final boolean PREPARED
- See Also:
- Constant Field Values
-
-
Method Detail
-
newPrepared
public static StatementKey newPrepared(java.lang.String sql, java.lang.String schema, int holdability)
Creates a key for a query with default settings.Defaults are according to the JDBC standard; result set type will be
ResultSet.TYPE_FORWARD_ONLY, concurrency will beResultSet.CONCUR_READ_ONLYand the statement will not return auto-generated keys.- Parameters:
sql- SQL query stringschema- current compilation schemaholdability- result set holdability- Returns:
- A statement key.
-
newPrepared
public static StatementKey newPrepared(java.lang.String sql, java.lang.String schema, int holdability, int autogeneratedKeys)
Creates a key for a query specifying whether auto-generated keys shall be returned.Unspecified settings will be according to the JDBC standard; result set type will be
ResultSet.TYPE_FORWARD_ONLY, concurrency will beResultSet.CONCUR_READ_ONLY.- Parameters:
sql- SQL query stringschema- current compilation schemaholdability- result set holdabilityautogeneratedKeys- tells whether or not to reutrn auto-generated keys- Returns:
- A statement key.
-
newPrepared
public static StatementKey newPrepared(java.lang.String sql, java.lang.String schema, int rst, int rsc, int rsh)
Creates a key for a query specifying result set type and concurrency.The returned key is for a statement not returning auto-generated keys.
- Parameters:
sql- SQL query stringschema- current compilation schemarst- result set typersc- result set concurrency levelrsh- result set holdability- Returns:
- A statement key.
-
newCallable
public static StatementKey newCallable(java.lang.String sql, java.lang.String schema, int holdability)
Creates a key for a callable statement.Unspecified settings will be according to the JDBC standard; result set type will be
ResultSet.TYPE_FORWARD_ONLY, concurrency will beResultSet.CONCUR_READ_ONLY.- Parameters:
sql- SQL query stringschema- current compilation schemaholdability- result set holdability- Returns:
- A statement key.
-
newCallable
public static StatementKey newCallable(java.lang.String sql, java.lang.String schema, int rst, int rsc, int rsh)
Creates a key for a callable statement specifying result set type and concurrency.The returned key is for a statement not returning auto-generated keys.
- Parameters:
sql- SQL query stringschema- current compilation schemarst- result set typersc- result set concurrency levelrsh- result set holdability- Returns:
- A statement key.
-
-