OrientDBEmbedServer { public boolean shutdown() { return server.shutdown(); } OrientDBEmbedServer(Config config); void init(); void startup(); void startup(String configFilePath); boolean shutdown(); boolean isActive();  }
@Ignore @Test public void testShutdown() { assumeThat(server, notNullValue()); assumeThat(server.isActive(), is(true)); assertThat(server.shutdown(), is(true)); }
@Ignore @Test public void test() { OrientGraphFactory factory = new OrientGraphFactory("plocal:./databases/flowtemp").setupPool(1, 10); ODatabaseDocumentTx db = factory.getDatabase(); OClass c = db.getMetadata().getSchema().getClass("Person2"); System.out.println(c.count()); ODocument doc = new ODocument(c); doc.field("name", "Luke"); doc.field("surname", "Skywalker"); doc.field("city", new ODocument("City").field("name", "Rome").field("country", "Italy")); doc.save(); System.out.println(doc.getClassName()); System.out.println(doc.getSize()); System.out.println(doc.getSchemaClass()); System.out.println(doc.getVersion()); System.out.println(doc.getDatabase()); System.out.println(db.getName()); System.out.println(db.countClass("Person")); for (ODocument document : db.browseClass("Person")) { System.out.println(document); System.out.println(document.field("name")); } List<ODocument> result = db.query(new OSQLSynchQuery<ODocument>("select * from Person where name = 'Luke' and name like 'L%'")); for (ODocument document : result) { System.out.println(document); } db.close(); OrientGraph graph = new OrientGraph("plocal:./databases/flowtemp"); try { Vertex luca = graph.addVertex(null); luca.setProperty("name", "Luca"); Vertex geek = graph.addVertex(null); geek.setProperty("name", "GeekSaga"); graph.addEdge(null, luca, geek, "dev"); graph.commit(); System.out.println("==============="); System.out.println(graph.query()); for (Vertex v : graph.query().has("name").vertices()) { System.out.println(v.getId()); System.out.println(v.getProperty("name")); } System.out.println(graph.query().has("name").vertices()); } catch (Exception e) { e.printStackTrace(); graph.rollback(); } graph.shutdown(); }