public class EmployeeCard extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
EmployeeCard.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<EmployeeCard> |
CREATOR |
static JSONifiable.Creator<EmployeeCard> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
EmployeeCard()
Constructs a new empty instance.
|
protected |
EmployeeCard(boolean noInit)
Constructs a new empty instance.
|
|
EmployeeCard(EmployeeCard src)
Constructs a new instance that is a deep copy of the source instance.
|
|
EmployeeCard(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.
|
|
EmployeeCard(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
|
void |
clearEmployee()
Clears the 'employee' 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 |
clearMerchant()
Clears the 'merchant' field, the 'has' method for this field will now return false
|
void |
clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
|
void |
clearNumber()
Clears the 'number' field, the 'has' method for this field will now return false
|
void |
clearStatus()
Clears the 'status' field, the 'has' method for this field will now return false
|
void |
clearUpdater()
Clears the 'updater' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
EmployeeCard |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getCreatedTime()
Timestamp of when this employee card was created
|
Reference |
getEmployee()
The employee who the card is currently assigned to
|
protected GenericClient |
getGenericClient() |
String |
getId()
Unique 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.
|
Reference |
getMerchant()
The merchant the card belongs to
|
Long |
getModifiedTime()
Timestamp of when this employee card was last updated
|
String |
getNumber()
Unique number on the employee card.
|
EmployeeCardStatus |
getStatus()
Current status of the employee card
|
Reference |
getUpdater()
The employee who last updated the card's state
|
boolean |
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
|
boolean |
hasEmployee()
Checks whether the 'employee' 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 |
hasMerchant()
Checks whether the 'merchant' field has been set, however the value could be null
|
boolean |
hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
|
boolean |
hasNumber()
Checks whether the 'number' field has been set, however the value could be null
|
boolean |
hasStatus()
Checks whether the 'status' field has been set, however the value could be null
|
boolean |
hasUpdater()
Checks whether the 'updater' field has been set, however the value could be null
|
boolean |
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
|
boolean |
isNotNullEmployee()
Checks whether the 'employee' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullMerchant()
Checks whether the 'merchant' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullNumber()
Checks whether the 'number' field is set and is not null
|
boolean |
isNotNullStatus()
Checks whether the 'status' field is set and is not null
|
boolean |
isNotNullUpdater()
Checks whether the 'updater' field is set and is not null
|
void |
mergeChanges(EmployeeCard 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.
|
EmployeeCard |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
EmployeeCard |
setEmployee(Reference employee)
Sets the field 'employee'.
|
EmployeeCard |
setId(String id)
Sets the field 'id'.
|
EmployeeCard |
setMerchant(Reference merchant)
Sets the field 'merchant'.
|
EmployeeCard |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
EmployeeCard |
setNumber(String number)
Sets the field 'number'.
|
EmployeeCard |
setStatus(EmployeeCardStatus status)
Sets the field 'status'.
|
EmployeeCard |
setUpdater(Reference updater)
Sets the field 'updater'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<EmployeeCard> CREATOR
public static final JSONifiable.Creator<EmployeeCard> JSON_CREATOR
public EmployeeCard()
protected EmployeeCard(boolean noInit)
public EmployeeCard(String json) throws IllegalArgumentException
IllegalArgumentException
public EmployeeCard(JSONObject jsonObject)
public EmployeeCard(EmployeeCard src)
public String getId()
public Reference getMerchant()
public Reference getEmployee()
public Reference getUpdater()
public String getNumber()
public EmployeeCardStatus getStatus()
public Long getCreatedTime()
public Long getModifiedTime()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullMerchant()
public boolean isNotNullEmployee()
public boolean isNotNullUpdater()
public boolean isNotNullNumber()
public boolean isNotNullStatus()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean hasId()
public boolean hasMerchant()
public boolean hasEmployee()
public boolean hasUpdater()
public boolean hasNumber()
public boolean hasStatus()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public EmployeeCard setId(String id)
public EmployeeCard setMerchant(Reference merchant)
public EmployeeCard setEmployee(Reference employee)
public EmployeeCard setUpdater(Reference updater)
public EmployeeCard setNumber(String number)
public EmployeeCard setStatus(EmployeeCardStatus status)
public EmployeeCard setCreatedTime(Long createdTime)
public EmployeeCard setModifiedTime(Long modifiedTime)
public void clearId()
public void clearMerchant()
public void clearEmployee()
public void clearUpdater()
public void clearNumber()
public void clearStatus()
public void clearCreatedTime()
public void clearModifiedTime()
public boolean containsChanges()
public void resetChangeLog()
public EmployeeCard copyChanges()
public void mergeChanges(EmployeeCard src)