I have a scenario where i have to show a screen which has multiple data fetched from different tables using complex joins etc.,
There will be only one service call from ui to fetch those in JSON format.
Following are the approaches that came to my mind
1) Execute Multiple queries from service layer and populate Object and send the JSON object back.
2) Create a temp table, populate the data required as when the original data is updated.And query the temp table when the above screen is displayed.
For me both are the approaches are not convincing.I don't want multiple db calls from service layer or create temp table for this purpose. Rather iam thinking to have one Stored PRocedure which will execute mutiple queries within and return Custom structure which can be mapped to Java Object which in turn will be returned to UI Layer.
IS this POssible?
Any Suggestions?
Thanks.
Regards
Senthil Kumar Sekar