Search in sources :

Example 31 with MatriculaDTO

use of com.tomasio.projects.trainning.dto.MatriculaDTO in project trainning by fernandotomasio.

the class AtividadesEnsinoServiceSimpleImpl method findAllMatriculasAlunosDaOM.

@Override
@Transactional(readOnly = true)
public MatriculaDTO[] findAllMatriculasAlunosDaOM(Long organizacaoId, Date exercicio, String search) {
    MatriculaDAO dao = factory.getMatriculaDAO();
    MatriculaDTO[] matriculasArray = null;
    try {
        List<Matricula> matriculas = dao.findAllAlunosDaOM(organizacaoId, exercicio, search);
        if (matriculas != null) {
            matriculasArray = new MatriculaDTO[matriculas.size()];
            for (int i = 0; i < matriculas.size(); i++) {
                matriculasArray[i] = matriculas.get(i).createDTOWithoutDependencies();
            }
        }
    } 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());
    }
    return matriculasArray;
}
Also used : PreMatriculaDTO(com.tomasio.projects.trainning.dto.PreMatriculaDTO) NotificacaoMatriculaDTO(com.tomasio.projects.trainning.dto.NotificacaoMatriculaDTO) MatriculaDTO(com.tomasio.projects.trainning.dto.MatriculaDTO) CancelamentoMatriculaDTO(com.tomasio.projects.trainning.dto.CancelamentoMatriculaDTO) DAOException(com.tomasio.projects.trainning.exception.DAOException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) CancelamentoMatriculaDAO(com.tomasio.projects.trainning.dao.CancelamentoMatriculaDAO) MatriculaDAO(com.tomasio.projects.trainning.dao.MatriculaDAO) NotificacaoMatriculaDAO(com.tomasio.projects.trainning.dao.NotificacaoMatriculaDAO) PreMatriculaDAO(com.tomasio.projects.trainning.dao.PreMatriculaDAO) CancelamentoMatricula(com.tomasio.projects.trainning.model.CancelamentoMatricula) Matricula(com.tomasio.projects.trainning.model.Matricula) NotificacaoMatricula(com.tomasio.projects.trainning.model.NotificacaoMatricula) PreMatricula(com.tomasio.projects.trainning.model.PreMatricula) DAOException(com.tomasio.projects.trainning.exception.DAOException) ParseException(java.text.ParseException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 32 with MatriculaDTO

use of com.tomasio.projects.trainning.dto.MatriculaDTO in project trainning by fernandotomasio.

the class AtividadesEnsinoServiceSimpleImpl method findAllMatriculasAlunosNaoApresentados.

@Override
@Transactional(readOnly = true)
public MatriculaDTO[] findAllMatriculasAlunosNaoApresentados(Long turmaId) {
    MatriculaDAO dao = factory.getMatriculaDAO();
    MatriculaDTO[] matriculasArray = null;
    try {
        List<Matricula> matriculas = dao.findAllAlunosNaoApresentados(turmaId);
        Integer tammat = matriculas.size();
        if (matriculas != null) {
            matriculasArray = new MatriculaDTO[matriculas.size()];
            for (int i = 0; i < matriculas.size(); i++) {
                matriculasArray[i] = matriculas.get(i).createDTOWithoutDependencies();
            }
        }
    } 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());
    }
    return matriculasArray;
}
Also used : PreMatriculaDTO(com.tomasio.projects.trainning.dto.PreMatriculaDTO) NotificacaoMatriculaDTO(com.tomasio.projects.trainning.dto.NotificacaoMatriculaDTO) MatriculaDTO(com.tomasio.projects.trainning.dto.MatriculaDTO) CancelamentoMatriculaDTO(com.tomasio.projects.trainning.dto.CancelamentoMatriculaDTO) DAOException(com.tomasio.projects.trainning.exception.DAOException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) CancelamentoMatriculaDAO(com.tomasio.projects.trainning.dao.CancelamentoMatriculaDAO) MatriculaDAO(com.tomasio.projects.trainning.dao.MatriculaDAO) NotificacaoMatriculaDAO(com.tomasio.projects.trainning.dao.NotificacaoMatriculaDAO) PreMatriculaDAO(com.tomasio.projects.trainning.dao.PreMatriculaDAO) CancelamentoMatricula(com.tomasio.projects.trainning.model.CancelamentoMatricula) Matricula(com.tomasio.projects.trainning.model.Matricula) NotificacaoMatricula(com.tomasio.projects.trainning.model.NotificacaoMatricula) PreMatricula(com.tomasio.projects.trainning.model.PreMatricula) DAOException(com.tomasio.projects.trainning.exception.DAOException) ParseException(java.text.ParseException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 33 with MatriculaDTO

use of com.tomasio.projects.trainning.dto.MatriculaDTO in project trainning by fernandotomasio.

the class AtividadesEnsinoServiceSimpleImpl method findAllMatriculasInstrutores.

@Override
@Transactional(readOnly = true)
public MatriculaDTO[] findAllMatriculasInstrutores(Long turmaId) {
    MatriculaDAO dao = factory.getMatriculaDAO();
    MatriculaDTO[] matriculasArray = null;
    try {
        List<Matricula> matriculas = dao.findAllInstrutores(turmaId);
        if (matriculas != null) {
            matriculasArray = new MatriculaDTO[matriculas.size()];
            for (int i = 0; i < matriculas.size(); i++) {
                matriculasArray[i] = matriculas.get(i).createDTOWithoutDependencies();
            }
        }
    } 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());
    }
    return matriculasArray;
}
Also used : PreMatriculaDTO(com.tomasio.projects.trainning.dto.PreMatriculaDTO) NotificacaoMatriculaDTO(com.tomasio.projects.trainning.dto.NotificacaoMatriculaDTO) MatriculaDTO(com.tomasio.projects.trainning.dto.MatriculaDTO) CancelamentoMatriculaDTO(com.tomasio.projects.trainning.dto.CancelamentoMatriculaDTO) DAOException(com.tomasio.projects.trainning.exception.DAOException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) CancelamentoMatriculaDAO(com.tomasio.projects.trainning.dao.CancelamentoMatriculaDAO) MatriculaDAO(com.tomasio.projects.trainning.dao.MatriculaDAO) NotificacaoMatriculaDAO(com.tomasio.projects.trainning.dao.NotificacaoMatriculaDAO) PreMatriculaDAO(com.tomasio.projects.trainning.dao.PreMatriculaDAO) CancelamentoMatricula(com.tomasio.projects.trainning.model.CancelamentoMatricula) Matricula(com.tomasio.projects.trainning.model.Matricula) NotificacaoMatricula(com.tomasio.projects.trainning.model.NotificacaoMatricula) PreMatricula(com.tomasio.projects.trainning.model.PreMatricula) DAOException(com.tomasio.projects.trainning.exception.DAOException) ParseException(java.text.ParseException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 34 with MatriculaDTO

use of com.tomasio.projects.trainning.dto.MatriculaDTO in project trainning by fernandotomasio.

the class AtividadesEnsinoServiceSimpleImpl method findAllMatriculasAlunos.

@Override
@Transactional(readOnly = true)
public MatriculaDTO[] findAllMatriculasAlunos(Long turmaId) {
    MatriculaDAO dao = factory.getMatriculaDAO();
    MatriculaDTO[] matriculasArray = null;
    try {
        List<Matricula> matriculas = dao.findAllAlunos(turmaId);
        if (matriculas != null) {
            matriculasArray = new MatriculaDTO[matriculas.size()];
            for (int i = 0; i < matriculas.size(); i++) {
                matriculasArray[i] = matriculas.get(i).createDTOWithoutDependencies();
            }
        }
    } 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());
    }
    return matriculasArray;
}
Also used : PreMatriculaDTO(com.tomasio.projects.trainning.dto.PreMatriculaDTO) NotificacaoMatriculaDTO(com.tomasio.projects.trainning.dto.NotificacaoMatriculaDTO) MatriculaDTO(com.tomasio.projects.trainning.dto.MatriculaDTO) CancelamentoMatriculaDTO(com.tomasio.projects.trainning.dto.CancelamentoMatriculaDTO) DAOException(com.tomasio.projects.trainning.exception.DAOException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) CancelamentoMatriculaDAO(com.tomasio.projects.trainning.dao.CancelamentoMatriculaDAO) MatriculaDAO(com.tomasio.projects.trainning.dao.MatriculaDAO) NotificacaoMatriculaDAO(com.tomasio.projects.trainning.dao.NotificacaoMatriculaDAO) PreMatriculaDAO(com.tomasio.projects.trainning.dao.PreMatriculaDAO) CancelamentoMatricula(com.tomasio.projects.trainning.model.CancelamentoMatricula) Matricula(com.tomasio.projects.trainning.model.Matricula) NotificacaoMatricula(com.tomasio.projects.trainning.model.NotificacaoMatricula) PreMatricula(com.tomasio.projects.trainning.model.PreMatricula) DAOException(com.tomasio.projects.trainning.exception.DAOException) ParseException(java.text.ParseException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 35 with MatriculaDTO

use of com.tomasio.projects.trainning.dto.MatriculaDTO in project trainning by fernandotomasio.

the class AtividadesEnsinoServiceSimpleImpl method findAllMatriculasAlunosApresentadosNaoConcluidos.

@Override
@Transactional(readOnly = true)
public MatriculaDTO[] findAllMatriculasAlunosApresentadosNaoConcluidos(Long turmaId) {
    MatriculaDAO dao = factory.getMatriculaDAO();
    MatriculaDTO[] matriculasArray = null;
    try {
        List<Matricula> matriculas = dao.findAllAlunosApresentadosNaoConcluidos(turmaId);
        if (matriculas != null) {
            matriculasArray = new MatriculaDTO[matriculas.size()];
            for (int i = 0; i < matriculas.size(); i++) {
                matriculasArray[i] = matriculas.get(i).createDTOWithoutDependencies();
            }
        }
    } 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());
    }
    return matriculasArray;
}
Also used : PreMatriculaDTO(com.tomasio.projects.trainning.dto.PreMatriculaDTO) NotificacaoMatriculaDTO(com.tomasio.projects.trainning.dto.NotificacaoMatriculaDTO) MatriculaDTO(com.tomasio.projects.trainning.dto.MatriculaDTO) CancelamentoMatriculaDTO(com.tomasio.projects.trainning.dto.CancelamentoMatriculaDTO) DAOException(com.tomasio.projects.trainning.exception.DAOException) CoreException(com.tomasio.projects.trainning.exeption.CoreException) CancelamentoMatriculaDAO(com.tomasio.projects.trainning.dao.CancelamentoMatriculaDAO) MatriculaDAO(com.tomasio.projects.trainning.dao.MatriculaDAO) NotificacaoMatriculaDAO(com.tomasio.projects.trainning.dao.NotificacaoMatriculaDAO) PreMatriculaDAO(com.tomasio.projects.trainning.dao.PreMatriculaDAO) CancelamentoMatricula(com.tomasio.projects.trainning.model.CancelamentoMatricula) Matricula(com.tomasio.projects.trainning.model.Matricula) NotificacaoMatricula(com.tomasio.projects.trainning.model.NotificacaoMatricula) PreMatricula(com.tomasio.projects.trainning.model.PreMatricula) 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

