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
public class JpaMapRoleEntityDelegate extends MapRoleEntityDelegate
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 ofJpaMapKeycloakTransaction
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
Constructors Constructor Description JpaMapRoleEntityDelegate(JpaRoleEntity original, javax.persistence.EntityManager em)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCompositeRole(String roleId)
Set<String>
getCompositeRoles()
void
removeCompositeRole(String roleId)
void
setCompositeRoles(Set<String> compositeRoles)
void
setId(String id)
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.map.common.UpdatableEntity
clearUpdatedFlag
-
-
-
-
Constructor Detail
-
JpaMapRoleEntityDelegate
public JpaMapRoleEntityDelegate(JpaRoleEntity original, javax.persistence.EntityManager em)
-
-
Method Detail
-
setId
public void setId(String id)
- Specified by:
setId
in interfaceAbstractEntity
- Overrides:
setId
in classMapRoleEntityDelegate
-
getCompositeRoles
public Set<String> getCompositeRoles()
- Specified by:
getCompositeRoles
in interfaceMapRoleEntity
- Overrides:
getCompositeRoles
in classMapRoleEntityDelegate
-
setCompositeRoles
public void setCompositeRoles(Set<String> compositeRoles)
- Specified by:
setCompositeRoles
in interfaceMapRoleEntity
- Overrides:
setCompositeRoles
in classMapRoleEntityDelegate
-
addCompositeRole
public void addCompositeRole(String roleId)
- Specified by:
addCompositeRole
in interfaceMapRoleEntity
- Overrides:
addCompositeRole
in classMapRoleEntityDelegate
-
removeCompositeRole
public void removeCompositeRole(String roleId)
- Specified by:
removeCompositeRole
in interfaceMapRoleEntity
- Overrides:
removeCompositeRole
in classMapRoleEntityDelegate
-
-