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

io.sphere.sdk.channels.queries.ChannelQuery Maven / Gradle / Ivy

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

import com.fasterxml.jackson.core.type.TypeReference;
import io.sphere.sdk.channels.Channel;
import io.sphere.sdk.queries.DefaultModelQuery;
import io.sphere.sdk.queries.PagedQueryResult;
import io.sphere.sdk.queries.QueryDsl;

/**
 {@doc.gen summary channels}
 */
public class ChannelQuery extends DefaultModelQuery {
    private ChannelQuery() {
        super(ChannelsEndpoint.ENDPOINT.endpoint(), resultTypeReference());
    }

    public static TypeReference> resultTypeReference() {
        return new TypeReference>(){
            @Override
            public String toString() {
                return "TypeReference>";
            }
        };
    }

    public QueryDsl byKey(final String key) {
        return withPredicate(model().key().is(key));
    }

    public static ChannelQueryModel model() {
        return ChannelQueryModel.get();
    }

    public static ChannelQuery of() {
        return new ChannelQuery();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy