public CallableQuery(PlannedJob plannedJob, JobDao dao,
Reporting reporting, String hostname,
MailInfo mailInfo, Session session,
SupportedDriver driver, String reportRootPath,
int attemptNumber) {
this.plannedJob = plannedJob;
this.dao = dao;
this.reporting = reporting;
this.hostname = hostname;
this.mailInfo = mailInfo;
this.session = session;
this.driver = driver;
this.reportRootPath = reportRootPath;
this.attemptNumber = attemptNumber;
setReplacedCode();
if (plannedJob.getJobSpec().getResultQuery() != null) {
this.replacedReportQuery =
QueryReplaceUtil.replaceDateValues(
plannedJob.getJobSpec().getResultQuery(),
plannedJob.getReplaceTime());
} else {
this.replacedReportQuery = null;
}
this.parts = cleanupQuery(replacedCode.split(QUERY_SPLITTER));
}