Search in sources :

Example 1 with ConviteInstrutorIndividual

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

the class AtividadesEnsinoServiceSimpleImpl method createConviteInstrutor.

@Override
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
@Transactional
public Long createConviteInstrutor(ConviteInstrutorDTO convite) {
    ConviteInstrutorDAO dao = factory.getConviteInstrutorDAO();
    ConviteInstrutor model = null;
    if (convite instanceof ConviteInstrutorPerfilDTO) {
        model = new ConviteInstrutorPerfil((ConviteInstrutorPerfilDTO) convite);
    } else if (convite instanceof ConviteInstrutorIndividualDTO) {
        model = new ConviteInstrutorIndividual((ConviteInstrutorIndividualDTO) convite);
    }
    return create(dao, model);
}
Also used : ItemConviteInstrutorPerfil(com.tomasio.projects.trainning.model.ItemConviteInstrutorPerfil) ConviteInstrutorPerfil(com.tomasio.projects.trainning.model.ConviteInstrutorPerfil) ConfirmacaoConviteInstrutor(com.tomasio.projects.trainning.model.ConfirmacaoConviteInstrutor) ConviteInstrutor(com.tomasio.projects.trainning.model.ConviteInstrutor) ItemConviteInstrutorIndividualDTO(com.tomasio.projects.trainning.dto.ItemConviteInstrutorIndividualDTO) ConviteInstrutorIndividualDTO(com.tomasio.projects.trainning.dto.ConviteInstrutorIndividualDTO) ConviteInstrutorPerfilDTO(com.tomasio.projects.trainning.dto.ConviteInstrutorPerfilDTO) ItemConviteInstrutorPerfilDTO(com.tomasio.projects.trainning.dto.ItemConviteInstrutorPerfilDTO) ItemConviteInstrutorIndividual(com.tomasio.projects.trainning.model.ItemConviteInstrutorIndividual) ConviteInstrutorIndividual(com.tomasio.projects.trainning.model.ConviteInstrutorIndividual) ConviteInstrutorDAO(com.tomasio.projects.trainning.dao.ConviteInstrutorDAO) ConfirmacaoConviteInstrutorDAO(com.tomasio.projects.trainning.dao.ConfirmacaoConviteInstrutorDAO) Transactional(org.springframework.transaction.annotation.Transactional)

Example 2 with ConviteInstrutorIndividual

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

the class AtividadesEnsinoServiceSimpleImpl method updateConviteInstrutor.

@Override
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
@Transactional
public void updateConviteInstrutor(ConviteInstrutorDTO convite) {
    ConviteInstrutorDAO dao = factory.getConviteInstrutorDAO();
    ConviteInstrutor model = null;
    if (convite instanceof ConviteInstrutorPerfilDTO) {
        model = new ConviteInstrutorPerfil((ConviteInstrutorPerfilDTO) convite);
    } else if (convite instanceof ConviteInstrutorIndividualDTO) {
        model = new ConviteInstrutorIndividual((ConviteInstrutorIndividualDTO) convite);
    }
    update(dao, model);
}
Also used : ItemConviteInstrutorPerfil(com.tomasio.projects.trainning.model.ItemConviteInstrutorPerfil) ConviteInstrutorPerfil(com.tomasio.projects.trainning.model.ConviteInstrutorPerfil) ConfirmacaoConviteInstrutor(com.tomasio.projects.trainning.model.ConfirmacaoConviteInstrutor) ConviteInstrutor(com.tomasio.projects.trainning.model.ConviteInstrutor) ItemConviteInstrutorIndividualDTO(com.tomasio.projects.trainning.dto.ItemConviteInstrutorIndividualDTO) ConviteInstrutorIndividualDTO(com.tomasio.projects.trainning.dto.ConviteInstrutorIndividualDTO) ConviteInstrutorPerfilDTO(com.tomasio.projects.trainning.dto.ConviteInstrutorPerfilDTO) ItemConviteInstrutorPerfilDTO(com.tomasio.projects.trainning.dto.ItemConviteInstrutorPerfilDTO) ItemConviteInstrutorIndividual(com.tomasio.projects.trainning.model.ItemConviteInstrutorIndividual) ConviteInstrutorIndividual(com.tomasio.projects.trainning.model.ConviteInstrutorIndividual) ConviteInstrutorDAO(com.tomasio.projects.trainning.dao.ConviteInstrutorDAO) ConfirmacaoConviteInstrutorDAO(com.tomasio.projects.trainning.dao.ConfirmacaoConviteInstrutorDAO) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

ConfirmacaoConviteInstrutorDAO (com.tomasio.projects.trainning.dao.ConfirmacaoConviteInstrutorDAO)2 ConviteInstrutorDAO (com.tomasio.projects.trainning.dao.ConviteInstrutorDAO)2 ConviteInstrutorIndividualDTO (com.tomasio.projects.trainning.dto.ConviteInstrutorIndividualDTO)2 ConviteInstrutorPerfilDTO (com.tomasio.projects.trainning.dto.ConviteInstrutorPerfilDTO)2 ItemConviteInstrutorIndividualDTO (com.tomasio.projects.trainning.dto.ItemConviteInstrutorIndividualDTO)2 ItemConviteInstrutorPerfilDTO (com.tomasio.projects.trainning.dto.ItemConviteInstrutorPerfilDTO)2 ConfirmacaoConviteInstrutor (com.tomasio.projects.trainning.model.ConfirmacaoConviteInstrutor)2 ConviteInstrutor (com.tomasio.projects.trainning.model.ConviteInstrutor)2 ConviteInstrutorIndividual (com.tomasio.projects.trainning.model.ConviteInstrutorIndividual)2 ConviteInstrutorPerfil (com.tomasio.projects.trainning.model.ConviteInstrutorPerfil)2 ItemConviteInstrutorIndividual (com.tomasio.projects.trainning.model.ItemConviteInstrutorIndividual)2 ItemConviteInstrutorPerfil (com.tomasio.projects.trainning.model.ItemConviteInstrutorPerfil)2 Transactional (org.springframework.transaction.annotation.Transactional)2