Package com.clover.sdk.v3.inventory
Class ModifierGroup
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.inventory.ModifierGroup
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class ModifierGroup extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.Fields
- See Also:
IInventoryService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ModifierGroup.Constraints
-
Nested classes/interfaces inherited from interface com.clover.sdk.JSONifiable
JSONifiable.Creator<T>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<ModifierGroup>
CREATOR
static JSONifiable.Creator<ModifierGroup>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description ModifierGroup()
Constructs a new empty instance.protected
ModifierGroup(boolean noInit)
Constructs a new empty instance.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.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAlternateName()
Clears the 'alternateName' field, the 'has' method for this field will now return falsevoid
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearItems()
Clears the 'items' field, the 'has' method for this field will now return falsevoid
clearMaxAllowed()
Clears the 'maxAllowed' field, the 'has' method for this field will now return falsevoid
clearMenuModifierGroup()
Clears the 'menuModifierGroup' field, the 'has' method for this field will now return falsevoid
clearMinRequired()
Clears the 'minRequired' field, the 'has' method for this field will now return falsevoid
clearModifierIds()
Clears the 'modifierIds' field, the 'has' method for this field will now return falsevoid
clearModifiers()
Clears the 'modifiers' field, the 'has' method for this field will now return falsevoid
clearName()
Clears the 'name' field, the 'has' method for this field will now return falsevoid
clearShowByDefault()
Clears the 'showByDefault' field, the 'has' method for this field will now return falsevoid
clearSortOrder()
Clears the 'sortOrder' field, the 'has' method for this field will now return falseboolean
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 identifierList<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 RegisterMenuModifierGroup
getMenuModifierGroup()
Menu Modifier Group attribute that can be expanded to menu group specific attributesInteger
getMinRequired()
The minimum amount of modifiers from this group that must be applied to associated lineItems when using RegisterString
getModifierIds()
An ordered, comma-separated list of modifier ids in this group.List<Modifier>
getModifiers()
String
getName()
Name of the modifier groupBoolean
getShowByDefault()
Whether employees will be automatically prompted to add modifiers from this category when using RegisterInteger
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 nullboolean
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasItems()
Checks whether the 'items' field has been set, however the value could be nullboolean
hasMaxAllowed()
Checks whether the 'maxAllowed' field has been set, however the value could be nullboolean
hasMenuModifierGroup()
Checks whether the 'menuModifierGroup' field has been set, however the value could be nullboolean
hasMinRequired()
Checks whether the 'minRequired' field has been set, however the value could be nullboolean
hasModifierIds()
Checks whether the 'modifierIds' field has been set, however the value could be nullboolean
hasModifiers()
Checks whether the 'modifiers' field has been set, however the value could be nullboolean
hasName()
Checks whether the 'name' field has been set, however the value could be nullboolean
hasShowByDefault()
Checks whether the 'showByDefault' field has been set, however the value could be nullboolean
hasSortOrder()
Checks whether the 'sortOrder' field has been set, however the value could be nullboolean
isNotEmptyItems()
Checks whether the 'items' field is set and is not null and is not emptyboolean
isNotEmptyModifiers()
Checks whether the 'modifiers' field is set and is not null and is not emptyboolean
isNotNullAlternateName()
Checks whether the 'alternateName' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullItems()
Checks whether the 'items' field is set and is not nullboolean
isNotNullMaxAllowed()
Checks whether the 'maxAllowed' field is set and is not nullboolean
isNotNullMenuModifierGroup()
Checks whether the 'menuModifierGroup' field is set and is not nullboolean
isNotNullMinRequired()
Checks whether the 'minRequired' field is set and is not nullboolean
isNotNullModifierIds()
Checks whether the 'modifierIds' field is set and is not nullboolean
isNotNullModifiers()
Checks whether the 'modifiers' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullShowByDefault()
Checks whether the 'showByDefault' field is set and is not nullboolean
isNotNullSortOrder()
Checks whether the 'sortOrder' field is set and is not nullvoid
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()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<ModifierGroup> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<ModifierGroup> JSON_CREATOR
-
-
Constructor Detail
-
ModifierGroup
public ModifierGroup()
Constructs a new empty instance.
-
ModifierGroup
protected ModifierGroup(boolean noInit)
Constructs a new empty instance.
-
ModifierGroup
public ModifierGroup(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
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.
-
getGenericClient
protected GenericClient getGenericClient()
- Specified by:
getGenericClient
in classGenericParcelable
-
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 interfaceJSONifiable
-
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
-
setId
public ModifierGroup setId(String id)
Sets the field 'id'.
-
setName
public ModifierGroup setName(String name)
Sets the field 'name'.
-
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.
-
-