Package | Description |
---|---|
org.ojai.store | |
org.ojai.store.exceptions |
Modifier and Type | Method and Description |
---|---|
void |
DocumentStore.beginTrackingWrites()
Begins tracking the write operations performed through this instance of
DocumentStore . |
void |
DocumentStore.beginTrackingWrites(String previousWritesContext)
Begins tracking the write operations performed through this instance of
DocumentStore . |
boolean |
DocumentStore.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 |
DocumentStore.checkAndDelete(Value _id,
QueryCondition condition) |
boolean |
DocumentStore.checkAndMutate(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.
|
boolean |
DocumentStore.checkAndMutate(Value _id,
QueryCondition condition,
DocumentMutation mutation) |
boolean |
DocumentStore.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 |
DocumentStore.checkAndReplace(Value _id,
QueryCondition condition,
Document doc) |
void |
DocumentStore.clearTrackedWrites()
Stops the writes tracking and clears any state on this
DocumentStore instance. |
void |
DocumentStore.close()
Override
AutoCloseable.close() to avoid declaring a checked exception. |
void |
DocumentStore.delete(Document doc) |
void |
DocumentStore.delete(Document doc,
FieldPath fieldAsKey) |
void |
DocumentStore.delete(Document doc,
String fieldAsKey) |
void |
DocumentStore.delete(String _id)
Deletes a document with the given id.
|
void |
DocumentStore.delete(Value _id) |
String |
DocumentStore.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 |
DocumentStore.find()
Deprecated.
|
DocumentStream |
DocumentStore.find(FieldPath... fieldPaths)
Deprecated.
|
QueryResult |
DocumentStore.find(Query query)
Executes the specified query on the DocumentStore and return a QueryResult.
|
DocumentStream |
DocumentStore.find(QueryCondition condition)
Deprecated.
|
DocumentStream |
DocumentStore.find(QueryCondition condition,
FieldPath... fieldPaths)
Deprecated.
|
DocumentStream |
DocumentStore.find(QueryCondition condition,
String... fieldPaths)
Deprecated.
|
DocumentStream |
DocumentStore.find(String... fieldPaths)
Deprecated.
|
Document |
DocumentStore.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 |
DocumentStore.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 |
DocumentStore.findById(String _id,
QueryCondition condition)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
DocumentStore.findById(String _id,
QueryCondition condition,
FieldPath... fieldPaths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
DocumentStore.findById(String _id,
QueryCondition condition,
String... fieldPaths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
DocumentStore.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 |
DocumentStore.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 |
DocumentStore.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 |
DocumentStore.findById(Value _id,
QueryCondition condition)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
DocumentStore.findById(Value _id,
QueryCondition condition,
FieldPath... fieldPaths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
DocumentStore.findById(Value _id,
QueryCondition condition,
String... fieldPaths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
DocumentStore.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 |
DocumentStore.findQuery(Query query)
Deprecated.
|
DocumentStream |
DocumentStore.findQuery(String queryJSON)
Deprecated.
|
void |
DocumentStore.flush()
Flushes any buffered writes operations for this DocumentStore.
|
void |
DocumentStore.increment(String _id,
String field,
BigDecimal inc) |
void |
DocumentStore.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 |
DocumentStore.increment(String _id,
String field,
double inc) |
void |
DocumentStore.increment(String _id,
String field,
float inc) |
void |
DocumentStore.increment(String _id,
String field,
int inc) |
void |
DocumentStore.increment(String _id,
String field,
long inc) |
void |
DocumentStore.increment(String _id,
String field,
short inc) |
void |
DocumentStore.increment(Value _id,
String field,
BigDecimal inc) |
void |
DocumentStore.increment(Value _id,
String field,
byte inc) |
void |
DocumentStore.increment(Value _id,
String field,
double inc) |
void |
DocumentStore.increment(Value _id,
String field,
float inc) |
void |
DocumentStore.increment(Value _id,
String field,
int inc) |
void |
DocumentStore.increment(Value _id,
String field,
long inc) |
void |
DocumentStore.increment(Value _id,
String field,
short inc) |
void |
DocumentStore.insert(Document doc) |
void |
DocumentStore.insert(Document doc,
FieldPath fieldAsKey) |
void |
DocumentStore.insert(Document doc,
String fieldAsKey) |
void |
DocumentStore.insert(String _id,
Document doc)
Inserts a document with the given id.
|
void |
DocumentStore.insert(Value _id,
Document doc) |
void |
DocumentStore.insertOrReplace(Document doc)
Inserts or replaces a new document in this DocumentStore.
|
void |
DocumentStore.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 |
DocumentStore.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 |
DocumentStore.insertOrReplace(String _id,
Document r)
Inserts or replaces a new document in this DocumentStore with the given _id.
|
void |
DocumentStore.insertOrReplace(Value _id,
Document doc)
Inserts or replaces a new document in this DocumentStore with the given _id.
|
void |
DocumentStore.replace(Document doc) |
void |
DocumentStore.replace(Document doc,
FieldPath fieldAsKey) |
void |
DocumentStore.replace(Document doc,
String fieldAsKey) |
void |
DocumentStore.replace(String _id,
Document doc)
Replaces a document in the DocumentStore.
|
void |
DocumentStore.replace(Value _id,
Document doc) |
void |
DocumentStore.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 |
DocumentStore.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. |
Modifier and Type | Class and Description |
---|---|
class |
DocumentExistsException
This exception is thrown if a Store operation fails if a Document already
existed when none was expected for the operation to succeed.
|
class |
DocumentNotFoundException
This exception is thrown if a Store operation fails if a Document, which
was expected to exist for the operation to succeed, could not be found.
|
class |
MultiOpException
This class is used to wrap an exception for stream processing that fails midway.
|
Copyright © 2015–2018 MapR Technologies, Inc.. All rights reserved.