Interface MyDivisionDraft

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

public interface MyDivisionDraft extends MyBusinessUnitDraft, Draft<MyDivisionDraft>

Draft type to model divisions that are part of the Company or a higher-order Division. Contains the fields and values of the generic MyBusinessUnitDraft that are used specifically for creating a Division.


Example to create an instance using the builder pattern

     MyDivisionDraft myDivisionDraft = MyDivisionDraft.builder()
             .key("{key}")
             .name("{name}")
             .parentUnit(parentUnitBuilder -> parentUnitBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getParentUnit

      @NotNull @Valid @NotNull @Valid BusinessUnitResourceIdentifier getParentUnit()

      The parent unit of this Division. Can be a Company or a Division.

      Returns:
      parentUnit
    • setParentUnit

      void setParentUnit(BusinessUnitResourceIdentifier parentUnit)

      The parent unit of this Division. Can be a Company or a Division.

      Parameters:
      parentUnit - value to be set
    • of

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

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

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

      static MyDivisionDraftBuilder builder()
      builder factory method for MyDivisionDraft
      Returns:
      builder
    • builder

      static MyDivisionDraftBuilder builder(MyDivisionDraft template)
      create builder for MyDivisionDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMyDivisionDraft

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