MatriculaDTO (com.tomasio.projects.trainning.dto.MatriculaDTO)40 CancelamentoMatriculaDTO (com.tomasio.projects.trainning.dto.CancelamentoMatriculaDTO)32 PreMatriculaDTO (com.tomasio.projects.trainning.dto.PreMatriculaDTO)26 NotificacaoMatriculaDTO (com.tomasio.projects.trainning.dto.NotificacaoMatriculaDTO)25 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)20 CoreException (com.tomasio.projects.trainning.exeption.CoreException)17 ArrayList (java.util.ArrayList)17 OrganizacaoDTO (com.tomasio.projects.trainning.dto.OrganizacaoDTO)14 SimpleDateFormat (java.text.SimpleDateFormat)14 HashMap (java.util.HashMap)11 ConclusaoDTO (com.tomasio.projects.trainning.dto.ConclusaoDTO)10 DAOException (com.tomasio.projects.trainning.exception.DAOException)10 Date (java.util.Date)10 Map (java.util.Map)10 PessoaDTO (com.tomasio.projects.trainning.dto.PessoaDTO)9 Matricula (com.tomasio.projects.trainning.model.Matricula)9 ParseException (java.text.ParseException)9 Transactional (org.springframework.transaction.annotation.Transactional)9 CancelamentoMatriculaDAO (com.tomasio.projects.trainning.dao.CancelamentoMatriculaDAO)8 MatriculaDAO (com.tomasio.projects.trainning.dao.MatriculaDAO)8