org.gageot.excel.core
Interface CellCallbackHandler

All Known Implementing Classes:
BeanCellCallbackHandler

public interface CellCallbackHandler

Callback interface used by ExcelTemplate's query methods. Implementations of this interface perform the actual work of extracting results from cells, but don't need to worry about exception handling. IOExceptions will be caught and handled correctly by the ExcelTemplate class.

In contrast to a SheetExtractor, a CellCallbackHandler object is typically stateful: It keeps the result state within the object, to be available for later inspection.

Author:
David Gageot
See Also:
SheetExtractor, RowCallbackHandler, CellMapper

Method Summary
 void processCell(org.apache.poi.hssf.usermodel.HSSFCell cell, int rowNum, int columnNum)
          Implementations must implement this method to process each cell of data in the HSSFSheet.
 

Method Detail

processCell

void processCell(org.apache.poi.hssf.usermodel.HSSFCell cell,
                 int rowNum,
                 int columnNum)
                 throws java.io.IOException
Implementations must implement this method to process each cell of data in the HSSFSheet. This method should extract the current value. Exactly what the implementation chooses to do is up to it; a trivial implementation might simply count cells, while another implementation might build an XML document.

Parameters:
cell - the HSSFCell to process
rowNum - the number of the current row
columnNum - the number of the current column
Throws:
java.io.IOException - if a IOException is encountered getting column values (that is, there's no need to catch IOException)


Copyright © 2007 gageot.net. All Rights Reserved.