Package com.couchbase.client.java.subdoc
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 Summary
Modifier and Type Method Description static CouchbaseException
commonSubdocErrors(ResponseStatus status, String id, String path)
Convert status that can happen in a subdocument context to corresponding exceptions.static boolean
isSubdocLevelError(ResponseStatus responseStatus)
Check whether aResponseStatus
is subdocument-level or not.
-
Method Details
-
commonSubdocErrors
Convert status that can happen in a subdocument context to corresponding exceptions. Other status just become aCouchbaseException
. -
isSubdocLevelError
Check whether aResponseStatus
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 whereasResponseStatus.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.
-