Class ReportDiscountRow

    • Constructor Detail

      • ReportDiscountRow

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

        protected ReportDiscountRow​(boolean noInit)
        Constructs a new empty instance.
      • ReportDiscountRow

        public ReportDiscountRow​(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.
      • ReportDiscountRow

        public ReportDiscountRow​(ReportDiscountRow src)
        Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
    • Method Detail

      • getOrder

        public Reference getOrder()
        Reference to the order for this row
      • getApprovers

        public List<Reference> getApprovers()
        Reference to the employees who approved the discounts on this order
      • getOrderDiscountTotal

        public Long getOrderDiscountTotal()
        Total value of discounts on order
      • getOrderDiscountCount

        public Long getOrderDiscountCount()
        Total number of discounts on order
      • getLineItemDiscountTotal

        public Long getLineItemDiscountTotal()
        Total value of discounts on the order's line items
      • getLineItemDiscountCount

        public Long getLineItemDiscountCount()
        Total number of discounts on the order's line items
      • getTotalDiscount

        public Long getTotalDiscount()
        Total value of all line item and order discounts
      • getTotalDiscountCount

        public Long getTotalDiscountCount()
        Total count of all line item and order discounts
      • 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
      • isNotNullOrder

        public boolean isNotNullOrder()
        Checks whether the 'order' field is set and is not null
      • isNotNullApprovers

        public boolean isNotNullApprovers()
        Checks whether the 'approvers' field is set and is not null
      • isNotEmptyApprovers

        public boolean isNotEmptyApprovers()
        Checks whether the 'approvers' field is set and is not null and is not empty
      • isNotNullOrderDiscountTotal

        public boolean isNotNullOrderDiscountTotal()
        Checks whether the 'orderDiscountTotal' field is set and is not null
      • isNotNullOrderDiscountCount

        public boolean isNotNullOrderDiscountCount()
        Checks whether the 'orderDiscountCount' field is set and is not null
      • isNotNullLineItemDiscountTotal

        public boolean isNotNullLineItemDiscountTotal()
        Checks whether the 'lineItemDiscountTotal' field is set and is not null
      • isNotNullLineItemDiscountCount

        public boolean isNotNullLineItemDiscountCount()
        Checks whether the 'lineItemDiscountCount' field is set and is not null
      • isNotNullTotalDiscount

        public boolean isNotNullTotalDiscount()
        Checks whether the 'totalDiscount' field is set and is not null
      • isNotNullTotalDiscountCount

        public boolean isNotNullTotalDiscountCount()
        Checks whether the 'totalDiscountCount' field is set and is not null
      • hasOrder

        public boolean hasOrder()
        Checks whether the 'order' field has been set, however the value could be null
      • hasApprovers

        public boolean hasApprovers()
        Checks whether the 'approvers' field has been set, however the value could be null
      • hasOrderDiscountTotal

        public boolean hasOrderDiscountTotal()
        Checks whether the 'orderDiscountTotal' field has been set, however the value could be null
      • hasOrderDiscountCount

        public boolean hasOrderDiscountCount()
        Checks whether the 'orderDiscountCount' field has been set, however the value could be null
      • hasLineItemDiscountTotal

        public boolean hasLineItemDiscountTotal()
        Checks whether the 'lineItemDiscountTotal' field has been set, however the value could be null
      • hasLineItemDiscountCount

        public boolean hasLineItemDiscountCount()
        Checks whether the 'lineItemDiscountCount' field has been set, however the value could be null
      • hasTotalDiscount

        public boolean hasTotalDiscount()
        Checks whether the 'totalDiscount' field has been set, however the value could be null
      • hasTotalDiscountCount

        public boolean hasTotalDiscountCount()
        Checks whether the 'totalDiscountCount' field has been set, however the value could be null
      • setOrder

        public ReportDiscountRow setOrder​(Reference order)
        Sets the field 'order'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setApprovers

        public ReportDiscountRow setApprovers​(List<Reference> approvers)
        Sets the field 'approvers'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setOrderDiscountTotal

        public ReportDiscountRow setOrderDiscountTotal​(Long orderDiscountTotal)
        Sets the field 'orderDiscountTotal'.
      • setOrderDiscountCount

        public ReportDiscountRow setOrderDiscountCount​(Long orderDiscountCount)
        Sets the field 'orderDiscountCount'.
      • setLineItemDiscountTotal

        public ReportDiscountRow setLineItemDiscountTotal​(Long lineItemDiscountTotal)
        Sets the field 'lineItemDiscountTotal'.
      • setLineItemDiscountCount

        public ReportDiscountRow setLineItemDiscountCount​(Long lineItemDiscountCount)
        Sets the field 'lineItemDiscountCount'.
      • setTotalDiscount

        public ReportDiscountRow setTotalDiscount​(Long totalDiscount)
        Sets the field 'totalDiscount'.
      • setTotalDiscountCount

        public ReportDiscountRow setTotalDiscountCount​(Long totalDiscountCount)
        Sets the field 'totalDiscountCount'.
      • clearOrder

        public void clearOrder()
        Clears the 'order' field, the 'has' method for this field will now return false
      • clearApprovers

        public void clearApprovers()
        Clears the 'approvers' field, the 'has' method for this field will now return false
      • clearOrderDiscountTotal

        public void clearOrderDiscountTotal()
        Clears the 'orderDiscountTotal' field, the 'has' method for this field will now return false
      • clearOrderDiscountCount

        public void clearOrderDiscountCount()
        Clears the 'orderDiscountCount' field, the 'has' method for this field will now return false
      • clearLineItemDiscountTotal

        public void clearLineItemDiscountTotal()
        Clears the 'lineItemDiscountTotal' field, the 'has' method for this field will now return false
      • clearLineItemDiscountCount

        public void clearLineItemDiscountCount()
        Clears the 'lineItemDiscountCount' field, the 'has' method for this field will now return false
      • clearTotalDiscount

        public void clearTotalDiscount()
        Clears the 'totalDiscount' field, the 'has' method for this field will now return false
      • clearTotalDiscountCount

        public void clearTotalDiscountCount()
        Clears the 'totalDiscountCount' 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 ReportDiscountRow copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(ReportDiscountRow src)
        Copy all the changed fields from the given source to this instance.