Examples of Neo4JContext


Examples of er.neo4jadaptor.Neo4JContext

  public static void ensureInitialized() {
    // do nothing, it will trigger static class initializer
  }
 
  public static void cleanup() {
    Neo4JContext context = context();
    EOModel model = ERXModelGroup.globalModelGroup().modelNamed(MODEL_NAME);
   
    context.beginTransaction();
    try {
      for (EOEntity e : model.entities()) {
        Store<?, Neo4JErsatz> store = context.entityStoreForEntity(e);
       
        Cursor<Neo4JErsatz> cursor = store.query(null);
       
        try {
          while (cursor.hasNext()) {
            store.delete(cursor.next());
          }
        } finally {
          cursor.close();
        }
      }
      context.commitTransaction();
    } finally {
      context.rollbackTransaction();
    }
  }
View Full Code Here

Examples of er.neo4jadaptor.Neo4JContext

  }
 
  private static Neo4JContext context() {
    EOEditingContext ec = ERXEC.newEditingContext();
    EODatabaseContext dbContext = EOUtilities.databaseContextForModelNamed(ec, MODEL_NAME);
    Neo4JContext context = (Neo4JContext) dbContext.availableChannel().adaptorChannel().adaptorContext();
   
    return context;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.