Package com.dzidzi.dto.user
Record Class ActiveUser
java.lang.Object
java.lang.Record
com.dzidzi.dto.user.ActiveUser
- Record Components:
currentUserId- the current user idcurrentUserRole- the current user role
The active user id and role, which is used internally by frontend.
-
Constructor Summary
ConstructorsConstructorDescriptionActiveUser(UUID currentUserId, UserRole currentUserRole) Creates an instance of aActiveUserrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentUserIdrecord component.Returns the value of thecurrentUserRolerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ActiveUser
Creates an instance of aActiveUserrecord class.- Parameters:
currentUserId- the value for thecurrentUserIdrecord componentcurrentUserRole- the value for thecurrentUserRolerecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
currentUserId
Returns the value of thecurrentUserIdrecord component.- Returns:
- the value of the
currentUserIdrecord component
-
currentUserRole
Returns the value of thecurrentUserRolerecord component.- Returns:
- the value of the
currentUserRolerecord component
-