Class PojoMultiLoaderLoadingPlan<T>
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.loading.impl.PojoMultiLoaderLoadingPlan<T>
-
- All Implemented Interfaces:
PojoLoadingPlan<T>
public final class PojoMultiLoaderLoadingPlan<T> extends Object implements PojoLoadingPlan<T>
-
-
Constructor Summary
Constructors Constructor Description PojoMultiLoaderLoadingPlan(PojoSelectionLoadingContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidloadBlocking(Deadline deadline)Loads the entities whose identifiers were passed toPojoLoadingPlan.planLoading(PojoLoadingTypeContext, Object), blocking the current thread while doing so.<T2 extends T>
intplanLoading(PojoLoadingTypeContext<T2> expectedType, Object identifier)Plans the loading of an entity instance.<T2 extends T>
T2retrieve(PojoLoadingTypeContext<T2> expectedType, int ordinal)Retrieves a loaded entity instance.
-
-
-
Constructor Detail
-
PojoMultiLoaderLoadingPlan
public PojoMultiLoaderLoadingPlan(PojoSelectionLoadingContext context)
-
-
Method Detail
-
planLoading
public <T2 extends T> int planLoading(PojoLoadingTypeContext<T2> expectedType, Object identifier)
Description copied from interface:PojoLoadingPlanPlans the loading of an entity instance.- Specified by:
planLoadingin interfacePojoLoadingPlan<T>- Type Parameters:
T2- The exact expected type for the entity instance.- Parameters:
expectedType- The exact expected type for the entity instance.identifier- The entity identifier.- Returns:
- An ordinal to pass later to
PojoLoadingPlan.retrieve(PojoLoadingTypeContext, int). - See Also:
PojoLoadingPlan.loadBlocking(Deadline)
-
loadBlocking
public void loadBlocking(Deadline deadline)
Description copied from interface:PojoLoadingPlanLoads the entities whose identifiers were passed toPojoLoadingPlan.planLoading(PojoLoadingTypeContext, Object), blocking the current thread while doing so.- Specified by:
loadBlockingin interfacePojoLoadingPlan<T>- Parameters:
deadline- The deadline for loading the entities, or null if there is no deadline.
-
retrieve
public <T2 extends T> T2 retrieve(PojoLoadingTypeContext<T2> expectedType, int ordinal)
Description copied from interface:PojoLoadingPlanRetrieves a loaded entity instance.- Specified by:
retrievein interfacePojoLoadingPlan<T>- Type Parameters:
T2- The exact expected type for the entity instance.- Parameters:
expectedType- The expected type for the entity instance. Must be the same type passed toPojoLoadingPlan.planLoading(PojoLoadingTypeContext, Object).ordinal- The ordinal returned byPojoLoadingPlan.planLoading(PojoLoadingTypeContext, Object).- Returns:
- The loaded entity instance, or
nullif it was not found. The instance is guaranteed to be an instance of the given type exactly (not a subtype).
-
clear
public void clear()
- Specified by:
clearin interfacePojoLoadingPlan<T>
-
-