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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CouchbaseExceptioncommonSubdocErrors(ResponseStatus status, String id, String path)Convert status that can happen in a subdocument context to corresponding exceptions.static booleanisSubdocLevelError(ResponseStatus responseStatus)Check whether aResponseStatusis subdocument-level or not.
-
-
-
Method Detail
-
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 aCouchbaseException.
-
isSubdocLevelError
public static boolean isSubdocLevelError(ResponseStatus responseStatus)
Check whether aResponseStatusis 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_FOUNDis a subdoc error code that would not prevent the execution of other operations whereasResponseStatus.NOT_EXISTSis 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.
-
-