Class AssociateBuilder

java.lang.Object
com.commercetools.history.models.common.AssociateBuilder
All Implemented Interfaces:
Builder<Associate>

public class AssociateBuilder extends Object implements Builder<Associate>
AssociateBuilder
Example to create an instance using the builder pattern

     Associate associate = Associate.builder()
             .plusAssociateRoleAssignments(associateRoleAssignmentsBuilder -> associateRoleAssignmentsBuilder)
             .customer(customerBuilder -> customerBuilder)
             .build()
 
  • 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

      add the value to the associateRoleAssignments using the builder function
      Parameters:
      builder - function to build the associateRoleAssignments value
      Returns:
      Builder
    • withAssociateRoleAssignments

      set the value to the associateRoleAssignments using the builder function
      Parameters:
      builder - function to build the associateRoleAssignments value
      Returns:
      Builder
    • addAssociateRoleAssignments

      add the value to the associateRoleAssignments using the builder function
      Parameters:
      builder - function to build the associateRoleAssignments value
      Returns:
      Builder
    • setAssociateRoleAssignments

      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

      public AssociateBuilder withCustomer(Function<ReferenceBuilder,Reference> builder)
      set the value to the customer using the builder function
      Parameters:
      builder - function to build the customer value
      Returns:
      Builder
    • customer

      public AssociateBuilder customer(Reference customer)
      set the value to the customer
      Parameters:
      customer - value to be set
      Returns:
      Builder
    • getAssociateRoleAssignments

      public List<AssociateRoleAssignment> getAssociateRoleAssignments()
      value of associateRoleAssignments}
      Returns:
      associateRoleAssignments
    • getCustomer

      public Reference getCustomer()
      value of customer}
      Returns:
      customer
    • build

      public Associate build()
      builds Associate with checking for non-null required values
      Specified by:
      build in interface Builder<Associate>
      Returns:
      Associate
    • buildUnchecked

      public Associate buildUnchecked()
      builds Associate without checking for non-null required values
      Returns:
      Associate
    • of

      public static AssociateBuilder of()
      factory method for an instance of AssociateBuilder
      Returns:
      builder
    • of

      public static AssociateBuilder of(Associate template)
      create builder for Associate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder