Class Statement

    • Constructor Detail

      • Statement

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

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

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

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

      • getYear

        public Integer getYear()
      • getMonth

        public Integer getMonth()
      • getAmount

        public Long getAmount()
      • getTax

        public Long getTax()
      • 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
      • isNotNullYear

        public boolean isNotNullYear()
        Checks whether the 'year' field is set and is not null
      • isNotNullMonth

        public boolean isNotNullMonth()
        Checks whether the 'month' field is set and is not null
      • isNotNullAmount

        public boolean isNotNullAmount()
        Checks whether the 'amount' field is set and is not null
      • isNotNullTax

        public boolean isNotNullTax()
        Checks whether the 'tax' field is set and is not null
      • hasYear

        public boolean hasYear()
        Checks whether the 'year' field has been set, however the value could be null
      • hasMonth

        public boolean hasMonth()
        Checks whether the 'month' 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
      • hasTax

        public boolean hasTax()
        Checks whether the 'tax' field has been set, however the value could be null
      • setMonth

        public Statement setMonth​(Integer month)
        Sets the field 'month'.
      • setAmount

        public Statement setAmount​(Long amount)
        Sets the field 'amount'.
      • setTax

        public Statement setTax​(Long tax)
        Sets the field 'tax'.
      • clearYear

        public void clearYear()
        Clears the 'year' field, the 'has' method for this field will now return false
      • clearMonth

        public void clearMonth()
        Clears the 'month' 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
      • clearTax

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

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