Class ExcelAllRecordsExporter
java.lang.Object
io.jmix.gridexportflowui.exporter.AbstractAllRecordsExporter
io.jmix.gridexportflowui.exporter.excel.ExcelAllRecordsExporter
@Component("grdexp_ExcelAllRecordsExporter")
public class ExcelAllRecordsExporter
extends AbstractAllRecordsExporter
Class is used by
ExportAction
for exporting all records from the database.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataManager
protected GridExportProperties
protected org.springframework.transaction.PlatformTransactionManager
Fields inherited from class io.jmix.gridexportflowui.exporter.AbstractAllRecordsExporter
LAST_LOADED_PK_CONDITION_PARAMETER_NAME, metadataTools
-
Constructor Summary
ConstructorDescriptionExcelAllRecordsExporter
(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
exportAll
(DataUnit dataUnit, Consumer<ExcelAllRecordsExporter.RowCreationContext> excelRowCreator, Predicate<Integer> excelRowChecker) Method loads all entity instances associated with the givendataUnit
and applies theexcelRowCreator
function to each loaded entity instance.Methods inherited from class io.jmix.gridexportflowui.exporter.AbstractAllRecordsExporter
generateLoadContext
-
Field Details
-
dataManager
-
platformTransactionManager
protected org.springframework.transaction.PlatformTransactionManager platformTransactionManager -
gridExportProperties
-
-
Constructor Details
-
ExcelAllRecordsExporter
public ExcelAllRecordsExporter(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties)
-
-
Method Details
-
exportAll
protected void exportAll(DataUnit dataUnit, Consumer<ExcelAllRecordsExporter.RowCreationContext> excelRowCreator, Predicate<Integer> excelRowChecker) Method loads all entity instances associated with the givendataUnit
and applies theexcelRowCreator
function to each loaded entity instance. Creation of the output file row is the responsibility of the function. Data is loaded in batches, the batch size is configured by theGridExportProperties.getExportAllBatchSize()
.- Parameters:
dataUnit
- data unit linked with the dataexcelRowCreator
- function that is being applied to each loaded instanceexcelRowChecker
- function that checks for exceeding the maximum number of rows in XLSX format
-