chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r785893 - /websites/staging/chemistry/trunk/content/java/queryintegration.html
Date Mon, 21 Feb 2011 17:08:18 GMT
Author: buildbot
Date: Mon Feb 21 17:08:18 2011
New Revision: 785893

Log:
Staging update by buildbot

Modified:
    websites/staging/chemistry/trunk/content/java/queryintegration.html

Modified: websites/staging/chemistry/trunk/content/java/queryintegration.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/queryintegration.html (original)
+++ websites/staging/chemistry/trunk/content/java/queryintegration.html Mon Feb 21 17:08:18
2011
@@ -261,8 +261,9 @@ as input parameter. The second parameter
 <code>IQueryConditionProcessor</code>. Your code will typically look like this:</p>
 <div class="codehilite"><pre><span class="n">TypeManager</span> <span
class="n">tm</span> <span class="o">=</span> <span class="k">new</span>
<span class="n">MyTypeManager</span><span class="o">();</span> <span
class="c1">// implements interface TypeManager</span>
 
-<span class="n">IQueryConditionProcessor</span> <span class="n">myWalker</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">MyWalker</span><span
class="o">();</span> <span class="c1">// implements interface</span>
-    <span class="n">IQueryConditionProcessor</span> <span class="n">or</span>
<span class="kd">extends</span> <span class="n">AbstractQueryConditionProcessor</span>
+<span class="n">IQueryConditionProcessor</span> <span class="n">myWalker</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">MyWalker</span><span
class="o">();</span>
+                         <span class="c1">// implements interface IQueryConditionProcessor</span>
+                         <span class="c1">// or extends AbstractQueryConditionProcessor</span>
 
 <span class="n">queryObj</span> <span class="o">=</span> <span
class="k">new</span> <span class="n">QueryObject</span><span class="o">(</span><span
class="n">tm</span><span class="o">,</span> <span class="n">myWalker</span><span
class="o">);</span>
 </pre></div>
@@ -276,13 +277,9 @@ your walker:</p>
     <span class="n">walker</span><span class="o">.</span><span
class="na">query</span><span class="o">(</span><span class="n">queryObj</span><span
class="o">);</span>
 
 <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span
class="n">RecognitionException</span> <span class="n">e</span><span
class="o">)</span> <span class="o">{</span>
-
-    <span class="k">throw</span> <span class="k">new</span> <span
class="nf">RuntimeException</span><span class="o">(</span><span class="s">&quot;Walking
of statement failed with</span>
-<span class="s">         RecognitionException error: \n   &quot;</span> <span
class="o">+</span> <span class="n">e</span><span class="o">);</span>
-
+    <span class="k">throw</span> <span class="k">new</span> <span
class="nf">RuntimeException</span><span class="o">(</span><span class="s">&quot;Walking
of statement failed with RecognitionException error:\n &quot;</span> <span class="o">+</span>
<span class="n">e</span><span class="o">);</span>
 <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span
class="n">Exception</span> <span class="n">e</span><span class="o">)</span>
<span class="o">{</span>
-    <span class="k">throw</span> <span class="k">new</span> <span
class="nf">RuntimeException</span><span class="o">(</span><span class="s">&quot;Walking
of statement failed with exception:</span>
-<span class="s">          \n   &quot;</span> <span class="o">+</span>
<span class="n">e</span><span class="o">);</span>
+    <span class="k">throw</span> <span class="k">new</span> <span
class="nf">RuntimeException</span><span class="o">(</span><span class="s">&quot;Walking
of statement failed with exception:\n &quot;</span> <span class="o">+</span>
<span class="n">e</span><span class="o">);</span>
 <span class="o">}</span>
 </pre></div>
 
@@ -295,7 +292,10 @@ your walker:</p>
 type definitions that are referenced in the where clause. The <code>QueryObject</code>
 provides the necessary information for resolving the references. For
 example the statement</p>
-<p>... WHERE x &lt; 123</p>
+<div class="codehilite"><pre><span class="o">...</span> <span
class="n">WHERE</span> <span class="n">x</span> <span class="o">&lt;</span>
<span class="mi">123</span>
+</pre></div>
+
+
 <p>will result in calling the method <code>onLessThan()</code> in your
walker callback
 implementation:</p>
 <div class="codehilite"><pre><span class="kd">public</span> <span
class="kt">void</span> <span class="nf">onLessThan</span><span class="o">(</span><span
class="n">Tree</span> <span class="n">ltNode</span><span class="o">,</span>
<span class="n">Tree</span> <span class="n">leftNode</span><span
class="o">,</span> <span class="n">Tree</span> <span class="n">rightNode</span><span
class="o">)</span> <span class="o">{</span>
@@ -340,7 +340,7 @@ the requested information:</p>
 </pre></div>
 
 
-<p>key of the map is the query name and value is the alias if an alias was
+<p>Key of the map is the query name and value is the alias if an alias was
 used in the statement or the query name otherwise.</p></div>
              <!-- Content -->
            </td>



Mime
View raw message