Search in sources :

Example 6 with ItemConviteInstrutorPerfil

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

the class AtividadesEnsinoServiceSimpleImpl method findAllItensConviteInstrutorPerfilByConviteInstrutorPerfilId.

@Override
@Transactional(readOnly = true)
public ItemConviteInstrutorPerfilDTO[] findAllItensConviteInstrutorPerfilByConviteInstrutorPerfilId(Long convite) {
    ItemConviteInstrutorPerfilDAO dao = factory.getItemConviteInstrutorPerfilDAO();
    ItemConviteInstrutorPerfilDTO[] itensConviteArray;
    try {
        List<ItemConviteInstrutorPerfil> itens = dao.findAllByConviteId(convite);
        itensConviteArray = new ItemConviteInstrutorPerfilDTO[itens.size()];
        for (int i = 0; i < itensConviteArray.length; i++) {
            itensConviteArray[i] = itens.get(i).createDTO();
        }
        return itensConviteArray;
    } 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) CoreException(com.tomasio.projects.trainning.exeption.CoreException) ItemConviteInstrutorPerfil(com.tomasio.projects.trainning.model.ItemConviteInstrutorPerfil) ItemConviteInstrutorPerfilDAO(com.tomasio.projects.trainning.dao.ItemConviteInstrutorPerfilDAO) ItemConviteInstrutorPerfilDTO(com.tomasio.projects.trainning.dto.ItemConviteInstrutorPerfilDTO) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

DAOException (com.tomasio.projects.trainning.exception.DAOException)6 ItemConviteInstrutorPerfil (com.tomasio.projects.trainning.model.ItemConviteInstrutorPerfil)6 ItemConviteInstrutorPerfilDAO (com.tomasio.projects.trainning.dao.ItemConviteInstrutorPerfilDAO)5 CoreException (com.tomasio.projects.trainning.exeption.CoreException)5 Transactional (org.springframework.transaction.annotation.Transactional)5 ParseException (java.text.ParseException)3 ItemConviteInstrutorPerfilDTO (com.tomasio.projects.trainning.dto.ItemConviteInstrutorPerfilDTO)2