Interface SimilarProduct
public interface SimilarProduct
One part of a SimilarProductPair. Refers to a specific ProductVariant.
Example to create an instance using the builder pattern
SimilarProduct similarProduct = SimilarProduct.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic SimilarProductBuilder
builder()
builder factory method for SimilarProductstatic SimilarProductBuilder
builder
(SimilarProduct template) create builder for SimilarProduct instancestatic SimilarProduct
deepCopy
(SimilarProduct template) factory method to create a deep copy of SimilarProduct@Valid SimilarProductMeta
getMeta()
Supplementary information about the data used for similarity estimation.@Valid ProductReference
Reference to ProductID of the ProductVariant that was compared.static SimilarProduct
of()
factory methodstatic SimilarProduct
of
(SimilarProduct template) factory method to create a shallow copy SimilarProductvoid
setMeta
(SimilarProductMeta meta) Supplementary information about the data used for similarity estimation.void
setProduct
(ProductReference product) Reference to Productvoid
setVariantId
(Long variantId) ID of the ProductVariant that was compared.static com.fasterxml.jackson.core.type.TypeReference<SimilarProduct>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withSimilarProduct
(Function<SimilarProduct, T> helper) accessor map function
-
Method Details
-
getProduct
Reference to Product
- Returns:
- product
-
getVariantId
Long getVariantId()ID of the ProductVariant that was compared.
- Returns:
- variantId
-
getMeta
Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.
- Returns:
- meta
-
setProduct
Reference to Product
- Parameters:
product
- value to be set
-
setVariantId
ID of the ProductVariant that was compared.
- Parameters:
variantId
- value to be set
-
setMeta
Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.
- Parameters:
meta
- value to be set
-
of
factory method- Returns:
- instance of SimilarProduct
-
of
factory method to create a shallow copy SimilarProduct- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of SimilarProduct- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for SimilarProduct- Returns:
- builder
-
builder
create builder for SimilarProduct instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withSimilarProduct
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-