public class DebugSimpleStep extends SimpleStepAdapter implements ISupportTimings
This is an example implementation of ISimpleStep
extending
the SimpleStepAdapter
abstract class.
By default, the SimpleStepAdapter
abstract class
passes the values of the input fields directly to the output. The input values may
be inspected by using a Java? debugger and placing a breakpoint on the
processRow()
method.
Note: The plugin examples are included in the Data Management Platform Java™ Plugin jar and as such have a package name that represents that location. Therefore, modifying the examples requires placing the modified source, including the package statement, in a new Java™ compilation unit.
mInputFields, mOutputFields, mParameterNames, mParameterValues, mRowCount, mTimings, mValues
Constructor and Description |
---|
DebugSimpleStep() |
Modifier and Type | Method and Description |
---|---|
int |
getParameterCount()
Return the number of parameters this step requires.
|
java.lang.String |
getParameterName(int index)
Get the name of a parameter required by this step.
|
void |
processRow()
Process a row of data.
|
void |
setParameterValue(int index,
java.lang.String value)
Set the value of a parameter required by this step.
|
void |
setTimings(Timings timings)
Capture the container supplied
Timings instance. |
getOutputFieldCount, getOutputFieldInformation, getOutputFieldValue, postExec, preExec, release, setInputFieldCount, setInputFieldInformation, setInputFieldValue, validateInputs
public int getParameterCount()
StepParameters
getParameterCount
in interface StepParameters
getParameterCount
in class SimpleStepAdapter
public java.lang.String getParameterName(int index) throws java.lang.IndexOutOfBoundsException
StepParameters
getParameterName
in interface StepParameters
getParameterName
in class SimpleStepAdapter
index
- The 0-based index of the parameter name to retrievejava.lang.IndexOutOfBoundsException
- if the index argument is out of boundspublic void processRow() throws StepException
ISimpleStep
Called after all of the fields of an input row have been passed in. Process the row and make output fields available. Throw an exception to signal an error.
processRow
in interface ISimpleStep
processRow
in class SimpleStepAdapter
StepException
- If an error occurs during row processing.public void setParameterValue(int index, java.lang.String value) throws java.lang.IndexOutOfBoundsException
StepParameters
setParameterValue
in interface StepParameters
setParameterValue
in class SimpleStepAdapter
index
- The 0-based index of the parametervalue
- The value of the parameterjava.lang.IndexOutOfBoundsException
- if the index argument is out of boundspublic void setTimings(Timings timings)
ISupportTimings
Timings
instance.setTimings
in interface ISupportTimings
timings
- The container supplied Timings
instance.Copyright © 2012 SAS Institute Inc. All Rights Reserved.