From torque-user-return-6005-apmail-db-torque-user-archive=db.apache.org@db.apache.org Tue Apr 05 13:11:32 2005 Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 60456 invoked from network); 5 Apr 2005 13:11:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Apr 2005 13:11:31 -0000 Received: (qmail 99983 invoked by uid 500); 5 Apr 2005 13:11:28 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 99954 invoked by uid 500); 5 Apr 2005 13:11:27 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 99936 invoked by uid 99); 5 Apr 2005 13:11:27 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from Unknown (HELO barge.anchor.net.au) (203.202.1.123) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 05 Apr 2005 06:11:26 -0700 Received: from [192.168.0.2] (CPE-61-9-201-26.nsw.bigpond.net.au [61.9.201.26]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by barge.anchor.net.au (Postfix) with ESMTP id 8289910189 for ; Tue, 5 Apr 2005 23:11:22 +1000 (EST) Message-ID: <42528E72.20204@backstagetech.com.au> Date: Tue, 05 Apr 2005 23:11:14 +1000 From: Scott Eade User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache Torque Users List Subject: Re: How to fetch the rows with Peer class References: <6.0.0.20.2.20050405102533.026c5050@10.108.73.3> In-Reply-To: <6.0.0.20.2.20050405102533.026c5050@10.108.73.3> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Kenji Ichikawa wrote: > I would like to implement to fetch the rows with Peer class of Torque, > becase the table row size is too large, so probably OutOfMemoryError > will heppen if the following code is executed. > > Criteria criteria = new Criteria(); > List list = MyTablePeer.doSelect( criteria ); > > I would like to know how to fetch the rows with Peer class, > it's like the following code of JDBC implementation. > > Statement st = conn.createStatement(); > st.setFetchSize(50); > ResultSet rs = st.executeQuery("SELECT * FROM my_table"); > while (rs.next()) { > System.out.print("a row was returned."); > } > rs.close(); > st.close(); > > If you know how to do, Could you give me advice ? What you really need is the LargeSelect class - look at the JavaDoc and test cases for usage. Scott -- Scott Eade Backstage Technologies Pty. Ltd. http://www.backstagetech.com.au --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org