uk.org.ogsadai.activity.sql
Class AbstractParameterisedSQLActivity
java.lang.Object
|
+--uk.org.ogsadai.activity.Activity
|
+--uk.org.ogsadai.activity.sql.AbstractSQLActivity
|
+--uk.org.ogsadai.activity.sql.AbstractParameterisedSQLActivity
- Direct Known Subclasses:
-
SQLQueryStatementActivity, SQLStoredProcedureActivity, SQLUpdateStatementActivity
- public abstract class AbstractParameterisedSQLActivity
- extends AbstractSQLActivity
Abstract class for implementations of SQL activites that support parameterised SQL statements.
- Author:
- The OGSA-DAI Project Team.
?
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 |
?
?
?
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.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 |
?
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
-
Copyright statement
- See Also:
- Constant Field Values
LOG
private static DAILogger LOG
-
Logger object for logging in this class
mParameters
protected ParameterList mParameters
-
List of SQL expression parameters
AbstractParameterisedSQLActivity
public AbstractParameterisedSQLActivity(org.w3c.dom.Element?element)
throws ActivitySpecificationException,
ActivityCreationException
initialise
public void initialise()
throws ActivitySpecificationException,
ActivityExecutionException
- Description copied from class:
Activity
-
This method should be overridden by subclasses to perform any initialisation they require before the
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
.
-
- Overrides:
-
initialise
in class AbstractSQLActivity
-
- Throws:
-
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.
parseSQLParameters
protected void parseSQLParameters(org.w3c.dom.NodeList?parameterNodes)
throws ActivitySpecificationException
-
This method will find the SQL parameters appropriate for this activity if any are specified.
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
).
-
- Parameters:
-
parameterNodes
- A collection of elements each assumed to have name sqlParameter
.
- Throws:
-
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.
initialiseInputStreamNames
protected void initialiseInputStreamNames()
-
Initialises activity input streams from the set of input stream names.
-