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();
}
}