Tabnine Logo
ProductProjectionSortSearchModel.allVariants
Code IndexAdd Tabnine to your IDE (free)

How to use
allVariants
method
in
io.sphere.sdk.products.search.ProductProjectionSortSearchModel

Best Java code snippets using io.sphere.sdk.products.search.ProductProjectionSortSearchModel.allVariants (Showing top 20 results out of 315)

origin: commercetools/commercetools-jvm-sdk

@Test
public void onSku() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().sku().asc(),
      ids -> assertThat(ids).containsExactly(product1.getId(), product2.getId()));
}
@Test
origin: commercetools/commercetools-jvm-sdk

@Test
public void onNumberAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofNumber(ATTR_NAME_NUMBER).desc(),
      ids -> assertThat(ids).containsExactly(product2.getId(), product1.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onBooleanSetAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofBooleanSet(ATTR_NAME_BOOLEAN_SET).asc(),
      ids -> assertThat(ids).containsExactly(product1.getId(), product2.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onBooleanAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofBoolean(ATTR_NAME_BOOLEAN).asc(),
      ids -> assertThat(ids).containsExactly(product2.getId(), product1.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onNumberSetAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofNumberSet(ATTR_NAME_NUMBER_SET).desc(),
      ids -> assertThat(ids).containsExactly(product1.getId(), product2.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onTimeSetAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofTimeSet(ATTR_NAME_TIME_SET).desc(),
      ids -> assertThat(ids).containsExactly(product1.getId(), product2.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onDateTimeSetAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofDateTimeSet(ATTR_NAME_DATE_TIME_SET).desc(),
      ids -> assertThat(ids).containsExactly(product1.getId(), product2.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onDateAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofDate(ATTR_NAME_DATE).desc(),
      ids -> assertThat(ids).containsExactly(product2.getId(), product1.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onDateTimeAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofDateTime(ATTR_NAME_DATE_TIME).desc(),
      ids -> assertThat(ids).containsExactly(product2.getId(), product1.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onLocEnumKeyAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofLocalizedEnum(ATTR_NAME_LOC_ENUM).key().asc(),
      ids -> assertThat(ids).containsExactly(product2.getId(), product1.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onMoneyAmountAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofMoney(ATTR_NAME_MONEY).centAmount().desc(),
      ids -> assertThat(ids).containsExactly(product2.getId(), product1.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onMoneyCurrencyAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofMoney(ATTR_NAME_MONEY).currency().desc(),
      ids -> assertThat(ids).containsExactly(product2.getId(), product1.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onEnumLabelAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofEnum(ATTR_NAME_ENUM).label().asc(),
      ids -> assertThat(ids).containsExactly(product2.getId(), product1.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onEnumLabelSetAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofEnumSet(ATTR_NAME_ENUM_SET).label().asc(),
      ids -> assertThat(ids).containsExactly(product1.getId(), product2.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onLocTextSetAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofLocalizedStringSet(ATTR_NAME_LOC_TEXT_SET).locale(ENGLISH).asc(),
      ids -> assertThat(ids).containsExactly(product1.getId(), product2.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onLocEnumLabelSetAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofLocalizedEnumSet(ATTR_NAME_LOC_ENUM_SET).label().locale(GERMAN).asc(),
      ids -> assertThat(ids).containsExactly(product1.getId(), product2.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void onLocEnumLabelAttributes() throws Exception {
  testProductIds(PRODUCT_MODEL.allVariants().attribute().ofLocalizedEnum(ATTR_NAME_LOC_ENUM).label().locale(GERMAN).asc(),
      ids -> assertThat(ids).containsExactly(product2.getId(), product1.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void sortWithAdditionalParameterByAttributeAscending() throws Exception {
  final ProductProjectionSearch search = ProductProjectionSearch.ofStaged()
      .withSort(productModel -> productModel.allVariants().attribute().ofNumber(ATTR_NAME_SIZE).ascWithMaxValue());
  testResultIds(search, resultIds ->
      assertThat(resultIds).containsExactly(product3.getId(), product2.getId(), product1.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void sortByAttributeAscending() throws Exception {
  final ProductProjectionSearch search = ProductProjectionSearch.ofStaged()
      .withSort(productModel -> productModel.allVariants().attribute().ofNumber(ATTR_NAME_SIZE).asc());
  testResultIds(search, resultIds ->
      assertThat(resultIds).containsExactly(product2.getId(), product1.getId(), product3.getId()));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void channelsRestockableSortDsl() {
  final StringHttpRequestBody body = (StringHttpRequestBody) ProductProjectionSearch.ofStaged().
  plusSort(m -> m.allVariants().availability().channels().channelId("channel-id-500").restockableInDays().asc()).httpRequestIntent().getBody();
  assertThat(body.getString()).contains("sort=variants.availability.channels.channel-id-500.restockableInDays+asc");
}
io.sphere.sdk.products.searchProductProjectionSortSearchModelallVariants

Popular methods of ProductProjectionSortSearchModel

  • <init>
  • categoryOrderHints
  • createdAt
  • id
  • name
  • reviewRatingStatistics
  • score
  • searchModel

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now