Beispiel #1
0
  @Override
  public MimeFilesDTO getByPrimaryKey(Long id) throws BusinessException {
    MimeFilesDTO dto = null;

    TransactionFactory transactionFactory = new TransactionFactory();
    BusinessTransactionBo bt = transactionFactory.beginTx();
    try {
      MimeFilesDAOImpl mimeFilesDAO = new MimeFilesDAOImpl(bt);
      dto = Convert.dao2dto(mimeFilesDAO.getByPrimaryKey(id));
    } catch (DaoException e) {
      logger.error(e.getMessage());
      throw new BusinessException(e);
    } finally {
      bt.rollbackTx();
      transactionFactory.endTx();
    }
    return dto;
  }