Class JsonBooleanDocument
java.lang.Object
com.couchbase.client.java.document.AbstractDocument<Boolean>
com.couchbase.client.java.document.JsonBooleanDocument
- All Implemented Interfaces:
Document<Boolean>
,Serializable
public class JsonBooleanDocument extends AbstractDocument<Boolean> implements Serializable
- See Also:
- Serialized Form
-
Method Summary
Modifier and Type Method Description static JsonBooleanDocument
create(String id)
Creates aJsonBooleanDocument
which the document id.static JsonBooleanDocument
create(String id, int expiry, Boolean content)
Creates aJsonBooleanDocument
which the document id, content and the expiration time.static JsonBooleanDocument
create(String id, int expiry, Boolean content, long cas)
Creates aJsonBooleanDocument
which the document id, content, CAS value, expiration time and status code.static JsonBooleanDocument
create(String id, int expiry, Boolean content, long cas, MutationToken mutationToken)
Creates aJsonBooleanDocument
which the document id, content, CAS value, expiration time and status code.static JsonBooleanDocument
create(String id, Boolean content)
Creates aJsonBooleanDocument
which the document id and content.static JsonBooleanDocument
create(String id, Boolean content, long cas)
Creates aJsonBooleanDocument
which the document id, content and the CAS value.static JsonBooleanDocument
from(JsonBooleanDocument doc, long cas)
Creates a copy from a differentJsonBooleanDocument
, but changes the CAS value.static JsonBooleanDocument
from(JsonBooleanDocument doc, Boolean content)
Creates a copy from a differentJsonBooleanDocument
, but changes the content.static JsonBooleanDocument
from(JsonBooleanDocument doc, String id)
Creates a copy from a differentJsonBooleanDocument
, but changes the document ID.static JsonBooleanDocument
from(JsonBooleanDocument doc, String id, Boolean content)
Creates a copy from a differentJsonBooleanDocument
, but changes the document ID and content.Methods inherited from class com.couchbase.client.java.document.AbstractDocument
cas, content, equals, expiry, hashCode, id, mutationToken, readFromSerializedStream, toString, writeToSerializedStream
-
Method Details
-
create
Creates aJsonBooleanDocument
which the document id.- Parameters:
id
- the per-bucket unique document id.- Returns:
- a
JsonBooleanDocument
.
-
create
Creates aJsonBooleanDocument
which the document id and content.- Parameters:
id
- the per-bucket unique document id.content
- the content of the document.- Returns:
- a
JsonBooleanDocument
.
-
create
Creates aJsonBooleanDocument
which the document id, content and the CAS value.- Parameters:
id
- the per-bucket unique document id.content
- the content of the document.cas
- the CAS (compare and swap) value for optimistic concurrency.- Returns:
- a
JsonBooleanDocument
.
-
create
Creates aJsonBooleanDocument
which the document id, content and the expiration time.- Parameters:
id
- the per-bucket unique document id.content
- the content of the document.expiry
- the expiration time of the document.- Returns:
- a
JsonBooleanDocument
.
-
create
Creates aJsonBooleanDocument
which the document id, content, CAS value, expiration time and status code. This factory method is normally only called within the client library when a response is analyzed and a document is returned which is enriched with the status code. It does not make sense to pre populate the status field from the user level code.- Parameters:
id
- the per-bucket unique document id.content
- the content of the document.cas
- the CAS (compare and swap) value for optimistic concurrency.expiry
- the expiration time of the document.- Returns:
- a
JsonBooleanDocument
.
-
create
public static JsonBooleanDocument create(String id, int expiry, Boolean content, long cas, MutationToken mutationToken)Creates aJsonBooleanDocument
which the document id, content, CAS value, expiration time and status code. This factory method is normally only called within the client library when a response is analyzed and a document is returned which is enriched with the status code. It does not make sense to pre populate the status field from the user level code.- Parameters:
id
- the per-bucket unique document id.content
- the content of the document.cas
- the CAS (compare and swap) value for optimistic concurrency.expiry
- the expiration time of the document.- Returns:
- a
JsonBooleanDocument
.
-
from
Creates a copy from a differentJsonBooleanDocument
, but changes the document ID.- Parameters:
doc
- the originalJsonBooleanDocument
to copy.id
- the per-bucket unique document id.- Returns:
- a copied
JsonBooleanDocument
with the changed properties.
-
from
Creates a copy from a differentJsonBooleanDocument
, but changes the content.- Parameters:
doc
- the originalJsonBooleanDocument
to copy.content
- the content of the document.- Returns:
- a copied
JsonBooleanDocument
with the changed properties.
-
from
Creates a copy from a differentJsonBooleanDocument
, but changes the document ID and content.- Parameters:
doc
- the originalJsonBooleanDocument
to copy.id
- the per-bucket unique document id.content
- the content of the document.- Returns:
- a copied
JsonBooleanDocument
with the changed properties.
-
from
Creates a copy from a differentJsonBooleanDocument
, but changes the CAS value.- Parameters:
doc
- the originalJsonBooleanDocument
to copy.cas
- the CAS (compare and swap) value for optimistic concurrency.- Returns:
- a copied
JsonBooleanDocument
with the changed properties.
-