public class CSVTabularDataWriter extends Object implements ReportWriter
OutputStream as a Text CSV File| Modifier and Type | Field and Description |
|---|---|
protected List<Reporter<Object[]>> |
baseReporters
Each Reporter will create a new Section
|
protected org.apache.poi.ss.usermodel.Workbook |
workbook |
| Constructor and Description |
|---|
CSVTabularDataWriter() |
| Modifier and Type | Method and Description |
|---|---|
List<Reporter<Object[]>> |
getBaseReporters()
Each Reporter will create a new Sheet
|
protected PageInfo |
getPageInfoForReport(Reporter<Object[]> report,
int index,
PageInfo pageInfo)
If the the data is is only a page then we should override and return the appropriate PageInfo
|
protected Object[] |
getParamsForReport(Reporter<Object[]> report,
int index,
Object[] params)
If there are conditions/parameters for the report; then supply them in accordance to what is required by the Data generating
Reporters |
void |
init()
Initialize the Export Writer
|
void |
setBaseReporters(List<Reporter<Object[]>> baseReporters)
Each Reporter will create a new Sheet
|
org.apache.poi.ss.usermodel.Workbook |
writeDataToFile(Object[] params,
PageInfo pageInfo)
Generate the file from the data
|
void |
writeDataToStream(OutputStream outputStream,
Object[] params,
PageInfo pageInfo)
Generate the Excel and write it onto the
OutputStream |
protected List<Reporter<Object[]>> baseReporters
protected transient org.apache.poi.ss.usermodel.Workbook workbook
@PostConstruct public void init()
ReportWriterinit in interface ReportWriterprotected Object[] getParamsForReport(Reporter<Object[]> report, int index, Object[] params)
Reportersreport - as Reporterindex - as intparamsas - Object[]protected PageInfo getPageInfoForReport(Reporter<Object[]> report, int index, PageInfo pageInfo)
public org.apache.poi.ss.usermodel.Workbook writeDataToFile(Object[] params, PageInfo pageInfo) throws Exception
public void writeDataToStream(OutputStream outputStream, Object[] params, PageInfo pageInfo) throws Exception
OutputStreamwriteDataToStream in interface ReportWriteroutputStream - as OutputStreamparams - as Object[] as any parameters to pass to the Reporter @nullable truepageInfo - as PageInfo as any pagination details to pass @nullable trueExceptionpublic List<Reporter<Object[]>> getBaseReporters()
getBaseReporters in interface ReportWriterpublic void setBaseReporters(List<Reporter<Object[]>> baseReporters)
setBaseReporters in interface ReportWriterCopyright © 2018. All rights reserved.