uk.org.ogsadai.activity.sql.parameters
Class ResultSetInput

java.lang.Object
  |
  +--uk.org.ogsadai.activity.sql.parameters.ResultSetInput
All Implemented Interfaces:
ParameterInput

public class ResultSetInput
extends java.lang.Object
implements ParameterInput

Class managing java.sql.ResultSet input to a parameterised SQL statement.

Author:
The OGSA-DAI Project Team.

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement.
private  int mCurrentColumn
          Current column
private  int mNumColumns
          Number of columns
private  int mPosition
          Position of this parameter
private  boolean mProcessing
          Is the ResultSet still providing data (initially true)
private  java.sql.ResultSet mResultSet
          Input to the parameter
 
Constructor Summary
ResultSetInput(java.sql.ResultSet resultSet, int numCols)
          Constructor
 
Method Summary
 java.lang.Object getNextObject()
          Get the next value for the parameter.
 void initialise(int position, ActivityContext context)
          Optionally initialise a parameter using the current activity context.
 boolean isDone()
          Indicates whether the ResultSet is closed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement.

See Also:
Constant Field Values

mResultSet

private java.sql.ResultSet mResultSet
Input to the parameter


mCurrentColumn

private int mCurrentColumn
Current column


mNumColumns

private int mNumColumns
Number of columns


mProcessing

private boolean mProcessing
Is the ResultSet still providing data (initially true)


mPosition

private int mPosition
Position of this parameter

Constructor Detail

ResultSetInput

public ResultSetInput(java.sql.ResultSet resultSet,
                      int numCols)
Constructor

Parameters:
resultSet - ResultSet containing input for the parameter.
numCols - Number of columns in ResultSet
Method Detail

initialise

public void initialise(int position,
                       ActivityContext context)
                throws ParameterSetupException
Description copied from interface: ParameterInput
Optionally initialise a parameter using the current activity context. Useful if the activity receives its values from another activity's output.

Specified by:
initialise in interface ParameterInput
Parameters:
position - Current position of this parameter
context - Activity context
Throws:
ParameterSetupException - If some error occurs due to the client's settings.

getNextObject

public java.lang.Object getNextObject()
                               throws java.util.NoSuchElementException,
                                      ParameterAccessException
Description copied from interface: ParameterInput
Get the next value for the parameter.

Specified by:
getNextObject in interface ParameterInput
Throws:
ParameterAccessException - If a problem occurs.
java.util.NoSuchElementException - If there are no more values.

isDone

public boolean isDone()
Indicates whether the ResultSet is closed.

Specified by:
isDone in interface ParameterInput
Returns:
true the ResultSet is closed. i.e. if the all the data has been read.
See Also:
ParameterInput.isDone()