Skip to main content

What's New in MarkLogic 11

Java Client API: Removal of Deprecated Interfaces

Most of the previously deprecated packages, interfaces, classes, and methods of the Java Client API have been removed. The following table lists what has been removed and provides guidance for modifying your code.

Note

In the following table, “c.m.c.” is an abbreviation for “com.marklogic.client.”.

Removed Package, Class, or Method

Alternative

c.m.c.admin.ServerConfigurationManager:

  • getContentVersionRequestsset

  • ContentVersionRequests

Use the following equivalent methods instead.

  • getUpdatePolicy

  • setUpdatePolicy

c.m.c.admin.TransformExtensionsManager:

  • writeXqueryTransform

  • writeXSLTransform

Overloads of the listed methods that accept a paramTypes map have been removed. Use one of the overloads that does not accept parameter metadata. This metadata is not required to install or use a transform.

c.m.c.admin.config

This package, its sub-packages, and all contained classes, interfaces, and types have been removed. This includes the QueryOptions and QueryOptionsBuilder classes. Create query options using your preferred JSON or XML libraries, read options from a file, or build options as a string. Read and write options using appropriate handles, such as DOMHandle, JacksonHandle, FileHandle, or StringHandle.

c.m.c.document.JSONDocumentManager:

  • getLanguage

  • setLanguage

Remove your usage. Language specifications are not supported for JSON. Calls to these methods were ignored in MarkLogic 8.

c.m.c.io.QueryOptionsHandle

Create query options using your preferred JSON or XML libraries, read options from a file, or build options as a string. Read and write options using appropriate handles, such as DOMHandle, JacksonHandle, FileHandle, or StringHandle. This class is no longer needed with the removal of QueryOptions and QueryOptionsBuilder.

c.m.c.query:

  • KeyValueDefinition

  • KeyLocator

  • ElementLocator

The key-value search capability has been removed. Build equivalent queries using a StructuredQueryDefinition (JSON property query or element query) or QBE.

c.m.c.query.QueryManager:

  • newKeyValueDefinition

  • newKeyValueDefinition

  • newKeyLocator

The key-value search capability has been removed. Build equivalent queries using a StructuredQueryDefinition (JSON property query or element query) or QBE. c.

c.m.c.io.SearchHandle.forceDOM

Remove your usage. This setting was ignored in MarkLogic 8.

c.m.c.query.StructuredQueryBuilder:

FragmentScope.DOCUMENT

Use FragmentScope.DOCUMENTS.

StructuredQueryBuilder (nested classes):

  • AndNotQuery

  • AndQuery

  • BoostQuery

  • CollectionConstraintQuery

  • CollectionQuery

  • CustomConstraintQuery

  • DirectoryQuery

  • DocumentFragmentQuery

  • DocumentQuery

  • ElementConstraintQuery

  • GeospatialConstraintQuery

  • LocksQuery

  • NearQuery

  • NotQuery

  • OrQuery

  • OrQuery

  • PropertiesConstraintQuery

  • PropertiesQuery

  • RangeConstraintQuery

  • TermQuery

  • ValueConstraintQuery

  • WordConstraintQuery

Continue to construct structured queries using StructuredQueryDefinition methods, as before. The return type from the query builder methods is always StructuredQueryDefinition now. For example, StructuredQueryDefinition.and() used to return an AndQuery, but now returns a StructuredQueryDefinition.

StructuredQueryBuilde.elementConstraint

StructuredQueryBuilder.containerConstraint