<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Auto-Expanding Collections as JDBC Parameters with Spring SimpleJdbcTemplate</title>
	<atom:link href="http://www.mularien.com/blog/2008/03/10/auto-expanding-collections-as-jdbc-parameters-with-spring-simplejdbctemplate/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mularien.com/blog/2008/03/10/auto-expanding-collections-as-jdbc-parameters-with-spring-simplejdbctemplate/</link>
	<description>Notes by Peter Mularien on Hibernate, Spring, CSS, Java, etc.</description>
	<lastBuildDate>Tue, 27 Jul 2010 22:22:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dayo</title>
		<link>http://www.mularien.com/blog/2008/03/10/auto-expanding-collections-as-jdbc-parameters-with-spring-simplejdbctemplate/comment-page-1/#comment-13918</link>
		<dc:creator>Dayo</dc:creator>
		<pubDate>Mon, 01 Jun 2009 05:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2008/03/10/auto-expanding-collections-as-jdbc-parameters-with-spring-simplejdbctemplate/#comment-13918</guid>
		<description>int [] pins = {4509471, 11094263 , 12368516, 20380238};
 		String sql = &quot;delete from pinpay.pincards where serial_no IN =(:pins) &quot;;
		try {
//			jdbcTemplate.update(sql, pins);
			SimpleJdbcTemplate  jdbc = new SimpleJdbcTemplate (jdbcTemplate);
			Map params = new HashMap();
			 params.put(&quot;pins&quot;,Arrays.asList(pins));
			jdbc.update(sql, params);
			System.out.println(&quot;Delete Executed !!!!!&quot;);
		} catch (Exception e) {				
			e.printStackTrace();
			System.out.println(&quot;Delete Executed 33333 !!!!!&quot;);
			throw new RuntimeException(e);
		}</description>
		<content:encoded><![CDATA[<p>int [] pins = {4509471, 11094263 , 12368516, 20380238};<br />
 		String sql = &#8220;delete from pinpay.pincards where serial_no IN =(:pins) &#8220;;<br />
		try {<br />
//			jdbcTemplate.update(sql, pins);<br />
			SimpleJdbcTemplate  jdbc = new SimpleJdbcTemplate (jdbcTemplate);<br />
			Map params = new HashMap();<br />
			 params.put(&#8220;pins&#8221;,Arrays.asList(pins));<br />
			jdbc.update(sql, params);<br />
			System.out.println(&#8220;Delete Executed !!!!!&#8221;);<br />
		} catch (Exception e) {<br />
			e.printStackTrace();<br />
			System.out.println(&#8220;Delete Executed 33333 !!!!!&#8221;);<br />
			throw new RuntimeException(e);<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joey</title>
		<link>http://www.mularien.com/blog/2008/03/10/auto-expanding-collections-as-jdbc-parameters-with-spring-simplejdbctemplate/comment-page-1/#comment-10979</link>
		<dc:creator>Joey</dc:creator>
		<pubDate>Wed, 15 Apr 2009 12:05:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2008/03/10/auto-expanding-collections-as-jdbc-parameters-with-spring-simplejdbctemplate/#comment-10979</guid>
		<description>It&#039;s 6am and I have banging my head against this for hours.  The Spring docs don&#039;t make it clear that named parameters must be used. Thank you so much for taking the time to share this!</description>
		<content:encoded><![CDATA[<p>It&#8217;s 6am and I have banging my head against this for hours.  The Spring docs don&#8217;t make it clear that named parameters must be used. Thank you so much for taking the time to share this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamlesh</title>
		<link>http://www.mularien.com/blog/2008/03/10/auto-expanding-collections-as-jdbc-parameters-with-spring-simplejdbctemplate/comment-page-1/#comment-3979</link>
		<dc:creator>Kamlesh</dc:creator>
		<pubDate>Wed, 01 Oct 2008 12:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2008/03/10/auto-expanding-collections-as-jdbc-parameters-with-spring-simplejdbctemplate/#comment-3979</guid>
		<description>Can we handle IN clause in EJB3, in same manner?</description>
		<content:encoded><![CDATA[<p>Can we handle IN clause in EJB3, in same manner?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Goman</title>
		<link>http://www.mularien.com/blog/2008/03/10/auto-expanding-collections-as-jdbc-parameters-with-spring-simplejdbctemplate/comment-page-1/#comment-2805</link>
		<dc:creator>Goman</dc:creator>
		<pubDate>Mon, 11 Aug 2008 18:50:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mularien.com/blog/2008/03/10/auto-expanding-collections-as-jdbc-parameters-with-spring-simplejdbctemplate/#comment-2805</guid>
		<description>hibernate also supports SQL IN CLAUSE, bu i do not know if it is available when you posted this.

&lt;code&gt;
@Test
@Transactional(readOnly = true)
public void shouldReadwithListParameter() {
	Session session = sessionFactory.getCurrentSession();
	List&lt;String&gt; entryuser = new ArrayList&lt;String&gt;();
	entryuser.add(&quot;Xman&quot;);
	entryuser.add(&quot;Yman&quot;);
	List&lt;Product&gt; products = session.createQuery(
			&quot;from Product prd where prd.common.entryUser.userName in (:users)&quot;)
			.setParameterList(&quot;users&quot;, entryuser, new StringType()).list();
}

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>hibernate also supports SQL IN CLAUSE, bu i do not know if it is available when you posted this.</p>
<pre><code>@Test
@Transactional(readOnly = true)
public void shouldReadwithListParameter() {
	Session session = sessionFactory.getCurrentSession();
	List&lt;String&gt; entryuser = new ArrayList&lt;String&gt;();
	entryuser.add("Xman");
	entryuser.add("Yman");
	List&lt;Product&gt; products = session.createQuery(
			"from Product prd where prd.common.entryUser.userName in (:users)")
			.setParameterList("users", entryuser, new StringType()).list();
}</code></pre>
]]></content:encoded>
	</item>
</channel>
</rss>
