@Test public void deleteElements() { app.createElements(); app.deleteElements(); assertFalse(g.V().has("name", "pluto").hasNext()); assertFalse(g.V().has("name", "jupiter").both("brother").has("name", "pluto").hasNext()); }
public void deleteElements() { try { if (g == null) { return; } LOGGER.info("deleting elements"); g.V().has("name", "pluto").drop().iterate(); if (supportsTransactions) { g.tx().commit(); } } catch (Exception e) { LOGGER.error(e.getMessage(), e); if (supportsTransactions) { g.tx().rollback(); } } }
GraphApp { public void deleteElements() { try { if (g == null) { return; } LOGGER.info("deleting elements"); g.V().has("name", "pluto").drop().iterate(); if (supportsTransactions) { g.tx().commit(); } } catch (Exception e) { LOGGER.error(e.getMessage(), e); if (supportsTransactions) { g.tx().rollback(); } } } }
GraphApp { public void deleteElements() { try { if (g == null) { return; } LOGGER.info("deleting elements"); g.V().has("name", "pluto").drop().iterate(); if (supportsTransactions) { g.tx().commit(); } } catch (Exception e) { LOGGER.error(e.getMessage(), e); if (supportsTransactions) { g.tx().rollback(); } } } GraphApp(final String fileName); }
GraphApp { public void deleteElements() { try { if (g == null) { return; } LOGGER.info("deleting elements"); g.V().has("name", "pluto").drop().iterate(); if (supportsTransactions) { g.tx().commit(); } } catch (Exception e) { LOGGER.error(e.getMessage(), e); if (supportsTransactions) { g.tx().rollback(); } } } GraphApp(final String fileName); GraphTraversalSource openGraph(); void closeGraph(); void dropGraph(); void createSchema(); void createElements(); void readElements(); void updateElements(); void deleteElements(); void runApp(); }
GraphApp { public void deleteElements() { try { if (g == null) { return; } LOGGER.info("deleting elements"); g.V().has("name", "pluto").drop().iterate(); if (supportsTransactions) { g.tx().commit(); } } catch (Exception e) { LOGGER.error(e.getMessage(), e); if (supportsTransactions) { g.tx().rollback(); } } } GraphApp(final String fileName); GraphTraversalSource openGraph(); void closeGraph(); void dropGraph(); void createSchema(); void createElements(); void readElements(); void updateElements(); void deleteElements(); void runApp();  }