|
|||||||||||
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.SQLBulkLoad
This activity bulk loads data into a table within a relational database. A typical application of this activity would be to insert data generated by an SQLQuery
activity into another table.
The activity has one input and one outpe ut. The input must be XML data formatted using the WebRowSet standard, such as that generated by a WebRowSet
activity. The output consists of a count of the number of rows inserted into the table.
Note that the destination table must exist before this activity is processed, and the table column names must match those contained in the WebRowSet input data.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE Copyright statement |
private java.lang.String |
mTableName Name of table to load the data into |
private boolean |
mTransactionally Indicates whether the bulk load should be performed in a transactional manner - default false . |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary | |
SQLBulkLoad(ActivityOutput input, java.lang.String tableName) Constructs an SQL bulk load activity. |
Method Summary | |
protected java.lang.String |
generateXML() Generates the XML representing the activity. |
int |
getInsertedRowsCount() Gets the number of rows inserted into the table as a result of the bulk load operation. |
ActivityOutput |
getOutput() Gets the activity's only output. |
java.lang.String |
getTableName() Gets the name of the database table into which the data will be inserted. |
boolean |
isTransactionally() Gets whether this bulk load is performed in a transactional manner. |
void |
setInput(ActivityOutput input) Sets the input of this activity to be the output from another activity that will provide the data to be bulk loaded. |
void |
setTableName(java.lang.String tableName) Sets the name of the table to bulk load to. |
void |
setTransactionally(boolean transactionally) Sets whether this bulk load is performed in a transactional manner. |
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 java.lang.String mTableName
private boolean mTransactionally
false
.
Constructor Detail |
public SQLBulkLoad(ActivityOutput input, java.lang.String tableName)
input
- Output from another activity.tableName
- Name of table to bulk load to.java.lang.IllegalArgumentException
- If input
or tableName
are null
.Method Detail |
public final void setInput(ActivityOutput input)
input
- Output from another activity.java.lang.IllegalArgumentException
- If input
is null
.public final void setTableName(java.lang.String tableName)
tableName
- Name of table to bulk load to.java.lang.IllegalArgumentException
- If tableName
is null
.public java.lang.String getTableName()
public void setTransactionally(boolean transactionally)
transactionally
- true
if the bulk load is transactional, false
otherwisepublic boolean isTransactionally()
true
if the bulk load is transactional, false
otherwisepublic int getInsertedRowsCount() throws DataFormatException, NoActivityOutputException
NoActivityOutputException
- if there is no output data or the data has not yet been processed to this output or the activity that generates this output has not yet been executed.DataFormatException
- if the output from the activity cannot be parsed into a number.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 |