public class Table extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
Table.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Table> |
CREATOR |
static JSONifiable.Creator<Table> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Table()
Constructs a new empty instance.
|
protected |
Table(boolean noInit)
Constructs a new empty instance.
|
|
Table(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.
|
|
Table(String json)
Constructs a new instance from the given JSON String.
|
|
Table(Table src)
Constructs a new instance that is a deep copy of the source instance.
|
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 |
clearGuestCapacity()
Clears the 'guestCapacity' field, the 'has' method for this field will now return false
|
void |
clearHeight()
Clears the 'height' 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 |
clearRotation()
Clears the 'rotation' field, the 'has' method for this field will now return false
|
void |
clearSection()
Clears the 'section' field, the 'has' method for this field will now return false
|
void |
clearTopLeftX()
Clears the 'topLeftX' field, the 'has' method for this field will now return false
|
void |
clearTopLeftY()
Clears the 'topLeftY' field, the 'has' method for this field will now return false
|
void |
clearType()
Clears the 'type' field, the 'has' method for this field will now return false
|
void |
clearWidth()
Clears the 'width' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
Table |
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() |
Integer |
getGuestCapacity()
Number of guests that the table can seat
|
Integer |
getHeight()
Height of the table on the table map
|
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.
|
Reference |
getMerchant()
The merchant the table belongs to
|
Long |
getModifiedTime()
Timestamp when the table was last modified
|
String |
getName()
Name of the table
|
Integer |
getRotation()
Counterclockwise rotation of the table on the table map
|
Reference |
getSection()
The section this table belongs to
|
Integer |
getTopLeftX()
X coordinate of the table's top left location on the table map
|
Integer |
getTopLeftY()
Y coordinate of the table's top left location on the table map
|
TableType |
getType()
Type of the table
|
Integer |
getWidth()
Width of the table on the table map
|
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 |
hasGuestCapacity()
Checks whether the 'guestCapacity' field has been set, however the value could be null
|
boolean |
hasHeight()
Checks whether the 'height' 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 |
hasRotation()
Checks whether the 'rotation' field has been set, however the value could be null
|
boolean |
hasSection()
Checks whether the 'section' field has been set, however the value could be null
|
boolean |
hasTopLeftX()
Checks whether the 'topLeftX' field has been set, however the value could be null
|
boolean |
hasTopLeftY()
Checks whether the 'topLeftY' field has been set, however the value could be null
|
boolean |
hasType()
Checks whether the 'type' field has been set, however the value could be null
|
boolean |
hasWidth()
Checks whether the 'width' 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 |
isNotNullGuestCapacity()
Checks whether the 'guestCapacity' field is set and is not null
|
boolean |
isNotNullHeight()
Checks whether the 'height' 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 |
isNotNullRotation()
Checks whether the 'rotation' field is set and is not null
|
boolean |
isNotNullSection()
Checks whether the 'section' field is set and is not null
|
boolean |
isNotNullTopLeftX()
Checks whether the 'topLeftX' field is set and is not null
|
boolean |
isNotNullTopLeftY()
Checks whether the 'topLeftY' field is set and is not null
|
boolean |
isNotNullType()
Checks whether the 'type' field is set and is not null
|
boolean |
isNotNullWidth()
Checks whether the 'width' field is set and is not null
|
void |
mergeChanges(Table 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.
|
Table |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
Table |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
Table |
setGuestCapacity(Integer guestCapacity)
Sets the field 'guestCapacity'.
|
Table |
setHeight(Integer height)
Sets the field 'height'.
|
Table |
setId(String id)
Sets the field 'id'.
|
Table |
setMerchant(Reference merchant)
Sets the field 'merchant'.
|
Table |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
Table |
setName(String name)
Sets the field 'name'.
|
Table |
setRotation(Integer rotation)
Sets the field 'rotation'.
|
Table |
setSection(Reference section)
Sets the field 'section'.
|
Table |
setTopLeftX(Integer topLeftX)
Sets the field 'topLeftX'.
|
Table |
setTopLeftY(Integer topLeftY)
Sets the field 'topLeftY'.
|
Table |
setType(TableType type)
Sets the field 'type'.
|
Table |
setWidth(Integer width)
Sets the field 'width'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Table> CREATOR
public static final JSONifiable.Creator<Table> JSON_CREATOR
public Table()
protected Table(boolean noInit)
public Table(String json) throws IllegalArgumentException
IllegalArgumentException
public Table(JSONObject jsonObject)
public Table(Table src)
public String getId()
public String getName()
public Long getCreatedTime()
public Long getModifiedTime()
public Long getDeletedTime()
public Reference getMerchant()
public Integer getTopLeftX()
public Integer getTopLeftY()
public Integer getWidth()
public Reference getSection()
public Integer getHeight()
public Integer getGuestCapacity()
public TableType getType()
public Integer getRotation()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullName()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean isNotNullDeletedTime()
public boolean isNotNullMerchant()
public boolean isNotNullTopLeftX()
public boolean isNotNullTopLeftY()
public boolean isNotNullWidth()
public boolean isNotNullSection()
public boolean isNotNullHeight()
public boolean isNotNullGuestCapacity()
public boolean isNotNullType()
public boolean isNotNullRotation()
public boolean hasId()
public boolean hasName()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public boolean hasDeletedTime()
public boolean hasMerchant()
public boolean hasTopLeftX()
public boolean hasTopLeftY()
public boolean hasWidth()
public boolean hasSection()
public boolean hasHeight()
public boolean hasGuestCapacity()
public boolean hasType()
public boolean hasRotation()
public Table setMerchant(Reference merchant)
public Table setSection(Reference section)
public Table setGuestCapacity(Integer guestCapacity)
public void clearId()
public void clearName()
public void clearCreatedTime()
public void clearModifiedTime()
public void clearDeletedTime()
public void clearMerchant()
public void clearTopLeftX()
public void clearTopLeftY()
public void clearWidth()
public void clearSection()
public void clearHeight()
public void clearGuestCapacity()
public void clearType()
public void clearRotation()
public boolean containsChanges()
public void resetChangeLog()
public Table copyChanges()
public void mergeChanges(Table src)