org.pentaho.di.trans
Class RowStepCollector

java.lang.Object
  extended by org.pentaho.di.trans.RowStepCollector
All Implemented Interfaces:
RowListener

public class RowStepCollector
extends Object
implements RowListener

Helper class for testcases. You can add an instance of this class to a step to read all of the Rows the step read or wrote.

Author:
Sven Boden

Constructor Summary
RowStepCollector()
           
 
Method Summary
 void clear()
          Clear the rows read and rows written.
 void errorRowWrittenEvent(RowMetaInterface rowMeta, Object[] row)
          This method is called when the error handling of a row is writing a row to the error stream.
 List<RowMetaAndData> getRowsError()
           
 List<RowMetaAndData> getRowsRead()
           
 List<RowMetaAndData> getRowsWritten()
           
 void rowReadEvent(RowMetaInterface rowMeta, Object[] row)
          This method is called when a row is read from another step
 void rowWrittenEvent(RowMetaInterface rowMeta, Object[] row)
          This method is called when a row is written to another step (even if there is no next step)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowStepCollector

public RowStepCollector()
Method Detail

rowReadEvent

public void rowReadEvent(RowMetaInterface rowMeta,
                         Object[] row)
Description copied from interface: RowListener
This method is called when a row is read from another step

Specified by:
rowReadEvent in interface RowListener
Parameters:
rowMeta - the metadata of the row
row - the data of the row

rowWrittenEvent

public void rowWrittenEvent(RowMetaInterface rowMeta,
                            Object[] row)
Description copied from interface: RowListener
This method is called when a row is written to another step (even if there is no next step)

Specified by:
rowWrittenEvent in interface RowListener
Parameters:
rowMeta - the metadata of the row
row - the data of the row

errorRowWrittenEvent

public void errorRowWrittenEvent(RowMetaInterface rowMeta,
                                 Object[] row)
Description copied from interface: RowListener
This method is called when the error handling of a row is writing a row to the error stream.

Specified by:
errorRowWrittenEvent in interface RowListener
Parameters:
rowMeta - the metadata of the row
row - the data of the row

clear

public void clear()
Clear the rows read and rows written.


getRowsRead

public List<RowMetaAndData> getRowsRead()

getRowsWritten

public List<RowMetaAndData> getRowsWritten()

getRowsError

public List<RowMetaAndData> getRowsError()