<?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: PL/SQL Table-to-Java Bean (and Data to Java Bean Manager) generator &#8211; useful for data driven demos without database</title>
	<atom:link href="http://technology.amis.nl/2008/06/26/plsql-table-to-java-bean-and-data-to-java-bean-manager-generator-useful-for-data-driven-demos-without-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.amis.nl/2008/06/26/plsql-table-to-java-bean-and-data-to-java-bean-manager-generator-useful-for-data-driven-demos-without-database/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=plsql-table-to-java-bean-and-data-to-java-bean-manager-generator-useful-for-data-driven-demos-without-database</link>
	<description></description>
	<lastBuildDate>Fri, 12 Apr 2013 10:04:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: emeseeado</title>
		<link>http://technology.amis.nl/2008/06/26/plsql-table-to-java-bean-and-data-to-java-bean-manager-generator-useful-for-data-driven-demos-without-database/#comment-5372</link>
		<dc:creator>emeseeado</dc:creator>
		<pubDate>Thu, 18 Nov 2010 10:29:33 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3272#comment-5372</guid>
		<description><![CDATA[I just book marked your blog on Digg and StumbleUpon.I enjoy reading your commentaries.]]></description>
		<content:encoded><![CDATA[<p>I just book marked your blog on Digg and StumbleUpon.I enjoy reading your commentaries.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martien van den Akker</title>
		<link>http://technology.amis.nl/2008/06/26/plsql-table-to-java-bean-and-data-to-java-bean-manager-generator-useful-for-data-driven-demos-without-database/#comment-5371</link>
		<dc:creator>Martien van den Akker</dc:creator>
		<pubDate>Tue, 15 Jul 2008 18:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3272#comment-5371</guid>
		<description><![CDATA[Hi Lucas,

I wrote a similar article but using XSLT on http://darwin-it.blogspot.com/2008/07/code-generation-with-xslt.html.

Regards,
Martien]]></description>
		<content:encoded><![CDATA[<p>Hi Lucas,</p>
<p>I wrote a similar article but using XSLT on <a href="http://darwin-it.blogspot.com/2008/07/code-generation-with-xslt.html" rel="nofollow">http://darwin-it.blogspot.com/2008/07/code-generation-with-xslt.html</a>.</p>
<p>Regards,<br />
Martien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucas Jellema</title>
		<link>http://technology.amis.nl/2008/06/26/plsql-table-to-java-bean-and-data-to-java-bean-manager-generator-useful-for-data-driven-demos-without-database/#comment-5370</link>
		<dc:creator>Lucas Jellema</dc:creator>
		<pubDate>Fri, 27 Jun 2008 13:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3272#comment-5370</guid>
		<description><![CDATA[I did and it did compile. I only used the reformat option in JDeveloper to make it more pleasant to the eye. A long primitive can be passed in for a Long object - automatic casting takes place.]]></description>
		<content:encoded><![CDATA[<p>I did and it did compile. I only used the reformat option in JDeveloper to make it more pleasant to the eye. A long primitive can be passed in for a Long object &#8211; automatic casting takes place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anton</title>
		<link>http://technology.amis.nl/2008/06/26/plsql-table-to-java-bean-and-data-to-java-bean-manager-generator-useful-for-data-driven-demos-without-database/#comment-5369</link>
		<dc:creator>anton</dc:creator>
		<pubDate>Fri, 27 Jun 2008 12:58:48 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3272#comment-5369</guid>
		<description><![CDATA[I can always try. Did you use the package code you supplied to generate the java code you showed in this blog?
And did that code compile? I see for instance the use of long and Long.]]></description>
		<content:encoded><![CDATA[<p>I can always try. Did you use the package code you supplied to generate the java code you showed in this blog?<br />
And did that code compile? I see for instance the use of long and Long.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucas Jellema</title>
		<link>http://technology.amis.nl/2008/06/26/plsql-table-to-java-bean-and-data-to-java-bean-manager-generator-useful-for-data-driven-demos-without-database/#comment-5368</link>
		<dc:creator>Lucas Jellema</dc:creator>
		<pubDate>Fri, 27 Jun 2008 11:57:12 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3272#comment-5368</guid>
		<description><![CDATA[That is pretty neat Anton! Thanks for the improved code. &lt;br /&gt;&lt;br /&gt;
If you feel like it, could you also write the code for the singleton and the master-detail relations?

 &lt;br /&gt;&lt;br /&gt;
Lucas]]></description>
		<content:encoded><![CDATA[<p>That is pretty neat Anton! Thanks for the improved code. </p>
<p>If you feel like it, could you also write the code for the singleton and the master-detail relations?</p>
<p>Lucas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anton</title>
		<link>http://technology.amis.nl/2008/06/26/plsql-table-to-java-bean-and-data-to-java-bean-manager-generator-useful-for-data-driven-demos-without-database/#comment-5367</link>
		<dc:creator>anton</dc:creator>
		<pubDate>Fri, 27 Jun 2008 10:54:59 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3272#comment-5367</guid>
		<description><![CDATA[No need for dbms_sql in procedure generate_create_statements.
The following wil do the same (and uses another constructor for Timestamp)
(this blog will probably destroy the layout of the code)

&lt;pre&gt;
  procedure generate_create_statements
    ( p_class_name in varchar2
    , p_tbl_name in varchar2
    , p_where in varchar2 default null
    )
  is
    t_stmt varchar2(32000);
    t_constr varchar2(1000);
    t_rc sys_refcursor;
  begin
    for r_col in ( select case col.data_type
                            when &#039;VARCHAR2&#039; then &#039; &#124;&#124; &#039;&#039;, &#039;&#039; &#124;&#124; nvl2( &#039; &#124;&#124; col.column_name &#124;&#124; &#039;, &#039;&#039;&quot;&#039;&#039; &#124;&#124; &#039; &#124;&#124; col.column_name &#124;&#124; &#039; &#124;&#124; &#039;&#039;&quot;&#039;&#039;, &#039;&#039;null&#039;&#039; )&#039;
                            when &#039;NUMBER&#039;   then &#039; &#124;&#124; &#039;&#039;, &#039;&#039; &#124;&#124; nvl2( &#039; &#124;&#124; col.column_name &#124;&#124; &#039;, &#039;&#039;(&#039; &#124;&#124; case col.data_scale when 0 then &#039;long&#039; else &#039;double&#039; end &#124;&#124; &#039;) &#039;&#039; &#124;&#124; to_char( &#039; &#124;&#124; col.column_name &#124;&#124; &#039; ), &#039;&#039;null&#039;&#039; )&#039;
                            when &#039;DATE&#039;     then &#039; &#124;&#124; &#039;&#039;, &#039;&#039; &#124;&#124; nvl2( &#039; &#124;&#124; col.column_name &#124;&#124; &#039;, &#039;&#039;new Timestamp( &#039;&#039; &#124;&#124; ( &#039; &#124;&#124; col.column_name &#124;&#124; &#039; - to_date( &#039;&#039;01011970&#039;&#039;, &#039;&#039;ddmmyyyy&#039;&#039; ) ) * 86400000 &#124;&#124; &#039;&#039; )&#039;&#039;, &#039;&#039;null&#039;&#039; )&#039;
                          end c
                   from all_tab_columns col
                   where table_name = upper( p_tbl_name )
                   order by col.column_id
                 )
    loop
      t_stmt := t_stmt &#124;&#124; r_col.c;
    end loop;
--
    t_stmt := &#039;select &#039; &#124;&#124; substr( t_stmt, 12 ) &#124;&#124; &#039; from &#039; &#124;&#124; p_tbl_name &#124;&#124; &#039; &#039; &#124;&#124; p_where;
--
    open t_rc for t_stmt;
    loop
      fetch t_rc into t_constr;
      exit when t_rc%notfound;
      w( &#039; create&#039; &#124;&#124; p_class_name &#124;&#124; &#039;( &#039; &#124;&#124; t_constr &#124;&#124; &#039; );&#039; );
    end loop;
  end;

&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>No need for dbms_sql in procedure generate_create_statements.<br />
The following wil do the same (and uses another constructor for Timestamp)<br />
(this blog will probably destroy the layout of the code)</p>
<pre class="wp-code-highlight prettyprint">
  procedure generate_create_statements
    ( p_class_name in varchar2
    , p_tbl_name in varchar2
    , p_where in varchar2 default null
    )
  is
    t_stmt varchar2(32000);
    t_constr varchar2(1000);
    t_rc sys_refcursor;
  begin
    for r_col in ( select case col.data_type
                            when &#039;VARCHAR2&#039; then &#039; || &#039;&#039;, &#039;&#039; || nvl2( &#039; || col.column_name || &#039;, &#039;&#039;&quot;&#039;&#039; || &#039; || col.column_name || &#039; || &#039;&#039;&quot;&#039;&#039;, &#039;&#039;null&#039;&#039; )&#039;
                            when &#039;NUMBER&#039;   then &#039; || &#039;&#039;, &#039;&#039; || nvl2( &#039; || col.column_name || &#039;, &#039;&#039;(&#039; || case col.data_scale when 0 then &#039;long&#039; else &#039;double&#039; end || &#039;) &#039;&#039; || to_char( &#039; || col.column_name || &#039; ), &#039;&#039;null&#039;&#039; )&#039;
                            when &#039;DATE&#039;     then &#039; || &#039;&#039;, &#039;&#039; || nvl2( &#039; || col.column_name || &#039;, &#039;&#039;new Timestamp( &#039;&#039; || ( &#039; || col.column_name || &#039; - to_date( &#039;&#039;01011970&#039;&#039;, &#039;&#039;ddmmyyyy&#039;&#039; ) ) * 86400000 || &#039;&#039; )&#039;&#039;, &#039;&#039;null&#039;&#039; )&#039;
                          end c
                   from all_tab_columns col
                   where table_name = upper( p_tbl_name )
                   order by col.column_id
                 )
    loop
      t_stmt := t_stmt || r_col.c;
    end loop;
--
    t_stmt := &#039;select &#039; || substr( t_stmt, 12 ) || &#039; from &#039; || p_tbl_name || &#039; &#039; || p_where;
--
    open t_rc for t_stmt;
    loop
      fetch t_rc into t_constr;
      exit when t_rc%notfound;
      w( &#039; create&#039; || p_class_name || &#039;( &#039; || t_constr || &#039; );&#039; );
    end loop;
  end;

</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
