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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.map.userSession.MapUserSessionEntity
MapUserSessionEntity.AbstractUserSessionEntity
-
Nested 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
Constructors Constructor Description JpaUserSessionEntity()No-argument constructor, used by hibernate to instantiate entities.JpaUserSessionEntity(DeepCloner cloner)
-
Method Summary
-
Methods inherited from class org.keycloak.models.map.userSession.MapUserSessionEntity.AbstractUserSessionEntity
clearUpdatedFlag, isUpdated
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.map.storage.jpa.JpaRootEntity
updateEntityVersion
-
-
-
-
Constructor Detail
-
JpaUserSessionEntity
public JpaUserSessionEntity()
No-argument constructor, used by hibernate to instantiate entities.
-
JpaUserSessionEntity
public JpaUserSessionEntity(DeepCloner cloner)
-
-
Method Detail
-
isMetadataInitialized
public boolean isMetadataInitialized()
-
getEntityVersion
public Integer getEntityVersion()
- Specified by:
getEntityVersionin interfaceJpaRootEntity- Returns:
- current supported version of the JPA entity used for schema versioning.
-
setEntityVersion
public void setEntityVersion(Integer entityVersion)
- Specified by:
setEntityVersionin interfaceJpaRootEntity- Parameters:
entityVersion- sets current supported version to JPA entity.
-
getCurrentSchemaVersion
public Integer 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
public String getId()
- Specified by:
getIdin interfaceAbstractEntity- Overrides:
getIdin classMapUserSessionEntity.AbstractUserSessionEntity
-
setId
public void setId(String id)
- Specified by:
setIdin interfaceAbstractEntity- Overrides:
setIdin classMapUserSessionEntity.AbstractUserSessionEntity
-
getRealmId
public String getRealmId()
- Specified by:
getRealmIdin interfaceMapUserSessionEntity
-
setRealmId
public void setRealmId(String realmId)
- Specified by:
setRealmIdin interfaceMapUserSessionEntity
-
getUserId
public String getUserId()
- Specified by:
getUserIdin interfaceMapUserSessionEntity
-
setUserId
public void setUserId(String userId)
- Specified by:
setUserIdin interfaceMapUserSessionEntity
-
getLoginUsername
public String getLoginUsername()
- Specified by:
getLoginUsernamein interfaceMapUserSessionEntity
-
setLoginUsername
public void setLoginUsername(String loginUsername)
- Specified by:
setLoginUsernamein interfaceMapUserSessionEntity
-
getIpAddress
public String getIpAddress()
- Specified by:
getIpAddressin interfaceMapUserSessionEntity
-
setIpAddress
public void setIpAddress(String ipAddress)
- Specified by:
setIpAddressin interfaceMapUserSessionEntity
-
getAuthMethod
public String getAuthMethod()
- Specified by:
getAuthMethodin interfaceMapUserSessionEntity
-
setAuthMethod
public void setAuthMethod(String authMethod)
- Specified by:
setAuthMethodin interfaceMapUserSessionEntity
-
isOffline
public Boolean isOffline()
- Specified by:
isOfflinein interfaceMapUserSessionEntity
-
setOffline
public void setOffline(Boolean offline)
- Specified by:
setOfflinein interfaceMapUserSessionEntity
-
isRememberMe
public Boolean isRememberMe()
- Specified by:
isRememberMein interfaceMapUserSessionEntity
-
setRememberMe
public void setRememberMe(Boolean rememberMe)
- Specified by:
setRememberMein interfaceMapUserSessionEntity
-
getTimestamp
public Long getTimestamp()
- Specified by:
getTimestampin interfaceMapUserSessionEntity
-
setTimestamp
public void setTimestamp(Long timestamp)
- Specified by:
setTimestampin interfaceMapUserSessionEntity
-
getLastSessionRefresh
public Long getLastSessionRefresh()
- Specified by:
getLastSessionRefreshin interfaceMapUserSessionEntity
-
setLastSessionRefresh
public void setLastSessionRefresh(Long lastSessionRefresh)
- Specified by:
setLastSessionRefreshin interfaceMapUserSessionEntity
-
getExpiration
public Long getExpiration()
- Specified by:
getExpirationin interfaceExpirableEntity
-
setExpiration
public void setExpiration(Long expiration)
- 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
public Map<String,String> getNotes()
- Specified by:
getNotesin interfaceMapUserSessionEntity
-
getNote
public String getNote(String name)
- Specified by:
getNotein interfaceMapUserSessionEntity
-
setNotes
public void setNotes(Map<String,String> notes)
- Specified by:
setNotesin interfaceMapUserSessionEntity
-
removeNote
public Boolean removeNote(String name)
- Specified by:
removeNotein interfaceMapUserSessionEntity
-
setNote
public void setNote(String name, String value)
- Specified by:
setNotein interfaceMapUserSessionEntity
-
getBrokerSessionId
public String getBrokerSessionId()
- Specified by:
getBrokerSessionIdin interfaceMapUserSessionEntity
-
setBrokerSessionId
public void setBrokerSessionId(String brokerSessionId)
- Specified by:
setBrokerSessionIdin interfaceMapUserSessionEntity
-
getBrokerUserId
public String getBrokerUserId()
- Specified by:
getBrokerUserIdin interfaceMapUserSessionEntity
-
setBrokerUserId
public void setBrokerUserId(String brokerUserId)
- Specified by:
setBrokerUserIdin interfaceMapUserSessionEntity
-
getAuthenticatedClientSessions
public Set<MapAuthenticatedClientSessionEntity> getAuthenticatedClientSessions()
- Specified by:
getAuthenticatedClientSessionsin interfaceMapUserSessionEntity
-
addAuthenticatedClientSession
public void addAuthenticatedClientSession(MapAuthenticatedClientSessionEntity clientSession)
- Specified by:
addAuthenticatedClientSessionin interfaceMapUserSessionEntity
-
getAuthenticatedClientSession
public Optional<MapAuthenticatedClientSessionEntity> getAuthenticatedClientSession(String clientUUID)
- Specified by:
getAuthenticatedClientSessionin interfaceMapUserSessionEntity- Overrides:
getAuthenticatedClientSessionin classMapUserSessionEntity.AbstractUserSessionEntity
-
removeAuthenticatedClientSession
public Boolean removeAuthenticatedClientSession(String clientUUID)
- Specified by:
removeAuthenticatedClientSessionin interfaceMapUserSessionEntity- Overrides:
removeAuthenticatedClientSessionin classMapUserSessionEntity.AbstractUserSessionEntity
-
clearAuthenticatedClientSessions
public void clearAuthenticatedClientSessions()
- Specified by:
clearAuthenticatedClientSessionsin interfaceMapUserSessionEntity- Overrides:
clearAuthenticatedClientSessionsin classMapUserSessionEntity.AbstractUserSessionEntity
-
-