io.sphere.sdk.states.queries.StateQuery Maven / Gradle / Ivy
package io.sphere.sdk.states.queries;
import com.fasterxml.jackson.core.type.TypeReference;
import io.sphere.sdk.queries.DefaultModelQuery;
import io.sphere.sdk.queries.PagedQueryResult;
import io.sphere.sdk.queries.QueryDsl;
import io.sphere.sdk.states.State;
public class StateQuery extends DefaultModelQuery {
private StateQuery() {
super(StateEndpoint.ENDPOINT.endpoint(), resultTypeReference());
}
public static StateQuery of() {
return new StateQuery();
}
public QueryDsl byKey(final String key) {
return withPredicate(model().key().is(key));
}
public static TypeReference> resultTypeReference() {
return new TypeReference>(){
@Override
public String toString() {
return "TypeReference>";
}
};
}
public static StateQueryModel model() {
return StateQueryModel.get();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy