Class ModelBasedCsvExportTemplate<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.BaseCsvExportTemplate<ID,T>
-
- com.ocs.dynamo.ui.composite.export.impl.ModelBasedCsvExportTemplate<ID,T>
-
- Type Parameters:
ID- the type of the primary key of the entity to exportT- the type of the entity to export
public class ModelBasedCsvExportTemplate<ID extends Serializable,T extends AbstractEntity<ID>> extends BaseCsvExportTemplate<ID,T>
A template for exporting data to CSV- 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 ModelBasedCsvExportTemplate(BaseService<ID,T> service, EntityModel<T> entityModel, ExportMode exportMode, SortOrder[] sortOrders, Filter filter, 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.BaseExportTemplate
getEntityModel, getEntityModelFactory, getFilter, getJoins, getService, getSortOrders, getTitle, process, processFixed, show
-
-
-
-
Constructor Detail
-
ModelBasedCsvExportTemplate
public ModelBasedCsvExportTemplate(BaseService<ID,T> service, EntityModel<T> entityModel, ExportMode exportMode, SortOrder[] sortOrders, Filter filter, CustomXlsStyleGenerator<ID,T> customGenerator, FetchJoinInformation... joins)
Constructor- Parameters:
service- service used for retrieving data from the databaseentityModel- the entity model of the entities to exportexportMode- the export modesortOrders- the sort orders used to order the datafilter- filter to apply to limit the resultsjoins-
-
-
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
-
-