public RelationshipQueryStatements() { loadClauseBuilder = new PathRelationshipLoadClauseBuilder(); }
@Override public String build(String label, int depth) { return build("r", label, depth); }
private LoadClauseBuilder loadRelationshipClauseBuilder(int depth) { if (depth < 0) { throw new IllegalArgumentException("Can't load unlimited depth for relationships"); } switch (loadStrategy) { case PATH_LOAD_STRATEGY: return new PathRelationshipLoadClauseBuilder(); case SCHEMA_LOAD_STRATEGY: return new SchemaRelationshipLoadClauseBuilder(metaData.getSchema()); default: throw new IllegalStateException("Unknown loadStrategy " + loadStrategy); } } }