Java Code Examples for com.arangodb.entity.BaseDocument#setKey()
The following examples show how to use
com.arangodb.entity.BaseDocument#setKey() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ArangoVertexCollectionTest.java From arangodb-java-driver with Apache License 2.0 | 6 votes |
@Test public void duplicateInsertSameObjectVertex() { final ArangoVertexCollection vertexCollection = vertices; // ######################################################### // Create a new BaseDocument // ######################################################### UUID uuid = UUID.randomUUID(); BaseDocument bd = new BaseDocument(); bd.setKey(uuid.toString()); bd.addAttribute("name", "Paul"); vertexCollection.insertVertex(bd); UUID uuid2 = UUID.randomUUID(); BaseDocument bd2 = new BaseDocument(); bd2.setKey(uuid2.toString()); bd2.addAttribute("name", "Paul"); vertexCollection.insertVertex(bd2); }
Example 2
Source File: AQLActorsAndMoviesExample.java From arangodb-java-driver-async with Apache License 2.0 | 5 votes |
private static DocumentCreateEntity<BaseDocument> saveMovie( final ArangoCollectionAsync movies, final String key, final String title, final int released, final String tagline) throws InterruptedException, ExecutionException { final BaseDocument value = new BaseDocument(); value.setKey(key); value.addAttribute("title", title); value.addAttribute("released", released); value.addAttribute("tagline", tagline); return movies.insertDocument(value).get(); }
Example 3
Source File: AQLActorsAndMoviesExample.java From arangodb-java-driver-async with Apache License 2.0 | 5 votes |
private static DocumentCreateEntity<BaseDocument> saveActor( final ArangoCollectionAsync actors, final String key, final String name, final int born) throws InterruptedException, ExecutionException { final BaseDocument value = new BaseDocument(); value.setKey(key); value.addAttribute("name", name); value.addAttribute("born", born); return actors.insertDocument(value).get(); }
Example 4
Source File: AQLActorsAndMoviesExample.java From arangodb-java-driver with Apache License 2.0 | 5 votes |
private static DocumentCreateEntity<BaseDocument> saveMovie( final ArangoCollection movies, final String key, final String title, final int released, final String tagline) { final BaseDocument value = new BaseDocument(); value.setKey(key); value.addAttribute("title", title); value.addAttribute("released", released); value.addAttribute("tagline", tagline); return movies.insertDocument(value); }
Example 5
Source File: AQLActorsAndMoviesExample.java From arangodb-java-driver with Apache License 2.0 | 5 votes |
private static DocumentCreateEntity<BaseDocument> saveActor( final ArangoCollection actors, final String key, final String name, final int born) { final BaseDocument value = new BaseDocument(); value.setKey(key); value.addAttribute("name", name); value.addAttribute("born", born); return actors.insertDocument(value); }
Example 6
Source File: AQLActorsAndMoviesExample.java From arangodb-java-driver with Apache License 2.0 | 5 votes |
private static DocumentCreateEntity<BaseDocument> saveMovie( final ArangoCollectionAsync movies, final String key, final String title, final int released, final String tagline) throws InterruptedException, ExecutionException { final BaseDocument value = new BaseDocument(); value.setKey(key); value.addAttribute("title", title); value.addAttribute("released", released); value.addAttribute("tagline", tagline); return movies.insertDocument(value).get(); }
Example 7
Source File: AQLActorsAndMoviesExample.java From arangodb-java-driver with Apache License 2.0 | 5 votes |
private static DocumentCreateEntity<BaseDocument> saveActor( final ArangoCollectionAsync actors, final String key, final String name, final int born) throws InterruptedException, ExecutionException { final BaseDocument value = new BaseDocument(); value.setKey(key); value.addAttribute("name", name); value.addAttribute("born", born); return actors.insertDocument(value).get(); }