logo       


RE: Question about paginated list.: msg#00314

Subject: RE: Question about paginated list.
Which DB are you using? For example, in Oracle something like this works:
 
select *
  from ( select a.*, rownum rnum
           from ( YOUR_QUERY_GOES_HERE -- including the order by ) a
          where rownum <= MAX_ROWNUM )
 where rnum >= MIN_ROWNUM
 
The nice thing about this technique is you can page just about anything with 
it. Similar stuff in DB2.
 
Given this approach, I'd love to hear how people have modularized this using 
iBatis to support "page mode" for any query. Hadn't thought about that much.
 
Cheers,
 
Steve 

________________________________

From: anton [mailto:antonkurniadi@xxxxxxxxxxxxxxx]
Sent: Thu 2005-09-29 7:27 PM
To: user-java@xxxxxxxxxxxxxxxxx
Subject: Question about paginated list.



Hi,

Recently im working with paging feature in my web application, and I need to 
get a ranged results from a query, lets say that my query will get 10.000 
records but I want to get only 10 records from it,(eg starting from record 
9.980 until record 9.990), I already know iBATIS paginated list but it doesn't 
solve my problem since the queryForPaginatedList() method retrieve all the 
10.000 records. Does anyone here know how can I achieve that (Hibernate already 
come with the Query.setFirstResult() and Query.setMaxResult() method to solve 
this)? Thank You.

 

 

<<winmail.dat>>

Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe