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

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

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

final class EmbeddedQueryPredicate extends QueryModelQueryPredicate {
    private final QueryPredicate predicate;

    public EmbeddedQueryPredicate(final QueryModel queryModel, final QueryPredicate predicate) {
        super(queryModel);
        this.predicate = predicate;
    }

    @Override
    protected String render() {
        final String sphereQuery = predicate.toSphereQuery();
        return getQueryModel().getParent() != null || getQueryModel().getPathSegment() != null ? "(" + sphereQuery + ")" : sphereQuery;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy