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
,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.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
Constructors Constructor Description JpaRootAuthenticationSessionEntity()
No-argument constructor, used by hibernate to instantiate entities.JpaRootAuthenticationSessionEntity(UUID id, Integer entityVersion, String realmId, Long timestamp, Long expiration)
Used by hibernate when calling cb.construct from read(QueryParameters) method.JpaRootAuthenticationSessionEntity(DeepCloner cloner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAuthenticationSession(MapAuthenticationSessionEntity authenticationSession)
boolean
equals(Object obj)
Optional<MapAuthenticationSessionEntity>
getAuthenticationSession(String tabId)
Set<MapAuthenticationSessionEntity>
getAuthenticationSessions()
Integer
getCurrentSchemaVersion()
Integer
getEntityVersion()
Long
getExpiration()
String
getId()
String
getRealmId()
Long
getTimestamp()
int
getVersion()
Version of the JPA entity used for optimistic lockingint
hashCode()
boolean
isMetadataInitialized()
Boolean
removeAuthenticationSession(String tabId)
void
setAuthenticationSessions(Set<MapAuthenticationSessionEntity> authenticationSessions)
void
setEntityVersion(Integer entityVersion)
void
setExpiration(Long expiration)
void
setId(String id)
void
setRealmId(String realmId)
void
setTimestamp(Long timestamp)
-
Methods inherited from class org.keycloak.models.map.authSession.MapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
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
-
JpaRootAuthenticationSessionEntity
public JpaRootAuthenticationSessionEntity()
No-argument constructor, used by hibernate to instantiate entities.
-
JpaRootAuthenticationSessionEntity
public JpaRootAuthenticationSessionEntity(DeepCloner cloner)
-
JpaRootAuthenticationSessionEntity
public JpaRootAuthenticationSessionEntity(UUID id, 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
-
isMetadataInitialized
public boolean isMetadataInitialized()
-
getEntityVersion
public Integer getEntityVersion()
- Specified by:
getEntityVersion
in interfaceJpaRootEntity
- Returns:
- current supported version of the JPA entity used for schema versioning.
-
setEntityVersion
public void setEntityVersion(Integer entityVersion)
- Specified by:
setEntityVersion
in interfaceJpaRootEntity
- Parameters:
entityVersion
- sets current supported version to JPA entity.
-
getCurrentSchemaVersion
public Integer 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
public String getId()
- Specified by:
getId
in interfaceAbstractEntity
- Overrides:
getId
in classMapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
-
setId
public void setId(String id)
- Specified by:
setId
in interfaceAbstractEntity
- Overrides:
setId
in classMapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
-
getRealmId
public String getRealmId()
- Specified by:
getRealmId
in interfaceMapRootAuthenticationSessionEntity
-
setRealmId
public void setRealmId(String realmId)
- Specified by:
setRealmId
in interfaceMapRootAuthenticationSessionEntity
-
getTimestamp
public Long getTimestamp()
- Specified by:
getTimestamp
in interfaceMapRootAuthenticationSessionEntity
-
setTimestamp
public void setTimestamp(Long timestamp)
- Specified by:
setTimestamp
in interfaceMapRootAuthenticationSessionEntity
-
getExpiration
public Long getExpiration()
- Specified by:
getExpiration
in interfaceMapRootAuthenticationSessionEntity
-
setExpiration
public void setExpiration(Long expiration)
- Specified by:
setExpiration
in interfaceMapRootAuthenticationSessionEntity
-
getAuthenticationSessions
public Set<MapAuthenticationSessionEntity> getAuthenticationSessions()
- Specified by:
getAuthenticationSessions
in interfaceMapRootAuthenticationSessionEntity
-
setAuthenticationSessions
public void setAuthenticationSessions(Set<MapAuthenticationSessionEntity> authenticationSessions)
- Specified by:
setAuthenticationSessions
in interfaceMapRootAuthenticationSessionEntity
-
addAuthenticationSession
public void addAuthenticationSession(MapAuthenticationSessionEntity authenticationSession)
- Specified by:
addAuthenticationSession
in interfaceMapRootAuthenticationSessionEntity
-
getAuthenticationSession
public Optional<MapAuthenticationSessionEntity> getAuthenticationSession(String tabId)
- Specified by:
getAuthenticationSession
in interfaceMapRootAuthenticationSessionEntity
- Overrides:
getAuthenticationSession
in classMapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
-
removeAuthenticationSession
public Boolean removeAuthenticationSession(String tabId)
- Specified by:
removeAuthenticationSession
in interfaceMapRootAuthenticationSessionEntity
- Overrides:
removeAuthenticationSession
in classMapRootAuthenticationSessionEntity.AbstractRootAuthenticationSessionEntity
-
-