Return-Path: X-Original-To: apmail-cayenne-dev-archive@www.apache.org Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 164BFD668 for ; Fri, 24 May 2013 15:46:28 +0000 (UTC) Received: (qmail 34740 invoked by uid 500); 24 May 2013 15:46:27 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 33480 invoked by uid 500); 24 May 2013 15:46:24 -0000 Mailing-List: contact dev-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 dev@cayenne.apache.org Received: (qmail 33122 invoked by uid 99); 24 May 2013 15:46:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 May 2013 15:46:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 24 May 2013 15:46:17 +0000 Received: (qmail 28321 invoked from network); 24 May 2013 15:48:47 -0000 Received: from unknown (HELO ?IPv6:::1?) (127.0.0.1) by localhost with SMTP; 24 May 2013 15:48:47 -0000 From: Andrus Adamchik Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: =?windows-1252?Q?SQLSelect=3A_Getting_fluent=85_WDYT=3F?= Message-Id: <1B9775F4-3039-4390-B647-408192678243@objectstyle.org> Date: Fri, 24 May 2013 18:45:55 +0300 To: "dev@cayenne.apache.org" Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) X-Mailer: Apple Mail (2.1503) X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/jira/browse/CAY-1828 = http://svn.apache.org/repos/asf/cayenne/main/trunk/framework/cayenne-jdk1.= 5-unpublished/src/main/java/org/apache/cayenne/query/SQLSelect.java So SQLTemplate annoyed me enough to wrap it as a quick experiment with = fluent APIs. I guess this is the direction where the rest of the queries = should be going. Aside from chaining query configuration parameters, = there are "select" and "selectOne" methods that allow to take the chain = to the logical conclusion - the resulting objects. I can think of other methods for building SQL chunks based on Cayenne = mapping, such as "allColumns()", etc. What do you think? Also method naming criticism is accepted. E.g. I am = not sure that changing "setPageSize()" to "pageSize()" was such a great = idea. Andrus