public interface ArangoOperations
Modifier and Type | Interface and Description |
---|---|
static class |
ArangoOperations.UpsertStrategy |
Modifier and Type | Method and Description |
---|---|
CollectionOperations |
collection(Class<?> entityClass)
Returns the operations interface for a collection.
|
CollectionOperations |
collection(String name)
Returns the operations interface for a collection.
|
CollectionOperations |
collection(String name,
com.arangodb.model.CollectionCreateOptions options)
Returns the operations interface for a collection.
|
com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> |
delete(Iterable<Object> values,
Class<?> entityClass)
Deletes multiple documents from a collection.
|
com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> |
delete(Iterable<Object> values,
Class<?> entityClass,
com.arangodb.model.DocumentDeleteOptions options)
Deletes multiple documents from a collection.
|
com.arangodb.entity.DocumentEntity |
delete(Object id,
Class<?> entityClass)
Deletes the document with the given
id from a collection. |
com.arangodb.entity.DocumentEntity |
delete(Object id,
Class<?> entityClass,
com.arangodb.model.DocumentDeleteOptions options)
Deletes the document with the given
id from a collection. |
com.arangodb.ArangoDB |
driver()
Give direct access to the underlying driver
|
void |
dropDatabase()
Drop an existing database
|
boolean |
exists(Object id,
Class<?> entityClass)
Checks whether the document exists by reading a single document head
|
<T> Iterable<T> |
find(Iterable<? extends Object> ids,
Class<T> entityClass)
Retrieves multiple documents with the given
ids from a collection. |
<T> Optional<T> |
find(Object id,
Class<T> entityClass)
Retrieves the document with the given
id from a collection. |
<T> Optional<T> |
find(Object id,
Class<T> entityClass,
com.arangodb.model.DocumentReadOptions options)
Retrieves the document with the given
id from a collection. |
<T> Iterable<T> |
findAll(Class<T> entityClass)
Retrieves all documents from a collection.
|
ArangoConverter |
getConverter() |
ResolverFactory |
getResolverFactory() |
Iterable<com.arangodb.entity.UserEntity> |
getUsers()
Fetches data about all users.
|
com.arangodb.entity.ArangoDBVersion |
getVersion()
Returns the server name and version number.
|
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> |
insert(Iterable<T> values,
Class<T> entityClass)
Creates new documents from the given documents, unless there is already a document with the _key given.
|
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> |
insert(Iterable<T> values,
Class<T> entityClass,
com.arangodb.model.DocumentCreateOptions options)
Creates new documents from the given documents, unless there is already a document with the _key given.
|
com.arangodb.entity.DocumentEntity |
insert(String collectionName,
Object value)
Creates a new document from the given document, unless there is already a document with the _key given.
|
com.arangodb.entity.DocumentEntity |
insert(String collectionName,
Object value,
com.arangodb.model.DocumentCreateOptions options)
Creates a new document from the given document, unless there is already a document with the _key given.
|
<T> com.arangodb.entity.DocumentEntity |
insert(T value)
Creates a new document from the given document, unless there is already a document with the _key given.
|
<T> com.arangodb.entity.DocumentEntity |
insert(T value,
com.arangodb.model.DocumentCreateOptions options)
Creates a new document from the given document, unless there is already a document with the _key given.
|
<T> com.arangodb.ArangoCursor<T> |
query(String query,
com.arangodb.model.AqlQueryOptions options,
Class<T> entityClass)
Performs a database query using the given
query , then returns a new ArangoCursor instance for the
result list. |
<T> com.arangodb.ArangoCursor<T> |
query(String query,
Class<T> entityClass)
Performs a database query using the given
query , then returns a new ArangoCursor instance for the
result list. |
<T> com.arangodb.ArangoCursor<T> |
query(String query,
Map<String,Object> bindVars,
com.arangodb.model.AqlQueryOptions options,
Class<T> entityClass)
Performs a database query using the given
query and bindVars , then returns a new
ArangoCursor instance for the result list. |
<T> com.arangodb.ArangoCursor<T> |
query(String query,
Map<String,Object> bindVars,
Class<T> entityClass)
Performs a database query using the given
query and bindVars , then returns a new
ArangoCursor instance for the result list. |
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> |
replace(Iterable<T> values,
Class<T> entityClass)
Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are
specified by the _key attributes in the documents in values.
|
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> |
replace(Iterable<T> values,
Class<T> entityClass,
com.arangodb.model.DocumentReplaceOptions options)
Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are
specified by the _key attributes in the documents in values.
|
<T> com.arangodb.entity.DocumentEntity |
replace(Object id,
T value)
Replaces the document with
id with the one in the body, provided there is such a document and no
precondition is violated |
<T> com.arangodb.entity.DocumentEntity |
replace(Object id,
T value,
com.arangodb.model.DocumentReplaceOptions options)
Replaces the document with
id with the one in the body, provided there is such a document and no
precondition is violated |
<T> void |
repsert(Iterable<? extends T> values,
Class<T> entityClass)
Creates new documents from the given documents, unless there already exists.
|
<T> void |
repsert(T value)
Creates a new document from the given document, unless there is already a document with the id given.
|
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> |
update(Iterable<T> values,
Class<T> entityClass)
Partially updates documents, the documents to update are specified by the _key attributes in the objects on
values.
|
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> |
update(Iterable<T> values,
Class<T> entityClass,
com.arangodb.model.DocumentUpdateOptions options)
Partially updates documents, the documents to update are specified by the _key attributes in the objects on
values.
|
<T> com.arangodb.entity.DocumentEntity |
update(Object id,
T value)
Partially updates the document identified by document id or key.
|
<T> com.arangodb.entity.DocumentEntity |
update(Object id,
T value,
com.arangodb.model.DocumentUpdateOptions options)
Partially updates the document identified by document id or key.
|
<T> void |
upsert(Iterable<T> value,
ArangoOperations.UpsertStrategy strategy)
Deprecated.
use
#repsert(Iterable) instead |
<T> void |
upsert(T value,
ArangoOperations.UpsertStrategy strategy)
Deprecated.
use
repsert(Object) instead |
UserOperations |
user(String username)
Return the operations interface for a user.
|
com.arangodb.ArangoDB driver()
com.arangodb.entity.ArangoDBVersion getVersion() throws DataAccessException
DataAccessException
<T> com.arangodb.ArangoCursor<T> query(String query, Map<String,Object> bindVars, com.arangodb.model.AqlQueryOptions options, Class<T> entityClass) throws DataAccessException
query
and bindVars
, then returns a new
ArangoCursor
instance for the result list.query
- An AQL query stringbindVars
- key/value pairs defining the variables to bind the query tooptions
- Additional options that will be passed to the query API, can be nullentityClass
- The entity type of the resultDataAccessException
<T> com.arangodb.ArangoCursor<T> query(String query, Map<String,Object> bindVars, Class<T> entityClass) throws DataAccessException
query
and bindVars
, then returns a new
ArangoCursor
instance for the result list.query
- An AQL query stringbindVars
- key/value pairs defining the variables to bind the query toentityClass
- The entity type of the resultDataAccessException
<T> com.arangodb.ArangoCursor<T> query(String query, com.arangodb.model.AqlQueryOptions options, Class<T> entityClass) throws DataAccessException
query
, then returns a new ArangoCursor
instance for the
result list.query
- An AQL query stringoptions
- Additional options that will be passed to the query API, can be nullentityClass
- The entity type of the resultDataAccessException
<T> com.arangodb.ArangoCursor<T> query(String query, Class<T> entityClass) throws DataAccessException
query
, then returns a new ArangoCursor
instance for the
result list.query
- An AQL query stringentityClass
- The entity type of the resultDataAccessException
com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> delete(Iterable<Object> values, Class<?> entityClass, com.arangodb.model.DocumentDeleteOptions options) throws DataAccessException
values
- The keys of the documents or the documents themselvesentityClass
- The entity class which represents the collectionoptions
- Additional options, can be nullDataAccessException
com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> delete(Iterable<Object> values, Class<?> entityClass) throws DataAccessException
values
- The keys of the documents or the documents themselvesentityClass
- The entity class which represents the collectionDataAccessException
com.arangodb.entity.DocumentEntity delete(Object id, Class<?> entityClass, com.arangodb.model.DocumentDeleteOptions options) throws DataAccessException
id
from a collection.id
- The id or key of the documententityClass
- The entity class which represents the collectionoptions
- Additional options, can be nullDataAccessException
com.arangodb.entity.DocumentEntity delete(Object id, Class<?> entityClass) throws DataAccessException
id
from a collection.id
- The id or key of the documententityClass
- The entity class which represents the collectionDataAccessException
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> update(Iterable<T> values, Class<T> entityClass, com.arangodb.model.DocumentUpdateOptions options) throws DataAccessException
T
- values
- A list of documentsentityClass
- The entity class which represents the collectionoptions
- Additional options, can be nullDataAccessException
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> update(Iterable<T> values, Class<T> entityClass) throws DataAccessException
T
- values
- A list of documentsentityClass
- The entity class which represents the collectionDataAccessException
<T> com.arangodb.entity.DocumentEntity update(Object id, T value, com.arangodb.model.DocumentUpdateOptions options) throws DataAccessException
id
- The id or key of the documentvalue
- A representation of a single documentoptions
- Additional options, can be nullDataAccessException
<T> com.arangodb.entity.DocumentEntity update(Object id, T value) throws DataAccessException
id
- The id or key of the documentvalue
- A representation of a single documentDataAccessException
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> replace(Iterable<T> values, Class<T> entityClass, com.arangodb.model.DocumentReplaceOptions options) throws DataAccessException
T
- values
- A List of documentsentityClass
- The entity class which represents the collectionoptions
- Additional options, can be nullDataAccessException
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> replace(Iterable<T> values, Class<T> entityClass) throws DataAccessException
T
- values
- A List of documentsentityClass
- The entity class which represents the collectionoptions
- Additional options, can be nullDataAccessException
<T> com.arangodb.entity.DocumentEntity replace(Object id, T value, com.arangodb.model.DocumentReplaceOptions options) throws DataAccessException
id
with the one in the body, provided there is such a document and no
precondition is violatedid
- The id or key of the documentvalue
- A representation of a single documentoptions
- Additional options, can be nullDataAccessException
<T> com.arangodb.entity.DocumentEntity replace(Object id, T value) throws DataAccessException
id
with the one in the body, provided there is such a document and no
precondition is violatedid
- The id or key of the documentvalue
- A representation of a single documentDataAccessException
<T> Optional<T> find(Object id, Class<T> entityClass, com.arangodb.model.DocumentReadOptions options) throws DataAccessException
id
from a collection.id
- The id or key of the documententityClass
- The entity class which represents the collectionoptions
- Additional options, can be nullDataAccessException
<T> Optional<T> find(Object id, Class<T> entityClass) throws DataAccessException
id
from a collection.id
- The id or key of the documententityClass
- The entity class which represents the collectionDataAccessException
<T> Iterable<T> findAll(Class<T> entityClass) throws DataAccessException
entityClass
- The entity class which represents the collectionDataAccessException
<T> Iterable<T> find(Iterable<? extends Object> ids, Class<T> entityClass) throws DataAccessException
ids
from a collection.ids
- The ids or keys of the documentsentityClass
- The entity class which represents the collectionDataAccessException
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> insert(Iterable<T> values, Class<T> entityClass, com.arangodb.model.DocumentCreateOptions options) throws DataAccessException
T
- values
- A List of documentsentityClass
- The entity class which represents the collectionoptions
- Additional options, can be nullDataAccessException
<T> com.arangodb.entity.MultiDocumentEntity<? extends com.arangodb.entity.DocumentEntity> insert(Iterable<T> values, Class<T> entityClass) throws DataAccessException
T
- values
- A List of documentsentityClass
- The entity class which represents the collectionDataAccessException
<T> com.arangodb.entity.DocumentEntity insert(T value, com.arangodb.model.DocumentCreateOptions options) throws DataAccessException
value
- A representation of a single documentoptions
- Additional options, can be nullDataAccessException
<T> com.arangodb.entity.DocumentEntity insert(T value) throws DataAccessException
value
- A representation of a single documentDataAccessException
com.arangodb.entity.DocumentEntity insert(String collectionName, Object value, com.arangodb.model.DocumentCreateOptions options) throws DataAccessException
collectionName
- Name of the collection in which the new document should be insertedvalue
- A representation of a single documentoptions
- Additional options, can be nullDataAccessException
com.arangodb.entity.DocumentEntity insert(String collectionName, Object value) throws DataAccessException
collectionName
- Name of the collection in which the new document should be insertedvalue
- A representation of a single documentDataAccessException
@Deprecated <T> void upsert(T value, ArangoOperations.UpsertStrategy strategy) throws DataAccessException
repsert(Object)
insteadvalue
- A representation of a single documentstrategy
- The strategy to use when not inserting the documentDataAccessException
@Deprecated <T> void upsert(Iterable<T> value, ArangoOperations.UpsertStrategy strategy) throws DataAccessException
#repsert(Iterable)
insteadvalue
- A List of documentsstrategy
- The strategy to use when not inserting the documentDataAccessException
<T> void repsert(T value) throws DataAccessException
value
- A representation of a single documentDataAccessException
<T> void repsert(Iterable<? extends T> values, Class<T> entityClass) throws DataAccessException
values
- A List of documentsentityClass
- The entity class which represents the collectionDataAccessException
boolean exists(Object id, Class<?> entityClass) throws DataAccessException
id
- The id or key of the documententityClass
- The entity type representing the collectionDataAccessException
void dropDatabase() throws DataAccessException
DataAccessException
CollectionOperations collection(Class<?> entityClass) throws DataAccessException
entityClass
- The entity type representing the collectionCollectionOperations
DataAccessException
CollectionOperations collection(String name) throws DataAccessException
name
- The name of the collectionCollectionOperations
DataAccessException
CollectionOperations collection(String name, com.arangodb.model.CollectionCreateOptions options) throws DataAccessException
name
- The name of the collectionoptions
- Additional options for collection creation, can be nullCollectionOperations
DataAccessException
UserOperations user(String username)
username
- The name of the userUserOperations
Iterable<com.arangodb.entity.UserEntity> getUsers() throws DataAccessException
DataAccessException
ArangoConverter getConverter()
ResolverFactory getResolverFactory()
Copyright © 2017–2020 ArangoDB GmbH. All rights reserved.