General J2EE: Is there any efficient way to handle multi-table query on view?

  1. The question is when I do a query with Hibernate HQL for multiple tables(Objects) such as "from Obj1, Obj2.name where xxx", the result set is a list of object array. How to display them on view(jsp with struts)? Actually, I only need to display properties form Obj1 and some from Obj2.Is there any efficient way to handle these from Tag(such as nested:iterate). Any suggestion is welcome.
  2. Make one query per entity type. Don't worry about performance. You should have multiple caches working for you.
  3. You can also use a map query or a DTO.
  4. You can create a simple immutable object mapped to properties needed. I have a table that stores over 13000 PDF files with data attached. Select * takes a while, when I exclude binary fields performance is 100 times better. I have a Main object and a Lite version for display properties. Hope this helps Roman