public class LabelSummaryRow extends GenericParcelable implements Validator, JSONifiable
Each instance of this represents a summary of all the line items with the label in the name field
Modifier and Type | Class and Description |
---|---|
static interface |
LabelSummaryRow.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<LabelSummaryRow> |
CREATOR |
static JSONifiable.Creator<LabelSummaryRow> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
LabelSummaryRow()
Constructs a new empty instance.
|
protected |
LabelSummaryRow(boolean noInit)
Constructs a new empty instance.
|
|
LabelSummaryRow(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.
|
|
LabelSummaryRow(LabelSummaryRow src)
Constructs a new instance that is a deep copy of the source instance.
|
|
LabelSummaryRow(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearDiscountAmount()
Clears the 'discountAmount' 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 |
clearNet()
Clears the 'net' field, the 'has' method for this field will now return false
|
void |
clearNetQuantity()
Clears the 'netQuantity' field, the 'has' method for this field will now return false
|
void |
clearNonRevenueAmount()
Clears the 'nonRevenueAmount' field, the 'has' method for this field will now return false
|
void |
clearNumLineItems()
Clears the 'numLineItems' field, the 'has' method for this field will now return false
|
void |
clearPercentNetSale()
Clears the 'percentNetSale' field, the 'has' method for this field will now return false
|
void |
clearRefundAmount()
Clears the 'refundAmount' field, the 'has' method for this field will now return false
|
void |
clearRevenueAmount()
Clears the 'revenueAmount' field, the 'has' method for this field will now return false
|
void |
clearTaxAmount()
Clears the 'taxAmount' field, the 'has' method for this field will now return false
|
void |
clearTotalAmount()
Clears the 'totalAmount' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
LabelSummaryRow |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getDiscountAmount()
Total amount of discounts
|
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.
|
String |
getName()
The name of the row, like Food, Drinks, Alcohol, etc.
|
Long |
getNet()
Total amount minus refund amount.
|
Double |
getNetQuantity()
Optional field, total quantity of items sold
|
Long |
getNonRevenueAmount()
non revenue Line item price
|
Long |
getNumLineItems()
Total number of line items in this category.
|
Double |
getPercentNetSale()
Optional field, percent net sale of item sold
|
Long |
getRefundAmount()
Total amount of refunds.
|
Long |
getRevenueAmount()
Line item price with modifiers and discounts
|
Long |
getTaxAmount()
Total amount of taxes collected.
|
Long |
getTotalAmount()
Line item price with modifiers and discounts plus tax
|
boolean |
hasDiscountAmount()
Checks whether the 'discountAmount' 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 |
hasNet()
Checks whether the 'net' field has been set, however the value could be null
|
boolean |
hasNetQuantity()
Checks whether the 'netQuantity' field has been set, however the value could be null
|
boolean |
hasNonRevenueAmount()
Checks whether the 'nonRevenueAmount' field has been set, however the value could be null
|
boolean |
hasNumLineItems()
Checks whether the 'numLineItems' field has been set, however the value could be null
|
boolean |
hasPercentNetSale()
Checks whether the 'percentNetSale' field has been set, however the value could be null
|
boolean |
hasRefundAmount()
Checks whether the 'refundAmount' field has been set, however the value could be null
|
boolean |
hasRevenueAmount()
Checks whether the 'revenueAmount' field has been set, however the value could be null
|
boolean |
hasTaxAmount()
Checks whether the 'taxAmount' field has been set, however the value could be null
|
boolean |
hasTotalAmount()
Checks whether the 'totalAmount' field has been set, however the value could be null
|
boolean |
isNotNullDiscountAmount()
Checks whether the 'discountAmount' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullNet()
Checks whether the 'net' field is set and is not null
|
boolean |
isNotNullNetQuantity()
Checks whether the 'netQuantity' field is set and is not null
|
boolean |
isNotNullNonRevenueAmount()
Checks whether the 'nonRevenueAmount' field is set and is not null
|
boolean |
isNotNullNumLineItems()
Checks whether the 'numLineItems' field is set and is not null
|
boolean |
isNotNullPercentNetSale()
Checks whether the 'percentNetSale' field is set and is not null
|
boolean |
isNotNullRefundAmount()
Checks whether the 'refundAmount' field is set and is not null
|
boolean |
isNotNullRevenueAmount()
Checks whether the 'revenueAmount' field is set and is not null
|
boolean |
isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not null
|
boolean |
isNotNullTotalAmount()
Checks whether the 'totalAmount' field is set and is not null
|
void |
mergeChanges(LabelSummaryRow 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.
|
LabelSummaryRow |
setDiscountAmount(Long discountAmount)
Sets the field 'discountAmount'.
|
LabelSummaryRow |
setName(String name)
Sets the field 'name'.
|
LabelSummaryRow |
setNet(Long net)
Sets the field 'net'.
|
LabelSummaryRow |
setNetQuantity(Double netQuantity)
Sets the field 'netQuantity'.
|
LabelSummaryRow |
setNonRevenueAmount(Long nonRevenueAmount)
Sets the field 'nonRevenueAmount'.
|
LabelSummaryRow |
setNumLineItems(Long numLineItems)
Sets the field 'numLineItems'.
|
LabelSummaryRow |
setPercentNetSale(Double percentNetSale)
Sets the field 'percentNetSale'.
|
LabelSummaryRow |
setRefundAmount(Long refundAmount)
Sets the field 'refundAmount'.
|
LabelSummaryRow |
setRevenueAmount(Long revenueAmount)
Sets the field 'revenueAmount'.
|
LabelSummaryRow |
setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.
|
LabelSummaryRow |
setTotalAmount(Long totalAmount)
Sets the field 'totalAmount'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<LabelSummaryRow> CREATOR
public static final JSONifiable.Creator<LabelSummaryRow> JSON_CREATOR
public LabelSummaryRow()
protected LabelSummaryRow(boolean noInit)
public LabelSummaryRow(String json) throws IllegalArgumentException
IllegalArgumentException
public LabelSummaryRow(JSONObject jsonObject)
public LabelSummaryRow(LabelSummaryRow src)
public String getName()
public Long getNumLineItems()
public Long getNet()
public Long getTotalAmount()
public Long getRevenueAmount()
public Long getTaxAmount()
public Long getNonRevenueAmount()
public Long getDiscountAmount()
public Long getRefundAmount()
public Double getPercentNetSale()
public Double getNetQuantity()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullName()
public boolean isNotNullNumLineItems()
public boolean isNotNullNet()
public boolean isNotNullTotalAmount()
public boolean isNotNullRevenueAmount()
public boolean isNotNullTaxAmount()
public boolean isNotNullNonRevenueAmount()
public boolean isNotNullDiscountAmount()
public boolean isNotNullRefundAmount()
public boolean isNotNullPercentNetSale()
public boolean isNotNullNetQuantity()
public boolean hasName()
public boolean hasNumLineItems()
public boolean hasNet()
public boolean hasTotalAmount()
public boolean hasRevenueAmount()
public boolean hasTaxAmount()
public boolean hasNonRevenueAmount()
public boolean hasDiscountAmount()
public boolean hasRefundAmount()
public boolean hasPercentNetSale()
public boolean hasNetQuantity()
public LabelSummaryRow setName(String name)
public LabelSummaryRow setNumLineItems(Long numLineItems)
public LabelSummaryRow setNet(Long net)
public LabelSummaryRow setTotalAmount(Long totalAmount)
public LabelSummaryRow setRevenueAmount(Long revenueAmount)
public LabelSummaryRow setTaxAmount(Long taxAmount)
public LabelSummaryRow setNonRevenueAmount(Long nonRevenueAmount)
public LabelSummaryRow setDiscountAmount(Long discountAmount)
public LabelSummaryRow setRefundAmount(Long refundAmount)
public LabelSummaryRow setPercentNetSale(Double percentNetSale)
public LabelSummaryRow setNetQuantity(Double netQuantity)
public void clearName()
public void clearNumLineItems()
public void clearNet()
public void clearTotalAmount()
public void clearRevenueAmount()
public void clearTaxAmount()
public void clearNonRevenueAmount()
public void clearDiscountAmount()
public void clearRefundAmount()
public void clearPercentNetSale()
public void clearNetQuantity()
public boolean containsChanges()
public void resetChangeLog()
public LabelSummaryRow copyChanges()
public void mergeChanges(LabelSummaryRow src)