public class DisplayLineItem extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
DisplayLineItem.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<DisplayLineItem> |
CREATOR |
static JSONifiable.Creator<DisplayLineItem> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
DisplayLineItem()
Constructs a new empty instance.
|
protected |
DisplayLineItem(boolean noInit)
Constructs a new empty instance.
|
|
DisplayLineItem(DisplayLineItem src)
Constructs a new instance that is a deep copy of the source instance.
|
|
DisplayLineItem(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.
|
|
DisplayLineItem(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAlternateName()
Clears the 'alternateName' field, the 'has' method for this field will now return false
|
void |
clearBinName()
Clears the 'binName' field, the 'has' method for this field will now return false
|
void |
clearDiscountAmount()
Clears the 'discountAmount' field, the 'has' method for this field will now return false
|
void |
clearDiscounts()
Clears the 'discounts' field, the 'has' method for this field will now return false
|
void |
clearExchanged()
Clears the 'exchanged' field, the 'has' method for this field will now return false
|
void |
clearExchangedAmount()
Clears the 'exchangedAmount' 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 |
clearModifications()
Clears the 'modifications' 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 |
clearNote()
Clears the 'note' field, the 'has' method for this field will now return false
|
void |
clearOrderId()
Clears the 'orderId' field, the 'has' method for this field will now return false
|
void |
clearPercent()
Clears the 'percent' field, the 'has' method for this field will now return false
|
void |
clearPrice()
Clears the 'price' field, the 'has' method for this field will now return false
|
void |
clearPrinted()
Clears the 'printed' field, the 'has' method for this field will now return false
|
void |
clearQuantity()
Clears the 'quantity' field, the 'has' method for this field will now return false
|
void |
clearRefunded()
Clears the 'refunded' field, the 'has' method for this field will now return false
|
void |
clearRefundedAmount()
Clears the 'refundedAmount' field, the 'has' method for this field will now return false
|
void |
clearUnitPrice()
Clears the 'unitPrice' field, the 'has' method for this field will now return false
|
void |
clearUnitQuantity()
Clears the 'unitQuantity' field, the 'has' method for this field will now return false
|
void |
clearUserData()
Clears the 'userData' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
DisplayLineItem |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getAlternateName()
Alternate name of the line item
|
String |
getBinName() |
String |
getDiscountAmount() |
List<DisplayDiscount> |
getDiscounts() |
Boolean |
getExchanged() |
String |
getExchangedAmount()
Formatted exchanged amount
|
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.
|
List<DisplayModification> |
getModifications() |
String |
getName()
Line item name
|
String |
getNote() |
String |
getOrderId()
The order with which the line item is associated
|
String |
getPercent() |
String |
getPrice()
Formatted total price of the line item
|
Boolean |
getPrinted() |
String |
getQuantity()
Formatted quantity
|
Boolean |
getRefunded() |
String |
getRefundedAmount()
Formatted refunded amount
|
String |
getUnitPrice()
Formatted unit price in cases if applicable
|
String |
getUnitQuantity()
Formatted unit quantity - such as 10 @ $1.99/oz
|
String |
getUserData() |
boolean |
hasAlternateName()
Checks whether the 'alternateName' field has been set, however the value could be null
|
boolean |
hasBinName()
Checks whether the 'binName' field has been set, however the value could be null
|
boolean |
hasDiscountAmount()
Checks whether the 'discountAmount' field has been set, however the value could be null
|
boolean |
hasDiscounts()
Checks whether the 'discounts' field has been set, however the value could be null
|
boolean |
hasExchanged()
Checks whether the 'exchanged' field has been set, however the value could be null
|
boolean |
hasExchangedAmount()
Checks whether the 'exchangedAmount' 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 |
hasModifications()
Checks whether the 'modifications' 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 |
hasNote()
Checks whether the 'note' field has been set, however the value could be null
|
boolean |
hasOrderId()
Checks whether the 'orderId' field has been set, however the value could be null
|
boolean |
hasPercent()
Checks whether the 'percent' field has been set, however the value could be null
|
boolean |
hasPrice()
Checks whether the 'price' field has been set, however the value could be null
|
boolean |
hasPrinted()
Checks whether the 'printed' field has been set, however the value could be null
|
boolean |
hasQuantity()
Checks whether the 'quantity' field has been set, however the value could be null
|
boolean |
hasRefunded()
Checks whether the 'refunded' field has been set, however the value could be null
|
boolean |
hasRefundedAmount()
Checks whether the 'refundedAmount' field has been set, however the value could be null
|
boolean |
hasUnitPrice()
Checks whether the 'unitPrice' field has been set, however the value could be null
|
boolean |
hasUnitQuantity()
Checks whether the 'unitQuantity' field has been set, however the value could be null
|
boolean |
hasUserData()
Checks whether the 'userData' field has been set, however the value could be null
|
boolean |
isNotEmptyDiscounts()
Checks whether the 'discounts' field is set and is not null and is not empty
|
boolean |
isNotEmptyModifications()
Checks whether the 'modifications' field is set and is not null and is not empty
|
boolean |
isNotNullAlternateName()
Checks whether the 'alternateName' field is set and is not null
|
boolean |
isNotNullBinName()
Checks whether the 'binName' field is set and is not null
|
boolean |
isNotNullDiscountAmount()
Checks whether the 'discountAmount' field is set and is not null
|
boolean |
isNotNullDiscounts()
Checks whether the 'discounts' field is set and is not null
|
boolean |
isNotNullExchanged()
Checks whether the 'exchanged' field is set and is not null
|
boolean |
isNotNullExchangedAmount()
Checks whether the 'exchangedAmount' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullModifications()
Checks whether the 'modifications' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullNote()
Checks whether the 'note' field is set and is not null
|
boolean |
isNotNullOrderId()
Checks whether the 'orderId' field is set and is not null
|
boolean |
isNotNullPercent()
Checks whether the 'percent' field is set and is not null
|
boolean |
isNotNullPrice()
Checks whether the 'price' field is set and is not null
|
boolean |
isNotNullPrinted()
Checks whether the 'printed' field is set and is not null
|
boolean |
isNotNullQuantity()
Checks whether the 'quantity' field is set and is not null
|
boolean |
isNotNullRefunded()
Checks whether the 'refunded' field is set and is not null
|
boolean |
isNotNullRefundedAmount()
Checks whether the 'refundedAmount' field is set and is not null
|
boolean |
isNotNullUnitPrice()
Checks whether the 'unitPrice' field is set and is not null
|
boolean |
isNotNullUnitQuantity()
Checks whether the 'unitQuantity' field is set and is not null
|
boolean |
isNotNullUserData()
Checks whether the 'userData' field is set and is not null
|
void |
mergeChanges(DisplayLineItem 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.
|
DisplayLineItem |
setAlternateName(String alternateName)
Sets the field 'alternateName'.
|
DisplayLineItem |
setBinName(String binName)
Sets the field 'binName'.
|
DisplayLineItem |
setDiscountAmount(String discountAmount)
Sets the field 'discountAmount'.
|
DisplayLineItem |
setDiscounts(List<DisplayDiscount> discounts)
Sets the field 'discounts'.
|
DisplayLineItem |
setExchanged(Boolean exchanged)
Sets the field 'exchanged'.
|
DisplayLineItem |
setExchangedAmount(String exchangedAmount)
Sets the field 'exchangedAmount'.
|
DisplayLineItem |
setId(String id)
Sets the field 'id'.
|
DisplayLineItem |
setModifications(List<DisplayModification> modifications)
Sets the field 'modifications'.
|
DisplayLineItem |
setName(String name)
Sets the field 'name'.
|
DisplayLineItem |
setNote(String note)
Sets the field 'note'.
|
DisplayLineItem |
setOrderId(String orderId)
Sets the field 'orderId'.
|
DisplayLineItem |
setPercent(String percent)
Sets the field 'percent'.
|
DisplayLineItem |
setPrice(String price)
Sets the field 'price'.
|
DisplayLineItem |
setPrinted(Boolean printed)
Sets the field 'printed'.
|
DisplayLineItem |
setQuantity(String quantity)
Sets the field 'quantity'.
|
DisplayLineItem |
setRefunded(Boolean refunded)
Sets the field 'refunded'.
|
DisplayLineItem |
setRefundedAmount(String refundedAmount)
Sets the field 'refundedAmount'.
|
DisplayLineItem |
setUnitPrice(String unitPrice)
Sets the field 'unitPrice'.
|
DisplayLineItem |
setUnitQuantity(String unitQuantity)
Sets the field 'unitQuantity'.
|
DisplayLineItem |
setUserData(String userData)
Sets the field 'userData'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<DisplayLineItem> CREATOR
public static final JSONifiable.Creator<DisplayLineItem> JSON_CREATOR
public DisplayLineItem()
protected DisplayLineItem(boolean noInit)
public DisplayLineItem(String json) throws IllegalArgumentException
IllegalArgumentException
public DisplayLineItem(JSONObject jsonObject)
public DisplayLineItem(DisplayLineItem src)
public String getId()
public String getOrderId()
public String getName()
public String getAlternateName()
public String getPrice()
public String getUnitPrice()
public String getQuantity()
public String getUnitQuantity()
public String getNote()
public Boolean getPrinted()
public String getBinName()
public String getUserData()
public List<DisplayDiscount> getDiscounts()
public String getDiscountAmount()
public Boolean getExchanged()
public String getExchangedAmount()
public List<DisplayModification> getModifications()
public Boolean getRefunded()
public String getRefundedAmount()
public String getPercent()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullOrderId()
public boolean isNotNullName()
public boolean isNotNullAlternateName()
public boolean isNotNullPrice()
public boolean isNotNullUnitPrice()
public boolean isNotNullQuantity()
public boolean isNotNullUnitQuantity()
public boolean isNotNullNote()
public boolean isNotNullPrinted()
public boolean isNotNullBinName()
public boolean isNotNullUserData()
public boolean isNotNullDiscounts()
public boolean isNotEmptyDiscounts()
public boolean isNotNullDiscountAmount()
public boolean isNotNullExchanged()
public boolean isNotNullExchangedAmount()
public boolean isNotNullModifications()
public boolean isNotEmptyModifications()
public boolean isNotNullRefunded()
public boolean isNotNullRefundedAmount()
public boolean isNotNullPercent()
public boolean hasId()
public boolean hasOrderId()
public boolean hasName()
public boolean hasAlternateName()
public boolean hasPrice()
public boolean hasUnitPrice()
public boolean hasQuantity()
public boolean hasUnitQuantity()
public boolean hasNote()
public boolean hasPrinted()
public boolean hasBinName()
public boolean hasUserData()
public boolean hasDiscounts()
public boolean hasDiscountAmount()
public boolean hasExchanged()
public boolean hasExchangedAmount()
public boolean hasModifications()
public boolean hasRefunded()
public boolean hasRefundedAmount()
public boolean hasPercent()
public DisplayLineItem setId(String id)
public DisplayLineItem setOrderId(String orderId)
public DisplayLineItem setName(String name)
public DisplayLineItem setAlternateName(String alternateName)
public DisplayLineItem setPrice(String price)
public DisplayLineItem setUnitPrice(String unitPrice)
public DisplayLineItem setQuantity(String quantity)
public DisplayLineItem setUnitQuantity(String unitQuantity)
public DisplayLineItem setNote(String note)
public DisplayLineItem setPrinted(Boolean printed)
public DisplayLineItem setBinName(String binName)
public DisplayLineItem setUserData(String userData)
public DisplayLineItem setDiscounts(List<DisplayDiscount> discounts)
public DisplayLineItem setDiscountAmount(String discountAmount)
public DisplayLineItem setExchanged(Boolean exchanged)
public DisplayLineItem setExchangedAmount(String exchangedAmount)
public DisplayLineItem setModifications(List<DisplayModification> modifications)
public DisplayLineItem setRefunded(Boolean refunded)
public DisplayLineItem setRefundedAmount(String refundedAmount)
public DisplayLineItem setPercent(String percent)
public void clearId()
public void clearOrderId()
public void clearName()
public void clearAlternateName()
public void clearPrice()
public void clearUnitPrice()
public void clearQuantity()
public void clearUnitQuantity()
public void clearNote()
public void clearPrinted()
public void clearBinName()
public void clearUserData()
public void clearDiscounts()
public void clearDiscountAmount()
public void clearExchanged()
public void clearExchangedAmount()
public void clearModifications()
public void clearRefunded()
public void clearRefundedAmount()
public void clearPercent()
public boolean containsChanges()
public void resetChangeLog()
public DisplayLineItem copyChanges()
public void mergeChanges(DisplayLineItem src)