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 SimilarProductBuilderbuilder()builder factory method for SimilarProductstatic SimilarProductBuilderbuilder(SimilarProduct template) create builder for SimilarProduct instancestatic SimilarProductdeepCopy(SimilarProduct template) factory method to create a deep copy of SimilarProduct@Valid SimilarProductMetagetMeta()Supplementary information about the data used for similarity estimation.@Valid ProductReferenceReference to ProductID of the ProductVariant that was compared.static SimilarProductof()factory methodstatic SimilarProductof(SimilarProduct template) factory method to create a shallow copy SimilarProductvoidsetMeta(SimilarProductMeta meta) Supplementary information about the data used for similarity estimation.voidsetProduct(ProductReference product) Reference to ProductvoidsetVariantId(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> TwithSimilarProduct(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
-