Interface ProductTypeDraft
- All Superinterfaces:
Draft<ProductTypeDraft>,WithKey
ProductTypeDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductTypeDraft productTypeDraft = ProductTypeDraft.builder()
.name("{name}")
.description("{description}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductTypeDraftBuilderbuilder()builder factory method for ProductTypeDraftstatic ProductTypeDraftBuilderbuilder(ProductTypeDraft template) create builder for ProductTypeDraft instancecopyDeep()static ProductTypeDraftdeepCopy(ProductTypeDraft template) factory method to create a deep copy of ProductTypeDraft@Valid List<AttributeDefinitionDraft>Attributes to specify for the ProductType.@NotNull StringDescription of the ProductType.getKey()User-defined unique identifier for the ProductType.@NotNull StringgetName()Name of the ProductType.static ProductTypeDraftof()factory methodstatic ProductTypeDraftof(ProductTypeDraft template) factory method to create a shallow copy ProductTypeDraftvoidsetAttributes(AttributeDefinitionDraft... attributes) Attributes to specify for the ProductType.voidsetAttributes(List<AttributeDefinitionDraft> attributes) Attributes to specify for the ProductType.voidsetDescription(String description) Description of the ProductType.voidUser-defined unique identifier for the ProductType.voidName of the ProductType.static com.fasterxml.jackson.core.type.TypeReference<ProductTypeDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithProductTypeDraft(Function<ProductTypeDraft, T> helper) accessor map function
-
Method Details
-
getKey
String getKey()User-defined unique identifier for the ProductType.
-
getName
Name of the ProductType.
- Returns:
- name
-
getDescription
Description of the ProductType.
- Returns:
- description
-
getAttributes
Attributes to specify for the ProductType. Products of this ProductType have these Attributes available on their ProductVariants.
- Returns:
- attributes
-
setKey
User-defined unique identifier for the ProductType.
- Parameters:
key- value to be set
-
setName
Name of the ProductType.
- Parameters:
name- value to be set
-
setDescription
Description of the ProductType.
- Parameters:
description- value to be set
-
setAttributes
Attributes to specify for the ProductType. Products of this ProductType have these Attributes available on their ProductVariants.
- Parameters:
attributes- values to be set
-
setAttributes
Attributes to specify for the ProductType. Products of this ProductType have these Attributes available on their ProductVariants.
- Parameters:
attributes- values to be set
-
of
factory method- Returns:
- instance of ProductTypeDraft
-
of
factory method to create a shallow copy ProductTypeDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductTypeDraft copyDeep() -
deepCopy
factory method to create a deep copy of ProductTypeDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductTypeDraft- Returns:
- builder
-
builder
create builder for ProductTypeDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductTypeDraft
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
-