[JBoss-user] [EJB 3.0] - Re: How to create an POJO View made of other POJOs

2006-01-26 Thread Dornus
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

  |  ListMyPojoView 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

  |  ListMyPojoView 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=bbop=viewtopicp=3919824#3919824

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=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=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: How to create an POJO View made of other POJOs

2006-01-26 Thread dhartford
I'm also interested in this question from the 'Business Delegate' point of view.

i.e. Build an application that has 'Business Delegate' POJO's, but the 
application talks to diverse database schemas that may contain the same 
information.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3919838#3919838

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3919838


---
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=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user