Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CC4A6200C01 for ; Wed, 4 Jan 2017 12:47:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CB0D2160B44; Wed, 4 Jan 2017 11:47:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4D129160B47 for ; Wed, 4 Jan 2017 12:47:59 +0100 (CET) Received: (qmail 15816 invoked by uid 500); 4 Jan 2017 11:47:58 -0000 Mailing-List: contact commits-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list commits@cayenne.apache.org Received: (qmail 15737 invoked by uid 99); 4 Jan 2017 11:47:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2017 11:47:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6121B2C1F5A for ; Wed, 4 Jan 2017 11:47:58 +0000 (UTC) Date: Wed, 4 Jan 2017 11:47:58 +0000 (UTC) From: "Nikita Timofeev (JIRA)" To: commits@cayenne.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAY-2192) column() and columns() methods in ObjectSelect MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 04 Jan 2017 11:48:00 -0000 [ https://issues.apache.org/jira/browse/CAY-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nikita Timofeev updated CAY-2192: --------------------------------- Affects Version/s: 4.0.M5 > column() and columns() methods in ObjectSelect > ---------------------------------------------- > > Key: CAY-2192 > URL: https://issues.apache.org/jira/browse/CAY-2192 > Project: Cayenne > Issue Type: Sub-task > Components: Core Library > Affects Versions: 4.0.M5 > Reporter: Nikita Timofeev > Assignee: Nikita Timofeev > > {code} > // Single column > long totalCount = ObjectSelect.query(Artist.class) > .column(Artist.ARTIST_COUNT) > .selectOne(context); > > // Several columns > List result = ObjectSelect.query(Artist.class) > .columns(artistCount, minSalary, namePart) > .select(context); > for(Object[] r : result) { > long count = (long)r[0]; > int min = (int)r[1]; > String namePart = (String)r[2]; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)