From torquewhiteadam@example.net Mon Jan 04 12:34:38 2010
Return-Path: <torquewhiteadam@example.net>
Delivered-To: whiteadam@example.net
Received: (qmail 79662 invoked from network); 4 Jan 2010 12:34:38 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 4 Jan 2010 12:34:38 -0000
Received: (qmail 60046 invoked by uid 500); 4 Jan 2010 12:34:38 -0000
Delivered-To: whiteadam@example.net
Received: (qmail 60021 invoked by uid 500); 4 Jan 2010 12:34:37 -0000
Mailing-List: contact whiteadam@example.net; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:whiteadam@example.net>
List-Help: <mailto:whiteadam@example.net>
List-Post: <mailto:whiteadam@example.net>
List-Id: "Apache Torque Users List" <torque-user.db.apache.org>
Reply-To: "Apache Torque Users List" <whiteadam@example.net>
Delivered-To: mailing list whiteadam@example.net
Received: (qmail 60006 invoked by uid 99); 4 Jan 2010 12:34:37 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 12:34:37 +0000
X-ASF-Spam-Status: No, hits=3.4 required=10.0
	tests=HTML_MESSAGE,SPF_NEUTRAL
X-Spam-Check-By: apache.org
Received-SPF: neutral (athena.apache.org: local policy)
Received: from [83.161.120.155] (HELO mail-bw0-f218.google.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 12:34:29 +0000
Received: by bwz10 with SMTP id 10so10117937bwz.15
        for <whiteadam@example.net>; Mon, 04 Jan 2010 04:34:07 -0800 (PST)
Received: by 83.161.120.155 with SMTP id f3mr8007354bkf.140.1262608446753;
        Mon, 04 Jan 2010 04:34:06 -0800 (PST)
Received: from GreenStreet (h59ec0d32.stgertrud.dyn.perspektivbredband.net [83.161.120.155])
        by mx.google.com with ESMTPS id 16sm5080852bwz.7.283.161.120.155.34.06
        (version=SSLv3 cipher=RC4-MD5);
        Mon, 04 Jan 2010 04:34:06 -0800 (PST)
From: "Ludwig Magnusson" <whiteadam@example.net>
To: "'Apache Torque Users List'" <whiteadam@example.net>
Subject: Get results as ints
Date: Mon, 4 Jan 2010 13:34:03 +0100
Message-ID: <002201ca8d3a$3379cb80$9a6d6280$@com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0023_01CA8D42.953E3380"
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcqNOjKNOxKZfNpKQp+/3xmX0UgB7A==
Content-Language: sv

------=_NextPart_000_0023_01CA8D42.953E3380
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Hi!

I would like to select all ids from a table (with a certain criteria). If I
use addSelectColumn on my criteria and do BasePeer.doSelect(criteria), I
only get the columns that I want but they are in form of record objects. Can
I get a list of ints, strings or whatever or do I need to convert the list
myself?

/Ludwig


------=_NextPart_000_0023_01CA8D42.953E3380--


From torquewhiteadam@example.net Mon Jan 04 12:48:00 2010
Return-Path: <torquewhiteadam@example.net>
Delivered-To: whiteadam@example.net
Received: (qmail 88522 invoked from network); 4 Jan 2010 12:48:00 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 4 Jan 2010 12:48:00 -0000
Received: (qmail 78786 invoked by uid 500); 4 Jan 2010 12:47:59 -0000
Delivered-To: whiteadam@example.net
Received: (qmail 78766 invoked by uid 500); 4 Jan 2010 12:47:59 -0000
Mailing-List: contact whiteadam@example.net; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:whiteadam@example.net>
List-Help: <mailto:whiteadam@example.net>
List-Post: <mailto:whiteadam@example.net>
List-Id: "Apache Torque Users List" <torque-user.db.apache.org>
Reply-To: "Apache Torque Users List" <whiteadam@example.net>
Delivered-To: mailing list whiteadam@example.net
Received: (qmail 78756 invoked by uid 99); 4 Jan 2010 12:47:59 -0000
Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 12:47:59 +0000
X-ASF-Spam-Status: No, hits=-0.0 required=10.0
	tests=SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: local policy)
Received: from [83.161.120.155] (HELO mail.seitenbau.net) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 12:47:51 +0000
Received: from [83.161.120.155] (helo=www.seitenbau.net)
	by router.seitenbau.net with esmtp (Exim 4.43)
	id 1NRmLK-0006Fl-Lv
	for whiteadam@example.net; Mon, 04 Jan 2010 13:47:31 +0100
In-Reply-To: <002201ca8d3a$3379cb80$9a6d6280$@com>
References: <002201ca8d3a$3379cb80$9a6d6280$@com>
Subject: Antwort: Get results as ints
X-KeepSent: D1112CE1:0AD5430E-C12576A1:00460B75;
 type=4; name=$KeepSent
