public class GroupAdapter extends Object implements GroupModel, JpaModel<GroupEntity>
| 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 GroupModelpublic String getName()
getName in interface GroupModelpublic void setName(String name)
setName in interface GroupModelpublic GroupModel getParent()
getParent in interface GroupModelpublic String getParentId()
getParentId in interface GroupModelpublic static GroupEntity toEntity(GroupModel model, javax.persistence.EntityManager em)
public void setParent(GroupModel parent)
GroupModelsetParent in interface GroupModelpublic void addChild(GroupModel subGroup)
GroupModeladdChild in interface GroupModelpublic void removeChild(GroupModel subGroup)
GroupModelremoveChild in interface GroupModelpublic Set<GroupModel> getSubGroups()
getSubGroups in interface GroupModelpublic void setSingleAttribute(String name, String value)
GroupModelsetSingleAttribute in interface GroupModelpublic void setAttribute(String name, List<String> values)
setAttribute in interface GroupModelpublic void removeAttribute(String name)
removeAttribute in interface GroupModelpublic String getFirstAttribute(String name)
getFirstAttribute in interface GroupModelpublic List<String> getAttribute(String name)
getAttribute in interface GroupModelpublic Map<String,List<String>> getAttributes()
getAttributes in interface GroupModelpublic boolean hasRole(RoleModel role)
hasRole in interface RoleMapperModelprotected javax.persistence.TypedQuery<GroupRoleMappingEntity> getGroupRoleMappingEntityTypedQuery(RoleModel role)
public void grantRole(RoleModel role)
grantRole in interface RoleMapperModelpublic Set<RoleModel> getRealmRoleMappings()
getRealmRoleMappings in interface RoleMapperModelpublic Set<RoleModel> getRoleMappings()
getRoleMappings in interface RoleMapperModelpublic void deleteRoleMapping(RoleModel role)
deleteRoleMapping in interface RoleMapperModelpublic Set<RoleModel> getClientRoleMappings(ClientModel app)
getClientRoleMappings in interface RoleMapperModelCopyright © 2016 JBoss by Red Hat. All rights reserved.