Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 30830 invoked from network); 8 Nov 2010 14:20:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Nov 2010 14:20:06 -0000 Received: (qmail 29757 invoked by uid 500); 8 Nov 2010 14:20:36 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 29748 invoked by uid 99); 8 Nov 2010 14:20:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Nov 2010 14:20:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Nov 2010 14:20:34 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oA8EKEq3020700 for ; Mon, 8 Nov 2010 14:20:14 GMT Message-ID: <13925390.74381289226014019.JavaMail.jira@thor> Date: Mon, 8 Nov 2010 09:20:14 -0500 (EST) From: "Matthew T. Adams (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Commented: (JDO-652) Provision of a typesafe refactor-friendly query capability for JDOQL In-Reply-To: <8636188.18591271057620534.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JDO-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929579#action_12929579 ] Matthew T. Adams commented on JDO-652: -------------------------------------- Andy wrote: 1. Naming convention for generated "Query" classes. Currently prefixed by "Q" in this prototype 2. Way of obtaining candidate, parameter, variable, subquery. If the user wants to access a field then they need to cast to the expression type. See the blog entry for details. Ideally would like to avoid casting ----- RE 1: My personal recommendation for the the "Query" classes is to append the word Query to end of the type. Instead of QProduct, it would be ProductQuery. RE 2: I've been following your blog entries on this development work, and I agree on avoiding casting. Would it be possible to provide a method in the Q class that the user can call instead of casting? Perhaps a getField() method in the right place that returns a java.lang.reflect.Field. I'm not sure where the right place is yet, but in that method, the cast can take place and at least the user wouldn't have to do any casting. Thoughts? > Provision of a typesafe refactor-friendly query capability for JDOQL > -------------------------------------------------------------------- > > Key: JDO-652 > URL: https://issues.apache.org/jira/browse/JDO-652 > Project: JDO > Issue Type: New Feature > Components: api, specification, tck > Reporter: Andy Jefferson > Fix For: JDO 3 maintenance release 1 > > > There are various querying capabilities of this type around. JPA2 has its Criteria query API. Third party solutions like QueryDSL also exist, in its case providing a JDOQL implementation (as well as JPQL, and HQL). We should seriously consider introducing something along these lines in the JDO2.4 timeframe. > There is a comparison of JPA Criteria with QueryDSL over at > http://source.mysema.com/forum/mvnforum/viewthread_thread,49 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.