Following comments apply to seam-sql5 rev...<br><br>1) In Tuple class:<br><br><div style="margin-left: 40px;"><font size="1">public &lt;T&gt; T get(int column, Type&lt;T&gt; type) {<br>        return (T) get(column);<br>    }<br>
<br></font></div><font size="2">The type param is not referenced in the body of the method.  Why?</font><br><br>2) So I added this method in the Tuple class:<br><br><div style="margin-left: 40px;"><font size="1">@SuppressWarnings(&quot;unchecked&quot;)<br>
    public &lt;T&gt; T testGet(int column) {<br>        return (T) get(column);<br>    }<br><br></font></div><font size="1"><font size="2">  And changed testQuery3() to this:</font><br><br>public static void testQuery3(Session session) {<br>
        System.out.println(&quot;begin testQuery3()&quot;);<br>        Iterable&lt;Tuple&gt; result = session.prepareQuery(&quot;select username, name, password, age from users where username=?&quot;)<br>            .set(0, &quot;gavin&quot;, VARCHAR)<br>
            .result();<br>             <br>        for (Tuple tuple: result) {<br>            System.out.println( tuple.testGet(0));<br>            System.out.println( tuple.testGet(1));<br>            System.out.println( tuple.testGet(2));<br>
            System.out.println( tuple.testGet(3));<br>        }<br>    }<br><br><font size="2">And got the same results in the console.  </font></font><font size="1"><font size="2">I don&#39;t like to be forced to pass the datatype in the get() method for Tuple, that should not be requierd.</font></font><br>
<font size="1"><font size="2"><br>3) This is looking pretty good to me now in terms of conciseness and clarity:<br><br></font></font><div style="margin-left: 40px;"><font size="1"><font size="2"><font size="1">@Inject LoginQuery loginQuery;</font></font></font><br>
<br><font size="1"><font size="2"><font size="1">    public void testLoginQuery(Session session) {</font></font></font><br><font size="1"><font size="2"><font size="1">        </font></font></font><br><font size="1"><font size="2"><font size="1">       </font></font></font><font size="1"><font size="2"><font size="1">Iterable&lt;Tuple&gt; result = session.prepare(loginQuery)</font></font></font><font size="1"><font size="2"><font size="1">.set(loginQuery.username, &quot;gavin&quot;)</font></font></font><font size="1"><font size="2"><font size="1">.set(loginQuery.password, &quot;foobax&quot;)</font></font></font><font size="1"><font size="2"><font size="1">.result();</font></font></font><br>
<font size="1"><font size="2"><font size="1">        </font></font></font><br><font size="1"><font size="2"><font size="1">        for (Tuple tuple: result) {</font></font></font><br><font size="1"><font size="2"><font size="1">            System.out.println( tuple.get(loginQuery.name) + &#39; &#39; + </font></font></font><font size="1"><font size="2"><font size="1">tuple.get(loginQuery.age) + &#39; &#39; + </font></font></font><font size="1"><font size="2"><font size="1">tuple.get(loginQuery.permissionId) );</font></font></font><br>
<font size="1"><font size="2"><font size="1">        }</font></font></font><br><font size="1"><font size="2"><font size="1">    }</font></font></font><br></div><font size="1"><font size="2"><br>I need to take the time (when I have some!) to look at this API in detail but the latest rev&#39;s addition of sql string as param to query exec is a nice addition.  Good job!<br>
</font></font><br><div class="gmail_quote">On Fri, Nov 27, 2009 at 3:16 PM, Gavin King <span dir="ltr">&lt;<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
New rev, with ability to pass SQL as strings.<br>
<div class="im"><br>
On Fri, Nov 27, 2009 at 4:47 PM, Gavin King &lt;<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a>&gt; wrote:<br>
&gt; Latest, with a new approach to specifying types.<br>
&gt;<br>
<br>
<br>
<br>
</div>--<br>
<div><div></div><div class="h5">Gavin King<br>
<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a><br>
<a href="http://in.relation.to/Bloggers/Gavin" target="_blank">http://in.relation.to/Bloggers/Gavin</a><br>
<a href="http://hibernate.org" target="_blank">http://hibernate.org</a><br>
<a href="http://seamframework.org" target="_blank">http://seamframework.org</a><br>
</div></div><br>_______________________________________________<br>
weld-dev mailing list<br>
<a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br></blockquote></div><br>