public class GroupAdapter extends Object implements GroupModel, JpaModel<GroupEntity>
GroupModel.GroupRemovedEvent
Modifier and Type | Field and Description |
---|---|
protected javax.persistence.EntityManager |
em |
protected GroupEntity |
group |
protected RealmModel |
realm |
Constructor and Description |
---|
GroupAdapter(RealmModel realm,
javax.persistence.EntityManager em,
GroupEntity group) |
protected GroupEntity group
protected javax.persistence.EntityManager em
protected RealmModel realm
public GroupAdapter(RealmModel realm, javax.persistence.EntityManager em, GroupEntity group)
public GroupEntity getEntity()
getEntity
in interface JpaModel<GroupEntity>
public String getId()
getId
in interface GroupModel
public String getName()
getName
in interface GroupModel
public void setName(String name)
setName
in interface GroupModel
public GroupModel getParent()
getParent
in interface GroupModel
public String getParentId()
getParentId
in interface GroupModel
public static GroupEntity toEntity(GroupModel model, javax.persistence.EntityManager em)
public void setParent(GroupModel parent)
setParent
in interface GroupModel
public void addChild(GroupModel subGroup)
addChild
in interface GroupModel
public void removeChild(GroupModel subGroup)
removeChild
in interface GroupModel
public Set<GroupModel> getSubGroups()
getSubGroups
in interface GroupModel
public void setSingleAttribute(String name, String value)
setSingleAttribute
in interface GroupModel
public void setAttribute(String name, List<String> values)
setAttribute
in interface GroupModel
public void removeAttribute(String name)
removeAttribute
in interface GroupModel
public String getFirstAttribute(String name)
getFirstAttribute
in interface GroupModel
public List<String> getAttribute(String name)
getAttribute
in interface GroupModel
public Map<String,List<String>> getAttributes()
getAttributes
in interface GroupModel
public boolean hasRole(RoleModel role)
hasRole
in interface RoleMapperModel
protected javax.persistence.TypedQuery<GroupRoleMappingEntity> getGroupRoleMappingEntityTypedQuery(RoleModel role)
public void grantRole(RoleModel role)
grantRole
in interface RoleMapperModel
public Set<RoleModel> getRealmRoleMappings()
getRealmRoleMappings
in interface RoleMapperModel
public Set<RoleModel> getRoleMappings()
getRoleMappings
in interface RoleMapperModel
public void deleteRoleMapping(RoleModel role)
deleteRoleMapping
in interface RoleMapperModel
public Set<RoleModel> getClientRoleMappings(ClientModel app)
getClientRoleMappings
in interface RoleMapperModel
Copyright © 2021 JBoss by Red Hat. All rights reserved.