public QueryResult classOnlyQuery(QQueryBase query, ClassMetadata clazz) {
    if (!clazz.hasClassIndex()) {
      return new IdListQueryResult(query.transaction());
    }

    final AbstractQueryResult queryResult = newQueryResult(query.transaction());
    queryResult.loadFromClassIndex(clazz);
    return queryResult;
  }
 public QueryResult executeQuery(QQuery query) {
   AbstractQueryResult queryResult = newQueryResult(query.transaction());
   queryResult.loadFromQuery(query);
   return queryResult;
 }
 public AbstractQueryResult getAll(Transaction trans, QueryEvaluationMode mode) {
   final AbstractQueryResult queryResult = newQueryResult(trans, mode);
   queryResult.loadFromClassIndexes(classCollection().iterator());
   return queryResult;
 }