package com.ejie.ab79.control.expedientes;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ejie.ab79.model.expedientes.Sexo;
import com.ejie.ab79.service.expedientes.SexoService;

/**
 * SexosController  
 * 
 *  
 */

@Controller
@RequestMapping(value = "/sexos")
public class SexosController {

	private static final Logger logger = LoggerFactory.getLogger(SexosController.class);

	@Autowired
	private SexoService sexoService;

	/**
	 * Metodo que nos trae la lista para cargar el combo
	 * 
	 * 
	 */
	@RequestMapping(value = "/verValorCombo", method = RequestMethod.GET)
	public @ResponseBody List<Sexo> init() {
		SexosController.logger.info("[GET - getValorCombo] : Obtener valores del combo ");
		return this.sexoService.findAll();

	}

}
