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