锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美劲爆第一页,成人精品国产,欧美性生交xxxxxddddhttp://www.aygfsteel.com/javaren/category/27716.html涓璧鋒潵鐮旂┒javazh-cnSun, 02 Dec 2007 06:06:38 GMTSun, 02 Dec 2007 06:06:38 GMT60鐢╤bm2java緇檖ojo澧炲姞serialVersionUID鐨勫皬鎶宸?/title><link>http://www.aygfsteel.com/javaren/articles/164629.html</link><dc:creator>Terry Lee</dc:creator><author>Terry Lee</author><pubDate>Sun, 02 Dec 2007 05:54:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaren/articles/164629.html</guid><wfw:comment>http://www.aygfsteel.com/javaren/comments/164629.html</wfw:comment><comments>http://www.aygfsteel.com/javaren/articles/164629.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaren/comments/commentRss/164629.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaren/services/trackbacks/164629.html</trackback:ping><description><![CDATA[Hibernate 3.2.x 宸ュ叿涓環(huán)bm2java鐢熸垚鐨刾ojo綾繪繪槸綾諱技涓嬮潰錛?br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img id="Codehighlighter1_52_393_Open_Image" onclick="this.style.display='none'; Codehighlighter1_52_393_Open_Text.style.display='none'; Codehighlighter1_52_393_Closed_Image.style.display='inline'; Codehighlighter1_52_393_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_52_393_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_52_393_Closed_Text.style.display='none'; Codehighlighter1_52_393_Open_Image.style.display='inline'; Codehighlighter1_52_393_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> Child  </span><span style="color: #0000ff">implements</span><span style="color: #000000"> java.io.Serializable </span><span id="Codehighlighter1_52_393_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_52_393_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000"> cid;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> String childName;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img id="Codehighlighter1_130_161_Open_Image" onclick="this.style.display='none'; Codehighlighter1_130_161_Open_Text.style.display='none'; Codehighlighter1_130_161_Closed_Image.style.display='inline'; Codehighlighter1_130_161_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_130_161_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_130_161_Closed_Text.style.display='none'; Codehighlighter1_130_161_Open_Image.style.display='inline'; Codehighlighter1_130_161_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000"> getCid() </span><span id="Codehighlighter1_130_161_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_130_161_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.cid;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_195_225_Open_Image" onclick="this.style.display='none'; Codehighlighter1_195_225_Open_Text.style.display='none'; Codehighlighter1_195_225_Closed_Image.style.display='inline'; Codehighlighter1_195_225_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_195_225_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_195_225_Closed_Text.style.display='none'; Codehighlighter1_195_225_Open_Image.style.display='inline'; Codehighlighter1_195_225_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> setCid(</span><span style="color: #0000ff">int</span><span style="color: #000000"> cid) </span><span id="Codehighlighter1_195_225_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_195_225_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.cid </span><span style="color: #000000">=</span><span style="color: #000000"> cid;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_260_297_Open_Image" onclick="this.style.display='none'; Codehighlighter1_260_297_Open_Text.style.display='none'; Codehighlighter1_260_297_Closed_Image.style.display='inline'; Codehighlighter1_260_297_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_260_297_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_260_297_Closed_Text.style.display='none'; Codehighlighter1_260_297_Open_Image.style.display='inline'; Codehighlighter1_260_297_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> String getChildName() </span><span id="Codehighlighter1_260_297_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_260_297_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.childName;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000">   <br /> <img id="Codehighlighter1_349_391_Open_Image" onclick="this.style.display='none'; Codehighlighter1_349_391_Open_Text.style.display='none'; Codehighlighter1_349_391_Closed_Image.style.display='inline'; Codehighlighter1_349_391_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_349_391_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_349_391_Closed_Text.style.display='none'; Codehighlighter1_349_391_Open_Image.style.display='inline'; Codehighlighter1_349_391_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> setChildName(String childName) </span><span id="Codehighlighter1_349_391_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_349_391_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.childName </span><span style="color: #000000">=</span><span style="color: #000000"> childName;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span></div> <p>浣嗘槸濡傛灉浣犱嬌鐢↗DK5.0鎴栨洿楂樼増鏈椂錛屾繪槸璀﹀憡璇ョ被緙哄皯涓?font face="瀹?huà)浣?><strong>static final long serialVersionUID</strong>錛屽浣曟墠鑳藉湪hbm2java鐢熸垚java婧愪唬鐮佹椂鑷姩鍔犱笂鍛紵榪欏氨瑕佷慨鏀筯ibernate-tools.jar涓嚜甯︾殑pojo妯℃澘浜?jiǎn)銆?/font></p> <p>棣栧厛錛屼綘灝唄ibernate-toosl.jar涓殑pojo/Pojo.ftl鏂囦歡瑙e帇鍑烘潵錛屽湪<font face="瀹?huà)浣?><#if !pojo.isInterface()>鐨勪笅涓琛屽鍔狅細(xì)</font>static final long serialVersionUID = 1L;澧炲姞鍚庢暣涓狿ojo.ftl鏂囦歡鍐呭搴旇鏄繖鏍鳳細(xì)</p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img id="Codehighlighter1_1_30_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1_30_Open_Text.style.display='none'; Codehighlighter1_1_30_Closed_Image.style.display='inline'; Codehighlighter1_1_30_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1_30_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1_30_Closed_Text.style.display='none'; Codehighlighter1_1_30_Open_Image.style.display='inline'; Codehighlighter1_1_30_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /><span style="color: #000000">$</span><span id="Codehighlighter1_1_30_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1_30_Open_Text"><span style="color: #000000">{pojo.getPackageDeclaration()}</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #008000">//</span><span style="color: #008000"> Generated ${date} by Hibernate Tools ${version}</span><span style="color: #008000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#assign classbody</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img id="Codehighlighter1_142_494_Open_Image" onclick="this.style.display='none'; Codehighlighter1_142_494_Open_Text.style.display='none'; Codehighlighter1_142_494_Closed_Image.style.display='inline'; Codehighlighter1_142_494_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_142_494_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_142_494_Closed_Text.style.display='none'; Codehighlighter1_142_494_Open_Image.style.display='inline'; Codehighlighter1_142_494_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">PojoTypeDeclaration.ftl</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"> </span><span id="Codehighlighter1_142_494_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_142_494_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#</span><span style="color: #0000ff">if</span><span style="color: #000000"> </span><span style="color: #000000">!</span><span style="color: #000000">pojo.isInterface()</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">final</span><span style="color: #000000"> </span><span style="color: #0000ff">long</span><span style="color: #000000"> serialVersionUID </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1L</span><span style="color: #000000">;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">PojoFields.ftl</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">PojoConstructors.ftl</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />  <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">PojoPropertyAccessors.ftl</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">PojoToString.ftl</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">PojoEqualsHashcode.ftl</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#</span><span style="color: #0000ff">else</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">PojoInterfacePropertyAccessors.ftl</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"></</span><span style="color: #000000">#</span><span style="color: #0000ff">if</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">PojoExtraClassCode.ftl</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #000000"></</span><span style="color: #000000">#assign</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img id="Codehighlighter1_509_532_Open_Image" onclick="this.style.display='none'; Codehighlighter1_509_532_Open_Text.style.display='none'; Codehighlighter1_509_532_Closed_Image.style.display='inline'; Codehighlighter1_509_532_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_509_532_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_509_532_Closed_Text.style.display='none'; Codehighlighter1_509_532_Open_Image.style.display='inline'; Codehighlighter1_509_532_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" />$</span><span id="Codehighlighter1_509_532_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_509_532_Open_Text"><span style="color: #000000">{pojo.generateImports()}</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_535_545_Open_Image" onclick="this.style.display='none'; Codehighlighter1_535_545_Open_Text.style.display='none'; Codehighlighter1_535_545_Closed_Image.style.display='inline'; Codehighlighter1_535_545_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_535_545_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_535_545_Closed_Text.style.display='none'; Codehighlighter1_535_545_Open_Image.style.display='inline'; Codehighlighter1_535_545_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" />$</span><span id="Codehighlighter1_535_545_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_535_545_Open_Text"><span style="color: #000000">{classbody}</span></span></div> <br /> <p>鐒跺悗灝嗘Pojo.ftl鏂囦歡瑕嗙洊hibernate-tools.jar鍘嬬緝鍖呬腑鐨勫嵆鍙?/p> <p>鏈鍚庯紝鍐嶆榪愯浣犵殑ant錛宐uild.xml涓嶉渶瑕佷慨鏀圭敓鎴愮殑綾誨氨鑷姩鏈変簡(jiǎn)錛歴tatic final long serialVersionUID = 1L;<br /> 鍛靛懙錛屽緢濂界帺鍚с傛垜浠繕鍙互鍦≒ojo.ftl妯℃澘鏂囦歡涓鍔犲叾浠栬嚜宸遍渶瑕佺殑浠g爜浜?jiǎn)锛?/p> <img src ="http://www.aygfsteel.com/javaren/aggbug/164629.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaren/" target="_blank">Terry Lee</a> 2007-12-02 13:54 <a href="http://www.aygfsteel.com/javaren/articles/164629.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>hibernate 3.2.5 浣跨敤hbm鏄犲皠鏂囦歡鏉ョ敓鎴恓ava婧愪唬鐮佸拰ddl鑴氭湰http://www.aygfsteel.com/javaren/articles/164626.htmlTerry LeeTerry LeeSun, 02 Dec 2007 05:41:00 GMThttp://www.aygfsteel.com/javaren/articles/164626.htmlhttp://www.aygfsteel.com/javaren/comments/164626.htmlhttp://www.aygfsteel.com/javaren/articles/164626.html#Feedback0http://www.aygfsteel.com/javaren/comments/commentRss/164626.htmlhttp://www.aygfsteel.com/javaren/services/trackbacks/164626.htmlHibernate 3.2.x鍜?.x鐢熸垚java婧愪唬鐮佸拰ddl鑴氭湰鐨勬柟娉曞樊涓嶅錛屼絾鏄嬌鐢ㄧ殑hibernate綾誨寘鍙樻柊鐨勪簡(jiǎn)錛?
org.hibernate.tool.ant.HibernateToolTask

