Interface DivisionDraft

All Superinterfaces:
BusinessUnitDraft, Draft<DivisionDraft>, WithKey

public interface DivisionDraft extends BusinessUnitDraft, Draft<DivisionDraft>

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


Example to create an instance using the builder pattern

     DivisionDraft divisionDraft = DivisionDraft.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
    • getStoreMode

      BusinessUnitStoreMode getStoreMode()

      If not set, the Division inherits the Stores from a parent unit. Set this to Explicit if you want to set the Stores explicitly in the stores field instead.

      Specified by:
      getStoreMode in interface BusinessUnitDraft
      Returns:
      storeMode
    • getAssociateMode

      BusinessUnitAssociateMode getAssociateMode()

      Determines whether the Division can inherit Associates from a parent.

      Specified by:
      getAssociateMode in interface BusinessUnitDraft
      Returns:
      associateMode
    • setParentUnit

      void setParentUnit(BusinessUnitResourceIdentifier parentUnit)

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

      Parameters:
      parentUnit - value to be set
    • setStoreMode

      void setStoreMode(BusinessUnitStoreMode storeMode)

      If not set, the Division inherits the Stores from a parent unit. Set this to Explicit if you want to set the Stores explicitly in the stores field instead.

      Specified by:
      setStoreMode in interface BusinessUnitDraft
      Parameters:
      storeMode - value to be set
    • setAssociateMode

      void setAssociateMode(BusinessUnitAssociateMode associateMode)

      Determines whether the Division can inherit Associates from a parent.

      Specified by:
      setAssociateMode in interface BusinessUnitDraft
      Parameters:
      associateMode - value to be set
    • of

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

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

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

      static DivisionDraftBuilder builder()
      builder factory method for DivisionDraft
      Returns:
      builder
    • builder

      static DivisionDraftBuilder builder(DivisionDraft template)
      create builder for DivisionDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDivisionDraft

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