|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.client.toolkit.activity.RequestComponent | +--uk.org.ogsadai.client.toolkit.activity.Activity | +--uk.org.ogsadai.client.toolkit.activity.sql.SQLResultToBytes
This activity takes an SQL result set and extracts the data from a single column of the first row as a stream of binary data. This functionality is useful when extracting BLOBs from databases and passing the contents onto a delivery activity.
The activity has a one input. This input should contain a single
block which is an instance of java.sql.ResultSet
.
The activity output has one output to which the binary data will be written as blocks of byte arrays. The number of bytes in each array can be specified by the user.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private int |
mBlockSize
The number of bytes to output per block |
private int |
mColumnIndex
The index of the column from which to extract the data |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary | |
SQLResultToBytes(ActivityOutput input,
int columnIndex)
Constructor. |
Method Summary | |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
ActivityOutput |
getOutput()
Gets the activity output to which the blocks of byte arrays will be written. |
void |
setBlockSize(int blockSize)
Sets the block size to use in the output steam. |
void |
setColumnIndex(int columnIndex)
Resets the index of the column from which to extract the data. |
void |
setInput(ActivityOutput input)
Resets the activity's input stream. |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
addInput, addOutput, addOutputs, getDataResourceID, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setInput |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
getDataService, getName, getSession, setDataService, setSession |
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 int mColumnIndex
private int mBlockSize
Constructor Detail |
public SQLResultToBytes(ActivityOutput input, int columnIndex)
input
- The input stream. This input stream should produce
a single java.sql.ResultSet
block.columnIndex
- The index of the column from which to extract the
data. The index of the first column is 1.Method Detail |
public void setColumnIndex(int columnIndex)
columnIndex
- public void setBlockSize(int blockSize)
If unspecified the activity's default block size of 1024 bytes will be used.
blockSize
- Block size in bytes.public void setInput(ActivityOutput input)
java.sql.ResultSet
block.
input
- Input stream.
java.lang.IllegalArgumentException
- if the argument is null
.public ActivityOutput getOutput()
protected java.lang.String generateXML()
RequestComponent
generateXML
in class Activity
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |