public class MenuItem extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
MenuItem.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<MenuItem> |
CREATOR |
static JSONifiable.Creator<MenuItem> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
MenuItem()
Constructs a new empty instance.
|
protected |
MenuItem(boolean noInit)
Constructs a new empty instance.
|
|
MenuItem(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.
|
|
MenuItem(MenuItem src)
Constructs a new instance that is a deep copy of the source instance.
|
|
MenuItem(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 |
clearItem()
Clears the 'item' 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 |
clearName()
Clears the 'name' 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.
|
MenuItem |
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 item was created
|
Long |
getDeletedTime()
Timestamp when menu item was last deleted
|
String |
getDescription()
Item description
|
Boolean |
getEnabled()
Item enabled for menu
|
protected GenericClient |
getGenericClient() |
String |
getId()
Item id
|
String |
getImageFilename()
Item image file path
|
Reference |
getItem()
Reference to an item
|
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 item was last modified
|
String |
getName()
Customer facing item name
|
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 |
hasItem()
Checks whether the 'item' 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 |
hasName()
Checks whether the 'name' 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 |
isNotNullItem()
Checks whether the 'item' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullReasonCode()
Checks whether the 'reasonCode' field is set and is not null
|
void |
mergeChanges(MenuItem 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.
|
MenuItem |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
MenuItem |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
MenuItem |
setDescription(String description)
Sets the field 'description'.
|
MenuItem |
setEnabled(Boolean enabled)
Sets the field 'enabled'.
|
MenuItem |
setId(String id)
Sets the field 'id'.
|
MenuItem |
setImageFilename(String imageFilename)
Sets the field 'imageFilename'.
|
MenuItem |
setItem(Reference item)
Sets the field 'item'.
|
MenuItem |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
MenuItem |
setName(String name)
Sets the field 'name'.
|
MenuItem |
setReasonCode(String reasonCode)
Sets the field 'reasonCode'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<MenuItem> CREATOR
public static final JSONifiable.Creator<MenuItem> JSON_CREATOR
public MenuItem()
protected MenuItem(boolean noInit)
public MenuItem(String json) throws IllegalArgumentException
IllegalArgumentException
public MenuItem(JSONObject jsonObject)
public MenuItem(MenuItem src)
public String getId()
public Reference getItem()
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 isNotNullItem()
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 hasItem()
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 MenuItem setItem(Reference item)
public MenuItem setImageFilename(String imageFilename)
public void clearId()
public void clearItem()
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 MenuItem copyChanges()
public void mergeChanges(MenuItem src)