Class KeyedSummary

    • Constructor Detail

      • KeyedSummary

        public KeyedSummary()
        Constructs a new empty instance.
      • KeyedSummary

        protected KeyedSummary​(boolean noInit)
        Constructs a new empty instance.
      • 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
      • 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 interface JSONifiable
      • 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'.
      • 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.