package es.uv.saic.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import es.uv.saic.domain.RolRepository;
import es.uv.saic.domain.Rol;

@Service
public class RolService {
	
	@Autowired
	private RolRepository rolRepository;
	
	public List<Rol> findAll(){
		return this.rolRepository.findAll();
	}
	
	public Rol findOne(Integer idRol) {
		return this.rolRepository.getReferenceById(idRol);
	}
	
	public List<Rol> findAssignables(){
		return this.rolRepository.findAssignables();
	}
	
}
