My friend/ex co-worker actually created a pretty handy table wrapper around
hibernate. It handles all the criteria junk for you. I'm not sure, but I
think I dumped it all into http://honeycomb.javaforge.com. It's been a very
long time since I looked at the project so I don't know if it's still in
there.


On 3/29/06, Leonardo Quijano Vincenzi <[EMAIL PROTECTED]> wrote:
>
> Well, declare your page as implementor for IBasicTableModel and
> implement the methods. Hibernate handles paging by using
> setFirstResult() and setMaxResults() in the Query or Criteria class.
> Sorting can be handled by HQL or using the Criteria.setOrder() method.
>
> http://blogs.warwick.ac.uk/kieranshaw/entry/hibernate_built_in/
>
> |Query query = sess.createQuery(queryStr);
> query.setMaxResults(10);
> query.setFirstResult(20);
> return query.list();
>
> So it's fairly straightforward ;). There are some gotchas, as I said,
> but those apply whether you use IBasicTableModel or the source parameter.
> |
>
> --
> Ing. Leonardo Quijano Vincenzi
> DTQ Software
>
> ||
> Matt Raible wrote:
> > On 3/29/06, Leonardo Quijano Vincenzi <[EMAIL PROTECTED]> wrote:
> >
> >> contrib:Table also handles sort, sort links and pagination.
> >>
> >> For anyone interested, please do not use the "source" parameter with a
> >> 50000 element list when loading the table, just because you couldn't
> >> find the way to use IBasicTableModel to handle pagination and sorting:
> >> It's a performance killer, and it's *so* easy to do it right...!!
> >>
> >
> > Do you have a good example of using IBasicTableModel with Hibernate -
> > or (even better) Spring + Hibernate?
> >
> > Thanks,
> >
> > Matt
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.  http://opennotion.com

Reply via email to