uk.org.ogsadai.activity.sql.csv
Class CSVQueryStatementActivity

java.lang.Object
  |
  +--uk.org.ogsadai.engine.Activity
        |
        +--uk.org.ogsadai.activity.sql.SQLActivity
              |
              +--uk.org.ogsadai.activity.sql.SQLQueryStatementActivity
                    |
                    +--uk.org.ogsadai.activity.sql.csv.CSVQueryStatementActivity

public class CSVQueryStatementActivity
extends SQLQueryStatementActivity

Author:
The OGSA-DAI team

Nested Class Summary
 
Nested classes inherited from class uk.org.ogsadai.activity.sql.SQLActivity
SQLActivity.ParameterInput, SQLActivity.StreamInput, SQLActivity.ValueInput
 
Field Summary
 
Fields inherited from class uk.org.ogsadai.activity.sql.SQLQueryStatementActivity
mRowset, mStatementPrepared
 
Fields inherited from class uk.org.ogsadai.activity.sql.SQLActivity
CREATE_DATABASE, DROP_DATABASE, EXPRESSION, mAllInput, mConnection, mConnectionManager, mCredentials, mExpression, mExpressionInput, mInputStreams, mIsTransaction, mNameToInput, mOpenConnection, mOutput, mStatement, RESULT_STREAM, SQL_PARAMETERS, STORED_PROCEDURE, WEB_ROW_SET_STREAM
 
Fields inherited from class uk.org.ogsadai.engine.Activity
mContext, mExternalInputs, mExternalOutputs, mInternalInputs, mInternalOutputs
 
Constructor Summary
CSVQueryStatementActivity(org.w3c.dom.Element element)
          Constructor for CSVQueryStatementActivity.
 
Method Summary
 void cleanUp()
          This method is called once this object is no longer required It is needed because it is unclear when a PreparedStatement is no longer required So we tidy up the PreparedStatement and return any connections
protected  void endProcessing()
          This method will complete the processing and tidy up
protected  void processFirst()
          This method will start processing.
 
Methods inherited from class uk.org.ogsadai.activity.sql.SQLQueryStatementActivity
getResult, processBlock
 
Methods inherited from class uk.org.ogsadai.activity.sql.SQLActivity
initialise, loadNextExpression, parseCommand, parseResultStream, parseSQLParameters, prepareStatement, setupInputStreamNames
 
Methods inherited from class uk.org.ogsadai.engine.Activity
connectsTo, getActivityConfiguration, getName, getObservableStatus, getProperties, getStatus, hasActivityConfiguration, hasProperties, setCompleted, setError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVQueryStatementActivity

public CSVQueryStatementActivity(org.w3c.dom.Element element)
                          throws ActivityUserException,
                                 ActivitySystemException
Constructor for CSVQueryStatementActivity.

Parameters:
element -
Throws:
ActivityUserException
ActivitySystemException
Method Detail

processFirst

protected void processFirst()
This method will start processing. It will retrieve the connection and set up the statement. The connection isn't returned/closed until the output is complete, i.e. last block has been read.

Overrides:
processFirst in class SQLQueryStatementActivity

endProcessing

protected void endProcessing()
                      throws java.sql.SQLException,
                             ActivitySystemException
This method will complete the processing and tidy up

Overrides:
endProcessing in class SQLQueryStatementActivity
Throws:
java.sql.SQLException
ActivitySystemException - the database connection could not be returned

cleanUp

public void cleanUp()
This method is called once this object is no longer required It is needed because it is unclear when a PreparedStatement is no longer required So we tidy up the PreparedStatement and return any connections

Overrides:
cleanUp in class SQLQueryStatementActivity