Class SearchScope

  • All Implemented Interfaces:
    java.io.Serializable

    @NotMutable
    @ThreadSafety(level=COMPLETELY_THREADSAFE)
    public final class SearchScope
    extends java.lang.Object
    implements java.io.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:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static SearchScope BASE
      A predefined baseObject scope value, which indicates that only the entry specified by the base DN should be considered.
      static int BASE_INT_VALUE
      The integer value for the "base" search scope.
      static 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.
      static int ONE_INT_VALUE
      The integer value for the "one" search scope.
      static SearchScope SUB
      A predefined wholeSubtree scope value, which indicates that the base entry itself and any subordinate entries (to any depth) should be considered.
      static int SUB_INT_VALUE
      The integer value for the "sub" search scope.
      static SearchScope 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.
      static int SUBORDINATE_SUBTREE_INT_VALUE
      The integer value for the "subordinate subtree" search scope.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static SearchScope definedValueOf​(int intValue)
      Retrieves the predefined search scope with the specified integer value.
      boolean equals​(java.lang.Object o)
      Indicates whether the provided object is equal to this search scope.
      java.lang.String getName()
      Retrieves the name for this search scope.
      int hashCode()
      The hash code for this search scope.
      int intValue()
      Retrieves the integer value for this search scope.
      java.lang.String toString()
      Retrieves a string representation of this search scope.
      static SearchScope valueOf​(int intValue)
      Retrieves the search scope with the specified integer value.
      static SearchScope[] values()
      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 Detail

      • BASE

        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

        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

        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

        public static final SearchScope 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 Detail

      • getName

        public java.lang.String 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

        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

        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

        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 java.lang.Object
        Returns:
        The hash code for this search scope.
      • equals

        public boolean equals​(java.lang.Object o)
        Indicates whether the provided object is equal to this search scope.
        Overrides:
        equals in class java.lang.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

        public java.lang.String toString()
        Retrieves a string representation of this search scope.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of this search scope.