Class AllRecordsExporter
java.lang.Object
io.jmix.gridexportflowui.exporter.excel.AllRecordsExporter
Class is used by
ExportAction for exporting all records from the database.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataManagerprotected GridExportPropertiesprotected MetadataToolsprotected org.springframework.transaction.PlatformTransactionManager -
Constructor Summary
ConstructorsConstructorDescriptionAllRecordsExporter(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexportAll(DataUnit dataUnit, Consumer<AllRecordsExporter.RowCreationContext> excelRowCreator) Method loads all entity instances associated with the givendataUnitand applies theexcelRowCreatorfunction to each loaded entity instance.
-
Field Details
-
metadataTools
-
dataManager
-
platformTransactionManager
protected org.springframework.transaction.PlatformTransactionManager platformTransactionManager -
gridExportProperties
-
-
Constructor Details
-
AllRecordsExporter
public AllRecordsExporter(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties)
-
-
Method Details
-
exportAll
protected void exportAll(DataUnit dataUnit, Consumer<AllRecordsExporter.RowCreationContext> excelRowCreator) Method loads all entity instances associated with the givendataUnitand applies theexcelRowCreatorfunction 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 instance
-