org.springframework.batch.item.excel.support.rowset
Class DefaultRowSetMetaData

java.lang.Object
  extended by org.springframework.batch.item.excel.support.rowset.DefaultRowSetMetaData
All Implemented Interfaces:
RowSetMetaData

public class DefaultRowSetMetaData
extends Object
implements RowSetMetaData

Default implementation for the RowSetMetaData interface. Requires a Sheet and ColumnNameExtractor to operate correctly. Delegates the retrieval of the column names to the ColumnNameExtractor.

Since:
0.5.0
Author:
Marten Deinum

Method Summary
 int getColumnCount()
          Retrieves the number of columns in the RowSet.
 String getColumnName(int idx)
          Retrieves the column name for the indicatd column.
 String[] getColumnNames()
          Retrieves the names of the columns for the current sheet.
 String getSheetName()
          Retrieves the name of the sheet the RowSet is based on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getColumnNames

public String[] getColumnNames()
Description copied from interface: RowSetMetaData
Retrieves the names of the columns for the current sheet.

Specified by:
getColumnNames in interface RowSetMetaData
Returns:
the column names.

getColumnName

public String getColumnName(int idx)
Description copied from interface: RowSetMetaData
Retrieves the column name for the indicatd column.

Specified by:
getColumnName in interface RowSetMetaData
Parameters:
idx - the index of the column, 0 based
Returns:
the column name

getColumnCount

public int getColumnCount()
Description copied from interface: RowSetMetaData
Retrieves the number of columns in the RowSet.

Specified by:
getColumnCount in interface RowSetMetaData
Returns:
the number of columns

getSheetName

public String getSheetName()
Description copied from interface: RowSetMetaData
Retrieves the name of the sheet the RowSet is based on.

Specified by:
getSheetName in interface RowSetMetaData
Returns:
the name of the sheet


Copyright © 2017. All rights reserved.