io.sphere.sdk.queries.EmbeddedQueryPredicate Maven / Gradle / Ivy
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