Search in sources :

Example 1 with NotificacaoMatriculaDAO

use of com.tomasio.projects.trainning.dao.NotificacaoMatriculaDAO in project trainning by fernandotomasio.

the class AtividadesEnsinoServiceSimpleImpl method createNotificacaoMatricula.

@Override
@Transactional
public Long createNotificacaoMatricula(NotificacaoMatriculaDTO notificacaoMatricula) {
    NotificacaoMatriculaDAO dao = factory.getNotificacaoMatriculaDAO();
    Long id = null;
    NotificacaoMatricula _notificacaoMatricula = null;
    // cria um registro na tabela CancelamentoMatricula
    if (notificacaoMatricula != null) {
        _notificacaoMatricula = new NotificacaoMatricula(notificacaoMatricula);
    }
    try {
        id = dao.create(_notificacaoMatricula);
    } catch (DAOException ex) {
        ex.printStackTrace();
        throw new CoreException(ex.getMessage());
    } catch (Exception ex) {
        ex.printStackTrace();
        throw new CoreException("Erro em tempo de execução: " + ex.getMessage());
    // throw new CoreException(ex.getMessage());
    }
    return id;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) NotificacaoMatriculaDAO(com.tomasio.projects.trainning.dao.NotificacaoMatriculaDAO) CoreException(com.tomasio.projects.trainning.exeption.CoreException) NotificacaoMatricula(com.tomasio.projects.trainning.model.NotificacaoMatricula) DAOException(com.tomasio.projects.trainning.exception.DAOException) ParseException(java.text.ParseException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

NotificacaoMatriculaDAO (com.tomasio.projects.trainning.dao.NotificacaoMatriculaDAO)1 DAOException (com.tomasio.projects.trainning.exception.DAOException)1 CoreException (com.tomasio.projects.trainning.exeption.CoreException)1 NotificacaoMatricula (com.tomasio.projects.trainning.model.NotificacaoMatricula)1 ParseException (java.text.ParseException)1 Transactional (org.springframework.transaction.annotation.Transactional)1