-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Iterator Design Pattern: Large Graphs & Best Practices.
PostPosted: Fri Apr 02, 2004 11:17 am 
Regular
Regular

Joined: Mon Sep 29, 2003 9:39 am
Posts: 67
Hello,

My app contains a root object that contains a set of 12 to 40,000 items (avg 1070). These items contain 3 small sets of 2 to 10 objects a piece. The user can navigate through the various lists, and display the results.

A small set of rules can be applied to this large set of items, via a visitor pattern of sorts. "Does new weight conform to standard zyz", for example.

Some aggregate functions are applied to the set as well, such as "return the combined weight of items with suppler z"

My question is, "What is the best practice for handling large items that seem to negate lazy-loading do to visitation or aggregation".

Pre-hiberate I'd implement a set of smart Iterators that handle lazy-loading, filtering, paging etc, and push the aggregate functions into stored procs. Since I've been using hibernate, everything seems to have become a list.
I assumed if the collections become an issue, I could always use the HQL aggregate functions, but it hasn't come to that. I generally use a singleton persister object that encapsulates the hibernate away from the architecture, so I try to avoid HQL anywhere else.

How do you treat collections which have custom iterators?

Thanks,

[hibernate 2.1.2 jvm 1.4.2/1.5 hsql/ms sqlsvr2k]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.