@API.Public @API.NotThreadSafe public interface DocumentStore extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
beginTrackingWrites()
Begins tracking the write operations performed through this instance of
DocumentStore. |
void |
beginTrackingWrites(String previousWritesContext)
Begins tracking the write operations performed through this instance of
DocumentStore. |
boolean |
checkAndDelete(String _id,
QueryCondition condition)
Atomically evaluates the condition on given document and if the
condition holds true for the document then it is atomically deleted.
|
boolean |
checkAndDelete(Value _id,
QueryCondition condition) |
boolean |
checkAndMutate(String _id,
QueryCondition condition,
DocumentMutation mutation)
Deprecated.
|
boolean |
checkAndMutate(Value _id,
QueryCondition condition,
DocumentMutation mutation)
Deprecated.
|
boolean |
checkAndReplace(String _id,
QueryCondition condition,
Document doc)
Atomically evaluates the condition on the given document and if the
condition holds true for the document then it atomically replaces the document
with the given document.
|
boolean |
checkAndReplace(Value _id,
QueryCondition condition,
Document doc) |
default boolean |
checkAndUpdate(String _id,
QueryCondition condition,
DocumentMutation mutation)
Atomically evaluates the condition on a given document and if the
condition holds true for the document then a mutation is applied on the document.
|
default boolean |
checkAndUpdate(Value _id,
QueryCondition condition,
DocumentMutation mutation)
Atomically evaluates the condition on a given document and if the
condition holds true for the document then a mutation is applied on the document.
|
void |
clearTrackedWrites()
Stops the writes tracking and clears any state on this
DocumentStore instance. |
void |
close()
Override
AutoCloseable.close() to avoid declaring a checked exception. |
void |
delete(Document doc) |
void |
delete(Document doc,
FieldPath fieldAsKey) |
void |
delete(DocumentStream stream)
Deletes a set of documents from the DocumentStore represented by the DocumentStream.
|
void |
delete(DocumentStream stream,
FieldPath fieldAsKey) |
void |
delete(DocumentStream stream,
String fieldAsKey) |
void |
delete(Document doc,
String fieldAsKey) |
void |
delete(String _id)
Deletes a document with the given id.
|
void |
delete(Value _id) |
String |
endTrackingWrites()
Flushes any buffered writes operations for this
DocumentStore and returns a
writesContext which can be used to ensure that such writes are visible to ensuing queries. |
DocumentStream |
find()
Executes a query to return all Documents in the DocumentStore.
|
DocumentStream |
find(FieldPath... fieldPaths)
Deprecated.
use
find(Query) |
QueryResult |
find(Query query)
Executes the specified query on the DocumentStore and return a QueryResult.
|
DocumentStream |
find(QueryCondition condition)
Deprecated.
use
find(Query) |
DocumentStream |
find(QueryCondition condition,
FieldPath... fieldPaths)
Deprecated.
use
find(Query) |
DocumentStream |
find(QueryCondition condition,
String... fieldPaths)
Deprecated.
use
find(Query) |
DocumentStream |
find(String... fieldPaths)
Deprecated.
use
find(Query) |
Document |
findById(String _id)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
Document |
findById(String _id,
FieldPath... fieldPaths)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
Document |
findById(String _id,
QueryCondition condition)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(String _id,
QueryCondition condition,
FieldPath... fieldPaths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(String _id,
QueryCondition condition,
String... fieldPaths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(String _id,
String... fieldPaths)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
Document |
findById(Value _id)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
Document |
findById(Value _id,
FieldPath... fieldPaths)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
Document |
findById(Value _id,
QueryCondition condition)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(Value _id,
QueryCondition condition,
FieldPath... fieldPaths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(Value _id,
QueryCondition condition,
String... fieldPaths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(Value _id,
String... fieldPaths)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
DocumentStream |
findQuery(Query query)
Deprecated.
use
find(Query) |
DocumentStream |
findQuery(String queryJSON)
Deprecated.
use
find(Query) |
void |
flush()
Flushes any buffered writes operations for this DocumentStore.
|
void |
increment(String _id,
String field,
BigDecimal inc) |
void |
increment(String _id,
String field,
byte inc)
Atomically applies an increment to a given field (in dot separated notation)
of the given document id.
|
void |
increment(String _id,
String field,
double inc) |
void |
increment(String _id,
String field,
float inc) |
void |
increment(String _id,
String field,
int inc) |
void |
increment(String _id,
String field,
long inc) |
void |
increment(String _id,
String field,
short inc) |
void |
increment(Value _id,
String field,
BigDecimal inc) |
void |
increment(Value _id,
String field,
byte inc) |
void |
increment(Value _id,
String field,
double inc) |
void |
increment(Value _id,
String field,
float inc) |
void |
increment(Value _id,
String field,
int inc) |
void |
increment(Value _id,
String field,
long inc) |
void |
increment(Value _id,
String field,
short inc) |
void |
insert(Document doc) |
void |
insert(Document doc,
FieldPath fieldAsKey) |
void |
insert(DocumentStream stream)
Inserts a set of documents represented by the DocumentStream into the DocumentStore.
|
void |
insert(DocumentStream stream,
FieldPath fieldAsKey) |
void |
insert(DocumentStream stream,
String fieldAsKey) |
void |
insert(Document doc,
String fieldAsKey) |
void |
insert(String _id,
Document doc)
Inserts a document with the given id.
|
void |
insert(Value _id,
Document doc) |
void |
insertOrReplace(Document doc)
Inserts or replaces a new document in this DocumentStore.
|
void |
insertOrReplace(Document doc,
FieldPath fieldAsKey)
Inserts or replaces a new document in this DocumentStore with the value of
the specified Field as the
_id. |
void |
insertOrReplace(DocumentStream stream)
Inserts all documents from the specified DocumentStream into this DocumentStore.
|
void |
insertOrReplace(DocumentStream stream,
FieldPath fieldAsKey)
Inserts all documents from the specified DocumentStream into this DocumentStore
using the field specified by parameter
fieldAsKey as the "_id" field. |
void |
insertOrReplace(DocumentStream stream,
String fieldAsKey)
Inserts all documents from the specified DocumentStream into this DocumentStore
using the field specified by parameter
fieldAsKey as the "_id" field. |
void |
insertOrReplace(Document doc,
String fieldAsKey)
Inserts or replaces a new document in this DocumentStore with the value of
the specified Field as the
_id. |
void |
insertOrReplace(String _id,
Document r)
Inserts or replaces a new document in this DocumentStore with the given _id.
|
void |
insertOrReplace(Value _id,
Document doc)
Inserts or replaces a new document in this DocumentStore with the given _id.
|
boolean |
isReadOnly()
Returns
true if this Document store does not support any write
operations like insert/update/delete, etc. |
void |
replace(Document doc) |
void |
replace(Document doc,
FieldPath fieldAsKey) |
void |
replace(DocumentStream stream)
Replaces a set of documents represented by the DocumentStream into the DocumentStore.
|
void |
replace(DocumentStream stream,
FieldPath fieldAsKey) |
void |
replace(DocumentStream stream,
String fieldAsKey) |
void |
replace(Document doc,
String fieldAsKey) |
void |
replace(String _id,
Document doc)
Replaces a document in the DocumentStore.
|
void |
replace(Value _id,
Document doc) |
void |
update(String _id,
DocumentMutation mutation)
Applies a mutation on the document identified by the document id.
All updates specified by the mutation object should be applied atomically, and consistently meaning either all of the updates in mutation are applied or none of them is applied and a partial update should not be visible to an observer. |
void |
update(Value _id,
DocumentMutation mutation)
Applies a mutation on the document identified by the document id.
All updates specified by the mutation object should be applied atomically, and consistently meaning either all of the updates in mutation are applied or none of them is applied and a partial update should not be visible to an observer. |
boolean isReadOnly()
true if this Document store does not support any write
operations like insert/update/delete, etc.void flush()
throws StoreException
StoreException - if the flush failed or if the flush of any
buffered operation resulted in an errorvoid beginTrackingWrites()
throws StoreException
DocumentStore.IllegalStateException - if a beginTrackingWrites() was already called
and a corresponding endTrackingWrites()/clearTrackedWrites() wasn'tStoreExceptionendTrackingWrites(),
clearTrackedWrites(),
Query.waitForTrackedWrites(String)void beginTrackingWrites(@API.NonNullable String previousWritesContext) throws StoreException
DocumentStore.previousWritesContext - previously tracked writes that were retrieved from this
DocumentStore, or from other DocumentStore instances. The tracking
begins by using this context as the base stateNullPointerException - if previousWrites is nullIllegalStateException - if a beginTrackingWrites() was already called
and a corresponding endTrackingWrites()/clearTrackedWrites() wasn'tIllegalArgumentException - if the specified argument can not be parsedStoreExceptionendTrackingWrites(),
clearTrackedWrites(),
Query.waitForTrackedWrites(String)String endTrackingWrites() throws StoreException
DocumentStore and returns a
writesContext which can be used to ensure that such writes are visible to ensuing queries.
The write-context is cleared and tracking is stopped.
This call does not isolate the writes originating from this instance of DocumentStore
from other instances and as a side-effect other writes issued to the same document-store
through other DocumentStore instances could get flushed.beginTrackingWrites() until now, through this instance of
DocumentStoreStoreException - if the flush failed or if the flush of any
buffered operation resulted in an error.IllegalStateException - if a corresponding beginTrackingWrites() was not
called before calling this methodbeginTrackingWrites(),
clearTrackedWrites(),
Query.waitForTrackedWrites(String)void clearTrackedWrites()
throws StoreException
DocumentStore instance.
This API should be called to stop tracking the writes-context in case where
beginTrackingWrites() was previously called but a commit context is not needed
anymore, for example in case of an error in any of the mutation.IllegalStateException - if a corresponding beginTrackingWrites() was not
called before calling this methodStoreExceptionDocument findById(String _id) throws StoreException
null if the document with that `_id`
doesn't exist in this DocumentStore._id - document idnull if one does not exist in
this DocumentStoreStoreExceptionDocument findById(Value _id) throws StoreException
null if the document with that `_id`
doesn't exist in this DocumentStore._id - Document _idnull if one does not exist in
this DocumentStoreStoreExceptionDocument findById(String _id, String... fieldPaths) throws StoreException
null if the document with that `_id`
doesn't exist in this DocumentStore. The returned Document will include only the specified
fields._id - Document _idfieldPaths - Array of field paths that should be returnednull if one does not exist in
this DocumentStoreStoreExceptionDocument findById(String _id, FieldPath... fieldPaths) throws StoreException
null if the document with that `_id`
doesn't exist in this DocumentStore. The returned Document will include only the specified
fields._id - Document _idfieldPaths - Array of field paths that should be returnednull if one does not exist in
this DocumentStoreStoreExceptionDocument findById(Value _id, String... fieldPaths) throws StoreException
null if the document with that `_id`
doesn't exist in this DocumentStore. The returned Document will include only the specified
fields._id - Document _idfieldPaths - Array of of field paths that should be returnednull if one does not exist in
this DocumentStoreStoreExceptionDocument findById(Value _id, FieldPath... fieldPaths) throws StoreException
null if the document with that `_id`
doesn't exist in this DocumentStore. The returned Document will include only the specified
fields._id - Document _idfieldPaths - Array of of field paths that should be returnednull if one does not exist in
this DocumentStoreStoreExceptionDocument findById(String _id, QueryCondition condition) throws StoreException
null is returned._id - document idcondition - query condition to test the documentStoreExceptionDocument findById(Value _id, QueryCondition condition) throws StoreException
null is returned._id - document idcondition - query condition to test the documentStoreExceptionDocument findById(String _id, QueryCondition condition, String... fieldPaths) throws StoreException
null is returned. The returned Document will include only the specified fields._id - document idfieldPaths - list of fields that should be returned in the read documentcondition - query condition to test the documentStoreExceptionDocument findById(String _id, QueryCondition condition, FieldPath... fieldPaths) throws StoreException
null is returned. The returned Document will include only the specified fields._id - document idfieldPaths - list of fields that should be returned in the read documentcondition - query condition to test the documentStoreExceptionDocument findById(Value _id, QueryCondition condition, String... fieldPaths) throws StoreException
null is returned. The returned Document will include only the specified fields._id - document idfieldPaths - list of fields that should be returned in the read documentcondition - query condition to test the documentStoreExceptionDocument findById(Value _id, QueryCondition condition, FieldPath... fieldPaths) throws StoreException
null is returned. The returned Document will include only the specified fields._id - document idfieldPaths - list of fields that should be returned in the read documentcondition - query condition to test the documentStoreExceptionQueryResult find(@API.NonNullable Query query) throws StoreException
Executes the specified query on the DocumentStore and return a QueryResult.
The returned QueryResult must be closed after retrieving the documents.
StoreExceptionDocumentStream find() throws StoreException
Executes a query to return all Documents in the DocumentStore.
The returned DocumentStream must be closed after retrieving the documents.
StoreExceptionDocumentStream findQuery(@API.NonNullable Query query) throws StoreException
find(Query)Executes the specified query on the DocumentStore and return a DocumentStream of the result.
The returned DocumentStream must be closed after retrieving the documents.
StoreExceptionDocumentStream findQuery(@API.NonNullable String queryJSON) throws StoreException
find(Query)Executes the specified query on the DocumentStore and return a DocumentStream of the result.
The returned DocumentStream must be closed after retrieving the documents.
queryJSON - a Json string representation of OJAI QueryStoreExceptionDocumentStream find(@API.NonNullable String... fieldPaths) throws StoreException
find(Query)Executes a query to return all Documents in the DocumentStore.
Each Document will contain only those field paths that are specified in the argument. If no fields are specified then it returns a full document.
fieldPaths - list of fields that should be returned in the read documentStoreExceptionDocumentStream find(@API.NonNullable FieldPath... fieldPaths) throws StoreException
find(Query)Executes a query to return all Documents in the DocumentStore.
Each Document will contain only those field paths that are specified in the argument. If no fields are specified then it returns a full document.
fieldPaths - list of fields that should be returned in the read documentStoreExceptionDocumentStream find(@API.NonNullable QueryCondition condition) throws StoreException
find(Query)condition - the QueryCondition to match the documentsStoreExceptionDocumentStream find(@API.NonNullable QueryCondition condition, @API.NonNullable String... fieldPaths) throws StoreException
find(Query)Executes a query on the DocumentStore and return a DocumentStream of the Document matching the specified QueryCondition.
Each Document will contain only those field paths that are specified in the argument. If no fields are specified then it returns a full document.
condition - the QueryCondition to match the documentsfieldPaths - list of fields that should be returned in the read documentStoreExceptionDocumentStream find(@API.NonNullable QueryCondition condition, @API.NonNullable FieldPath... fieldPaths) throws StoreException
find(Query)Executes a query on the DocumentStore and return a DocumentStream of the Document matching the specified QueryCondition.
Each Document will contain only those field paths that are specified in the argument. If no fields are specified then it returns a full document.
condition - the QueryCondition to match the documentsfieldPaths - list of fields that should be returned in the read documentStoreExceptionvoid insertOrReplace(@API.NonNullable Document doc) throws StoreException
"_id" field or the operation
will fail.
doc - the Document to be inserted or replaced in the DocumentStoreStoreExceptionvoid insertOrReplace(@API.NonNullable String _id, @API.NonNullable Document r) throws StoreException
"_id" field or
its value should be same as the specified _id or the operation will fail.
doc - the Document to be inserted or replaced in the DocumentStore_id - value to be used as the _id for this documentStoreExceptionvoid insertOrReplace(@API.NonNullable Value _id, @API.NonNullable Document doc) throws StoreException
"_id" field or
its value should be same as the specified _id or the operation will fail.
doc - the Document to be inserted or replaced in the DocumentStore_id - value to be used as the _id for this documentStoreExceptionvoid insertOrReplace(@API.NonNullable Document doc, @API.NonNullable FieldPath fieldAsKey) throws StoreException
_id.
doc - the Document to be inserted or replaced in the DocumentStorefieldAsKey - document's field to be used as the key when an id is not
passed in and the document doesn't have an "_id" field or
a different field is desired to be used as _idStoreExceptionvoid insertOrReplace(@API.NonNullable Document doc, @API.NonNullable String fieldAsKey) throws StoreException
_id.
doc - the Document to be inserted or replaced in the DocumentStorefieldAsKey - document's field to be used as the key when an id is not
passed in and the document doesn't have an "_id" field or
a different field is desired to be used as _idStoreExceptionvoid insertOrReplace(@API.NonNullable DocumentStream stream) throws MultiOpException
stream - the DocumentStream to read the documents fromMultiOpException - which has a list of write-failed documents and
their errorsvoid insertOrReplace(@API.NonNullable DocumentStream stream, @API.NonNullable FieldPath fieldAsKey) throws MultiOpException
fieldAsKey as the "_id" field.
If an "_id" field is present in the documents, an exception will be thrown.
stream - the DocumentStream to read the documents fromfieldAsKey - field from each document whose value is to be used as
the document key for insertionMultiOpException - which has a list of write-failed documents and
their errorsvoid insertOrReplace(@API.NonNullable DocumentStream stream, @API.NonNullable String fieldAsKey) throws MultiOpException
fieldAsKey as the "_id" field.
If an "_id" field is present in the documents, an exception will be thrown.
stream - the DocumentStream to read the documents fromfieldAsKey - field from each document whose value is to be used as
the document key for insertionMultiOpException - which has a list of write-failed documents and
their errorsvoid update(@API.NonNullable String _id, @API.NonNullable DocumentMutation mutation) throws StoreException
_id - document idm - a mutation object specifying the mutation operations on the documentStoreExceptionvoid update(@API.NonNullable Value _id, @API.NonNullable DocumentMutation mutation) throws StoreException
_id - document idm - a mutation object specifying the mutation operations on the documentStoreExceptionvoid delete(@API.NonNullable String _id) throws StoreException
fieldAsKey is provided, its value will be used as
the "_id" to delete the document._id - document iddoc - JSON document to be deletedfieldAsKey - document's field to be used as the key when an id is not
passed in and a document doesn't have an "_id" fieldStoreExceptionvoid delete(@API.NonNullable Value _id) throws StoreException
StoreExceptionvoid delete(@API.NonNullable Document doc) throws StoreException
StoreExceptionvoid delete(@API.NonNullable Document doc, @API.NonNullable FieldPath fieldAsKey) throws StoreException
StoreExceptionvoid delete(@API.NonNullable Document doc, @API.NonNullable String fieldAsKey) throws StoreException
StoreExceptionvoid delete(@API.NonNullable DocumentStream stream) throws MultiOpException
stream - DocumentStreamfieldAsKey - a field from each document whose value is to be used as
the document key for deletionMultiOpException - which has a list of write-failed documents and
their errorsvoid delete(@API.NonNullable DocumentStream stream, @API.NonNullable FieldPath fieldAsKey) throws MultiOpException
MultiOpExceptionvoid delete(@API.NonNullable DocumentStream stream, @API.NonNullable String fieldAsKey) throws MultiOpException
MultiOpExceptionvoid insert(@API.NonNullable String _id, @API.NonNullable Document doc) throws StoreException
doc - JSON document as the new value for the given document_id - to be used as the key for the documentfieldAsKey - document's field to be used as the key when the id is not
passed in and document doesn't have an "_id" fieldTableNotFoundException - when a DocumentStore does not exist to add this documentReadOnlyException - when a DocumentStore is not accepting writesOpNotPermittedException - when the server returned EPERMDocumentExistsException - when a document with id already exists in DocumentStoreStoreExceptionvoid insert(@API.NonNullable Value _id, @API.NonNullable Document doc) throws StoreException
StoreExceptionvoid insert(@API.NonNullable Document doc) throws StoreException
StoreExceptionvoid insert(@API.NonNullable Document doc, @API.NonNullable FieldPath fieldAsKey) throws StoreException
StoreExceptionvoid insert(@API.NonNullable Document doc, @API.NonNullable String fieldAsKey) throws StoreException
StoreExceptionvoid insert(@API.NonNullable DocumentStream stream) throws MultiOpException
stream - DocumentStreamfieldAsKey - a field from each document whose value is to be used as
the document key for deletionMultiOpException - which has a list of write-failed documents and
their errorsvoid insert(@API.NonNullable DocumentStream stream, @API.NonNullable FieldPath fieldAsKey) throws MultiOpException
MultiOpExceptionvoid insert(@API.NonNullable DocumentStream stream, @API.NonNullable String fieldAsKey) throws MultiOpException
MultiOpExceptionvoid replace(@API.NonNullable String _id, @API.NonNullable Document doc) throws StoreException
doc - JSON document as the new value for the given document_id - to be used as the key for the documentfieldAsKey - document's field to be used as the key when an id is not
passed in and document doesn't have an "_id" fieldTableNotFoundException - when a DocumentStore does not exist to which to add this documentReadOnlyException - when a DocumentStore is not accepting writesOpNotPermittedException - when the server returns EPERMDocumentNotFoundException - when a document with the id does not exist in DocumentStoreStoreExceptionvoid replace(@API.NonNullable Value _id, @API.NonNullable Document doc) throws StoreException
StoreExceptionvoid replace(@API.NonNullable Document doc) throws StoreException
StoreExceptionvoid replace(@API.NonNullable Document doc, @API.NonNullable FieldPath fieldAsKey) throws StoreException
StoreExceptionvoid replace(@API.NonNullable Document doc, @API.NonNullable String fieldAsKey) throws StoreException
StoreExceptionvoid replace(@API.NonNullable DocumentStream stream) throws MultiOpException
stream - a DocumentStream to read the documents fromfieldAsKey - field from each document whose value is to be used as
the document key for deletionMultiOpException - which has list of write-failed documents and
their errorsvoid replace(@API.NonNullable DocumentStream stream, @API.NonNullable FieldPath fieldAsKey) throws MultiOpException
MultiOpExceptionvoid replace(@API.NonNullable DocumentStream stream, @API.NonNullable String fieldAsKey) throws MultiOpException
MultiOpExceptionvoid increment(@API.NonNullable String _id, @API.NonNullable String field, byte inc) throws StoreException
_id - document idfield - the field name in dot separated notationinc - increment to apply to a field. Can be positive or negativeStoreExceptionvoid increment(@API.NonNullable String _id, @API.NonNullable String field, short inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable String _id, @API.NonNullable String field, int inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable String _id, @API.NonNullable String field, long inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable String _id, @API.NonNullable String field, float inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable String _id, @API.NonNullable String field, double inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable String _id, @API.NonNullable String field, @API.NonNullable BigDecimal inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable Value _id, @API.NonNullable String field, byte inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable Value _id, @API.NonNullable String field, short inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable Value _id, @API.NonNullable String field, int inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable Value _id, @API.NonNullable String field, long inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable Value _id, @API.NonNullable String field, float inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable Value _id, @API.NonNullable String field, double inc) throws StoreException
StoreExceptionvoid increment(@API.NonNullable Value _id, @API.NonNullable String field, @API.NonNullable BigDecimal inc) throws StoreException
StoreException@Deprecated boolean checkAndMutate(@API.NonNullable String _id, @API.NonNullable QueryCondition condition, @API.NonNullable DocumentMutation mutation) throws StoreException
checkAndUpdate(String, QueryCondition, DocumentMutation)_id - document idcondition - the condition to evaluate on the documentm - mutation to apply on the documentStoreException - if the condition passes but the mutate fails@Deprecated boolean checkAndMutate(@API.NonNullable Value _id, @API.NonNullable QueryCondition condition, @API.NonNullable DocumentMutation mutation) throws StoreException
checkAndUpdate(Value, QueryCondition, DocumentMutation)_id - document idcondition - the condition to evaluate on the documentm - mutation to apply on the documentStoreException - if the condition passes but the mutate failsdefault boolean checkAndUpdate(@API.NonNullable String _id, @API.NonNullable QueryCondition condition, @API.NonNullable DocumentMutation mutation) throws StoreException
_id - document idcondition - the condition to evaluate on the documentm - mutation to apply on the documentStoreException - if the condition passes but the mutate failsdefault boolean checkAndUpdate(@API.NonNullable Value _id, @API.NonNullable QueryCondition condition, @API.NonNullable DocumentMutation mutation) throws StoreException
_id - document idcondition - the condition to evaluate on the documentm - mutation to apply on the documentStoreException - if the condition passes but the mutate failsboolean checkAndDelete(@API.NonNullable String _id, @API.NonNullable QueryCondition condition) throws StoreException
_id - document idcondition - condition to evaluate on the documentStoreException - if the condition passes but the delete failsboolean checkAndDelete(@API.NonNullable Value _id, @API.NonNullable QueryCondition condition) throws StoreException
StoreExceptionboolean checkAndReplace(@API.NonNullable String _id, @API.NonNullable QueryCondition condition, @API.NonNullable Document doc) throws StoreException
_id - document idcondition - the condition to evaluate on the documentdoc - document to replaceStoreException - if the condition passes but the replace failsboolean checkAndReplace(@API.NonNullable Value _id, @API.NonNullable QueryCondition condition, @API.NonNullable Document doc) throws StoreException
StoreExceptionvoid close()
throws StoreException
AutoCloseable.close() to avoid declaring a checked exception.close in interface AutoCloseableStoreExceptionCopyright © 2015–2019 MapR Technologies, Inc.. All rights reserved.