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