@Transactional(rollbackFor = Exception.class) @Override public void delete(final User user) { LOG.trace(getClass() + " : delete ... "); userDAO.delete(user); LOG.trace(getClass() + " : delete."); }
@Transactional(readOnly = true) @Override public List<User> findAll() { LOG.trace(getClass() + " : findAll ... "); List<User> users = userDAO.findAll(); LOG.trace(getClass() + " : findAll."); return users; }
@Transactional(rollbackFor = Exception.class) @Override public User update(final User user) { LOG.trace(getClass() + " : update ... "); User newUser = userDAO.update(user); LOG.trace(getClass() + " : update."); return newUser; }
@Transactional(readOnly = true) @Override public User findById(final Long id) { LOG.trace(getClass() + " : findUserById ... "); User user = userDAO.findOne(id); if (user != null) { LOG.trace(getClass() + " : findUserById. "); return user; } LOG.trace(getClass() + " : findUserById. Not found."); return null; }