Class AssociateBuilder
java.lang.Object
com.commercetools.history.models.common.AssociateBuilder
AssociateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Associate associate = Associate.builder()
.plusAssociateRoleAssignments(associateRoleAssignmentsBuilder -> associateRoleAssignmentsBuilder)
.customer(customerBuilder -> customerBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAssociateRoleAssignments
(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignment> builder) add the value to the associateRoleAssignments using the builder functionassociateRoleAssignments
(AssociateRoleAssignment... associateRoleAssignments) set values to the associateRoleAssignmentsassociateRoleAssignments
(List<AssociateRoleAssignment> associateRoleAssignments) set value to the associateRoleAssignmentsbuild()
builds Associate with checking for non-null required valuesbuilds Associate without checking for non-null required valuesset the value to the customercustomer
(Function<ReferenceBuilder, ReferenceBuilder> builder) set the value to the customer using the builder functionvalue of associateRoleAssignments}value of customer}static AssociateBuilder
of()
factory method for an instance of AssociateBuilderstatic AssociateBuilder
create builder for Associate instanceplusAssociateRoleAssignments
(AssociateRoleAssignment... associateRoleAssignments) add values to the associateRoleAssignmentsplusAssociateRoleAssignments
(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignmentBuilder> builder) add the value to the associateRoleAssignments using the builder functionsetAssociateRoleAssignments
(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignment> builder) set the value to the associateRoleAssignments using the builder functionwithAssociateRoleAssignments
(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignmentBuilder> builder) set the value to the associateRoleAssignments using the builder functionwithCustomer
(Function<ReferenceBuilder, Reference> builder) set the value to the customer using the builder function
-
Constructor Details
-
AssociateBuilder
public AssociateBuilder()
-
-
Method Details
-
associateRoleAssignments
public AssociateBuilder associateRoleAssignments(AssociateRoleAssignment... associateRoleAssignments) set values to the associateRoleAssignments- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
associateRoleAssignments
public AssociateBuilder associateRoleAssignments(List<AssociateRoleAssignment> associateRoleAssignments) set value to the associateRoleAssignments- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
plusAssociateRoleAssignments
public AssociateBuilder plusAssociateRoleAssignments(AssociateRoleAssignment... associateRoleAssignments) add values to the associateRoleAssignments- Parameters:
associateRoleAssignments
- value to be set- Returns:
- Builder
-
plusAssociateRoleAssignments
public AssociateBuilder plusAssociateRoleAssignments(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignmentBuilder> builder) add the value to the associateRoleAssignments using the builder function- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
withAssociateRoleAssignments
public AssociateBuilder withAssociateRoleAssignments(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignmentBuilder> builder) set the value to the associateRoleAssignments using the builder function- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
addAssociateRoleAssignments
public AssociateBuilder addAssociateRoleAssignments(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignment> builder) add the value to the associateRoleAssignments using the builder function- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
setAssociateRoleAssignments
public AssociateBuilder setAssociateRoleAssignments(Function<AssociateRoleAssignmentBuilder, AssociateRoleAssignment> builder) set the value to the associateRoleAssignments using the builder function- Parameters:
builder
- function to build the associateRoleAssignments value- Returns:
- Builder
-
customer
set the value to the customer using the builder function- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
set the value to the customer using the builder function- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
set the value to the customer- Parameters:
customer
- value to be set- Returns:
- Builder
-
getAssociateRoleAssignments
value of associateRoleAssignments}- Returns:
- associateRoleAssignments
-
getCustomer
value of customer}- Returns:
- customer
-
build
builds Associate with checking for non-null required values -
buildUnchecked
builds Associate without checking for non-null required values- Returns:
- Associate
-
of
factory method for an instance of AssociateBuilder- Returns:
- builder
-
of
create builder for Associate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-