public interface ProductDiscountQuery extends MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>
MAX_OFFSET, MIN_OFFSET| Modifier and Type | Method and Description |
|---|---|
static ProductDiscountQuery |
of() |
ProductDiscountQuery |
plusExpansionPaths(Function<ProductDiscountExpansionModel<ProductDiscount>,ExpansionPathContainer<ProductDiscount>> m)
Creates a new object with the properties of the old object but adds a new expansion path to it by using meta models.
|
ProductDiscountQuery |
plusPredicates(Function<ProductDiscountQueryModel,QueryPredicate<ProductDiscount>> m)
Returns a new instance with the new predicate appended (AND semantics).
|
ProductDiscountQuery |
plusPredicates(List<QueryPredicate<ProductDiscount>> queryPredicates)
Returns a new instance with the new predicate list appended to the existing predicates (AND semantic).
|
ProductDiscountQuery |
plusPredicates(QueryPredicate<ProductDiscount> queryPredicate)
Returns a new instance with the new predicate appended to the existing predicates (AND semantic).
|
ProductDiscountQuery |
plusSort(Function<ProductDiscountQueryModel,QuerySort<ProductDiscount>> m)
Returns a query with the sort expression appended to the existing ones.
|
ProductDiscountQuery |
plusSort(List<QuerySort<ProductDiscount>> sort)
Returns a query with the sort expressions appended to the existing ones.
|
ProductDiscountQuery |
plusSort(QuerySort<ProductDiscount> sort)
Returns a query with the sort expression appended to the existing ones.
|
static com.fasterxml.jackson.core.type.TypeReference<PagedQueryResult<ProductDiscount>> |
resultTypeReference()
Creates a container which contains the full Java type information to deserialize the query result (NOT this class) from JSON.
|
ProductDiscountQuery |
withExpansionPaths(Function<ProductDiscountExpansionModel<ProductDiscount>,ExpansionPathContainer<ProductDiscount>> 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. |
ProductDiscountQuery |
withFetchTotal(boolean fetchTotal)
Enables/disables a flag it the total amount of items should be counted.
|
ProductDiscountQuery |
withLimit(Long limit)
Creates a new instance which a limited amount of results.
|
ProductDiscountQuery |
withOffset(Long offset)
Returns a new query with the new offset as offset.
|
ProductDiscountQuery |
withPredicates(Function<ProductDiscountQueryModel,QueryPredicate<ProductDiscount>> predicateFunction)
Returns a new instance with the new predicate as only predicate.
|
ProductDiscountQuery |
withPredicates(List<QueryPredicate<ProductDiscount>> queryPredicates)
Returns a new instance with the new predicate list as predicates.
|
ProductDiscountQuery |
withPredicates(QueryPredicate<ProductDiscount> queryPredicate)
Returns a new instance with the new predicate as only predicate.
|
ProductDiscountQuery |
withSort(Function<ProductDiscountQueryModel,QuerySort<ProductDiscount>> m)
Returns a query with the new sort as only sort parameter.
|
ProductDiscountQuery |
withSort(List<QuerySort<ProductDiscount>> sort)
Returns a query with the new sort list as only sort parameters.
|
ProductDiscountQuery |
withSort(QuerySort<ProductDiscount> sort)
Returns a query with the new sort as only sort parameter.
|
ProductDiscountQuery |
withSortMulti(Function<ProductDiscountQueryModel,List<QuerySort<ProductDiscount>>> 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<ProductDiscount>> resultTypeReference()
static ProductDiscountQuery of()
ProductDiscountQuery plusPredicates(Function<ProductDiscountQueryModel,QueryPredicate<ProductDiscount>> m)
MetaModelQueryDslplusPredicates in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>m - function given a meta model description of the model return a QueryPredicateMetaModelQueryDsl.withPredicates(Function)ProductDiscountQuery plusPredicates(QueryPredicate<ProductDiscount> queryPredicate)
QueryDslplusPredicates in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>plusPredicates in interface QueryDsl<ProductDiscount,ProductDiscountQuery>queryPredicate - the new predicateQueryDsl.withPredicates(QueryPredicate)ProductDiscountQuery plusPredicates(List<QueryPredicate<ProductDiscount>> queryPredicates)
QueryDslplusPredicates in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>plusPredicates in interface QueryDsl<ProductDiscount,ProductDiscountQuery>queryPredicates - the new predicate listQueryDsl.withPredicates(List)ProductDiscountQuery plusSort(Function<ProductDiscountQueryModel,QuerySort<ProductDiscount>> m)
MetaModelQueryDslplusSort in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>m - function given a meta model description of the model returns a list of QuerySortMetaModelQueryDsl.withSort(Function)ProductDiscountQuery plusSort(List<QuerySort<ProductDiscount>> sort)
QueryDslplusSort in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>plusSort in interface QueryDsl<ProductDiscount,ProductDiscountQuery>sort - sort expressions how the results of the query should be sortedQueryDsl.withSort(List)ProductDiscountQuery plusSort(QuerySort<ProductDiscount> sort)
QueryDslplusSort in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>plusSort in interface QueryDsl<ProductDiscount,ProductDiscountQuery>sort - sort expression how the results of the query should be sortedQueryDsl.withSort(QuerySort)ProductDiscountQuery withPredicates(Function<ProductDiscountQueryModel,QueryPredicate<ProductDiscount>> predicateFunction)
MetaModelQueryDslwithPredicates in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>predicateFunction - function given a meta model description of the model return a QueryPredicateMetaModelQueryDsl.plusPredicates(Function)ProductDiscountQuery withPredicates(QueryPredicate<ProductDiscount> queryPredicate)
QueryDslwithPredicates in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>withPredicates in interface QueryDsl<ProductDiscount,ProductDiscountQuery>queryPredicate - the new predicateQueryDsl.plusPredicates(QueryPredicate)ProductDiscountQuery withPredicates(List<QueryPredicate<ProductDiscount>> queryPredicates)
QueryDslwithPredicates in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>withPredicates in interface QueryDsl<ProductDiscount,ProductDiscountQuery>queryPredicates - the new predicate listQueryDsl.plusPredicates(List)ProductDiscountQuery withSort(Function<ProductDiscountQueryModel,QuerySort<ProductDiscount>> m)
MetaModelQueryDslwithSort in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>m - function given a meta model description of the model returns a QuerySortMetaModelQueryDsl.plusSort(Function)ProductDiscountQuery withSort(List<QuerySort<ProductDiscount>> sort)
QueryDslwithSort in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>withSort in interface QueryDsl<ProductDiscount,ProductDiscountQuery>sort - list of sorts how the results of the query should be sortedQueryDsl.plusSort(List)ProductDiscountQuery withSort(QuerySort<ProductDiscount> sort)
QueryDslwithSort in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>withSort in interface QueryDsl<ProductDiscount,ProductDiscountQuery>sort - sort expression how the results of the query should be sortedQueryDsl.plusSort(QuerySort)ProductDiscountQuery withSortMulti(Function<ProductDiscountQueryModel,List<QuerySort<ProductDiscount>>> m)
MetaModelQueryDslwithSortMulti in interface MetaModelQueryDsl<ProductDiscount,ProductDiscountQuery,ProductDiscountQueryModel,ProductDiscountExpansionModel<ProductDiscount>>m - function given a meta model description of the model returns a list of QuerySortMetaModelQueryDsl.plusSort(List),
MetaModelQueryDsl.withSort(Function)ProductDiscountQuery plusExpansionPaths(Function<ProductDiscountExpansionModel<ProductDiscount>,ExpansionPathContainer<ProductDiscount>> 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<ProductDiscount,ProductDiscountQuery,ProductDiscountExpansionModel<ProductDiscount>>m - function to use the meta model for expansions to create an expansion pathProductDiscountQuery withExpansionPaths(Function<ProductDiscountExpansionModel<ProductDiscount>,ExpansionPathContainer<ProductDiscount>> 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<ProductDiscount,ProductDiscountQuery,ProductDiscountExpansionModel<ProductDiscount>>m - function to use the meta model for expansions to create an expansion pathProductDiscountQuery withFetchTotal(boolean fetchTotal)
QueryDslIf fetchTotal is true then PagedQueryResult.getTotal() is null.
withFetchTotal in interface QueryDsl<ProductDiscount,ProductDiscountQuery>fetchTotal - enable the total count if true (default on the construction of the QueryDsl).QueryDsl as this instance but with the updated flagProductDiscountQuery withLimit(Long limit)
QueryDslwithLimit in interface QueryDsl<ProductDiscount,ProductDiscountQuery>limit - the maximum amount of items of T which should be included in the PagedQueryResult.PagedQueryResult.getResults()ProductDiscountQuery withOffset(Long offset)
QueryDslwithOffset in interface QueryDsl<ProductDiscount,ProductDiscountQuery>offset - the number of items which should be omitted in the query result.