Пример #1
0
  @Transactional(readOnly = false)
  public void updateComputer(Computer pComputer) {
    Log l = new Log();
    Date now = Calendar.getInstance().getTime();
    l.setDateLog(now);
    l.setOptionLog("Uptade");
    l.setComputerLog(pComputer.toString());

    compDao.updateComputer(pComputer);

    logDao.addLog(l);
  }
Пример #2
0
  @Transactional(readOnly = false)
  public void deleteComputer(int pIdComputer) {
    Log l = new Log();
    Date now = Calendar.getInstance().getTime();
    l.setDateLog(now);
    l.setOptionLog("Delete");
    l.setComputerLog(this.getComputerById(pIdComputer).toString());

    compDao.deleteComputer(pIdComputer);

    logDao.addLog(l);
  }