use of org.neo4j.ogm.session.request.strategy.impl.NodeQueryStatements in project neo4j-ogm by neo4j.
the class Neo4jSession method queryStatementsFor.
//
// These helper methods for the delegates are deliberately NOT defined on the Session interface
//
public <T, ID extends Serializable> QueryStatements<ID> queryStatementsFor(Class<T> type, int depth) {
final FieldInfo fieldInfo = metaData.classInfo(type.getName()).primaryIndexField();
String primaryIdName = fieldInfo != null ? fieldInfo.property() : null;
if (metaData.isRelationshipEntity(type.getName())) {
return new RelationshipQueryStatements<>(primaryIdName, loadRelationshipClauseBuilder(depth));
} else {
return new NodeQueryStatements<>(primaryIdName, loadNodeClauseBuilder(depth));
}
}
Aggregations