public class PrintOrder extends GenericParcelable implements Validator, JSONifiable
IOrderService
Modifier and Type | Class and Description |
---|---|
static interface |
PrintOrder.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<PrintOrder> |
CREATOR |
static JSONifiable.Creator<PrintOrder> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
PrintOrder()
Constructs a new empty instance.
|
protected |
PrintOrder(boolean noInit)
Constructs a new empty instance.
|
|
PrintOrder(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.
|
|
PrintOrder(PrintOrder src)
Constructs a new instance that is a deep copy of the source instance.
|
|
PrintOrder(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCategory()
Clears the 'category' field, the 'has' method for this field will now return false
|
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 |
clearDeviceRef()
Clears the 'deviceRef' 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 |
clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
|
void |
clearOrderRef()
Clears the 'orderRef' field, the 'has' method for this field will now return false
|
void |
clearOrderSnapshot()
Clears the 'orderSnapshot' field, the 'has' method for this field will now return false
|
void |
clearPrintTime()
Clears the 'printTime' field, the 'has' method for this field will now return false
|
void |
clearState()
Clears the 'state' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
PrintOrder |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
PrintCategory |
getCategory()
The print category
|
Long |
getCreatedTime()
Timestamp when the print event was created
|
Long |
getDeletedTime()
Timestamp when the print event was last deleted
|
Reference |
getDeviceRef()
The printing device.
|
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.
|
Long |
getModifiedTime()
Timestamp when the print event was last modified
|
Reference |
getOrderRef()
Reference to the order to be printed
|
String |
getOrderSnapshot()
Snapshot of the order at the time of print request
|
Long |
getPrintTime()
Timestamp when the print event needs to fire to printer
|
PrintState |
getState()
print event state
|
boolean |
hasCategory()
Checks whether the 'category' field has been set, however the value could be null
|
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 |
hasDeviceRef()
Checks whether the 'deviceRef' 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 |
hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
|
boolean |
hasOrderRef()
Checks whether the 'orderRef' field has been set, however the value could be null
|
boolean |
hasOrderSnapshot()
Checks whether the 'orderSnapshot' field has been set, however the value could be null
|
boolean |
hasPrintTime()
Checks whether the 'printTime' field has been set, however the value could be null
|
boolean |
hasState()
Checks whether the 'state' field has been set, however the value could be null
|
boolean |
isNotNullCategory()
Checks whether the 'category' field is set and is not 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 |
isNotNullDeviceRef()
Checks whether the 'deviceRef' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullOrderRef()
Checks whether the 'orderRef' field is set and is not null
|
boolean |
isNotNullOrderSnapshot()
Checks whether the 'orderSnapshot' field is set and is not null
|
boolean |
isNotNullPrintTime()
Checks whether the 'printTime' field is set and is not null
|
boolean |
isNotNullState()
Checks whether the 'state' field is set and is not null
|
void |
mergeChanges(PrintOrder 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.
|
PrintOrder |
setCategory(PrintCategory category)
Sets the field 'category'.
|
PrintOrder |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
PrintOrder |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
PrintOrder |
setDeviceRef(Reference deviceRef)
Sets the field 'deviceRef'.
|
PrintOrder |
setId(String id)
Sets the field 'id'.
|
PrintOrder |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
PrintOrder |
setOrderRef(Reference orderRef)
Sets the field 'orderRef'.
|
PrintOrder |
setOrderSnapshot(String orderSnapshot)
Sets the field 'orderSnapshot'.
|
PrintOrder |
setPrintTime(Long printTime)
Sets the field 'printTime'.
|
PrintOrder |
setState(PrintState state)
Sets the field 'state'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<PrintOrder> CREATOR
public static final JSONifiable.Creator<PrintOrder> JSON_CREATOR
public PrintOrder()
protected PrintOrder(boolean noInit)
public PrintOrder(String json) throws IllegalArgumentException
IllegalArgumentException
public PrintOrder(JSONObject jsonObject)
public PrintOrder(PrintOrder src)
public String getId()
public Reference getOrderRef()
public Reference getDeviceRef()
public PrintCategory getCategory()
public PrintState getState()
public String getOrderSnapshot()
public Long getCreatedTime()
public Long getModifiedTime()
public Long getDeletedTime()
public Long getPrintTime()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullOrderRef()
public boolean isNotNullDeviceRef()
public boolean isNotNullCategory()
public boolean isNotNullState()
public boolean isNotNullOrderSnapshot()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean isNotNullDeletedTime()
public boolean isNotNullPrintTime()
public boolean hasId()
public boolean hasOrderRef()
public boolean hasDeviceRef()
public boolean hasCategory()
public boolean hasState()
public boolean hasOrderSnapshot()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public boolean hasDeletedTime()
public boolean hasPrintTime()
public PrintOrder setId(String id)
public PrintOrder setOrderRef(Reference orderRef)
public PrintOrder setDeviceRef(Reference deviceRef)
public PrintOrder setCategory(PrintCategory category)
public PrintOrder setState(PrintState state)
public PrintOrder setOrderSnapshot(String orderSnapshot)
public PrintOrder setCreatedTime(Long createdTime)
public PrintOrder setModifiedTime(Long modifiedTime)
public PrintOrder setDeletedTime(Long deletedTime)
public PrintOrder setPrintTime(Long printTime)
public void clearId()
public void clearOrderRef()
public void clearDeviceRef()
public void clearCategory()
public void clearState()
public void clearOrderSnapshot()
public void clearCreatedTime()
public void clearModifiedTime()
public void clearDeletedTime()
public void clearPrintTime()
public boolean containsChanges()
public void resetChangeLog()
public PrintOrder copyChanges()
public void mergeChanges(PrintOrder src)