public class Shift extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
Shift.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Shift> |
CREATOR |
static JSONifiable.Creator<Shift> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Shift()
Constructs a new empty instance.
|
protected |
Shift(boolean noInit)
Constructs a new empty instance.
|
|
Shift(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.
|
|
Shift(Shift src)
Constructs a new instance that is a deep copy of the source instance.
|
|
Shift(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCashTipsCollected()
Clears the 'cashTipsCollected' 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 |
clearInTime()
Clears the 'inTime' field, the 'has' method for this field will now return false
|
void |
clearOutTime()
Clears the 'outTime' field, the 'has' method for this field will now return false
|
void |
clearOverrideInEmployee()
Clears the 'overrideInEmployee' field, the 'has' method for this field will now return false
|
void |
clearOverrideInTime()
Clears the 'overrideInTime' field, the 'has' method for this field will now return false
|
void |
clearOverrideOutEmployee()
Clears the 'overrideOutEmployee' field, the 'has' method for this field will now return false
|
void |
clearOverrideOutTime()
Clears the 'overrideOutTime' field, the 'has' method for this field will now return false
|
void |
clearServerBanking()
Clears the 'serverBanking' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
Shift |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getCashTipsCollected()
Amount of cash tips collected
|
Employee |
getEmployee()
The employee that worked this shift
|
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
Long |
getInTime()
Clock in time
|
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.
|
Long |
getOutTime()
Clock out time
|
Employee |
getOverrideInEmployee()
The employee who overrode the clock in time
|
Long |
getOverrideInTime()
Overridden clock in time
|
Employee |
getOverrideOutEmployee()
The employee who overrode the clock out time
|
Long |
getOverrideOutTime()
Overridden clock out time
|
Boolean |
getServerBanking()
Whether the employee used server banking
|
boolean |
hasCashTipsCollected()
Checks whether the 'cashTipsCollected' 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 |
hasInTime()
Checks whether the 'inTime' field has been set, however the value could be null
|
boolean |
hasOutTime()
Checks whether the 'outTime' field has been set, however the value could be null
|
boolean |
hasOverrideInEmployee()
Checks whether the 'overrideInEmployee' field has been set, however the value could be null
|
boolean |
hasOverrideInTime()
Checks whether the 'overrideInTime' field has been set, however the value could be null
|
boolean |
hasOverrideOutEmployee()
Checks whether the 'overrideOutEmployee' field has been set, however the value could be null
|
boolean |
hasOverrideOutTime()
Checks whether the 'overrideOutTime' field has been set, however the value could be null
|
boolean |
hasServerBanking()
Checks whether the 'serverBanking' field has been set, however the value could be null
|
boolean |
isNotNullCashTipsCollected()
Checks whether the 'cashTipsCollected' 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 |
isNotNullInTime()
Checks whether the 'inTime' field is set and is not null
|
boolean |
isNotNullOutTime()
Checks whether the 'outTime' field is set and is not null
|
boolean |
isNotNullOverrideInEmployee()
Checks whether the 'overrideInEmployee' field is set and is not null
|
boolean |
isNotNullOverrideInTime()
Checks whether the 'overrideInTime' field is set and is not null
|
boolean |
isNotNullOverrideOutEmployee()
Checks whether the 'overrideOutEmployee' field is set and is not null
|
boolean |
isNotNullOverrideOutTime()
Checks whether the 'overrideOutTime' field is set and is not null
|
boolean |
isNotNullServerBanking()
Checks whether the 'serverBanking' field is set and is not null
|
void |
mergeChanges(Shift 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.
|
Shift |
setCashTipsCollected(Long cashTipsCollected)
Sets the field 'cashTipsCollected'.
|
Shift |
setEmployee(Employee employee)
Sets the field 'employee'.
|
Shift |
setId(String id)
Sets the field 'id'.
|
Shift |
setInTime(Long inTime)
Sets the field 'inTime'.
|
Shift |
setOutTime(Long outTime)
Sets the field 'outTime'.
|
Shift |
setOverrideInEmployee(Employee overrideInEmployee)
Sets the field 'overrideInEmployee'.
|
Shift |
setOverrideInTime(Long overrideInTime)
Sets the field 'overrideInTime'.
|
Shift |
setOverrideOutEmployee(Employee overrideOutEmployee)
Sets the field 'overrideOutEmployee'.
|
Shift |
setOverrideOutTime(Long overrideOutTime)
Sets the field 'overrideOutTime'.
|
Shift |
setServerBanking(Boolean serverBanking)
Sets the field 'serverBanking'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Shift> CREATOR
public static final JSONifiable.Creator<Shift> JSON_CREATOR
public Shift()
protected Shift(boolean noInit)
public Shift(String json) throws IllegalArgumentException
IllegalArgumentException
public Shift(JSONObject jsonObject)
public Shift(Shift src)
public String getId()
public Employee getEmployee()
public Long getCashTipsCollected()
public Boolean getServerBanking()
public Long getInTime()
public Long getOverrideInTime()
public Employee getOverrideInEmployee()
public Long getOutTime()
public Long getOverrideOutTime()
public Employee getOverrideOutEmployee()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullEmployee()
public boolean isNotNullCashTipsCollected()
public boolean isNotNullServerBanking()
public boolean isNotNullInTime()
public boolean isNotNullOverrideInTime()
public boolean isNotNullOverrideInEmployee()
public boolean isNotNullOutTime()
public boolean isNotNullOverrideOutTime()
public boolean isNotNullOverrideOutEmployee()
public boolean hasId()
public boolean hasEmployee()
public boolean hasCashTipsCollected()
public boolean hasServerBanking()
public boolean hasInTime()
public boolean hasOverrideInTime()
public boolean hasOverrideInEmployee()
public boolean hasOutTime()
public boolean hasOverrideOutTime()
public boolean hasOverrideOutEmployee()
public Shift setEmployee(Employee employee)
public Shift setCashTipsCollected(Long cashTipsCollected)
public Shift setServerBanking(Boolean serverBanking)
public Shift setOverrideInTime(Long overrideInTime)
public Shift setOverrideInEmployee(Employee overrideInEmployee)
public Shift setOverrideOutTime(Long overrideOutTime)
public Shift setOverrideOutEmployee(Employee overrideOutEmployee)
public void clearId()
public void clearEmployee()
public void clearCashTipsCollected()
public void clearServerBanking()
public void clearInTime()
public void clearOverrideInTime()
public void clearOverrideInEmployee()
public void clearOutTime()
public void clearOverrideOutTime()
public void clearOverrideOutEmployee()
public boolean containsChanges()
public void resetChangeLog()
public Shift copyChanges()
public void mergeChanges(Shift src)