涓嬮潰鏄痓uild.xml鏂囦歡涓湁鍏崇殑涓孌碉細(xì)

<!-- Generate the java code for all
  
-- mapping files in our source tree -->
<target name="hbm2java" depends="prepare"
    description
="Generate Java source">
    
<taskdef name="hibernatetool"
       classname
="org.hibernate.tool.ant.HibernateToolTask"
       classpathref
="project.class.path"/>
    
<hibernatetool destdir="${src}">
      
<configuration
          configurationfile
="${bin}/hibernate.cfg.xml"/>
      
<hbm2java jdk5="true"/>
    
</hibernatetool>
</target>
<!-- create ddl form  *.hbm.xml -->
<target name="hbm2ddl" depends="prepare"
  description
="Generate DB schema from the O/R mapping files">
    
<taskdef name="hibernatetool"
      classname
="org.hibernate.tool.ant.HibernateToolTask"
      classpathref
="project.class.path"/>
    
<hibernatetool destdir="${sql}">
       
<configuration
         configurationfile
="${bin}/hibernate.cfg.xml"/>
       
<hbm2ddl export="false" outputfilename="ddl.sql"/>
    
</hibernatetool>
</target>
鍏朵腑錛?
<hbm2java jdk5="true"/>琛ㄧず鐢熸垚鐨刯ava婧愭枃浠舵槸1.5浠ュ悗鐨勭増鏈?

Terry Lee 2007-12-02 13:41 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 岐山县| 厦门市| 共和县| 葫芦岛市| 名山县| 侯马市| 洛隆县| 左云县| 泸溪县| 独山县| 双江| 诏安县| 平昌县| 平凉市| SHOW| 林甸县| 灵石县| 克山县| 江安县| 连州市| 隆安县| 陆丰市| 仁布县| 长寿区| 大邑县| 拜泉县| 镇巴县| 汝州市| 弋阳县| 海淀区| 开阳县| 龙海市| 梓潼县| 迁安市| 平顶山市| 清苑县| 常山县| 罗甸县| 河北区| 冀州市| 繁昌县|