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, unwrappublic static NamedParameterPreparedStatement.ParseResult parse(String query)
query - Query containing named parameterspublic static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql) throws SQLException
SQLExceptionpublic static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql, int autoGeneratedKeys) throws SQLException
SQLExceptionpublic static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql, int[] columnIndexes) throws SQLException
SQLExceptionpublic static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql, String[] columnNames) throws SQLException
SQLExceptionpublic static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql, int resultSetType, int resultSetConcurrency) throws SQLException
SQLExceptionpublic static NamedParameterPreparedStatement createNamedParameterPreparedStatement(Connection conn, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
SQLExceptionpublic boolean hasNamedParameters()
public Collection<Integer> getParameterIndexes(String parameter)
public void setNull(String parameter,
int sqlType)
throws SQLException
SQLExceptionpublic void setBoolean(String parameter,
boolean x)
throws SQLException
SQLExceptionpublic void setByte(String parameter,
byte x)
throws SQLException
SQLExceptionpublic void setShort(String parameter,
short x)
throws SQLException
SQLExceptionpublic void setInt(String parameter,
int x)
throws SQLException
SQLExceptionpublic void setLong(String parameter,
long x)
throws SQLException
SQLExceptionpublic void setFloat(String parameter,
float x)
throws SQLException
SQLExceptionpublic void setDouble(String parameter,
float x)
throws SQLException
SQLExceptionpublic void setBigDecimal(String parameter,
BigDecimal x)
throws SQLException
SQLExceptionpublic void setString(String parameter,
String x)
throws SQLException
SQLExceptionpublic void setBytes(String parameter,
byte[] x)
throws SQLException
SQLExceptionpublic void setDate(String parameter,
Date x)
throws SQLException
SQLExceptionpublic void setTime(String parameter,
Time x)
throws SQLException
SQLExceptionpublic void setTimestamp(String parameter,
Timestamp x)
throws SQLException
SQLExceptionpublic void setAsciiStream(String parameter,
InputStream x)
throws SQLException
SQLException@Deprecated
public void setUnicodeStream(String parameter,
InputStream x,
int length)
throws SQLException
SQLExceptionpublic void setBinaryStream(String parameter,
InputStream x,
int length)
throws SQLException
SQLExceptionpublic void setObject(String parameter,
Object x,
int targetSqlType,
int scale)
throws SQLException
SQLExceptionpublic void setObject(String parameter,
Object x,
int targetSqlType)
throws SQLException
SQLExceptionpublic void setObject(String parameter,
Object x)
throws SQLException
SQLExceptionpublic List<TypedKeyValue<String,String>> getOrderedParameters()
Copyright © 2010-2020 Toolsverse. All Rights Reserved.