Source:
public List<JobBasicInfo> getScheduledJobsBasicInfo(JobsSearchSettings jobsSearchSettings) throws MotechSchedulerJobRetrievalException { List<JobBasicInfo> jobBasicInfos = new LinkedList<>(); String query = buildJobsBasicInfoSqlQuery(jobsSearchSettings); if (jobsSearchSettings.areFiltersEmpty()) { query = buildJobsAllSqlQuery(); } else if (!isNotBlank(jobsSearchSettings.getActivity()) || !isNotBlank(jobsSearchSettings.getStatus())) { return jobBasicInfos; } LOGGER.debug("Executing {}", query); List<String> columnNames = new LinkedList<>(); columnNames.add(TRIGGER_NAME); columnNames.add(TRIGGER_GROUP); columnNames.add(JOB_DATA); List<List<Object>> objects; try { objects = executeQuery(query, columnNames); for (List<Object> row : objects) { JobKey jobKey = new JobKey(row.get(0).toString(), row.get(1).toString()); Trigger trigger = scheduler.getTriggersOfJob(jobKey).get(0); String jobName = jobKey.getName(); String jobGroup = jobKey.getGroup(); String jobType = getJobType(jobKey); String activity = getJobActivity(trigger); String info = getJobInfo(trigger, jobType); String status = getJobStatus(trigger.getKey()); String startDate = getStartDate(trigger); String nextFireDate = ""; if (trigger.getNextFireTime() != null) { nextFireDate = DateTimeFormat.forPattern(DATE_FORMAT_PATTERN).print(trigger.getNextFireTime().getTime()); } String endDate = getEndDate(trigger, jobType); boolean uiDefined = getUiDefined((byte[]) row.get(2)); jobBasicInfos.add(new JobBasicInfo( activity, status, jobName, jobGroup, startDate, nextFireDate, endDate, jobType, info, uiDefined )); } return jobBasicInfos; } catch (SQLException | SchedulerException | ClassNotFoundException | IOException e) { throw new MotechSchedulerJobRetrievalException("Retrieval of scheduled jobs failed.", e); } }

Target:
public List<JobBasicInfo> getScheduledJobsBasicInfo(JobsSearchSettings jobsSearchSettings) throws MotechSchedulerJobRetrievalException { List<JobBasicInfo> jobBasicInfos = new LinkedList<>(); String query = getQuery(jobsSearchSettings); if(query == null) { return jobBasicInfos; } LOGGER.debug("Executing {}", query); List<String> columnNames = new LinkedList<>(); columnNames.add(TRIGGER_NAME); columnNames.add(TRIGGER_GROUP); columnNames.add(JOB_DATA); List<List<Object>> objects; try { objects = executeQuery(query, columnNames); for (List<Object> row : objects) { JobKey jobKey = new JobKey(row.get(0).toString(), row.get(1).toString()); Trigger trigger = scheduler.getTriggersOfJob(jobKey).get(0); String jobName = jobKey.getName(); String jobGroup = jobKey.getGroup(); String jobType = getJobType(jobKey); String activity = getJobActivity(trigger); String info = getJobInfo(trigger, jobType); String status = getJobStatus(trigger.getKey()); String startDate = getStartDate(trigger); String nextFireDate = ""; if (trigger.getNextFireTime() != null) { nextFireDate = DateTimeFormat.forPattern(DATE_FORMAT_PATTERN).print(trigger.getNextFireTime().getTime()); } String endDate = getEndDate(trigger, jobType); boolean uiDefined = getUiDefined((byte[]) row.get(2)); jobBasicInfos.add(new JobBasicInfo( activity, status, jobName, jobGroup, startDate, nextFireDate, endDate, jobType, info, uiDefined )); } return jobBasicInfos; } catch (SQLException | SchedulerException | ClassNotFoundException | IOException e) { throw new MotechSchedulerJobRetrievalException("Retrieval of scheduled jobs failed.", e); } }