Package com.clover.sdk.v3.inventory
Class Modifier
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.inventory.Modifier
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class Modifier 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
Modifier.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<Modifier>
CREATOR
static JSONifiable.Creator<Modifier>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description Modifier()
Constructs a new empty instance.protected
Modifier(boolean noInit)
Constructs a new empty instance.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(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
clearAvailable()
Clears the 'available' 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
clearMenuModifier()
Clears the 'menuModifier' field, the 'has' method for this field will now return falsevoid
clearModifierGroup()
Clears the 'modifierGroup' 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
clearPrice()
Clears the 'price' field, the 'has' method for this field will now return falseboolean
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 modifierBoolean
getAvailable()
True if this modifier is available across all channelsprotected GenericClient
getGenericClient()
String
getId()
Unique identifierJSONObject
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 attributesReference
getModifierGroup()
String
getName()
Name of the modifierLong
getPrice()
Additional cost when usedboolean
hasAlternateName()
Checks whether the 'alternateName' field has been set, however the value could be nullboolean
hasAvailable()
Checks whether the 'available' 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
hasMenuModifier()
Checks whether the 'menuModifier' field has been set, however the value could be nullboolean
hasModifierGroup()
Checks whether the 'modifierGroup' 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
hasPrice()
Checks whether the 'price' field has been set, however the value could be nullboolean
isNotNullAlternateName()
Checks whether the 'alternateName' field is set and is not nullboolean
isNotNullAvailable()
Checks whether the 'available' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullMenuModifier()
Checks whether the 'menuModifier' field is set and is not nullboolean
isNotNullModifierGroup()
Checks whether the 'modifierGroup' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullPrice()
Checks whether the 'price' field is set and is not nullvoid
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()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<Modifier> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<Modifier> JSON_CREATOR
-
-
Constructor Detail
-
Modifier
public Modifier()
Constructs a new empty instance.
-
Modifier
protected Modifier(boolean noInit)
Constructs a new empty instance.
-
Modifier
public Modifier(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
Modifier
public 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
public Modifier(Modifier 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
-
getAlternateName
public String getAlternateName()
Alternate name of the modifier
-
getAvailable
public Boolean getAvailable()
True if this modifier is available across all channels
-
getPrice
public Long getPrice()
Additional cost when used
-
getModifierGroup
public Reference getModifierGroup()
-
getMenuModifier
public MenuModifier getMenuModifier()
Menu Modifier attribute that can be expanded to menu specific attributes
-
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
-
isNotNullAvailable
public boolean isNotNullAvailable()
Checks whether the 'available' field is set and is not null
-
isNotNullPrice
public boolean isNotNullPrice()
Checks whether the 'price' field is set and is not null
-
isNotNullModifierGroup
public boolean isNotNullModifierGroup()
Checks whether the 'modifierGroup' field is set and is not null
-
isNotNullMenuModifier
public boolean isNotNullMenuModifier()
Checks whether the 'menuModifier' 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
-
hasAvailable
public boolean hasAvailable()
Checks whether the 'available' field has been set, however the value could be null
-
hasPrice
public boolean hasPrice()
Checks whether the 'price' field has been set, however the value could be null
-
hasModifierGroup
public boolean hasModifierGroup()
Checks whether the 'modifierGroup' field has been set, however the value could be null
-
hasMenuModifier
public boolean hasMenuModifier()
Checks whether the 'menuModifier' field has been set, however the value could be null
-
setAlternateName
public Modifier setAlternateName(String alternateName)
Sets the field 'alternateName'.
-
setModifierGroup
public Modifier setModifierGroup(Reference modifierGroup)
Sets the field 'modifierGroup'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setMenuModifier
public Modifier setMenuModifier(MenuModifier menuModifier)
Sets the field 'menuModifier'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
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
-
clearAvailable
public void clearAvailable()
Clears the 'available' field, the 'has' method for this field will now return false
-
clearPrice
public void clearPrice()
Clears the 'price' field, the 'has' method for this field will now return false
-
clearModifierGroup
public void clearModifierGroup()
Clears the 'modifierGroup' field, the 'has' method for this field will now return false
-
clearMenuModifier
public void clearMenuModifier()
Clears the 'menuModifier' 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 Modifier copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(Modifier src)
Copy all the changed fields from the given source to this instance.
-
-