All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.queries.StringQuerySortingModel Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.queries;

public interface StringQuerySortingModel extends QuerySortingModel, StringQueryModel {
    @Override
    QuerySort sort(QuerySortDirection sortDirection);

    @Override
    DirectionlessQuerySort sort();

    @Override
    QueryPredicate is(String s);

    @Override
    QueryPredicate isNot(String s);

    @Override
    QueryPredicate isIn(Iterable args);

    @Override
    QueryPredicate isGreaterThan(String s);

    @Override
    QueryPredicate isLessThan(String s);

    @Override
    QueryPredicate isLessThanOrEqualTo(String s);

    @Override
    QueryPredicate isGreaterThanOrEqualTo(String s);

    @Override
    QueryPredicate isNotIn(Iterable args);

    @Override
    QueryPredicate isPresent();

    @Override
    QueryPredicate isNotPresent();


    /**
     * Internal: Escapes Strings like that (Scala notation) """query by name " test name"""
     * @param s the unescaped String
     * @return the escaped string
     */
    static String escape(final String s) {
        return s.replace("\"", "\\\"");
    }

    /**
     * Internal method to normalize Strings for queries.
     * @param s the unescaped String
     * @return the escaped String
     */
    static String normalize(final String s) {
        return '"' + escape(s) + '"';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy