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 Summary
ConstructorsConstructorDescriptionUserCredentials(int employeeID, String username, String password, String position, String department, String role, LocalDateTime lastModified) Creates an instance of aUserCredentialsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedepartmentrecord component.intReturns the value of theemployeeIDrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelastModifiedrecord component.password()Returns the value of thepasswordrecord component.position()Returns the value of thepositionrecord component.role()Returns the value of therolerecord component.String[]toArray()Converts the UserCredentials to an array of strings.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
UserCredentials
public UserCredentials(int employeeID, String username, String password, String position, String department, String role, LocalDateTime lastModified) Creates an instance of aUserCredentialsrecord class.- Parameters:
employeeID- the value for theemployeeIDrecord componentusername- the value for theusernamerecord componentpassword- the value for thepasswordrecord componentposition- the value for thepositionrecord componentdepartment- the value for thedepartmentrecord componentrole- the value for therolerecord componentlastModified- the value for thelastModifiedrecord component
-
-
Method Details
-
toArray
Converts the UserCredentials to an array of strings.- Returns:
- array of strings representing the object's attributes
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
employeeID
public int employeeID()Returns the value of theemployeeIDrecord component.- Returns:
- the value of the
employeeIDrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
department
Returns the value of thedepartmentrecord component.- Returns:
- the value of the
departmentrecord component
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
lastModified
Returns the value of thelastModifiedrecord component.- Returns:
- the value of the
lastModifiedrecord component
-