Record Class User
java.lang.Object
java.lang.Record
fr.tiogars.domaintemplate.domains.auth.user.entities.User
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull InstantReturns the value of thecreatedDaterecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Longid()Returns the value of theidrecord component.@NotNull InstantReturns the value of thelastModifiedDaterecord component.roles()Returns the value of therolesrecord component.final StringtoString()Returns a string representation of this record class.@NotNull Stringusername()Returns the value of theusernamerecord component.
-
Constructor Details
-
User
public User(@NotNull @NotNull Long id, @NotNull @NotNull String username, boolean enabled, @NotNull @NotNull List<Role> roles, @NotNull @NotNull Instant createdDate, @NotNull @NotNull Instant lastModifiedDate) Creates an instance of aUserrecord class.- Parameters:
id- the value for theidrecord componentusername- the value for theusernamerecord componentenabled- the value for theenabledrecord componentroles- the value for therolesrecord componentcreatedDate- the value for thecreatedDaterecord componentlastModifiedDate- the value for thelastModifiedDaterecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
roles
-
createdDate
Returns the value of thecreatedDaterecord component.- Returns:
- the value of the
createdDaterecord component
-
lastModifiedDate
Returns the value of thelastModifiedDaterecord component.- Returns:
- the value of the
lastModifiedDaterecord component
-