public static ParametrosDTO dao2dto(Parametros dao) { ParametrosDTO dto = new ParametrosDTO(); dto.setParPk(dao.getParPk()); dto.setParValor(dao.getParValor()); dto.setParDescripcion(dao.getParDescripcion()); return dto; }
@Override public String getValor(String id) throws BusinessException { Parametros dao; TransactionFactory transactionFactory = new TransactionFactory(); BusinessTransactionBo bt = transactionFactory.beginTx(); try { ParametrosDAOImpl parametrosDAO = new ParametrosDAOImpl(bt); dao = parametrosDAO.getByPrimaryKey(id); } catch (DaoException e) { logger.error(e.getMessage()); throw new BusinessException(e); } finally { bt.rollbackTx(); transactionFactory.endTx(); } return dao == null ? "" : dao.getParValor(); }
public static Parametros dto2dao(ParametrosDTO dto) { Parametros dao = new Parametros(dto.getParPk(), dto.getParValor(), dto.getParDescripcion()); dao.setParPk(dto.getParPk()); return dao; }