Class ModelBasedExcelExportTemplate<ID extends Serializable,T extends AbstractEntity<ID>>
- java.lang.Object
-
- com.ocs.dynamo.ui.composite.export.impl.BaseExportTemplate<ID,T>
-
- com.ocs.dynamo.ui.composite.export.impl.BaseExcelExportTemplate<ID,T>
-
- com.ocs.dynamo.ui.composite.export.impl.ModelBasedExcelExportTemplate<ID,T>
-
- Type Parameters:
ID- the type of the primary keyT- the type of the entity
public class ModelBasedExcelExportTemplate<ID extends Serializable,T extends AbstractEntity<ID>> extends BaseExcelExportTemplate<ID,T>
Template for exporting a data set to Excel based on the Entity model- Author:
- bas.rutten
-
-
Field Summary
-
Fields inherited from class com.ocs.dynamo.ui.composite.export.impl.BaseExportTemplate
FIXED_COLUMN_WIDTH, MAX_SIZE_BEFORE_STREAMING, PAGE_SIZE, TITLE_ROW_HEIGHT
-
-
Constructor Summary
Constructors Constructor Description ModelBasedExcelExportTemplate(BaseService<ID,T> service, EntityModel<T> entityModel, ExportMode mode, SortOrder[] sortOrders, Filter filter, String title, Supplier<CustomXlsStyleGenerator<ID,T>> customGenerator, FetchJoinInformation... joins)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]generate(com.ocs.dynamo.domain.query.DataSetIterator<ID,T> iterator)Generates the file-
Methods inherited from class com.ocs.dynamo.ui.composite.export.impl.BaseExcelExportTemplate
canResize, createCell, createGenerator, createWorkbook, getGenerator, getWorkbook, resizeColumns, setGenerator, setWorkbook, writeCellValue
-
Methods inherited from class com.ocs.dynamo.ui.composite.export.impl.BaseExportTemplate
getEntityModel, getEntityModelFactory, getFilter, getJoins, getService, getSortOrders, getTitle, process, processFixed, show
-
-
-
-
Constructor Detail
-
ModelBasedExcelExportTemplate
public ModelBasedExcelExportTemplate(BaseService<ID,T> service, EntityModel<T> entityModel, ExportMode mode, SortOrder[] sortOrders, Filter filter, String title, Supplier<CustomXlsStyleGenerator<ID,T>> customGenerator, FetchJoinInformation... joins)
Constructor- Parameters:
service- the service used to retrieve the dataentityModel- the entity modelsortOrders- any sort orders to apply to the datafilter- the filter that is used to retrieve the appropriate datatitle- the title of the sheetcustomGenerator- custom style generatorjoins-
-
-
Method Detail
-
generate
protected byte[] generate(com.ocs.dynamo.domain.query.DataSetIterator<ID,T> iterator) throws IOException
Description copied from class:BaseExportTemplateGenerates the file- Specified by:
generatein classBaseExportTemplate<ID extends Serializable,T extends AbstractEntity<ID>>- Parameters:
iterator- data set iterator that contains the rows to include- Returns:
- Throws:
IOException
-
-