Class AllRecordsExporter

java.lang.Object
io.jmix.gridexportui.exporter.excel.AllRecordsExporter

@Component("grdexp_AllRecordsExporter") public class AllRecordsExporter extends Object
Class is used by ExportAction for exporting all records from the database.
  • 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 given dataUnit and applies the excelRowCreator 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 the GridExportProperties.getExportAllBatchSize().
      Parameters:
      dataUnit - data unit linked with the data
      excelRowCreator - function that is being applied to each loaded instance