Class RoleService<E extends Role,​D extends RoleDao<E>>

    • Constructor Detail

      • RoleService

        public RoleService()
        Default constructor, which calls the type-constructor
      • RoleService

        protected RoleService​(Class<E> entityClass)
        Constructor that sets the concrete entity class for the service. Subclasses MUST call this constructor.
    • 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 use Qualifier to define the correct dao here. Otherwise, spring can not decide which dao has to be autowired here as there are multiple candidates.
        Overrides:
        setDao in class PermissionAwareCrudService<E extends Role,​D extends RoleDao<E>>
        Parameters:
        dao - the dao to set