private static final String ROOT_FOLDER = buildDirectory() + File.separator + "NEO4J";
@Override
public long getNumberOfEntities(SessionFactory sessionFactory) {
ExecutionEngine engine = new ExecutionEngine( getProvider( sessionFactory ).getDataBase() );
ExecutionResult result = engine.execute( ENTITY_COUNT_QUERY );
ResourceIterator<Map<String, Object>> iterator = result.iterator();
if ( iterator.hasNext() ) {
Map<String, Object> next = iterator.next();
return ( (Long) next.get( "COUNT(n)" ) ).longValue();
}