public class NamedParameterPreparedStatement extends DelegatingPreparedStatement
Modifier and Type | Class and Description |
---|---|
(package private) static class |
NamedParameterPreparedStatement.ParseResult
Class to hold the results of SQL parsing (used by factory methods)
|
Modifier and Type | Method and Description |
---|---|
static NamedParameterPreparedStatement |
createNamedParameterPreparedStatement(Connection conn,
String sql) |
static NamedParameterPreparedStatement |
createNamedParameterPreparedStatement(Connection conn,
String sql,
int autoGeneratedKeys) |
static NamedParameterPreparedStatement |
createNamedParameterPreparedStatement(Connection conn,
String sql,
int[] columnIndexes) |
static NamedParameterPreparedStatement |
createNamedParameterPreparedStatement(Connection conn,
String sql,
int resultSetType,
int resultSetConcurrency) |
static NamedParameterPreparedStatement |
createNamedParameterPreparedStatement(Connection conn,
String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
static NamedParameterPreparedStatement |
createNamedParameterPreparedStatement(Connection conn,
String sql,
String[] columnNames) |
List<TypedKeyValue<String,String>> |
getOrderedParameters()
Gets the ordered parameters.
|
Collection<Integer> |
getParameterIndexes(String parameter) |
boolean |
hasNamedParameters() |
static NamedParameterPreparedStatement.ParseResult |
parse(String query)
Parse the query string containing named parameters and result a parse
result, which holds the parsed sql (named parameters replaced by standard
'?' parameters and an ordered list of the named parameters.
|
void |
setAsciiStream(String parameter,
InputStream x) |
void |
setBigDecimal(String parameter,
BigDecimal x) |
void |
setBinaryStream(String parameter,
InputStream x,
int length) |
void |
setBoolean(String parameter,
boolean x) |
void |
setByte(String parameter,
byte x) |
void |
setBytes(String parameter,
byte[] x) |
void |
setDate(String parameter,
Date x) |
void |
setDouble(String parameter,
float x) |
void |
setFloat(String parameter,
float x) |
void |
setInt(String parameter,
int x) |
void |
setLong(String parameter,
long x) |
void |
setNull(String parameter,
int sqlType) |
void |
setObject(String parameter,
Object x) |
void |
setObject(String parameter,
Object x,
int targetSqlType) |
void |
setObject(String parameter,
Object x,
int targetSqlType,
int scale) |
void |
setShort(String parameter,
short x) |
void |
setString(String parameter,
String x) |
void |
setTime(String parameter,
Time x) |
void |
setTimestamp(String parameter,
Timestamp x) |
void |
setUnicodeStream(String parameter,
InputStream x,
int length)
Deprecated.
|
addBatch, addBatch, cancel, clearBatch, clearParameters, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, execute, executeBatch, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getDelegate, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMetaData, getMoreResults, getMoreResults, getParameterMetaData, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setCursorName, setDate, setDate, setDouble, setEscapeProcessing, setFetchDirection, setFetchSize, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setPoolable, setQueryTimeout, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, unwrap
public static NamedParameterPreparedStatement.ParseResult parse(String query)
query
- Query containing named parameterspublic static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql) throws SQLException
SQLException
public static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql, int autoGeneratedKeys) throws SQLException
SQLException
public static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql, int[] columnIndexes) throws SQLException
SQLException
public static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql, String[] columnNames) throws SQLException
SQLException
public static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql, int resultSetType, int resultSetConcurrency) throws SQLException
SQLException
public static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
SQLException
public boolean hasNamedParameters()
public Collection<Integer> getParameterIndexes(String parameter)
public void setNull(String parameter, int sqlType) throws SQLException
SQLException
public void setBoolean(String parameter, boolean x) throws SQLException
SQLException
public void setByte(String parameter, byte x) throws SQLException
SQLException
public void setShort(String parameter, short x) throws SQLException
SQLException
public void setInt(String parameter, int x) throws SQLException
SQLException
public void setLong(String parameter, long x) throws SQLException
SQLException
public void setFloat(String parameter, float x) throws SQLException
SQLException
public void setDouble(String parameter, float x) throws SQLException
SQLException
public void setBigDecimal(String parameter, BigDecimal x) throws SQLException
SQLException
public void setString(String parameter, String x) throws SQLException
SQLException
public void setBytes(String parameter, byte[] x) throws SQLException
SQLException
public void setDate(String parameter, Date x) throws SQLException
SQLException
public void setTime(String parameter, Time x) throws SQLException
SQLException
public void setTimestamp(String parameter, Timestamp x) throws SQLException
SQLException
public void setAsciiStream(String parameter, InputStream x) throws SQLException
SQLException
@Deprecated public void setUnicodeStream(String parameter, InputStream x, int length) throws SQLException
SQLException
public void setBinaryStream(String parameter, InputStream x, int length) throws SQLException
SQLException
public void setObject(String parameter, Object x, int targetSqlType, int scale) throws SQLException
SQLException
public void setObject(String parameter, Object x, int targetSqlType) throws SQLException
SQLException
public void setObject(String parameter, Object x) throws SQLException
SQLException
public List<TypedKeyValue<String,String>> getOrderedParameters()
Copyright © 2010-2020 Toolsverse. All Rights Reserved.