Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 44473 invoked from network); 7 Mar 2007 22:11:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Mar 2007 22:11:45 -0000 Received: (qmail 8318 invoked by uid 500); 7 Mar 2007 22:11:53 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 8295 invoked by uid 500); 7 Mar 2007 22:11:53 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 8283 invoked by uid 99); 7 Mar 2007 22:11:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 14:11:53 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of farocco@hotmail.com designates 65.54.246.112 as permitted sender) Received: from [65.54.246.112] (HELO bay0-omc1-s40.bay0.hotmail.com) (65.54.246.112) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 14:11:41 -0800 Received: from hotmail.com ([65.54.175.87]) by bay0-omc1-s40.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Wed, 7 Mar 2007 14:11:21 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 7 Mar 2007 14:11:20 -0800 Message-ID: Received: from 209.4.252.100 by BAY104-DAV15.phx.gbl with DAV; Wed, 07 Mar 2007 22:11:20 +0000 X-Originating-IP: [209.4.252.100] X-Originating-Email: [farocco@hotmail.com] X-Sender: farocco@hotmail.com From: "Frank" To: References: <525d8e10703071408h777505b8o972b07b47d384eb@mail.gmail.com> Subject: Re: Sort fails on setPageSize Date: Wed, 7 Mar 2007 17:11:20 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-OriginalArrivalTime: 07 Mar 2007 22:11:20.0950 (UTC) FILETIME=[894B6960:01C76105] X-Virus-Checked: Checked by ClamAV on apache.org Thanks Malcolm, I did not realize you had an example that used cayenne. Will the setPageSize solve my large database issue? Frank ----- Original Message ----- From: "Malcolm Edgar" To: Sent: Wednesday, March 07, 2007 5:08 PM Subject: Re: Sort fails on setPageSize > Hi Frank, > > for this scenario let the database do the ordering. > > Please see the click examples for a demonstration. > > regards Malcolm Edgar > > On 3/8/07, Frank wrote: >> ok, >> >> I would need to look into what Click Framework is doing and see if I can >> override this. >> >> Thanks >> >> Frank >> ----- Original Message ----- >> From: "Tore Halset" >> To: >> Sent: Wednesday, March 07, 2007 4:59 PM >> Subject: Re: Sort fails on setPageSize >> >> >> > Hi, >> > >> > Would it be possible to reissue the query and let the database do the >> > sorting? Otherwise sorting does not make sense before you have fetched >> > all of the data and then you do not need page size. >> > >> > - Tore. >> > >> > On Mar 7, 2007, at 22:26, Frank wrote: >> > >> >> Hello, >> >> >> >> My sort works fine until I set the Page Size. >> >> >> >> I need to limit the records per page as I have 35000 in table. >> >> >> >> Thanks >> >> >> >> Frank >> >> >> >> query.setPageSize(50); >> >> >> >> causes this error: >> >> >> >> java.lang.UnsupportedOperationException: set operation not supported >> >> at org.objectstyle.cayenne.access.IncrementalFaultList >> >> $IncrementalListIterator.set(IncrementalFaultList.java:962) >> >> at java.util.Collections.sort(Unknown Source) >> >> at net.sf.click.control.Table.sortRowList(Table.java:1290) >> >> at net.sf.click.control.Table.toString(Table.java:988) >> >> at org.apache.velocity.runtime.parser.node.ASTReference.render >> >> (ASTReference.java:336) >> >> at org.apache.velocity.runtime.parser.node.SimpleNode.render >> >> (SimpleNode.java:324) >> >> at org.apache.velocity.runtime.directive.Parse.render(Parse.java:224) >> >> at org.apache.velocity.runtime.parser.node.ASTDirective.render >> >> (ASTDirective.java:136) >> >> at org.apache.velocity.runtime.parser.node.SimpleNode.render >> >> (SimpleNode.java:324) >> >> at org.apache.velocity.Template.merge(Template.java:259) >> >> at net.sf.click.ClickServlet.renderTemplate(ClickServlet.java:591) >> >> at net.sf.click.ClickServlet.processPage(ClickServlet.java:535) >> >> at net.sf.click.ClickServlet.handleRequest(ClickServlet.java:357) >> >> at net.sf.click.ClickServlet.doGet(ClickServlet.java:280) >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >> >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter >> >> (ApplicationFilterChain.java:252) >> >> at org.apache.catalina.core.ApplicationFilterChain.doFilter >> >> (ApplicationFilterChain.java:173) >> >> at net.sf.click.extras.cayenne.DataContextFilter.doFilter >> >> (DataContextFilter.java:125) >> >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter >> >> (ApplicationFilterChain.java:202) >> >> at org.apache.catalina.core.ApplicationFilterChain.doFilter >> >> (ApplicationFilterChain.java:173) >> >> at org.apache.catalina.core.StandardWrapperValve.invoke >> >> (StandardWrapperValvejava:213) >> >> at org.apache.catalina.core.StandardContextValve.invoke >> >> (StandardContextValvejava:178) >> >> at org.apache.catalina.core.StandardHostValve.invoke >> >> (StandardHostValve.java:126) >> >> at org.apache.catalina.valves.ErrorReportValve.invoke >> >> (ErrorReportValve.java:105) >> >> at org.apache.catalina.core.StandardEngineValve.invoke >> >> (StandardEngineValve.java:107) >> >> at org.apache.catalina.connector.CoyoteAdapter.service >> >> (CoyoteAdapter.java:148) >> >> at org.apache.coyote.http11.Http11Processor.process >> >> (Http11Processor.java:869) >> >> at org.apache.coyote.http11.Http11BaseProtocol >> >> $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java: >> >> 664) >> >> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket >> >> (PoolTcpEndpoint.java:527) >> >> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt >> >> (LeaderFollowerWorkerThread.java:80) >> >> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run >> >> (ThreadPool.java:684) >> >> at java.lang.Thread.run(Unknown Source) >> > >> > >> >> >