Record Class ImmutablePersistentUserSessionEntity

java.lang.Object
java.lang.Record
org.keycloak.models.jpa.session.ImmutablePersistentUserSessionEntity
All Implemented Interfaces:
PersistentUserSessionModel

public record ImmutablePersistentUserSessionEntity(String userSessionId, String realmId, String userId, int createOn, int lastSessionRefresh, String brokerSessionId, String offline, String data, Boolean rememberMe) extends Record implements PersistentUserSessionModel
An immutable PersistentUserSessionEntity to optimize read-only queries.
  • Constructor Details

    • ImmutablePersistentUserSessionEntity

      public ImmutablePersistentUserSessionEntity(String userSessionId, String realmId, String userId, int createOn, int lastSessionRefresh, String brokerSessionId, String offline, String data, Boolean rememberMe)
      Creates an instance of a ImmutablePersistentUserSessionEntity record class.
      Parameters:
      userSessionId - the value for the userSessionId record component
      realmId - the value for the realmId record component
      userId - the value for the userId record component
      createOn - the value for the createOn record component
      lastSessionRefresh - the value for the lastSessionRefresh record component
      brokerSessionId - the value for the brokerSessionId record component
      offline - the value for the offline record component
      data - the value for the data record component
      rememberMe - the value for the rememberMe record component
  • Method Details

    • getUserSessionId

      public String getUserSessionId()
      Specified by:
      getUserSessionId in interface PersistentUserSessionModel
    • setUserSessionId

      public void setUserSessionId(String userSessionId)
      Specified by:
      setUserSessionId in interface PersistentUserSessionModel
    • getStarted

      public int getStarted()
      Specified by:
      getStarted in interface PersistentUserSessionModel
    • setStarted

      public void setStarted(int started)
      Specified by:
      setStarted in interface PersistentUserSessionModel
    • getLastSessionRefresh

      public int getLastSessionRefresh()
      Specified by:
      getLastSessionRefresh in interface PersistentUserSessionModel
    • setLastSessionRefresh

      public void setLastSessionRefresh(int lastSessionRefresh)
      Specified by:
      setLastSessionRefresh in interface PersistentUserSessionModel
    • isOffline

      public boolean isOffline()
      Specified by:
      isOffline in interface PersistentUserSessionModel
    • setOffline

      public void setOffline(boolean offline)
      Specified by:
      setOffline in interface PersistentUserSessionModel
    • getData

      public String getData()
      Specified by:
      getData in interface PersistentUserSessionModel
    • setData

      public void setData(String data)
      Specified by:
      setData in interface PersistentUserSessionModel
    • setRealmId

      public void setRealmId(String realmId)
      Specified by:
      setRealmId in interface PersistentUserSessionModel
    • setUserId

      public void setUserId(String userId)
      Specified by:
      setUserId in interface PersistentUserSessionModel
    • setBrokerSessionId

      public void setBrokerSessionId(String brokerSessionId)
      Specified by:
      setBrokerSessionId in interface PersistentUserSessionModel
    • isRememberMe

      public boolean isRememberMe()
      Specified by:
      isRememberMe in interface PersistentUserSessionModel
    • setRememberMe

      public void setRememberMe(boolean rememberMe)
      Specified by:
      setRememberMe in interface PersistentUserSessionModel
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • userSessionId

      public String userSessionId()
      Returns the value of the userSessionId record component.
      Returns:
      the value of the userSessionId record component
    • realmId

      public String realmId()
      Returns the value of the realmId record component.
      Returns:
      the value of the realmId record component
    • userId

      public String userId()
      Returns the value of the userId record component.
      Returns:
      the value of the userId record component
    • createOn

      public int createOn()
      Returns the value of the createOn record component.
      Returns:
      the value of the createOn record component
    • lastSessionRefresh

      public int lastSessionRefresh()
      Returns the value of the lastSessionRefresh record component.
      Returns:
      the value of the lastSessionRefresh record component
    • brokerSessionId

      public String brokerSessionId()
      Returns the value of the brokerSessionId record component.
      Returns:
      the value of the brokerSessionId record component
    • offline

      public String offline()
      Returns the value of the offline record component.
      Returns:
      the value of the offline record component
    • data

      public String data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • rememberMe

      public Boolean rememberMe()
      Returns the value of the rememberMe record component.
      Returns:
      the value of the rememberMe record component