﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Zhu Jun's Tech Weblog-随笔分类-开源项目</title><link>http://www.blogjava.net/Johncn/category/5522.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 12:37:18 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 12:37:18 GMT</pubDate><ttl>60</ttl><item><title>[Struts] 使用多个资源文件</title><link>http://www.blogjava.net/Johncn/archive/2006/01/07/27021.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Sat, 07 Jan 2006 12:46:00 GMT</pubDate><guid>http://www.blogjava.net/Johncn/archive/2006/01/07/27021.html</guid><wfw:comment>http://www.blogjava.net/Johncn/comments/27021.html</wfw:comment><comments>http://www.blogjava.net/Johncn/archive/2006/01/07/27021.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Johncn/comments/commentRss/27021.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Johncn/services/trackbacks/27021.html</trackback:ping><description><![CDATA[<FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 项目中实现多语言国际化都是通过使用&lt;bean:message&gt;标签和资源文件,但是如果把所有的页面说明都加入一个资源文件中,通常的后果是这个文件会越来越长,而且开发中不同的人加入的格式也不一直,到最后很可能是谁也不知道到底资源文件中有些什么内容,如果有新的开发人员加入的话,很可能只好再自己需要用到什么再继续加进文件.最后维护这样的文件变成很痛苦的事情.<BR>&nbsp;&nbsp;&nbsp; 所以想要使用多个资源文件,这样可以根据不同的划分规则(功能,位置,词性)将不同的内容放入不同的文件,方便维护.<BR>具体的做法:<BR><STRONG>1.创建属性文件并且在struts-config.xml中为每一个文件声明一个message-resources元素。</STRONG><BR></FONT>
<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"><FONT face=Arial><FONT size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">&lt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #800000">message-resources<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #ff0000">parameter</SPAN><SPAN style="COLOR: #0000ff">="com.oreilly.strutsckbk.MessageResources"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #0000ff"><FONT face=Arial size=2>&lt;</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #800000">message-resources&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #ff0000">parameter</SPAN><SPAN style="COLOR: #0000ff">="com.oreilly.strutsckbk.LabelResources"</SPAN></FONT></FONT><SPAN style="COLOR: #ff0000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;key</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">="labels"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">message-resources</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #0000ff"><FONT face=Arial size=2>&lt;</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #800000">message-resources&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #ff0000">parameter</SPAN><SPAN style="COLOR: #0000ff">="com.oreilly.strutsckbk.HeaderResources"</SPAN></FONT></FONT><SPAN style="COLOR: #ff0000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;key</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">="headers"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">message-resources</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT></DIV><FONT face=Arial><FONT size=2><STRONG>注意</STRONG>:这里多了一个属性<STRONG>key</STRONG>,这就是用来在页面标签中区分不同的资源文件的,标签默认是使用没有说明<STRONG>key</STRONG>值的那个资源文件.<BR><BR><STRONG>2.使用&lt;bean:message&gt;标签:</STRONG><BR></FONT></FONT>
<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"><FONT face=Arial><FONT size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">bean:message&nbsp;</SPAN><SPAN style="COLOR: #ff0000">bundle</SPAN><SPAN style="COLOR: #0000ff">="labels"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;key</SPAN><SPAN style="COLOR: #0000ff">="label.url"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN></FONT></FONT></DIV><FONT face=Arial size=2>注意:这里的<STRONG>bundle</STRONG>属性就是用来指明上面提到的<STRONG>key</STRONG>属性的,以表明这个&lt;bean:message&gt;标签是要使用哪个资源文件.<BR><BR>说明:只能在struts1.1以上版本使用多个资源文件,struts1.0不支持&lt;message-resource&gt;属性,所以不能实现上面的用法.</FONT><img src ="http://www.blogjava.net/Johncn/aggbug/27021.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Johncn/" target="_blank">ZhuJun</a> 2006-01-07 20:46 <a href="http://www.blogjava.net/Johncn/archive/2006/01/07/27021.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[Tomcat] 修改Tomcat端口号</title><link>http://www.blogjava.net/Johncn/archive/2006/01/02/26406.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Mon, 02 Jan 2006 15:42:00 GMT</pubDate><guid>http://www.blogjava.net/Johncn/archive/2006/01/02/26406.html</guid><wfw:comment>http://www.blogjava.net/Johncn/comments/26406.html</wfw:comment><comments>http://www.blogjava.net/Johncn/archive/2006/01/02/26406.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Johncn/comments/commentRss/26406.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Johncn/services/trackbacks/26406.html</trackback:ping><description><![CDATA[<DIV class=postcontent>
<P><FONT face=Arial size=2>安装了Oracle后,启动Tomcat时出现错误:</FONT></P>
<P><FONT face=Arial color=#ff0000 size=2>Error starting endpoint<BR>java.net.BindException: Address already in use: JVM_Bind:8080</FONT></P>
<P><FONT face=Arial color=#000000 size=2>原来Oracle的Servlet Engine也使用了8080端口.那就来修改Tomcat的端口:</FONT></P>
<P><FONT face=Arial size=2>首相找到<FONT color=#0000cc>Tomcat 5.0\conf\server.xml</FONT>文件,然后找到下面的代码:<BR></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 src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;port="8080"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maxThreads="150"&nbsp;minSpareThreads="25"&nbsp;maxSpareThreads="75"<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enableLookups="false"&nbsp;redirectPort="8443"&nbsp;acceptCount="100"<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug="0"&nbsp;connectionTimeout="20000"&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;disableUploadTimeout="true"&nbsp;/&gt;</SPAN></DIV>
<P></FONT><FONT face=Arial size=2>修改&nbsp;port="8080" 为你想要的端口就可以了.</FONT></P></DIV><img src ="http://www.blogjava.net/Johncn/aggbug/26406.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Johncn/" target="_blank">ZhuJun</a> 2006-01-02 23:42 <a href="http://www.blogjava.net/Johncn/archive/2006/01/02/26406.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[Velocity] Velocity 参考资料</title><link>http://www.blogjava.net/Johncn/archive/2006/01/02/26400.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Mon, 02 Jan 2006 15:25:00 GMT</pubDate><guid>http://www.blogjava.net/Johncn/archive/2006/01/02/26400.html</guid><wfw:comment>http://www.blogjava.net/Johncn/comments/26400.html</wfw:comment><comments>http://www.blogjava.net/Johncn/archive/2006/01/02/26400.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Johncn/comments/commentRss/26400.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Johncn/services/trackbacks/26400.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Velocity 参考资料 John Zhu 2005-4-7 &nbsp;原文:http://jakarta.apache.org/velocity/user-guide.html VTL Reference: http://jakarta.apache.org/velocity/vtl-reference-guide.html Develop...&nbsp;&nbsp;<a href='http://www.blogjava.net/Johncn/archive/2006/01/02/26400.html'>阅读全文</a><img src ="http://www.blogjava.net/Johncn/aggbug/26400.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Johncn/" target="_blank">ZhuJun</a> 2006-01-02 23:25 <a href="http://www.blogjava.net/Johncn/archive/2006/01/02/26400.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[Eclipse] 在Eclipse中安装Visual Editor插件</title><link>http://www.blogjava.net/Johncn/archive/2006/01/02/26398.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Mon, 02 Jan 2006 15:22:00 GMT</pubDate><guid>http://www.blogjava.net/Johncn/archive/2006/01/02/26398.html</guid><wfw:comment>http://www.blogjava.net/Johncn/comments/26398.html</wfw:comment><comments>http://www.blogjava.net/Johncn/archive/2006/01/02/26398.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Johncn/comments/commentRss/26398.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Johncn/services/trackbacks/26398.html</trackback:ping><description><![CDATA[<DIV class=postcontent><FONT face=Arial size=2>在Eclipse中进行GUI开发需要安装Visual Editor插件:<BR>1.Install Omondo UML(包括了VE插件所需要的EMF,GEF,还包括UML2插件):<BR></FONT>
<UL>
<LI><FONT face=Arial size=2>到</FONT><A href="http://www.omondo.com/download/index.html"><FONT face=Arial color=#002c99 size=2>http://www.omondo.com/download/index.html</FONT></A><FONT face=Arial size=2>下载eclipseUML_E302_freeEdition_2.0.0.20050407.jar; </FONT>
<LI><FONT face=Arial><FONT size=2>Install by <CODE><FONT face=Arial size=3>java -jar eclipseUML_E301_freeEdition_2.0.0.beta.20041026.jar</FONT>;<SPAN style="FONT-FAMILY: verdana,sans-serif"></SPAN></CODE></FONT></FONT></LI></UL><FONT size=2><FONT face=Arial><SPAN style="FONT-FAMILY: verdana,sans-serif">2.Install </SPAN>Visual Editor插件:<BR></FONT></FONT>
<UL>
<LI><FONT face=Arial size=2>到</FONT><A href="http://www.eclipse.org/vep/"><FONT face=Arial color=#002c99 size=2>http://www.eclipse.org/vep/</FONT></A><FONT face=Arial size=2>下载VE-runtime-1.0.2.1.zip; </FONT>
<LI><FONT face=Arial size=2>将VE -runtime-1.0.2.1.zip解压到c:\eclipse-plugins(可以是任何目录)下,在Eclipse的安装路径下的links 目录中建立一个link文件,比如gui.ve.link,文件内容为&nbsp;&nbsp;path=c:/eclipse-plugins/VE-runtime- 1.0.2.1, 即这个link文件要对应一个刚解压后的插件目录。(注意:此目录中应包含eclipse/(features|plugins)结构); </FONT>
<LI><FONT face=Arial size=2>启动eclipse即可,安装完成;</FONT></LI></UL>
<P><FONT face=Arial size=2>3.后期设置: </FONT></P>
<UL>
<LI><FONT face=Arial><FONT size=2><SPAN style="FONT-FAMILY: 宋体"><SPAN style="FONT-FAMILY: 宋体">点击</SPAN><SPAN lang=EN-US>Window</SPAN><SPAN style="FONT-FAMILY: 宋体">菜单，选择</SPAN><SPAN lang=EN-US>Customize Perspective…</SPAN></SPAN> </FONT></FONT>
<LI><SPAN style="FONT-FAMILY: 宋体"><SPAN lang=EN-US></SPAN></SPAN><SPAN lang=EN-US></SPAN><FONT face=Arial><FONT size=2><SPAN lang=EN-US>Submenus</SPAN><SPAN style="FONT-FAMILY: 宋体">栏目下选择</SPAN><SPAN lang=EN-US style="COLOR: blue">New</SPAN> </FONT></FONT>
<LI><FONT face=Arial><FONT size=2><SPAN lang=EN-US>Shortcut Categories</SPAN><SPAN style="FONT-FAMILY: 宋体">下选择</SPAN><SPAN lang=EN-US style="COLOR: blue">Java</SPAN> </FONT></FONT>
<LI><SPAN lang=EN-US style="COLOR: blue"></SPAN><FONT face=Arial><FONT size=2><SPAN lang=EN-US>Shortcuts</SPAN><SPAN style="FONT-FAMILY: 宋体">中在</SPAN><SPAN lang=EN-US style="COLOR: blue">Visual Class</SPAN><SPAN style="FONT-FAMILY: 宋体">前划勾</SPAN> </FONT></FONT>
<LI><FONT face=Arial><FONT size=2><SPAN lang=EN-US>Submenus</SPAN><SPAN style="FONT-FAMILY: 宋体">栏目下选择</SPAN><SPAN lang=EN-US style="COLOR: blue">Show View</SPAN> </FONT></FONT>
<LI><SPAN lang=EN-US style="COLOR: blue"></SPAN><FONT face=Arial><FONT size=2><SPAN lang=EN-US>Shortcut Categories</SPAN><SPAN style="FONT-FAMILY: 宋体">下选择</SPAN><SPAN lang=EN-US style="COLOR: blue">Basic</SPAN> </FONT></FONT>
<LI><SPAN lang=EN-US style="COLOR: blue"></SPAN><FONT face=Arial><FONT size=2><SPAN lang=EN-US>Shortcuts</SPAN><SPAN style="FONT-FAMILY: 宋体">中在</SPAN><SPAN lang=EN-US style="COLOR: blue">Palette</SPAN><SPAN style="FONT-FAMILY: 宋体">前划勾</SPAN> </FONT></FONT>
<LI><FONT face=Arial><FONT size=2><SPAN style="FONT-FAMILY: 宋体">通过菜单调出<SPAN lang=EN-US>Palette</SPAN><SPAN style="FONT-FAMILY: 宋体">：</SPAN><SPAN lang=EN-US>Window | Show View | Palette</SPAN></SPAN> </FONT></FONT>
<LI><SPAN style="FONT-FAMILY: 宋体"><SPAN lang=EN-US><FONT face=Arial><FONT size=2><SPAN style="FONT-FAMILY: 宋体">从<SPAN lang=EN-US>Menu</SPAN>打开</SPAN><SPAN lang=EN-US>Properties View<SPAN style="FONT-FAMILY: 宋体">：<SPAN lang=EN-US style="COLOR: blue">Windows | Show View | Basic | Properties</SPAN></SPAN></SPAN></FONT></FONT></SPAN></SPAN></LI></UL>
<P><FONT face=Arial size=2>好了,现在new-&gt;Visual Class就可以进行GUI的开发了.</FONT></P></DIV><img src ="http://www.blogjava.net/Johncn/aggbug/26398.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Johncn/" target="_blank">ZhuJun</a> 2006-01-02 23:22 <a href="http://www.blogjava.net/Johncn/archive/2006/01/02/26398.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[Velocity] Velocity中遇到的一个问题</title><link>http://www.blogjava.net/Johncn/archive/2006/01/02/26394.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Mon, 02 Jan 2006 15:18:00 GMT</pubDate><guid>http://www.blogjava.net/Johncn/archive/2006/01/02/26394.html</guid><wfw:comment>http://www.blogjava.net/Johncn/comments/26394.html</wfw:comment><comments>http://www.blogjava.net/Johncn/archive/2006/01/02/26394.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Johncn/comments/commentRss/26394.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Johncn/services/trackbacks/26394.html</trackback:ping><description><![CDATA[<FONT face=Arial size=2>在模板中老是访问不到对象的属性,最后发现原来是应为模板中访问的对象不是一个Public类,<FONT color=#ff3300>将Class改为Public</FONT>后一切OK.后来分析可能是因为访问权限的问题,当Class未加Public时,是包内可访问(friendly),而模板如果与对象的Class不在同一包中时自然访问不到. </FONT><img src ="http://www.blogjava.net/Johncn/aggbug/26394.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Johncn/" target="_blank">ZhuJun</a> 2006-01-02 23:18 <a href="http://www.blogjava.net/Johncn/archive/2006/01/02/26394.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[Hibernate] 为Hibernate提供JDBC连接</title><link>http://www.blogjava.net/Johncn/archive/2006/01/02/26392.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Mon, 02 Jan 2006 15:15:00 GMT</pubDate><guid>http://www.blogjava.net/Johncn/archive/2006/01/02/26392.html</guid><wfw:comment>http://www.blogjava.net/Johncn/comments/26392.html</wfw:comment><comments>http://www.blogjava.net/Johncn/archive/2006/01/02/26392.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Johncn/comments/commentRss/26392.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Johncn/services/trackbacks/26392.html</trackback:ping><description><![CDATA[<P><FONT face=Arial size=2>可以通过3钟方式为Hibernate提供JDBC连接:</FONT></P>
<P><FONT face=Arial color=#000000 size=2>1.直接提供JDBC连接对象Connection:</FONT></P>
<P><SPAN lang=EN-US style="FONT-SIZE: 8.5pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><FONT color=#000000><FONT face=Arial><FONT size=2></P>
<P></P>
<P></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 src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">Class.forName(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">com.mysql.jdbc.Driver</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>String&nbsp;url&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">jdbc:mysql://localhost:3306/HibernateTest?user=root&amp;password=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>java.sql.Connection&nbsp;conn&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;DriverManager.getConnection(url);&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>SessionFactory&nbsp;sessionFactory&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;cfg.buildSessionFactory();&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Session&nbsp;session&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sessionFactory.openSession(conn);</SPAN></DIV>
<P>2.<SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">通过属性文件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体; mso-bidi-font-size: 12.0pt">hibernate.properties</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">配置</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体; mso-bidi-font-size: 12.0pt">JDBC</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">来源:</SPAN></FONT></FONT></FONT></SPAN></P><SPAN lang=EN-US style="FONT-SIZE: 8.5pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><FONT color=#0000ff><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt"><SPAN lang=EN-US style="FONT-SIZE: 8.5pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">
<P><SPAN lang=EN-US style="FONT-SIZE: 8.5pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><FONT color=#000000><FONT face=Arial><FONT size=2></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 src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">hibernate.show_sql&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>hibernate.dialect&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;net.sf.hibernate.dialect.MySQLDialect&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>hibernate.connection.driver_class&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;com.mysql.jdbc.Driver&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>hibernate.connection.url&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;jdbc:mysql:</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">localhost/HibernateTest&nbsp;</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">hibernate.connection.username&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;root<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>hibernate.connection.password&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN></DIV>
<P>3.<SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">通<SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">过</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体; mso-bidi-font-size: 12.0pt">XML</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">文件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体; mso-bidi-font-size: 12.0pt">hibernate.cfg.xml</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">进行配置</SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">:<BR><BR></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 src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">&lt;?</SPAN><SPAN style="COLOR: #ff00ff">xml&nbsp;version='1.0'&nbsp;encoding='big5'</SPAN><SPAN style="COLOR: #0000ff">?&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;!</SPAN><SPAN style="COLOR: #ff00ff">DOCTYPE&nbsp;hibernate-configuration&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;PUBLIC&nbsp;"-//Hibernate/Hibernate&nbsp;Configuration&nbsp;DTD//EN"&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">hibernate-configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">session-factory</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;显示实际操作数据库时的SQL&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="show_sql"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">true</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">property</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;SQL方言，这边设定的是MySQL&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="dialect"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">net.sf.hibernate.dialect.MySQLDialect</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">property</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;JDBC驱动程序&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="connection.driver_class"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">com.mysql.jdbc.Driver</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">property</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;JDBC&nbsp;URL&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="connection.url"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">jdbc:mysql://localhost/HibernateTest</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">property</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;数据库使用者&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="connection.username"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">caterpillar</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">property</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;数据库密码&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="connection.password"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">123456</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">property</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;对象与数据库表格映像文件&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mapping&nbsp;</SPAN><SPAN style="COLOR: #ff0000">resource</SPAN><SPAN style="COLOR: #0000ff">="User.hbm.xml"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">session-factory</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">hibernate-configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV></SPAN></FONT></FONT></FONT></SPAN></SPAN></SPAN></FONT></SPAN><img src ="http://www.blogjava.net/Johncn/aggbug/26392.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Johncn/" target="_blank">ZhuJun</a> 2006-01-02 23:15 <a href="http://www.blogjava.net/Johncn/archive/2006/01/02/26392.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[发掘Jakarta Commons] 使用StringUtil类</title><link>http://www.blogjava.net/Johncn/archive/2005/12/27/25619.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Tue, 27 Dec 2005 11:35:00 GMT</pubDate><guid>http://www.blogjava.net/Johncn/archive/2005/12/27/25619.html</guid><wfw:comment>http://www.blogjava.net/Johncn/comments/25619.html</wfw:comment><comments>http://www.blogjava.net/Johncn/archive/2005/12/27/25619.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Johncn/comments/commentRss/25619.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Johncn/services/trackbacks/25619.html</trackback:ping><description><![CDATA[<P><FONT face=Arial size=2>org.apache.commons.lang.StringUtils中提供许多有用的字符串操作方法，了解这些方法，我们可以避免许多不必要的重复工作。下面介绍其中比较有用的几个方法：<BR><BR></FONT><STRONG><FONT face=Arial size=2>检查空字符串：<BR></FONT></P></STRONG>
<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"><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT><SPAN style="COLOR: #000000"><FONT face=Arial size=2>StringUtils.isBlank(String&nbsp;str);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>StringUtils.isNotBlank(String&nbsp;str);</FONT></SPAN></DIV>
<P><FONT face=Arial><FONT size=2><STRONG>缩写字符串：</STRONG><BR></FONT></FONT></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"><FONT face=Arial><FONT size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">String&nbsp;test&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">This&nbsp;is&nbsp;a&nbsp;test&nbsp;of&nbsp;the&nbsp;abbreviation.</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>System.out.println(&nbsp;StringUtils.abbreviate(&nbsp;test,&nbsp;</FONT></SPAN><SPAN style="COLOR: #000000"><FONT face=Arial size=2>10</FONT></SPAN><SPAN style="COLOR: #000000"><FONT face=Arial size=2>&nbsp;)&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>[Console输出]<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>This&nbsp;is<IMG src="http://www.blogjava.net/images/dot.gif"></FONT></SPAN></DIV><STRONG><FONT face=Arial size=2>查找嵌套字符串：<BR></FONT></STRONG>
<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"><FONT face=Arial><FONT size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">String&nbsp;htmlContent&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;html&gt;\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&lt;head&gt;\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;Test&nbsp;Page&lt;/title&gt;\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&lt;/head&gt;\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&lt;body&gt;\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;This&nbsp;is&nbsp;a&nbsp;TEST!&lt;/p&gt;\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&lt;/body&gt;\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;/html&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Extract&nbsp;the&nbsp;title&nbsp;from&nbsp;this&nbsp;XHTML&nbsp;content&nbsp;</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">String&nbsp;title&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;StringUtils.substringBetween(htmlContent,&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;title&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;/title&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>System.out.println(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Title:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><FONT face=Arial size=2>&nbsp;title&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>[Console输出]<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Title:&nbsp;Test&nbsp;Page</FONT></SPAN></DIV><STRONG><FONT face=Arial size=2>验证字符串：<BR></FONT></STRONG>
<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"><FONT face=Arial><FONT size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">String&nbsp;test1&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">ORANGE</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>String&nbsp;test2&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">ICE9</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>String&nbsp;test3&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">ICE&nbsp;CREAM</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>String&nbsp;test4&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">820B&nbsp;Judson&nbsp;Avenue</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">boolean</SPAN><SPAN style="COLOR: #000000">&nbsp;t1val&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;StringUtils.isAlpha(&nbsp;test1&nbsp;);&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;returns&nbsp;true</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">boolean</SPAN><SPAN style="COLOR: #000000">&nbsp;t2val&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;StringUtils.isAlphanumeric(&nbsp;test2&nbsp;);&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;returns&nbsp;true</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">boolean</SPAN><SPAN style="COLOR: #000000">&nbsp;t3val&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;StringUtils.isAlphaSpace(&nbsp;test3&nbsp;);&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;returns&nbsp;true</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">boolean</SPAN><SPAN style="COLOR: #000000">&nbsp;t4val&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;StringUtils.isAlphanumericSpace(&nbsp;test4&nbsp;);&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;returns&nbsp;true</SPAN></FONT></FONT></DIV><FONT face=Arial><FONT size=2><STRONG>计算字符串出现频率：</STRONG>StringUtils.countMatches()</FONT></FONT><A name=jakartackbk-CHP-2-ITERM-2064></A><FONT face=Arial size=2> </FONT><A name=jakartackbk-CHP-2-ITERM-2065></A><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"><FONT face=Arial><FONT size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">File&nbsp;manuscriptFile&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;File(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">manuscript.txt</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Reader&nbsp;reader&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;FileReader(&nbsp;manuscriptFile&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>StringWriter&nbsp;stringWriter&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;StringWriter(&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG id=Codehighlighter1_177_211_Open_Image onclick="this.style.display='none'; Codehighlighter1_177_211_Open_Text.style.display='none'; Codehighlighter1_177_211_Closed_Image.style.display='inline'; Codehighlighter1_177_211_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_177_211_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_177_211_Closed_Text.style.display='none'; Codehighlighter1_177_211_Open_Image.style.display='inline'; Codehighlighter1_177_211_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">(&nbsp;reader.ready(&nbsp;)&nbsp;)&nbsp;</SPAN><SPAN id=Codehighlighter1_177_211_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.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_177_211_Open_Text><SPAN style="COLOR: #000000">{&nbsp;writer.write(&nbsp;reader.read(&nbsp;)&nbsp;);&nbsp;}</SPAN></SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>String&nbsp;manuscript&nbsp;</FONT></SPAN><SPAN style="COLOR: #000000"><FONT face=Arial size=2>=</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;stringWriter.toString(&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Convert&nbsp;string&nbsp;to&nbsp;lowercase</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>manuscript&nbsp;</FONT></SPAN><SPAN style="COLOR: #000000"><FONT face=Arial size=2>=</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;StringUtils.lowerCase(manuscript);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;count&nbsp;the&nbsp;occurrences&nbsp;of&nbsp;"futility"</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;numFutility&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;StringUtils.countMatches(&nbsp;manuscript,&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">futility</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><FONT face=Arial size=2>&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN></DIV><FONT face=Arial size=2><STRONG>比较不同字符串：<BR></STRONG></FONT>
<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"><FONT face=Arial><FONT size=2><STRONG><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></STRONG><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;dist&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;StringUtils.getLevenshteinDistance(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Word</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">World</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>String&nbsp;diff&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;StringUtils.difference(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Word</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">World</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;index&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;StringUtils.indexOfDifference(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Word</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">World</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>System.out.println(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Edit&nbsp;Distance:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;dist&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>System.out.println(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Difference:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;diff&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>System.out.println(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Diff&nbsp;Index:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;index&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>[Console输出]<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Edit&nbsp;Distance:&nbsp;</SPAN><SPAN style="COLOR: #000000">2</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Difference:&nbsp;ld<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Diff&nbsp;Index:&nbsp;</FONT></SPAN><SPAN style="COLOR: #000000"><FONT face=Arial size=2>3</FONT></SPAN></DIV><BR>
<HR>
<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 src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">参考资料：<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>《Jakarta&nbsp;Commons&nbsp;Cookbook》<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>By&nbsp;Timothy&nbsp;M.&nbsp;O'Brien&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Publisher&nbsp;:&nbsp;O'Reilly&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Pub&nbsp;Date&nbsp;:&nbsp;November&nbsp;</SPAN><SPAN style="COLOR: #000000">2004</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>ISBN&nbsp;:&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">596</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">00706</SPAN><SPAN style="COLOR: #000000">-X&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Pages&nbsp;:&nbsp;</SPAN><SPAN style="COLOR: #000000">400</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN></DIV><img src ="http://www.blogjava.net/Johncn/aggbug/25619.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Johncn/" target="_blank">ZhuJun</a> 2005-12-27 19:35 <a href="http://www.blogjava.net/Johncn/archive/2005/12/27/25619.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[Hibernate笔记] 组件(Component)映射</title><link>http://www.blogjava.net/Johncn/archive/2005/12/22/25115.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Thu, 22 Dec 2005 10:46:00 GMT</pubDate><guid>http://www.blogjava.net/Johncn/archive/2005/12/22/25115.html</guid><wfw:comment>http://www.blogjava.net/Johncn/comments/25115.html</wfw:comment><comments>http://www.blogjava.net/Johncn/archive/2005/12/22/25115.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Johncn/comments/commentRss/25115.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Johncn/services/trackbacks/25115.html</trackback:ping><description><![CDATA[<FONT face=Arial size=2><STRONG>组件(Component)映射</STRONG>多用来表示对象的从属关系(<STRONG>组合,聚合</STRONG>).比如一个学生可能有<STRONG>姓名,年龄,性别,成绩</STRONG>等属性,其中成绩是另一个对象,又有<STRONG>科目,分数</STRONG>属性,这里就需要用组件映射来表是之间的关系.<BR><BR>Java代码:<BR></FONT>
<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"><FONT face=Arial><FONT size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;学生</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG id=Codehighlighter1_19_115_Open_Image onclick="this.style.display='none'; Codehighlighter1_19_115_Open_Text.style.display='none'; Codehighlighter1_19_115_Closed_Image.style.display='inline'; Codehighlighter1_19_115_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_19_115_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_19_115_Closed_Text.style.display='none'; Codehighlighter1_19_115_Open_Image.style.display='inline'; Codehighlighter1_19_115_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;Student</SPAN><SPAN id=Codehighlighter1_19_115_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.blogjava.net/images/dot.gif"></SPAN></FONT></FONT><SPAN id=Codehighlighter1_19_115_Open_Text><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;String&nbsp;name;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;age;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;String&nbsp;sex;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><FONT face=Arial size=2>&nbsp;Grade&nbsp;grade;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><IMG src="http://www.blogjava.net/images/dot.gif"><IMG src="http://www.blogjava.net/images/dot.gif"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</FONT></SPAN></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;成绩</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG id=Codehighlighter1_134_192_Open_Image onclick="this.style.display='none'; Codehighlighter1_134_192_Open_Text.style.display='none'; Codehighlighter1_134_192_Closed_Image.style.display='inline'; Codehighlighter1_134_192_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_134_192_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_134_192_Closed_Text.style.display='none'; Codehighlighter1_134_192_Open_Image.style.display='inline'; Codehighlighter1_134_192_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;Grade</SPAN><SPAN id=Codehighlighter1_134_192_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.blogjava.net/images/dot.gif"></SPAN></FONT></FONT><SPAN id=Codehighlighter1_134_192_Open_Text><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;String&nbsp;subject;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">float</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><FONT face=Arial size=2>&nbsp;score;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><IMG src="http://www.blogjava.net/images/dot.gif"><IMG src="http://www.blogjava.net/images/dot.gif"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</FONT></SPAN></SPAN></DIV>
<P><FONT face=Arial size=2>数据库:<BR></FONT></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"><FONT face=Arial><FONT size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;学生表</SPAN></FONT></FONT><SPAN style="COLOR: #008080"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">create</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">table</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;STUDENT&nbsp;(&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;ID&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">char</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">32</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">not</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;NAME&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">16</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">not</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;SEX&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">char</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">1</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">),&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;AGE&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">integer</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">primary</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">key</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;(ID)&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;成绩表</SPAN></FONT></FONT><SPAN style="COLOR: #008080"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">create</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">table</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;GRADE&nbsp;(&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;ID&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">char</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">32</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">not</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;student_id&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">char</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">32</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">not</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;SUBJECT&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">10</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">),&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;SCORE&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">float</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">primary</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">key</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;(ID),<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">foreign</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">key</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><FONT face=Arial size=2>&nbsp;(student_id)&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>);</FONT></SPAN></DIV><BR><FONT face=Arial size=2>Hibernate映射文件:<BR></FONT>
<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"><FONT face=Arial><FONT size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">&lt;?</SPAN><SPAN style="COLOR: #ff00ff">xml&nbsp;version="1.0"</SPAN><SPAN style="COLOR: #0000ff">?&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;!</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #ff00ff">DOCTYPE&nbsp;hibernate-mapping&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;PUBLIC&nbsp;"-//Hibernate/Hibernate&nbsp;Mapping&nbsp;DTD//EN"&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">hibernate-mapping</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">class&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="Student"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;table</SPAN><SPAN style="COLOR: #0000ff">="STUDENT"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">id&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="id"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="string"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;unsaved-value</SPAN><SPAN style="COLOR: #0000ff">="null"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">column&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="ID"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;sql-type</SPAN><SPAN style="COLOR: #0000ff">="char(32)"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">generator&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">="uuid.hex"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">id</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="name"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="string"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;not-null</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">column&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="NAME"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;length</SPAN><SPAN style="COLOR: #0000ff">="16"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;not-null</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">property</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="sex"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="char"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;column</SPAN><SPAN style="COLOR: #0000ff">="SEX"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="age"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="int"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;column</SPAN><SPAN style="COLOR: #0000ff">="AGE"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><FONT color=#ff0000><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">component&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="grade"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;class</SPAN><SPAN style="COLOR: #0000ff">="Grade"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT></FONT><FONT color=#ff0000><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="subject"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="string"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;column</SPAN><SPAN style="COLOR: #0000ff">="SUBJECT"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;not-null</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN></FONT></FONT></FONT><FONT color=#ff0000><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="score"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="float"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;column</SPAN><SPAN style="COLOR: #0000ff">="SCORE"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;not-null</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN></FONT></FONT></FONT><FONT color=#ff0000><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">component</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"><FONT color=#ff0000>&nbsp;<BR></FONT><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">class</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">hibernate-mapping</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT></FONT></DIV><img src ="http://www.blogjava.net/Johncn/aggbug/25115.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Johncn/" target="_blank">ZhuJun</a> 2005-12-22 18:46 <a href="http://www.blogjava.net/Johncn/archive/2005/12/22/25115.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[发掘Jakarta Commons] 使用LRUMap </title><link>http://www.blogjava.net/Johncn/archive/2005/12/15/24088.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Thu, 15 Dec 2005 11:59:00 GMT</pubDate><guid>http://www.blogjava.net/Johncn/archive/2005/12/15/24088.html</guid><wfw:comment>http://www.blogjava.net/Johncn/comments/24088.html</wfw:comment><comments>http://www.blogjava.net/Johncn/archive/2005/12/15/24088.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Johncn/comments/commentRss/24088.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Johncn/services/trackbacks/24088.html</trackback:ping><description><![CDATA[<FONT face=Arial size=2>LRUMap(<STRONG>L</STRONG>east <STRONG>R</STRONG>ecently <STRONG>U</STRONG>sed <STRONG>C</STRONG>ache)可用来保存最近使用的几条记录,例如:保存Blog中的最近10条留言.大多数情况用作缓存(如:<STRONG>EHCache</STRONG>)的一种策略.具体使用方法如下:<BR></FONT>
<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"><FONT face=Arial><FONT size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">import</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;java.util.Map;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;org.apache.commons.collections.map.LRUMap;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>cache&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;LRUMap(&nbsp;</SPAN><SPAN style="COLOR: #000000">5</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Populate&nbsp;the&nbsp;cache&nbsp;with&nbsp;5&nbsp;stock&nbsp;prices</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">cache.put(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">MSFT</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Float(&nbsp;</SPAN><SPAN style="COLOR: #000000">0.03</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;)&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>cache.put(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">TSC</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Float(&nbsp;</SPAN><SPAN style="COLOR: #000000">0.001</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;)&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>cache.put(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">LU</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Float(&nbsp;</SPAN><SPAN style="COLOR: #000000">23.30</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;)&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>cache.put(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">CSCO</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Float(&nbsp;</SPAN><SPAN style="COLOR: #000000">242.20</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;)&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>cache.put(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">P</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Float(&nbsp;</SPAN><SPAN style="COLOR: #000000">10.23</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;)&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Now&nbsp;use&nbsp;some&nbsp;of&nbsp;the&nbsp;entries&nbsp;in&nbsp;the&nbsp;cache</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">Float&nbsp;cscoPrice&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(Float)&nbsp;cache.get(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">CSCO</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Float&nbsp;msPrice&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(Float)&nbsp;cache.get(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">MSFT</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Float&nbsp;tscPrice&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(Float)&nbsp;cache.get(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">TSC</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Float&nbsp;luPrice&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(Float)&nbsp;cache.get(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">LU</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Float&nbsp;pPrice&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(Float)&nbsp;cache.get(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">P</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Float&nbsp;msPrice2&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(Float)&nbsp;cache.get(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">MSFT</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Add&nbsp;another&nbsp;price&nbsp;to&nbsp;the&nbsp;Map,&nbsp;this&nbsp;should&nbsp;kick&nbsp;out&nbsp;the&nbsp;LRU&nbsp;item.</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">cache.put(&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">AA</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Float(&nbsp;</SPAN><SPAN style="COLOR: #000000">203.20</SPAN><SPAN style="COLOR: #000000">&nbsp;)&nbsp;);</SPAN></FONT></FONT></DIV><FONT face=Arial size=2>此时,缓存中的元素为:<BR>[CSCO]<BR>[MSFT]<BR>[TSC]<BR>[LU]<BR>[P]<BR>[AA]<BR>由于LRU最近没有被访问,所以当AA加入时,由于超过了缓存的最大容量(5),所以被剔除了缓存.<BR>
<HR>
<BR></FONT>
<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"><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">参考资料:<BR>&lt;&lt;</SPAN><SPAN style="COLOR: #000000"><STRONG>Jakarta&nbsp;Commons&nbsp;Cookbook</STRONG></SPAN><SPAN style="COLOR: #000000">&gt;&gt;</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR>By&nbsp;Timothy&nbsp;M.&nbsp;O</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">Brien&nbsp;</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;<BR>Publisher&nbsp;:&nbsp;O</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">Reilly&nbsp;</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">Pub&nbsp;Date&nbsp;:&nbsp;November&nbsp;</SPAN><SPAN style="COLOR: #000000">2004</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">&nbsp;<BR>ISBN&nbsp;:&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">596</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">00706</SPAN><SPAN style="COLOR: #000000">-</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">X&nbsp;<BR>Pages&nbsp;:&nbsp;</SPAN><SPAN style="COLOR: #000000">400</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><FONT face=Arial size=2>&nbsp;<BR></FONT></SPAN></DIV><img src ="http://www.blogjava.net/Johncn/aggbug/24088.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Johncn/" target="_blank">ZhuJun</a> 2005-12-15 19:59 <a href="http://www.blogjava.net/Johncn/archive/2005/12/15/24088.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[Hibernate笔记] 继承映射</title><link>http://www.blogjava.net/Johncn/archive/2005/09/11/12645.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Sat, 10 Sep 2005 16:21:00 GMT</pubDate><guid>http://www.blogjava.net/Johncn/archive/2005/09/11/12645.html</guid><wfw:comment>http://www.blogjava.net/Johncn/comments/12645.html</wfw:comment><comments>http://www.blogjava.net/Johncn/archive/2005/09/11/12645.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Johncn/comments/commentRss/12645.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Johncn/services/trackbacks/12645.html</trackback:ping><description><![CDATA[<P>对于对象的继承关系, 建议“每一棵类继承树对应一个表”,即对每一个子类都进行使用&lt;subclass&gt;声明。 例如:</P>
<P>有一个基类: class User, 两个子类: class Admin和 class Guest.</P>
<P>则新建一个表格来对应这个继承类数:</P>
<P></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">create</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">table</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff00ff">USER</SPAN><SPAN style="COLOR: #000000">&nbsp;(&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;ID&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">char</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">32</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">not</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;DISCRIMINATOR_USERTYPE&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">255</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">not</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;NAME&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">16</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">not</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;PASSWORD&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">16</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">not</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;USER_LEVEL&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">integer</SPAN><SPAN style="COLOR: #000000">,&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;POWER_OTHER&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">255</SPAN><SPAN style="COLOR: #000000">),&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;GUEST_OTHER&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">255</SPAN><SPAN style="COLOR: #000000">),&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">primary</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">key</SPAN><SPAN style="COLOR: #000000">&nbsp;(ID)&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>);</SPAN></DIV></DIV>
<P>其中<SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">字段</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">DISCRIMINATOR_USERTYPE</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">来记录储存的类别是属于</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">User</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">Admin</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">或是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">Guest</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">的记录，如果该字段是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">ParentUser</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">，则表示该笔数据是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">User</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">类别，如果是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">ADMIN</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">，表示是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">Admin</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">的记录，如果是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">GUEST</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">，表示是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">Guest</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">的记录.<BR><BR><BR></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><STRONG>映像文件:</STRONG></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">&lt;?</SPAN><SPAN style="COLOR: #ff00ff">xml&nbsp;version="1.0"</SPAN><SPAN style="COLOR: #0000ff">?&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;!</SPAN><SPAN style="COLOR: #ff00ff">DOCTYPE&nbsp;hibernate-mapping&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;PUBLIC&nbsp;"-//Hibernate/Hibernate&nbsp;Mapping&nbsp;DTD//EN"&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">hibernate-mapping</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">class&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="com.zj.User"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;table</SPAN><SPAN style="COLOR: #0000ff">="USER"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;discriminator-value</SPAN><SPAN style="COLOR: #0000ff">="ParentUser"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">id&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="id"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="string"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;unsaved-value</SPAN><SPAN style="COLOR: #0000ff">="null"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">column&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="ID"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;sql-type</SPAN><SPAN style="COLOR: #0000ff">="char(32)"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">generator&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">="uuid.hex"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">id</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">discriminator&nbsp;</SPAN><SPAN style="COLOR: #ff0000">column</SPAN><SPAN style="COLOR: #0000ff">="DISCRIMINATOR_USERTYPE"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="string"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="name"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="string"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;not-null</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">column&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="NAME"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;length</SPAN><SPAN style="COLOR: #0000ff">="16"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;not-null</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">property</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="password"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="string"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;not-null</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">column&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="PASSWORD"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;length</SPAN><SPAN style="COLOR: #0000ff">="16"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;not-null</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">property</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">subclass&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="com.zj.Admin"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;discriminator-value</SPAN><SPAN style="COLOR: #0000ff">="ADMIN"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="level"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="integer"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;column</SPAN><SPAN style="COLOR: #0000ff">="ADMIN_LEVEL"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="otherOfPower"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="string"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;column</SPAN><SPAN style="COLOR: #0000ff">="POWER_OTHER"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">subclass</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">subclass&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="com.zj.Guest"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;discriminator-value</SPAN><SPAN style="COLOR: #0000ff">="GUEST"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="otherOfGuest"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="string"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;column</SPAN><SPAN style="COLOR: #0000ff">="GUEST_OTHER"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">subclass</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">class</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">hibernate-mapping</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV></DIV></SPAN></SPAN><BR><BR><FONT face=宋体 size=2>注意上面文件中,在映像子类别时，使用</FONT><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><FONT style="BACKGROUND-COLOR: #ffff00" color=#000000>&lt;subclass&gt;</FONT></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 0.75pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">指明映像的子类别以及其</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体"><FONT style="BACKGROUND-COLOR: #ffff00" color=#000000>discriminator-value<FONT style="BACKGROUND-COLOR: #ffffff">来指定.</FONT></FONT></SPAN><img src ="http://www.blogjava.net/Johncn/aggbug/12645.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Johncn/" target="_blank">ZhuJun</a> 2005-09-11 00:21 <a href="http://www.blogjava.net/Johncn/archive/2005/09/11/12645.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>