public interface ShippingMethodQuery extends MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
MAX_OFFSET, MIN_OFFSET
Modifier and Type | Method and Description |
---|---|
default ShippingMethodQuery |
byIsDefault() |
default ShippingMethodQuery |
byKey(String key) |
default ShippingMethodQuery |
byName(String name) |
default ShippingMethodQuery |
byTaxCategory(Referenceable<TaxCategory> taxCategory) |
static ShippingMethodQuery |
of() |
ShippingMethodQuery |
plusExpansionPaths(Function<ShippingMethodExpansionModel<ShippingMethod>,ExpansionPathContainer<ShippingMethod>> m)
Creates a new object with the properties of the old object but adds a new expansion path to it by using meta models.
|
ShippingMethodQuery |
plusPredicates(Function<ShippingMethodQueryModel,QueryPredicate<ShippingMethod>> m)
Returns a new instance with the new predicate appended (AND semantics).
|
ShippingMethodQuery |
plusPredicates(List<QueryPredicate<ShippingMethod>> queryPredicates)
Returns a new instance with the new predicate list appended to the existing predicates (AND semantic).
|
ShippingMethodQuery |
plusPredicates(QueryPredicate<ShippingMethod> queryPredicate)
Returns a new instance with the new predicate appended to the existing predicates (AND semantic).
|
ShippingMethodQuery |
plusSort(Function<ShippingMethodQueryModel,QuerySort<ShippingMethod>> m)
Returns a query with the sort expression appended to the existing ones.
|
ShippingMethodQuery |
plusSort(List<QuerySort<ShippingMethod>> sort)
Returns a query with the sort expressions appended to the existing ones.
|
ShippingMethodQuery |
plusSort(QuerySort<ShippingMethod> sort)
Returns a query with the sort expression appended to the existing ones.
|
static com.fasterxml.jackson.core.type.TypeReference<PagedQueryResult<ShippingMethod>> |
resultTypeReference()
Creates a container which contains the full Java type information to deserialize the query result (NOT this class) from JSON.
|
ShippingMethodQuery |
withExpansionPaths(Function<ShippingMethodExpansionModel<ShippingMethod>,ExpansionPathContainer<ShippingMethod>> 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. |
ShippingMethodQuery |
withFetchTotal(boolean fetchTotal)
Enables/disables a flag it the total amount of items should be counted.
|
ShippingMethodQuery |
withLimit(Long limit)
Creates a new instance which a limited amount of results.
|
ShippingMethodQuery |
withOffset(Long offset)
Returns a new query with the new offset as offset.
|
ShippingMethodQuery |
withPredicates(Function<ShippingMethodQueryModel,QueryPredicate<ShippingMethod>> predicateFunction)
Returns a new instance with the new predicate as only predicate.
|
ShippingMethodQuery |
withPredicates(List<QueryPredicate<ShippingMethod>> queryPredicates)
Returns a new instance with the new predicate list as predicates.
|
ShippingMethodQuery |
withPredicates(QueryPredicate<ShippingMethod> queryPredicate)
Returns a new instance with the new predicate as only predicate.
|
ShippingMethodQuery |
withSort(Function<ShippingMethodQueryModel,QuerySort<ShippingMethod>> m)
Returns a query with the new sort as only sort parameter.
|
ShippingMethodQuery |
withSort(List<QuerySort<ShippingMethod>> sort)
Returns a query with the new sort list as only sort parameters.
|
ShippingMethodQuery |
withSort(QuerySort<ShippingMethod> sort)
Returns a query with the new sort as only sort parameter.
|
ShippingMethodQuery |
withSortMulti(Function<ShippingMethodQueryModel,List<QuerySort<ShippingMethod>>> m)
Returns a query with the new sort list as only sort parameters.
|
plusPredicates, plusSort, withPredicates, withQueryParam, withSort
withLimit, withOffset
endpoint, expansionPaths, fetchTotal, limit, offset, predicates, sort
deserialize, toQuery
canDeserialize, httpRequestIntent
plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths
static com.fasterxml.jackson.core.type.TypeReference<PagedQueryResult<ShippingMethod>> resultTypeReference()
static ShippingMethodQuery of()
ShippingMethodQuery plusPredicates(Function<ShippingMethodQueryModel,QueryPredicate<ShippingMethod>> m)
MetaModelQueryDsl
plusPredicates
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
m
- function given a meta model description of the model return a QueryPredicate
MetaModelQueryDsl.withPredicates(Function)
ShippingMethodQuery plusPredicates(QueryPredicate<ShippingMethod> queryPredicate)
QueryDsl
plusPredicates
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
plusPredicates
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
queryPredicate
- the new predicateQueryDsl.withPredicates(QueryPredicate)
ShippingMethodQuery plusPredicates(List<QueryPredicate<ShippingMethod>> queryPredicates)
QueryDsl
plusPredicates
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
plusPredicates
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
queryPredicates
- the new predicate listQueryDsl.withPredicates(List)
ShippingMethodQuery plusSort(Function<ShippingMethodQueryModel,QuerySort<ShippingMethod>> m)
MetaModelQueryDsl
plusSort
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
m
- function given a meta model description of the model returns a list of QuerySort
MetaModelQueryDsl.withSort(Function)
ShippingMethodQuery plusSort(List<QuerySort<ShippingMethod>> sort)
QueryDsl
plusSort
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
plusSort
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
sort
- sort expressions how the results of the query should be sortedQueryDsl.withSort(List)
ShippingMethodQuery plusSort(QuerySort<ShippingMethod> sort)
QueryDsl
plusSort
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
plusSort
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
sort
- sort expression how the results of the query should be sortedQueryDsl.withSort(QuerySort)
ShippingMethodQuery withPredicates(Function<ShippingMethodQueryModel,QueryPredicate<ShippingMethod>> predicateFunction)
MetaModelQueryDsl
withPredicates
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
predicateFunction
- function given a meta model description of the model return a QueryPredicate
MetaModelQueryDsl.plusPredicates(Function)
ShippingMethodQuery withPredicates(QueryPredicate<ShippingMethod> queryPredicate)
QueryDsl
withPredicates
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
withPredicates
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
queryPredicate
- the new predicateQueryDsl.plusPredicates(QueryPredicate)
ShippingMethodQuery withPredicates(List<QueryPredicate<ShippingMethod>> queryPredicates)
QueryDsl
withPredicates
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
withPredicates
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
queryPredicates
- the new predicate listQueryDsl.plusPredicates(List)
ShippingMethodQuery withSort(Function<ShippingMethodQueryModel,QuerySort<ShippingMethod>> m)
MetaModelQueryDsl
withSort
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
m
- function given a meta model description of the model returns a QuerySort
MetaModelQueryDsl.plusSort(Function)
ShippingMethodQuery withSort(List<QuerySort<ShippingMethod>> sort)
QueryDsl
withSort
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
withSort
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
sort
- list of sorts how the results of the query should be sortedQueryDsl.plusSort(List)
ShippingMethodQuery withSort(QuerySort<ShippingMethod> sort)
QueryDsl
withSort
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
withSort
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
sort
- sort expression how the results of the query should be sortedQueryDsl.plusSort(QuerySort)
ShippingMethodQuery withSortMulti(Function<ShippingMethodQueryModel,List<QuerySort<ShippingMethod>>> m)
MetaModelQueryDsl
withSortMulti
in interface MetaModelQueryDsl<ShippingMethod,ShippingMethodQuery,ShippingMethodQueryModel,ShippingMethodExpansionModel<ShippingMethod>>
m
- function given a meta model description of the model returns a list of QuerySort
MetaModelQueryDsl.plusSort(List)
,
MetaModelQueryDsl.withSort(Function)
ShippingMethodQuery plusExpansionPaths(Function<ShippingMethodExpansionModel<ShippingMethod>,ExpansionPathContainer<ShippingMethod>> m)
MetaModelReferenceExpansionDsl
An 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<ShippingMethod,ShippingMethodQuery,ShippingMethodExpansionModel<ShippingMethod>>
m
- function to use the meta model for expansions to create an expansion pathShippingMethodQuery withExpansionPaths(Function<ShippingMethodExpansionModel<ShippingMethod>,ExpansionPathContainer<ShippingMethod>> m)
MetaModelReferenceExpansionDsl
expansionPath
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<ShippingMethod,ShippingMethodQuery,ShippingMethodExpansionModel<ShippingMethod>>
m
- function to use the meta model for expansions to create an expansion pathShippingMethodQuery withFetchTotal(boolean fetchTotal)
QueryDsl
If fetchTotal
is true then PagedQueryResult.getTotal()
is null.
withFetchTotal
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
fetchTotal
- enable the total count if true (default on the construction of the QueryDsl).QueryDsl
as this instance but with the updated flagShippingMethodQuery withLimit(Long limit)
QueryDsl
withLimit
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
limit
- the maximum amount of items of T
which should be included in the PagedQueryResult
.PagedQueryResult.getResults()
ShippingMethodQuery withOffset(Long offset)
QueryDsl
withOffset
in interface QueryDsl<ShippingMethod,ShippingMethodQuery>
offset
- the number of items which should be omitted in the query result.default ShippingMethodQuery byName(String name)
default ShippingMethodQuery byTaxCategory(Referenceable<TaxCategory> taxCategory)
default ShippingMethodQuery byIsDefault()
default ShippingMethodQuery byKey(String key)