From c0cb3318ac547f91b79a3cadc9ec003a10e153c0 Mon Sep 17 00:00:00 2001 From: schleichardt Date: Fri, 16 Oct 2015 17:50:19 +0200 Subject: [PATCH] Merge remote-tracking branch 'remotes/origin/directionless-sort-search' # Conflicts: # src/main/java/io/sphere/sdk/meta/ReleaseNotes.java --- .../java/io/sphere/sdk/meta/ReleaseNotes.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/sphere/sdk/meta/ReleaseNotes.java b/src/main/java/io/sphere/sdk/meta/ReleaseNotes.java index 3b6b08a051f..4264294a87d 100644 --- a/src/main/java/io/sphere/sdk/meta/ReleaseNotes.java +++ b/src/main/java/io/sphere/sdk/meta/ReleaseNotes.java @@ -83,25 +83,27 @@
  • While before the Search Model was built using the structure {@code attribute + action + parameters}, now it changed to {@code action + attribute + parameters}, in order to split the model into 3 independent models: Search Filter Model, Search Facet Model and Search Sort Model.
    Before it looked like: -
    
    + 
    {@code
      ProductProjectionSearch search = ProductProjectionSearch.ofStaged()
    - .plusQueryFilters(product -< product.name().locale(ENGLISH).filtered().by("shoes"));
    + .plusQueryFilters(product -> product.name().locale(ENGLISH).filtered().by("shoes"));
      PagedSearchResult result = client.execute(search);
    - 
    + }
    Now it is built as follows: -
    
    + 
    {@code
      ProductProjectionSearch search = ProductProjectionSearch.ofStaged()
    - .plusQueryFilters(filter -< filter.name().locale(ENGLISH).by("shoes"));
    + .plusQueryFilters(filter -> filter.name().locale(ENGLISH).by("shoes"));
      PagedSearchResult result = client.execute(search);
    - 
    + }
  • Renamed {@code SearchSort} to {@link io.sphere.sdk.search.SortExpression}, which now shares the same properties as {@link io.sphere.sdk.search.FacetExpression} and {@link io.sphere.sdk.search.FilterExpression} under the {@link io.sphere.sdk.search.SearchExpression} interface.
  • The static factory method to directly build unsafe {@link io.sphere.sdk.search.FacetExpression} is now located in {@link io.sphere.sdk.search.TermFacetExpression}, {@link io.sphere.sdk.search.RangeFacetExpression} and {@link io.sphere.sdk.search.FilteredFacetExpression}, so that a facet expression for the corresponding type is obtained.
  • Moved related Search Model classes from {@code io.sphere.sdk.search} to {@code io.sphere.sdk.search.model} package, to clearly separate the Search Model from the Search API classes.
  • Removed type parameters from {@link io.sphere.sdk.search.TermFacetResult}, {@link io.sphere.sdk.search.RangeFacetResult} and {@link io.sphere.sdk.search.FilteredFacetResult}, which now return simple strings as they are received from the platform.
  • -
  • Added {@link ProductProjection#getCategoryOrderHints()} and {@link ProductProjectionQueryModel#categoryOrderHints()}. It can be used for search, but the meta model comes in a later release.
  • +
  • Added {@link ProductProjection#getCategoryOrderHints()} and {@link ProductProjectionQueryModel#categoryOrderHints()}. It can be used for search as shown in the following example, but the meta model comes in a later release. +
    {@include.example io.sphere.sdk.products.ProductCategoryOrderHintTest#searchForCategoryAndSort()}
    +
  • Added states and update actions for Orders, Reviews and Products: {@link Order#getState()}, {@link io.sphere.sdk.products.Product#getState()}, {@link io.sphere.sdk.reviews.Review#getState()}
  • Added {@link LineItem#getTotalPrice()}, {@link LineItem#getDiscountedPricePerQuantity()}, {@link CustomLineItem#getTotalPrice()} and {@link CustomLineItem#getDiscountedPricePerQuantity()}
  • Deprecated {@link LineItem#getDiscountedPrice()} and {@link CustomLineItem#getDiscountedPrice()} since they are deprecated in the HTTP API