Record Class UserSession
java.lang.Object
java.lang.Record
de.murmelmeister.murmelapi.user.session.UserSession
public record UserSession(UUID id, int userId, LocalDateTime loginTime, String ipAddress, String clientBrand, int protocolVersion)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theclientBrandrecord component.private final UUIDThe field for theidrecord component.private final StringThe field for theipAddressrecord component.private final LocalDateTimeThe field for theloginTimerecord component.private final intThe field for theprotocolVersionrecord component.private final intThe field for theuserIdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUserSession(UUID id, int userId, LocalDateTime loginTime, String ipAddress, String clientBrand, int protocolVersion) Creates an instance of aUserSessionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclientBrandrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theipAddressrecord component.Returns the value of theloginTimerecord component.intReturns the value of theprotocolVersionrecord component.final StringtoString()Returns a string representation of this record class.intuserId()Returns the value of theuserIdrecord component.
-
Field Details
-
id
The field for theidrecord component. -
userId
private final int userIdThe field for theuserIdrecord component. -
loginTime
The field for theloginTimerecord component. -
ipAddress
The field for theipAddressrecord component. -
clientBrand
The field for theclientBrandrecord component. -
protocolVersion
private final int protocolVersionThe field for theprotocolVersionrecord component.
-
-
Constructor Details
-
UserSession
public UserSession(UUID id, int userId, LocalDateTime loginTime, String ipAddress, String clientBrand, int protocolVersion) Creates an instance of aUserSessionrecord class.- Parameters:
id- the value for theidrecord componentuserId- the value for theuserIdrecord componentloginTime- the value for theloginTimerecord componentipAddress- the value for theipAddressrecord componentclientBrand- the value for theclientBrandrecord componentprotocolVersion- the value for theprotocolVersionrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
userId
public int userId()Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
loginTime
Returns the value of theloginTimerecord component.- Returns:
- the value of the
loginTimerecord component
-
ipAddress
Returns the value of theipAddressrecord component.- Returns:
- the value of the
ipAddressrecord component
-
clientBrand
Returns the value of theclientBrandrecord component.- Returns:
- the value of the
clientBrandrecord component
-
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-