1 public void updateJobRow(Long jobId, Date effectiveDate, String jobName, 2 String status, Long minSal, Long maxSal, 3 String medCheckReq, Integer jobLevel) { 4 if (effectiveDate == null) { 5 throw new JboException("Effective Date cannot be null"); 6 } 7 if (effectiveDate.compareTo(DateUtils.convertTosqlDate(MIN_START_DATE)) <= 8 0 || 9 effectiveDate.compareTo(DateUtils.convertTosqlDate(MAX_END_DATE)) >= 10 0) { 11 throw new JboException("UpdateDate cannot be before SOT and cannot be later than EOT"); 12 } 13 //getting the Job row effective as of the given effectiveDate 14 Row jobRow = getRowAsOfDate(jobId, effectiveDate); 15 if (jobRow != null) { 16 try { 17 //Set the required date-effective mode. Here I'm setting it to EFFDT_UPDATE_CHANGE_INSERT_MODE 18 jobRow.setEffectiveDateMode(Row.EFFDT_UPDATE_CHANGE_INSERT_MODE); 19 //Setting the passed attributes to the updated row 20 if (jobName != null && !"".equals(jobName)) 21 jobRow.setAttribute("JobName", jobName); 22 if (status != null && !"".equals(status)) 23 jobRow.setAttribute("Status", status); 24 if (minSal != null && !"".equals(minSal)) 25 jobRow.setAttribute("MinSal", minSal); 26 if (maxSal != null && !"".equals(maxSal)) 27 jobRow.setAttribute("MaxSal", maxSal); 28 if (jobLevel != null && !"".equals(jobLevel)) 29 jobRow.setAttribute("JobLevel", jobLevel); 30 if (medCheckReq != null && !"".equals(medCheckReq)) 31 jobRow.setAttribute("MedCheckReq", medCheckReq); 32 } catch (Exception e) { 33 e.printStackTrace(); 34 } 35 this.getDBTransaction().commit(); 36 } 37 }