Package com.clover.sdk.v3.report
Class KeyedSummary
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.report.KeyedSummary
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class KeyedSummary extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.An object containing all of the fields of a Summary plus one additional key (groupByString). This object is useful for mapping the result set of a SQL query which selects Summaries using a GROUP BY clause.
Fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
KeyedSummary.Constraints
-
Nested classes/interfaces inherited from interface com.clover.sdk.JSONifiable
JSONifiable.Creator<T>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<KeyedSummary>
CREATOR
static JSONifiable.Creator<KeyedSummary>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description KeyedSummary()
Constructs a new empty instance.protected
KeyedSummary(boolean noInit)
Constructs a new empty instance.KeyedSummary(KeyedSummary src)
Constructs a new instance that is a deep copy of the source instance.KeyedSummary(String json)
Constructs a new instance from the given JSON String.KeyedSummary(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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return falsevoid
clearGroupByField()
Clears the 'groupByField' field, the 'has' method for this field will now return falsevoid
clearNum()
Clears the 'num' field, the 'has' method for this field will now return falsevoid
clearServiceChargeAmount()
Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return falsevoid
clearTaxAmount()
Clears the 'taxAmount' field, the 'has' method for this field will now return falsevoid
clearTipAmount()
Clears the 'tipAmount' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.KeyedSummary
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Long
getAmount()
Total amountprotected GenericClient
getGenericClient()
String
getGroupByField()
Group by fieldJSONObject
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
getNum()
Number of rowsLong
getServiceChargeAmount()
total service charge amountLong
getTaxAmount()
total tax amountLong
getTipAmount()
Total tip amountboolean
hasAmount()
Checks whether the 'amount' field has been set, however the value could be nullboolean
hasGroupByField()
Checks whether the 'groupByField' field has been set, however the value could be nullboolean
hasNum()
Checks whether the 'num' field has been set, however the value could be nullboolean
hasServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field has been set, however the value could be nullboolean
hasTaxAmount()
Checks whether the 'taxAmount' field has been set, however the value could be nullboolean
hasTipAmount()
Checks whether the 'tipAmount' field has been set, however the value could be nullboolean
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullGroupByField()
Checks whether the 'groupByField' field is set and is not nullboolean
isNotNullNum()
Checks whether the 'num' field is set and is not nullboolean
isNotNullServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field is set and is not nullboolean
isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not nullboolean
isNotNullTipAmount()
Checks whether the 'tipAmount' field is set and is not nullvoid
mergeChanges(KeyedSummary 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.KeyedSummary
setAmount(Long amount)
Sets the field 'amount'.KeyedSummary
setGroupByField(String groupByField)
Sets the field 'groupByField'.KeyedSummary
setNum(Long num)
Sets the field 'num'.KeyedSummary
setServiceChargeAmount(Long serviceChargeAmount)
Sets the field 'serviceChargeAmount'.KeyedSummary
setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.KeyedSummary
setTipAmount(Long tipAmount)
Sets the field 'tipAmount'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<KeyedSummary> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<KeyedSummary> JSON_CREATOR
-
-
Constructor Detail
-
KeyedSummary
public KeyedSummary()
Constructs a new empty instance.
-
KeyedSummary
protected KeyedSummary(boolean noInit)
Constructs a new empty instance.
-
KeyedSummary
public KeyedSummary(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
KeyedSummary
public KeyedSummary(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.
-
KeyedSummary
public KeyedSummary(KeyedSummary src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getGroupByField
public String getGroupByField()
Group by field
-
getNum
public Long getNum()
Number of rows
-
getAmount
public Long getAmount()
Total amount
-
getTipAmount
public Long getTipAmount()
Total tip amount
-
getTaxAmount
public Long getTaxAmount()
total tax amount
-
getServiceChargeAmount
public Long getServiceChargeAmount()
total service charge amount
-
getGenericClient
protected GenericClient getGenericClient()
- Specified by:
getGenericClient
in classGenericParcelable
-
getJSONObject
public 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.- Specified by:
getJSONObject
in interfaceJSONifiable
-
isNotNullGroupByField
public boolean isNotNullGroupByField()
Checks whether the 'groupByField' field is set and is not null
-
isNotNullNum
public boolean isNotNullNum()
Checks whether the 'num' field is set and is not null
-
isNotNullAmount
public boolean isNotNullAmount()
Checks whether the 'amount' field is set and is not null
-
isNotNullTipAmount
public boolean isNotNullTipAmount()
Checks whether the 'tipAmount' field is set and is not null
-
isNotNullTaxAmount
public boolean isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not null
-
isNotNullServiceChargeAmount
public boolean isNotNullServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field is set and is not null
-
hasGroupByField
public boolean hasGroupByField()
Checks whether the 'groupByField' field has been set, however the value could be null
-
hasNum
public boolean hasNum()
Checks whether the 'num' field has been set, however the value could be null
-
hasAmount
public boolean hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
-
hasTipAmount
public boolean hasTipAmount()
Checks whether the 'tipAmount' field has been set, however the value could be null
-
hasTaxAmount
public boolean hasTaxAmount()
Checks whether the 'taxAmount' field has been set, however the value could be null
-
hasServiceChargeAmount
public boolean hasServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field has been set, however the value could be null
-
setGroupByField
public KeyedSummary setGroupByField(String groupByField)
Sets the field 'groupByField'.
-
setNum
public KeyedSummary setNum(Long num)
Sets the field 'num'.
-
setAmount
public KeyedSummary setAmount(Long amount)
Sets the field 'amount'.
-
setTipAmount
public KeyedSummary setTipAmount(Long tipAmount)
Sets the field 'tipAmount'.
-
setTaxAmount
public KeyedSummary setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.
-
setServiceChargeAmount
public KeyedSummary setServiceChargeAmount(Long serviceChargeAmount)
Sets the field 'serviceChargeAmount'.
-
clearGroupByField
public void clearGroupByField()
Clears the 'groupByField' field, the 'has' method for this field will now return false
-
clearNum
public void clearNum()
Clears the 'num' field, the 'has' method for this field will now return false
-
clearAmount
public void clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
-
clearTipAmount
public void clearTipAmount()
Clears the 'tipAmount' field, the 'has' method for this field will now return false
-
clearTaxAmount
public void clearTaxAmount()
Clears the 'taxAmount' field, the 'has' method for this field will now return false
-
clearServiceChargeAmount
public void clearServiceChargeAmount()
Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return false
-
containsChanges
public boolean containsChanges()
Returns true if this instance has any changes.
-
resetChangeLog
public void resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
-
copyChanges
public KeyedSummary copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(KeyedSummary src)
Copy all the changed fields from the given source to this instance.
-
-