Package org.keycloak.models.jpa
Class GroupAdapter
java.lang.Object
org.keycloak.models.jpa.GroupAdapter
- All Implemented Interfaces:
GroupModel,JpaModel<GroupEntity>,RoleMapperModel
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.GroupModel
GroupModel.GroupCreatedEvent, GroupModel.GroupEvent, GroupModel.GroupMemberJoinEvent, GroupModel.GroupMemberLeaveEvent, GroupModel.GroupPathChangeEvent, GroupModel.GroupRemovedEvent, GroupModel.GroupUpdatedEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jakarta.persistence.EntityManagerprotected GroupEntityprotected RealmModelprotected final KeycloakSessionFields inherited from interface org.keycloak.models.GroupModel
COMPARE_BY_NAME -
Constructor Summary
ConstructorsConstructorDescriptionGroupAdapter(KeycloakSession session, RealmModel realm, jakarta.persistence.EntityManager em, GroupEntity group) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(GroupModel subGroup) voiddeleteRoleMapping(RoleModel role) booleanbooleangetAttributeStream(String name) getFirstAttribute(String name) protected jakarta.persistence.TypedQuery<GroupRoleMappingEntity>getId()getName()getSubGroupsStream(String search, Boolean exact, Integer firstResult, Integer maxResults) voidinthashCode()booleanvoidremoveAttribute(String name) voidremoveChild(GroupModel subGroup) voidsetAttribute(String name, List<String> values) voidvoidsetParent(GroupModel parent) voidsetSingleAttribute(String name, String value) static GroupEntitytoEntity(GroupModel model, jakarta.persistence.EntityManager em) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.GroupModel
getSubGroupsStream, getSubGroupsStreamMethods inherited from interface org.keycloak.models.RoleMapperModel
hasDirectRole
-
Field Details
-
session
-
group
-
em
protected jakarta.persistence.EntityManager em -
realm
-
-
Constructor Details
-
GroupAdapter
public GroupAdapter(KeycloakSession session, RealmModel realm, jakarta.persistence.EntityManager em, GroupEntity group)
-
-
Method Details
-
getEntity
- Specified by:
getEntityin interfaceJpaModel<GroupEntity>
-
getId
- Specified by:
getIdin interfaceGroupModel
-
getName
- Specified by:
getNamein interfaceGroupModel
-
setName
- Specified by:
setNamein interfaceGroupModel
-
getParent
- Specified by:
getParentin interfaceGroupModel
-
getParentId
- Specified by:
getParentIdin interfaceGroupModel
-
toEntity
-
setParent
- Specified by:
setParentin interfaceGroupModel
-
addChild
- Specified by:
addChildin interfaceGroupModel
-
removeChild
- Specified by:
removeChildin interfaceGroupModel
-
getSubGroupsStream
- Specified by:
getSubGroupsStreamin interfaceGroupModel
-
getSubGroupsStream
public Stream<GroupModel> getSubGroupsStream(String search, Boolean exact, Integer firstResult, Integer maxResults) - Specified by:
getSubGroupsStreamin interfaceGroupModel
-
getSubGroupsCount
- Specified by:
getSubGroupsCountin interfaceGroupModel
-
setSingleAttribute
- Specified by:
setSingleAttributein interfaceGroupModel
-
setAttribute
- Specified by:
setAttributein interfaceGroupModel
-
removeAttribute
- Specified by:
removeAttributein interfaceGroupModel
-
getFirstAttribute
- Specified by:
getFirstAttributein interfaceGroupModel
-
getAttributeStream
- Specified by:
getAttributeStreamin interfaceGroupModel
-
getAttributes
- Specified by:
getAttributesin interfaceGroupModel
-
hasRole
- Specified by:
hasRolein interfaceRoleMapperModel
-
getGroupRoleMappingEntityTypedQuery
protected jakarta.persistence.TypedQuery<GroupRoleMappingEntity> getGroupRoleMappingEntityTypedQuery(RoleModel role) -
grantRole
- Specified by:
grantRolein interfaceRoleMapperModel
-
getRealmRoleMappingsStream
- Specified by:
getRealmRoleMappingsStreamin interfaceRoleMapperModel
-
getRoleMappingsStream
- Specified by:
getRoleMappingsStreamin interfaceRoleMapperModel
-
deleteRoleMapping
- Specified by:
deleteRoleMappingin interfaceRoleMapperModel
-
getClientRoleMappingsStream
- Specified by:
getClientRoleMappingsStreamin interfaceRoleMapperModel
-
equals
-
hashCode
public int hashCode() -
escapeSlashesInGroupPath
public boolean escapeSlashesInGroupPath()- Specified by:
escapeSlashesInGroupPathin interfaceGroupModel
-