OgmQueryLoader loaderToUse = loader != null ? loader : getLoader( queryParameters );
return loaderToUse.list( session, queryParameters );
}
private <T> OgmQueryLoader getLoader(QueryParameters queryParameters) {
QueryParsingResult queryParsingResult = queryParameters != null ?
getQuery( queryParameters ) :
queryParser.parseQuery( sessionFactory, query );
BackendQuery<T> query = new BackendQuery<T>( (T) queryParsingResult.getQueryObject(), singleEntityKeyMetadata );
return new OgmQueryLoader( delegate, sessionFactory, selectClause, query, queryParsingResult.getColumnNames() );
}