Package de.terrestris.shoguncore.service
Class RoleService<E extends Role,D extends RoleDao<E>>
- java.lang.Object
-
- de.terrestris.shoguncore.service.AbstractDaoService<E,D>
-
- de.terrestris.shoguncore.service.AbstractCrudService<E,D>
-
- de.terrestris.shoguncore.service.PermissionAwareCrudService<E,D>
-
- de.terrestris.shoguncore.service.RoleService<E,D>
-
@Service("roleService") public class RoleService<E extends Role,D extends RoleDao<E>> extends PermissionAwareCrudService<E,D>Service class for theRolemodel.- Author:
- Nils Bühner
-
-
Field Summary
-
Fields inherited from class de.terrestris.shoguncore.service.PermissionAwareCrudService
permissionCollectionService
-
Fields inherited from class de.terrestris.shoguncore.service.AbstractDaoService
dao, logger
-
-
Constructor Summary
Constructors Modifier Constructor Description RoleService()Default constructor, which calls the type-constructorprotectedRoleService(Class<E> entityClass)Constructor that sets the concrete entity class for the service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EfindByRoleName(String roleName)Returns the role for the given (unique) role name.voidsetDao(D dao)We have to useQualifierto define the correct dao here.-
Methods inherited from class de.terrestris.shoguncore.service.PermissionAwareCrudService
addAndSaveGroupPermissions, addAndSaveUserPermissions, findAllUserGroupPermissionsOfUserGroup, findAllUserPermissionsOfUser, getPermissionCollectionService, removeAndSaveGroupPermissions, removeAndSaveUserPermissions, setPermissionCollectionService
-
Methods inherited from class de.terrestris.shoguncore.service.AbstractCrudService
delete, findAll, findAllRestricted, findAllWhereFieldEquals, findAllWithCollectionContaining, findById, findBySimpleFilter, loadById, saveOrUpdate, updatePartialWithJsonNode
-
Methods inherited from class de.terrestris.shoguncore.service.AbstractDaoService
getDao, getEntityClass
-
-
-
-
Method Detail
-
findByRoleName
@Transactional(readOnly=true) public E findByRoleName(String roleName)
Returns the role for the given (unique) role name. If no role was found, null will be returned.- Parameters:
roleName- A unique role name.- Returns:
- The unique role for the role name or null.
-
setDao
@Autowired @Qualifier("roleDao") public void setDao(D dao)We have to useQualifierto define the correct dao here. Otherwise, spring can not decide which dao has to be autowired here as there are multiple candidates.
-
-