}
public Element buildQuery(SearchRequestRepository requestRepository, String service, ISODate dateFrom,
ISODate dateTo, String graphicType) {
DateInterval dateInterval = this.queryFragments.get(graphicType);
final List<Pair<DateInterval, Integer>> requestDateToRequestCountBetween = requestRepository
.getRequestDateToRequestCountBetween(dateInterval, dateFrom, dateTo, SearchRequestSpecs.hasService(service));
Element results = new Element("requests");
for (Pair<DateInterval, Integer> entry : requestDateToRequestCountBetween) {