chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1082903 - /chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext
Date Fri, 18 Mar 2011 13:12:08 GMT
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.
+    }
+
+



Mime
View raw message