Example usage for org.apache.ibatis.exceptions PersistenceException PersistenceException

List of usage examples for org.apache.ibatis.exceptions PersistenceException PersistenceException

Introduction

In this page you can find the example usage for org.apache.ibatis.exceptions PersistenceException PersistenceException.

Prototype

public PersistenceException(String message, Throwable cause) 

Source Link

Usage

From source file:edu.eci.pdsw.posgrado.dao.mybatis.mybatisClaseDAO.java

@Override
public List<Clase> loadClase() throws ExceptionPersistence {
    try {/*w  ww  .  j a v  a  2 s .c  o  m*/
        return claseMapper.consultarClase();
    } catch (PersistenceException e) {
        throw new PersistenceException("Error al cargar Clase ", e);
    }
}

From source file:edu.eci.pdsw.posgrado.dao.mybatis.mybatisClaseDAO.java

@Override
public List<Clase> loadClaseXperiodo(String periodo) throws ExceptionPersistence {
    try {//from w w  w.ja va 2s.c  o  m
        return claseMapper.consultarClaseXperiodo(periodo);
    } catch (PersistenceException e) {
        throw new PersistenceException("Error al cargar Clase por periodo (" + periodo + ")", e);
    }
}

From source file:edu.eci.pdsw.posgrado.dao.mybatis.mybatisClaseDAO.java

@Override
public List<Date> loadFechas(String periodo) throws ExceptionPersistence {
    try {/*from w w  w  .  ja  v  a 2 s .  c o m*/
        return claseMapper.consultarFechas(periodo);
    } catch (PersistenceException e) {
        throw new PersistenceException("Error al consultar fechas", e);
    }
}

From source file:edu.eci.pdsw.posgrado.dao.mybatis.mybatisClaseDAO.java

/**
 * Registra clase//  w  w w  .  j av  a 2s.c  om
 * @param corte
 * @param mat
 * @param fecha
 * @param horainit
 * @param horafin
 * @param doc
 * @throws ExceptionPersistence 
 */
@Override
public void saveClase(int corte, String mat, Date fecha, Time horainit, Time horafin, int doc)
        throws ExceptionPersistence {
    try {
        claseMapper.registrarClase(corte, mat, fecha, horainit, horafin, doc);
    } catch (PersistenceException e) {
        throw new PersistenceException("Error al registrar clase", e);
    }
}

From source file:edu.eci.pdsw.posgrado.dao.mybatis.mybatisClaseDAO.java

/**
 * Consulta las fechas del recurso por clase
 * @param rec/*from   w  w w. j  a  v a  2 s  . c o  m*/
 * @return
 * @throws ExceptionPersistence 
 */
@Override
public List<Clase> loadFechasRecursoClase(int rec) throws ExceptionPersistence {
    try {
        return claseMapper.consultarFechasRecursoClase(rec);
    } catch (PersistenceException e) {
        throw new PersistenceException("Error al consultar fechas de recursos", e);
    }
}

From source file:edu.eci.pdsw.posgrado.dao.mybatis.mybatisClaseDAO.java

/**
 * Consulta las fechas del profesor por clase
 * @param periodo//from w  w  w.  ja  v a 2 s.  c o  m
 * @param nom
 * @param fecha
 * @return
 * @throws ExceptionPersistence 
 */
@Override
public List<Clase> loadFechasProfesorClase(String periodo, String nom, Date fecha) throws ExceptionPersistence {

    try {
        return claseMapper.consultarFechasProfesorClase(periodo, nom, fecha);
    } catch (PersistenceException e) {
        throw new PersistenceException("Error al consultar fechas de profesores", e);
    }
}

From source file:edu.eci.pdsw.posgrado.dao.mybatis.mybatisClaseDAO.java

@Override
public List<Clase> loadClaseProfesor(int cor, String mat, String profe) throws ExceptionPersistence {
    try {//  w  ww.  j  a va2s  .c o m
        return claseMapper.consultarClaseProfesor(cor, mat, profe);
    } catch (PersistenceException e) {
        throw new PersistenceException("Error al consultar fechas de profesores", e);
    }
}

From source file:edu.eci.pdsw.posgrado.dao.mybatis.mybatisClaseDAO.java

/**
 * Consulta el horario de clases del profesor
 * @param nom/*from ww w . ja v a 2 s .  co  m*/
 * @param per
 * @return 
 * @throws edu.eci.pdsw.posgrado.dao.ExceptionPersistence 
 */
@Override
public List<Clase> loadHorarioClaseDeProfesor(String nom, String per) throws ExceptionPersistence {
    try {
        return claseMapper.consultarHorarioClaseDeProfesor(nom, per);
    } catch (PersistenceException e) {
        throw new PersistenceException("Error al consultar el horario de clases del profesor", e);
    }
}

From source file:edu.eci.pdsw.posgrado.dao.mybatis.mybatisCohorteDAO.java

@Override
public List<String> loadPeriodos() {
    try {//from w ww.ja v a 2 s  .  c  om
        return corteMapper.consultarPeriodos();
    } catch (PersistenceException e) {
        throw new PersistenceException("Error al cargar Periodo ", e);
    }
}

From source file:edu.eci.pdsw.posgrado.dao.mybatis.mybatisCohorteDAO.java

@Override
public Periodo loadPeriodo(String p) {
    try {/*  w  ww  .  ja va 2  s . c o m*/
        return corteMapper.consultarPeriodo(p);
    } catch (PersistenceException e) {
        throw new PersistenceException("Error al cargar Periodo ", e);
    }
}