Class AbstractHibernateOrmLoadingStrategy<E,I>
java.lang.Object
org.hibernate.search.mapper.orm.loading.impl.AbstractHibernateOrmLoadingStrategy<E,I>
- All Implemented Interfaces:
HibernateOrmEntityLoadingStrategy<E,,I> PojoMassLoadingStrategy<E,,I> PojoSelectionLoadingStrategy<E>
- Direct Known Subclasses:
HibernateOrmEntityIdEntityLoadingStrategy,HibernateOrmNonEntityIdPropertyEntityLoadingStrategy
public abstract class AbstractHibernateOrmLoadingStrategy<E,I>
extends Object
implements HibernateOrmEntityLoadingStrategy<E,I>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionabstract PojoSelectionEntityLoader<E>createEntityLoader(Set<? extends PojoLoadingTypeContext<? extends E>> targetEntityTypeContexts, HibernateOrmSelectionLoadingContext loadingContext) final PojoMassEntityLoader<I>createEntityLoader(Set<? extends PojoLoadingTypeContext<? extends E>> expectedTypes, PojoMassEntityLoadingContext<E> context) final PojoSelectionEntityLoader<E>createEntityLoader(Set<? extends PojoLoadingTypeContext<? extends E>> expectedTypes, PojoSelectionLoadingContext context) protected abstract TypeQueryFactory<E,I> createFactory(Class<E> entityClass, String ormEntityName, Class<I> uniquePropertyType, String uniquePropertyName) protected TypeQueryFactory<E,I> createFactory(EntityMappingType entityMappingType) final PojoMassIdentifierLoadercreateIdentifierLoader(Set<? extends PojoLoadingTypeContext<? extends E>> expectedTypes, PojoMassIdentifierLoadingContext<I> context) createQueryLoader(SessionFactoryImplementor sessionFactory, Set<? extends PojoLoadingTypeContext<? extends E>> typeContexts, List<ConditionalExpression> conditionalExpressions) createQueryLoader(SessionFactoryImplementor sessionFactory, Set<? extends PojoLoadingTypeContext<? extends E>> typeContexts, List<ConditionalExpression> conditionalExpressions, String order) final booleangroupingAllowed(PojoLoadingTypeContext<? extends E> type, PojoMassLoadingContext context) protected AssertionFailureinvalidTypesException(Set<? extends PojoLoadingTypeContext<?>> targetEntityTypeContexts) protected static EntityMappingTypetoMostSpecificCommonEntitySuperType(SessionFactoryImplementor sessionFactory, Iterable<? extends PojoLoadingTypeContext<?>> targetEntityTypeContexts) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.mapper.pojo.loading.spi.PojoMassLoadingStrategy
equals, hashCodeMethods inherited from interface org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionLoadingStrategy
equals, hashCode
-
Field Details
-
rootEntityName
-
uniquePropertyType
-
uniquePropertyName
-
-
Method Details
-
createEntityLoader
public final PojoSelectionEntityLoader<E> createEntityLoader(Set<? extends PojoLoadingTypeContext<? extends E>> expectedTypes, PojoSelectionLoadingContext context) - Specified by:
createEntityLoaderin interfacePojoSelectionLoadingStrategy<E>- Parameters:
expectedTypes- The expected types of loaded objects. The types are guaranteed to beassigned this strategy.- Returns:
- A loader.
-
createEntityLoader
public abstract PojoSelectionEntityLoader<E> createEntityLoader(Set<? extends PojoLoadingTypeContext<? extends E>> targetEntityTypeContexts, HibernateOrmSelectionLoadingContext loadingContext) -
groupingAllowed
public final boolean groupingAllowed(PojoLoadingTypeContext<? extends E> type, PojoMassLoadingContext context) - Specified by:
groupingAllowedin interfacePojoMassLoadingStrategy<E,I> - Parameters:
type- A type that Hibernate Search would like to load together with another one that uses the same strategy.context- Mapper-specific loading context.- Returns:
trueif this type
-
createIdentifierLoader
public final PojoMassIdentifierLoader createIdentifierLoader(Set<? extends PojoLoadingTypeContext<? extends E>> expectedTypes, PojoMassIdentifierLoadingContext<I> context) - Specified by:
createIdentifierLoaderin interfacePojoMassLoadingStrategy<E,I> - Parameters:
expectedTypes- The expected types of loaded entities. The types are guaranteed to beassigned this strategy.context- A context, used to retrieve information about the loading environment and options.- Returns:
- An entity identifier loader.
-
createEntityLoader
public final PojoMassEntityLoader<I> createEntityLoader(Set<? extends PojoLoadingTypeContext<? extends E>> expectedTypes, PojoMassEntityLoadingContext<E> context) - Specified by:
createEntityLoaderin interfacePojoMassLoadingStrategy<E,I> - Parameters:
expectedTypes- The expected types of loaded entities. The types are guaranteed to beassigned this strategy.context- A context, used to retrieve information about the loading environment and options.- Returns:
- An entity loader.
-
createQueryLoader
public HibernateOrmQueryLoader<E,I> createQueryLoader(SessionFactoryImplementor sessionFactory, Set<? extends PojoLoadingTypeContext<? extends E>> typeContexts, List<ConditionalExpression> conditionalExpressions) - Specified by:
createQueryLoaderin interfaceHibernateOrmEntityLoadingStrategy<E,I>
-
createQueryLoader
public HibernateOrmQueryLoader<E,I> createQueryLoader(SessionFactoryImplementor sessionFactory, Set<? extends PojoLoadingTypeContext<? extends E>> typeContexts, List<ConditionalExpression> conditionalExpressions, String order) - Specified by:
createQueryLoaderin interfaceHibernateOrmEntityLoadingStrategy<E,I>
-
createFactory
-
createFactory
-
toMostSpecificCommonEntitySuperType
protected static EntityMappingType toMostSpecificCommonEntitySuperType(SessionFactoryImplementor sessionFactory, Iterable<? extends PojoLoadingTypeContext<?>> targetEntityTypeContexts) -
invalidTypesException
protected AssertionFailure invalidTypesException(Set<? extends PojoLoadingTypeContext<?>> targetEntityTypeContexts)
-