To: "Apache Torque Users List" <whiteadam@example.net>
X-Mailer: Lotus Notes Release 8.5 December 05, 2008
Message-ID: <whiteadam@example.net>
From: Thomas Fischer <whiteadam@example.net>
Date: Mon, 4 Jan 2010 13:47:29 +0100
X-MIMETrack: Serialize by Router on www/seitenbau(Release 8.5HF467 | May 15, 2009) at
 04.01.2010 13:47:29
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
X-Spam-Score: -1.4 (-)
X-Spam-Report: 	-1.4 ALL_TRUSTED            Passed through trusted hosts only via SMTP
X-Virus-Checked: Checked by ClamAV on apache.org

> I would like to select all ids from a table (with a certain criteria). If
I
> use addSelectColumn on my criteria and do BasePeer.doSelect(criteria), I
> only get the columns that I want but they are in form of record objects.
Can
> I get a list of ints, strings or whatever or do I need to convert the
list
> myself?

Currently, you need to convert the results yourself. It is not that
problematic, see the generated peer code as an example. If I remember
correctly, the record object contains value objects which have an asInt
method, but the code is more reliable than my memory.

    Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: whiteadam@example.net
For additional commands, e-mail: whiteadam@example.net


From torquewhiteadam@example.net Mon Jan 04 12:56:05 2010
Return-Path: <torquewhiteadam@example.net>
Delivered-To: whiteadam@example.net
Received: (qmail 89405 invoked from network); 4 Jan 2010 12:56:05 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 4 Jan 2010 12:56:05 -0000
Received: (qmail 86480 invoked by uid 500); 4 Jan 2010 12:56:05 -0000
Delivered-To: whiteadam@example.net
Received: (qmail 86450 invoked by uid 500); 4 Jan 2010 12:56:05 -0000
Mailing-List: contact whiteadam@example.net; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:whiteadam@example.net>
List-Help: <mailto:whiteadam@example.net>
List-Post: <mailto:whiteadam@example.net>
List-Id: "Apache Torque Users List" <torque-user.db.apache.org>
Reply-To: "Apache Torque Users List" <whiteadam@example.net>
Delivered-To: mailing list whiteadam@example.net
Received: (qmail 86440 invoked by uid 99); 4 Jan 2010 12:56:05 -0000
Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 12:56:05 +0000
X-ASF-Spam-Status: No, hits=1.2 required=10.0
	tests=SPF_NEUTRAL
