public class LineItemEvent extends GenericParcelable implements Validator, JSONifiable
An immutable event that occurred on a particular line item.
Modifier and Type | Class and Description |
---|---|
static interface |
LineItemEvent.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<LineItemEvent> |
CREATOR |
static JSONifiable.Creator<LineItemEvent> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
LineItemEvent()
Constructs a new empty instance.
|
protected |
LineItemEvent(boolean noInit)
Constructs a new empty instance.
|
|
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(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.
|
Modifier and Type | Method and Description |
---|---|
void |
clearClientCreatedTime()
Clears the 'clientCreatedTime' field, the 'has' method for this field will now return false
|
void |
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearLineItemId()
Clears the 'lineItemId' field, the 'has' method for this field will now return false
|
void |
clearOrderId()
Clears the 'orderId' field, the 'has' method for this field will now return false
|
void |
clearParentLineItemEvent()
Clears the 'parentLineItemEvent' field, the 'has' method for this field will now return false
|
void |
clearType()
Clears the 'type' field, the 'has' method for this field will now return false
|
boolean |
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.
|
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 event
|
String |
getType()
The event type.
|
boolean |
hasClientCreatedTime()
Checks whether the 'clientCreatedTime' field has been set, however the value could be null
|
boolean |
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasLineItemId()
Checks whether the 'lineItemId' field has been set, however the value could be null
|
boolean |
hasOrderId()
Checks whether the 'orderId' field has been set, however the value could be null
|
boolean |
hasParentLineItemEvent()
Checks whether the 'parentLineItemEvent' field has been set, however the value could be null
|
boolean |
hasType()
Checks whether the 'type' field has been set, however the value could be null
|
boolean |
isNotNullClientCreatedTime()
Checks whether the 'clientCreatedTime' field is set and is not null
|
boolean |
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullLineItemId()
Checks whether the 'lineItemId' field is set and is not null
|
boolean |
isNotNullOrderId()
Checks whether the 'orderId' field is set and is not null
|
boolean |
isNotNullParentLineItemEvent()
Checks whether the 'parentLineItemEvent' field is set and is not null
|
boolean |
isNotNullType()
Checks whether the 'type' field is set and is not null
|
void |
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 |
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() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<LineItemEvent> CREATOR
public static final JSONifiable.Creator<LineItemEvent> JSON_CREATOR
public LineItemEvent()
protected LineItemEvent(boolean noInit)
public LineItemEvent(String json) throws IllegalArgumentException
IllegalArgumentException
public LineItemEvent(JSONObject jsonObject)
public LineItemEvent(LineItemEvent src)
public String getId()
public String getType()
public String getOrderId()
public String getLineItemId()
public Long getClientCreatedTime()
public Long getCreatedTime()
public Reference getParentLineItemEvent()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullType()
public boolean isNotNullOrderId()
public boolean isNotNullLineItemId()
public boolean isNotNullClientCreatedTime()
public boolean isNotNullCreatedTime()
public boolean isNotNullParentLineItemEvent()
public boolean hasId()
public boolean hasType()
public boolean hasOrderId()
public boolean hasLineItemId()
public boolean hasClientCreatedTime()
public boolean hasCreatedTime()
public boolean hasParentLineItemEvent()
public LineItemEvent setId(String id)
public LineItemEvent setType(String type)
public LineItemEvent setOrderId(String orderId)
public LineItemEvent setLineItemId(String lineItemId)
public LineItemEvent setClientCreatedTime(Long clientCreatedTime)
public LineItemEvent setCreatedTime(Long createdTime)
public LineItemEvent setParentLineItemEvent(Reference parentLineItemEvent)
public void clearId()
public void clearType()
public void clearOrderId()
public void clearLineItemId()
public void clearClientCreatedTime()
public void clearCreatedTime()
public void clearParentLineItemEvent()
public boolean containsChanges()
public void resetChangeLog()
public LineItemEvent copyChanges()
public void mergeChanges(LineItemEvent src)