<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>kopf.lastig &#187; Bücher</title>
	<atom:link href="http://www.epischel.de/wordpress/tag/bucher/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.epischel.de/wordpress</link>
	<description>Alles mögliche zu Themen wie Familie, Beruf, Medien etc. ...</description>
	<lastBuildDate>Thu, 19 Aug 2010 11:18:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Harry Potter: Zauberstab und Physik</title>
		<link>http://www.epischel.de/wordpress/2006/01/harry-potter-zauberstab-und-physik/</link>
		<comments>http://www.epischel.de/wordpress/2006/01/harry-potter-zauberstab-und-physik/#comments</comments>
		<pubDate>Fri, 20 Jan 2006 16:17:43 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Familie]]></category>
		<category><![CDATA[Medien]]></category>
		<category><![CDATA[Bücher]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=42</guid>
		<description><![CDATA[Wie fast jeden Abend &#8220;durfte&#8221; ich auch gestern wieder zum Einschlafen einem Potter-Hörbuch lauschen (manche Leute können ohne Hörbuch oder Fernsehen nicht so gut einschlafen&#8230;). Es war gerade die Stelle, in der sich Potter und seine Mannen mit den Todessern im Zaubereiministerium prügeln. Dann treffen Voldemort und Dumbledore aufeinander. Dabei ist mir was aufgefallen&#8230; Im [...]]]></description>
			<content:encoded><![CDATA[<p>Wie fast jeden Abend &#8220;durfte&#8221; ich auch gestern wieder zum Einschlafen einem Potter-Hörbuch lauschen (manche Leute können ohne Hörbuch oder Fernsehen nicht so gut einschlafen&#8230;). Es war gerade die Stelle, in der sich Potter und seine Mannen mit den Todessern im Zaubereiministerium prügeln. Dann treffen Voldemort und Dumbledore aufeinander. Dabei ist mir was aufgefallen&#8230;</p>
<p>Im Buch wird beschrieben, wie bei einem Fluch ein Lichtblitz aus dem Zauberstab austritt und auf den Gegner &#8220;zufliegt&#8221;. Nun ist die Geschwindigkeit von Licht eigentlich ziemlich groß. Wenn ich eine Taschenlampe einschalte, bemerkt kein Mensch, wie die Photonen aus der Taschenlampe austreten und auf die Wand gegenüber auftreffen. Auch bei Gewehrkugeln (die sich ja wesentlich langsamer als Licht fortbewegen) hat niemand eine Chance, zu reagieren. Ich würde auch sagen, bei einem Pfeil aus einer Armbrust dürfte es ziemlich schwer für ein Opfer sein auszuweichen, wenn der Schütze ca. 20 Meter entfernt steht.</p>
<p>In besagtem Kampf Voldi gegen Dumbledore kann letzterer mehrmals Flüchen entkommen &#8211; durch &#8220;umdrehen und disapparieren&#8221; und &#8220;andere Gegenstände in den Weg zaubern&#8221;. Wie schnell &#8211; oder besser langsam &#8211; ist denn dieses &#8220;Fluchlicht&#8221;, das man da sieht? Das würde ich gerne wissen.</p>
<p>Und wenn ich so einen Todesser Kampfunfähig gezaubert hätte, würde ich ihm sofort seinen Zauberstab entwenden und diesen zerbrechen. Damit der keinen Unfug mehr damit anfängt. Das nur nebenbei.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2006/01/harry-potter-zauberstab-und-physik/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>30. Geburtstag</title>
		<link>http://www.epischel.de/wordpress/2006/01/30-geburtstag/</link>
		<comments>http://www.epischel.de/wordpress/2006/01/30-geburtstag/#comments</comments>
		<pubDate>Wed, 18 Jan 2006 14:58:58 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Familie]]></category>
		<category><![CDATA[Bücher]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=41</guid>
		<description><![CDATA[Ich werde 30 - Literatur dazu.]]></description>
			<content:encoded><![CDATA[<p>In einem halben Jahr erwischt mich die &#8220;magische&#8221; Zahl 30 &#8211; soviele Lenze zähle ich dann. Nachdem meine liebe Frau mir schon das Buch <a href="http://www.amazon.de/exec/obidos/ASIN/3502144303">&#8220;Achtung &#8211; fertig &#8211; 30&#8243;</a> vom Restposten-Buchhändler <a href="http://www.jokers.de/">Jokers</a>mitgebracht hat, erschien gestern auf Spiegel-Online ein <a href="http://www.spiegel.de/unispiegel/wunderbar/0,1518,392694,00.html">Interview</a> mit Kulturwissenschaftler Christian Marchetti über den 30. Geburtstag. Der Tipp vom &#8220;Experten&#8221;: den Geburtstag groß feiern. Genau das habe ich auch vor &#8211; weiß allerdings nur noch nicht genau, wie.</p>
<p>Das Buch übrigens ist recht lesenswert, auch wenn es manchmal zu sehr aus der Sicht einer Frau geschrieben ist. An einigen Stellen hätte ich mir mehr Tiefe gewünscht, aber dann wäre das Buch wohl entsprechend dicker geworden.</p>
<p>Sinnkrise, Ende der Jugend, Verantwortung und ähnliche Schlagwörter&#8230; Hm. Anlaß zum Nachdenken ist der 30. schon. Aber im Endeffekt wird es ein Tag wie jeder andere sein. Die Geburt meines Sohnes hat mein Leben sicherlich einschneidender und nachhaltiger beeinflußt als es der 30. Geburtstag tun wird (Stichwort &#8220;Ende der Jugend&#8221; und &#8220;Verantwortung&#8221;).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2006/01/30-geburtstag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>20 Eigenschaften erfolgreicher Menschen</title>
		<link>http://www.epischel.de/wordpress/2006/01/20-eigenschaften-erfolgreicher-menschen/</link>
		<comments>http://www.epischel.de/wordpress/2006/01/20-eigenschaften-erfolgreicher-menschen/#comments</comments>
		<pubDate>Thu, 05 Jan 2006 18:27:47 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Selbst-Management]]></category>
		<category><![CDATA[Bücher]]></category>
		<category><![CDATA[Persönliche Entwicklung]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=40</guid>
		<description><![CDATA[Ich lese gerade &#8220;Achtung &#8211; fertig &#8211; 30&#8243;. Dort gibt es eine Liste von 20 Eigenschaften erfolgreicher Menschen (&#8220;erfolgsintelligente&#8221; Menschen). Diese Menschen können (Zitat): sich selbst motivieren ihre Impulse kontrollieren durchhalten das Beste aus ihren Fähigkeiten machen Gedanken in die Tat umsetzen auf Ergebnisse hinarbeiten ihre Aufgabe zu Ende bringen Initiative ergreifen Niederlagen einstecken ihre [...]]]></description>
			<content:encoded><![CDATA[<p>Ich lese gerade <a href="http://www.amazon.de/exec/obidos/ASIN/3502144303/qid=1136481628/sr=8-1/ref=sr_8_xs_ap_i1_xgl/303-4057654-5821815">&#8220;Achtung &#8211; fertig &#8211; 30&#8243;</a>. Dort gibt es eine Liste von 20 Eigenschaften erfolgreicher Menschen (&#8220;erfolgsintelligente&#8221; Menschen). Diese Menschen können (Zitat):</p>
<ul>
<li>sich selbst motivieren</li>
<li>ihre Impulse kontrollieren</li>
<li>durchhalten</li>
<li>das Beste aus ihren Fähigkeiten machen</li>
<li>Gedanken in die Tat umsetzen</li>
<li>auf Ergebnisse hinarbeiten</li>
<li>ihre Aufgabe zu Ende bringen</li>
<li>Initiative ergreifen</li>
<li>Niederlagen einstecken</li>
<li>ihre Projekte auch umsetzen, anstatt sie aufzuschieben</li>
<li>Kritik annehmen</li>
<li>unabhängig (von anderen) sein</li>
<li>persönliche Schwierigkeiten überwinden (z.B. Schüchternheit)</li>
<li>sich auf ihre Ziele konzentrieren</li>
<li>das richtige Maß an Belastung zwischen Unterforderung und Überforderung herausfinden</li>
<li>auf Belohnung warten</li>
<li>sich auf das Gesamtziel ihres Schaffens konzentrieren, ohne sich dabei zu verzetteln</li>
<li>an ihre Fähigkeit, Ziele zu erreichen, glauben</li>
<li>analytisch, kreativ und praktisch denken</li>
</ul>
<p>Und? Welche dieser Eigenschaften ist bei Ihnen gut ausgeprägt? An welchen könnten Sie arbeiten?</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-5143379500608611";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text_image";
google_ad_channel ="9424863262";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2006/01/20-eigenschaften-erfolgreicher-menschen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Hibernate &#8211; A Developers Notebook&#8221; &#8211; migrating to Hibernate 3.0, Chapter 8</title>
		<link>http://www.epischel.de/wordpress/2005/12/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-8/</link>
		<comments>http://www.epischel.de/wordpress/2005/12/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-8/#comments</comments>
		<pubDate>Fri, 23 Dec 2005 22:31:20 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Bücher]]></category>
		<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=39</guid>
		<description><![CDATA[Chapter 8 introduces Criteria Queries. Only QueryTest.java is affected. Besides the usual net.sf.hibernate to org.hibernate package import renaming, net.sf.hibernate.expressions in Hibernate 2 is replaced by org.hibernate.criterion. Moreover, change the line PLAIN TEXT JAVA: &#160; Example example = Example.create&#40;new Artist&#40;namePattern, null, null&#41;&#41;; &#160; to PLAIN TEXT JAVA: &#160; Artist artist = new Artist&#40;&#41;; artist.setName&#40;namePattern&#41;; Example example [...]]]></description>
			<content:encoded><![CDATA[<p>Chapter 8 introduces Criteria Queries. Only <code>QueryTest.java</code> is affected. Besides the usual <code>net.sf.hibernate</code> to <code>org.hibernate</code> package import renaming, <code>net.sf.hibernate.expressions</code> in Hibernate 2 is replaced by <code>org.hibernate.criterion</code>.</p>
<p>Moreover, change the line</p>
<div class="igBar"><a href="javascript:showCodeTxt('java-3');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVA:</span>
<div id="java-3">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">Example example = Example.<span style="color: #006600;">create</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Artist<span style="color:#006600; font-weight:bold;">&#40;</span>namePattern, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #000000; font-weight: bold;">null</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>to</p>
<div class="igBar"><a href="javascript:showCodeTxt('java-4');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVA:</span>
<div id="java-4">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">Artist artist = <span style="color: #000000; font-weight: bold;">new</span> Artist<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">artist.<span style="color: #006600;">setName</span><span style="color:#006600; font-weight:bold;">&#40;</span>namePattern<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">Example example = Example.<span style="color: #006600;">create</span><span style="color:#006600; font-weight:bold;">&#40;</span>artist<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>because Hibernate 3 has generated no argument constructors only.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2005/12/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Hibernate &#8211; A Developers Notebook&#8221; &#8211; migrating to Hibernate 3.0, Chapter 7</title>
		<link>http://www.epischel.de/wordpress/2005/11/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-6-2/</link>
		<comments>http://www.epischel.de/wordpress/2005/11/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-6-2/#comments</comments>
		<pubDate>Fri, 04 Nov 2005 18:26:20 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Bücher]]></category>
		<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=34</guid>
		<description><![CDATA[Chapter 7 is working in Hibernate 3 (as opposed to chapter 6). The most challanging in this chapter migrationwise are StereoVolumeType.java and SourceMediaType.java . Change the import-package names. The Usertype-stuff is now under the package "org.hibernate.usertype". It won't compile, yet as there are some methods missing. For SourceMediaType.java: PLAIN TEXT JAVA: &#160; public Object replace&#40;Object [...]]]></description>
			<content:encoded><![CDATA[<p>Chapter 7 is working in Hibernate 3 (as opposed to chapter 6). The most challanging in this chapter migrationwise are StereoVolumeType.java and SourceMediaType.java . Change the import-package names. The Usertype-stuff is now under the package "org.hibernate.usertype". It won't compile, yet as there are some methods missing. For SourceMediaType.java:</p>
<div class="igBar"><a href="javascript:showCodeTxt('java-7');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVA:</span>
<div id="java-7">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> replace<span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> original, <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> target, <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> owner<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">throws</span> HibernateException <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> original;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3ASerializable+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Serializable</span></a> disassemble<span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> value<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> <span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ASerializable+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Serializable</span></a><span style="color:#006600; font-weight:bold;">&#41;</span> deepCopy<span style="color:#006600; font-weight:bold;">&#40;</span>value<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> assemble<span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ASerializable+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Serializable</span></a> cached,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> owner<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Our value type happens to be serializable, so we have an easy out.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> deepCopy<span style="color:#006600; font-weight:bold;">&#40;</span>cached<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">int</span> hashCode<span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> o<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color: #000000; font-weight: bold;">return</span> o.<span style="color: #006600;">hashCode</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>For StereoVolumeType.java:</p>
<div class="igBar"><a href="javascript:showCodeTxt('java-8');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVA:</span>
<div id="java-8">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> replace<span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> original, <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> target,SessionImplementor session,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> owner<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">throws</span> HibernateException <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> deepCopy<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span>StereoVolumeType<span style="color:#006600; font-weight:bold;">&#41;</span>original<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">int</span> hashCode<span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> o<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color: #000000; font-weight: bold;">return</span> o.<span style="color: #006600;">hashCode</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> replace<span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> original, <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> target, <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> owner<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">throws</span> HibernateException <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> original;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>That's it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2005/11/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-6-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Hibernate &#8211; A Developers Notebook&#8221; &#8211; migrating to Hibernate 3.0, Chapter 6</title>
		<link>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-6/</link>
		<comments>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-6/#comments</comments>
		<pubDate>Mon, 26 Sep 2005 08:47:27 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Bücher]]></category>
		<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=30</guid>
		<description><![CDATA[You can skip the entire chapter 6 if you use Hibernate 3. It is based on the interface PersistenceEnum which already became deprecated in Hibernate 2 as the author points out in the errata. The interface has apparently removed in Hibernate 3.]]></description>
			<content:encoded><![CDATA[<p>You can skip the entire chapter 6 if you use Hibernate 3. It is based on the interface <code>PersistenceEnum</code> which already became deprecated in Hibernate 2 as the author points out in the <a href="http://www.oreilly.com/catalog/hibernate/errata/hibernate.confirmed">errata</a>. The interface has apparently removed in Hibernate 3.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Hibernate &#8211; A Developers Notebook&#8221; &#8211; migrating to Hibernate 3.0, Chapter 5</title>
		<link>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-5/</link>
		<comments>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-5/#comments</comments>
		<pubDate>Mon, 26 Sep 2005 08:44:37 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Bücher]]></category>
		<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=29</guid>
		<description><![CDATA[As in chapter 4, copy the hbm.xml-files and change the DTD-reference. Leave CreateTest.java, QueryTest.java and QueryTest2.java alone - they will still compile. Copy the AlbumTest.java file, change the hibernate-imports and the constructor calls as well as int parameters to Integer. This should be easy as we have done that before.]]></description>
			<content:encoded><![CDATA[<p>As in chapter 4, copy the hbm.xml-files and change the DTD-reference. Leave <code>CreateTest.java</code>, <code>QueryTest.java </code>and <code>QueryTest2.java</code> alone - they will still compile. Copy the <code>AlbumTest.java</code> file, change the hibernate-imports and the constructor calls as well as int parameters to <code>Integer</code>.</p>
<p>This should be easy as we have done that before.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Hibernate &#8211; A Developers Notebook&#8221; &#8211; migrating to Hibernate 3.0, Chapter 4</title>
		<link>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-4/</link>
		<comments>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-4/#comments</comments>
		<pubDate>Thu, 15 Sep 2005 15:26:12 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Bücher]]></category>
		<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=28</guid>
		<description><![CDATA[In this chapter, we add an Entity called "Artist" as well as an entity called "Comments". Copy both Track.hbm.xml and Artist.hbm.xml from the examples-distribution and remember to change the DTD-reference if necessary. When using "ant schema", SAX complained it couldn't find ${src.root}/com/oreilly/hh/hibernate-mapping-2.0.dtd for Artist.hbm.xml. That's strange because it didn't complain about it in Track.hbm.xml before. [...]]]></description>
			<content:encoded><![CDATA[<p>In this chapter, we add an Entity called "Artist" as well as an entity called "Comments".</p>
<p>Copy both <code>Track.hbm.xml</code> and <code>Artist.hbm.xml</code> from the examples-distribution and remember to change the DTD-reference if necessary.<br />
When using "<code>ant schema</code>", SAX complained it couldn't find <code>${src.root}/com/oreilly/hh/hibernate-mapping-2.0.dtd</code> for <code>Artist.hbm.xml</code>.<br />
That's strange because it didn't complain about it in <code>Track.hbm.xml</code> before. However, I place the DTD file in <code>${src.root}/com/oreilly/hh</code><br />
and the prepare-target now copies <code>*.dtd</code> file, too.</p>
<p>The code generation is no problem. I has changed <code>CreateTest.java</code> again according to Java-beans coding style.<br />
The package name in <code>QueryTest.java</code> and <code>QueryTest2.java</code> needs to be changed again from "<code>net.sf.hibernate...</code>" to "<code>org.hibernate...</code>" and everything works.</p>
<p>So that's it for chapter 4. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Hibernate &#8211; A Developers Notebook&#8221; &#8211; migrating to Hibernate 3.0, Chapter 3</title>
		<link>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-3/</link>
		<comments>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-3/#comments</comments>
		<pubDate>Thu, 08 Sep 2005 16:07:10 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Bücher]]></category>
		<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=25</guid>
		<description><![CDATA[In chapter 3 (you can read it online) we use the Track table to insert some data and to query data. We use CreateTest to create and QueryTest to query data. Some simple adaptions are necessary: change package name of hibernate classes to org.hibernate replace the use of the all-attributes-as-parameters-constructor with Java-Bean style use of [...]]]></description>
			<content:encoded><![CDATA[<p>In chapter 3 (you can <a href="http://www.oreilly.com/catalog/hibernate/chapter/ch03.pdf">read it online</a>) we use the Track table to insert some data and to query data.</p>
<p>We use CreateTest to create and QueryTest to query data. Some simple adaptions are necessary:</p>
<ul>
<li>change package name of hibernate classes to org.hibernate</li>
<li>replace the use of the all-attributes-as-parameters-constructor with Java-Bean style use of empty constructors and setters</li>
<li>change the type of "volume" attribute from short to java.lang.Short</li>
</ul>
<p>Here is the changed part of CreateTest.java:</p>
<div class="igBar"><a href="javascript:showCodeTxt('java-11');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVA:</span>
<div id="java-11">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<a href="http://www.google.com/search?q=allinurl%3ATrack+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Track</span></a> track = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ATrack+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Track</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setTitle</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"Russian Trance"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setFilePath</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"vol2/album610/track02.mp3"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setPlayTime</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ATime+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Time</span></a>.<span style="color: #006600;">valueOf</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"00:03:30"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setAdded</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ADate+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Date</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setVolume</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AShort+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Short</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #993333;">short</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;session.<span style="color: #006600;">save</span><span style="color:#006600; font-weight:bold;">&#40;</span>track<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ATrack+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Track</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setTitle</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"Video Killed the Radio Star"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setFilePath</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"vol2/album611/track12.mp3"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setPlayTime</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ATime+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Time</span></a>.<span style="color: #006600;">valueOf</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"00:03:49"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setAdded</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ADate+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Date</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setVolume</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AShort+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Short</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #993333;">short</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;session.<span style="color: #006600;">save</span><span style="color:#006600; font-weight:bold;">&#40;</span>track<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ATrack+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Track</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setTitle</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"Gravity's Angel"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setFilePath</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"vol2/album175/track03.mp3"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setPlayTime</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ATime+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Time</span></a>.<span style="color: #006600;">valueOf</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"00:06:06"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setAdded</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ADate+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Date</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;track.<span style="color: #006600;">setVolume</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AShort+java.sun.com&#038;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Short</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #993333;">short</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;session.<span style="color: #006600;">save</span><span style="color:#006600; font-weight:bold;">&#40;</span>track<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>QueryTest needs only substitution of hibernate package names.</p>
<p>I also created a ant-target called "clean-db" which deletes the entire schema in order to avoid multiple insertion of the same data as well as an ant-target called "clean" which simply deletes the "classes"-folder.</p>
<div class="igBar"><a href="javascript:showCodeTxt('xml-12');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">XML:</span>
<div id="xml-12">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"clean-db"</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">"deletes schema of DB."</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;delete<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">"${data.dir}"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"**/*"</span><span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/fileset<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/delete<span style="font-weight: bold; color: black;">&gt;</span></span></span>&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"clean"</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">"clean ${class.root}"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">"${class.root}"</span><span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span>&nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>So now you can say</p>
<pre>
  ant clean-db clean schema codegen ctest qtest
</pre>
<p>and you get a clean db with a new schema, freshly generated code, test data generation and query test - in one command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2005/09/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Hibernate &#8211; A Developers Notebook&#8221; &#8211; migrating to Hibernate 3.0, Chapter 2</title>
		<link>http://www.epischel.de/wordpress/2005/09/%e2%80%9chibernate-a-developers-notebook%e2%80%9d-migrating-to-hibernate-30-chapter-2/</link>
		<comments>http://www.epischel.de/wordpress/2005/09/%e2%80%9chibernate-a-developers-notebook%e2%80%9d-migrating-to-hibernate-30-chapter-2/#comments</comments>
		<pubDate>Tue, 06 Sep 2005 13:45:31 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Bücher]]></category>
		<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=24</guid>
		<description><![CDATA[This is chapter 2 of rewriting the examples of O'Reillys book "Hibernate - A Developers Notebook" for using Hibernate 3.0 instead of Hibernate 2.x . To get the context, read chapter 1. The goal of chapter 2 is to write a hbm file for a single table, generating the corresponding java file and compile it. [...]]]></description>
			<content:encoded><![CDATA[<p>This is chapter 2 of rewriting the examples of O'Reillys book "Hibernate - A Developers Notebook" for using <a href="http://www.hibernate.org">Hibernate</a> 3.0 instead of Hibernate 2.x . To get the context, read <a href="http://www.epischel.de/wordpress/?p=23">chapter 1</a>.</p>
<p>The goal of chapter 2 is to write a hbm file for a single table, generating the corresponding java file and compile it.</p>
<p>A main difference when using Hibernate 3.0 is the ant task definition for hbm2java. It now looks like this:</p>
<div class="igBar"><a href="javascript:showCodeTxt('xml-16');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">XML:</span>
<div id="xml-16">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;taskdef</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"hibernatetool"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">classname</span>=<span style="color: #ff0000;">"org.hibernate.tool.ant.HibernateToolTask"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">classpathref</span>=<span style="color: #ff0000;">"project.class.path"</span><span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"codegen"</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">"prepare"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">description</span>=<span style="color: #ff0000;">"Generate Java source from the O/R mapping files"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;hibernatetool</span> <span style="color: #000066;">destdir</span>=<span style="color: #ff0000;">"${source.root}"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;configuration</span> <span style="color: #000066;">propertyFile</span>=<span style="color: #ff0000;">"${source.root}/hibernate.properties"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">"${source.root}"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"**/*.hbm.xml"</span><span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/fileset<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/configuration<span style="font-weight: bold; color: black;">&gt;</span></span></span>&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;hbm2java</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/hibernatetool<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Also, the package-name of the schemaexport-task has changed:</p>
<div class="igBar"><a href="javascript:showCodeTxt('xml-17');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">XML:</span>
<div id="xml-17">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;taskdef</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"schemaexport"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">classname</span>=<span style="color: #ff0000;">"org.hibernate.tool.hbm2ddl.SchemaExportTask"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">classpathref</span>=<span style="color: #ff0000;">"project.class.path"</span><span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Another difference is the jdbc-url for HSQLDB 1.8. You have to insert "file" as in:</p>
<pre>
jdbc:hsqldb:file:${data.dir}/music
</pre>
<p>(in ant task "db") or</p>
<pre>
jdbc:hsqldb:file:data/music
</pre>
<p>in hibernate.properties</p>
<p>I developed offline so I ran into the problem that the XML parser wants to download the mapping-dtd as advertised in the DOCTYPE-section of the hbm.xml file. I stripped off the http://www.hibernate.org part of the url, downloaded the dtd and placed it in the root-directory.</p>
<p>After using Ant 1.6, everything worked fine. (Otherwise I got:</p>
<div class="igBar"><a href="javascript:showCodeTxt('java-18');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVA:</span>
<div id="java-18">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">java.<span style="color: #006600;">lang</span>.<span style="color: #006600;">NoSuchMethodError</span>: org.<span style="color: #006600;">apache</span>.<span style="color: #006600;">tools</span>.<span style="color: #006600;">ant</span>.<span style="color: #006600;">Project</span>.<span style="color: #006600;">createClassLoader</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#40;</span>Lorg/apache/tools/ant/types/Path;<span style="color:#006600; font-weight:bold;">&#41;</span>Lorg/apache/tools/ant/AntClassLoader;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; at org.<span style="color: #006600;">hibernate</span>.<span style="color: #006600;">tool</span>.<span style="color: #006600;">ant</span>.<span style="color: #006600;">HibernateToolTask</span>.<span style="color: #006600;">execute</span><span style="color:#006600; font-weight:bold;">&#40;</span>HibernateToolTask.<span style="color: #006600;">java</span>:<span style="color:#800000;">113</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span>...</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>The generated code reveals some differences:</p>
<ul>
<li>The type of the volume attribute is java.lang.Short, not short "as advertised". This is because of the xml-attribute "not-null" set to null. However if you ommit this xml-attribute, java.lang.Short is used again.
</li>
<li>There is no all-attributes-as-parameters-constructor.</li>
<li>
There is no equals and no hash-code implementation.</li>
</ul>
<p>I have not yet any idea about why's that. Comments are welcome. Point 2 + 3 might be because different code templates.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2005/09/%e2%80%9chibernate-a-developers-notebook%e2%80%9d-migrating-to-hibernate-30-chapter-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
