io.sphere.sdk.queries.DirectionlessQuerySort Maven / Gradle / Ivy
package io.sphere.sdk.queries;
import io.sphere.sdk.models.Base;
import static io.sphere.sdk.queries.QuerySortDirection.*;
/** A sort model to decide the direction. */
public class DirectionlessQuerySort extends Base {
private final QueryModel path;
DirectionlessQuerySort(final QueryModel path) {
this.path = path;
}
public QuerySort asc() {
return getQuerySort(ASC);
}
public QuerySort desc() {
return getQuerySort(DESC);
}
private QuerySort getQuerySort(final QuerySortDirection direction) {
return new SphereQuerySort<>(path, direction);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy