|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.client.toolkit.activity.RequestComponent | +--uk.org.ogsadai.client.toolkit.activity.Activity | +--uk.org.ogsadai.client.toolkit.activity.ParameterizedActivity | +--uk.org.ogsadai.client.toolkit.activity.sql.SQLUpdate
This activity executes the given SQL statement, which should be an SQL INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
The activity has no inputs and one output - the number of rows affected by the statement.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private java.lang.String |
mExpression
SQL query |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.ParameterizedActivity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary | |
SQLUpdate(java.lang.String expression)
Constructs a SQL update with the given expression. |
Method Summary | |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
java.lang.String |
getExpression()
Gets the SQL query expression. |
int |
getModifiedRowsCount()
Returns the number of rows modified by the update. |
ActivityOutput |
getOutput()
Gets the activity's only output - the count of rows affected. |
void |
setExpression(java.lang.String expression)
Sets the SQL expression. |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.ParameterizedActivity |
clearParameters, generateParametersXML, setParameter, setParameter |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
addInput, addOutput, addOutputs, getDataResourceID, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setInput |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
getDataService, getName, getSession, setDataService, setSession |
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.lang.String mExpression
Constructor Detail |
public SQLUpdate(java.lang.String expression)
expression
- SQL update.
java.lang.IllegalArgumentException
- If expression
is null
.Method Detail |
public void setExpression(java.lang.String expression)
expression
- SQL query.
java.lang.IllegalArgumentException
- If expression
is null
.public java.lang.String getExpression()
public int getModifiedRowsCount() throws NoActivityOutputException, DataFormatException
NoActivityOutputException
- if there is no output data or the data has not yet been
processed to this output or the activity that generates
this output has not yet been executed.
DataFormatException
- if the output from the activity cannot be parsed into a
count.public ActivityOutput getOutput()
protected java.lang.String generateXML()
RequestComponent
generateXML
in class Activity
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |