Class SearchScopeImpl<E>

java.lang.Object
org.infinispan.search.mapper.scope.impl.SearchScopeImpl<E>
All Implemented Interfaces:
SearchScope<E>

public class SearchScopeImpl<E> extends Object implements SearchScope<E>
  • Constructor Summary

    Constructors
    Constructor
    Description
    SearchScopeImpl(org.hibernate.search.engine.backend.mapping.spi.BackendMappingContext mappingContext, org.hibernate.search.mapper.pojo.scope.spi.PojoScopeDelegate<EntityReference,E,org.hibernate.search.mapper.pojo.model.spi.PojoRawTypeIdentifier<? extends E>> delegate, org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionEntityLoader<E> entityLoader)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.hibernate.search.engine.search.aggregation.dsl.SearchAggregationFactory
    Initiate the building of a search aggregation that will be valid for the indexes in this scope.
    org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory
    Initiate the building of a search predicate.
    org.hibernate.search.engine.search.projection.dsl.SearchProjectionFactory<EntityReference,E>
    Initiate the building of a search projection that will be valid for the indexes in this scope.
    org.hibernate.search.engine.search.query.dsl.SearchQuerySelectStep<?,EntityReference,E,?,?,?>
    search(org.hibernate.search.mapper.pojo.scope.spi.PojoScopeSessionContext sessionContext, org.hibernate.search.engine.backend.common.spi.DocumentReferenceConverter<EntityReference> documentReferenceConverter)
     
    org.hibernate.search.engine.search.sort.dsl.SearchSortFactory
    Initiate the building of a search sort.
    Create a SearchWorkspace for the indexes mapped to types in this scope, or to any of their sub-types.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SearchScopeImpl

      public SearchScopeImpl(org.hibernate.search.engine.backend.mapping.spi.BackendMappingContext mappingContext, org.hibernate.search.mapper.pojo.scope.spi.PojoScopeDelegate<EntityReference,E,org.hibernate.search.mapper.pojo.model.spi.PojoRawTypeIdentifier<? extends E>> delegate, org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionEntityLoader<E> entityLoader)
  • Method Details

    • predicate

      public org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory predicate()
      Description copied from interface: SearchScope
      Initiate the building of a search predicate.

      The predicate will only be valid for search queries created using this scope or another scope instance targeting the same indexes.

      Note this method is only necessary if you do not want to use lambda expressions, since you can define predicates with lambdas within the search query DSL, removing the need to create separate objects to represent the predicates.

      Specified by:
      predicate in interface SearchScope<E>
      Returns:
      A predicate factory.
      See Also:
      • SearchPredicateFactory
    • sort

      public org.hibernate.search.engine.search.sort.dsl.SearchSortFactory sort()
      Description copied from interface: SearchScope
      Initiate the building of a search sort.

      The sort will only be valid for search queries created using this scope or another scope instance targeting the same indexes.

      Note this method is only necessary if you do not want to use lambda expressions, since you can define sorts with lambdas within the search query DSL, removing the need to create separate objects to represent the sorts.

      Specified by:
      sort in interface SearchScope<E>
      Returns:
      A sort factory.
      See Also:
      • SearchSortFactory
    • projection

      public org.hibernate.search.engine.search.projection.dsl.SearchProjectionFactory<EntityReference,E> projection()
      Description copied from interface: SearchScope
      Initiate the building of a search projection that will be valid for the indexes in this scope.

      The projection will only be valid for search queries created using this scope or another scope instance targeting the same indexes.

      Note this method is only necessary if you do not want to use lambda expressions, since you can SearchQuerySelectStep#asProjection(Function) define projections with lambdas} within the search query DSL, removing the need to create separate objects to represent the projections.

      Specified by:
      projection in interface SearchScope<E>
      Returns:
      A projection factory.
      See Also:
      • SearchProjectionFactory
    • aggregation

      public org.hibernate.search.engine.search.aggregation.dsl.SearchAggregationFactory aggregation()
      Description copied from interface: SearchScope
      Initiate the building of a search aggregation that will be valid for the indexes in this scope.

      The aggregation will only be usable in search queries created using this scope or another scope instance targeting the same indexes.

      Note this method is only necessary if you do not want to use lambda expressions, since you can SearchQueryOptionsStep.aggregation(AggregationKey, SearchAggregation) define aggregations with lambdas} within the search query DSL, removing the need to create separate objects to represent the aggregation.

      Specified by:
      aggregation in interface SearchScope<E>
      Returns:
      An aggregation factory.
      See Also:
      • SearchAggregationFactory
    • workspace

      public SearchWorkspace workspace()
      Description copied from interface: SearchScope
      Create a SearchWorkspace for the indexes mapped to types in this scope, or to any of their sub-types.
      Specified by:
      workspace in interface SearchScope<E>
      Returns:
      A SearchWorkspace.
    • search

      public org.hibernate.search.engine.search.query.dsl.SearchQuerySelectStep<?,EntityReference,E,?,?,?> search(org.hibernate.search.mapper.pojo.scope.spi.PojoScopeSessionContext sessionContext, org.hibernate.search.engine.backend.common.spi.DocumentReferenceConverter<EntityReference> documentReferenceConverter)