|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.Activity | +--uk.org.ogsadai.activity.sql.AbstractSQLActivity | +--uk.org.ogsadai.activity.sql.AbstractParameterisedSQLActivity
Abstract class for implementations of SQL activites that support parameterised SQL statements.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static DAILogger |
LOG
Logger object for logging in this class |
protected ParameterList |
mParameters
List of SQL expression parameters |
Fields inherited from class uk.org.ogsadai.activity.sql.AbstractSQLActivity |
CREATE_DATABASE, DROP_DATABASE, EXPRESSION, mCredentials, mDataResource, mExpression, mInputStreamNames, mOutput, mStatement, RESULT_STREAM, SQL_OUT_PARAMETERS, SQL_PARAMETERS, STORED_PROCEDURE, WEB_ROW_SET_STREAM |
Fields inherited from class uk.org.ogsadai.activity.Activity |
mContext, mExternalInputs, mExternalOutputs, mInternalInputs, mInternalOutputs |
Constructor Summary | |
AbstractParameterisedSQLActivity(org.w3c.dom.Element element)
|
Method Summary | |
void |
initialise()
This method should be overridden by subclasses to perform any initialisation they require before the process
method invocations begin. |
protected void |
initialiseInputStreamNames()
Initialises activity input streams from the set of input stream names. |
protected void |
parseSQLParameters(org.w3c.dom.NodeList parameterNodes)
This method will find the SQL parameters appropriate for this activity if any are specified. |
Methods inherited from class uk.org.ogsadai.activity.sql.AbstractSQLActivity |
createOutputPipe, parseExpression, parseResultStream |
Methods inherited from class uk.org.ogsadai.activity.Activity |
cleanUp, connectsTo, getActivityConfiguration, getActivityName, getCause, getName, getObservableStatus, getProperties, getSession, getStatus, hasActivityConfiguration, hasProperties, process, processBlock, processFirst, setActivityName, setCompleted, setError |
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 static DAILogger LOG
protected ParameterList mParameters
Constructor Detail |
public AbstractParameterisedSQLActivity(org.w3c.dom.Element element) throws ActivitySpecificationException, ActivityCreationException
Method Detail |
public void initialise() throws ActivitySpecificationException, ActivityExecutionException
Activity
process
method invocations begin. This might be used for setting up
convenient fields to reference objects contained in the
context. It shouldn't be used for opening resources.
That should be done in processFirst
.
initialise
in class AbstractSQLActivity
ActivityExecutionException
- If some system problem prevents the activity from
initialising.
ActivitySpecificationException
- If a problem with settings provided by a client prevents
the activity from initialising.protected void parseSQLParameters(org.w3c.dom.NodeList parameterNodes) throws ActivitySpecificationException
These SQL parameters could be values or the names of output streams of other activities.
If no parameters are found then the internal SQL statement
object is just set to be a simple SQL statement
(SQLStatement
) else it will be set to a
ParameterisedSQLStatement
).
parameterNodes
- A collection of elements each assumed to have name
sqlParameter
.
ActivitySpecificationException
- If SQL parameter is out of range or specified twice, or a
parameter's value is missing or both a parameter value and an
input stream have been specified.protected void initialiseInputStreamNames()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |