Class SubdocHelper

java.lang.Object
com.couchbase.client.java.subdoc.SubdocHelper

@Uncommitted
@Private
public class SubdocHelper
extends Object
Helper class to the subdocument API.
Since:
2.2
Author:
Simon Baslé
  • Method Details

    • commonSubdocErrors

      public static CouchbaseException commonSubdocErrors​(ResponseStatus status, String id, String path)
      Convert status that can happen in a subdocument context to corresponding exceptions. Other status just become a CouchbaseException.
    • isSubdocLevelError

      public static boolean isSubdocLevelError​(ResponseStatus responseStatus)
      Check whether a ResponseStatus is subdocument-level or not. That is to say an error code which, if received in the context of a multi-operation, would not prevent the successful execution of other operations in that packet. For instance, ResponseStatus.SUBDOC_PATH_NOT_FOUND is a subdoc error code that would not prevent the execution of other operations whereas ResponseStatus.NOT_EXISTS is a document access error code and would inherently invalidate any other operation within the theoretical packet.
      Parameters:
      responseStatus - the status code to check.
      Returns:
      true if the status code denotes a subdocument-level error, false otherwise.