Package com.unboundid.ldap.sdk
Class CompareResult
- java.lang.Object
-
- com.unboundid.ldap.sdk.LDAPResult
-
- com.unboundid.ldap.sdk.CompareResult
-
- All Implemented Interfaces:
LDAPResponse,java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class CompareResult extends LDAPResult
This class provides a data structure for holding information about the result of processing a compare operation. It provides generic response elements as described in theLDAPResultclass, and also includes acompareMatched()method for determining whether the compare operation matched the target entry.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.unboundid.ldap.protocol.LDAPResponse
NO_CONTROLS
-
-
Constructor Summary
Constructors Constructor Description CompareResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.lang.String[] referralURLs, Control[] responseControls)Creates a new compare result with the provided information.CompareResult(LDAPException exception)Creates a new compare result from the providedLDAPException.CompareResult(LDAPResult ldapResult)Creates a new compare result based on the provided LDAP result.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompareMatched()Indicates whether the compare operation matched the target entry.-
Methods inherited from class com.unboundid.ldap.sdk.LDAPResult
getDiagnosticMessage, getMatchedDN, getMessageID, getReferralURLs, getResponseControl, getResponseControls, getResultCode, getResultString, hasResponseControl, hasResponseControl, toString, toString
-
-
-
-
Constructor Detail
-
CompareResult
public CompareResult(LDAPResult ldapResult)
Creates a new compare result based on the provided LDAP result.- Parameters:
ldapResult- The LDAP result object to use to create this compare response.
-
CompareResult
public CompareResult(LDAPException exception)
Creates a new compare result from the providedLDAPException.- Parameters:
exception- TheLDAPExceptionto use to create this compare result.
-
CompareResult
public CompareResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.lang.String[] referralURLs, Control[] responseControls)
Creates a new compare result with the provided information.- Parameters:
messageID- The message ID for the LDAP message that is associated with this LDAP result.resultCode- The result code from the response.diagnosticMessage- The diagnostic message from the response, if available.matchedDN- The matched DN from the response, if available.referralURLs- The set of referral URLs from the response, if available.responseControls- The set of controls from the response, if available.
-
-
Method Detail
-
compareMatched
public boolean compareMatched()
Indicates whether the compare operation matched the target entry.- Returns:
trueif the compare operation matched the target entry, orfalseif not.
-
-