List of usage examples for org.springframework.transaction.annotation Propagation REQUIRED
Propagation REQUIRED
To view the source code for org.springframework.transaction.annotation Propagation REQUIRED.
Click Source Link
From source file:com.Services.Impl.SportRecords.CricketRecords_CrudImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED) public Cricket_records remove(Cricket_records entity) { return null; }
From source file:cs544.letmegiveexam.service.QuestionService.java
@Transactional(propagation = Propagation.REQUIRED) public List<Question> getAll() { return questionDAO.getAll(); }
From source file:cs544.wamp_blog_engine.service.impl.SettingsService.java
@Transactional(propagation = Propagation.REQUIRED) @Override public void deleteBlogCategory(Category category) { categoryDAO.removeCategory(category); }
From source file:cs544.wamp_blog_engine.service.impl.UserService.java
@Transactional(propagation = Propagation.REQUIRED) @Override//from w ww .j a v a2s .c o m public void updateUserInfo(int Id, User user) { User blogger = (User) userDAO.getUser(Id); blogger.setFirstname(user.getFirstname()); blogger.setLastname(user.getLastname()); blogger.setDob(user.getDob()); blogger.setEmail(user.getEmail()); blogger.setProfilepic(user.getProfilepic()); blogger.getUserCredential().setBlocked(user.getUserCredential().isBlocked()); }
From source file:org.fits.proweb.business.UserRoleComponent.java
@Override @Transactional(propagation = Propagation.REQUIRED) public List<UserRole> getAllUserRoles() { return userRoleDao.getAllUserRoles(); }
From source file:com.mycompany.capstone.dao.HashtagDaoDbImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED) public Hashtag create(Hashtag hashtag) { jdbcTemplate.update(SQL_INSERT_HASHTAG, hashtag.getHashtag()); Integer id = jdbcTemplate.queryForObject("SELECT LAST_INSERT_ID()", Integer.class); hashtag.setId(id);/*from www. ja v a2 s . c o m*/ return hashtag; }
From source file:com.healthcit.analytics.businessdelegate.ReportTemplateManager.java
@Transactional(readOnly = true, propagation = Propagation.REQUIRED) private ReportTemplate getReportByTitle(String title, long userId, boolean shared) { ReportTemplate reportTemplate = null; List<ReportTemplate> reportTemplates = reportTemplateDao.getReportTemplatesByTitle(title); for (ReportTemplate template : reportTemplates) { if ((template.isShared() && shared) || (!template.isShared() && !shared && userId == template.getOwnerId())) { reportTemplate = template;/*from w w w. j a v a 2 s . c o m*/ break; } } return reportTemplate; }
From source file:org.fits.proweb.business.NewsComponent.java
@Override @Transactional(propagation = Propagation.REQUIRED) public List<News> getAllNews() { return newsDao.getAllNews(); }
From source file:com.google.ie.business.dao.impl.CommentDaoImpl.java
@Override @Transactional(readOnly = false, propagation = Propagation.REQUIRED) public Comment saveComment(Comment comment) { return getJdoTemplate().makePersistent(comment); }
From source file:com.bia.ccm.services.impl.AccountStatusNotificationServiceImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED) public void savePreferences(PreferenceDto preferenceDto, long organization) { // add new and delete old --> Emails List<EmailPreference> emailPreferences = this.emailPreferenceDao.findByOrganization(organization); Set<String> emails = preferenceDto.getEmails(); for (EmailPreference emailPreference : emailPreferences) { if (!emails.contains(emailPreference.getEmail())) { this.emailPreferenceDao.delete(emailPreference); } else {/*from w ww . j a v a 2s. c o m*/ emails.remove(emailPreference.getEmail()); } } for (String email : emails) { EmailPreference emailPreference = new EmailPreference(email, organization); this.emailPreferenceDao.persist(emailPreference); } // Timings List<EmailTimePreference> emailTimePreferences = this.emailTimePreferenceDao .findByOrganization(organization); Set<Short> timings = preferenceDto.getTimings(); for (EmailTimePreference emailTimePreference : emailTimePreferences) { if (!timings.contains(emailTimePreference.getReportTime())) { this.emailTimePreferenceDao.delete(emailTimePreference); } else { timings.remove(emailTimePreference.getReportTime()); } } for (Short timing : preferenceDto.getTimings()) { EmailTimePreference emailTimePreference = new EmailTimePreference(timing, organization); this.emailTimePreferenceDao.persist(emailTimePreference); } }