public class JsonDoubleDocument extends AbstractDocument<java.lang.Double>
Stores a properly encoded JSON scalar double or float as the toplevel type.
This document works exactly like JsonDocument
, but it accepts a different toplevel type. This document is interoperable with other SDKs.
Modifier and Type | Method and Description |
---|---|
static JsonDoubleDocument |
create(java.lang.String id)
Creates a
JsonDoubleDocument which the document id. |
static JsonDoubleDocument |
create(java.lang.String id,
java.lang.Double content)
Creates a
JsonDoubleDocument which the document id and content. |
static JsonDoubleDocument |
create(java.lang.String id,
java.lang.Double content,
long cas)
Creates a
JsonDoubleDocument which the document id, content and the CAS value. |
static JsonDoubleDocument |
create(java.lang.String id,
int expiry,
java.lang.Double content)
Creates a
JsonDoubleDocument which the document id, content and the expiration time. |
static JsonDoubleDocument |
create(java.lang.String id,
int expiry,
java.lang.Double content,
long cas)
Creates a
JsonDoubleDocument which the document id, content, CAS value, expiration time and status code. |
static JsonDoubleDocument |
empty()
Creates a empty
JsonDoubleDocument . |
static JsonDoubleDocument |
from(JsonDoubleDocument doc,
java.lang.Double content)
Creates a copy from a different
JsonDoubleDocument , but changes the content. |
static JsonDoubleDocument |
from(JsonDoubleDocument doc,
long cas)
Creates a copy from a different
JsonDoubleDocument , but changes the CAS value. |
static JsonDoubleDocument |
from(JsonDoubleDocument doc,
java.lang.String id)
Creates a copy from a different
JsonDoubleDocument , but changes the document ID. |
static JsonDoubleDocument |
from(JsonDoubleDocument doc,
java.lang.String id,
java.lang.Double content)
Creates a copy from a different
JsonDoubleDocument , but changes the document ID and content. |
public static JsonDoubleDocument empty()
Creates a empty JsonDoubleDocument
.
JsonDoubleDocument
.public static JsonDoubleDocument create(java.lang.String id)
Creates a JsonDoubleDocument
which the document id.
id
- the per-bucket unique document id.JsonDoubleDocument
.public static JsonDoubleDocument create(java.lang.String id, java.lang.Double content)
Creates a JsonDoubleDocument
which the document id and content.
id
- the per-bucket unique document id.content
- the content of the document.JsonDoubleDocument
.public static JsonDoubleDocument create(java.lang.String id, java.lang.Double content, long cas)
Creates a JsonDoubleDocument
which the document id, content and the CAS value.
id
- the per-bucket unique document id.content
- the content of the document.cas
- the CAS (compare and swap) value for optimistic concurrency.JsonDoubleDocument
.public static JsonDoubleDocument create(java.lang.String id, int expiry, java.lang.Double content)
Creates a JsonDoubleDocument
which the document id, content and the expiration time.
id
- the per-bucket unique document id.content
- the content of the document.expiry
- the expiration time of the document.JsonDoubleDocument
.public static JsonDoubleDocument create(java.lang.String id, int expiry, java.lang.Double content, long cas)
Creates a JsonDoubleDocument
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.
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.JsonDoubleDocument
.public static JsonDoubleDocument from(JsonDoubleDocument doc, java.lang.String id)
Creates a copy from a different JsonDoubleDocument
, but changes the document ID.
doc
- the original JsonDoubleDocument
to copy.id
- the per-bucket unique document id.JsonDoubleDocument
with the changed properties.public static JsonDoubleDocument from(JsonDoubleDocument doc, java.lang.Double content)
Creates a copy from a different JsonDoubleDocument
, but changes the content.
doc
- the original JsonDoubleDocument
to copy.content
- the content of the document.JsonDoubleDocument
with the changed properties.public static JsonDoubleDocument from(JsonDoubleDocument doc, java.lang.String id, java.lang.Double content)
Creates a copy from a different JsonDoubleDocument
, but changes the document ID and content.
doc
- the original JsonDoubleDocument
to copy.id
- the per-bucket unique document id.content
- the content of the document.JsonDoubleDocument
with the changed properties.public static JsonDoubleDocument from(JsonDoubleDocument doc, long cas)
Creates a copy from a different JsonDoubleDocument
, but changes the CAS value.
doc
- the original JsonDoubleDocument
to copy.cas
- the CAS (compare and swap) value for optimistic concurrency.JsonDoubleDocument
with the changed properties.