Feb 15th, 2011, 12:44 PM
Multiple Query Results in a single DTO
Hi all. I am still relatively new to Spring and many of it's finer features especially a lot of its helpful tricks. I've come across a situation where I could really use some input/help and hopefully I have chosen the correction location on the forums to post this.
For reference, I am using Spring 2.5.6
I am working on a spring batch project (this question as little to do with the batch aspect of it, I think) in which the first step needs to gather all the data I require. The problem is, the 11i database is very large and the query right now is going to be broken up into multiple parts. My reader is using the ibatisPagingItemReader to return the first major section of each data set and generating DTO's from them.
My problem is how to get the rest of the fields for each set of data into the pre-existing DTO. Taking some other users advice I hope to do the 2 additional queries in the itemProcessor part of that same step.
But with all that said, my issue boils down to I am not sure how to go about doing this in an efficient manor. I'm not aware of any useful spring calls that will help facilitate this (Basically that I have existing DTO's and would like to have the 2 additional queries put their results directly into the proper spots in the DTO's). Is there some way I can do this without having to take in Maps as a result of the queries and pull each field from it and assign each to it's place in the DTO?
Feb 17th, 2011, 08:24 AM
*bump for answer or feedback*