Class AbstractXlsxSolutionImporter.XlsxInputBuilder<Solution_>
- java.lang.Object
-
- org.optaplanner.examples.common.app.LoggingMain
-
- org.optaplanner.examples.common.persistence.AbstractSolutionImporter.InputBuilder
-
- org.optaplanner.examples.common.persistence.AbstractXlsxSolutionImporter.XlsxInputBuilder<Solution_>
-
- Direct Known Subclasses:
InvestmentImporter.InvestmentAllocationInputBuilder
- Enclosing class:
- AbstractXlsxSolutionImporter<Solution_>
public abstract static class AbstractXlsxSolutionImporter.XlsxInputBuilder<Solution_> extends AbstractSolutionImporter.InputBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected FileinputFileprotected org.apache.poi.xssf.usermodel.XSSFWorkbookworkbook-
Fields inherited from class org.optaplanner.examples.common.app.LoggingMain
logger
-
-
Constructor Summary
Constructors Constructor Description XlsxInputBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidassertCellConstant(org.apache.poi.ss.usermodel.Cell cell, String constant)StringgetInputId()protected doublereadDoubleCell(org.apache.poi.ss.usermodel.Cell cell)protected doublereadDoubleParameter(org.apache.poi.ss.usermodel.Row row, String key)protected longreadLongCell(org.apache.poi.ss.usermodel.Cell cell)protected org.apache.poi.xssf.usermodel.XSSFSheetreadSheet(int index, String name)abstract Solution_readSolution()protected StringreadStringCell(org.apache.poi.ss.usermodel.Cell cell)protected StringreadStringParameter(org.apache.poi.ss.usermodel.Row row, String key)voidsetInputFile(File inputFile)voidsetWorkbook(org.apache.poi.xssf.usermodel.XSSFWorkbook document)
-
-
-
Field Detail
-
inputFile
protected File inputFile
-
workbook
protected org.apache.poi.xssf.usermodel.XSSFWorkbook workbook
-
-
Method Detail
-
setInputFile
public void setInputFile(File inputFile)
-
setWorkbook
public void setWorkbook(org.apache.poi.xssf.usermodel.XSSFWorkbook document)
-
readSolution
public abstract Solution_ readSolution() throws IOException
- Throws:
IOException
-
getInputId
public String getInputId()
-
readSheet
protected org.apache.poi.xssf.usermodel.XSSFSheet readSheet(int index, String name)
-
assertCellConstant
protected void assertCellConstant(org.apache.poi.ss.usermodel.Cell cell, String constant)
-
readLongCell
protected long readLongCell(org.apache.poi.ss.usermodel.Cell cell)
-
readDoubleCell
protected double readDoubleCell(org.apache.poi.ss.usermodel.Cell cell)
-
readStringCell
protected String readStringCell(org.apache.poi.ss.usermodel.Cell cell)
-
readStringParameter
protected String readStringParameter(org.apache.poi.ss.usermodel.Row row, String key)
-
readDoubleParameter
protected double readDoubleParameter(org.apache.poi.ss.usermodel.Row row, String key)
-
-