public class MutationState extends Object implements Iterable<MutationToken>
Aggregation of one or more MutationToken
into one MutationState
.
Modifier and Type | Method and Description |
---|---|
MutationState |
add(Document... documents)
Add one or more
Documents to this MutationState . |
MutationState |
add(DocumentFragment... documentFragments)
Add one or more
DocumentFragments to this MutationState . |
MutationState |
add(MutationState mutationState)
Adds all the internal state from the given
MutationState onto the called one. |
boolean |
equals(Object o) |
JsonObject |
export()
Exports the
MutationState into a universal format, which can be used either to serialize it into a N1QL query or to send it over the network to a different application/SDK. |
JsonObject |
exportForFts()
Exports the
MutationState into a format recognized by the FTS search engine. |
static MutationState |
from(Document... documents)
Create a
MutationState from one or more Documents . |
static MutationState |
from(DocumentFragment... documentFragments)
Create a
MutationState from one or more DocumentFragments . |
static MutationState |
from(JsonObject source)
Create a
MutationState from the serialized state. |
static MutationState |
from(String source)
Create a
MutationState from the serialized state. |
int |
hashCode() |
Iterator<MutationToken> |
iterator() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static MutationState from(Document... documents)
Create a MutationState
from one or more Documents
.
documents
- the documents where the tokens are extracted from.MutationState
.public static MutationState from(DocumentFragment... documentFragments)
Create a MutationState
from one or more DocumentFragments
.
documentFragments
- the document fragments where the tokens are extracted from.MutationState
.public MutationState add(Document... documents)
Add one or more Documents
to this MutationState
.
documents
- the documents where the tokens are extracted from.MutationState
.public MutationState add(DocumentFragment... documentFragments)
Add one or more DocumentFragments
to this MutationState
.
documentFragments
- the fragments where the tokens are extracted from.MutationState
.public MutationState add(MutationState mutationState)
Adds all the internal state from the given MutationState
onto the called one.
mutationState
- the state from which the tokens are applied from.MutationState
.public Iterator<MutationToken> iterator()
iterator
in interface Iterable<MutationToken>
public JsonObject export()
Exports the MutationState
into a universal format, which can be used either to serialize it into a N1QL query or to send it over the network to a different application/SDK.
JsonObject
.public JsonObject exportForFts()
Exports the MutationState
into a format recognized by the FTS search engine.
JsonObject
for one FTS index.public static MutationState from(String source)
Create a MutationState
from the serialized state.
source
- the source state, serialized.MutationState
.public static MutationState from(JsonObject source)
Create a MutationState
from the serialized state.
source
- the source state, serialized.MutationState
.Copyright © 2015 Couchbase, Inc.