Search in sources :

Example 51 with CoreException

use of com.tomasio.projects.trainning.exeption.CoreException in project trainning by fernandotomasio.

the class TeachingDocumentsServiceSimpleImpl method updateDominioAprendizagem.

@Override
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
@Transactional
public void updateDominioAprendizagem(DominioAprendizagemDTO dominioAprendizagem) {
    NivelAprendizagemDAO dao = factory.getNivelAprendizagemDAO();
    DominioAprendizagem _domino = new DominioAprendizagem(dominioAprendizagem);
    try {
        dao.updateDominioAprendizagem(_domino);
    } catch (DAOException ex) {
        throw new CoreException(ex.getMessage());
    } catch (Exception ex) {
        throw new CoreException("Erro de sistema: " + ex.getMessage());
    }
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) DominioAprendizagem(com.tomasio.projects.trainning.model.DominioAprendizagem) CoreException(com.tomasio.projects.trainning.exeption.CoreException) DAOException(com.tomasio.projects.trainning.exception.DAOException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 52 with CoreException

use of com.tomasio.projects.trainning.exeption.CoreException in project trainning by fernandotomasio.

the class TeachingDocumentsServiceSimpleImpl method createObjetivoOperacionalizado.

@Override
@Transactional
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public Long createObjetivoOperacionalizado(ObjetivoOperacionalizadoDTO objetivo) {
    ObjetivoOperacionalizadoDAO dao = factory.getObjetivoOperacionalizadoDAO();
    ObjetivoOperacionalizado model = new ObjetivoOperacionalizado(objetivo);
    Long id = null;
    try {
        id = dao.create(model);
    } catch (DAOException ex) {
        throw new CoreException("Erro de de acesso ao banco de dados: " + ex.getMessage());
    } catch (Exception ex) {
        throw new CoreException("Erro de sistema: " + ex.getMessage());
    }
    return id;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) ObjetivoOperacionalizado(com.tomasio.projects.trainning.model.ObjetivoOperacionalizado) CoreException(com.tomasio.projects.trainning.exeption.CoreException) DAOException(com.tomasio.projects.trainning.exception.DAOException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 53 with CoreException

use of com.tomasio.projects.trainning.exeption.CoreException in project trainning by fernandotomasio.

the class TeachingDocumentsServiceSimpleImpl method createObjetivoUnidadeDidatica.

@Override
@Transactional
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public Long createObjetivoUnidadeDidatica(ObjetivoUnidadeDidaticaDTO objetivo) {
    ObjetivoUnidadeDidaticaDAO dao = factory.getObjetivoUnidadeDidaticaDAO();
    ObjetivoUnidadeDidatica model = new ObjetivoUnidadeDidatica(objetivo);
    Long id = null;
    try {
        id = dao.create(model);
    } catch (DAOException ex) {
        throw new CoreException("Erro de de acesso ao banco de dados: " + ex.getMessage());
    } catch (Exception ex) {
        throw new CoreException("Erro de sistema: " + ex.getMessage());
    }
    return id;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) ObjetivoUnidadeDidatica(com.tomasio.projects.trainning.model.ObjetivoUnidadeDidatica) CoreException(com.tomasio.projects.trainning.exeption.CoreException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) DAOException(com.tomasio.projects.trainning.exception.DAOException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 54 with CoreException

use of com.tomasio.projects.trainning.exeption.CoreException in project trainning by fernandotomasio.

the class TeachingDocumentsServiceSimpleImpl method updateRecomendacaoMetodologica.

@Override
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
@Transactional
public void updateRecomendacaoMetodologica(RecomendacaoMetodologicaDTO recomendacao) {
    RecomendacaoMetodologicaDAO dao = factory.getRecomendacaoMetodologicaDAO();
    RecomendacaoMetodologica model = new RecomendacaoMetodologica(recomendacao);
    try {
        dao.update(model);
    } catch (DAOException ex) {
        throw new CoreException("Erro de de acesso ao banco de dados: " + ex.getMessage());
    } catch (Exception ex) {
        throw new CoreException("Erro de sistema: " + ex.getMessage());
    }
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) RecomendacaoMetodologica(com.tomasio.projects.trainning.model.RecomendacaoMetodologica) CoreException(com.tomasio.projects.trainning.exeption.CoreException) DAOException(com.tomasio.projects.trainning.exception.DAOException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 55 with CoreException

use of com.tomasio.projects.trainning.exeption.CoreException in project trainning by fernandotomasio.

the class TeachingDocumentsServiceSimpleImpl method updateGrupoAreaConhecimento.

@Override
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
@Transactional
public void updateGrupoAreaConhecimento(GrupoAreaConhecimentoDTO grupoAreaConhecimento) {
    AreaConhecimentoDAO dao = factory.getAreaConhecimentoDAO();
    GrupoAreaConhecimento _grupo = new GrupoAreaConhecimento(grupoAreaConhecimento);
    Long id = null;
    try {
        dao.updateGrupoAreaConhecimento(_grupo);
    } catch (DAOException ex) {
        throw new CoreException(ex.getMessage());
    } catch (Exception ex) {
        throw new CoreException("Erro de sistema: " + ex.getMessage());
    }
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) GrupoAreaConhecimento(com.tomasio.projects.trainning.model.GrupoAreaConhecimento) CoreException(com.tomasio.projects.trainning.exeption.CoreException) DAOException(com.tomasio.projects.trainning.exception.DAOException) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

CoreException (com.tomasio.projects.trainning.exeption.CoreException)435 DAOException (com.tomasio.projects.trainning.exception.DAOException)388 Transactional (org.springframework.transaction.annotation.Transactional)372 ParseException (java.text.ParseException)91 OrganizacaoDTO (com.tomasio.projects.trainning.dto.OrganizacaoDTO)53 Organizacao (com.tomasio.projects.trainning.model.Organizacao)41 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)40 IndicacaoDAO (com.tomasio.projects.trainning.dao.IndicacaoDAO)30 PreMatriculaDAO (com.tomasio.projects.trainning.dao.PreMatriculaDAO)27 IndicacaoAlunoDTO (com.tomasio.projects.trainning.dto.IndicacaoAlunoDTO)25 PreMatricula (com.tomasio.projects.trainning.model.PreMatricula)25 PessoaDTO (com.tomasio.projects.trainning.dto.PessoaDTO)23 PreMatriculaDTO (com.tomasio.projects.trainning.dto.PreMatriculaDTO)21 CancelamentoMatriculaDAO (com.tomasio.projects.trainning.dao.CancelamentoMatriculaDAO)20 NotificacaoMatriculaDAO (com.tomasio.projects.trainning.dao.NotificacaoMatriculaDAO)20 Date (java.util.Date)20 MatriculaDAO (com.tomasio.projects.trainning.dao.MatriculaDAO)19 TurmaDAO (com.tomasio.projects.trainning.dao.TurmaDAO)19 CancelamentoMatricula (com.tomasio.projects.trainning.model.CancelamentoMatricula)18 Indicacao (com.tomasio.projects.trainning.model.Indicacao)18