Class Account


  • public final class Account
    extends MgrObject<AccountID>
    This class represents a system account.
    • Constructor Detail

      • Account

        public Account()
        Creates an empty account
      • Account

        public Account​(String newusername,
                       AccountRole newrole,
                       PasswordCredential newcredential)
        Account constructor with provided username, role and credentials.
        Parameters:
        newusername - Username to be set
        newrole - Role to be set
        newcredential - Credential to be associated
    • Method Detail

      • getUsername

        public String getUsername()
        Get the username of this Account
        Returns:
        Account::username of this Account.
      • setUsername

        public void setUsername​(String newusername)
        Set the Account::username of this Account
        Parameters:
        newusername - New username to be set
      • getRole

        public AccountRole getRole()
        Get the role of this Account
        Returns:
        Account::role of container Account.
      • setRole

        public void setRole​(AccountRole newrole)
        Set the Account::role of this Account.
        Parameters:
        newrole - New role to be set
      • getCredential

        public PasswordCredential getCredential()
        Get the Account::credentialID of this Account.
        Returns:
        the credential
      • setCredential

        public void setCredential​(PasswordCredential newcredential)
        Set the Account::credential of this Account.
        Parameters:
        newcredential - the credential
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object