Menu

Lazy Load False for List

Help
2004-09-27
2013-03-07
  • Henry Tafolla

    Henry Tafolla - 2004-09-27

    Is it possible to specify that you want a List to return with the object already loaded?  I would like to fully populate a list within the buisness tier for a select list used in the presentation tier.  I do not want the presentation tier to know about dealing with database connections.  The work around for now would be the following in the Business tier.

    UserInformationIterator i = userInformationList.iterator();

    while(i.hasNext()) {
     
      UserInformationEntity userInformationEntity = i.next();
      //Work around to populate the Entity in the Business tier
      userInformationEntity.getFirstName();
    }

     
    • Michael Rettig

      Michael Rettig - 2004-10-05

      calling any method on the list will force resolutions. I typically call size(). There is no need to iterate over each entry and force resolution. The list will be resolved all at once.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.