public class Guest extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
Guest.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Guest> |
CREATOR |
static JSONifiable.Creator<Guest> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Guest()
Constructs a new empty instance.
|
protected |
Guest(boolean noInit)
Constructs a new empty instance.
|
|
Guest(Guest src)
Constructs a new instance that is a deep copy of the source instance.
|
|
Guest(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.
|
|
Guest(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 |
clearId()
Clears the 'id' 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
|
void |
clearName()
Clears the 'name' field, the 'has' method for this field will now return false
|
void |
clearNumber()
Clears the 'number' field, the 'has' method for this field will now return false
|
void |
clearOrder()
Clears the 'order' field, the 'has' method for this field will now return false
|
void |
clearTable()
Clears the 'table' field, the 'has' method for this field will now return false
|
void |
clearTableOrder()
Clears the 'tableOrder' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
Guest |
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() |
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.
|
Merchant |
getMerchant()
The merchant the guest belongs to
|
Long |
getModifiedTime()
Timestamp when the table was last modified
|
String |
getName()
Name of the guest
|
Integer |
getNumber()
This guest's number at the current Table Order
|
Order |
getOrder()
Reference to the order with which the guest is associated.
|
Table |
getTable()
Reference to the table the guest belongs to
|
TableOrder |
getTableOrder()
Table Order the guest belongs to
|
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 |
hasId()
Checks whether the 'id' 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 |
hasName()
Checks whether the 'name' field has been set, however the value could be null
|
boolean |
hasNumber()
Checks whether the 'number' field has been set, however the value could be null
|
boolean |
hasOrder()
Checks whether the 'order' field has been set, however the value could be null
|
boolean |
hasTable()
Checks whether the 'table' field has been set, however the value could be null
|
boolean |
hasTableOrder()
Checks whether the 'tableOrder' 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 |
isNotNullId()
Checks whether the 'id' 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
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullNumber()
Checks whether the 'number' field is set and is not null
|
boolean |
isNotNullOrder()
Checks whether the 'order' field is set and is not null
|
boolean |
isNotNullTable()
Checks whether the 'table' field is set and is not null
|
boolean |
isNotNullTableOrder()
Checks whether the 'tableOrder' field is set and is not null
|
void |
mergeChanges(Guest 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.
|
Guest |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
Guest |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
Guest |
setId(String id)
Sets the field 'id'.
|
Guest |
setMerchant(Merchant merchant)
Sets the field 'merchant'.
|
Guest |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
Guest |
setName(String name)
Sets the field 'name'.
|
Guest |
setNumber(Integer number)
Sets the field 'number'.
|
Guest |
setOrder(Order order)
Sets the field 'order'.
|
Guest |
setTable(Table table)
Sets the field 'table'.
|
Guest |
setTableOrder(TableOrder tableOrder)
Sets the field 'tableOrder'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Guest> CREATOR
public static final JSONifiable.Creator<Guest> JSON_CREATOR
public Guest()
protected Guest(boolean noInit)
public Guest(String json) throws IllegalArgumentException
IllegalArgumentException
public Guest(JSONObject jsonObject)
public Guest(Guest src)
public String getId()
public Integer getNumber()
public TableOrder getTableOrder()
public Merchant getMerchant()
public String getName()
public Table getTable()
public Order getOrder()
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 isNotNullNumber()
public boolean isNotNullTableOrder()
public boolean isNotNullMerchant()
public boolean isNotNullName()
public boolean isNotNullTable()
public boolean isNotNullOrder()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean isNotNullDeletedTime()
public boolean hasId()
public boolean hasNumber()
public boolean hasTableOrder()
public boolean hasMerchant()
public boolean hasName()
public boolean hasTable()
public boolean hasOrder()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public boolean hasDeletedTime()
public Guest setTableOrder(TableOrder tableOrder)
public Guest setMerchant(Merchant merchant)
public Guest setTable(Table table)
public Guest setOrder(Order order)
public void clearId()
public void clearNumber()
public void clearTableOrder()
public void clearMerchant()
public void clearName()
public void clearTable()
public void clearOrder()
public void clearCreatedTime()
public void clearModifiedTime()
public void clearDeletedTime()
public boolean containsChanges()
public void resetChangeLog()
public Guest copyChanges()
public void mergeChanges(Guest src)