Examples of toJobParameters()


Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

  @Test
  public void testRestart() throws Exception {
    JobParametersBuilder paramBuilder = new JobParametersBuilder();
    paramBuilder.addDate("value", new Date());
    JobExecution jobExecution = jobRepository.createJobExecution(job.getName(), paramBuilder.toJobParameters());

    job.execute(jobExecution);

    jobExecution = jobRepository.createJobExecution(job.getName(), paramBuilder.toJobParameters());
    job.execute(jobExecution);
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

    paramBuilder.addDate("value", new Date());
    JobExecution jobExecution = jobRepository.createJobExecution(job.getName(), paramBuilder.toJobParameters());

    job.execute(jobExecution);

    jobExecution = jobRepository.createJobExecution(job.getName(), paramBuilder.toJobParameters());
    job.execute(jobExecution);

    int count = jobRepository.getStepExecutionCount(jobExecution.getJobInstance(), "simpleJob.step1");
    assertEquals(2, count);
  }
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

      else {
        log.debug("JobDataMap contains values which are not job parameters (ignoring).");
      }
    }

    return builder.toJobParameters();

  }

}
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

      if (!IS_RESTART_JOB_PARAMETER_KEY.equalsIgnoreCase(entry.getKey())) {
        jobParametersBuilder.addParameter(entry.getKey(), entry.getValue());
      }
    }

    return jobParametersBuilder.toJobParameters();
  }
}
View Full Code Here

Examples of org.springframework.batch.core.JobParametersBuilder.toJobParameters()

    @Transformer
    public JobLaunchRequest toRequest(Message<File> message) {
        JobParametersBuilder jobParametersBuilder = new JobParametersBuilder();
        jobParametersBuilder.addString(fileParameterName, message.getPayload().getAbsolutePath());
        return new JobLaunchRequest(job, jobParametersBuilder.toJobParameters());
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.