Class ReferenceBuilder
java.lang.Object
com.commercetools.history.models.common.ReferenceBuilder
ReferenceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Reference reference = Reference.builder()
.id("{id}")
.typeId(ReferenceTypeId.ASSOCIATE_ROLE)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds Reference with checking for non-null required valuesbuilds Reference without checking for non-null required valuesgetId()value of id}value of typeId}set the value to the idstatic ReferenceBuilderof()factory method for an instance of ReferenceBuilderstatic ReferenceBuildercreate builder for Reference instancetypeId(ReferenceTypeId typeId) set the value to the typeId
-
Constructor Details
-
ReferenceBuilder
public ReferenceBuilder()
-
-
Method Details
-
id
set the value to the id- Parameters:
id- value to be set- Returns:
- Builder
-
typeId
set the value to the typeId- Parameters:
typeId- value to be set- Returns:
- Builder
-
getId
value of id}- Returns:
- id
-
getTypeId
value of typeId}- Returns:
- typeId
-
build
builds Reference with checking for non-null required values -
buildUnchecked
builds Reference without checking for non-null required values- Returns:
- Reference
-
of
factory method for an instance of ReferenceBuilder- Returns:
- builder
-
of
create builder for Reference instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-