|
|||||||||||
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.sql.SQLBag
This activity executes the same SQL query over a number of different data resources being exposed by corresponding data service resources.
The parameters of the activity are the SQL query and the timeout, while the output is the produced WebRowSet document.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private int |
mResultSetType
Type of ResultSet s generated using this class |
private java.lang.String |
mSqlStatement
the sql statement |
private long |
mTimeout
the timeout |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary | |
SQLBag(java.lang.String sql)
Constructs an activity to execute a query over a number of data resources. |
Method Summary | |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
ActivityOutput |
getOutput()
Gets the activity's only output. |
java.sql.ResultSet |
getResultSet()
Get the WebRowSet XML output from this activity and convert it into a ResultSet of type specified by
getResultSetType . |
void |
setResultSetType(int resultSetType)
Set the type of ResultSet objects the
getResultSet method returns. |
void |
setTimeout(long timeout)
Sets the timeout within which a response should be returned from the data resources. |
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 mSqlStatement
private long mTimeout
private int mResultSetType
ResultSet
s generated using this class
Constructor Detail |
public SQLBag(java.lang.String sql)
sql
- the sql query to be executed.Method Detail |
public void setTimeout(long timeout)
timeout
- public ActivityOutput getOutput()
public void setResultSetType(int resultSetType)
ResultSet
objects the
getResultSet
method returns.
resultSetType
- Either of ResultSet.TYPE_FORWARD_ONLY
or
ResultSet.TYPE_SCROLL_INSENSITIVE
.
java.lang.IllegalArgumentException
- if resultSetType
is not one of the two above.public java.sql.ResultSet getResultSet() throws NoActivityOutputException, DataFormatException
ResultSet
of type specified by
getResultSetType
.
ResultSet
containing query result.
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
ResultSet
.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 |