public class GuestLineItem extends GenericParcelable implements Validator, JSONifiable
GuestLineItem object that associates a guest and line item together for Tables 2.0
Modifier and Type | Class and Description |
---|---|
static interface |
GuestLineItem.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<GuestLineItem> |
CREATOR |
static JSONifiable.Creator<GuestLineItem> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
GuestLineItem()
Constructs a new empty instance.
|
protected |
GuestLineItem(boolean noInit)
Constructs a new empty instance.
|
|
GuestLineItem(GuestLineItem src)
Constructs a new instance that is a deep copy of the source instance.
|
|
GuestLineItem(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.
|
|
GuestLineItem(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 |
clearGuest()
Clears the 'guest' 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 |
clearLineItem()
Clears the 'lineItem' field, the 'has' method for this field will now return false
|
void |
clearMerchant()
Clears the 'merchant' 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
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
GuestLineItem |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getCreatedTime()
Timestamp when the table was created
|
Long |
getDeletedTime()
Timestamp when table was last deleted
|
protected GenericClient |
getGenericClient() |
Guest |
getGuest()
Guest associated to the line item
|
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.
|
LineItem |
getLineItem()
Line item associated to the guest
|
Merchant |
getMerchant()
The merchant the TableOrder object belongs to
|
Long |
getModifiedTime()
Timestamp when the table was last modified
|
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 |
hasGuest()
Checks whether the 'guest' 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 |
hasLineItem()
Checks whether the 'lineItem' field has been set, however the value could be null
|
boolean |
hasMerchant()
Checks whether the 'merchant' 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 |
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 |
isNotNullGuest()
Checks whether the 'guest' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullLineItem()
Checks whether the 'lineItem' field is set and is not null
|
boolean |
isNotNullMerchant()
Checks whether the 'merchant' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
void |
mergeChanges(GuestLineItem 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.
|
GuestLineItem |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
GuestLineItem |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
GuestLineItem |
setGuest(Guest guest)
Sets the field 'guest'.
|
GuestLineItem |
setId(String id)
Sets the field 'id'.
|
GuestLineItem |
setLineItem(LineItem lineItem)
Sets the field 'lineItem'.
|
GuestLineItem |
setMerchant(Merchant merchant)
Sets the field 'merchant'.
|
GuestLineItem |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<GuestLineItem> CREATOR
public static final JSONifiable.Creator<GuestLineItem> JSON_CREATOR
public GuestLineItem()
protected GuestLineItem(boolean noInit)
public GuestLineItem(String json) throws IllegalArgumentException
IllegalArgumentException
public GuestLineItem(JSONObject jsonObject)
public GuestLineItem(GuestLineItem src)
public String getId()
public LineItem getLineItem()
public Guest getGuest()
public Merchant getMerchant()
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 isNotNullLineItem()
public boolean isNotNullGuest()
public boolean isNotNullMerchant()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean isNotNullDeletedTime()
public boolean hasId()
public boolean hasLineItem()
public boolean hasGuest()
public boolean hasMerchant()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public boolean hasDeletedTime()
public GuestLineItem setId(String id)
public GuestLineItem setLineItem(LineItem lineItem)
public GuestLineItem setGuest(Guest guest)
public GuestLineItem setMerchant(Merchant merchant)
public GuestLineItem setCreatedTime(Long createdTime)
public GuestLineItem setModifiedTime(Long modifiedTime)
public GuestLineItem setDeletedTime(Long deletedTime)
public void clearId()
public void clearLineItem()
public void clearGuest()
public void clearMerchant()
public void clearCreatedTime()
public void clearModifiedTime()
public void clearDeletedTime()
public boolean containsChanges()
public void resetChangeLog()
public GuestLineItem copyChanges()
public void mergeChanges(GuestLineItem src)