Hi, I need to create a job that load list of users from database, than load a list of operations for each users from the same database, generate a list of reports for each user based on the operations, and save the operations on another database. (A ETL job).
Here's my idea:
- A composite ItemReader<User>: with a ItemReader<User> that load the users from the database, and another (ItemReader<Operation>) that load and set the operations for each user;Code:public class User { private int id; private List<Operation> operations; private List<Report> reports; }
- A ItemProcessor<User, User> that process the operations for the user and set the reports.
- A composite ItemWriter<User>: with a ItemWriter<Report> that save the reports on another database.
It is a good designer for user Spring Batch?
I don't found examples that implements a composite ItemReader like this.
Thanks for any help,
Leandro Borges


Reply With Quote