org.springframework.batch.item.excel.support.rowset
Interface RowSet

All Known Implementing Classes:
DefaultRowSet

public interface RowSet

Used by the org.springframework.batch.item.excel.AbstractExcelItemReader to abstract away the complexities of the underlying Excel API implementations.

Since:
0.5.0
Author:
Marten Deinum

Method Summary
 String getColumnValue(int idx)
          Retrieves the value of the indicated column in the current row as a String object.
 String[] getCurrentRow()
          Return the current row as a String[].
 int getCurrentRowIndex()
          Returns the current row number
 RowSetMetaData getMetaData()
          Retrieves the meta data (name of the sheet, number of columns, names) of this row set.
 Properties getProperties()
          Construct name-value pairs from the column names and string values.
 boolean next()
          Move to the next row in the document.
 

Method Detail

getMetaData

RowSetMetaData getMetaData()
Retrieves the meta data (name of the sheet, number of columns, names) of this row set.

Returns:
a corresponding RowSetMetaData instance.

next

boolean next()
Move to the next row in the document.

Returns:
true if the row is valid, false if there are no more rows

getCurrentRowIndex

int getCurrentRowIndex()
Returns the current row number

Returns:
the current row number

getCurrentRow

String[] getCurrentRow()
Return the current row as a String[].

Returns:
the row as a String[]

getColumnValue

String getColumnValue(int idx)
Retrieves the value of the indicated column in the current row as a String object.

Parameters:
idx - the column index, 0 based
Returns:
a String objeect respresenting the column value.

getProperties

Properties getProperties()
Construct name-value pairs from the column names and string values. Null values are omitted.

Returns:
some properties representing the row set.
Throws:
IllegalStateException - if the column name meta data is not available.


Copyright © 2017. All rights reserved.