Interface MyCompanyDraft

All Superinterfaces:
CustomizableDraft<MyBusinessUnitDraft>, Draft<MyCompanyDraft>, MyBusinessUnitDraft, WithKey

public interface MyCompanyDraft extends MyBusinessUnitDraft, Draft<MyCompanyDraft>

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


Example to create an instance using the builder pattern

     MyCompanyDraft myCompanyDraft = MyCompanyDraft.builder()
             .key("{key}")
             .name("{name}")
             .build()
 
  • Field Details

  • Method Details

    • of

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

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

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

      static MyCompanyDraftBuilder builder()
      builder factory method for MyCompanyDraft
      Returns:
      builder
    • builder

      static MyCompanyDraftBuilder builder(MyCompanyDraft template)
      create builder for MyCompanyDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMyCompanyDraft

      default <T> T withMyCompanyDraft(Function<MyCompanyDraft,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<MyCompanyDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference