Search in sources :

Example 91 with CoreException

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

the class TeachingDocumentsServiceSimpleImpl method createDominioAprendizagem.

@Override
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
@Transactional
public Long createDominioAprendizagem(DominioAprendizagemDTO dominioAprendizagem) {
    NivelAprendizagemDAO dao = factory.getNivelAprendizagemDAO();
    DominioAprendizagem _dominio = new DominioAprendizagem(dominioAprendizagem);
    Long id = null;
    try {
        id = dao.createDominioAprendizagem(_dominio);
    } catch (DAOException ex) {
        throw new CoreException(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) 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 92 with CoreException

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

the class TeachingDocumentsServiceSimpleImpl method findAllSubunidadesDidaticas.

@Override
@Transactional(readOnly = true)
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public SubunidadeDidaticaDTO[] findAllSubunidadesDidaticas(Long unidadeId) {
    SubunidadeDidaticaDAO dao = factory.getSubunidadeDidaticaDAO();
    SubunidadeDidaticaDTO[] subunidadesArray = null;
    try {
        List<SubunidadeDidatica> subunidades = dao.findAll(unidadeId);
        subunidadesArray = new SubunidadeDidaticaDTO[subunidades.size()];
        for (int i = 0; i < subunidadesArray.length; i++) {
            subunidadesArray[i] = subunidades.get(i).createDTO();
        }
    } 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.toString());
    }
    return subunidadesArray;
}
Also used : SubunidadeDidatica(com.tomasio.projects.trainning.model.SubunidadeDidatica) DAOException(com.tomasio.projects.trainning.exception.DAOException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) SubunidadeDidaticaDTO(com.tomasio.projects.trainning.dto.SubunidadeDidaticaDTO) CoreException(com.tomasio.projects.trainning.exeption.CoreException) DAOException(com.tomasio.projects.trainning.exception.DAOException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 93 with CoreException

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

the class TeachingDocumentsServiceSimpleImpl method findAllConceituacoesByPUD.

@Override
@Transactional(readOnly = true)
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public ConceituacaoDTO[] findAllConceituacoesByPUD(Long pudId) {
    ConceituacaoDAO dao = factory.getConceituacaoDAO();
    ConceituacaoDTO[] conceituacoesArray = null;
    try {
        List<Conceituacao> conceituacoes = dao.findAll(pudId);
        conceituacoesArray = new ConceituacaoDTO[conceituacoes.size()];
        for (int i = 0; i < conceituacoesArray.length; i++) {
            conceituacoesArray[i] = conceituacoes.get(i).createDTO();
        }
    } 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.toString());
    }
    return conceituacoesArray;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) Conceituacao(com.tomasio.projects.trainning.model.Conceituacao) CoreException(com.tomasio.projects.trainning.exeption.CoreException) ConceituacaoDTO(com.tomasio.projects.trainning.dto.ConceituacaoDTO) CoreException(com.tomasio.projects.trainning.exeption.CoreException) DAOException(com.tomasio.projects.trainning.exception.DAOException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 94 with CoreException

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

the class TeachingDocumentsServiceSimpleImpl method findAllAnexosApostilas.

@Override
@Transactional(readOnly = true)
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public AnexoApostilaDTO[] findAllAnexosApostilas(Long apostilaId) {
    AnexoApostilaDAO dao = factory.getAnexoApostilaDAO();
    AnexoApostilaDTO[] anexosArray = null;
    try {
        List<AnexoApostila> anexos = dao.findAllAnexosApostilas(apostilaId);
        anexosArray = new AnexoApostilaDTO[anexos.size()];
        for (int i = 0; i < anexosArray.length; i++) {
            anexosArray[i] = anexos.get(i).createDTO();
        }
    } 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.toString());
    }
    return anexosArray;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) AnexoApostila(com.tomasio.projects.trainning.model.AnexoApostila) CoreException(com.tomasio.projects.trainning.exeption.CoreException) AnexoApostilaDTO(com.tomasio.projects.trainning.dto.AnexoApostilaDTO) CoreException(com.tomasio.projects.trainning.exeption.CoreException) DAOException(com.tomasio.projects.trainning.exception.DAOException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 95 with CoreException

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

the class TeachingDocumentsServiceSimpleImpl method findAllDisciplinasByCurriculoMinimo.

@Override
@Transactional(readOnly = true)
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public DisciplinaDTO[] findAllDisciplinasByCurriculoMinimo(Long curriculoMinimoId) {
    DisciplinaDAO dao = factory.getDisciplinaDAO();
    DisciplinaDTO[] disciplinasArray = null;
    try {
        List<Disciplina> disciplinas = dao.findAllByCurriculoMinimo(curriculoMinimoId);
        disciplinasArray = new DisciplinaDTO[disciplinas.size()];
        for (int i = 0; i < disciplinasArray.length; i++) {
            disciplinasArray[i] = disciplinas.get(i).createDTO();
        }
    } 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.toString());
    }
    return disciplinasArray;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) Disciplina(com.tomasio.projects.trainning.model.Disciplina) ObjetivoDisciplina(com.tomasio.projects.trainning.model.ObjetivoDisciplina) CoreException(com.tomasio.projects.trainning.exeption.CoreException) DisciplinaDTO(com.tomasio.projects.trainning.dto.DisciplinaDTO) ObjetivoDisciplinaDTO(com.tomasio.projects.trainning.dto.ObjetivoDisciplinaDTO) 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