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 aUserCredentials
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedepartment
record component.int
Returns the value of theemployeeID
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thelastModified
record component.password()
Returns the value of thepassword
record component.position()
Returns the value of theposition
record component.role()
Returns the value of therole
record component.String[]
toArray()
Converts the UserCredentials to an array of strings.final String
toString()
Returns a string representation of this record class.username()
Returns the value of theusername
record component.
-
Constructor Details
-
UserCredentials
public UserCredentials(int employeeID, String username, String password, String position, String department, String role, LocalDateTime lastModified) Creates an instance of aUserCredentials
record class.- Parameters:
employeeID
- the value for theemployeeID
record componentusername
- the value for theusername
record componentpassword
- the value for thepassword
record componentposition
- the value for theposition
record componentdepartment
- the value for thedepartment
record componentrole
- the value for therole
record componentlastModified
- the value for thelastModified
record 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 theemployeeID
record component.- Returns:
- the value of the
employeeID
record component
-
username
Returns the value of theusername
record component.- Returns:
- the value of the
username
record component
-
password
Returns the value of thepassword
record component.- Returns:
- the value of the
password
record component
-
position
Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
department
Returns the value of thedepartment
record component.- Returns:
- the value of the
department
record component
-
role
Returns the value of therole
record component.- Returns:
- the value of the
role
record component
-
lastModified
Returns the value of thelastModified
record component.- Returns:
- the value of the
lastModified
record component
-