package org.ros.chatto.service;

import org.ros.chatto.model.Role;
import org.ros.chatto.repository.RoleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class RoleServiceImpl implements RoleService {

	@Autowired
	private RoleRepository roleRepository;

	@Override
	@Transactional(readOnly = true)
	public Role getRole(String roleName) {
		return roleRepository.findByName(roleName);
	}

}
