Skip to content

Commit a73fbc3

Browse files
cppwfsfmbenhassine
authored andcommitted
Add getters for DAOs in SimpleJobExplorer
Resolves #1598
1 parent 31955a0 commit a73fbc3

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/SimpleJobExplorer.java

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2022 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,6 +40,7 @@
4040
* @author Will Schipp
4141
* @author Mahmoud Ben Hassine
4242
* @author Parikshit Dutta
43+
* @author Glenn Renfro
4344
* @see JobExplorer
4445
* @see JobInstanceDao
4546
* @see JobExecutionDao
@@ -244,6 +245,38 @@ public long getJobInstanceCount(@Nullable String jobName) throws NoSuchJobExcept
244245
return jobInstanceDao.getJobInstanceCount(jobName);
245246
}
246247

248+
/**
249+
* @return instance of {@link JobInstanceDao}.
250+
* @since 5.1
251+
*/
252+
protected JobInstanceDao getJobInstanceDao() {
253+
return jobInstanceDao;
254+
}
255+
256+
/**
257+
* @return instance of {@link JobExecutionDao}.
258+
* @since 5.1
259+
*/
260+
protected JobExecutionDao getJobExecutionDao() {
261+
return jobExecutionDao;
262+
}
263+
264+
/**
265+
* @return instance of {@link StepExecutionDao}.
266+
* @since 5.1
267+
*/
268+
protected StepExecutionDao getStepExecutionDao() {
269+
return stepExecutionDao;
270+
}
271+
272+
/**
273+
* @return instance of {@link ExecutionContextDao}.
274+
* @since 5.1
275+
*/
276+
protected ExecutionContextDao getEcDao() {
277+
return ecDao;
278+
}
279+
247280
/*
248281
* Find all dependencies for a JobExecution, including JobInstance (which requires
249282
* JobParameters) plus StepExecutions

0 commit comments

Comments
 (0)