|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agimatec.sql.SQLStatement
public class SQLStatement
This class represents a SQLStatement with its parameters.
| Constructor Summary | |
|---|---|
SQLStatement(String stmtString)
Construct with the given sqlStatementString. |
|
SQLStatement(String stmtString,
List params)
Construct with a given sqlStatementString an a parameter list |
|
| Method Summary | |
|---|---|
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.apache.commons.logging.Log log)
Logging convenience - Log the receiver's sql (with ? |
void |
provideParameters(PreparedStatement stmt)
Set the receiver's parameters into the given PreparedStatement. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SQLStatement(String stmtString)
public SQLStatement(String stmtString,
List params)
| Method Detail |
|---|
public String getStatement()
public List getParameters()
public void addParameter(Object value)
public PreparedStatement asPreparedStatement(Connection conn)
throws SQLException
SQLException
public void provideParameters(PreparedStatement stmt)
throws SQLException
SQLExceptionpublic void logInfo(org.apache.commons.logging.Log log)
public String getParameterizedStatement()
public String toString()
toString in class Objectpublic SQLStatement getPreparedStatement()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||