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) getId()getNotes()org.keycloak.models.UserSessionModel.SessionPersistenceStateorg.keycloak.models.UserSessionModel.StategetState()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) voidvoidsetIpAddress(String ipAddress) voidsetLastSessionRefresh(Long lastSessionRefresh) voidsetLoginUsername(String loginUsername) voidvoidvoidsetOffline(Boolean offline) voidsetPersistenceState(org.keycloak.models.UserSessionModel.SessionPersistenceState persistenceState) voidsetRealmId(String realmId) voidsetRememberMe(Boolean rememberMe) voidsetState(org.keycloak.models.UserSessionModel.State state) voidsetTimestamp(Long timestamp) 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
- Specified by:
getTimestampin interfaceMapUserSessionEntity
-
setTimestamp
- Specified by:
setTimestampin interfaceMapUserSessionEntity
-
getLastSessionRefresh
- Specified by:
getLastSessionRefreshin interfaceMapUserSessionEntity
-
setLastSessionRefresh
- Specified by:
setLastSessionRefreshin interfaceMapUserSessionEntity
-
getExpiration
- Specified by:
getExpirationin interfaceExpirableEntity
-
setExpiration
- Specified by:
setExpirationin interfaceExpirableEntity
-
getState
public org.keycloak.models.UserSessionModel.State getState()- Specified by:
getStatein interfaceMapUserSessionEntity
-
setState
public void setState(org.keycloak.models.UserSessionModel.State state) - Specified by:
setStatein interfaceMapUserSessionEntity
-
getPersistenceState
public org.keycloak.models.UserSessionModel.SessionPersistenceState getPersistenceState()- Specified by:
getPersistenceStatein interfaceMapUserSessionEntity
-
setPersistenceState
public void setPersistenceState(org.keycloak.models.UserSessionModel.SessionPersistenceState persistenceState) - 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
-