public class SQLStatement extends Object
| Constructor and Description |
|---|
SQLStatement(String stmtString)
Construct with the given sqlStatementString.
|
SQLStatement(String stmtString,
List params)
Construct with a given sqlStatementString an a parameter list
|
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(Object value)
Add the given value to the receiver's parameter list.
|
PreparedStatement |
asPreparedStatement(Connection conn)
Create a new JDBC PreparedStatement
with the receiver's parameters.
|
String |
getParameterizedStatement()
return the statement including parameter values instead of ?
|
List |
getParameters()
Return the statement parameters
|
SQLStatement |
getPreparedStatement()
return a copy of the receiver or the receiver itself (when not changed)
that is ready to be executed with asPreparedStatement(connection) where
the SQL and parameters have been transformed so that execution result is
the same as when the receiver would have been transformed by getParameterizedStatement().
|
String |
getStatement()
Return the sql statement string
|
void |
logInfo(org.slf4j.Logger log)
Logging convenience -
Log the receiver's sql (with ?
|
void |
provideParameters(PreparedStatement stmt)
Set the receiver's parameters into the given PreparedStatement.
|
String |
toString() |
public SQLStatement(String stmtString)
public String getStatement()
public List getParameters()
public void addParameter(Object value)
public PreparedStatement asPreparedStatement(Connection conn) throws SQLException
SQLExceptionpublic void provideParameters(PreparedStatement stmt) throws SQLException
SQLExceptionpublic void logInfo(org.slf4j.Logger log)
public String getParameterizedStatement()
public SQLStatement getPreparedStatement()
Copyright © 2008-2016. All Rights Reserved.