|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gageot.excel.core.RowMapperSheetExtractor
public class RowMapperSheetExtractor
Adapter implementation of the SheetExtractor interface that delegates to a RowMapper which is supposed to create an object for each row. Each object is added to the results List of this SheetExtractor.
Useful for the typical case of one object per row in the Excel spreadsheet. The number of entries in the results list will match the number of rows.
Note that a RowMapper object is typically stateless and thus reusable; just the RowMapperResultSetExtractor adapter is stateful.
RowMapper
Constructor Summary | |
---|---|
RowMapperSheetExtractor(RowMapper aRowMapper)
Create a new RowMapperSheetExtractor. |
Method Summary | |
---|---|
java.lang.Object |
extractData(org.apache.poi.hssf.usermodel.HSSFSheet sheet)
Implementations must implement this method to process all rows in the HSSFSheet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RowMapperSheetExtractor(RowMapper aRowMapper)
aRowMapper
- the RowMapper which creates an object for each rowMethod Detail |
---|
public java.lang.Object extractData(org.apache.poi.hssf.usermodel.HSSFSheet sheet) throws java.io.IOException
SheetExtractor
extractData
in interface SheetExtractor
sheet
- HSSFSheet to extract data from.
null
if none
(the extractor will typically be stateful in the latter case).
java.io.IOException
- if a IOException is encountered getting column
values or navigating (that is, there's no need to catch IOException)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |