Class VoidExtraData

  • All Implemented Interfaces:
    Parcelable, JSONifiable, Validator

    public class VoidExtraData
    extends GenericParcelable
    implements Validator, JSONifiable
    This used to be a genearted class and its a part of avro-internal schema. The main purpose of this class is to serve as a conduit so that we can add any new objects or data without changing the internal void api's. As of the creation of this object we were only sending the TerminalManagementComponent which was a part of internal package. So the avsc file was created in avro-internal schema. As of this update we wanted to add voidReasonDetails which has more details about why we are trying to void a transaction this is defined in the external schema. We have a seperate task to move all the TerminalManagement details out of the internal schema into external schema. Waiting for that task to complete or making that change as part of this change since is not possible since its a pretty big change. That is the reason we are making this class as a manual.

    Fields

    • Constructor Detail

      • VoidExtraData

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

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

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

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

      • 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
      • isNotNullTerminalManagementComponents

        public boolean isNotNullTerminalManagementComponents()
        Checks whether the 'terminalManagementComponents' field is set and is not null
      • isNotEmptyTerminalManagementComponents

        public boolean isNotEmptyTerminalManagementComponents()
        Checks whether the 'terminalManagementComponents' field is set and is not null and is not empty
      • isNotNullVoidReasonDetails

        public boolean isNotNullVoidReasonDetails()
        Checks whether the 'voidReasonDetails' field is set and is not null
      • hasTerminalManagementComponents

        public boolean hasTerminalManagementComponents()
        Checks whether the 'terminalManagementComponents' field has been set, however the value could be null
      • hasVoidReasonDetails

        public boolean hasVoidReasonDetails()
        Checks whether the 'voidReasonDetails' field has been set, however the value could be null
      • setTerminalManagementComponents

        public VoidExtraData setTerminalManagementComponents​(List<TerminalManagementComponent> terminalManagementComponents)
        Sets the field 'terminalManagementComponents'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setVoidReasonDetails

        public VoidExtraData setVoidReasonDetails​(VoidReasonDetails voidReasonDetails)
        Sets the field 'voidReasonDetails'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • clearTerminalManagementComponents

        public void clearTerminalManagementComponents()
        Clears the 'terminalManagementComponents' field, the 'has' method for this field will now return false
      • clearVoidReasonDetails

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

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