Class JpaUserSessionEntity
java.lang.Object
org.keycloak.models.map.common.UpdatableEntity.Impl
org.keycloak.models.map.userSession.MapUserSessionEntity.AbstractUserSessionEntity
org.keycloak.models.map.storage.jpa.userSession.entity.JpaUserSessionEntity
- All Implemented Interfaces:
 Serializable,AbstractEntity,ExpirableEntity,UpdatableEntity,JpaRootEntity,JpaRootVersionedEntity,MapUserSessionEntity
@Entity
public class JpaUserSessionEntity
extends MapUserSessionEntity.AbstractUserSessionEntity
implements JpaRootVersionedEntity
There are some fields marked by 
@Column(insertable = false, updatable = false).
 Those fields are automatically generated by database from json field,
 therefore marked as non-insertable and non-updatable to instruct hibernate.- See Also:
 
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.map.userSession.MapUserSessionEntity
MapUserSessionEntity.AbstractUserSessionEntityNested classes/interfaces inherited from interface org.keycloak.models.map.common.UpdatableEntity
UpdatableEntity.Impl - 
Field Summary
Fields inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
updated - 
Constructor Summary
ConstructorsConstructorDescriptionNo-argument constructor, used by hibernate to instantiate entities.JpaUserSessionEntity(DeepCloner cloner)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuthenticatedClientSession(MapAuthenticatedClientSessionEntity clientSession) voidbooleangetAuthenticatedClientSession(String clientUUID) Returns a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.getId()Returns a point in time (timestamp in milliseconds since The Epoch) when the user session entity was last refreshed.getNotes()getState()Returns a point in time (timestamp in milliseconds since The Epoch) when the user session entity was created.intVersion of the JPA entity used for optimistic lockinginthashCode()booleanremoveAuthenticatedClientSession(String clientUUID) removeNote(String name) voidsetAuthMethod(String authMethod) voidsetBrokerSessionId(String brokerSessionId) voidsetBrokerUserId(String brokerUserId) voidsetEntityVersion(Integer entityVersion) voidsetExpiration(Long expiration) Sets a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.voidvoidsetIpAddress(String ipAddress) voidsetLastSessionRefresh(Long lastSessionRefresh) Sets a point in the (timestamp in milliseconds since The Epoch) when the user session entity was last refreshed.voidsetLoginUsername(String loginUsername) voidvoidvoidsetOffline(Boolean offline) voidsetPersistenceState(UserSessionModel.SessionPersistenceState persistenceState) voidsetRealmId(String realmId) voidsetRememberMe(Boolean rememberMe) voidsetState(UserSessionModel.State state) voidsetTimestamp(Long timestamp) Sets a point in the (timestamp in milliseconds since The Epoch) when the user session entity was created.voidMethods inherited from class org.keycloak.models.map.userSession.MapUserSessionEntity.AbstractUserSessionEntity
clearUpdatedFlag, isUpdatedMethods inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
markUpdatedFlagMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.map.storage.jpa.JpaRootEntity
updateEntityVersionMethods inherited from interface org.keycloak.models.map.common.UpdatableEntity
markUpdatedFlag 
- 
Constructor Details
- 
JpaUserSessionEntity
public JpaUserSessionEntity()No-argument constructor, used by hibernate to instantiate entities. - 
JpaUserSessionEntity
 
 - 
 - 
Method Details
- 
isMetadataInitialized
public boolean isMetadataInitialized() - 
getEntityVersion
- Specified by:
 getEntityVersionin interfaceJpaRootEntity- Returns:
 - current supported version of the JPA entity used for schema versioning.
 
 - 
setEntityVersion
- Specified by:
 setEntityVersionin interfaceJpaRootEntity- Parameters:
 entityVersion- sets current supported version to JPA entity.
 - 
getCurrentSchemaVersion
- Specified by:
 getCurrentSchemaVersionin interfaceJpaRootEntity
 - 
getVersion
public int getVersion()Description copied from interface:JpaRootVersionedEntityVersion of the JPA entity used for optimistic locking- Specified by:
 getVersionin interfaceJpaRootVersionedEntity
 - 
getId
- Specified by:
 getIdin interfaceAbstractEntity- Overrides:
 getIdin classMapUserSessionEntity.AbstractUserSessionEntity
 - 
setId
- Specified by:
 setIdin interfaceAbstractEntity- Overrides:
 setIdin classMapUserSessionEntity.AbstractUserSessionEntity
 - 
getRealmId
- Specified by:
 getRealmIdin interfaceMapUserSessionEntity
 - 
setRealmId
- Specified by:
 setRealmIdin interfaceMapUserSessionEntity
 - 
getUserId
- Specified by:
 getUserIdin interfaceMapUserSessionEntity
 - 
setUserId
- Specified by:
 setUserIdin interfaceMapUserSessionEntity
 - 
getLoginUsername
- Specified by:
 getLoginUsernamein interfaceMapUserSessionEntity
 - 
setLoginUsername
- Specified by:
 setLoginUsernamein interfaceMapUserSessionEntity
 - 
