@Override public DirectionlessQuerySort<T> category(final String categoryId) { return DirectionlessQuerySort.of(new QueryModelImpl<T>(this, categoryId){}); } }
@Override protected String render() { final String sphereQuery = predicate.toSphereQuery(); return getQueryModel().getParent() != null || getQueryModel().getPathSegment() != null ? "(" + sphereQuery + ")" : sphereQuery; } }
/** * Creates a copy of this with the given total items count. * @param total the number of total items in the backend. * @return a copy with total as new total. */ public PagedQueryResultDsl<T> withTotal(final int total) { return PagedQueryResult.of(getOffset(), total, getResults()); } }
/** * Creates a copy of this item with the given offset. * @param offset the offset of the new copy * @return the copy */ public PagedQueryResultDsl<T> withOffset(final Long offset) { return PagedQueryResult.of(offset, getLimit(), getTotal(), getResults()); }
/** * Creates a copy of this with the given total items count. * @param total the number of total items in the backend. * @return a copy with total as new total. */ public PagedQueryResultDsl<T> withTotal(final Long total) { return PagedQueryResult.of(getOffset(), getLimit(), total, getResults()); } }
/** * Creates a copy of this item with the given offset. * @param offset the offset of the new copy * @return the copy */ public PagedQueryResultDsl<T> withOffset(final int offset) { return PagedQueryResult.of(offset, getTotal(), getResults()); }
@SuppressWarnings("unchecked") protected <V> QueryPredicate<T> isPredicate(final V value) { final V normalizedValue = value instanceof String ? (V) normalize((String) value) : value; return ComparisonQueryPredicate.ofIsEqualTo(this, normalizedValue); }
@Override public QueryDsl<T> withSort(final List<Sort<T>> sort) { return copyBuilder().sort(sort).build(); }
@Override public QueryDsl<T> withLimit(final long limit) { return copyBuilder().limit(limit).build(); }
@Override public QueryDsl<T> withExpansionPaths(final List<ExpansionPath<T>> expansionPaths) { return copyBuilder().expansionPaths(expansionPaths).build(); }
@Override public C withOffset(final Long offset) { return copyBuilder().offset(offset).build(); }
protected C withAdditionalQueryParameters(final List<NameValuePair> pairs) { return copyBuilder().additionalQueryParameters(pairs).build(); } }
@Override public QueryPredicate<T> containsAny(final Iterable<String> items) { final List<String> normalizedValues = normalizeIterable(items); return new ContainsAnyPredicate<>(this, normalizedValues); } }
@Override public QueryPredicate<T> containsAny(final Iterable<E> items) { final List<String> strings = transformSphereEnumeration(items); return new ContainsAnyPredicate<>(this, strings); } }
@Override public QueryPredicate<T> containsAll(final Iterable<E> items) { final List<String> strings = transformSphereEnumeration(items); return new ContainsAllPredicate<>(this, strings); }
@Override public QueryPredicate<T> containsAll(final Iterable<String> items) { final List<String> normalizedValues = normalizeIterable(items); return new ContainsAllPredicate<>(this, normalizedValues); }
@Override public DirectionlessQuerySort<T> category(final String categoryId) { return DirectionlessQuerySort.of(new QueryModelImpl<T>(this, categoryId){}); } }
@Override public DirectionlessQuerySort<T> category(final String categoryId) { return DirectionlessQuerySort.of(new QueryModelImpl<T>(this, categoryId){}); } }