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:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.models.map.authSession.MapRootAuthenticationSessionEntityMapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
 - 
Nested classes/interfaces inherited from interface org.keycloak.models.map.common.UpdatableEntityUpdatableEntity.Impl
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static StringTABLE_NAME- 
Fields inherited from class org.keycloak.models.map.common.UpdatableEntity.Implupdated
 
- 
 - 
Constructor SummaryConstructors Constructor Description JpaRootAuthenticationSessionEntity()No-argument constructor, used by hibernate to instantiate entities.JpaRootAuthenticationSessionEntity(UUID id, int version, Integer entityVersion, String realmId, Long timestamp, Long expiration)Used by hibernate when calling cb.construct from read(QueryParameters) method.JpaRootAuthenticationSessionEntity(DeepCloner cloner)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAuthenticationSession(MapAuthenticationSessionEntity authenticationSession)booleanequals(Object obj)Optional<MapAuthenticationSessionEntity>getAuthenticationSession(String tabId)Set<MapAuthenticationSessionEntity>getAuthenticationSessions()IntegergetCurrentSchemaVersion()IntegergetEntityVersion()LonggetExpiration()Returns a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.StringgetId()StringgetRealmId()LonggetTimestamp()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.intgetVersion()Version of the JPA entity used for optimistic lockinginthashCode()booleanisMetadataInitialized()BooleanremoveAuthenticationSession(String tabId)voidsetAuthenticationSessions(Set<MapAuthenticationSessionEntity> authenticationSessions)voidsetEntityVersion(Integer entityVersion)voidsetExpiration(Long expiration)Sets a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.voidsetId(String id)voidsetRealmId(String realmId)voidsetTimestamp(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.AbstractRootAuthenticationSessionEntityclearUpdatedFlag, isUpdated
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.keycloak.models.map.storage.jpa.JpaRootEntityupdateEntityVersion
 
- 
 
- 
- 
- 
Field Detail- 
TABLE_NAMEpublic static final String TABLE_NAME - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
JpaRootAuthenticationSessionEntitypublic JpaRootAuthenticationSessionEntity() No-argument constructor, used by hibernate to instantiate entities.
 - 
JpaRootAuthenticationSessionEntitypublic JpaRootAuthenticationSessionEntity(DeepCloner cloner) 
 - 
JpaRootAuthenticationSessionEntitypublic 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 Detail- 
isMetadataInitializedpublic boolean isMetadataInitialized() 
 - 
getEntityVersionpublic Integer getEntityVersion() - Specified by:
- getEntityVersionin interface- JpaRootEntity
- Returns:
- current supported version of the JPA entity used for schema versioning.
 
 - 
setEntityVersionpublic void setEntityVersion(Integer entityVersion) - Specified by:
- setEntityVersionin interface- JpaRootEntity
- Parameters:
- entityVersion- sets current supported version to JPA entity.
 
 - 
getCurrentSchemaVersionpublic Integer getCurrentSchemaVersion() - Specified by:
- getCurrentSchemaVersionin interface- JpaRootEntity
 
 - 
getVersionpublic int getVersion() Description copied from interface:JpaRootVersionedEntityVersion of the JPA entity used for optimistic locking- Specified by:
- getVersionin interface- JpaRootVersionedEntity
 
 - 
getIdpublic String getId() - Specified by:
- getIdin interface- AbstractEntity
- Overrides:
- getIdin class- MapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
 
 - 
setIdpublic void setId(String id) - Specified by:
- setIdin interface- AbstractEntity
- Overrides:
- setIdin class- MapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
 
 - 
getRealmIdpublic String getRealmId() - Specified by:
- getRealmIdin interface- MapRootAuthenticationSessionEntity
 
 - 
setRealmIdpublic void setRealmId(String realmId) - Specified by:
- setRealmIdin interface- MapRootAuthenticationSessionEntity
 
 - 
getTimestamppublic Long getTimestamp() Description copied from interface:MapRootAuthenticationSessionEntityReturns 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:
- getTimestampin interface- MapRootAuthenticationSessionEntity
- Returns:
- a timestamp in milliseconds since The Epoch or nullwhen the time is unknown
 
 - 
setTimestamppublic void setTimestamp(Long timestamp) Description copied from interface:MapRootAuthenticationSessionEntitySets 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:
- setTimestampin interface- MapRootAuthenticationSessionEntity
- Parameters:
- timestamp- a timestamp in milliseconds since The Epoch or- nullwhen the time is unknown
 
 - 
getExpirationpublic Long getExpiration() Description copied from interface:ExpirableEntityReturns a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.- Specified by:
- getExpirationin interface- ExpirableEntity
- Returns:
- a timestamp in milliseconds since The Epoch or nullif this entity never expires or expiration is not known.
 
 - 
setExpirationpublic void setExpiration(Long expiration) Description copied from interface:ExpirableEntitySets a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.- Specified by:
- setExpirationin interface- ExpirableEntity
- Parameters:
- expiration- a timestamp in milliseconds since The Epoch or- nullif this entity never expires.
 
 - 
getAuthenticationSessionspublic Set<MapAuthenticationSessionEntity> getAuthenticationSessions() - Specified by:
- getAuthenticationSessionsin interface- MapRootAuthenticationSessionEntity
 
 - 
setAuthenticationSessionspublic void setAuthenticationSessions(Set<MapAuthenticationSessionEntity> authenticationSessions) - Specified by:
- setAuthenticationSessionsin interface- MapRootAuthenticationSessionEntity
 
 - 
addAuthenticationSessionpublic void addAuthenticationSession(MapAuthenticationSessionEntity authenticationSession) - Specified by:
- addAuthenticationSessionin interface- MapRootAuthenticationSessionEntity
 
 - 
getAuthenticationSessionpublic Optional<MapAuthenticationSessionEntity> getAuthenticationSession(String tabId) - Specified by:
- getAuthenticationSessionin interface- MapRootAuthenticationSessionEntity
 
 - 
removeAuthenticationSessionpublic Boolean removeAuthenticationSession(String tabId) - Specified by:
- removeAuthenticationSessionin interface- MapRootAuthenticationSessionEntity
 
 
- 
 
-