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.github.carlomicieli.service.hibernate.PlayerServiceImpl.java
/** * Update a player.//from ww w . ja va 2 s . c om * @param player the player. */ @Override @Transactional(propagation = Propagation.REQUIRED, readOnly = false) public void updatePlayer(Player player) { getDAO().updatePlayer(player); }
From source file:com.mycompany.flooringmvc.dao.ProductDaoDbImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED) public Product get(int id) { return jdbcTemplate.queryForObject(SQL_GET_PRODUCT, new ProductMapper(), id); }
From source file:com.swcguild.addressbookarch.dao.AddressBookDaoDbImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED, readOnly = false) public Address addAddress(Address address) { jdbcTemplate.update(SQL_INSERT_ADDRESS, address.getFirstName(), address.getLastName(), address.getAddress(), address.getCity(), address.getState(), address.getZip()); address.setAddressId(jdbcTemplate.queryForObject("select LAST_INSERT_ID()", Integer.class)); return address; }
From source file:com.swcguild.dvdlibrarymvc.dao.DvdLibraryDaoDbImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED, readOnly = false) public Dvd addDVD(Dvd d) { jdbcTemplate.update(SQL_INSERT_DVD, d.getTitle(), d.getReleaseDate(), d.getMpaaRating(), d.getDirectorName(), d.getStudio(), d.getUserNote()); d.setDvdId(jdbcTemplate.queryForObject("SELECT LAST_INSERT_ID()", Integer.class)); return d;/*from w ww .j av a2s .co m*/ }
From source file:it.geosolutions.geobatch.ftpserver.dao.hibernate.HibFtpServerConfigDAO.java
@Transactional(propagation = Propagation.REQUIRED) public void save(FtpServerConfig props) throws DAOException { super.makePersistent(props); }
From source file:com.oak_yoga_studio.service.impl.CourseServiceImpl.java
@Transactional(propagation = Propagation.REQUIRED) @Override/*from w w w . ja va 2 s.c o m*/ public void enableOrdisableCourse(Course course) { try { if (course.isActive()) { course.setActive(false); } else { course.setActive(true); } courseDAO.updateCourse(course); } catch (Exception e) { } }
From source file:com.acmeair.jpa.service.CustomerServiceImpl.java
@Transactional(propagation = Propagation.REQUIRED) @Override/*from w ww .jav a 2 s . c om*/ public Customer createCustomer(String username, String password, MemberShipStatus status, int total_miles, int miles_ytd, String phoneNumber, PhoneType phoneNumberType, CustomerAddress address) { Customer customer = new Customer(username, password, status, total_miles, miles_ytd, address, phoneNumber, phoneNumberType); try { em.persist(customer); return customer; } catch (Exception e) { throw new RuntimeException(e); } }
From source file:uk.ac.ebi.intact.editor.services.curate.feature.FeatureEditorService.java
@Transactional(value = "jamiTransactionManager", readOnly = true, propagation = Propagation.REQUIRED) public int countAnnotations(AbstractIntactFeature feature) { return getIntactDao().getFeatureDao(feature.getClass()).countAnnotationsForFeature(feature.getAc()); }
From source file:uk.ac.ebi.intact.editor.services.dashboard.DashboardQueryService.java
@Transactional(value = "jamiTransactionManager", readOnly = true, propagation = Propagation.REQUIRED) public LazyDataModel<PublicationSummary> loadAllPublications(String additionalSql) { return LazyDataModelFactory.createLazyDataModel(publicationSummaryService, "publicationSummaryService", "select distinct p from IntactPublication p left join fetch p.dbXrefs as x where " + "(p.shortLabel <> '14681455' and p.shortLabel <> 'unassigned638' " + "and p.shortLabel <> '24288376' and p.shortLabel <> '24214965') and ( " + additionalSql + " )", "select count(distinct p.ac) from IntactPublication p where " + "(p.shortLabel <> '14681455' and p.shortLabel <> 'unassigned638' " + "and p.shortLabel <> '24288376' and p.shortLabel <> '24214965') and ( " + additionalSql + " )", "p", "updated", false); }
From source file:cs544.wamp_blog_engine.service.impl.SettingsService.java
@Transactional(propagation = Propagation.REQUIRED) @Override public void modifyTag(Tag tag) { tagDAO.updateTag(tag); }