spring-batch icon indicating copy to clipboard operation
spring-batch copied to clipboard

Make RowMapper implementations of batch domain objects public

Open fmbenhassine opened this issue 4 years ago • 1 comments
trafficstars

Currently, as of v4.3.3, RowMapper implementations of batch domain objects (JobInstance, JobExecution, StepExecution, and ExecutionContext) are private inner classes in their respective JDBC DAOs.

These mappers can be made public so they can be (re)used in custom DAOs implementations.

fmbenhassine avatar Jun 04 '21 14:06 fmbenhassine

Hi @benas, I am working on it. Please assign it to me.

Thank you.

parikshitdutta avatar Jun 09 '21 10:06 parikshitdutta

After deeper look, it turns out that some mappers (step/job execution mappers) are created dynamically based on method parameters, like: https://github.com/spring-projects/spring-batch/blob/2e8d5063f7a68e45f25cd9aaf3e5075a6f250c30/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcStepExecutionDao.java#L325

So even if one provides a custom implementation, it won't be possible to use it unless going one level above and customize the DAO itself.

fmbenhassine avatar Sep 07 '23 11:09 fmbenhassine