Class ModifierGroup

    • Constructor Detail

      • ModifierGroup

        public ModifierGroup()
        Constructs a new empty instance.
      • ModifierGroup

        protected ModifierGroup​(boolean noInit)
        Constructs a new empty instance.
      • ModifierGroup

        public ModifierGroup​(JSONObject jsonObject)
        Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • ModifierGroup

        public ModifierGroup​(ModifierGroup src)
        Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
    • Method Detail

      • getId

        public String getId()
        Unique identifier
      • getName

        public String getName()
        Name of the modifier group
      • getAlternateName

        public String getAlternateName()
      • getMinRequired

        public Integer getMinRequired()
        The minimum amount of modifiers from this group that must be applied to associated lineItems when using Register
      • getMaxAllowed

        public Integer getMaxAllowed()
        The maximum amount of modifiers from this group that can be applied to associated lineItems when using Register
      • getShowByDefault

        public Boolean getShowByDefault()
        Whether employees will be automatically prompted to add modifiers from this category when using Register
      • getModifierIds

        public String getModifierIds()
        An ordered, comma-separated list of modifier ids in this group. (READ ONLY)
      • getMenuModifierGroup

        public MenuModifierGroup getMenuModifierGroup()
        Menu Modifier Group attribute that can be expanded to menu group specific attributes
      • getSortOrder

        public Integer getSortOrder()
        The ordinal value used to determine where in an ordered list this modifier group should appear relative to others.
      • getJSONObject

        public JSONObject getJSONObject()
        Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be reflected in this instance and vice-versa.
        Specified by:
        getJSONObject in interface JSONifiable
      • isNotNullId

        public boolean isNotNullId()
        Checks whether the 'id' field is set and is not null
      • isNotNullName

        public boolean isNotNullName()
        Checks whether the 'name' field is set and is not null
      • isNotNullAlternateName

        public boolean isNotNullAlternateName()
        Checks whether the 'alternateName' field is set and is not null
      • isNotNullMinRequired

        public boolean isNotNullMinRequired()
        Checks whether the 'minRequired' field is set and is not null
      • isNotNullMaxAllowed

        public boolean isNotNullMaxAllowed()
        Checks whether the 'maxAllowed' field is set and is not null
      • isNotNullShowByDefault

        public boolean isNotNullShowByDefault()
        Checks whether the 'showByDefault' field is set and is not null
      • isNotNullModifiers

        public boolean isNotNullModifiers()
        Checks whether the 'modifiers' field is set and is not null
      • isNotEmptyModifiers

        public boolean isNotEmptyModifiers()
        Checks whether the 'modifiers' field is set and is not null and is not empty
      • isNotNullModifierIds

        public boolean isNotNullModifierIds()
        Checks whether the 'modifierIds' field is set and is not null
      • isNotNullItems

        public boolean isNotNullItems()
        Checks whether the 'items' field is set and is not null
      • isNotEmptyItems

        public boolean isNotEmptyItems()
        Checks whether the 'items' field is set and is not null and is not empty
      • isNotNullMenuModifierGroup

        public boolean isNotNullMenuModifierGroup()
        Checks whether the 'menuModifierGroup' field is set and is not null
      • isNotNullSortOrder

        public boolean isNotNullSortOrder()
        Checks whether the 'sortOrder' field is set and is not null
      • hasId

        public boolean hasId()
        Checks whether the 'id' field has been set, however the value could be null
      • hasName

        public boolean hasName()
        Checks whether the 'name' field has been set, however the value could be null
      • hasAlternateName

        public boolean hasAlternateName()
        Checks whether the 'alternateName' field has been set, however the value could be null
      • hasMinRequired

        public boolean hasMinRequired()
        Checks whether the 'minRequired' field has been set, however the value could be null
      • hasMaxAllowed

        public boolean hasMaxAllowed()
        Checks whether the 'maxAllowed' field has been set, however the value could be null
      • hasShowByDefault

        public boolean hasShowByDefault()
        Checks whether the 'showByDefault' field has been set, however the value could be null
      • hasModifiers

        public boolean hasModifiers()
        Checks whether the 'modifiers' field has been set, however the value could be null
      • hasModifierIds

        public boolean hasModifierIds()
        Checks whether the 'modifierIds' field has been set, however the value could be null
      • hasItems

        public boolean hasItems()
        Checks whether the 'items' field has been set, however the value could be null
      • hasMenuModifierGroup

        public boolean hasMenuModifierGroup()
        Checks whether the 'menuModifierGroup' field has been set, however the value could be null
      • hasSortOrder

        public boolean hasSortOrder()
        Checks whether the 'sortOrder' field has been set, however the value could be null
      • setAlternateName

        public ModifierGroup setAlternateName​(String alternateName)
        Sets the field 'alternateName'.
      • setMinRequired

        public ModifierGroup setMinRequired​(Integer minRequired)
        Sets the field 'minRequired'.
      • setMaxAllowed

        public ModifierGroup setMaxAllowed​(Integer maxAllowed)
        Sets the field 'maxAllowed'.
      • setShowByDefault

        public ModifierGroup setShowByDefault​(Boolean showByDefault)
        Sets the field 'showByDefault'.
      • setModifiers

        public ModifierGroup setModifiers​(List<Modifier> modifiers)
        Sets the field 'modifiers'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setModifierIds

        public ModifierGroup setModifierIds​(String modifierIds)
        Sets the field 'modifierIds'.
      • setItems

        public ModifierGroup setItems​(List<Reference> items)
        Sets the field 'items'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setMenuModifierGroup

        public ModifierGroup setMenuModifierGroup​(MenuModifierGroup menuModifierGroup)
        Sets the field 'menuModifierGroup'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setSortOrder

        public ModifierGroup setSortOrder​(Integer sortOrder)
        Sets the field 'sortOrder'.
      • clearId

        public void clearId()
        Clears the 'id' field, the 'has' method for this field will now return false
      • clearName

        public void clearName()
        Clears the 'name' field, the 'has' method for this field will now return false
      • clearAlternateName

        public void clearAlternateName()
        Clears the 'alternateName' field, the 'has' method for this field will now return false
      • clearMinRequired

        public void clearMinRequired()
        Clears the 'minRequired' field, the 'has' method for this field will now return false
      • clearMaxAllowed

        public void clearMaxAllowed()
        Clears the 'maxAllowed' field, the 'has' method for this field will now return false
      • clearShowByDefault

        public void clearShowByDefault()
        Clears the 'showByDefault' field, the 'has' method for this field will now return false
      • clearModifiers

        public void clearModifiers()
        Clears the 'modifiers' field, the 'has' method for this field will now return false
      • clearModifierIds

        public void clearModifierIds()
        Clears the 'modifierIds' field, the 'has' method for this field will now return false
      • clearItems

        public void clearItems()
        Clears the 'items' field, the 'has' method for this field will now return false
      • clearMenuModifierGroup

        public void clearMenuModifierGroup()
        Clears the 'menuModifierGroup' field, the 'has' method for this field will now return false
      • clearSortOrder

        public void clearSortOrder()
        Clears the 'sortOrder' field, the 'has' method for this field will now return false
      • containsChanges

        public boolean containsChanges()
        Returns true if this instance has any changes.
      • resetChangeLog

        public void resetChangeLog()
        Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
      • copyChanges

        public ModifierGroup copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(ModifierGroup src)
        Copy all the changed fields from the given source to this instance.