Interface CompanyDraft

All Superinterfaces:
BusinessUnitDraft, Draft<CompanyDraft>, WithKey

public interface CompanyDraft extends BusinessUnitDraft, Draft<CompanyDraft>

Draft type to represent the top level of a business. Contains the fields and values of the generic BusinessUnitDraft that are used specifically for creating a Company.


Example to create an instance using the builder pattern

     CompanyDraft companyDraft = CompanyDraft.builder()
             .key("{key}")
             .name("{name}")
             .build()
 
  • Field Details

  • Method Details

    • of

      static CompanyDraft of()
      factory method
      Returns:
      instance of CompanyDraft
    • of

      static CompanyDraft of(CompanyDraft template)
      factory method to create a shallow copy CompanyDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static CompanyDraft deepCopy(@Nullable CompanyDraft template)
      factory method to create a deep copy of CompanyDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static CompanyDraftBuilder builder()
      builder factory method for CompanyDraft
      Returns:
      builder
    • builder

      static CompanyDraftBuilder builder(CompanyDraft template)
      create builder for CompanyDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCompanyDraft

      default <T> T withCompanyDraft(Function<CompanyDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CompanyDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference