net.sourceforge.jdbcimporter.rowtranslator
Class SkipRowsRowTranslator

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.rowtranslator.SkipRowsRowTranslator
All Implemented Interfaces:
RowTranslator

public class SkipRowsRowTranslator
extends java.lang.Object
implements RowTranslator

The SkipRowsRowTranslator translates a row's values so that the first n rows are skipped.

Version:
0.72
Author:
cnagy

Field Summary
protected  int numRows
          The number of rows to skip.
 
Constructor Summary
SkipRowsRowTranslator()
           
 
Method Summary
 ColumnValue[] getValues(EntityDef entityDef, ColumnValue[] rowvalues)
          Returns the translated row's values.
 void setNumRows(int rows)
          Sets the number of rows to skip.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numRows

protected int numRows
The number of rows to skip.

Constructor Detail

SkipRowsRowTranslator

public SkipRowsRowTranslator()
Method Detail

setNumRows

public void setNumRows(int rows)
Sets the number of rows to skip.

Parameters:
rows - number of rows to skip

getValues

public ColumnValue[] getValues(EntityDef entityDef,
                               ColumnValue[] rowvalues)
Description copied from interface: RowTranslator
Returns the translated row's values. If null is returned then the JDBCImporter will skip the row.

Specified by:
getValues in interface RowTranslator
Parameters:
entityDef - the definition of the entity
rowvalues - the row's values read from a file
Returns:
the new row's values or null
See Also:
RowTranslator.getValues(net.sourceforge.jdbcimporter.EntityDef, net.sourceforge.jdbcimporter.ColumnValue[])