<?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: Generic Entity Converter for JSF / Spring / JPA</title>
	<atom:link href="http://www.reverttoconsole.com/blog/jsf/generic-entity-converter-for-jsf-spring-jpa/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reverttoconsole.com/blog/jsf/generic-entity-converter-for-jsf-spring-jpa/</link>
	<description>for f in *;do echo &#124; sed &#039;i\rtc&#039; &#62;&#62; $f;done; java programming et al</description>
	<lastBuildDate>Thu, 19 Jan 2012 04:32:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Rusty Wright</title>
		<link>http://www.reverttoconsole.com/blog/jsf/generic-entity-converter-for-jsf-spring-jpa/comment-page-1/#comment-208</link>
		<dc:creator>Rusty Wright</dc:creator>
		<pubDate>Tue, 28 Apr 2009 18:23:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=330#comment-208</guid>
		<description>Oops; the string argument to IllegalArgumentException needs to include String in addition to BaseIdentityEntity.</description>
		<content:encoded><![CDATA[<p>Oops; the string argument to IllegalArgumentException needs to include String in addition to BaseIdentityEntity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rusty Wright</title>
		<link>http://www.reverttoconsole.com/blog/jsf/generic-entity-converter-for-jsf-spring-jpa/comment-page-1/#comment-207</link>
		<dc:creator>Rusty Wright</dc:creator>
		<pubDate>Tue, 28 Apr 2009 18:21:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=330#comment-207</guid>
		<description>In getAsString() how can the value argument ever be a string? Your first if statement requires it to be BaseIdentityEntity.  For me, the code would be clearer if it was along the lines of

if (value == null) return &quot;&quot;;
if (value instanceof String) return (String) value;
if (value instanceof BaseIdentityEntity) {
BaseIdentityEntity entity = (BaseIdentityEntity) value;
return entity.getId() == null ? &quot;&quot; : entity.getId().toString();
}
throw new IllegalArgumentException(&quot;This converter only handles instances of BaseIdentityEntity&quot;);</description>
		<content:encoded><![CDATA[<p>In getAsString() how can the value argument ever be a string? Your first if statement requires it to be BaseIdentityEntity.  For me, the code would be clearer if it was along the lines of</p>
<p>if (value == null) return &#8220;&#8221;;<br />
if (value instanceof String) return (String) value;<br />
if (value instanceof BaseIdentityEntity) {<br />
BaseIdentityEntity entity = (BaseIdentityEntity) value;<br />
return entity.getId() == null ? &#8220;&#8221; : entity.getId().toString();<br />
}<br />
throw new IllegalArgumentException(&#8220;This converter only handles instances of BaseIdentityEntity&#8221;);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

