Skip to content

Commit d6fc6c3

Browse files
committed
fix #176 - deprecate QueryOptionsHandle since it depends on QueryOptions which is already deprecated
(cherry picked from commit 338f4e3)
1 parent dfa2701 commit d6fc6c3

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

src/main/java/com/marklogic/client/io/QueryOptionsHandle.java

+17-20
Original file line numberDiff line numberDiff line change
@@ -80,27 +80,24 @@
8080
import com.marklogic.client.io.marker.QueryOptionsWriteHandle;
8181

8282
/**
83-
* A QueryOptionsHandle is used to configure query configurations.
84-
*
85-
* <p>Use a QueryOptionsHandle if you want to use Java to configure and manage
86-
* MarkLogic query configurations, for search, value lookups, and facets.</p>
87-
*
88-
* <p>Read an options node from MarkLogic with</p>
89-
*
90-
* <pre>QueryOptionsHandle handle = QueryOptionsManager.readOptions(name, new QueryOptionsHandle());</pre>
91-
*
92-
* <p>or construct a fresh empty one (which is not a valid configuration without further building)</p>
93-
*
94-
* <pre>QueryOptionsHandle handle = new QueryOptionsHandle();</pre>
95-
*
96-
* <p>Build up options to a handle using fluent setter methods</p>
97-
*
98-
* <pre>handle.withConstraints(...).withTerm(...).withOperators(...)</pre>
99-
*
100-
* <p>and constructed items from {@link com.marklogic.client.admin.config.QueryOptionsBuilder}.</p>
101-
*
83+
* @deprecated Use a JSON or XML
84+
* {@link com.marklogic.client.io.marker.StructureWriteHandle write handle} or
85+
* {@link com.marklogic.client.io.marker.StructureReadHandle read handle}
86+
* implementation instead of this class to write or read
87+
* query options. For instance:
88+
* <pre>{@code
89+
* String opts = new StringBuilder()
90+
* .append("<options xmlns=\"http://marklogic.com/appservices/search\">")
91+
* .append( "<debug>true</debug>")
92+
* .append("</options>")
93+
* .toString();
94+
* optsMgr.writeOptions("debug", new StringHandle(opts)); }</pre>
95+
* or
96+
* <pre>{@code
97+
* String opts = "{\"options\":{\"debug\":true}}";
98+
* optsMgr.writeOptions("debug", new StringHandle(opts).withFormat(Format.JSON)); }</pre>
10299
*/
103-
@SuppressWarnings("deprecation")
100+
@Deprecated
104101
public final class QueryOptionsHandle
105102
extends BaseHandle<InputStream, OutputStreamSender>
106103
implements OutputStreamSender, BufferableHandle,

0 commit comments

Comments
 (0)