Class Employee

    • Constructor Detail

      • Employee

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

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

        public 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

        public Employee​(Employee 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
      • getName

        public String getName()
        Full name of the employee
      • getNickname

        public String getNickname()
        Nickname of the employee (shows up on receipts)
      • getCustomId

        public String getCustomId()
        Custom ID of the employee
      • getEmail

        public String getEmail()
        Email of the employee (optional)
      • getInviteSent

        public Boolean getInviteSent()
        Returns true if this employee was sent an invite to activate their account
      • getClaimedTime

        public Long getClaimedTime()
        Timestamp of when this employee claimed their account
      • getDeletedTime

        public Long getDeletedTime()
        Timestamp of when this employee was deleted
      • getPin

        public String getPin()
        Employee PIN (hashed)
      • getUnhashedPin

        public String getUnhashedPin()
        Employee PIN
      • getRole

        public AccountRole getRole()
        Employee System Role
      • getIsOwner

        public Boolean getIsOwner()
        Returns true if this employee is the owner account for this merchant
      • getShifts

        public List<Reference> getShifts()
        This employee's shifts
      • getPayments

        public List<Reference> getPayments()
        This employee's payments
      • getOrders

        public List<Reference> getOrders()
        This employee's orders
      • getEmployeeCards

        public List<Reference> getEmployeeCards()
        This employee's employee cards
      • getMerchant

        public Reference getMerchant()
        The merchant employing this employee
      • 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
      • isNotNullName

        public boolean isNotNullName()
        Checks whether the 'name' field is set and is not null
      • isNotNullNickname

        public boolean isNotNullNickname()
        Checks whether the 'nickname' field is set and is not null
      • isNotNullCustomId

        public boolean isNotNullCustomId()
        Checks whether the 'customId' field is set and is not null
      • isNotNullEmail

        public boolean isNotNullEmail()
        Checks whether the 'email' field is set and is not null
      • isNotNullInviteSent

        public boolean isNotNullInviteSent()
        Checks whether the 'inviteSent' field is set and is not null
      • isNotNullClaimedTime

        public boolean isNotNullClaimedTime()
        Checks whether the 'claimedTime' field is set and is not null
      • isNotNullDeletedTime

        public boolean isNotNullDeletedTime()
        Checks whether the 'deletedTime' field is set and is not null
      • isNotNullPin

        public boolean isNotNullPin()
        Checks whether the 'pin' field is set and is not null
      • isNotNullUnhashedPin

        public boolean isNotNullUnhashedPin()
        Checks whether the 'unhashedPin' field is set and is not null
      • isNotNullRole

        public boolean isNotNullRole()
        Checks whether the 'role' field is set and is not null
      • isNotNullRoles

        public boolean isNotNullRoles()
        Checks whether the 'roles' field is set and is not null
      • isNotEmptyRoles

        public boolean isNotEmptyRoles()
        Checks whether the 'roles' field is set and is not null and is not empty
      • isNotNullIsOwner

        public boolean isNotNullIsOwner()
        Checks whether the 'isOwner' field is set and is not null
      • isNotNullShifts

        public boolean isNotNullShifts()
        Checks whether the 'shifts' field is set and is not null
      • isNotEmptyShifts

        public boolean isNotEmptyShifts()
        Checks whether the 'shifts' field is set and is not null and is not empty
      • isNotNullPayments

        public boolean isNotNullPayments()
        Checks whether the 'payments' field is set and is not null
      • isNotEmptyPayments

        public boolean isNotEmptyPayments()
        Checks whether the 'payments' field is set and is not null and is not empty
      • isNotNullOrders

        public boolean isNotNullOrders()
        Checks whether the 'orders' field is set and is not null
      • isNotEmptyOrders

        public boolean isNotEmptyOrders()
        Checks whether the 'orders' field is set and is not null and is not empty
      • isNotNullEmployeeCards

        public boolean isNotNullEmployeeCards()
        Checks whether the 'employeeCards' field is set and is not null
      • isNotEmptyEmployeeCards

        public boolean isNotEmptyEmployeeCards()
        Checks whether the 'employeeCards' field is set and is not null and is not empty
      • isNotNullMerchant

        public boolean isNotNullMerchant()
        Checks whether the 'merchant' 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
      • hasName

        public boolean hasName()
        Checks whether the 'name' field has been set, however the value could be null
      • hasNickname

        public boolean hasNickname()
        Checks whether the 'nickname' field has been set, however the value could be null
      • hasCustomId

        public boolean hasCustomId()
        Checks whether the 'customId' field has been set, however the value could be null
      • hasEmail

        public boolean hasEmail()
        Checks whether the 'email' field has been set, however the value could be null
      • hasInviteSent

        public boolean hasInviteSent()
        Checks whether the 'inviteSent' field has been set, however the value could be null
      • hasClaimedTime

        public boolean hasClaimedTime()
        Checks whether the 'claimedTime' field has been set, however the value could be null
      • hasDeletedTime

        public boolean hasDeletedTime()
        Checks whether the 'deletedTime' field has been set, however the value could be null
      • hasPin

        public boolean hasPin()
        Checks whether the 'pin' field has been set, however the value could be null
      • hasUnhashedPin

        public boolean hasUnhashedPin()
        Checks whether the 'unhashedPin' field has been set, however the value could be null
      • hasRole

        public boolean hasRole()
        Checks whether the 'role' field has been set, however the value could be null
      • hasRoles

        public boolean hasRoles()
        Checks whether the 'roles' field has been set, however the value could be null
      • hasIsOwner

        public boolean hasIsOwner()
        Checks whether the 'isOwner' field has been set, however the value could be null
      • hasShifts

        public boolean hasShifts()
        Checks whether the 'shifts' field has been set, however the value could be null
      • hasPayments

        public boolean hasPayments()
        Checks whether the 'payments' field has been set, however the value could be null
      • hasOrders

        public boolean hasOrders()
        Checks whether the 'orders' field has been set, however the value could be null
      • hasEmployeeCards

        public boolean hasEmployeeCards()
        Checks whether the 'employeeCards' field has been set, however the value could be null
      • hasMerchant

        public boolean hasMerchant()
        Checks whether the 'merchant' field has been set, however the value could be null
      • setName

        public Employee setName​(String name)
        Sets the field 'name'.
      • setNickname

        public Employee setNickname​(String nickname)
        Sets the field 'nickname'.
      • setCustomId

        public Employee setCustomId​(String customId)
        Sets the field 'customId'.
      • setEmail

        public Employee setEmail​(String email)
        Sets the field 'email'.
      • setInviteSent

        public Employee setInviteSent​(Boolean inviteSent)
        Sets the field 'inviteSent'.
      • setClaimedTime

        public Employee setClaimedTime​(Long claimedTime)
        Sets the field 'claimedTime'.
      • setDeletedTime

        public Employee setDeletedTime​(Long deletedTime)
        Sets the field 'deletedTime'.
      • setPin

        public Employee setPin​(String pin)
        Sets the field 'pin'.
      • setUnhashedPin

        public Employee setUnhashedPin​(String unhashedPin)
        Sets the field 'unhashedPin'.
      • setRoles

        public Employee setRoles​(List<Reference> roles)
        Sets the field 'roles'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setIsOwner

        public Employee setIsOwner​(Boolean isOwner)
        Sets the field 'isOwner'.
      • setShifts

        public Employee setShifts​(List<Reference> shifts)
        Sets the field 'shifts'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setPayments

        public Employee setPayments​(List<Reference> payments)
        Sets the field 'payments'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setOrders

        public Employee setOrders​(List<Reference> orders)
        Sets the field 'orders'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setEmployeeCards

        public Employee setEmployeeCards​(List<Reference> employeeCards)
        Sets the field 'employeeCards'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setMerchant

        public Employee setMerchant​(Reference merchant)
        Sets the field 'merchant'. 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
      • clearName

        public void clearName()
        Clears the 'name' field, the 'has' method for this field will now return false
      • clearNickname

        public void clearNickname()
        Clears the 'nickname' field, the 'has' method for this field will now return false
      • clearCustomId

        public void clearCustomId()
        Clears the 'customId' field, the 'has' method for this field will now return false
      • clearEmail

        public void clearEmail()
        Clears the 'email' field, the 'has' method for this field will now return false
      • clearInviteSent

        public void clearInviteSent()
        Clears the 'inviteSent' field, the 'has' method for this field will now return false
      • clearClaimedTime

        public void clearClaimedTime()
        Clears the 'claimedTime' field, the 'has' method for this field will now return false
      • clearDeletedTime

        public void clearDeletedTime()
        Clears the 'deletedTime' field, the 'has' method for this field will now return false
      • clearPin

        public void clearPin()
        Clears the 'pin' field, the 'has' method for this field will now return false
      • clearUnhashedPin

        public void clearUnhashedPin()
        Clears the 'unhashedPin' field, the 'has' method for this field will now return false
      • clearRole

        public void clearRole()
        Clears the 'role' field, the 'has' method for this field will now return false
      • clearRoles

        public void clearRoles()
        Clears the 'roles' field, the 'has' method for this field will now return false
      • clearIsOwner

        public void clearIsOwner()
        Clears the 'isOwner' field, the 'has' method for this field will now return false
      • clearShifts

        public void clearShifts()
        Clears the 'shifts' field, the 'has' method for this field will now return false
      • clearPayments

        public void clearPayments()
        Clears the 'payments' field, the 'has' method for this field will now return false
      • clearOrders

        public void clearOrders()
        Clears the 'orders' field, the 'has' method for this field will now return false
      • clearEmployeeCards

        public void clearEmployeeCards()
        Clears the 'employeeCards' field, the 'has' method for this field will now return false
      • clearMerchant

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

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