Class Account

java.lang.Object
database.entity.Account

@Entity public class Account extends Object
Account class entity, which is to map data to Acount table in the database. This class is used to store the username and password of the user.
  • Field Details

    • accountid

      private Long accountid
      accountid is the primary key of the table. It's generated automatically by the database.
    • username

      private String username
      Username of the user.
    • password

      private String password
      Password of the user.
  • Constructor Details

    • Account

      public Account()
      Empty constructor required by Hibernate
    • Account

      public Account(String username, String password)
      Constructor for Account class.
      Parameters:
      username - - see username
      password - - see password
  • Method Details

    • getAccountid

      public Long getAccountid()
      Getter for accountid
      Returns:
      - see accountid
    • setAccountid

      public void setAccountid(Long userid)
      Setter for accountid
      Parameters:
      userid - - see accountid
    • getUsername

      public String getUsername()
      Getter for username
      Returns:
      - see username
    • setUsername

      public void setUsername(String username)
      Setter for username
      Parameters:
      username - - see username
    • getPassword

      public String getPassword()
      Getter for password
      Returns:
      - see password
    • setPassword

      public void setPassword(String password)
      Setter for password
      Parameters:
      password - - see password
    • toString

      public String toString()
      toString method for Account class
      Overrides:
      toString in class Object
      Returns:
      - see accountid, username, password