public interface CustomerInStoreQuery extends MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>
MAX_OFFSET, MIN_OFFSET| Modifier and Type | Method and Description |
|---|---|
default CustomerInStoreQuery |
byEmail(String email) |
static CustomerInStoreQuery |
of(String storeKey) |
CustomerInStoreQuery |
plusExpansionPaths(Function<CustomerExpansionModel<Customer>,ExpansionPathContainer<Customer>> m)
Creates a new object with the properties of the old object but adds a new expansion path to it by using meta models.
|
CustomerInStoreQuery |
plusPredicates(Function<CustomerQueryModel,QueryPredicate<Customer>> m)
Returns a new instance with the new predicate appended (AND semantics).
|
CustomerInStoreQuery |
plusPredicates(List<QueryPredicate<Customer>> queryPredicates)
Returns a new instance with the new predicate list appended to the existing predicates (AND semantic).
|
CustomerInStoreQuery |
plusPredicates(QueryPredicate<Customer> queryPredicate)
Returns a new instance with the new predicate appended to the existing predicates (AND semantic).
|
CustomerInStoreQuery |
plusSort(Function<CustomerQueryModel,QuerySort<Customer>> m)
Returns a query with the sort expression appended to the existing ones.
|
CustomerInStoreQuery |
plusSort(List<QuerySort<Customer>> sort)
Returns a query with the sort expressions appended to the existing ones.
|
CustomerInStoreQuery |
plusSort(QuerySort<Customer> sort)
Returns a query with the sort expression appended to the existing ones.
|
static com.fasterxml.jackson.core.type.TypeReference<PagedQueryResult<Customer>> |
resultTypeReference()
Creates a container which contains the full Java type information to deserialize the query result (NOT this class) from JSON.
|
CustomerInStoreQuery |
withExpansionPaths(Function<CustomerExpansionModel<Customer>,ExpansionPathContainer<Customer>> m)
Creates a new object with the properties of the old object but replaces all expansion paths with a single
expansionPath by using meta models. |
CustomerInStoreQuery |
withFetchTotal(boolean fetchTotal)
Enables/disables a flag it the total amount of items should be counted.
|
CustomerInStoreQuery |
withLimit(Long limit)
Creates a new instance which a limited amount of results.
|
CustomerInStoreQuery |
withOffset(Long offset)
Returns a new query with the new offset as offset.
|
CustomerInStoreQuery |
withPredicates(Function<CustomerQueryModel,QueryPredicate<Customer>> predicateFunction)
Returns a new instance with the new predicate as only predicate.
|
CustomerInStoreQuery |
withPredicates(List<QueryPredicate<Customer>> queryPredicates)
Returns a new instance with the new predicate list as predicates.
|
CustomerInStoreQuery |
withPredicates(QueryPredicate<Customer> queryPredicate)
Returns a new instance with the new predicate as only predicate.
|
CustomerInStoreQuery |
withSort(Function<CustomerQueryModel,QuerySort<Customer>> m)
Returns a query with the new sort as only sort parameter.
|
CustomerInStoreQuery |
withSort(List<QuerySort<Customer>> sort)
Returns a query with the new sort list as only sort parameters.
|
CustomerInStoreQuery |
withSort(QuerySort<Customer> sort)
Returns a query with the new sort as only sort parameter.
|
CustomerInStoreQuery |
withSortMulti(Function<CustomerQueryModel,List<QuerySort<Customer>>> m)
Returns a query with the new sort list as only sort parameters.
|
plusPredicates, plusSort, withPredicates, withQueryParam, withSortwithLimit, withOffsetendpoint, expansionPaths, fetchTotal, limit, offset, predicates, sortdeserialize, toQuerycanDeserialize, httpRequestIntentplusExpansionPaths, plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPathsstatic com.fasterxml.jackson.core.type.TypeReference<PagedQueryResult<Customer>> resultTypeReference()
static CustomerInStoreQuery of(String storeKey)
CustomerInStoreQuery plusPredicates(Function<CustomerQueryModel,QueryPredicate<Customer>> m)
MetaModelQueryDslplusPredicates in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>m - function given a meta model description of the model return a QueryPredicateMetaModelQueryDsl.withPredicates(Function)CustomerInStoreQuery plusPredicates(QueryPredicate<Customer> queryPredicate)
QueryDslplusPredicates in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>plusPredicates in interface QueryDsl<Customer,CustomerInStoreQuery>queryPredicate - the new predicateQueryDsl.withPredicates(QueryPredicate)CustomerInStoreQuery plusPredicates(List<QueryPredicate<Customer>> queryPredicates)
QueryDslplusPredicates in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>plusPredicates in interface QueryDsl<Customer,CustomerInStoreQuery>queryPredicates - the new predicate listQueryDsl.withPredicates(List)CustomerInStoreQuery plusSort(Function<CustomerQueryModel,QuerySort<Customer>> m)
MetaModelQueryDslplusSort in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>m - function given a meta model description of the model returns a list of QuerySortMetaModelQueryDsl.withSort(Function)CustomerInStoreQuery plusSort(List<QuerySort<Customer>> sort)
QueryDslplusSort in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>plusSort in interface QueryDsl<Customer,CustomerInStoreQuery>sort - sort expressions how the results of the query should be sortedQueryDsl.withSort(List)CustomerInStoreQuery plusSort(QuerySort<Customer> sort)
QueryDslplusSort in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>plusSort in interface QueryDsl<Customer,CustomerInStoreQuery>sort - sort expression how the results of the query should be sortedQueryDsl.withSort(QuerySort)CustomerInStoreQuery withPredicates(Function<CustomerQueryModel,QueryPredicate<Customer>> predicateFunction)
MetaModelQueryDslwithPredicates in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>predicateFunction - function given a meta model description of the model return a QueryPredicateMetaModelQueryDsl.plusPredicates(Function)CustomerInStoreQuery withPredicates(QueryPredicate<Customer> queryPredicate)
QueryDslwithPredicates in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>withPredicates in interface QueryDsl<Customer,CustomerInStoreQuery>queryPredicate - the new predicateQueryDsl.plusPredicates(QueryPredicate)CustomerInStoreQuery withPredicates(List<QueryPredicate<Customer>> queryPredicates)
QueryDslwithPredicates in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>withPredicates in interface QueryDsl<Customer,CustomerInStoreQuery>queryPredicates - the new predicate listQueryDsl.plusPredicates(List)CustomerInStoreQuery withSort(Function<CustomerQueryModel,QuerySort<Customer>> m)
MetaModelQueryDslwithSort in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>m - function given a meta model description of the model returns a QuerySortMetaModelQueryDsl.plusSort(Function)CustomerInStoreQuery withSort(List<QuerySort<Customer>> sort)
QueryDslwithSort in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>withSort in interface QueryDsl<Customer,CustomerInStoreQuery>sort - list of sorts how the results of the query should be sortedQueryDsl.plusSort(List)CustomerInStoreQuery withSort(QuerySort<Customer> sort)
QueryDslwithSort in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>withSort in interface QueryDsl<Customer,CustomerInStoreQuery>sort - sort expression how the results of the query should be sortedQueryDsl.plusSort(QuerySort)CustomerInStoreQuery withSortMulti(Function<CustomerQueryModel,List<QuerySort<Customer>>> m)
MetaModelQueryDslwithSortMulti in interface MetaModelQueryDsl<Customer,CustomerInStoreQuery,CustomerQueryModel,CustomerExpansionModel<Customer>>m - function given a meta model description of the model returns a list of QuerySortMetaModelQueryDsl.plusSort(List),
MetaModelQueryDsl.withSort(Function)CustomerInStoreQuery plusExpansionPaths(Function<CustomerExpansionModel<Customer>,ExpansionPathContainer<Customer>> m)
MetaModelReferenceExpansionDslAn example in the product projection context:
final ProductProjectionByIdGet fetch1 = ProductProjectionByIdGet.of("id", ProductProjectionType.CURRENT) .plusExpansionPaths(m -> m.categories()); assertThat(fetch1.expansionPaths()) .isEqualTo(asList(ExpansionPath.of("categories[*]"))); final ProductProjectionByIdGet fetch2 = fetch1.plusExpansionPaths(m -> m.productType()); assertThat(fetch2.expansionPaths()) .isEqualTo(asList(ExpansionPath.of("categories[*]"), ExpansionPath.of("productType"))) .isEqualTo(listOf(fetch1.expansionPaths(), ExpansionPath.of("productType"))); //this is equivalent to final ExpansionPath<ProductProjection> categoryExpand = ProductProjectionExpansionModel.of().categories().expansionPaths().get(0); final ExpansionPath<ProductProjection> productTypeExpand = ProductProjectionExpansionModel.of().productType().expansionPaths().get(0); final ProductProjectionByIdGet fetchB = ProductProjectionByIdGet.of("id", ProductProjectionType.CURRENT) .withExpansionPaths(asList(categoryExpand, productTypeExpand)); assertThat(fetchB.expansionPaths()) .isEqualTo(asList(ExpansionPath.of("categories[*]"), ExpansionPath.of("productType")));See the test code.
plusExpansionPaths in interface MetaModelReferenceExpansionDsl<Customer,CustomerInStoreQuery,CustomerExpansionModel<Customer>>m - function to use the meta model for expansions to create an expansion pathCustomerInStoreQuery withExpansionPaths(Function<CustomerExpansionModel<Customer>,ExpansionPathContainer<Customer>> m)
MetaModelReferenceExpansionDslexpansionPath by using meta models.
An example in the product projection context:
final ProductProjectionByIdGet fetch = ProductProjectionByIdGet.of("id", ProductProjectionType.CURRENT) .plusExpansionPaths(ProductProjectionExpansionModel.of().categories()); assertThat(fetch.expansionPaths()) .isEqualTo(asList(ExpansionPath.of("categories[*]"))); final ProductProjectionByIdGet fetch2 = fetch.withExpansionPaths(m -> m.productType()); assertThat(fetch.expansionPaths()).overridingErrorMessage("old object is unchanged") .isEqualTo(asList(ExpansionPath.of("categories[*]"))); assertThat(fetch2.expansionPaths()).isEqualTo(asList(ExpansionPath.of("productType"))); assertThat(fetch2).isNotSameAs(fetch);See the test code.
withExpansionPaths in interface MetaModelReferenceExpansionDsl<Customer,CustomerInStoreQuery,CustomerExpansionModel<Customer>>m - function to use the meta model for expansions to create an expansion pathCustomerInStoreQuery withFetchTotal(boolean fetchTotal)
QueryDslIf fetchTotal is true then PagedQueryResult.getTotal() is null.
withFetchTotal in interface QueryDsl<Customer,CustomerInStoreQuery>fetchTotal - enable the total count if true (default on the construction of the QueryDsl).QueryDsl as this instance but with the updated flagCustomerInStoreQuery withLimit(Long limit)
QueryDslwithLimit in interface QueryDsl<Customer,CustomerInStoreQuery>limit - the maximum amount of items of T which should be included in the PagedQueryResult.PagedQueryResult.getResults()CustomerInStoreQuery withOffset(Long offset)
QueryDslwithOffset in interface QueryDsl<Customer,CustomerInStoreQuery>offset - the number of items which should be omitted in the query result.default CustomerInStoreQuery byEmail(String email)