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:net.longfalcon.newsj.Config.java
@Transactional(propagation = Propagation.SUPPORTS, isolation = Isolation.READ_COMMITTED) public void init() { properties = new Properties(); for (Resource resource : propertyLocations) { try {/*from w w w. jav a 2 s . com*/ properties.load(resource.getInputStream()); } catch (IOException e) { _log.error("Unable to read from resource " + resource.getFilename()); } } defaultSite = siteDAO.getDefaultSite(); }
From source file:com.inkubator.hrm.service.impl.HrmRoleServiceImpl.java
@Override @Transactional(readOnly = true, propagation = Propagation.SUPPORTS, isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class) public HrmRole getEntiyByPK(Long id) throws Exception { return this.hrmRoleDao.getEntiyByPK(id); }
From source file:org.horizontaldb.example.model.dao.DepartmentDaoImpl.java
@Override @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public Department getDepartmentById(Long id) { return (Department) getSession().get(Department.class, id); }
From source file:com.auditbucket.engine.service.TrackEventService.java
/** * associates the change with the event name for the company. Creates if it does not exist * * @param eventCode - descriptive name of the event - duplicates for a company will not be created * @return created ChangeEvent//w w w .j ava2s .c o m */ @Transactional(propagation = Propagation.SUPPORTS) public ChangeEvent processEvent(String eventCode) { Company company = securityHelper.getCompany(); return processEvent(company, eventCode); }
From source file:com.brienwheeler.svc.ledger.impl.LedgerEntryDao.java
@Override @Transactional(readOnly = true, propagation = Propagation.SUPPORTS) @SuppressWarnings("unchecked") public List<LedgerEntry> getLedger(long userId) { Query query = entityManager.createQuery("from LedgerEntry where user_id = :userId order by timestamp"); query.setParameter("userId", userId); return (List<LedgerEntry>) query.getResultList(); }
From source file:com.devicehive.service.DeviceEquipmentService.java
/** * find Device equipment by device/* ww w . j a va 2 s. c om*/ * * @param device Equipment will be fetched for this device * @return List of DeviceEquipment for specified device */ @Transactional(propagation = Propagation.SUPPORTS) public List<DeviceEquipmentVO> findByFK(@NotNull DeviceVO device) { return deviceEquipmentDao.getByDevice(device); }
From source file:com.inkubator.hrm.service.impl.LoanTypeServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 50) public List<LoanType> getByParam(LoanTypeSearchParameter parameter, int firstResult, int maxResults, Order orderable) {//ww w. j a v a 2 s . c om return loanTypeDao.getByParam(parameter, firstResult, maxResults, orderable); }
From source file:org.brekka.phalanx.core.services.impl.SymmetricCryptoServiceImpl.java
@Override @Transactional(propagation = Propagation.SUPPORTS) public <T> T decrypt(SymedCryptoData cryptoData, SecretKeyToken secretKeyToken, Class<T> expectedType) { CryptoProfile profile = cryptoProfileService.retrieveProfile(cryptoData.getProfile()); InternalSecretKeyToken internalSecretKeyToken = verify(secretKeyToken); byte[] data;/*from w w w . j a v a 2 s . c o m*/ try { DefaultSymmetricCryptoSpec spec = new DefaultSymmetricCryptoSpec(internalSecretKeyToken.getSecretKey(), cryptoData.getIv()); data = phoenixSymmetric.decrypt(cryptoData.getData(), spec); } catch (PhoenixException e) { throw new PhalanxException(PhalanxErrorCode.CP106, e, "Failed to decrypt CryptoData with id '%s'", cryptoData.getId()); } return toType(data, expectedType, cryptoData.getId(), profile); }
From source file:com.brienwheeler.svc.users.impl.UserRoleDao.java
@Override @Transactional(readOnly = true, propagation = Propagation.SUPPORTS) @SuppressWarnings("unchecked") public List<UserRole> findByUser(User user) { Query query = entityManager.createQuery("from UserRole where user = :user"); query.setParameter("user", user); return (List<UserRole>) query.getResultList(); }
From source file:com.oak_yoga_studio.dao.impl.CourseDAOImpl.java
@Transactional(propagation = Propagation.SUPPORTS) @Override//w w w . j a va 2s. c o m public List<Course> getAllActiveCourses() { List<Course> courses; Query query = sf.getCurrentSession().createQuery("from Course c Where c.active=true"); courses = query.list(); return courses; }