1 public void deleteJobRow(Long jobId, Date effectiveDate) { 2 if (effectiveDate == null) { 3 throw new JboException("Effective Date cannot be null"); 4 } 5 if (effectiveDate.compareTo(DateUtils.convertTosqlDate(MIN_START_DATE)) <= 6 0 || 7 effectiveDate.compareTo(DateUtils.convertTosqlDate(MAX_END_DATE)) >= 8 0) { 9 throw new JboException("EffectiveDate cannot be before SOT and cannot be later than EOT"); 10 } 11 //getting the Job row effective as of the given effectiveDate 12 Row jobRow = getRowAsOfDate(jobId, effectiveDate); 13 if (jobRow != null) { 14 try { 15 //Set the required date-effective delete mode. Here I'm setting it to EFFDT_DELETE_THIS_CHANGE_MODE 16 jobRow.setEffectiveDateMode(Row.EFFDT_DELETE_THIS_CHANGE_MODE ); 17 jobRow.remove(); 18 } catch (Exception e) { 19 e.printStackTrace(); 20 } 21 this.getDBTransaction().commit(); 22 } 23 }