org.keycloak.models.sessions.mongo.entities

## Class MongoUserSessionEntity

- java.lang.Object
- - org.keycloak.models.entities.AbstractIdentifiableEntity
  - - org.keycloak.models.sessions.mongo.entities.MongoUserSessionEntity

- All Implemented Interfaces:
    MongoEntity, MongoIdentifiableEntity

      @MongoCollection(collectionName="sessions")
      public class MongoUserSessionEntity
      extends AbstractIdentifiableEntity
      implements MongoIdentifiableEntity

  Author:
    Stian Thorgersen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MongoUserSessionEntity()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterRemove(MongoStoreInvocationContext context)` Lifecycle callback, which is called after removal of this object from Mongo.
    `String` | `getAuthMethod()`
    `String` | `getBrokerSessionId()`
    `String` | `getBrokerUserId()`
    `List<String>` | `getClientSessions()`
    `String` | `getIpAddress()`
    `int` | `getLastSessionRefresh()`
    `String` | `getLoginUsername()`
    `Map<String,String>` | `getNotes()`
    `String` | `getRealmId()`
    `int` | `getStarted()`
    `UserSessionModel.State` | `getState()`
    `String` | `getUser()`
    `boolean` | `isRememberMe()`
    `void` | `setAuthMethod(String authMethod)`
    `void` | `setBrokerSessionId(String brokerSessionId)`
    `void` | `setBrokerUserId(String brokerUserId)`
    `void` | `setClientSessions(List<String> clientSessions)`
    `void` | `setIpAddress(String ipAddress)`
    `void` | `setLastSessionRefresh(int lastSessionRefresh)`
    `void` | `setLoginUsername(String loginUsername)`
    `void` | `setNotes(Map<String,String> notes)`
    `void` | `setRealmId(String realmId)`
    `void` | `setRememberMe(boolean rememberMe)`
    `void` | `setStarted(int started)`
    `void` | `setState(UserSessionModel.State state)`
    `void` | `setUser(String user)`

    - ### Methods inherited from class org.keycloak.models.entities.AbstractIdentifiableEntity

      `equals, getId, hashCode, setId, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.keycloak.connections.mongo.api.MongoIdentifiableEntity

      `getId, setId`

- - ### Constructor Detail

    - #### MongoUserSessionEntity

          public MongoUserSessionEntity()

  - ### Method Detail

    - #### getRealmId

          public String getRealmId()

    - #### setRealmId

          public void setRealmId(String realmId)

    - #### getUser

          public String getUser()

    - #### setUser

          public void setUser(String user)

    - #### getLoginUsername

          public String getLoginUsername()

    - #### setLoginUsername

          public void setLoginUsername(String loginUsername)

    - #### getIpAddress

          public String getIpAddress()

    - #### setIpAddress

          public void setIpAddress(String ipAddress)

    - #### getAuthMethod

          public String getAuthMethod()

    - #### setAuthMethod

          public void setAuthMethod(String authMethod)

    - #### isRememberMe

          public boolean isRememberMe()

    - #### setRememberMe

          public void setRememberMe(boolean rememberMe)

    - #### getStarted

          public int getStarted()

    - #### setStarted

          public void setStarted(int started)

    - #### getLastSessionRefresh

          public int getLastSessionRefresh()

    - #### setLastSessionRefresh

          public void setLastSessionRefresh(int lastSessionRefresh)

    - #### getClientSessions

          public List<String> getClientSessions()

    - #### setClientSessions

          public void setClientSessions(List<String> clientSessions)

    - #### afterRemove

          public void afterRemove(MongoStoreInvocationContext context)

      Description copied from interface: `MongoIdentifiableEntity`
      Lifecycle callback, which is called after removal of this object from Mongo. It may be useful for triggering removal of wired objects.
      Specified by:
        `afterRemove` in interface `MongoIdentifiableEntity`

    - #### getNotes

          public Map<String,String> getNotes()

    - #### setNotes

          public void setNotes(Map<String,String> notes)

    - #### getState

          public UserSessionModel.State getState()

    - #### setState

          public void setState(UserSessionModel.State state)

    - #### getBrokerSessionId

          public String getBrokerSessionId()

    - #### setBrokerSessionId

          public void setBrokerSessionId(String brokerSessionId)

    - #### getBrokerUserId

          public String getBrokerUserId()

    - #### setBrokerUserId

          public void setBrokerUserId(String brokerUserId)

Copyright © 2015. All rights reserved.