@Override public Predicate<T> is(final Referenceable<R> reference) { return super.is(reference); }
public ReferenceQueryModel<ShippingMethod, TaxCategory> taxCategory() { return new ReferenceQueryModel<>(Optional.of(this), "taxCategory"); }
public Predicate<T> isAnyOf(final List<? extends Referenceable<R>> elements) { final List<String> ids = elements.stream().map(elem -> elem.toReference().getId()).collect(toList()); return new IsInPredicate<>(idSegment(), ids); }
@Override public Predicate<T> isAnyOf(final List<? extends Referenceable<R>> elements) { return super.isAnyOf(elements); }
@AfterClass @BeforeClass public static void deleteProductsAndProductType() { final List<ProductType> productTypes = client().executeBlocking(ProductTypeQuery.of().byName(PRODUCT_TYPE_NAME)).getResults(); if (!productTypes.isEmpty()) { final ProductQuery productQuery = ProductQuery.of() .withPredicates(m -> m.productType().isIn(productTypes)) .withLimit(500L); client().executeBlocking(productQuery).getResults().forEach(p -> client().executeBlocking(ProductDeleteCommand.of(p))); productTypes.forEach(p -> client().executeBlocking(ProductTypeDeleteCommand.of(p))); } }
default ProductProjectionQuery byProductType(final Referenceable<ProductType> productType) { return withPredicates(m -> m.productType().is(productType)); }
public ReferenceQueryModel<Product, ProductType> productType() { return new ReferenceQueryModel<>(Optional.of(this), "productType"); }
public Predicate<T> is(Referenceable<R> reference) { return EqPredicate.of(idSegment(), reference.toReference().getId()); }
default ShippingMethodQuery byTaxCategory(final io.sphere.sdk.models.Referenceable<io.sphere.sdk.taxcategories.TaxCategory> taxCategory) { return withPredicates(m -> m.taxCategory().is(taxCategory)); }
public ReferenceQueryModel<T, Zone> zone() { return new ReferenceQueryModel<>(Optional.of(this), "zone"); } }
default ShippingMethodQuery byTaxCategory(final Referenceable<TaxCategory> taxCategory) { return withPredicates(m -> m.taxCategory().is(taxCategory)); }
public ReferenceQueryModel<Customer, CustomerGroup> customerGroup() { return new ReferenceQueryModel<>(Optional.of(this), "customerGroup"); } }
default ProductQuery byProductType(final Referenceable<ProductType> productType) { return withPredicates(m -> m.productType().is(productType)); }
public ReferenceQueryModel<Product, ProductType> productType() { return new ReferenceQueryModel<>(Optional.of(this), "productType"); } }
default ProductQuery byProductType(final Referenceable<ProductType> productType) { return withPredicates(m -> m.productType().is(productType)); }
public ReferenceQueryModel<ProductProjection, ProductType> productType() { return new ReferenceQueryModel<>(Optional.of(this), "productType"); }
default ProductProjectionQuery byProductType(final Referenceable<ProductType> productType) { return withPredicates(m -> m.productType().is(productType)); }
public ReferenceQueryModel<ProductProjection, ProductType> productType() { return new ReferenceQueryModel<>(Optional.of(this), "productType"); }
default ProductProjectionQuery byProductType(final Referenceable<ProductType> productType) { return withPredicates(m -> m.productType().is(productType)); }
public ReferenceQueryModel<InventoryEntry, Channel> supplyChannel() { return new ReferenceQueryModel<>(Optional.of(this), "supplyChannel"); }