X-Spam-Check-By: apache.org
Received-SPF: neutral (nike.apache.org: local policy)
Received: from [83.161.120.155] (HELO mail-bw0-f218.google.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 12:55:55 +0000
Received: by bwz10 with SMTP id 10so10129203bwz.15
        for <whiteadam@example.net>; Mon, 04 Jan 2010 04:55:34 -0800 (PST)
Received: by 83.161.120.155 with SMTP id u20mr559093bkf.199.1262609734374;
        Mon, 04 Jan 2010 04:55:34 -0800 (PST)
Received: from GreenStreet (h59ec0d32.stgertrud.dyn.perspektivbredband.net [83.161.120.155])
        by mx.google.com with ESMTPS id 15sm5077112bwz.4.283.161.120.155.55.33
        (version=SSLv3 cipher=RC4-MD5);
        Mon, 04 Jan 2010 04:55:33 -0800 (PST)
From: "Ludwig Magnusson" <whiteadam@example.net>
To: "'Apache Torque Users List'" <whiteadam@example.net>
References: <002201ca8d3a$3379cb80$9a6d6280$@com> <whiteadam@example.net>
In-Reply-To: <whiteadam@example.net>
Subject: RE: Antwort: Get results as ints
Date: Mon, 4 Jan 2010 13:55:30 +0100
Message-ID: <002701ca8d3d$32d93e60$988bbb20$@com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcqNPCau34XP6CXYSuKuz97CooHDCwAAP6FA
Content-Language: sv
X-Virus-Checked: Checked by ClamAV on apache.org

Yes there is a method like that.
I'll use it then.
/Ludwig

-----Original Message-----
From: Thomas Fischer [mailto:whiteadam@example.net] 
Sent: den 4 januari 2010 13:47
To: Apache Torque Users List
Subject: Antwort: Get results as ints

> I would like to select all ids from a table (with a certain criteria). If
I
> use addSelectColumn on my criteria and do BasePeer.doSelect(criteria), I
> only get the columns that I want but they are in form of record objects.
Can
> I get a list of ints, strings or whatever or do I need to convert the
list
> myself?

Currently, you need to convert the results yourself. It is not that
problematic, see the generated peer code as an example. If I remember
correctly, the record object contains value objects which have an asInt
method, but the code is more reliable than my memory.

    Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: whiteadam@example.net
For additional commands, e-mail: whiteadam@example.net


---------------------------------------------------------------------
To unsubscribe, e-mail: whiteadam@example.net
For additional commands, e-mail: whiteadam@example.net


From torquewhiteadam@example.net Mon Jan 04 15:43:36 2010
Return-Path: <torquewhiteadam@example.net>
Delivered-To: whiteadam@example.net
Received: (qmail 59922 invoked from network); 4 Jan 2010 15:43:36 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 4 Jan 2010 15:43:36 -0000
Received: (qmail 85303 invoked by uid 500); 4 Jan 2010 15:43:36 -0000
Delivered-To: whiteadam@example.net
Received: (qmail 85266 invoked by uid 500); 4 Jan 2010 15:43:36 -0000
Mailing-List: contact whiteadam@example.net; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:whiteadam@example.net>
List-Help: <mailto:whiteadam@example.net>
List-Post: <mailto:whiteadam@example.net>
List-Id: "Apache Torque Users List" <torque-user.db.apache.org>
Reply-To: "Apache Torque Users List" <whiteadam@example.net>
Delivered-To: mailing list whiteadam@example.net
Received: (qmail 85256 invoked by uid 99); 4 Jan 2010 15:43:36 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 15:43:36 +0000
X-ASF-Spam-Status: No, hits=1.2 required=10.0
	tests=SPF_NEUTRAL
X-Spam-Check-By: apache.org
Received-SPF: neutral (athena.apache.org: 83.161.120.155 is neither permitted nor denied by domain of whiteadam@example.net)
Received: from [83.161.120.155] (HELO cogentisolution.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 15:43:26 +0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=simmgene.com;
	h=Received:Subject:From:To:In-Reply-To:References:Content-Type:Organization:Date:Message-ID:Mime-Version:X-Mailer:Content-Transfer-Encoding:X-Source:X-Source-Args:X-Source-Dir;
	b=kxGhChHiORTQwuO2rUeFW0tNch2bL0kNnN3RE/QwzI5rZH5SdwRqnejur3H7LS7NRKaw/3ykzKBnXRNMiSyZQQsLFAAwPWHtRxOJNVc9TDVgyvPU95ETc3ejXXLpUa8m;
Received: from [83.161.120.155] (helo=[83.161.120.155])
	by cogentisolution.com with esmtpa (Exim 4.69)
	(envelope-from <whiteadam@example.net>)
	id 1NRouU-0000Sf-2g
	for whiteadam@example.net; Mon, 04 Jan 2010 15:32:07 +0000
Subject: RE: Antwort: Get results as ints
From: Sheldon Ross <whiteadam@example.net>
To: Apache Torque Users List <whiteadam@example.net>
In-Reply-To: <002701ca8d3d$32d93e60$988bbb20$@com>
References: <002201ca8d3a$3379cb80$9a6d6280$@com>
	 <whiteadam@example.net>
	 <002701ca8d3d$32d93e60$988bbb20$@com>
Content-Type: text/plain; charset="UTF-8"
Organization: American Simmental Association
Date: Mon, 04 Jan 2010 08:42:38 -0700
Message-ID: <1262619758.15764.2.camel@devworkstation2>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.1 
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - cogentisolution.com
X-AntiAbuse: Original Domain - db.apache.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - simmgene.com
X-Source: 
X-Source-Args: 
X-Source-Dir: 

List<Record> records = BaseIdPeer.doSelectVillageRecords(criteria);
List<String> cols = new ArrayList<String>();
Iterator<Record> iter = records.iterator();
while(iter.hasNext()){
 cols.add(String.valueOf(iter.next().getValue(1)));
}
return cols;

That's how I do it.

Ross
			}
On Mon, 2010-01-04 at 13:55 +0100, Ludwig Magnusson wrote:
> Yes there is a method like that.
> I'll use it then.
> /Ludwig
> 
> -----Original Message-----
> From: Thomas Fischer [mailto:whiteadam@example.net] 
> Sent: den 4 januari 2010 13:47
> To: Apache Torque Users List
> Subject: Antwort: Get results as ints
> 
> > I would like to select all ids from a table (with a certain criteria). If
> I
> > use addSelectColumn on my criteria and do BasePeer.doSelect(criteria), I
> > only get the columns that I want but they are in form of record objects.
> Can
> > I get a list of ints, strings or whatever or do I need to convert the
> list
> > myself?
> 
> Currently, you need to convert the results yourself. It is not that
> problematic, see the generated peer code as an example. If I remember
> correctly, the record object contains value objects which have an asInt
> method, but the code is more reliable than my memory.
> 
>     Thomas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: whiteadam@example.net
> For additional commands, e-mail: whiteadam@example.net
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: whiteadam@example.net
> For additional commands, e-mail: whiteadam@example.net
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: whiteadam@example.net
For additional commands, e-mail: whiteadam@example.net



{'source': 'Apache Software Foundation Public Mail Archives'}