From a229c2ad7d088b3e7d87259521d967f861b1d056 Mon Sep 17 00:00:00 2001
From: AdhavanM <47322316+AdhavanM@users.noreply.github.com>
Date: Tue, 05 Feb 2019 08:32:13 +0000
Subject: [PATCH] Adds a newSearchResultEntry that takes a SearchResultEntry
---
opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/Responses.java | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/Responses.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/Responses.java
index 9659828..3b42b68 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/Responses.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/Responses.java
@@ -309,6 +309,25 @@
return new SearchResultEntryImpl(entry);
}
+ /**
+ * Creates a new search result entry backed by the provided entry.
+ * Modifications made to {@code entry} will be reflected in the returned
+ * search result entry. The returned search result entry supports updates to
+ * its list of controls, as well as updates to the name and attributes if
+ * the underlying entry allows.
+ *
+ * @param entry
+ * The SearchResultEntry.
+ * @return The new search result entry.
+ * @throws NullPointerException
+ * If {@code entry} was {@code null} .
+ */
+ public static SearchResultEntry newSearchResultEntry(final SearchResultEntry entry) {
+ Reject.ifNull(entry);
+ return new SearchResultEntryImpl(entry);
+ }
+
+
/**
* Creates a new search result entry using the provided distinguished name
* decoded using the default schema.
--
Gitblit v1.10.0