Class Shift

    • Constructor Detail

      • Shift

        public Shift()
        Constructs a new empty instance.
      • Shift

        protected Shift​(boolean noInit)
        Constructs a new empty instance.
      • Shift

        public 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

        public Shift​(Shift 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 identifier
      • getEmployee

        public Employee getEmployee()
        The employee that worked this shift
      • getCashTipsCollected

        public Long getCashTipsCollected()
        Amount of cash tips collected
      • getServerBanking

        public Boolean getServerBanking()
        Whether the employee used server banking
      • getInTime

        public Long getInTime()
        Clock in time
      • getOverrideInTime

        public Long getOverrideInTime()
        Overridden clock in time
      • getOverrideInEmployee

        public Employee getOverrideInEmployee()
        The employee who overrode the clock in time
      • getOutTime

        public Long getOutTime()
        Clock out time
      • getOverrideOutTime

        public Long getOverrideOutTime()
        Overridden clock out time
      • getOverrideOutEmployee

        public Employee getOverrideOutEmployee()
        The employee who overrode the clock out time
      • 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 interface JSONifiable
      • isNotNullId

        public boolean isNotNullId()
        Checks whether the 'id' field is set and is not null
      • isNotNullEmployee

        public boolean isNotNullEmployee()
        Checks whether the 'employee' field is set and is not null
      • isNotNullCashTipsCollected

        public boolean isNotNullCashTipsCollected()
        Checks whether the 'cashTipsCollected' field is set and is not null
      • isNotNullServerBanking

        public boolean isNotNullServerBanking()
        Checks whether the 'serverBanking' field is set and is not null
      • isNotNullInTime

        public boolean isNotNullInTime()
        Checks whether the 'inTime' field is set and is not null
      • isNotNullOverrideInTime

        public boolean isNotNullOverrideInTime()
        Checks whether the 'overrideInTime' field is set and is not null
      • isNotNullOverrideInEmployee

        public boolean isNotNullOverrideInEmployee()
        Checks whether the 'overrideInEmployee' field is set and is not null
      • isNotNullOutTime

        public boolean isNotNullOutTime()
        Checks whether the 'outTime' field is set and is not null
      • isNotNullOverrideOutTime

        public boolean isNotNullOverrideOutTime()
        Checks whether the 'overrideOutTime' field is set and is not null
      • isNotNullOverrideOutEmployee

        public boolean isNotNullOverrideOutEmployee()
        Checks whether the 'overrideOutEmployee' 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
      • hasEmployee

        public boolean hasEmployee()
        Checks whether the 'employee' field has been set, however the value could be null
      • hasCashTipsCollected

        public boolean hasCashTipsCollected()
        Checks whether the 'cashTipsCollected' field has been set, however the value could be null
      • hasServerBanking

        public boolean hasServerBanking()
        Checks whether the 'serverBanking' field has been set, however the value could be null
      • hasInTime

        public boolean hasInTime()
        Checks whether the 'inTime' field has been set, however the value could be null
      • hasOverrideInTime

        public boolean hasOverrideInTime()
        Checks whether the 'overrideInTime' field has been set, however the value could be null
      • hasOverrideInEmployee

        public boolean hasOverrideInEmployee()
        Checks whether the 'overrideInEmployee' field has been set, however the value could be null
      • hasOutTime

        public boolean hasOutTime()
        Checks whether the 'outTime' field has been set, however the value could be null
      • hasOverrideOutTime

        public boolean hasOverrideOutTime()
        Checks whether the 'overrideOutTime' field has been set, however the value could be null
      • hasOverrideOutEmployee

        public boolean hasOverrideOutEmployee()
        Checks whether the 'overrideOutEmployee' field has been set, however the value could be null
      • setId

        public Shift setId​(String id)
        Sets the field 'id'.
      • setEmployee

        public Shift setEmployee​(Employee employee)
        Sets the field 'employee'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setCashTipsCollected

        public Shift setCashTipsCollected​(Long cashTipsCollected)
        Sets the field 'cashTipsCollected'.
      • setServerBanking

        public Shift setServerBanking​(Boolean serverBanking)
        Sets the field 'serverBanking'.
      • setInTime

        public Shift setInTime​(Long inTime)
        Sets the field 'inTime'.
      • setOverrideInTime

        public Shift setOverrideInTime​(Long overrideInTime)
        Sets the field 'overrideInTime'.
      • setOverrideInEmployee

        public Shift setOverrideInEmployee​(Employee overrideInEmployee)
        Sets the field 'overrideInEmployee'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setOutTime

        public Shift setOutTime​(Long outTime)
        Sets the field 'outTime'.
      • setOverrideOutTime

        public Shift setOverrideOutTime​(Long overrideOutTime)
        Sets the field 'overrideOutTime'.
      • setOverrideOutEmployee

        public Shift setOverrideOutEmployee​(Employee overrideOutEmployee)
        Sets the field 'overrideOutEmployee'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • clearId

        public void clearId()
        Clears the 'id' field, the 'has' method for this field will now return false
      • clearEmployee

        public void clearEmployee()
        Clears the 'employee' field, the 'has' method for this field will now return false
      • clearCashTipsCollected

        public void clearCashTipsCollected()
        Clears the 'cashTipsCollected' field, the 'has' method for this field will now return false
      • clearServerBanking

        public void clearServerBanking()
        Clears the 'serverBanking' field, the 'has' method for this field will now return false
      • clearInTime

        public void clearInTime()
        Clears the 'inTime' field, the 'has' method for this field will now return false
      • clearOverrideInTime

        public void clearOverrideInTime()
        Clears the 'overrideInTime' field, the 'has' method for this field will now return false
      • clearOverrideInEmployee

        public void clearOverrideInEmployee()
        Clears the 'overrideInEmployee' field, the 'has' method for this field will now return false
      • clearOutTime

        public void clearOutTime()
        Clears the 'outTime' field, the 'has' method for this field will now return false
      • clearOverrideOutTime

        public void clearOverrideOutTime()
        Clears the 'overrideOutTime' field, the 'has' method for this field will now return false
      • clearOverrideOutEmployee

        public void clearOverrideOutEmployee()
        Clears the 'overrideOutEmployee' 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 Shift copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(Shift src)
        Copy all the changed fields from the given source to this instance.