From 1e74b0f8f046cc9e69ba9eddbc180bf10ab83e06 Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Thu, 20 Sep 2012 16:58:20 +0000
Subject: [PATCH] CR-701 Fix for OPENDJ-596: Include more examples in LDAP SDK Javadoc
---
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/responses/CompareResult.java | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/responses/CompareResult.java b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/responses/CompareResult.java
index e29932a..c3503c9 100644
--- a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/responses/CompareResult.java
+++ b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/responses/CompareResult.java
@@ -41,6 +41,22 @@
* the attribute or sub-type according to the attribute's equality matching rule
* then the result code is set to {@link ResultCode#COMPARE_TRUE} and can be
* determined by invoking the {@link #matched} method.
+ * <p>
+ * The following excerpt shows how to use the Compare operation to check whether
+ * a member belongs to a (possibly large) static group.
+ *
+ * <pre>
+ * Connection connection = ...;
+ * String groupDN = ...;
+ * String memberDN = ...;
+ *
+ * CompareRequest request =
+ * Requests.newCompareRequest(groupDN, "member", memberDN);
+ * CompareResult result = connection.compare(request);
+ * if (result.matched()) {
+ * // The member belongs to the group.
+ * }
+ * </pre>
*/
public interface CompareResult extends Result {
/**
--
Gitblit v1.10.0