Class CompareResult

java.lang.Object
com.unboundid.ldap.sdk.LDAPResult
com.unboundid.ldap.sdk.CompareResult
All Implemented Interfaces:
LDAPResponse, Serializable

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 the LDAPResult class, and also includes a compareMatched() method for determining whether the compare operation matched the target entry.
See Also:
  • Constructor Details

    • CompareResult

      public CompareResult(@NotNull 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

      Creates a new compare result from the provided LDAPException.
      Parameters:
      exception - The LDAPException to use to create this compare result.
    • CompareResult

      public CompareResult(int messageID, @NotNull ResultCode resultCode, @Nullable String diagnosticMessage, @Nullable String matchedDN, @Nullable String[] referralURLs, @Nullable 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 Details

    • compareMatched

      public boolean compareMatched()
      Indicates whether the compare operation matched the target entry.
      Returns:
      true if the compare operation matched the target entry, or false if not.