Interface SearchScopeProvider

All Known Subinterfaces:
SearchMapping, SearchSession

public interface SearchScopeProvider
A provider of SearchScope instances.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> SearchScope<T>
    scope(Class<T> clazz)
    Creates a SearchScope limited to indexed entity types among the given class and its subtypes.
    default <T> SearchScope<T>
    scope(Class<T> expectedSuperType, String entityName)
    Creates a SearchScope limited to indexed entity types among the entity with the given name and its subtypes.
    <T> SearchScope<T>
    scope(Class<T> expectedSuperType, Collection<String> entityNames)
    Creates a SearchScope limited to indexed entity types among the entities with the given names and their subtypes.
    <T> SearchScope<T>
    scope(Collection<? extends Class<? extends T>> classes)
    Creates a SearchScope limited to indexed entity types among the given classes and their subtypes.
  • Method Details

    • scope

      default <T> SearchScope<T> scope(Class<T> clazz)
      Creates a SearchScope limited to indexed entity types among the given class and its subtypes.
      Type Parameters:
      T - A supertype of all indexed entity types to include in the scope.
      Parameters:
      clazz - A class that must be an indexed entity type or a supertype of such type.
      Returns:
      The created scope.
      See Also:
    • scope

      <T> SearchScope<T> scope(Collection<? extends Class<? extends T>> classes)
      Creates a SearchScope limited to indexed entity types among the given classes and their subtypes.
      Type Parameters:
      T - A supertype of all indexed entity types to include in the scope.
      Parameters:
      classes - A collection of classes. Each must be an indexed entity type or a supertype of such type.
      Returns:
      The created scope.
      See Also:
    • scope

      default <T> SearchScope<T> scope(Class<T> expectedSuperType, String entityName)
      Creates a SearchScope limited to indexed entity types among the entity with the given name and its subtypes.
      Type Parameters:
      T - A supertype of all indexed entity types to include in the scope.
      Parameters:
      expectedSuperType - A supertype of all entity types to include in the scope.
      entityName - An entity name. See Entity.name(). The referenced entity type must be an indexed entity type or a supertype of such type.
      Returns:
      The created scope.
      See Also:
    • scope

      <T> SearchScope<T> scope(Class<T> expectedSuperType, Collection<String> entityNames)
      Creates a SearchScope limited to indexed entity types among the entities with the given names and their subtypes.
      Type Parameters:
      T - A supertype of all indexed entity types to include in the scope.
      Parameters:
      expectedSuperType - A supertype of all indexed entity types to include in the scope.
      entityNames - A collection of entity names. See Entity.name(). Each entity type referenced in the collection must be an indexed entity type or a supertype of such type.
      Returns:
      The created scope.
      See Also: