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