Class JpaMapRoleEntityDelegate
java.lang.Object
org.keycloak.models.map.role.MapRoleEntityDelegate
org.keycloak.models.map.storage.jpa.role.delegate.JpaMapRoleEntityDelegate
- All Implemented Interfaces:
AbstractEntity
,HasDelegateProvider<MapRoleEntity>
,EntityWithAttributes
,UpdatableEntity
,MapRoleEntity
Delegate for the JPA implementation for MapRoleEntityDelegate.
It will delegate all access to the composite roles to a separate table.
For performance reasons, it caches the composite roles within the session if they have already been retrieved.
This relies on the behavior of
JpaMapStorage
that
each entity is created only once within each session.- Author:
- Alexander Schwartz
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.map.role.MapRoleEntity
MapRoleEntity.AbstractRoleEntity
Nested classes/interfaces inherited from interface org.keycloak.models.map.common.UpdatableEntity
UpdatableEntity.Impl
-
Constructor Summary
ConstructorDescriptionJpaMapRoleEntityDelegate
(JpaRoleEntity original, jakarta.persistence.EntityManager em) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompositeRole
(String roleId) void
removeCompositeRole
(String roleId) void
setCompositeRoles
(Set<String> compositeRoles) void
Methods inherited from class org.keycloak.models.map.role.MapRoleEntityDelegate
getAttribute, getAttributes, getClientId, getDelegateProvider, getDescription, getId, getName, getRealmId, isUpdated, removeAttribute, setAttribute, setAttributes, setClientId, setDescription, setName, setRealmId, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.keycloak.models.map.common.UpdatableEntity
clearUpdatedFlag, markUpdatedFlag
-
Constructor Details
-
JpaMapRoleEntityDelegate
-
-
Method Details
-
setId
- Specified by:
setId
in interfaceAbstractEntity
- Overrides:
setId
in classMapRoleEntityDelegate
-
getCompositeRoles
- Specified by:
getCompositeRoles
in interfaceMapRoleEntity
- Overrides:
getCompositeRoles
in classMapRoleEntityDelegate
-
setCompositeRoles
- Specified by:
setCompositeRoles
in interfaceMapRoleEntity
- Overrides:
setCompositeRoles
in classMapRoleEntityDelegate
-
addCompositeRole
- Specified by:
addCompositeRole
in interfaceMapRoleEntity
- Overrides:
addCompositeRole
in classMapRoleEntityDelegate
-
removeCompositeRole
- Specified by:
removeCompositeRole
in interfaceMapRoleEntity
- Overrides:
removeCompositeRole
in classMapRoleEntityDelegate
-