Package io.jmix.search.index.queue.impl
Class OrderBasedEntityIdsLoader
java.lang.Object
io.jmix.search.index.queue.impl.OrderBasedEntityIdsLoader
- All Implemented Interfaces:
EntityIdsLoader
- Direct Known Subclasses:
CommonJpaEntityIdsLoader,OracleEntityIdsLoader
Loads data using ordering property.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.search.index.queue.EntityIdsLoader
EntityIdsLoader.ResultHolder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataManagerprotected Metadataprotected MetadataToolsprotected StoreAwareLocator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectconvertRawValue(MetaProperty orderingProperty, String rawValue) protected ValueLoadContextcreateValueLoadContext(MetaClass entityClass, String pkProperty, String orderingProperty, Object orderingValue, int batchSize) protected EntityIdsLoader.ResultHolderloadAllInMemory(MetaClass entityClass) loadNextIds(EnqueueingSession session, int batchSize) Loads next batch of instances related to provided session.protected abstract List<KeyValueEntity>loadValues(ValueLoadContext valueLoadContext) protected ObjectresolveLastLoadedOrderingValue(List<KeyValueEntity> loadedValues, String primaryKeyProperty, String orderingProperty)
-
Field Details
-
dataManager
-
metadata
-
metadataTools
-
storeAwareLocator
-
-
Constructor Details
-
OrderBasedEntityIdsLoader
public OrderBasedEntityIdsLoader()
-
-
Method Details
-
loadNextIds
Description copied from interface:EntityIdsLoaderLoads next batch of instances related to provided session.- Specified by:
loadNextIdsin interfaceEntityIdsLoader- Parameters:
session- enqueueing sessionbatchSize- batch size- Returns:
- loading result
-
loadValues
-
createValueLoadContext
protected ValueLoadContext createValueLoadContext(MetaClass entityClass, String pkProperty, String orderingProperty, @Nullable Object orderingValue, int batchSize) -
resolveLastLoadedOrderingValue
@Nullable protected Object resolveLastLoadedOrderingValue(List<KeyValueEntity> loadedValues, String primaryKeyProperty, String orderingProperty) -
loadAllInMemory
-
convertRawValue
@Nullable protected Object convertRawValue(MetaProperty orderingProperty, @Nullable String rawValue)
-