List of usage examples for org.springframework.transaction.annotation Isolation REPEATABLE_READ
Isolation REPEATABLE_READ
To view the source code for org.springframework.transaction.annotation Isolation REPEATABLE_READ.
Click Source Link
From source file:com.inkubator.hrm.service.impl.BioDataServiceImpl.java
@Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 50) @Override//from w ww . ja v a 2 s . co m public List<BioData> getByName(String name) throws Exception { return this.bioDataDao.getByName(name); }
From source file:com.inkubator.hrm.service.impl.BioDataServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 50) public StreamedContent generateCV(long id) throws Exception { /*GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.setDateFormat("dd MMMM yyyy"); gsonBuilder.registerTypeAdapterFactory(HibernateProxyTypeAdapter.FACTORY); gsonBuilder.setExclusionStrategies(new EntityExclusionStrategy()); Gson gson = gsonBuilder.create();/* w w w. j a v a2 s. c o m*/ JsonParser parser = new JsonParser(); JsonObject json = new JsonObject(); BioData bioData = bioDataDao.getEntiyByPK(id); boolean isBioDataExist = bioData != null; json.addProperty("isBioDataExist", isBioDataExist); if(isBioDataExist){ json.add("bioData", parser.parse(gson.toJson(bioData))); }*/ BioData bioData = bioDataDao.getEntiyByPK(id); List<BioDocument> bioDocuments = bioDocumentDao.getAllDataByBioDataId(id); List<String> attachments = new ArrayList<String>(); for (BioDocument document : bioDocuments) { if (StringUtils.isNotEmpty(document.getUploadPath())) { attachments.add(document.getUploadPath()); } } Map<String, Object> params = new HashMap<>(); params.put("BIODATA_ID", id); params.put("IS_RENDER_ADDRESS", !bioData.getBioAddresses().isEmpty()); params.put("IS_RENDER_EDU_HISTORY", !bioData.getEducationHistories().isEmpty()); params.put("IS_RENDER_ID_CARD", !bioData.getBioIdCards().isEmpty()); params.put("IS_RENDER_EMP_HISTORY", !bioData.getBioEmploymentHistories().isEmpty()); params.put("SUBREPORT_DIR", FacesContext.getCurrentInstance().getExternalContext().getRealPath("/resources/reports/")); StreamedContent file = CommonReportUtil.exportReportToPDFStreamWithAttachment("cv_builder.jasper", params, bioData.getFirstName() + ".pdf", attachments); return file; }
From source file:com.inkubator.hrm.service.impl.LoanNewApplicationServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 50) public List<EmpData> getListApproverByListAppDefintion(List<ApprovalDefinition> listAppDef, Long empDataId) throws Exception { HrmUser requester = hrmUserDao.getByEmpDataId(empDataId); return super.getListApproverByListAppDef(listAppDef, requester.getUserId()); }
From source file:com.inkubator.hrm.service.impl.LoanNewApplicationServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 30) public Long getCurrentMaxId() throws Exception { return this.loanNewApplicationDao.getCurrentMaxId(); }
From source file:com.inkubator.hrm.service.impl.EmpCareerHistoryServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 50) public List<CareerTransitionInboxViewModel> getEntityEmpCareerHistoryInboxByParam( CareerTransitionInboxSearchParameter searchParameter, int firstResult, int maxResults, Order order) throws Exception { Gson gson = JsonUtil.getHibernateEntityGsonBuilder().create(); List<CareerTransitionInboxViewModel> listModel = empCareerHistoryDao .getEntityEmpCareerHistoryInboxByParam(searchParameter, firstResult, maxResults, order); for (CareerTransitionInboxViewModel careerTransitionInbox : listModel) { EmpCareerHistoryModel model = this.convertJsonToModel(careerTransitionInbox.getJsonData()); Jabatan jabatan = jabatanDao.getEntiyByPK(model.getJabatanId()); EmployeeType employeeType = employeeTypeDao.getEntiyByPK(model.getEmployeeTypeId()); GolonganJabatan golJab = golonganJabatanDao.getEntiyByPK(model.getGolonganJabatanId()); CareerTransition careerTransition = careerTransitionDao.getEntiyByPK(model.getCareerTransitionId()); careerTransitionInbox.setJabatanName(jabatan.getName()); careerTransitionInbox.setGolonganJabatanName(golJab.getCode()); careerTransitionInbox.setEmployeeTypeName(employeeType.getName()); careerTransitionInbox.setTransitionRole(careerTransition.getTransitionRole()); careerTransitionInbox.setNotes(model.getNotes()); }//from ww w . ja va 2 s. c o m return listModel; }
From source file:com.inkubator.hrm.service.impl.TempAttendanceRealizationServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 50) public List<TempAttendanceRealizationViewModel> getListTempAttendanceRealizationViewModelByWtPeriodId( WtAttendanceCalculationSearchParameter searchParameter, Long wtPeriodId, int firstResult, int maxResults, Order orderable) throws Exception { return tempAttendanceRealizationDao.getListTempAttendanceRealizationViewModelByWtPeriodId(searchParameter, wtPeriodId, firstResult, maxResults, orderable); }
From source file:com.inkubator.hrm.service.impl.TempAttendanceRealizationServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 30) public Long getTotalListTempAttendanceRealizationViewModelByWtPeriodId( WtAttendanceCalculationSearchParameter searchParameter, Long wtPeriodId) throws Exception { return tempAttendanceRealizationDao .getTotalListTempAttendanceRealizationViewModelByWtPeriodId(searchParameter, wtPeriodId); }
From source file:com.inkubator.hrm.service.impl.EmpCareerHistoryServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 30) public Long getTotalgetEntityEmpCareerHistoryInboxByParam(CareerTransitionInboxSearchParameter searchParameter) throws Exception { return empCareerHistoryDao.getTotalgetEntityEmpCareerHistoryInboxByParam(searchParameter); }
From source file:com.inkubator.hrm.service.impl.EmpCareerHistoryServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 50) public List<EmpEliminationViewModel> getListEmpEliminationViewModelByParam( EmpEliminationSearchParameter searchParameter, int firstResult, int maxResults, Order order) throws Exception { ResourceBundle resourceBundle = ResourceBundle.getBundle("Messages", new Locale(FacesUtil.getSessionAttribute(HRMConstant.BAHASA_ACTIVE).toString())); List<EmpEliminationViewModel> listEmpEliminationViewModel = empCareerHistoryDao .getListEmpEliminationViewModelByParam(searchParameter, firstResult, maxResults, order); for (EmpEliminationViewModel model : listEmpEliminationViewModel) { EmpData empData = empDataDao.getByEmpDataByBioDataId(model.getBioDataId().longValue()); model.setEmpName(empData.getBioData().getFullName()); model.setJoinDate(empData.getJoinDate()); model.setReason(getReasonByEmpCareerHistoryStatus(model.getEmpCareerHistoryStatus(), resourceBundle)); }// w ww .j av a 2 s.co m return listEmpEliminationViewModel; }
From source file:com.inkubator.hrm.service.impl.EmpCareerHistoryServiceImpl.java
@Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 30) public EmpCareerHistory getEntityByApprovalActivityNumber(String approvalActivityNumber) throws Exception { EmpCareerHistory empCareerHistory = empCareerHistoryDao .getEntityByApprovalActivityNumber(approvalActivityNumber); /*Jabatan jabatan = jabatanDao.getJabatanByIdWithDetail(empCareerHistory.getJabatan().getId()); empCareerHistory.setCompanyName(jabatan.getDepartment().getCompany().getName());*/ return empCareerHistory; }