com.unboundid.ldap.sdk
Class DereferencePolicy

java.lang.Object
  extended by com.unboundid.ldap.sdk.DereferencePolicy
All Implemented Interfaces:
java.io.Serializable

@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class DereferencePolicy
extends java.lang.Object
implements java.io.Serializable

This class defines a data type for dereference policy values. Clients should generally use one of the NEVER, SEARCHING, FINDING, or ALWAYS values, although it is possible to create a new dereference policy with a specified integer value if necessary using the valueOf(int) method. The following dereference policy values are defined:

See Also:
Serialized Form

Field Summary
static DereferencePolicy ALWAYS
          A predefined dereference policy value which indicates that the server should dereference the base entry if it happens to be an alias entry, and should also dereference any entries that may be encountered while examining candidates.
static DereferencePolicy FINDING
          A predefined dereference policy value which indicates that the server should dereference the base entry if it happens to be an alias entry, but it should not dereference any alias entries that may be encountered while examining candidate entries.
static DereferencePolicy NEVER
          A predefined dereference policy value which indicates that the server should not dereference any aliases that it encounters.
static DereferencePolicy SEARCHING
          A predefined dereference policy value which indicates that the server should dereference any aliases that it may encounter while examining candidate entries, but it should not dereference the base entry if it happens to be an alias entry.
 
Method Summary
static DereferencePolicy definedValueOf(int intValue)
          Retrieves the predefined dereference policy with the specified integer value.
 boolean equals(java.lang.Object o)
          Indicates whether the provided object is equal to this dereference policy.
 java.lang.String getName()
          Retrieves the name for this dereference policy.
 int hashCode()
          The hash code for this dereference policy.
 int intValue()
          Retrieves the integer value for this dereference policy.
 java.lang.String toString()
          Retrieves a string representation of this dereference policy.
static DereferencePolicy valueOf(int intValue)
          Retrieves the dereference policy with the specified integer value.
static DereferencePolicy[] values()
          Retrieves an array of all dereference policies defined in the LDAP SDK.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NEVER

public static final DereferencePolicy NEVER
A predefined dereference policy value which indicates that the server should not dereference any aliases that it encounters.


SEARCHING

public static final DereferencePolicy SEARCHING
A predefined dereference policy value which indicates that the server should dereference any aliases that it may encounter while examining candidate entries, but it should not dereference the base entry if it happens to be an alias entry.


FINDING

public static final DereferencePolicy FINDING
A predefined dereference policy value which indicates that the server should dereference the base entry if it happens to be an alias entry, but it should not dereference any alias entries that may be encountered while examining candidate entries.


ALWAYS

public static final DereferencePolicy ALWAYS
A predefined dereference policy value which indicates that the server should dereference the base entry if it happens to be an alias entry, and should also dereference any entries that may be encountered while examining candidates.

Method Detail

getName

public java.lang.String getName()
Retrieves the name for this dereference policy.

Returns:
The name for this dereference policy.

intValue

public int intValue()
Retrieves the integer value for this dereference policy.

Returns:
The integer value for this dereference policy.

valueOf

public static DereferencePolicy valueOf(int intValue)
Retrieves the dereference policy with the specified integer value.

Parameters:
intValue - The integer value for which to retrieve the corresponding dereference policy.
Returns:
The dereference policy with the specified integer value, or a new dereference policy if the provided value does not match any of the predefined policies.

definedValueOf

public static DereferencePolicy definedValueOf(int intValue)
Retrieves the predefined dereference policy with the specified integer value.

Parameters:
intValue - The integer value for which to retrieve the corresponding dereference policy.
Returns:
The dereference policy with the specified integer value, or null if the provided value does not match any of the predefined policies.

values

public static DereferencePolicy[] values()
Retrieves an array of all dereference policies defined in the LDAP SDK.

Returns:
An array of all dereference policies defined in the LDAP SDK.

hashCode

public int hashCode()
The hash code for this dereference policy.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code for this dereference policy.

equals

public boolean equals(java.lang.Object o)
Indicates whether the provided object is equal to this dereference policy.

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 dereference policy that is equal to this dereference policy, or false if not.

toString

public java.lang.String toString()
Retrieves a string representation of this dereference policy.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this dereference policy.