Class JsonAllRecordsExporter

java.lang.Object
io.jmix.gridexportflowui.exporter.AbstractAllRecordsExporter
io.jmix.gridexportflowui.exporter.json.JsonAllRecordsExporter

@Component("grdexp_JsonAllRecordsExporter") public class JsonAllRecordsExporter extends AbstractAllRecordsExporter
Class is used by ExportAction for exporting all records from the database to JSON format.
  • Constructor Details

    • JsonAllRecordsExporter

      public JsonAllRecordsExporter(MetadataTools metadataTools, DataManager dataManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, GridExportProperties gridExportProperties)
  • Method Details

    • exportAll

      public void exportAll(DataUnit dataUnit, Consumer<Object> jsonObjectCreator)
      Method loads all entity instances associated with the given dataUnit and applies the jsonObjectCreator function to each loaded entity instance. Creation of the output file object 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
      jsonObjectCreator - function that is being applied to each loaded instance