public interface QueryOptionsManager
A QueryOptionsManager support database operations on QueryOptionsHandle instances.
| Modifier and Type | Method and Description |
|---|---|
void |
deleteOptions(String name)
Remove a search configuration from the REST server.
|
<T extends QueryOptionsListReadHandle> |
optionsList(T listHandle)
Retrieves the list of available named query options in a JSON or XML representation provided as an object of an IO class.
|
<T> T |
optionsListAs(Format format,
Class<T> as)
Retrieves the list of available named query options in a JSON or XML representation provided as an object of an IO class.
|
<T extends QueryOptionsReadHandle> |
readOptions(String name,
T queryOptionsHandle)
Fetch a query options configuration from the REST Server by name.
|
<T> T |
readOptionsAs(String name,
Format format,
Class<T> as)
Fetch a query options configuration from the REST Server by name.
|
void |
writeOptions(String name,
QueryOptionsWriteHandle queryOptionsHandle)
Write a named QueryOptions configuration to the REST server.
|
void |
writeOptionsAs(String name,
Format format,
Object queryOptions)
Write a named QueryOptions configuration to the REST server in a JSON or XML representation provided as an object of an IO class.
|
<T> T optionsListAs(Format format, Class<T> as) throws ForbiddenUserException, FailedRequestException
Retrieves the list of available named query options in a JSON or XML representation provided as an object of an IO class.
The IO class must have been registered before creating the database client. By default, the provided handles that implement ContentHandle are registered.
T - the type of object that will be returned by the handle registered for itformat - whether to provide the list in a JSON or XML representationas - the IO class for reading the list of optionsForbiddenUserExceptionFailedRequestException<T extends QueryOptionsListReadHandle> T optionsList(T listHandle) throws ForbiddenUserException, FailedRequestException
Retrieves the list of available named query options in a JSON or XML representation provided as an object of an IO class.
The IO class must have been registered before creating the database client. By default, standard Java IO classes for document content are registered.
T - the type of QueryOptionsListReadHandle to returnlistHandle - a handle for reading the list of name optionsForbiddenUserExceptionFailedRequestException<T> T readOptionsAs(String name, Format format, Class<T> as) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
Fetch a query options configuration from the REST Server by name.
The IO class must have been registered before creating the database client. By default, the provided handles that implement ContentHandle are registered.
T - the type of object that will be returned by the handle registered for itname - the name of options configuration stored on MarkLogic REST instance.format - whether to provide the options in a JSON or XML representationas - the IO class for reading the query optionsResourceNotFoundExceptionForbiddenUserExceptionFailedRequestException<T extends QueryOptionsReadHandle> T readOptions(String name, T queryOptionsHandle) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
Fetch a query options configuration from the REST Server by name.
Use a QueryOptionsHandle object for access to the configuration with Java.
T - the type of QueryOptionsListReadHandle to returnname - the name of options configuration stored on MarkLogic REST instance.queryOptionsHandle - an object into which to fetch the query options.ResourceNotFoundExceptionForbiddenUserExceptionFailedRequestExceptionvoid writeOptionsAs(String name, Format format, Object queryOptions) throws ResourceNotFoundException, ResourceNotResendableException, ForbiddenUserException, FailedRequestException
Write a named QueryOptions configuration to the REST server in a JSON or XML representation provided as an object of an IO class.
The IO class must have been registered before creating the database client. By default, the provided handles that implement ContentHandle are registered.
name - name given to the QueryOptions for use in runtime queriesformat - whether the options are provided in a JSON or XML representationqueryOptions - an IO representation of the JSON or XML query optionsResourceNotFoundExceptionResourceNotResendableExceptionForbiddenUserExceptionFailedRequestExceptionvoid writeOptions(String name, QueryOptionsWriteHandle queryOptionsHandle) throws FailedRequestException, ForbiddenUserException, ResourceNotFoundException, ResourceNotResendableException
Write a named QueryOptions configuration to the REST server.
name - name given to the QueryOptions for use in runtime queriesqueryOptionsHandle - an object able to serialize a QueryOptions configurationFailedRequestExceptionForbiddenUserExceptionResourceNotFoundExceptionResourceNotResendableExceptionvoid deleteOptions(String name) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
Remove a search configuration from the REST server.
name - name of query options to remove from the REST server.ResourceNotFoundExceptionForbiddenUserExceptionFailedRequestExceptionCopyright © 2013-2017 MarkLogic Corporation.