Class InfinispanSearchSession
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.session.spi.AbstractPojoSearchSession
-
- org.infinispan.search.mapper.session.impl.InfinispanSearchSession
-
- All Implemented Interfaces:
AutoCloseable,org.hibernate.search.engine.backend.common.spi.DocumentReferenceConverter<EntityReference>,org.hibernate.search.engine.backend.session.spi.BackendSessionContext,org.hibernate.search.mapper.pojo.automaticindexing.spi.PojoImplicitReindexingResolverSessionContext,org.hibernate.search.mapper.pojo.bridge.runtime.spi.BridgeSessionContext,org.hibernate.search.mapper.pojo.processing.spi.PojoIndexingProcessorSessionContext,org.hibernate.search.mapper.pojo.scope.spi.PojoScopeSessionContext,org.hibernate.search.mapper.pojo.work.spi.PojoWorkSessionContext,SearchSession
public class InfinispanSearchSession extends org.hibernate.search.mapper.pojo.session.spi.AbstractPojoSearchSession implements SearchSession, org.hibernate.search.engine.backend.common.spi.DocumentReferenceConverter<EntityReference>
- Author:
- Fabio Massimo Ercoli
-
-
Constructor Summary
Constructors Constructor Description InfinispanSearchSession(InfinispanSearchSessionMappingContext mappingContext, org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionEntityLoader<?> entityLoader, InfinispanTypeContextProvider typeContextProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()org.hibernate.search.mapper.pojo.work.spi.PojoIndexercreateIndexer()org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionLoadingContextdefaultLoadingContext()EntityReferencefromDocumentReference(org.hibernate.search.engine.backend.common.DocumentReference reference)InfinispanRuntimeIntrospectorruntimeIntrospector()<T> SearchScope<T>scope(Class<T> expectedSuperType, Collection<String> entityNames)Create aSearchScopelimited to entity types referenced by their name.<E> SearchScopeImpl<E>scope(Collection<? extends Class<? extends E>> types)Create aSearchScopelimited to the given types.<E> org.hibernate.search.engine.search.query.dsl.SearchQuerySelectStep<?,EntityReference,E,?,?,?>search(SearchScope<E> scope)Initiate the building of a search query.StringtenantIdentifier()-
Methods inherited from class org.hibernate.search.mapper.pojo.session.spi.AbstractPojoSearchSession
identifierBridgeFromDocumentIdentifierContext, mappingContext, propertyBridgeWriteContext, routingBridgeRouteContext, typeBridgeWriteContext, valueBridgeFromIndexedValueContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.search.mapper.session.SearchSession
scope, scope
-
-
-
-
Constructor Detail
-
InfinispanSearchSession
public InfinispanSearchSession(InfinispanSearchSessionMappingContext mappingContext, org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionEntityLoader<?> entityLoader, InfinispanTypeContextProvider typeContextProvider)
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
search
public <E> org.hibernate.search.engine.search.query.dsl.SearchQuerySelectStep<?,EntityReference,E,?,?,?> search(SearchScope<E> scope)
Description copied from interface:SearchSessionInitiate the building of a search query.The query will target the indexes in the given scope.
- Specified by:
searchin interfaceSearchSession- Type Parameters:
E- An entity type to include in the scope.- Parameters:
scope- A scope representing all indexed types that will be targeted by the search query.- Returns:
- The initial step of a DSL where the search query can be defined.
- See Also:
SearchQuerySelectStep
-
scope
public <E> SearchScopeImpl<E> scope(Collection<? extends Class<? extends E>> types)
Description copied from interface:SearchSessionCreate aSearchScopelimited to the given types.- Specified by:
scopein interfaceSearchSession- Type Parameters:
E- A supertype of all indexed entity types that will be targeted by the search query.- Parameters:
types- A collection of types to include in the scope.- Returns:
- The created scope.
- See Also:
SearchScope
-
scope
public <T> SearchScope<T> scope(Class<T> expectedSuperType, Collection<String> entityNames)
Description copied from interface:SearchSessionCreate aSearchScopelimited to entity types referenced by their name.- Specified by:
scopein interfaceSearchSession- Type Parameters:
T- A supertype of all entity types to include in the scope.- Parameters:
expectedSuperType- A supertype of all entity types to include in the scope.entityNames- A collection of entity names.- Returns:
- The created scope.
- See Also:
SearchScope
-
fromDocumentReference
public EntityReference fromDocumentReference(org.hibernate.search.engine.backend.common.DocumentReference reference)
- Specified by:
fromDocumentReferencein interfaceorg.hibernate.search.engine.backend.common.spi.DocumentReferenceConverter<EntityReference>
-
createIndexer
public org.hibernate.search.mapper.pojo.work.spi.PojoIndexer createIndexer()
- Specified by:
createIndexerin interfaceSearchSession- Overrides:
createIndexerin classorg.hibernate.search.mapper.pojo.session.spi.AbstractPojoSearchSession
-
tenantIdentifier
public String tenantIdentifier()
- Specified by:
tenantIdentifierin interfaceorg.hibernate.search.engine.backend.session.spi.BackendSessionContext- Specified by:
tenantIdentifierin interfaceorg.hibernate.search.mapper.pojo.bridge.runtime.spi.BridgeSessionContext
-
runtimeIntrospector
public InfinispanRuntimeIntrospector runtimeIntrospector()
- Specified by:
runtimeIntrospectorin interfaceorg.hibernate.search.mapper.pojo.automaticindexing.spi.PojoImplicitReindexingResolverSessionContext- Specified by:
runtimeIntrospectorin interfaceorg.hibernate.search.mapper.pojo.processing.spi.PojoIndexingProcessorSessionContext
-
defaultLoadingContext
public org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionLoadingContext defaultLoadingContext()
- Specified by:
defaultLoadingContextin interfaceorg.hibernate.search.mapper.pojo.work.spi.PojoWorkSessionContext
-
-