public class ModifierGroup extends GenericParcelable implements Validator, JSONifiable
IInventoryService
Modifier and Type | Class and Description |
---|---|
static interface |
ModifierGroup.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<ModifierGroup> |
CREATOR |
static JSONifiable.Creator<ModifierGroup> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
ModifierGroup()
Constructs a new empty instance.
|
protected |
ModifierGroup(boolean noInit)
Constructs a new empty instance.
|
|
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(ModifierGroup src)
Constructs a new instance that is a deep copy of the source instance.
|
|
ModifierGroup(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAlternateName()
Clears the 'alternateName' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearItems()
Clears the 'items' field, the 'has' method for this field will now return false
|
void |
clearMaxAllowed()
Clears the 'maxAllowed' field, the 'has' method for this field will now return false
|
void |
clearMenuModifierGroup()
Clears the 'menuModifierGroup' field, the 'has' method for this field will now return false
|
void |
clearMinRequired()
Clears the 'minRequired' field, the 'has' method for this field will now return false
|
void |
clearModifierIds()
Clears the 'modifierIds' field, the 'has' method for this field will now return false
|
void |
clearModifiers()
Clears the 'modifiers' field, the 'has' method for this field will now return false
|
void |
clearName()
Clears the 'name' field, the 'has' method for this field will now return false
|
void |
clearShowByDefault()
Clears the 'showByDefault' field, the 'has' method for this field will now return false
|
void |
clearSortOrder()
Clears the 'sortOrder' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
ModifierGroup |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getAlternateName() |
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
List<Reference> |
getItems() |
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.
|
Integer |
getMaxAllowed()
The maximum amount of modifiers from this group that can be applied to associated lineItems when using Register
|
MenuModifierGroup |
getMenuModifierGroup()
Menu Modifier Group attribute that can be expanded to menu group specific attributes
|
Integer |
getMinRequired()
The minimum amount of modifiers from this group that must be applied to associated lineItems when using Register
|
String |
getModifierIds()
An ordered, comma-separated list of modifier ids in this group.
|
List<Modifier> |
getModifiers() |
String |
getName()
Name of the modifier group
|
Boolean |
getShowByDefault()
Whether employees will be automatically prompted to add modifiers from this category when using Register
|
Integer |
getSortOrder()
The ordinal value used to determine where in an ordered list this modifier group should appear relative to others.
|
boolean |
hasAlternateName()
Checks whether the 'alternateName' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasItems()
Checks whether the 'items' field has been set, however the value could be null
|
boolean |
hasMaxAllowed()
Checks whether the 'maxAllowed' field has been set, however the value could be null
|
boolean |
hasMenuModifierGroup()
Checks whether the 'menuModifierGroup' field has been set, however the value could be null
|
boolean |
hasMinRequired()
Checks whether the 'minRequired' field has been set, however the value could be null
|
boolean |
hasModifierIds()
Checks whether the 'modifierIds' field has been set, however the value could be null
|
boolean |
hasModifiers()
Checks whether the 'modifiers' field has been set, however the value could be null
|
boolean |
hasName()
Checks whether the 'name' field has been set, however the value could be null
|
boolean |
hasShowByDefault()
Checks whether the 'showByDefault' field has been set, however the value could be null
|
boolean |
hasSortOrder()
Checks whether the 'sortOrder' field has been set, however the value could be null
|
boolean |
isNotEmptyItems()
Checks whether the 'items' field is set and is not null and is not empty
|
boolean |
isNotEmptyModifiers()
Checks whether the 'modifiers' field is set and is not null and is not empty
|
boolean |
isNotNullAlternateName()
Checks whether the 'alternateName' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullItems()
Checks whether the 'items' field is set and is not null
|
boolean |
isNotNullMaxAllowed()
Checks whether the 'maxAllowed' field is set and is not null
|
boolean |
isNotNullMenuModifierGroup()
Checks whether the 'menuModifierGroup' field is set and is not null
|
boolean |
isNotNullMinRequired()
Checks whether the 'minRequired' field is set and is not null
|
boolean |
isNotNullModifierIds()
Checks whether the 'modifierIds' field is set and is not null
|
boolean |
isNotNullModifiers()
Checks whether the 'modifiers' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullShowByDefault()
Checks whether the 'showByDefault' field is set and is not null
|
boolean |
isNotNullSortOrder()
Checks whether the 'sortOrder' field is set and is not null
|
void |
mergeChanges(ModifierGroup src)
Copy all the changed fields from the given source to this instance.
|
void |
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
|
ModifierGroup |
setAlternateName(String alternateName)
Sets the field 'alternateName'.
|
ModifierGroup |
setId(String id)
Sets the field 'id'.
|
ModifierGroup |
setItems(List<Reference> items)
Sets the field 'items'.
|
ModifierGroup |
setMaxAllowed(Integer maxAllowed)
Sets the field 'maxAllowed'.
|
ModifierGroup |
setMenuModifierGroup(MenuModifierGroup menuModifierGroup)
Sets the field 'menuModifierGroup'.
|
ModifierGroup |
setMinRequired(Integer minRequired)
Sets the field 'minRequired'.
|
ModifierGroup |
setModifierIds(String modifierIds)
Sets the field 'modifierIds'.
|
ModifierGroup |
setModifiers(List<Modifier> modifiers)
Sets the field 'modifiers'.
|
ModifierGroup |
setName(String name)
Sets the field 'name'.
|
ModifierGroup |
setShowByDefault(Boolean showByDefault)
Sets the field 'showByDefault'.
|
ModifierGroup |
setSortOrder(Integer sortOrder)
Sets the field 'sortOrder'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<ModifierGroup> CREATOR
public static final JSONifiable.Creator<ModifierGroup> JSON_CREATOR
public ModifierGroup()
protected ModifierGroup(boolean noInit)
public ModifierGroup(String json) throws IllegalArgumentException
IllegalArgumentException
public ModifierGroup(JSONObject jsonObject)
public ModifierGroup(ModifierGroup src)
public String getId()
public String getName()
public String getAlternateName()
public Integer getMinRequired()
public Integer getMaxAllowed()
public Boolean getShowByDefault()
public String getModifierIds()
public MenuModifierGroup getMenuModifierGroup()
public Integer getSortOrder()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullName()
public boolean isNotNullAlternateName()
public boolean isNotNullMinRequired()
public boolean isNotNullMaxAllowed()
public boolean isNotNullShowByDefault()
public boolean isNotNullModifiers()
public boolean isNotEmptyModifiers()
public boolean isNotNullModifierIds()
public boolean isNotNullItems()
public boolean isNotEmptyItems()
public boolean isNotNullMenuModifierGroup()
public boolean isNotNullSortOrder()
public boolean hasId()
public boolean hasName()
public boolean hasAlternateName()
public boolean hasMinRequired()
public boolean hasMaxAllowed()
public boolean hasShowByDefault()
public boolean hasModifiers()
public boolean hasModifierIds()
public boolean hasItems()
public boolean hasMenuModifierGroup()
public boolean hasSortOrder()
public ModifierGroup setId(String id)
public ModifierGroup setName(String name)
public ModifierGroup setAlternateName(String alternateName)
public ModifierGroup setMinRequired(Integer minRequired)
public ModifierGroup setMaxAllowed(Integer maxAllowed)
public ModifierGroup setShowByDefault(Boolean showByDefault)
public ModifierGroup setModifiers(List<Modifier> modifiers)
public ModifierGroup setModifierIds(String modifierIds)
public ModifierGroup setItems(List<Reference> items)
public ModifierGroup setMenuModifierGroup(MenuModifierGroup menuModifierGroup)
public ModifierGroup setSortOrder(Integer sortOrder)
public void clearId()
public void clearName()
public void clearAlternateName()
public void clearMinRequired()
public void clearMaxAllowed()
public void clearShowByDefault()
public void clearModifiers()
public void clearModifierIds()
public void clearItems()
public void clearMenuModifierGroup()
public void clearSortOrder()
public boolean containsChanges()
public void resetChangeLog()
public ModifierGroup copyChanges()
public void mergeChanges(ModifierGroup src)