You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by je...@apache.org on 2011/03/18 14:12:08 UTC

svn commit: r1082903 - /chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext

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.
+    }
+
+