Interface ProductReference
- All Superinterfaces:
Identifiable<Product>
,IdentifiableObjHolder<Product>
,ProductReferenceMixin
,Reference
,ReferenceMixin
public interface ProductReference
extends Reference, Identifiable<Product>, ProductReferenceMixin, IdentifiableObjHolder<Product>
Reference to a Product.
Example to create an instance using the builder pattern
ProductReference productReference = ProductReference.builder()
.id("{id}")
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductReferenceBuilder
builder()
builder factory method for ProductReferencestatic ProductReferenceBuilder
builder
(ProductReference template) create builder for ProductReference instancestatic ProductReference
deepCopy
(ProductReference template) factory method to create a deep copy of ProductReference@NotNull String
getId()
Unique identifier of the referenced Product.@Valid Product
getObj()
Contains the representation of the expanded Product.static ProductReference
of()
factory methodstatic ProductReference
of
(ProductReference template) factory method to create a shallow copy ProductReferencevoid
Unique identifier of the referenced Product.void
Contains the representation of the expanded Product.static com.fasterxml.jackson.core.type.TypeReference<ProductReference>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductReference
(Function<ProductReference, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductReferenceMixin
toResourceIdentifier
Methods inherited from interface com.commercetools.api.models.common.Reference
getTypeId, withReference
-
Field Details
-
PRODUCT
discriminator value for ProductReference- See Also:
-
-
Method Details
-
getObj
Contains the representation of the expanded Product. Only present in responses to requests with Reference Expansion for Products.
- Specified by:
getObj
in interfaceIdentifiableObjHolder<Product>
- Returns:
- obj
-
getId
Unique identifier of the referenced Product.
- Specified by:
getId
in interfaceIdentifiable<Product>
- Specified by:
getId
in interfaceProductReferenceMixin
- Specified by:
getId
in interfaceReference
- Specified by:
getId
in interfaceReferenceMixin
- Returns:
- id
-
setObj
Contains the representation of the expanded Product. Only present in responses to requests with Reference Expansion for Products.
- Parameters:
obj
- value to be set
-
setId
Unique identifier of the referenced Product.
-
of
factory method- Returns:
- instance of ProductReference
-
of
factory method to create a shallow copy ProductReference- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ProductReference- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductReference- Returns:
- builder
-
builder
create builder for ProductReference instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductReference
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
-