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

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

public class StaticColumnNameExtractor
extends Object
implements ColumnNameExtractor

ColumnNameExtractor implementation which returns a preset String[] to use as the column names. Useful for those situations in which an Excel file without a header row is read

Since:
0.5.0
Author:
Marten Deinum

Constructor Summary
StaticColumnNameExtractor(String[] columnNames)
           
 
Method Summary
 String[] getColumnNames(Sheet sheet)
          Retrieves the names of the columns in the given Sheet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticColumnNameExtractor

public StaticColumnNameExtractor(String[] columnNames)
Method Detail

getColumnNames

public String[] getColumnNames(Sheet sheet)
Description copied from interface: ColumnNameExtractor
Retrieves the names of the columns in the given Sheet.

Specified by:
getColumnNames in interface ColumnNameExtractor
Parameters:
sheet - the sheet
Returns:
the column names


Copyright © 2017. All rights reserved.