io.sphere.sdk.queries.IntegerLikeQuerySortingModel Maven / Gradle / Ivy
package io.sphere.sdk.queries;
import javax.annotation.Nullable;
import static io.sphere.sdk.utils.ListUtils.listOf;
/**
*
* @param context type, like Channel
* @param argument type, Integer or Long
*/
abstract class IntegerLikeQuerySortingModel extends QueryModelImpl
implements QuerySortingModel, OptionalQueryModel, EqualityQueryModel,
NotEqualQueryModel, IsInQueryModel, IsNotInQueryModel, InequalityQueryModel {
protected IntegerLikeQuerySortingModel(@Nullable final QueryModel parent, @Nullable final String pathSegment) {
super(parent, pathSegment);
}
@Override
public QuerySort sort(final QuerySortDirection sortDirection) {
return new SphereQuerySort<>(this, sortDirection);
}
@Override
public DirectionlessQuerySort sort() {
return new DirectionlessQuerySort<>(this);
}
@Override
public QueryPredicate is(final V i) {
return isPredicate(i);
}
@Override
public QueryPredicate isNot(final V i) {
return isNotPredicate(i);
}
@Override
public QueryPredicate isIn(final Iterable args) {
return isInPredicate(args);
}
@Override
public QueryPredicate isGreaterThan(final V value) {
return isGreaterThanPredicate(value);
}
@Override
public QueryPredicate isLessThan(final V value) {
return isLessThanPredicate(value);
}
@Override
public QueryPredicate isLessThanOrEqualTo(final V value) {
return isLessThanOrEqualToPredicate(value);
}
@Override
public QueryPredicate isGreaterThanOrEqualTo(final V value) {
return isGreaterThanOrEqualToPredicate(value);
}
@Override
public QueryPredicate isNotIn(final Iterable args) {
return isNotInPredicate(args);
}
@Override
public QueryPredicate isPresent() {
return isPresentPredicate();
}
@Override
public QueryPredicate isNotPresent() {
return isNotPresentPredicate();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy