Search in sources :

Example 6 with ConfirmacaoConviteInstrutor

use of com.tomasio.projects.trainning.model.ConfirmacaoConviteInstrutor in project trainning by fernandotomasio.

the class AtividadesEnsinoServiceSimpleImpl method findAllConfirmacoesConvitesInstrutoresByPessoaId.

@Override
@Transactional(readOnly = true)
public ConfirmacaoConviteInstrutorDTO[] findAllConfirmacoesConvitesInstrutoresByPessoaId(Long pessoaId) {
    ConfirmacaoConviteInstrutorDAO dao = factory.getConfirmacaoConviteInstrutorDAO();
    ConfirmacaoConviteInstrutorDTO[] confirmacoesArray;
    try {
        List<ConfirmacaoConviteInstrutor> itens = dao.findAllByPessoaId(pessoaId);
        confirmacoesArray = new ConfirmacaoConviteInstrutorDTO[itens.size()];
        for (int i = 0; i < confirmacoesArray.length; i++) {
            confirmacoesArray[i] = itens.get(i).createDTO();
        }
        return confirmacoesArray;
    } catch (DAOException ex) {
        Logger.getLogger(AtividadesEnsinoServiceSimpleImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new CoreException(ex.getMessage());
    }
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) ConfirmacaoConviteInstrutorDTO(com.tomasio.projects.trainning.dto.ConfirmacaoConviteInstrutorDTO) CoreException(com.tomasio.projects.trainning.exeption.CoreException) ConfirmacaoConviteInstrutorDAO(com.tomasio.projects.trainning.dao.ConfirmacaoConviteInstrutorDAO) ConfirmacaoConviteInstrutor(com.tomasio.projects.trainning.model.ConfirmacaoConviteInstrutor) Transactional(org.springframework.transaction.annotation.Transactional)

Example 7 with ConfirmacaoConviteInstrutor

use of com.tomasio.projects.trainning.model.ConfirmacaoConviteInstrutor in project trainning by fernandotomasio.

the class AtividadesEnsinoServiceSimpleImpl method findAllConfirmacoesConvitesInstrutoresByConviteInstrutorId.

@Override
@Transactional(readOnly = true)
public ConfirmacaoConviteInstrutorDTO[] findAllConfirmacoesConvitesInstrutoresByConviteInstrutorId(Long consultaId) {
    ConfirmacaoConviteInstrutorDAO dao = factory.getConfirmacaoConviteInstrutorDAO();
    ConfirmacaoConviteInstrutorDTO[] confirmacoesArray;
    try {
        List<ConfirmacaoConviteInstrutor> itens = dao.findAllByConviteId(consultaId);
        confirmacoesArray = new ConfirmacaoConviteInstrutorDTO[itens.size()];
        for (int i = 0; i < confirmacoesArray.length; i++) {
            confirmacoesArray[i] = itens.get(i).createDTO();
        }
        return confirmacoesArray;
    } catch (DAOException ex) {
        Logger.getLogger(AtividadesEnsinoServiceSimpleImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new CoreException(ex.getMessage());
    }
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) ConfirmacaoConviteInstrutorDTO(com.tomasio.projects.trainning.dto.ConfirmacaoConviteInstrutorDTO) CoreException(com.tomasio.projects.trainning.exeption.CoreException) ConfirmacaoConviteInstrutorDAO(com.tomasio.projects.trainning.dao.ConfirmacaoConviteInstrutorDAO) ConfirmacaoConviteInstrutor(com.tomasio.projects.trainning.model.ConfirmacaoConviteInstrutor) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

DAOException (com.tomasio.projects.trainning.exception.DAOException)7 ConfirmacaoConviteInstrutor (com.tomasio.projects.trainning.model.ConfirmacaoConviteInstrutor)7 ConfirmacaoConviteInstrutorDAO (com.tomasio.projects.trainning.dao.ConfirmacaoConviteInstrutorDAO)6 CoreException (com.tomasio.projects.trainning.exeption.CoreException)6 Transactional (org.springframework.transaction.annotation.Transactional)6 ConfirmacaoConviteInstrutorDTO (com.tomasio.projects.trainning.dto.ConfirmacaoConviteInstrutorDTO)3 ParseException (java.text.ParseException)3