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

io.sphere.sdk.customobjects.queries.CustomObjectQuery Maven / Gradle / Ivy

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

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import io.sphere.sdk.customobjects.CustomObject;
import io.sphere.sdk.queries.DefaultModelQuery;
import io.sphere.sdk.queries.PagedQueryResult;
import io.sphere.sdk.queries.QueryDsl;

public class CustomObjectQuery extends DefaultModelQuery> {

    private static final TypeReference>> RESULT_TYPE_REFERENCE = new TypeReference>>() {
        @Override
        public String toString() {
            return "TypeReference>>";
        }
    };

    private CustomObjectQuery(final TypeReference>> resultTypeReference) {
        super(CustomObjectsEndpoint.PATH, resultTypeReference);
    }

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

    public static  CustomObjectQuery of(final TypeReference>> resultTypeReference) {
        return new CustomObjectQuery<>(resultTypeReference);
    }

    public static CustomObjectQuery of() {
        return of(RESULT_TYPE_REFERENCE);
    }

    public QueryDsl> byContainer(final String container) {
        return withPredicate(CustomObjectQuery.model().container().is(container));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy