/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.siso.horario.Services;

import java.util.ArrayList;
import pe.siso.horario.Beans.Sede;
import pe.siso.horario.DAO.DAOFactory;
import pe.siso.horario.DAO.SedeDAO;

/**
 *
 * @author fcelestino
 */
public class SedeServices {
    DAOFactory fabrica = DAOFactory.getDAOFactory(DAOFactory.MYSQL);
    SedeDAO objSedeDAO= fabrica.getSedeDAO();
    
    public ArrayList<Sede> listarSedes(){
        ArrayList<Sede> lista=null;
        try {
            lista=objSedeDAO.listarSedes();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return lista;
    }
    
    public ArrayList<Sede> listarSedesDirage(){
        ArrayList<Sede> lista=null;
        try {
            lista=objSedeDAO.listarSedesDirage();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return lista;
    }
    public ArrayList<Sede> listarSedesAula(){
        ArrayList<Sede> lista=null;
        try {
            lista=objSedeDAO.listarSedeAulas();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return lista;
    }
    
}
