Package com.arangodb.internal
Class ArangoCollectionImpl
java.lang.Object
com.arangodb.internal.ArangoExecuteable
com.arangodb.internal.InternalArangoCollection
com.arangodb.internal.ArangoCollectionImpl
- All Implemented Interfaces:
ArangoCollection
,ArangoSerdeAccessor
- Author:
- Mark Vollmary, Michele Rastelli
-
Field Summary
Fields inherited from class com.arangodb.internal.InternalArangoCollection
dbName, name, PATH_API_COLLECTION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionChanges the properties of the collectioncount()
Counts the documents in a collectioncount
(CollectionCountOptions options) Counts the documents in a collectioncreate()
Creates a collection for this collection's name, then returns collection information from the server.create
(CollectionCreateOptions options) Creates a collection with the givenoptions
for this collection's name, then returns collection information from the server.db()
The the handler of the database the collection is withindeleteDocument
(String key) Deletes the document with the givenkey
from the collection.deleteDocument
(String key, DocumentDeleteOptions options) Deletes the document with the givenkey
from the collection.<T> DocumentDeleteEntity<T>
deleteDocument
(String key, DocumentDeleteOptions options, Class<T> type) Deletes the document with the givenkey
from the collection.deleteDocuments
(RawData values) Deletes multiple documents from the collection.deleteDocuments
(RawData values, DocumentDeleteOptions options) Deletes multiple documents from the collection.deleteDocuments
(Iterable<?> values) Deletes multiple documents from the collection.deleteDocuments
(Iterable<?> values, DocumentDeleteOptions options) Deletes multiple documents from the collection.deleteDocuments
(Iterable<?> values, DocumentDeleteOptions options, Class<T> type) Deletes multiple documents from the collection.deleteIndex
(String id) Deletes the index with the givenid
from the collection.documentExists
(String key) Checks if the document exists by reading a single document headdocumentExists
(String key, DocumentExistsOptions options) Checks if the document exists by reading a single document headvoid
drop()
Deletes the collection from the database.void
drop
(boolean isSystem) Deletes the collection from the database.ensureFulltextIndex
(Iterable<String> fields, FulltextIndexOptions options) Deprecated.ensureGeoIndex
(Iterable<String> fields, GeoIndexOptions options) Creates a geo-spatial index for the collection, if it does not already exist.ensureInvertedIndex
(InvertedIndexOptions options) Creates an inverted index for the collection, if it does not already exist.ensureMDIndex
(Iterable<String> fields, MDIndexOptions options) Creates a multi-dimensional index for the collection, if it does not already exist.ensureMDPrefixedIndex
(Iterable<String> fields, MDPrefixedIndexOptions options) Creates a multi-dimensional prefixed index for the collection, if it does not already exist.ensurePersistentIndex
(Iterable<String> fields, PersistentIndexOptions options) Creates a persistent index for the collection, if it does not already exist.ensureTtlIndex
(Iterable<String> fields, TtlIndexOptions options) Creates a ttl index for the collection, if it does not already exist.ensureZKDIndex
(Iterable<String> fields, ZKDIndexOptions options) Creates a ZKD multi-dimensional index for the collection, if it does not already exist.boolean
exists()
Checks whether the collection exists<T> T
getDocument
(String key, Class<T> type) Retrieves the document with the givenkey
from the collection.<T> T
getDocument
(String key, Class<T> type, DocumentReadOptions options) Retrieves the document with the givenkey
from the collection.<T> MultiDocumentEntity<T>
getDocuments
(Iterable<String> keys, Class<T> type) Retrieves multiple documents with the given_key
from the collection.<T> MultiDocumentEntity<T>
getDocuments
(Iterable<String> keys, Class<T> type, DocumentReadOptions options) Retrieves multiple documents with the given_key
from the collection.Fetches information about the index with the givenid
and returns it.Fetches a list of all indexes on this collection.getInfo()
Returns information about the collectionFetches information about the inverted index with the givenid
and returns it.Fetches a list of all inverted indexes on this collection.getPermissions
(String user) Get the collection access levelReads the properties of the specified collectiongetResponsibleShard
(Object value) Returns the responsible shard for the document.Retrieve the collections revisionvoid
grantAccess
(String user, Permissions permissions) Grants or revoke access to the collection for user user.importDocuments
(RawData values) Bulk imports the given values into the collection.importDocuments
(RawData values, DocumentImportOptions options) Bulk imports the given values into the collection.importDocuments
(Iterable<?> values) Bulk imports the given values into the collection.importDocuments
(Iterable<?> values, DocumentImportOptions options) Bulk imports the given values into the collection.insertDocument
(Object value) Creates a new document from the given document, unless there is already a document with the _key given.<T> 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> DocumentCreateEntity<T>
insertDocument
(T value, DocumentCreateOptions options, Class<T> type) Creates a new document from the given document, unless there is already a document with the _key given.insertDocuments
(RawData values) Creates new documents from the given documents, unless there is already a document with the _key given.insertDocuments
(RawData values, DocumentCreateOptions options) Creates new documents from the given documents, unless there is already a document with the _key given.insertDocuments
(Iterable<?> values) Creates new documents from the given documents, unless there is already a document with the _key given.insertDocuments
(Iterable<?> values, DocumentCreateOptions options) Creates new documents from the given documents, unless there is already a document with the _key given.insertDocuments
(Iterable<? extends T> values, DocumentCreateOptions options, Class<T> type) Creates new documents from the given documents, unless there is already a document with the _key given.Renames the collectionreplaceDocument
(String key, Object value) Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violated<T> DocumentUpdateEntity<T>
replaceDocument
(String key, T value, DocumentReplaceOptions options) Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violated<T> DocumentUpdateEntity<T>
replaceDocument
(String key, T value, DocumentReplaceOptions options, Class<T> type) Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violatedreplaceDocuments
(RawData 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.replaceDocuments
(RawData 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.replaceDocuments
(Iterable<?> 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.replaceDocuments
(Iterable<?> 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.replaceDocuments
(Iterable<? extends T> values, DocumentReplaceOptions options, Class<T> type) 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.void
resetAccess
(String user) Clear the collection access level, revert back to the default access level.void
revokeAccess
(String user) Revokes access to the collection for user user.truncate()
Removes all documents from the collection, but leaves the indexes intacttruncate
(CollectionTruncateOptions options) Removes all documents from the collection, but leaves the indexes intactupdateDocument
(String key, Object value) Partially updates the document identified by document-key.<T> DocumentUpdateEntity<T>
updateDocument
(String key, Object value, DocumentUpdateOptions options, Class<T> returnType) Partially updates the document identified by document-key.<T> DocumentUpdateEntity<T>
updateDocument
(String key, T value, DocumentUpdateOptions options) Partially updates the document identified by document-key.updateDocuments
(RawData values) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values.updateDocuments
(RawData values, DocumentUpdateOptions options) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values.updateDocuments
(Iterable<?> values) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values.updateDocuments
(Iterable<?> values, DocumentUpdateOptions options) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values.updateDocuments
(Iterable<?> values, DocumentUpdateOptions options, Class<T> returnType) Partially updates documents, the documents to update are specified by the _key attributes in the objects on values.Methods inherited from class com.arangodb.internal.InternalArangoCollection
changePropertiesRequest, countRequest, createFulltextIndexRequest, createGeoIndexRequest, createInvertedIndexRequest, createMDIndexRequest, createPersistentIndexRequest, createTtlIndexRequest, createZKDIndexRequest, deleteDocumentRequest, deleteDocumentsRequest, deleteDocumentsRequest, deleteDocumentsResponseDeserializer, deleteIndexRequest, deleteIndexResponseDeserializer, documentExistsRequest, dropRequest, getDocumentRequest, getDocumentResponseDeserializer, getDocumentsRequest, getDocumentsResponseDeserializer, getIndexesRequest, getIndexesResponseDeserializer, getIndexRequest, getInfoRequest, getInvertedIndexesResponseDeserializer, getPermissionsRequest, getPermissionsResponseDeserialzer, getPropertiesRequest, getRevisionRequest, grantAccessRequest, importDocumentsRequest, importDocumentsRequest, importDocumentsRequest, insertDocumentRequest, insertDocumentsRequest, insertDocumentsRequest, insertDocumentsResponseDeserializer, name, renameRequest, replaceDocumentRequest, replaceDocumentsRequest, replaceDocumentsRequest, replaceDocumentsResponseDeserializer, resetAccessRequest, responsibleShardRequest, truncateRequest, updateDocumentRequest, updateDocumentsRequest, updateDocumentsRequest, updateDocumentsResponseDeserializer
Methods inherited from class com.arangodb.internal.ArangoExecuteable
createPath, executorAsync, executorSync, getSerde, request
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.arangodb.ArangoCollection
name
Methods inherited from interface com.arangodb.ArangoSerdeAccessor
getSerde
-
Constructor Details
-
ArangoCollectionImpl
-
-
Method Details
-
db
Description copied from interface:ArangoCollection
The the handler of the database the collection is within- Specified by:
db
in interfaceArangoCollection
- Returns:
- database handler
-
insertDocument
Description copied from interface:ArangoCollection
Creates a new document from the given document, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Specified by:
insertDocument
in interfaceArangoCollection
- Parameters:
value
- A representation of a single document (POJO orRawData
- Returns:
- information about the document
- See Also:
-
insertDocument
Description copied from interface:ArangoCollection
Creates a new document from the given document, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Specified by:
insertDocument
in interfaceArangoCollection
- Parameters:
value
- A representation of a single document (POJO orRawData
)options
- Additional options- Returns:
- information about the document
- See Also:
-
insertDocument
public <T> DocumentCreateEntity<T> insertDocument(T value, DocumentCreateOptions options, Class<T> type) Description copied from interface:ArangoCollection
Creates a new document from the given document, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Specified by:
insertDocument
in interfaceArangoCollection
- Parameters:
value
- A representation of a single document (POJO orRawData
)options
- Additional optionstype
- Deserialization target type for the returned documents.- Returns:
- information about the document
- See Also:
-
insertDocuments
Description copied from interface:ArangoCollection
Creates new documents from the given documents, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Specified by:
insertDocuments
in interfaceArangoCollection
- Parameters:
values
- Raw data representing a collection of documents- Returns:
- information about the documents
- See Also:
-
insertDocuments
public MultiDocumentEntity<DocumentCreateEntity<RawData>> insertDocuments(RawData values, DocumentCreateOptions options) Description copied from interface:ArangoCollection
Creates new documents from the given documents, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Specified by:
insertDocuments
in interfaceArangoCollection
- Parameters:
values
- Raw data representing a collection of documentsoptions
- Additional options- Returns:
- information about the documents
- See Also:
-
insertDocuments
Description copied from interface:ArangoCollection
Creates new documents from the given documents, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Specified by:
insertDocuments
in interfaceArangoCollection
- Parameters:
values
- A List of documents- Returns:
- information about the documents
- See Also:
-
insertDocuments
public MultiDocumentEntity<DocumentCreateEntity<Void>> insertDocuments(Iterable<?> values, DocumentCreateOptions options) Description copied from interface:ArangoCollection
Creates new documents from the given documents, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Specified by:
insertDocuments
in interfaceArangoCollection
- Parameters:
values
- A List of documents (POJO orRawData
)options
- Additional options- Returns:
- information about the documents
- See Also:
-
insertDocuments
public <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(Iterable<? extends T> values, DocumentCreateOptions options, Class<T> type) Description copied from interface:ArangoCollection
Creates new documents from the given documents, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Specified by:
insertDocuments
in interfaceArangoCollection
- Parameters:
values
- A List of documents (POJO orRawData
)options
- Additional optionstype
- Deserialization target type for the returned documents.- Returns:
- information about the documents
- See Also:
-
importDocuments
Description copied from interface:ArangoCollection
Bulk imports the given values into the collection.- Specified by:
importDocuments
in interfaceArangoCollection
- Parameters:
values
- A List of documents (POJO orRawData
)- Returns:
- information about the import
- See Also:
-
importDocuments
Description copied from interface:ArangoCollection
Bulk imports the given values into the collection.- Specified by:
importDocuments
in interfaceArangoCollection
- Parameters:
values
- A List of documents (POJO orRawData
)options
- Additional options, can be null- Returns:
- information about the import
- See Also:
-
importDocuments
Description copied from interface:ArangoCollection
Bulk imports the given values into the collection.- Specified by:
importDocuments
in interfaceArangoCollection
- Parameters:
values
- Raw data representing a collection of documents- Returns:
- information about the import
- See Also:
-
importDocuments
Description copied from interface:ArangoCollection
Bulk imports the given values into the collection.- Specified by:
importDocuments
in interfaceArangoCollection
- Parameters:
values
- Raw data representing a collection of documentsoptions
- Additional options, can be null- Returns:
- information about the import
- See Also:
-
getDocument
Description copied from interface:ArangoCollection
Retrieves the document with the givenkey
from the collection.- Specified by:
getDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the documenttype
- The type of the document (POJO orRawData
)- Returns:
- the document identified by the key
- See Also:
-
getDocument
Description copied from interface:ArangoCollection
Retrieves the document with the givenkey
from the collection.- Specified by:
getDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the documenttype
- The type of the document (POJO orRawData
)options
- Additional options, can be null- Returns:
- the document identified by the key
- See Also:
-
getDocuments
Description copied from interface:ArangoCollection
Retrieves multiple documents with the given_key
from the collection.- Specified by:
getDocuments
in interfaceArangoCollection
- Parameters:
keys
- The keys of the documentstype
- The type of the documents (POJO orRawData
)- Returns:
- the documents and possible errors
- See Also:
-
getDocuments
public <T> MultiDocumentEntity<T> getDocuments(Iterable<String> keys, Class<T> type, DocumentReadOptions options) Description copied from interface:ArangoCollection
Retrieves multiple documents with the given_key
from the collection.- Specified by:
getDocuments
in interfaceArangoCollection
- Parameters:
keys
- The keys of the documentstype
- The type of the documents (POJO orRawData
)options
- Additional options, can be null- Returns:
- the documents and possible errors
- See Also:
-
replaceDocument
Description copied from interface:ArangoCollection
Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violated- Specified by:
replaceDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)- Returns:
- information about the document
- See Also:
-
replaceDocument
public <T> DocumentUpdateEntity<T> replaceDocument(String key, T value, DocumentReplaceOptions options) Description copied from interface:ArangoCollection
Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violated- Specified by:
replaceDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)options
- Additional options- Returns:
- information about the document
- See Also:
-
replaceDocument
public <T> DocumentUpdateEntity<T> replaceDocument(String key, T value, DocumentReplaceOptions options, Class<T> type) Description copied from interface:ArangoCollection
Replaces the document withkey
with the one in the body, provided there is such a document and no precondition is violated- Specified by:
replaceDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)options
- Additional optionstype
- Deserialization target type for the returned documents.- Returns:
- information about the document
- See Also:
-
replaceDocuments
Description copied from interface:ArangoCollection
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.- Specified by:
replaceDocuments
in interfaceArangoCollection
- Parameters:
values
- Raw data representing a collection of documents- Returns:
- information about the documents
- See Also:
-
replaceDocuments
public MultiDocumentEntity<DocumentUpdateEntity<RawData>> replaceDocuments(RawData values, DocumentReplaceOptions options) Description copied from interface:ArangoCollection
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.- Specified by:
replaceDocuments
in interfaceArangoCollection
- Parameters:
values
- Raw data representing a collection of documentsoptions
- Additional options- Returns:
- information about the documents
- See Also:
-
replaceDocuments
Description copied from interface:ArangoCollection
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.- Specified by:
replaceDocuments
in interfaceArangoCollection
- Parameters:
values
- A List of documents (POJO orRawData
)- Returns:
- information about the documents
- See Also:
-
replaceDocuments
public MultiDocumentEntity<DocumentUpdateEntity<Void>> replaceDocuments(Iterable<?> values, DocumentReplaceOptions options) Description copied from interface:ArangoCollection
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.- Specified by:
replaceDocuments
in interfaceArangoCollection
- Parameters:
values
- A List of documents (POJO orRawData
)options
- Additional options- Returns:
- information about the documents
- See Also:
-
replaceDocuments
public <T> MultiDocumentEntity<DocumentUpdateEntity<T>> replaceDocuments(Iterable<? extends T> values, DocumentReplaceOptions options, Class<T> type) Description copied from interface:ArangoCollection
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.- Specified by:
replaceDocuments
in interfaceArangoCollection
- Parameters:
values
- A List of documents (POJO orRawData
)options
- Additional optionstype
- Deserialization target type for the returned documents.- Returns:
- information about the documents
- See Also:
-
updateDocument
Description copied from interface:ArangoCollection
Partially updates the document identified by document-key. The value must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there.- Specified by:
updateDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)- Returns:
- information about the document
- See Also:
-
updateDocument
public <T> DocumentUpdateEntity<T> updateDocument(String key, T value, DocumentUpdateOptions options) Description copied from interface:ArangoCollection
Partially updates the document identified by document-key. The value must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there.- Specified by:
updateDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)options
- Additional options- Returns:
- information about the document
- See Also:
-
updateDocument
public <T> DocumentUpdateEntity<T> updateDocument(String key, Object value, DocumentUpdateOptions options, Class<T> returnType) Description copied from interface:ArangoCollection
Partially updates the document identified by document-key. The value must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there.- Specified by:
updateDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the documentvalue
- A representation of a single document (POJO orRawData
)options
- Additional optionsreturnType
- Type of the returned newDocument and/or oldDocument- Returns:
- information about the document
- See Also:
-
updateDocuments
Description copied from interface:ArangoCollection
Partially updates documents, the documents to update are specified by the _key attributes in the objects on values. Vales must contain a list of document updates with the attributes to patch (the patch documents). All attributes from the patch documents will be added to the existing documents if they do not yet exist, and overwritten in the existing documents if they do exist there.- Specified by:
updateDocuments
in interfaceArangoCollection
- Parameters:
values
- Raw data representing a collection of documents- Returns:
- information about the documents
- See Also:
-
updateDocuments
public MultiDocumentEntity<DocumentUpdateEntity<RawData>> updateDocuments(RawData values, DocumentUpdateOptions options) Description copied from interface:ArangoCollection
Partially updates documents, the documents to update are specified by the _key attributes in the objects on values. Vales must contain a list of document updates with the attributes to patch (the patch documents). All attributes from the patch documents will be added to the existing documents if they do not yet exist, and overwritten in the existing documents if they do exist there.- Specified by:
updateDocuments
in interfaceArangoCollection
- Parameters:
values
- Raw data representing a collection of documentsoptions
- Additional options- Returns:
- information about the documents
- See Also:
-
updateDocuments
Description copied from interface:ArangoCollection
Partially updates documents, the documents to update are specified by the _key attributes in the objects on values. Vales must contain a list of document updates with the attributes to patch (the patch documents). All attributes from the patch documents will be added to the existing documents if they do not yet exist, and overwritten in the existing documents if they do exist there.- Specified by:
updateDocuments
in interfaceArangoCollection
- Parameters:
values
- A list of documents (POJO orRawData
)- Returns:
- information about the documents
- See Also:
-
updateDocuments
public MultiDocumentEntity<DocumentUpdateEntity<Void>> updateDocuments(Iterable<?> values, DocumentUpdateOptions options) Description copied from interface:ArangoCollection
Partially updates documents, the documents to update are specified by the _key attributes in the objects on values. Vales must contain a list of document updates with the attributes to patch (the patch documents). All attributes from the patch documents will be added to the existing documents if they do not yet exist, and overwritten in the existing documents if they do exist there.- Specified by:
updateDocuments
in interfaceArangoCollection
- Parameters:
values
- A list of documents (POJO orRawData
)options
- Additional options- Returns:
- information about the documents
- See Also:
-
updateDocuments
public <T> MultiDocumentEntity<DocumentUpdateEntity<T>> updateDocuments(Iterable<?> values, DocumentUpdateOptions options, Class<T> returnType) Description copied from interface:ArangoCollection
Partially updates documents, the documents to update are specified by the _key attributes in the objects on values. Vales must contain a list of document updates with the attributes to patch (the patch documents). All attributes from the patch documents will be added to the existing documents if they do not yet exist, and overwritten in the existing documents if they do exist there.- Specified by:
updateDocuments
in interfaceArangoCollection
- Parameters:
values
- A list of documents (POJO orRawData
)options
- Additional optionsreturnType
- Type of the returned newDocument and/or oldDocument- Returns:
- information about the documents
- See Also:
-
deleteDocument
Description copied from interface:ArangoCollection
Deletes the document with the givenkey
from the collection.- Specified by:
deleteDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the document- Returns:
- information about the document
- See Also:
-
deleteDocument
Description copied from interface:ArangoCollection
Deletes the document with the givenkey
from the collection.- Specified by:
deleteDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the documentoptions
- Additional options- Returns:
- information about the document
- See Also:
-
deleteDocument
public <T> DocumentDeleteEntity<T> deleteDocument(String key, DocumentDeleteOptions options, Class<T> type) Description copied from interface:ArangoCollection
Deletes the document with the givenkey
from the collection.- Specified by:
deleteDocument
in interfaceArangoCollection
- Parameters:
key
- The key of the documentoptions
- Additional optionstype
- Deserialization target type for the returned documents.- Returns:
- information about the document
- See Also:
-
deleteDocuments
Description copied from interface:ArangoCollection
Deletes multiple documents from the collection.- Specified by:
deleteDocuments
in interfaceArangoCollection
- Parameters:
values
- Raw data representing the keys of the documents or the documents themselves- Returns:
- information about the documents
- See Also:
-
deleteDocuments
public MultiDocumentEntity<DocumentDeleteEntity<RawData>> deleteDocuments(RawData values, DocumentDeleteOptions options) Description copied from interface:ArangoCollection
Deletes multiple documents from the collection.- Specified by:
deleteDocuments
in interfaceArangoCollection
- Parameters:
values
- Raw data representing the keys of the documents or the documents themselvesoptions
- Additional options- Returns:
- information about the documents
- See Also:
-
deleteDocuments
Description copied from interface:ArangoCollection
Deletes multiple documents from the collection.- Specified by:
deleteDocuments
in interfaceArangoCollection
- Parameters:
values
- The keys of the documents or the documents themselves- Returns:
- information about the documents
- See Also:
-
deleteDocuments
public MultiDocumentEntity<DocumentDeleteEntity<Void>> deleteDocuments(Iterable<?> values, DocumentDeleteOptions options) Description copied from interface:ArangoCollection
Deletes multiple documents from the collection.- Specified by:
deleteDocuments
in interfaceArangoCollection
- Parameters:
values
- The keys of the documents or the documents themselvesoptions
- Additional options- Returns:
- information about the documents
- See Also:
-
deleteDocuments
public <T> MultiDocumentEntity<DocumentDeleteEntity<T>> deleteDocuments(Iterable<?> values, DocumentDeleteOptions options, Class<T> type) Description copied from interface:ArangoCollection
Deletes multiple documents from the collection.- Specified by:
deleteDocuments
in interfaceArangoCollection
- Parameters:
values
- The keys of the documents or the documents themselvesoptions
- Additional optionstype
- Deserialization target type for the returned documents.- Returns:
- information about the documents
- See Also:
-
documentExists
Description copied from interface:ArangoCollection
Checks if the document exists by reading a single document head- Specified by:
documentExists
in interfaceArangoCollection
- Parameters:
key
- The key of the document- Returns:
- true if the document was found, otherwise false
- See Also:
-
documentExists
Description copied from interface:ArangoCollection
Checks if the document exists by reading a single document head- Specified by:
documentExists
in interfaceArangoCollection
- Parameters:
key
- The key of the documentoptions
- Additional options, can be null- Returns:
- true if the document was found, otherwise false
- See Also:
-
getIndex
Description copied from interface:ArangoCollection
Fetches information about the index with the givenid
and returns it.
Note: inverted indexes are not returned by this method. UseArangoCollection.getInvertedIndex(String)
instead.- Specified by:
getIndex
in interfaceArangoCollection
- Parameters:
id
- The index-handle- Returns:
- information about the index
- See Also:
-
getInvertedIndex
Description copied from interface:ArangoCollection
Fetches information about the inverted index with the givenid
and returns it.- Specified by:
getInvertedIndex
in interfaceArangoCollection
- Parameters:
id
- The index-handle- Returns:
- information about the index
- See Also:
-
deleteIndex
Description copied from interface:ArangoCollection
Deletes the index with the givenid
from the collection.- Specified by:
deleteIndex
in interfaceArangoCollection
- Parameters:
id
- The index-handle- Returns:
- the id of the index
- See Also:
-
ensurePersistentIndex
Description copied from interface:ArangoCollection
Creates a persistent index for the collection, if it does not already exist.- Specified by:
ensurePersistentIndex
in interfaceArangoCollection
- Parameters:
fields
- A list of attribute pathsoptions
- Additional options, can be null- Returns:
- information about the index
- See Also:
-
ensureInvertedIndex
Description copied from interface:ArangoCollection
Creates an inverted index for the collection, if it does not already exist.- Specified by:
ensureInvertedIndex
in interfaceArangoCollection
- Parameters:
options
- index creation options- Returns:
- information about the index
- See Also:
-
ensureGeoIndex
Description copied from interface:ArangoCollection
Creates a geo-spatial index for the collection, if it does not already exist.- Specified by:
ensureGeoIndex
in interfaceArangoCollection
- Parameters:
fields
- A list of attribute pathsoptions
- Additional options, can be null- Returns:
- information about the index
- See Also:
-
ensureFulltextIndex
@Deprecated public IndexEntity ensureFulltextIndex(Iterable<String> fields, FulltextIndexOptions options) Deprecated.Description copied from interface:ArangoCollection
Creates a fulltext index for the collection, if it does not already exist.- Specified by:
ensureFulltextIndex
in interfaceArangoCollection
- Parameters:
fields
- A list of attribute pathsoptions
- Additional options, can be null- Returns:
- information about the index
- See Also:
-
ensureTtlIndex
Description copied from interface:ArangoCollection
Creates a ttl index for the collection, if it does not already exist.- Specified by:
ensureTtlIndex
in interfaceArangoCollection
- Parameters:
fields
- A list of attribute pathsoptions
- Additional options, can be null- Returns:
- information about the index
- See Also:
-
ensureZKDIndex
Description copied from interface:ArangoCollection
Creates a ZKD multi-dimensional index for the collection, if it does not already exist. Note that zkd indexes are an experimental feature in ArangoDB 3.9.- Specified by:
ensureZKDIndex
in interfaceArangoCollection
- Parameters:
fields
- A list of attribute pathsoptions
- Additional options, can be null- Returns:
- information about the index
- See Also:
-
ensureMDIndex
Description copied from interface:ArangoCollection
Creates a multi-dimensional index for the collection, if it does not already exist.- Specified by:
ensureMDIndex
in interfaceArangoCollection
- Parameters:
fields
- A list of attribute names used for each dimensionoptions
- Additional options, can be null.- Returns:
- information about the index
- See Also:
-
ensureMDPrefixedIndex
Description copied from interface:ArangoCollection
Creates a multi-dimensional prefixed index for the collection, if it does not already exist.- Specified by:
ensureMDPrefixedIndex
in interfaceArangoCollection
- Parameters:
fields
- A list of attribute names used for each dimensionoptions
- Additional options, cannot be null.- Returns:
- information about the index
- See Also:
-
getIndexes
Description copied from interface:ArangoCollection
Fetches a list of all indexes on this collection.
Note: inverted indexes are not returned by this method. UseArangoCollection.getInvertedIndexes()
instead.- Specified by:
getIndexes
in interfaceArangoCollection
- Returns:
- information about the indexes
- See Also:
-
getInvertedIndexes
Description copied from interface:ArangoCollection
Fetches a list of all inverted indexes on this collection.- Specified by:
getInvertedIndexes
in interfaceArangoCollection
- Returns:
- information about the indexes
- See Also:
-
exists
public boolean exists()Description copied from interface:ArangoCollection
Checks whether the collection exists- Specified by:
exists
in interfaceArangoCollection
- Returns:
- true if the collection exists, otherwise false
- See Also:
-
truncate
Description copied from interface:ArangoCollection
Removes all documents from the collection, but leaves the indexes intact- Specified by:
truncate
in interfaceArangoCollection
- Returns:
- information about the collection
- See Also:
-
truncate
Description copied from interface:ArangoCollection
Removes all documents from the collection, but leaves the indexes intact- Specified by:
truncate
in interfaceArangoCollection
- Returns:
- information about the collection
- See Also:
-
count
Description copied from interface:ArangoCollection
Counts the documents in a collection- Specified by:
count
in interfaceArangoCollection
- Returns:
- information about the collection, including the number of documents
- See Also:
-
count
Description copied from interface:ArangoCollection
Counts the documents in a collection- Specified by:
count
in interfaceArangoCollection
- Returns:
- information about the collection, including the number of documents
- See Also:
-
create
Description copied from interface:ArangoCollection
Creates a collection for this collection's name, then returns collection information from the server.- Specified by:
create
in interfaceArangoCollection
- Returns:
- information about the collection
- See Also:
-
create
Description copied from interface:ArangoCollection
Creates a collection with the givenoptions
for this collection's name, then returns collection information from the server.- Specified by:
create
in interfaceArangoCollection
- Parameters:
options
- Additional options, can be null- Returns:
- information about the collection
- See Also:
-
drop
public void drop()Description copied from interface:ArangoCollection
Deletes the collection from the database.- Specified by:
drop
in interfaceArangoCollection
- See Also:
-
drop
public void drop(boolean isSystem) Description copied from interface:ArangoCollection
Deletes the collection from the database.- Specified by:
drop
in interfaceArangoCollection
- Parameters:
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.- See Also:
-
getInfo
Description copied from interface:ArangoCollection
Returns information about the collection- Specified by:
getInfo
in interfaceArangoCollection
- Returns:
- information about the collection
- See Also:
-
getProperties
Description copied from interface:ArangoCollection
Reads the properties of the specified collection- Specified by:
getProperties
in interfaceArangoCollection
- Returns:
- properties of the collection
- See Also:
-
changeProperties
Description copied from interface:ArangoCollection
Changes the properties of the collection- Specified by:
changeProperties
in interfaceArangoCollection
- Parameters:
options
- Additional options, can be null- Returns:
- properties of the collection
- See Also:
-
rename
Description copied from interface:ArangoCollection
Renames the collection- Specified by:
rename
in interfaceArangoCollection
- Parameters:
newName
- The new name- Returns:
- information about the collection
- See Also:
-
getResponsibleShard
Description copied from interface:ArangoCollection
Returns the responsible shard for the document. Please note that this API is only meaningful and available on a cluster coordinator.- Specified by:
getResponsibleShard
in interfaceArangoCollection
- Parameters:
value
- A projection of the document containing at least the shard key (_key or a custom attribute) for which the responsible shard should be determined- Returns:
- information about the responsible shard
- See Also:
-
getRevision
Description copied from interface:ArangoCollection
Retrieve the collections revision- Specified by:
getRevision
in interfaceArangoCollection
- Returns:
- information about the collection, including the collections revision
- See Also:
-
grantAccess
Description copied from interface:ArangoCollection
Grants or revoke access to the collection for user user. You need permission to the _system database in order to execute this call.- Specified by:
grantAccess
in interfaceArangoCollection
- Parameters:
user
- The name of the userpermissions
- The permissions the user grant- See Also:
-
revokeAccess
Description copied from interface:ArangoCollection
Revokes access to the collection for user user. You need permission to the _system database in order to execute this call.- Specified by:
revokeAccess
in interfaceArangoCollection
- Parameters:
user
- The name of the user- See Also:
-
resetAccess
Description copied from interface:ArangoCollection
Clear the collection access level, revert back to the default access level.- Specified by:
resetAccess
in interfaceArangoCollection
- Parameters:
user
- The name of the user- See Also:
-
getPermissions
Description copied from interface:ArangoCollection
Get the collection access level- Specified by:
getPermissions
in interfaceArangoCollection
- Parameters:
user
- The name of the user- Returns:
- permissions of the user
- See Also:
-