Class LineItemEvent

    • Constructor Detail

      • LineItemEvent

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

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

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

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

      • getId

        public String getId()
        Unique Clover identifier.
      • getType

        public String getType()
        The event type. This is a String and not an enum because its expected that only clients understand event types, and clients may introduce new types only they understand.
      • getOrderId

        public String getOrderId()
        Reference to the order which this is associated.
      • getLineItemId

        public String getLineItemId()
        A reference to the line item which this is associated.
      • getClientCreatedTime

        public Long getClientCreatedTime()
        The time this event was created as supplied by the client. Measured in milliseconds since the Unix epoch.
      • getCreatedTime

        public Long getCreatedTime()
        The time this event was recorded to the backend. Not to be filled in by the client.
      • getParentLineItemEvent

        public Reference getParentLineItemEvent()
        Reference to its parent line item event
      • getDeviceId

        public String getDeviceId()
        Used to identify KDS device id where this line item is marked as Ready/complete. Can be null for all other KDS event types
      • 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
      • isNotNullId

        public boolean isNotNullId()
        Checks whether the 'id' field is set and is not null
      • isNotNullType

        public boolean isNotNullType()
        Checks whether the 'type' field is set and is not null
      • isNotNullOrderId

        public boolean isNotNullOrderId()
        Checks whether the 'orderId' field is set and is not null
      • isNotNullLineItemId

        public boolean isNotNullLineItemId()
        Checks whether the 'lineItemId' field is set and is not null
      • isNotNullClientCreatedTime

        public boolean isNotNullClientCreatedTime()
        Checks whether the 'clientCreatedTime' field is set and is not null
      • isNotNullCreatedTime

        public boolean isNotNullCreatedTime()
        Checks whether the 'createdTime' field is set and is not null
      • isNotNullParentLineItemEvent

        public boolean isNotNullParentLineItemEvent()
        Checks whether the 'parentLineItemEvent' field is set and is not null
      • isNotNullDeviceId

        public boolean isNotNullDeviceId()
        Checks whether the 'deviceId' field is set and is not null
      • hasId

        public boolean hasId()
        Checks whether the 'id' field has been set, however the value could be null
      • hasType

        public boolean hasType()
        Checks whether the 'type' field has been set, however the value could be null
      • hasOrderId

        public boolean hasOrderId()
        Checks whether the 'orderId' field has been set, however the value could be null
      • hasLineItemId

        public boolean hasLineItemId()
        Checks whether the 'lineItemId' field has been set, however the value could be null
      • hasClientCreatedTime

        public boolean hasClientCreatedTime()
        Checks whether the 'clientCreatedTime' field has been set, however the value could be null
      • hasCreatedTime

        public boolean hasCreatedTime()
        Checks whether the 'createdTime' field has been set, however the value could be null
      • hasParentLineItemEvent

        public boolean hasParentLineItemEvent()
        Checks whether the 'parentLineItemEvent' field has been set, however the value could be null
      • hasDeviceId

        public boolean hasDeviceId()
        Checks whether the 'deviceId' field has been set, however the value could be null
      • setLineItemId

        public LineItemEvent setLineItemId​(String lineItemId)
        Sets the field 'lineItemId'.
      • setClientCreatedTime

        public LineItemEvent setClientCreatedTime​(Long clientCreatedTime)
        Sets the field 'clientCreatedTime'.
      • setCreatedTime

        public LineItemEvent setCreatedTime​(Long createdTime)
        Sets the field 'createdTime'.
      • setParentLineItemEvent

        public LineItemEvent setParentLineItemEvent​(Reference parentLineItemEvent)
        Sets the field 'parentLineItemEvent'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setDeviceId

        public LineItemEvent setDeviceId​(String deviceId)
        Sets the field 'deviceId'.
      • clearId

        public void clearId()
        Clears the 'id' field, the 'has' method for this field will now return false
      • clearType

        public void clearType()
        Clears the 'type' field, the 'has' method for this field will now return false
      • clearOrderId

        public void clearOrderId()
        Clears the 'orderId' field, the 'has' method for this field will now return false
      • clearLineItemId

        public void clearLineItemId()
        Clears the 'lineItemId' field, the 'has' method for this field will now return false
      • clearClientCreatedTime

        public void clearClientCreatedTime()
        Clears the 'clientCreatedTime' field, the 'has' method for this field will now return false
      • clearCreatedTime

        public void clearCreatedTime()
        Clears the 'createdTime' field, the 'has' method for this field will now return false
      • clearParentLineItemEvent

        public void clearParentLineItemEvent()
        Clears the 'parentLineItemEvent' field, the 'has' method for this field will now return false
      • clearDeviceId

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

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