db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: Finding position of previous selected record in new ordering
Date Fri, 16 Mar 2007 13:35:08 GMT
You can use Criteria.setOffset to define the start point and
to define the number of records to return.  This gets translated into
appropriate DB server specific select.  But test and verify that it work

with your specific DB since there were issues with various DB prior to
3.3 (but I think they have been worked out now).
Also, you might look at the LargeSelect utility class.  This does the 
same thing but also has some performance/ease of use enhancements 
like caching serveral pages, being able to select by page, supplying 
page counts and the like.


	From: Tobias Hilka [mailto:thilka@vps.de] 
	Sent: Friday, March 16, 2007 4:40 AM
	To: Apache Torque Developers List
	Subject: Finding position of previous selected record in new
	Hello everyone,
	we are facing the following problem:
	We have a grid with many entries (up to several 100 000
entries). For performance reasons we only select the window which is
visible for the user (about 50 entries). The rest of the grid is
initialized with null-Items. So far so good.
	But now our problem: If we do order the grid by firstname
ascending and select the fith entry, then we order the by the same
column descending, we want the selection to persist and therefore we
want the selection window to contain the selected entry in its new
environment (e.g. position 99 950 to 100 000 and select record number 99
	Is there any possibility to express this in torque? We know
about some special features of some databases which can handle this. And
I think there are features in SQL 2003 for this.
	Thank you for your help.

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication
or may otherwise be privileged or confidential and are intended solely for the individual
or entity to whom they are addressed.  If you are not the intended recipient you may not rely
on the contents of this email or any attachments, and we ask that you  please not read, copy
or retransmit this communication, but reply to the sender and destroy the email, its contents,
and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying
of this communication is strictly prohibited.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message