Class ProductTypeBuilder
- All Implemented Interfaces:
Builder<ProductType>
Example to create an instance using the builder pattern
ProductType productType = ProductType.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.name("{name}")
.description("{description}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAttributes specified for the ProductType.attributes
(AttributeDefinition... attributes) Attributes specified for the ProductType.attributes
(List<AttributeDefinition> attributes) Attributes specified for the ProductType.build()
builds ProductType with checking for non-null required valuesbuilds ProductType without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the ProductType was initially created.IDs and references that created the ProductType.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the ProductType.description
(String description) Description of the ProductType.Attributes specified for the ProductType.Date and time (UTC) the ProductType was initially created.IDs and references that created the ProductType.Description of the ProductType.getId()
Unique identifier of the ProductType.getKey()
User-defined unique identifier of the ProductType.Date and time (UTC) the ProductType was last updated.IDs and references that last modified the ProductType.getName()
Name of the ProductType.Current version of the ProductType.Unique identifier of the ProductType.User-defined unique identifier of the ProductType.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the ProductType was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the ProductType.IDs and references that last modified the ProductType.Name of the ProductType.static ProductTypeBuilder
of()
factory method for an instance of ProductTypeBuilderstatic ProductTypeBuilder
of
(ProductType template) create builder for ProductType instanceplusAttributes
(AttributeDefinition... attributes) Attributes specified for the ProductType.Attributes specified for the ProductType.Attributes specified for the ProductType.Current version of the ProductType.Attributes specified for the ProductType.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the ProductType.IDs and references that last modified the ProductType.
-
Constructor Details
-
ProductTypeBuilder
public ProductTypeBuilder()
-
-
Method Details
-
id
Unique identifier of the ProductType.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the ProductType.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the ProductType was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the ProductType was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
public ProductTypeBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the ProductType.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public ProductTypeBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) IDs and references that last modified the ProductType.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the ProductType.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the ProductType.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the ProductType.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the ProductType.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the ProductType.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
Name of the ProductType.
- Parameters:
name
- value to be set- Returns:
- Builder
-
description
Description of the ProductType.
- Parameters:
description
- value to be set- Returns:
- Builder
-
attributes
Attributes specified for the ProductType.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
attributes
Attributes specified for the ProductType.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
Attributes specified for the ProductType.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
public ProductTypeBuilder plusAttributes(Function<AttributeDefinitionBuilder, AttributeDefinitionBuilder> builder) Attributes specified for the ProductType.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
withAttributes
public ProductTypeBuilder withAttributes(Function<AttributeDefinitionBuilder, AttributeDefinitionBuilder> builder) Attributes specified for the ProductType.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
addAttributes
public ProductTypeBuilder addAttributes(Function<AttributeDefinitionBuilder, AttributeDefinition> builder) Attributes specified for the ProductType.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
setAttributes
public ProductTypeBuilder setAttributes(Function<AttributeDefinitionBuilder, AttributeDefinition> builder) Attributes specified for the ProductType.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
getId
Unique identifier of the ProductType.
- Returns:
- id
-
getVersion
Current version of the ProductType.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the ProductType was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the ProductType was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the ProductType.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the ProductType.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the ProductType.
- Returns:
- key
-
getName
Name of the ProductType.
- Returns:
- name
-
getDescription
Description of the ProductType.
- Returns:
- description
-
getAttributes
Attributes specified for the ProductType.
- Returns:
- attributes
-
build
builds ProductType with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductType>
- Returns:
- ProductType
-
buildUnchecked
builds ProductType without checking for non-null required values- Returns:
- ProductType
-
of
factory method for an instance of ProductTypeBuilder- Returns:
- builder
-
of
create builder for ProductType instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-