public class MenuModifier extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
MenuModifier.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<MenuModifier> |
CREATOR |
static JSONifiable.Creator<MenuModifier> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
MenuModifier()
Constructs a new empty instance.
|
protected |
MenuModifier(boolean noInit)
Constructs a new empty instance.
|
|
MenuModifier(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.
|
|
MenuModifier(MenuModifier src)
Constructs a new instance that is a deep copy of the source instance.
|
|
MenuModifier(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
|
void |
clearDeletedTime()
Clears the 'deletedTime' field, the 'has' method for this field will now return false
|
void |
clearDescription()
Clears the 'description' field, the 'has' method for this field will now return false
|
void |
clearEnabled()
Clears the 'enabled' 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 |
clearImageFilename()
Clears the 'imageFilename' field, the 'has' method for this field will now return false
|
void |
clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
|
void |
clearModifier()
Clears the 'modifier' 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
|
void |
clearReasonCode()
Clears the 'reasonCode' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
MenuModifier |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getCreatedTime()
Timestamp when the menu modifier was created
|
Long |
getDeletedTime()
Timestamp when menu modifier was last deleted
|
String |
getDescription()
Modifier description
|
Boolean |
getEnabled()
Modifier enabled for menu
|
protected GenericClient |
getGenericClient() |
String |
getId()
Modifier id
|
String |
getImageFilename()
Modifier image file path
|
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.
|
Long |
getModifiedTime()
Timestamp when the menu modifier was last modified
|
Reference |
getModifier()
Reference to the modifier
|
String |
getName()
Customer facing modifier name
|
Long |
getPrice()
Modifier price
|
String |
getReasonCode()
Reason for being filtered out
|
boolean |
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
|
boolean |
hasDeletedTime()
Checks whether the 'deletedTime' field has been set, however the value could be null
|
boolean |
hasDescription()
Checks whether the 'description' field has been set, however the value could be null
|
boolean |
hasEnabled()
Checks whether the 'enabled' 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 |
hasImageFilename()
Checks whether the 'imageFilename' field has been set, however the value could be null
|
boolean |
hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
|
boolean |
hasModifier()
Checks whether the 'modifier' 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 |
hasReasonCode()
Checks whether the 'reasonCode' field has been set, however the value could be null
|
boolean |
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
|
boolean |
isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not null
|
boolean |
isNotNullDescription()
Checks whether the 'description' field is set and is not null
|
boolean |
isNotNullEnabled()
Checks whether the 'enabled' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullImageFilename()
Checks whether the 'imageFilename' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullModifier()
Checks whether the 'modifier' 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
|
boolean |
isNotNullReasonCode()
Checks whether the 'reasonCode' field is set and is not null
|
void |
mergeChanges(MenuModifier 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.
|
MenuModifier |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
MenuModifier |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
MenuModifier |
setDescription(String description)
Sets the field 'description'.
|
MenuModifier |
setEnabled(Boolean enabled)
Sets the field 'enabled'.
|
MenuModifier |
setId(String id)
Sets the field 'id'.
|
MenuModifier |
setImageFilename(String imageFilename)
Sets the field 'imageFilename'.
|
MenuModifier |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
MenuModifier |
setModifier(Reference modifier)
Sets the field 'modifier'.
|
MenuModifier |
setName(String name)
Sets the field 'name'.
|
MenuModifier |
setPrice(Long price)
Sets the field 'price'.
|
MenuModifier |
setReasonCode(String reasonCode)
Sets the field 'reasonCode'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<MenuModifier> CREATOR
public static final JSONifiable.Creator<MenuModifier> JSON_CREATOR
public MenuModifier()
protected MenuModifier(boolean noInit)
public MenuModifier(String json) throws IllegalArgumentException
IllegalArgumentException
public MenuModifier(JSONObject jsonObject)
public MenuModifier(MenuModifier src)
public String getId()
public Reference getModifier()
public Long getPrice()
public String getName()
public String getDescription()
public String getImageFilename()
public Boolean getEnabled()
public String getReasonCode()
public Long getCreatedTime()
public Long getModifiedTime()
public Long getDeletedTime()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullModifier()
public boolean isNotNullPrice()
public boolean isNotNullName()
public boolean isNotNullDescription()
public boolean isNotNullImageFilename()
public boolean isNotNullEnabled()
public boolean isNotNullReasonCode()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean isNotNullDeletedTime()
public boolean hasId()
public boolean hasModifier()
public boolean hasPrice()
public boolean hasName()
public boolean hasDescription()
public boolean hasImageFilename()
public boolean hasEnabled()
public boolean hasReasonCode()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public boolean hasDeletedTime()
public MenuModifier setId(String id)
public MenuModifier setModifier(Reference modifier)
public MenuModifier setPrice(Long price)
public MenuModifier setName(String name)
public MenuModifier setDescription(String description)
public MenuModifier setImageFilename(String imageFilename)
public MenuModifier setEnabled(Boolean enabled)
public MenuModifier setReasonCode(String reasonCode)
public MenuModifier setCreatedTime(Long createdTime)
public MenuModifier setModifiedTime(Long modifiedTime)
public MenuModifier setDeletedTime(Long deletedTime)
public void clearId()
public void clearModifier()
public void clearPrice()
public void clearName()
public void clearDescription()
public void clearImageFilename()
public void clearEnabled()
public void clearReasonCode()
public void clearCreatedTime()
public void clearModifiedTime()
public void clearDeletedTime()
public boolean containsChanges()
public void resetChangeLog()
public MenuModifier copyChanges()
public void mergeChanges(MenuModifier src)