getIpAddress
- Specified by:
 getIpAddressin interfaceMapUserSessionEntity
 - 
setIpAddress
- Specified by:
 setIpAddressin interfaceMapUserSessionEntity
 - 
getAuthMethod
- Specified by:
 getAuthMethodin interfaceMapUserSessionEntity
 - 
setAuthMethod
- Specified by:
 setAuthMethodin interfaceMapUserSessionEntity
 - 
isOffline
- Specified by:
 isOfflinein interfaceMapUserSessionEntity
 - 
setOffline
- Specified by:
 setOfflinein interfaceMapUserSessionEntity
 - 
isRememberMe
- Specified by:
 isRememberMein interfaceMapUserSessionEntity
 - 
setRememberMe
- Specified by:
 setRememberMein interfaceMapUserSessionEntity
 - 
getTimestamp
Description copied from interface:MapUserSessionEntityReturns a point in time (timestamp in milliseconds since The Epoch) when the user session entity was created.- Specified by:
 getTimestampin interfaceMapUserSessionEntity- Returns:
 - a timestamp in milliseconds since The Epoch or 
nullwhen the time is unknown 
 - 
setTimestamp
Description copied from interface:MapUserSessionEntitySets a point in the (timestamp in milliseconds since The Epoch) when the user session entity was created.- Specified by:
 setTimestampin interfaceMapUserSessionEntity- Parameters:
 timestamp- a timestamp in milliseconds since The Epoch ornullwhen the time is unknown
 - 
getLastSessionRefresh
Description copied from interface:MapUserSessionEntityReturns a point in time (timestamp in milliseconds since The Epoch) when the user session entity was last refreshed.- Specified by:
 getLastSessionRefreshin interfaceMapUserSessionEntity- Returns:
 - a timestamp in milliseconds since The Epoch or 
nullwhen the time is unknown 
 - 
setLastSessionRefresh
Description copied from interface:MapUserSessionEntitySets a point in the (timestamp in milliseconds since The Epoch) when the user session entity was last refreshed.- Specified by:
 setLastSessionRefreshin interfaceMapUserSessionEntity- Parameters:
 lastSessionRefresh- a timestamp in milliseconds since The Epoch ornullwhen the time is unknown
 - 
getExpiration
Description copied from interface:ExpirableEntityReturns a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.- Specified by:
 getExpirationin interfaceExpirableEntity- Returns:
 - a timestamp in milliseconds since The Epoch or 
nullif this entity never expires or expiration is not known. 
 - 
setExpiration
Description copied from interface:ExpirableEntitySets a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.- Specified by:
 setExpirationin interfaceExpirableEntity- Parameters:
 expiration- a timestamp in milliseconds since The Epoch ornullif this entity never expires.
 - 
getState
- Specified by:
 getStatein interfaceMapUserSessionEntity
 - 
setState
- Specified by:
 setStatein interfaceMapUserSessionEntity
 - 
getPersistenceState
- Specified by:
 getPersistenceStatein interfaceMapUserSessionEntity
 - 
setPersistenceState
- Specified by:
 setPersistenceStatein interfaceMapUserSessionEntity
 - 
getNotes
- Specified by:
 getNotesin interfaceMapUserSessionEntity
 - 
getNote
- Specified by:
 getNotein interfaceMapUserSessionEntity
 - 
setNotes
- Specified by:
 setNotesin interfaceMapUserSessionEntity
 - 
removeNote
- Specified by:
 removeNotein interfaceMapUserSessionEntity
 - 
setNote
- Specified by:
 setNotein interfaceMapUserSessionEntity
 - 
getBrokerSessionId
- Specified by:
 getBrokerSessionIdin interfaceMapUserSessionEntity
 - 
setBrokerSessionId
- Specified by:
 setBrokerSessionIdin interfaceMapUserSessionEntity
 - 
getBrokerUserId
- Specified by:
 getBrokerUserIdin interfaceMapUserSessionEntity
 - 
setBrokerUserId
- Specified by:
 setBrokerUserIdin interfaceMapUserSessionEntity
 - 
getAuthenticatedClientSessions
- Specified by:
 getAuthenticatedClientSessionsin interfaceMapUserSessionEntity
 - 
addAuthenticatedClientSession
- Specified by:
 addAuthenticatedClientSessionin interfaceMapUserSessionEntity
 - 
getAuthenticatedClientSession
public Optional<MapAuthenticatedClientSessionEntity> getAuthenticatedClientSession(String clientUUID) - Specified by:
 getAuthenticatedClientSessionin interfaceMapUserSessionEntity
 - 
removeAuthenticatedClientSession
- Specified by:
 removeAuthenticatedClientSessionin interfaceMapUserSessionEntity
 - 
clearAuthenticatedClientSessions
public void clearAuthenticatedClientSessions()- Specified by:
 clearAuthenticatedClientSessionsin interfaceMapUserSessionEntity- Overrides:
 clearAuthenticatedClientSessionsin classMapUserSessionEntity.AbstractUserSessionEntity
 - 
hashCode
public int hashCode() - 
equals
 
 -