Class JpaRootAuthenticationSessionEntity
java.lang.Object
org.keycloak.models.map.common.UpdatableEntity.Impl
org.keycloak.models.map.authSession.MapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
org.keycloak.models.map.storage.jpa.authSession.entity.JpaRootAuthenticationSessionEntity
- All Implemented Interfaces:
Serializable
,MapRootAuthenticationSessionEntity
,AbstractEntity
,ExpirableEntity
,UpdatableEntity
,JpaRootEntity
,JpaRootVersionedEntity
@Entity
public class JpaRootAuthenticationSessionEntity
extends MapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
implements JpaRootVersionedEntity
Entity represents root authentication session.
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.authSession.MapRootAuthenticationSessionEntity
MapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAuthenticationSession
(MapAuthenticationSessionEntity authenticationSession) boolean
getAuthenticationSession
(String tabId) 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 root authentication session entity was created or updated during an authentication process.int
Version of the JPA entity used for optimistic lockingint
hashCode()
boolean
void
setAuthenticationSessions
(Set<MapAuthenticationSessionEntity> authenticationSessions) void
setEntityVersion
(Integer entityVersion) void
setExpiration
(Long expiration) Sets a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.void
void
setRealmId
(String realmId) void
setTimestamp
(Long timestamp) Sets a point in the (timestamp in milliseconds since The Epoch) when the root authentication session entity was created or updated during an authentication process.Methods inherited from class org.keycloak.models.map.authSession.MapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
clearUpdatedFlag, isUpdated
Methods inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
markUpdatedFlag
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
Methods inherited from interface org.keycloak.models.map.common.UpdatableEntity
markUpdatedFlag
-
Field Details
-
TABLE_NAME
- See Also:
-
-
Constructor Details
-
JpaRootAuthenticationSessionEntity
public JpaRootAuthenticationSessionEntity()No-argument constructor, used by hibernate to instantiate entities. -
JpaRootAuthenticationSessionEntity
-
JpaRootAuthenticationSessionEntity
public JpaRootAuthenticationSessionEntity(UUID id, int version, Integer entityVersion, String realmId, Long timestamp, Long expiration) Used by hibernate when calling cb.construct from read(QueryParameters) method. It is used to select root auth session without metadata(json) field.
-
-
Method Details
-
isMetadataInitialized
public boolean isMetadataInitialized() -
getEntityVersion
- Specified by:
getEntityVersion
in interfaceJpaRootEntity
- Returns:
- current supported version of the JPA entity used for schema versioning.
-
setEntityVersion
- Specified by:
setEntityVersion
in interfaceJpaRootEntity
- Parameters:
entityVersion
- sets current supported version to JPA entity.
-
getCurrentSchemaVersion
- Specified by:
getCurrentSchemaVersion
in interfaceJpaRootEntity
-
getVersion
public int getVersion()Description copied from interface:JpaRootVersionedEntity
Version of the JPA entity used for optimistic locking- Specified by:
getVersion
in interfaceJpaRootVersionedEntity
-
getId
- Specified by:
getId
in interfaceAbstractEntity
- Overrides:
getId
in classMapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
-
setId
- Specified by:
setId
in interfaceAbstractEntity
- Overrides:
setId
in classMapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
-
getRealmId
- Specified by:
getRealmId
in interfaceMapRootAuthenticationSessionEntity
-
setRealmId
- Specified by:
setRealmId
in interfaceMapRootAuthenticationSessionEntity
-
getTimestamp
Description copied from interface:MapRootAuthenticationSessionEntity
Returns a point in time (timestamp in milliseconds since The Epoch) when the root authentication session entity was created or updated during an authentication process.- Specified by:
getTimestamp
in interfaceMapRootAuthenticationSessionEntity
- Returns:
- a timestamp in milliseconds since The Epoch or
null
when the time is unknown
-
setTimestamp
Description copied from interface:MapRootAuthenticationSessionEntity
Sets a point in the (timestamp in milliseconds since The Epoch) when the root authentication session entity was created or updated during an authentication process.- Specified by:
setTimestamp
in interfaceMapRootAuthenticationSessionEntity
- Parameters:
timestamp
- a timestamp in milliseconds since The Epoch ornull
when the time is unknown
-
getExpiration
Description copied from interface:ExpirableEntity
Returns a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.- Specified by:
getExpiration
in interfaceExpirableEntity
- Returns:
- a timestamp in milliseconds since The Epoch or
null
if this entity never expires or expiration is not known.
-
setExpiration
Description copied from interface:ExpirableEntity
Sets a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.- Specified by:
setExpiration
in interfaceExpirableEntity
- Parameters:
expiration
- a timestamp in milliseconds since The Epoch ornull
if this entity never expires.
-
getAuthenticationSessions
- Specified by:
getAuthenticationSessions
in interfaceMapRootAuthenticationSessionEntity
-
setAuthenticationSessions
- Specified by:
setAuthenticationSessions
in interfaceMapRootAuthenticationSessionEntity
-
addAuthenticationSession
- Specified by:
addAuthenticationSession
in interfaceMapRootAuthenticationSessionEntity
-
getAuthenticationSession
- Specified by:
getAuthenticationSession
in interfaceMapRootAuthenticationSessionEntity
-
removeAuthenticationSession
- Specified by:
removeAuthenticationSession
in interfaceMapRootAuthenticationSessionEntity
-
hashCode
public int hashCode() -
equals
-