Interface AllEntitiesLoader
- All Known Implementing Classes:
AbstractAllEntitiesLoader,KeysetAllEntitiesLoader,LimitOffsetAllEntitiesLoader
@NullMarked
public interface AllEntitiesLoader
This interface should be implemented by any bean which loads all entities for json or excel export.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceVisitor is passed toAllEntitiesLoaderto export loaded entity -
Method Summary
Modifier and TypeMethodDescriptionType of data loading strategy defined as string constant.voidloadAll(DataUnit dataUnit, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor) Deprecated, for removal: This API element is subject to removal in a future version.default voidloadAll(DataUnit dataUnit, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) Loads entities in batches of the given size and exports each entity using theAllEntitiesLoader.ExportedEntityVisitor.
-
Method Details
-
getPaginationStrategy
String getPaginationStrategy()Type of data loading strategy defined as string constant.AllEntitiesLoaderFactory.getEntitiesLoader()returns loader which pagination strategy equals toGridExportProperties.getExportAllPaginationStrategy() -
loadAll
@Deprecated(since="3.1", forRemoval=true) void loadAll(DataUnit dataUnit, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor) Deprecated, for removal: This API element is subject to removal in a future version.implement and useloadAll(DataUnit, ExportedEntityVisitor, int)instead, which takes the batch size configured for the exporter. This method will be removed and the one with the batch size will become abstract.Loads entities in batches of the size the loader chooses itself and exports each entity using theAllEntitiesLoader.ExportedEntityVisitor.- Parameters:
dataUnit- data unit linked with the dataexportedEntityVisitor- visitor which exports entity to appropriate format
-
loadAll
default void loadAll(DataUnit dataUnit, AllEntitiesLoader.ExportedEntityVisitor exportedEntityVisitor, int loadBatchSize) Loads entities in batches of the given size and exports each entity using theAllEntitiesLoader.ExportedEntityVisitor. A loader whose data source has no notion of batches may ignore the batch size.The default implementation exists only for loaders written before the batch size was introduced: it ignores
loadBatchSizeand delegates toloadAll(DataUnit, ExportedEntityVisitor). Override it.- Parameters:
dataUnit- data unit linked with the dataexportedEntityVisitor- visitor which exports entity to appropriate formatloadBatchSize- number of entities loaded in one query, positive
-
loadAll(DataUnit, ExportedEntityVisitor, int)instead, which takes the batch size configured for the exporter.