List of usage examples for org.springframework.transaction.annotation Propagation SUPPORTS
Propagation SUPPORTS
To view the source code for org.springframework.transaction.annotation Propagation SUPPORTS.
Click Source Link
From source file:org.horizontaldb.example.model.dao.PersonDaoImpl.java
@Override @SuppressWarnings("unchecked") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public Collection<Person> getAllPersons() { Query query = getQueryBuilder().query("from Person").build(); List<Person> retval = query.list(); return retval; }
From source file:com.brienwheeler.lib.db.TransactionWrapper.java
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS) public <T> T doInReadTransaction(Callable<T> callable) { try {/* www. j a va 2 s . co m*/ return callable.call(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
From source file:com.inkubator.sms.gateway.service.impl.TaskDefinitionServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30) public TaskDefinition getEntiyByPK(Long id) throws Exception { TaskDefinition definition = taskDefinitionDao.getByFullText(id); definition.getModemDefinition().getManufacture(); return definition; }
From source file:com.oak_yoga_studio.dao.impl.CourseDAOImpl.java
@Transactional(propagation = Propagation.SUPPORTS) @Override/*from w w w.j a va2 s.c om*/ public List<Course> getAllCourses() { List<Course> courses; Query query = sf.getCurrentSession().createQuery("from Course"); courses = query.list(); return courses; }
From source file:de.crowdcode.bitemporal.example.PersonServiceImpl.java
@Override @Transactional(propagation = Propagation.SUPPORTS) public Person findPersonByLastname(String lastname) { Person person = personRepository.findByLastname(lastname); return person; }
From source file:com.oak_yoga_studio.dao.impl.EnrollmentDAOImpl.java
@Transactional(propagation = Propagation.SUPPORTS) @Override/*from w ww .j a v a2s . c o m*/ public List<Enrollment> getEnrollmentsByCustomer(Customer customer) { List<Enrollment> enrollments; Query query = sf.getCurrentSession() .createQuery("select distinct e from Enrollment e where e.customer=:customer"); query.setParameter("customer", customer); enrollments = query.list(); return enrollments; }
From source file:com.inkubator.hrm.service.impl.LoanTypeServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 30) public Long getTotalLoanTypeByParam(LoanTypeSearchParameter parameter) { return loanTypeDao.getTotalLoanTypeByParam(parameter); }
From source file:com.brienwheeler.svc.users.impl.UserRoleDao.java
@Override @Transactional(readOnly = true, propagation = Propagation.SUPPORTS) @SuppressWarnings("unchecked") public List<String> findByUserAsStrings(User user) { Query query = entityManager.createQuery("select role from UserRole where user = :user"); query.setParameter("user", user); return (List<String>) query.getResultList(); }
From source file:com.inkubator.hrm.service.impl.OhsaIncidentDocumentServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 30) public OhsaIncidentDocument getEntiyByPK(Integer intgr) throws Exception { return this.ohsaIncidentDocumentDao.getEntiyByPK(intgr); }
From source file:com.inkubator.hrm.service.impl.SchedulerConfigServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30) public SchedulerConfig getEntiyByPK(Long id) throws Exception { return this.schedulerConfigDao.getEntiyByPK(id); }