Package com.storedobject.report
Class ObjectListExcel<T extends StoredObject>
java.lang.Object
com.storedobject.core.StreamContentProducer
com.storedobject.office.AbstractSpreadSheet
com.storedobject.office.Excel
com.storedobject.office.ExcelReport
com.storedobject.report.ObjectListExcel<T>
- Type Parameters:
T- Type of objects to list (as defined in theReportDefinition).
- All Implemented Interfaces:
Executable,ContentProducer,ContentType,JSONParameter,RequiresTransactionManager,ObjectLister<T>,Closeable,AutoCloseable,Runnable
public class ObjectListExcel<T extends StoredObject>
extends ExcelReport
implements JSONParameter, ObjectLister<T>
Generate an Excel with list of objects. The generated output will be formatted as per the definition in the given
ReportDefinition instance.
Note: This logic doesn't consider the filters ReportDefinition.getFilter() while generating the
output.
- Author:
- Syam
-
Field Summary
FieldsFields inherited from class com.storedobject.office.AbstractSpreadSheet
MAX_ROWS, workbookFields inherited from class com.storedobject.core.StreamContentProducer
entity, out -
Constructor Summary
ConstructorsConstructorDescriptionObjectListExcel(Device device, ReportDefinition reportDefinition) ObjectListExcel(Device device, Class<T> dataClass, boolean any, String... attributes) ObjectListExcel(Device device, Class<T> dataClass, String... attributes) ObjectListExcel(Device device, String reportDefinitionName) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidexecute()The functional interface method specified by this interface.voidGenerate the content here and write to 'out'protected String[]longgetRowCount(T object) protected HasContactsvoidsetErrorMessage(String errorMessage) voidsetExtraCondition(String extraCondition) voidsetLoadFilter(Predicate<T> loadFilter) voidsetParameters(JSON json) If implemented, this method is typically invoked by the tools before aContentProduceris asked to produce its output.Methods inherited from class com.storedobject.office.ExcelReport
getDevice, getTransactionManager, setEntity, setTransactionManager, viewMethods inherited from class com.storedobject.office.Excel
createWorkbook, getContentType, getFileExtensionMethods inherited from class com.storedobject.office.AbstractSpreadSheet
abort, close, feedback, getCell, getCell, getCell, getCell, getCellIndex, getCells, getCenteredStyle, getColumnCells, getDateStyle, getDateTimeStyle, getHourStyle, getNextCell, getNextRow, getNextSheet, getNumericStyle, getNumericStyle, getPercentage2Style, getPercentageStyle, getPreviousCell, getPreviousRow, getPreviousSheet, getRightAlignedStyle, getRow, getRow, getRow, getRowCells, getRowIndex, getSheet, getSheet, getSheetIndex, getWorkbook, goToCell, goToCell, goToCell, goToCell, goToRow, isSameSize, moveDown, moveLeft, moveRight, moveUp, save, save, setCellValue, setCellValue, setCellValues, setFeedback, validateCellAddress, validateColumnAddress, validateRangeAddress, validateRowAddressMethods inherited from class com.storedobject.core.StreamContentProducer
getContent, getEntity, getError, getFileName, getReportFormat, getWriter, isBlocked, isBlocked, produce, readyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.core.ContentProducer
extractContent, getStreamData, getStreamDataProvider, getSystemEntity, saveTo, saveTo, saveTo, saveToMethods inherited from interface com.storedobject.core.ContentType
getLink, getMimeType, isAudio, isHTML, isImage, isLink, isMedia, isPDF, isText, isVideoMethods inherited from interface com.storedobject.common.Executable
act, runMethods inherited from interface com.storedobject.report.ObjectLister
customizeList, customizeQueryBuilder, customizeTableHeader, getCharCount, getColumnCaption, getOrderBy, getReportDefinition
-
Field Details
-
reportDefinition
-
row
protected long row
-
-
Constructor Details
-
ObjectListExcel
-
ObjectListExcel
-
ObjectListExcel
-
ObjectListExcel
-
ObjectListExcel
-
ObjectListExcel
-
-
Method Details
-
execute
public final void execute()Description copied from interface:ExecutableThe functional interface method specified by this interface.- Specified by:
executein interfaceContentProducer- Specified by:
executein interfaceExecutable- Overrides:
executein classExcelReport
-
getTitleEntity
-
getExtraCaptions
-
generateContent
Description copied from class:StreamContentProducerGenerate the content here and write to 'out'- Overrides:
generateContentin classAbstractSpreadSheet- Throws:
Exception- Can throw anything
-
setExtraCondition
- Specified by:
setExtraConditionin interfaceObjectLister<T extends StoredObject>
-
getExtraCondition
- Specified by:
getExtraConditionin interfaceObjectLister<T extends StoredObject>
-
setLoadFilter
-
getLoadFilter
- Specified by:
getLoadFilterin interfaceObjectLister<T extends StoredObject>
-
getRowCount
-
setParameters
Description copied from interface:JSONParameterIf implemented, this method is typically invoked by the tools before aContentProduceris asked to produce its output. It can extract its required parameter values from theJSONstructure.- Specified by:
setParametersin interfaceJSONParameter- Parameters:
json-JSONcontaining parameter values.
-
getReportDefinition
- Specified by:
getReportDefinitionin interfaceObjectLister<T extends StoredObject>
-
setErrorMessage
- Specified by:
setErrorMessagein interfaceObjectLister<T extends StoredObject>
-