-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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.
Asked: 2009-04-27 11:38:10 +0800
Seen: 380 times
Last updated: Apr 27 '09