public String apply() {
    if (logger.isDebugEnabled()) {
      logger.debug("apply()");
    }

    System.out.println("selectAll " + selectAll);
    System.out.println("selectBetween " + selectBetween);
    System.out.println("startDate " + startDate);
    System.out.println("endDate " + endDate);
    System.out.println("interval " + interval);
    System.out.println("intervalUnit " + intervalUnit);

    Job job = new Job();
    job.setName(Job.BIReport);
    job.setStartTime(startDate);
    job.setInterval(interval);
    job.setIntervalUnit(intervalUnit);
    SchedulerDB schedulerDB = new SchedulerDB();
    schedulerDB.updateJob(job);

    OracleSchedulerDB oracleSchedulerDB = new OracleSchedulerDB();
    oracleSchedulerDB.updateBIReportJob(job);

    return "success";
  }
 public void refresh() {
   if (logger.isDebugEnabled()) {
     logger.debug("refresh()");
   }
   OracleSchedulerDB oracleScheduleDB = new OracleSchedulerDB();
   oracleJobList = oracleScheduleDB.getBIReportJob();
 }
  public String enableJob() {
    if (logger.isDebugEnabled()) {
      logger.debug("enableJob()");
    }

    OracleSchedulerDB oracleSchedulerDB = new OracleSchedulerDB();
    oracleSchedulerDB.enableBIReportJob();
    return "success";
  }
  private void init() {

    if (logger.isDebugEnabled()) {
      logger.debug("init()");
    }

    targetObjectSelectList = new ArrayList<String>();
    targetObjectList = new ArrayList<SelectItem>();

    //   MetaInfoFactory metaInfoFactory = new TransMetaInfoFactory();

    //  for (String name : metaInfoFactory.getPartnerObjectNameList()) {
    // SelectItem item = new SelectItem(name, name);
    SelectItem item = new SelectItem("name", "value");
    targetObjectList.add(item);
    // }

    SelectItem itemT = new SelectItem("Participant", "Participant");
    targetObjectList.add(itemT);
    itemT = new SelectItem("Position Hierarchy", "Position Hierarchy");
    targetObjectList.add(itemT);

    //  for (String name : metaInfoFactory.getPartnerObjectNameList()) {
    //  targetObjectSelectList.add(name);
    targetObjectSelectList.add("nameTargetObjectSelect");
    // }

    selectAll = true;

    SchedulerDB schedulerDB = new SchedulerDB();
    Job job = schedulerDB.getJob(Job.BIReport);

    startDate = job.getStartTime();
    interval = job.getInterval();
    intervalUnit = job.getIntervalUnit();
    intervalUnitList = new ArrayList<SelectItem>();
    intervalUnitList.add(new SelectItem("Minutely", "Minutely"));
    intervalUnitList.add(new SelectItem("Hourly", "Hourly"));
    intervalUnitList.add(new SelectItem("Daily", "Daily"));
    intervalUnitList.add(new SelectItem("Weekly", "Weekly"));
    intervalUnitList.add(new SelectItem("Monthly", "Monthly"));

    OracleSchedulerDB oracleScheduleDB = new OracleSchedulerDB();
    oracleJobList = oracleScheduleDB.getBIReportJob();

    ConfigDB configDB = new ConfigDB();
    ConfigVO configVO = configDB.getConfigVO();

    configURL = configVO.getNameValueList().get("configURL");
    configUserName = configVO.getNameValueList().get("configUserName");
    configPassword = configVO.getNameValueList().get("configPassword");

    //  oracleJobList = new ArrayList<OracleJob>();

  }
  public String runNow() {
    if (logger.isDebugEnabled()) {
      logger.debug("runNow()");
    }
    System.out.println("run is called**************** ");
    System.out.println("selectAll " + selectAll);
    System.out.println("selectBetween " + selectBetween);
    System.out.println("startDate " + startDate);
    System.out.println("endDate " + endDate);

    OracleSchedulerDB oracleSchedulerDB = new OracleSchedulerDB();
    oracleSchedulerDB.runBIReportJob();
    return "success";
  }