public class VoidedLineItem extends GenericParcelable implements Validator, JSONifiable
For reporting on a removed line item
IOrderService
Modifier and Type | Class and Description |
---|---|
static interface |
VoidedLineItem.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<VoidedLineItem> |
CREATOR |
static JSONifiable.Creator<VoidedLineItem> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
VoidedLineItem()
Constructs a new empty instance.
|
protected |
VoidedLineItem(boolean noInit)
Constructs a new empty instance.
|
|
VoidedLineItem(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.
|
|
VoidedLineItem(String json)
Constructs a new instance from the given JSON String.
|
|
VoidedLineItem(VoidedLineItem src)
Constructs a new instance that is a deep copy of the source instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearApprovedBy()
Clears the 'approvedBy' field, the 'has' method for this field will now return false
|
void |
clearClientEventType()
Clears the 'clientEventType' field, the 'has' method for this field will now return false
|
void |
clearCreatedBy()
Clears the 'createdBy' 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 |
clearEnvironment()
Clears the 'environment' 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 |
clearReason()
Clears the 'reason' field, the 'has' method for this field will now return false
|
void |
clearRemovedBy()
Clears the 'removedBy' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
VoidedLineItem |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Reference |
getApprovedBy()
Optional info about employee who approved deletion of line item in case current employee does not have the permission
|
ClientEventType |
getClientEventType()
What event on the client removed this? Was it because of moving a table? Or was it plain old deleting a line item?
|
Reference |
getCreatedBy()
Employee who created the order from which the line item was voided
|
Long |
getDeletedTime()
Timestamp of when this line item was deleted
|
String |
getEnvironment()
Which environment was this recorded in
|
protected GenericClient |
getGenericClient() |
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()
The line item that was voided
|
Reference |
getMerchant() |
String |
getReason()
Why was the line item voided
|
Reference |
getRemovedBy()
Employee who voided the item
|
boolean |
hasApprovedBy()
Checks whether the 'approvedBy' field has been set, however the value could be null
|
boolean |
hasClientEventType()
Checks whether the 'clientEventType' field has been set, however the value could be null
|
boolean |
hasCreatedBy()
Checks whether the 'createdBy' 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 |
hasEnvironment()
Checks whether the 'environment' 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 |
hasReason()
Checks whether the 'reason' field has been set, however the value could be null
|
boolean |
hasRemovedBy()
Checks whether the 'removedBy' field has been set, however the value could be null
|
boolean |
isNotNullApprovedBy()
Checks whether the 'approvedBy' field is set and is not null
|
boolean |
isNotNullClientEventType()
Checks whether the 'clientEventType' field is set and is not null
|
boolean |
isNotNullCreatedBy()
Checks whether the 'createdBy' field is set and is not null
|
boolean |
isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not null
|
boolean |
isNotNullEnvironment()
Checks whether the 'environment' 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 |
isNotNullReason()
Checks whether the 'reason' field is set and is not null
|
boolean |
isNotNullRemovedBy()
Checks whether the 'removedBy' field is set and is not null
|
void |
mergeChanges(VoidedLineItem 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.
|
VoidedLineItem |
setApprovedBy(Reference approvedBy)
Sets the field 'approvedBy'.
|
VoidedLineItem |
setClientEventType(ClientEventType clientEventType)
Sets the field 'clientEventType'.
|
VoidedLineItem |
setCreatedBy(Reference createdBy)
Sets the field 'createdBy'.
|
VoidedLineItem |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
VoidedLineItem |
setEnvironment(String environment)
Sets the field 'environment'.
|
VoidedLineItem |
setLineItem(LineItem lineItem)
Sets the field 'lineItem'.
|
VoidedLineItem |
setMerchant(Reference merchant)
Sets the field 'merchant'.
|
VoidedLineItem |
setReason(String reason)
Sets the field 'reason'.
|
VoidedLineItem |
setRemovedBy(Reference removedBy)
Sets the field 'removedBy'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<VoidedLineItem> CREATOR
public static final JSONifiable.Creator<VoidedLineItem> JSON_CREATOR
public VoidedLineItem()
protected VoidedLineItem(boolean noInit)
public VoidedLineItem(String json) throws IllegalArgumentException
IllegalArgumentException
public VoidedLineItem(JSONObject jsonObject)
public VoidedLineItem(VoidedLineItem src)
public LineItem getLineItem()
public Reference getMerchant()
public String getReason()
public Reference getRemovedBy()
public Reference getApprovedBy()
public Reference getCreatedBy()
public Long getDeletedTime()
public String getEnvironment()
public ClientEventType getClientEventType()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullLineItem()
public boolean isNotNullMerchant()
public boolean isNotNullReason()
public boolean isNotNullRemovedBy()
public boolean isNotNullApprovedBy()
public boolean isNotNullCreatedBy()
public boolean isNotNullDeletedTime()
public boolean isNotNullEnvironment()
public boolean isNotNullClientEventType()
public boolean hasLineItem()
public boolean hasMerchant()
public boolean hasReason()
public boolean hasRemovedBy()
public boolean hasApprovedBy()
public boolean hasCreatedBy()
public boolean hasDeletedTime()
public boolean hasEnvironment()
public boolean hasClientEventType()
public VoidedLineItem setLineItem(LineItem lineItem)
public VoidedLineItem setMerchant(Reference merchant)
public VoidedLineItem setReason(String reason)
public VoidedLineItem setRemovedBy(Reference removedBy)
public VoidedLineItem setApprovedBy(Reference approvedBy)
public VoidedLineItem setCreatedBy(Reference createdBy)
public VoidedLineItem setDeletedTime(Long deletedTime)
public VoidedLineItem setEnvironment(String environment)
public VoidedLineItem setClientEventType(ClientEventType clientEventType)
public void clearLineItem()
public void clearMerchant()
public void clearReason()
public void clearRemovedBy()
public void clearApprovedBy()
public void clearCreatedBy()
public void clearDeletedTime()
public void clearEnvironment()
public void clearClientEventType()
public boolean containsChanges()
public void resetChangeLog()
public VoidedLineItem copyChanges()
public void mergeChanges(VoidedLineItem src)