use of com.tomasio.projects.trainning.model.SubunidadeDidatica in project trainning by fernandotomasio.
the class TeachingDocumentsServiceSimpleImpl method updateSubunidadeDidatica.
@Override
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
@Transactional
public void updateSubunidadeDidatica(SubunidadeDidaticaDTO objetivo) {
SubunidadeDidaticaDAO dao = factory.getSubunidadeDidaticaDAO();
SubunidadeDidatica model = new SubunidadeDidatica(objetivo);
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.model.SubunidadeDidatica in project trainning by fernandotomasio.
the class TeachingDocumentsServiceSimpleImpl method findSubunidadeDidatica.
@Override
@Transactional(readOnly = true)
@SuppressWarnings({ "BroadCatchBlock", "TooBroadCatch" })
public SubunidadeDidaticaDTO findSubunidadeDidatica(Long id) {
SubunidadeDidaticaDAO dao = factory.getSubunidadeDidaticaDAO();
SubunidadeDidatica subunidade = null;
try {
subunidade = dao.find(id);
} 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());
}
if (subunidade != null) {
return subunidade.createDTO();
} else {
return null;
}
}
Aggregations