public interface SearchMapping
Provides entry points to Hibernate Search operations that are not tied to a specific ORM session.
| Modifier and Type | Method and Description |
|---|---|
Backend |
getBackend(String backendName) |
IndexManager |
getIndexManager(String indexName) |
default <T> SearchScope<T> |
scope(Class<T> type)
Create a
SearchScope limited to the given type. |
<T> SearchScope<T> |
scope(Class<T> expectedSuperType,
Collection<String> entityNames)
Create a
SearchScope limited to entity types referenced by their name. |
default <T> SearchScope<T> |
scope(Class<T> expectedSuperType,
String entityName)
Create a
SearchScope limited to entity types referenced by their name. |
<T> SearchScope<T> |
scope(Collection<? extends Class<? extends T>> types)
Create a
SearchScope limited to the given types. |
EntityManagerFactory |
toEntityManagerFactory() |
SessionFactory |
toOrmSessionFactory() |
default <T> SearchScope<T> scope(Class<T> type)
SearchScope limited to the given type.T - A type to include in the scope.type - A type to include in the scope.SearchScope<T> SearchScope<T> scope(Collection<? extends Class<? extends T>> types)
SearchScope limited to the given types.T - A supertype of all types to include in the scope.types - A collection of types to include in the scope.SearchScopedefault <T> SearchScope<T> scope(Class<T> expectedSuperType, String entityName)
SearchScope limited to entity types referenced by their name.T - A supertype of all entity types to include in the scope.expectedSuperType - A supertype of all entity types to include in the scope.entityName - An entity name. See Entity.name().SearchScope<T> SearchScope<T> scope(Class<T> expectedSuperType, Collection<String> entityNames)
SearchScope limited to entity types referenced by their name.T - A supertype of all entity types to include in the scope.expectedSuperType - A supertype of all entity types to include in the scope.entityNames - A collection of entity names. See Entity.name().SearchScopeEntityManagerFactory toEntityManagerFactory()
EntityManagerFactory used by this SearchMapping.SessionFactory toOrmSessionFactory()
SessionFactory used by this SearchMapping.IndexManager getIndexManager(String indexName)
indexName - The key to get the required IndexManager instance.indexName as name.Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.