public class ArangoCollectionAsyncImpl extends com.arangodb.internal.InternalArangoCollection<ArangoDBAsyncImpl,ArangoDatabaseAsyncImpl,ArangoExecutorAsync> implements ArangoCollectionAsync
Modifier and Type | Method and Description |
---|---|
CompletableFuture<CollectionPropertiesEntity> |
changeProperties(CollectionPropertiesOptions options)
Changes the properties of a collection
|
CompletableFuture<CollectionPropertiesEntity> |
count()
Counts the documents in a collection
|
CompletableFuture<CollectionPropertiesEntity> |
count(CollectionCountOptions options)
Counts the documents in a collection
|
CompletableFuture<CollectionEntity> |
create()
Creates the collection
|
CompletableFuture<CollectionEntity> |
create(CollectionCreateOptions options)
Creates the collection
|
CompletableFuture<DocumentDeleteEntity<Void>> |
deleteDocument(String key)
Removes a document
|
<T> CompletableFuture<DocumentDeleteEntity<T>> |
deleteDocument(String key,
Class<T> type,
DocumentDeleteOptions options)
Removes a document
|
CompletableFuture<MultiDocumentEntity<DocumentDeleteEntity<Void>>> |
deleteDocuments(Collection<?> values)
Removes multiple document
|
<T> CompletableFuture<MultiDocumentEntity<DocumentDeleteEntity<T>>> |
deleteDocuments(Collection<?> values,
Class<T> type,
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,
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<IndexEntity> |
ensureFulltextIndex(Iterable<String> fields,
FulltextIndexOptions options)
Creates a fulltext index for the collection, if it does not already exist.
|
CompletableFuture<IndexEntity> |
ensureGeoIndex(Iterable<String> fields,
GeoIndexOptions options)
Creates a geo-spatial index for the collection, if it does not already exist.
|
CompletableFuture<IndexEntity> |
ensureHashIndex(Iterable<String> fields,
HashIndexOptions options)
Deprecated.
|
CompletableFuture<IndexEntity> |
ensurePersistentIndex(Iterable<String> fields,
PersistentIndexOptions options)
Creates a persistent index for the collection, if it does not already exist.
|
CompletableFuture<IndexEntity> |
ensureSkiplistIndex(Iterable<String> fields,
SkiplistIndexOptions options)
Deprecated.
|
CompletableFuture<IndexEntity> |
ensureTtlIndex(Iterable<String> fields,
TtlIndexOptions options)
Creates a ttl index for the collection, if it does not already exist.
|
CompletableFuture<IndexEntity> |
ensureZKDIndex(Iterable<String> fields,
ZKDIndexOptions options)
Creates a ZKD multi-dimensional 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,
DocumentReadOptions options)
Reads a single document
|
<T> CompletableFuture<MultiDocumentEntity<T>> |
getDocuments(Collection<String> keys,
Class<T> type)
Reads multiple documents
|
<T> CompletableFuture<MultiDocumentEntity<T>> |
getDocuments(Collection<String> keys,
Class<T> type,
DocumentReadOptions options)
Reads multiple documents
|
CompletableFuture<IndexEntity> |
getIndex(String id)
Returns an index
|
CompletableFuture<Collection<IndexEntity>> |
getIndexes()
Returns all indexes of the collection
|
CompletableFuture<CollectionEntity> |
getInfo()
Returns information about the collection
|
CompletableFuture<Permissions> |
getPermissions(String user)
Get the collection access level
|
CompletableFuture<CollectionPropertiesEntity> |
getProperties()
Reads the properties of the specified collection
|
CompletableFuture<ShardEntity> |
getResponsibleShard(Object value)
Returns the responsible shard for the document.
|
CompletableFuture<CollectionRevisionEntity> |
getRevision()
Retrieve the collections revision
|
CompletableFuture<Void> |
grantAccess(String user,
Permissions permissions)
Grants or revoke access to the collection for user user.
|
CompletableFuture<DocumentImportEntity> |
importDocuments(Collection<?> values)
Imports documents
|
CompletableFuture<DocumentImportEntity> |
importDocuments(Collection<?> values,
DocumentImportOptions options)
Imports documents
|
CompletableFuture<DocumentImportEntity> |
importDocuments(String values)
Imports documents
|
CompletableFuture<DocumentImportEntity> |
importDocuments(String values,
DocumentImportOptions options)
Imports documents
|
<T> CompletableFuture<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<DocumentCreateEntity<T>> |
insertDocument(T value,
DocumentCreateOptions options)
Creates a new document from the given document, unless there is already a document with the _key given.
|
<T> CompletableFuture<MultiDocumentEntity<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<MultiDocumentEntity<DocumentCreateEntity<T>>> |
insertDocuments(Collection<T> values,
DocumentCreateOptions options)
Creates new documents from the given documents, unless there is already a document with the _key given.
|
CompletableFuture<CollectionEntity> |
load()
Loads a collection into memory.
|
CompletableFuture<CollectionEntity> |
rename(String newName)
Renames a collection
|
<T> CompletableFuture<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<DocumentUpdateEntity<T>> |
replaceDocument(String key,
T value,
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<MultiDocumentEntity<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<MultiDocumentEntity<DocumentUpdateEntity<T>>> |
replaceDocuments(Collection<T> values,
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<CollectionEntity> |
truncate()
Removes all documents from the collection, but leaves the indexes intact
|
CompletableFuture<CollectionEntity> |
truncate(CollectionTruncateOptions options)
Removes all documents from the collection, but leaves the indexes intact
|
CompletableFuture<CollectionEntity> |
unload()
Removes a collection from memory.
|
<T> CompletableFuture<DocumentUpdateEntity<T>> |
updateDocument(String key,
T value)
Partially updates the document identified by document-key.
|
<T> CompletableFuture<DocumentUpdateEntity<T>> |
updateDocument(String key,
T value,
DocumentUpdateOptions options)
Partially updates the document identified by document-key.
|
<T,U> CompletableFuture<DocumentUpdateEntity<U>> |
updateDocument(String key,
T value,
DocumentUpdateOptions options,
Class<U> returnType)
Partially updates the document identified by document-key.
|
<T> CompletableFuture<MultiDocumentEntity<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<MultiDocumentEntity<DocumentUpdateEntity<T>>> |
updateDocuments(Collection<T> values,
DocumentUpdateOptions options)
Partially updates documents, the documents to update are specified by the _key attributes in the objects on
values.
|
<T,U> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<U>>> |
updateDocuments(Collection<T> values,
DocumentUpdateOptions options,
Class<U> returnType)
Partially updates documents, the documents to update are specified by the _key attributes in the objects on
values.
|
changePropertiesRequest, countRequest, createFulltextIndexRequest, createGeoIndexRequest, createHashIndexRequest, createPersistentIndexRequest, createSkiplistIndexRequest, createTtlIndexRequest, createZKDIndexRequest, db, deleteDocumentRequest, deleteDocumentResponseDeserializer, deleteDocumentsRequest, deleteDocumentsResponseDeserializer, deleteIndexRequest, deleteIndexResponseDeserializer, documentExistsRequest, dropRequest, getDocumentRequest, getDocumentsRequest, getDocumentsResponseDeserializer, getIndexesRequest, getIndexesResponseDeserializer, getIndexRequest, getInfoRequest, getPermissionsRequest, getPermissionsResponseDeserialzer, getPropertiesRequest, getRevisionRequest, grantAccessRequest, importDocumentsRequest, importDocumentsRequest, importDocumentsRequest, insertDocumentRequest, insertDocumentResponseDeserializer, insertDocumentsRequest, insertDocumentsResponseDeserializer, loadRequest, name, renameRequest, replaceDocumentRequest, replaceDocumentResponseDeserializer, replaceDocumentsRequest, replaceDocumentsResponseDeserializer, resetAccessRequest, responsibleShardRequest, truncateRequest, unloadRequest, updateDocumentRequest, updateDocumentResponseDeserializer, updateDocumentsRequest, updateDocumentsResponseDeserializer
createPath, executor, request, util, util
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
db, name
util, util
public <T> CompletableFuture<DocumentCreateEntity<T>> insertDocument(T value)
ArangoCollectionAsync
insertDocument
in interface ArangoCollectionAsync
value
- A representation of a single document (POJO, VPackSlice or String for Json)public <T> CompletableFuture<DocumentCreateEntity<T>> insertDocument(T value, DocumentCreateOptions options)
ArangoCollectionAsync
insertDocument
in interface ArangoCollectionAsync
value
- A representation of a single document (POJO, VPackSlice or String for Json)options
- Additional options, can be nullpublic <T> CompletableFuture<MultiDocumentEntity<DocumentCreateEntity<T>>> insertDocuments(Collection<T> values)
ArangoCollectionAsync
insertDocuments
in interface ArangoCollectionAsync
values
- A List of documents (POJO, VPackSlice or String for Json)public <T> CompletableFuture<MultiDocumentEntity<DocumentCreateEntity<T>>> insertDocuments(Collection<T> values, DocumentCreateOptions options)
ArangoCollectionAsync
insertDocuments
in interface ArangoCollectionAsync
values
- A List of documents (POJO, VPackSlice or String for Json)options
- Additional options, can be nullpublic CompletableFuture<DocumentImportEntity> importDocuments(Collection<?> values)
ArangoCollectionAsync
importDocuments
in interface ArangoCollectionAsync
values
- a list of Objects that will be stored as documentspublic CompletableFuture<DocumentImportEntity> importDocuments(Collection<?> values, DocumentImportOptions options)
ArangoCollectionAsync
importDocuments
in interface ArangoCollectionAsync
values
- a list of Objects that will be stored as documentsoptions
- Additional options, can be nullpublic CompletableFuture<DocumentImportEntity> importDocuments(String values)
ArangoCollectionAsync
importDocuments
in interface ArangoCollectionAsync
values
- JSON-encoded array of objects that will be stored as documentspublic CompletableFuture<DocumentImportEntity> importDocuments(String values, DocumentImportOptions options)
ArangoCollectionAsync
importDocuments
in interface ArangoCollectionAsync
values
- JSON-encoded array of objects that will be stored as documentsoptions
- Additional options, can be nullpublic <T> CompletableFuture<T> getDocument(String key, Class<T> type) throws ArangoDBException
ArangoCollectionAsync
getDocument
in interface ArangoCollectionAsync
key
- The key of the documenttype
- The type of the document (POJO class, VPackSlice or String for Json)ArangoDBException
public <T> CompletableFuture<T> getDocument(String key, Class<T> type, DocumentReadOptions options) throws ArangoDBException
ArangoCollectionAsync
getDocument
in interface ArangoCollectionAsync
key
- The key of the documenttype
- The type of the document (POJO class, VPackSlice or String for Json)options
- Additional options, can be nullArangoDBException
public <T> CompletableFuture<MultiDocumentEntity<T>> getDocuments(Collection<String> keys, Class<T> type)
ArangoCollectionAsync
getDocuments
in interface ArangoCollectionAsync
keys
- The keys of the documentstype
- The type of the documents (POJO class, VPackSlice or String for Json)public <T> CompletableFuture<MultiDocumentEntity<T>> getDocuments(Collection<String> keys, Class<T> type, DocumentReadOptions options)
ArangoCollectionAsync
getDocuments
in interface ArangoCollectionAsync
keys
- The keys of the documentstype
- The type of the documents (POJO class, VPackSlice or String for Json)options
- Additional options, can be nullpublic <T> CompletableFuture<DocumentUpdateEntity<T>> replaceDocument(String key, T value)
ArangoCollectionAsync
replaceDocument
in interface ArangoCollectionAsync
key
- The key of the documentvalue
- A representation of a single document (POJO, VPackSlice or String for Json)public <T> CompletableFuture<DocumentUpdateEntity<T>> replaceDocument(String key, T value, DocumentReplaceOptions options)
ArangoCollectionAsync
replaceDocument
in interface ArangoCollectionAsync
key
- The key of the documentvalue
- A representation of a single document (POJO, VPackSlice or String for Json)options
- Additional options, can be nullpublic <T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> replaceDocuments(Collection<T> values)
ArangoCollectionAsync
replaceDocuments
in interface ArangoCollectionAsync
values
- A List of documents (POJO, VPackSlice or String for Json)public <T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> replaceDocuments(Collection<T> values, DocumentReplaceOptions options)
ArangoCollectionAsync
replaceDocuments
in interface ArangoCollectionAsync
values
- A List of documents (POJO, VPackSlice or String for Json)options
- Additional options, can be nullpublic <T> CompletableFuture<DocumentUpdateEntity<T>> updateDocument(String key, T value)
ArangoCollectionAsync
updateDocument
in interface ArangoCollectionAsync
key
- The key of the documentvalue
- A representation of a single document (POJO, VPackSlice or String for Json)public <T> CompletableFuture<DocumentUpdateEntity<T>> updateDocument(String key, T value, DocumentUpdateOptions options)
ArangoCollectionAsync
updateDocument
in interface ArangoCollectionAsync
key
- The key of the documentvalue
- A representation of a single document (POJO, VPackSlice or String for Json)options
- Additional options, can be nullpublic <T,U> CompletableFuture<DocumentUpdateEntity<U>> updateDocument(String key, T value, DocumentUpdateOptions options, Class<U> returnType)
ArangoCollectionAsync
updateDocument
in interface ArangoCollectionAsync
key
- The key of the documentvalue
- A representation of a single document (POJO, VPackSlice or String for Json)options
- Additional options, can be nullreturnType
- Type of the returned newDocument and/or oldDocumentpublic <T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> updateDocuments(Collection<T> values)
ArangoCollectionAsync
updateDocuments
in interface ArangoCollectionAsync
values
- A list of documents (POJO, VPackSlice or String for Json)public <T> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<T>>> updateDocuments(Collection<T> values, DocumentUpdateOptions options)
ArangoCollectionAsync
updateDocuments
in interface ArangoCollectionAsync
values
- A list of documents (POJO, VPackSlice or String for Json)options
- Additional options, can be nullpublic <T,U> CompletableFuture<MultiDocumentEntity<DocumentUpdateEntity<U>>> updateDocuments(Collection<T> values, DocumentUpdateOptions options, Class<U> returnType)
ArangoCollectionAsync
updateDocuments
in interface ArangoCollectionAsync
values
- A list of documents (POJO, VPackSlice or String for Json)options
- Additional options, can be nullreturnType
- Type of the returned newDocument and/or oldDocumentpublic CompletableFuture<DocumentDeleteEntity<Void>> deleteDocument(String key)
ArangoCollectionAsync
deleteDocument
in interface ArangoCollectionAsync
key
- The key of the documentpublic <T> CompletableFuture<DocumentDeleteEntity<T>> deleteDocument(String key, Class<T> type, DocumentDeleteOptions options)
ArangoCollectionAsync
deleteDocument
in interface ArangoCollectionAsync
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 nullpublic CompletableFuture<MultiDocumentEntity<DocumentDeleteEntity<Void>>> deleteDocuments(Collection<?> values)
ArangoCollectionAsync
deleteDocuments
in interface ArangoCollectionAsync
values
- The keys of the documents or the documents themselvespublic <T> CompletableFuture<MultiDocumentEntity<DocumentDeleteEntity<T>>> deleteDocuments(Collection<?> values, Class<T> type, DocumentDeleteOptions options)
ArangoCollectionAsync
deleteDocuments
in interface ArangoCollectionAsync
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 nullpublic CompletableFuture<Boolean> documentExists(String key)
ArangoCollectionAsync
documentExists
in interface ArangoCollectionAsync
key
- The key of the documentpublic CompletableFuture<Boolean> documentExists(String key, DocumentExistsOptions options)
ArangoCollectionAsync
documentExists
in interface ArangoCollectionAsync
key
- The key of the documentoptions
- Additional options, can be nullpublic CompletableFuture<IndexEntity> getIndex(String id)
ArangoCollectionAsync
getIndex
in interface ArangoCollectionAsync
id
- The index-handlepublic CompletableFuture<String> deleteIndex(String id)
ArangoCollectionAsync
deleteIndex
in interface ArangoCollectionAsync
id
- The index-handle@Deprecated public CompletableFuture<IndexEntity> ensureHashIndex(Iterable<String> fields, HashIndexOptions options)
ArangoCollectionAsync
ensureHashIndex
in interface ArangoCollectionAsync
fields
- A list of attribute pathsoptions
- Additional options, can be null@Deprecated public CompletableFuture<IndexEntity> ensureSkiplistIndex(Iterable<String> fields, SkiplistIndexOptions options)
ArangoCollectionAsync
ensureSkiplistIndex
in interface ArangoCollectionAsync
fields
- A list of attribute pathsoptions
- Additional options, can be nullpublic CompletableFuture<IndexEntity> ensurePersistentIndex(Iterable<String> fields, PersistentIndexOptions options)
ArangoCollectionAsync
ensurePersistentIndex
in interface ArangoCollectionAsync
fields
- A list of attribute pathsoptions
- Additional options, can be nullpublic CompletableFuture<IndexEntity> ensureGeoIndex(Iterable<String> fields, GeoIndexOptions options)
ArangoCollectionAsync
ensureGeoIndex
in interface ArangoCollectionAsync
fields
- A list of attribute pathsoptions
- Additional options, can be nullpublic CompletableFuture<IndexEntity> ensureFulltextIndex(Iterable<String> fields, FulltextIndexOptions options)
ArangoCollectionAsync
ensureFulltextIndex
in interface ArangoCollectionAsync
fields
- A list of attribute pathsoptions
- Additional options, can be nullpublic CompletableFuture<IndexEntity> ensureTtlIndex(Iterable<String> fields, TtlIndexOptions options)
ArangoCollectionAsync
ensureTtlIndex
in interface ArangoCollectionAsync
fields
- A list of attribute pathsoptions
- Additional options, can be nullpublic CompletableFuture<IndexEntity> ensureZKDIndex(Iterable<String> fields, ZKDIndexOptions options)
ArangoCollectionAsync
ensureZKDIndex
in interface ArangoCollectionAsync
fields
- A list of attribute pathsoptions
- Additional options, can be nullpublic CompletableFuture<Collection<IndexEntity>> getIndexes()
ArangoCollectionAsync
getIndexes
in interface ArangoCollectionAsync
public CompletableFuture<Boolean> exists()
ArangoCollectionAsync
exists
in interface ArangoCollectionAsync
public CompletableFuture<CollectionEntity> truncate()
ArangoCollectionAsync
truncate
in interface ArangoCollectionAsync
public CompletableFuture<CollectionEntity> truncate(CollectionTruncateOptions options)
ArangoCollectionAsync
truncate
in interface ArangoCollectionAsync
public CompletableFuture<CollectionPropertiesEntity> count()
ArangoCollectionAsync
count
in interface ArangoCollectionAsync
public CompletableFuture<CollectionPropertiesEntity> count(CollectionCountOptions options)
ArangoCollectionAsync
count
in interface ArangoCollectionAsync
public CompletableFuture<CollectionEntity> create()
ArangoCollectionAsync
create
in interface ArangoCollectionAsync
public CompletableFuture<CollectionEntity> create(CollectionCreateOptions options)
ArangoCollectionAsync
create
in interface ArangoCollectionAsync
options
- Additional options, can be nullpublic CompletableFuture<Void> drop()
ArangoCollectionAsync
drop
in interface ArangoCollectionAsync
public CompletableFuture<Void> drop(boolean isSystem)
ArangoCollectionAsync
drop
in interface ArangoCollectionAsync
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.public CompletableFuture<CollectionEntity> load()
ArangoCollectionAsync
load
in interface ArangoCollectionAsync
public CompletableFuture<CollectionEntity> unload()
ArangoCollectionAsync
unload
in interface ArangoCollectionAsync
public CompletableFuture<CollectionEntity> getInfo()
ArangoCollectionAsync
getInfo
in interface ArangoCollectionAsync
public CompletableFuture<CollectionPropertiesEntity> getProperties()
ArangoCollectionAsync
getProperties
in interface ArangoCollectionAsync
public CompletableFuture<CollectionPropertiesEntity> changeProperties(CollectionPropertiesOptions options)
ArangoCollectionAsync
changeProperties
in interface ArangoCollectionAsync
options
- Additional options, can be nullpublic CompletableFuture<CollectionEntity> rename(String newName)
ArangoCollectionAsync
rename
in interface ArangoCollectionAsync
newName
- The new namepublic CompletableFuture<ShardEntity> getResponsibleShard(Object value)
ArangoCollectionAsync
getResponsibleShard
in interface ArangoCollectionAsync
value
- A projection of the document containing at least the shard key (_key or a custom attribute) for
which the responsible shard should be determinedpublic CompletableFuture<CollectionRevisionEntity> getRevision()
ArangoCollectionAsync
getRevision
in interface ArangoCollectionAsync
public CompletableFuture<Void> grantAccess(String user, Permissions permissions)
ArangoCollectionAsync
grantAccess
in interface ArangoCollectionAsync
user
- The name of the userpermissions
- The permissions the user grantpublic CompletableFuture<Void> revokeAccess(String user)
ArangoCollectionAsync
revokeAccess
in interface ArangoCollectionAsync
user
- The name of the userpublic CompletableFuture<Void> resetAccess(String user)
ArangoCollectionAsync
resetAccess
in interface ArangoCollectionAsync
user
- The name of the userpublic CompletableFuture<Permissions> getPermissions(String user)
ArangoCollectionAsync
getPermissions
in interface ArangoCollectionAsync
user
- The name of the userCopyright © 2016–2022 ArangoDB GmbH. All rights reserved.