@Transactional @Service(value="roleDomainService") public class RoleDomainService extends de.alpharogroup.service.domain.AbstractDomainService<Integer,Role,de.alpharogroup.user.entities.Roles,de.alpharogroup.user.repositories.RolesDao,RolesMapper> implements RoleService
RoleDomainService.| Constructor and Description |
|---|
RoleDomainService() |
| Modifier and Type | Method and Description |
|---|---|
Role |
createAndSaveRole(String rolename,
String description)
Creates a new
Role object with the given arguments and save it. |
Role |
createAndSaveRole(String rolename,
String description,
Set<Permission> permissions)
Creates a new
Role object with the given arguments and save it. |
boolean |
exists(String rolename)
Checks if a role exists with the given role name.
|
List<Permission> |
findAllPermissions(Role role)
Find all
Permission objects from the given Role object. |
Role |
findRole(String rolename)
Find the
Role object with the given role name. |
List<Role> |
findRoles(String rolename)
Find the
Role objects with the given role name. |
void |
setRolesDao(de.alpharogroup.user.repositories.RolesDao rolesDao)
Sets the specific
RolesDao. |
void |
setRolesMapper(RolesMapper mapper)
Sets the specific
RolesMapper. |
create, delete, exists, findAll, getDao, getDomainObjectClass, getEntityClass, getMapper, persist, read, setDao, setMapper, updatepublic Role createAndSaveRole(String rolename, String description)
Role object with the given arguments and save it. If it does exists it
will return the existing.createAndSaveRole in interface RoleServicerolename - the role name.description - the description of the role.Role object.public Role createAndSaveRole(String rolename, String description, Set<Permission> permissions)
Role object with the given arguments and save it. If it does exists it
will return the existing.createAndSaveRole in interface RoleServicerolename - the role name.description - the description of the role.permissions - the permissions to set for the role.Role object.public boolean exists(String rolename)
exists in interface RoleServicerolename - the role namepublic List<Permission> findAllPermissions(Role role)
Permission objects from the given Role object.findAllPermissions in interface RoleServicerole - the given Role objectPermission objects from the given Role object.public Role findRole(String rolename)
Role object with the given role name. If it does'nt exists it returns null.findRole in interface RoleServicerolename - the role nameRole object or if it does'nt exists it returns null.public List<Role> findRoles(String rolename)
Role objects with the given role name.findRoles in interface RoleServicerolename - the rolenameRole objects@Autowired public void setRolesDao(de.alpharogroup.user.repositories.RolesDao rolesDao)
RolesDao.rolesDao - the new RolesDao.@Autowired public void setRolesMapper(RolesMapper mapper)
RolesMapper.mapper - the new RolesMapper.Copyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.