public class Employee extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
Employee.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Employee> |
CREATOR |
static JSONifiable.Creator<Employee> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Employee()
Constructs a new empty instance.
|
protected |
Employee(boolean noInit)
Constructs a new empty instance.
|
|
Employee(Employee src)
Constructs a new instance that is a deep copy of the source instance.
|
|
Employee(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.
|
|
Employee(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearClaimedTime()
Clears the 'claimedTime' field, the 'has' method for this field will now return false
|
void |
clearCustomId()
Clears the 'customId' field, the 'has' method for this field will now return false
|
void |
clearDeletedTime()
Clears the 'deletedTime' field, the 'has' method for this field will now return false
|
void |
clearEmail()
Clears the 'email' field, the 'has' method for this field will now return false
|
void |
clearEmployeeCards()
Clears the 'employeeCards' 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 |
clearInviteSent()
Clears the 'inviteSent' field, the 'has' method for this field will now return false
|
void |
clearIsOwner()
Clears the 'isOwner' 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 |
clearName()
Clears the 'name' field, the 'has' method for this field will now return false
|
void |
clearNickname()
Clears the 'nickname' field, the 'has' method for this field will now return false
|
void |
clearOrders()
Clears the 'orders' field, the 'has' method for this field will now return false
|
void |
clearPayments()
Clears the 'payments' field, the 'has' method for this field will now return false
|
void |
clearPin()
Clears the 'pin' field, the 'has' method for this field will now return false
|
void |
clearRole()
Clears the 'role' field, the 'has' method for this field will now return false
|
void |
clearRoles()
Clears the 'roles' field, the 'has' method for this field will now return false
|
void |
clearShifts()
Clears the 'shifts' field, the 'has' method for this field will now return false
|
void |
clearUnhashedPin()
Clears the 'unhashedPin' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
Employee |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getClaimedTime()
Timestamp of when this employee claimed their account
|
String |
getCustomId()
Custom ID of the employee
|
Long |
getDeletedTime()
Timestamp of when this employee was deleted
|
String |
getEmail()
Email of the employee (optional)
|
List<Reference> |
getEmployeeCards()
This employee's employee cards
|
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
Boolean |
getInviteSent()
Returns true if this employee was sent an invite to activate their account
|
Boolean |
getIsOwner()
Returns true if this employee is the owner account for this merchant
|
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 employing this employee
|
String |
getName()
Full name of the employee
|
String |
getNickname()
Nickname of the employee (shows up on receipts)
|
List<Reference> |
getOrders()
This employee's orders
|
List<Reference> |
getPayments()
This employee's payments
|
String |
getPin()
Employee PIN (hashed)
|
AccountRole |
getRole()
Employee System Role
|
List<Reference> |
getRoles() |
List<Reference> |
getShifts()
This employee's shifts
|
String |
getUnhashedPin()
Employee PIN
|
boolean |
hasClaimedTime()
Checks whether the 'claimedTime' field has been set, however the value could be null
|
boolean |
hasCustomId()
Checks whether the 'customId' field has been set, however the value could be null
|
boolean |
hasDeletedTime()
Checks whether the 'deletedTime' field has been set, however the value could be null
|
boolean |
hasEmail()
Checks whether the 'email' field has been set, however the value could be null
|
boolean |
hasEmployeeCards()
Checks whether the 'employeeCards' 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 |
hasInviteSent()
Checks whether the 'inviteSent' field has been set, however the value could be null
|
boolean |
hasIsOwner()
Checks whether the 'isOwner' 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 |
hasName()
Checks whether the 'name' field has been set, however the value could be null
|
boolean |
hasNickname()
Checks whether the 'nickname' field has been set, however the value could be null
|
boolean |
hasOrders()
Checks whether the 'orders' field has been set, however the value could be null
|
boolean |
hasPayments()
Checks whether the 'payments' field has been set, however the value could be null
|
boolean |
hasPin()
Checks whether the 'pin' field has been set, however the value could be null
|
boolean |
hasRole()
Checks whether the 'role' field has been set, however the value could be null
|
boolean |
hasRoles()
Checks whether the 'roles' field has been set, however the value could be null
|
boolean |
hasShifts()
Checks whether the 'shifts' field has been set, however the value could be null
|
boolean |
hasUnhashedPin()
Checks whether the 'unhashedPin' field has been set, however the value could be null
|
boolean |
isNotEmptyEmployeeCards()
Checks whether the 'employeeCards' field is set and is not null and is not empty
|
boolean |
isNotEmptyOrders()
Checks whether the 'orders' field is set and is not null and is not empty
|
boolean |
isNotEmptyPayments()
Checks whether the 'payments' field is set and is not null and is not empty
|
boolean |
isNotEmptyRoles()
Checks whether the 'roles' field is set and is not null and is not empty
|
boolean |
isNotEmptyShifts()
Checks whether the 'shifts' field is set and is not null and is not empty
|
boolean |
isNotNullClaimedTime()
Checks whether the 'claimedTime' field is set and is not null
|
boolean |
isNotNullCustomId()
Checks whether the 'customId' field is set and is not null
|
boolean |
isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not null
|
boolean |
isNotNullEmail()
Checks whether the 'email' field is set and is not null
|
boolean |
isNotNullEmployeeCards()
Checks whether the 'employeeCards' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullInviteSent()
Checks whether the 'inviteSent' field is set and is not null
|
boolean |
isNotNullIsOwner()
Checks whether the 'isOwner' field is set and is not null
|
boolean |
isNotNullMerchant()
Checks whether the 'merchant' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullNickname()
Checks whether the 'nickname' field is set and is not null
|
boolean |
isNotNullOrders()
Checks whether the 'orders' field is set and is not null
|
boolean |
isNotNullPayments()
Checks whether the 'payments' field is set and is not null
|
boolean |
isNotNullPin()
Checks whether the 'pin' field is set and is not null
|
boolean |
isNotNullRole()
Checks whether the 'role' field is set and is not null
|
boolean |
isNotNullRoles()
Checks whether the 'roles' field is set and is not null
|
boolean |
isNotNullShifts()
Checks whether the 'shifts' field is set and is not null
|
boolean |
isNotNullUnhashedPin()
Checks whether the 'unhashedPin' field is set and is not null
|
void |
mergeChanges(Employee 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.
|
Employee |
setClaimedTime(Long claimedTime)
Sets the field 'claimedTime'.
|
Employee |
setCustomId(String customId)
Sets the field 'customId'.
|
Employee |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
Employee |
setEmail(String email)
Sets the field 'email'.
|
Employee |
setEmployeeCards(List<Reference> employeeCards)
Sets the field 'employeeCards'.
|
Employee |
setId(String id)
Sets the field 'id'.
|
Employee |
setInviteSent(Boolean inviteSent)
Sets the field 'inviteSent'.
|
Employee |
setIsOwner(Boolean isOwner)
Sets the field 'isOwner'.
|
Employee |
setMerchant(Reference merchant)
Sets the field 'merchant'.
|
Employee |
setName(String name)
Sets the field 'name'.
|
Employee |
setNickname(String nickname)
Sets the field 'nickname'.
|
Employee |
setOrders(List<Reference> orders)
Sets the field 'orders'.
|
Employee |
setPayments(List<Reference> payments)
Sets the field 'payments'.
|
Employee |
setPin(String pin)
Sets the field 'pin'.
|
Employee |
setRole(AccountRole role)
Sets the field 'role'.
|
Employee |
setRoles(List<Reference> roles)
Sets the field 'roles'.
|
Employee |
setShifts(List<Reference> shifts)
Sets the field 'shifts'.
|
Employee |
setUnhashedPin(String unhashedPin)
Sets the field 'unhashedPin'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Employee> CREATOR
public static final JSONifiable.Creator<Employee> JSON_CREATOR
public Employee()
protected Employee(boolean noInit)
public Employee(String json) throws IllegalArgumentException
IllegalArgumentException
public Employee(JSONObject jsonObject)
public Employee(Employee src)
public String getId()
public String getName()
public String getNickname()
public String getCustomId()
public String getEmail()
public Boolean getInviteSent()
public Long getClaimedTime()
public Long getDeletedTime()
public String getPin()
public String getUnhashedPin()
public AccountRole getRole()
public Boolean getIsOwner()
public Reference getMerchant()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullName()
public boolean isNotNullNickname()
public boolean isNotNullCustomId()
public boolean isNotNullEmail()
public boolean isNotNullInviteSent()
public boolean isNotNullClaimedTime()
public boolean isNotNullDeletedTime()
public boolean isNotNullPin()
public boolean isNotNullUnhashedPin()
public boolean isNotNullRole()
public boolean isNotNullRoles()
public boolean isNotEmptyRoles()
public boolean isNotNullIsOwner()
public boolean isNotNullShifts()
public boolean isNotEmptyShifts()
public boolean isNotNullPayments()
public boolean isNotEmptyPayments()
public boolean isNotNullOrders()
public boolean isNotEmptyOrders()
public boolean isNotNullEmployeeCards()
public boolean isNotEmptyEmployeeCards()
public boolean isNotNullMerchant()
public boolean hasId()
public boolean hasName()
public boolean hasNickname()
public boolean hasCustomId()
public boolean hasEmail()
public boolean hasInviteSent()
public boolean hasClaimedTime()
public boolean hasDeletedTime()
public boolean hasPin()
public boolean hasUnhashedPin()
public boolean hasRole()
public boolean hasRoles()
public boolean hasIsOwner()
public boolean hasShifts()
public boolean hasPayments()
public boolean hasOrders()
public boolean hasEmployeeCards()
public boolean hasMerchant()
public Employee setRole(AccountRole role)
public Employee setRoles(List<Reference> roles)
public Employee setShifts(List<Reference> shifts)
public Employee setPayments(List<Reference> payments)
public Employee setOrders(List<Reference> orders)
public Employee setEmployeeCards(List<Reference> employeeCards)
public Employee setMerchant(Reference merchant)
public void clearId()
public void clearName()
public void clearNickname()
public void clearCustomId()
public void clearEmail()
public void clearInviteSent()
public void clearClaimedTime()
public void clearDeletedTime()
public void clearPin()
public void clearUnhashedPin()
public void clearRole()
public void clearRoles()
public void clearIsOwner()
public void clearShifts()
public void clearPayments()
public void clearOrders()
public void clearEmployeeCards()
public void clearMerchant()
public boolean containsChanges()
public void resetChangeLog()
public Employee copyChanges()
public void mergeChanges(Employee src)