|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gageot.excel.core.ColumnMapRowMapper
public class ColumnMapRowMapper
RowMapper implementation that creates a java.util.Map
for each row, representing all columns as key-value pairs: one
entry for each column, with the column name as key.
The Map implementation to use can be customized through overriding
createColumnMap.
The CellMapper implementation to use can be customized through overriding
createCellMapper.
ExcelTemplate.readList(String)| Constructor Summary | |
|---|---|
ColumnMapRowMapper(java.lang.String[] aKeys)
|
|
| Method Summary | |
|---|---|
protected CellMapper |
createCellMapper(int rowNum)
Create a CellMapper instance to be used to map cells content. |
protected java.util.Map |
createColumnMap(int columnCount)
Create a Map instance to be used as column map. |
java.lang.Object |
mapRow(org.apache.poi.hssf.usermodel.HSSFRow row,
int rowNum)
Implementations must implement this method to map each row of data in the HSSFSheet. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColumnMapRowMapper(java.lang.String[] aKeys)
| Method Detail |
|---|
public java.lang.Object mapRow(org.apache.poi.hssf.usermodel.HSSFRow row,
int rowNum)
throws java.io.IOException
RowMapper
mapRow in interface RowMapperrow - the HSSFRow to maprowNum - the number of the current row
java.io.IOException - if a IOException is encountered getting
column values (that is, there's no need to catch IOException)protected java.util.Map createColumnMap(int columnCount)
By default, a linked case-insensitive Map will be created if possible, else a plain HashMap (see Spring's CollectionFactory).
columnCount - the column count, to be used as initial
capacity for the Map
CollectionFactory.createLinkedCaseInsensitiveMapIfPossible(int)protected CellMapper createCellMapper(int rowNum)
By default, a java.lang.String for each cell.
rowNum - the number of the current row
StringCellMapper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||