Return-Path: Delivered-To: apmail-chemistry-commits-archive@www.apache.org Received: (qmail 59175 invoked from network); 18 Mar 2011 13:12:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Mar 2011 13:12:31 -0000 Received: (qmail 73807 invoked by uid 500); 18 Mar 2011 13:12:31 -0000 Delivered-To: apmail-chemistry-commits-archive@chemistry.apache.org Received: (qmail 73777 invoked by uid 500); 18 Mar 2011 13:12:31 -0000 Mailing-List: contact commits-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list commits@chemistry.apache.org Received: (qmail 73769 invoked by uid 99); 18 Mar 2011 13:12:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Mar 2011 13:12:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Mar 2011 13:12:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 30C6B23889E0; Fri, 18 Mar 2011 13:12:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1082903 - /chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext Date: Fri, 18 Mar 2011 13:12:08 -0000 To: commits@chemistry.apache.org From: jens@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110318131208.30C6B23889E0@eris.apache.org> Author: jens Date: Fri Mar 18 13:12:07 2011 New Revision: 1082903 URL: http://svn.apache.org/viewvc?rev=1082903&view=rev Log: Trying to debug failing page Modified: chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext Modified: chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext?rev=1082903&r1=1082902&r2=1082903&view=diff ============================================================================== --- chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext (original) +++ chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext Fri Mar 18 13:12:07 2011 @@ -136,3 +136,29 @@ example the statement will result in calling the method `onLessThan()` in your walker callback implementation: + :::java + public void onLessThan(Tree ltNode, Tree leftNode, Tree rightNode) { + + Object rVal = onLiteral(rightChild); + ColumnReference colRef; + + CmisSelector sel = queryObj.getColumnReference(columnNode + .getTokenStartIndex()); + + if (null == sel) + throw new RuntimeException("Unknown property query name " + + columnNode.getChild(0)); + else if (sel instanceof ColumnReference) + colRef = (ColumnReference) sel; + + + TypeDefinition td = colRef.getTypeDefinition(); + PropertyDefinition pd = + td.getPropertyDefinitions().get(colRef.getPropertyId()); + + + // … process the statement, for example append it to a WHERE + // in your generated SQL statement. + } + +