Class SearchScope

java.lang.Object
com.unboundid.ldap.sdk.SearchScope
All Implemented Interfaces:
Serializable

This class defines a data type for search scope values. Clients should generally use one of the BASE, ONE, SUB, or SUBORDINATE_SUBTREE values, although it is possible to create a new scope with a specified integer value if necessary using the valueOf(int) method. The following search scope values are defined:
  • BASE -- Indicates that only the entry specified by the base DN should be considered.
  • ONE -- Indicates that only entries that are immediate subordinates of the entry specified by the base DN (but not the base entry itself) should be considered.
  • SUB -- Indicates that the base entry itself and any subordinate entries (to any depth) should be considered.
  • SUBORDINATE_SUBTREE -- Indicates that any subordinate entries (to any depth) below the entry specified by the base DN should be considered, but the base entry itself should not be considered, as described in draft-sermersheim-ldap-subordinate-scope.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final SearchScope
    A predefined baseObject scope value, which indicates that only the entry specified by the base DN should be considered.
    static final int
    The integer value for the "base" search scope.
    static final SearchScope
    A predefined singleLevel scope value, which indicates that only entries that are immediate subordinates of the entry specified by the base DN (but not the base entry itself) should be considered.
    static final int
    The integer value for the "one" search scope.
    static final SearchScope
    A predefined wholeSubtree scope value, which indicates that the base entry itself and any subordinate entries (to any depth) should be considered.
    static final int
    The integer value for the "sub" search scope.
    static final SearchScope
    A predefined subordinateSubtree scope value, which indicates that any subordinate entries (to any depth) below the entry specified by the base DN should be considered, but the base entry itself should not be considered.
    static final int
    The integer value for the "subordinate subtree" search scope.
  • Method Summary

    Modifier and Type
    Method
    Description
    definedValueOf(int intValue)
    Retrieves the predefined search scope with the specified integer value.
    boolean
    Indicates whether the provided object is equal to this search scope.
    Retrieves the name for this search scope.
    int
    The hash code for this search scope.
    int
    Retrieves the integer value for this search scope.
    Retrieves a string representation of this search scope.
    valueOf(int intValue)
    Retrieves the search scope with the specified integer value.
    static SearchScope[]
    Retrieves an array of all search scopes defined in the LDAP SDK.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • BASE_INT_VALUE

      public static final int BASE_INT_VALUE
      The integer value for the "base" search scope.
      See Also:
    • BASE

      @NotNull public static final SearchScope BASE
      A predefined baseObject scope value, which indicates that only the entry specified by the base DN should be considered.
    • ONE_INT_VALUE

      public static final int ONE_INT_VALUE
      The integer value for the "one" search scope.
      See Also:
    • ONE

      @NotNull public static final SearchScope ONE
      A predefined singleLevel scope value, which indicates that only entries that are immediate subordinates of the entry specified by the base DN (but not the base entry itself) should be considered.
    • SUB_INT_VALUE

      public static final int SUB_INT_VALUE
      The integer value for the "sub" search scope.
      See Also:
    • SUB

      @NotNull public static final SearchScope SUB
      A predefined wholeSubtree scope value, which indicates that the base entry itself and any subordinate entries (to any depth) should be considered.
    • SUBORDINATE_SUBTREE_INT_VALUE

      public static final int SUBORDINATE_SUBTREE_INT_VALUE
      The integer value for the "subordinate subtree" search scope.
      See Also:
    • SUBORDINATE_SUBTREE

      A predefined subordinateSubtree scope value, which indicates that any subordinate entries (to any depth) below the entry specified by the base DN should be considered, but the base entry itself should not be considered.
  • Method Details

    • getName

      Retrieves the name for this search scope.
      Returns:
      The name for this search scope.
    • intValue

      public int intValue()
      Retrieves the integer value for this search scope.
      Returns:
      The integer value for this search scope.
    • valueOf

      @NotNull public static SearchScope valueOf(int intValue)
      Retrieves the search scope with the specified integer value.
      Parameters:
      intValue - The integer value for which to retrieve the corresponding search scope.
      Returns:
      The search scope with the specified integer value, or a new search scope if the provided value does not match any of the predefined scopes.
    • definedValueOf

      @Nullable public static SearchScope definedValueOf(int intValue)
      Retrieves the predefined search scope with the specified integer value.
      Parameters:
      intValue - The integer value for which to retrieve the corresponding search scope.
      Returns:
      The search scope with the specified integer value, or null if the provided integer value does not represent a defined scope.
    • values

      @NotNull public static SearchScope[] values()
      Retrieves an array of all search scopes defined in the LDAP SDK.
      Returns:
      An array of all search scopes defined in the LDAP SDK.
    • hashCode

      public int hashCode()
      The hash code for this search scope.
      Overrides:
      hashCode in class Object
      Returns:
      The hash code for this search scope.
    • equals

      public boolean equals(@Nullable Object o)
      Indicates whether the provided object is equal to this search scope.
      Overrides:
      equals in class Object
      Parameters:
      o - The object for which to make the determination.
      Returns:
      true if the provided object is a search scope that is equal to this search scope, or false if not.
    • toString

      Retrieves a string representation of this search scope.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this search scope.