public class ReportDiscountRow extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
ReportDiscountRow.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<ReportDiscountRow> |
CREATOR |
static JSONifiable.Creator<ReportDiscountRow> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
ReportDiscountRow()
Constructs a new empty instance.
|
protected |
ReportDiscountRow(boolean noInit)
Constructs a new empty instance.
|
|
ReportDiscountRow(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.
|
|
ReportDiscountRow(ReportDiscountRow src)
Constructs a new instance that is a deep copy of the source instance.
|
|
ReportDiscountRow(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearApprovers()
Clears the 'approvers' field, the 'has' method for this field will now return false
|
void |
clearLineItemDiscountCount()
Clears the 'lineItemDiscountCount' field, the 'has' method for this field will now return false
|
void |
clearLineItemDiscountTotal()
Clears the 'lineItemDiscountTotal' 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 |
clearOrderDiscountCount()
Clears the 'orderDiscountCount' field, the 'has' method for this field will now return false
|
void |
clearOrderDiscountTotal()
Clears the 'orderDiscountTotal' field, the 'has' method for this field will now return false
|
void |
clearTotalDiscount()
Clears the 'totalDiscount' field, the 'has' method for this field will now return false
|
void |
clearTotalDiscountCount()
Clears the 'totalDiscountCount' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
ReportDiscountRow |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
List<Reference> |
getApprovers()
Reference to the employees who approved the discounts on this order
|
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.
|
Long |
getLineItemDiscountCount()
Total number of discounts on the order's line items
|
Long |
getLineItemDiscountTotal()
Total value of discounts on the order's line items
|
Reference |
getOrder()
Reference to the order for this row
|
Long |
getOrderDiscountCount()
Total number of discounts on order
|
Long |
getOrderDiscountTotal()
Total value of discounts on order
|
Long |
getTotalDiscount()
Total value of all line item and order discounts
|
Long |
getTotalDiscountCount()
Total count of all line item and order discounts
|
boolean |
hasApprovers()
Checks whether the 'approvers' field has been set, however the value could be null
|
boolean |
hasLineItemDiscountCount()
Checks whether the 'lineItemDiscountCount' field has been set, however the value could be null
|
boolean |
hasLineItemDiscountTotal()
Checks whether the 'lineItemDiscountTotal' 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 |
hasOrderDiscountCount()
Checks whether the 'orderDiscountCount' field has been set, however the value could be null
|
boolean |
hasOrderDiscountTotal()
Checks whether the 'orderDiscountTotal' field has been set, however the value could be null
|
boolean |
hasTotalDiscount()
Checks whether the 'totalDiscount' field has been set, however the value could be null
|
boolean |
hasTotalDiscountCount()
Checks whether the 'totalDiscountCount' field has been set, however the value could be null
|
boolean |
isNotEmptyApprovers()
Checks whether the 'approvers' field is set and is not null and is not empty
|
boolean |
isNotNullApprovers()
Checks whether the 'approvers' field is set and is not null
|
boolean |
isNotNullLineItemDiscountCount()
Checks whether the 'lineItemDiscountCount' field is set and is not null
|
boolean |
isNotNullLineItemDiscountTotal()
Checks whether the 'lineItemDiscountTotal' field is set and is not null
|
boolean |
isNotNullOrder()
Checks whether the 'order' field is set and is not null
|
boolean |
isNotNullOrderDiscountCount()
Checks whether the 'orderDiscountCount' field is set and is not null
|
boolean |
isNotNullOrderDiscountTotal()
Checks whether the 'orderDiscountTotal' field is set and is not null
|
boolean |
isNotNullTotalDiscount()
Checks whether the 'totalDiscount' field is set and is not null
|
boolean |
isNotNullTotalDiscountCount()
Checks whether the 'totalDiscountCount' field is set and is not null
|
void |
mergeChanges(ReportDiscountRow 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.
|
ReportDiscountRow |
setApprovers(List<Reference> approvers)
Sets the field 'approvers'.
|
ReportDiscountRow |
setLineItemDiscountCount(Long lineItemDiscountCount)
Sets the field 'lineItemDiscountCount'.
|
ReportDiscountRow |
setLineItemDiscountTotal(Long lineItemDiscountTotal)
Sets the field 'lineItemDiscountTotal'.
|
ReportDiscountRow |
setOrder(Reference order)
Sets the field 'order'.
|
ReportDiscountRow |
setOrderDiscountCount(Long orderDiscountCount)
Sets the field 'orderDiscountCount'.
|
ReportDiscountRow |
setOrderDiscountTotal(Long orderDiscountTotal)
Sets the field 'orderDiscountTotal'.
|
ReportDiscountRow |
setTotalDiscount(Long totalDiscount)
Sets the field 'totalDiscount'.
|
ReportDiscountRow |
setTotalDiscountCount(Long totalDiscountCount)
Sets the field 'totalDiscountCount'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<ReportDiscountRow> CREATOR
public static final JSONifiable.Creator<ReportDiscountRow> JSON_CREATOR
public ReportDiscountRow()
protected ReportDiscountRow(boolean noInit)
public ReportDiscountRow(String json) throws IllegalArgumentException
IllegalArgumentException
public ReportDiscountRow(JSONObject jsonObject)
public ReportDiscountRow(ReportDiscountRow src)
public Reference getOrder()
public List<Reference> getApprovers()
public Long getOrderDiscountTotal()
public Long getOrderDiscountCount()
public Long getLineItemDiscountTotal()
public Long getLineItemDiscountCount()
public Long getTotalDiscount()
public Long getTotalDiscountCount()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullOrder()
public boolean isNotNullApprovers()
public boolean isNotEmptyApprovers()
public boolean isNotNullOrderDiscountTotal()
public boolean isNotNullOrderDiscountCount()
public boolean isNotNullLineItemDiscountTotal()
public boolean isNotNullLineItemDiscountCount()
public boolean isNotNullTotalDiscount()
public boolean isNotNullTotalDiscountCount()
public boolean hasOrder()
public boolean hasApprovers()
public boolean hasOrderDiscountTotal()
public boolean hasOrderDiscountCount()
public boolean hasLineItemDiscountTotal()
public boolean hasLineItemDiscountCount()
public boolean hasTotalDiscount()
public boolean hasTotalDiscountCount()
public ReportDiscountRow setOrder(Reference order)
public ReportDiscountRow setApprovers(List<Reference> approvers)
public ReportDiscountRow setOrderDiscountTotal(Long orderDiscountTotal)
public ReportDiscountRow setOrderDiscountCount(Long orderDiscountCount)
public ReportDiscountRow setLineItemDiscountTotal(Long lineItemDiscountTotal)
public ReportDiscountRow setLineItemDiscountCount(Long lineItemDiscountCount)
public ReportDiscountRow setTotalDiscount(Long totalDiscount)
public ReportDiscountRow setTotalDiscountCount(Long totalDiscountCount)
public void clearOrder()
public void clearApprovers()
public void clearOrderDiscountTotal()
public void clearOrderDiscountCount()
public void clearLineItemDiscountTotal()
public void clearLineItemDiscountCount()
public void clearTotalDiscount()
public void clearTotalDiscountCount()
public boolean containsChanges()
public void resetChangeLog()
public ReportDiscountRow copyChanges()
public void mergeChanges(ReportDiscountRow src)