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-M26
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.customobjects.expansion.CustomObjectExpansionModel;
import io.sphere.sdk.json.TypeReferences;
import io.sphere.sdk.queries.MetaModelQueryDsl;

/**
 * 

Queries custom objects.

* * * * * {@include.example io.sphere.sdk.customobjects.queries.CustomObjectQueryTest#queryByContainer()} * * @param The type of the value of this custom object. * @see CustomObject */ public interface CustomObjectQuery extends MetaModelQueryDsl, CustomObjectQuery, CustomObjectQueryModel>, CustomObjectExpansionModel>> { /** * Query object for custom objects where the result value is a POJO. * @param valueTypeReference the type reference of the value of the custom object * @param the Java type of the value of the custom object * @return query object */ static CustomObjectQuery of(final TypeReference valueTypeReference) { return new CustomObjectQueryImpl<>(valueTypeReference); } /** * Query object for custom objects where the result value is a POJO. * @param valueClass the class of the value, if it not uses generics like lists, typically for POJOs * @param the Java type of the value of the custom object * @return query object */ static CustomObjectQuery of(final Class valueClass) { return new CustomObjectQueryImpl<>(valueClass); } /** * * @deprecated use {@link #ofJsonNode()} instead * @return CustomObjectQuery */ @Deprecated static CustomObjectQuery of() { return ofJsonNode(); } static CustomObjectQuery ofJsonNode() { return of(TypeReferences.jsonNodeTypeReference()); } default CustomObjectQuery byContainer(final String container) { return withPredicates(CustomObjectQueryModel.>of().container().is(container)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy