0

Paging - Sorting - Hibernate / Help WrapperClass

asked 2009-04-27 11:38:10 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2009-04-27 18:47:28 +0800

Hi all,

i'm wondering that i don't found threads about paging and sorting in huge tables
with a hibernate backend.

Since a few days i have headache about thinking how is the best way to extend
ListModel with paging and sorting in an elegant generic Wrapper Class that it
supports ALL ways that a hibernate backend can offers the selects.

1. HQL syntax
2. Criteria (Detached criteria)
3. QBE Query by example
4. SQL syntax

It seems (by testing the zeta form builder) that pure zkoss supports only sql syntax).

I have updated to 3.6.1. So there is newly a FieldComparator. It eliminates my
hand coded comparator classes for each listbox. Great.

But the problem is the same.
To avoid users confusing and do a comprehensibly order. Sorting in a paged table must
be done by every query call in the 'order by' clause and not later in the result list.

Additionally often we have a few similar search methods for the resultlist like
search for name, city, id. So we need a mechanism to store
the hql,sql,criteria or QBE for manipulating it by sorting.

So i'm interessted if others have found an elegant way to stick all together:
paging and sorting on different ways hibernate can make a search.

I don't know if i must rewrite my DAO methods and overhanded a special helperClass with
wrapped my Criteria or HQL or QBE that i used.

Any ideas, experiences and code are welcome
Stephan

PS: Somenoe knows this library http://code.google.com/p/hibernate-generic-dao/ ?
On first look it has a nice filter class.

delete flag offensive retag edit
Be the first one to reply this discussion!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-04-27 11:38:10 +0800

Seen: 380 times

Last updated: Apr 27 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More