|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.activity.sql.statement.SimpleSQLStatement
Executes simple SQL queries.
| Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private java.sql.Connection |
mConnection
JDBC connection handler |
private java.lang.String |
mExpression
SQL expression |
private boolean |
mFinishedProcessing
Has expression completed (default false) |
private java.sql.Statement |
mStatement
JDBC statement handler |
| Constructor Summary | |
SimpleSQLStatement()
Constructor |
|
| Method Summary | |
void |
close()
Closes this SQL statement. |
java.sql.ResultSet |
executeQuery()
Executes this SQL statement |
int |
executeUpdate()
Executes this SQL statement as an update |
java.lang.String |
getExpression()
Gets SQL expression |
void |
initialise()
Initialise the SQL statement. |
void |
setConnection(java.sql.Connection connection)
Set the connection for this SQL statement |
void |
setExpression(java.lang.String expression)
Set the expression for this SQL statement |
void |
setParameters(ParameterList parameters)
Set the parameters for this SQL statement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private java.sql.Statement mStatement
private java.sql.Connection mConnection
private java.lang.String mExpression
private boolean mFinishedProcessing
false)
| Constructor Detail |
public SimpleSQLStatement()
| Method Detail |
public void initialise()
throws java.sql.SQLException
SQLStatement
initialise in interface SQLStatementjava.sql.SQLException - If any problem occurs in the driver.public void setConnection(java.sql.Connection connection)
SQLStatement
setConnection in interface SQLStatementconnection - JDBC connectionpublic void setExpression(java.lang.String expression)
SQLStatement
setExpression in interface SQLStatementexpression - SQL expressionpublic java.lang.String getExpression()
public void setParameters(ParameterList parameters)
SQLStatement
setParameters in interface SQLStatementparameters - List of parameters
public void close()
throws java.sql.SQLException
SQLStatement
close in interface SQLStatementjava.sql.SQLException - If any problem occurs in the driver.
public java.sql.ResultSet executeQuery()
throws java.sql.SQLException,
MissingParametersException,
ParameterAccessException
SQLStatement
executeQuery in interface SQLStatementResultSet or null if there
are no more parameters to process.
MissingParametersException - If some of the parameters provided all their values yet
others did not.
ParameterAccessException - If there is a problem when accessing a parameter value.
java.sql.SQLException - If any problem occurs in the driver.
public int executeUpdate()
throws java.sql.SQLException,
MissingParametersException,
ParameterAccessException
SQLStatement
executeUpdate in interface SQLStatementParameterAccessException - If there is a problem when accessing a parameter value.
MissingParametersException - If some of the parameters provided all their values yet
others did not.
java.sql.SQLException - If any problem occurs in the driver.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||