public class PrintGroup extends GenericParcelable implements Validator, JSONifiable
Groups together a set of line items to display under a heading on receipts.
IOrderService
Modifier and Type | Class and Description |
---|---|
static interface |
PrintGroup.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<PrintGroup> |
CREATOR |
static JSONifiable.Creator<PrintGroup> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
PrintGroup()
Constructs a new empty instance.
|
protected |
PrintGroup(boolean noInit)
Constructs a new empty instance.
|
|
PrintGroup(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.
|
|
PrintGroup(PrintGroup src)
Constructs a new instance that is a deep copy of the source instance.
|
|
PrintGroup(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearFired()
Clears the 'fired' 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 |
clearName()
Clears the 'name' 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 |
clearPrintTime()
Clears the 'printTime' field, the 'has' method for this field will now return false
|
void |
clearSortOrder()
Clears the 'sortOrder' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
PrintGroup |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Boolean |
getFired()
True if this print group has been sent to an order printer.
|
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.
|
String |
getName()
The print group heading that will be displayed on receipts.
|
Reference |
getOrderRef()
Reference to the order associated with this PrintGroup.
|
Long |
getPrintTime()
Timestamp of when this print group should print or had printed relative to the merchant's Clover device system time.
|
Integer |
getSortOrder()
The order in which this print group is displayed relative to other print groups on the same receipt.
|
boolean |
hasFired()
Checks whether the 'fired' 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 |
hasName()
Checks whether the 'name' 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 |
hasPrintTime()
Checks whether the 'printTime' field has been set, however the value could be null
|
boolean |
hasSortOrder()
Checks whether the 'sortOrder' field has been set, however the value could be null
|
boolean |
isNotNullFired()
Checks whether the 'fired' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullOrderRef()
Checks whether the 'orderRef' field is set and is not null
|
boolean |
isNotNullPrintTime()
Checks whether the 'printTime' field is set and is not null
|
boolean |
isNotNullSortOrder()
Checks whether the 'sortOrder' field is set and is not null
|
void |
mergeChanges(PrintGroup 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.
|
PrintGroup |
setFired(Boolean fired)
Sets the field 'fired'.
|
PrintGroup |
setId(String id)
Sets the field 'id'.
|
PrintGroup |
setName(String name)
Sets the field 'name'.
|
PrintGroup |
setOrderRef(Reference orderRef)
Sets the field 'orderRef'.
|
PrintGroup |
setPrintTime(Long printTime)
Sets the field 'printTime'.
|
PrintGroup |
setSortOrder(Integer sortOrder)
Sets the field 'sortOrder'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<PrintGroup> CREATOR
public static final JSONifiable.Creator<PrintGroup> JSON_CREATOR
public PrintGroup()
protected PrintGroup(boolean noInit)
public PrintGroup(String json) throws IllegalArgumentException
IllegalArgumentException
public PrintGroup(JSONObject jsonObject)
public PrintGroup(PrintGroup src)
public String getId()
public Reference getOrderRef()
public String getName()
public Integer getSortOrder()
public Boolean getFired()
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 isNotNullName()
public boolean isNotNullSortOrder()
public boolean isNotNullFired()
public boolean isNotNullPrintTime()
public boolean hasId()
public boolean hasOrderRef()
public boolean hasName()
public boolean hasSortOrder()
public boolean hasFired()
public boolean hasPrintTime()
public PrintGroup setId(String id)
public PrintGroup setOrderRef(Reference orderRef)
public PrintGroup setName(String name)
public PrintGroup setSortOrder(Integer sortOrder)
public PrintGroup setFired(Boolean fired)
public PrintGroup setPrintTime(Long printTime)
public void clearId()
public void clearOrderRef()
public void clearName()
public void clearSortOrder()
public void clearFired()
public void clearPrintTime()
public boolean containsChanges()
public void resetChangeLog()
public PrintGroup copyChanges()
public void mergeChanges(PrintGroup src)