public class Modifier extends GenericParcelable implements Validator, JSONifiable
IInventoryService
Modifier and Type | Class and Description |
---|---|
static interface |
Modifier.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Modifier> |
CREATOR |
static JSONifiable.Creator<Modifier> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Modifier()
Constructs a new empty instance.
|
protected |
Modifier(boolean noInit)
Constructs a new empty instance.
|
|
Modifier(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.
|
|
Modifier(Modifier src)
Constructs a new instance that is a deep copy of the source instance.
|
|
Modifier(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 |
clearAvailable()
Clears the 'available' 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 |
clearMenuModifier()
Clears the 'menuModifier' field, the 'has' method for this field will now return false
|
void |
clearModifierGroup()
Clears the 'modifierGroup' 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 |
clearPrice()
Clears the 'price' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
Modifier |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getAlternateName()
Alternate name of the modifier
|
Boolean |
getAvailable()
True if this modifier is available across all channels
|
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
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.
|
MenuModifier |
getMenuModifier()
Menu Modifier attribute that can be expanded to menu specific attributes
|
Reference |
getModifierGroup() |
String |
getName()
Name of the modifier
|
Long |
getPrice()
Additional cost when used
|
boolean |
hasAlternateName()
Checks whether the 'alternateName' field has been set, however the value could be null
|
boolean |
hasAvailable()
Checks whether the 'available' 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 |
hasMenuModifier()
Checks whether the 'menuModifier' field has been set, however the value could be null
|
boolean |
hasModifierGroup()
Checks whether the 'modifierGroup' 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 |
hasPrice()
Checks whether the 'price' field has been set, however the value could be null
|
boolean |
isNotNullAlternateName()
Checks whether the 'alternateName' field is set and is not null
|
boolean |
isNotNullAvailable()
Checks whether the 'available' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullMenuModifier()
Checks whether the 'menuModifier' field is set and is not null
|
boolean |
isNotNullModifierGroup()
Checks whether the 'modifierGroup' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullPrice()
Checks whether the 'price' field is set and is not null
|
void |
mergeChanges(Modifier 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.
|
Modifier |
setAlternateName(String alternateName)
Sets the field 'alternateName'.
|
Modifier |
setAvailable(Boolean available)
Sets the field 'available'.
|
Modifier |
setId(String id)
Sets the field 'id'.
|
Modifier |
setMenuModifier(MenuModifier menuModifier)
Sets the field 'menuModifier'.
|
Modifier |
setModifierGroup(Reference modifierGroup)
Sets the field 'modifierGroup'.
|
Modifier |
setName(String name)
Sets the field 'name'.
|
Modifier |
setPrice(Long price)
Sets the field 'price'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Modifier> CREATOR
public static final JSONifiable.Creator<Modifier> JSON_CREATOR
public Modifier()
protected Modifier(boolean noInit)
public Modifier(String json) throws IllegalArgumentException
IllegalArgumentException
public Modifier(JSONObject jsonObject)
public Modifier(Modifier src)
public String getId()
public String getName()
public String getAlternateName()
public Boolean getAvailable()
public Long getPrice()
public Reference getModifierGroup()
public MenuModifier getMenuModifier()
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 isNotNullAvailable()
public boolean isNotNullPrice()
public boolean isNotNullModifierGroup()
public boolean isNotNullMenuModifier()
public boolean hasId()
public boolean hasName()
public boolean hasAlternateName()
public boolean hasAvailable()
public boolean hasPrice()
public boolean hasModifierGroup()
public boolean hasMenuModifier()
public Modifier setAlternateName(String alternateName)
public Modifier setModifierGroup(Reference modifierGroup)
public Modifier setMenuModifier(MenuModifier menuModifier)
public void clearId()
public void clearName()
public void clearAlternateName()
public void clearAvailable()
public void clearPrice()
public void clearModifierGroup()
public void clearMenuModifier()
public boolean containsChanges()
public void resetChangeLog()
public Modifier copyChanges()
public void mergeChanges(Modifier src)