Activity - resultsetProjection
Activity Type: Relational
Description
Project a column onto the output ResultSet of an
sqlQueryStatement activity according to the parameter name
or index. It should be noted that:
- This activity has equal functionality to the the SQL
projection functionality. Therefore, it should be used only if the
corresponding projection through an SQL query can not be executed to
the data resource due to external constraints.
- This actvity's output blocks are Objects as retrieved while
iterating the input ResultSet. Therefore it can not be used an
end-activity by the user.
Example
<resultsetProjection name="projectValues">
<resultsetInput from="statementOutput"/>
<attributeName>email</attributeName>
<attributeValuesOutput name="projectOutput"/>
</resultsetProjection>
<resultsetProjection name="projectValues">
<resultsetInput from="statementOutput"/>
<attributeIndex>4</attributeIndex>
<attributeValuesOutput name="projectOutput"/>
</resultsetProjection>
Specification
Element resultsetProjection:
- Attribute name
- unique name for the activity within the scope of a request.
- Element resultsetInput
(required) - define the ResultSet object that will be iterated in order
to project the desired column name/index values.
- Attribute from (optional)
- name of the
output from another activity which provides the value of this
parameter.
- One of the following elements to indicate if the projection
is based on column name or index.
- Element attributeName
- the column name whose tuples' values will be projected.
- Element attributeIndex
- the
column index whose tuples' values will be projected.
- Element attributeValuesOutput
(required) - output
stream which produces the projected values.
- Attribute name
- name of
this output stream.
Input and Output Types
- Input: resultSetInput
- java.sql.ResultSet
- Output: attributeValuesOutput
- java.lang.String
Data Resource Accessor
This activity can operate with any data resource accessor.
XML Schema
OGSA-DAI/schema/ogsadai/xsd/activities/resultset_projection.xsd
Class
uk.org.ogsadai.activity.sql.ResultsetProjectionActivity
Client Toolkit Class
uk.org.ogsadai.client.toolkit.activity.sql.ResultsetProjection