|
|||||||||||
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
Super-class of SQL activity implementations.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
static java.lang.String |
CREATE_DATABASE
|
static java.lang.String |
DROP_DATABASE
|
static java.lang.String |
EXPRESSION
Constants for parsing SQL activity XML |
private static DAILogger |
LOG
Logger object for logging in this class |
protected java.lang.String |
mCredentials
Client credentials |
protected JDBCConnectionProvider |
mDataResource
Database connection manager |
protected java.lang.String |
mExpression
SQL expression |
protected java.util.Set |
mInputStreamNames
Activity input names |
protected BlockWriter |
mOutput
Activity output |
protected SQLStatement |
mStatement
SQLStatement object for executing the SQL expression |
static java.lang.String |
RESULT_STREAM
|
static java.lang.String |
SQL_OUT_PARAMETERS
|
static java.lang.String |
SQL_PARAMETERS
|
static java.lang.String |
STORED_PROCEDURE
|
static java.lang.String |
WEB_ROW_SET_STREAM
|
Fields inherited from class uk.org.ogsadai.activity.Activity |
mContext, mExternalInputs, mExternalOutputs, mInternalInputs, mInternalOutputs |
Constructor Summary | |
AbstractSQLActivity(org.w3c.dom.Element element)
|
Method Summary | |
protected Pipe |
createOutputPipe(int i)
Creates an output pipe for an internal output. |
void |
initialise()
This method should be overridden by subclasses to perform any initialisation they require before the process
method invocations begin. |
protected void |
parseExpression(java.lang.String eltName,
org.w3c.dom.NodeList list)
Finds the SQL expression for this activity from the activity request XML. |
protected void |
parseResultStream(java.lang.String eltName,
org.w3c.dom.NodeList list)
Get the name of an output stream for the activity. |
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 java.lang.String mCredentials
protected JDBCConnectionProvider mDataResource
protected BlockWriter mOutput
protected java.util.Set mInputStreamNames
protected java.lang.String mExpression
protected SQLStatement mStatement
SQLStatement
object for executing the SQL expression
public static final java.lang.String EXPRESSION
public static final java.lang.String STORED_PROCEDURE
public static final java.lang.String CREATE_DATABASE
public static final java.lang.String DROP_DATABASE
public static final java.lang.String SQL_PARAMETERS
public static final java.lang.String SQL_OUT_PARAMETERS
public static final java.lang.String WEB_ROW_SET_STREAM
public static final java.lang.String RESULT_STREAM
Constructor Detail |
public AbstractSQLActivity(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 Activity
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 parseExpression(java.lang.String eltName, org.w3c.dom.NodeList list) throws ActivitySpecificationException
eltName
- Name of element containing the expression.list
- A list of DOM nodes with tag eltName
ActivitySpecificationException
- If the first item in list
does not contain an
SQL expressions.protected void parseResultStream(java.lang.String eltName, org.w3c.dom.NodeList list) throws ActivitySpecificationException
eltName
- Name of element containing the output stream name.list
- A list of DOM nodes with tag eltName
and
assumed to have attribute name
with a non-null
content.
ActivitySpecificationException
- If the first item in list
does not contain an
attribute name
with a non-null value.protected Pipe createOutputPipe(int i)
Activity
createOutputPipe
in class Activity
i
- Index of the output pipe.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |