Package com.clover.sdk.v3.order
Class LineItemEvent
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.order.LineItemEvent
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class LineItemEvent extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.An immutable event that occurred on a particular line item.
Fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LineItemEvent.Constraints
-
Nested classes/interfaces inherited from interface com.clover.sdk.JSONifiable
JSONifiable.Creator<T>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<LineItemEvent>
CREATOR
static JSONifiable.Creator<LineItemEvent>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description LineItemEvent()
Constructs a new empty instance.protected
LineItemEvent(boolean noInit)
Constructs a new empty instance.LineItemEvent(LineItemEvent src)
Constructs a new instance that is a deep copy of the source instance.LineItemEvent(String json)
Constructs a new instance from the given JSON String.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearClientCreatedTime()
Clears the 'clientCreatedTime' field, the 'has' method for this field will now return falsevoid
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return falsevoid
clearDeviceId()
Clears the 'deviceId' field, the 'has' method for this field will now return falsevoid
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearLineItemId()
Clears the 'lineItemId' field, the 'has' method for this field will now return falsevoid
clearOrderId()
Clears the 'orderId' field, the 'has' method for this field will now return falsevoid
clearParentLineItemEvent()
Clears the 'parentLineItemEvent' field, the 'has' method for this field will now return falsevoid
clearType()
Clears the 'type' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.LineItemEvent
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Long
getClientCreatedTime()
The time this event was created as supplied by the client.Long
getCreatedTime()
The time this event was recorded to the backend.String
getDeviceId()
Used to identify KDS device id where this line item is marked as Ready/complete.protected GenericClient
getGenericClient()
String
getId()
Unique Clover identifier.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.String
getLineItemId()
A reference to the line item which this is associated.String
getOrderId()
Reference to the order which this is associated.Reference
getParentLineItemEvent()
Reference to its parent line item eventString
getType()
The event type.boolean
hasClientCreatedTime()
Checks whether the 'clientCreatedTime' field has been set, however the value could be nullboolean
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be nullboolean
hasDeviceId()
Checks whether the 'deviceId' field has been set, however the value could be nullboolean
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasLineItemId()
Checks whether the 'lineItemId' field has been set, however the value could be nullboolean
hasOrderId()
Checks whether the 'orderId' field has been set, however the value could be nullboolean
hasParentLineItemEvent()
Checks whether the 'parentLineItemEvent' field has been set, however the value could be nullboolean
hasType()
Checks whether the 'type' field has been set, however the value could be nullboolean
isNotNullClientCreatedTime()
Checks whether the 'clientCreatedTime' field is set and is not nullboolean
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not nullboolean
isNotNullDeviceId()
Checks whether the 'deviceId' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullLineItemId()
Checks whether the 'lineItemId' field is set and is not nullboolean
isNotNullOrderId()
Checks whether the 'orderId' field is set and is not nullboolean
isNotNullParentLineItemEvent()
Checks whether the 'parentLineItemEvent' field is set and is not nullboolean
isNotNullType()
Checks whether the 'type' field is set and is not nullvoid
mergeChanges(LineItemEvent src)
Copy all the changed fields from the given source to this instance.void
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.LineItemEvent
setClientCreatedTime(Long clientCreatedTime)
Sets the field 'clientCreatedTime'.LineItemEvent
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.LineItemEvent
setDeviceId(String deviceId)
Sets the field 'deviceId'.LineItemEvent
setId(String id)
Sets the field 'id'.LineItemEvent
setLineItemId(String lineItemId)
Sets the field 'lineItemId'.LineItemEvent
setOrderId(String orderId)
Sets the field 'orderId'.LineItemEvent
setParentLineItemEvent(Reference parentLineItemEvent)
Sets the field 'parentLineItemEvent'.LineItemEvent
setType(String type)
Sets the field 'type'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<LineItemEvent> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<LineItemEvent> JSON_CREATOR
-
-
Constructor Detail
-
LineItemEvent
public LineItemEvent()
Constructs a new empty instance.
-
LineItemEvent
protected LineItemEvent(boolean noInit)
Constructs a new empty instance.
-
LineItemEvent
public LineItemEvent(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
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
-
getGenericClient
protected GenericClient getGenericClient()
- Specified by:
getGenericClient
in classGenericParcelable
-
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 interfaceJSONifiable
-
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
-
setId
public LineItemEvent setId(String id)
Sets the field 'id'.
-
setType
public LineItemEvent setType(String type)
Sets the field 'type'.
-
setOrderId
public LineItemEvent setOrderId(String orderId)
Sets the field 'orderId'.
-
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.
-
-