public class ArangoDriver extends BaseArangoDriver
Constructor and Description |
---|
ArangoDriver(ArangoConfigure configure)
Constructor to create an instance of the driver that uses the default
database.
|
ArangoDriver(ArangoConfigure configure,
String database)
Constructor to create an instance of the driver that uses the provided
database.
|
Modifier and Type | Method and Description |
---|---|
void |
cancelBatchMode()
This method cancels the batch execution mode.
|
long |
checkDocument(long collectionId,
long documentId)
This method returns the current revision of a document.
|
long |
checkDocument(long collectionId,
String documentKey)
This method returns the current revision of a document.
|
long |
checkDocument(String documentHandle)
This method returns the current revision of a document.
|
long |
checkDocument(String collectionName,
long documentId)
This method returns the current revision of a document.
|
long |
checkDocument(String collectionName,
String documentKey)
This method returns the current revision of a document.
|
<T> CursorEntity<T> |
continueQuery(long cursorId,
Class<?>... clazz)
Continues data retrieval for an existing cursor
|
DefaultEntity |
createAqlFunction(String name,
String code)
Creates an AQL Function
|
IndexEntity |
createCappedByDocumentSizeIndex(long collectionId,
int byteSize)
This method creates a capped index for a collection.
|
IndexEntity |
createCappedByDocumentSizeIndex(String collectionName,
int byteSize)
This method creates a capped index for a collection.
|
IndexEntity |
createCappedIndex(long collectionId,
int size)
This method creates a capped index for a collection.
|
IndexEntity |
createCappedIndex(String collectionName,
int size)
This method creates a capped index for a collection.
|
CollectionEntity |
createCollection(String name)
Creates a new collection.
|
CollectionEntity |
createCollection(String name,
CollectionOptions collectionOptions)
Creates a new collection.
|
BooleanResultEntity |
createDatabase(String database,
UserEntity... users)
This method creates a database
|
DocumentEntity<?> |
createDocument(long collectionId,
Object value)
Creates a document in the collection defined by The collection id
|
DocumentEntity<?> |
createDocument(long collectionId,
Object value,
Boolean createCollection,
Boolean waitForSync)
Creates a document in the collection defined by The collection id.
|
DocumentEntity<?> |
createDocument(long collectionId,
String documentKey,
Object value)
Creates a document in the collection defined by the collection's name.
|
DocumentEntity<?> |
createDocument(long collectionId,
String documentKey,
Object value,
Boolean createCollection,
Boolean waitForSync)
Creates a document in the collection defined by the collection's id.
|
<T> DocumentEntity<T> |
createDocument(String collectionName,
Object value)
Creates a document in the collection defined by the collection's name
|
<T> DocumentEntity<T> |
createDocument(String collectionName,
Object value,
Boolean createCollection,
Boolean waitForSync)
Creates a document in the collection defined by the collection's name.
|
<T> DocumentEntity<T> |
createDocument(String collectionName,
String documentKey,
Object value)
Creates a document in the collection defined by the collection's name.
|
<T> DocumentEntity<T> |
createDocument(String collectionName,
String documentKey,
Object value,
Boolean createCollection,
Boolean waitForSync)
Creates a document in the collection defined by the collection's name.
|
BooleanResultEntity |
createEndpoint(String endpoint,
String... databases)
This method creates an endpoint.
|
IndexEntity |
createFulltextIndex(long collectionId,
Integer minLength,
String... fields)
This method creates a full text index for a collection.
|
IndexEntity |
createFulltextIndex(long collectionId,
String... fields)
This method creates a full text index for a collection.
|
IndexEntity |
createFulltextIndex(String collectionName,
Integer minLength,
String... fields)
This method creates a full text index for a collection.
|
IndexEntity |
createFulltextIndex(String collectionName,
String... fields)
This method creates a full text index for a collection.
|
IndexEntity |
createGeoIndex(String collectionName,
boolean unique,
String... fields)
This method creates a geo index for a collection.
|
GraphEntity |
createGraph(String graphName,
Boolean waitForSync)
Creates an empty graph.
|
GraphEntity |
createGraph(String graphName,
List<EdgeDefinitionEntity> edgeDefinitions,
List<String> orphanCollections,
Boolean waitForSync)
Creates a graph.
|
IndexEntity |
createHashIndex(String collectionName,
boolean unique,
String... fields)
This method creates a hash index for a collection.
|
IndexEntity |
createIndex(long collectionId,
IndexType type,
boolean unique,
String... fields)
This method creates an index for a collection.
|
IndexEntity |
createIndex(String collectionName,
IndexType type,
boolean unique,
String... fields)
This method creates an index for a collection.
|
IndexEntity |
createSkipListIndex(String collectionName,
boolean unique,
String... fields)
This method creates a skip list index for a collection.
|
TransactionEntity |
createTransaction(String action)
Creates a transaction entity.
|
DefaultEntity |
createUser(String username,
String passwd,
Boolean active,
Map<String,Object> extra)
Creates a database user.
|
void |
deleteAllJobs()
Deletes all job from ArangoDB.
|
DefaultEntity |
deleteAqlFunction(String name,
boolean isNameSpace)
Delete an AQL function.
|
CollectionEntity |
deleteCollection(long id)
Deletes a collection by id.
|
CollectionEntity |
deleteCollection(String name)
Deletes a collection by name.
|
BooleanResultEntity |
deleteDatabase(String database)
This method deletes a database
|
DocumentEntity<?> |
deleteDocument(long collectionId,
long documentId)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(long collectionId,
long documentId,
Long rev,
Policy policy)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(long collectionId,
String documentKey)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(long collectionId,
String documentKey,
Long rev,
Policy policy)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(String documentHandle)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(String collectionName,
long documentId)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(String collectionName,
long documentId,
Long rev,
Policy policy)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(String documentHandle,
Long rev,
Policy policy)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(String collectionName,
String documentKey)
Deletes a document from the database.
|
DocumentEntity<?> |
deleteDocument(String collectionName,
String documentKey,
Long rev,
Policy policy)
Deletes a document from the database.
|
BooleanResultEntity |
deleteEndpoint(String endpoint)
This method deletes an endpoint
|
void |
deleteExpiredJobs(int timeStamp)
Deletes all jobs by a provided expiration date.
|
DeletedEntity |
deleteGraph(String graphName)
Delete a graph by its name.
|
void |
deleteGraph(String graphName,
Boolean dropCollections)
Delete a graph by its name.
|
IndexEntity |
deleteIndex(String indexHandle)
Deletes an index from a collection
|
void |
deleteJobById(String JobId)
Deletes a job from ArangoDB.
|
DefaultEntity |
deleteUser(String username)
Deletes a database user.
|
DefaultEntity |
executeBatch()
This method sends all stacked requests as batch to ArangoDB.
|
<T> CursorEntity<T> |
executeQuery(String query,
Map<String,Object> bindVars,
Class<T> clazz,
Boolean calcCount,
Integer batchSize)
This method executes an AQL query and returns a CursorEntity
|
<T> CursorResultSet<T> |
executeQueryWithResultSet(String query,
Map<String,Object> bindVars,
Class<T> clazz,
Boolean calcCount,
Integer batchSize)
This method executes an AQL query and returns a CursorResultSet
|
DefaultEntity |
executeScript(String jsCode)
Executes a javascript code.
|
<T> CursorEntity<T> |
executeSimpleAll(String collectionName,
int skip,
int limit,
Class<?> clazz)
Returns all documents of a collections.
|
<T> CursorEntity<DocumentEntity<T>> |
executeSimpleAllWithDocument(String collectionName,
int skip,
int limit,
Class<?> clazz)
Returns all documents of a collections.
|
<T> CursorResultSet<DocumentEntity<T>> |
executeSimpleAllWithDocumentResultSet(String collectionName,
int skip,
int limit,
Class<?> clazz)
Returns all documents of a collections.
|
<T> CursorResultSet<T> |
executeSimpleAllWithResultSet(String collectionName,
int skip,
int limit,
Class<?> clazz)
Returns all documents of a collections.
|
<T> ScalarExampleEntity<T> |
executeSimpleAny(String collectionName,
Class<?> clazz)
Returns a random document from the collection
|
<T> CursorEntity<T> |
executeSimpleByExample(String collectionName,
Map<String,Object> example,
int skip,
int limit,
Class<T> clazz)
This will find all documents matching a given example.
|
<T> CursorEntity<DocumentEntity<T>> |
executeSimpleByExampleWithDocument(String collectionName,
Map<String,Object> example,
int skip,
int limit,
Class<?> clazz)
This will find all documents matching a given example.
|
<T> CursorResultSet<DocumentEntity<T>> |
executeSimpleByExampleWithDocumentResusltSet(String collectionName,
Map<String,Object> example,
int skip,
int limit,
Class<?> clazz)
This will find all documents matching a given example.
|
<T> CursorResultSet<T> |
executeSimpleByExampleWithResusltSet(String collectionName,
Map<String,Object> example,
int skip,
int limit,
Class<?> clazz)
This will find all documents matching a given example.
|
<T> DocumentResultEntity<T> |
executeSimpleFirst(String collectionName,
Integer count,
Class<?> clazz)
This will return the first document(s) from the collection, in the order of
insertion/update time.
|
<T> ScalarExampleEntity<T> |
executeSimpleFirstExample(String collectionName,
Map<String,Object> example,
Class<?> clazz)
Returns the first document matching the example
|
<T> CursorEntity<T> |
executeSimpleFulltext(String collectionName,
String attribute,
String query,
int skip,
int limit,
String index,
Class<?> clazz)
This will find all documents from the collection that match the fulltext
query specified in query.
|
<T> CursorEntity<DocumentEntity<T>> |
executeSimpleFulltextWithDocument(String collectionName,
String attribute,
String query,
int skip,
int limit,
String index,
Class<?> clazz)
This will find all documents from the collection that match the fulltext
query specified in query.
|
<T> CursorResultSet<DocumentEntity<T>> |
executeSimpleFulltextWithDocumentResultSet(String collectionName,
String attribute,
String query,
int skip,
int limit,
String index,
Class<?> clazz)
This will find all documents from the collection that match the fulltext
query specified in query.
|
<T> CursorResultSet<T> |
executeSimpleFulltextWithResultSet(String collectionName,
String attribute,
String query,
int skip,
int limit,
String index,
Class<?> clazz)
This will find all documents from the collection that match the fulltext
query specified in query.
|
<T> DocumentResultEntity<T> |
executeSimpleLast(String collectionName,
Integer count,
Class<?> clazz)
This will return the last document(s) from the collection, in the order of
insertion/update time.
|
<T> CursorEntity<T> |
executeSimpleRange(String collectionName,
String attribute,
Object left,
Object right,
Boolean closed,
int skip,
int limit,
Class<?> clazz)
This will find all documents within a given range.
|
<T> CursorEntity<DocumentEntity<T>> |
executeSimpleRangeWithDocument(String collectionName,
String attribute,
Object left,
Object right,
Boolean closed,
int skip,
int limit,
Class<?> clazz)
This will find all documents within a given range.
|
<T> CursorResultSet<DocumentEntity<T>> |
executeSimpleRangeWithDocumentResultSet(String collectionName,
String attribute,
Object left,
Object right,
Boolean closed,
int skip,
int limit,
Class<?> clazz)
This will find all documents within a given range.
|
<T> CursorResultSet<T> |
executeSimpleRangeWithResultSet(String collectionName,
String attribute,
Object left,
Object right,
Boolean closed,
int skip,
int limit,
Class<?> clazz)
This will find all documents within a given range.
|
SimpleByResultEntity |
executeSimpleRemoveByExample(String collectionName,
Map<String,Object> example,
Boolean waitForSync,
Integer limit)
This will remove all documents in the collection that match the specified
example object.
|
SimpleByResultEntity |
executeSimpleReplaceByExample(String collectionName,
Map<String,Object> example,
Map<String,Object> newValue,
Boolean waitForSync,
Integer limit)
This will replace all documents in the collection that match the specified
example object.
|
SimpleByResultEntity |
executeSimpleUpdateByExample(String collectionName,
Map<String,Object> example,
Map<String,Object> newValue,
Boolean keepNull,
Boolean waitForSync,
Integer limit)
This will update all documents in the collection that match the specified
example object.
|
TransactionResultEntity |
executeTransaction(TransactionEntity transactionEntity)
Executes the transaction on the database server.
|
DefaultEntity |
finishQuery(long cursorId)
Deletes a cursor from the database.
|
AqlFunctionsEntity |
getAqlFunctions(String namespace)
Gets all AQL functions whithin a given namespace
|
<T> T |
getBatchResponseByRequestId(String requestId)
This method returns the result of a call to ArangoDB executed within a
batch request.
|
CollectionEntity |
getCollection(long id)
Returns a collection from ArangoDB by id
|
CollectionEntity |
getCollection(String name)
Returns a collection from ArangoDB by name
|
CollectionEntity |
getCollectionChecksum(String name,
Boolean withRevisions,
Boolean withData)
Returns a collection from ArangoDB by name including the collection
checksum
|
CollectionEntity |
getCollectionCount(long id)
Returns a collection from ArangoDB by id including the document count
|
CollectionEntity |
getCollectionCount(String name)
Returns a collection from ArangoDB by name including the document count
|
CollectionEntity |
getCollectionFigures(long id)
Returns a collection from ArangoDB by id including the collection figures
|
CollectionEntity |
getCollectionFigures(String name)
Returns a collection from ArangoDB by name including the collection figures
|
CollectionEntity |
getCollectionProperties(long id)
Returns a collection from ArangoDB including all properties by id
|
CollectionEntity |
getCollectionProperties(String name)
Returns a collection from ArangoDB including all properties by name
|
CollectionEntity |
getCollectionRevision(long id)
Returns a collection from ArangoDB including revision by id
|
CollectionEntity |
getCollectionRevision(String name)
Returns a collection from ArangoDB including revision by name
|
CollectionsEntity |
getCollections()
Returns all collections from ArangoDB
|
CollectionsEntity |
getCollections(Boolean excludeSystem)
Returns all collections from ArangoDB
|
DatabaseEntity |
getCurrentDatabase()
Returns the current database
|
StringsResultEntity |
getDatabases()
Returns all databases
|
StringsResultEntity |
getDatabases(boolean currentUserAccessableOnly)
Returns all databases
|
StringsResultEntity |
getDatabases(String username,
String password)
Returns all databases the user identified by his credentials can access
|
String |
getDefaultDatabase()
Returns the default database.
|
<T> DocumentEntity<T> |
getDocument(long collectionId,
long documentId,
Class<?> clazz)
Returns a document entity.
|
<T> DocumentEntity<T> |
getDocument(long collectionId,
String documentKey,
Class<?> clazz)
Returns a document entity.
|
<T> DocumentEntity<T> |
getDocument(String documentHandle,
Class<?> clazz)
Returns a document entity.
|
<T> DocumentEntity<T> |
getDocument(String documentHandle,
Class<?> clazz,
Long ifNoneMatchRevision,
Long ifMatchRevision)
Returns a document entity.
|
<T> DocumentEntity<T> |
getDocument(String collectionName,
long documentId,
Class<?> clazz)
Returns a document entity.
|
<T> DocumentEntity<T> |
getDocument(String collectionName,
String documentKey,
Class<?> clazz)
Returns a document entity.
|
List<String> |
getDocuments(long collectionId)
This method returns all document handles from a collection.
|
List<String> |
getDocuments(long collectionId,
boolean handleConvert)
This method returns all document handles from a collection.
|
List<String> |
getDocuments(String collectionName)
This method returns all document handles from a collection.
|
List<String> |
getDocuments(String collectionName,
boolean handleConvert)
This method returns all document handles from a collection.
|
List<Endpoint> |
getEndpoints()
This method returns all endpoints.
|
GraphEntity |
getGraph(String graphName)
Get graph object by name, including its edge definitions and vertex
collections.
|
List<String> |
getGraphList()
Creates a list of the names of all available graphs of the default
database.
|
GraphsEntity |
getGraphs()
Returns a GraphsEntity containing all graph as GraphEntity object of the
default database.
|
IndexEntity |
getIndex(String indexHandle)
Returns an index from a collection.
|
IndexesEntity |
getIndexes(long collectionId)
Returns all indices from a collection.
|
IndexesEntity |
getIndexes(String collectionName)
Returns all indices from a collection.
|
List<String> |
getJobIds()
Returns a list of all job ids of asynchronous executed jobs.
|
<T> T |
getJobResult(String jobId)
Returns the job result for a given job id.
|
List<String> |
getJobs(JobsEntity.JobState jobState)
Returns a list of all job ids of asynchronous executed jobs, filtered by
job state.
|
List<String> |
getJobs(JobsEntity.JobState jobState,
int count)
Returns a list of all job ids of asynchronous executed jobs, filtered by
job state.
|
String |
getLastJobId()
Returns the id of the last asynchronous executed job.
|
ReplicationApplierConfigEntity |
getReplicationApplierConfig()
Returns the configuration of the replication applier.
|
ReplicationApplierStateEntity |
getReplicationApplierState()
Returns the state of the replication applier, regardless of whether the
applier is currently running or not.
|
<T> void |
getReplicationDump(String collectionName,
Long from,
Long to,
Integer chunkSize,
Boolean ticks,
Class<T> clazz,
DumpHandler<T> handler)
Returns the data from the collection for the requested range.
|
ReplicationInventoryEntity |
getReplicationInventory()
Returns the list of collections and indexes available on the server.
|
ReplicationInventoryEntity |
getReplicationInventory(boolean includeSystem)
Returns the list of collections and indexes available on the server.
|
ReplicationLoggerConfigEntity |
getReplicationLoggerConfig()
Returns the configuration of the replication logger
|
ReplicationLoggerStateEntity |
getReplicationLoggerState()
Returns the current state of the server's replication logger.
|
String |
getReplicationServerId()
Returns the servers id.
|
AdminLogEntity |
getServerLog(Integer logLevel,
Boolean logLevelUpTo,
Integer start,
Integer size,
Integer offset,
Boolean sortAsc,
String text)
Returns the server log, for the parameters *logLevel* and *logLevelUpTo*
please note the following: fatal or 0 error or 1 warning or 2 info or 3
debug or 4 The default value is info.
|
StatisticsEntity |
getStatistics()
Returns the current statistics
|
StatisticsDescriptionEntity |
getStatisticsDescription()
Returns the statistics description
|
ArangoUnixTime |
getTime()
Returns the current server time
|
UserEntity |
getUser(String username)
Returns a database user.
|
List<UserEntity> |
getUsers()
Returns all database user.
|
List<DocumentEntity<UserEntity>> |
getUsersDocument()
Returns all database user as document.
|
ArangoVersion |
getVersion()
Returns the database version
|
<T> EdgeEntity<T> |
graphCreateEdge(String graphName,
String edgeCollectionName,
String fromHandle,
String toHandle,
Object value,
Boolean waitForSync)
Stores a new edge with the information contained within the body into the
given collection.
|
<T> EdgeEntity<T> |
graphCreateEdge(String graphName,
String edgeCollectionName,
String key,
String fromHandle,
String toHandle)
Stores a new edge with the information contained within the body into the
given collection.
|
<T> EdgeEntity<T> |
graphCreateEdge(String graphName,
String edgeCollectionName,
String key,
String fromHandle,
String toHandle,
Object value,
Boolean waitForSync)
Stores a new edge with the information contained within the body into the
given collection.
|
GraphEntity |
graphCreateEdgeDefinition(String graphName,
EdgeDefinitionEntity edgeDefinition)
Adds a new edge definition to an existing graph
|
<T> DocumentEntity<T> |
graphCreateVertex(String graphName,
String collectionName,
T vertex,
Boolean waitForSync)
Stores a new vertex with the information contained within the document into
the given collection.
|
GraphEntity |
graphCreateVertexCollection(String graphName,
String collectionName)
Creates a vertex collection
|
DeletedEntity |
graphDeleteEdge(String graphName,
String edgeCollectionName,
String key)
Deletes an edge with the given id, if it is contained within the graph.
|
DeletedEntity |
graphDeleteEdge(String graphName,
String edgeCollectionName,
String key,
Boolean waitForSync)
Deletes an edge with the given id, if it is contained within the graph.
|
DeletedEntity |
graphDeleteEdge(String graphName,
String edgeCollectionName,
String key,
Boolean waitForSync,
Long ifMatchRevision,
Long ifNoneMatchRevision)
Deletes an edge with the given id, if it is contained within the graph.
|
GraphEntity |
graphDeleteEdgeDefinition(String graphName,
String edgeCollectionName,
Boolean dropCollection)
Removes an existing edge definition from this graph.
|
DeletedEntity |
graphDeleteVertex(String graphName,
String collectionName,
String key)
Deletes a vertex with the given key, if it is contained within the graph.
|
DeletedEntity |
graphDeleteVertex(String graphName,
String collectionName,
String key,
Boolean waitForSync)
Deletes a vertex with the given key, if it is contained within the graph.
|
DeletedEntity |
graphDeleteVertex(String graphName,
String collectionName,
String key,
Boolean waitForSync,
Long ifMatchRevision,
Long ifNoneMatchRevision)
Deletes a vertex with the given key, if it is contained within the graph.
|
DeletedEntity |
graphDeleteVertexCollection(String graphName,
String collectionName,
Boolean dropCollection)
Removes a vertex collection from the graph and optionally deletes the
collection, if it is not used in any other graph.
|
<T> EdgeEntity<T> |
graphGetEdge(String graphName,
String edgeCollectionName,
String key,
Class<?> clazz)
Loads an edge with the given key if it is contained within your graph.
|
<T> EdgeEntity<T> |
graphGetEdge(String graphName,
String edgeCollectionName,
String key,
Class<?> clazz,
Long ifMatchRevision,
Long ifNoneMatchRevision)
Loads an edge with the given key if it is contained within your graph.
|
List<String> |
graphGetEdgeCollections(String graphName)
Returns a list of all edge collection of a graph that are defined in the
graphs edgeDefinitions
|
CursorEntity<PlainEdgeEntity> |
graphGetEdges(String graphName)
Returns all Edges of a graph, each edge as a PlainEdgeEntity.
|
<T> CursorEntity<T> |
graphGetEdges(String graphName,
Class<T> clazz,
String vertexDocumentHandle)
Returns all Edges of a given vertex.
|
<T> CursorEntity<T> |
graphGetEdgesByExampleMap(String graphName,
Class<T> clazzT,
Map<String,Object> vertexExample)
Returns all Edges of vertices matching the map.
|
<T,S> CursorEntity<T> |
graphGetEdgesByExampleObject(String graphName,
Class<T> clazzT,
S vertexExample)
Returns all Edges of vertices matching the example object (non-primitive
set to null will not be used for comparing).
|
<T> DocumentEntity<T> |
graphGetVertex(String graphName,
String collectionName,
String key,
Class<?> clazz)
Gets a vertex with the given key if it is contained within your graph.
|
<T> DocumentEntity<T> |
graphGetVertex(String graphName,
String collectionName,
String key,
Class<?> clazz,
Long ifNoneMatchRevision,
Long ifMatchRevision)
Gets a vertex with the given key if it is contained within your graph.
|
List<String> |
graphGetVertexCollections(String graphName)
Returns a list of all vertex collection of a graph that are defined in the
graphs edgeDefinitions (in "from", "to", and "orphanCollections")
|
<T> EdgeEntity<T> |
graphReplaceEdge(String graphName,
String edgeCollectionName,
String key,
Object value)
Replaces an edge with the given key by the content in the body.
|
<T> EdgeEntity<T> |
graphReplaceEdge(String graphName,
String edgeCollectionName,
String key,
Object value,
Boolean waitForSync,
Long ifMatchRevision,
Long ifNoneMatchRevision)
Replaces an edge with the given key by the content in the body.
|
GraphEntity |
graphReplaceEdgeDefinition(String graphName,
String edgeCollectionName,
EdgeDefinitionEntity edgeDefinition)
Replaces an existing edge definition to an existing graph.
|
<T> DocumentEntity<T> |
graphReplaceVertex(String graphName,
String collectionName,
String key,
Object vertex)
Replaces a vertex with the given key by the content in the body.
|
<T> DocumentEntity<T> |
graphReplaceVertex(String graphName,
String collectionName,
String key,
Object vertex,
Boolean waitForSync,
Long ifMatchRevision,
Long ifNoneMatchRevision)
Replaces a vertex with the given key by the content in the body.
|
<T> EdgeEntity<T> |
graphUpdateEdge(String graphName,
String edgeCollectionName,
String key,
Object value,
Boolean keepNull)
Updates an edge with the given key by adding the content in the body.
|
<T> EdgeEntity<T> |
graphUpdateEdge(String graphName,
String edgeCollectionName,
String key,
Object value,
Boolean waitForSync,
Boolean keepNull,
Long ifMatchRevision,
Long ifNoneMatchRevision)
Updates an edge with the given key by adding the content in the body.
|
<T> DocumentEntity<T> |
graphUpdateVertex(String graphName,
String collectionName,
String key,
Object vertex,
Boolean keepNull)
Updates a vertex with the given key by adding the content in the body.
|
<T> DocumentEntity<T> |
graphUpdateVertex(String graphName,
String collectionName,
String key,
Object vertex,
Boolean keepNull,
Boolean waitForSync,
Long ifMatchRevision,
Long ifNoneMatchRevision)
Updates a vertex with the given key by adding the content in the body.
|
ImportResultEntity |
importDocuments(String collection,
Boolean createCollection,
Collection<?> values)
Creates documents in the collection.
|
ImportResultEntity |
importDocumentsByHeaderValues(String collection,
Boolean createCollection,
Collection<? extends Collection<?>> headerValues)
Creates documents in the collection.
|
CollectionEntity |
loadCollection(long id)
Returns the collection and loads it into memory.
|
CollectionEntity |
loadCollection(long id,
Boolean count)
Returns the collection and loads it into memory.
|
CollectionEntity |
loadCollection(String name)
Returns the collection and loads it into memory.
|
CollectionEntity |
loadCollection(String name,
Boolean count)
Returns the collection and loads it into memory.
|
DefaultEntity |
reloadRouting()
Triggers the routes reloading in ArangoDB
|
CollectionEntity |
renameCollection(long id,
String newName)
Returns the collection and changes it's name.
|
CollectionEntity |
renameCollection(String name,
String newName)
Returns the collection and changes it's name.
|
DocumentEntity<?> |
replaceDocument(long collectionId,
long documentId,
Object value)
This method replaces the content of the document defined by documentId.
|
DocumentEntity<?> |
replaceDocument(long collectionId,
long documentId,
Object value,
Long rev,
Policy policy,
Boolean waitForSync)
This method replaces the content of the document defined by documentId.
|
DocumentEntity<?> |
replaceDocument(long collectionId,
String documentKey,
Object value)
This method replaces the content of the document defined by documentKey.
|
DocumentEntity<?> |
replaceDocument(long collectionId,
String documentKey,
Object value,
Long rev,
Policy policy,
Boolean waitForSync)
This method replaces the content of the document defined by documentKey.
|
DocumentEntity<?> |
replaceDocument(String collectionName,
long documentId,
Object value)
This method replaces the content of the document defined by documentId.
|
DocumentEntity<?> |
replaceDocument(String collectionName,
long documentId,
Object value,
Long rev,
Policy policy,
Boolean waitForSync)
This method replaces the content of the document defined by documentId.
|
<T> DocumentEntity<T> |
replaceDocument(String documentHandle,
Object value)
This method replaces the content of the document defined by documentHandle.
|
<T> DocumentEntity<T> |
replaceDocument(String documentHandle,
Object value,
Long rev,
Policy policy,
Boolean waitForSync)
This method replaces the content of the document defined by documentHandle.
|
DocumentEntity<?> |
replaceDocument(String collectionName,
String documentKey,
Object value)
This method replaces the content of the document defined by documentKey.
|
DocumentEntity<?> |
replaceDocument(String collectionName,
String documentKey,
Object value,
Long rev,
Policy policy,
Boolean waitForSync)
This method replaces the content of the document defined by documentKey.
|
DefaultEntity |
replaceUser(String username,
String passwd,
Boolean active,
Map<String,Object> extra)
Replaces the data of a database user.
|
CollectionEntity |
setCollectionProperties(long id,
Boolean newWaitForSync,
Long journalSize)
Returns the collection and changes it's journalSize and waitForSync.
|
CollectionEntity |
setCollectionProperties(String name,
Boolean newWaitForSync,
Long journalSize)
Returns the collection and changes it's journalSize and waitForSync.
|
void |
setDefaultDatabase(String database)
Sets the default database.
|
ReplicationApplierConfigEntity |
setReplicationApplierConfig(ReplicationApplierConfigEntity replicationApplierConfigEntity)
Sets the configuration of the replication applier.
|
ReplicationApplierConfigEntity |
setReplicationApplierConfig(String endpoint,
String database,
String username,
String password,
Integer maxConnectRetries,
Integer connectTimeout,
Integer requestTimeout,
Integer chunkSize,
Boolean autoStart,
Boolean adaptivePolling)
Sets the configuration of the replication applier.
|
ReplicationLoggerConfigEntity |
setReplicationLoggerConfig(Boolean autoStart,
Boolean logRemoteChanges,
Long maxEvents,
Long maxEventsSize)
Sets the replication logger configuration
|
void |
startAsyncMode(boolean fireAndForget)
This method sets the driver to asynchronous execution.
|
void |
startBatchMode()
This method enables batch execution.
|
ReplicationApplierStateEntity |
startReplicationApplier(Long from)
Starts the replication applier.
|
boolean |
startReplicationLogger()
Starts the replication logger
|
void |
stopAsyncMode()
This method sets the driver back to synchronous execution.
|
ReplicationApplierStateEntity |
stopReplicationApplier()
Stops the replication applier.
|
boolean |
stopReplicationLogger()
Stops the replication logger
|
ReplicationSyncEntity |
syncReplication(String endpoint,
String database,
String username,
String password,
RestrictType restrictType,
String... restrictCollections)
Starts a full data synchronization from a remote endpoint into the local
ArangoDB database.
|
CollectionEntity |
truncateCollection(long id)
Returns the collection and deletes all documents.
|
CollectionEntity |
truncateCollection(String name)
Returns the collection and deletes all documents.
|
CollectionEntity |
unloadCollection(long id)
Returns the collection and deletes it from memory.
|
CollectionEntity |
unloadCollection(String name)
Returns the collection and deletes it from memory.
|
DocumentEntity<?> |
updateDocument(long collectionId,
long documentId,
Object value)
This method updates a document defined by documentId.
|
DocumentEntity<?> |
updateDocument(long collectionId,
long documentId,
Object value,
Boolean keepNull)
This method updates a document defined by documentId.
|
DocumentEntity<?> |
updateDocument(long collectionId,
long documentId,
Object value,
Long rev,
Policy policy,
Boolean waitForSync,
Boolean keepNull)
This method updates a document defined by documentId.
|
DocumentEntity<?> |
updateDocument(long collectionId,
String documentKey,
Object value)
This method updates a document defined by documentKey.
|
DocumentEntity<?> |
updateDocument(long collectionId,
String documentKey,
Object value,
Boolean keepNull)
This method updates a document defined by documentKey.
|
DocumentEntity<?> |
updateDocument(long collectionId,
String documentKey,
Object value,
Long rev,
Policy policy,
Boolean waitForSync,
Boolean keepNull)
This method updates a document defined by documentKey.
|
DocumentEntity<?> |
updateDocument(String collectionName,
long documentId,
Object value)
This method updates a document defined by documentId.
|
DocumentEntity<?> |
updateDocument(String collectionName,
long documentId,
Object value,
Boolean keepNull)
This method updates a document defined by documentId.
|
DocumentEntity<?> |
updateDocument(String collectionName,
long documentId,
Object value,
Long rev,
Policy policy,
Boolean waitForSync,
Boolean keepNull)
This method updates a document defined by documentId.
|
<T> DocumentEntity<T> |
updateDocument(String documentHandle,
Object value)
This method updates a document defined by documentHandle.
|
<T> DocumentEntity<T> |
updateDocument(String documentHandle,
Object value,
Boolean keepNull)
This method updates a document defined by documentKey.
|
<T> DocumentEntity<T> |
updateDocument(String documentHandle,
Object value,
Long rev,
Policy policy,
Boolean waitForSync,
Boolean keepNull)
This method updates a document defined by documentHandle.
|
DocumentEntity<?> |
updateDocument(String collectionName,
String documentKey,
Object value)
This method updates a document defined by documentKey.
|
DocumentEntity<?> |
updateDocument(String collectionName,
String documentKey,
Object value,
Boolean keepNull)
This method updates a document defined by documentKey.
|
DocumentEntity<?> |
updateDocument(String collectionName,
String documentKey,
Object value,
Long rev,
Policy policy,
Boolean waitForSync,
Boolean keepNull)
This method updates a document defined by documentKey.
|
DefaultEntity |
updateUser(String username,
String passwd,
Boolean active,
Map<String,Object> extra)
Updates the data of a database user.
|
CursorEntity<?> |
validateQuery(String query)
This method validates a given AQL query string and returns a CursorEntity
|
createDocumentHandle, createDocumentHandle, createEndpointUrl, createEntity, createEntity, createEntity, createEntity, createEntityImpl, setKeyValueHeader, setStatusCode, toReplicationDumpHeader, validate, validateCollectionName, validateDatabaseName, validateDocumentHandle
public ArangoDriver(ArangoConfigure configure)
ArangoConfigure
- configure - A configuration object.public ArangoDriver(ArangoConfigure configure, String database)
ArangoConfigure
- configure - A configuration object.String
- database - the database that will be used.public void startBatchMode() throws ArangoException
ArangoException
cancelBatchMode()
,
executeBatch()
,
getBatchResponseByRequestId(String)
public void startAsyncMode(boolean fireAndForget) throws ArangoException
boolean
- fireAndForget - if set to true the asynchronous mode is set
to 'fire and forget'.ArangoException
stopAsyncMode()
,
getJobResult(String)
,
getJobs(com.arangodb.entity.JobsEntity.JobState,
int)
,
deleteExpiredJobs(int)
,
getLastJobId()
public void stopAsyncMode() throws ArangoException
public String getLastJobId()
public List<String> getJobIds()
public List<String> getJobs(JobsEntity.JobState jobState, int count) throws ArangoException
JobsEntity
- .JobState jobState - the job state as a filter.int
- count - a limit for the result set.ArangoException
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobIds()
,
deleteExpiredJobs(int)
,
getLastJobId()
public List<String> getJobs(JobsEntity.JobState jobState) throws ArangoException
JobsEntity
- .JobState jobState - the job state as a filter.ArangoException
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobIds()
,
deleteExpiredJobs(int)
,
getLastJobId()
public void deleteAllJobs() throws ArangoException
public void deleteJobById(String JobId) throws ArangoException
String
- jobId - the id of the jobArangoException
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobIds()
,
deleteExpiredJobs(int)
,
getLastJobId()
public void deleteExpiredJobs(int timeStamp) throws ArangoException
int
- timeStamp - a unix timestamp, every older job is deleted.ArangoException
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobIds()
,
deleteExpiredJobs(int)
,
getLastJobId()
public <T> T getJobResult(String jobId) throws ArangoException
String
- jobId - the job id.ArangoException
startAsyncMode(boolean)
,
stopAsyncMode()
,
getJobResult(String)
,
getJobIds()
,
deleteExpiredJobs(int)
,
getLastJobId()
public DefaultEntity executeBatch() throws ArangoException
ArangoException
startBatchMode()
,
cancelBatchMode()
public <T> T getBatchResponseByRequestId(String requestId) throws ArangoException
String
- requestId - the id of a request.ArangoException
startBatchMode()
,
executeBatch()
,
cancelBatchMode()
public void cancelBatchMode() throws ArangoException
ArangoException
startBatchMode()
,
executeBatch()
public String getDefaultDatabase()
public void setDefaultDatabase(String database)
database
- public CollectionEntity createCollection(String name) throws ArangoException
name
- - the name of the collectionArangoException
public CollectionEntity createCollection(String name, CollectionOptions collectionOptions) throws ArangoException
name
- - the name of the collectioncollectionOptions
- - an object containing the various options.ArangoException
public CollectionEntity getCollection(long id) throws ArangoException
id
- - the id of the collection.ArangoException
public CollectionEntity getCollection(String name) throws ArangoException
name
- - the name of the collection.ArangoException
public CollectionEntity getCollectionProperties(long id) throws ArangoException
id
- - the id of the collection.ArangoException
public CollectionEntity getCollectionProperties(String name) throws ArangoException
name
- - the name of the collection.ArangoException
public CollectionEntity getCollectionRevision(long id) throws ArangoException
name
- - the id of the collection.ArangoException
public CollectionEntity getCollectionRevision(String name) throws ArangoException
name
- - the name of the collection.ArangoException
public CollectionEntity getCollectionCount(long id) throws ArangoException
id
- - the id of the collection.ArangoException
public CollectionEntity getCollectionCount(String name) throws ArangoException
name
- - the name of the collection.ArangoException
public CollectionEntity getCollectionFigures(long id) throws ArangoException
id
- - the id of the collection.ArangoException
public CollectionEntity getCollectionFigures(String name) throws ArangoException
name
- - the name of the collection.ArangoException
public CollectionEntity getCollectionChecksum(String name, Boolean withRevisions, Boolean withData) throws ArangoException
name
- - the id of the collection.ArangoException
public CollectionsEntity getCollections() throws ArangoException
ArangoException
public CollectionsEntity getCollections(Boolean excludeSystem) throws ArangoException
excludeSystem
- - if set to true system collections will not be added to the
resultArangoException
public CollectionEntity loadCollection(long id) throws ArangoException
id
- - the id of the collection.ArangoException
public CollectionEntity loadCollection(String name) throws ArangoException
name
- - the name of the collection.ArangoException
public CollectionEntity loadCollection(long id, Boolean count) throws ArangoException
id
- - the id of the collection.count
- - if set to true the documents count is returned.ArangoException
public CollectionEntity loadCollection(String name, Boolean count) throws ArangoException
name
- - the name of the collection.count
- - if set to true the documents count is returned.ArangoException
public CollectionEntity unloadCollection(long id) throws ArangoException
id
- - the id of the collection.ArangoException
public CollectionEntity unloadCollection(String name) throws ArangoException
name
- - the name of the collection.ArangoException
public CollectionEntity truncateCollection(long id) throws ArangoException
id
- - the id of the collection.ArangoException
public CollectionEntity truncateCollection(String name) throws ArangoException
name
- - the name of the collection.ArangoException
public CollectionEntity setCollectionProperties(long id, Boolean newWaitForSync, Long journalSize) throws ArangoException
id
- - the id of the collection.newWaitForSync
- - a new value for the waitForSyncPropertyjournalSize
- - a new value for the collections journalSizeArangoException
public CollectionEntity setCollectionProperties(String name, Boolean newWaitForSync, Long journalSize) throws ArangoException
name
- - the name of the collection.newWaitForSync
- - a new value for the waitForSyncPropertyjournalSize
- - a new value for the collections journalSizeArangoException
public CollectionEntity renameCollection(long id, String newName) throws ArangoException
id
- - the id of the collection.newName
- - the new name for the collectionArangoException
public CollectionEntity renameCollection(String name, String newName) throws ArangoException
name
- - the name of the collection.newName
- - the new name for the collectionArangoException
public CollectionEntity deleteCollection(long id) throws ArangoException
id
- - the id of the collection.ArangoException
public CollectionEntity deleteCollection(String name) throws ArangoException
name
- - the name of the collection.ArangoException
public DocumentEntity<?> createDocument(long collectionId, Object value) throws ArangoException
collectionId
- - The id of the collectionvalue
- - An object containing the documents attributesArangoException
public <T> DocumentEntity<T> createDocument(String collectionName, Object value) throws ArangoException
collectionName
- - The name of the collectionvalue
- - An object containing the documents attributesArangoException
public DocumentEntity<?> createDocument(long collectionId, String documentKey, Object value) throws ArangoException
collectionId
- - The id of the collectiondocumentKey
- - the desired document keyvalue
- - An object containing the documents attributesArangoException
CollectionKeyOption.allowUserKeys
public <T> DocumentEntity<T> createDocument(String collectionName, String documentKey, Object value) throws ArangoException
collectionName
- - The name of the collectiondocumentKey
- - the desired document keyvalue
- - An object containing the documents attributesArangoException
CollectionKeyOption.allowUserKeys
public DocumentEntity<?> createDocument(long collectionId, Object value, Boolean createCollection, Boolean waitForSync) throws ArangoException
collectionId
- - The id of the collectionvalue
- - An object containing the documents attributescreateCollection
- - if set to true the collection is created if it does not existwaitForSync
- - if set to true the response is returned when the server has
finished.ArangoException
CollectionKeyOption.allowUserKeys
public <T> DocumentEntity<T> createDocument(String collectionName, Object value, Boolean createCollection, Boolean waitForSync) throws ArangoException
collectionName
- - The name of the collectionvalue
- - An object containing the documents attributescreateCollection
- - if set to true the collection is created if it does not existwaitForSync
- - if set to true the response is returned when the server has
finished.ArangoException
CollectionKeyOption.allowUserKeys
public DocumentEntity<?> createDocument(long collectionId, String documentKey, Object value, Boolean createCollection, Boolean waitForSync) throws ArangoException
collectionId
- - The id of the collectiondocumentKey
- - the desired document keyvalue
- - An object containing the documents attributescreateCollection
- - if set to true the collection is created if it does not existwaitForSync
- - if set to true the response is returned when the server has
finished.ArangoException
CollectionKeyOption.allowUserKeys
public <T> DocumentEntity<T> createDocument(String collectionName, String documentKey, Object value, Boolean createCollection, Boolean waitForSync) throws ArangoException
collectionName
- - The name of the collectiondocumentKey
- - the desired document keyvalue
- - An object containing the documents attributescreateCollection
- - if set to true the collection is created if it does not existwaitForSync
- - if set to true the response is returned when the server has
finished.ArangoException
CollectionKeyOption.allowUserKeys
public DocumentEntity<?> replaceDocument(long collectionId, long documentId, Object value) throws ArangoException
collectionId
- - The collection's id.documentId
- - The document's id.value
- - An object containing the documents attributesArangoException
public DocumentEntity<?> replaceDocument(String collectionName, long documentId, Object value) throws ArangoException
collectionName
- - The collection's name.documentId
- - The document's id.value
- - An object containing the documents attributesArangoException
public DocumentEntity<?> replaceDocument(long collectionId, String documentKey, Object value) throws ArangoException
collectionId
- - The collection's id.documentKey
- - The document's key.value
- - An object containing the documents attributesArangoException
public DocumentEntity<?> replaceDocument(String collectionName, String documentKey, Object value) throws ArangoException
collectionName
- - The collection's name.documentKey
- - The document's key.value
- - An object containing the documents attributesArangoException
public <T> DocumentEntity<T> replaceDocument(String documentHandle, Object value) throws ArangoException
documentHandle
- - The document handle.value
- - An object containing the documents attributesArangoException
public DocumentEntity<?> replaceDocument(long collectionId, long documentId, Object value, Long rev, Policy policy, Boolean waitForSync) throws ArangoException
collectionId
- - The collection's id.documentId
- - The document's id.value
- - An object containing the new attributes of the document.rev
- - the desired revision.policy
- - The update policywaitForSync
- - if set to true the response is returned when the server has
finished.ArangoException
public DocumentEntity<?> replaceDocument(String collectionName, long documentId, Object value, Long rev, Policy policy, Boolean waitForSync) throws ArangoException
collectionName
- - The collection's name.documentId
- - The document's id.value
- - An object containing the new attributes of the document.rev
- - the desired revision.policy
- - The update policywaitForSync
- - if set to true the response is returned when the server has
finished.ArangoException
public DocumentEntity<?> replaceDocument(long collectionId, String documentKey, Object value, Long rev, Policy policy, Boolean waitForSync) throws ArangoException
collectionId
- - The collection's id.documentKey
- - The document's key.value
- - An object containing the new attributes of the document.rev
- - the desired revision.policy
- - The update policywaitForSync
- - if set to true the response is returned when the server has
finished.ArangoException
public DocumentEntity<?> replaceDocument(String collectionName, String documentKey, Object value, Long rev, Policy policy, Boolean waitForSync) throws ArangoException
collectionName
- - The collection's name.documentKey
- - The document's key.value
- - An object containing the new attributes of the document.rev
- - the desired revision.policy
- - The update policywaitForSync
- - if set to true the response is returned when the server has
finished.ArangoException
public <T> DocumentEntity<T> replaceDocument(String documentHandle, Object value, Long rev, Policy policy, Boolean waitForSync) throws ArangoException
documentHandle
- - The document's handle.value
- - An object containing the new attributes of the document.rev
- - the desired revision.policy
- - The update policywaitForSync
- - if set to true the response is returned when the server has
finished.ArangoException
public DocumentEntity<?> updateDocument(long collectionId, long documentId, Object value) throws ArangoException
collectionId
- - The collection's id.documentId
- - The document's id.value
- - An object containing the documents attributesArangoException
public DocumentEntity<?> updateDocument(String collectionName, long documentId, Object value) throws ArangoException
collectionName
- - The collection's name.documentId
- - The document's id.value
- - An object containing the documents attributesArangoException
public DocumentEntity<?> updateDocument(long collectionId, String documentKey, Object value) throws ArangoException
collectionId
- - The collection's id.documentKey
- - The document's key.value
- - An object containing the documents attributesArangoException
public DocumentEntity<?> updateDocument(String collectionName, String documentKey, Object value) throws ArangoException
collectionName
- - The collection's name.documentKey
- - The document's key.value
- - An object containing the documents attributesArangoException
public <T> DocumentEntity<T> updateDocument(String documentHandle, Object value) throws ArangoException
documentHandle
- - The document's handle.value
- - An object containing the documents attributesArangoException
public DocumentEntity<?> updateDocument(long collectionId, long documentId, Object value, Boolean keepNull) throws ArangoException
collectionId
- - The collection id.documentId
- - The document id.value
- - An object containing the documents attributeskeepNull
- - If true null values are kept.ArangoException
public DocumentEntity<?> updateDocument(String collectionName, long documentId, Object value, Boolean keepNull) throws ArangoException
collectionName
- - The collection name.documentId
- - The document id.value
- - An object containing the documents attributeskeepNull
- - If true null values are kept.ArangoException
public DocumentEntity<?> updateDocument(long collectionId, String documentKey, Object value, Boolean keepNull) throws ArangoException
collectionId
- - The collection id.documentKey
- - The document key.value
- - An object containing the documents attributeskeepNull
- - If true null values are kept.ArangoException
public DocumentEntity<?> updateDocument(String collectionName, String documentKey, Object value, Boolean keepNull) throws ArangoException
collectionName
- - The collection name.documentKey
- - The document key.value
- - An object containing the documents attributeskeepNull
- - If true null values are kept.ArangoException
public <T> DocumentEntity<T> updateDocument(String documentHandle, Object value, Boolean keepNull) throws ArangoException
documentHandle
- - The document handle.value
- - An object containing the documents attributeskeepNull
- - If true null values are kept.ArangoException
public DocumentEntity<?> updateDocument(long collectionId, long documentId, Object value, Long rev, Policy policy, Boolean waitForSync, Boolean keepNull) throws ArangoException
collectionId
- - The collection id.documentId
- - The document id.value
- - An object containing the documents attributesrev
- - The desired revisionpolicy
- - The update policywaitForSync
- - if set to true the response is returned when the server has
finished.keepNull
- - If true null values are kept.ArangoException
public DocumentEntity<?> updateDocument(String collectionName, long documentId, Object value, Long rev, Policy policy, Boolean waitForSync, Boolean keepNull) throws ArangoException
collectionName
- - The collection name.documentId
- - The document id.value
- - An object containing the documents attributesrev
- - The desired revisionpolicy
- - The update policywaitForSync
- - if set to true the response is returned when the server has
finished.keepNull
- - If true null values are kept.ArangoException
public DocumentEntity<?> updateDocument(long collectionId, String documentKey, Object value, Long rev, Policy policy, Boolean waitForSync, Boolean keepNull) throws ArangoException
collectionId
- - The collection id.documentKey
- - The document key.value
- - An object containing the documents attributesrev
- - The desired revisionpolicy
- - The update policywaitForSync
- - if set to true the response is returned when the server has
finished.keepNull
- - If true null values are kept.ArangoException
public DocumentEntity<?> updateDocument(String collectionName, String documentKey, Object value, Long rev, Policy policy, Boolean waitForSync, Boolean keepNull) throws ArangoException
collectionName
- - The collection name.documentKey
- - The document key.value
- - An object containing the documents attributesrev
- - The desired revisionpolicy
- - The update policywaitForSync
- - if set to true the response is returned when the server has
finished.keepNull
- - If true null values are kept.ArangoException
public <T> DocumentEntity<T> updateDocument(String documentHandle, Object value, Long rev, Policy policy, Boolean waitForSync, Boolean keepNull) throws ArangoException
documentKey
- - The document handle.value
- - An object containing the documents attributesrev
- - The desired revisionpolicy
- - The update policywaitForSync
- - if set to true the response is returned when the server has
finished.keepNull
- - If true null values are kept.ArangoException
public List<String> getDocuments(long collectionId) throws ArangoException
collectionId
- - The collection id.ArangoException
public List<String> getDocuments(String collectionName) throws ArangoException
collectionName
- - The collection name.ArangoException
public List<String> getDocuments(long collectionId, boolean handleConvert) throws ArangoException
collectionId
- - The collection id.handleConvert
- - if set to true only the document ids are returnedArangoException
public List<String> getDocuments(String collectionName, boolean handleConvert) throws ArangoException
collectionName
- - The collection name.handleConvert
- - if set to true only the document ids are returnedArangoException
public long checkDocument(long collectionId, long documentId) throws ArangoException
collectionId
- - The collection id.documentId
- - The document idArangoException
public long checkDocument(String collectionName, long documentId) throws ArangoException
collectionName
- - The collection name.documentId
- - The document idArangoException
public long checkDocument(long collectionId, String documentKey) throws ArangoException
collectionId
- - The collection id.documentKey
- - The document keyArangoException
public long checkDocument(String collectionName, String documentKey) throws ArangoException
collectionName
- - The collection name.documentKey
- - The document keyArangoException
public long checkDocument(String documentHandle) throws ArangoException
documentHandle
- - The document handleArangoException
public <T> DocumentEntity<T> getDocument(long collectionId, long documentId, Class<?> clazz) throws ArangoException
T
- collectionId
- - The collection id.documentId
- - The document idclazz
- - The expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentEntity<T> getDocument(String collectionName, long documentId, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.documentId
- - The document idclazz
- - The expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentEntity<T> getDocument(long collectionId, String documentKey, Class<?> clazz) throws ArangoException
T
- collectionId
- - The collection id.documentKey
- - The document keyclazz
- - The expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentEntity<T> getDocument(String collectionName, String documentKey, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.documentKey
- - The document keyclazz
- - The expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentEntity<T> getDocument(String documentHandle, Class<?> clazz) throws ArangoException
T
- documentHandle
- - The document handleclazz
- - The expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentEntity<T> getDocument(String documentHandle, Class<?> clazz, Long ifNoneMatchRevision, Long ifMatchRevision) throws ArangoException
T
- documentHandle
- - The document handleclazz
- - The expected class, the result from the server request is
deserialized to an instance of this class.ifNoneMatchRevision
- - if set the document is only returned id it has a different
revision.ifMatchRevision
- - if set the document is only returned id it has the same
revision.ArangoException
public DocumentEntity<?> deleteDocument(long collectionId, long documentId) throws ArangoException
collectionId
- - The collection id.documentId
- - The document id.ArangoException
public DocumentEntity<?> deleteDocument(String collectionName, long documentId) throws ArangoException
collectionName
- - The collection name.documentId
- - The document id.ArangoException
public DocumentEntity<?> deleteDocument(long collectionId, String documentKey) throws ArangoException
collectionId
- - The collection id.documentKey
- - The document key.ArangoException
public DocumentEntity<?> deleteDocument(String collectionName, String documentKey) throws ArangoException
collectionName
- - The collection name.documentKey
- - The document key.ArangoException
public DocumentEntity<?> deleteDocument(String documentHandle) throws ArangoException
documentHandle
- - The document handle.ArangoException
public DocumentEntity<?> deleteDocument(long collectionId, long documentId, Long rev, Policy policy) throws ArangoException
collectionId
- - The collection id.documentId
- - The document id.rev
- - The desired revisionpolicy
- - The update policyArangoException
public DocumentEntity<?> deleteDocument(String collectionName, long documentId, Long rev, Policy policy) throws ArangoException
collectionName
- - The collection name.documentId
- - The document id.rev
- - The desired revisionpolicy
- - The update policyArangoException
public DocumentEntity<?> deleteDocument(long collectionId, String documentKey, Long rev, Policy policy) throws ArangoException
collectionId
- - The collection id.documentKey
- - The document key.rev
- - The desired revisionpolicy
- - The update policyArangoException
public DocumentEntity<?> deleteDocument(String collectionName, String documentKey, Long rev, Policy policy) throws ArangoException
collectionName
- - The collection name.documentKey
- - The document key.rev
- - The desired revisionpolicy
- - The update policyArangoException
public DocumentEntity<?> deleteDocument(String documentHandle, Long rev, Policy policy) throws ArangoException
documentHandle
- - The document handle.rev
- - The desired revisionpolicy
- - The update policyArangoException
public CursorEntity<?> validateQuery(String query) throws ArangoException
query
- - an AQL query as stringArangoException
public <T> CursorEntity<T> executeQuery(String query, Map<String,Object> bindVars, Class<T> clazz, Boolean calcCount, Integer batchSize) throws ArangoException
T
- query
- - an AQL query as stringbindVars
- - a map containing all bind variables,clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.calcCount
- - if set to true the result count is returnedbatchSize
- - the batch size of the result cursorArangoException
public <T> CursorEntity<T> continueQuery(long cursorId, Class<?>... clazz) throws ArangoException
T
- cursorId
- - The id of a cursor.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public DefaultEntity finishQuery(long cursorId) throws ArangoException
cursorId
- - The id of a cursor.ArangoException
public <T> CursorResultSet<T> executeQueryWithResultSet(String query, Map<String,Object> bindVars, Class<T> clazz, Boolean calcCount, Integer batchSize) throws ArangoException
T
- query
- - an AQL query as stringbindVars
- - a map containing all bind variables,clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.calcCount
- - if set to true the result count is returnedbatchSize
- - the batch size of the result cursorArangoException
public IndexEntity createIndex(long collectionId, IndexType type, boolean unique, String... fields) throws ArangoException
collectionId
- - The collection id.type
- - the index type.unique
- - if set to true the index will be a unique indexfields
- - the fields (document attributes) the index is created onArangoException
public IndexEntity createIndex(String collectionName, IndexType type, boolean unique, String... fields) throws ArangoException
collectionName
- - The collection name.type
- - the index type.unique
- - if set to true the index will be a unique indexfields
- - the fields (document attributes) the index is created onArangoException
public IndexEntity createHashIndex(String collectionName, boolean unique, String... fields) throws ArangoException
collectionName
- - The collection name.unique
- - if set to true the index will be a unique indexfields
- - the fields (document attributes) the index is created onArangoException
public IndexEntity createGeoIndex(String collectionName, boolean unique, String... fields) throws ArangoException
collectionName
- - The collection name.unique
- - if set to true the index will be a unique indexfields
- - the fields (document attributes) the index is created onArangoException
public IndexEntity createSkipListIndex(String collectionName, boolean unique, String... fields) throws ArangoException
collectionName
- - The collection name.unique
- - if set to true the index will be a unique indexfields
- - the fields (document attributes) the index is created onArangoException
public IndexEntity createCappedIndex(long collectionId, int size) throws ArangoException
collectionId
- - The collection id.size
- - the maximum amount of documentsArangoException
public IndexEntity createCappedIndex(String collectionName, int size) throws ArangoException
collectionName
- - The collection name.size
- - the maximum amount of documentsArangoException
public IndexEntity createCappedByDocumentSizeIndex(long collectionId, int byteSize) throws ArangoException
collectionId
- - The collection id.byteSize
- - the maximum size of the document data in bytesArangoException
public IndexEntity createCappedByDocumentSizeIndex(String collectionName, int byteSize) throws ArangoException
collectionName
- - The collection name.byteSize
- - the maximum size of the document data in bytesArangoException
public IndexEntity createFulltextIndex(long collectionId, String... fields) throws ArangoException
collectionId
- - The collection id.fields
- - the fields (document attributes) the index is created onArangoException
public IndexEntity createFulltextIndex(String collectionName, String... fields) throws ArangoException
collectionName
- - The collection name.fields
- - the fields (document attributes) the index is created onArangoException
public IndexEntity createFulltextIndex(long collectionId, Integer minLength, String... fields) throws ArangoException
collectionId
- - The collection id.minLength
- - Minimum character length of words to index.fields
- - the fields (document attributes) the index is created onArangoException
public IndexEntity createFulltextIndex(String collectionName, Integer minLength, String... fields) throws ArangoException
collectionName
- - The collection name.minLength
- - Minimum character length of words to index.fields
- - the fields (document attributes) the index is created onArangoException
public IndexEntity deleteIndex(String indexHandle) throws ArangoException
indexHandle
- - the index handleArangoException
public IndexEntity getIndex(String indexHandle) throws ArangoException
indexHandle
- - the index handleArangoException
public IndexesEntity getIndexes(long collectionId) throws ArangoException
collectionId
- - The collection id.ArangoException
public IndexesEntity getIndexes(String collectionName) throws ArangoException
collectionName
- - The collection name.ArangoException
public AdminLogEntity getServerLog(Integer logLevel, Boolean logLevelUpTo, Integer start, Integer size, Integer offset, Boolean sortAsc, String text) throws ArangoException
logLevel
- - if set only logs with this *logLevel* are returnedlogLevelUpTo
- - if set all logs up to the *logLevelUpTo* are returnedstart
- - Returns all log entries such that their log entry identifier
(lid value) is greater or equal to start.size
- - Restricts the result to at most size log entries.offset
- - Starts to return log entries skipping the first offset log
entries.sortAsc
- - if set to true the default sort order (descending) is reverted
to ascendingtext
- - Only return the log entries containing the text specified in
text.ArangoException
public StatisticsEntity getStatistics() throws ArangoException
ArangoException
public StatisticsDescriptionEntity getStatisticsDescription() throws ArangoException
ArangoException
public ArangoVersion getVersion() throws ArangoException
ArangoException
public ArangoUnixTime getTime() throws ArangoException
ArangoException
public DefaultEntity reloadRouting() throws ArangoException
ArangoException
public DefaultEntity executeScript(String jsCode) throws ArangoException
jsCode
- - a javascript function as stringArangoException
public <T> CursorEntity<T> executeSimpleByExample(String collectionName, Map<String,Object> example, int skip, int limit, Class<T> clazz) throws ArangoException
T
- collectionName
- - - The collection name.example
- - The example as a map.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorResultSet<T> executeSimpleByExampleWithResusltSet(String collectionName, Map<String,Object> example, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - - The collection name.example
- - The example as a map.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorEntity<DocumentEntity<T>> executeSimpleByExampleWithDocument(String collectionName, Map<String,Object> example, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - - The collection name.example
- - The example as a map.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorResultSet<DocumentEntity<T>> executeSimpleByExampleWithDocumentResusltSet(String collectionName, Map<String,Object> example, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - - The collection name.example
- - The example as a map.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorEntity<T> executeSimpleAll(String collectionName, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - - The collection name.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorResultSet<T> executeSimpleAllWithResultSet(String collectionName, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - - The collection name.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorEntity<DocumentEntity<T>> executeSimpleAllWithDocument(String collectionName, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - - The collection name.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorResultSet<DocumentEntity<T>> executeSimpleAllWithDocumentResultSet(String collectionName, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> ScalarExampleEntity<T> executeSimpleFirstExample(String collectionName, Map<String,Object> example, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.example
- - The example as a map.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> ScalarExampleEntity<T> executeSimpleAny(String collectionName, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorEntity<T> executeSimpleRange(String collectionName, String attribute, Object left, Object right, Boolean closed, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.attribute
- - The attribute path to check.left
- - The lower boundright
- - The upper boundclosed
- - If true, use interval including left and right, otherwise
exclude right, but include left.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorResultSet<T> executeSimpleRangeWithResultSet(String collectionName, String attribute, Object left, Object right, Boolean closed, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.attribute
- - The attribute path to check.left
- - The lower boundright
- - The upper boundclosed
- - If true, use interval including left and right, otherwise
exclude right, but include left.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorEntity<DocumentEntity<T>> executeSimpleRangeWithDocument(String collectionName, String attribute, Object left, Object right, Boolean closed, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.attribute
- - The attribute path to check.left
- - The lower boundright
- - The upper boundclosed
- - If true, use interval including left and right, otherwise
exclude right, but include left.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorResultSet<DocumentEntity<T>> executeSimpleRangeWithDocumentResultSet(String collectionName, String attribute, Object left, Object right, Boolean closed, int skip, int limit, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.attribute
- - The attribute path to check.left
- - The lower boundright
- - The upper boundclosed
- - If true, use interval including left and right, otherwise
exclude right, but include left.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorEntity<T> executeSimpleFulltext(String collectionName, String attribute, String query, int skip, int limit, String index, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.attribute
- - The attribute path to check.query
- - The fulltext query as string.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorResultSet<T> executeSimpleFulltextWithResultSet(String collectionName, String attribute, String query, int skip, int limit, String index, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.attribute
- - The attribute path to check.query
- - The fulltext query as string.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorEntity<DocumentEntity<T>> executeSimpleFulltextWithDocument(String collectionName, String attribute, String query, int skip, int limit, String index, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.attribute
- - The attribute path to check.query
- - The fulltext query as string.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> CursorResultSet<DocumentEntity<T>> executeSimpleFulltextWithDocumentResultSet(String collectionName, String attribute, String query, int skip, int limit, String index, Class<?> clazz) throws ArangoException
T
- collectionName
- - The collection name.attribute
- - The attribute path to check.query
- - The fulltext query as string.skip
- - The number of documents to skip in the query.limit
- - The maximal amount of documents to return. The skip is applied
before the limit restriction.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public SimpleByResultEntity executeSimpleRemoveByExample(String collectionName, Map<String,Object> example, Boolean waitForSync, Integer limit) throws ArangoException
collectionName
- - The collection name.example
- - The example as a map.waitForSync
- - if set to true the response is returned when the server has
finished.limit
- - limits the amount of documents which will be deleted.ArangoException
public SimpleByResultEntity executeSimpleReplaceByExample(String collectionName, Map<String,Object> example, Map<String,Object> newValue, Boolean waitForSync, Integer limit) throws ArangoException
collectionName
- - The collection name.example
- - The example as a map.newValue
- - The new values.waitForSync
- - if set to true the response is returned when the server has
finished.limit
- - limits the amount of documents which will be replaced.ArangoException
public SimpleByResultEntity executeSimpleUpdateByExample(String collectionName, Map<String,Object> example, Map<String,Object> newValue, Boolean keepNull, Boolean waitForSync, Integer limit) throws ArangoException
collectionName
- - The collection name.example
- - The example as a map.newValue
- - The new values.keepNull
- - - If true null values are kept.waitForSync
- - if set to true the response is returned when the server has
finished.limit
- - limits the amount of documents which will be updated.ArangoException
public <T> DocumentResultEntity<T> executeSimpleFirst(String collectionName, Integer count, Class<?> clazz) throws ArangoException
collectionName
- - The collection name.count
- - the number of documents to return at most. Specifiying count is
optional. If it is not specified, it defaults to 1.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public <T> DocumentResultEntity<T> executeSimpleLast(String collectionName, Integer count, Class<?> clazz) throws ArangoException
collectionName
- - The collection name.count
- - the number of documents to return at most. Specifiying count is
optional. If it is not specified, it defaults to 1.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.ArangoException
public DefaultEntity createUser(String username, String passwd, Boolean active, Map<String,Object> extra) throws ArangoException
username
- - the username as stringpasswd
- - the username as stringactive
- - if true the user is activeextra
- - additional user dataArangoException
public DefaultEntity replaceUser(String username, String passwd, Boolean active, Map<String,Object> extra) throws ArangoException
username
- - the username as stringpasswd
- - the username as stringactive
- - if true the user is activeextra
- - additional user dataArangoException
public DefaultEntity updateUser(String username, String passwd, Boolean active, Map<String,Object> extra) throws ArangoException
username
- - the username as stringpasswd
- - the username as stringactive
- - if true the user is activeextra
- - additional user dataArangoException
public DefaultEntity deleteUser(String username) throws ArangoException
username
- - the username as stringArangoException
public UserEntity getUser(String username) throws ArangoException
username
- - the username as stringArangoException
public List<DocumentEntity<UserEntity>> getUsersDocument() throws ArangoException
ArangoException
public List<UserEntity> getUsers() throws ArangoException
ArangoException
public ImportResultEntity importDocuments(String collection, Boolean createCollection, Collection<?> values) throws ArangoException
collection
- - the collection as a stringcreateCollection
- - if set to true the collection is created if it does not existvalues
- - a list of Objects that will be stored as documentsArangoException
public ImportResultEntity importDocumentsByHeaderValues(String collection, Boolean createCollection, Collection<? extends Collection<?>> headerValues) throws ArangoException
collection
- - the collection as a stringcreateCollection
- - if set to true the collection is created if it does not existheaderValues
- - a list of lists that will be stored as documentsArangoException
public DatabaseEntity getCurrentDatabase() throws ArangoException
ArangoException
public StringsResultEntity getDatabases() throws ArangoException
ArangoException
public StringsResultEntity getDatabases(boolean currentUserAccessableOnly) throws ArangoException
currentUserAccessableOnly
- - If true only the databases are returned that the current user
can accessArangoException
public StringsResultEntity getDatabases(String username, String password) throws ArangoException
username
- - the username as stringpassword
- - the password as stringArangoException
public BooleanResultEntity createDatabase(String database, UserEntity... users) throws ArangoException
database
- - the database name as a stringusers
- - a list of users which are supposed to have access to the
databaseArangoException
public BooleanResultEntity deleteDatabase(String database) throws ArangoException
database
- - the database name as a stringArangoException
public BooleanResultEntity createEndpoint(String endpoint, String... databases) throws ArangoException
endpoint
- - the endpoint as stringdatabases
- - a list of databases that are allowed on this endpointArangoException
public List<Endpoint> getEndpoints() throws ArangoException
ArangoException
public BooleanResultEntity deleteEndpoint(String endpoint) throws ArangoException
endpoint
- - the endpoint as stringArangoException
public ReplicationInventoryEntity getReplicationInventory() throws ArangoException
ArangoException
public ReplicationInventoryEntity getReplicationInventory(boolean includeSystem) throws ArangoException
includeSystem
- - if true the system collections are included into the resultArangoException
public <T> void getReplicationDump(String collectionName, Long from, Long to, Integer chunkSize, Boolean ticks, Class<T> clazz, DumpHandler<T> handler) throws ArangoException
collectionName
- - the collection namefrom
- - Lower bound tick value for results.to
- - Upper bound tick value for results.chunkSize
- - Approximate maximum size of the returned result.ticks
- - Whether or not to include tick values in the dump. Default value
is true.clazz
- - the expected class, the result from the server request is
deserialized to an instance of this class.handler
- - a handler object that processes the dumpArangoException
public ReplicationSyncEntity syncReplication(String endpoint, String database, String username, String password, RestrictType restrictType, String... restrictCollections) throws ArangoException
endpoint
- - the endpoint as stringdatabase
- - the database name as a stringusername
- - the username as stringpassword
- - the password as stringrestrictType
- - collection filtering. When specified, the allowed values are
include or exclude.restrictCollections
- - If restrictType is include, only the specified collections will
be sychronised. If restrictType is exclude, all but the specified
collections will be synchronized.ArangoException
public String getReplicationServerId() throws ArangoException
ArangoException
public boolean startReplicationLogger() throws ArangoException
ArangoException
public boolean stopReplicationLogger() throws ArangoException
ArangoException
public ReplicationLoggerStateEntity getReplicationLoggerState() throws ArangoException
ArangoException
public ReplicationLoggerConfigEntity getReplicationLoggerConfig() throws ArangoException
ArangoException
public ReplicationLoggerConfigEntity setReplicationLoggerConfig(Boolean autoStart, Boolean logRemoteChanges, Long maxEvents, Long maxEventsSize) throws ArangoException
autoStart
- - if true autoStart is activatedlogRemoteChanges
- - if true remote changes are loggedmaxEvents
- - the maximum amount of events to logmaxEventsSize
- - the maximum size of eventsArangoException
public ReplicationApplierConfigEntity getReplicationApplierConfig() throws ArangoException
ArangoException
public ReplicationApplierConfigEntity setReplicationApplierConfig(String endpoint, String database, String username, String password, Integer maxConnectRetries, Integer connectTimeout, Integer requestTimeout, Integer chunkSize, Boolean autoStart, Boolean adaptivePolling) throws ArangoException
endpoint
- - the logger server to connect to (e.g.
"tcp://192.168.173.13:8529").database
- - the name of the database on the endpoint.username
- - an optional ArangoDB username to use when connecting to the
endpointpassword
- - the password to use when connecting to the endpoint.maxConnectRetries
- - the maximum number of connection attempts the applier will make
in a row. If the applier cannot establish a connection to the
endpoint in this number of attempts, it will stop itself.connectTimeout
- - the timeout (in seconds) when attempting to connect to the
endpoint. This value is used for each connection attempt.requestTimeout
- - the timeout (in seconds) for individual requests to the
endpoint.chunkSize
- - the requested maximum size for log transfer packets that is used
when the endpoint is contacted.autoStart
- - whether or not to auto-start the replication applier on (next
and following) server startsadaptivePolling
- - if set to true, the replication applier will fall to sleep for
an increasingly long period in case the logger server at the
endpoint does not have any more replication events to apply.ArangoException
public ReplicationApplierConfigEntity setReplicationApplierConfig(ReplicationApplierConfigEntity replicationApplierConfigEntity) throws ArangoException
replicationApplierConfigEntity
- - an instance of ReplicationApplierConfigEntity containing the
complete configArangoException
public ReplicationApplierStateEntity startReplicationApplier(Long from) throws ArangoException
from
- - The remote lastLogTick value from which to start applying.ArangoException
public ReplicationApplierStateEntity stopReplicationApplier() throws ArangoException
ArangoException
public ReplicationApplierStateEntity getReplicationApplierState() throws ArangoException
ArangoException
public GraphsEntity getGraphs() throws ArangoException
ArangoException
public List<String> getGraphList() throws ArangoException
ArangoException
public GraphEntity createGraph(String graphName, List<EdgeDefinitionEntity> edgeDefinitions, List<String> orphanCollections, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph to be created.edgeDefinitions
- List of the graphs edge definitions.orphanCollections
- List of the graphs orphan collections.waitForSync
- Wait for sync.ArangoException
public GraphEntity createGraph(String graphName, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph to be created.waitForSync
- Wait for sync.ArangoException
public GraphEntity getGraph(String graphName) throws ArangoException
graphName
- The name of the graph.ArangoException
public DeletedEntity deleteGraph(String graphName) throws ArangoException
graphName
- Name of the graph to be deleted.ArangoException
public void deleteGraph(String graphName, Boolean dropCollections) throws ArangoException
graphName
- Name of the graph to be deleted.dropCollections
- Indicates if the collections of the graph will be droppedArangoException
public List<String> graphGetVertexCollections(String graphName) throws ArangoException
graphName
- The graph name.ArangoException
public DeletedEntity graphDeleteVertexCollection(String graphName, String collectionName, Boolean dropCollection) throws ArangoException
graphName
- The graph name.collectionName
- The name of the vertex collection to be removed from the graph.dropCollection
- Indicates if the collection will be droppedArangoException
public GraphEntity graphCreateVertexCollection(String graphName, String collectionName) throws ArangoException
graphName
- The graph name.collectionName
- The name of the collection to be created.ArangoException
public List<String> graphGetEdgeCollections(String graphName) throws ArangoException
graphName
- The graph name.ArangoException
public GraphEntity graphCreateEdgeDefinition(String graphName, EdgeDefinitionEntity edgeDefinition) throws ArangoException
graphName
- The graph name.edgeDefinition
- The edge definition to be added.ArangoException
public GraphEntity graphReplaceEdgeDefinition(String graphName, String edgeCollectionName, EdgeDefinitionEntity edgeDefinition) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the edge collection of the edge definition that has to
be replaced.edgeDefinition
- The new edge definition.ArangoException
public GraphEntity graphDeleteEdgeDefinition(String graphName, String edgeCollectionName, Boolean dropCollection) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of edge collection of the edge definition which has to be
deleted.ArangoException
public <T> DocumentEntity<T> graphCreateVertex(String graphName, String collectionName, T vertex, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.collectionName
- The name of the collection, where the vertex will be created.vertex
- The vertex object to be storedwaitForSync
- Wait for sync.ArangoException
public <T> DocumentEntity<T> graphGetVertex(String graphName, String collectionName, String key, Class<?> clazz) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to get.key
- The key (document handle) of the vertex to get.clazz
- The class of the vertex to get.ArangoException
public <T> DocumentEntity<T> graphGetVertex(String graphName, String collectionName, String key, Class<?> clazz, Long ifNoneMatchRevision, Long ifMatchRevision) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to get.key
- The key (document handle) of the vertex to get.clazz
- The class of the vertex to get.ifMatchRevision
- If not null the revision of the vertex in the database has to be
equal to return a document.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to be
different to return a document.ArangoException
public DeletedEntity graphDeleteVertex(String graphName, String collectionName, String key) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to delete.key
- The key (document handle) of the vertex to delete.ArangoException
public DeletedEntity graphDeleteVertex(String graphName, String collectionName, String key, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to delete.key
- The key (document handle) of the vertex to delete.waitForSync
- Wait for sync.ArangoException
public DeletedEntity graphDeleteVertex(String graphName, String collectionName, String key, Boolean waitForSync, Long ifMatchRevision, Long ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to delete.key
- The key (document handle) of the vertex to delete.waitForSync
- Wait for sync.ifMatchRevision
- If not null the revision of the vertex in the database has to be
equal to return a document.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to be
different to return a document.ArangoException
public <T> DocumentEntity<T> graphReplaceVertex(String graphName, String collectionName, String key, Object vertex) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to replace.key
- The key (document handle) of the vertex to replace.vertex
- The object to replace the existing vertex.ArangoException
public <T> DocumentEntity<T> graphReplaceVertex(String graphName, String collectionName, String key, Object vertex, Boolean waitForSync, Long ifMatchRevision, Long ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to replace.key
- The key (document handle) of the vertex to replace.vertex
- The object to replace the existing vertex.waitForSync
- Wait for sync.ifMatchRevision
- If not null the revision of the vertex in the database has to be
equal to replace the document.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to be
different to replace the document.ArangoException
public <T> DocumentEntity<T> graphUpdateVertex(String graphName, String collectionName, String key, Object vertex, Boolean keepNull) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to update.key
- The key (document handle) of the vertex to be updated.vertex
- The object to update the existing vertex.keepNull
- ArangoException
public <T> DocumentEntity<T> graphUpdateVertex(String graphName, String collectionName, String key, Object vertex, Boolean keepNull, Boolean waitForSync, Long ifMatchRevision, Long ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.collectionName
- The collection, containing the vertex to update.key
- The key (document handle) of the vertex to be updated.vertex
- The object to update the existing vertex.keepNull
- waitForSync
- Wait for sync.ifMatchRevision
- If not null the revision of the vertex in the database has to be
equal to update the document.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to be
different to update the document.ArangoException
public <T> EdgeEntity<T> graphCreateEdge(String graphName, String edgeCollectionName, String fromHandle, String toHandle, Object value, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection where the edge will be created.fromHandle
- Document handle of vertex, where the edge comes from.toHandle
- Document handle of vertex, where the edge goes to.value
- Object to be stored with edge.waitForSync
- Wait for sync.ArangoException
public <T> EdgeEntity<T> graphCreateEdge(String graphName, String edgeCollectionName, String key, String fromHandle, String toHandle, Object value, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection where the edge will be created.key
- The key of the edge to create (has to be unique).fromHandle
- Document handle of vertex, where the edge comes from.toHandle
- Document handle of vertex, where the edge goes to.value
- Object to be stored with edge.waitForSync
- Wait for sync.ArangoException
public <T> EdgeEntity<T> graphCreateEdge(String graphName, String edgeCollectionName, String key, String fromHandle, String toHandle) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection where the edge will be created.key
- The key of the edge to create (has to be unique).fromHandle
- Document handle of vertex, where the edge comes from.toHandle
- Document handle of vertex, where the edge goes to.ArangoException
public <T> EdgeEntity<T> graphGetEdge(String graphName, String edgeCollectionName, String key, Class<?> clazz, Long ifMatchRevision, Long ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to get.key
- The key of the edge to get.clazz
- The class of the edge to get.ifMatchRevision
- If not null the revision of the vertex in the database has to be
equal to load the edge.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to be
different to load the edge.ArangoException
public <T> EdgeEntity<T> graphGetEdge(String graphName, String edgeCollectionName, String key, Class<?> clazz) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to get.key
- The key of the edge to get.clazz
- The class of the edge to get.ArangoException
public DeletedEntity graphDeleteEdge(String graphName, String edgeCollectionName, String key) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to delete.key
- The key of the edge to delete.ArangoException
public DeletedEntity graphDeleteEdge(String graphName, String edgeCollectionName, String key, Boolean waitForSync) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to delete.key
- The key of the edge to delete.waitForSync
- Wait for sync.ArangoException
public DeletedEntity graphDeleteEdge(String graphName, String edgeCollectionName, String key, Boolean waitForSync, Long ifMatchRevision, Long ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to delete.key
- The key of the edge to delete.waitForSync
- Wait for sync.ifMatchRevision
- If not null the revision of the vertex in the database has to be
equal to delete the edge.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to be
different to delete the edge.ArangoException
public <T> EdgeEntity<T> graphReplaceEdge(String graphName, String edgeCollectionName, String key, Object value) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to replace.key
- The key of the edge to replace.value
- The object to replace the existing edge.ArangoException
public <T> EdgeEntity<T> graphReplaceEdge(String graphName, String edgeCollectionName, String key, Object value, Boolean waitForSync, Long ifMatchRevision, Long ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to replace.key
- The key of the edge to replace.value
- The object to replace the existing edge.waitForSync
- Wait for sync.ifMatchRevision
- If not null the revision of the vertex in the database has to be
equal to replace the edge.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to be
different to replace the edge.ArangoException
public <T> EdgeEntity<T> graphUpdateEdge(String graphName, String edgeCollectionName, String key, Object value, Boolean keepNull) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to update.key
- The key of the edge to update.value
- The object to update the existing edge.keepNull
- ArangoException
public <T> EdgeEntity<T> graphUpdateEdge(String graphName, String edgeCollectionName, String key, Object value, Boolean waitForSync, Boolean keepNull, Long ifMatchRevision, Long ifNoneMatchRevision) throws ArangoException
graphName
- The name of the graph.edgeCollectionName
- The name of the collection containing edge to update.key
- The key of the edge to update.value
- The object to update the existing edge.waitForSync
- Wait for sync.keepNull
- ifMatchRevision
- If not null the revision of the vertex in the database has to be
equal to update the edge.ifNoneMatchRevision
- If not null the revision of the vertex in the database has to be
different to update the edge.ArangoException
public CursorEntity<PlainEdgeEntity> graphGetEdges(String graphName) throws ArangoException
graphName
- The name of the graph.ArangoException
public <T> CursorEntity<T> graphGetEdges(String graphName, Class<T> clazz, String vertexDocumentHandle) throws ArangoException
graphName
- clazz
- vertexDocumentHandle
- ArangoException
public <T,S> CursorEntity<T> graphGetEdgesByExampleObject(String graphName, Class<T> clazzT, S vertexExample) throws ArangoException
graphName
- clazzT
- vertexExample
- ArangoException
public <T> CursorEntity<T> graphGetEdgesByExampleMap(String graphName, Class<T> clazzT, Map<String,Object> vertexExample) throws ArangoException
graphName
- The name of the graph.clazzT
- Class of returned edge documents.vertexExample
- Map with example of vertex, where edges start or end.ArangoException
public DefaultEntity createAqlFunction(String name, String code) throws ArangoException
name
- - the name of the function as stringcode
- - the function as javascript stringArangoException
public AqlFunctionsEntity getAqlFunctions(String namespace) throws ArangoException
namespace
- - the namespaceArangoException
public DefaultEntity deleteAqlFunction(String name, boolean isNameSpace) throws ArangoException
name
- - This is either the name of a function or a namespaceisNameSpace
- - If set to true the param *name* is treated as a namespaceArangoException
public TransactionEntity createTransaction(String action)
action
- - the transaction as javascript codepublic TransactionResultEntity executeTransaction(TransactionEntity transactionEntity) throws ArangoException
transactionEntity
- - The configuration object containing all data for the transactionArangoException
Copyright © 2012–2015 ArangoDB GmbH. All rights reserved.