use of com.tomasio.projects.trainning.exeption.CoreException in project trainning by fernandotomasio.
the class TeachingDocumentsServiceSimpleImpl method createRecomendacaoMetodologica.
@Override
@Transactional
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public Long createRecomendacaoMetodologica(RecomendacaoMetodologicaDTO recomendacao) {
RecomendacaoMetodologicaDAO dao = factory.getRecomendacaoMetodologicaDAO();
RecomendacaoMetodologica model = new RecomendacaoMetodologica(recomendacao);
Long id = null;
try {
id = dao.create(model);
} 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.getMessage());
}
return id;
}
use of com.tomasio.projects.trainning.exeption.CoreException in project trainning by fernandotomasio.
the class TeachingDocumentsServiceSimpleImpl method createConceituacao.
@Override
@Transactional
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public Long createConceituacao(ConceituacaoDTO conceituacao) {
ConceituacaoDAO dao = factory.getConceituacaoDAO();
Conceituacao model = new Conceituacao(conceituacao);
Long id = null;
try {
id = dao.create(model);
} 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.getMessage());
}
return id;
}
use of com.tomasio.projects.trainning.exeption.CoreException in project trainning by fernandotomasio.
the class TeachingDocumentsServiceSimpleImpl method updateSecaoApostila.
@Override
@Transactional
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public void updateSecaoApostila(SecaoApostilaDTO secao) {
SecaoApostilaDAO dao = factory.getSecaoApostilaDAO();
SecaoApostila model = new SecaoApostila(secao);
try {
dao.update(model);
} 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.getMessage());
}
}
use of com.tomasio.projects.trainning.exeption.CoreException in project trainning by fernandotomasio.
the class TeachingDocumentsServiceSimpleImpl method createPerfilRelacionamento.
@Override
@Transactional
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public Long createPerfilRelacionamento(PerfilRelacionamentoDTO perfil) {
PerfilRelacionamentoDAO dao = factory.getPerfilRelacionamentoDAO();
PerfilRelacionamento model = new PerfilRelacionamento(perfil);
Long id = null;
try {
id = dao.create(model);
} 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.getMessage());
}
return id;
}
use of com.tomasio.projects.trainning.exeption.CoreException in project trainning by fernandotomasio.
the class TeachingDocumentsServiceSimpleImpl method createSubunidadeDidatica.
@Override
@Transactional
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public Long createSubunidadeDidatica(SubunidadeDidaticaDTO subunidade) {
SubunidadeDidaticaDAO dao = factory.getSubunidadeDidaticaDAO();
SubunidadeDidatica model = new SubunidadeDidatica(subunidade);
Long id = null;
try {
id = dao.create(model);
} 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.getMessage());
}
return id;
}
Aggregations