@Test public void itaddsOrderBy() { query.put("order", "-count"); ParsedQuery<Spec> parsed = parser.parse(query); assertThat(parsed.getOrderings()).hasSize(1); for (Ordering ordering : parsed.getOrderings()) { assertThat(ordering.getFieldName()).isEqualTo("count"); } }
public Collection<Ordering> getOrderings() { return orderings; }
ParsedQuery { public Collection<Ordering> getOrderings() { return orderings; } }
ParsedQuery { public Collection<Ordering> getOrderings() { return orderings; } ParsedQuery(
                     T boundQuerySpec,
                     Class<T> queryType,
                     List<BoundFilterEntry<T>> boundFilterEntries,
                     MetaQuerySpec<T> meta,
                     Optional<Integer> limit,
                     Optional<Integer> offset,
                     Collection<Ordering> orderings,
                     boolean includeDeleted);  ParsedQuery(
                     T boundQuerySpec,
                     Class<T> queryType,
                     CombinedConditionCreator<T> combinedConditionCreator,
                     MetaQuerySpec<T> meta,
                     Optional<Integer> limit,
                     Optional<Integer> offset,
                     Collection<Ordering> orderings,
                     boolean includeDeleted); }
ParsedQuery { public Collection<Ordering> getOrderings() { return orderings; } ParsedQuery(
                     T boundQuerySpec,
                     Class<T> queryType,
                     List<BoundFilterEntry<T>> boundFilterEntries,
                     MetaQuerySpec<T> meta,
                     Optional<Integer> limit,
                     Optional<Integer> offset,
                     Collection<Ordering> orderings,
                     boolean includeDeleted);  ParsedQuery(
                     T boundQuerySpec,
                     Class<T> queryType,
                     CombinedConditionCreator<T> combinedConditionCreator,
                     MetaQuerySpec<T> meta,
                     Optional<Integer> limit,
                     Optional<Integer> offset,
                     Collection<Ordering> orderings,
                     boolean includeDeleted); boolean hasFilter(String fieldName); boolean hasFilter(String fieldName, Class<? extends Filter> filterType); void addFilter(String fieldName, Class<? extends Filter> filterType, Object value); void addOrdering(String fieldName, SortOrder order); void addFilterExclusively(String fieldName, Class<? extends Filter> filterType, Object value); void addFilterEntryConditionCreatorExclusively(String fieldName,
                                                        FilterEntryConditionCreator<T> filterEntryConditionCreator); boolean removeFiltersFor(String fieldName); @Deprecated BoundFilterEntry<T> getFirstFilterForFieldName(String fieldName); List<BoundFilterEntry<T>> getAllFiltersForFieldName(String fieldName); void removeAllFilters(); String getCacheKey(); void setLimit(Optional<Integer> limit); void setOffset(Optional<Integer> offset); void setOrderings(Collection<Ordering> orderings); Optional<Integer> getLimit(); Optional<Integer> getOffset(); Collection<Ordering> getOrderings(); boolean getIncludeDeleted(); @Deprecated T getBoundQuery(); List<BoundFilterEntry<T>> getBoundFilterEntries(); CombinedConditionCreator<T> getCombinedConditionCreator(); Class<T> getQueryType(); MetaQuerySpec<T> getMetaData(); @Override ParsedQuery<T> clone(); }
ParsedQuery { public Collection<Ordering> getOrderings() { return orderings; } ParsedQuery(
                     T boundQuerySpec,
                     Class<T> queryType,
                     List<BoundFilterEntry<T>> boundFilterEntries,
                     MetaQuerySpec<T> meta,
                     Optional<Integer> limit,
                     Optional<Integer> offset,
                     Collection<Ordering> orderings,
                     boolean includeDeleted);  ParsedQuery(
                     T boundQuerySpec,
                     Class<T> queryType,
                     CombinedConditionCreator<T> combinedConditionCreator,
                     MetaQuerySpec<T> meta,
                     Optional<Integer> limit,
                     Optional<Integer> offset,
                     Collection<Ordering> orderings,
                     boolean includeDeleted); boolean hasFilter(String fieldName); boolean hasFilter(String fieldName, Class<? extends Filter> filterType); void addFilter(String fieldName, Class<? extends Filter> filterType, Object value); void addOrdering(String fieldName, SortOrder order); void addFilterExclusively(String fieldName, Class<? extends Filter> filterType, Object value); void addFilterEntryConditionCreatorExclusively(String fieldName,
                                                        FilterEntryConditionCreator<T> filterEntryConditionCreator); boolean removeFiltersFor(String fieldName); @Deprecated BoundFilterEntry<T> getFirstFilterForFieldName(String fieldName); List<BoundFilterEntry<T>> getAllFiltersForFieldName(String fieldName); void removeAllFilters(); String getCacheKey(); void setLimit(Optional<Integer> limit); void setOffset(Optional<Integer> offset); void setOrderings(Collection<Ordering> orderings); Optional<Integer> getLimit(); Optional<Integer> getOffset(); Collection<Ordering> getOrderings(); boolean getIncludeDeleted(); @Deprecated T getBoundQuery(); List<BoundFilterEntry<T>> getBoundFilterEntries(); CombinedConditionCreator<T> getCombinedConditionCreator(); Class<T> getQueryType(); MetaQuerySpec<T> getMetaData(); @Override ParsedQuery<T> clone();  }