Record Class Loginresult
java.lang.Object
java.lang.Record
no.priv.bang.sampleapp.services.beans.Loginresult
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theauthorizedrecord component.private final StringThe field for theerrormessagerecord component.private final StringThe field for theoriginalRequestUrlrecord component.private final booleanThe field for thesuccessrecord component.private final no.priv.bang.osgiservice.users.UserThe field for theuserrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLoginresult(boolean success, String errormessage, boolean authorized, no.priv.bang.osgiservice.users.User user, String originalRequestUrl) Creates an instance of aLoginresultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theauthorizedrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrormessagerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theoriginalRequestUrlrecord component.booleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.no.priv.bang.osgiservice.users.Useruser()Returns the value of theuserrecord component.static Loginresult.Builderwith()
-
Field Details
-
success
private final boolean successThe field for thesuccessrecord component. -
errormessage
The field for theerrormessagerecord component. -
authorized
private final boolean authorizedThe field for theauthorizedrecord component. -
user
private final no.priv.bang.osgiservice.users.User userThe field for theuserrecord component. -
originalRequestUrl
The field for theoriginalRequestUrlrecord component.
-
-
Constructor Details
-
Loginresult
public Loginresult(boolean success, String errormessage, boolean authorized, no.priv.bang.osgiservice.users.User user, String originalRequestUrl) Creates an instance of aLoginresultrecord class.- Parameters:
success- the value for thesuccessrecord componenterrormessage- the value for theerrormessagerecord componentauthorized- the value for theauthorizedrecord componentuser- the value for theuserrecord componentoriginalRequestUrl- the value for theoriginalRequestUrlrecord component
-
-
Method Details
-
with
-
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 '=='. -
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
errormessage
Returns the value of theerrormessagerecord component.- Returns:
- the value of the
errormessagerecord component
-
authorized
public boolean authorized()Returns the value of theauthorizedrecord component.- Returns:
- the value of the
authorizedrecord component
-
user
public no.priv.bang.osgiservice.users.User user()Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
originalRequestUrl
Returns the value of theoriginalRequestUrlrecord component.- Returns:
- the value of the
originalRequestUrlrecord component
-