public class BaseSale extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
BaseSale.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<BaseSale> |
CREATOR |
static JSONifiable.Creator<BaseSale> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
BaseSale()
Constructs a new empty instance.
|
|
BaseSale(BaseSale src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
BaseSale(boolean noInit)
Constructs a new empty instance.
|
|
BaseSale(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.
|
|
BaseSale(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearName()
Clears the 'name' field, the 'has' method for this field will now return false
|
void |
clearNumberSold()
Clears the 'numberSold' field, the 'has' method for this field will now return false
|
void |
clearNumNonRevenueSold()
Clears the 'numNonRevenueSold' field, the 'has' method for this field will now return false
|
void |
clearPriceSold()
Clears the 'priceSold' field, the 'has' method for this field will now return false
|
void |
clearRevenueSold()
Clears the 'revenueSold' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
BaseSale |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
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() |
Double |
getNumberSold() |
Double |
getNumNonRevenueSold() |
Double |
getPriceSold() |
Long |
getRevenueSold() |
boolean |
hasName()
Checks whether the 'name' field has been set, however the value could be null
|
boolean |
hasNumberSold()
Checks whether the 'numberSold' field has been set, however the value could be null
|
boolean |
hasNumNonRevenueSold()
Checks whether the 'numNonRevenueSold' field has been set, however the value could be null
|
boolean |
hasPriceSold()
Checks whether the 'priceSold' field has been set, however the value could be null
|
boolean |
hasRevenueSold()
Checks whether the 'revenueSold' field has been set, however the value could be null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullNumberSold()
Checks whether the 'numberSold' field is set and is not null
|
boolean |
isNotNullNumNonRevenueSold()
Checks whether the 'numNonRevenueSold' field is set and is not null
|
boolean |
isNotNullPriceSold()
Checks whether the 'priceSold' field is set and is not null
|
boolean |
isNotNullRevenueSold()
Checks whether the 'revenueSold' field is set and is not null
|
void |
mergeChanges(BaseSale 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.
|
BaseSale |
setName(String name)
Sets the field 'name'.
|
BaseSale |
setNumberSold(Double numberSold)
Sets the field 'numberSold'.
|
BaseSale |
setNumNonRevenueSold(Double numNonRevenueSold)
Sets the field 'numNonRevenueSold'.
|
BaseSale |
setPriceSold(Double priceSold)
Sets the field 'priceSold'.
|
BaseSale |
setRevenueSold(Long revenueSold)
Sets the field 'revenueSold'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<BaseSale> CREATOR
public static final JSONifiable.Creator<BaseSale> JSON_CREATOR
public BaseSale()
protected BaseSale(boolean noInit)
public BaseSale(String json) throws IllegalArgumentException
IllegalArgumentException
public BaseSale(JSONObject jsonObject)
public BaseSale(BaseSale src)
public String getName()
public Double getNumberSold()
public Long getRevenueSold()
public Double getNumNonRevenueSold()
public Double getPriceSold()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullName()
public boolean isNotNullNumberSold()
public boolean isNotNullRevenueSold()
public boolean isNotNullNumNonRevenueSold()
public boolean isNotNullPriceSold()
public boolean hasName()
public boolean hasNumberSold()
public boolean hasRevenueSold()
public boolean hasNumNonRevenueSold()
public boolean hasPriceSold()
public BaseSale setNumNonRevenueSold(Double numNonRevenueSold)
public void clearName()
public void clearNumberSold()
public void clearRevenueSold()
public void clearNumNonRevenueSold()
public void clearPriceSold()
public boolean containsChanges()
public void resetChangeLog()
public BaseSale copyChanges()
public void mergeChanges(BaseSale src)