Package records

Record Class UserCredentials

java.lang.Object
java.lang.Record
records.UserCredentials

public record UserCredentials(int employeeID, String username, String password, String position, String department, String role, LocalDateTime lastModified) extends Record
Represents a user credentials record. This record contains information about a user's credentials, such as their employee ID, username, password, position, department, and role.

Available methods:

  • Constructor Details

    • UserCredentials

      public UserCredentials(int employeeID, String username, String password, String position, String department, String role, LocalDateTime lastModified)
      Creates an instance of a UserCredentials record class.
      Parameters:
      employeeID - the value for the employeeID record component
      username - the value for the username record component
      password - the value for the password record component
      position - the value for the position record component
      department - the value for the department record component
      role - the value for the role record component
      lastModified - the value for the lastModified record component
  • Method Details

    • toArray

      public String[] toArray()
      Converts the UserCredentials to an array of strings.
      Returns:
      array of strings representing the object's attributes
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • employeeID

      public int employeeID()
      Returns the value of the employeeID record component.
      Returns:
      the value of the employeeID record component
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • password

      public String password()
      Returns the value of the password record component.
      Returns:
      the value of the password record component
    • position

      public String position()
      Returns the value of the position record component.
      Returns:
      the value of the position record component
    • department

      public String department()
      Returns the value of the department record component.
      Returns:
      the value of the department record component
    • role

      public String role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • lastModified

      public LocalDateTime lastModified()
      Returns the value of the lastModified record component.
      Returns:
      the value of the lastModified record component