Another question I have is how efficient is it to embed a POJO within a view as opposed to having a variable for each field within the POJO.
For example, if I am going through a loop of results | List<MyPojoView> myResultList = ...; | for (MyPojoView myPojo : myResultList) { | myPojo.getPojo.getSomeField(); | //etc..get a bunch of fields this way | } | am I executing a new query each time getPojo.getSomeField() is called? If myPojoView was set up so that the fields were directly in that class, then it would be | List<MyPojoView> myResultList = ...; | for (MyPojoView myPojo : myResultList) { | myPojo.getSomeField(); | //etc..get a bunch of fields this way | } | Which would not have any additional queries. So, I'd assume it would be more efficient to place all variables of MyPojo in the MyPojoView class instead of adding myPojo to MyPojoView. Any comments? I'm curious to see what others think View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3919824#3919824 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3919824 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user