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.AbstractRootAuthenticationSessionEntityNested classes/interfaces inherited from interface org.keycloak.models.map.common.UpdatableEntity
UpdatableEntity.Impl -
Field Summary
FieldsFields inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
updated -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuthenticationSession(MapAuthenticationSessionEntity authenticationSession) booleangetAuthenticationSession(String tabId) getId()intVersion of the JPA entity used for optimistic lockinginthashCode()booleanvoidsetAuthenticationSessions(Set<MapAuthenticationSessionEntity> authenticationSessions) voidsetEntityVersion(Integer entityVersion) voidsetExpiration(Long expiration) voidvoidsetRealmId(String realmId) voidsetTimestamp(Long timestamp) Methods inherited from class org.keycloak.models.map.authSession.MapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
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
-
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:
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 classMapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
-
setId
- Specified by:
setIdin interfaceAbstractEntity- Overrides:
setIdin classMapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
-
getRealmId
- Specified by:
getRealmIdin interfaceMapRootAuthenticationSessionEntity
-
setRealmId
- Specified by:
setRealmIdin interfaceMapRootAuthenticationSessionEntity
-
getTimestamp
- Specified by:
getTimestampin interfaceMapRootAuthenticationSessionEntity
-
setTimestamp
- Specified by:
setTimestampin interfaceMapRootAuthenticationSessionEntity
-
getExpiration
- Specified by:
getExpirationin interfaceExpirableEntity
-
setExpiration
- Specified by:
setExpirationin interfaceExpirableEntity
-
getAuthenticationSessions
- Specified by:
getAuthenticationSessionsin interfaceMapRootAuthenticationSessionEntity
-
setAuthenticationSessions
- Specified by:
setAuthenticationSessionsin interfaceMapRootAuthenticationSessionEntity
-
addAuthenticationSession
- Specified by:
addAuthenticationSessionin interfaceMapRootAuthenticationSessionEntity
-
getAuthenticationSession
- Specified by:
getAuthenticationSessionin interfaceMapRootAuthenticationSessionEntity
-
removeAuthenticationSession
- Specified by:
removeAuthenticationSessionin interfaceMapRootAuthenticationSessionEntity
-
hashCode
public int hashCode() -
equals
-