public interface ArangoCollectionAsync
extends com.arangodb.ArangoSerializationAccessor
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<com.arangodb.entity.CollectionPropertiesEntity> |
changeProperties(com.arangodb.model.CollectionPropertiesOptions options)
Changes the properties of a collection
|
CompletableFuture<com.arangodb.entity.CollectionPropertiesEntity> |
count()
Counts the documents in a collection
|
CompletableFuture<com.arangodb.entity.CollectionEntity> |
create()
Creates the collection
|
CompletableFuture<com.arangodb.entity.CollectionEntity> |
create(com.arangodb.model.CollectionCreateOptions options)
Creates the collection
|
ArangoDatabaseAsync |
db()
The the handler of the database the collection is within
|
CompletableFuture<com.arangodb.entity.DocumentDeleteEntity<Void>> |
deleteDocument(String key)
Removes a document
|
<T> CompletableFuture<com.arangodb.entity.DocumentDeleteEntity<T>> |
deleteDocument(String key,
Class<T> type,
com.arangodb.model.DocumentDeleteOptions options)
Removes a document
|
CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentDeleteEntity<Void>>> |
deleteDocuments(Collection<?> values)
Removes multiple document
|
<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentDeleteEntity<T>>> |
deleteDocuments(Collection<?> values,
Class<T> type,
com.arangodb.model.DocumentDeleteOptions options)
Removes multiple document
|
CompletableFuture<String> |
deleteIndex(String id)
Deletes an index
|
CompletableFuture<Boolean> |
documentExists(String key)
Checks if the document exists by reading a single document head
|
CompletableFuture<Boolean> |
documentExists(String key,
com.arangodb.model.DocumentExistsOptions options)
Checks if the document exists by reading a single document head
|
CompletableFuture<Void> |
drop()
Drops the collection
|
CompletableFuture<Void> |
drop(boolean isSystem)
Drops the collection
|
CompletableFuture<com.arangodb.entity.IndexEntity> |
ensureFulltextIndex(Iterable<String> fields,
com.arangodb.model.FulltextIndexOptions options)
Creates a fulltext index for the collection, if it does not already exist.
|
CompletableFuture<com.arangodb.entity.IndexEntity> |
ensureGeoIndex(Iterable<String> fields,
com.arangodb.model.GeoIndexOptions options)
Creates a geo-spatial index for the collection, if it does not already exist.
|
CompletableFuture<com.arangodb.entity.IndexEntity> |
ensureHashIndex(Iterable<String> fields,
com.arangodb.model.HashIndexOptions options)
Creates a hash index for the collection, if it does not already exist.
|
CompletableFuture<com.arangodb.entity.IndexEntity> |
ensurePersistentIndex(Iterable<String> fields,
com.arangodb.model.PersistentIndexOptions options)
Creates a persistent index for the collection, if it does not already exist.
|
CompletableFuture<com.arangodb.entity.IndexEntity> |
ensureSkiplistIndex(Iterable<String> fields,
com.arangodb.model.SkiplistIndexOptions options)
Creates a skip-list index for the collection, if it does not already exist.
|
CompletableFuture<Boolean> |
exists()
Checks whether the collection exists
|
<T> CompletableFuture<T> |
getDocument(String key,
Class<T> type)
Reads a single document
|
<T> CompletableFuture<T> |
getDocument(String key,
Class<T> type,
com.arangodb.model.DocumentReadOptions options)
Reads a single document
|
<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<T>> |
getDocuments(Collection<String> keys,
Class<T> type)
Reads multiple documents
|
<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<T>> |
getDocuments(Collection<String> keys,
Class<T> type,
com.arangodb.model.DocumentReadOptions options)
Reads multiple documents
|
CompletableFuture<com.arangodb.entity.IndexEntity> |
getIndex(String id)
Returns an index
|
CompletableFuture<Collection<com.arangodb.entity.IndexEntity>> |
getIndexes()
Returns all indexes of the collection
|
CompletableFuture<com.arangodb.entity.CollectionEntity> |
getInfo()
Returns information about the collection
|
CompletableFuture<com.arangodb.entity.Permissions> |
getPermissions(String user)
Get the collection access level
|
CompletableFuture<com.arangodb.entity.CollectionPropertiesEntity> |
getProperties()
Reads the properties of the specified collection
|
CompletableFuture<com.arangodb.entity.CollectionRevisionEntity> |
getRevision()
Retrieve the collections revision
|
CompletableFuture<Void> |
grantAccess(String user,
com.arangodb.entity.Permissions permissions)
Grants or revoke access to the collection for user user.
|
CompletableFuture<com.arangodb.entity.DocumentImportEntity> |
importDocuments(Collection<?> values)
Imports documents
|
CompletableFuture<com.arangodb.entity.DocumentImportEntity> |
importDocuments(Collection<?> values,
com.arangodb.model.DocumentImportOptions options)
Imports documents
|
CompletableFuture<com.arangodb.entity.DocumentImportEntity> |
importDocuments(String values)
Imports documents
|
CompletableFuture<com.arangodb.entity.DocumentImportEntity> |
importDocuments(String values,
com.arangodb.model.DocumentImportOptions options)
Imports documents
|
<T> CompletableFuture<com.arangodb.entity.DocumentCreateEntity<T>> |
insertDocument(T value)
Creates a new document from the given document, unless there is already a document with the _key given.
|
<T> CompletableFuture<com.arangodb.entity.DocumentCreateEntity<T>> |
insertDocument(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> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentCreateEntity<T>>> |
insertDocuments(Collection<T> values)
Creates new documents from the given documents, unless there is already a document with the _key given.
|
<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentCreateEntity<T>>> |
insertDocuments(Collection<T> values,
com.arangodb.model.DocumentCreateOptions options)
Creates new documents from the given documents, unless there is already a document with the _key given.
|
CompletableFuture<com.arangodb.entity.CollectionEntity> |
load()
Loads a collection into memory.
|
String |
name()
The name of the collection
|
CompletableFuture<com.arangodb.entity.CollectionEntity> |
rename(String newName)
Renames a collection
|
<T> CompletableFuture<com.arangodb.entity.DocumentUpdateEntity<T>> |
replaceDocument(String key,
T value)
Replaces the document with key with the one in the body, provided there is such a document and no precondition is
violated
|
<T> CompletableFuture<com.arangodb.entity.DocumentUpdateEntity<T>> |
replaceDocument(String key,
T value,
com.arangodb.model.DocumentReplaceOptions options)
Replaces the document with key with the one in the body, provided there is such a document and no precondition is
violated
|
<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentUpdateEntity<T>>> |
replaceDocuments(Collection<T> values)
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> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentUpdateEntity<T>>> |
replaceDocuments(Collection<T> values,
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.
|
CompletableFuture<Void> |
resetAccess(String user)
Clear the collection access level, revert back to the default access level.
|
CompletableFuture<Void> |
revokeAccess(String user)
Revokes access to the collection for user user.
|
CompletableFuture<com.arangodb.entity.CollectionEntity> |
truncate()
Removes all documents from the collection, but leaves the indexes intact
|
CompletableFuture<com.arangodb.entity.CollectionEntity> |
unload()
Removes a collection from memory.
|
<T> CompletableFuture<com.arangodb.entity.DocumentUpdateEntity<T>> |
updateDocument(String key,
T value)
Partially updates the document identified by document-key.
|
<T> CompletableFuture<com.arangodb.entity.DocumentUpdateEntity<T>> |
updateDocument(String key,
T value,
com.arangodb.model.DocumentUpdateOptions options)
Partially updates the document identified by document-key.
|
<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentUpdateEntity<T>>> |
updateDocuments(Collection<T> values)
Partially updates documents, the documents to update are specified by the _key attributes in the objects on
values.
|
<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentUpdateEntity<T>>> |
updateDocuments(Collection<T> values,
com.arangodb.model.DocumentUpdateOptions options)
Partially updates documents, the documents to update are specified by the _key attributes in the objects on
values.
|
ArangoDatabaseAsync db()
String name()
<T> CompletableFuture<com.arangodb.entity.DocumentCreateEntity<T>> insertDocument(T value)
value - A representation of a single document (POJO, VPackSlice or String for Json)<T> CompletableFuture<com.arangodb.entity.DocumentCreateEntity<T>> insertDocument(T value, com.arangodb.model.DocumentCreateOptions options)
value - A representation of a single document (POJO, VPackSlice or String for Json)options - Additional options, can be null<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentCreateEntity<T>>> insertDocuments(Collection<T> values)
values - A List of documents (POJO, VPackSlice or String for Json)<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentCreateEntity<T>>> insertDocuments(Collection<T> values, com.arangodb.model.DocumentCreateOptions options)
values - A List of documents (POJO, VPackSlice or String for Json)options - Additional options, can be nullCompletableFuture<com.arangodb.entity.DocumentImportEntity> importDocuments(Collection<?> values)
values - a list of Objects that will be stored as documentsArangoDBExceptionCompletableFuture<com.arangodb.entity.DocumentImportEntity> importDocuments(Collection<?> values, com.arangodb.model.DocumentImportOptions options)
values - a list of Objects that will be stored as documentsoptions - Additional options, can be nullArangoDBExceptionCompletableFuture<com.arangodb.entity.DocumentImportEntity> importDocuments(String values)
values - JSON-encoded array of objects that will be stored as documentsArangoDBExceptionCompletableFuture<com.arangodb.entity.DocumentImportEntity> importDocuments(String values, com.arangodb.model.DocumentImportOptions options)
values - JSON-encoded array of objects that will be stored as documentsoptions - Additional options, can be nullArangoDBException<T> CompletableFuture<T> getDocument(String key, Class<T> type) throws com.arangodb.ArangoDBException
key - The key of the documenttype - The type of the document (POJO class, VPackSlice or String for Json)com.arangodb.ArangoDBException<T> CompletableFuture<T> getDocument(String key, Class<T> type, com.arangodb.model.DocumentReadOptions options) throws com.arangodb.ArangoDBException
key - The key of the documenttype - The type of the document (POJO class, VPackSlice or String for Json)options - Additional options, can be nullcom.arangodb.ArangoDBException<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<T>> getDocuments(Collection<String> keys, Class<T> type)
keys - The keys of the documentstype - The type of the documents (POJO class, VPackSlice or String for Json)<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<T>> getDocuments(Collection<String> keys, Class<T> type, com.arangodb.model.DocumentReadOptions options)
keys - The keys of the documentstype - The type of the documents (POJO class, VPackSlice or String for Json)options - Additional options, can be null<T> CompletableFuture<com.arangodb.entity.DocumentUpdateEntity<T>> replaceDocument(String key, T value)
key - The key of the documentvalue - A representation of a single document (POJO, VPackSlice or String for Json)<T> CompletableFuture<com.arangodb.entity.DocumentUpdateEntity<T>> replaceDocument(String key, T value, com.arangodb.model.DocumentReplaceOptions options)
key - The key of the documentvalue - A representation of a single document (POJO, VPackSlice or String for Json)options - Additional options, can be null<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentUpdateEntity<T>>> replaceDocuments(Collection<T> values)
values - A List of documents (POJO, VPackSlice or String for Json)<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentUpdateEntity<T>>> replaceDocuments(Collection<T> values, com.arangodb.model.DocumentReplaceOptions options)
values - A List of documents (POJO, VPackSlice or String for Json)options - Additional options, can be null<T> CompletableFuture<com.arangodb.entity.DocumentUpdateEntity<T>> updateDocument(String key, T value)
key - The key of the documentvalue - A representation of a single document (POJO, VPackSlice or String for Json)<T> CompletableFuture<com.arangodb.entity.DocumentUpdateEntity<T>> updateDocument(String key, T value, com.arangodb.model.DocumentUpdateOptions options)
key - The key of the documentvalue - A representation of a single document (POJO, VPackSlice or String for Json)options - Additional options, can be null<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentUpdateEntity<T>>> updateDocuments(Collection<T> values)
values - A list of documents (POJO, VPackSlice or String for Json)<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentUpdateEntity<T>>> updateDocuments(Collection<T> values, com.arangodb.model.DocumentUpdateOptions options)
values - A list of documents (POJO, VPackSlice or String for Json)options - Additional options, can be nullCompletableFuture<com.arangodb.entity.DocumentDeleteEntity<Void>> deleteDocument(String key)
key - The key of the documenttype - The type of the document (POJO class, VPackSlice or String for Json). Only necessary if
options.returnOld is set to true, otherwise can be null.<T> CompletableFuture<com.arangodb.entity.DocumentDeleteEntity<T>> deleteDocument(String key, Class<T> type, com.arangodb.model.DocumentDeleteOptions options)
key - The key of the documenttype - The type of the document (POJO class, VPackSlice or String for Json). Only necessary if
options.returnOld is set to true, otherwise can be null.options - Additional options, can be nullCompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentDeleteEntity<Void>>> deleteDocuments(Collection<?> values)
values - The keys of the documents or the documents themselvestype - The type of the documents (POJO class, VPackSlice or String for Json). Only necessary if
options.returnOld is set to true, otherwise can be null.<T> CompletableFuture<com.arangodb.entity.MultiDocumentEntity<com.arangodb.entity.DocumentDeleteEntity<T>>> deleteDocuments(Collection<?> values, Class<T> type, com.arangodb.model.DocumentDeleteOptions options)
values - The keys of the documents or the documents themselvestype - The type of the documents (POJO class, VPackSlice or String for Json). Only necessary if
options.returnOld is set to true, otherwise can be null.options - Additional options, can be nullCompletableFuture<Boolean> documentExists(String key)
key - The key of the documentCompletableFuture<Boolean> documentExists(String key, com.arangodb.model.DocumentExistsOptions options)
key - The key of the documentoptions - Additional options, can be nullCompletableFuture<com.arangodb.entity.IndexEntity> getIndex(String id)
id - The index-handleCompletableFuture<String> deleteIndex(String id)
id - The index-handleCompletableFuture<com.arangodb.entity.IndexEntity> ensureHashIndex(Iterable<String> fields, com.arangodb.model.HashIndexOptions options)
fields - A list of attribute pathsoptions - Additional options, can be nullCompletableFuture<com.arangodb.entity.IndexEntity> ensureSkiplistIndex(Iterable<String> fields, com.arangodb.model.SkiplistIndexOptions options)
fields - A list of attribute pathsoptions - Additional options, can be nullCompletableFuture<com.arangodb.entity.IndexEntity> ensurePersistentIndex(Iterable<String> fields, com.arangodb.model.PersistentIndexOptions options)
fields - A list of attribute pathsoptions - Additional options, can be nullCompletableFuture<com.arangodb.entity.IndexEntity> ensureGeoIndex(Iterable<String> fields, com.arangodb.model.GeoIndexOptions options)
fields - A list of attribute pathsoptions - Additional options, can be nullCompletableFuture<com.arangodb.entity.IndexEntity> ensureFulltextIndex(Iterable<String> fields, com.arangodb.model.FulltextIndexOptions options)
fields - A list of attribute pathsoptions - Additional options, can be nullCompletableFuture<Collection<com.arangodb.entity.IndexEntity>> getIndexes()
CompletableFuture<Boolean> exists()
CompletableFuture<com.arangodb.entity.CollectionEntity> truncate()
CompletableFuture<com.arangodb.entity.CollectionPropertiesEntity> count()
CompletableFuture<com.arangodb.entity.CollectionEntity> create()
options - Additional options, can be nullCompletableFuture<com.arangodb.entity.CollectionEntity> create(com.arangodb.model.CollectionCreateOptions options)
options - Additional options, can be nullCompletableFuture<Void> drop()
CompletableFuture<Void> drop(boolean isSystem)
isSystem - Whether or not the collection to drop is a system collection. This parameter must be set to true in
order to drop a system collection.CompletableFuture<com.arangodb.entity.CollectionEntity> load()
CompletableFuture<com.arangodb.entity.CollectionEntity> unload()
CompletableFuture<com.arangodb.entity.CollectionEntity> getInfo()
CompletableFuture<com.arangodb.entity.CollectionPropertiesEntity> getProperties()
CompletableFuture<com.arangodb.entity.CollectionPropertiesEntity> changeProperties(com.arangodb.model.CollectionPropertiesOptions options)
options - Additional options, can be nullCompletableFuture<com.arangodb.entity.CollectionEntity> rename(String newName)
newName - The new nameCompletableFuture<com.arangodb.entity.CollectionRevisionEntity> getRevision()
CompletableFuture<Void> grantAccess(String user, com.arangodb.entity.Permissions permissions)
user - The name of the userpermissions - The permissions the user grantCompletableFuture<Void> revokeAccess(String user)
user - The name of the userCompletableFuture<Void> resetAccess(String user)
user - The name of the userCompletableFuture<com.arangodb.entity.Permissions> getPermissions(String user) throws com.arangodb.ArangoDBException
user - The name of the usercom.arangodb.ArangoDBExceptionCopyright © 2016–2018 ArangoDB GmbH. All rights reserved.