[hibernate-commits] Hibernate SVN: r14138 - core/trunk/documentation/manual/translations/zh-CN/content.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Thu Oct 25 21:01:15 EDT 2007


Author: xhuang at jboss.com
Date: 2007-10-25 21:01:14 -0400 (Thu, 25 Oct 2007)
New Revision: 14138

Modified:
   core/trunk/documentation/manual/translations/zh-CN/content/architecture.po
   core/trunk/documentation/manual/translations/zh-CN/content/association_mapping.po
   core/trunk/documentation/manual/translations/zh-CN/content/basic_mapping.po
   core/trunk/documentation/manual/translations/zh-CN/content/batch.po
   core/trunk/documentation/manual/translations/zh-CN/content/best_practices.po
   core/trunk/documentation/manual/translations/zh-CN/content/collection_mapping.po
   core/trunk/documentation/manual/translations/zh-CN/content/component_mapping.po
   core/trunk/documentation/manual/translations/zh-CN/content/configuration.po
   core/trunk/documentation/manual/translations/zh-CN/content/events.po
   core/trunk/documentation/manual/translations/zh-CN/content/example_mappings.po
   core/trunk/documentation/manual/translations/zh-CN/content/example_parentchild.po
   core/trunk/documentation/manual/translations/zh-CN/content/example_weblog.po
   core/trunk/documentation/manual/translations/zh-CN/content/filters.po
   core/trunk/documentation/manual/translations/zh-CN/content/inheritance_mapping.po
   core/trunk/documentation/manual/translations/zh-CN/content/performance.po
   core/trunk/documentation/manual/translations/zh-CN/content/persistent_classes.po
   core/trunk/documentation/manual/translations/zh-CN/content/preface.po
   core/trunk/documentation/manual/translations/zh-CN/content/query_criteria.po
   core/trunk/documentation/manual/translations/zh-CN/content/query_hql.po
   core/trunk/documentation/manual/translations/zh-CN/content/query_sql.po
   core/trunk/documentation/manual/translations/zh-CN/content/session_api.po
   core/trunk/documentation/manual/translations/zh-CN/content/toolset_guide.po
   core/trunk/documentation/manual/translations/zh-CN/content/transactions.po
   core/trunk/documentation/manual/translations/zh-CN/content/tutorial.po
   core/trunk/documentation/manual/translations/zh-CN/content/xml.po
Log:
Generated via merging XML with English XML

Modified: core/trunk/documentation/manual/translations/zh-CN/content/architecture.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/architecture.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/architecture.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,216 +1,594 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:21
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: architecture.xml:21
+#, no-c-format
 msgid "Architecture"
-msgstr ""
+msgstr "体系结构(Architecture)"
 
-#: index.docbook:24
+#. Tag: title
+#: architecture.xml:24
+#, no-c-format
 msgid "Overview"
-msgstr ""
+msgstr "概况(Overview)"
 
-#: index.docbook:26
+#. Tag: para
+#: architecture.xml:26
+#, no-c-format
 msgid "A (very) high-level view of the Hibernate architecture:"
-msgstr ""
+msgstr "一个非常简要的Hibernate体系结构的概要图:"
 
-#: index.docbook:39
-msgid "This diagram shows Hibernate using the database and configuration data to provide persistence services (and persistent objects) to the application."
+#. Tag: para
+#: architecture.xml:39
+#, no-c-format
+msgid ""
+"This diagram shows Hibernate using the database and configuration data to "
+"provide persistence services (and persistent objects) to the application."
 msgstr ""
+"从这个图可以看出,Hibernate使用数据库和配置信息来为应用程序提供持久化服务(以"
+"及持久的对象)。"
 
-#: index.docbook:44
-msgid "We would like to show a more detailed view of the runtime architecture. Unfortunately, Hibernate is flexible and supports several approaches. We will show the two extremes. The \"lite\" architecture has the application provide its own JDBC connections and manage its own transactions. This approach uses a minimal subset of Hibernate's APIs:"
+#. Tag: para
+#: architecture.xml:44
+#, no-c-format
+msgid ""
+"We would like to show a more detailed view of the runtime architecture. "
+"Unfortunately, Hibernate is flexible and supports several approaches. We "
+"will show the two extremes. The \"lite\" architecture has the application "
+"provide its own JDBC connections and manage its own transactions. This "
+"approach uses a minimal subset of Hibernate's APIs:"
 msgstr ""
+"我们来更详细地看一下Hibernate运行时体系结构。由于Hibernate非常灵活,且支持多"
+"种应用方案, 所以我们这只描述一下两种极端的情况。“轻型”的体系结构方案,要求应"
+"用程序提供自己的JDBC 连接并管理自己的事务。这种方案使用了Hibernate API的最小"
+"子集:"
 
-#: index.docbook:61
-msgid "The \"full cream\" architecture abstracts the application away from the underlying JDBC/JTA APIs and lets Hibernate take care of the details."
+#. Tag: para
+#: architecture.xml:61
+#, no-c-format
+msgid ""
+"The \"full cream\" architecture abstracts the application away from the "
+"underlying JDBC/JTA APIs and lets Hibernate take care of the details."
 msgstr ""
+"“全面解决”的体系结构方案,将应用层从底层的JDBC/JTA API中抽象出来,而让"
+"Hibernate来处理这些细节。"
 
-#: index.docbook:75
+#. Tag: para
+#: architecture.xml:75
+#, fuzzy, no-c-format
 msgid "Heres some definitions of the objects in the diagrams:"
-msgstr ""
+msgstr "图中各个对象的定义如下: <placeholder-1/>"
 
-#: index.docbook:80
+#. Tag: term
+#: architecture.xml:80
+#, no-c-format
 msgid "SessionFactory (<literal>org.hibernate.SessionFactory</literal>)"
-msgstr ""
+msgstr "SessionFactory (<literal>org.hibernate.SessionFactory</literal>)"
 
-#: index.docbook:82
-msgid "A threadsafe (immutable) cache of compiled mappings for a single database. A factory for <literal>Session</literal> and a client of <literal>ConnectionProvider</literal>. Might hold an optional (second-level) cache of data that is reusable between transactions, at a process- or cluster-level."
+#. Tag: para
+#: architecture.xml:82
+#, no-c-format
+msgid ""
+"A threadsafe (immutable) cache of compiled mappings for a single database. A "
+"factory for <literal>Session</literal> and a client of "
+"<literal>ConnectionProvider</literal>. Might hold an optional (second-level) "
+"cache of data that is reusable between transactions, at a process- or "
+"cluster-level."
 msgstr ""
+"针对单个数据库映射关系经过编译后的内存镜像,是线程安全的(不可变)。 它是生成"
+"<literal>Session</literal>的工厂,本身要用到<literal>ConnectionProvider</"
+"literal>。 该对象可以在进程或集群的级别上,为那些事务之间可以重用的数据提供可"
+"选的二级缓存。"
 
-#: index.docbook:92
+#. Tag: term
+#: architecture.xml:92
+#, no-c-format
 msgid "Session (<literal>org.hibernate.Session</literal>)"
-msgstr ""
+msgstr "Session (<literal>org.hibernate.Session</literal>)"
 
-#: index.docbook:94
-msgid "A single-threaded, short-lived object representing a conversation between the application and the persistent store. Wraps a JDBC connection. Factory for <literal>Transaction</literal>. Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier."
+#. Tag: para
+#: architecture.xml:94
+#, no-c-format
+msgid ""
+"A single-threaded, short-lived object representing a conversation between "
+"the application and the persistent store. Wraps a JDBC connection. Factory "
+"for <literal>Transaction</literal>. Holds a mandatory (first-level) cache of "
+"persistent objects, used when navigating the object graph or looking up "
+"objects by identifier."
 msgstr ""
+"表示应用程序与持久储存层之间交互操作的一个单线程对象,此对象生存期很短。 其隐"
+"藏了JDBC连接,也是<literal>Transaction</literal>的工厂。 其会持有一个针对持久"
+"化对象的必选(第一级)缓存,在遍历对象图或者根据持久化标识查找对象时会用到。"
 
-#: index.docbook:104
+#. Tag: term
+#: architecture.xml:104
+#, no-c-format
 msgid "Persistent objects and collections"
-msgstr ""
+msgstr "持久的对象及其集合"
 
-#: index.docbook:106
-msgid "Short-lived, single threaded objects containing persistent state and business function. These might be ordinary JavaBeans/POJOs, the only special thing about them is that they are currently associated with (exactly one) <literal>Session</literal>. As soon as the <literal>Session</literal> is closed, they will be detached and free to use in any application layer (e.g. directly as data transfer objects to and from presentation)."
+#. Tag: para
+#: architecture.xml:106
+#, no-c-format
+msgid ""
+"Short-lived, single threaded objects containing persistent state and "
+"business function. These might be ordinary JavaBeans/POJOs, the only special "
+"thing about them is that they are currently associated with (exactly one) "
+"<literal>Session</literal>. As soon as the <literal>Session</literal> is "
+"closed, they will be detached and free to use in any application layer (e.g. "
+"directly as data transfer objects to and from presentation)."
 msgstr ""
+"带有持久化状态的、具有业务功能的单线程对象,此对象生存期很短。 这些对象可能是"
+"普通的JavaBeans/POJO,唯一特殊的是他们正与(仅仅一个)<literal>Session</"
+"literal>相关联。 一旦这个<literal>Session</literal>被关闭,这些对象就会脱离持"
+"久化状态,这样就可被应用程序的任何层自由使用。 (例如,用作跟表示层打交道的数"
+"据传输对象。)"
 
-#: index.docbook:117
+#. Tag: term
+#: architecture.xml:117
+#, no-c-format
 msgid "Transient and detached objects and collections"
-msgstr ""
+msgstr "瞬态(transient)和脱管(detached)的对象及其集合"
 
-#: index.docbook:119
-msgid "Instances of persistent classes that are not currently associated with a <literal>Session</literal>. They may have been instantiated by the application and not (yet) persisted or they may have been instantiated by a closed <literal>Session</literal>."
+#. Tag: para
+#: architecture.xml:119
+#, no-c-format
+msgid ""
+"Instances of persistent classes that are not currently associated with a "
+"<literal>Session</literal>. They may have been instantiated by the "
+"application and not (yet) persisted or they may have been instantiated by a "
+"closed <literal>Session</literal>."
 msgstr ""
+"那些目前没有与session关联的持久化类实例。 他们可能是在被应用程序实例化后,尚"
+"未进行持久化的对象。 也可能是因为实例化他们的<literal>Session</literal>已经被"
+"关闭而脱离持久化的对象。"
 
-#: index.docbook:128
+#. Tag: term
+#: architecture.xml:128
+#, no-c-format
 msgid "Transaction (<literal>org.hibernate.Transaction</literal>)"
-msgstr ""
+msgstr "事务Transaction (<literal>org.hibernate.Transaction</literal>)"
 
-#: index.docbook:130
-msgid "(Optional) A single-threaded, short-lived object used by the application to specify atomic units of work. Abstracts application from underlying JDBC, JTA or CORBA transaction. A <literal>Session</literal> might span several <literal>Transaction</literal>s in some cases. However, transaction demarcation, either using the underlying API or <literal>Transaction</literal>, is never optional!"
+#. Tag: para
+#: architecture.xml:130
+#, no-c-format
+msgid ""
+"(Optional) A single-threaded, short-lived object used by the application to "
+"specify atomic units of work. Abstracts application from underlying JDBC, "
+"JTA or CORBA transaction. A <literal>Session</literal> might span several "
+"<literal>Transaction</literal>s in some cases. However, transaction "
+"demarcation, either using the underlying API or <literal>Transaction</"
+"literal>, is never optional!"
 msgstr ""
+"(可选的)应用程序用来指定原子操作单元范围的对象,它是单线程的,生命周期很"
+"短。 它通过抽象将应用从底层具体的JDBC、JTA以及CORBA事务隔离开。 某些情况下,"
+"一个<literal>Session</literal>之内可能包含多个<literal>Transaction</literal>"
+"对象。 尽管是否使用该对象是可选的,但无论是使用底层的API还是使用"
+"<literal>Transaction</literal>对象,事务边界的开启与关闭是必不可少的。"
 
-#: index.docbook:141
-msgid "ConnectionProvider (<literal>org.hibernate.connection.ConnectionProvider</literal>)"
+#. Tag: term
+#: architecture.xml:141
+#, no-c-format
+msgid ""
+"ConnectionProvider (<literal>org.hibernate.connection.ConnectionProvider</"
+"literal>)"
 msgstr ""
+"ConnectionProvider (<literal>org.hibernate.connection.ConnectionProvider</"
+"literal>)"
 
-#: index.docbook:143
-msgid "(Optional) A factory for (and pool of) JDBC connections. Abstracts application from underlying <literal>Datasource</literal> or <literal>DriverManager</literal>. Not exposed to application, but can be extended/implemented by the developer."
+#. Tag: para
+#: architecture.xml:143
+#, no-c-format
+msgid ""
+"(Optional) A factory for (and pool of) JDBC connections. Abstracts "
+"application from underlying <literal>Datasource</literal> or "
+"<literal>DriverManager</literal>. Not exposed to application, but can be "
+"extended/implemented by the developer."
 msgstr ""
+"(可选的)生成JDBC连接的工厂(同时也起到连接池的作用)。 它通过抽象将应用从底"
+"层的<literal>Datasource</literal>或<literal>DriverManager</literal>隔离开。 "
+"仅供开发者扩展/实现用,并不暴露给应用程序使用。"
 
-#: index.docbook:151
-msgid "TransactionFactory (<literal>org.hibernate.TransactionFactory</literal>)"
+#. Tag: term
+#: architecture.xml:151
+#, no-c-format
+msgid ""
+"TransactionFactory (<literal>org.hibernate.TransactionFactory</literal>)"
 msgstr ""
+"TransactionFactory (<literal>org.hibernate.TransactionFactory</literal>)"
 
-#: index.docbook:153
-msgid "(Optional) A factory for <literal>Transaction</literal> instances. Not exposed to the application, but can be extended/implemented by the developer."
+#. Tag: para
+#: architecture.xml:153
+#, no-c-format
+msgid ""
+"(Optional) A factory for <literal>Transaction</literal> instances. Not "
+"exposed to the application, but can be extended/implemented by the developer."
 msgstr ""
+"(可选的)生成<literal>Transaction</literal>对象实例的工厂。 仅供开发者扩展/"
+"实现用,并不暴露给应用程序使用。"
 
-#: index.docbook:160
+#. Tag: emphasis
+#: architecture.xml:160
+#, no-c-format
 msgid "Extension Interfaces"
-msgstr ""
+msgstr "扩展接口"
 
-#: index.docbook:162
-msgid "Hibernate offers many optional extension interfaces you can implement to customize the behavior of your persistence layer. See the API documentation for details."
+#. Tag: para
+#: architecture.xml:162
+#, no-c-format
+msgid ""
+"Hibernate offers many optional extension interfaces you can implement to "
+"customize the behavior of your persistence layer. See the API documentation "
+"for details."
 msgstr ""
+"Hibernate提供了很多可选的扩展接口,你可以通过实现它们来定制你的持久层的行"
+"为。 具体请参考API文档。"
 
-#: index.docbook:171
-msgid "Given a \"lite\" architecture, the application bypasses the <literal>Transaction</literal>/<literal>TransactionFactory</literal> and/or <literal>ConnectionProvider</literal> APIs to talk to JTA or JDBC directly."
+#. Tag: para
+#: architecture.xml:171
+#, no-c-format
+msgid ""
+"Given a \"lite\" architecture, the application bypasses the "
+"<literal>Transaction</literal>/<literal>TransactionFactory</literal> and/or "
+"<literal>ConnectionProvider</literal> APIs to talk to JTA or JDBC directly."
 msgstr ""
+"在特定“轻型”的体系结构中,应用程序可能绕过 <literal>Transaction</literal>/"
+"<literal>TransactionFactory</literal> 以及 <literal>ConnectionProvider</"
+"literal> 等API直接跟JTA或JDBC打交道。"
 
-#: index.docbook:179
+#. Tag: title
+#: architecture.xml:179
+#, no-c-format
 msgid "Instance states"
-msgstr ""
+msgstr "实例状态"
 
-#: index.docbook:180
-msgid "An instance of a persistent classes may be in one of three different states, which are defined with respect to a <emphasis>persistence context</emphasis>. The Hibernate <literal>Session</literal> object is the persistence context:"
+#. Tag: para
+#: architecture.xml:180
+#, no-c-format
+msgid ""
+"An instance of a persistent classes may be in one of three different states, "
+"which are defined with respect to a <emphasis>persistence context</"
+"emphasis>. The Hibernate <literal>Session</literal> object is the "
+"persistence context:"
 msgstr ""
+"一个持久化类的实例可能处于三种不同状态中的某一种。 这三种状态的定义则与所谓的"
+"<emphasis>持久化上下文(persistence context)</emphasis>有关。 Hibernate的"
+"<literal>Session</literal>对象就是这个所谓的持久化上下文:"
 
-#: index.docbook:188
+#. Tag: term
+#: architecture.xml:188
+#, no-c-format
 msgid "transient"
-msgstr ""
+msgstr "瞬态(transient)"
 
-#: index.docbook:190
-msgid "The instance is not, and has never been associated with any persistence context. It has no persistent identity (primary key value)."
-msgstr ""
+#. Tag: para
+#: architecture.xml:190
+#, no-c-format
+msgid ""
+"The instance is not, and has never been associated with any persistence "
+"context. It has no persistent identity (primary key value)."
+msgstr "该实例从未与任何持久化上下文关联过。它没有持久化标识(相当于主键值)。"
 
-#: index.docbook:198
+#. Tag: term
+#: architecture.xml:198
+#, no-c-format
 msgid "persistent"
-msgstr ""
+msgstr "持久化(persistent)"
 
-#: index.docbook:200
-msgid "The instance is currently associated with a persistence context. It has a persistent identity (primary key value) and, perhaps, a corresponding row in the database. For a particular persistence context, Hibernate <emphasis>guarantees</emphasis> that persistent identity is equivalent to Java identity (in-memory location of the object)."
+#. Tag: para
+#: architecture.xml:200
+#, no-c-format
+msgid ""
+"The instance is currently associated with a persistence context. It has a "
+"persistent identity (primary key value) and, perhaps, a corresponding row in "
+"the database. For a particular persistence context, Hibernate "
+"<emphasis>guarantees</emphasis> that persistent identity is equivalent to "
+"Java identity (in-memory location of the object)."
 msgstr ""
+"实例目前与某个持久化上下文有关联。 它拥有持久化标识(相当于主键值),并且可能"
+"在数据库中有一个对应的行。 对于某一个特定的持久化上下文,Hibernate<emphasis>"
+"保证</emphasis>持久化标识与Java标识(其值代表对象在内存中的位置)等价。"
 
-#: index.docbook:212
+#. Tag: term
+#: architecture.xml:212
+#, no-c-format
 msgid "detached"
-msgstr ""
+msgstr "脱管(detached)"
 
-#: index.docbook:214
-msgid "The instance was once associated with a persistence context, but that context was closed, or the instance was serialized to another process. It has a persistent identity and, perhaps, a corrsponding row in the database. For detached instances, Hibernate makes no guarantees about the relationship between persistent identity and Java identity."
+#. Tag: para
+#: architecture.xml:214
+#, no-c-format
+msgid ""
+"The instance was once associated with a persistence context, but that "
+"context was closed, or the instance was serialized to another process. It "
+"has a persistent identity and, perhaps, a corrsponding row in the database. "
+"For detached instances, Hibernate makes no guarantees about the relationship "
+"between persistent identity and Java identity."
 msgstr ""
+"实例曾经与某个持久化上下文发生过关联,不过那个上下文被关闭了, 或者这个实例是"
+"被序列化(serialize)到另外的进程。 它拥有持久化标识,并且在数据库中可能存在一"
+"个对应的行。 对于脱管状态的实例,Hibernate不保证任何持久化标识和Java标识的关"
+"系。"
 
-#: index.docbook:229
+#. Tag: title
+#: architecture.xml:229
+#, no-c-format
 msgid "JMX Integration"
-msgstr ""
+msgstr "JMX整合"
 
-#: index.docbook:231
-msgid "JMX is the J2EE standard for management of Java components. Hibernate may be managed via a JMX standard service. We provide an MBean implementation in the distribution, <literal>org.hibernate.jmx.HibernateService</literal>."
+#. Tag: para
+#: architecture.xml:231
+#, no-c-format
+msgid ""
+"JMX is the J2EE standard for management of Java components. Hibernate may be "
+"managed via a JMX standard service. We provide an MBean implementation in "
+"the distribution, <literal>org.hibernate.jmx.HibernateService</literal>."
 msgstr ""
+"JMX是管理Java组件(Java components)的J2EE标准。 Hibernate 可以通过一个JMX标准"
+"服务来管理。 在这个发行版本中,我们提供了一个MBean接口的实现,即 <literal>org."
+"hibernate.jmx.HibernateService</literal>。"
 
-#: index.docbook:237
-msgid "For an example how to deploy Hibernate as a JMX service on the JBoss Application Server, please see the JBoss User Guide. On JBoss AS, you also get these benefits if you deploy using JMX:"
+#. Tag: para
+#: architecture.xml:237
+#, no-c-format
+msgid ""
+"For an example how to deploy Hibernate as a JMX service on the JBoss "
+"Application Server, please see the JBoss User Guide. On JBoss AS, you also "
+"get these benefits if you deploy using JMX:"
 msgstr ""
+"想要看如何在JBoss应用服务器上将Hibernate部署为一个JMX服务的例子,您可以参考"
+"JBoss用户指南。 我们现在说一下在Jboss应用服务器上,使用JMX来部署Hibernate的好"
+"处:"
 
-#: index.docbook:245
-msgid "<emphasis>Session Management:</emphasis> The Hibernate <literal>Session</literal>'s life cycle can be automatically bound to the scope of a JTA transaction. This means you no longer have to manually open and close the <literal>Session</literal>, this becomes the job of a JBoss EJB interceptor. You also don't have to worry about transaction demarcation in your code anymore (unless you'd like to write a portable persistence layer of course, use the optional Hibernate <literal>Transaction</literal> API for this). You call the <literal>HibernateContext</literal> to access a <literal>Session</literal>."
+#. Tag: para
+#: architecture.xml:245
+#, no-c-format
+msgid ""
+"<emphasis>Session Management:</emphasis> The Hibernate <literal>Session</"
+"literal>'s life cycle can be automatically bound to the scope of a JTA "
+"transaction. This means you no longer have to manually open and close the "
+"<literal>Session</literal>, this becomes the job of a JBoss EJB interceptor. "
+"You also don't have to worry about transaction demarcation in your code "
+"anymore (unless you'd like to write a portable persistence layer of course, "
+"use the optional Hibernate <literal>Transaction</literal> API for this). You "
+"call the <literal>HibernateContext</literal> to access a <literal>Session</"
+"literal>."
 msgstr ""
+"<emphasis>Session管理:</emphasis> Hibernate的<literal>Session</literal>对象"
+"的生命周期可以 自动跟一个JTA事务边界绑定。这意味着你无需手工开关"
+"<literal>Session</literal>了, 这项 工作会由JBoss EJB 拦截器来完成。你再也不用"
+"担心你的代码中的事务边界了(除非你想利用Hibernate提供可选 的"
+"<literal>Transaction</literal> API来自己写一个便于移植的的持久层)。 你通过调"
+"用<literal>HibernateContext</literal>来访问<literal>Session</literal>。"
 
-#: index.docbook:257
-msgid "<emphasis>HAR deployment:</emphasis> Usually you deploy the Hibernate JMX service using a JBoss service deployment descriptor (in an EAR and/or SAR file), it supports all the usual configuration options of a Hibernate <literal>SessionFactory</literal>. However, you still have to name all your mapping files in the deployment descriptor. If you decide to use the optional HAR deployment, JBoss will automatically detect all mapping files in your HAR file."
+#. Tag: para
+#: architecture.xml:257
+#, no-c-format
+msgid ""
+"<emphasis>HAR deployment:</emphasis> Usually you deploy the Hibernate JMX "
+"service using a JBoss service deployment descriptor (in an EAR and/or SAR "
+"file), it supports all the usual configuration options of a Hibernate "
+"<literal>SessionFactory</literal>. However, you still have to name all your "
+"mapping files in the deployment descriptor. If you decide to use the "
+"optional HAR deployment, JBoss will automatically detect all mapping files "
+"in your HAR file."
 msgstr ""
+"<emphasis>HAR 部署:</emphasis> 通常情况下,你会使用JBoss的服务部署描述符(在"
+"EAR或/和SAR文件中)来部署Hibernate JMX服务。 这种部署方式支持所有常见的"
+"Hibernate <literal>SessionFactory</literal>的配置选项。 不过,你仍需在部署描"
+"述符中,列出你所有的映射文件的名字。如果你使用HAR部署方式, JBoss 会自动探测出"
+"你的HAR文件中所有的映射文件。"
 
-#: index.docbook:268
-msgid "Consult the JBoss AS user guide for more information about these options."
-msgstr ""
+#. Tag: para
+#: architecture.xml:268
+#, no-c-format
+msgid ""
+"Consult the JBoss AS user guide for more information about these options."
+msgstr "这些选项更多的描述,请参考JBoss 应用程序用户指南。"
 
-#: index.docbook:272
-msgid "Another feature available as a JMX service are runtime Hibernate statistics. See <xref linkend=\"configuration-optional-statistics\"/>."
+#. Tag: para
+#: architecture.xml:272
+#, no-c-format
+msgid ""
+"Another feature available as a JMX service are runtime Hibernate statistics. "
+"See <xref linkend=\"configuration-optional-statistics\"/>."
 msgstr ""
+"将Hibernate以部署为JMX服务的另一个好处,是可以查看Hibernate的运行时统计信息。"
+"参看 <xref linkend=\"configuration-optional-statistics\"/>."
 
-#: index.docbook:279
+#. Tag: title
+#: architecture.xml:279
+#, no-c-format
 msgid "JCA Support"
-msgstr ""
+msgstr "对JCA的支持"
 
-#: index.docbook:280
-msgid "Hibernate may also be configured as a JCA connector. Please see the website for more details. Please note that Hibernate JCA support is still considered experimental."
+#. Tag: para
+#: architecture.xml:280
+#, no-c-format
+msgid ""
+"Hibernate may also be configured as a JCA connector. Please see the website "
+"for more details. Please note that Hibernate JCA support is still considered "
+"experimental."
 msgstr ""
+"Hibernate也可以被配置为一个JCA连接器(JCA connector)。更多信息请参看网站。 "
+"请注意,Hibernate对JCA的支持,仍处于实验性阶段。"
 
-#: index.docbook:287
+#. Tag: title
+#: architecture.xml:287
+#, no-c-format
 msgid "Contextual Sessions"
-msgstr ""
+msgstr "上下文相关的(Contextual)Session"
 
-#: index.docbook:288
-msgid "Most applications using Hibernate need some form of \"contextual\" sessions, where a given session is in effect throughout the scope of a given context. However, across applications the definition of what constitutes a context is typically different; and different contexts define different scopes to the notion of current. Applications using Hibernate prior to version 3.0 tended to utilize either home-grown <literal>ThreadLocal</literal>-based contextual sessions, helper classes such as <literal>HibernateUtil</literal>, or utilized third-party frameworks (such as Spring or Pico) which provided proxy/interception-based contextual sessions."
+#. Tag: para
+#: architecture.xml:288
+#, no-c-format
+msgid ""
+"Most applications using Hibernate need some form of \"contextual\" sessions, "
+"where a given session is in effect throughout the scope of a given context. "
+"However, across applications the definition of what constitutes a context is "
+"typically different; and different contexts define different scopes to the "
+"notion of current. Applications using Hibernate prior to version 3.0 tended "
+"to utilize either home-grown <literal>ThreadLocal</literal>-based contextual "
+"sessions, helper classes such as <literal>HibernateUtil</literal>, or "
+"utilized third-party frameworks (such as Spring or Pico) which provided "
+"proxy/interception-based contextual sessions."
 msgstr ""
+"使用Hibernate的大多数应用程序需要某种形式的“上下文相关的” session,特定的"
+"session在整个特定的上下文范围内始终有效。然而,对不同类型的应用程序而言,要为"
+"什么是组成这种“上下文”下一个定义通常是困难的;不同的上下文对“当前”这个概念定"
+"义了不同的范围。在3.0版本之前,使用Hibernate的程序要么采用自行编写的基于"
+"<literal>ThreadLocal</literal>的上下文session,要么采用"
+"<literal>HibernateUtil</literal>这样的辅助类,要么采用第三方框架(比如Spring"
+"或Pico),它们提供了基于代理(proxy)或者基于拦截器(interception)的上下文相关"
+"session。"
 
-#: index.docbook:297
-msgid "Starting with version 3.0.1, Hibernate added the <literal>SessionFactory.getCurrentSession()</literal> method. Initially, this assumed usage of <literal>JTA</literal> transactions, where the <literal>JTA</literal> transaction defined both the scope and context of a current session. The Hibernate team maintains that, given the maturity of the numerous stand-alone <literal>JTA TransactionManager</literal> implementations out there, most (if not all) applications should be using <literal>JTA</literal> transaction management whether or not they are deployed into a <literal>J2EE</literal> container. Based on that, the <literal>JTA</literal>-based contextual sessions is all you should ever need to use."
+#. Tag: para
+#: architecture.xml:297
+#, no-c-format
+msgid ""
+"Starting with version 3.0.1, Hibernate added the <literal>SessionFactory."
+"getCurrentSession()</literal> method. Initially, this assumed usage of "
+"<literal>JTA</literal> transactions, where the <literal>JTA</literal> "
+"transaction defined both the scope and context of a current session. The "
+"Hibernate team maintains that, given the maturity of the numerous stand-"
+"alone <literal>JTA TransactionManager</literal> implementations out there, "
+"most (if not all) applications should be using <literal>JTA</literal> "
+"transaction management whether or not they are deployed into a "
+"<literal>J2EE</literal> container. Based on that, the <literal>JTA</literal>-"
+"based contextual sessions is all you should ever need to use."
 msgstr ""
+"从3.0.1版本开始,Hibernate增加了<literal>SessionFactory.getCurrentSession()</"
+"literal>方法。一开始,它假定了采用<literal>JTA</literal>事务,<literal>JTA</"
+"literal>事务定义了当前session的范围和上下文(scope and context)。Hibernate开发"
+"团队坚信,因为有好几个独立的<literal>JTA TransactionManager</literal>实现稳定"
+"可用,不论是否被部署到一个<literal>J2EE</literal>容器中,大多数(假若不是所有"
+"的)应用程序都应该采用<literal>JTA</literal>事务管理。基于这一点,采用"
+"<literal>JTA</literal>的上下文相关session可以满足你一切需要。"
 
-#: index.docbook:307
-msgid "However, as of version 3.1, the processing behind <literal>SessionFactory.getCurrentSession()</literal> is now pluggable. To that end, a new extension interface (<literal>org.hibernate.context.CurrentSessionContext</literal>) and a new configuration parameter (<literal>hibernate.current_session_context_class</literal>) have been added to allow pluggability of the scope and context of defining current sessions."
+#. Tag: para
+#: architecture.xml:307
+#, no-c-format
+msgid ""
+"However, as of version 3.1, the processing behind <literal>SessionFactory."
+"getCurrentSession()</literal> is now pluggable. To that end, a new extension "
+"interface (<literal>org.hibernate.context.CurrentSessionContext</literal>) "
+"and a new configuration parameter (<literal>hibernate."
+"current_session_context_class</literal>) have been added to allow "
+"pluggability of the scope and context of defining current sessions."
 msgstr ""
+"更好的是,从3.1开始,<literal>SessionFactory.getCurrentSession()</literal>的"
+"后台实现是可拔插的。因此,我们引入了新的扩展接口(<literal>org.hibernate."
+"context.CurrentSessionContext</literal>)和新的配置参数(<literal>hibernate."
+"current_session_context_class</literal>),以便对什么是“当前session”的范围和上"
+"下文(scope and context)的定义进行拔插。"
 
-#: index.docbook:314
-msgid "See the Javadocs for the <literal>org.hibernate.context.CurrentSessionContext</literal> interface for a detailed discussion of its contract. It defines a single method, <literal>currentSession()</literal>, by which the implementation is responsible for tracking the current contextual session. Out-of-the-box, Hibernate comes with three implementations of this interface."
+#. Tag: para
+#: architecture.xml:314
+#, no-c-format
+msgid ""
+"See the Javadocs for the <literal>org.hibernate.context."
+"CurrentSessionContext</literal> interface for a detailed discussion of its "
+"contract. It defines a single method, <literal>currentSession()</literal>, "
+"by which the implementation is responsible for tracking the current "
+"contextual session. Out-of-the-box, Hibernate comes with three "
+"implementations of this interface."
 msgstr ""
+"请参阅<literal>org.hibernate.context.CurrentSessionContext</literal>接口的"
+"Javadoc,那里有关于它的契约的详细讨论。它定义了单一的方法,"
+"<literal>currentSession()</literal>,特定的实现用它来负责跟踪当前的上下文"
+"session。Hibernate内置了此接口的三种实现。"
 
-#: index.docbook:324
-msgid "<literal>org.hibernate.context.JTASessionContext</literal> - current sessions are tracked and scoped by a <literal>JTA</literal> transaction. The processing here is exactly the same as in the older JTA-only approach. See the Javadocs for details."
+#. Tag: para
+#: architecture.xml:324
+#, no-c-format
+msgid ""
+"<literal>org.hibernate.context.JTASessionContext</literal> - current "
+"sessions are tracked and scoped by a <literal>JTA</literal> transaction. The "
+"processing here is exactly the same as in the older JTA-only approach. See "
+"the Javadocs for details."
 msgstr ""
+"<literal>org.hibernate.context.JTASessionContext</literal> - 当前session根据"
+"<literal>JTA</literal>来跟踪和界定。这和以前的仅支持JTA的方法是完全一样的。详"
+"情请参阅Javadoc。"
 
-#: index.docbook:332
-msgid "<literal>org.hibernate.context.ThreadLocalSessionContext</literal> - current sessions are tracked by thread of execution. Again, see the Javadocs for details."
+#. Tag: para
+#: architecture.xml:332
+#, no-c-format
+msgid ""
+"<literal>org.hibernate.context.ThreadLocalSessionContext</literal> - current "
+"sessions are tracked by thread of execution. Again, see the Javadocs for "
+"details."
 msgstr ""
+"<literal>org.hibernate.context.ThreadLocalSessionContext</literal> - 当前"
+"session通过当前执行的线程来跟踪和界定。详情也请参阅Javadoc。"
 
-#: index.docbook:338
-msgid "<literal>org.hibernate.context.ManagedSessionContext</literal> - current sessions are tracked by thread of execution. However, you are responsible to bind and unbind a <literal>Session</literal> instance with static methods on this class, it does never open, flush, or close a <literal>Session</literal>."
+#. Tag: para
+#: architecture.xml:338
+#, no-c-format
+msgid ""
+"<literal>org.hibernate.context.ManagedSessionContext</literal> - current "
+"sessions are tracked by thread of execution. However, you are responsible to "
+"bind and unbind a <literal>Session</literal> instance with static methods on "
+"this class, it does never open, flush, or close a <literal>Session</literal>."
 msgstr ""
+"<literal>org.hibernate.context.ManagedSessionContext</literal> - 当前session"
+"通过当前执行的线程来跟踪和界定。但是,你需要负责使用这个类的静态方法将"
+"<literal>Session</literal>实例绑定、或者取消绑定,它并不会打开(open)、flush或"
+"者关闭(close)任何<literal>Session</literal>。"
 
-#: index.docbook:347
-msgid "The first two implementations provide a \"one session - one database transaction\" programming model, also known and used as <emphasis>session-per-request</emphasis>. The beginning and end of a Hibernate session is defined by the duration of a database transaction. If you use programatic transaction demarcation in plain JSE without JTA, you are adviced to use the Hibernate <literal>Transaction</literal> API to hide the underlying transaction system from your code. If you use JTA, use the JTA interfaces to demarcate transactions. If you execute in an EJB container that supports CMT, transaction boundaries are defined declaratively and you don't need any transaction or session demarcation operations in your code. Refer to <xref linkend=\"transactions\"/> for more information and code examples."
+#. Tag: para
+#: architecture.xml:347
+#, no-c-format
+msgid ""
+"The first two implementations provide a \"one session - one database "
+"transaction\" programming model, also known and used as <emphasis>session-"
+"per-request</emphasis>. The beginning and end of a Hibernate session is "
+"defined by the duration of a database transaction. If you use programatic "
+"transaction demarcation in plain JSE without JTA, you are adviced to use the "
+"Hibernate <literal>Transaction</literal> API to hide the underlying "
+"transaction system from your code. If you use JTA, use the JTA interfaces to "
+"demarcate transactions. If you execute in an EJB container that supports "
+"CMT, transaction boundaries are defined declaratively and you don't need any "
+"transaction or session demarcation operations in your code. Refer to <xref "
+"linkend=\"transactions\"/> for more information and code examples."
 msgstr ""
+"前两种实现都提供了“每数据库事务对应一个session”的编程模型,也称作<emphasis>每"
+"次请求一个session</emphasis>。Hibernate session的起始和终结由数据库事务的生存"
+"来控制。假若你在纯粹的 Java SE之上采用自行编写代码来管理事务,而不使用JTA,建"
+"议你使用Hibernate <literal>Transaction</literal> API来把底层事务实现从你的代"
+"码中隐藏掉。如果你使用JTA,请使用JTA借口来管理Transaction。如果你在支持CMT的"
+"EJB容器中执行代码,事务边界是声明式定义的,你不需要在代码中进行任何事务或"
+"session管理操作。请参阅<xref linkend=\"transactions\"/>一节来阅读更多的内容和"
+"示例代码。"
 
-#: index.docbook:359
-msgid "The <literal>hibernate.current_session_context_class</literal> configuration parameter defines which <literal>org.hibernate.context.CurrentSessionContext</literal> implementation should be used. Note that for backwards compatibility, if this config param is not set but a <literal>org.hibernate.transaction.TransactionManagerLookup</literal> is configured, Hibernate will use the <literal>org.hibernate.context.JTASessionContext</literal>. Typically, the value of this parameter would just name the implementation class to use; for the three out-of-the-box implementations, however, there are three corresponding short names, \"jta\", \"thread\", and \"managed\"."
+#. Tag: para
+#: architecture.xml:359
+#, no-c-format
+msgid ""
+"The <literal>hibernate.current_session_context_class</literal> configuration "
+"parameter defines which <literal>org.hibernate.context."
+"CurrentSessionContext</literal> implementation should be used. Note that for "
+"backwards compatibility, if this config param is not set but a <literal>org."
+"hibernate.transaction.TransactionManagerLookup</literal> is configured, "
+"Hibernate will use the <literal>org.hibernate.context.JTASessionContext</"
+"literal>. Typically, the value of this parameter would just name the "
+"implementation class to use; for the three out-of-the-box implementations, "
+"however, there are three corresponding short names, \"jta\", \"thread\", and "
+"\"managed\"."
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+"<literal>hibernate.current_session_context_class</literal>配置参数定义了应该"
+"采用哪个<literal>org.hibernate.context.CurrentSessionContext</literal>实现。"
+"注意,为了向下兼容,如果未配置此参数,但是存在<literal>org.hibernate."
+"transaction.TransactionManagerLookup</literal>的配置,Hibernate会采用"
+"<literal>org.hibernate.context.JTASessionContext</literal>。一般而言,此参数"
+"的值指明了要使用的实现类的全名,但那三种内置的实现可以使用简写,即\"jta\"、"
+"\"thread\"和\"managed\"。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/association_mapping.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/association_mapping.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/association_mapping.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,608 +1,871 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:6
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: association_mapping.xml:6
+#, no-c-format
 msgid "Association Mappings"
-msgstr ""
+msgstr "关联关系映射"
 
-#: index.docbook:9
+#. Tag: title
+#: association_mapping.xml:9
+#, no-c-format
 msgid "Introduction"
-msgstr ""
+msgstr "介绍"
 
-#: index.docbook:11
-msgid "Association mappings are the often most difficult thing to get right. In this section we'll go through the canonical cases one by one, starting with unidirectional mappings, and then considering the bidirectional cases. We'll use <literal>Person</literal> and <literal>Address</literal> in all the examples."
+#. Tag: para
+#: association_mapping.xml:11
+#, no-c-format
+msgid ""
+"Association mappings are the often most difficult thing to get right. In "
+"this section we'll go through the canonical cases one by one, starting with "
+"unidirectional mappings, and then considering the bidirectional cases. We'll "
+"use <literal>Person</literal> and <literal>Address</literal> in all the "
+"examples."
 msgstr ""
+"关联关系映射通常情况是最难配置正确的。在这个部分中,我们从单向关系映射开始,"
+"然后考虑双向关系映射,由浅至深讲述一遍典型的案例。在所有的例子中,我们都使用 "
+"<literal>Person</literal>和<literal>Address</literal>。"
 
-#: index.docbook:19
-msgid "We'll classify associations by whether or not they map to an intervening join table, and by multiplicity."
-msgstr ""
+#. Tag: para
+#: association_mapping.xml:19
+#, no-c-format
+msgid ""
+"We'll classify associations by whether or not they map to an intervening "
+"join table, and by multiplicity."
+msgstr "我们根据映射关系是否涉及连接表以及多样性来划分关联类型。"
 
-#: index.docbook:24
-msgid "Nullable foreign keys are not considered good practice in traditional data modelling, so all our examples use not null foreign keys. This is not a requirement of Hibernate, and the mappings will all work if you drop the nullability constraints."
+#. Tag: para
+#: association_mapping.xml:24
+#, no-c-format
+msgid ""
+"Nullable foreign keys are not considered good practice in traditional data "
+"modelling, so all our examples use not null foreign keys. This is not a "
+"requirement of Hibernate, and the mappings will all work if you drop the "
+"nullability constraints."
 msgstr ""
+"在传统的数据建模中,允许为Null值的外键被认为是一种不好的实践,因此我们所有的"
+"例子中都使用不允许为Null的外键。这并不是Hibernate的要求,即使你删除掉不允许为"
+"Null的约束,Hibernate映射一样可以工作的很好。"
 
-#: index.docbook:34
+#. Tag: title
+#: association_mapping.xml:34
+#, no-c-format
 msgid "Unidirectional associations"
-msgstr ""
+msgstr "单向关联(Unidirectional associations)"
 
-#: index.docbook:37, index.docbook:108
+#. Tag: title
+#: association_mapping.xml:37 association_mapping.xml:108
+#, fuzzy, no-c-format
 msgid "many to one"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"多对一(many to one)\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"多对一(many to one)"
 
-#: index.docbook:39
-msgid "A <emphasis>unidirectional many-to-one association</emphasis> is the most common kind of unidirectional association."
-msgstr ""
+#. Tag: para
+#: association_mapping.xml:39
+#, no-c-format
+msgid ""
+"A <emphasis>unidirectional many-to-one association</emphasis> is the most "
+"common kind of unidirectional association."
+msgstr "<emphasis>单向many-to-one关联</emphasis>是最常见的单向关联关系。"
 
-#: index.docbook:44
+#. Tag: programlisting
+#: association_mapping.xml:44
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <many-to-one name=\"address\" \n"
-      "        column=\"addressId\"\n"
-      "        not-null=\"true\"/>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <many-to-one name=\"address\" \n"
+"        column=\"addressId\"\n"
+"        not-null=\"true\"/>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:45, index.docbook:161
+#. Tag: programlisting
+#: association_mapping.xml:45 association_mapping.xml:161
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "create table Person ( personId bigint not null primary key, addressId bigint not null )\n"
-      "create table Address ( addressId bigint not null primary key )\n"
-      "        ]]>"
+"<![CDATA[\n"
+"create table Person ( personId bigint not null primary key, addressId bigint "
+"not null )\n"
+"create table Address ( addressId bigint not null primary key )\n"
+"        ]]>"
 msgstr ""
 
-#: index.docbook:50, index.docbook:121, index.docbook:185, index.docbook:225
+#. Tag: title
+#: association_mapping.xml:50 association_mapping.xml:121
+#: association_mapping.xml:185 association_mapping.xml:225
+#, no-c-format
 msgid "one to one"
-msgstr ""
+msgstr "一对一(one to one)"
 
-#: index.docbook:52
-msgid "A <emphasis>unidirectional one-to-one association on a foreign key</emphasis> is almost identical. The only difference is the column unique constraint."
+#. Tag: para
+#: association_mapping.xml:52
+#, no-c-format
+msgid ""
+"A <emphasis>unidirectional one-to-one association on a foreign key</"
+"emphasis> is almost identical. The only difference is the column unique "
+"constraint."
 msgstr ""
+"<emphasis>基于外键关联的单向一对一关联</emphasis>和<emphasis>单向多对一关联</"
+"emphasis>几乎是一样的。唯一的不同就是单向一对一关联中的外键字段具有唯一性约"
+"束。"
 
-#: index.docbook:57
+#. Tag: programlisting
+#: association_mapping.xml:57
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <many-to-one name=\"address\" \n"
-      "        column=\"addressId\" \n"
-      "        unique=\"true\"\n"
-      "        not-null=\"true\"/>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <many-to-one name=\"address\" \n"
+"        column=\"addressId\" \n"
+"        unique=\"true\"\n"
+"        not-null=\"true\"/>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:58, index.docbook:193
+#. Tag: programlisting
+#: association_mapping.xml:58 association_mapping.xml:193
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "create table Person ( personId bigint not null primary key, addressId bigint not null unique )\n"
-      "create table Address ( addressId bigint not null primary key )\n"
-      "        ]]>"
+"<![CDATA[\n"
+"create table Person ( personId bigint not null primary key, addressId bigint "
+"not null unique )\n"
+"create table Address ( addressId bigint not null primary key )\n"
+"        ]]>"
 msgstr ""
 
-#: index.docbook:60
-msgid "A <emphasis>unidirectional one-to-one association on a primary key</emphasis> usually uses a special id generator. (Notice that we've reversed the direction of the association in this example.)"
+#. Tag: para
+#: association_mapping.xml:60
+#, no-c-format
+msgid ""
+"A <emphasis>unidirectional one-to-one association on a primary key</"
+"emphasis> usually uses a special id generator. (Notice that we've reversed "
+"the direction of the association in this example.)"
 msgstr ""
+"<emphasis>基于主键关联的单向一对一关联</emphasis>通常使用一个特定的id生成器。"
+"(请注意,在这个例子中我们掉换了关联的方向。)"
 
-#: index.docbook:66
+#. Tag: programlisting
+#: association_mapping.xml:66
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"foreign\">\n"
-      "            <param name=\"property\">person</param>\n"
-      "        </generator>\n"
-      "    </id>\n"
-      "    <one-to-one name=\"person\" constrained=\"true\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"foreign\">\n"
+"            <param name=\"property\">person</param>\n"
+"        </generator>\n"
+"    </id>\n"
+"    <one-to-one name=\"person\" constrained=\"true\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:67, index.docbook:201
+#. Tag: programlisting
+#: association_mapping.xml:67 association_mapping.xml:201
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "create table Person ( personId bigint not null primary key )\n"
-      "create table Address ( personId bigint not null primary key )\n"
-      "        ]]>"
+"<![CDATA[\n"
+"create table Person ( personId bigint not null primary key )\n"
+"create table Address ( personId bigint not null primary key )\n"
+"        ]]>"
 msgstr ""
 
-#: index.docbook:72, index.docbook:94
+#. Tag: title
+#: association_mapping.xml:72 association_mapping.xml:94
+#, fuzzy, no-c-format
 msgid "one to many"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"一对多(one to many)\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"一对多(one to many)"
 
-#: index.docbook:74
-msgid "A <emphasis>unidirectional one-to-many association on a foreign key</emphasis> is a very unusual case, and is not really recommended."
+#. Tag: para
+#: association_mapping.xml:74
+#, no-c-format
+msgid ""
+"A <emphasis>unidirectional one-to-many association on a foreign key</"
+"emphasis> is a very unusual case, and is not really recommended."
 msgstr ""
+"<emphasis>基于外键关联的单向一对多关联</emphasis>是一种很少见的情况,并不推荐"
+"使用。"
 
-#: index.docbook:79
+#. Tag: programlisting
+#: association_mapping.xml:79
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <set name=\"addresses\">\n"
-      "        <key column=\"personId\" \n"
-      "            not-null=\"true\"/>\n"
-      "        <one-to-many class=\"Address\"/>\n"
-      "    </set>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <set name=\"addresses\">\n"
+"        <key column=\"personId\" \n"
+"            not-null=\"true\"/>\n"
+"        <one-to-many class=\"Address\"/>\n"
+"    </set>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:80
+#. Tag: programlisting
+#: association_mapping.xml:80
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "create table Person ( personId bigint not null primary key )\n"
-      "create table Address ( addressId bigint not null primary key, personId bigint not null )\n"
-      "        ]]>"
+"<![CDATA[\n"
+"create table Person ( personId bigint not null primary key )\n"
+"create table Address ( addressId bigint not null primary key, personId "
+"bigint not null )\n"
+"        ]]>"
 msgstr ""
 
-#: index.docbook:82
+#. Tag: para
+#: association_mapping.xml:82
+#, no-c-format
 msgid "We think it's better to use a join table for this kind of association."
-msgstr ""
+msgstr "我们认为对于这种关联关系最好使用连接表。"
 
-#: index.docbook:91
+#. Tag: title
+#: association_mapping.xml:91
+#, no-c-format
 msgid "Unidirectional associations with join tables"
-msgstr ""
+msgstr "使用连接表的单向关联(Unidirectional associations with join tables)"
 
-#: index.docbook:96
-msgid "A <emphasis>unidirectional one-to-many association on a join table</emphasis> is much preferred. Notice that by specifying <literal>unique=\"true\"</literal>, we have changed the multiplicity from many-to-many to one-to-many."
+#. Tag: para
+#: association_mapping.xml:96
+#, no-c-format
+msgid ""
+"A <emphasis>unidirectional one-to-many association on a join table</"
+"emphasis> is much preferred. Notice that by specifying <literal>unique=\"true"
+"\"</literal>, we have changed the multiplicity from many-to-many to one-to-"
+"many."
 msgstr ""
+"<emphasis>基于连接表的单向一对多关联</emphasis> 应该优先被采用。请注意,通过"
+"指定<literal>unique=\"true\"</literal>,我们可以把多样性从多对多改变为一对"
+"多。"
 
-#: index.docbook:102
+#. Tag: programlisting
+#: association_mapping.xml:102
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <set name=\"addresses\" table=\"PersonAddress\">\n"
-      "        <key column=\"personId\"/>\n"
-      "        <many-to-many column=\"addressId\"\n"
-      "            unique=\"true\"\n"
-      "            class=\"Address\"/>\n"
-      "    </set>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <set name=\"addresses\" table=\"PersonAddress\">\n"
+"        <key column=\"personId\"/>\n"
+"        <many-to-many column=\"addressId\"\n"
+"            unique=\"true\"\n"
+"            class=\"Address\"/>\n"
+"    </set>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:103
+#. Tag: programlisting
+#: association_mapping.xml:103
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "create table Person ( personId bigint not null primary key )\n"
-      "create table PersonAddress ( personId not null, addressId bigint not null primary key )\n"
-      "create table Address ( addressId bigint not null primary key )\n"
-      "        ]]>"
+"<![CDATA[\n"
+"create table Person ( personId bigint not null primary key )\n"
+"create table PersonAddress ( personId not null, addressId bigint not null "
+"primary key )\n"
+"create table Address ( addressId bigint not null primary key )\n"
+"        ]]>"
 msgstr ""
 
-#: index.docbook:110
-msgid "A <emphasis>unidirectional many-to-one association on a join table</emphasis> is quite common when the association is optional."
+#. Tag: para
+#: association_mapping.xml:110
+#, no-c-format
+msgid ""
+"A <emphasis>unidirectional many-to-one association on a join table</"
+"emphasis> is quite common when the association is optional."
 msgstr ""
+"<emphasis>基于连接表的单向多对一关联</emphasis>在关联关系可选的情况下应用也很"
+"普遍。"
 
-#: index.docbook:115
+#. Tag: programlisting
+#: association_mapping.xml:115
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <join table=\"PersonAddress\" \n"
-      "        optional=\"true\">\n"
-      "        <key column=\"personId\" unique=\"true\"/>\n"
-      "        <many-to-one name=\"address\"\n"
-      "            column=\"addressId\" \n"
-      "            not-null=\"true\"/>\n"
-      "    </join>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <join table=\"PersonAddress\" \n"
+"        optional=\"true\">\n"
+"        <key column=\"personId\" unique=\"true\"/>\n"
+"        <many-to-one name=\"address\"\n"
+"            column=\"addressId\" \n"
+"            not-null=\"true\"/>\n"
+"    </join>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:116
+#. Tag: programlisting
+#: association_mapping.xml:116
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "create table Person ( personId bigint not null primary key )\n"
-      "create table PersonAddress ( personId bigint not null primary key, addressId bigint not null )\n"
-      "create table Address ( addressId bigint not null primary key )\n"
-      "        ]]>"
+"<![CDATA[\n"
+"create table Person ( personId bigint not null primary key )\n"
+"create table PersonAddress ( personId bigint not null primary key, addressId "
+"bigint not null )\n"
+"create table Address ( addressId bigint not null primary key )\n"
+"        ]]>"
 msgstr ""
 
-#: index.docbook:123
-msgid "A <emphasis>unidirectional one-to-one association on a join table</emphasis> is extremely unusual, but possible."
+#. Tag: para
+#: association_mapping.xml:123
+#, no-c-format
+msgid ""
+"A <emphasis>unidirectional one-to-one association on a join table</emphasis> "
+"is extremely unusual, but possible."
 msgstr ""
+"<emphasis>基于连接表的单向一对一关联</emphasis>非常少见,但也是可行的。"
 
-#: index.docbook:128
+#. Tag: programlisting
+#: association_mapping.xml:128
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <join table=\"PersonAddress\" \n"
-      "        optional=\"true\">\n"
-      "        <key column=\"personId\" \n"
-      "            unique=\"true\"/>\n"
-      "        <many-to-one name=\"address\"\n"
-      "            column=\"addressId\" \n"
-      "            not-null=\"true\"\n"
-      "            unique=\"true\"/>\n"
-      "    </join>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <join table=\"PersonAddress\" \n"
+"        optional=\"true\">\n"
+"        <key column=\"personId\" \n"
+"            unique=\"true\"/>\n"
+"        <many-to-one name=\"address\"\n"
+"            column=\"addressId\" \n"
+"            not-null=\"true\"\n"
+"            unique=\"true\"/>\n"
+"    </join>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:129, index.docbook:233
+#. Tag: programlisting
+#: association_mapping.xml:129 association_mapping.xml:233
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "create table Person ( personId bigint not null primary key )\n"
-      "create table PersonAddress ( personId bigint not null primary key, addressId bigint not null unique )\n"
-      "create table Address ( addressId bigint not null primary key )\n"
-      "        ]]>"
+"<![CDATA[\n"
+"create table Person ( personId bigint not null primary key )\n"
+"create table PersonAddress ( personId bigint not null primary key, addressId "
+"bigint not null unique )\n"
+"create table Address ( addressId bigint not null primary key )\n"
+"        ]]>"
 msgstr ""
 
-#: index.docbook:134, index.docbook:238
+#. Tag: title
+#: association_mapping.xml:134 association_mapping.xml:238
+#, no-c-format
 msgid "many to many"
-msgstr ""
+msgstr "多对多(many to many)"
 
-#: index.docbook:136
-msgid "Finally, we have a <emphasis>unidirectional many-to-many association</emphasis>."
-msgstr ""
+#. Tag: para
+#: association_mapping.xml:136
+#, no-c-format
+msgid ""
+"Finally, we have a <emphasis>unidirectional many-to-many association</"
+"emphasis>."
+msgstr "最后,还有 <emphasis>单向多对多关联</emphasis>."
 
-#: index.docbook:140
+#. Tag: programlisting
+#: association_mapping.xml:140
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <set name=\"addresses\" table=\"PersonAddress\">\n"
-      "        <key column=\"personId\"/>\n"
-      "        <many-to-many column=\"addressId\"\n"
-      "            class=\"Address\"/>\n"
-      "    </set>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <set name=\"addresses\" table=\"PersonAddress\">\n"
+"        <key column=\"personId\"/>\n"
+"        <many-to-many column=\"addressId\"\n"
+"            class=\"Address\"/>\n"
+"    </set>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:141, index.docbook:246
+#. Tag: programlisting
+#: association_mapping.xml:141 association_mapping.xml:246
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "create table Person ( personId bigint not null primary key )\n"
-      "create table PersonAddress ( personId bigint not null, addressId bigint not null, primary key (personId, addressId) )\n"
-      "create table Address ( addressId bigint not null primary key )\n"
-      "        ]]>"
+"<![CDATA[\n"
+"create table Person ( personId bigint not null primary key )\n"
+"create table PersonAddress ( personId bigint not null, addressId bigint not "
+"null, primary key (personId, addressId) )\n"
+"create table Address ( addressId bigint not null primary key )\n"
+"        ]]>"
 msgstr ""
 
-#: index.docbook:148
+#. Tag: title
+#: association_mapping.xml:148
+#, no-c-format
 msgid "Bidirectional associations"
-msgstr ""
+msgstr "双向关联(Bidirectional associations)"
 
-#: index.docbook:151, index.docbook:211
+#. Tag: title
+#: association_mapping.xml:151 association_mapping.xml:211
+#, fuzzy, no-c-format
 msgid "one to many / many to one"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"一对多(one to many) / 多对一(many to one)\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"一对多(one to many) /多对一( many to one)"
 
-#: index.docbook:153
-msgid "A <emphasis>bidirectional many-to-one association</emphasis> is the most common kind of association. (This is the standard parent/child relationship.)"
+#. Tag: para
+#: association_mapping.xml:153
+#, no-c-format
+msgid ""
+"A <emphasis>bidirectional many-to-one association</emphasis> is the most "
+"common kind of association. (This is the standard parent/child relationship.)"
 msgstr ""
+"<emphasis>双向多对一关联</emphasis> 是最常见的关联关系。(这也是标准的父/子关"
+"联关系。)"
 
-#: index.docbook:159
+#. Tag: programlisting
+#: association_mapping.xml:159
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <many-to-one name=\"address\" \n"
-      "        column=\"addressId\"\n"
-      "        not-null=\"true\"/>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <set name=\"people\" inverse=\"true\">\n"
-      "        <key column=\"addressId\"/>\n"
-      "        <one-to-many class=\"Person\"/>\n"
-      "    </set>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <many-to-one name=\"address\" \n"
+"        column=\"addressId\"\n"
+"        not-null=\"true\"/>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <set name=\"people\" inverse=\"true\">\n"
+"        <key column=\"addressId\"/>\n"
+"        <one-to-many class=\"Person\"/>\n"
+"    </set>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:163
-msgid "If you use a <literal>List</literal> (or other indexed collection) you need to set the <literal>key</literal> column of the foreign key to <literal>not null</literal>, and let Hibernate manage the association from the collections side to maintain the index of each element (making the other side virtually inverse by setting <literal>update=\"false\"</literal> and <literal>insert=\"false\"</literal>):"
+#. Tag: para
+#: association_mapping.xml:163
+#, no-c-format
+msgid ""
+"If you use a <literal>List</literal> (or other indexed collection) you need "
+"to set the <literal>key</literal> column of the foreign key to <literal>not "
+"null</literal>, and let Hibernate manage the association from the "
+"collections side to maintain the index of each element (making the other "
+"side virtually inverse by setting <literal>update=\"false\"</literal> and "
+"<literal>insert=\"false\"</literal>):"
 msgstr ""
+"如果你使用<literal>List</literal>(或者其他有序集合类),你需要设置外键对应的"
+"<literal>key</literal>列为 <literal>not null</literal>,让Hibernate来从集合端"
+"管理关联,维护每个元素的索引(通过设置<literal>update=\"false\"</literal> "
+"and <literal>insert=\"false\"</literal>来对另一端反向操作)。"
 
-#: index.docbook:171
+#. Tag: programlisting
+#: association_mapping.xml:171
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "   <id name=\"id\"/>\n"
-      "   ...\n"
-      "   <many-to-one name=\"address\"\n"
-      "      column=\"addressId\"\n"
-      "      not-null=\"true\"\n"
-      "      insert=\"false\"\n"
-      "      update=\"false\"/>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "   <id name=\"id\"/>\n"
-      "   ...\n"
-      "   <list name=\"people\">\n"
-      "      <key column=\"addressId\" not-null=\"true\"/>\n"
-      "      <list-index column=\"peopleIdx\"/>\n"
-      "      <one-to-many class=\"Person\"/>\n"
-      "   </list>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"   <id name=\"id\"/>\n"
+"   ...\n"
+"   <many-to-one name=\"address\"\n"
+"      column=\"addressId\"\n"
+"      not-null=\"true\"\n"
+"      insert=\"false\"\n"
+"      update=\"false\"/>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"   <id name=\"id\"/>\n"
+"   ...\n"
+"   <list name=\"people\">\n"
+"      <key column=\"addressId\" not-null=\"true\"/>\n"
+"      <list-index column=\"peopleIdx\"/>\n"
+"      <one-to-many class=\"Person\"/>\n"
+"   </list>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:173
-msgid "It is important that you define <literal>not-null=\"true\"</literal> on the <literal>&lt;key&gt;</literal> element of the collection mapping if the underlying foreign key column is <literal>NOT NULL</literal>. Don't only declare <literal>not-null=\"true\"</literal> on a possible nested <literal>&lt;column&gt;</literal> element, but on the <literal>&lt;key&gt;</literal> element."
+#. Tag: para
+#: association_mapping.xml:173
+#, no-c-format
+msgid ""
+"It is important that you define <literal>not-null=\"true\"</literal> on the "
+"<literal>&lt;key&gt;</literal> element of the collection mapping if the "
+"underlying foreign key column is <literal>NOT NULL</literal>. Don't only "
+"declare <literal>not-null=\"true\"</literal> on a possible nested "
+"<literal>&lt;column&gt;</literal> element, but on the <literal>&lt;key&gt;</"
+"literal> element."
 msgstr ""
+"假若集合映射的<literal>&lt;key&gt;</literal>元素对应的底层外键字段是"
+"<literal>NOT NULL</literal>的,那么为这一key元素定义<literal>not-null=\"true"
+"\"</literal>是很重要的。不要仅仅为可能的嵌套<literal>&lt;column&gt;</literal>"
+"元素定义<literal>not-null=\"true\"</literal>,<literal>&lt;key&gt;</literal>"
+"元素也是需要的。"
 
-#: index.docbook:187
-msgid "A <emphasis>bidirectional one-to-one association on a foreign key</emphasis> is quite common."
-msgstr ""
+#. Tag: para
+#: association_mapping.xml:187
+#, no-c-format
+msgid ""
+"A <emphasis>bidirectional one-to-one association on a foreign key</emphasis> "
+"is quite common."
+msgstr "<emphasis>基于外键关联的双向一对一关联</emphasis>也很常见。"
 
-#: index.docbook:192
+#. Tag: programlisting
+#: association_mapping.xml:192
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <many-to-one name=\"address\" \n"
-      "        column=\"addressId\" \n"
-      "        unique=\"true\"\n"
-      "        not-null=\"true\"/>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "   <one-to-one name=\"person\" \n"
-      "        property-ref=\"address\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <many-to-one name=\"address\" \n"
+"        column=\"addressId\" \n"
+"        unique=\"true\"\n"
+"        not-null=\"true\"/>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"   <one-to-one name=\"person\" \n"
+"        property-ref=\"address\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:195
-msgid "A <emphasis>bidirectional one-to-one association on a primary key</emphasis> uses the special id generator."
-msgstr ""
+#. Tag: para
+#: association_mapping.xml:195
+#, no-c-format
+msgid ""
+"A <emphasis>bidirectional one-to-one association on a primary key</emphasis> "
+"uses the special id generator."
+msgstr "<emphasis>基于主键关联的一对一关联</emphasis>需要使用特定的id生成器。"
 
-#: index.docbook:200
+#. Tag: programlisting
+#: association_mapping.xml:200
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <one-to-one name=\"address\"/>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"foreign\">\n"
-      "            <param name=\"property\">person</param>\n"
-      "        </generator>\n"
-      "    </id>\n"
-      "    <one-to-one name=\"person\" \n"
-      "        constrained=\"true\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <one-to-one name=\"address\"/>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"foreign\">\n"
+"            <param name=\"property\">person</param>\n"
+"        </generator>\n"
+"    </id>\n"
+"    <one-to-one name=\"person\" \n"
+"        constrained=\"true\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:208
+#. Tag: title
+#: association_mapping.xml:208
+#, no-c-format
 msgid "Bidirectional associations with join tables"
-msgstr ""
+msgstr "使用连接表的双向关联(Bidirectional associations with join tables)"
 
-#: index.docbook:213
-msgid "A <emphasis>bidirectional one-to-many association on a join table</emphasis>. Note that the <literal>inverse=\"true\"</literal> can go on either end of the association, on the collection, or on the join."
+#. Tag: para
+#: association_mapping.xml:213
+#, no-c-format
+msgid ""
+"A <emphasis>bidirectional one-to-many association on a join table</"
+"emphasis>. Note that the <literal>inverse=\"true\"</literal> can go on "
+"either end of the association, on the collection, or on the join."
 msgstr ""
+"<emphasis>基于连接表的双向一对多关联</emphasis>。注意<literal>inverse=\"true"
+"\"</literal>可以出现在关联的任意一端,即collection端或者join端。"
 
-#: index.docbook:219
+#. Tag: programlisting
+#: association_mapping.xml:219
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <set name=\"addresses\" \n"
-      "        table=\"PersonAddress\">\n"
-      "        <key column=\"personId\"/>\n"
-      "        <many-to-many column=\"addressId\"\n"
-      "            unique=\"true\"\n"
-      "            class=\"Address\"/>\n"
-      "    </set>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <join table=\"PersonAddress\" \n"
-      "        inverse=\"true\" \n"
-      "        optional=\"true\">\n"
-      "        <key column=\"addressId\"/>\n"
-      "        <many-to-one name=\"person\"\n"
-      "            column=\"personId\"\n"
-      "            not-null=\"true\"/>\n"
-      "    </join>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <set name=\"addresses\" \n"
+"        table=\"PersonAddress\">\n"
+"        <key column=\"personId\"/>\n"
+"        <many-to-many column=\"addressId\"\n"
+"            unique=\"true\"\n"
+"            class=\"Address\"/>\n"
+"    </set>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <join table=\"PersonAddress\" \n"
+"        inverse=\"true\" \n"
+"        optional=\"true\">\n"
+"        <key column=\"addressId\"/>\n"
+"        <many-to-one name=\"person\"\n"
+"            column=\"personId\"\n"
+"            not-null=\"true\"/>\n"
+"    </join>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:220
+#. Tag: programlisting
+#: association_mapping.xml:220
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "create table Person ( personId bigint not null primary key )\n"
-      "create table PersonAddress ( personId bigint not null, addressId bigint not null primary key )\n"
-      "create table Address ( addressId bigint not null primary key )\n"
-      "        ]]>"
+"<![CDATA[\n"
+"create table Person ( personId bigint not null primary key )\n"
+"create table PersonAddress ( personId bigint not null, addressId bigint not "
+"null primary key )\n"
+"create table Address ( addressId bigint not null primary key )\n"
+"        ]]>"
 msgstr ""
 
-#: index.docbook:227
-msgid "A <emphasis>bidirectional one-to-one association on a join table</emphasis> is extremely unusual, but possible."
+#. Tag: para
+#: association_mapping.xml:227
+#, no-c-format
+msgid ""
+"A <emphasis>bidirectional one-to-one association on a join table</emphasis> "
+"is extremely unusual, but possible."
 msgstr ""
+"<emphasis>基于连接表的双向一对一关联</emphasis>极为罕见,但也是可行的。"
 
-#: index.docbook:232
+#. Tag: programlisting
+#: association_mapping.xml:232
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <join table=\"PersonAddress\" \n"
-      "        optional=\"true\">\n"
-      "        <key column=\"personId\" \n"
-      "            unique=\"true\"/>\n"
-      "        <many-to-one name=\"address\"\n"
-      "            column=\"addressId\" \n"
-      "            not-null=\"true\"\n"
-      "            unique=\"true\"/>\n"
-      "    </join>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <join table=\"PersonAddress\" \n"
-      "        optional=\"true\"\n"
-      "        inverse=\"true\">\n"
-      "        <key column=\"addressId\" \n"
-      "            unique=\"true\"/>\n"
-      "        <many-to-one name=\"person\"\n"
-      "            column=\"personId\" \n"
-      "            not-null=\"true\"\n"
-      "            unique=\"true\"/>\n"
-      "    </join>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <join table=\"PersonAddress\" \n"
+"        optional=\"true\">\n"
+"        <key column=\"personId\" \n"
+"            unique=\"true\"/>\n"
+"        <many-to-one name=\"address\"\n"
+"            column=\"addressId\" \n"
+"            not-null=\"true\"\n"
+"            unique=\"true\"/>\n"
+"    </join>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <join table=\"PersonAddress\" \n"
+"        optional=\"true\"\n"
+"        inverse=\"true\">\n"
+"        <key column=\"addressId\" \n"
+"            unique=\"true\"/>\n"
+"        <many-to-one name=\"person\"\n"
+"            column=\"personId\" \n"
+"            not-null=\"true\"\n"
+"            unique=\"true\"/>\n"
+"    </join>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:240
-msgid "Finally, we have a <emphasis>bidirectional many-to-many association</emphasis>."
-msgstr ""
+#. Tag: para
+#: association_mapping.xml:240
+#, no-c-format
+msgid ""
+"Finally, we have a <emphasis>bidirectional many-to-many association</"
+"emphasis>."
+msgstr "最后,还有 <emphasis>双向多对多关联</emphasis>."
 
-#: index.docbook:244
+#. Tag: programlisting
+#: association_mapping.xml:244
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\" column=\"personId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <set name=\"addresses\" table=\"PersonAddress\">\n"
-      "        <key column=\"personId\"/>\n"
-      "        <many-to-many column=\"addressId\"\n"
-      "            class=\"Address\"/>\n"
-      "    </set>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "    <id name=\"id\" column=\"addressId\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <set name=\"people\" inverse=\"true\" table=\"PersonAddress\">\n"
-      "        <key column=\"addressId\"/>\n"
-      "        <many-to-many column=\"personId\"\n"
-      "            class=\"Person\"/>\n"
-      "    </set>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\" column=\"personId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <set name=\"addresses\" table=\"PersonAddress\">\n"
+"        <key column=\"personId\"/>\n"
+"        <many-to-many column=\"addressId\"\n"
+"            class=\"Address\"/>\n"
+"    </set>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"    <id name=\"id\" column=\"addressId\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <set name=\"people\" inverse=\"true\" table=\"PersonAddress\">\n"
+"        <key column=\"addressId\"/>\n"
+"        <many-to-many column=\"personId\"\n"
+"            class=\"Person\"/>\n"
+"    </set>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:253
+#. Tag: title
+#: association_mapping.xml:253
+#, no-c-format
 msgid "More complex association mappings"
-msgstr ""
+msgstr "更复杂的关联映射"
 
-#: index.docbook:255
-msgid "More complex association joins are <emphasis>extremely</emphasis> rare. Hibernate makes it possible to handle more complex situations using SQL fragments embedded in the mapping document. For example, if a table with historical account information data defines <literal>accountNumber</literal>, <literal>effectiveEndDate</literal> and <literal>effectiveStartDate</literal>columns, mapped as follows:"
+#. Tag: para
+#: association_mapping.xml:255
+#, no-c-format
+msgid ""
+"More complex association joins are <emphasis>extremely</emphasis> rare. "
+"Hibernate makes it possible to handle more complex situations using SQL "
+"fragments embedded in the mapping document. For example, if a table with "
+"historical account information data defines <literal>accountNumber</"
+"literal>, <literal>effectiveEndDate</literal> and "
+"<literal>effectiveStartDate</literal>columns, mapped as follows:"
 msgstr ""
+"更复杂的关联连接<emphasis>极为</emphasis>罕见。 通过在映射文档中嵌入SQL片断,"
+"Hibernate也可以处理更为复杂的情况。比如,假若包含历史帐户数据的表定义了"
+"<literal>accountNumber</literal>, <literal>effectiveEndDate</literal> 和"
+"<literal>effectiveStartDate</literal>字段,按照下面映射:"
 
-#: index.docbook:264
+#. Tag: programlisting
+#: association_mapping.xml:264
+#, no-c-format
 msgid ""
-      "<![CDATA[<properties name=\"currentAccountKey\">\n"
-      "    <property name=\"accountNumber\" type=\"string\" not-null=\"true\"/>\n"
-      "    <property name=\"currentAccount\" type=\"boolean\">\n"
-      "        <formula>case when effectiveEndDate is null then 1 else 0 end</formula>\n"
-      "    </property>\n"
-      "</properties>\n"
-      "<property name=\"effectiveEndDate\" type=\"date\"/>\n"
-      "<property name=\"effectiveStateDate\" type=\"date\" not-null=\"true\"/>]]>"
+"<![CDATA[<properties name=\"currentAccountKey\">\n"
+"    <property name=\"accountNumber\" type=\"string\" not-null=\"true\"/>\n"
+"    <property name=\"currentAccount\" type=\"boolean\">\n"
+"        <formula>case when effectiveEndDate is null then 1 else 0 end</"
+"formula>\n"
+"    </property>\n"
+"</properties>\n"
+"<property name=\"effectiveEndDate\" type=\"date\"/>\n"
+"<property name=\"effectiveStateDate\" type=\"date\" not-null=\"true\"/>]]>"
 msgstr ""
 
-#: index.docbook:266
-msgid "Then we can map an association to the <emphasis>current</emphasis> instance (the one with null <literal>effectiveEndDate</literal>) using:"
+#. Tag: para
+#: association_mapping.xml:266
+#, no-c-format
+msgid ""
+"Then we can map an association to the <emphasis>current</emphasis> instance "
+"(the one with null <literal>effectiveEndDate</literal>) using:"
 msgstr ""
+"那么我们可以对<emphasis>目前(current)</emphasis>实例(其"
+"<literal>effectiveEndDate</literal>为null)使用这样的关联映射:"
 
-#: index.docbook:271
+#. Tag: programlisting
+#: association_mapping.xml:271
+#, no-c-format
 msgid ""
-      "<![CDATA[<many-to-one name=\"currentAccountInfo\" \n"
-      "        property-ref=\"currentAccountKey\"\n"
-      "        class=\"AccountInfo\">\n"
-      "    <column name=\"accountNumber\"/>\n"
-      "    <formula>'1'</formula>\n"
-      "</many-to-one>]]>"
+"<![CDATA[<many-to-one name=\"currentAccountInfo\" \n"
+"        property-ref=\"currentAccountKey\"\n"
+"        class=\"AccountInfo\">\n"
+"    <column name=\"accountNumber\"/>\n"
+"    <formula>'1'</formula>\n"
+"</many-to-one>]]>"
 msgstr ""
 
-#: index.docbook:273
-msgid "In a more complex example, imagine that the association between <literal>Employee</literal> and <literal>Organization</literal> is maintained in an <literal>Employment</literal> table full of historical employment data. Then an association to the employee's <emphasis>most recent</emphasis> employer (the one with the most recent <literal>startDate</literal>) might be mapped this way:"
+#. Tag: para
+#: association_mapping.xml:273
+#, no-c-format
+msgid ""
+"In a more complex example, imagine that the association between "
+"<literal>Employee</literal> and <literal>Organization</literal> is "
+"maintained in an <literal>Employment</literal> table full of historical "
+"employment data. Then an association to the employee's <emphasis>most "
+"recent</emphasis> employer (the one with the most recent <literal>startDate</"
+"literal>) might be mapped this way:"
 msgstr ""
+"更复杂的例子,假想<literal>Employee</literal>和<literal>Organization</literal>"
+"之间的关联是通过一个<literal>Employment</literal>中间表维护的,而中间表中填充"
+"了很多历史雇员数据。那“雇员的<emphasis>最新</emphasis>雇主”这个关联(最新雇主"
+"就是<literal>startDate</literal>最后的那个)可以这样映射:"
 
-#: index.docbook:281
+#. Tag: programlisting
+#: association_mapping.xml:281
+#, no-c-format
 msgid ""
-      "<![CDATA[<join>\n"
-      "    <key column=\"employeeId\"/>\n"
-      "    <subselect>\n"
-      "        select employeeId, orgId \n"
-      "        from Employments \n"
-      "        group by orgId \n"
-      "        having startDate = max(startDate)\n"
-      "    </subselect>\n"
-      "    <many-to-one name=\"mostRecentEmployer\" \n"
-      "            class=\"Organization\" \n"
-      "            column=\"orgId\"/>\n"
-      "</join>]]>"
+"<![CDATA[<join>\n"
+"    <key column=\"employeeId\"/>\n"
+"    <subselect>\n"
+"        select employeeId, orgId \n"
+"        from Employments \n"
+"        group by orgId \n"
+"        having startDate = max(startDate)\n"
+"    </subselect>\n"
+"    <many-to-one name=\"mostRecentEmployer\" \n"
+"            class=\"Organization\" \n"
+"            column=\"orgId\"/>\n"
+"</join>]]>"
 msgstr ""
 
-#: index.docbook:283
-msgid "You can get quite creative with this functionality, but it is usually more practical to handle these kinds of cases using HQL or a criteria query."
+#. Tag: para
+#: association_mapping.xml:283
+#, no-c-format
+msgid ""
+"You can get quite creative with this functionality, but it is usually more "
+"practical to handle these kinds of cases using HQL or a criteria query."
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+"使用这一功能时可以充满创意,但通常更加实用的是用HQL或条件查询来处理这些情形。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/basic_mapping.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/basic_mapping.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/basic_mapping.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,2459 +1,5429 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: basic_mapping.xml:5
+#, no-c-format
 msgid "Basic O/R Mapping"
-msgstr ""
+msgstr "对象/关系数据库映射基础(Basic O/R Mapping)"
 
-#: index.docbook:8
+#. Tag: title
+#: basic_mapping.xml:8
+#, no-c-format
 msgid "Mapping declaration"
-msgstr ""
+msgstr "映射定义(Mapping declaration)"
 
-#: index.docbook:10
-msgid "Object/relational mappings are usually defined in an XML document. The mapping document is designed to be readable and hand-editable. The mapping language is Java-centric, meaning that mappings are constructed around persistent class declarations, not table declarations."
+#. Tag: para
+#: basic_mapping.xml:10
+#, no-c-format
+msgid ""
+"Object/relational mappings are usually defined in an XML document. The "
+"mapping document is designed to be readable and hand-editable. The mapping "
+"language is Java-centric, meaning that mappings are constructed around "
+"persistent class declarations, not table declarations."
 msgstr ""
+"对象和关系数据库之间的映射通常是用一个XML文档(XML document)来定义的。这个映射"
+"文档被设计为易读的, 并且可以手工修改。映射语言是以Java为中心,这意味着映射文"
+"档是按照持久化类的定义来创建的, 而非表的定义。"
 
-#: index.docbook:17
-msgid "Note that, even though many Hibernate users choose to write the XML by hand, a number of tools exist to generate the mapping document, including XDoclet, Middlegen and AndroMDA."
+#. Tag: para
+#: basic_mapping.xml:17
+#, no-c-format
+msgid ""
+"Note that, even though many Hibernate users choose to write the XML by hand, "
+"a number of tools exist to generate the mapping document, including XDoclet, "
+"Middlegen and AndroMDA."
 msgstr ""
+"请注意,虽然很多Hibernate用户选择手写XML映射文档,但也有一些工具可以用来生成"
+"映射文档, 包括XDoclet,Middlegen和AndroMDA。"
 
-#: index.docbook:23
+#. Tag: para
+#: basic_mapping.xml:23
+#, no-c-format
 msgid "Lets kick off with an example mapping:"
-msgstr ""
+msgstr "让我们从一个映射的例子开始:"
 
-#: index.docbook:27
+#. Tag: programlisting
+#: basic_mapping.xml:27
+#, no-c-format
 msgid ""
-      "<![CDATA[<?xml version=\"1.0\"?>\n"
-      "<!DOCTYPE hibernate-mapping PUBLIC\n"
-      "      \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
-      "          \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
-      "\n"
-      "<hibernate-mapping package=\"eg\">\n"
-      "\n"
-      "        <class name=\"Cat\"\n"
-      "            table=\"cats\"\n"
-      "            discriminator-value=\"C\">\n"
-      "\n"
-      "                <id name=\"id\">\n"
-      "                        <generator class=\"native\"/>\n"
-      "                </id>\n"
-      "\n"
-      "                <discriminator column=\"subclass\"\n"
-      "                     type=\"character\"/>\n"
-      "\n"
-      "                <property name=\"weight\"/>\n"
-      "\n"
-      "                <property name=\"birthdate\"\n"
-      "                    type=\"date\"\n"
-      "                    not-null=\"true\"\n"
-      "                    update=\"false\"/>\n"
-      "\n"
-      "                <property name=\"color\"\n"
-      "                    type=\"eg.types.ColorUserType\"\n"
-      "                    not-null=\"true\"\n"
-      "                    update=\"false\"/>\n"
-      "\n"
-      "                <property name=\"sex\"\n"
-      "                    not-null=\"true\"\n"
-      "                    update=\"false\"/>\n"
-      "\n"
-      "                <property name=\"litterId\"\n"
-      "                    column=\"litterId\"\n"
-      "                    update=\"false\"/>\n"
-      "\n"
-      "                <many-to-one name=\"mother\"\n"
-      "                    column=\"mother_id\"\n"
-      "                    update=\"false\"/>\n"
-      "\n"
-      "                <set name=\"kittens\"\n"
-      "                    inverse=\"true\"\n"
-      "                    order-by=\"litter_id\">\n"
-      "                        <key column=\"mother_id\"/>\n"
-      "                        <one-to-many class=\"Cat\"/>\n"
-      "                </set>\n"
-      "\n"
-      "                <subclass name=\"DomesticCat\"\n"
-      "                    discriminator-value=\"D\">\n"
-      "\n"
-      "                        <property name=\"name\"\n"
-      "                            type=\"string\"/>\n"
-      "\n"
-      "                </subclass>\n"
-      "\n"
-      "        </class>\n"
-      "\n"
-      "        <class name=\"Dog\">\n"
-      "                <!-- mapping for Dog could go here -->\n"
-      "        </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE hibernate-mapping PUBLIC\n"
+"      \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+"          \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+"\n"
+"<hibernate-mapping package=\"eg\">\n"
+"\n"
+"        <class name=\"Cat\"\n"
+"            table=\"cats\"\n"
+"            discriminator-value=\"C\">\n"
+"\n"
+"                <id name=\"id\">\n"
+"                        <generator class=\"native\"/>\n"
+"                </id>\n"
+"\n"
+"                <discriminator column=\"subclass\"\n"
+"                     type=\"character\"/>\n"
+"\n"
+"                <property name=\"weight\"/>\n"
+"\n"
+"                <property name=\"birthdate\"\n"
+"                    type=\"date\"\n"
+"                    not-null=\"true\"\n"
+"                    update=\"false\"/>\n"
+"\n"
+"                <property name=\"color\"\n"
+"                    type=\"eg.types.ColorUserType\"\n"
+"                    not-null=\"true\"\n"
+"                    update=\"false\"/>\n"
+"\n"
+"                <property name=\"sex\"\n"
+"                    not-null=\"true\"\n"
+"                    update=\"false\"/>\n"
+"\n"
+"                <property name=\"litterId\"\n"
+"                    column=\"litterId\"\n"
+"                    update=\"false\"/>\n"
+"\n"
+"                <many-to-one name=\"mother\"\n"
+"                    column=\"mother_id\"\n"
+"                    update=\"false\"/>\n"
+"\n"
+"                <set name=\"kittens\"\n"
+"                    inverse=\"true\"\n"
+"                    order-by=\"litter_id\">\n"
+"                        <key column=\"mother_id\"/>\n"
+"                        <one-to-many class=\"Cat\"/>\n"
+"                </set>\n"
+"\n"
+"                <subclass name=\"DomesticCat\"\n"
+"                    discriminator-value=\"D\">\n"
+"\n"
+"                        <property name=\"name\"\n"
+"                            type=\"string\"/>\n"
+"\n"
+"                </subclass>\n"
+"\n"
+"        </class>\n"
+"\n"
+"        <class name=\"Dog\">\n"
+"                <!-- mapping for Dog could go here -->\n"
+"        </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:29
-msgid "We will now discuss the content of the mapping document. We will only describe the document elements and attributes that are used by Hibernate at runtime. The mapping document also contains some extra optional attributes and elements that affect the database schemas exported by the schema export tool. (For example the <literal> not-null</literal> attribute.)"
+#. Tag: para
+#: basic_mapping.xml:29
+#, no-c-format
+msgid ""
+"We will now discuss the content of the mapping document. We will only "
+"describe the document elements and attributes that are used by Hibernate at "
+"runtime. The mapping document also contains some extra optional attributes "
+"and elements that affect the database schemas exported by the schema export "
+"tool. (For example the <literal> not-null</literal> attribute.)"
 msgstr ""
+"我们现在开始讨论映射文档的内容。我们只描述Hibernate在运行时用到的文档元素和属"
+"性。 映射文档还包括一些额外的可选属性和元素,它们在使用schema导出工具的时候会"
+"影响导出的数据库schema结果。 (比如,<literal> not-null</literal> 属性。)"
 
-#: index.docbook:40
+#. Tag: title
+#: basic_mapping.xml:40
+#, no-c-format
 msgid "Doctype"
-msgstr ""
+msgstr "Doctype"
 
-#: index.docbook:42
-msgid "All XML mappings should declare the doctype shown. The actual DTD may be found at the URL above, in the directory <literal>hibernate-x.x.x/src/org/hibernate </literal> or in <literal>hibernate3.jar</literal>. Hibernate will always look for the DTD in its classpath first. If you experience lookups of the DTD using an Internet connection, check your DTD declaration against the contents of your claspath."
+#. Tag: para
+#: basic_mapping.xml:42
+#, no-c-format
+msgid ""
+"All XML mappings should declare the doctype shown. The actual DTD may be "
+"found at the URL above, in the directory <literal>hibernate-x.x.x/src/org/"
+"hibernate </literal> or in <literal>hibernate3.jar</literal>. Hibernate will "
+"always look for the DTD in its classpath first. If you experience lookups of "
+"the DTD using an Internet connection, check your DTD declaration against the "
+"contents of your claspath."
 msgstr ""
+"所有的XML映射都需要定义如上所示的doctype。DTD可以从上述URL中获取, 也可以从"
+"<literal>hibernate-x.x.x/src/net/sf/hibernate</literal>目录中、 或"
+"<literal>hibernate.jar</literal>文件中找到。Hibernate总是会首先在它的"
+"classptah中搜索DTD文件。 如果你发现它是通过连接Internet查找DTD文件,就对照你"
+"的classpath目录检查XML文件里的DTD声明。"
 
-#: index.docbook:52
+#. Tag: title
+#: basic_mapping.xml:52
+#, no-c-format
 msgid "EntityResolver"
-msgstr ""
+msgstr "EntityResolver"
 
-#: index.docbook:53
-msgid "As mentioned previously, Hibernate will first attempt to resolve DTDs in its classpath. The manner in which it does this is by registering a custom <literal>org.xml.sax.EntityResolver</literal> implementation with the SAXReader it uses to read in the xml files. This custom <literal>EntityResolver</literal> recognizes two different systemId namespaces."
+#. Tag: para
+#: basic_mapping.xml:53
+#, no-c-format
+msgid ""
+"As mentioned previously, Hibernate will first attempt to resolve DTDs in its "
+"classpath. The manner in which it does this is by registering a custom "
+"<literal>org.xml.sax.EntityResolver</literal> implementation with the "
+"SAXReader it uses to read in the xml files. This custom "
+"<literal>EntityResolver</literal> recognizes two different systemId "
+"namespaces."
 msgstr ""
+"As mentioned previously, Hibernate will first attempt to resolve DTDs in its "
+"classpath. The manner in which it does this is by registering a custom "
+"<literal>org.xml.sax.EntityResolver</literal> implementation with the "
+"SAXReader it uses to read in the xml files. This custom "
+"<literal>EntityResolver</literal> recognizes two different systemId "
+"namespaces. 如前所述,Hibernate首先在其classpath中查找DTD。其行为是依靠在系统"
+"中注册的<literal>org.xml.sax.EntityResolver</literal>的一个具体实现,"
+"SAXReader依靠它来读取xml文件。这一 <literal>EntityResolver</literal> 实现能辨"
+"认两种不同的 systenId命名空间。"
 
-#: index.docbook:61
-msgid "a <literal>hibernate namespace</literal> is recognized whenever the resolver encounteres a systemId starting with <literal>http://hibernate.sourceforge.net/</literal>; the resolver attempts to resolve these entities via the classlaoder which loaded the Hibernate classes."
+#. Tag: para
+#: basic_mapping.xml:61
+#, no-c-format
+msgid ""
+"a <literal>hibernate namespace</literal> is recognized whenever the resolver "
+"encounteres a systemId starting with <literal>http://hibernate.sourceforge."
+"net/</literal>; the resolver attempts to resolve these entities via the "
+"classlaoder which loaded the Hibernate classes."
 msgstr ""
+"若resolver遇到了一个以<literal>http://hibernate.sourceforge.net/</literal>为"
+"开头的systemId,它会辨认出是<literal>hibernate namespace</literal>,resolver"
+"就试图通过加载Hibernate类的classloader来查找这些实体。"
 
-#: index.docbook:70
-msgid "a <literal>user namespace</literal> is recognized whenever the resolver encounteres a systemId using a <literal>classpath://</literal> URL protocol; the resolver will attempt to resolve these entities via (1) the current thread context classloader and (2) the classloader which loaded the Hibernate classes."
+#. Tag: para
+#: basic_mapping.xml:70
+#, no-c-format
+msgid ""
+"a <literal>user namespace</literal> is recognized whenever the resolver "
+"encounteres a systemId using a <literal>classpath://</literal> URL protocol; "
+"the resolver will attempt to resolve these entities via (1) the current "
+"thread context classloader and (2) the classloader which loaded the "
+"Hibernate classes."
 msgstr ""
+"若resolver遇到了一个使用<literal>classpath://</literal>URL协议的systemId,它"
+"会辨认出这是<literal>user namespace</literal>,resolver试图通过(1)当前线程上下"
+"文的classloader和(2)加载Hibernate class的classloader来查找这些实体。"
 
-#: index.docbook:79
+#. Tag: para
+#: basic_mapping.xml:79
+#, no-c-format
 msgid "An example of utilizing user namespacing:"
-msgstr ""
+msgstr "使用user namespace(用户命名空间)的例子:"
 
-#: index.docbook:82
+#. Tag: programlisting
+#: basic_mapping.xml:82
+#, no-c-format
 msgid ""
-      "<![CDATA[<?xml version=\"1.0\"?>\n"
-      "<!DOCTYPE hibernate-mapping PUBLIC\n"
-      "        \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
-      "        \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\" [\n"
-      "    <!ENTITY types SYSTEM \"classpath://your/domain/types.xml\">\n"
-      "]>\n"
-      "\n"
-      "<hibernate-mapping package=\"your.domain\">\n"
-      "    <class name=\"MyEntity\">\n"
-      "        <id name=\"id\" type=\"my-custom-id-type\">\n"
-      "            ...\n"
-      "        </id>\n"
-      "    <class>\n"
-      "    &types;\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE hibernate-mapping PUBLIC\n"
+"        \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+"        \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\" [\n"
+"    <!ENTITY types SYSTEM \"classpath://your/domain/types.xml\">\n"
+"]>\n"
+"\n"
+"<hibernate-mapping package=\"your.domain\">\n"
+"    <class name=\"MyEntity\">\n"
+"        <id name=\"id\" type=\"my-custom-id-type\">\n"
+"            ...\n"
+"        </id>\n"
+"    <class>\n"
+"    &types;\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:83
-msgid "Where <literal>types.xml</literal> is a resource in the <literal>your.domain</literal> package and contains a custom <xref linkend=\"mapping-types-custom\"/>typedef."
+#. Tag: para
+#: basic_mapping.xml:83
+#, fuzzy, no-c-format
+msgid ""
+"Where <literal>types.xml</literal> is a resource in the <literal>your."
+"domain</literal> package and contains a custom <xref linkend=\"mapping-types-"
+"custom\"/>typedef."
 msgstr ""
+"<literal>types.xml</literal>是<literal>your.domain</literal>包中的一个资源,"
+"它包含了一个定制的<xref linkend=\"mapping-types-custom\">typedef</xref>。"
 
-#: index.docbook:91
+#. Tag: title
+#: basic_mapping.xml:91
+#, no-c-format
 msgid "hibernate-mapping"
-msgstr ""
+msgstr "hibernate-mapping"
 
-#: index.docbook:93
-msgid "This element has several optional attributes. The <literal>schema</literal> and <literal>catalog</literal> attributes specify that tables referred to in this mapping belong to the named schema and/or catalog. If specified, tablenames will be qualified by the given schema and catalog names. If missing, tablenames will be unqualified. The <literal>default-cascade</literal> attribute specifies what cascade style should be assumed for properties and collections which do not specify a <literal>cascade</literal> attribute. The <literal>auto-import</literal> attribute lets us use unqualified class names in the query language, by default."
+#. Tag: para
+#: basic_mapping.xml:93
+#, no-c-format
+msgid ""
+"This element has several optional attributes. The <literal>schema</literal> "
+"and <literal>catalog</literal> attributes specify that tables referred to in "
+"this mapping belong to the named schema and/or catalog. If specified, "
+"tablenames will be qualified by the given schema and catalog names. If "
+"missing, tablenames will be unqualified. The <literal>default-cascade</"
+"literal> attribute specifies what cascade style should be assumed for "
+"properties and collections which do not specify a <literal>cascade</literal> "
+"attribute. The <literal>auto-import</literal> attribute lets us use "
+"unqualified class names in the query language, by default."
 msgstr ""
+"这个元素包括一些可选的属性。<literal>schema</literal>和<literal>catalog</"
+"literal>属性, 指明了这个映射所连接(refer)的表所在的schema和/或catalog名"
+"称。 假若指定了这个属性,表名会加上所指定的schema和catalog的名字扩展为全限定"
+"名。假若没有指定,表名就不会使用全限定名。 <literal>default-cascade</literal>"
+"指定了未明确注明<literal>cascade</literal>属性的Java属性和 集合类Hibernate会"
+"采取什么样的默认级联风格。<literal>auto-import</literal>属性默认让我们在查询"
+"语言中可以使用 非全限定名的类名。"
 
-#: index.docbook:114
+#. Tag: programlisting
+#: basic_mapping.xml:114
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping\n"
-      "         schema=\"schemaName\"\n"
-      "         catalog=\"catalogName\"\n"
-      "         default-cascade=\"cascade_style\"\n"
-      "         default-access=\"field|property|ClassName\"\n"
-      "         default-lazy=\"true|false\"\n"
-      "         auto-import=\"true|false\"\n"
-      "         package=\"package.name\"\n"
-      " />]]>"
+"<![CDATA[<hibernate-mapping\n"
+"         schema=\"schemaName\"\n"
+"         catalog=\"catalogName\"\n"
+"         default-cascade=\"cascade_style\"\n"
+"         default-access=\"field|property|ClassName\"\n"
+"         default-lazy=\"true|false\"\n"
+"         auto-import=\"true|false\"\n"
+"         package=\"package.name\"\n"
+" />]]>"
 msgstr ""
 
-#: index.docbook:117
+#. Tag: para
+#: basic_mapping.xml:117
+#, no-c-format
 msgid "<literal>schema</literal> (optional): The name of a database schema."
-msgstr ""
+msgstr "<literal>schema</literal> (可选): 数据库schema的名称。"
 
-#: index.docbook:122
+#. Tag: para
+#: basic_mapping.xml:122
+#, no-c-format
 msgid "<literal>catalog</literal> (optional): The name of a database catalog."
-msgstr ""
+msgstr "<literal>catalog</literal> (可选): 数据库catalog的名称。"
 
-#: index.docbook:127
-msgid "<literal>default-cascade</literal> (optional - defaults to <literal>none</literal>): A default cascade style."
+#. Tag: para
+#: basic_mapping.xml:127
+#, no-c-format
+msgid ""
+"<literal>default-cascade</literal> (optional - defaults to <literal>none</"
+"literal>): A default cascade style."
 msgstr ""
+"<literal>default-cascade</literal> (可选 - 默认为 <literal>none</literal>): "
+"默认的级联风格。"
 
-#: index.docbook:133
-msgid "<literal>default-access</literal> (optional - defaults to <literal>property</literal>): The strategy Hibernate should use for accessing all properties. Can be a custom implementation of <literal>PropertyAccessor</literal>."
+#. Tag: para
+#: basic_mapping.xml:133
+#, no-c-format
+msgid ""
+"<literal>default-access</literal> (optional - defaults to <literal>property</"
+"literal>): The strategy Hibernate should use for accessing all properties. "
+"Can be a custom implementation of <literal>PropertyAccessor</literal>."
 msgstr ""
+"<literal>default-access</literal> (可选 - 默认为 <literal>property</"
+"literal>): Hibernate用来访问所有属性的策略。可以通过实现"
+"<literal>PropertyAccessor</literal>接口 自定义。"
 
-#: index.docbook:140
-msgid "<literal>default-lazy</literal> (optional - defaults to <literal>true</literal>): The default value for unspecifed <literal>lazy</literal> attributes of class and collection mappings."
+#. Tag: para
+#: basic_mapping.xml:140
+#, no-c-format
+msgid ""
+"<literal>default-lazy</literal> (optional - defaults to <literal>true</"
+"literal>): The default value for unspecifed <literal>lazy</literal> "
+"attributes of class and collection mappings."
 msgstr ""
+"<literal>default-lazy</literal> (可选 - 默认为 <literal>true</literal>): 指定"
+"了未明确注明<literal>lazy</literal>属性的Java属性和集合类, Hibernate会采取什"
+"么样的默认加载风格。"
 
-#: index.docbook:147
-msgid "<literal>auto-import</literal> (optional - defaults to <literal>true</literal>): Specifies whether we can use unqualified class names (of classes in this mapping) in the query language."
+#. Tag: para
+#: basic_mapping.xml:147
+#, no-c-format
+msgid ""
+"<literal>auto-import</literal> (optional - defaults to <literal>true</"
+"literal>): Specifies whether we can use unqualified class names (of classes "
+"in this mapping) in the query language."
 msgstr ""
+"<literal>auto-import</literal> (可选 - 默认为 <literal>true</literal>): 指定"
+"我们是否可以在查询语言中使用非全限定的类名(仅限于本映射文件中的类)。"
 
-#: index.docbook:154
-msgid "<literal>package</literal> (optional): Specifies a package prefix to assume for unqualified class names in the mapping document."
+#. Tag: para
+#: basic_mapping.xml:154
+#, no-c-format
+msgid ""
+"<literal>package</literal> (optional): Specifies a package prefix to assume "
+"for unqualified class names in the mapping document."
 msgstr ""
+"<literal>package</literal> (可选): 指定一个包前缀,如果在映射文档中没有指定全"
+"限定的类名, 就使用这个作为包名。"
 
-#: index.docbook:162
-msgid "If you have two persistent classes with the same (unqualified) name, you should set <literal>auto-import=\"false\"</literal>. Hibernate will throw an exception if you attempt to assign two classes to the same \"imported\" name."
+#. Tag: para
+#: basic_mapping.xml:162
+#, no-c-format
+msgid ""
+"If you have two persistent classes with the same (unqualified) name, you "
+"should set <literal>auto-import=\"false\"</literal>. Hibernate will throw an "
+"exception if you attempt to assign two classes to the same \"imported\" name."
 msgstr ""
+"假若你有两个持久化类,它们的非全限定名是一样的(就是两个类的名字一样,所在的"
+"包不一样--译者注), 你应该设置<literal>auto-import=\"false\"</literal>。如果"
+"你把一个“import过”的名字同时对应两个类, Hibernate会抛出一个异常。"
 
-#: index.docbook:168
-msgid "Note that the <literal>hibernate-mapping</literal> element allows you to nest several persistent <literal>&lt;class&gt;</literal> mappings, as shown above. It is however good practice (and expected by some tools) to map only a single persistent class (or a single class hierarchy) in one mapping file and name it after the persistent superclass, e.g. <literal>Cat.hbm.xml</literal>, <literal>Dog.hbm.xml</literal>, or if using inheritance, <literal>Animal.hbm.xml</literal>."
+#. Tag: para
+#: basic_mapping.xml:168
+#, no-c-format
+msgid ""
+"Note that the <literal>hibernate-mapping</literal> element allows you to "
+"nest several persistent <literal>&lt;class&gt;</literal> mappings, as shown "
+"above. It is however good practice (and expected by some tools) to map only "
+"a single persistent class (or a single class hierarchy) in one mapping file "
+"and name it after the persistent superclass, e.g. <literal>Cat.hbm.xml</"
+"literal>, <literal>Dog.hbm.xml</literal>, or if using inheritance, "
+"<literal>Animal.hbm.xml</literal>."
 msgstr ""
+"注意<literal>hibernate-mapping</literal> 元素允许你嵌套多个如上所示的 "
+"<literal>&lt;class&gt;</literal>映射。但是最好的做法(也许一些工具需要的)是"
+"一个 持久化类(或一个类的继承层次)对应一个映射文件,并以持久化的超类名称命"
+"名,例如: <literal>Cat.hbm.xml</literal>, <literal>Dog.hbm.xml</literal>,"
+"或者如果使用继承,<literal>Animal.hbm.xml</literal>。"
 
-#: index.docbook:181
+#. Tag: title
+#: basic_mapping.xml:181
+#, no-c-format
 msgid "<title>class</title>"
 msgstr ""
 
-#: index.docbook:183
-msgid "You may declare a persistent class using the <literal>class</literal> element:"
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:183
+#, no-c-format
+msgid ""
+"You may declare a persistent class using the <literal>class</literal> "
+"element:"
+msgstr "你可以使用<literal>class</literal>元素来定义一个持久化类:"
 
-#: index.docbook:211
+#. Tag: programlisting
+#: basic_mapping.xml:211
+#, no-c-format
 msgid ""
-      "<![CDATA[<class\n"
-      "        name=\"ClassName\"\n"
-      "        table=\"tableName\"\n"
-      "        discriminator-value=\"discriminator_value\"\n"
-      "        mutable=\"true|false\"\n"
-      "        schema=\"owner\"\n"
-      "        catalog=\"catalog\"\n"
-      "        proxy=\"ProxyInterface\"\n"
-      "        dynamic-update=\"true|false\"\n"
-      "        dynamic-insert=\"true|false\"\n"
-      "        select-before-update=\"true|false\"\n"
-      "        polymorphism=\"implicit|explicit\"\n"
-      "        where=\"arbitrary sql where condition\"\n"
-      "        persister=\"PersisterClass\"\n"
-      "        batch-size=\"N\"\n"
-      "        optimistic-lock=\"none|version|dirty|all\"\n"
-      "        lazy=\"true|false\"\n"
-      "        entity-name=\"EntityName\"\n"
-      "        check=\"arbitrary sql check condition\"\n"
-      "        rowid=\"rowid\"\n"
-      "        subselect=\"SQL expression\"\n"
-      "        abstract=\"true|false\"\n"
-      "        node=\"element-name\"\n"
-      "/>]]>"
+"<![CDATA[<class\n"
+"        name=\"ClassName\"\n"
+"        table=\"tableName\"\n"
+"        discriminator-value=\"discriminator_value\"\n"
+"        mutable=\"true|false\"\n"
+"        schema=\"owner\"\n"
+"        catalog=\"catalog\"\n"
+"        proxy=\"ProxyInterface\"\n"
+"        dynamic-update=\"true|false\"\n"
+"        dynamic-insert=\"true|false\"\n"
+"        select-before-update=\"true|false\"\n"
+"        polymorphism=\"implicit|explicit\"\n"
+"        where=\"arbitrary sql where condition\"\n"
+"        persister=\"PersisterClass\"\n"
+"        batch-size=\"N\"\n"
+"        optimistic-lock=\"none|version|dirty|all\"\n"
+"        lazy=\"true|false\"\n"
+"        entity-name=\"EntityName\"\n"
+"        check=\"arbitrary sql check condition\"\n"
+"        rowid=\"rowid\"\n"
+"        subselect=\"SQL expression\"\n"
+"        abstract=\"true|false\"\n"
+"        node=\"element-name\"\n"
+"/>]]>"
 msgstr ""
 
-#: index.docbook:214
-msgid "<literal>name</literal> (optional): The fully qualified Java class name of the persistent class (or interface). If this attribute is missing, it is assumed that the mapping is for a non-POJO entity."
+#. Tag: para
+#: basic_mapping.xml:214
+#, no-c-format
+msgid ""
+"<literal>name</literal> (optional): The fully qualified Java class name of "
+"the persistent class (or interface). If this attribute is missing, it is "
+"assumed that the mapping is for a non-POJO entity."
 msgstr ""
+"<literal>name</literal> (可选): 持久化类(或者接口)的Java全限定名。 如果这个"
+"属性不存在,Hibernate将假定这是一个非POJO的实体映射。"
 
-#: index.docbook:221
-msgid "<literal>table</literal> (optional - defaults to the unqualified class name): The name of its database table."
+#. Tag: para
+#: basic_mapping.xml:221
+#, no-c-format
+msgid ""
+"<literal>table</literal> (optional - defaults to the unqualified class "
+"name): The name of its database table."
 msgstr ""
+"<literal>table</literal> (可选 - 默认是类的非全限定名): 对应的数据库表名。"
 
-#: index.docbook:227
-msgid "<literal>discriminator-value</literal> (optional - defaults to the class name): A value that distiguishes individual subclasses, used for polymorphic behaviour. Acceptable values include <literal>null</literal> and <literal>not null</literal>."
+#. Tag: para
+#: basic_mapping.xml:227
+#, no-c-format
+msgid ""
+"<literal>discriminator-value</literal> (optional - defaults to the class "
+"name): A value that distiguishes individual subclasses, used for polymorphic "
+"behaviour. Acceptable values include <literal>null</literal> and "
+"<literal>not null</literal>."
 msgstr ""
+"<literal>discriminator-value</literal> (可选 - 默认和类名一样): 一个用于区分"
+"不同的子类的值,在多态行为时使用。它可以接受的值包括 <literal>null</literal> "
+"和 <literal>not null</literal>。"
 
-#: index.docbook:234
-msgid "<literal>mutable</literal> (optional, defaults to <literal>true</literal>): Specifies that instances of the class are (not) mutable."
+#. Tag: para
+#: basic_mapping.xml:234
+#, no-c-format
+msgid ""
+"<literal>mutable</literal> (optional, defaults to <literal>true</literal>): "
+"Specifies that instances of the class are (not) mutable."
 msgstr ""
+"<literal>mutable</literal> (可选,默认值为<literal>true</literal>): 表明该类"
+"的实例是可变的或者不可变的。"
 
-#: index.docbook:240, index.docbook:2204
-msgid "<literal>schema</literal> (optional): Override the schema name specified by the root <literal>&lt;hibernate-mapping&gt;</literal> element."
+#. Tag: para
+#: basic_mapping.xml:240 basic_mapping.xml:2204
+#, fuzzy, no-c-format
+msgid ""
+"<literal>schema</literal> (optional): Override the schema name specified by "
+"the root <literal>&lt;hibernate-mapping&gt;</literal> element."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>schema</literal> (可选): 覆盖在根<literal>&lt;hibernate-mapping&gt;"
+"</literal>元素中指定的schema名字。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>schema</literal> (可选):覆盖由根<literal>&lt;hibernate-mapping&gt;</"
+"literal>元素指定的模式名称。"
 
-#: index.docbook:246, index.docbook:2210
-msgid "<literal>catalog</literal> (optional): Override the catalog name specified by the root <literal>&lt;hibernate-mapping&gt;</literal> element."
+#. Tag: para
+#: basic_mapping.xml:246 basic_mapping.xml:2210
+#, fuzzy, no-c-format
+msgid ""
+"<literal>catalog</literal> (optional): Override the catalog name specified "
+"by the root <literal>&lt;hibernate-mapping&gt;</literal> element."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>catalog</literal> (可选): 覆盖在根<literal>&lt;hibernate-mapping&gt;"
+"</literal>元素中指定的catalog名字。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>catalog</literal> (可选): 覆盖由根 <literal>&lt;hibernate-"
+"mapping&gt;</literal>元素指定的目录名称。"
 
-#: index.docbook:252
-msgid "<literal>proxy</literal> (optional): Specifies an interface to use for lazy initializing proxies. You may specify the name of the class itself."
+#. Tag: para
+#: basic_mapping.xml:252
+#, no-c-format
+msgid ""
+"<literal>proxy</literal> (optional): Specifies an interface to use for lazy "
+"initializing proxies. You may specify the name of the class itself."
 msgstr ""
+"<literal>proxy</literal> (可选): 指定一个接口,在延迟装载时作为代理使用。 你"
+"可以在这里使用该类自己的名字。"
 
-#: index.docbook:258
-msgid "<literal>dynamic-update</literal> (optional, defaults to <literal>false</literal>): Specifies that <literal>UPDATE</literal> SQL should be generated at runtime and contain only those columns whose values have changed."
+#. Tag: para
+#: basic_mapping.xml:258
+#, no-c-format
+msgid ""
+"<literal>dynamic-update</literal> (optional, defaults to <literal>false</"
+"literal>): Specifies that <literal>UPDATE</literal> SQL should be generated "
+"at runtime and contain only those columns whose values have changed."
 msgstr ""
+"<literal>dynamic-update</literal> (可选, 默认为 <literal>false</literal>): 指"
+"定用于<literal>UPDATE</literal> 的SQL将会在运行时动态生成,并且只更新那些改变"
+"过的字段。"
 
-#: index.docbook:265
-msgid "<literal>dynamic-insert</literal> (optional, defaults to <literal>false</literal>): Specifies that <literal>INSERT</literal> SQL should be generated at runtime and contain only the columns whose values are not null."
+#. Tag: para
+#: basic_mapping.xml:265
+#, no-c-format
+msgid ""
+"<literal>dynamic-insert</literal> (optional, defaults to <literal>false</"
+"literal>): Specifies that <literal>INSERT</literal> SQL should be generated "
+"at runtime and contain only the columns whose values are not null."
 msgstr ""
+"<literal>dynamic-insert</literal> (可选, 默认为 <literal>false</literal>): 指"
+"定用于<literal>INSERT</literal>的 SQL 将会在运行时动态生成,并且只包含那些非"
+"空值字段。"
 
-#: index.docbook:272
-msgid "<literal>select-before-update</literal> (optional, defaults to <literal>false</literal>): Specifies that Hibernate should <emphasis>never</emphasis> perform an SQL <literal>UPDATE</literal> unless it is certain that an object is actually modified. In certain cases (actually, only when a transient object has been associated with a new session using <literal>update()</literal>), this means that Hibernate will perform an extra SQL <literal>SELECT</literal> to determine if an <literal>UPDATE</literal> is actually required."
+#. Tag: para
+#: basic_mapping.xml:272
+#, no-c-format
+msgid ""
+"<literal>select-before-update</literal> (optional, defaults to "
+"<literal>false</literal>): Specifies that Hibernate should <emphasis>never</"
+"emphasis> perform an SQL <literal>UPDATE</literal> unless it is certain that "
+"an object is actually modified. In certain cases (actually, only when a "
+"transient object has been associated with a new session using <literal>update"
+"()</literal>), this means that Hibernate will perform an extra SQL "
+"<literal>SELECT</literal> to determine if an <literal>UPDATE</literal> is "
+"actually required."
 msgstr ""
+"<literal>select-before-update</literal> (可选, 默认为 <literal>false</"
+"literal>): 指定Hibernate除非确定对象真正被修改了(如果该值为true-译注),否"
+"则<emphasis>不会</emphasis>执行SQL <literal>UPDATE</literal>操作。在特定场合"
+"(实际上,它只在一个瞬时对象(transient object)关联到一个 新的session中时执"
+"行的update()中生效),这说明Hibernate会在<literal>UPDATE</literal> 之前执行一"
+"次额外的SQL <literal>SELECT</literal>操作,来决定是否应该执行 "
+"<literal>UPDATE</literal>。"
 
-#: index.docbook:282
-msgid "<literal>polymorphism</literal> (optional, defaults to <literal>implicit</literal>): Determines whether implicit or explicit query polymorphism is used."
+#. Tag: para
+#: basic_mapping.xml:282
+#, no-c-format
+msgid ""
+"<literal>polymorphism</literal> (optional, defaults to <literal>implicit</"
+"literal>): Determines whether implicit or explicit query polymorphism is "
+"used."
 msgstr ""
+"<literal>polymorphism(多态)</literal> (可选, 默认值为 <literal>implicit (隐"
+"式) </literal>): 界定是隐式还是显式的使用多态查询(这只在Hibernate的具体表继"
+"承策略中用到-译注)。"
 
-#: index.docbook:288
-msgid "<literal>where</literal> (optional) specify an arbitrary SQL <literal>WHERE</literal> condition to be used when retrieving objects of this class"
+#. Tag: para
+#: basic_mapping.xml:288
+#, no-c-format
+msgid ""
+"<literal>where</literal> (optional) specify an arbitrary SQL <literal>WHERE</"
+"literal> condition to be used when retrieving objects of this class"
 msgstr ""
+"<literal>where</literal> (可选) 指定一个附加的SQL<literal>WHERE</literal> 条"
+"件, 在抓取这个类的对象时会一直增加这个条件。"
 
-#: index.docbook:294
-msgid "<literal>persister</literal> (optional): Specifies a custom <literal>ClassPersister</literal>."
+#. Tag: para
+#: basic_mapping.xml:294
+#, no-c-format
+msgid ""
+"<literal>persister</literal> (optional): Specifies a custom "
+"<literal>ClassPersister</literal>."
 msgstr ""
+"<literal>persister</literal> (可选): 指定一个定制的<literal>ClassPersister</"
+"literal>。"
 
-#: index.docbook:299
-msgid "<literal>batch-size</literal> (optional, defaults to <literal>1</literal>) specify a \"batch size\" for fetching instances of this class by identifier."
+#. Tag: para
+#: basic_mapping.xml:299
+#, no-c-format
+msgid ""
+"<literal>batch-size</literal> (optional, defaults to <literal>1</literal>) "
+"specify a \"batch size\" for fetching instances of this class by identifier."
 msgstr ""
+"<literal>batch-size</literal> (可选,默认是<literal>1</literal>) 指定一个用于 "
+"根据标识符(identifier)抓取实例时使用的\"batch size\"(批次抓取数量)。"
 
-#: index.docbook:305
-msgid "<literal>optimistic-lock</literal> (optional, defaults to <literal>version</literal>): Determines the optimistic locking strategy."
+#. Tag: para
+#: basic_mapping.xml:305
+#, no-c-format
+msgid ""
+"<literal>optimistic-lock</literal> (optional, defaults to <literal>version</"
+"literal>): Determines the optimistic locking strategy."
 msgstr ""
+"<literal>optimistic-lock(乐观锁定)</literal> (可选,默认是"
+"<literal>version</literal>): 决定乐观锁定的策略。"
 
-#: index.docbook:311
-msgid "<literal>lazy</literal> (optional): Lazy fetching may be completely disabled by setting <literal>lazy=\"false\"</literal>."
+#. Tag: para
+#: basic_mapping.xml:311
+#, no-c-format
+msgid ""
+"<literal>lazy</literal> (optional): Lazy fetching may be completely disabled "
+"by setting <literal>lazy=\"false\"</literal>."
 msgstr ""
+"<literal>lazy</literal> (可选): 通过设置<literal>lazy=\"false\"</literal>, "
+"所有的延迟加载(Lazy fetching)功能将被全部禁用(disabled)。"
 
-#: index.docbook:317
-msgid "<literal>entity-name</literal> (optional, defaults to the class name): Hibernate3 allows a class to be mapped multiple times (to different tables, potentially), and allows entity mappings that are represented by Maps or XML at the Java level. In these cases, you should provide an explicit arbitrary name for the entity. See <xref linkend=\"persistent-classes-dynamicmodels\"/> and <xref linkend=\"xml\"/> for more information."
+#. Tag: para
+#: basic_mapping.xml:317
+#, no-c-format
+msgid ""
+"<literal>entity-name</literal> (optional, defaults to the class name): "
+"Hibernate3 allows a class to be mapped multiple times (to different tables, "
+"potentially), and allows entity mappings that are represented by Maps or XML "
+"at the Java level. In these cases, you should provide an explicit arbitrary "
+"name for the entity. See <xref linkend=\"persistent-classes-dynamicmodels\"/"
+"> and <xref linkend=\"xml\"/> for more information."
 msgstr ""
+"<literal>entity-name</literal> (可选,默认为类名): Hibernate3允许一个类进行多"
+"次映射( 前提是映射到不同的表),并且允许使用Maps或XML代替Java层次的实体映射 "
+"(也就是实现动态领域模型,不用写持久化类-译注)。 更多信息请看<xref linkend="
+"\"persistent-classes-dynamicmodels\"/> and <xref linkend=\"xml\"/>。"
 
-#: index.docbook:327
-msgid "<literal>check</literal> (optional): A SQL expression used to generate a multi-row <emphasis>check</emphasis> constraint for automatic schema generation."
+#. Tag: para
+#: basic_mapping.xml:327
+#, no-c-format
+msgid ""
+"<literal>check</literal> (optional): A SQL expression used to generate a "
+"multi-row <emphasis>check</emphasis> constraint for automatic schema "
+"generation."
 msgstr ""
+"<literal>check</literal> (可选): 这是一个SQL表达式, 用于为自动生成的schema添"
+"加多行(multi-row)约束<emphasis>检查</emphasis>。"
 
-#: index.docbook:333
-msgid "<literal>rowid</literal> (optional): Hibernate can use so called ROWIDs on databases which support. E.g. on Oracle, Hibernate can use the <literal>rowid</literal> extra column for fast updates if you set this option to <literal>rowid</literal>. A ROWID is an implementation detail and represents the physical location of a stored tuple."
+#. Tag: para
+#: basic_mapping.xml:333
+#, no-c-format
+msgid ""
+"<literal>rowid</literal> (optional): Hibernate can use so called ROWIDs on "
+"databases which support. E.g. on Oracle, Hibernate can use the "
+"<literal>rowid</literal> extra column for fast updates if you set this "
+"option to <literal>rowid</literal>. A ROWID is an implementation detail and "
+"represents the physical location of a stored tuple."
 msgstr ""
+"<literal>rowid</literal> (可选): Hibernate可以使用数据库支持的所谓的ROWIDs,"
+"例如: Oracle数据库,如果你设置这个可选的<literal>rowid</literal>, Hibernate"
+"可以使用额外的字段<literal>rowid</literal>实现快速更新。ROWID是这个功能实现的"
+"重点, 它代表了一个存储元组(tuple)的物理位置。"
 
-#: index.docbook:341
-msgid "<literal>subselect</literal> (optional): Maps an immutable and read-only entity to a database subselect. Useful if you want to have a view instead of a base table, but don't. See below for more information."
+#. Tag: para
+#: basic_mapping.xml:341
+#, no-c-format
+msgid ""
+"<literal>subselect</literal> (optional): Maps an immutable and read-only "
+"entity to a database subselect. Useful if you want to have a view instead of "
+"a base table, but don't. See below for more information."
 msgstr ""
+"<literal>subselect</literal> (可选): 它将一个不可变(immutable)并且只读的实"
+"体映射到一个数据库的 子查询中。当你想用视图代替一张基本表的时候,这是有用的,"
+"但最好不要这样做。更多的介绍请看下面内容。"
 
-#: index.docbook:348
-msgid "<literal>abstract</literal> (optional): Used to mark abstract superclasses in <literal>&lt;union-subclass&gt;</literal> hierarchies."
+#. Tag: para
+#: basic_mapping.xml:348
+#, no-c-format
+msgid ""
+"<literal>abstract</literal> (optional): Used to mark abstract superclasses "
+"in <literal>&lt;union-subclass&gt;</literal> hierarchies."
 msgstr ""
+"<literal>abstract</literal> (可选): 用于在<literal>&lt;union-subclass&gt;</"
+"literal>的继承结构 (hierarchies)中标识抽象超类。"
 
-#: index.docbook:356
-msgid "It is perfectly acceptable for the named persistent class to be an interface. You would then declare implementing classes of that interface using the <literal>&lt;subclass&gt;</literal> element. You may persist any <emphasis>static</emphasis> inner class. You should specify the class name using the standard form ie. <literal>eg.Foo$Bar</literal>."
+#. Tag: para
+#: basic_mapping.xml:356
+#, no-c-format
+msgid ""
+"It is perfectly acceptable for the named persistent class to be an "
+"interface. You would then declare implementing classes of that interface "
+"using the <literal>&lt;subclass&gt;</literal> element. You may persist any "
+"<emphasis>static</emphasis> inner class. You should specify the class name "
+"using the standard form ie. <literal>eg.Foo$Bar</literal>."
 msgstr ""
+"若指明的持久化类实际上是一个接口,这也是完全可以接受的。 之后你可以用元素"
+"<literal>&lt;subclass&gt;</literal>来指定该接口的实际实现类。 你可以持久化任"
+"何<emphasis>static</emphasis>(静态的)内部类。 你应该使用标准的类名格式来指"
+"定类名,<literal>比如:Foo$Bar</literal>。"
 
-#: index.docbook:363
-msgid "Immutable classes, <literal>mutable=\"false\"</literal>, may not be updated or deleted by the application. This allows Hibernate to make some minor performance optimizations."
+#. Tag: para
+#: basic_mapping.xml:363
+#, no-c-format
+msgid ""
+"Immutable classes, <literal>mutable=\"false\"</literal>, may not be updated "
+"or deleted by the application. This allows Hibernate to make some minor "
+"performance optimizations."
 msgstr ""
+"不可变类,<literal>mutable=\"false\"</literal>不可以被应用程序更新或者删除。 "
+"这可以让Hibernate做一些小小的性能优化。"
 
-#: index.docbook:368
-msgid "The optional <literal>proxy</literal> attribute enables lazy initialization of persistent instances of the class. Hibernate will initially return CGLIB proxies which implement the named interface. The actual persistent object will be loaded when a method of the proxy is invoked. See \"Initializing collections and proxies\" below."
+#. Tag: para
+#: basic_mapping.xml:368
+#, no-c-format
+msgid ""
+"The optional <literal>proxy</literal> attribute enables lazy initialization "
+"of persistent instances of the class. Hibernate will initially return CGLIB "
+"proxies which implement the named interface. The actual persistent object "
+"will be loaded when a method of the proxy is invoked. See \"Initializing "
+"collections and proxies\" below."
 msgstr ""
+"可选的<literal>proxy</literal>属性允许延迟加载类的持久化实例。 Hibernate开始"
+"会返回实现了这个命名接口的CGLIB代理。当代理的某个方法被实际调用的时候, 真实"
+"的持久化对象才会被装载。参见下面的“用于延迟装载的代理”。"
 
-#: index.docbook:375
-msgid "<emphasis>Implicit</emphasis> polymorphism means that instances of the class will be returned by a query that names any superclass or implemented interface or the class and that instances of any subclass of the class will be returned by a query that names the class itself. <emphasis>Explicit</emphasis> polymorphism means that class instances will be returned only by queries that explicitly name that class and that queries that name the class will return only instances of subclasses mapped inside this <literal>&lt;class&gt;</literal> declaration as a <literal>&lt;subclass&gt;</literal> or <literal>&lt;joined-subclass&gt;</literal>. For most purposes the default, <literal>polymorphism=\"implicit\"</literal>, is appropriate. Explicit polymorphism is useful when two different classes are mapped to the same table (this allows a \"lightweight\" class that contains a subset of the table columns)."
+#. Tag: para
+#: basic_mapping.xml:375
+#, no-c-format
+msgid ""
+"<emphasis>Implicit</emphasis> polymorphism means that instances of the class "
+"will be returned by a query that names any superclass or implemented "
+"interface or the class and that instances of any subclass of the class will "
+"be returned by a query that names the class itself. <emphasis>Explicit</"
+"emphasis> polymorphism means that class instances will be returned only by "
+"queries that explicitly name that class and that queries that name the class "
+"will return only instances of subclasses mapped inside this <literal>&lt;"
+"class&gt;</literal> declaration as a <literal>&lt;subclass&gt;</literal> or "
+"<literal>&lt;joined-subclass&gt;</literal>. For most purposes the default, "
+"<literal>polymorphism=\"implicit\"</literal>, is appropriate. Explicit "
+"polymorphism is useful when two different classes are mapped to the same "
+"table (this allows a \"lightweight\" class that contains a subset of the "
+"table columns)."
 msgstr ""
+"<emphasis>Implicit</emphasis> (隐式)的多态是指,如果查询时给出的是任何超类、"
+"该类实现的接口或者该类的 名字,都会返回这个类的实例;如果查询中给出的是子类的"
+"名字,则会返回子类的实例。 <emphasis>Explicit</emphasis> (显式)的多态是指,"
+"只有在查询时给出明确的该类名字时才会返回这个类的实例; 同时只有在这个"
+"<literal>&lt;class&gt;</literal>的定义中作为<literal>&lt;subclass&gt;</"
+"literal> 或者<literal>&lt;joined-subclass&gt;</literal>出现的子类,才会可能返"
+"回。 在大多数情况下,默认的<literal>polymorphism=\"implicit\"</literal>都是合"
+"适的。 显式的多态在有两个不同的类映射到同一个表的时候很有用。(允许一个“轻"
+"型”的类,只包含部分表字段)。"
 
-#: index.docbook:387
-msgid "The <literal>persister</literal> attribute lets you customize the persistence strategy used for the class. You may, for example, specify your own subclass of <literal>org.hibernate.persister.EntityPersister</literal> or you might even provide a completely new implementation of the interface <literal>org.hibernate.persister.ClassPersister</literal> that implements persistence via, for example, stored procedure calls, serialization to flat files or LDAP. See <literal>org.hibernate.test.CustomPersister</literal> for a simple example (of \"persistence\" to a <literal>Hashtable</literal>)."
+#. Tag: para
+#: basic_mapping.xml:387
+#, no-c-format
+msgid ""
+"The <literal>persister</literal> attribute lets you customize the "
+"persistence strategy used for the class. You may, for example, specify your "
+"own subclass of <literal>org.hibernate.persister.EntityPersister</literal> "
+"or you might even provide a completely new implementation of the interface "
+"<literal>org.hibernate.persister.ClassPersister</literal> that implements "
+"persistence via, for example, stored procedure calls, serialization to flat "
+"files or LDAP. See <literal>org.hibernate.test.CustomPersister</literal> for "
+"a simple example (of \"persistence\" to a <literal>Hashtable</literal>)."
 msgstr ""
+"<literal>persister</literal>属性可以让你定制这个类使用的持久化策略。 你可以指"
+"定你自己实现 <literal>org.hibernate.persister.EntityPersister</literal>的子"
+"类,你甚至可以完全从头开始编写一个 <literal>org.hibernate.persister."
+"ClassPersister</literal>接口的实现, 比如是用储存过程调用、序列化到文件或者"
+"LDAP数据库来实现。 参阅<literal>org.hibernate.test.CustomPersister</"
+"literal>,这是一个简单的例子 (“持久化”到一个<literal>Hashtable</literal>)。"
 
-#: index.docbook:398
-msgid "Note that the <literal>dynamic-update</literal> and <literal>dynamic-insert</literal> settings are not inherited by subclasses and so may also be specified on the <literal>&lt;subclass&gt;</literal> or <literal>&lt;joined-subclass&gt;</literal> elements. These settings may increase performance in some cases, but might actually decrease performance in others. Use judiciously."
+#. Tag: para
+#: basic_mapping.xml:398
+#, no-c-format
+msgid ""
+"Note that the <literal>dynamic-update</literal> and <literal>dynamic-insert</"
+"literal> settings are not inherited by subclasses and so may also be "
+"specified on the <literal>&lt;subclass&gt;</literal> or <literal>&lt;joined-"
+"subclass&gt;</literal> elements. These settings may increase performance in "
+"some cases, but might actually decrease performance in others. Use "
+"judiciously."
 msgstr ""
+"请注意<literal>dynamic-update</literal>和<literal>dynamic-insert</literal>的"
+"设置并不会继承到子类, 所以在<literal>&lt;subclass&gt;</literal>或者"
+"<literal>&lt;joined-subclass&gt;</literal>元素中可能 需要再次设置。这些设置是"
+"否能够提高效率要视情形而定。请用你的智慧决定是否使用。"
 
-#: index.docbook:406
-msgid "Use of <literal>select-before-update</literal> will usually decrease performance. It is very useful to prevent a database update trigger being called unnecessarily if you reattach a graph of detached instances to a <literal>Session</literal>."
+#. Tag: para
+#: basic_mapping.xml:406
+#, no-c-format
+msgid ""
+"Use of <literal>select-before-update</literal> will usually decrease "
+"performance. It is very useful to prevent a database update trigger being "
+"called unnecessarily if you reattach a graph of detached instances to a "
+"<literal>Session</literal>."
 msgstr ""
+"使用<literal>select-before-update</literal>通常会降低性能。如果你重新连接一个"
+"脱管(detache)对象实例 到一个<literal>Session</literal>中时,它可以防止数据"
+"库不必要的触发update。 这就很有用了。"
 
-#: index.docbook:412
-msgid "If you enable <literal>dynamic-update</literal>, you will have a choice of optimistic locking strategies:"
+#. Tag: para
+#: basic_mapping.xml:412
+#, no-c-format
+msgid ""
+"If you enable <literal>dynamic-update</literal>, you will have a choice of "
+"optimistic locking strategies:"
 msgstr ""
+"如果你打开了<literal>dynamic-update</literal>,你可以选择几种乐观锁定的策略:"
 
-#: index.docbook:418
+#. Tag: para
+#: basic_mapping.xml:418
+#, no-c-format
 msgid "<literal>version</literal> check the version/timestamp columns"
-msgstr ""
+msgstr "<literal>version(版本检查)</literal> 检查version/timestamp字段"
 
-#: index.docbook:423
+#. Tag: para
+#: basic_mapping.xml:423
+#, no-c-format
 msgid "<literal>all</literal> check all columns"
-msgstr ""
+msgstr "<literal>all(全部)</literal> 检查全部字段"
 
-#: index.docbook:428
-msgid "<literal>dirty</literal> check the changed columns, allowing some concurrent updates"
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:428
+#, no-c-format
+msgid ""
+"<literal>dirty</literal> check the changed columns, allowing some concurrent "
+"updates"
+msgstr "<literal>dirty(脏检查)</literal>只检察修改过的字段"
 
-#: index.docbook:433
+#. Tag: para
+#: basic_mapping.xml:433
+#, no-c-format
 msgid "<literal>none</literal> do not use optimistic locking"
-msgstr ""
+msgstr "<literal>none(不检查)</literal>不使用乐观锁定"
 
-#: index.docbook:438
-msgid "We <emphasis>very</emphasis> strongly recommend that you use version/timestamp columns for optimistic locking with Hibernate. This is the optimal strategy with respect to performance and is the only strategy that correctly handles modifications made to detached instances (ie. when <literal>Session.merge()</literal> is used)."
+#. Tag: para
+#: basic_mapping.xml:438
+#, no-c-format
+msgid ""
+"We <emphasis>very</emphasis> strongly recommend that you use version/"
+"timestamp columns for optimistic locking with Hibernate. This is the optimal "
+"strategy with respect to performance and is the only strategy that correctly "
+"handles modifications made to detached instances (ie. when <literal>Session."
+"merge()</literal> is used)."
 msgstr ""
+"我们<emphasis>非常</emphasis>强烈建议你在Hibernate中使用version/timestamp字段"
+"来进行乐观锁定。 对性能来说,这是最好的选择,并且这也是唯一能够处理在session"
+"外进行操作的策略(例如: 在使用<literal>Session.merge()</literal>的时候)。"
 
-#: index.docbook:445
-msgid "There is no difference between a view and a base table for a Hibernate mapping, as expected this is transparent at the database level (note that some DBMS don't support views properly, especially with updates). Sometimes you want to use a view, but can't create one in the database (ie. with a legacy schema). In this case, you can map an immutable and read-only entity to a given SQL subselect expression:"
+#. Tag: para
+#: basic_mapping.xml:445
+#, no-c-format
+msgid ""
+"There is no difference between a view and a base table for a Hibernate "
+"mapping, as expected this is transparent at the database level (note that "
+"some DBMS don't support views properly, especially with updates). Sometimes "
+"you want to use a view, but can't create one in the database (ie. with a "
+"legacy schema). In this case, you can map an immutable and read-only entity "
+"to a given SQL subselect expression:"
 msgstr ""
+"对Hibernate映射来说视图和表是没有区别的,这是因为它们在数据层都是透明的( 注"
+"意:一些数据库不支持视图属性,特别是更新的时候)。有时你想使用视图,但却不能"
+"在数据库 中创建它(例如:在遗留的schema中)。这样的话,你可以映射一个不可变的"
+"(immutable)并且是 只读的实体到一个给定的SQL子查询表达式:"
 
-#: index.docbook:453
+#. Tag: programlisting
+#: basic_mapping.xml:453
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Summary\">\n"
-      "    <subselect>\n"
-      "        select item.name, max(bid.amount), count(*)\n"
-      "        from item\n"
-      "        join bid on bid.item_id = item.id\n"
-      "        group by item.name\n"
-      "    </subselect>\n"
-      "    <synchronize table=\"item\"/>\n"
-      "    <synchronize table=\"bid\"/>\n"
-      "    <id name=\"name\"/>\n"
-      "    ...\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Summary\">\n"
+"    <subselect>\n"
+"        select item.name, max(bid.amount), count(*)\n"
+"        from item\n"
+"        join bid on bid.item_id = item.id\n"
+"        group by item.name\n"
+"    </subselect>\n"
+"    <synchronize table=\"item\"/>\n"
+"    <synchronize table=\"bid\"/>\n"
+"    <id name=\"name\"/>\n"
+"    ...\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:455
-msgid "Declare the tables to synchronize this entity with, ensuring that auto-flush happens correctly, and that queries against the derived entity do not return stale data. The <literal>&lt;subselect&gt;</literal> is available as both as an attribute and a nested mapping element."
+#. Tag: para
+#: basic_mapping.xml:455
+#, no-c-format
+msgid ""
+"Declare the tables to synchronize this entity with, ensuring that auto-flush "
+"happens correctly, and that queries against the derived entity do not return "
+"stale data. The <literal>&lt;subselect&gt;</literal> is available as both as "
+"an attribute and a nested mapping element."
 msgstr ""
+"定义这个实体用到的表为同步(synchronize),确保自动刷新(auto-flush)正确执"
+"行, 并且依赖原实体的查询不会返回过期数据。<literal>&lt;subselect&gt;</"
+"literal>在属性元素 和一个嵌套映射元素中都可见。"
 
-#: index.docbook:465
+#. Tag: title
+#: basic_mapping.xml:465
+#, no-c-format
 msgid "<title>id</title>"
 msgstr ""
 
-#: index.docbook:467
-msgid "Mapped classes <emphasis>must</emphasis> declare the primary key column of the database table. Most classes will also have a JavaBeans-style property holding the unique identifier of an instance. The <literal>&lt;id&gt;</literal> element defines the mapping from that property to the primary key column."
+#. Tag: para
+#: basic_mapping.xml:467
+#, no-c-format
+msgid ""
+"Mapped classes <emphasis>must</emphasis> declare the primary key column of "
+"the database table. Most classes will also have a JavaBeans-style property "
+"holding the unique identifier of an instance. The <literal>&lt;id&gt;</"
+"literal> element defines the mapping from that property to the primary key "
+"column."
 msgstr ""
+"被映射的类<emphasis>必须</emphasis>定义对应数据库表主键字段。大多数类有一个"
+"JavaBeans风格的属性, 为每一个实例包含唯一的标识。<literal>&lt;id&gt;</"
+"literal> 元素定义了该属性到数据库表主键字段的映射。"
 
-#: index.docbook:482
+#. Tag: programlisting
+#: basic_mapping.xml:482
+#, no-c-format
 msgid ""
-      "<![CDATA[<id\n"
-      "        name=\"propertyName\"\n"
-      "        type=\"typename\"\n"
-      "        column=\"column_name\"\n"
-      "        unsaved-value=\"null|any|none|undefined|id_value\"\n"
-      "        access=\"field|property|ClassName\">\n"
-      "        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
-      "\n"
-      "        <generator class=\"generatorClass\"/>\n"
-      "</id>]]>"
+"<![CDATA[<id\n"
+"        name=\"propertyName\"\n"
+"        type=\"typename\"\n"
+"        column=\"column_name\"\n"
+"        unsaved-value=\"null|any|none|undefined|id_value\"\n"
+"        access=\"field|property|ClassName\">\n"
+"        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
+"\n"
+"        <generator class=\"generatorClass\"/>\n"
+"</id>]]>"
 msgstr ""
 
-#: index.docbook:485
-msgid "<literal>name</literal> (optional): The name of the identifier property."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:485
+#, no-c-format
+msgid ""
+"<literal>name</literal> (optional): The name of the identifier property."
+msgstr "<literal>name</literal> (可选): 标识属性的名字。"
 
-#: index.docbook:490
-msgid "<literal>type</literal> (optional): A name that indicates the Hibernate type."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:490
+#, no-c-format
+msgid ""
+"<literal>type</literal> (optional): A name that indicates the Hibernate type."
+msgstr "<literal>type</literal> (可选): 标识Hibernate类型的名字。"
 
-#: index.docbook:495
-msgid "<literal>column</literal> (optional - defaults to the property name): The name of the primary key column."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:495
+#, no-c-format
+msgid ""
+"<literal>column</literal> (optional - defaults to the property name): The "
+"name of the primary key column."
+msgstr "<literal>column</literal> (可选 - 默认为属性名): 主键字段的名字。"
 
-#: index.docbook:501
-msgid "<literal>unsaved-value</literal> (optional - defaults to a \"sensible\" value): An identifier property value that indicates that an instance is newly instantiated (unsaved), distinguishing it from detached instances that were saved or loaded in a previous session."
+#. Tag: para
+#: basic_mapping.xml:501
+#, no-c-format
+msgid ""
+"<literal>unsaved-value</literal> (optional - defaults to a \"sensible\" "
+"value): An identifier property value that indicates that an instance is "
+"newly instantiated (unsaved), distinguishing it from detached instances that "
+"were saved or loaded in a previous session."
 msgstr ""
+"<literal>unsaved-value</literal> (可选 - 默认为一个切合实际(sensible)的"
+"值): 一个特定的标识属性值,用来标志该实例是刚刚创建的,尚未保存。 这可以把这"
+"种实例和从以前的session中装载过(可能又做过修改--译者注) 但未再次持久化的实"
+"例区分开来。"
 
-#: index.docbook:509, index.docbook:1017, index.docbook:1156, index.docbook:1238, index.docbook:1345, index.docbook:1534, index.docbook:1708, index.docbook:1878, index.docbook:2457
-msgid "<literal>access</literal> (optional - defaults to <literal>property</literal>): The strategy Hibernate should use for accessing the property value."
+#. Tag: para
+#: basic_mapping.xml:509 basic_mapping.xml:1017 basic_mapping.xml:1156
+#: basic_mapping.xml:1238 basic_mapping.xml:1345 basic_mapping.xml:1534
+#: basic_mapping.xml:1708 basic_mapping.xml:1878 basic_mapping.xml:2457
+#, fuzzy, no-c-format
+msgid ""
+"<literal>access</literal> (optional - defaults to <literal>property</"
+"literal>): The strategy Hibernate should use for accessing the property "
+"value."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>access</literal> (可选 - 默认为<literal>property</literal>): "
+"Hibernate用来访问属性值的策略。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>access</literal> (可选 - 默认为<literal>property</literal>): "
+"Hibernate应该使用的访问此属性值的策略\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>access</literal> (可选 - 默认是 <literal>property</literal>): "
+"Hibernate用于访问属性值的策略。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>access</literal> (可选 - 默认是 <literal>property</literal>): "
+"Hibernate用于访问属性值的策略。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>access</literal> (可选 - 默认值为 <literal>property</literal>): "
+"Hibernate用来访问属性值的策略。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>access</literal> (可选 - 默认是 <literal>property</literal>): "
+"Hibernate用来访问属性的策略。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>access</literal> (可选 - 默认是 <literal>property</literal>): "
+"Hibernate用来访问属性的策略。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>access</literal> (可选 - 默认是 <literal>property</literal>): "
+"Hibernate用来访问属性的策略。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>access</literal> (可选 -默认是 <literal>property</literal>): "
+"Hibernate 用来访问属性值的策略。"
 
-#: index.docbook:517
-msgid "If the <literal>name</literal> attribute is missing, it is assumed that the class has no identifier property."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:517
+#, no-c-format
+msgid ""
+"If the <literal>name</literal> attribute is missing, it is assumed that the "
+"class has no identifier property."
+msgstr "如果 <literal>name</literal>属性不存在,会认为这个类没有标识属性。"
 
-#: index.docbook:522
-msgid "The <literal>unsaved-value</literal> attribute is almost never needed in Hibernate3."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:522
+#, no-c-format
+msgid ""
+"The <literal>unsaved-value</literal> attribute is almost never needed in "
+"Hibernate3."
+msgstr "<literal>unsaved-value</literal> 属性在Hibernate3中几乎不再需要。"
 
-#: index.docbook:526
-msgid "There is an alternative <literal>&lt;composite-id&gt;</literal> declaration to allow access to legacy data with composite keys. We strongly discourage its use for anything else."
+#. Tag: para
+#: basic_mapping.xml:526
+#, no-c-format
+msgid ""
+"There is an alternative <literal>&lt;composite-id&gt;</literal> declaration "
+"to allow access to legacy data with composite keys. We strongly discourage "
+"its use for anything else."
 msgstr ""
+"还有一个另外的<literal>&lt;composite-id&gt;</literal>定义可以访问旧式的多主键"
+"数据。 我们强烈不建议使用这种方式。"
 
-#: index.docbook:532
+#. Tag: title
+#: basic_mapping.xml:532
+#, no-c-format
 msgid "Generator"
-msgstr ""
+msgstr "Generator"
 
-#: index.docbook:534
-msgid "The optional <literal>&lt;generator&gt;</literal> child element names a Java class used to generate unique identifiers for instances of the persistent class. If any parameters are required to configure or initialize the generator instance, they are passed using the <literal>&lt;param&gt;</literal> element."
+#. Tag: para
+#: basic_mapping.xml:534
+#, no-c-format
+msgid ""
+"The optional <literal>&lt;generator&gt;</literal> child element names a Java "
+"class used to generate unique identifiers for instances of the persistent "
+"class. If any parameters are required to configure or initialize the "
+"generator instance, they are passed using the <literal>&lt;param&gt;</"
+"literal> element."
 msgstr ""
+"可选的<literal>&lt;generator&gt;</literal>子元素是一个Java类的名字, 用来为该"
+"持久化类的实例生成唯一的标识。如果这个生成器实例需要某些配置值或者初始化参"
+"数, 用<literal>&lt;param&gt;</literal>元素来传递。"
 
-#: index.docbook:541
+#. Tag: programlisting
+#: basic_mapping.xml:541
+#, no-c-format
 msgid ""
-      "<![CDATA[<id name=\"id\" type=\"long\" column=\"cat_id\">\n"
-      "        <generator class=\"org.hibernate.id.TableHiLoGenerator\">\n"
-      "                <param name=\"table\">uid_table</param>\n"
-      "                <param name=\"column\">next_hi_value_column</param>\n"
-      "        </generator>\n"
-      "</id>]]>"
+"<![CDATA[<id name=\"id\" type=\"long\" column=\"cat_id\">\n"
+"        <generator class=\"org.hibernate.id.TableHiLoGenerator\">\n"
+"                <param name=\"table\">uid_table</param>\n"
+"                <param name=\"column\">next_hi_value_column</param>\n"
+"        </generator>\n"
+"</id>]]>"
 msgstr ""
 
-#: index.docbook:543
-msgid "All generators implement the interface <literal>org.hibernate.id.IdentifierGenerator</literal>. This is a very simple interface; some applications may choose to provide their own specialized implementations. However, Hibernate provides a range of built-in implementations. There are shortcut names for the built-in generators:"
+#. Tag: para
+#: basic_mapping.xml:543
+#, fuzzy, no-c-format
+msgid ""
+"All generators implement the interface <literal>org.hibernate.id."
+"IdentifierGenerator</literal>. This is a very simple interface; some "
+"applications may choose to provide their own specialized implementations. "
+"However, Hibernate provides a range of built-in implementations. There are "
+"shortcut names for the built-in generators:"
 msgstr ""
+"所有的生成器都实现<literal>org.hibernate.id.IdentifierGenerator</literal>接"
+"口。 这是一个非常简单的接口;某些应用程序可以选择提供他们自己特定的实现。当"
+"然, Hibernate提供了很多内置的实现。下面是一些内置生成器的快捷名字: "
+"<placeholder-1/>"
 
-#: index.docbook:551
+#. Tag: literal
+#: basic_mapping.xml:551
+#, no-c-format
 msgid "increment"
-msgstr ""
+msgstr "increment"
 
-#: index.docbook:553
-msgid "generates identifiers of type <literal>long</literal>, <literal>short</literal> or <literal>int</literal> that are unique only when no other process is inserting data into the same table. <emphasis>Do not use in a cluster.</emphasis>"
+#. Tag: para
+#: basic_mapping.xml:553
+#, no-c-format
+msgid ""
+"generates identifiers of type <literal>long</literal>, <literal>short</"
+"literal> or <literal>int</literal> that are unique only when no other "
+"process is inserting data into the same table. <emphasis>Do not use in a "
+"cluster.</emphasis>"
 msgstr ""
+"用于为<literal>long</literal>, <literal>short</literal>或者<literal>int</"
+"literal>类型生成 唯一标识。只有在没有其他进程往同一张表中插入数据时才能使"
+"用。 <emphasis>在集群下不要使用。</emphasis>"
 
-#: index.docbook:562
+#. Tag: literal
+#: basic_mapping.xml:562
+#, no-c-format
 msgid "identity"
-msgstr ""
+msgstr "identity"
 
-#: index.docbook:564
-msgid "supports identity columns in DB2, MySQL, MS SQL Server, Sybase and HypersonicSQL. The returned identifier is of type <literal>long</literal>, <literal>short</literal> or <literal>int</literal>."
+#. Tag: para
+#: basic_mapping.xml:564
+#, no-c-format
+msgid ""
+"supports identity columns in DB2, MySQL, MS SQL Server, Sybase and "
+"HypersonicSQL. The returned identifier is of type <literal>long</literal>, "
+"<literal>short</literal> or <literal>int</literal>."
 msgstr ""
+"对DB2,MySQL, MS SQL Server, Sybase和HypersonicSQL的内置标识字段提供支持。 返"
+"回的标识符是<literal>long</literal>, <literal>short</literal> 或者"
+"<literal>int</literal>类型的。"
 
-#: index.docbook:572
+#. Tag: literal
+#: basic_mapping.xml:572
+#, no-c-format
 msgid "sequence"
-msgstr ""
+msgstr "sequence"
 
-#: index.docbook:574
-msgid "uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in Interbase. The returned identifier is of type <literal>long</literal>, <literal>short</literal> or <literal>int</literal>"
+#. Tag: para
+#: basic_mapping.xml:574
+#, no-c-format
+msgid ""
+"uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in "
+"Interbase. The returned identifier is of type <literal>long</literal>, "
+"<literal>short</literal> or <literal>int</literal>"
 msgstr ""
+"在DB2,PostgreSQL, Oracle, SAP DB, McKoi中使用序列(sequence), 而在Interbase"
+"中使用生成器(generator)。返回的标识符是<literal>long</literal>, "
+"<literal>short</literal>或者 <literal>int</literal>类型的。"
 
-#: index.docbook:582
+#. Tag: literal
+#: basic_mapping.xml:582
+#, no-c-format
 msgid "hilo"
-msgstr ""
+msgstr "hilo"
 
-#: index.docbook:584
-msgid "uses a hi/lo algorithm to efficiently generate identifiers of type <literal>long</literal>, <literal>short</literal> or <literal>int</literal>, given a table and column (by default <literal>hibernate_unique_key</literal> and <literal>next_hi</literal> respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database."
+#. Tag: para
+#: basic_mapping.xml:584
+#, no-c-format
+msgid ""
+"uses a hi/lo algorithm to efficiently generate identifiers of type "
+"<literal>long</literal>, <literal>short</literal> or <literal>int</literal>, "
+"given a table and column (by default <literal>hibernate_unique_key</literal> "
+"and <literal>next_hi</literal> respectively) as a source of hi values. The "
+"hi/lo algorithm generates identifiers that are unique only for a particular "
+"database."
 msgstr ""
+"使用一个高/低位算法高效的生成<literal>long</literal>, <literal>short</"
+"literal> 或者 <literal>int</literal>类型的标识符。给定一个表和字段(默认分别"
+"是 <literal>hibernate_unique_key</literal> 和<literal>next_hi</literal>)作为"
+"高位值的来源。 高/低位算法生成的标识符只在一个特定的数据库中是唯一的。"
 
-#: index.docbook:594
+#. Tag: literal
+#: basic_mapping.xml:594
+#, no-c-format
 msgid "seqhilo"
-msgstr ""
+msgstr "seqhilo"
 
-#: index.docbook:596
-msgid "uses a hi/lo algorithm to efficiently generate identifiers of type <literal>long</literal>, <literal>short</literal> or <literal>int</literal>, given a named database sequence."
+#. Tag: para
+#: basic_mapping.xml:596
+#, no-c-format
+msgid ""
+"uses a hi/lo algorithm to efficiently generate identifiers of type "
+"<literal>long</literal>, <literal>short</literal> or <literal>int</literal>, "
+"given a named database sequence."
 msgstr ""
+"使用一个高/低位算法来高效的生成<literal>long</literal>, <literal>short</"
+"literal> 或者 <literal>int</literal>类型的标识符,给定一个数据库序列"
+"(sequence)的名字。"
 
-#: index.docbook:604
+#. Tag: literal
+#: basic_mapping.xml:604
+#, no-c-format
 msgid "uuid"
-msgstr ""
+msgstr "uuid"
 
-#: index.docbook:606
-msgid "uses a 128-bit UUID algorithm to generate identifiers of type string, unique within a network (the IP address is used). The UUID is encoded as a string of hexadecimal digits of length 32."
+#. Tag: para
+#: basic_mapping.xml:606
+#, no-c-format
+msgid ""
+"uses a 128-bit UUID algorithm to generate identifiers of type string, unique "
+"within a network (the IP address is used). The UUID is encoded as a string "
+"of hexadecimal digits of length 32."
 msgstr ""
+"用一个128-bit的UUID算法生成字符串类型的标识符, 这在一个网络中是唯一的(使用"
+"了IP地址)。UUID被编码为一个32位16进制数字的字符串。"
 
-#: index.docbook:614
+#. Tag: literal
+#: basic_mapping.xml:614
+#, no-c-format
 msgid "guid"
-msgstr ""
+msgstr "guid"
 
-#: index.docbook:616
+#. Tag: para
+#: basic_mapping.xml:616
+#, no-c-format
 msgid "uses a database-generated GUID string on MS SQL Server and MySQL."
-msgstr ""
+msgstr "在MS SQL Server 和 MySQL 中使用数据库生成的GUID字符串。"
 
-#: index.docbook:622
+#. Tag: literal
+#: basic_mapping.xml:622
+#, no-c-format
 msgid "native"
-msgstr ""
+msgstr "native"
 
-#: index.docbook:624
-msgid "picks <literal>identity</literal>, <literal>sequence</literal> or <literal>hilo</literal> depending upon the capabilities of the underlying database."
+#. Tag: para
+#: basic_mapping.xml:624
+#, no-c-format
+msgid ""
+"picks <literal>identity</literal>, <literal>sequence</literal> or "
+"<literal>hilo</literal> depending upon the capabilities of the underlying "
+"database."
 msgstr ""
+"根据底层数据库的能力选择<literal>identity</literal>, <literal>sequence</"
+"literal> 或者<literal>hilo</literal>中的一个。"
 
-#: index.docbook:632
+#. Tag: literal
+#: basic_mapping.xml:632
+#, no-c-format
 msgid "assigned"
-msgstr ""
+msgstr "assigned"
 
-#: index.docbook:634
-msgid "lets the application to assign an identifier to the object before <literal>save()</literal> is called. This is the default strategy if no <literal>&lt;generator&gt;</literal> element is specified."
+#. Tag: para
+#: basic_mapping.xml:634
+#, no-c-format
+msgid ""
+"lets the application to assign an identifier to the object before "
+"<literal>save()</literal> is called. This is the default strategy if no "
+"<literal>&lt;generator&gt;</literal> element is specified."
 msgstr ""
+"让应用程序在<literal>save()</literal>之前为对象分配一个标示符。这是 "
+"<literal>&lt;generator&gt;</literal>元素没有指定时的默认生成策略。"
 
-#: index.docbook:642
+#. Tag: literal
+#: basic_mapping.xml:642
+#, no-c-format
 msgid "select"
-msgstr ""
+msgstr "select"
 
-#: index.docbook:644
-msgid "retrieves a primary key assigned by a database trigger by selecting the row by some unique key and retrieving the primary key value."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:644
+#, no-c-format
+msgid ""
+"retrieves a primary key assigned by a database trigger by selecting the row "
+"by some unique key and retrieving the primary key value."
+msgstr "通过数据库触发器选择一些唯一主键的行并返回主键值来分配一个主键。"
 
-#: index.docbook:651
+#. Tag: literal
+#: basic_mapping.xml:651
+#, no-c-format
 msgid "foreign"
-msgstr ""
+msgstr "foreign"
 
-#: index.docbook:653
-msgid "uses the identifier of another associated object. Usually used in conjunction with a <literal>&lt;one-to-one&gt;</literal> primary key association."
+#. Tag: para
+#: basic_mapping.xml:653
+#, no-c-format
+msgid ""
+"uses the identifier of another associated object. Usually used in "
+"conjunction with a <literal>&lt;one-to-one&gt;</literal> primary key "
+"association."
 msgstr ""
+"使用另外一个相关联的对象的标识符。通常和<literal>&lt;one-to-one&gt;</literal>"
+"联合起来使用。"
 
-#: index.docbook:660
+#. Tag: literal
+#: basic_mapping.xml:660
+#, no-c-format
 msgid "sequence-identity"
-msgstr ""
+msgstr "sequence-identity"
 
-#: index.docbook:662
-msgid "a specialized sequence generation strategy which utilizes a database sequence for the actual value generation, but combines this with JDBC3 getGeneratedKeys to actually return the generated identifier value as part of the insert statement execution. This strategy is only known to be supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on these insert statements are disabled due to a bug in the Oracle drivers."
+#. Tag: para
+#: basic_mapping.xml:662
+#, no-c-format
+msgid ""
+"a specialized sequence generation strategy which utilizes a database "
+"sequence for the actual value generation, but combines this with JDBC3 "
+"getGeneratedKeys to actually return the generated identifier value as part "
+"of the insert statement execution. This strategy is only known to be "
+"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on "
+"these insert statements are disabled due to a bug in the Oracle drivers."
 msgstr ""
+"一种特别的序列生成策略,使用数据库序列来生成实际值,但将它和JDBC3的"
+"getGeneratedKeys结合在一起,使得在插入语句执行的时候就返回生成的值。目前为止只"
+"有面向JDK 1.4的Oracle 10g驱动支持这一策略。注意,因为Oracle驱动程序的一个"
+"bug,这些插入语句的注释被关闭了。(原文:Note comments on these insert "
+"statements are disabled due to a bug in the Oracle drivers.)"
 
-#: index.docbook:679
+#. Tag: title
+#: basic_mapping.xml:679
+#, no-c-format
 msgid "Hi/lo algorithm"
-msgstr ""
+msgstr "高/低位算法(Hi/Lo Algorithm)"
 
-#: index.docbook:680
-msgid "The <literal>hilo</literal> and <literal>seqhilo</literal> generators provide two alternate implementations of the hi/lo algorithm, a favorite approach to identifier generation. The first implementation requires a \"special\" database table to hold the next available \"hi\" value. The second uses an Oracle-style sequence (where supported)."
+#. Tag: para
+#: basic_mapping.xml:680
+#, no-c-format
+msgid ""
+"The <literal>hilo</literal> and <literal>seqhilo</literal> generators "
+"provide two alternate implementations of the hi/lo algorithm, a favorite "
+"approach to identifier generation. The first implementation requires a "
+"\"special\" database table to hold the next available \"hi\" value. The "
+"second uses an Oracle-style sequence (where supported)."
 msgstr ""
+"<literal>hilo</literal> 和 <literal>seqhilo</literal>生成器给出了两种hi/lo算"
+"法的实现, 这是一种很令人满意的标识符生成算法。第一种实现需要一个“特殊”的数据"
+"库表来保存下一个可用的“hi”值。 第二种实现使用一个Oracle风格的序列(在被支持的"
+"情况下)。"
 
-#: index.docbook:687
+#. Tag: programlisting
+#: basic_mapping.xml:687
+#, no-c-format
 msgid ""
-      "<![CDATA[<id name=\"id\" type=\"long\" column=\"cat_id\">\n"
-      "        <generator class=\"hilo\">\n"
-      "                <param name=\"table\">hi_value</param>\n"
-      "                <param name=\"column\">next_value</param>\n"
-      "                <param name=\"max_lo\">100</param>\n"
-      "        </generator>\n"
-      "</id>]]>"
+"<![CDATA[<id name=\"id\" type=\"long\" column=\"cat_id\">\n"
+"        <generator class=\"hilo\">\n"
+"                <param name=\"table\">hi_value</param>\n"
+"                <param name=\"column\">next_value</param>\n"
+"                <param name=\"max_lo\">100</param>\n"
+"        </generator>\n"
+"</id>]]>"
 msgstr ""
 
-#: index.docbook:689
+#. Tag: programlisting
+#: basic_mapping.xml:689
+#, no-c-format
 msgid ""
-      "<![CDATA[<id name=\"id\" type=\"long\" column=\"cat_id\">\n"
-      "        <generator class=\"seqhilo\">\n"
-      "                <param name=\"sequence\">hi_value</param>\n"
-      "                <param name=\"max_lo\">100</param>\n"
-      "        </generator>\n"
-      "</id>]]>"
+"<![CDATA[<id name=\"id\" type=\"long\" column=\"cat_id\">\n"
+"        <generator class=\"seqhilo\">\n"
+"                <param name=\"sequence\">hi_value</param>\n"
+"                <param name=\"max_lo\">100</param>\n"
+"        </generator>\n"
+"</id>]]>"
 msgstr ""
 
-#: index.docbook:691
-msgid "Unfortunately, you can't use <literal>hilo</literal> when supplying your own <literal>Connection</literal> to Hibernate. When Hibernate is using an application server datasource to obtain connections enlisted with JTA, you must properly configure the <literal>hibernate.transaction.manager_lookup_class</literal>."
+#. Tag: para
+#: basic_mapping.xml:691
+#, no-c-format
+msgid ""
+"Unfortunately, you can't use <literal>hilo</literal> when supplying your own "
+"<literal>Connection</literal> to Hibernate. When Hibernate is using an "
+"application server datasource to obtain connections enlisted with JTA, you "
+"must properly configure the <literal>hibernate.transaction."
+"manager_lookup_class</literal>."
 msgstr ""
+"很不幸,你在为Hibernate自行提供<literal>Connection</literal>时无法使用"
+"<literal>hilo</literal>。 当Hibernate使用JTA获取应用服务器的数据源连接时,你必"
+"须正确地配置 <literal>hibernate.transaction.manager_lookup_class</literal>。"
 
-#: index.docbook:700
+#. Tag: title
+#: basic_mapping.xml:700
+#, no-c-format
 msgid "UUID algorithm"
-msgstr ""
+msgstr "UUID算法(UUID Algorithm )"
 
-#: index.docbook:701
-msgid "The UUID contains: IP address, startup time of the JVM (accurate to a quarter second), system time and a counter value (unique within the JVM). It's not possible to obtain a MAC address or memory address from Java code, so this is the best we can do without using JNI."
+#. Tag: para
+#: basic_mapping.xml:701
+#, no-c-format
+msgid ""
+"The UUID contains: IP address, startup time of the JVM (accurate to a "
+"quarter second), system time and a counter value (unique within the JVM). "
+"It's not possible to obtain a MAC address or memory address from Java code, "
+"so this is the best we can do without using JNI."
 msgstr ""
+"UUID包含:IP地址,JVM的启动时间(精确到1/4秒),系统时间和一个计数器值(在JVM"
+"中唯一)。 在Java代码中不可能获得MAC地址或者内存地址,所以这已经是我们在不使"
+"用JNI的前提下的能做的最好实现了。"
 
-#: index.docbook:710
+#. Tag: title
+#: basic_mapping.xml:710
+#, no-c-format
 msgid "Identity columns and sequences"
-msgstr ""
+msgstr "标识字段和序列(Identity columns and Sequences)"
 
-#: index.docbook:711
-msgid "For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), you may use <literal>identity</literal> key generation. For databases that support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you may use <literal>sequence</literal> style key generation. Both these strategies require two SQL queries to insert a new object."
+#. Tag: para
+#: basic_mapping.xml:711
+#, no-c-format
+msgid ""
+"For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), "
+"you may use <literal>identity</literal> key generation. For databases that "
+"support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you "
+"may use <literal>sequence</literal> style key generation. Both these "
+"strategies require two SQL queries to insert a new object."
 msgstr ""
+"对于内部支持标识字段的数据库(DB2,MySQL,Sybase,MS SQL),你可以使用"
+"<literal>identity</literal>关键字生成。 对于内部支持序列的数据库(DB2,"
+"Oracle, PostgreSQL, Interbase, McKoi,SAP DB), 你可以使用<literal>sequence</"
+"literal>风格的关键字生成。 这两种方式对于插入一个新的对象都需要两次SQL查询。"
 
-#: index.docbook:719
+#. Tag: programlisting
+#: basic_mapping.xml:719
+#, no-c-format
 msgid ""
-      "<![CDATA[<id name=\"id\" type=\"long\" column=\"person_id\">\n"
-      "        <generator class=\"sequence\">\n"
-      "                <param name=\"sequence\">person_id_sequence</param>\n"
-      "        </generator>\n"
-      "</id>]]>"
+"<![CDATA[<id name=\"id\" type=\"long\" column=\"person_id\">\n"
+"        <generator class=\"sequence\">\n"
+"                <param name=\"sequence\">person_id_sequence</param>\n"
+"        </generator>\n"
+"</id>]]>"
 msgstr ""
 
-#: index.docbook:721
+#. Tag: programlisting
+#: basic_mapping.xml:721
+#, no-c-format
 msgid ""
-      "<![CDATA[<id name=\"id\" type=\"long\" column=\"person_id\" unsaved-value=\"0\">\n"
-      "        <generator class=\"identity\"/>\n"
-      "</id>]]>"
+"<![CDATA[<id name=\"id\" type=\"long\" column=\"person_id\" unsaved-value=\"0"
+"\">\n"
+"        <generator class=\"identity\"/>\n"
+"</id>]]>"
 msgstr ""
 
-#: index.docbook:723
-msgid "For cross-platform development, the <literal>native</literal> strategy will choose from the <literal>identity</literal>, <literal>sequence</literal> and <literal>hilo</literal> strategies, dependant upon the capabilities of the underlying database."
+#. Tag: para
+#: basic_mapping.xml:723
+#, no-c-format
+msgid ""
+"For cross-platform development, the <literal>native</literal> strategy will "
+"choose from the <literal>identity</literal>, <literal>sequence</literal> and "
+"<literal>hilo</literal> strategies, dependant upon the capabilities of the "
+"underlying database."
 msgstr ""
+"对于跨平台开发,<literal>native</literal>策略会从<literal>identity</"
+"literal>, <literal>sequence</literal> 和<literal>hilo</literal>中进行选择,选"
+"择哪一个,这取决于底层数据库的支持能力。"
 
-#: index.docbook:732
+#. Tag: title
+#: basic_mapping.xml:732
+#, no-c-format
 msgid "Assigned identifiers"
-msgstr ""
+msgstr "程序分配的标识符(Assigned Identifiers)"
 
-#: index.docbook:733
-msgid "If you want the application to assign identifiers (as opposed to having Hibernate generate them), you may use the <literal>assigned</literal> generator. This special generator will use the identifier value already assigned to the object's identifier property. This generator is used when the primary key is a natural key instead of a surrogate key. This is the default behavior if you do no specify a <literal>&lt;generator&gt;</literal> element."
+#. Tag: para
+#: basic_mapping.xml:733
+#, no-c-format
+msgid ""
+"If you want the application to assign identifiers (as opposed to having "
+"Hibernate generate them), you may use the <literal>assigned</literal> "
+"generator. This special generator will use the identifier value already "
+"assigned to the object's identifier property. This generator is used when "
+"the primary key is a natural key instead of a surrogate key. This is the "
+"default behavior if you do no specify a <literal>&lt;generator&gt;</literal> "
+"element."
 msgstr ""
+"如果你需要应用程序分配一个标示符(而非Hibernate来生成),你可以使用"
+"<literal>assigned</literal> 生成器。这种特殊的生成器会使用已经分配给对象的标"
+"识符属性的标识符值。 这个生成器使用一个自然键(natural key,有商业意义的列-"
+"译注)作为主键,而不是使用一个代理键( surrogate key,没有商业意义的列-译"
+"注)。这是没有指定<literal>&lt;generator&gt;</literal>元素时的默认行为"
 
-#: index.docbook:742
-msgid "Choosing the <literal>assigned</literal> generator makes Hibernate use <literal>unsaved-value=\"undefined\"</literal>, forcing Hibernate to go to the database to determine if an instance is transient or detached, unless there is a version or timestamp property, or you define <literal>Interceptor.isUnsaved()</literal>."
+#. Tag: para
+#: basic_mapping.xml:742
+#, no-c-format
+msgid ""
+"Choosing the <literal>assigned</literal> generator makes Hibernate use "
+"<literal>unsaved-value=\"undefined\"</literal>, forcing Hibernate to go to "
+"the database to determine if an instance is transient or detached, unless "
+"there is a version or timestamp property, or you define <literal>Interceptor."
+"isUnsaved()</literal>."
 msgstr ""
+"当选择<literal>assigned</literal>生成器时,除非有一个version或timestamp属性,"
+"或者你定义了 <literal>Interceptor.isUnsaved()</literal>,否则需要让Hiberante"
+"使用 <literal>unsaved-value=\"undefined\"</literal>,强制Hibernatet查询数据库"
+"来确定一个实例是瞬时的(transient) 还是脱管的(detached)。"
 
-#: index.docbook:752
+#. Tag: title
+#: basic_mapping.xml:752
+#, no-c-format
 msgid "Primary keys assigned by triggers"
-msgstr ""
+msgstr "触发器实现的主键生成器(Primary keys assigned by triggers)"
 
-#: index.docbook:753
-msgid "For legacy schemas only (Hibernate does not generate DDL with triggers)."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:753
+#, no-c-format
+msgid ""
+"For legacy schemas only (Hibernate does not generate DDL with triggers)."
+msgstr "仅仅用于遗留的schema中 (Hibernate不能使用触发器生成DDL)。"
 
-#: index.docbook:757
+#. Tag: programlisting
+#: basic_mapping.xml:757
+#, no-c-format
 msgid ""
-      "<![CDATA[<id name=\"id\" type=\"long\" column=\"person_id\">\n"
-      "        <generator class=\"select\">\n"
-      "                <param name=\"key\">socialSecurityNumber</param>\n"
-      "        </generator>\n"
-      "</id>]]>"
+"<![CDATA[<id name=\"id\" type=\"long\" column=\"person_id\">\n"
+"        <generator class=\"select\">\n"
+"                <param name=\"key\">socialSecurityNumber</param>\n"
+"        </generator>\n"
+"</id>]]>"
 msgstr ""
 
-#: index.docbook:759
-msgid "In the above example, there is a unique valued property named <literal>socialSecurityNumber</literal> defined by the class, as a natural key, and a surrogate key named <literal>person_id</literal> whose value is generated by a trigger."
+#. Tag: para
+#: basic_mapping.xml:759
+#, no-c-format
+msgid ""
+"In the above example, there is a unique valued property named "
+"<literal>socialSecurityNumber</literal> defined by the class, as a natural "
+"key, and a surrogate key named <literal>person_id</literal> whose value is "
+"generated by a trigger."
 msgstr ""
+"在上面的例子中,类定义了一个命名为<literal>socialSecurityNumber</literal>的唯"
+"一值属性, 它是一个自然键(natural key),命名为<literal>person_id</literal>"
+"的代理键(surrogate key) 的值由触发器生成。"
 
-#: index.docbook:771
+#. Tag: title
+#: basic_mapping.xml:771
+#, no-c-format
 msgid "Enhanced identifier generators"
-msgstr ""
+msgstr "Enhanced identifier generators"
 
-#: index.docbook:773
-msgid "Starting with release 3.2.3, there are 2 new generators which represent a re-thinking of 2 different aspects of identifier generation. The first aspect is database portability; the second is optimization (not having to query the database for every request for a new identifier value). These two new generators are intended to take the place of some of the named generators described above (starting in 3.3.x); however, they are included in the current releases and can be referenced by FQN."
+#. Tag: para
+#: basic_mapping.xml:773
+#, no-c-format
+msgid ""
+"Starting with release 3.2.3, there are 2 new generators which represent a re-"
+"thinking of 2 different aspects of identifier generation. The first aspect "
+"is database portability; the second is optimization (not having to query the "
+"database for every request for a new identifier value). These two new "
+"generators are intended to take the place of some of the named generators "
+"described above (starting in 3.3.x); however, they are included in the "
+"current releases and can be referenced by FQN."
 msgstr ""
+"Starting with release 3.2.3, there are 2 new generators which represent a re-"
+"thinking of 2 different aspects of identifier generation. The first aspect "
+"is database portability; the second is optimization (not having to query the "
+"database for every request for a new identifier value). These two new "
+"generators are intended to take the place of some of the named generators "
+"described above (starting in 3.3.x); however, they are included in the "
+"current releases and can be referenced by FQN."
 
-#: index.docbook:781
-msgid "The first of these new generators is <literal>org.hibernate.id.enhanced.SequenceStyleGenerator</literal> which is intended firstly as a replacement for the <literal>sequence</literal> generator and secondly as a better portability generator than <literal>native</literal> (because <literal>native</literal> (generally) chooses between <literal>identity</literal> and <literal>sequence</literal> which have largely different semantics which can cause subtle isssues in applications eyeing portability). <literal>org.hibernate.id.enhanced.SequenceStyleGenerator</literal> however achieves portability in a different manner. It chooses between using a table or a sequence in the database to store its incrementing values depending on the capabilities of the dialect being used. The difference between this and <literal>native</literal> is that table-based and sequence-based storage have the same exact semantic (in fact sequences are exactly what Hibernate tries to emmulate with its!
  table-based generators). This generator has a number of configuration parameters:"
+#. Tag: para
+#: basic_mapping.xml:781
+#, fuzzy, no-c-format
+msgid ""
+"The first of these new generators is <literal>org.hibernate.id.enhanced."
+"SequenceStyleGenerator</literal> which is intended firstly as a replacement "
+"for the <literal>sequence</literal> generator and secondly as a better "
+"portability generator than <literal>native</literal> (because "
+"<literal>native</literal> (generally) chooses between <literal>identity</"
+"literal> and <literal>sequence</literal> which have largely different "
+"semantics which can cause subtle isssues in applications eyeing "
+"portability). <literal>org.hibernate.id.enhanced.SequenceStyleGenerator</"
+"literal> however achieves portability in a different manner. It chooses "
+"between using a table or a sequence in the database to store its "
+"incrementing values depending on the capabilities of the dialect being used. "
+"The difference between this and <literal>native</literal> is that table-"
+"based and sequence-based storage have the same exact semantic (in fact "
+"sequences are exactly what Hibernate tries to emmulate with its table-based "
+"generators). This generator has a number of configuration parameters:"
 msgstr ""
+"The first of these new generators is <literal>org.hibernate.id.enhanced."
+"SequenceStyleGenerator</literal> which is intended firstly as a replacement "
+"for the <literal>sequence</literal> generator and secondly as a better "
+"portability generator than <literal>native</literal> (because "
+"<literal>native</literal> (generally) chooses between <literal>identity</"
+"literal> and <literal>sequence</literal> which have largely different "
+"semantics which can cause subtle isssues in applications eyeing "
+"portability). <literal>org.hibernate.id.enhanced.SequenceStyleGenerator</"
+"literal> however achieves portability in a different manner. It chooses "
+"between using a table or a sequence in the database to store its "
+"incrementing values depending on the capabilities of the dialect being used. "
+"The difference between this and <literal>native</literal> is that table-"
+"based and sequence-based storage have the same exact semantic (in fact "
+"sequences are exactly what Hibernate tries to emmulate with its table-based "
+"generators). This generator has a number of configuration parameters: "
+"<placeholder-1/>"
 
-#: index.docbook:795
-msgid "<literal>sequence_name</literal> (optional, defaults to <literal>hibernate_sequence</literal>): The name of the sequence (or table) to be used."
+#. Tag: para
+#: basic_mapping.xml:795
+#, no-c-format
+msgid ""
+"<literal>sequence_name</literal> (optional, defaults to "
+"<literal>hibernate_sequence</literal>): The name of the sequence (or table) "
+"to be used."
 msgstr ""
+"<literal>sequence_name</literal> (optional, defaults to "
+"<literal>hibernate_sequence</literal>): The name of the sequence (or table) "
+"to be used."
 
-#: index.docbook:801
-msgid "<literal>initial_value</literal> (optional, defaults to <literal>1</literal>): The initial value to be retrieved from the sequence/table. In sequence creation terms, this is analogous to the clause typical named \"STARTS WITH\"."
+#. Tag: para
+#: basic_mapping.xml:801
+#, no-c-format
+msgid ""
+"<literal>initial_value</literal> (optional, defaults to <literal>1</"
+"literal>): The initial value to be retrieved from the sequence/table. In "
+"sequence creation terms, this is analogous to the clause typical named "
+"\"STARTS WITH\"."
 msgstr ""
+"<literal>initial_value</literal> (optional, defaults to <literal>1</"
+"literal>): The initial value to be retrieved from the sequence/table. In "
+"sequence creation terms, this is analogous to the clause typical named "
+"\"STARTS WITH\"."
 
-#: index.docbook:808
-msgid "<literal>increment_size</literal> (optional, defaults to <literal>1</literal>): The value by which subsequent calls to the sequence/table should differ. In sequence creation terms, this is analogous to the clause typical named \"INCREMENT BY\"."
+#. Tag: para
+#: basic_mapping.xml:808
+#, no-c-format
+msgid ""
+"<literal>increment_size</literal> (optional, defaults to <literal>1</"
+"literal>): The value by which subsequent calls to the sequence/table should "
+"differ. In sequence creation terms, this is analogous to the clause typical "
+"named \"INCREMENT BY\"."
 msgstr ""
+"<literal>increment_size</literal> (optional, defaults to <literal>1</"
+"literal>): The value by which subsequent calls to the sequence/table should "
+"differ. In sequence creation terms, this is analogous to the clause typical "
+"named \"INCREMENT BY\"."
 
-#: index.docbook:815
-msgid "<literal>force_table_use</literal> (optional, defaults to <literal>false</literal>): Should we force the use of a table as the backing structure even though the dialect might support sequence?"
+#. Tag: para
+#: basic_mapping.xml:815
+#, no-c-format
+msgid ""
+"<literal>force_table_use</literal> (optional, defaults to <literal>false</"
+"literal>): Should we force the use of a table as the backing structure even "
+"though the dialect might support sequence?"
 msgstr ""
+"<literal>force_table_use</literal> (optional, defaults to <literal>false</"
+"literal>): Should we force the use of a table as the backing structure even "
+"though the dialect might support sequence?"
 
-#: index.docbook:822
-msgid "<literal>value_column</literal> (optional, defaults to <literal>next_val</literal>): Only relevant for table structures! The name of the column on the table which is used to hold the value."
+#. Tag: para
+#: basic_mapping.xml:822
+#, no-c-format
+msgid ""
+"<literal>value_column</literal> (optional, defaults to <literal>next_val</"
+"literal>): Only relevant for table structures! The name of the column on the "
+"table which is used to hold the value."
 msgstr ""
+"<literal>value_column</literal> (optional, defaults to <literal>next_val</"
+"literal>): Only relevant for table structures! The name of the column on the "
+"table which is used to hold the value."
 
-#: index.docbook:829
-msgid "<literal>optimizer</literal> (optional, defaults to <literal>none</literal>): See"
+#. Tag: para
+#: basic_mapping.xml:829
+#, fuzzy, no-c-format
+msgid ""
+"<literal>optimizer</literal> (optional, defaults to <literal>none</"
+"literal>): See"
 msgstr ""
+"<literal>cascade</literal> (可选 -默认是<literal>none</literal>): 级联的类型"
 
-#: index.docbook:836
-msgid "The second of these new generators is <literal>org.hibernate.id.enhanced.TableGenerator</literal> which is intended firstly as a replacement for the <literal>table</literal> generator (although it actually functions much more like <literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal>) and secondly as a re-implementation of <literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal> utilizing the notion of pluggable optimiziers. Essentially this generator defines a table capable of holding a number of different increment values simultaneously by using multiple distinctly keyed rows. This generator has a number of configuration parameters:"
+#. Tag: para
+#: basic_mapping.xml:836
+#, fuzzy, no-c-format
+msgid ""
+"The second of these new generators is <literal>org.hibernate.id.enhanced."
+"TableGenerator</literal> which is intended firstly as a replacement for the "
+"<literal>table</literal> generator (although it actually functions much more "
+"like <literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal>) and "
+"secondly as a re-implementation of <literal>org.hibernate.id."
+"MultipleHiLoPerTableGenerator</literal> utilizing the notion of pluggable "
+"optimiziers. Essentially this generator defines a table capable of holding a "
+"number of different increment values simultaneously by using multiple "
+"distinctly keyed rows. This generator has a number of configuration "
+"parameters:"
 msgstr ""
+"The second of these new generators is <literal>org.hibernate.id.enhanced."
+"TableGenerator</literal> which is intended firstly as a replacement for the "
+"<literal>table</literal> generator (although it actually functions much more "
+"like <literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal>) and "
+"secondly as a re-implementation of <literal>org.hibernate.id."
+"MultipleHiLoPerTableGenerator</literal> utilizing the notion of pluggable "
+"optimiziers. Essentially this generator defines a table capable of holding a "
+"number of different increment values simultaneously by using multiple "
+"distinctly keyed rows. This generator has a number of configuration "
+"parameters: <placeholder-1/>"
 
-#: index.docbook:846
-msgid "<literal>table_name</literal> (optional, defaults to <literal>hibernate_sequences</literal>): The name of the table to be used."
+#. Tag: para
+#: basic_mapping.xml:846
+#, no-c-format
+msgid ""
+"<literal>table_name</literal> (optional, defaults to "
+"<literal>hibernate_sequences</literal>): The name of the table to be used."
 msgstr ""
+"<literal>table_name</literal> (optional, defaults to "
+"<literal>hibernate_sequences</literal>): The name of the table to be used."
 
-#: index.docbook:852
-msgid "<literal>value_column_name</literal> (optional, defaults to <literal>next_val</literal>): The name of the column on the table which is used to hold the value."
+#. Tag: para
+#: basic_mapping.xml:852
+#, no-c-format
+msgid ""
+"<literal>value_column_name</literal> (optional, defaults to "
+"<literal>next_val</literal>): The name of the column on the table which is "
+"used to hold the value."
 msgstr ""
+"<literal>value_column_name</literal> (optional, defaults to "
+"<literal>next_val</literal>): The name of the column on the table which is "
+"used to hold the value."
 
-#: index.docbook:858
-msgid "<literal>segment_column_name</literal> (optional, defaults to <literal>sequence_name</literal>): The name of the column on the table which is used to hold the \"segement key\". This is the value which distinctly identifies which increment value to use."
+#. Tag: para
+#: basic_mapping.xml:858
+#, no-c-format
+msgid ""
+"<literal>segment_column_name</literal> (optional, defaults to "
+"<literal>sequence_name</literal>): The name of the column on the table which "
+"is used to hold the \"segement key\". This is the value which distinctly "
+"identifies which increment value to use."
 msgstr ""
+"<literal>segment_column_name</literal> (optional, defaults to "
+"<literal>sequence_name</literal>): The name of the column on the table which "
+"is used to hold the \"segement key\". This is the value which distinctly "
+"identifies which increment value to use."
 
-#: index.docbook:865
-msgid "<literal>segment_value</literal> (optional, defaults to <literal>default</literal>): The \"segment key\" value for the segment from which we want to pull increment values for this generator."
+#. Tag: para
+#: basic_mapping.xml:865
+#, no-c-format
+msgid ""
+"<literal>segment_value</literal> (optional, defaults to <literal>default</"
+"literal>): The \"segment key\" value for the segment from which we want to "
+"pull increment values for this generator."
 msgstr ""
+"<literal>segment_value</literal> (optional, defaults to <literal>default</"
+"literal>): The \"segment key\" value for the segment from which we want to "
+"pull increment values for this generator."
 
-#: index.docbook:872
-msgid "<literal>segment_value_length</literal> (optional, defaults to <literal>255</literal>): Used for schema generation; the column size to create this segment key column."
+#. Tag: para
+#: basic_mapping.xml:872
+#, no-c-format
+msgid ""
+"<literal>segment_value_length</literal> (optional, defaults to <literal>255</"
+"literal>): Used for schema generation; the column size to create this "
+"segment key column."
 msgstr ""
+"<literal>segment_value_length</literal> (optional, defaults to <literal>255</"
+"literal>): Used for schema generation; the column size to create this "
+"segment key column."
 
-#: index.docbook:878
-msgid "<literal>initial_value</literal> (optional, defaults to <literal>1</literal>): The initial value to be retrieved from the table."
+#. Tag: para
+#: basic_mapping.xml:878
+#, no-c-format
+msgid ""
+"<literal>initial_value</literal> (optional, defaults to <literal>1</"
+"literal>): The initial value to be retrieved from the table."
 msgstr ""
+"<literal>initial_value</literal> (optional, defaults to <literal>1</"
+"literal>): The initial value to be retrieved from the table."
 
-#: index.docbook:884
-msgid "<literal>increment_size</literal> (optional, defaults to <literal>1</literal>): The value by which subsequent calls to the table should differ."
+#. Tag: para
+#: basic_mapping.xml:884
+#, no-c-format
+msgid ""
+"<literal>increment_size</literal> (optional, defaults to <literal>1</"
+"literal>): The value by which subsequent calls to the table should differ."
 msgstr ""
+"<literal>increment_size</literal> (optional, defaults to <literal>1</"
+"literal>): The value by which subsequent calls to the table should differ."
 
-#: index.docbook:890
-msgid "<literal>optimizer</literal> (optional, defaults to <literal></literal>): See"
+#. Tag: para
+#: basic_mapping.xml:890
+#, fuzzy, no-c-format
+msgid ""
+"<literal>optimizer</literal> (optional, defaults to <literal></literal>): See"
 msgstr ""
+"<literal>cascade</literal> (可选 -默认是<literal>none</literal>): 级联的类型"
 
-#: index.docbook:900
+#. Tag: title
+#: basic_mapping.xml:900
+#, no-c-format
 msgid "Identifier generator optimization"
-msgstr ""
+msgstr "Identifier generator optimization"
 
-#: index.docbook:901
-msgid "For identifier generators which store values in the database, it is inefficient for them to hit the database on each and every call to generate a new identifier value. Instead, you'd ideally want to group a bunch of them in memory and only hit the database when you have exhausted your in-memory value group. This is the role of the pluggable optimizers. Currently only the two enhanced generators (<xref linkend=\"mapping-declaration-id-enhanced\"/> support this notion."
+#. Tag: para
+#: basic_mapping.xml:901
+#, fuzzy, no-c-format
+msgid ""
+"For identifier generators which store values in the database, it is "
+"inefficient for them to hit the database on each and every call to generate "
+"a new identifier value. Instead, you'd ideally want to group a bunch of them "
+"in memory and only hit the database when you have exhausted your in-memory "
+"value group. This is the role of the pluggable optimizers. Currently only "
+"the two enhanced generators (<xref linkend=\"mapping-declaration-id-enhanced"
+"\"/> support this notion."
 msgstr ""
+"For identifier generators which store values in the database, it is "
+"inefficient for them to hit the database on each and every call to generate "
+"a new identifier value. Instead, you'd ideally want to group a bunch of them "
+"in memory and only hit the database when you have exhausted your in-memory "
+"value group. This is the role of the pluggable optimizers. Currently only "
+"the two enhanced generators (<xref linkend=\"mapping-declaration-id-enhanced"
+"\"/> support this notion. <placeholder-1/>"
 
-#: index.docbook:909
-msgid "<literal>none</literal> (generally this is the default if no optimizer was specified): This says to not perform any optimizations, and hit the database each and every request."
+#. Tag: para
+#: basic_mapping.xml:909
+#, no-c-format
+msgid ""
+"<literal>none</literal> (generally this is the default if no optimizer was "
+"specified): This says to not perform any optimizations, and hit the database "
+"each and every request."
 msgstr ""
+"<literal>none</literal> (generally this is the default if no optimizer was "
+"specified): This says to not perform any optimizations, and hit the database "
+"each and every request."
 
-#: index.docbook:915
-msgid "<literal>hilo</literal>: applies a hi/lo algorithm around the database retrieved values. The values from the database for this optimizer are expected to be sequential. The values retrieved from the database structure for this optimizer indicates the \"group number\"; the <literal>increment_size</literal> is multiplied by that value in memory to define a group \"hi value\"."
+#. Tag: para
+#: basic_mapping.xml:915
+#, no-c-format
+msgid ""
+"<literal>hilo</literal>: applies a hi/lo algorithm around the database "
+"retrieved values. The values from the database for this optimizer are "
+"expected to be sequential. The values retrieved from the database structure "
+"for this optimizer indicates the \"group number\"; the "
+"<literal>increment_size</literal> is multiplied by that value in memory to "
+"define a group \"hi value\"."
 msgstr ""
+"<literal>hilo</literal>: applies a hi/lo algorithm around the database "
+"retrieved values. The values from the database for this optimizer are "
+"expected to be sequential. The values retrieved from the database structure "
+"for this optimizer indicates the \"group number\"; the "
+"<literal>increment_size</literal> is multiplied by that value in memory to "
+"define a group \"hi value\"."
 
-#: index.docbook:924
-msgid "<literal>pooled</literal>: like was discussed for <literal>hilo</literal>, this optimizers attempts to minimize the number of hits to the database. Here, however, we simply store the starting value for the \"next group\" into the database structure rather than a sequential value in combination with an in-memory grouping algorithm. <literal>increment_size</literal> here refers to the values coming from the database."
+#. Tag: para
+#: basic_mapping.xml:924
+#, no-c-format
+msgid ""
+"<literal>pooled</literal>: like was discussed for <literal>hilo</literal>, "
+"this optimizers attempts to minimize the number of hits to the database. "
+"Here, however, we simply store the starting value for the \"next group\" "
+"into the database structure rather than a sequential value in combination "
+"with an in-memory grouping algorithm. <literal>increment_size</literal> here "
+"refers to the values coming from the database."
 msgstr ""
+"<literal>pooled</literal>: like was discussed for <literal>hilo</literal>, "
+"this optimizers attempts to minimize the number of hits to the database. "
+"Here, however, we simply store the starting value for the \"next group\" "
+"into the database structure rather than a sequential value in combination "
+"with an in-memory grouping algorithm. <literal>increment_size</literal> here "
+"refers to the values coming from the database."
 
-#: index.docbook:937
+#. Tag: title
+#: basic_mapping.xml:937
+#, no-c-format
 msgid "composite-id"
-msgstr ""
+msgstr "composite-id"
 
-#: index.docbook:939
+#. Tag: programlisting
+#: basic_mapping.xml:939
+#, no-c-format
 msgid ""
-      "<![CDATA[<composite-id\n"
-      "        name=\"propertyName\"\n"
-      "        class=\"ClassName\"\n"
-      "        mapped=\"true|false\"\n"
-      "        access=\"field|property|ClassName\">\n"
-      "        node=\"element-name|.\"\n"
-      "\n"
-      "        <key-property name=\"propertyName\" type=\"typename\" column=\"column_name\"/>\n"
-      "        <key-many-to-one name=\"propertyName class=\"ClassName\" column=\"column_name\"/>\n"
-      "        ......\n"
-      "</composite-id>]]>"
+"<![CDATA[<composite-id\n"
+"        name=\"propertyName\"\n"
+"        class=\"ClassName\"\n"
+"        mapped=\"true|false\"\n"
+"        access=\"field|property|ClassName\">\n"
+"        node=\"element-name|.\"\n"
+"\n"
+"        <key-property name=\"propertyName\" type=\"typename\" column="
+"\"column_name\"/>\n"
+"        <key-many-to-one name=\"propertyName class=\"ClassName\" column="
+"\"column_name\"/>\n"
+"        ......\n"
+"</composite-id>]]>"
 msgstr ""
 
-#: index.docbook:941
-msgid "For a table with a composite key, you may map multiple properties of the class as identifier properties. The <literal>&lt;composite-id&gt;</literal> element accepts <literal>&lt;key-property&gt;</literal> property mappings and <literal>&lt;key-many-to-one&gt;</literal> mappings as child elements."
+#. Tag: para
+#: basic_mapping.xml:941
+#, no-c-format
+msgid ""
+"For a table with a composite key, you may map multiple properties of the "
+"class as identifier properties. The <literal>&lt;composite-id&gt;</literal> "
+"element accepts <literal>&lt;key-property&gt;</literal> property mappings "
+"and <literal>&lt;key-many-to-one&gt;</literal> mappings as child elements."
 msgstr ""
+"如果表使用联合主键,你可以映射类的多个属性为标识符属性。 <literal>&lt;"
+"composite-id&gt;</literal>元素接受<literal>&lt;key-property&gt;</literal> 属"
+"性映射和<literal>&lt;key-many-to-one&gt;</literal>属性映射作为子元素。"
 
-#: index.docbook:948
+#. Tag: programlisting
+#: basic_mapping.xml:948
+#, no-c-format
 msgid ""
-      "<![CDATA[<composite-id>\n"
-      "        <key-property name=\"medicareNumber\"/>\n"
-      "        <key-property name=\"dependent\"/>\n"
-      "</composite-id>]]>"
+"<![CDATA[<composite-id>\n"
+"        <key-property name=\"medicareNumber\"/>\n"
+"        <key-property name=\"dependent\"/>\n"
+"</composite-id>]]>"
 msgstr ""
 
-#: index.docbook:950
-msgid "Your persistent class <emphasis>must</emphasis> override <literal>equals()</literal> and <literal>hashCode()</literal> to implement composite identifier equality. It must also implements <literal>Serializable</literal>."
+#. Tag: para
+#: basic_mapping.xml:950
+#, no-c-format
+msgid ""
+"Your persistent class <emphasis>must</emphasis> override <literal>equals()</"
+"literal> and <literal>hashCode()</literal> to implement composite identifier "
+"equality. It must also implements <literal>Serializable</literal>."
 msgstr ""
+"你的持久化类<emphasis>必须</emphasis>重载<literal>equals()</literal>和 "
+"<literal>hashCode()</literal>方法,来实现组合的标识符的相等判断。 实现"
+"<literal>Serializable</literal>接口也是必须的。"
 
-#: index.docbook:956
-msgid "Unfortunately, this approach to composite identifiers means that a persistent object is its own identifier. There is no convenient \"handle\" other than the object itself. You must instantiate an instance of the persistent class itself and populate its identifier properties before you can <literal>load()</literal> the persistent state associated with a composite key. We call this approach an <emphasis>embedded</emphasis> composite identifier, and discourage it for serious applications."
+#. Tag: para
+#: basic_mapping.xml:956
+#, no-c-format
+msgid ""
+"Unfortunately, this approach to composite identifiers means that a "
+"persistent object is its own identifier. There is no convenient \"handle\" "
+"other than the object itself. You must instantiate an instance of the "
+"persistent class itself and populate its identifier properties before you "
+"can <literal>load()</literal> the persistent state associated with a "
+"composite key. We call this approach an <emphasis>embedded</emphasis> "
+"composite identifier, and discourage it for serious applications."
 msgstr ""
+"不幸的是,这种组合关键字的方法意味着一个持久化类是它自己的标识。除了对象自己"
+"之外, 没有什么方便的“把手”可用。你必须初始化持久化类的实例,填充它的标识符属"
+"性,再<literal>load()</literal> 组合关键字关联的持久状态。我们把这种方法称为"
+"<emphasis>embedded(嵌入式)</emphasis>的组合标识符,在重要的应用中不鼓励使用"
+"这种用法。"
 
-#: index.docbook:965
-msgid "A second approach is what we call a <emphasis>mapped</emphasis> composite identifier, where the identifier properties named inside the <literal>&lt;composite-id&gt;</literal> element are duplicated on both the persistent class and a separate identifier class."
+#. Tag: para
+#: basic_mapping.xml:965
+#, no-c-format
+msgid ""
+"A second approach is what we call a <emphasis>mapped</emphasis> composite "
+"identifier, where the identifier properties named inside the <literal>&lt;"
+"composite-id&gt;</literal> element are duplicated on both the persistent "
+"class and a separate identifier class."
 msgstr ""
+"第二种方法我们称为<emphasis>mapped(映射式)</emphasis>组合标识符 (mapped "
+"composite identifier),<literal>&lt;composite-id&gt;</literal>元素中列出的标识"
+"属性不但在持久化类出现,还形成一个独立的标识符类。"
 
-#: index.docbook:971
+#. Tag: programlisting
+#: basic_mapping.xml:971
+#, no-c-format
 msgid ""
-      "<![CDATA[<composite-id class=\"MedicareId\" mapped=\"true\">\n"
-      "        <key-property name=\"medicareNumber\"/>\n"
-      "        <key-property name=\"dependent\"/>\n"
-      "</composite-id>]]>"
+"<![CDATA[<composite-id class=\"MedicareId\" mapped=\"true\">\n"
+"        <key-property name=\"medicareNumber\"/>\n"
+"        <key-property name=\"dependent\"/>\n"
+"</composite-id>]]>"
 msgstr ""
 
-#: index.docbook:973
-msgid "In this example, both the composite identifier class, <literal>MedicareId</literal>, and the entity class itself have properties named <literal>medicareNumber</literal> and <literal>dependent</literal>. The identifier class must override <literal>equals()</literal> and <literal>hashCode()</literal> and implement. <literal>Serializable</literal>. The disadvantage of this approach is quite obvious&mdash;code duplication."
+#. Tag: para
+#: basic_mapping.xml:973
+#, no-c-format
+msgid ""
+"In this example, both the composite identifier class, <literal>MedicareId</"
+"literal>, and the entity class itself have properties named "
+"<literal>medicareNumber</literal> and <literal>dependent</literal>. The "
+"identifier class must override <literal>equals()</literal> and "
+"<literal>hashCode()</literal> and implement. <literal>Serializable</"
+"literal>. The disadvantage of this approach is quite obvious&mdash;code "
+"duplication."
 msgstr ""
+"在这个例子中,组合标识符类<literal>MedicareId</literal>和实体类都含有"
+"<literal>medicareNumber</literal>和<literal>dependent</literal>属性。标识符类"
+"必须重载<literal>equals()</literal>和<literal>hashCode()</literal>并且实现"
+"<literal>Serializable</literal>接口。这种方法的缺点是出现了明显的代码重复。"
 
-#: index.docbook:982
-msgid "The following attributes are used to specify a mapped composite identifier:"
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:982
+#, no-c-format
+msgid ""
+"The following attributes are used to specify a mapped composite identifier:"
+msgstr "下面列出的属性是用来指定一个映射式组合标识符的:"
 
-#: index.docbook:988
-msgid "<literal>mapped</literal> (optional, defaults to <literal>false</literal>): indicates that a mapped composite identifier is used, and that the contained property mappings refer to both the entity class and the composite identifier class."
+#. Tag: para
+#: basic_mapping.xml:988
+#, no-c-format
+msgid ""
+"<literal>mapped</literal> (optional, defaults to <literal>false</literal>): "
+"indicates that a mapped composite identifier is used, and that the contained "
+"property mappings refer to both the entity class and the composite "
+"identifier class."
 msgstr ""
+"<literal>mapped</literal> (可选, 默认为<literal>false</literal>): 指明使用一"
+"个映射式组合标识符,其包含的属性映射同时在实体类和组合标识符类中出现。"
 
-#: index.docbook:996
-msgid "<literal>class</literal> (optional, but required for a mapped composite identifier): The class used as a composite identifier."
+#. Tag: para
+#: basic_mapping.xml:996
+#, no-c-format
+msgid ""
+"<literal>class</literal> (optional, but required for a mapped composite "
+"identifier): The class used as a composite identifier."
 msgstr ""
+"<literal>class</literal> (可选,但对映射式组合标识符必须指定): 作为组合标识符"
+"类使用的类名."
 
-#: index.docbook:1003
-msgid "We will describe a third, even more convenient approach where the composite identifier is implemented as a component class in <xref linkend=\"components-compositeid\"/>. The attributes described below apply only to this alternative approach:"
+#. Tag: para
+#: basic_mapping.xml:1003
+#, no-c-format
+msgid ""
+"We will describe a third, even more convenient approach where the composite "
+"identifier is implemented as a component class in <xref linkend=\"components-"
+"compositeid\"/>. The attributes described below apply only to this "
+"alternative approach:"
 msgstr ""
+"在<xref linkend=\"components-compositeid\"/>一节中,我们会描述第三种方式,那就"
+"是把组合标识符实现为一个组件(component)类,这是更方便的方法。下面的属性仅对第"
+"三种方法有效:"
 
-#: index.docbook:1011
-msgid "<literal>name</literal> (optional, required for this approach): A property of component type that holds the composite identifier (see chapter 9)."
+#. Tag: para
+#: basic_mapping.xml:1011
+#, no-c-format
+msgid ""
+"<literal>name</literal> (optional, required for this approach): A property "
+"of component type that holds the composite identifier (see chapter 9)."
 msgstr ""
+"<literal>name</literal> (可选,但对这种方法而言必须): 包含此组件标识符的组件类"
+"型的名字 (参阅第9章)."
 
-#: index.docbook:1023
-msgid "<literal>class</literal> (optional - defaults to the property type determined by reflection): The component class used as a composite identifier (see next section)."
+#. Tag: para
+#: basic_mapping.xml:1023
+#, no-c-format
+msgid ""
+"<literal>class</literal> (optional - defaults to the property type "
+"determined by reflection): The component class used as a composite "
+"identifier (see next section)."
 msgstr ""
+"<literal>class</literal> (可选 - 默认会用反射来自动判定属性类型 ): 用来作为组"
+"合标识符的组件类的类名(参阅下一节)"
 
-#: index.docbook:1030
-msgid "This third approach, an <emphasis>identifier component</emphasis> is the one we recommend for almost all applications."
+#. Tag: para
+#: basic_mapping.xml:1030
+#, no-c-format
+msgid ""
+"This third approach, an <emphasis>identifier component</emphasis> is the one "
+"we recommend for almost all applications."
 msgstr ""
+"第三种方式,被称为<emphasis>identifier component(标识符组件)</emphasis>是我们"
+"对几乎所有应用都推荐使用的方式。"
 
-#: index.docbook:1038
+#. Tag: title
+#: basic_mapping.xml:1038
+#, no-c-format
 msgid "discriminator"
-msgstr ""
+msgstr "鉴别器(discriminator)"
 
-#: index.docbook:1040
-msgid "The <literal>&lt;discriminator&gt;</literal> element is required for polymorphic persistence using the table-per-class-hierarchy mapping strategy and declares a discriminator column of the table. The discriminator column contains marker values that tell the persistence layer what subclass to instantiate for a particular row. A restricted set of types may be used: <literal>string</literal>, <literal>character</literal>, <literal>integer</literal>, <literal>byte</literal>, <literal>short</literal>, <literal>boolean</literal>, <literal>yes_no</literal>, <literal>true_false</literal>."
+#. Tag: para
+#: basic_mapping.xml:1040
+#, no-c-format
+msgid ""
+"The <literal>&lt;discriminator&gt;</literal> element is required for "
+"polymorphic persistence using the table-per-class-hierarchy mapping strategy "
+"and declares a discriminator column of the table. The discriminator column "
+"contains marker values that tell the persistence layer what subclass to "
+"instantiate for a particular row. A restricted set of types may be used: "
+"<literal>string</literal>, <literal>character</literal>, <literal>integer</"
+"literal>, <literal>byte</literal>, <literal>short</literal>, "
+"<literal>boolean</literal>, <literal>yes_no</literal>, <literal>true_false</"
+"literal>."
 msgstr ""
+"在\"一棵对象继承树对应一个表\"的策略中,<literal>&lt;discriminator&gt;</"
+"literal>元素是必需的, 它定义了表的鉴别器字段。鉴别器字段包含标志值,用于告知"
+"持久化层应该为某个特定的行创建哪一个子类的实例。 如下这些受到限制的类型可以使"
+"用: <literal>string</literal>, <literal>character</literal>, "
+"<literal>integer</literal>, <literal>byte</literal>, <literal>short</"
+"literal>, <literal>boolean</literal>, <literal>yes_no</literal>, "
+"<literal>true_false</literal>."
 
-#: index.docbook:1058
+#. Tag: programlisting
+#: basic_mapping.xml:1058
+#, no-c-format
 msgid ""
-      "<![CDATA[<discriminator\n"
-      "        column=\"discriminator_column\"\n"
-      "        type=\"discriminator_type\"\n"
-      "        force=\"true|false\"\n"
-      "        insert=\"true|false\"\n"
-      "        formula=\"arbitrary sql expression\"\n"
-      "/>]]>"
+"<![CDATA[<discriminator\n"
+"        column=\"discriminator_column\"\n"
+"        type=\"discriminator_type\"\n"
+"        force=\"true|false\"\n"
+"        insert=\"true|false\"\n"
+"        formula=\"arbitrary sql expression\"\n"
+"/>]]>"
 msgstr ""
 
-#: index.docbook:1061
-msgid "<literal>column</literal> (optional - defaults to <literal>class</literal>) the name of the discriminator column."
+#. Tag: para
+#: basic_mapping.xml:1061
+#, no-c-format
+msgid ""
+"<literal>column</literal> (optional - defaults to <literal>class</literal>) "
+"the name of the discriminator column."
 msgstr ""
+"<literal>column</literal> (可选 - 默认为 <literal>class</literal>) 鉴别器字段"
+"的名字"
 
-#: index.docbook:1067
-msgid "<literal>type</literal> (optional - defaults to <literal>string</literal>) a name that indicates the Hibernate type"
+#. Tag: para
+#: basic_mapping.xml:1067
+#, no-c-format
+msgid ""
+"<literal>type</literal> (optional - defaults to <literal>string</literal>) a "
+"name that indicates the Hibernate type"
 msgstr ""
+"<literal>type</literal> (可选 - 默认为 <literal>string</literal>) 一个"
+"Hibernate字段类型的名字"
 
-#: index.docbook:1073
-msgid "<literal>force</literal> (optional - defaults to <literal>false</literal>) \"force\" Hibernate to specify allowed discriminator values even when retrieving all instances of the root class."
+#. Tag: para
+#: basic_mapping.xml:1073
+#, no-c-format
+msgid ""
+"<literal>force</literal> (optional - defaults to <literal>false</literal>) "
+"\"force\" Hibernate to specify allowed discriminator values even when "
+"retrieving all instances of the root class."
 msgstr ""
+"<literal>force(强制)</literal> (可选 - 默认为 <literal>false</literal>) \"强"
+"制\"Hibernate指定允许的鉴别器值,即使当取得的所有实例都是根类的。"
 
-#: index.docbook:1080
-msgid "<literal>insert</literal> (optional - defaults to <literal>true</literal>) set this to <literal>false</literal> if your discriminator column is also part of a mapped composite identifier. (Tells Hibernate to not include the column in SQL <literal>INSERT</literal>s.)"
+#. Tag: para
+#: basic_mapping.xml:1080
+#, no-c-format
+msgid ""
+"<literal>insert</literal> (optional - defaults to <literal>true</literal>) "
+"set this to <literal>false</literal> if your discriminator column is also "
+"part of a mapped composite identifier. (Tells Hibernate to not include the "
+"column in SQL <literal>INSERT</literal>s.)"
 msgstr ""
+"<literal>insert</literal> (可选 - 默认为<literal>true</literal>) 如果你的鉴别"
+"器字段也是映射为复合标识(composite identifier)的一部分,则需将 这个值设为"
+"<literal>false</literal>。(告诉Hibernate在做SQL <literal>INSERT</literal> 时"
+"不包含该列)"
 
-#: index.docbook:1088
-msgid "<literal>formula</literal> (optional) an arbitrary SQL expression that is executed when a type has to be evaluated. Allows content-based discrimination."
+#. Tag: para
+#: basic_mapping.xml:1088
+#, no-c-format
+msgid ""
+"<literal>formula</literal> (optional) an arbitrary SQL expression that is "
+"executed when a type has to be evaluated. Allows content-based "
+"discrimination."
 msgstr ""
+"<literal>formula</literal> (可选) 一个SQL表达式,在类型判断(判断是父类还是具"
+"体子类-译注)时执行。可用于基于内容的鉴别器。"
 
-#: index.docbook:1096
-msgid "Actual values of the discriminator column are specified by the <literal>discriminator-value</literal> attribute of the <literal>&lt;class&gt;</literal> and <literal>&lt;subclass&gt;</literal> elements."
+#. Tag: para
+#: basic_mapping.xml:1096
+#, no-c-format
+msgid ""
+"Actual values of the discriminator column are specified by the "
+"<literal>discriminator-value</literal> attribute of the <literal>&lt;"
+"class&gt;</literal> and <literal>&lt;subclass&gt;</literal> elements."
 msgstr ""
+"鉴别器字段的实际值是根据<literal>&lt;class&gt;</literal>和<literal>&lt;"
+"subclass&gt;</literal>元素中 的<literal>discriminator-value</literal>属性得来"
+"的。"
 
-#: index.docbook:1102
-msgid "The <literal>force</literal> attribute is (only) useful if the table contains rows with \"extra\" discriminator values that are not mapped to a persistent class. This will not usually be the case."
+#. Tag: para
+#: basic_mapping.xml:1102
+#, no-c-format
+msgid ""
+"The <literal>force</literal> attribute is (only) useful if the table "
+"contains rows with \"extra\" discriminator values that are not mapped to a "
+"persistent class. This will not usually be the case."
 msgstr ""
+"<literal>force</literal>属性仅仅在这种情况下有用的:表中包含没有被映射到持久"
+"化类的附加辨别器值。 这种情况不会经常遇到。"
 
-#: index.docbook:1108
-msgid "Using the <literal>formula</literal> attribute you can declare an arbitrary SQL expression that will be used to evaluate the type of a row:"
+#. Tag: para
+#: basic_mapping.xml:1108
+#, no-c-format
+msgid ""
+"Using the <literal>formula</literal> attribute you can declare an arbitrary "
+"SQL expression that will be used to evaluate the type of a row:"
 msgstr ""
+"使用<literal>formula</literal>属性你可以定义一个SQL表达式,用来判断一个行数据"
+"的类型。"
 
-#: index.docbook:1113
+#. Tag: programlisting
+#: basic_mapping.xml:1113
+#, no-c-format
 msgid ""
-      "<![CDATA[<discriminator\n"
-      "    formula=\"case when CLASS_TYPE in ('a', 'b', 'c') then 0 else 1 end\"\n"
-      "    type=\"integer\"/>]]>"
+"<![CDATA[<discriminator\n"
+"    formula=\"case when CLASS_TYPE in ('a', 'b', 'c') then 0 else 1 end\"\n"
+"    type=\"integer\"/>]]>"
 msgstr ""
 
-#: index.docbook:1118
+#. Tag: title
+#: basic_mapping.xml:1118
+#, no-c-format
 msgid "version (optional)"
-msgstr ""
+msgstr "版本(version)(可选)"
 
-#: index.docbook:1120
-msgid "The <literal>&lt;version&gt;</literal> element is optional and indicates that the table contains versioned data. This is particularly useful if you plan to use <emphasis>long transactions</emphasis> (see below)."
+#. Tag: para
+#: basic_mapping.xml:1120
+#, no-c-format
+msgid ""
+"The <literal>&lt;version&gt;</literal> element is optional and indicates "
+"that the table contains versioned data. This is particularly useful if you "
+"plan to use <emphasis>long transactions</emphasis> (see below)."
 msgstr ""
+"<literal>&lt;version&gt;</literal>元素是可选的,表明表中包含附带版本信息的数"
+"据。 这在你准备使用<emphasis> 长事务(long transactions)</emphasis>的时候特"
+"别有用。(见后)"
 
-#: index.docbook:1136
+#. Tag: programlisting
+#: basic_mapping.xml:1136
+#, no-c-format
 msgid ""
-      "<![CDATA[<version\n"
-      "        column=\"version_column\"\n"
-      "        name=\"propertyName\"\n"
-      "        type=\"typename\"\n"
-      "        access=\"field|property|ClassName\"\n"
-      "        unsaved-value=\"null|negative|undefined\"\n"
-      "        generated=\"never|always\"\n"
-      "        insert=\"true|false\"\n"
-      "        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
-      "/>]]>"
+"<![CDATA[<version\n"
+"        column=\"version_column\"\n"
+"        name=\"propertyName\"\n"
+"        type=\"typename\"\n"
+"        access=\"field|property|ClassName\"\n"
+"        unsaved-value=\"null|negative|undefined\"\n"
+"        generated=\"never|always\"\n"
+"        insert=\"true|false\"\n"
+"        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
+"/>]]>"
 msgstr ""
 
-#: index.docbook:1139
-msgid "<literal>column</literal> (optional - defaults to the property name): The name of the column holding the version number."
+#. Tag: para
+#: basic_mapping.xml:1139
+#, no-c-format
+msgid ""
+"<literal>column</literal> (optional - defaults to the property name): The "
+"name of the column holding the version number."
 msgstr ""
+"<literal>column</literal> (可选 - 默认为属性名): 指定持有版本号的字段名。"
 
-#: index.docbook:1145
-msgid "<literal>name</literal>: The name of a property of the persistent class."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:1145
+#, no-c-format
+msgid ""
+"<literal>name</literal>: The name of a property of the persistent class."
+msgstr "<literal>name</literal>: 持久化类的属性名。"
 
-#: index.docbook:1150
-msgid "<literal>type</literal> (optional - defaults to <literal>integer</literal>): The type of the version number."
+#. Tag: para
+#: basic_mapping.xml:1150
+#, no-c-format
+msgid ""
+"<literal>type</literal> (optional - defaults to <literal>integer</literal>): "
+"The type of the version number."
 msgstr ""
+"<literal>type</literal> (可选 - 默认是 <literal>integer</literal>): 版本号的"
+"类型。"
 
-#: index.docbook:1162
-msgid "<literal>unsaved-value</literal> (optional - defaults to <literal>undefined</literal>): A version property value that indicates that an instance is newly instantiated (unsaved), distinguishing it from detached instances that were saved or loaded in a previous session. (<literal>undefined</literal> specifies that the identifier property value should be used.)"
+#. Tag: para
+#: basic_mapping.xml:1162
+#, no-c-format
+msgid ""
+"<literal>unsaved-value</literal> (optional - defaults to <literal>undefined</"
+"literal>): A version property value that indicates that an instance is newly "
+"instantiated (unsaved), distinguishing it from detached instances that were "
+"saved or loaded in a previous session. (<literal>undefined</literal> "
+"specifies that the identifier property value should be used.)"
 msgstr ""
+"<literal>unsaved-value</literal> (可选 - 默认是<literal>undefined</"
+"literal>): 用于标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值"
+"就可以把这种情况 和已经在先前的session中保存或装载的脱管(detached)实例区分"
+"开来。 (<literal>undefined</literal>指明应被使用的标识属性值。)"
 
-#: index.docbook:1171
-msgid "<literal>generated</literal> (optional - defaults to <literal>never</literal>): Specifies that this version property value is actually generated by the database. See the discussion of <xref linkend=\"mapping-generated\"/>generated properties."
+#. Tag: para
+#: basic_mapping.xml:1171
+#, fuzzy, no-c-format
+msgid ""
+"<literal>generated</literal> (optional - defaults to <literal>never</"
+"literal>): Specifies that this version property value is actually generated "
+"by the database. See the discussion of <xref linkend=\"mapping-generated\"/"
+">generated properties."
 msgstr ""
+"<literal>generated</literal> (可选 - 默认是 <literal>never</literal>): 表明此"
+"版本属性值是否实际上是由数据库生成的。请参阅<xref linkend=\"mapping-generated"
+"\">generated properties</xref>部分的讨论。"
 
-#: index.docbook:1178
-msgid "<literal>insert</literal> (optional - defaults to <literal>true</literal>): Specifies whether the version column should be included in SQL insert statements. May be set to <literal>false</literal> if and only if the database column is defined with a default value of <literal>0</literal>."
+#. Tag: para
+#: basic_mapping.xml:1178
+#, no-c-format
+msgid ""
+"<literal>insert</literal> (optional - defaults to <literal>true</literal>): "
+"Specifies whether the version column should be included in SQL insert "
+"statements. May be set to <literal>false</literal> if and only if the "
+"database column is defined with a default value of <literal>0</literal>."
 msgstr ""
+"<literal>insert</literal> (可选 - 默认是 <literal>true</literal>): 表明此版本"
+"列应该包含在SQL插入语句中。只有当数据库字段有默认值<literal>0</literal>的时"
+"候,才可以设置为<literal>false</literal>。"
 
-#: index.docbook:1188
-msgid "Version numbers may be of Hibernate type <literal>long</literal>, <literal>integer</literal>, <literal>short</literal>, <literal>timestamp</literal> or <literal>calendar</literal>."
+#. Tag: para
+#: basic_mapping.xml:1188
+#, no-c-format
+msgid ""
+"Version numbers may be of Hibernate type <literal>long</literal>, "
+"<literal>integer</literal>, <literal>short</literal>, <literal>timestamp</"
+"literal> or <literal>calendar</literal>."
 msgstr ""
+"版本号必须是以下类型:<literal>long</literal>, <literal>integer</literal>, "
+"<literal>short</literal>, <literal>timestamp</literal>或者<literal>calendar</"
+"literal>。"
 
-#: index.docbook:1193
-msgid "A version or timestamp property should never be null for a detached instance, so Hibernate will detect any instance with a null version or timestamp as transient, no matter what other <literal>unsaved-value</literal> strategies are specified. <emphasis>Declaring a nullable version or timestamp property is an easy way to avoid any problems with transitive reattachment in Hibernate, especially useful for people using assigned identifiers or composite keys!</emphasis>"
+#. Tag: para
+#: basic_mapping.xml:1193
+#, no-c-format
+msgid ""
+"A version or timestamp property should never be null for a detached "
+"instance, so Hibernate will detect any instance with a null version or "
+"timestamp as transient, no matter what other <literal>unsaved-value</"
+"literal> strategies are specified. <emphasis>Declaring a nullable version or "
+"timestamp property is an easy way to avoid any problems with transitive "
+"reattachment in Hibernate, especially useful for people using assigned "
+"identifiers or composite keys!</emphasis>"
 msgstr ""
+"一个脱管(detached)实例的version或timestamp属性不能为空(null),因为"
+"Hibernate不管 <literal>unsaved-value</literal>被指定为何种策略,它将任何属性"
+"为空的version或timestamp 实例看作为瞬时(transient)实例。 <emphasis>避免"
+"Hibernate中的传递重附(transitive reattachment)问题的一个简单方法是 定义一个"
+"不能为空的version或timestamp属性,特别是在人们使用程序分配的标识符(assigned "
+"identifiers) 或复合主键时非常有用!</emphasis>"
 
-#: index.docbook:1204
+#. Tag: title
+#: basic_mapping.xml:1204
+#, no-c-format
 msgid "timestamp (optional)"
-msgstr ""
+msgstr "timestamp (可选)"
 
-#: index.docbook:1206
-msgid "The optional <literal>&lt;timestamp&gt;</literal> element indicates that the table contains timestamped data. This is intended as an alternative to versioning. Timestamps are by nature a less safe implementation of optimistic locking. However, sometimes the application might use the timestamps in other ways."
+#. Tag: para
+#: basic_mapping.xml:1206
+#, no-c-format
+msgid ""
+"The optional <literal>&lt;timestamp&gt;</literal> element indicates that the "
+"table contains timestamped data. This is intended as an alternative to "
+"versioning. Timestamps are by nature a less safe implementation of "
+"optimistic locking. However, sometimes the application might use the "
+"timestamps in other ways."
 msgstr ""
+"可选的<literal>&lt;timestamp&gt;</literal>元素指明了表中包含时间戳数据。 这用"
+"来作为版本的替代。时间戳本质上是一种对乐观锁定的一种不是特别安全的实现。当"
+"然, 有时候应用程序可能在其他方面使用时间戳。"
 
-#: index.docbook:1222
+#. Tag: programlisting
+#: basic_mapping.xml:1222
+#, no-c-format
 msgid ""
-      "<![CDATA[<timestamp\n"
-      "        column=\"timestamp_column\"\n"
-      "        name=\"propertyName\"\n"
-      "        access=\"field|property|ClassName\"\n"
-      "        unsaved-value=\"null|undefined\"\n"
-      "        source=\"vm|db\"\n"
-      "        generated=\"never|always\"\n"
-      "        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
-      "/>]]>"
+"<![CDATA[<timestamp\n"
+"        column=\"timestamp_column\"\n"
+"        name=\"propertyName\"\n"
+"        access=\"field|property|ClassName\"\n"
+"        unsaved-value=\"null|undefined\"\n"
+"        source=\"vm|db\"\n"
+"        generated=\"never|always\"\n"
+"        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
+"/>]]>"
 msgstr ""
 
-#: index.docbook:1225
-msgid "<literal>column</literal> (optional - defaults to the property name): The name of a column holding the timestamp."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:1225
+#, no-c-format
+msgid ""
+"<literal>column</literal> (optional - defaults to the property name): The "
+"name of a column holding the timestamp."
+msgstr "<literal>column</literal> (可选 - 默认为属性名): 持有时间戳的字段名。"
 
-#: index.docbook:1231
-msgid "<literal>name</literal>: The name of a JavaBeans style property of Java type <literal>Date</literal> or <literal>Timestamp</literal> of the persistent class."
+#. Tag: para
+#: basic_mapping.xml:1231
+#, no-c-format
+msgid ""
+"<literal>name</literal>: The name of a JavaBeans style property of Java type "
+"<literal>Date</literal> or <literal>Timestamp</literal> of the persistent "
+"class."
 msgstr ""
+"<literal>name</literal>: 在持久化类中的JavaBeans风格的属性名, 其Java类型是 "
+"<literal>Date</literal> 或者 <literal>Timestamp</literal>的。"
 
-#: index.docbook:1244
-msgid "<literal>unsaved-value</literal> (optional - defaults to <literal>null</literal>): A version property value that indicates that an instance is newly instantiated (unsaved), distinguishing it from detached instances that were saved or loaded in a previous session. (<literal>undefined</literal> specifies that the identifier property value should be used.)"
+#. Tag: para
+#: basic_mapping.xml:1244
+#, no-c-format
+msgid ""
+"<literal>unsaved-value</literal> (optional - defaults to <literal>null</"
+"literal>): A version property value that indicates that an instance is newly "
+"instantiated (unsaved), distinguishing it from detached instances that were "
+"saved or loaded in a previous session. (<literal>undefined</literal> "
+"specifies that the identifier property value should be used.)"
 msgstr ""
+"<literal>unsaved-value</literal> (可选 - 默认是<literal>null</literal>): 用于"
+"标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值就可以把这种情"
+"况和 已经在先前的session中保存或装载的脱管(detached)实例区分开来。"
+"(<literal>undefined</literal> 指明使用标识属性值进行这种判断。)"
 
-#: index.docbook:1253
-msgid "<literal>source</literal> (optional - defaults to <literal>vm</literal>): From where should Hibernate retrieve the timestamp value? From the database, or from the current JVM? Database-based timestamps incur an overhead because Hibernate must hit the database in order to determine the \"next value\", but will be safer for use in clustered environments. Note also, that not all <literal>Dialect</literal>s are known to support retrieving of the database's current timestamp, while others might be unsafe for usage in locking due to lack of precision (Oracle 8 for example)."
+#. Tag: para
+#: basic_mapping.xml:1253
+#, no-c-format
+msgid ""
+"<literal>source</literal> (optional - defaults to <literal>vm</literal>): "
+"From where should Hibernate retrieve the timestamp value? From the database, "
+"or from the current JVM? Database-based timestamps incur an overhead because "
+"Hibernate must hit the database in order to determine the \"next value\", "
+"but will be safer for use in clustered environments. Note also, that not all "
+"<literal>Dialect</literal>s are known to support retrieving of the "
+"database's current timestamp, while others might be unsafe for usage in "
+"locking due to lack of precision (Oracle 8 for example)."
 msgstr ""
+"<literal>source</literal> (可选 - 默认是 <literal>vm</literal>): Hibernate如"
+"何才能获取到时间戳的值呢?从数据库,还是当前JVM?从数据库获取会带来一些负担,"
+"因为Hibernate必须访问数据库来获得“下一个值”,但是在集群环境中会更安全些。还要"
+"注意,并不是所有的<literal>Dialect(方言)</literal>都支持获得数据库的当前时"
+"间戳的,而支持的数据库中又有一部分因为精度不足,用于锁定是不安全的(例如"
+"Oracle 8)。"
 
-#: index.docbook:1265
-msgid "<literal>generated</literal> (optional - defaults to <literal>never</literal>): Specifies that this timestamp property value is actually generated by the database. See the discussion of <xref linkend=\"mapping-generated\"/>generated properties."
+#. Tag: para
+#: basic_mapping.xml:1265
+#, fuzzy, no-c-format
+msgid ""
+"<literal>generated</literal> (optional - defaults to <literal>never</"
+"literal>): Specifies that this timestamp property value is actually "
+"generated by the database. See the discussion of <xref linkend=\"mapping-"
+"generated\"/>generated properties."
 msgstr ""
+"<literal>generated</literal> (可选 - 默认是 <literal>never</literal>): 指出时"
+"间戳值是否实际上是由数据库生成的.请参阅<xref linkend=\"mapping-generated"
+"\">generated properties</xref>的讨论。"
 
-#: index.docbook:1274
-msgid "Note that <literal>&lt;timestamp&gt;</literal> is equivalent to <literal>&lt;version type=\"timestamp\"&gt;</literal>. And <literal>&lt;timestamp source=\"db\"&gt;</literal> is equivalent to <literal>&lt;version type=\"dbtimestamp\"&gt;</literal>"
+#. Tag: para
+#: basic_mapping.xml:1274
+#, no-c-format
+msgid ""
+"Note that <literal>&lt;timestamp&gt;</literal> is equivalent to <literal>&lt;"
+"version type=\"timestamp\"&gt;</literal>. And <literal>&lt;timestamp source="
+"\"db\"&gt;</literal> is equivalent to <literal>&lt;version type=\"dbtimestamp"
+"\"&gt;</literal>"
 msgstr ""
+"注意,<literal>&lt;timestamp&gt;</literal> 和<literal>&lt;version type="
+"\"timestamp\"&gt;</literal>是等价的。并且<literal>&lt;timestamp source=\"db"
+"\"&gt;</literal>和<literal>&lt;version type=\"dbtimestamp\"&gt;</literal>是等"
+"价的。"
 
-#: index.docbook:1284
+#. Tag: title
+#: basic_mapping.xml:1284
+#, no-c-format
 msgid "property"
-msgstr ""
+msgstr "property"
 
-#: index.docbook:1286
-msgid "The <literal>&lt;property&gt;</literal> element declares a persistent, JavaBean style property of the class."
+#. Tag: para
+#: basic_mapping.xml:1286
+#, no-c-format
+msgid ""
+"The <literal>&lt;property&gt;</literal> element declares a persistent, "
+"JavaBean style property of the class."
 msgstr ""
+"<literal>&lt;property&gt;</literal>元素为类定义了一个持久化的,JavaBean风格的"
+"属性。"
 
-#: index.docbook:1308
+#. Tag: programlisting
+#: basic_mapping.xml:1308
+#, no-c-format
 msgid ""
-      "<![CDATA[<property\n"
-      "        name=\"propertyName\"\n"
-      "        column=\"column_name\"\n"
-      "        type=\"typename\"\n"
-      "        update=\"true|false\"\n"
-      "        insert=\"true|false\"\n"
-      "        formula=\"arbitrary SQL expression\"\n"
-      "        access=\"field|property|ClassName\"\n"
-      "        lazy=\"true|false\"\n"
-      "        unique=\"true|false\"\n"
-      "        not-null=\"true|false\"\n"
-      "        optimistic-lock=\"true|false\"\n"
-      "        generated=\"never|insert|always\"\n"
-      "        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
-      "        index=\"index_name\"\n"
-      "        unique_key=\"unique_key_id\"\n"
-      "        length=\"L\"\n"
-      "        precision=\"P\"\n"
-      "        scale=\"S\"\n"
-      "/>]]>"
+"<![CDATA[<property\n"
+"        name=\"propertyName\"\n"
+"        column=\"column_name\"\n"
+"        type=\"typename\"\n"
+"        update=\"true|false\"\n"
+"        insert=\"true|false\"\n"
+"        formula=\"arbitrary SQL expression\"\n"
+"        access=\"field|property|ClassName\"\n"
+"        lazy=\"true|false\"\n"
+"        unique=\"true|false\"\n"
+"        not-null=\"true|false\"\n"
+"        optimistic-lock=\"true|false\"\n"
+"        generated=\"never|insert|always\"\n"
+"        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
+"        index=\"index_name\"\n"
+"        unique_key=\"unique_key_id\"\n"
+"        length=\"L\"\n"
+"        precision=\"P\"\n"
+"        scale=\"S\"\n"
+"/>]]>"
 msgstr ""
 
-#: index.docbook:1311
-msgid "<literal>name</literal>: the name of the property, with an initial lowercase letter."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:1311
+#, no-c-format
+msgid ""
+"<literal>name</literal>: the name of the property, with an initial lowercase "
+"letter."
+msgstr "<literal>name</literal>: 属性的名字,以小写字母开头。"
 
-#: index.docbook:1317
-msgid "<literal>column</literal> (optional - defaults to the property name): the name of the mapped database table column. This may also be specified by nested <literal>&lt;column&gt;</literal> element(s)."
+#. Tag: para
+#: basic_mapping.xml:1317
+#, no-c-format
+msgid ""
+"<literal>column</literal> (optional - defaults to the property name): the "
+"name of the mapped database table column. This may also be specified by "
+"nested <literal>&lt;column&gt;</literal> element(s)."
 msgstr ""
+"<literal>column</literal> (可选 - 默认为属性名字): 对应的数据库字段名。 也可"
+"以通过嵌套的<literal>&lt;column&gt;</literal>元素指定。"
 
-#: index.docbook:1324
-msgid "<literal>type</literal> (optional): a name that indicates the Hibernate type."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:1324
+#, no-c-format
+msgid ""
+"<literal>type</literal> (optional): a name that indicates the Hibernate type."
+msgstr "<literal>type</literal> (可选): 一个Hibernate类型的名字。"
 
-#: index.docbook:1329
-msgid "<literal>update, insert</literal> (optional - defaults to <literal>true</literal>) : specifies that the mapped columns should be included in SQL <literal>UPDATE</literal> and/or <literal>INSERT</literal> statements. Setting both to <literal>false</literal> allows a pure \"derived\" property whose value is initialized from some other property that maps to the same colum(s) or by a trigger or other application."
+#. Tag: para
+#: basic_mapping.xml:1329
+#, no-c-format
+msgid ""
+"<literal>update, insert</literal> (optional - defaults to <literal>true</"
+"literal>) : specifies that the mapped columns should be included in SQL "
+"<literal>UPDATE</literal> and/or <literal>INSERT</literal> statements. "
+"Setting both to <literal>false</literal> allows a pure \"derived\" property "
+"whose value is initialized from some other property that maps to the same "
+"colum(s) or by a trigger or other application."
 msgstr ""
+"<literal>update, insert</literal> (可选 - 默认为 <literal>true</literal>) : "
+"表明用于<literal>UPDATE</literal> 和/或 <literal>INSERT</literal> 的SQL语句中"
+"是否包含这个被映射了的字段。这二者如果都设置为<literal>false</literal> 则表明"
+"这是一个“外源性(derived)”的属性,它的值来源于映射到同一个(或多个) 字段的"
+"某些其他属性,或者通过一个trigger(触发器)或其他程序生成。"
 
-#: index.docbook:1338
-msgid "<literal>formula</literal> (optional): an SQL expression that defines the value for a <emphasis>computed</emphasis> property. Computed properties do not have a column mapping of their own."
+#. Tag: para
+#: basic_mapping.xml:1338
+#, no-c-format
+msgid ""
+"<literal>formula</literal> (optional): an SQL expression that defines the "
+"value for a <emphasis>computed</emphasis> property. Computed properties do "
+"not have a column mapping of their own."
 msgstr ""
+"<literal>formula</literal> (可选): 一个SQL表达式,定义了这个<emphasis>计算 "
+"(computed)</emphasis> 属性的值。计算属性没有和它对应的数据库字段。"
 
-#: index.docbook:1351
-msgid "<literal>lazy</literal> (optional - defaults to <literal>false</literal>): Specifies that this property should be fetched lazily when the instance variable is first accessed (requires build-time bytecode instrumentation)."
+#. Tag: para
+#: basic_mapping.xml:1351
+#, no-c-format
+msgid ""
+"<literal>lazy</literal> (optional - defaults to <literal>false</literal>): "
+"Specifies that this property should be fetched lazily when the instance "
+"variable is first accessed (requires build-time bytecode instrumentation)."
 msgstr ""
+"<literal>lazy</literal> (可选 - 默认为 <literal>false</literal>): 指定 指定实"
+"例变量第一次被访问时,这个属性是否延迟抓取(fetched lazily)( 需要运行时字节"
+"码增强)。"
 
-#: index.docbook:1358
-msgid "<literal>unique</literal> (optional): Enable the DDL generation of a unique constraint for the columns. Also, allow this to be the target of a <literal>property-ref</literal>."
+#. Tag: para
+#: basic_mapping.xml:1358
+#, no-c-format
+msgid ""
+"<literal>unique</literal> (optional): Enable the DDL generation of a unique "
+"constraint for the columns. Also, allow this to be the target of a "
+"<literal>property-ref</literal>."
 msgstr ""
+"<literal>unique</literal> (可选): 使用DDL为该字段添加唯一的约束。 同样,允许"
+"它作为<literal>property-ref</literal>引用的目标。"
 
-#: index.docbook:1365
-msgid "<literal>not-null</literal> (optional): Enable the DDL generation of a nullability constraint for the columns."
+#. Tag: para
+#: basic_mapping.xml:1365
+#, no-c-format
+msgid ""
+"<literal>not-null</literal> (optional): Enable the DDL generation of a "
+"nullability constraint for the columns."
 msgstr ""
+"<literal>not-null</literal> (可选): 使用DDL为该字段添加可否为空"
+"(nullability)的约束。"
 
-#: index.docbook:1371
-msgid "<literal>optimistic-lock</literal> (optional - defaults to <literal>true</literal>): Specifies that updates to this property do or do not require acquisition of the optimistic lock. In other words, determines if a version increment should occur when this property is dirty."
+#. Tag: para
+#: basic_mapping.xml:1371
+#, no-c-format
+msgid ""
+"<literal>optimistic-lock</literal> (optional - defaults to <literal>true</"
+"literal>): Specifies that updates to this property do or do not require "
+"acquisition of the optimistic lock. In other words, determines if a version "
+"increment should occur when this property is dirty."
 msgstr ""
+"<literal>optimistic-lock</literal> (可选 - 默认为 <literal>true</literal>): "
+"指定这个属性在做更新时是否需要获得乐观锁定(optimistic lock)。 换句话说,它"
+"决定这个属性发生脏数据时版本(version)的值是否增长。"
 
-#: index.docbook:1379
-msgid "<literal>generated</literal> (optional - defaults to <literal>never</literal>): Specifies that this property value is actually generated by the database. See the discussion of <xref linkend=\"mapping-generated\"/>generated properties."
+#. Tag: para
+#: basic_mapping.xml:1379
+#, fuzzy, no-c-format
+msgid ""
+"<literal>generated</literal> (optional - defaults to <literal>never</"
+"literal>): Specifies that this property value is actually generated by the "
+"database. See the discussion of <xref linkend=\"mapping-generated\"/"
+">generated properties."
 msgstr ""
+"<literal>generated</literal> (可选 - 默认为 <literal>never</literal>): 表明此"
+"属性值是否实际上是由数据库生成的。请参阅<xref linkend=\"mapping-generated"
+"\">generated properties</xref>的讨论。"
 
-#: index.docbook:1388
+#. Tag: para
+#: basic_mapping.xml:1388
+#, no-c-format
 msgid "<emphasis>typename</emphasis> could be:"
-msgstr ""
+msgstr "<emphasis>typename</emphasis>可以是如下几种:"
 
-#: index.docbook:1394
-msgid "The name of a Hibernate basic type (eg. <literal>integer, string, character, date, timestamp, float, binary, serializable, object, blob</literal>)."
+#. Tag: para
+#: basic_mapping.xml:1394
+#, no-c-format
+msgid ""
+"The name of a Hibernate basic type (eg. <literal>integer, string, character, "
+"date, timestamp, float, binary, serializable, object, blob</literal>)."
 msgstr ""
+"Hibernate基本类型名(比如:<literal>integer, string, character,date, "
+"timestamp, float, binary, serializable, object, blob</literal>)。"
 
-#: index.docbook:1400
-msgid "The name of a Java class with a default basic type (eg. <literal>int, float, char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob</literal>)."
+#. Tag: para
+#: basic_mapping.xml:1400
+#, no-c-format
+msgid ""
+"The name of a Java class with a default basic type (eg. <literal>int, float, "
+"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob</"
+"literal>)."
 msgstr ""
+"一个Java类的名字,这个类属于一种默认基础类型 (比如: <literal>int, float,"
+"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob</"
+"literal>)。"
 
-#: index.docbook:1406
+#. Tag: para
+#: basic_mapping.xml:1406
+#, no-c-format
 msgid "The name of a serializable Java class."
-msgstr ""
+msgstr "一个可以序列化的Java类的名字。"
 
-#: index.docbook:1411
-msgid "The class name of a custom type (eg. <literal>com.illflow.type.MyCustomType</literal>)."
+#. Tag: para
+#: basic_mapping.xml:1411
+#, no-c-format
+msgid ""
+"The class name of a custom type (eg. <literal>com.illflow.type.MyCustomType</"
+"literal>)."
 msgstr ""
+"一个自定义类型的类的名字。(比如: <literal>com.illflow.type.MyCustomType</"
+"literal>)。"
 
-#: index.docbook:1417
-msgid "If you do not specify a type, Hibernate will use reflection upon the named property to take a guess at the correct Hibernate type. Hibernate will try to interpret the name of the return class of the property getter using rules 2, 3, 4 in that order. However, this is not always enough. In certain cases you will still need the <literal>type</literal> attribute. (For example, to distinguish between <literal>Hibernate.DATE</literal> and <literal>Hibernate.TIMESTAMP</literal>, or to specify a custom type.)"
+#. Tag: para
+#: basic_mapping.xml:1417
+#, no-c-format
+msgid ""
+"If you do not specify a type, Hibernate will use reflection upon the named "
+"property to take a guess at the correct Hibernate type. Hibernate will try "
+"to interpret the name of the return class of the property getter using rules "
+"2, 3, 4 in that order. However, this is not always enough. In certain cases "
+"you will still need the <literal>type</literal> attribute. (For example, to "
+"distinguish between <literal>Hibernate.DATE</literal> and <literal>Hibernate."
+"TIMESTAMP</literal>, or to specify a custom type.)"
 msgstr ""
+"如果你没有指定类型,Hibernarte会使用反射来得到这个名字的属性,以此来猜测正确"
+"的Hibernate类型。 Hibernate会按照规则2,3,4的顺序对属性读取器(getter方法)的返"
+"回类进行解释。然而,这还不够。 在某些情况下你仍然需要<literal>type</literal>"
+"属性。(比如,为了区别<literal>Hibernate.DATE</literal> 和<literal>Hibernate."
+"TIMESTAMP</literal>,或者为了指定一个自定义类型。)"
 
-#: index.docbook:1427
-msgid "The <literal>access</literal> attribute lets you control how Hibernate will access the property at runtime. By default, Hibernate will call the property get/set pair. If you specify <literal>access=\"field\"</literal>, Hibernate will bypass the get/set pair and access the field directly, using reflection. You may specify your own strategy for property access by naming a class that implements the interface <literal>org.hibernate.property.PropertyAccessor</literal>."
+#. Tag: para
+#: basic_mapping.xml:1427
+#, no-c-format
+msgid ""
+"The <literal>access</literal> attribute lets you control how Hibernate will "
+"access the property at runtime. By default, Hibernate will call the property "
+"get/set pair. If you specify <literal>access=\"field\"</literal>, Hibernate "
+"will bypass the get/set pair and access the field directly, using "
+"reflection. You may specify your own strategy for property access by naming "
+"a class that implements the interface <literal>org.hibernate.property."
+"PropertyAccessor</literal>."
 msgstr ""
+"<literal>access</literal>属性用来让你控制Hibernate如何在运行时访问属性。在默"
+"认情况下, Hibernate会使用属性的get/set方法对(pair)。如果你指明"
+"<literal>access=\"field\"</literal>, Hibernate会忽略get/set方法对,直接使用反"
+"射来访问成员变量。你也可以指定你自己的策略, 这就需要你自己实现<literal>org."
+"hibernate.property.PropertyAccessor</literal>接口, 再在access中设置你自定义"
+"策略类的名字。"
 
-#: index.docbook:1436
-msgid "An especially powerful feature are derived properties. These properties are by definition read-only, the property value is computed at load time. You declare the computation as a SQL expression, this translates to a <literal>SELECT</literal> clause subquery in the SQL query that loads an instance:"
+#. Tag: para
+#: basic_mapping.xml:1436
+#, no-c-format
+msgid ""
+"An especially powerful feature are derived properties. These properties are "
+"by definition read-only, the property value is computed at load time. You "
+"declare the computation as a SQL expression, this translates to a "
+"<literal>SELECT</literal> clause subquery in the SQL query that loads an "
+"instance:"
 msgstr ""
+"衍生属性(derive propertie)是一个特别强大的特征。这些属性应该定义为只读,属"
+"性值在装载时计算生成。 你用一个SQL表达式生成计算的结果,它会在这个实例转载时"
+"翻译成一个SQL查询的<literal>SELECT</literal> 子查询语句。"
 
-#: index.docbook:1443
+#. Tag: programlisting
+#: basic_mapping.xml:1443
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "<property name=\"totalPrice\"\n"
-      "    formula=\"( SELECT SUM (li.quantity*p.price) FROM LineItem li, Product p\n"
-      "                WHERE li.productId = p.productId\n"
-      "                AND li.customerId = customerId\n"
-      "                AND li.orderNumber = orderNumber )\"/>]]>"
+"<![CDATA[\n"
+"<property name=\"totalPrice\"\n"
+"    formula=\"( SELECT SUM (li.quantity*p.price) FROM LineItem li, Product "
+"p\n"
+"                WHERE li.productId = p.productId\n"
+"                AND li.customerId = customerId\n"
+"                AND li.orderNumber = orderNumber )\"/>]]>"
 msgstr ""
 
-#: index.docbook:1445
-msgid "Note that you can reference the entities own table by not declaring an alias on a particular column (<literal>customerId</literal> in the given example). Also note that you can use the nested <literal>&lt;formula&gt;</literal> mapping element if you don't like to use the attribute."
+#. Tag: para
+#: basic_mapping.xml:1445
+#, no-c-format
+msgid ""
+"Note that you can reference the entities own table by not declaring an alias "
+"on a particular column (<literal>customerId</literal> in the given example). "
+"Also note that you can use the nested <literal>&lt;formula&gt;</literal> "
+"mapping element if you don't like to use the attribute."
 msgstr ""
+"注意,你可以使用实体自己的表,而不用为这个特别的列定义别名( 上面例子中的"
+"<literal>customerId</literal>)。同时注意,如果你不喜欢使用属性, 你可以使用"
+"嵌套的<literal>&lt;formula&gt;</literal>映射元素。"
 
-#: index.docbook:1455
+#. Tag: title
+#: basic_mapping.xml:1455
+#, no-c-format
 msgid "many-to-one"
-msgstr ""
+msgstr "多对一(many-to-one)"
 
-#: index.docbook:1457
-msgid "An ordinary association to another persistent class is declared using a <literal>many-to-one</literal> element. The relational model is a many-to-one association: a foreign key in one table is referencing the primary key column(s) of the target table."
+#. Tag: para
+#: basic_mapping.xml:1457
+#, no-c-format
+msgid ""
+"An ordinary association to another persistent class is declared using a "
+"<literal>many-to-one</literal> element. The relational model is a many-to-"
+"one association: a foreign key in one table is referencing the primary key "
+"column(s) of the target table."
 msgstr ""
+"通过<literal>many-to-one</literal>元素,可以定义一种常见的与另一个持久化类的关"
+"联。 这种关系模型是多对一关联(实际上是一个对象引用-译注):这个表的一个外键"
+"引用目标表的 主键字段。"
 
-#: index.docbook:1485
+#. Tag: programlisting
+#: basic_mapping.xml:1485
+#, no-c-format
 msgid ""
-      "<![CDATA[<many-to-one\n"
-      "        name=\"propertyName\"\n"
-      "        column=\"column_name\"\n"
-      "        class=\"ClassName\"\n"
-      "        cascade=\"cascade_style\"\n"
-      "        fetch=\"join|select\"\n"
-      "        update=\"true|false\"\n"
-      "        insert=\"true|false\"\n"
-      "        property-ref=\"propertyNameFromAssociatedClass\"\n"
-      "        access=\"field|property|ClassName\"\n"
-      "        unique=\"true|false\"\n"
-      "        not-null=\"true|false\"\n"
-      "        optimistic-lock=\"true|false\"\n"
-      "        lazy=\"proxy|no-proxy|false\"\n"
-      "        not-found=\"ignore|exception\"\n"
-      "        entity-name=\"EntityName\"\n"
-      "        formula=\"arbitrary SQL expression\"\n"
-      "        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
-      "        embed-xml=\"true|false\"\n"
-      "        index=\"index_name\"\n"
-      "        unique_key=\"unique_key_id\"\n"
-      "        foreign-key=\"foreign_key_name\"\n"
-      "/>]]>"
+"<![CDATA[<many-to-one\n"
+"        name=\"propertyName\"\n"
+"        column=\"column_name\"\n"
+"        class=\"ClassName\"\n"
+"        cascade=\"cascade_style\"\n"
+"        fetch=\"join|select\"\n"
+"        update=\"true|false\"\n"
+"        insert=\"true|false\"\n"
+"        property-ref=\"propertyNameFromAssociatedClass\"\n"
+"        access=\"field|property|ClassName\"\n"
+"        unique=\"true|false\"\n"
+"        not-null=\"true|false\"\n"
+"        optimistic-lock=\"true|false\"\n"
+"        lazy=\"proxy|no-proxy|false\"\n"
+"        not-found=\"ignore|exception\"\n"
+"        entity-name=\"EntityName\"\n"
+"        formula=\"arbitrary SQL expression\"\n"
+"        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
+"        embed-xml=\"true|false\"\n"
+"        index=\"index_name\"\n"
+"        unique_key=\"unique_key_id\"\n"
+"        foreign-key=\"foreign_key_name\"\n"
+"/>]]>"
 msgstr ""
 
-#: index.docbook:1488, index.docbook:1669, index.docbook:1855
+#. Tag: para
+#: basic_mapping.xml:1488 basic_mapping.xml:1669 basic_mapping.xml:1855
+#, fuzzy, no-c-format
 msgid "<literal>name</literal>: The name of the property."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>name</literal>: 属性名。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>name</literal>: 属性的名字。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>name</literal>: 属性名"
 
-#: index.docbook:1493, index.docbook:2284
-msgid "<literal>column</literal> (optional): The name of the foreign key column. This may also be specified by nested <literal>&lt;column&gt;</literal> element(s)."
+#. Tag: para
+#: basic_mapping.xml:1493 basic_mapping.xml:2284
+#, fuzzy, no-c-format
+msgid ""
+"<literal>column</literal> (optional): The name of the foreign key column. "
+"This may also be specified by nested <literal>&lt;column&gt;</literal> "
+"element(s)."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>column</literal> (可选): 外间字段名。它也可以通过嵌套的 "
+"<literal>&lt;column&gt;</literal>元素指定。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>column</literal> (可选): 外键字段的名称。也可以通过嵌套的 "
+"<literal>&lt;column&gt;</literal>指定。"
 
-#: index.docbook:1500, index.docbook:1674
-msgid "<literal>class</literal> (optional - defaults to the property type determined by reflection): The name of the associated class."
+#. Tag: para
+#: basic_mapping.xml:1500 basic_mapping.xml:1674
+#, fuzzy, no-c-format
+msgid ""
+"<literal>class</literal> (optional - defaults to the property type "
+"determined by reflection): The name of the associated class."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>class</literal> (可选 - 默认是通过反射得到属性类型): 关联的类的名"
+"字。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>class</literal> (可选 - 默认是通过反射得到的属性类型):被关联的类的"
+"名字。"
 
-#: index.docbook:1506
-msgid "<literal>cascade</literal> (optional): Specifies which operations should be cascaded from the parent object to the associated object."
+#. Tag: para
+#: basic_mapping.xml:1506
+#, no-c-format
+msgid ""
+"<literal>cascade</literal> (optional): Specifies which operations should be "
+"cascaded from the parent object to the associated object."
 msgstr ""
+"<literal>cascade(级联)</literal> (可选): 指明哪些操作会从父对象级联到关联的"
+"对象。"
 
-#: index.docbook:1512, index.docbook:1695
-msgid "<literal>fetch</literal> (optional - defaults to <literal>select</literal>): Chooses between outer-join fetching or sequential select fetching."
+#. Tag: para
+#: basic_mapping.xml:1512 basic_mapping.xml:1695
+#, fuzzy, no-c-format
+msgid ""
+"<literal>fetch</literal> (optional - defaults to <literal>select</literal>): "
+"Chooses between outer-join fetching or sequential select fetching."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>fetch</literal> (可选 - 默认为 <literal>select</literal>): 在外连接"
+"抓取(outer-join fetching)和序列选择抓取(sequential select fetching)两者中"
+"选择其一。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>fetch</literal> (可选 - 默认设置为<literal>选择</literal>): 在外连接"
+"抓取或者序列选择抓取选择其一."
 
-#: index.docbook:1518
-msgid "<literal>update, insert</literal> (optional - defaults to <literal>true</literal>) specifies that the mapped columns should be included in SQL <literal>UPDATE</literal> and/or <literal>INSERT</literal> statements. Setting both to <literal>false</literal> allows a pure \"derived\" association whose value is initialized from some other property that maps to the same colum(s) or by a trigger or other application."
+#. Tag: para
+#: basic_mapping.xml:1518
+#, no-c-format
+msgid ""
+"<literal>update, insert</literal> (optional - defaults to <literal>true</"
+"literal>) specifies that the mapped columns should be included in SQL "
+"<literal>UPDATE</literal> and/or <literal>INSERT</literal> statements. "
+"Setting both to <literal>false</literal> allows a pure \"derived\" "
+"association whose value is initialized from some other property that maps to "
+"the same colum(s) or by a trigger or other application."
 msgstr ""
+"<literal>update, insert</literal> (可选 - 默认为 <literal>true</literal>) 指"
+"定对应的字段是否包含在用于<literal>UPDATE</literal> 和/或 <literal>INSERT</"
+"literal> 的SQL语句中。如果二者都是<literal>false</literal>,则这是一个纯粹的 "
+"“外源性(derived)”关联,它的值是通过映射到同一个(或多个)字段的某些其他属性"
+"得到 或者通过trigger(触发器)、或其他程序生成。"
 
-#: index.docbook:1527
-msgid "<literal>property-ref</literal>: (optional) The name of a property of the associated class that is joined to this foreign key. If not specified, the primary key of the associated class is used."
+#. Tag: para
+#: basic_mapping.xml:1527
+#, no-c-format
+msgid ""
+"<literal>property-ref</literal>: (optional) The name of a property of the "
+"associated class that is joined to this foreign key. If not specified, the "
+"primary key of the associated class is used."
 msgstr ""
+"<literal>property-ref</literal>: (可选) 指定关联类的一个属性,这个属性将会和"
+"本外键相对应。 如果没有指定,会使用对方关联类的主键。"
 
-#: index.docbook:1540
-msgid "<literal>unique</literal> (optional): Enable the DDL generation of a unique constraint for the foreign-key column. Also, allow this to be the target of a <literal>property-ref</literal>. This makes the association multiplicity effectively one to one."
+#. Tag: para
+#: basic_mapping.xml:1540
+#, no-c-format
+msgid ""
+"<literal>unique</literal> (optional): Enable the DDL generation of a unique "
+"constraint for the foreign-key column. Also, allow this to be the target of "
+"a <literal>property-ref</literal>. This makes the association multiplicity "
+"effectively one to one."
 msgstr ""
+"<literal>unique</literal> (可选): 使用DDL为外键字段生成一个唯一约束。此外, "
+"这也可以用作<literal>property-ref</literal>的目标属性。这使关联同时具有 一对"
+"一的效果。"
 
-#: index.docbook:1548
-msgid "<literal>not-null</literal> (optional): Enable the DDL generation of a nullability constraint for the foreign key columns."
+#. Tag: para
+#: basic_mapping.xml:1548
+#, no-c-format
+msgid ""
+"<literal>not-null</literal> (optional): Enable the DDL generation of a "
+"nullability constraint for the foreign key columns."
 msgstr ""
+"<literal>not-null</literal> (可选): 使用DDL为外键字段生成一个非空约束。"
 
-#: index.docbook:1554
-msgid "<literal>optimistic-lock</literal> (optional - defaults to <literal>true</literal>): Specifies that updates to this property do or do not require acquisition of the optimistic lock. In other words, dertermines if a version increment should occur when this property is dirty."
+#. Tag: para
+#: basic_mapping.xml:1554
+#, no-c-format
+msgid ""
+"<literal>optimistic-lock</literal> (optional - defaults to <literal>true</"
+"literal>): Specifies that updates to this property do or do not require "
+"acquisition of the optimistic lock. In other words, dertermines if a version "
+"increment should occur when this property is dirty."
 msgstr ""
+"<literal>optimistic-lock</literal> (可选 - 默认为 <literal>true</literal>): "
+"指定这个属性在做更新时是否需要获得乐观锁定(optimistic lock)。 换句话说,它"
+"决定这个属性发生脏数据时版本(version)的值是否增长。"
 
-#: index.docbook:1562
-msgid "<literal>lazy</literal> (optional - defaults to <literal>proxy</literal>): By default, single point associations are proxied. <literal>lazy=\"no-proxy\"</literal> specifies that the property should be fetched lazily when the instance variable is first accessed (requires build-time bytecode instrumentation). <literal>lazy=\"false\"</literal> specifies that the association will always be eagerly fetched."
+#. Tag: para
+#: basic_mapping.xml:1562
+#, no-c-format
+msgid ""
+"<literal>lazy</literal> (optional - defaults to <literal>proxy</literal>): "
+"By default, single point associations are proxied. <literal>lazy=\"no-proxy"
+"\"</literal> specifies that the property should be fetched lazily when the "
+"instance variable is first accessed (requires build-time bytecode "
+"instrumentation). <literal>lazy=\"false\"</literal> specifies that the "
+"association will always be eagerly fetched."
 msgstr ""
+"<literal>lazy</literal> (可选 - 默认为 <literal>proxy</literal>): 默认情况"
+"下,单点关联是经过代理的。<literal>lazy=\"no-proxy\"</literal>指定此属性应该"
+"在实例变量第一次被访问时应该延迟抓取(fetche lazily)(需要运行时字节码的增"
+"强)。 <literal>lazy=\"false\"</literal>指定此关联总是被预先抓取。"
 
-#: index.docbook:1572
-msgid "<literal>not-found</literal> (optional - defaults to <literal>exception</literal>): Specifies how foreign keys that reference missing rows will be handled: <literal>ignore</literal> will treat a missing row as a null association."
+#. Tag: para
+#: basic_mapping.xml:1572
+#, no-c-format
+msgid ""
+"<literal>not-found</literal> (optional - defaults to <literal>exception</"
+"literal>): Specifies how foreign keys that reference missing rows will be "
+"handled: <literal>ignore</literal> will treat a missing row as a null "
+"association."
 msgstr ""
+"<literal>not-found</literal> (可选 - 默认为 <literal>exception</literal>): 指"
+"定外键引用的数据不存在时如何处理: <literal>ignore</literal>会将行数据不存在"
+"视为一个空(null)关联。"
 
-#: index.docbook:1579, index.docbook:1733
-msgid "<literal>entity-name</literal> (optional): The entity name of the associated class."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:1579 basic_mapping.xml:1733
+#, no-c-format
+msgid ""
+"<literal>entity-name</literal> (optional): The entity name of the associated "
+"class."
+msgstr "<literal>entity-name</literal> (可选): 被关联的类的实体名。"
 
-#: index.docbook:1585
-msgid "<literal>formula</literal> (optional): an SQL expression that defines the value for a <emphasis>computed</emphasis> foreign key."
+#. Tag: para
+#: basic_mapping.xml:1585
+#, no-c-format
+msgid ""
+"<literal>formula</literal> (optional): an SQL expression that defines the "
+"value for a <emphasis>computed</emphasis> foreign key."
 msgstr ""
+"<literal>formula</literal> (可选): SQL表达式,用于定义<emphasis>computed(计"
+"算出的)</emphasis>外键值。"
 
-#: index.docbook:1592
-msgid "Setting a value of the <literal>cascade</literal> attribute to any meaningful value other than <literal>none</literal> will propagate certain operations to the associated object. The meaningful values are the names of Hibernate's basic operations, <literal>persist, merge, delete, save-update, evict, replicate, lock, refresh</literal>, as well as the special values <literal>delete-orphan</literal> and <literal>all</literal> and comma-separated combinations of operation names, for example, <literal>cascade=\"persist,merge,evict\"</literal> or <literal>cascade=\"all,delete-orphan\"</literal>. See <xref linkend=\"objectstate-transitive\"/> for a full explanation. Note that single valued associations (many-to-one and one-to-one associations) do not support orphan delete."
+#. Tag: para
+#: basic_mapping.xml:1592
+#, no-c-format
+msgid ""
+"Setting a value of the <literal>cascade</literal> attribute to any "
+"meaningful value other than <literal>none</literal> will propagate certain "
+"operations to the associated object. The meaningful values are the names of "
+"Hibernate's basic operations, <literal>persist, merge, delete, save-update, "
+"evict, replicate, lock, refresh</literal>, as well as the special values "
+"<literal>delete-orphan</literal> and <literal>all</literal> and comma-"
+"separated combinations of operation names, for example, <literal>cascade="
+"\"persist,merge,evict\"</literal> or <literal>cascade=\"all,delete-orphan\"</"
+"literal>. See <xref linkend=\"objectstate-transitive\"/> for a full "
+"explanation. Note that single valued associations (many-to-one and one-to-"
+"one associations) do not support orphan delete."
 msgstr ""
+"<literal>cascade</literal>属性设置为除了<literal>none</literal>以外任何有意义"
+"的值, 它将把特定的操作传递到关联对象中。这个值就代表着Hibernate基本操作的名"
+"称, <literal>persist, merge, delete, save-update, evict, replicate, lock, "
+"refresh</literal>, 以及特别的值<literal>delete-orphan</literal>和"
+"<literal>all</literal>,并且可以用逗号分隔符 来组合这些操作,例如,"
+"<literal>cascade=\"persist,merge,evict\"</literal>或 <literal>cascade=\"all,"
+"delete-orphan\"</literal>。更全面的解释请参考<xref linkend=\"objectstate-"
+"transitive\"/>. 注意,单值关联 (many-to-one 和 one-to-one 关联) 不支持删除孤"
+"儿(orphan delete,删除不再被引用的值)."
 
-#: index.docbook:1605
-msgid "A typical <literal>many-to-one</literal> declaration looks as simple as this:"
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:1605
+#, no-c-format
+msgid ""
+"A typical <literal>many-to-one</literal> declaration looks as simple as this:"
+msgstr "一个典型的简单<literal>many-to-one</literal>定义例子:"
 
-#: index.docbook:1609
-msgid "<![CDATA[<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>]]>"
+#. Tag: programlisting
+#: basic_mapping.xml:1609
+#, no-c-format
+msgid ""
+"<![CDATA[<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID"
+"\"/>]]>"
 msgstr ""
 
-#: index.docbook:1611
-msgid "The <literal>property-ref</literal> attribute should only be used for mapping legacy data where a foreign key refers to a unique key of the associated table other than the primary key. This is an ugly relational model. For example, suppose the <literal>Product</literal> class had a unique serial number, that is not the primary key. (The <literal>unique</literal> attribute controls Hibernate's DDL generation with the SchemaExport tool.)"
+#. Tag: para
+#: basic_mapping.xml:1611
+#, no-c-format
+msgid ""
+"The <literal>property-ref</literal> attribute should only be used for "
+"mapping legacy data where a foreign key refers to a unique key of the "
+"associated table other than the primary key. This is an ugly relational "
+"model. For example, suppose the <literal>Product</literal> class had a "
+"unique serial number, that is not the primary key. (The <literal>unique</"
+"literal> attribute controls Hibernate's DDL generation with the SchemaExport "
+"tool.)"
 msgstr ""
+"<literal>property-ref</literal>属性只应该用来对付遗留下来的数据库系统, 可能"
+"有外键指向对方关联表的是个非主键字段(但是应该是一个惟一关键字)的情况下。 这"
+"是一种十分丑陋的关系模型。比如说,假设<literal>Product</literal>类有一个惟一"
+"的序列号, 它并不是主键。(<literal>unique</literal>属性控制Hibernate通过"
+"SchemaExport工具进行的DDL生成。)"
 
-#: index.docbook:1620
-msgid "<![CDATA[<property name=\"serialNumber\" unique=\"true\" type=\"string\" column=\"SERIAL_NUMBER\"/>]]>"
+#. Tag: programlisting
+#: basic_mapping.xml:1620
+#, no-c-format
+msgid ""
+"<![CDATA[<property name=\"serialNumber\" unique=\"true\" type=\"string\" "
+"column=\"SERIAL_NUMBER\"/>]]>"
 msgstr ""
 
-#: index.docbook:1622
+#. Tag: para
+#: basic_mapping.xml:1622
+#, no-c-format
 msgid "Then the mapping for <literal>OrderItem</literal> might use:"
-msgstr ""
+msgstr "那么关于<literal>OrderItem</literal> 的映射可能是:"
 
-#: index.docbook:1626
-msgid "<![CDATA[<many-to-one name=\"product\" property-ref=\"serialNumber\" column=\"PRODUCT_SERIAL_NUMBER\"/>]]>"
+#. Tag: programlisting
+#: basic_mapping.xml:1626
+#, no-c-format
+msgid ""
+"<![CDATA[<many-to-one name=\"product\" property-ref=\"serialNumber\" column="
+"\"PRODUCT_SERIAL_NUMBER\"/>]]>"
 msgstr ""
 
-#: index.docbook:1628
+#. Tag: para
+#: basic_mapping.xml:1628
+#, no-c-format
 msgid "This is certainly not encouraged, however."
-msgstr ""
+msgstr "当然,我们决不鼓励这种用法。"
 
-#: index.docbook:1632
-msgid "If the referenced unique key comprises multiple properties of the associated entity, you should map the referenced properties inside a named <literal>&lt;properties&gt;</literal> element."
+#. Tag: para
+#: basic_mapping.xml:1632
+#, no-c-format
+msgid ""
+"If the referenced unique key comprises multiple properties of the associated "
+"entity, you should map the referenced properties inside a named <literal>&lt;"
+"properties&gt;</literal> element."
 msgstr ""
+"如果被引用的唯一主键由关联实体的多个属性组成,你应该在名称为<literal>&lt;"
+"properties&gt;</literal>的元素 里面映射所有关联的属性。"
 
-#: index.docbook:1637
-msgid "If the referenced unique key is the property of a component, you may specify a property path:"
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:1637
+#, no-c-format
+msgid ""
+"If the referenced unique key is the property of a component, you may specify "
+"a property path:"
+msgstr "假若被引用的唯一主键是组件的属性,你可以指定属性路径:"
 
-#: index.docbook:1641
-msgid "<![CDATA[<many-to-one name=\"owner\" property-ref=\"identity.ssn\" column=\"OWNER_SSN\"/>]]>"
+#. Tag: programlisting
+#: basic_mapping.xml:1641
+#, no-c-format
+msgid ""
+"<![CDATA[<many-to-one name=\"owner\" property-ref=\"identity.ssn\" column="
+"\"OWNER_SSN\"/>]]>"
 msgstr ""
 
-#: index.docbook:1646
+#. Tag: title
+#: basic_mapping.xml:1646
+#, no-c-format
 msgid "one-to-one"
-msgstr ""
+msgstr "一对一"
 
-#: index.docbook:1648
-msgid "A one-to-one association to another persistent class is declared using a <literal>one-to-one</literal> element."
+#. Tag: para
+#: basic_mapping.xml:1648
+#, no-c-format
+msgid ""
+"A one-to-one association to another persistent class is declared using a "
+"<literal>one-to-one</literal> element."
 msgstr ""
+"持久化对象之间一对一的关联关系是通过<literal>one-to-one</literal>元素定义的。"
 
-#: index.docbook:1666
+#. Tag: programlisting
+#: basic_mapping.xml:1666
+#, no-c-format
 msgid ""
-      "<![CDATA[<one-to-one\n"
-      "        name=\"propertyName\"\n"
-      "        class=\"ClassName\"\n"
-      "        cascade=\"cascade_style\"\n"
-      "        constrained=\"true|false\"\n"
-      "        fetch=\"join|select\"\n"
-      "        property-ref=\"propertyNameFromAssociatedClass\"\n"
-      "        access=\"field|property|ClassName\"\n"
-      "        formula=\"any SQL expression\"\n"
-      "        lazy=\"proxy|no-proxy|false\"\n"
-      "        entity-name=\"EntityName\"\n"
-      "        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
-      "        embed-xml=\"true|false\"\n"
-      "        foreign-key=\"foreign_key_name\"\n"
-      "/>]]>"
+"<![CDATA[<one-to-one\n"
+"        name=\"propertyName\"\n"
+"        class=\"ClassName\"\n"
+"        cascade=\"cascade_style\"\n"
+"        constrained=\"true|false\"\n"
+"        fetch=\"join|select\"\n"
+"        property-ref=\"propertyNameFromAssociatedClass\"\n"
+"        access=\"field|property|ClassName\"\n"
+"        formula=\"any SQL expression\"\n"
+"        lazy=\"proxy|no-proxy|false\"\n"
+"        entity-name=\"EntityName\"\n"
+"        node=\"element-name|@attribute-name|element/@attribute|.\"\n"
+"        embed-xml=\"true|false\"\n"
+"        foreign-key=\"foreign_key_name\"\n"
+"/>]]>"
 msgstr ""
 
-#: index.docbook:1680
-msgid "<literal>cascade</literal> (optional) specifies which operations should be cascaded from the parent object to the associated object."
+#. Tag: para
+#: basic_mapping.xml:1680
+#, no-c-format
+msgid ""
+"<literal>cascade</literal> (optional) specifies which operations should be "
+"cascaded from the parent object to the associated object."
 msgstr ""
+"<literal>cascade(级联)</literal> (可选) 表明操作是否从父对象级联到被关联的对"
+"象。"
 
-#: index.docbook:1686
-msgid "<literal>constrained</literal> (optional) specifies that a foreign key constraint on the primary key of the mapped table references the table of the associated class. This option affects the order in which <literal>save()</literal> and <literal>delete()</literal> are cascaded, and determines whether the association may be proxied (it is also used by the schema export tool)."
+#. Tag: para
+#: basic_mapping.xml:1686
+#, no-c-format
+msgid ""
+"<literal>constrained</literal> (optional) specifies that a foreign key "
+"constraint on the primary key of the mapped table references the table of "
+"the associated class. This option affects the order in which <literal>save()"
+"</literal> and <literal>delete()</literal> are cascaded, and determines "
+"whether the association may be proxied (it is also used by the schema export "
+"tool)."
 msgstr ""
+"<literal>constrained(约束)</literal> (可选) 表明该类对应的表对应的数据库表,"
+"和被关联的对象所对应的数据库表之间,通过一个外键引用对主键进行约束。 这个选项"
+"影响<literal>save()</literal>和<literal>delete()</literal>在级联执行时的先后"
+"顺序以及 决定该关联能否被委托(也在schema export tool中被使用)."
 
-#: index.docbook:1701
-msgid "<literal>property-ref</literal>: (optional) The name of a property of the associated class that is joined to the primary key of this class. If not specified, the primary key of the associated class is used."
+#. Tag: para
+#: basic_mapping.xml:1701
+#, no-c-format
+msgid ""
+"<literal>property-ref</literal>: (optional) The name of a property of the "
+"associated class that is joined to the primary key of this class. If not "
+"specified, the primary key of the associated class is used."
 msgstr ""
+"<literal>property-ref</literal>: (可选) 指定关联类的属性名,这个属性将会和本"
+"类的主键相对应。如果没有指定,会使用对方关联类的主键。"
 
-#: index.docbook:1714
-msgid "<literal>formula</literal> (optional): Almost all one to one associations map to the primary key of the owning entity. In the rare case that this is not the case, you may specify a some other column, columns or expression to join on using an SQL formula. (See <literal>org.hibernate.test.onetooneformula</literal> for an example.)"
+#. Tag: para
+#: basic_mapping.xml:1714
+#, no-c-format
+msgid ""
+"<literal>formula</literal> (optional): Almost all one to one associations "
+"map to the primary key of the owning entity. In the rare case that this is "
+"not the case, you may specify a some other column, columns or expression to "
+"join on using an SQL formula. (See <literal>org.hibernate.test."
+"onetooneformula</literal> for an example.)"
 msgstr ""
+"<literal>formula </literal> (可选):绝大多数一对一的关联都指向其实体的主键。在"
+"一些少见的情况中, 你可能会指向其他的一个或多个字段,或者是一个表达式,这些情"
+"况下,你可以用一个SQL公式来表示。 (可以在org.hibernate.test.onetooneformula"
+"找到例子)"
 
-#: index.docbook:1722
-msgid "<literal>lazy</literal> (optional - defaults to <literal>proxy</literal>): By default, single point associations are proxied. <literal>lazy=\"no-proxy\"</literal> specifies that the property should be fetched lazily when the instance variable is first accessed (requires build-time bytecode instrumentation). <literal>lazy=\"false\"</literal> specifies that the association will always be eagerly fetched. <emphasis>Note that if <literal>constrained=\"false\"</literal>, proxying is impossible and Hibernate will eager fetch the association!</emphasis>"
+#. Tag: para
+#: basic_mapping.xml:1722
+#, no-c-format
+msgid ""
+"<literal>lazy</literal> (optional - defaults to <literal>proxy</literal>): "
+"By default, single point associations are proxied. <literal>lazy=\"no-proxy"
+"\"</literal> specifies that the property should be fetched lazily when the "
+"instance variable is first accessed (requires build-time bytecode "
+"instrumentation). <literal>lazy=\"false\"</literal> specifies that the "
+"association will always be eagerly fetched. <emphasis>Note that if "
+"<literal>constrained=\"false\"</literal>, proxying is impossible and "
+"Hibernate will eager fetch the association!</emphasis>"
 msgstr ""
+"<literal>lazy</literal> (可选 - 默认为 <literal>proxy</literal>): 默认情况"
+"下,单点关联是经过代理的。<literal>lazy=\"no-proxy\"</literal>指定此属性应该"
+"在实例变量第一次被访问时应该延迟抓取(fetche lazily)(需要运行时字节码的增"
+"强)。 <literal>lazy=\"false\"</literal>指定此关联总是被预先抓取。<emphasis>"
+"注意,如果<literal>constrained=\"false\"</literal>, 不可能使用代理,Hibernate"
+"会采取预先抓取!</emphasis>"
 
-#: index.docbook:1740
+#. Tag: para
+#: basic_mapping.xml:1740
+#, no-c-format
 msgid "There are two varieties of one-to-one association:"
-msgstr ""
+msgstr "有两种不同的一对一关联:"
 
-#: index.docbook:1744
+#. Tag: para
+#: basic_mapping.xml:1744
+#, no-c-format
 msgid "primary key associations"
-msgstr ""
+msgstr "主键关联"
 
-#: index.docbook:1747
+#. Tag: para
+#: basic_mapping.xml:1747
+#, no-c-format
 msgid "unique foreign key associations"
-msgstr ""
+msgstr "惟一外键关联"
 
-#: index.docbook:1752
-msgid "Primary key associations don't need an extra table column; if two rows are related by the association then the two table rows share the same primary key value. So if you want two objects to be related by a primary key association, you must make sure that they are assigned the same identifier value!"
+#. Tag: para
+#: basic_mapping.xml:1752
+#, no-c-format
+msgid ""
+"Primary key associations don't need an extra table column; if two rows are "
+"related by the association then the two table rows share the same primary "
+"key value. So if you want two objects to be related by a primary key "
+"association, you must make sure that they are assigned the same identifier "
+"value!"
 msgstr ""
+"主键关联不需要额外的表字段;如果两行是通过这种一对一关系相关联的,那么这两行"
+"就共享同样的主关键字值。所以如果你希望两个对象通过主键一对一关联,你必须确认"
+"它们被赋予同样的标识值!"
 
-#: index.docbook:1759
-msgid "For a primary key association, add the following mappings to <literal>Employee</literal> and <literal>Person</literal>, respectively."
+#. Tag: para
+#: basic_mapping.xml:1759
+#, no-c-format
+msgid ""
+"For a primary key association, add the following mappings to "
+"<literal>Employee</literal> and <literal>Person</literal>, respectively."
 msgstr ""
+"比如说,对下面的<literal>Employee</literal>和<literal>Person</literal>进行主"
+"键一对一关联:"
 
-#: index.docbook:1764
+#. Tag: programlisting
+#: basic_mapping.xml:1764
+#, no-c-format
 msgid "<![CDATA[<one-to-one name=\"person\" class=\"Person\"/>]]>"
 msgstr ""
 
-#: index.docbook:1765
-msgid "<![CDATA[<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>]]>"
+#. Tag: programlisting
+#: basic_mapping.xml:1765
+#, no-c-format
+msgid ""
+"<![CDATA[<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true"
+"\"/>]]>"
 msgstr ""
 
-#: index.docbook:1767
-msgid "Now we must ensure that the primary keys of related rows in the PERSON and EMPLOYEE tables are equal. We use a special Hibernate identifier generation strategy called <literal>foreign</literal>:"
+#. Tag: para
+#: basic_mapping.xml:1767
+#, no-c-format
+msgid ""
+"Now we must ensure that the primary keys of related rows in the PERSON and "
+"EMPLOYEE tables are equal. We use a special Hibernate identifier generation "
+"strategy called <literal>foreign</literal>:"
 msgstr ""
+"现在我们必须确保PERSON和EMPLOYEE中相关的字段是相等的。我们使用一个被成为"
+"<literal>foreign</literal>的特殊的hibernate标识符生成策略:"
 
-#: index.docbook:1773
+#. Tag: programlisting
+#: basic_mapping.xml:1773
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"person\" table=\"PERSON\">\n"
-      "    <id name=\"id\" column=\"PERSON_ID\">\n"
-      "        <generator class=\"foreign\">\n"
-      "            <param name=\"property\">employee</param>\n"
-      "        </generator>\n"
-      "    </id>\n"
-      "    ...\n"
-      "    <one-to-one name=\"employee\"\n"
-      "        class=\"Employee\"\n"
-      "        constrained=\"true\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"person\" table=\"PERSON\">\n"
+"    <id name=\"id\" column=\"PERSON_ID\">\n"
+"        <generator class=\"foreign\">\n"
+"            <param name=\"property\">employee</param>\n"
+"        </generator>\n"
+"    </id>\n"
+"    ...\n"
+"    <one-to-one name=\"employee\"\n"
+"        class=\"Employee\"\n"
+"        constrained=\"true\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:1775
-msgid "A newly saved instance of <literal>Person</literal> is then assigned the same primary key value as the <literal>Employee</literal> instance refered with the <literal>employee</literal> property of that <literal>Person</literal>."
+#. Tag: para
+#: basic_mapping.xml:1775
+#, no-c-format
+msgid ""
+"A newly saved instance of <literal>Person</literal> is then assigned the "
+"same primary key value as the <literal>Employee</literal> instance refered "
+"with the <literal>employee</literal> property of that <literal>Person</"
+"literal>."
 msgstr ""
+"一个刚刚保存的<literal>Person</literal>实例被赋予和该<literal>Person</"
+"literal>的<literal>employee</literal>属性所指向的<literal>Employee</literal>"
+"实例同样的关键字值。"
 
-#: index.docbook:1781
-msgid "Alternatively, a foreign key with a unique constraint, from <literal>Employee</literal> to <literal>Person</literal>, may be expressed as:"
+#. Tag: para
+#: basic_mapping.xml:1781
+#, no-c-format
+msgid ""
+"Alternatively, a foreign key with a unique constraint, from "
+"<literal>Employee</literal> to <literal>Person</literal>, may be expressed "
+"as:"
 msgstr ""
+"另一种方式是一个外键和一个惟一关键字对应,上面的<literal>Employee</literal>和"
+"<literal>Person</literal>的例子,如果使用这种关联方式,可以表达成:"
 
-#: index.docbook:1786
-msgid "<![CDATA[<many-to-one name=\"person\" class=\"Person\" column=\"PERSON_ID\" unique=\"true\"/>]]>"
+#. Tag: programlisting
+#: basic_mapping.xml:1786
+#, no-c-format
+msgid ""
+"<![CDATA[<many-to-one name=\"person\" class=\"Person\" column=\"PERSON_ID\" "
+"unique=\"true\"/>]]>"
 msgstr ""
 
-#: index.docbook:1788
-msgid "And this association may be made bidirectional by adding the following to the <literal>Person</literal> mapping:"
+#. Tag: para
+#: basic_mapping.xml:1788
+#, no-c-format
+msgid ""
+"And this association may be made bidirectional by adding the following to "
+"the <literal>Person</literal> mapping:"
 msgstr ""
+"如果在<literal>Person</literal>的映射加入下面几句,这种关联就是双向的:"
 
-#: index.docbook:1793
-msgid "<![CDATA[<one-to-one name=\"employee\" class=\"Employee\" property-ref=\"person\"/>]]>"
+#. Tag: programlisting
+#: basic_mapping.xml:1793
+#, no-c-format
+msgid ""
+"<![CDATA[<one-to-one name=\"employee\" class=\"Employee\" property-ref="
+"\"person\"/>]]>"
 msgstr ""
 
-#: index.docbook:1798
+#. Tag: title
+#: basic_mapping.xml:1798
+#, no-c-format
 msgid "natural-id"
-msgstr ""
+msgstr "自然ID(natural-id)"
 
-#: index.docbook:1800
+#. Tag: programlisting
+#: basic_mapping.xml:1800
+#, no-c-format
 msgid ""
-      "<![CDATA[<natural-id mutable=\"true|false\"/>\n"
-      "        <property ... />\n"
-      "        <many-to-one ... />\n"
-      "        ......\n"
-      "</natural-id>]]>"
+"<![CDATA[<natural-id mutable=\"true|false\"/>\n"
+"        <property ... />\n"
+"        <many-to-one ... />\n"
+"        ......\n"
+"</natural-id>]]>"
 msgstr ""
 
-#: index.docbook:1802
-msgid "Even though we recommend the use of surrogate keys as primary keys, you should still try to identify natural keys for all entities. A natural key is a property or combination of properties that is unique and non-null. If it is also immutable, even better. Map the properties of the natural key inside the <literal>&lt;natural-id&gt;</literal> element. Hibernate will generate the necessary unique key and nullability constraints, and your mapping will be more self-documenting."
+#. Tag: para
+#: basic_mapping.xml:1802
+#, no-c-format
+msgid ""
+"Even though we recommend the use of surrogate keys as primary keys, you "
+"should still try to identify natural keys for all entities. A natural key is "
+"a property or combination of properties that is unique and non-null. If it "
+"is also immutable, even better. Map the properties of the natural key inside "
+"the <literal>&lt;natural-id&gt;</literal> element. Hibernate will generate "
+"the necessary unique key and nullability constraints, and your mapping will "
+"be more self-documenting."
 msgstr ""
+"我们建议使用代用键(键值不具备实际意义)作为主键,我们仍然应该尝试为所有的实"
+"体采用自然的键值作为(附加——译者注)标示。自然键(natural key)是单个或组合属"
+"性,他们必须唯一且非空。如果它还是不可变的那就更理想了。在<literal>&lt;"
+"natural-id&gt;</literal>元素中列出自然键的属性。Hibernate会帮你生成必须的唯一"
+"键值和非空约束,你的映射会更加的明显易懂(原文是self-documenting,自我注"
+"解)。"
 
-#: index.docbook:1811
-msgid "We strongly recommend that you implement <literal>equals()</literal> and <literal>hashCode()</literal> to compare the natural key properties of the entity."
+#. Tag: para
+#: basic_mapping.xml:1811
+#, no-c-format
+msgid ""
+"We strongly recommend that you implement <literal>equals()</literal> and "
+"<literal>hashCode()</literal> to compare the natural key properties of the "
+"entity."
 msgstr ""
+"我们强烈建议你实现<literal>equals()</literal> 和<literal>hashCode()</literal>"
+"方法,来比较实体的自然键属性。"
 
-#: index.docbook:1816
-msgid "This mapping is not intended for use with entities with natural primary keys."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:1816
+#, no-c-format
+msgid ""
+"This mapping is not intended for use with entities with natural primary keys."
+msgstr "这一映射不是为了把自然键作为主键而准备的。"
 
-#: index.docbook:1822
-msgid "<literal>mutable</literal> (optional, defaults to <literal>false</literal>): By default, natural identifier properties as assumed to be immutable (constant)."
+#. Tag: para
+#: basic_mapping.xml:1822
+#, no-c-format
+msgid ""
+"<literal>mutable</literal> (optional, defaults to <literal>false</literal>): "
+"By default, natural identifier properties as assumed to be immutable "
+"(constant)."
 msgstr ""
+"<literal>mutable</literal> (可选, 默认为<literal>false</literal>): 默认情况"
+"下,自然标识属性被假定为不可变的(常量)。"
 
-#: index.docbook:1832
+#. Tag: title
+#: basic_mapping.xml:1832
+#, no-c-format
 msgid "component, dynamic-component"
-msgstr ""
+msgstr "组件(component), 动态组件(dynamic-component)"
 
-#: index.docbook:1834
-msgid "The <literal>&lt;component&gt;</literal> element maps properties of a child object to columns of the table of a parent class. Components may, in turn, declare their own properties, components or collections. See \"Components\" below."
+#. Tag: para
+#: basic_mapping.xml:1834
+#, no-c-format
+msgid ""
+"The <literal>&lt;component&gt;</literal> element maps properties of a child "
+"object to columns of the table of a parent class. Components may, in turn, "
+"declare their own properties, components or collections. See \"Components\" "
+"below."
 msgstr ""
+"<literal>&lt;component&gt;</literal>元素把子对象的一些元素与父类对应的表的一"
+"些字段映射起来。 然后组件可以定义它们自己的属性、组件或者集合。参见后面"
+"的“Components”一章。"
 
-#: index.docbook:1852
+#. Tag: programlisting
+#: basic_mapping.xml:1852
+#, no-c-format
 msgid ""
-      "<![CDATA[<component\n"
-      "        name=\"propertyName\"\n"
-      "        class=\"className\"\n"
-      "        insert=\"true|false\"\n"
-      "        update=\"true|false\"\n"
-      "        access=\"field|property|ClassName\"\n"
-      "        lazy=\"true|false\"\n"
-      "        optimistic-lock=\"true|false\"\n"
-      "        unique=\"true|false\"\n"
-      "        node=\"element-name|.\"\n"
-      ">\n"
-      "\n"
-      "        <property ...../>\n"
-      "        <many-to-one .... />\n"
-      "        ........\n"
-      "</component>]]>"
+"<![CDATA[<component\n"
+"        name=\"propertyName\"\n"
+"        class=\"className\"\n"
+"        insert=\"true|false\"\n"
+"        update=\"true|false\"\n"
+"        access=\"field|property|ClassName\"\n"
+"        lazy=\"true|false\"\n"
+"        optimistic-lock=\"true|false\"\n"
+"        unique=\"true|false\"\n"
+"        node=\"element-name|.\"\n"
+">\n"
+"\n"
+"        <property ...../>\n"
+"        <many-to-one .... />\n"
+"        ........\n"
+"</component>]]>"
 msgstr ""
 
-#: index.docbook:1860
-msgid "<literal>class</literal> (optional - defaults to the property type determined by reflection): The name of the component (child) class."
+#. Tag: para
+#: basic_mapping.xml:1860
+#, no-c-format
+msgid ""
+"<literal>class</literal> (optional - defaults to the property type "
+"determined by reflection): The name of the component (child) class."
 msgstr ""
+"<literal>class</literal> (可选 - 默认为通过反射得到的属性类型):组件(子)类的名"
+"字。"
 
-#: index.docbook:1866, index.docbook:1955
-msgid "<literal>insert</literal>: Do the mapped columns appear in SQL <literal>INSERT</literal>s?"
+#. Tag: para
+#: basic_mapping.xml:1866 basic_mapping.xml:1955
+#, fuzzy, no-c-format
+msgid ""
+"<literal>insert</literal>: Do the mapped columns appear in SQL "
+"<literal>INSERT</literal>s?"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>insert</literal>: 被映射的字段是否出现在SQL的<literal>INSERT</"
+"literal>语句中?\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>insert</literal>: 被映射的字段是否出现在SQL的 <literal>INSERT</"
+"literal>语句中?"
 
-#: index.docbook:1872, index.docbook:1961
-msgid "<literal>update</literal>: Do the mapped columns appear in SQL <literal>UPDATE</literal>s?"
+#. Tag: para
+#: basic_mapping.xml:1872 basic_mapping.xml:1961
+#, fuzzy, no-c-format
+msgid ""
+"<literal>update</literal>: Do the mapped columns appear in SQL "
+"<literal>UPDATE</literal>s?"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>update</literal>: 被映射的字段是否出现在SQL的<literal>UPDATE</"
+"literal>语句中?\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>update</literal>: 被映射的字段是否出现在SQL的 <literal>UPDATE</"
+"literal>语句中?"
 
-#: index.docbook:1884
-msgid "<literal>lazy</literal> (optional - defaults to <literal>false</literal>): Specifies that this component should be fetched lazily when the instance variable is first accessed (requires build-time bytecode instrumentation)."
+#. Tag: para
+#: basic_mapping.xml:1884
+#, no-c-format
+msgid ""
+"<literal>lazy</literal> (optional - defaults to <literal>false</literal>): "
+"Specifies that this component should be fetched lazily when the instance "
+"variable is first accessed (requires build-time bytecode instrumentation)."
 msgstr ""
+"<literal>lazy</literal> (可选 - 默认是 <literal>false</literal>): 表明此组件"
+"应在实例变量第一次被访问的时候延迟加载(需要编译时字节码装置器)"
 
-#: index.docbook:1891
-msgid "<literal>optimistic-lock</literal> (optional - defaults to <literal>true</literal>): Specifies that updates to this component do or do not require acquisition of the optimistic lock. In other words, determines if a version increment should occur when this property is dirty."
+#. Tag: para
+#: basic_mapping.xml:1891
+#, no-c-format
+msgid ""
+"<literal>optimistic-lock</literal> (optional - defaults to <literal>true</"
+"literal>): Specifies that updates to this component do or do not require "
+"acquisition of the optimistic lock. In other words, determines if a version "
+"increment should occur when this property is dirty."
 msgstr ""
+"<literal>optimistic-lock</literal> (可选 - 默认是 <literal>true</literal>):表"
+"明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号"
+"(Version)"
 
-#: index.docbook:1899, index.docbook:1975
-msgid "<literal>unique</literal> (optional - defaults to <literal>false</literal>): Specifies that a unique constraint exists upon all mapped columns of the component."
+#. Tag: para
+#: basic_mapping.xml:1899 basic_mapping.xml:1975
+#, no-c-format
+msgid ""
+"<literal>unique</literal> (optional - defaults to <literal>false</literal>): "
+"Specifies that a unique constraint exists upon all mapped columns of the "
+"component."
 msgstr ""
+"<literal>unique</literal> (可选 - 默认是 <literal>false</literal>):表明组件映"
+"射的所有字段上都有唯一性约束"
 
-#: index.docbook:1908
-msgid "The child <literal>&lt;property&gt;</literal> tags map properties of the child class to table columns."
+#. Tag: para
+#: basic_mapping.xml:1908
+#, no-c-format
+msgid ""
+"The child <literal>&lt;property&gt;</literal> tags map properties of the "
+"child class to table columns."
 msgstr ""
+"其<literal>&lt;property&gt;</literal>子标签为子类的一些属性与表字段之间建立映"
+"射。"
 
-#: index.docbook:1913
-msgid "The <literal>&lt;component&gt;</literal> element allows a <literal>&lt;parent&gt;</literal> subelement that maps a property of the component class as a reference back to the containing entity."
+#. Tag: para
+#: basic_mapping.xml:1913
+#, no-c-format
+msgid ""
+"The <literal>&lt;component&gt;</literal> element allows a <literal>&lt;"
+"parent&gt;</literal> subelement that maps a property of the component class "
+"as a reference back to the containing entity."
 msgstr ""
+"<literal>&lt;component&gt;</literal>元素允许加入一个<literal>&lt;parent&gt;</"
+"literal>子元素,在组件类内部就可以有一个指向其容器的实体的反向引用。"
 
-#: index.docbook:1919
-msgid "The <literal>&lt;dynamic-component&gt;</literal> element allows a <literal>Map</literal> to be mapped as a component, where the property names refer to keys of the map, see <xref linkend=\"components-dynamic\"/>."
+#. Tag: para
+#: basic_mapping.xml:1919
+#, no-c-format
+msgid ""
+"The <literal>&lt;dynamic-component&gt;</literal> element allows a "
+"<literal>Map</literal> to be mapped as a component, where the property names "
+"refer to keys of the map, see <xref linkend=\"components-dynamic\"/>."
 msgstr ""
+"<literal>&lt;dynamic-component&gt;</literal>元素允许把一个<literal>Map</"
+"literal>映射为组件,其属性名对应map的键值。 参见<xref linkend=\"components-"
+"dynamic\"/>."
 
-#: index.docbook:1928
+#. Tag: title
+#: basic_mapping.xml:1928
+#, no-c-format
 msgid "properties"
-msgstr ""
+msgstr "properties"
 
-#: index.docbook:1930
-msgid "The <literal>&lt;properties&gt;</literal> element allows the definition of a named, logical grouping of properties of a class. The most important use of the construct is that it allows a combination of properties to be the target of a <literal>property-ref</literal>. It is also a convenient way to define a multi-column unique constraint."
+#. Tag: para
+#: basic_mapping.xml:1930
+#, no-c-format
+msgid ""
+"The <literal>&lt;properties&gt;</literal> element allows the definition of a "
+"named, logical grouping of properties of a class. The most important use of "
+"the construct is that it allows a combination of properties to be the target "
+"of a <literal>property-ref</literal>. It is also a convenient way to define "
+"a multi-column unique constraint."
 msgstr ""
+"<literal>&lt;properties&gt;</literal> 元素允许定义一个命名的逻辑分组"
+"(grouping)包含一个类中的多个属性。 这个元素最重要的用处是允许多个属性的组合作"
+"为<literal>property-ref</literal>的目标(target)。 这也是定义多字段唯一约束的"
+"一种方便途径。"
 
-#: index.docbook:1946
+#. Tag: programlisting
+#: basic_mapping.xml:1946
+#, no-c-format
 msgid ""
-      "<![CDATA[<properties\n"
-      "        name=\"logicalName\"\n"
-      "        insert=\"true|false\"\n"
-      "        update=\"true|false\"\n"
-      "        optimistic-lock=\"true|false\"\n"
-      "        unique=\"true|false\"\n"
-      ">\n"
-      "\n"
-      "        <property ...../>\n"
-      "        <many-to-one .... />\n"
-      "        ........\n"
-      "</properties>]]>"
+"<![CDATA[<properties\n"
+"        name=\"logicalName\"\n"
+"        insert=\"true|false\"\n"
+"        update=\"true|false\"\n"
+"        optimistic-lock=\"true|false\"\n"
+"        unique=\"true|false\"\n"
+">\n"
+"\n"
+"        <property ...../>\n"
+"        <many-to-one .... />\n"
+"        ........\n"
+"</properties>]]>"
 msgstr ""
 
-#: index.docbook:1949
-msgid "<literal>name</literal>: The logical name of the grouping - <emphasis>not</emphasis> an actual property name."
+#. Tag: para
+#: basic_mapping.xml:1949
+#, no-c-format
+msgid ""
+"<literal>name</literal>: The logical name of the grouping - <emphasis>not</"
+"emphasis> an actual property name."
 msgstr ""
+"<literal>name</literal>: 分组的逻辑名称 - <emphasis>不是</emphasis> 实际属性"
+"的名称."
 
-#: index.docbook:1967
-msgid "<literal>optimistic-lock</literal> (optional - defaults to <literal>true</literal>): Specifies that updates to these properties do or do not require acquisition of the optimistic lock. In other words, determines if a version increment should occur when these properties are dirty."
+#. Tag: para
+#: basic_mapping.xml:1967
+#, no-c-format
+msgid ""
+"<literal>optimistic-lock</literal> (optional - defaults to <literal>true</"
+"literal>): Specifies that updates to these properties do or do not require "
+"acquisition of the optimistic lock. In other words, determines if a version "
+"increment should occur when these properties are dirty."
 msgstr ""
+"<literal>optimistic-lock</literal> (可选 - 默认是 <literal>true</literal>):表"
+"明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号"
+"(Version)"
 
-#: index.docbook:1984
-msgid "For example, if we have the following <literal>&lt;properties&gt;</literal> mapping:"
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:1984
+#, no-c-format
+msgid ""
+"For example, if we have the following <literal>&lt;properties&gt;</literal> "
+"mapping:"
+msgstr "例如,如果我们有如下的<literal>&lt;properties&gt;</literal>映射:"
 
-#: index.docbook:1988
+#. Tag: programlisting
+#: basic_mapping.xml:1988
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"personNumber\"/>\n"
-      "    ...\n"
-      "    <properties name=\"name\"\n"
-      "            unique=\"true\" update=\"false\">\n"
-      "        <property name=\"firstName\"/>\n"
-      "        <property name=\"initial\"/>\n"
-      "        <property name=\"lastName\"/>\n"
-      "    </properties>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"personNumber\"/>\n"
+"    ...\n"
+"    <properties name=\"name\"\n"
+"            unique=\"true\" update=\"false\">\n"
+"        <property name=\"firstName\"/>\n"
+"        <property name=\"initial\"/>\n"
+"        <property name=\"lastName\"/>\n"
+"    </properties>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:1990
-msgid "Then we might have some legacy data association which refers to this unique key of the <literal>Person</literal> table, instead of to the primary key:"
+#. Tag: para
+#: basic_mapping.xml:1990
+#, no-c-format
+msgid ""
+"Then we might have some legacy data association which refers to this unique "
+"key of the <literal>Person</literal> table, instead of to the primary key:"
 msgstr ""
+"然后,我们可能有一些遗留的数据关联,引用 <literal>Person</literal>表的这个唯"
+"一键,而不是主键。"
 
-#: index.docbook:1995
+#. Tag: programlisting
+#: basic_mapping.xml:1995
+#, no-c-format
 msgid ""
-      "<![CDATA[<many-to-one name=\"person\"\n"
-      "         class=\"Person\" property-ref=\"name\">\n"
-      "    <column name=\"firstName\"/>\n"
-      "    <column name=\"initial\"/>\n"
-      "    <column name=\"lastName\"/>\n"
-      "</many-to-one>]]>"
+"<![CDATA[<many-to-one name=\"person\"\n"
+"         class=\"Person\" property-ref=\"name\">\n"
+"    <column name=\"firstName\"/>\n"
+"    <column name=\"initial\"/>\n"
+"    <column name=\"lastName\"/>\n"
+"</many-to-one>]]>"
 msgstr ""
 
-#: index.docbook:1997
-msgid "We don't recommend the use of this kind of thing outside the context of mapping legacy data."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:1997
+#, no-c-format
+msgid ""
+"We don't recommend the use of this kind of thing outside the context of "
+"mapping legacy data."
+msgstr "我们并不推荐这样使用,除非在映射遗留数据的情况下。"
 
-#: index.docbook:2005
+#. Tag: title
+#: basic_mapping.xml:2005
+#, no-c-format
 msgid "subclass"
-msgstr ""
+msgstr "子类(subclass)"
 
-#: index.docbook:2007
-msgid "Finally, polymorphic persistence requires the declaration of each subclass of the root persistent class. For the table-per-class-hierarchy mapping strategy, the <literal>&lt;subclass&gt;</literal> declaration is used."
+#. Tag: para
+#: basic_mapping.xml:2007
+#, no-c-format
+msgid ""
+"Finally, polymorphic persistence requires the declaration of each subclass "
+"of the root persistent class. For the table-per-class-hierarchy mapping "
+"strategy, the <literal>&lt;subclass&gt;</literal> declaration is used."
 msgstr ""
+"最后,多态持久化需要为父类的每个子类都进行定义。对于“每一棵类继承树对应一个"
+"表”的策略来说,就需要使用<literal>&lt;subclass&gt;</literal>定义。"
 
-#: index.docbook:2020
+#. Tag: programlisting
+#: basic_mapping.xml:2020
+#, no-c-format
 msgid ""
-      "<![CDATA[<subclass\n"
-      "        name=\"ClassName\"\n"
-      "        discriminator-value=\"discriminator_value\"\n"
-      "        proxy=\"ProxyInterface\"\n"
-      "        lazy=\"true|false\"\n"
-      "        dynamic-update=\"true|false\"\n"
-      "        dynamic-insert=\"true|false\"\n"
-      "        entity-name=\"EntityName\"\n"
-      "        node=\"element-name\"\n"
-      "        extends=\"SuperclassName\">\n"
-      "\n"
-      "        <property .... />\n"
-      "        .....\n"
-      "</subclass>]]>"
+"<![CDATA[<subclass\n"
+"        name=\"ClassName\"\n"
+"        discriminator-value=\"discriminator_value\"\n"
+"        proxy=\"ProxyInterface\"\n"
+"        lazy=\"true|false\"\n"
+"        dynamic-update=\"true|false\"\n"
+"        dynamic-insert=\"true|false\"\n"
+"        entity-name=\"EntityName\"\n"
+"        node=\"element-name\"\n"
+"        extends=\"SuperclassName\">\n"
+"\n"
+"        <property .... />\n"
+"        .....\n"
+"</subclass>]]>"
 msgstr ""
 
-#: index.docbook:2023, index.docbook:2081, index.docbook:2144
-msgid "<literal>name</literal>: The fully qualified class name of the subclass."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:2023 basic_mapping.xml:2081 basic_mapping.xml:2144
+#, no-c-format
+msgid ""
+"<literal>name</literal>: The fully qualified class name of the subclass."
+msgstr "<literal>name</literal>: 子类的全限定名。"
 
-#: index.docbook:2028
-msgid "<literal>discriminator-value</literal> (optional - defaults to the class name): A value that distiguishes individual subclasses."
+#. Tag: para
+#: basic_mapping.xml:2028
+#, no-c-format
+msgid ""
+"<literal>discriminator-value</literal> (optional - defaults to the class "
+"name): A value that distiguishes individual subclasses."
 msgstr ""
+"<literal>discriminator-value(辨别标志)</literal> (可选 - 默认为类名):一个用于"
+"区分每个独立的子类的值。"
 
-#: index.docbook:2034, index.docbook:2091, index.docbook:2154
-msgid "<literal>proxy</literal> (optional): Specifies a class or interface to use for lazy initializing proxies."
+#. Tag: para
+#: basic_mapping.xml:2034 basic_mapping.xml:2091 basic_mapping.xml:2154
+#, fuzzy, no-c-format
+msgid ""
+"<literal>proxy</literal> (optional): Specifies a class or interface to use "
+"for lazy initializing proxies."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>proxy(代理)</literal> (可选): 指定一个类或者接口,在延迟装载时作为代"
+"理使用。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>proxy</literal> (可选): 指定一个类或者接口,在延迟装载时作为代理使"
+"用。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>proxy</literal> (可选): 指定一个类或者接口,在延迟装载时作为代理使"
+"用。"
 
-#: index.docbook:2040, index.docbook:2097, index.docbook:2160
-msgid "<literal>lazy</literal> (optional, defaults to <literal>true</literal>): Setting <literal>lazy=\"false\"</literal> disables the use of lazy fetching."
+#. Tag: para
+#: basic_mapping.xml:2040 basic_mapping.xml:2097 basic_mapping.xml:2160
+#, fuzzy, no-c-format
+msgid ""
+"<literal>lazy</literal> (optional, defaults to <literal>true</literal>): "
+"Setting <literal>lazy=\"false\"</literal> disables the use of lazy fetching."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>lazy</literal> (可选, 默认是<literal>true</literal>): 设置为 "
+"<literal>lazy=\"false\"</literal> 禁止使用延迟抓取\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>lazy</literal> (可选, 默认是 <literal>true</literal>): 设置为 "
+"<literal>lazy=\"false\"</literal> 禁止使用延迟装载。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>lazy</literal> (可选, 默认是 <literal>true</literal>): 设置为 "
+"<literal>lazy=\"false\"</literal> 禁止使用延迟装载。"
 
-#: index.docbook:2048
-msgid "Each subclass should declare its own persistent properties and subclasses. <literal>&lt;version&gt;</literal> and <literal>&lt;id&gt;</literal> properties are assumed to be inherited from the root class. Each subclass in a heirarchy must define a unique <literal>discriminator-value</literal>. If none is specified, the fully qualified Java class name is used."
+#. Tag: para
+#: basic_mapping.xml:2048
+#, no-c-format
+msgid ""
+"Each subclass should declare its own persistent properties and subclasses. "
+"<literal>&lt;version&gt;</literal> and <literal>&lt;id&gt;</literal> "
+"properties are assumed to be inherited from the root class. Each subclass in "
+"a heirarchy must define a unique <literal>discriminator-value</literal>. If "
+"none is specified, the fully qualified Java class name is used."
 msgstr ""
+"每个子类都应该定义它自己的持久化属性和子类。 <literal>&lt;version&gt;</"
+"literal> 和<literal>&lt;id&gt;</literal> 属性可以从根父类继承下来。在一棵继承"
+"树上的每个子类都必须定义一个唯一的<literal>discriminator-value</literal>。如"
+"果没有指定,就会使用Java类的全限定名。"
 
-#: index.docbook:2056, index.docbook:2114, index.docbook:2172
-msgid "For information about inheritance mappings, see <xref linkend=\"inheritance\"/>."
+#. Tag: para
+#: basic_mapping.xml:2056 basic_mapping.xml:2114 basic_mapping.xml:2172
+#, fuzzy, no-c-format
+msgid ""
+"For information about inheritance mappings, see <xref linkend=\"inheritance"
+"\"/>."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"更多关于继承映射的信息, 参考 <xref linkend=\"inheritance\"/>章节.\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"更多关于继承映射的信息,参考<xref linkend=\"inheritance\"/>。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"更多关于继承映射的信息,参考<xref linkend=\"inheritance\"/>。"
 
-#: index.docbook:2063
+#. Tag: title
+#: basic_mapping.xml:2063
+#, no-c-format
 msgid "joined-subclass"
-msgstr ""
+msgstr "连接的子类(joined-subclass)"
 
-#: index.docbook:2065
-msgid "Alternatively, each subclass may be mapped to its own table (table-per-subclass mapping strategy). Inherited state is retrieved by joining with the table of the superclass. We use the <literal>&lt;joined-subclass&gt;</literal> element."
+#. Tag: para
+#: basic_mapping.xml:2065
+#, no-c-format
+msgid ""
+"Alternatively, each subclass may be mapped to its own table (table-per-"
+"subclass mapping strategy). Inherited state is retrieved by joining with the "
+"table of the superclass. We use the <literal>&lt;joined-subclass&gt;</"
+"literal> element."
 msgstr ""
+"此外,每个子类可能被映射到他自己的表中(每个子类一个表的策略)。被继承的状态通"
+"过和超类的表关联得到。我们使用<literal>&lt;joined-subclass&gt;</literal>元"
+"素。"
 
-#: index.docbook:2078
+#. Tag: programlisting
+#: basic_mapping.xml:2078
+#, no-c-format
 msgid ""
-      "<![CDATA[<joined-subclass\n"
-      "        name=\"ClassName\"\n"
-      "        table=\"tablename\"\n"
-      "        proxy=\"ProxyInterface\"\n"
-      "        lazy=\"true|false\"\n"
-      "        dynamic-update=\"true|false\"\n"
-      "        dynamic-insert=\"true|false\"\n"
-      "        schema=\"schema\"\n"
-      "        catalog=\"catalog\"\n"
-      "        extends=\"SuperclassName\"\n"
-      "        persister=\"ClassName\"\n"
-      "        subselect=\"SQL expression\"\n"
-      "        entity-name=\"EntityName\"\n"
-      "        node=\"element-name\">\n"
-      "\n"
-      "        <key .... >\n"
-      "\n"
-      "        <property .... />\n"
-      "        .....\n"
-      "</joined-subclass>]]>"
+"<![CDATA[<joined-subclass\n"
+"        name=\"ClassName\"\n"
+"        table=\"tablename\"\n"
+"        proxy=\"ProxyInterface\"\n"
+"        lazy=\"true|false\"\n"
+"        dynamic-update=\"true|false\"\n"
+"        dynamic-insert=\"true|false\"\n"
+"        schema=\"schema\"\n"
+"        catalog=\"catalog\"\n"
+"        extends=\"SuperclassName\"\n"
+"        persister=\"ClassName\"\n"
+"        subselect=\"SQL expression\"\n"
+"        entity-name=\"EntityName\"\n"
+"        node=\"element-name\">\n"
+"\n"
+"        <key .... >\n"
+"\n"
+"        <property .... />\n"
+"        .....\n"
+"</joined-subclass>]]>"
 msgstr ""
 
-#: index.docbook:2086, index.docbook:2149
+#. Tag: para
+#: basic_mapping.xml:2086 basic_mapping.xml:2149
+#, fuzzy, no-c-format
 msgid "<literal>table</literal>: The name of the subclass table."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>table</literal>: 子类的表名.\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>table</literal>: 子类的表名"
 
-#: index.docbook:2105
-msgid "No discriminator column is required for this mapping strategy. Each subclass must, however, declare a table column holding the object identifier using the <literal>&lt;key&gt;</literal> element. The mapping at the start of the chapter would be re-written as:"
+#. Tag: para
+#: basic_mapping.xml:2105
+#, no-c-format
+msgid ""
+"No discriminator column is required for this mapping strategy. Each subclass "
+"must, however, declare a table column holding the object identifier using "
+"the <literal>&lt;key&gt;</literal> element. The mapping at the start of the "
+"chapter would be re-written as:"
 msgstr ""
+"这种映射策略不需要指定辨别标志(discriminator)字段。但是,每一个子类都必须使用"
+"<literal>&lt;key&gt;</literal>元素指定一个表字段来持有对象的标识符。本章开始"
+"的映射可以被用如下方式重写:"
 
-#: index.docbook:2112
+#. Tag: programlisting
+#: basic_mapping.xml:2112
+#, no-c-format
 msgid ""
-      "<![CDATA[<?xml version=\"1.0\"?>\n"
-      "<!DOCTYPE hibernate-mapping PUBLIC\n"
-      "        \"-//Hibernate/Hibernate Mapping DTD//EN\"\n"
-      "        \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
-      "\n"
-      "<hibernate-mapping package=\"eg\">\n"
-      "\n"
-      "        <class name=\"Cat\" table=\"CATS\">\n"
-      "                <id name=\"id\" column=\"uid\" type=\"long\">\n"
-      "                        <generator class=\"hilo\"/>\n"
-      "                </id>\n"
-      "                <property name=\"birthdate\" type=\"date\"/>\n"
-      "                <property name=\"color\" not-null=\"true\"/>\n"
-      "                <property name=\"sex\" not-null=\"true\"/>\n"
-      "                <property name=\"weight\"/>\n"
-      "                <many-to-one name=\"mate\"/>\n"
-      "                <set name=\"kittens\">\n"
-      "                        <key column=\"MOTHER\"/>\n"
-      "                        <one-to-many class=\"Cat\"/>\n"
-      "                </set>\n"
-      "                <joined-subclass name=\"DomesticCat\" table=\"DOMESTIC_CATS\">\n"
-      "                    <key column=\"CAT\"/>\n"
-      "                    <property name=\"name\" type=\"string\"/>\n"
-      "                </joined-subclass>\n"
-      "        </class>\n"
-      "\n"
-      "        <class name=\"eg.Dog\">\n"
-      "                <!-- mapping for Dog could go here -->\n"
-      "        </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE hibernate-mapping PUBLIC\n"
+"        \"-//Hibernate/Hibernate Mapping DTD//EN\"\n"
+"        \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+"\n"
+"<hibernate-mapping package=\"eg\">\n"
+"\n"
+"        <class name=\"Cat\" table=\"CATS\">\n"
+"                <id name=\"id\" column=\"uid\" type=\"long\">\n"
+"                        <generator class=\"hilo\"/>\n"
+"                </id>\n"
+"                <property name=\"birthdate\" type=\"date\"/>\n"
+"                <property name=\"color\" not-null=\"true\"/>\n"
+"                <property name=\"sex\" not-null=\"true\"/>\n"
+"                <property name=\"weight\"/>\n"
+"                <many-to-one name=\"mate\"/>\n"
+"                <set name=\"kittens\">\n"
+"                        <key column=\"MOTHER\"/>\n"
+"                        <one-to-many class=\"Cat\"/>\n"
+"                </set>\n"
+"                <joined-subclass name=\"DomesticCat\" table=\"DOMESTIC_CATS"
+"\">\n"
+"                    <key column=\"CAT\"/>\n"
+"                    <property name=\"name\" type=\"string\"/>\n"
+"                </joined-subclass>\n"
+"        </class>\n"
+"\n"
+"        <class name=\"eg.Dog\">\n"
+"                <!-- mapping for Dog could go here -->\n"
+"        </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:2121
+#. Tag: title
+#: basic_mapping.xml:2121
+#, no-c-format
 msgid "union-subclass"
-msgstr ""
+msgstr "联合子类(union-subclass)"
 
-#: index.docbook:2123
-msgid "A third option is to map only the concrete classes of an inheritance hierarchy to tables, (the table-per-concrete-class strategy) where each table defines all persistent state of the class, including inherited state. In Hibernate, it is not absolutely necessary to explicitly map such inheritance hierarchies. You can simply map each class with a separate <literal>&lt;class&gt;</literal> declaration. However, if you wish use polymorphic associations (e.g. an association to the superclass of your hierarchy), you need to use the <literal>&lt;union-subclass&gt;</literal> mapping."
+#. Tag: para
+#: basic_mapping.xml:2123
+#, no-c-format
+msgid ""
+"A third option is to map only the concrete classes of an inheritance "
+"hierarchy to tables, (the table-per-concrete-class strategy) where each "
+"table defines all persistent state of the class, including inherited state. "
+"In Hibernate, it is not absolutely necessary to explicitly map such "
+"inheritance hierarchies. You can simply map each class with a separate "
+"<literal>&lt;class&gt;</literal> declaration. However, if you wish use "
+"polymorphic associations (e.g. an association to the superclass of your "
+"hierarchy), you need to use the <literal>&lt;union-subclass&gt;</literal> "
+"mapping."
 msgstr ""
+"第三种选择是仅仅映射类继承树中具体类部分到表中(每个具体类一张表的策略)。其"
+"中,每张表定义了类的所有持久化状态,包括继承的状态。在 Hibernate 中,并不需要"
+"完全显式地映射这样的继承树。你可以简单地使用单独的<literal>&lt;class&gt;</"
+"literal>定义映射每个类。然而,如果你想使用多态关联(例如,一个对类继承树中超类"
+"的关联),你需要使用<literal>&lt;union-subclass&gt;</literal>映射。"
 
-#: index.docbook:2141
+#. Tag: programlisting
+#: basic_mapping.xml:2141
+#, no-c-format
 msgid ""
-      "<![CDATA[<union-subclass\n"
-      "        name=\"ClassName\"\n"
-      "        table=\"tablename\"\n"
-      "        proxy=\"ProxyInterface\"\n"
-      "        lazy=\"true|false\"\n"
-      "        dynamic-update=\"true|false\"\n"
-      "        dynamic-insert=\"true|false\"\n"
-      "        schema=\"schema\"\n"
-      "        catalog=\"catalog\"\n"
-      "        extends=\"SuperclassName\"\n"
-      "        abstract=\"true|false\"\n"
-      "        persister=\"ClassName\"\n"
-      "        subselect=\"SQL expression\"\n"
-      "        entity-name=\"EntityName\"\n"
-      "        node=\"element-name\">\n"
-      "\n"
-      "        <property .... />\n"
-      "        .....\n"
-      "</union-subclass>]]>"
+"<![CDATA[<union-subclass\n"
+"        name=\"ClassName\"\n"
+"        table=\"tablename\"\n"
+"        proxy=\"ProxyInterface\"\n"
+"        lazy=\"true|false\"\n"
+"        dynamic-update=\"true|false\"\n"
+"        dynamic-insert=\"true|false\"\n"
+"        schema=\"schema\"\n"
+"        catalog=\"catalog\"\n"
+"        extends=\"SuperclassName\"\n"
+"        abstract=\"true|false\"\n"
+"        persister=\"ClassName\"\n"
+"        subselect=\"SQL expression\"\n"
+"        entity-name=\"EntityName\"\n"
+"        node=\"element-name\">\n"
+"\n"
+"        <property .... />\n"
+"        .....\n"
+"</union-subclass>]]>"
 msgstr ""
 
-#: index.docbook:2168
-msgid "No discriminator column or key column is required for this mapping strategy."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:2168
+#, no-c-format
+msgid ""
+"No discriminator column or key column is required for this mapping strategy."
+msgstr "这种映射策略不需要指定辨别标志(discriminator)字段。"
 
-#: index.docbook:2179
+#. Tag: title
+#: basic_mapping.xml:2179
+#, no-c-format
 msgid "join"
-msgstr ""
+msgstr "连接(join)"
 
-#: index.docbook:2181
-msgid "Using the <literal>&lt;join&gt;</literal> element, it is possible to map properties of one class to several tables, when there's a 1-to-1 relationship between the tables."
+#. Tag: para
+#: basic_mapping.xml:2181
+#, no-c-format
+msgid ""
+"Using the <literal>&lt;join&gt;</literal> element, it is possible to map "
+"properties of one class to several tables, when there's a 1-to-1 "
+"relationship between the tables."
 msgstr ""
+"使用 <literal>&lt;join&gt;</literal> 元素,假若在表之间存在一对一关联,可以将"
+"一个类的属性映射到多张表中。"
 
-#: index.docbook:2195
+#. Tag: programlisting
+#: basic_mapping.xml:2195
+#, no-c-format
 msgid ""
-      "<![CDATA[<join\n"
-      "        table=\"tablename\"\n"
-      "        schema=\"owner\"\n"
-      "        catalog=\"catalog\"\n"
-      "        fetch=\"join|select\"\n"
-      "        inverse=\"true|false\"\n"
-      "        optional=\"true|false\">\n"
-      "\n"
-      "        <key ... />\n"
-      "\n"
-      "        <property ... />\n"
-      "        ...\n"
-      "</join>]]>"
+"<![CDATA[<join\n"
+"        table=\"tablename\"\n"
+"        schema=\"owner\"\n"
+"        catalog=\"catalog\"\n"
+"        fetch=\"join|select\"\n"
+"        inverse=\"true|false\"\n"
+"        optional=\"true|false\">\n"
+"\n"
+"        <key ... />\n"
+"\n"
+"        <property ... />\n"
+"        ...\n"
+"</join>]]>"
 msgstr ""
 
-#: index.docbook:2199
+#. Tag: para
+#: basic_mapping.xml:2199
+#, no-c-format
 msgid "<literal>table</literal>: The name of the joined table."
-msgstr ""
+msgstr "<literal>table</literal>: 被连接表的名称。"
 
-#: index.docbook:2216
-msgid "<literal>fetch</literal> (optional - defaults to <literal>join</literal>): If set to <literal>join</literal>, the default, Hibernate will use an inner join to retrieve a <literal>&lt;join&gt;</literal> defined by a class or its superclasses and an outer join for a <literal>&lt;join&gt;</literal> defined by a subclass. If set to <literal>select</literal> then Hibernate will use a sequential select for a <literal>&lt;join&gt;</literal> defined on a subclass, which will be issued only if a row turns out to represent an instance of the subclass. Inner joins will still be used to retrieve a <literal>&lt;join&gt;</literal> defined by the class and its superclasses."
+#. Tag: para
+#: basic_mapping.xml:2216
+#, no-c-format
+msgid ""
+"<literal>fetch</literal> (optional - defaults to <literal>join</literal>): "
+"If set to <literal>join</literal>, the default, Hibernate will use an inner "
+"join to retrieve a <literal>&lt;join&gt;</literal> defined by a class or its "
+"superclasses and an outer join for a <literal>&lt;join&gt;</literal> defined "
+"by a subclass. If set to <literal>select</literal> then Hibernate will use a "
+"sequential select for a <literal>&lt;join&gt;</literal> defined on a "
+"subclass, which will be issued only if a row turns out to represent an "
+"instance of the subclass. Inner joins will still be used to retrieve a "
+"<literal>&lt;join&gt;</literal> defined by the class and its superclasses."
 msgstr ""
+"<literal>fetch</literal> (可选 - 默认是 <literal>join</literal>): 如果设置为"
+"默认值<literal>join</literal>, Hibernate 将使用一个内连接来得到这个类或其超"
+"类定义的<literal>&lt;join&gt;</literal>,而使用一个外连接来得到其子类定义的"
+"<literal>&lt;join&gt;</literal>。如果设置为<literal>select</literal>,则 "
+"Hibernate 将为子类定义的 <literal>&lt;join&gt;</literal>使用顺序选择。这仅在"
+"一行数据表示一个子类的对象的时候才会发生。对这个类和其超类定义的<literal>&lt;"
+"join&gt;</literal>,依然会使用内连接得到。"
 
-#: index.docbook:2229
-msgid "<literal>inverse</literal> (optional - defaults to <literal>false</literal>): If enabled, Hibernate will not try to insert or update the properties defined by this join."
+#. Tag: para
+#: basic_mapping.xml:2229
+#, no-c-format
+msgid ""
+"<literal>inverse</literal> (optional - defaults to <literal>false</"
+"literal>): If enabled, Hibernate will not try to insert or update the "
+"properties defined by this join."
 msgstr ""
+"<literal>inverse</literal> (可选 - 默认是 <literal>false</literal>): 如果打"
+"开,Hibernate 不会插入或者更新此连接定义的属性。"
 
-#: index.docbook:2236
-msgid "<literal>optional</literal> (optional - defaults to <literal>false</literal>): If enabled, Hibernate will insert a row only if the properties defined by this join are non-null and will always use an outer join to retrieve the properties."
+#. Tag: para
+#: basic_mapping.xml:2236
+#, no-c-format
+msgid ""
+"<literal>optional</literal> (optional - defaults to <literal>false</"
+"literal>): If enabled, Hibernate will insert a row only if the properties "
+"defined by this join are non-null and will always use an outer join to "
+"retrieve the properties."
 msgstr ""
+"<literal>optional</literal> (可选 - 默认是 <literal>false</literal>): 如果打"
+"开,Hibernate 只会在此连接定义的属性非空时插入一行数据,并且总是使用一个外连"
+"接来得到这些属性。"
 
-#: index.docbook:2245
-msgid "For example, the address information for a person can be mapped to a separate table (while preserving value type semantics for all properties):"
+#. Tag: para
+#: basic_mapping.xml:2245
+#, no-c-format
+msgid ""
+"For example, the address information for a person can be mapped to a "
+"separate table (while preserving value type semantics for all properties):"
 msgstr ""
+"例如,一个人(person)的地址(address)信息可以被映射到单独的表中(并保留所有属性"
+"的值类型语义):"
 
-#: index.docbook:2250
+#. Tag: programlisting
+#: basic_mapping.xml:2250
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\"\n"
-      "    table=\"PERSON\">\n"
-      "\n"
-      "    <id name=\"id\" column=\"PERSON_ID\">...</id>\n"
-      "\n"
-      "    <join table=\"ADDRESS\">\n"
-      "        <key column=\"ADDRESS_ID\"/>\n"
-      "        <property name=\"address\"/>\n"
-      "        <property name=\"zip\"/>\n"
-      "        <property name=\"country\"/>\n"
-      "    </join>\n"
-      "    ...]]>"
+"<![CDATA[<class name=\"Person\"\n"
+"    table=\"PERSON\">\n"
+"\n"
+"    <id name=\"id\" column=\"PERSON_ID\">...</id>\n"
+"\n"
+"    <join table=\"ADDRESS\">\n"
+"        <key column=\"ADDRESS_ID\"/>\n"
+"        <property name=\"address\"/>\n"
+"        <property name=\"zip\"/>\n"
+"        <property name=\"country\"/>\n"
+"    </join>\n"
+"    ...]]>"
 msgstr ""
 
-#: index.docbook:2252
-msgid "This feature is often only useful for legacy data models, we recommend fewer tables than classes and a fine-grained domain model. However, it is useful for switching between inheritance mapping strategies in a single hierarchy, as explained later."
+#. Tag: para
+#: basic_mapping.xml:2252
+#, no-c-format
+msgid ""
+"This feature is often only useful for legacy data models, we recommend fewer "
+"tables than classes and a fine-grained domain model. However, it is useful "
+"for switching between inheritance mapping strategies in a single hierarchy, "
+"as explained later."
 msgstr ""
+"此特性常常对遗留数据模型有用,我们推荐表个数比类个数少,以及细粒度的领域模"
+"型。然而,在单独的继承树上切换继承映射策略是有用的,后面会解释这点。"
 
-#: index.docbook:2262
+#. Tag: title
+#: basic_mapping.xml:2262
+#, no-c-format
 msgid "<title>key</title>"
 msgstr ""
 
-#: index.docbook:2264
-msgid "We've seen the <literal>&lt;key&gt;</literal> element crop up a few times now. It appears anywhere the parent mapping element defines a join to a new table, and defines the foreign key in the joined table, that references the primary key of the original table."
+#. Tag: para
+#: basic_mapping.xml:2264
+#, no-c-format
+msgid ""
+"We've seen the <literal>&lt;key&gt;</literal> element crop up a few times "
+"now. It appears anywhere the parent mapping element defines a join to a new "
+"table, and defines the foreign key in the joined table, that references the "
+"primary key of the original table."
 msgstr ""
+"我们目前已经见到过<literal>&lt;key&gt;</literal>元素多次了。 这个元素在父映射"
+"元素定义了对新表的连接,并且在被连接表中定义了一个外键引用原表的主键的情况下"
+"经常使用。"
 
-#: index.docbook:2280
+#. Tag: programlisting
+#: basic_mapping.xml:2280
+#, no-c-format
 msgid ""
-      "<![CDATA[<key\n"
-      "        column=\"columnname\"\n"
-      "        on-delete=\"noaction|cascade\"\n"
-      "        property-ref=\"propertyName\"\n"
-      "        not-null=\"true|false\"\n"
-      "        update=\"true|false\"\n"
-      "        unique=\"true|false\"\n"
-      "/>]]>"
+"<![CDATA[<key\n"
+"        column=\"columnname\"\n"
+"        on-delete=\"noaction|cascade\"\n"
+"        property-ref=\"propertyName\"\n"
+"        not-null=\"true|false\"\n"
+"        update=\"true|false\"\n"
+"        unique=\"true|false\"\n"
+"/>]]>"
 msgstr ""
 
-#: index.docbook:2291
-msgid "<literal>on-delete</literal> (optional, defaults to <literal>noaction</literal>): Specifies whether the foreign key constraint has database-level cascade delete enabled."
+#. Tag: para
+#: basic_mapping.xml:2291
+#, no-c-format
+msgid ""
+"<literal>on-delete</literal> (optional, defaults to <literal>noaction</"
+"literal>): Specifies whether the foreign key constraint has database-level "
+"cascade delete enabled."
 msgstr ""
+"<literal>on-delete</literal> (可选, 默认是 <literal>noaction</literal>): 表明"
+"外键关联是否打开数据库级别的级联删除。"
 
-#: index.docbook:2298
-msgid "<literal>property-ref</literal> (optional): Specifies that the foreign key refers to columns that are not the primary key of the orginal table. (Provided for legacy data.)"
+#. Tag: para
+#: basic_mapping.xml:2298
+#, no-c-format
+msgid ""
+"<literal>property-ref</literal> (optional): Specifies that the foreign key "
+"refers to columns that are not the primary key of the orginal table. "
+"(Provided for legacy data.)"
 msgstr ""
+"<literal>property-ref</literal> (可选): 表明外键引用的字段不是原表的主键(提供"
+"给遗留数据)。"
 
-#: index.docbook:2305
-msgid "<literal>not-null</literal> (optional): Specifies that the foreign key columns are not nullable (this is implied whenever the foreign key is also part of the primary key)."
+#. Tag: para
+#: basic_mapping.xml:2305
+#, no-c-format
+msgid ""
+"<literal>not-null</literal> (optional): Specifies that the foreign key "
+"columns are not nullable (this is implied whenever the foreign key is also "
+"part of the primary key)."
 msgstr ""
+"<literal>not-null</literal> (可选): 表明外键的字段不可为空(这意味着无论何时外"
+"键都是主键的一部分)。"
 
-#: index.docbook:2312
-msgid "<literal>update</literal> (optional): Specifies that the foreign key should never be updated (this is implied whenever the foreign key is also part of the primary key)."
+#. Tag: para
+#: basic_mapping.xml:2312
+#, no-c-format
+msgid ""
+"<literal>update</literal> (optional): Specifies that the foreign key should "
+"never be updated (this is implied whenever the foreign key is also part of "
+"the primary key)."
 msgstr ""
+"<literal>update</literal> (可选): 表明外键决不应该被更新(这意味着无论何时外键"
+"都是主键的一部分)。"
 
-#: index.docbook:2319
-msgid "<literal>unique</literal> (optional): Specifies that the foreign key should have a unique constraint (this is implied whenever the foreign key is also the primary key)."
+#. Tag: para
+#: basic_mapping.xml:2319
+#, no-c-format
+msgid ""
+"<literal>unique</literal> (optional): Specifies that the foreign key should "
+"have a unique constraint (this is implied whenever the foreign key is also "
+"the primary key)."
 msgstr ""
+"<literal>unique</literal> (可选): 表明外键应有唯一性约束 (这意味着无论何时外"
+"键都是主键的一部分)。"
 
-#: index.docbook:2327
-msgid "We recommend that for systems where delete performance is important, all keys should be defined <literal>on-delete=\"cascade\"</literal>, and Hibernate will use a database-level <literal>ON CASCADE DELETE</literal> constraint, instead of many individual <literal>DELETE</literal> statements. Be aware that this feature bypasses Hibernate's usual optimistic locking strategy for versioned data."
+#. Tag: para
+#: basic_mapping.xml:2327
+#, no-c-format
+msgid ""
+"We recommend that for systems where delete performance is important, all "
+"keys should be defined <literal>on-delete=\"cascade\"</literal>, and "
+"Hibernate will use a database-level <literal>ON CASCADE DELETE</literal> "
+"constraint, instead of many individual <literal>DELETE</literal> statements. "
+"Be aware that this feature bypasses Hibernate's usual optimistic locking "
+"strategy for versioned data."
 msgstr ""
+"对那些看重删除性能的系统,我们推荐所有的键都应该定义为<literal>on-delete="
+"\"cascade\"</literal>,这样 Hibernate 将使用数据库级的<literal>ON CASCADE "
+"DELETE</literal>约束,而不是多个<literal>DELETE</literal>语句。 注意,这个特"
+"性会绕过 Hibernate 通常对版本数据(versioned data)采用的乐观锁策略。"
 
-#: index.docbook:2335
-msgid "The <literal>not-null</literal> and <literal>update</literal> attributes are useful when mapping a unidirectional one to many association. If you map a unidirectional one to many to a non-nullable foreign key, you <emphasis>must</emphasis> declare the key column using <literal>&lt;key not-null=\"true\"&gt;</literal>."
+#. Tag: para
+#: basic_mapping.xml:2335
+#, no-c-format
+msgid ""
+"The <literal>not-null</literal> and <literal>update</literal> attributes are "
+"useful when mapping a unidirectional one to many association. If you map a "
+"unidirectional one to many to a non-nullable foreign key, you "
+"<emphasis>must</emphasis> declare the key column using <literal>&lt;key not-"
+"null=\"true\"&gt;</literal>."
 msgstr ""
+"<literal>not-null</literal> 和 <literal>update</literal> 属性在映射单向一对多"
+"关联的时候有用。如果你映射一个单向一对多关联到非空的(non-nullable)外键,你"
+"<emphasis>必须</emphasis> 用<literal>&lt;key not-null=\"true\"&gt;</literal>"
+"定义此键字段。"
 
-#: index.docbook:2345
+#. Tag: title
+#: basic_mapping.xml:2345
+#, no-c-format
 msgid "column and formula elements"
-msgstr ""
+msgstr "字段和规则元素(column and formula elements)"
 
-#: index.docbook:2346
-msgid "Any mapping element which accepts a <literal>column</literal> attribute will alternatively accept a <literal>&lt;column&gt;</literal> subelement. Likewise, <literal>&lt;formula&gt;</literal> is an alternative to the <literal>formula</literal> attribute."
+#. Tag: para
+#: basic_mapping.xml:2346
+#, no-c-format
+msgid ""
+"Any mapping element which accepts a <literal>column</literal> attribute will "
+"alternatively accept a <literal>&lt;column&gt;</literal> subelement. "
+"Likewise, <literal>&lt;formula&gt;</literal> is an alternative to the "
+"<literal>formula</literal> attribute."
 msgstr ""
+"任何接受<literal>column</literal>属性的映射元素都可以选择接受<literal>&lt;"
+"column&gt;</literal> 子元素。同样的,<literal>formula</literal>子元素也可以替"
+"换<literal>&lt;formula&gt;</literal>属性。"
 
-#: index.docbook:2352
+#. Tag: programlisting
+#: basic_mapping.xml:2352
+#, no-c-format
 msgid ""
-      "<![CDATA[<column\n"
-      "        name=\"column_name\"\n"
-      "        length=\"N\"\n"
-      "        precision=\"N\"\n"
-      "        scale=\"N\"\n"
-      "        not-null=\"true|false\"\n"
-      "        unique=\"true|false\"\n"
-      "        unique-key=\"multicolumn_unique_key_name\"\n"
-      "        index=\"index_name\"\n"
-      "        sql-type=\"sql_type_name\"\n"
-      "        check=\"SQL expression\"\n"
-      "        default=\"SQL expression\"/>]]>"
+"<![CDATA[<column\n"
+"        name=\"column_name\"\n"
+"        length=\"N\"\n"
+"        precision=\"N\"\n"
+"        scale=\"N\"\n"
+"        not-null=\"true|false\"\n"
+"        unique=\"true|false\"\n"
+"        unique-key=\"multicolumn_unique_key_name\"\n"
+"        index=\"index_name\"\n"
+"        sql-type=\"sql_type_name\"\n"
+"        check=\"SQL expression\"\n"
+"        default=\"SQL expression\"/>]]>"
 msgstr ""
 
-#: index.docbook:2354
+#. Tag: programlisting
+#: basic_mapping.xml:2354
+#, no-c-format
 msgid "<![CDATA[<formula>SQL expression</formula>]]>"
 msgstr ""
 
-#: index.docbook:2356
-msgid "<literal>column</literal> and <literal>formula</literal> attributes may even be combined within the same property or association mapping to express, for example, exotic join conditions."
+#. Tag: para
+#: basic_mapping.xml:2356
+#, no-c-format
+msgid ""
+"<literal>column</literal> and <literal>formula</literal> attributes may even "
+"be combined within the same property or association mapping to express, for "
+"example, exotic join conditions."
 msgstr ""
+"<literal>column</literal> 和 <literal>formula</literal> 属性甚至可以在同一个"
+"属性或关联映射中被合并来表达,例如,一些奇异的连接条件。"
 
-#: index.docbook:2362
+#. Tag: programlisting
+#: basic_mapping.xml:2362
+#, no-c-format
 msgid ""
-      "<![CDATA[<many-to-one name=\"homeAddress\" class=\"Address\"\n"
-      "        insert=\"false\" update=\"false\">\n"
-      "    <column name=\"person_id\" not-null=\"true\" length=\"10\"/>\n"
-      "    <formula>'MAILING'</formula>\n"
-      "</many-to-one>]]>"
+"<![CDATA[<many-to-one name=\"homeAddress\" class=\"Address\"\n"
+"        insert=\"false\" update=\"false\">\n"
+"    <column name=\"person_id\" not-null=\"true\" length=\"10\"/>\n"
+"    <formula>'MAILING'</formula>\n"
+"</many-to-one>]]>"
 msgstr ""
 
-#: index.docbook:2367
+#. Tag: title
+#: basic_mapping.xml:2367
+#, no-c-format
 msgid "import"
-msgstr ""
+msgstr "引用(import)"
 
-#: index.docbook:2369
-msgid "Suppose your application has two persistent classes with the same name, and you don't want to specify the fully qualified (package) name in Hibernate queries. Classes may be \"imported\" explicitly, rather than relying upon <literal>auto-import=\"true\"</literal>. You may even import classes and interfaces that are not explicitly mapped."
+#. Tag: para
+#: basic_mapping.xml:2369
+#, no-c-format
+msgid ""
+"Suppose your application has two persistent classes with the same name, and "
+"you don't want to specify the fully qualified (package) name in Hibernate "
+"queries. Classes may be \"imported\" explicitly, rather than relying upon "
+"<literal>auto-import=\"true\"</literal>. You may even import classes and "
+"interfaces that are not explicitly mapped."
 msgstr ""
+"假设你的应用程序有两个同样名字的持久化类,但是你不想在Hibernate查询中使用他们"
+"的全限定名。除了依赖<literal>auto-import=\"true\"</literal>以外,类也可以被显"
+"式地“import(引用)”。你甚至可以引用没有被明确映射的类和接口。"
 
-#: index.docbook:2376
+#. Tag: programlisting
+#: basic_mapping.xml:2376
+#, no-c-format
 msgid "<![CDATA[<import class=\"java.lang.Object\" rename=\"Universe\"/>]]>"
 msgstr ""
 
-#: index.docbook:2383
+#. Tag: programlisting
+#: basic_mapping.xml:2383
+#, no-c-format
 msgid ""
-      "<![CDATA[<import\n"
-      "        class=\"ClassName\"\n"
-      "        rename=\"ShortName\"\n"
-      "/>]]>"
+"<![CDATA[<import\n"
+"        class=\"ClassName\"\n"
+"        rename=\"ShortName\"\n"
+"/>]]>"
 msgstr ""
 
-#: index.docbook:2386
-msgid "<literal>class</literal>: The fully qualified class name of of any Java class."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:2386
+#, no-c-format
+msgid ""
+"<literal>class</literal>: The fully qualified class name of of any Java "
+"class."
+msgstr "<literal>class</literal>: 任何Java类的全限定名。"
 
-#: index.docbook:2391
-msgid "<literal>rename</literal> (optional - defaults to the unqualified class name): A name that may be used in the query language."
+#. Tag: para
+#: basic_mapping.xml:2391
+#, no-c-format
+msgid ""
+"<literal>rename</literal> (optional - defaults to the unqualified class "
+"name): A name that may be used in the query language."
 msgstr ""
+"<literal>rename</literal> (可选 - 默认为类的全限定名): 在查询语句中可以使用的"
+"名字。"
 
-#: index.docbook:2402
+#. Tag: title
+#: basic_mapping.xml:2402
+#, no-c-format
 msgid "<title>any</title>"
 msgstr ""
 
-#: index.docbook:2404
-msgid "There is one further type of property mapping. The <literal>&lt;any&gt;</literal> mapping element defines a polymorphic association to classes from multiple tables. This type of mapping always requires more than one column. The first column holds the type of the associated entity. The remaining columns hold the identifier. It is impossible to specify a foreign key constraint for this kind of association, so this is most certainly not meant as the usual way of mapping (polymorphic) associations. You should use this only in very special cases (eg. audit logs, user session data, etc)."
+#. Tag: para
+#: basic_mapping.xml:2404
+#, no-c-format
+msgid ""
+"There is one further type of property mapping. The <literal>&lt;any&gt;</"
+"literal> mapping element defines a polymorphic association to classes from "
+"multiple tables. This type of mapping always requires more than one column. "
+"The first column holds the type of the associated entity. The remaining "
+"columns hold the identifier. It is impossible to specify a foreign key "
+"constraint for this kind of association, so this is most certainly not meant "
+"as the usual way of mapping (polymorphic) associations. You should use this "
+"only in very special cases (eg. audit logs, user session data, etc)."
 msgstr ""
+"这是属性映射的又一种类型。<literal>&lt;any&gt;</literal> 映射元素定义了一种从"
+"多个表到类的多态关联。这种类型的映射常常需要多于一个字段。第一个字段持有被关"
+"联实体的类型,其他的字段持有标识符。对这种类型的关联来说,不可能指定一个外键"
+"约束,所以这当然不是映射(多态)关联的通常的方式。你只应该在非常特殊的情况下使"
+"用它(比如,审计log,用户会话数据等等)。"
 
-#: index.docbook:2414
-msgid "The <literal>meta-type</literal> attribute lets the application specify a custom type that maps database column values to persistent classes which have identifier properties of the type specified by <literal>id-type</literal>. You must specify the mapping from values of the meta-type to class names."
+#. Tag: para
+#: basic_mapping.xml:2414
+#, no-c-format
+msgid ""
+"The <literal>meta-type</literal> attribute lets the application specify a "
+"custom type that maps database column values to persistent classes which "
+"have identifier properties of the type specified by <literal>id-type</"
+"literal>. You must specify the mapping from values of the meta-type to class "
+"names."
 msgstr ""
+"<literal>meta-type</literal> 属性使得应用程序能指定一个将数据库字段的值映射到"
+"持久化类的自定义类型。这个持久化类包含有用<literal>id-type</literal>指定的标"
+"识符属性。 你必须指定从meta-type的值到类名的映射。"
 
-#: index.docbook:2421
+#. Tag: programlisting
+#: basic_mapping.xml:2421
+#, no-c-format
 msgid ""
-      "<![CDATA[<any name=\"being\" id-type=\"long\" meta-type=\"string\">\n"
-      "    <meta-value value=\"TBL_ANIMAL\" class=\"Animal\"/>\n"
-      "    <meta-value value=\"TBL_HUMAN\" class=\"Human\"/>\n"
-      "    <meta-value value=\"TBL_ALIEN\" class=\"Alien\"/>\n"
-      "    <column name=\"table_name\"/>\n"
-      "    <column name=\"id\"/>\n"
-      "</any>]]>"
+"<![CDATA[<any name=\"being\" id-type=\"long\" meta-type=\"string\">\n"
+"    <meta-value value=\"TBL_ANIMAL\" class=\"Animal\"/>\n"
+"    <meta-value value=\"TBL_HUMAN\" class=\"Human\"/>\n"
+"    <meta-value value=\"TBL_ALIEN\" class=\"Alien\"/>\n"
+"    <column name=\"table_name\"/>\n"
+"    <column name=\"id\"/>\n"
+"</any>]]>"
 msgstr ""
 
-#: index.docbook:2432
+#. Tag: programlisting
+#: basic_mapping.xml:2432
+#, no-c-format
 msgid ""
-      "<![CDATA[<any\n"
-      "        name=\"propertyName\"\n"
-      "        id-type=\"idtypename\"\n"
-      "        meta-type=\"metatypename\"\n"
-      "        cascade=\"cascade_style\"\n"
-      "        access=\"field|property|ClassName\"\n"
-      "        optimistic-lock=\"true|false\"\n"
-      ">\n"
-      "        <meta-value ... />\n"
-      "        <meta-value ... />\n"
-      "        .....\n"
-      "        <column .... />\n"
-      "        <column .... />\n"
-      "        .....\n"
-      "</any>]]>"
+"<![CDATA[<any\n"
+"        name=\"propertyName\"\n"
+"        id-type=\"idtypename\"\n"
+"        meta-type=\"metatypename\"\n"
+"        cascade=\"cascade_style\"\n"
+"        access=\"field|property|ClassName\"\n"
+"        optimistic-lock=\"true|false\"\n"
+">\n"
+"        <meta-value ... />\n"
+"        <meta-value ... />\n"
+"        .....\n"
+"        <column .... />\n"
+"        <column .... />\n"
+"        .....\n"
+"</any>]]>"
 msgstr ""
 
-#: index.docbook:2435
+#. Tag: para
+#: basic_mapping.xml:2435
+#, no-c-format
 msgid "<literal>name</literal>: the property name."
-msgstr ""
+msgstr "<literal>name</literal>: 属性名"
 
-#: index.docbook:2440
+#. Tag: para
+#: basic_mapping.xml:2440
+#, no-c-format
 msgid "<literal>id-type</literal>: the identifier type."
-msgstr ""
+msgstr "<literal>id-type</literal>: 标识符类型"
 
-#: index.docbook:2445
-msgid "<literal>meta-type</literal> (optional - defaults to <literal>string</literal>): Any type that is allowed for a discriminator mapping."
+#. Tag: para
+#: basic_mapping.xml:2445
+#, no-c-format
+msgid ""
+"<literal>meta-type</literal> (optional - defaults to <literal>string</"
+"literal>): Any type that is allowed for a discriminator mapping."
 msgstr ""
+"<literal>meta-type</literal> (可选 -默认是 <literal>string</literal>): 允许辨"
+"别标志(discriminator)映射的任何类型"
 
-#: index.docbook:2451
-msgid "<literal>cascade</literal> (optional- defaults to <literal>none</literal>): the cascade style."
+#. Tag: para
+#: basic_mapping.xml:2451
+#, no-c-format
+msgid ""
+"<literal>cascade</literal> (optional- defaults to <literal>none</literal>): "
+"the cascade style."
 msgstr ""
+"<literal>cascade</literal> (可选 -默认是<literal>none</literal>): 级联的类型"
 
-#: index.docbook:2463
-msgid "<literal>optimistic-lock</literal> (optional - defaults to <literal>true</literal>): Specifies that updates to this property do or do not require acquisition of the optimistic lock. In other words, define if a version increment should occur if this property is dirty."
+#. Tag: para
+#: basic_mapping.xml:2463
+#, no-c-format
+msgid ""
+"<literal>optimistic-lock</literal> (optional - defaults to <literal>true</"
+"literal>): Specifies that updates to this property do or do not require "
+"acquisition of the optimistic lock. In other words, define if a version "
+"increment should occur if this property is dirty."
 msgstr ""
+"<literal>optimistic-lock</literal> (可选 -默认是 <literal>true</literal>): 表"
+"明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号"
+"(Version)"
 
-#: index.docbook:2478
+#. Tag: title
+#: basic_mapping.xml:2478
+#, no-c-format
 msgid "Hibernate Types"
-msgstr ""
+msgstr "Hibernate 的类型"
 
-#: index.docbook:2481
+#. Tag: title
+#: basic_mapping.xml:2481
+#, no-c-format
 msgid "Entities and values"
-msgstr ""
+msgstr "实体(Entities)和值(values)"
 
-#: index.docbook:2483
-msgid "To understand the behaviour of various Java language-level objects with respect to the persistence service, we need to classify them into two groups:"
+#. Tag: para
+#: basic_mapping.xml:2483
+#, no-c-format
+msgid ""
+"To understand the behaviour of various Java language-level objects with "
+"respect to the persistence service, we need to classify them into two groups:"
 msgstr ""
+"为了理解很多与持久化服务相关的Java语言级对象的行为,我们需要把它们分为两类:"
 
-#: index.docbook:2488
-msgid "An <emphasis>entity</emphasis> exists independently of any other objects holding references to the entity. Contrast this with the usual Java model where an unreferenced object is garbage collected. Entities must be explicitly saved and deleted (except that saves and deletions may be <emphasis>cascaded</emphasis> from a parent entity to its children). This is different from the ODMG model of object persistence by reachablity - and corresponds more closely to how application objects are usually used in large systems. Entities support circular and shared references. They may also be versioned."
+#. Tag: para
+#: basic_mapping.xml:2488
+#, no-c-format
+msgid ""
+"An <emphasis>entity</emphasis> exists independently of any other objects "
+"holding references to the entity. Contrast this with the usual Java model "
+"where an unreferenced object is garbage collected. Entities must be "
+"explicitly saved and deleted (except that saves and deletions may be "
+"<emphasis>cascaded</emphasis> from a parent entity to its children). This is "
+"different from the ODMG model of object persistence by reachablity - and "
+"corresponds more closely to how application objects are usually used in "
+"large systems. Entities support circular and shared references. They may "
+"also be versioned."
 msgstr ""
+"<emphasis>实体entity</emphasis> 独立于任何持有实体引用的对象。与通常的Java模"
+"型相比,不再被引用的对象会被当作垃圾收集掉。实体必须被显式的保存和删除(除非保"
+"存和删除是从父实体向子实体引发的<emphasis>级联</emphasis>)。这和ODMG模型中关"
+"于对象通过可触及保持持久性有一些不同——比较起来更加接近应用程序对象通常在一个"
+"大系统中的使用方法。实体支持循环引用和交叉引用,它们也可以加上版本信息。"
 
-#: index.docbook:2499
-msgid "An entity's persistent state consists of references to other entities and instances of <emphasis>value</emphasis> types. Values are primitives, collections (not what's inside a collection), components and certain immutable objects. Unlike entities, values (in particular collections and components) <emphasis>are</emphasis> persisted and deleted by reachability. Since value objects (and primitives) are persisted and deleted along with their containing entity they may not be independently versioned. Values have no independent identity, so they cannot be shared by two entities or collections."
+#. Tag: para
+#: basic_mapping.xml:2499
+#, no-c-format
+msgid ""
+"An entity's persistent state consists of references to other entities and "
+"instances of <emphasis>value</emphasis> types. Values are primitives, "
+"collections (not what's inside a collection), components and certain "
+"immutable objects. Unlike entities, values (in particular collections and "
+"components) <emphasis>are</emphasis> persisted and deleted by reachability. "
+"Since value objects (and primitives) are persisted and deleted along with "
+"their containing entity they may not be independently versioned. Values have "
+"no independent identity, so they cannot be shared by two entities or "
+"collections."
 msgstr ""
+"一个实体的持久状态包含指向其他实体和<emphasis>值</emphasis>类型实例的引用。值"
+"可以是原始类型,集合(不是集合中的对象),组件或者特定的不可变对象。与实体不"
+"同,值(特别是集合和组件)是通过可触及性来进行持久化和删除的。因为值对象(和原始"
+"类型数据)是随着包含他们的实体而被持久化和删除的,他们不能被独立的加上版本信"
+"息。值没有独立的标识,所以他们不能被两个实体或者集合共享。"
 
-#: index.docbook:2510
-msgid "Up until now, we've been using the term \"persistent class\" to refer to entities. We will continue to do that. Strictly speaking, however, not all user-defined classes with persistent state are entities. A <emphasis>component</emphasis> is a user defined class with value semantics. A Java property of type <literal>java.lang.String</literal> also has value semantics. Given this definition, we can say that all types (classes) provided by the JDK have value type semantics in Java, while user-defined types may be mapped with entity or value type semantics. This decision is up to the application developer. A good hint for an entity class in a domain model are shared references to a single instance of that class, while composition or aggregation usually translates to a value type."
+#. Tag: para
+#: basic_mapping.xml:2510
+#, no-c-format
+msgid ""
+"Up until now, we've been using the term \"persistent class\" to refer to "
+"entities. We will continue to do that. Strictly speaking, however, not all "
+"user-defined classes with persistent state are entities. A "
+"<emphasis>component</emphasis> is a user defined class with value semantics. "
+"A Java property of type <literal>java.lang.String</literal> also has value "
+"semantics. Given this definition, we can say that all types (classes) "
+"provided by the JDK have value type semantics in Java, while user-defined "
+"types may be mapped with entity or value type semantics. This decision is up "
+"to the application developer. A good hint for an entity class in a domain "
+"model are shared references to a single instance of that class, while "
+"composition or aggregation usually translates to a value type."
 msgstr ""
+"直到现在,我们都一直使用术语“持久类”(persistent class)来代表实体。我们仍然会"
+"这么做。 然而严格说来,不是所有的用户自定义的,带有持久化状态的类都是实体。"
+"<emphasis>组件</emphasis>就是用户自定义类,却是值语义的。<literal>java.lang."
+"String</literal>类型的java属性也是值语义的。给了这个定义以后,我们可以说所有"
+"JDK提供的类型(类)都是值类型的语义,而用于自定义类型可能被映射为实体类型或值类"
+"型语义。采用哪种类型的语义取决于开发人员。在领域模型中,寻找实体类的一个好线"
+"索是共享引用指向这个类的单一实例,而组合或聚合通常被转化为值类型。"
 
-#: index.docbook:2524
+#. Tag: para
+#: basic_mapping.xml:2524
+#, no-c-format
 msgid "We'll revisit both concepts throughout the documentation."
-msgstr ""
+msgstr "我们会在本文档中重复碰到这两个概念。"
 
-#: index.docbook:2528
-msgid "The challenge is to map the Java type system (and the developers' definition of entities and value types) to the SQL/database type system. The bridge between both systems is provided by Hibernate: for entities we use <literal>&lt;class&gt;</literal>, <literal>&lt;subclass&gt;</literal> and so on. For value types we use <literal>&lt;property&gt;</literal>, <literal>&lt;component&gt;</literal>, etc, usually with a <literal>type</literal> attribute. The value of this attribute is the name of a Hibernate <emphasis>mapping type</emphasis>. Hibernate provides many mappings (for standard JDK value types) out of the box. You can write your own mapping types and implement your custom conversion strategies as well, as you'll see later."
+#. Tag: para
+#: basic_mapping.xml:2528
+#, no-c-format
+msgid ""
+"The challenge is to map the Java type system (and the developers' definition "
+"of entities and value types) to the SQL/database type system. The bridge "
+"between both systems is provided by Hibernate: for entities we use "
+"<literal>&lt;class&gt;</literal>, <literal>&lt;subclass&gt;</literal> and so "
+"on. For value types we use <literal>&lt;property&gt;</literal>, <literal>&lt;"
+"component&gt;</literal>, etc, usually with a <literal>type</literal> "
+"attribute. The value of this attribute is the name of a Hibernate "
+"<emphasis>mapping type</emphasis>. Hibernate provides many mappings (for "
+"standard JDK value types) out of the box. You can write your own mapping "
+"types and implement your custom conversion strategies as well, as you'll see "
+"later."
 msgstr ""
+"挑战在于将java类型系统(和开发者定义的实体和值类型)映射到 SQL/数据库类型系统。"
+"Hibernate提供了连接两个系统之间的桥梁:对于实体类型,我们使用<literal>&lt;"
+"class&gt;</literal>, <literal>&lt;subclass&gt;</literal> 等等。对于值类型,我"
+"们使用 <literal>&lt;property&gt;</literal>, <literal>&lt;component&gt;</"
+"literal> 及其他,通常跟随着<literal>type</literal>属性。这个属性的值是"
+"Hibernate 的<emphasis>映射类型</emphasis>的名字。Hibernate提供了许多现成的映"
+"射(标准的JDK值类型)。你也可以编写自己的映射类型并实现自定义的变换策略,随后我"
+"们会看到这点。"
 
-#: index.docbook:2541
+#. Tag: para
+#: basic_mapping.xml:2541
+#, no-c-format
 msgid "All built-in Hibernate types except collections support null semantics."
-msgstr ""
+msgstr "所有的Hibernate内建类型,除了collections以外,都支持空(null)语义。"
 
-#: index.docbook:2548
+#. Tag: title
+#: basic_mapping.xml:2548
+#, no-c-format
 msgid "Basic value types"
-msgstr ""
+msgstr "基本值类型"
 
-#: index.docbook:2550
-msgid "The built-in <emphasis>basic mapping types</emphasis> may be roughly categorized into"
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:2550
+#, fuzzy, no-c-format
+msgid ""
+"The built-in <emphasis>basic mapping types</emphasis> may be roughly "
+"categorized into"
+msgstr "内建的 <emphasis>基本映射类型</emphasis>可以大致分为 <placeholder-1/>"
 
-#: index.docbook:2555
-msgid "integer, long, short, float, double, character, byte, boolean, yes_no, true_false"
+#. Tag: literal
+#: basic_mapping.xml:2555
+#, no-c-format
+msgid ""
+"integer, long, short, float, double, character, byte, boolean, yes_no, "
+"true_false"
 msgstr ""
+"integer, long, short, float, double, character, byte, boolean, yes_no, "
+"true_false"
 
-#: index.docbook:2558
-msgid "Type mappings from Java primitives or wrapper classes to appropriate (vendor-specific) SQL column types. <literal>boolean, yes_no</literal> and <literal>true_false</literal> are all alternative encodings for a Java <literal>boolean</literal> or <literal>java.lang.Boolean</literal>."
+#. Tag: para
+#: basic_mapping.xml:2558
+#, no-c-format
+msgid ""
+"Type mappings from Java primitives or wrapper classes to appropriate (vendor-"
+"specific) SQL column types. <literal>boolean, yes_no</literal> and "
+"<literal>true_false</literal> are all alternative encodings for a Java "
+"<literal>boolean</literal> or <literal>java.lang.Boolean</literal>."
 msgstr ""
+"这些类型都对应Java的原始类型或者其封装类,来符合(特定厂商的)SQL 字段类型。"
+"<literal>boolean, yes_no</literal> 和 <literal>true_false</literal>都是Java "
+"中<literal>boolean</literal> 或者<literal>java.lang.Boolean</literal>的另外说"
+"法。"
 
-#: index.docbook:2567
+#. Tag: literal
+#: basic_mapping.xml:2567
+#, no-c-format
 msgid "string"
-msgstr ""
+msgstr "string"
 
-#: index.docbook:2569
-msgid "A type mapping from <literal>java.lang.String</literal> to <literal>VARCHAR</literal> (or Oracle <literal>VARCHAR2</literal>)."
+#. Tag: para
+#: basic_mapping.xml:2569
+#, no-c-format
+msgid ""
+"A type mapping from <literal>java.lang.String</literal> to <literal>VARCHAR</"
+"literal> (or Oracle <literal>VARCHAR2</literal>)."
 msgstr ""
+"从<literal>java.lang.String</literal> 到 <literal>VARCHAR</literal> (或者 "
+"Oracle的 <literal>VARCHAR2</literal>)的映射。"
 
-#: index.docbook:2576
+#. Tag: literal
+#: basic_mapping.xml:2576
+#, no-c-format
 msgid "date, time, timestamp"
-msgstr ""
+msgstr "date, time, timestamp"
 
-#: index.docbook:2578
-msgid "Type mappings from <literal>java.util.Date</literal> and its subclasses to SQL types <literal>DATE</literal>, <literal>TIME</literal> and <literal>TIMESTAMP</literal> (or equivalent)."
+#. Tag: para
+#: basic_mapping.xml:2578
+#, no-c-format
+msgid ""
+"Type mappings from <literal>java.util.Date</literal> and its subclasses to "
+"SQL types <literal>DATE</literal>, <literal>TIME</literal> and "
+"<literal>TIMESTAMP</literal> (or equivalent)."
 msgstr ""
+"从<literal>java.util.Date</literal>和其子类到SQL类型<literal>DATE</literal>, "
+"<literal>TIME</literal> 和<literal>TIMESTAMP</literal> (或等价类型)的映射。"
 
-#: index.docbook:2586
+#. Tag: literal
+#: basic_mapping.xml:2586
+#, no-c-format
 msgid "calendar, calendar_date"
-msgstr ""
+msgstr "calendar, calendar_date"
 
-#: index.docbook:2588
-msgid "Type mappings from <literal>java.util.Calendar</literal> to SQL types <literal>TIMESTAMP</literal> and <literal>DATE</literal> (or equivalent)."
+#. Tag: para
+#: basic_mapping.xml:2588
+#, no-c-format
+msgid ""
+"Type mappings from <literal>java.util.Calendar</literal> to SQL types "
+"<literal>TIMESTAMP</literal> and <literal>DATE</literal> (or equivalent)."
 msgstr ""
+"从<literal>java.util.Calendar</literal> 到SQL 类型<literal>TIMESTAMP</"
+"literal>和 <literal>DATE</literal>(或等价类型)的映射。"
 
-#: index.docbook:2596
+#. Tag: literal
+#: basic_mapping.xml:2596
+#, no-c-format
 msgid "big_decimal, big_integer"
-msgstr ""
+msgstr "big_decimal, big_integer"
 
-#: index.docbook:2598
-msgid "Type mappings from <literal>java.math.BigDecimal</literal> and <literal>java.math.BigInteger</literal> to <literal>NUMERIC</literal> (or Oracle <literal>NUMBER</literal>)."
+#. Tag: para
+#: basic_mapping.xml:2598
+#, no-c-format
+msgid ""
+"Type mappings from <literal>java.math.BigDecimal</literal> and <literal>java."
+"math.BigInteger</literal> to <literal>NUMERIC</literal> (or Oracle "
+"<literal>NUMBER</literal>)."
 msgstr ""
+"从<literal>java.math.BigDecimal</literal>和<literal>java.math.BigInteger</"
+"literal>到<literal>NUMERIC</literal> (或者 Oracle 的<literal>NUMBER</literal>"
+"类型)的映射。"
 
-#: index.docbook:2606
+#. Tag: literal
+#: basic_mapping.xml:2606
+#, no-c-format
 msgid "locale, timezone, currency"
-msgstr ""
+msgstr "locale, timezone, currency"
 
-#: index.docbook:2608
-msgid "Type mappings from <literal>java.util.Locale</literal>, <literal>java.util.TimeZone</literal> and <literal>java.util.Currency</literal> to <literal>VARCHAR</literal> (or Oracle <literal>VARCHAR2</literal>). Instances of <literal>Locale</literal> and <literal>Currency</literal> are mapped to their ISO codes. Instances of <literal>TimeZone</literal> are mapped to their <literal>ID</literal>."
+#. Tag: para
+#: basic_mapping.xml:2608
+#, no-c-format
+msgid ""
+"Type mappings from <literal>java.util.Locale</literal>, <literal>java.util."
+"TimeZone</literal> and <literal>java.util.Currency</literal> to "
+"<literal>VARCHAR</literal> (or Oracle <literal>VARCHAR2</literal>). "
+"Instances of <literal>Locale</literal> and <literal>Currency</literal> are "
+"mapped to their ISO codes. Instances of <literal>TimeZone</literal> are "
+"mapped to their <literal>ID</literal>."
 msgstr ""
+"从<literal>java.util.Locale</literal>, <literal>java.util.TimeZone</literal> "
+"和<literal>java.util.Currency</literal> 到<literal>VARCHAR</literal> (或者 "
+"Oracle 的<literal>VARCHAR2</literal>类型)的映射. <literal>Locale</literal>和 "
+"<literal>Currency</literal> 的实例被映射为它们的ISO代码。<literal>TimeZone</"
+"literal>的实例被影射为它的<literal>ID</literal>。"
 
-#: index.docbook:2620
+#. Tag: literal
+#: basic_mapping.xml:2620
+#, fuzzy, no-c-format
 msgid "<literal>class</literal>"
-msgstr ""
+msgstr "<literal>all(全部)</literal> 检查全部字段"
 
-#: index.docbook:2622
-msgid "A type mapping from <literal>java.lang.Class</literal> to <literal>VARCHAR</literal> (or Oracle <literal>VARCHAR2</literal>). A <literal>Class</literal> is mapped to its fully qualified name."
+#. Tag: para
+#: basic_mapping.xml:2622
+#, no-c-format
+msgid ""
+"A type mapping from <literal>java.lang.Class</literal> to <literal>VARCHAR</"
+"literal> (or Oracle <literal>VARCHAR2</literal>). A <literal>Class</literal> "
+"is mapped to its fully qualified name."
 msgstr ""
+"从<literal>java.lang.Class</literal> 到 <literal>VARCHAR</literal> (或者 "
+"Oracle 的<literal>VARCHAR2</literal>类型)的映射。<literal>Class</literal>被映"
+"射为它的全限定名。"
 
-#: index.docbook:2630
+#. Tag: literal
+#: basic_mapping.xml:2630
+#, no-c-format
 msgid "binary"
-msgstr ""
+msgstr "binary"
 
-#: index.docbook:2632
+#. Tag: para
+#: basic_mapping.xml:2632
+#, no-c-format
 msgid "Maps byte arrays to an appropriate SQL binary type."
-msgstr ""
+msgstr "把字节数组(byte arrays)映射为对应的 SQL二进制类型。"
 
-#: index.docbook:2638
+#. Tag: literal
+#: basic_mapping.xml:2638
+#, no-c-format
 msgid "text"
-msgstr ""
+msgstr "text"
 
-#: index.docbook:2640
-msgid "Maps long Java strings to a SQL <literal>CLOB</literal> or <literal>TEXT</literal> type."
+#. Tag: para
+#: basic_mapping.xml:2640
+#, no-c-format
+msgid ""
+"Maps long Java strings to a SQL <literal>CLOB</literal> or <literal>TEXT</"
+"literal> type."
 msgstr ""
+"把长Java字符串映射为SQL的<literal>CLOB</literal>或者<literal>TEXT</literal>类"
+"型。"
 
-#: index.docbook:2647
+#. Tag: literal
+#: basic_mapping.xml:2647
+#, no-c-format
 msgid "serializable"
-msgstr ""
+msgstr "serializable"
 
-#: index.docbook:2649
-msgid "Maps serializable Java types to an appropriate SQL binary type. You may also indicate the Hibernate type <literal>serializable</literal> with the name of a serializable Java class or interface that does not default to a basic type."
+#. Tag: para
+#: basic_mapping.xml:2649
+#, no-c-format
+msgid ""
+"Maps serializable Java types to an appropriate SQL binary type. You may also "
+"indicate the Hibernate type <literal>serializable</literal> with the name of "
+"a serializable Java class or interface that does not default to a basic type."
 msgstr ""
+"把可序列化的Java类型映射到对应的SQL二进制类型。你也可以为一个并非默认为基本类"
+"型的可序列化Java类或者接口指定Hibernate类型<literal>serializable</literal>。"
 
-#: index.docbook:2658
+#. Tag: literal
+#: basic_mapping.xml:2658
+#, no-c-format
 msgid "clob, blob"
-msgstr ""
+msgstr "clob, blob"
 
-#: index.docbook:2660
-msgid "Type mappings for the JDBC classes <literal>java.sql.Clob</literal> and <literal>java.sql.Blob</literal>. These types may be inconvenient for some applications, since the blob or clob object may not be reused outside of a transaction. (Furthermore, driver support is patchy and inconsistent.)"
+#. Tag: para
+#: basic_mapping.xml:2660
+#, no-c-format
+msgid ""
+"Type mappings for the JDBC classes <literal>java.sql.Clob</literal> and "
+"<literal>java.sql.Blob</literal>. These types may be inconvenient for some "
+"applications, since the blob or clob object may not be reused outside of a "
+"transaction. (Furthermore, driver support is patchy and inconsistent.)"
 msgstr ""
+"JDBC 类 <literal>java.sql.Clob</literal> 和 <literal>java.sql.Blob</literal>"
+"的映射。某些程序可能不适合使用这个类型,因为blob和clob对象可能在一个事务之外"
+"是无法重用的。(而且, 驱动程序对这种类型的支持充满着补丁和前后矛盾。)"
 
-#: index.docbook:2670
-msgid "imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, imm_serializable, imm_binary"
+#. Tag: literal
+#: basic_mapping.xml:2670
+#, no-c-format
+msgid ""
+"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, "
+"imm_serializable, imm_binary"
 msgstr ""
+"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, "
+"imm_serializable, imm_binary"
 
-#: index.docbook:2674
-msgid "Type mappings for what are usually considered mutable Java types, where Hibernate makes certain optimizations appropriate only for immutable Java types, and the application treats the object as immutable. For example, you should not call <literal>Date.setTime()</literal> for an instance mapped as <literal>imm_timestamp</literal>. To change the value of the property, and have that change made persistent, the application must assign a new (nonidentical) object to the property."
+#. Tag: para
+#: basic_mapping.xml:2674
+#, no-c-format
+msgid ""
+"Type mappings for what are usually considered mutable Java types, where "
+"Hibernate makes certain optimizations appropriate only for immutable Java "
+"types, and the application treats the object as immutable. For example, you "
+"should not call <literal>Date.setTime()</literal> for an instance mapped as "
+"<literal>imm_timestamp</literal>. To change the value of the property, and "
+"have that change made persistent, the application must assign a new "
+"(nonidentical) object to the property."
 msgstr ""
+"一般来说,映射类型被假定为是可变的Java类型,只有对不可变Java类型,Hibernate会"
+"采取特定的优化措施,应用程序会把这些对象作为不可变对象处理。比如,你不应该对"
+"作为<literal>imm_timestamp</literal>映射的Date执行<literal>Date.setTime()</"
+"literal>。要改变属性的值,并且保存这一改变,应用程序必须对这一属性重新设置一"
+"个新的(不一样的)对象。"
 
-#: index.docbook:2689
-msgid "Unique identifiers of entities and collections may be of any basic type except <literal>binary</literal>, <literal>blob</literal> and <literal>clob</literal>. (Composite identifiers are also allowed, see below.)"
+#. Tag: para
+#: basic_mapping.xml:2689
+#, no-c-format
+msgid ""
+"Unique identifiers of entities and collections may be of any basic type "
+"except <literal>binary</literal>, <literal>blob</literal> and <literal>clob</"
+"literal>. (Composite identifiers are also allowed, see below.)"
 msgstr ""
+"实体及其集合的唯一标识可以是除了<literal>binary</literal>、 <literal>blob</"
+"literal> 和 <literal>clob</literal>之外的任何基础类型。(联合标识也是允许的,"
+"后面会说到。)"
 
-#: index.docbook:2695
-msgid "The basic value types have corresponding <literal>Type</literal> constants defined on <literal>org.hibernate.Hibernate</literal>. For example, <literal>Hibernate.STRING</literal> represents the <literal>string</literal> type."
+#. Tag: para
+#: basic_mapping.xml:2695
+#, no-c-format
+msgid ""
+"The basic value types have corresponding <literal>Type</literal> constants "
+"defined on <literal>org.hibernate.Hibernate</literal>. For example, "
+"<literal>Hibernate.STRING</literal> represents the <literal>string</literal> "
+"type."
 msgstr ""
+"在<literal>org.hibernate.Hibernate</literal>中,定义了基础类型对应的"
+"<literal>Type</literal>常量。比如,<literal>Hibernate.STRING</literal>代表"
+"<literal>string</literal> 类型。"
 
-#: index.docbook:2704
+#. Tag: title
+#: basic_mapping.xml:2704
+#, no-c-format
 msgid "Custom value types"
-msgstr ""
+msgstr "自定义值类型"
 
-#: index.docbook:2706
-msgid "It is relatively easy for developers to create their own value types. For example, you might want to persist properties of type <literal>java.lang.BigInteger</literal> to <literal>VARCHAR</literal> columns. Hibernate does not provide a built-in type for this. But custom types are not limited to mapping a property (or collection element) to a single table column. So, for example, you might have a Java property <literal>getName()</literal>/<literal>setName()</literal> of type <literal>java.lang.String</literal> that is persisted to the columns <literal>FIRST_NAME</literal>, <literal>INITIAL</literal>, <literal>SURNAME</literal>."
+#. Tag: para
+#: basic_mapping.xml:2706
+#, no-c-format
+msgid ""
+"It is relatively easy for developers to create their own value types. For "
+"example, you might want to persist properties of type <literal>java.lang."
+"BigInteger</literal> to <literal>VARCHAR</literal> columns. Hibernate does "
+"not provide a built-in type for this. But custom types are not limited to "
+"mapping a property (or collection element) to a single table column. So, for "
+"example, you might have a Java property <literal>getName()</literal>/"
+"<literal>setName()</literal> of type <literal>java.lang.String</literal> "
+"that is persisted to the columns <literal>FIRST_NAME</literal>, "
+"<literal>INITIAL</literal>, <literal>SURNAME</literal>."
 msgstr ""
+"开发者创建属于他们自己的值类型也是很容易的。比如说,你可能希望持久化"
+"<literal>java.lang.BigInteger</literal>类型的属性,持久化成为"
+"<literal>VARCHAR</literal>字段。Hibernate没有内置这样一种类型。自定义类型能够"
+"映射一个属性(或集合元素)到不止一个数据库表字段。比如说,你可能有这样的Java属"
+"性:<literal>getName()</literal>/<literal>setName()</literal>,这是"
+"<literal>java.lang.String</literal>类型的,对应的持久化到三个字段:"
+"<literal>FIRST_NAME</literal>, <literal>INITIAL</literal>, <literal>SURNAME</"
+"literal>。"
 
-#: index.docbook:2717
-msgid "To implement a custom type, implement either <literal>org.hibernate.UserType</literal> or <literal>org.hibernate.CompositeUserType</literal> and declare properties using the fully qualified classname of the type. Check out <literal>org.hibernate.test.DoubleStringType</literal> to see the kind of things that are possible."
+#. Tag: para
+#: basic_mapping.xml:2717
+#, no-c-format
+msgid ""
+"To implement a custom type, implement either <literal>org.hibernate."
+"UserType</literal> or <literal>org.hibernate.CompositeUserType</literal> and "
+"declare properties using the fully qualified classname of the type. Check "
+"out <literal>org.hibernate.test.DoubleStringType</literal> to see the kind "
+"of things that are possible."
 msgstr ""
+"要实现一个自定义类型,可以实现<literal>org.hibernate.UserType</literal>或"
+"<literal>org.hibernate.CompositeUserType</literal>中的任一个,并且使用类型的"
+"Java全限定类名来定义属性。请查看<literal>org.hibernate.test."
+"DoubleStringType</literal>这个例子,看看它是怎么做的。"
 
-#: index.docbook:2725
+#. Tag: programlisting
+#: basic_mapping.xml:2725
+#, no-c-format
 msgid ""
-      "<![CDATA[<property name=\"twoStrings\" type=\"org.hibernate.test.DoubleStringType\">\n"
-      "    <column name=\"first_string\"/>\n"
-      "    <column name=\"second_string\"/>\n"
-      "</property>]]>"
+"<![CDATA[<property name=\"twoStrings\" type=\"org.hibernate.test."
+"DoubleStringType\">\n"
+"    <column name=\"first_string\"/>\n"
+"    <column name=\"second_string\"/>\n"
+"</property>]]>"
 msgstr ""
 
-#: index.docbook:2727
-msgid "Notice the use of <literal>&lt;column&gt;</literal> tags to map a property to multiple columns."
+#. Tag: para
+#: basic_mapping.xml:2727
+#, no-c-format
+msgid ""
+"Notice the use of <literal>&lt;column&gt;</literal> tags to map a property "
+"to multiple columns."
 msgstr ""
+"注意使用<literal>&lt;column&gt;</literal>标签来把一个属性映射到多个字段的做"
+"法。"
 
-#: index.docbook:2732
-msgid "The <literal>CompositeUserType</literal>, <literal>EnhancedUserType</literal>, <literal>UserCollectionType</literal>, and <literal>UserVersionType</literal> interfaces provide support for more specialized uses."
+#. Tag: para
+#: basic_mapping.xml:2732
+#, no-c-format
+msgid ""
+"The <literal>CompositeUserType</literal>, <literal>EnhancedUserType</"
+"literal>, <literal>UserCollectionType</literal>, and "
+"<literal>UserVersionType</literal> interfaces provide support for more "
+"specialized uses."
 msgstr ""
+"<literal>CompositeUserType</literal>, <literal>EnhancedUserType</literal>, "
+"<literal>UserCollectionType</literal>, 和 <literal>UserVersionType</literal> "
+"接口为更特殊的使用方式提供支持。"
 
-#: index.docbook:2738
-msgid "You may even supply parameters to a <literal>UserType</literal> in the mapping file. To do this, your <literal>UserType</literal> must implement the <literal>org.hibernate.usertype.ParameterizedType</literal> interface. To supply parameters to your custom type, you can use the <literal>&lt;type&gt;</literal> element in your mapping files."
+#. Tag: para
+#: basic_mapping.xml:2738
+#, no-c-format
+msgid ""
+"You may even supply parameters to a <literal>UserType</literal> in the "
+"mapping file. To do this, your <literal>UserType</literal> must implement "
+"the <literal>org.hibernate.usertype.ParameterizedType</literal> interface. "
+"To supply parameters to your custom type, you can use the <literal>&lt;"
+"type&gt;</literal> element in your mapping files."
 msgstr ""
+"你甚至可以在一个映射文件中提供参数给一个<literal>UserType</literal>。 为了这"
+"样做,你的<literal>UserType</literal>必须实现<literal>org.hibernate.usertype."
+"ParameterizedType</literal>接口。为了给自定义类型提供参数,你可以在映射文件中"
+"使用<literal>&lt;type&gt;</literal>元素。"
 
-#: index.docbook:2746
+#. Tag: programlisting
+#: basic_mapping.xml:2746
+#, no-c-format
 msgid ""
-      "<![CDATA[<property name=\"priority\">\n"
-      "    <type name=\"com.mycompany.usertypes.DefaultValueIntegerType\">\n"
-      "        <param name=\"default\">0</param>\n"
-      "    </type>\n"
-      "</property>]]>"
+"<![CDATA[<property name=\"priority\">\n"
+"    <type name=\"com.mycompany.usertypes.DefaultValueIntegerType\">\n"
+"        <param name=\"default\">0</param>\n"
+"    </type>\n"
+"</property>]]>"
 msgstr ""
 
-#: index.docbook:2748
-msgid "The <literal>UserType</literal> can now retrieve the value for the parameter named <literal>default</literal> from the <literal>Properties</literal> object passed to it."
+#. Tag: para
+#: basic_mapping.xml:2748
+#, no-c-format
+msgid ""
+"The <literal>UserType</literal> can now retrieve the value for the parameter "
+"named <literal>default</literal> from the <literal>Properties</literal> "
+"object passed to it."
 msgstr ""
+"现在,<literal>UserType</literal> 可以从传入的<literal>Properties</literal>对"
+"象中得到<literal>default</literal> 参数的值。"
 
-#: index.docbook:2753
-msgid "If you use a certain <literal>UserType</literal> very often, it may be useful to define a shorter name for it. You can do this using the <literal>&lt;typedef&gt;</literal> element. Typedefs assign a name to a custom type, and may also contain a list of default parameter values if the type is parameterized."
+#. Tag: para
+#: basic_mapping.xml:2753
+#, no-c-format
+msgid ""
+"If you use a certain <literal>UserType</literal> very often, it may be "
+"useful to define a shorter name for it. You can do this using the "
+"<literal>&lt;typedef&gt;</literal> element. Typedefs assign a name to a "
+"custom type, and may also contain a list of default parameter values if the "
+"type is parameterized."
 msgstr ""
+"如果你非常频繁地使用某一<literal>UserType</literal>,可以为他定义一个简称。这"
+"可以通过使用 <literal>&lt;typedef&gt;</literal>元素来实现。Typedefs为一自定义"
+"类型赋予一个名称,并且如果此类型是参数化的,还可以包含一系列默认的参数值。"
 
-#: index.docbook:2760
+#. Tag: programlisting
+#: basic_mapping.xml:2760
+#, no-c-format
 msgid ""
-      "<![CDATA[<typedef class=\"com.mycompany.usertypes.DefaultValueIntegerType\" name=\"default_zero\">\n"
-      "    <param name=\"default\">0</param>\n"
-      "</typedef>]]>"
+"<![CDATA[<typedef class=\"com.mycompany.usertypes.DefaultValueIntegerType\" "
+"name=\"default_zero\">\n"
+"    <param name=\"default\">0</param>\n"
+"</typedef>]]>"
 msgstr ""
 
-#: index.docbook:2762
+#. Tag: programlisting
+#: basic_mapping.xml:2762
+#, no-c-format
 msgid "<![CDATA[<property name=\"priority\" type=\"default_zero\"/>]]>"
 msgstr ""
 
-#: index.docbook:2764
-msgid "It is also possible to override the parameters supplied in a typedef on a case-by-case basis by using type parameters on the property mapping."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:2764
+#, no-c-format
+msgid ""
+"It is also possible to override the parameters supplied in a typedef on a "
+"case-by-case basis by using type parameters on the property mapping."
+msgstr "也可以根据具体案例通过属性映射中的类型参数覆盖在typedef中提供的参数。"
 
-#: index.docbook:2769
-msgid "Even though Hibernate's rich range of built-in types and support for components means you will very rarely <emphasis>need</emphasis> to use a custom type, it is nevertheless considered good form to use custom types for (non-entity) classes that occur frequently in your application. For example, a <literal>MonetaryAmount</literal> class is a good candidate for a <literal>CompositeUserType</literal>, even though it could easily be mapped as a component. One motivation for this is abstraction. With a custom type, your mapping documents would be future-proofed against possible changes in your way of representing monetary values."
+#. Tag: para
+#: basic_mapping.xml:2769
+#, no-c-format
+msgid ""
+"Even though Hibernate's rich range of built-in types and support for "
+"components means you will very rarely <emphasis>need</emphasis> to use a "
+"custom type, it is nevertheless considered good form to use custom types for "
+"(non-entity) classes that occur frequently in your application. For example, "
+"a <literal>MonetaryAmount</literal> class is a good candidate for a "
+"<literal>CompositeUserType</literal>, even though it could easily be mapped "
+"as a component. One motivation for this is abstraction. With a custom type, "
+"your mapping documents would be future-proofed against possible changes in "
+"your way of representing monetary values."
 msgstr ""
+"尽管 Hibernate 内建的丰富的类型和对组件的支持意味着你可能很少 <emphasis>需要"
+"</emphasis>使用自定义类型。不过,为那些在你的应用中经常出现的(非实体)类使用自"
+"定义类型也是一个好方法。例如,一个<literal>MonetaryAmount</literal>类使用"
+"<literal>CompositeUserType</literal>来映射是不错的选择,虽然他可以很容易地被"
+"映射成组件。这样做的动机之一是抽象。使用自定义类型,以后假若你改变表示金额的"
+"方法时,它可以保证映射文件不需要修改。"
 
-#: index.docbook:2785
+#. Tag: title
+#: basic_mapping.xml:2785
+#, no-c-format
 msgid "Mapping a class more than once"
-msgstr ""
+msgstr "多次映射同一个类"
 
-#: index.docbook:2786
-msgid "It is possible to provide more than one mapping for a particular persistent class. In this case you must specify an <emphasis>entity name</emphasis> do disambiguate between instances of the two mapped entities. (By default, the entity name is the same as the class name.) Hibernate lets you specify the entity name when working with persistent objects, when writing queries, or when mapping associations to the named entity."
+#. Tag: para
+#: basic_mapping.xml:2786
+#, no-c-format
+msgid ""
+"It is possible to provide more than one mapping for a particular persistent "
+"class. In this case you must specify an <emphasis>entity name</emphasis> do "
+"disambiguate between instances of the two mapped entities. (By default, the "
+"entity name is the same as the class name.) Hibernate lets you specify the "
+"entity name when working with persistent objects, when writing queries, or "
+"when mapping associations to the named entity."
 msgstr ""
+"对特定的持久化类,映射多次是允许的。这种情形下,你必须指定<emphasis>entity "
+"name</emphasis>来区别不同映射实体的对象实例。(默认情况下,实体名字和类名是相"
+"同的。) Hibernate在操作持久化对象、编写查询条件,或者把关联映射到指定实体"
+"时,允许你指定这个entity name(实体名字)。"
 
-#: index.docbook:2794
+#. Tag: programlisting
+#: basic_mapping.xml:2794
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Contract\" table=\"Contracts\"\n"
-      "        entity-name=\"CurrentContract\">\n"
-      "    ...\n"
-      "    <set name=\"history\" inverse=\"true\"\n"
-      "            order-by=\"effectiveEndDate desc\">\n"
-      "        <key column=\"currentContractId\"/>\n"
-      "        <one-to-many entity-name=\"HistoricalContract\"/>\n"
-      "    </set>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Contract\" table=\"ContractHistory\"\n"
-      "        entity-name=\"HistoricalContract\">\n"
-      "    ...\n"
-      "    <many-to-one name=\"currentContract\"\n"
-      "            column=\"currentContractId\"\n"
-      "            entity-name=\"CurrentContract\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Contract\" table=\"Contracts\"\n"
+"        entity-name=\"CurrentContract\">\n"
+"    ...\n"
+"    <set name=\"history\" inverse=\"true\"\n"
+"            order-by=\"effectiveEndDate desc\">\n"
+"        <key column=\"currentContractId\"/>\n"
+"        <one-to-many entity-name=\"HistoricalContract\"/>\n"
+"    </set>\n"
+"</class>\n"
+"\n"
+"<class name=\"Contract\" table=\"ContractHistory\"\n"
+"        entity-name=\"HistoricalContract\">\n"
+"    ...\n"
+"    <many-to-one name=\"currentContract\"\n"
+"            column=\"currentContractId\"\n"
+"            entity-name=\"CurrentContract\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:2796
-msgid "Notice how associations are now specified using <literal>entity-name</literal> instead of <literal>class</literal>."
+#. Tag: para
+#: basic_mapping.xml:2796
+#, no-c-format
+msgid ""
+"Notice how associations are now specified using <literal>entity-name</"
+"literal> instead of <literal>class</literal>."
 msgstr ""
+"注意这里关联是如何用<literal>entity-name</literal>来代替<literal>class</"
+"literal>的。"
 
-#: index.docbook:2804
+#. Tag: title
+#: basic_mapping.xml:2804
+#, no-c-format
 msgid "SQL quoted identifiers"
-msgstr ""
+msgstr "SQL中引号包围的标识符"
 
-#: index.docbook:2805
-msgid "You may force Hibernate to quote an identifier in the generated SQL by enclosing the table or column name in backticks in the mapping document. Hibernate will use the correct quotation style for the SQL <literal>Dialect</literal> (usually double quotes, but brackets for SQL Server and backticks for MySQL)."
+#. Tag: para
+#: basic_mapping.xml:2805
+#, no-c-format
+msgid ""
+"You may force Hibernate to quote an identifier in the generated SQL by "
+"enclosing the table or column name in backticks in the mapping document. "
+"Hibernate will use the correct quotation style for the SQL <literal>Dialect</"
+"literal> (usually double quotes, but brackets for SQL Server and backticks "
+"for MySQL)."
 msgstr ""
+"你可通过在映射文档中使用反向引号(`)把表名或者字段名包围起来,以强制Hibernate"
+"在生成的SQL中把标识符用引号包围起来。Hibernate会使用相应的"
+"SQL<literal>Dialect</literal>(方言)来使用正确的引号风格(通常是双引号,但是在"
+"SQL Server中是括号,MySQL中是反向引号)。"
 
-#: index.docbook:2812
+#. Tag: programlisting
+#: basic_mapping.xml:2812
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"LineItem\" table=\"`Line Item`\">\n"
-      "    <id name=\"id\" column=\"`Item Id`\"/><generator class=\"assigned\"/></id>\n"
-      "    <property name=\"itemNumber\" column=\"`Item #`\"/>\n"
-      "    ...\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"LineItem\" table=\"`Line Item`\">\n"
+"    <id name=\"id\" column=\"`Item Id`\"/><generator class=\"assigned\"/></"
+"id>\n"
+"    <property name=\"itemNumber\" column=\"`Item #`\"/>\n"
+"    ...\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:2818
+#. Tag: title
+#: basic_mapping.xml:2818
+#, no-c-format
 msgid "Metadata alternatives"
-msgstr ""
+msgstr "其他元数据(Metadata)"
 
-#: index.docbook:2820
-msgid "XML isn't for everyone, and so there are some alternative ways to define O/R mapping metadata in Hibernate."
+#. Tag: para
+#: basic_mapping.xml:2820
+#, no-c-format
+msgid ""
+"XML isn't for everyone, and so there are some alternative ways to define O/R "
+"mapping metadata in Hibernate."
 msgstr ""
+"XML 并不适用于所有人, 因此有其他定义Hibernate O/R 映射元数据(metadata)的方"
+"法。"
 
-#: index.docbook:2825
+#. Tag: title
+#: basic_mapping.xml:2825
+#, no-c-format
 msgid "Using XDoclet markup"
-msgstr ""
+msgstr "使用 XDoclet 标记"
 
-#: index.docbook:2827
-msgid "Many Hibernate users prefer to embed mapping information directly in sourcecode using XDoclet <literal>@hibernate.tags</literal>. We will not cover this approach in this document, since strictly it is considered part of XDoclet. However, we include the following example of the <literal>Cat</literal> class with XDoclet mappings."
+#. Tag: para
+#: basic_mapping.xml:2827
+#, no-c-format
+msgid ""
+"Many Hibernate users prefer to embed mapping information directly in "
+"sourcecode using XDoclet <literal>@hibernate.tags</literal>. We will not "
+"cover this approach in this document, since strictly it is considered part "
+"of XDoclet. However, we include the following example of the <literal>Cat</"
+"literal> class with XDoclet mappings."
 msgstr ""
+"很多Hibernate使用者更喜欢使用XDoclet<literal>@hibernate.tags</literal>将映射"
+"信息直接嵌入到源代码中。我们不会在本文档中涉及这个方法,因为严格说来,这属于"
+"XDoclet的一部分。然而,我们包含了如下使用XDoclet映射的<literal>Cat</literal>"
+"类的例子。"
 
-#: index.docbook:2834
+#. Tag: programlisting
+#: basic_mapping.xml:2834
+#, no-c-format
 msgid ""
-      "<![CDATA[package eg;\n"
-      "import java.util.Set;\n"
-      "import java.util.Date;\n"
-      "\n"
-      "/**\n"
-      " * @hibernate.class\n"
-      " *  table=\"CATS\"\n"
-      " */\n"
-      "public class Cat {\n"
-      "    private Long id; // identifier\n"
-      "    private Date birthdate;\n"
-      "    private Cat mother;\n"
-      "    private Set kittens\n"
-      "    private Color color;\n"
-      "    private char sex;\n"
-      "    private float weight;\n"
-      "\n"
-      "    /*\n"
-      "     * @hibernate.id\n"
-      "     *  generator-class=\"native\"\n"
-      "     *  column=\"CAT_ID\"\n"
-      "     */\n"
-      "    public Long getId() {\n"
-      "        return id;\n"
-      "    }\n"
-      "    private void setId(Long id) {\n"
-      "        this.id=id;\n"
-      "    }\n"
-      "\n"
-      "    /**\n"
-      "     * @hibernate.many-to-one\n"
-      "     *  column=\"PARENT_ID\"\n"
-      "     */\n"
-      "    public Cat getMother() {\n"
-      "        return mother;\n"
-      "    }\n"
-      "    void setMother(Cat mother) {\n"
-      "        this.mother = mother;\n"
-      "    }\n"
-      "\n"
-      "    /**\n"
-      "     * @hibernate.property\n"
-      "     *  column=\"BIRTH_DATE\"\n"
-      "     */\n"
-      "    public Date getBirthdate() {\n"
-      "        return birthdate;\n"
-      "    }\n"
-      "    void setBirthdate(Date date) {\n"
-      "        birthdate = date;\n"
-      "    }\n"
-      "    /**\n"
-      "     * @hibernate.property\n"
-      "     *  column=\"WEIGHT\"\n"
-      "     */\n"
-      "    public float getWeight() {\n"
-      "        return weight;\n"
-      "    }\n"
-      "    void setWeight(float weight) {\n"
-      "        this.weight = weight;\n"
-      "    }\n"
-      "\n"
-      "    /**\n"
-      "     * @hibernate.property\n"
-      "     *  column=\"COLOR\"\n"
-      "     *  not-null=\"true\"\n"
-      "     */\n"
-      "    public Color getColor() {\n"
-      "        return color;\n"
-      "    }\n"
-      "    void setColor(Color color) {\n"
-      "        this.color = color;\n"
-      "    }\n"
-      "    /**\n"
-      "     * @hibernate.set\n"
-      "     *  inverse=\"true\"\n"
-      "     *  order-by=\"BIRTH_DATE\"\n"
-      "     * @hibernate.collection-key\n"
-      "     *  column=\"PARENT_ID\"\n"
-      "     * @hibernate.collection-one-to-many\n"
-      "     */\n"
-      "    public Set getKittens() {\n"
-      "        return kittens;\n"
-      "    }\n"
-      "    void setKittens(Set kittens) {\n"
-      "        this.kittens = kittens;\n"
-      "    }\n"
-      "    // addKitten not needed by Hibernate\n"
-      "    public void addKitten(Cat kitten) {\n"
-      "        kittens.add(kitten);\n"
-      "    }\n"
-      "\n"
-      "    /**\n"
-      "     * @hibernate.property\n"
-      "     *  column=\"SEX\"\n"
-      "     *  not-null=\"true\"\n"
-      "     *  update=\"false\"\n"
-      "     */\n"
-      "    public char getSex() {\n"
-      "        return sex;\n"
-      "    }\n"
-      "    void setSex(char sex) {\n"
-      "        this.sex=sex;\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[package eg;\n"
+"import java.util.Set;\n"
+"import java.util.Date;\n"
+"\n"
+"/**\n"
+" * @hibernate.class\n"
+" *  table=\"CATS\"\n"
+" */\n"
+"public class Cat {\n"
+"    private Long id; // identifier\n"
+"    private Date birthdate;\n"
+"    private Cat mother;\n"
+"    private Set kittens\n"
+"    private Color color;\n"
+"    private char sex;\n"
+"    private float weight;\n"
+"\n"
+"    /*\n"
+"     * @hibernate.id\n"
+"     *  generator-class=\"native\"\n"
+"     *  column=\"CAT_ID\"\n"
+"     */\n"
+"    public Long getId() {\n"
+"        return id;\n"
+"    }\n"
+"    private void setId(Long id) {\n"
+"        this.id=id;\n"
+"    }\n"
+"\n"
+"    /**\n"
+"     * @hibernate.many-to-one\n"
+"     *  column=\"PARENT_ID\"\n"
+"     */\n"
+"    public Cat getMother() {\n"
+"        return mother;\n"
+"    }\n"
+"    void setMother(Cat mother) {\n"
+"        this.mother = mother;\n"
+"    }\n"
+"\n"
+"    /**\n"
+"     * @hibernate.property\n"
+"     *  column=\"BIRTH_DATE\"\n"
+"     */\n"
+"    public Date getBirthdate() {\n"
+"        return birthdate;\n"
+"    }\n"
+"    void setBirthdate(Date date) {\n"
+"        birthdate = date;\n"
+"    }\n"
+"    /**\n"
+"     * @hibernate.property\n"
+"     *  column=\"WEIGHT\"\n"
+"     */\n"
+"    public float getWeight() {\n"
+"        return weight;\n"
+"    }\n"
+"    void setWeight(float weight) {\n"
+"        this.weight = weight;\n"
+"    }\n"
+"\n"
+"    /**\n"
+"     * @hibernate.property\n"
+"     *  column=\"COLOR\"\n"
+"     *  not-null=\"true\"\n"
+"     */\n"
+"    public Color getColor() {\n"
+"        return color;\n"
+"    }\n"
+"    void setColor(Color color) {\n"
+"        this.color = color;\n"
+"    }\n"
+"    /**\n"
+"     * @hibernate.set\n"
+"     *  inverse=\"true\"\n"
+"     *  order-by=\"BIRTH_DATE\"\n"
+"     * @hibernate.collection-key\n"
+"     *  column=\"PARENT_ID\"\n"
+"     * @hibernate.collection-one-to-many\n"
+"     */\n"
+"    public Set getKittens() {\n"
+"        return kittens;\n"
+"    }\n"
+"    void setKittens(Set kittens) {\n"
+"        this.kittens = kittens;\n"
+"    }\n"
+"    // addKitten not needed by Hibernate\n"
+"    public void addKitten(Cat kitten) {\n"
+"        kittens.add(kitten);\n"
+"    }\n"
+"\n"
+"    /**\n"
+"     * @hibernate.property\n"
+"     *  column=\"SEX\"\n"
+"     *  not-null=\"true\"\n"
+"     *  update=\"false\"\n"
+"     */\n"
+"    public char getSex() {\n"
+"        return sex;\n"
+"    }\n"
+"    void setSex(char sex) {\n"
+"        this.sex=sex;\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:2836
+#. Tag: para
+#: basic_mapping.xml:2836
+#, no-c-format
 msgid "See the Hibernate web site for more examples of XDoclet and Hibernate."
-msgstr ""
+msgstr "参考Hibernate网站更多的Xdoclet和Hibernate的例子"
 
-#: index.docbook:2843
+#. Tag: title
+#: basic_mapping.xml:2843
+#, no-c-format
 msgid "Using JDK 5.0 Annotations"
-msgstr ""
+msgstr "使用 JDK 5.0 的注解(Annotation)"
 
-#: index.docbook:2845
-msgid "JDK 5.0 introduced XDoclet-style annotations at the language level, type-safe and checked at compile time. This mechnism is more powerful than XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA, for example, supports auto-completion and syntax highlighting of JDK 5.0 annotations. The new revision of the EJB specification (JSR-220) uses JDK 5.0 annotations as the primary metadata mechanism for entity beans. Hibernate3 implements the <literal>EntityManager</literal> of JSR-220 (the persistence API), support for mapping metadata is available via the <emphasis>Hibernate Annotations</emphasis> package, as a separate download. Both EJB3 (JSR-220) and Hibernate3 metadata is supported."
+#. Tag: para
+#: basic_mapping.xml:2845
+#, no-c-format
+msgid ""
+"JDK 5.0 introduced XDoclet-style annotations at the language level, type-"
+"safe and checked at compile time. This mechnism is more powerful than "
+"XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA, "
+"for example, supports auto-completion and syntax highlighting of JDK 5.0 "
+"annotations. The new revision of the EJB specification (JSR-220) uses JDK "
+"5.0 annotations as the primary metadata mechanism for entity beans. "
+"Hibernate3 implements the <literal>EntityManager</literal> of JSR-220 (the "
+"persistence API), support for mapping metadata is available via the "
+"<emphasis>Hibernate Annotations</emphasis> package, as a separate download. "
+"Both EJB3 (JSR-220) and Hibernate3 metadata is supported."
 msgstr ""
+"JDK 5.0 在语言级别引入了 XDoclet 风格的标注,并且是类型安全的,在编译期进行检"
+"查。这一机制比XDoclet的注解更为强大,有更好的工具和IDE支持。例如, IntelliJ "
+"IDEA,支持JDK 5.0注解的自动完成和语法高亮 。EJB规范的新修订版(JSR-220)使用 "
+"JDK 5.0的注解作为entity beans的主要元数据(metadata)机制。Hibernate 3 实现了"
+"JSR-220 (the persistence API)的<literal>EntityManager</literal>,支持通过"
+"<emphasis>Hibernate Annotations</emphasis>包定义映射元数据。这个包作为单独的"
+"部分下载,支持EJB3 (JSR-220)和Hibernate3的元数据。"
 
-#: index.docbook:2856
+#. Tag: para
+#: basic_mapping.xml:2856
+#, no-c-format
 msgid "This is an example of a POJO class annotated as an EJB entity bean:"
-msgstr ""
+msgstr "这是一个被注解为EJB entity bean 的POJO类的例子"
 
-#: index.docbook:2860
+#. Tag: programlisting
+#: basic_mapping.xml:2860
+#, no-c-format
 msgid ""
-      "<![CDATA[@Entity(access = AccessType.FIELD)\n"
-      "public class Customer implements Serializable {\n"
-      "\n"
-      "    @Id;\n"
-      "    Long id;\n"
-      "\n"
-      "    String firstName;\n"
-      "    String lastName;\n"
-      "    Date birthday;\n"
-      "\n"
-      "    @Transient\n"
-      "    Integer age;\n"
-      "\n"
-      "    @Embedded\n"
-      "    private Address homeAddress;\n"
-      "\n"
-      "    @OneToMany(cascade=CascadeType.ALL)\n"
-      "    @JoinColumn(name=\"CUSTOMER_ID\")\n"
-      "    Set<Order> orders;\n"
-      "\n"
-      "    // Getter/setter and business methods\n"
-      "}]]>"
+"<![CDATA[@Entity(access = AccessType.FIELD)\n"
+"public class Customer implements Serializable {\n"
+"\n"
+"    @Id;\n"
+"    Long id;\n"
+"\n"
+"    String firstName;\n"
+"    String lastName;\n"
+"    Date birthday;\n"
+"\n"
+"    @Transient\n"
+"    Integer age;\n"
+"\n"
+"    @Embedded\n"
+"    private Address homeAddress;\n"
+"\n"
+"    @OneToMany(cascade=CascadeType.ALL)\n"
+"    @JoinColumn(name=\"CUSTOMER_ID\")\n"
+"    Set<Order> orders;\n"
+"\n"
+"    // Getter/setter and business methods\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:2862
-msgid "Note that support for JDK 5.0 Annotations (and JSR-220) is still work in progress and not completed. Please refer to the Hibernate Annotations module for more details."
+#. Tag: para
+#: basic_mapping.xml:2862
+#, no-c-format
+msgid ""
+"Note that support for JDK 5.0 Annotations (and JSR-220) is still work in "
+"progress and not completed. Please refer to the Hibernate Annotations module "
+"for more details."
 msgstr ""
+"注意:对 JDK 5.0 注解 (和 JSR-220)支持的工作仍然在进行中,并未完成。更多细节请"
+"参阅Hibernate Annotations 模块。"
 
-#: index.docbook:2871
+#. Tag: title
+#: basic_mapping.xml:2871
+#, no-c-format
 msgid "Generated Properties"
-msgstr ""
+msgstr "数据库生成属性(Generated Properties)"
 
-#: index.docbook:2872
-msgid "Generated properties are properties which have their values generated by the database. Typically, Hibernate applications needed to <literal>refresh</literal> objects which contain any properties for which the database was generating values. Marking properties as generated, however, lets the application delegate this responsibility to Hibernate. Essentially, whenever Hibernate issues an SQL INSERT or UPDATE for an entity which has defined generated properties, it immediately issues a select afterwards to retrieve the generated values."
+#. Tag: para
+#: basic_mapping.xml:2872
+#, no-c-format
+msgid ""
+"Generated properties are properties which have their values generated by the "
+"database. Typically, Hibernate applications needed to <literal>refresh</"
+"literal> objects which contain any properties for which the database was "
+"generating values. Marking properties as generated, however, lets the "
+"application delegate this responsibility to Hibernate. Essentially, whenever "
+"Hibernate issues an SQL INSERT or UPDATE for an entity which has defined "
+"generated properties, it immediately issues a select afterwards to retrieve "
+"the generated values."
 msgstr ""
+"Generated properties指的是其值由数据库生成的属性。一般来说,如果对象有任何属"
+"性由数据库生成值,Hibernate应用程序需要进行<literal>刷新(refresh)</literal>。"
+"但如果把属性标明为generated,就可以转由Hibernate来负责这个动作。实际上。对定"
+"义了generated properties的实体,每当Hibernate执行一条SQL INSERT或者UPDATE语"
+"句,会立刻执行一条select来获得生成的值。"
 
-#: index.docbook:2881
-msgid "Properties marked as generated must additionally be non-insertable and non-updateable. Only <xref linkend=\"mapping-declaration-version\"/>versions, <xref linkend=\"mapping-declaration-timestamp\"/>timestamps, and <xref linkend=\"mapping-declaration-property\"/>simple properties can be marked as generated."
+#. Tag: para
+#: basic_mapping.xml:2881
+#, fuzzy, no-c-format
+msgid ""
+"Properties marked as generated must additionally be non-insertable and non-"
+"updateable. Only <xref linkend=\"mapping-declaration-version\"/>versions, "
+"<xref linkend=\"mapping-declaration-timestamp\"/>timestamps, and <xref "
+"linkend=\"mapping-declaration-property\"/>simple properties can be marked as "
+"generated."
 msgstr ""
+"被标明为generated的属性还必须是 non-insertable和 non-updateable的。只有<xref "
+"linkend=\"mapping-declaration-version\">versions</xref>,<xref linkend="
+"\"mapping-declaration-timestamp\">timestamps</xref>和<xref linkend=\"mapping-"
+"declaration-property\">简单属性(simple properties)</xref>可以被标明为"
+"generated。"
 
-#: index.docbook:2888
-msgid "<literal>never</literal> (the default) - means that the given property value is not generated within the database."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:2888
+#, no-c-format
+msgid ""
+"<literal>never</literal> (the default) - means that the given property value "
+"is not generated within the database."
+msgstr "<literal>never</literal> (默认) 标明此属性值不是从数据库中生成。"
 
-#: index.docbook:2892
-msgid "<literal>insert</literal> - states that the given property value is generated on insert, but is not regenerated on subsequent updates. Things like created-date would fall into this category. Note that even thought <xref linkend=\"mapping-declaration-version\"/>version and <xref linkend=\"mapping-declaration-timestamp\"/>timestamp properties can be marked as generated, this option is not available there..."
+#. Tag: para
+#: basic_mapping.xml:2892
+#, fuzzy, no-c-format
+msgid ""
+"<literal>insert</literal> - states that the given property value is "
+"generated on insert, but is not regenerated on subsequent updates. Things "
+"like created-date would fall into this category. Note that even thought "
+"<xref linkend=\"mapping-declaration-version\"/>version and <xref linkend="
+"\"mapping-declaration-timestamp\"/>timestamp properties can be marked as "
+"generated, this option is not available there..."
 msgstr ""
+"<literal>insert</literal> - 标明此属性值在insert的时候生成,但是不会在随后的"
+"update时重新生成。比如说创建日期就归属于这类。注意虽然<xref linkend="
+"\"mapping-declaration-version\">version</xref>和<xref linkend=\"mapping-"
+"declaration-timestamp\">timestamp</xref>属性可以被标注为generated,但是不适用"
+"这个选项..."
 
-#: index.docbook:2900
-msgid "<literal>always</literal> - states that the property value is generated both on insert and on update."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:2900
+#, no-c-format
+msgid ""
+"<literal>always</literal> - states that the property value is generated both "
+"on insert and on update."
+msgstr "<literal>always</literal> - 标明此属性值在insert和update时都会被生成。"
 
-#: index.docbook:2907
+#. Tag: title
+#: basic_mapping.xml:2907
+#, no-c-format
 msgid "Auxiliary Database Objects"
-msgstr ""
+msgstr "辅助数据库对象(Auxiliary Database Objects)"
 
-#: index.docbook:2908
-msgid "Allows CREATE and DROP of arbitrary database objects, in conjunction with Hibernate's schema evolution tools, to provide the ability to fully define a user schema within the Hibernate mapping files. Although designed specifically for creating and dropping things like triggers or stored procedures, really any SQL command that can be run via a <literal>java.sql.Statement.execute()</literal> method is valid here (ALTERs, INSERTS, etc). There are essentially two modes for defining auxiliary database objects..."
+#. Tag: para
+#: basic_mapping.xml:2908
+#, no-c-format
+msgid ""
+"Allows CREATE and DROP of arbitrary database objects, in conjunction with "
+"Hibernate's schema evolution tools, to provide the ability to fully define a "
+"user schema within the Hibernate mapping files. Although designed "
+"specifically for creating and dropping things like triggers or stored "
+"procedures, really any SQL command that can be run via a <literal>java.sql."
+"Statement.execute()</literal> method is valid here (ALTERs, INSERTS, etc). "
+"There are essentially two modes for defining auxiliary database objects..."
 msgstr ""
+"Allows CREATE and DROP of arbitrary database objects, in conjunction with "
+"Hibernate's schema evolution tools, to provide the ability to fully define a "
+"user schema within the Hibernate mapping files. Although designed "
+"specifically for creating and dropping things like triggers or stored "
+"procedures, really any SQL command that can be run via a <literal>java.sql."
+"Statement.execute()</literal> method is valid here (ALTERs, INSERTS, etc). "
+"There are essentially two modes for defining auxiliary database objects... 帮"
+"助CREATE和DROP任意数据库对象,与Hibernate的schema交互工具组合起来,可以提供在"
+"Hibernate映射文件中完全定义用户schema的能力。虽然这是为创建和销毁trigger(触发"
+"器)或stored procedure(存储过程)等特别设计的,实际上任何可以在<literal>java."
+"sql.Statement.execute()</literal>方法中执行的SQL命令都可以在此使用(比如"
+"ALTER, INSERT,等等)。本质上有两种模式来定义辅助数据库对象..."
 
-#: index.docbook:2917
-msgid "The first mode is to explicitly list the CREATE and DROP commands out in the mapping file:"
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:2917
+#, no-c-format
+msgid ""
+"The first mode is to explicitly list the CREATE and DROP commands out in the "
+"mapping file:"
+msgstr "第一种模式是在映射文件中显式声明CREATE和DROP命令:"
 
-#: index.docbook:2921
+#. Tag: programlisting
+#: basic_mapping.xml:2921
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "    ...\n"
-      "    <database-object>\n"
-      "        <create>CREATE TRIGGER my_trigger ...</create>\n"
-      "        <drop>DROP TRIGGER my_trigger</drop>\n"
-      "    </database-object>\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"    ...\n"
+"    <database-object>\n"
+"        <create>CREATE TRIGGER my_trigger ...</create>\n"
+"        <drop>DROP TRIGGER my_trigger</drop>\n"
+"    </database-object>\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:2922
-msgid "The second mode is to supply a custom class which knows how to construct the CREATE and DROP commands. This custom class must implement the <literal>org.hibernate.mapping.AuxiliaryDatabaseObject</literal> interface."
+#. Tag: para
+#: basic_mapping.xml:2922
+#, no-c-format
+msgid ""
+"The second mode is to supply a custom class which knows how to construct the "
+"CREATE and DROP commands. This custom class must implement the <literal>org."
+"hibernate.mapping.AuxiliaryDatabaseObject</literal> interface."
 msgstr ""
+"第二种模式是提供一个类,这个类知道如何组织CREATE和DROP命令。这个特别类必须实"
+"现<literal>org.hibernate.mapping.AuxiliaryDatabaseObject</literal>接口。"
 
-#: index.docbook:2927
+#. Tag: programlisting
+#: basic_mapping.xml:2927
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "    ...\n"
-      "    <database-object>\n"
-      "        <definition class=\"MyTriggerDefinition\"/>\n"
-      "    </database-object>\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"    ...\n"
+"    <database-object>\n"
+"        <definition class=\"MyTriggerDefinition\"/>\n"
+"    </database-object>\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:2928
-msgid "Additionally, these database objects can be optionally scoped such that they only apply when certain dialects are used."
-msgstr ""
+#. Tag: para
+#: basic_mapping.xml:2928
+#, no-c-format
+msgid ""
+"Additionally, these database objects can be optionally scoped such that they "
+"only apply when certain dialects are used."
+msgstr "还有,这些数据库对象可以特别指定为仅在特定的方言中才使用。"
 
-#: index.docbook:2932
+#. Tag: programlisting
+#: basic_mapping.xml:2932
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "    ...\n"
-      "    <database-object>\n"
-      "        <definition class=\"MyTriggerDefinition\"/>\n"
-      "        <dialect-scope name=\"org.hibernate.dialect.Oracle9Dialect\"/>\n"
-      "        <dialect-scope name=\"org.hibernate.dialect.OracleDialect\"/>\n"
-      "    </database-object>\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"    ...\n"
+"    <database-object>\n"
+"        <definition class=\"MyTriggerDefinition\"/>\n"
+"        <dialect-scope name=\"org.hibernate.dialect.Oracle9Dialect\"/>\n"
+"        <dialect-scope name=\"org.hibernate.dialect.OracleDialect\"/>\n"
+"    </database-object>\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
+#~ msgid "class"
+#~ msgstr "class"
 
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
+#~ msgid "id"
+#~ msgstr "id"
 
+#~ msgid ""
+#~ "<literal>optimizer</literal> (optional, defaults to <literal>none</"
+#~ "literal>): See <xref linkend=\"mapping-declaration-id-enhanced-optimizers"
+#~ "\"/>"
+#~ msgstr ""
+#~ "<literal>optimizer</literal> (optional, defaults to <literal>none</"
+#~ "literal>): See <xref linkend=\"mapping-declaration-id-enhanced-optimizers"
+#~ "\"/>"
+
+#~ msgid ""
+#~ "<literal>optimizer</literal> (optional, defaults to <literal/>): See "
+#~ "<xref linkend=\"mapping-declaration-id-enhanced-optimizers\"/>"
+#~ msgstr ""
+#~ "<literal>optimizer</literal> (optional, defaults to <literal/>): See "
+#~ "<xref linkend=\"mapping-declaration-id-enhanced-optimizers\"/>"
+
+#~ msgid "key"
+#~ msgstr "键(key)"
+
+#~ msgid "any"
+#~ msgstr "any"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/batch.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/batch.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/batch.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,281 +1,608 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: batch.xml:5
+#, no-c-format
 msgid "Batch processing"
-msgstr ""
+msgstr "批量处理(Batch processing)"
 
-#: index.docbook:7
-msgid "A naive approach to inserting 100 000 rows in the database using Hibernate might look like this:"
+#. Tag: para
+#: batch.xml:7
+#, no-c-format
+msgid ""
+"A naive approach to inserting 100 000 rows in the database using Hibernate "
+"might look like this:"
 msgstr ""
+"使用Hibernate将 100 000 条记录插入到数据库的一个很自然的做法可能是这样的"
 
-#: index.docbook:12
+#. Tag: programlisting
+#: batch.xml:12
+#, no-c-format
 msgid ""
-      "<![CDATA[Session session = sessionFactory.openSession();\n"
-      "Transaction tx = session.beginTransaction();\n"
-      "for ( int i=0; i<100000; i++ ) {\n"
-      "    Customer customer = new Customer(.....);\n"
-      "    session.save(customer);\n"
-      "}\n"
-      "tx.commit();\n"
-      "session.close();]]>"
+"<![CDATA[Session session = sessionFactory.openSession();\n"
+"Transaction tx = session.beginTransaction();\n"
+"for ( int i=0; i<100000; i++ ) {\n"
+"    Customer customer = new Customer(.....);\n"
+"    session.save(customer);\n"
+"}\n"
+"tx.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:14
-msgid "This would fall over with an <literal>OutOfMemoryException</literal> somewhere around the 50 000th row. That's because Hibernate caches all the newly inserted <literal>Customer</literal> instances in the session-level cache."
+#. Tag: para
+#: batch.xml:14
+#, no-c-format
+msgid ""
+"This would fall over with an <literal>OutOfMemoryException</literal> "
+"somewhere around the 50 000th row. That's because Hibernate caches all the "
+"newly inserted <literal>Customer</literal> instances in the session-level "
+"cache."
 msgstr ""
+"这段程序大概运行到 50 000 条记录左右会失败并抛出 <literal>内存溢出异常"
+"(OutOfMemoryException)</literal> 。 这是因为 Hibernate 把所有新插入的 "
+"<literal>客户(Customer)</literal>实例在 session级别的缓存区进行了缓存的缘"
+"故。"
 
-#: index.docbook:20
-msgid "In this chapter we'll show you how to avoid this problem. First, however, if you are doing batch processing, it is absolutely critical that you enable the use of JDBC batching, if you intend to achieve reasonable performance. Set the JDBC batch size to a reasonable number (say, 10-50):"
+#. Tag: para
+#: batch.xml:20
+#, no-c-format
+msgid ""
+"In this chapter we'll show you how to avoid this problem. First, however, if "
+"you are doing batch processing, it is absolutely critical that you enable "
+"the use of JDBC batching, if you intend to achieve reasonable performance. "
+"Set the JDBC batch size to a reasonable number (say, 10-50):"
 msgstr ""
+"我们会在本章告诉你如何避免此类问题。首先,如果你要执行批量处理并且想要达到一"
+"个理想的性能, 那么使用JDBC的批量(batching)功能是至关重要。将JDBC的批量抓取"
+"数量(batch size)参数设置到一个合适值 (比如,10-50之间):"
 
-#: index.docbook:27
+#. Tag: programlisting
+#: batch.xml:27
+#, no-c-format
 msgid "<![CDATA[hibernate.jdbc.batch_size 20]]>"
 msgstr ""
 
-#: index.docbook:29
-msgid "Note that Hibernate disables insert batching at the JDBC level transparently if you use an <literal>identiy</literal> identifier generator."
+#. Tag: para
+#: batch.xml:29
+#, no-c-format
+msgid ""
+"Note that Hibernate disables insert batching at the JDBC level transparently "
+"if you use an <literal>identiy</literal> identifier generator."
 msgstr ""
+"注意,假若你使用了<literal>identiy</literal>标识符生成器,Hibernate在JDBC级别透"
+"明的关闭插入语句的批量执行。"
 
-#: index.docbook:34
-msgid "You also might like to do this kind of work in a process where interaction with the second-level cache is completely disabled:"
-msgstr ""
+#. Tag: para
+#: batch.xml:34
+#, no-c-format
+msgid ""
+"You also might like to do this kind of work in a process where interaction "
+"with the second-level cache is completely disabled:"
+msgstr "你也可能想在执行批量处理时关闭二级缓存:"
 
-#: index.docbook:39
+#. Tag: programlisting
+#: batch.xml:39
+#, no-c-format
 msgid "<![CDATA[hibernate.cache.use_second_level_cache false]]>"
 msgstr ""
 
-#: index.docbook:41
-msgid "However, this is not absolutely necessary, since we can explicitly set the <literal>CacheMode</literal> to disable interaction with the second-level cache."
+#. Tag: para
+#: batch.xml:41
+#, no-c-format
+msgid ""
+"However, this is not absolutely necessary, since we can explicitly set the "
+"<literal>CacheMode</literal> to disable interaction with the second-level "
+"cache."
 msgstr ""
+"但是,这不是绝对必须的,因为我们可以显式设置<literal>CacheMode</literal>来关"
+"闭与二级缓存的交互。"
 
-#: index.docbook:47
+#. Tag: title
+#: batch.xml:47
+#, no-c-format
 msgid "Batch inserts"
-msgstr ""
+msgstr "批量插入(Batch inserts)"
 
-#: index.docbook:49
-msgid "When making new objects persistent, you must <literal>flush()</literal> and then <literal>clear()</literal> the session regularly, to control the size of the first-level cache."
+#. Tag: para
+#: batch.xml:49
+#, no-c-format
+msgid ""
+"When making new objects persistent, you must <literal>flush()</literal> and "
+"then <literal>clear()</literal> the session regularly, to control the size "
+"of the first-level cache."
 msgstr ""
+"如果要将很多对象持久化,你必须通过经常的调用 <literal>flush()</literal> 以及"
+"稍后调用 <literal>clear()</literal> 来控制第一级缓存的大小。"
 
-#: index.docbook:55
+#. Tag: programlisting
+#: batch.xml:55
+#, no-c-format
 msgid ""
-      "<![CDATA[Session session = sessionFactory.openSession();\n"
-      "Transaction tx = session.beginTransaction();\n"
-      "   \n"
-      "for ( int i=0; i<100000; i++ ) {\n"
-      "    Customer customer = new Customer(.....);\n"
-      "    session.save(customer);\n"
-      "    if ( i % 20 == 0 ) { //20, same as the JDBC batch size\n"
-      "        //flush a batch of inserts and release memory:\n"
-      "        session.flush();\n"
-      "        session.clear();\n"
-      "    }\n"
-      "}\n"
-      "   \n"
-      "tx.commit();\n"
-      "session.close();]]>"
+"<![CDATA[Session session = sessionFactory.openSession();\n"
+"Transaction tx = session.beginTransaction();\n"
+"   \n"
+"for ( int i=0; i<100000; i++ ) {\n"
+"    Customer customer = new Customer(.....);\n"
+"    session.save(customer);\n"
+"    if ( i % 20 == 0 ) { //20, same as the JDBC batch size\n"
+"        //flush a batch of inserts and release memory:\n"
+"        session.flush();\n"
+"        session.clear();\n"
+"    }\n"
+"}\n"
+"   \n"
+"tx.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:60
+#. Tag: title
+#: batch.xml:60
+#, no-c-format
 msgid "Batch updates"
-msgstr ""
+msgstr "批量更新(Batch updates)"
 
-#: index.docbook:62
-msgid "For retrieving and updating data the same ideas apply. In addition, you need to use <literal>scroll()</literal> to take advantage of server-side cursors for queries that return many rows of data."
+#. Tag: para
+#: batch.xml:62
+#, no-c-format
+msgid ""
+"For retrieving and updating data the same ideas apply. In addition, you need "
+"to use <literal>scroll()</literal> to take advantage of server-side cursors "
+"for queries that return many rows of data."
 msgstr ""
+"此方法同样适用于检索和更新数据。此外,在进行会返回很多行数据的查询时, 你需要"
+"使用 <literal>scroll()</literal> 方法以便充分利用服务器端游标所带来的好处。"
 
-#: index.docbook:68
+#. Tag: programlisting
+#: batch.xml:68
+#, no-c-format
 msgid ""
-      "<![CDATA[Session session = sessionFactory.openSession();\n"
-      "Transaction tx = session.beginTransaction();\n"
-      "   \n"
-      "ScrollableResults customers = session.getNamedQuery(\"GetCustomers\")\n"
-      "    .setCacheMode(CacheMode.IGNORE)\n"
-      "    .scroll(ScrollMode.FORWARD_ONLY);\n"
-      "int count=0;\n"
-      "while ( customers.next() ) {\n"
-      "    Customer customer = (Customer) customers.get(0);\n"
-      "    customer.updateStuff(...);\n"
-      "    if ( ++count % 20 == 0 ) {\n"
-      "        //flush a batch of updates and release memory:\n"
-      "        session.flush();\n"
-      "        session.clear();\n"
-      "    }\n"
-      "}\n"
-      "   \n"
-      "tx.commit();\n"
-      "session.close();]]>"
+"<![CDATA[Session session = sessionFactory.openSession();\n"
+"Transaction tx = session.beginTransaction();\n"
+"   \n"
+"ScrollableResults customers = session.getNamedQuery(\"GetCustomers\")\n"
+"    .setCacheMode(CacheMode.IGNORE)\n"
+"    .scroll(ScrollMode.FORWARD_ONLY);\n"
+"int count=0;\n"
+"while ( customers.next() ) {\n"
+"    Customer customer = (Customer) customers.get(0);\n"
+"    customer.updateStuff(...);\n"
+"    if ( ++count % 20 == 0 ) {\n"
+"        //flush a batch of updates and release memory:\n"
+"        session.flush();\n"
+"        session.clear();\n"
+"    }\n"
+"}\n"
+"   \n"
+"tx.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:73
+#. Tag: title
+#: batch.xml:73
+#, no-c-format
 msgid "The StatelessSession interface"
-msgstr ""
+msgstr "StatelessSession (无状态session)接口"
 
-#: index.docbook:74
-msgid "Alternatively, Hibernate provides a command-oriented API that may be used for streaming data to and from the database in the form of detached objects. A <literal>StatelessSession</literal> has no persistence context associated with it and does not provide many of the higher-level life cycle semantics. In particular, a stateless session does not implement a first-level cache nor interact with any second-level or query cache. It does not implement transactional write-behind or automatic dirty checking. Operations performed using a stateless session do not ever cascade to associated instances. Collections are ignored by a stateless session. Operations performed via a stateless session bypass Hibernate's event model and interceptors. Stateless sessions are vulnerable to data aliasing effects, due to the lack of a first-level cache. A stateless session is a lower-level abstraction, much closer to the underlying JDBC."
+#. Tag: para
+#: batch.xml:74
+#, no-c-format
+msgid ""
+"Alternatively, Hibernate provides a command-oriented API that may be used "
+"for streaming data to and from the database in the form of detached objects. "
+"A <literal>StatelessSession</literal> has no persistence context associated "
+"with it and does not provide many of the higher-level life cycle semantics. "
+"In particular, a stateless session does not implement a first-level cache "
+"nor interact with any second-level or query cache. It does not implement "
+"transactional write-behind or automatic dirty checking. Operations performed "
+"using a stateless session do not ever cascade to associated instances. "
+"Collections are ignored by a stateless session. Operations performed via a "
+"stateless session bypass Hibernate's event model and interceptors. Stateless "
+"sessions are vulnerable to data aliasing effects, due to the lack of a first-"
+"level cache. A stateless session is a lower-level abstraction, much closer "
+"to the underlying JDBC."
 msgstr ""
+"作为选择,Hibernate提供了基于命令的API,可以用detached object的形式把数据以流"
+"的方法加入到数据库,或从数据库输出。<literal>StatelessSession</literal>没有持"
+"久化上下文,也不提供多少高层的生命周期语义。特别是,无状态session不实现第一级"
+"cache,也不和第二级缓存,或者查询缓存交互。它不实现事务化写,也不实现脏数据检"
+"查。用stateless session进行的操作甚至不级联到关联实例。stateless session忽略"
+"集合类(Collections)。通过stateless session进行的操作不触发Hibernate的事件模型"
+"和拦截器。无状态session对数据的混淆现象免疫,因为它没有第一级缓存。无状态"
+"session是低层的抽象,和低层JDBC相当接近。"
 
-#: index.docbook:89
+#. Tag: programlisting
+#: batch.xml:89
+#, no-c-format
 msgid ""
-      "<![CDATA[StatelessSession session = sessionFactory.openStatelessSession();\n"
-      "Transaction tx = session.beginTransaction();\n"
-      "   \n"
-      "ScrollableResults customers = session.getNamedQuery(\"GetCustomers\")\n"
-      "    .scroll(ScrollMode.FORWARD_ONLY);\n"
-      "while ( customers.next() ) {\n"
-      "    Customer customer = (Customer) customers.get(0);\n"
-      "    customer.updateStuff(...);\n"
-      "    session.update(customer);\n"
-      "}\n"
-      "   \n"
-      "tx.commit();\n"
-      "session.close();]]>"
+"<![CDATA[StatelessSession session = sessionFactory.openStatelessSession();\n"
+"Transaction tx = session.beginTransaction();\n"
+"   \n"
+"ScrollableResults customers = session.getNamedQuery(\"GetCustomers\")\n"
+"    .scroll(ScrollMode.FORWARD_ONLY);\n"
+"while ( customers.next() ) {\n"
+"    Customer customer = (Customer) customers.get(0);\n"
+"    customer.updateStuff(...);\n"
+"    session.update(customer);\n"
+"}\n"
+"   \n"
+"tx.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:91
-msgid "Note that in this code example, the <literal>Customer</literal> instances returned by the query are immediately detached. They are never associated with any persistence context."
+#. Tag: para
+#: batch.xml:91
+#, no-c-format
+msgid ""
+"Note that in this code example, the <literal>Customer</literal> instances "
+"returned by the query are immediately detached. They are never associated "
+"with any persistence context."
 msgstr ""
+"注意在上面的例子中,查询返回的<literal>Customer</literal>实例立即被脱管"
+"(detach)。它们与任何持久化上下文都没有关系。"
 
-#: index.docbook:97
-msgid "The <literal>insert(), update()</literal> and <literal>delete()</literal> operations defined by the <literal>StatelessSession</literal> interface are considered to be direct database row-level operations, which result in immediate execution of a SQL <literal>INSERT, UPDATE</literal> or <literal>DELETE</literal> respectively. Thus, they have very different semantics to the <literal>save(), saveOrUpdate()</literal> and <literal>delete()</literal> operations defined by the <literal>Session</literal> interface."
+#. Tag: para
+#: batch.xml:97
+#, no-c-format
+msgid ""
+"The <literal>insert(), update()</literal> and <literal>delete()</literal> "
+"operations defined by the <literal>StatelessSession</literal> interface are "
+"considered to be direct database row-level operations, which result in "
+"immediate execution of a SQL <literal>INSERT, UPDATE</literal> or "
+"<literal>DELETE</literal> respectively. Thus, they have very different "
+"semantics to the <literal>save(), saveOrUpdate()</literal> and "
+"<literal>delete()</literal> operations defined by the <literal>Session</"
+"literal> interface."
 msgstr ""
+"<literal>StatelessSession</literal> 接口定义的<literal>insert(), update()</"
+"literal> 和 <literal>delete()</literal>操作是直接的数据库行级别操作,其结果是"
+"立刻执行一条<literal>INSERT, UPDATE</literal> 或 <literal>DELETE</literal> 语"
+"句。因此,它们的语义和<literal>Session</literal> 接口定义的<literal>save(), "
+"saveOrUpdate()</literal> 和<literal>delete()</literal> 操作有很大的不同。"
 
-#: index.docbook:110
+#. Tag: title
+#: batch.xml:110
+#, no-c-format
 msgid "DML-style operations"
-msgstr ""
+msgstr "DML(数据操作语言)风格的操作(DML-style operations)"
 
-#: index.docbook:112
-msgid "As already discussed, automatic and transparent object/relational mapping is concerned with the management of object state. This implies that the object state is available in memory, hence manipulating (using the SQL <literal>Data Manipulation Language</literal> (DML) statements: <literal>INSERT</literal>, <literal>UPDATE</literal>, <literal>DELETE</literal>) data directly in the database will not affect in-memory state. However, Hibernate provides methods for bulk SQL-style DML statement execution which are performed through the Hibernate Query Language (<xref linkend=\"queryhql\"/>HQL)."
+#. Tag: para
+#: batch.xml:112
+#, fuzzy, no-c-format
+msgid ""
+"As already discussed, automatic and transparent object/relational mapping is "
+"concerned with the management of object state. This implies that the object "
+"state is available in memory, hence manipulating (using the SQL "
+"<literal>Data Manipulation Language</literal> (DML) statements: "
+"<literal>INSERT</literal>, <literal>UPDATE</literal>, <literal>DELETE</"
+"literal>) data directly in the database will not affect in-memory state. "
+"However, Hibernate provides methods for bulk SQL-style DML statement "
+"execution which are performed through the Hibernate Query Language (<xref "
+"linkend=\"queryhql\"/>HQL)."
 msgstr ""
+"hence manipulating (using the SQL <literal>Data Manipulation Language</"
+"literal> (DML) statements: <literal>INSERT</literal>, <literal>UPDATE</"
+"literal>, <literal>DELETE</literal>) data directly in the database will not "
+"affect in-memory state. However, Hibernate provides methods for bulk SQL-"
+"style DML statement execution which are performed through the Hibernate "
+"Query Language (<xref linkend=\"queryhql\">HQL</xref>). 就像已经讨论的那样,"
+"自动和透明的 对象/关系 映射(object/relational mapping)关注于管理对象的状"
+"态。 这就意味着对象的状态存在于内存,因此直接操作 (使用 SQL <literal>Data "
+"Manipulation Language</literal>(DML,数据操作语言)语句 :<literal>INSERT</"
+"literal> ,<literal>UPDATE</literal> 和 <literal>DELETE</literal>) 数据库中的"
+"数据将不会影响内存中的对象状态和对象数据。 不过,Hibernate提供通过Hibernate查"
+"询语言(<xref linkend=\"queryhql\">HQL</xref>)来执行大批 量SQL风格的DML语句"
+"的方法。"
 
-#: index.docbook:122
-msgid "The pseudo-syntax for <literal>UPDATE</literal> and <literal>DELETE</literal> statements is: <literal>( UPDATE | DELETE ) FROM? EntityName (WHERE where_conditions)?</literal>. Some points to note:"
+#. Tag: para
+#: batch.xml:122
+#, no-c-format
+msgid ""
+"The pseudo-syntax for <literal>UPDATE</literal> and <literal>DELETE</"
+"literal> statements is: <literal>( UPDATE | DELETE ) FROM? EntityName (WHERE "
+"where_conditions)?</literal>. Some points to note:"
 msgstr ""
+"<literal>UPDATE</literal> 和 <literal>DELETE</literal>语句的语法为: "
+"<literal>( UPDATE | DELETE ) FROM? EntityName (WHERE where_conditions)?</"
+"literal> 有几点说明:"
 
-#: index.docbook:130
+#. Tag: para
+#: batch.xml:130
+#, no-c-format
 msgid "In the from-clause, the FROM keyword is optional"
-msgstr ""
+msgstr "在FROM子句(from-clause)中,FROM关键字是可选的"
 
-#: index.docbook:135
-msgid "There can only be a single entity named in the from-clause; it can optionally be aliased. If the entity name is aliased, then any property references must be qualified using that alias; if the entity name is not aliased, then it is illegal for any property references to be qualified."
+#. Tag: para
+#: batch.xml:135
+#, no-c-format
+msgid ""
+"There can only be a single entity named in the from-clause; it can "
+"optionally be aliased. If the entity name is aliased, then any property "
+"references must be qualified using that alias; if the entity name is not "
+"aliased, then it is illegal for any property references to be qualified."
 msgstr ""
+"在FROM子句(from-clause)中只能有一个实体名,它可以是别名。如果实体名是别名,"
+"那么任何被引用的属性都必须加上此别名的前缀;如果不是别名,那么任何有前缀的属"
+"性引用都是非法的。"
 
-#: index.docbook:143
-msgid "No <xref linkend=\"queryhql-joins-forms\"/>joins (either implicit or explicit) can be specified in a bulk HQL query. Sub-queries may be used in the where-clause; the subqueries, themselves, may contain joins."
+#. Tag: para
+#: batch.xml:143
+#, fuzzy, no-c-format
+msgid ""
+"No <xref linkend=\"queryhql-joins-forms\"/>joins (either implicit or "
+"explicit) can be specified in a bulk HQL query. Sub-queries may be used in "
+"the where-clause; the subqueries, themselves, may contain joins."
 msgstr ""
+"不能在大批量HQL语句中使用<xref linkend=\"queryhql-joins-forms\">连接(join)</"
+"xref>(显式或者隐式的都不行)。不过在WHERE子句中可以使用子查询。可以在where子"
+"句中使用子查询,子查询本身可以包含join。"
 
-#: index.docbook:150
+#. Tag: para
+#: batch.xml:150
+#, no-c-format
 msgid "The where-clause is also optional."
-msgstr ""
+msgstr "整个WHERE子句是可选的。"
 
-#: index.docbook:156
-msgid "As an example, to execute an HQL <literal>UPDATE</literal>, use the <literal>Query.executeUpdate()</literal> method (the method is named for those familiar with JDBC's <literal>PreparedStatement.executeUpdate()</literal>):"
+#. Tag: para
+#: batch.xml:156
+#, no-c-format
+msgid ""
+"As an example, to execute an HQL <literal>UPDATE</literal>, use the "
+"<literal>Query.executeUpdate()</literal> method (the method is named for "
+"those familiar with JDBC's <literal>PreparedStatement.executeUpdate()</"
+"literal>):"
 msgstr ""
+"举个例子,使用<literal>Query.executeUpdate()</literal>方法执行一个HQL "
+"<literal>UPDATE</literal>语句(: (方法命名是来源于JDBC's "
+"<literal>PreparedStatement.executeUpdate()</literal>):"
 
-#: index.docbook:162
+#. Tag: programlisting
+#: batch.xml:162
+#, no-c-format
 msgid ""
-      "<![CDATA[Session session = sessionFactory.openSession();\n"
-      "Transaction tx = session.beginTransaction();\n"
-      "\n"
-      "String hqlUpdate = \"update Customer c set c.name = :newName where c.name = :oldName\";\n"
-      "// or String hqlUpdate = \"update Customer set name = :newName where name = :oldName\";\n"
-      "int updatedEntities = s.createQuery( hqlUpdate )\n"
-      "        .setString( \"newName\", newName )\n"
-      "        .setString( \"oldName\", oldName )\n"
-      "        .executeUpdate();\n"
-      "tx.commit();\n"
-      "session.close();]]>"
+"<![CDATA[Session session = sessionFactory.openSession();\n"
+"Transaction tx = session.beginTransaction();\n"
+"\n"
+"String hqlUpdate = \"update Customer c set c.name = :newName where c.name = :"
+"oldName\";\n"
+"// or String hqlUpdate = \"update Customer set name = :newName where name = :"
+"oldName\";\n"
+"int updatedEntities = s.createQuery( hqlUpdate )\n"
+"        .setString( \"newName\", newName )\n"
+"        .setString( \"oldName\", oldName )\n"
+"        .executeUpdate();\n"
+"tx.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:164
-msgid "HQL <literal>UPDATE</literal> statements, by default do not effect the <xref linkend=\"mapping-declaration-version\"/>version or the <xref linkend=\"mapping-declaration-timestamp\"/>timestamp property values for the affected entities; this is in keeping with the EJB3 specification. However, you can force Hibernate to properly reset the <literal>version</literal> or <literal>timestamp</literal> property values through the use of a <literal>versioned update</literal>. This is achieved by adding the <literal>VERSIONED</literal> keyword after the <literal>UPDATE</literal> keyword."
+#. Tag: para
+#: batch.xml:164
+#, fuzzy, no-c-format
+msgid ""
+"HQL <literal>UPDATE</literal> statements, by default do not effect the <xref "
+"linkend=\"mapping-declaration-version\"/>version or the <xref linkend="
+"\"mapping-declaration-timestamp\"/>timestamp property values for the "
+"affected entities; this is in keeping with the EJB3 specification. However, "
+"you can force Hibernate to properly reset the <literal>version</literal> or "
+"<literal>timestamp</literal> property values through the use of a "
+"<literal>versioned update</literal>. This is achieved by adding the "
+"<literal>VERSIONED</literal> keyword after the <literal>UPDATE</literal> "
+"keyword."
 msgstr ""
+"HQL <literal>UPDATE</literal>语句,默认不会影响更新实体的<xref linkend="
+"\"mapping-declaration-version\">version</xref>或者<xref linkend=\"mapping-"
+"declaration-timestamp\">timestamp</xref>属性值。这和EJB3规范是一致的。但是,"
+"通过使用<literal>versioned update</literal>,你可以强制Hibernate正确的重置"
+"<literal>version</literal>或者<literal>timestamp</literal>属性值。这通过在"
+"<literal>UPDATE</literal>关键字后面增加<literal>VERSIONED</literal>关键字来实"
+"现的。"
 
-#: index.docbook:174
+#. Tag: programlisting
+#: batch.xml:174
+#, no-c-format
 msgid ""
-      "<![CDATA[Session session = sessionFactory.openSession();\n"
-      "Transaction tx = session.beginTransaction();\n"
-      "String hqlVersionedUpdate = \"update versioned Customer set name = :newName where name = :oldName\";\n"
-      "int updatedEntities = s.createQuery( hqlUpdate )\n"
-      "        .setString( \"newName\", newName )\n"
-      "        .setString( \"oldName\", oldName )\n"
-      "        .executeUpdate();\n"
-      "tx.commit();\n"
-      "session.close();]]>"
+"<![CDATA[Session session = sessionFactory.openSession();\n"
+"Transaction tx = session.beginTransaction();\n"
+"String hqlVersionedUpdate = \"update versioned Customer set name = :newName "
+"where name = :oldName\";\n"
+"int updatedEntities = s.createQuery( hqlUpdate )\n"
+"        .setString( \"newName\", newName )\n"
+"        .setString( \"oldName\", oldName )\n"
+"        .executeUpdate();\n"
+"tx.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:176
-msgid "Note that custom version types (<literal>org.hibernate.usertype.UserVersionType</literal>) are not allowed in conjunction with a <literal>update versioned</literal> statement."
+#. Tag: para
+#: batch.xml:176
+#, no-c-format
+msgid ""
+"Note that custom version types (<literal>org.hibernate.usertype."
+"UserVersionType</literal>) are not allowed in conjunction with a "
+"<literal>update versioned</literal> statement."
 msgstr ""
+"注意,自定义的版本类型(<literal>org.hibernate.usertype.UserVersionType</"
+"literal>)不允许和<literal>update versioned</literal>语句联用。"
 
-#: index.docbook:181
-msgid "To execute an HQL <literal>DELETE</literal>, use the same <literal>Query.executeUpdate()</literal> method:"
+#. Tag: para
+#: batch.xml:181
+#, no-c-format
+msgid ""
+"To execute an HQL <literal>DELETE</literal>, use the same <literal>Query."
+"executeUpdate()</literal> method:"
 msgstr ""
+"执行一个HQL <literal>DELETE</literal>,同样使用 <literal>Query.executeUpdate"
+"()</literal> 方法:"
 
-#: index.docbook:186
+#. Tag: programlisting
+#: batch.xml:186
+#, no-c-format
 msgid ""
-      "<![CDATA[Session session = sessionFactory.openSession();\n"
-      "Transaction tx = session.beginTransaction();\n"
-      "\n"
-      "String hqlDelete = \"delete Customer c where c.name = :oldName\";\n"
-      "// or String hqlDelete = \"delete Customer where name = :oldName\";\n"
-      "int deletedEntities = s.createQuery( hqlDelete )\n"
-      "        .setString( \"oldName\", oldName )\n"
-      "        .executeUpdate();\n"
-      "tx.commit();\n"
-      "session.close();]]>"
+"<![CDATA[Session session = sessionFactory.openSession();\n"
+"Transaction tx = session.beginTransaction();\n"
+"\n"
+"String hqlDelete = \"delete Customer c where c.name = :oldName\";\n"
+"// or String hqlDelete = \"delete Customer where name = :oldName\";\n"
+"int deletedEntities = s.createQuery( hqlDelete )\n"
+"        .setString( \"oldName\", oldName )\n"
+"        .executeUpdate();\n"
+"tx.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:188
-msgid "The <literal>int</literal> value returned by the <literal>Query.executeUpdate()</literal> method indicate the number of entities effected by the operation. Consider this may or may not correlate to the number of rows effected in the database. An HQL bulk operation might result in multiple actual SQL statements being executed, for joined-subclass, for example. The returned number indicates the number of actual entities affected by the statement. Going back to the example of joined-subclass, a delete against one of the subclasses may actually result in deletes against not just the table to which that subclass is mapped, but also the \"root\" table and potentially joined-subclass tables further down the inheritence hierarchy."
+#. Tag: para
+#: batch.xml:188
+#, no-c-format
+msgid ""
+"The <literal>int</literal> value returned by the <literal>Query.executeUpdate"
+"()</literal> method indicate the number of entities effected by the "
+"operation. Consider this may or may not correlate to the number of rows "
+"effected in the database. An HQL bulk operation might result in multiple "
+"actual SQL statements being executed, for joined-subclass, for example. The "
+"returned number indicates the number of actual entities affected by the "
+"statement. Going back to the example of joined-subclass, a delete against "
+"one of the subclasses may actually result in deletes against not just the "
+"table to which that subclass is mapped, but also the \"root\" table and "
+"potentially joined-subclass tables further down the inheritence hierarchy."
 msgstr ""
+"由<literal>Query.executeUpdate()</literal>方法返回的<literal>整型</literal>值"
+"表明了受此操作影响的记录数量。 注意这个数值可能与数据库中被(最后一条SQL语"
+"句)影响了的“行”数有关,也可能没有。一个大批量HQL操作可能导致多条实际的SQL语"
+"句被执行, 举个例子,对joined-subclass映射方式的类进行的此类操作。这个返回值"
+"代表了实际被语句影响了的记录数量。在那个joined-subclass的例子中, 对一个子类"
+"的删除实际上可能不仅仅会删除子类映射到的表而且会影响“根”表,还有可能影响与之"
+"有继承关系的joined-subclass映射方式的子类的表。"
 
-#: index.docbook:199
-msgid "The pseudo-syntax for <literal>INSERT</literal> statements is: <literal>INSERT INTO EntityName properties_list select_statement</literal>. Some points to note:"
+#. Tag: para
+#: batch.xml:199
+#, no-c-format
+msgid ""
+"The pseudo-syntax for <literal>INSERT</literal> statements is: "
+"<literal>INSERT INTO EntityName properties_list select_statement</literal>. "
+"Some points to note:"
 msgstr ""
+"<literal>INSERT</literal>语句的伪码是: <literal>INSERT INTO EntityName "
+"properties_list select_statement</literal>. 要注意的是:"
 
-#: index.docbook:207
-msgid "Only the INSERT INTO ... SELECT ... form is supported; not the INSERT INTO ... VALUES ... form."
+#. Tag: para
+#: batch.xml:207
+#, no-c-format
+msgid ""
+"Only the INSERT INTO ... SELECT ... form is supported; not the INSERT "
+"INTO ... VALUES ... form."
 msgstr ""
+"只支持INSERT INTO ... SELECT ...形式,不支持INSERT INTO ... VALUES ...形式."
 
-#: index.docbook:210
-msgid "The properties_list is analogous to the <literal>column speficiation</literal> in the SQL <literal>INSERT</literal> statement. For entities involved in mapped inheritence, only properties directly defined on that given class-level can be used in the properties_list. Superclass properties are not allowed; and subclass properties do not make sense. In other words, <literal>INSERT</literal> statements are inherently non-polymorphic."
+#. Tag: para
+#: batch.xml:210
+#, no-c-format
+msgid ""
+"The properties_list is analogous to the <literal>column speficiation</"
+"literal> in the SQL <literal>INSERT</literal> statement. For entities "
+"involved in mapped inheritence, only properties directly defined on that "
+"given class-level can be used in the properties_list. Superclass properties "
+"are not allowed; and subclass properties do not make sense. In other words, "
+"<literal>INSERT</literal> statements are inherently non-polymorphic."
 msgstr ""
+"properties_list和SQL <literal>INSERT</literal>语句中的<literal>字段定义"
+"(column speficiation)</literal>类似。对参与继承树映射的实体而言,只有直接定义"
+"在给定的类级别的属性才能直接在properties_list中使用。超类的属性不被支持;子类"
+"的属性无意义。换句话说,<literal>INSERT</literal>天生不支持多态。"
 
-#: index.docbook:220
-msgid "select_statement can be any valid HQL select query, with the caveat that the return types must match the types expected by the insert. Currently, this is checked during query compilation rather than allowing the check to relegate to the database. Note however that this might cause problems between Hibernate <literal>Type</literal>s which are <emphasis>equivalent</emphasis> as opposed to <emphasis>equal</emphasis>. This might cause issues with mismatches between a property defined as a <literal>org.hibernate.type.DateType</literal> and a property defined as a <literal>org.hibernate.type.TimestampType</literal>, even though the database might not make a distinction or might be able to handle the conversion."
+#. Tag: para
+#: batch.xml:220
+#, no-c-format
+msgid ""
+"select_statement can be any valid HQL select query, with the caveat that the "
+"return types must match the types expected by the insert. Currently, this is "
+"checked during query compilation rather than allowing the check to relegate "
+"to the database. Note however that this might cause problems between "
+"Hibernate <literal>Type</literal>s which are <emphasis>equivalent</emphasis> "
+"as opposed to <emphasis>equal</emphasis>. This might cause issues with "
+"mismatches between a property defined as a <literal>org.hibernate.type."
+"DateType</literal> and a property defined as a <literal>org.hibernate.type."
+"TimestampType</literal>, even though the database might not make a "
+"distinction or might be able to handle the conversion."
 msgstr ""
+"select_statement可以是任何合法的HQL选择查询,不过要保证返回类型必须和要插入的"
+"类型完全匹配。目前,这一检查是在查询编译的时候进行的,而不是把它交给数据库。"
+"注意,在Hibernate<literal>Type</literal>间如果只是<emphasis>等价"
+"(equivalent)</emphasis>而非<emphasis>相等(equal)</emphasis>,会导致问题。定"
+"义为<literal>org.hibernate.type.DateType</literal>和<literal>org.hibernate."
+"type.TimestampType</literal>的两个属性可能会产生类型不匹配错误,虽然数据库级"
+"可能不加区分或者可以处理这种转换。"
 
-#: index.docbook:232
-msgid "For the id property, the insert statement gives you two options. You can either explicitly specify the id property in the properties_list (in which case its value is taken from the corresponding select expression) or omit it from the properties_list (in which case a generated value is used). This later option is only available when using id generators that operate in the database; attempting to use this option with any \"in memory\" type generators will cause an exception during parsing. Note that for the purposes of this discussion, in-database generators are considered to be <literal>org.hibernate.id.SequenceGenerator</literal> (and its subclasses) and any implementors of <literal>org.hibernate.id.PostInsertIdentifierGenerator</literal>. The most notable exception here is <literal>org.hibernate.id.TableHiLoGenerator</literal>, which cannot be used because it does not expose a selectable way to get its values."
+#. Tag: para
+#: batch.xml:232
+#, no-c-format
+msgid ""
+"For the id property, the insert statement gives you two options. You can "
+"either explicitly specify the id property in the properties_list (in which "
+"case its value is taken from the corresponding select expression) or omit it "
+"from the properties_list (in which case a generated value is used). This "
+"later option is only available when using id generators that operate in the "
+"database; attempting to use this option with any \"in memory\" type "
+"generators will cause an exception during parsing. Note that for the "
+"purposes of this discussion, in-database generators are considered to be "
+"<literal>org.hibernate.id.SequenceGenerator</literal> (and its subclasses) "
+"and any implementors of <literal>org.hibernate.id."
+"PostInsertIdentifierGenerator</literal>. The most notable exception here is "
+"<literal>org.hibernate.id.TableHiLoGenerator</literal>, which cannot be used "
+"because it does not expose a selectable way to get its values."
 msgstr ""
+"对id属性来说,insert语句给你两个选择。你可以明确地在properties_list表中指定id"
+"属性(这样它的值是从对应的select表达式中获得),或者在properties_list中省略它"
+"(此时使用生成指)。后一种选择只有当使用在数据库中生成值的id产生器时才能使"
+"用;如果是“内存”中计算的类型生成器,在解析时会抛出一个异常。注意,为了说明这"
+"一问题,数据库产生值的生成器是<literal>org.hibernate.id.SequenceGenerator</"
+"literal>(和它的子类),以及任何<literal>org.hibernate.id."
+"PostInsertIdentifierGenerator</literal>接口的实现。这儿最值得注意的意外是"
+"<literal>org.hibernate.id.TableHiLoGenerator</literal>,它不能在此使用,因为"
+"它没有得到其值的途径。"
 
-#: index.docbook:247
-msgid "For properties mapped as either <literal>version</literal> or <literal>timestamp</literal>, the insert statement gives you two options. You can either specify the property in the properties_list (in which case its value is taken from the corresponding select expressions) or omit it from the properties_list (in which case the <literal>seed value</literal> defined by the <literal>org.hibernate.type.VersionType</literal> is used)."
+#. Tag: para
+#: batch.xml:247
+#, no-c-format
+msgid ""
+"For properties mapped as either <literal>version</literal> or "
+"<literal>timestamp</literal>, the insert statement gives you two options. "
+"You can either specify the property in the properties_list (in which case "
+"its value is taken from the corresponding select expressions) or omit it "
+"from the properties_list (in which case the <literal>seed value</literal> "
+"defined by the <literal>org.hibernate.type.VersionType</literal> is used)."
 msgstr ""
+"对映射为<literal>version</literal> 或 <literal>timestamp</literal>的属性来"
+"说,insert语句也给你两个选择,你可以在properties_list表中指定(此时其值从对应"
+"的select表达式中获得),或者在properties_list中省略它(此时,使用在"
+"<literal>org.hibernate.type.VersionType</literal> 中定义的<literal>seed value"
+"(种子值)</literal>)。"
 
-#: index.docbook:257
+#. Tag: para
+#: batch.xml:257
+#, no-c-format
 msgid "An example HQL <literal>INSERT</literal> statement execution:"
-msgstr ""
+msgstr "执行HQL <literal>INSERT</literal>语句的例子如下:"
 
-#: index.docbook:261
+#. Tag: programlisting
+#: batch.xml:261
+#, no-c-format
 msgid ""
-      "<![CDATA[Session session = sessionFactory.openSession();\n"
-      "Transaction tx = session.beginTransaction();\n"
-      "\n"
-      "String hqlInsert = \"insert into DelinquentAccount (id, name) select c.id, c.name from Customer c where ...\";\n"
-      "int createdEntities = s.createQuery( hqlInsert )\n"
-      "        .executeUpdate();\n"
-      "tx.commit();\n"
-      "session.close();]]>"
+"<![CDATA[Session session = sessionFactory.openSession();\n"
+"Transaction tx = session.beginTransaction();\n"
+"\n"
+"String hqlInsert = \"insert into DelinquentAccount (id, name) select c.id, c."
+"name from Customer c where ...\";\n"
+"int createdEntities = s.createQuery( hqlInsert )\n"
+"        .executeUpdate();\n"
+"tx.commit();\n"
+"session.close();]]>"
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-

Modified: core/trunk/documentation/manual/translations/zh-CN/content/best_practices.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/best_practices.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/best_practices.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,168 +1,428 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: best_practices.xml:5
+#, no-c-format
 msgid "Best Practices"
-msgstr ""
+msgstr "最佳实践(Best Practices)"
 
-#: index.docbook:9
-msgid "Write fine-grained classes and map them using <literal>&lt;component&gt;</literal>."
+#. Tag: term
+#: best_practices.xml:9
+#, no-c-format
+msgid ""
+"Write fine-grained classes and map them using <literal>&lt;component&gt;</"
+"literal>."
 msgstr ""
+"设计细颗粒度的持久类并且使用<literal>&lt;component&gt;</literal>来实现映射。"
 
-#: index.docbook:11
-msgid "Use an <literal>Address</literal> class to encapsulate <literal>street</literal>, <literal>suburb</literal>, <literal>state</literal>, <literal>postcode</literal>. This encourages code reuse and simplifies refactoring."
+#. Tag: para
+#: best_practices.xml:11
+#, no-c-format
+msgid ""
+"Use an <literal>Address</literal> class to encapsulate <literal>street</"
+"literal>, <literal>suburb</literal>, <literal>state</literal>, "
+"<literal>postcode</literal>. This encourages code reuse and simplifies "
+"refactoring."
 msgstr ""
+"使用一个<literal>Address</literal>持久类来封装 <literal>street</literal>, "
+"<literal>suburb</literal>, <literal>state</literal>, <literal>postcode</"
+"literal>. 这将有利于代码重用和简化代码重构(refactoring)的工作。"
 
-#: index.docbook:19
+#. Tag: term
+#: best_practices.xml:19
+#, no-c-format
 msgid "Declare identifier properties on persistent classes."
-msgstr ""
+msgstr "对持久类声明标识符属性( identifier properties)。"
 
-#: index.docbook:21
-msgid "Hibernate makes identifier properties optional. There are all sorts of reasons why you should use them. We recommend that identifiers be 'synthetic' (generated, with no business meaning)."
+#. Tag: para
+#: best_practices.xml:21
+#, no-c-format
+msgid ""
+"Hibernate makes identifier properties optional. There are all sorts of "
+"reasons why you should use them. We recommend that identifiers be "
+"'synthetic' (generated, with no business meaning)."
 msgstr ""
+"Hibernate中标识符属性是可选的,不过有很多原因来说明你应该使用标识符属性。我们"
+"建议标识符应该是“人造”的(自动生成,不涉及业务含义)。"
 
-#: index.docbook:29
+#. Tag: term
+#: best_practices.xml:29
+#, no-c-format
 msgid "Identify natural keys."
-msgstr ""
+msgstr "使用自然键(natural keys)标识"
 
-#: index.docbook:31
-msgid "Identify natural keys for all entities, and map them using <literal>&lt;natural-id&gt;</literal>. Implement <literal>equals()</literal> and <literal>hashCode()</literal> to compare the properties that make up the natural key."
+#. Tag: para
+#: best_practices.xml:31
+#, no-c-format
+msgid ""
+"Identify natural keys for all entities, and map them using <literal>&lt;"
+"natural-id&gt;</literal>. Implement <literal>equals()</literal> and "
+"<literal>hashCode()</literal> to compare the properties that make up the "
+"natural key."
 msgstr ""
+"对所有的实体都标识出自然键,用<literal>&lt;natural-id&gt;</literal>进行映射。"
+"实现<literal>equals()</literal>和<literal>hashCode()</literal>,在其中用组成"
+"自然键的属性进行比较。"
 
-#: index.docbook:39
+#. Tag: term
+#: best_practices.xml:39
+#, no-c-format
 msgid "Place each class mapping in its own file."
-msgstr ""
+msgstr "为每个持久类写一个映射文件"
 
-#: index.docbook:41
-msgid "Don't use a single monolithic mapping document. Map <literal>com.eg.Foo</literal> in the file <literal>com/eg/Foo.hbm.xml</literal>. This makes particularly good sense in a team environment."
+#. Tag: para
+#: best_practices.xml:41
+#, no-c-format
+msgid ""
+"Don't use a single monolithic mapping document. Map <literal>com.eg.Foo</"
+"literal> in the file <literal>com/eg/Foo.hbm.xml</literal>. This makes "
+"particularly good sense in a team environment."
 msgstr ""
+"不要把所有的持久类映射都写到一个大文件中。把 <literal>com.eg.Foo</literal> 映"
+"射到<literal>com/eg/Foo.hbm.xml</literal>中, 在团队开发环境中,这一点显得特"
+"别有意义。"
 
-#: index.docbook:49
+#. Tag: term
+#: best_practices.xml:49
+#, no-c-format
 msgid "Load mappings as resources."
-msgstr ""
+msgstr "把映射文件作为资源加载"
 
-#: index.docbook:51
+#. Tag: para
+#: best_practices.xml:51
+#, no-c-format
 msgid "Deploy the mappings along with the classes they map."
-msgstr ""
+msgstr "把映射文件和他们的映射类放在一起进行部署。"
 
-#: index.docbook:57
+#. Tag: term
+#: best_practices.xml:57
+#, no-c-format
 msgid "Consider externalising query strings."
-msgstr ""
+msgstr "考虑把查询字符串放在程序外面"
 
-#: index.docbook:59
-msgid "This is a good practice if your queries call non-ANSI-standard SQL functions. Externalising the query strings to mapping files will make the application more portable."
+#. Tag: para
+#: best_practices.xml:59
+#, no-c-format
+msgid ""
+"This is a good practice if your queries call non-ANSI-standard SQL "
+"functions. Externalising the query strings to mapping files will make the "
+"application more portable."
 msgstr ""
+"如果你的查询中调用了非ANSI标准的SQL函数,那么这条实践经验对你适用。把查询字符"
+"串放在映射文件中可以让程序具有更好的可移植性。"
 
-#: index.docbook:67
+#. Tag: term
+#: best_practices.xml:67
+#, no-c-format
 msgid "Use bind variables."
-msgstr ""
+msgstr "使用绑定变量"
 
-#: index.docbook:69
-msgid "As in JDBC, always replace non-constant values by \"?\". Never use string manipulation to bind a non-constant value in a query! Even better, consider using named parameters in queries."
+#. Tag: para
+#: best_practices.xml:69
+#, no-c-format
+msgid ""
+"As in JDBC, always replace non-constant values by \"?\". Never use string "
+"manipulation to bind a non-constant value in a query! Even better, consider "
+"using named parameters in queries."
 msgstr ""
+"就像在JDBC编程中一样,应该总是用占位符\"?\"来替换非常量值,不要在查询中用字符"
+"串值来构造非常量值!更好的办法是在查询中使用命名参数。"
 
-#: index.docbook:77
+#. Tag: term
+#: best_practices.xml:77
+#, no-c-format
 msgid "Don't manage your own JDBC connections."
-msgstr ""
+msgstr "不要自己来管理JDBC connections"
 
-#: index.docbook:79
-msgid "Hibernate lets the application manage JDBC connections. This approach should be considered a last-resort. If you can't use the built-in connections providers, consider providing your own implementation of <literal>org.hibernate.connection.ConnectionProvider</literal>."
+#. Tag: para
+#: best_practices.xml:79
+#, no-c-format
+msgid ""
+"Hibernate lets the application manage JDBC connections. This approach should "
+"be considered a last-resort. If you can't use the built-in connections "
+"providers, consider providing your own implementation of <literal>org."
+"hibernate.connection.ConnectionProvider</literal>."
 msgstr ""
+"Hibernate允许应用程序自己来管理JDBC connections,但是应该作为最后没有办法的办"
+"法。如果你不能使用Hibernate内建的connections providers,那么考虑实现自己来实"
+"现<literal>org.hibernate.connection.ConnectionProvider</literal>"
 
-#: index.docbook:87
+#. Tag: term
+#: best_practices.xml:87
+#, no-c-format
 msgid "Consider using a custom type."
-msgstr ""
+msgstr "考虑使用用户自定义类型(custom type)"
 
-#: index.docbook:89
-msgid "Suppose you have a Java type, say from some library, that needs to be persisted but doesn't provide the accessors needed to map it as a component. You should consider implementing <literal>org.hibernate.UserType</literal>. This approach frees the application code from implementing transformations to / from a Hibernate type."
+#. Tag: para
+#: best_practices.xml:89
+#, no-c-format
+msgid ""
+"Suppose you have a Java type, say from some library, that needs to be "
+"persisted but doesn't provide the accessors needed to map it as a component. "
+"You should consider implementing <literal>org.hibernate.UserType</literal>. "
+"This approach frees the application code from implementing transformations "
+"to / from a Hibernate type."
 msgstr ""
+"假设你有一个Java类型,来自某些类库,需要被持久化,但是该类没有提供映射操作需"
+"要的存取方法。那么你应该考虑实现<literal>org.hibernate.UserType</literal>接"
+"口。这种办法使程序代码写起来更加自如,不再需要考虑类与Hibernate type之间的相"
+"互转换。"
 
-#: index.docbook:98
+#. Tag: term
+#: best_practices.xml:98
+#, no-c-format
 msgid "Use hand-coded JDBC in bottlenecks."
-msgstr ""
+msgstr "在性能瓶颈的地方使用硬编码的JDBC"
 
-#: index.docbook:100
-msgid "In performance-critical areas of the system, some kinds of operations might benefit from direct JDBC. But please, wait until you <emphasis>know</emphasis> something is a bottleneck. And don't assume that direct JDBC is necessarily faster. If you need to use direct JDBC, it might be worth opening a Hibernate <literal>Session</literal> and using that JDBC connection. That way you can still use the same transaction strategy and underlying connection provider."
+#. Tag: para
+#: best_practices.xml:100
+#, no-c-format
+msgid ""
+"In performance-critical areas of the system, some kinds of operations might "
+"benefit from direct JDBC. But please, wait until you <emphasis>know</"
+"emphasis> something is a bottleneck. And don't assume that direct JDBC is "
+"necessarily faster. If you need to use direct JDBC, it might be worth "
+"opening a Hibernate <literal>Session</literal> and using that JDBC "
+"connection. That way you can still use the same transaction strategy and "
+"underlying connection provider."
 msgstr ""
+"In performance-critical areas of the system, some kinds of operations might "
+"benefit from direct JDBC. But please, wait until you <emphasis>know</"
+"emphasis> something is a bottleneck. And don't assume that direct JDBC is "
+"necessarily faster. If you need to use direct JDBC, it might be worth "
+"opening a Hibernate <literal>Session</literal> and using that JDBC "
+"connection. That way you can still use the same transaction strategy and "
+"underlying connection provider. 在系统中对性能要求很严格的一些部分,某些操作"
+"也许直接使用JDBC会更好。但是请先<emphasis>确认</emphasis>这的确是一个瓶颈,并"
+"且不要想当然认为JDBC一定会更快。如果确实需要直接使用JDBC,那么最好打开一个 "
+"Hibernate <literal>Session</literal> 然后从 <literal>Session</literal>获得"
+"connection,按照这种办法你仍然可以使用同样的transaction策略和底层的"
+"connection provider。"
 
-#: index.docbook:110
+#. Tag: term
+#: best_practices.xml:110
+#, no-c-format
 msgid "Understand <literal>Session</literal> flushing."
-msgstr ""
+msgstr "理解<literal>Session</literal>清洗( flushing)"
 
-#: index.docbook:112
-msgid "From time to time the Session synchronizes its persistent state with the database. Performance will be affected if this process occurs too often. You may sometimes minimize unnecessary flushing by disabling automatic flushing or even by changing the order of queries and other operations within a particular transaction."
+#. Tag: para
+#: best_practices.xml:112
+#, no-c-format
+msgid ""
+"From time to time the Session synchronizes its persistent state with the "
+"database. Performance will be affected if this process occurs too often. You "
+"may sometimes minimize unnecessary flushing by disabling automatic flushing "
+"or even by changing the order of queries and other operations within a "
+"particular transaction."
 msgstr ""
+"Session会不时的向数据库同步持久化状态,如果这种操作进行的过于频繁,性能会受到"
+"一定的影响。有时候你可以通过禁止自动flushing,尽量最小化非必要的flushing操"
+"作,或者更进一步,在一个特定的transaction中改变查询和其它操作的顺序。"
 
-#: index.docbook:121
+#. Tag: term
+#: best_practices.xml:121
+#, no-c-format
 msgid "In a three tiered architecture, consider using detached objects."
-msgstr ""
+msgstr "在三层结构中,考虑使用托管对象(detached object)"
 
-#: index.docbook:123
-msgid "When using a servlet / session bean architecture, you could pass persistent objects loaded in the session bean to and from the servlet / JSP layer. Use a new session to service each request. Use <literal>Session.merge()</literal> or <literal>Session.saveOrUpdate()</literal> to synchronize objects with the database."
+#. Tag: para
+#: best_practices.xml:123
+#, no-c-format
+msgid ""
+"When using a servlet / session bean architecture, you could pass persistent "
+"objects loaded in the session bean to and from the servlet / JSP layer. Use "
+"a new session to service each request. Use <literal>Session.merge()</"
+"literal> or <literal>Session.saveOrUpdate()</literal> to synchronize objects "
+"with the database."
 msgstr ""
+"当使用一个servlet / session bean 类型的架构的时候, 你可以把已加载的持久对象在"
+"session bean层和servlet / JSP 层之间来回传递。使用新的session来为每个请求服"
+"务,使用 <literal>Session.merge()</literal> 或者<literal>Session.saveOrUpdate"
+"()</literal>来与数据库同步。"
 
-#: index.docbook:132
+#. Tag: term
+#: best_practices.xml:132
+#, no-c-format
 msgid "In a two tiered architecture, consider using long persistence contexts."
-msgstr ""
+msgstr "在两层结构中,考虑使用长持久上下文(long persistence contexts)."
 
-#: index.docbook:134
-msgid "Database Transactions have to be as short as possible for best scalability. However, it is often neccessary to implement long running <emphasis>application transactions</emphasis>, a single unit-of-work from the point of view of a user. An application transaction might span several client request/response cycles. It is common to use detached objects to implement application transactions. An alternative, extremely appropriate in two tiered architecture, is to maintain a single open persistence contact (session) for the whole life cycle of the application transaction and simply disconnect from the JDBC connection at the end of each request and reconnect at the beginning of the subsequent request. Never share a single session across more than one application transaction, or you will be working with stale data."
+#. Tag: para
+#: best_practices.xml:134
+#, no-c-format
+msgid ""
+"Database Transactions have to be as short as possible for best scalability. "
+"However, it is often neccessary to implement long running "
+"<emphasis>application transactions</emphasis>, a single unit-of-work from "
+"the point of view of a user. An application transaction might span several "
+"client request/response cycles. It is common to use detached objects to "
+"implement application transactions. An alternative, extremely appropriate in "
+"two tiered architecture, is to maintain a single open persistence contact "
+"(session) for the whole life cycle of the application transaction and simply "
+"disconnect from the JDBC connection at the end of each request and reconnect "
+"at the beginning of the subsequent request. Never share a single session "
+"across more than one application transaction, or you will be working with "
+"stale data."
 msgstr ""
+"为了得到最佳的可伸缩性,数据库事务(Database Transaction)应该尽可能的短。但"
+"是,程序常常需要实现长时间运行的<emphasis>“应用程序事务(Application "
+"Transaction)”</emphasis>,包含一个从用户的观点来看的原子操作。这个应用程序事"
+"务可能跨越多次从用户请求到得到反馈的循环。用脱管对象(与session脱离的对象)来实"
+"现应用程序事务是常见的。或者,尤其在两层结构中,把Hibernate Session从JDBC连接"
+"中脱离开,下次需要用的时候再连接上。绝不要把一个Session用在多个应用程序事务"
+"(Application Transaction)中,否则你的数据可能会过期失效。"
 
-#: index.docbook:148
+#. Tag: term
+#: best_practices.xml:148
+#, no-c-format
 msgid "Don't treat exceptions as recoverable."
-msgstr ""
+msgstr "不要把异常看成可恢复的"
 
-#: index.docbook:150
-msgid "This is more of a necessary practice than a \"best\" practice. When an exception occurs, roll back the <literal>Transaction</literal> and close the <literal>Session</literal>. If you don't, Hibernate can't guarantee that in-memory state accurately represents persistent state. As a special case of this, do not use <literal>Session.load()</literal> to determine if an instance with the given identifier exists on the database; use <literal>Session.get()</literal> or a query instead."
+#. Tag: para
+#: best_practices.xml:150
+#, no-c-format
+msgid ""
+"This is more of a necessary practice than a \"best\" practice. When an "
+"exception occurs, roll back the <literal>Transaction</literal> and close the "
+"<literal>Session</literal>. If you don't, Hibernate can't guarantee that in-"
+"memory state accurately represents persistent state. As a special case of "
+"this, do not use <literal>Session.load()</literal> to determine if an "
+"instance with the given identifier exists on the database; use "
+"<literal>Session.get()</literal> or a query instead."
 msgstr ""
+"这一点甚至比“最佳实践”还要重要,这是“必备常识”。当异常发生的时候,必须要回滚 "
+"<literal>Transaction</literal> ,关闭<literal>Session</literal>。如果你不这样"
+"做的话,Hibernate无法保证内存状态精确的反应持久状态。尤其不要使用"
+"<literal>Session.load()</literal>来判断一个给定标识符的对象实例在数据库中是否"
+"存在,应该使用<literal>Session.get()</literal>或者进行一次查询."
 
-#: index.docbook:160
+#. Tag: term
+#: best_practices.xml:160
+#, no-c-format
 msgid "Prefer lazy fetching for associations."
-msgstr ""
+msgstr "对于关联优先考虑lazy fetching"
 
-#: index.docbook:162
-msgid "Use eager fetching sparingly. Use proxies and lazy collections for most associations to classes that are not likely to be completely held in the second-level cache. For associations to cached classes, where there is an a extremely high probability of a cache hit, explicitly disable eager fetching using <literal>lazy=\"false\"</literal>. When an join fetching is appropriate to a particular use case, use a query with a <literal>left join fetch</literal>."
+#. Tag: para
+#: best_practices.xml:162
+#, no-c-format
+msgid ""
+"Use eager fetching sparingly. Use proxies and lazy collections for most "
+"associations to classes that are not likely to be completely held in the "
+"second-level cache. For associations to cached classes, where there is an a "
+"extremely high probability of a cache hit, explicitly disable eager fetching "
+"using <literal>lazy=\"false\"</literal>. When an join fetching is "
+"appropriate to a particular use case, use a query with a <literal>left join "
+"fetch</literal>."
 msgstr ""
+"谨慎的使用主动抓取(eager fetching)。对于关联来说,若其目标是无法在第二级缓存"
+"中完全缓存所有实例的类,应该使用代理(proxies)与/或具有延迟加载属性的集合"
+"(lazy collections)。若目标是可以被缓存的,尤其是缓存的命中率非常高的情况下,"
+"应该使用<literal>lazy=\"false\"</literal>,明确的禁止掉eager fetching。如果那"
+"些特殊的确实适合使用join fetch 的场合,请在查询中使用<literal>left join "
+"fetch</literal>。"
 
-#: index.docbook:172
-msgid "Use the <emphasis>open session in view</emphasis> pattern, or a disciplined <emphasis>assembly phase</emphasis> to avoid problems with unfetched data."
+#. Tag: term
+#: best_practices.xml:172
+#, no-c-format
+msgid ""
+"Use the <emphasis>open session in view</emphasis> pattern, or a disciplined "
+"<emphasis>assembly phase</emphasis> to avoid problems with unfetched data."
 msgstr ""
+"使用<emphasis>open session in view</emphasis>模式,或者执行严格的<emphasis>装"
+"配期(assembly phase)</emphasis>策略来避免再次抓取数据带来的问题"
 
-#: index.docbook:177
-msgid "Hibernate frees the developer from writing tedious <emphasis>Data Transfer Objects</emphasis> (DTO). In a traditional EJB architecture, DTOs serve dual purposes: first, they work around the problem that entity beans are not serializable; second, they implicitly define an assembly phase where all data to be used by the view is fetched and marshalled into the DTOs before returning control to the presentation tier. Hibernate eliminates the first purpose. However, you will still need an assembly phase (think of your business methods as having a strict contract with the presentation tier about what data is available in the detached objects) unless you are prepared to hold the persistence context (the session) open across the view rendering process. This is not a limitation of Hibernate! It is a fundamental requirement of safe transactional data access."
+#. Tag: para
+#: best_practices.xml:177
+#, no-c-format
+msgid ""
+"Hibernate frees the developer from writing tedious <emphasis>Data Transfer "
+"Objects</emphasis> (DTO). In a traditional EJB architecture, DTOs serve dual "
+"purposes: first, they work around the problem that entity beans are not "
+"serializable; second, they implicitly define an assembly phase where all "
+"data to be used by the view is fetched and marshalled into the DTOs before "
+"returning control to the presentation tier. Hibernate eliminates the first "
+"purpose. However, you will still need an assembly phase (think of your "
+"business methods as having a strict contract with the presentation tier "
+"about what data is available in the detached objects) unless you are "
+"prepared to hold the persistence context (the session) open across the view "
+"rendering process. This is not a limitation of Hibernate! It is a "
+"fundamental requirement of safe transactional data access."
 msgstr ""
+"Hibernate让开发者们摆脱了繁琐的<emphasis>Data Transfer Objects</emphasis> "
+"(DTO)。在传统的EJB结构中,DTO有双重作用:首先,他们解决了entity bean无法序列"
+"化的问题;其次,他们隐含地定义了一个装配期,在此期间,所有在view层需要用到的"
+"数据,都被抓取、集中到了DTO中,然后控制才被装到表示层。Hibernate终结了第一个"
+"作用。然而,除非你做好了在整个渲染过程中都维护一个打开的持久化上下文(session)"
+"的准备,你仍然需要一个装配期(想象一下,你的业务方法与你的表示层有严格的契"
+"约,数据总是被放置到托管对象中)。这并非是Hibernate的限制!这是实现安全的事务"
+"化数据访问的基本需求。"
 
-#: index.docbook:191
+#. Tag: term
+#: best_practices.xml:191
+#, no-c-format
 msgid "Consider abstracting your business logic from Hibernate."
-msgstr ""
+msgstr "考虑把Hibernate代码从业务逻辑代码中抽象出来"
 
-#: index.docbook:193
-msgid "Hide (Hibernate) data-access code behind an interface. Combine the <emphasis>DAO</emphasis> and <emphasis>Thread Local Session</emphasis> patterns. You can even have some classes persisted by handcoded JDBC, associated to Hibernate via a <literal>UserType</literal>. (This advice is intended for \"sufficiently large\" applications; it is not appropriate for an application with five tables!)"
+#. Tag: para
+#: best_practices.xml:193
+#, no-c-format
+msgid ""
+"Hide (Hibernate) data-access code behind an interface. Combine the "
+"<emphasis>DAO</emphasis> and <emphasis>Thread Local Session</emphasis> "
+"patterns. You can even have some classes persisted by handcoded JDBC, "
+"associated to Hibernate via a <literal>UserType</literal>. (This advice is "
+"intended for \"sufficiently large\" applications; it is not appropriate for "
+"an application with five tables!)"
 msgstr ""
+"把Hibernate的数据存取代码隐藏到接口(interface)的后面,组合使用<emphasis>DAO</"
+"emphasis>和<emphasis>Thread Local Session</emphasis>模式。通过Hibernate的"
+"<literal>UserType</literal>,你甚至可以用硬编码的JDBC来持久化那些本该被"
+"Hibernate持久化的类。 (该建议更适用于规模足够大应用软件中,对于那些只有5张表"
+"的应用程序并不适合。)"
 
-#: index.docbook:203
+#. Tag: term
+#: best_practices.xml:203
+#, no-c-format
 msgid "Don't use exotic association mappings."
-msgstr ""
+msgstr "不要用怪异的连接映射"
 
-#: index.docbook:205
-msgid "Good usecases for a real many-to-many associations are rare. Most of the time you need additional information stored in the \"link table\". In this case, it is much better to use two one-to-many associations to an intermediate link class. In fact, we think that most associations are one-to-many and many-to-one, you should be careful when using any other association style and ask yourself if it is really neccessary."
+#. Tag: para
+#: best_practices.xml:205
+#, no-c-format
+msgid ""
+"Good usecases for a real many-to-many associations are rare. Most of the "
+"time you need additional information stored in the \"link table\". In this "
+"case, it is much better to use two one-to-many associations to an "
+"intermediate link class. In fact, we think that most associations are one-to-"
+"many and many-to-one, you should be careful when using any other association "
+"style and ask yourself if it is really neccessary."
 msgstr ""
+"多对多连接用得好的例子实际上相当少见。大多数时候你在“连接表”中需要保存额外的"
+"信息。这种情况下,用两个指向中介类的一对多的连接比较好。实际上,我们认为绝大"
+"多数的连接是一对多和多对一的,你应该谨慎使用其它连接风格,用之前问自己一句,"
+"是否真的必须这么做。"
 
-#: index.docbook:215
+#. Tag: term
+#: best_practices.xml:215
+#, no-c-format
 msgid "Prefer bidirectional associations."
-msgstr ""
+msgstr "偏爱双向关联"
 
-#: index.docbook:217
-msgid "Unidirectional associations are more difficult to query. In a large application, almost all associations must be navigable in both directions in queries."
+#. Tag: para
+#: best_practices.xml:217
+#, no-c-format
+msgid ""
+"Unidirectional associations are more difficult to query. In a large "
+"application, almost all associations must be navigable in both directions in "
+"queries."
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+"单向关联更加难于查询。在大型应用中,几乎所有的关联必须在查询中可以双向导航。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/collection_mapping.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/collection_mapping.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/collection_mapping.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,919 +1,1832 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: collection_mapping.xml:5
+#, no-c-format
 msgid "Collection Mapping"
-msgstr ""
+msgstr "集合类(Collections)映射"
 
-#: index.docbook:8
+#. Tag: title
+#: collection_mapping.xml:8
+#, no-c-format
 msgid "Persistent collections"
-msgstr ""
+msgstr "持久化集合类(Persistent collections)"
 
-#: index.docbook:10
-msgid "Hibernate requires that persistent collection-valued fields be declared as an interface type, for example:"
+#. Tag: para
+#: collection_mapping.xml:10
+#, no-c-format
+msgid ""
+"Hibernate requires that persistent collection-valued fields be declared as "
+"an interface type, for example:"
 msgstr ""
+"Hibernate要求持久化集合值字段必须声明为接口,比如:(译者注:在阅读本章的时"
+"候,以后整个手册的阅读过程中,我们都会面临一个名词方面的问题,那就是“集合”。"
+"\"Collections\"和\"Set\"在中文里对应都被翻译为“集合”,但是他们的含义很不一"
+"样。Collections是一个超集,Set是其中的一种。大部分情况下,本译稿中泛指的未加"
+"英文注明的“集合”,都应当理解为“Collections”。在有些二者同时出现,可能造成混淆"
+"的地方,我们用“集合类”来特指“Collecions”,“集合(Set)”来指\"Set\",一般都会在后"
+"面的括号中给出英文。希望大家在阅读时联系上下文理解,不要造成误解。 与此同"
+"时,“元素”一词对应的英文“element”,也有两个不同的含义。其一为集合的元素,是内"
+"存中的一个变量;另一含义则是XML文档中的一个标签所代表的元素。也请注意区别。 "
+"本章中,特别是后半部分是需要反复阅读才能理解清楚的。如果遇到任何疑问,请记住,英"
+"文版本的reference是惟一标准的参考资料。)"
 
-#: index.docbook:15
+#. Tag: programlisting
+#: collection_mapping.xml:15
+#, no-c-format
 msgid ""
-      "<![CDATA[public class Product {\n"
-      "    private String serialNumber;\n"
-      "    private Set parts = new HashSet();\n"
-      "    \n"
-      "    public Set getParts() { return parts; }\n"
-      "    void setParts(Set parts) { this.parts = parts; }\n"
-      "    public String getSerialNumber() { return serialNumber; }\n"
-      "    void setSerialNumber(String sn) { serialNumber = sn; }\n"
-      "}]]>"
+"<![CDATA[public class Product {\n"
+"    private String serialNumber;\n"
+"    private Set parts = new HashSet();\n"
+"    \n"
+"    public Set getParts() { return parts; }\n"
+"    void setParts(Set parts) { this.parts = parts; }\n"
+"    public String getSerialNumber() { return serialNumber; }\n"
+"    void setSerialNumber(String sn) { serialNumber = sn; }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:17
-msgid "The actual interface might be <literal>java.util.Set</literal>, <literal>java.util.Collection</literal>, <literal>java.util.List</literal>, <literal>java.util.Map</literal>, <literal>java.util.SortedSet</literal>, <literal>java.util.SortedMap</literal> or ... anything you like! (Where \"anything you like\" means you will have to write an implementation of <literal>org.hibernate.usertype.UserCollectionType</literal>.)"
+#. Tag: para
+#: collection_mapping.xml:17
+#, no-c-format
+msgid ""
+"The actual interface might be <literal>java.util.Set</literal>, "
+"<literal>java.util.Collection</literal>, <literal>java.util.List</literal>, "
+"<literal>java.util.Map</literal>, <literal>java.util.SortedSet</literal>, "
+"<literal>java.util.SortedMap</literal> or ... anything you like! (Where "
+"\"anything you like\" means you will have to write an implementation of "
+"<literal>org.hibernate.usertype.UserCollectionType</literal>.)"
 msgstr ""
+"实际的接口可能是<literal>java.util.Set</literal>, <literal>java.util."
+"Collection</literal>, <literal>java.util.List</literal>, <literal>java.util."
+"Map</literal>, <literal>java.util.SortedSet</literal>, <literal>java.util."
+"SortedMap</literal> 或者...任何你喜欢的类型!(\"任何你喜欢的类型\" 代表你需要"
+"编写 <literal>org.hibernate.usertype.UserCollectionType</literal>的实现.)"
 
-#: index.docbook:26
-msgid "Notice how we initialized the instance variable with an instance of <literal>HashSet</literal>. This is the best way to initialize collection valued properties of newly instantiated (non-persistent) instances. When you make the instance persistent - by calling <literal>persist()</literal>, for example - Hibernate will actually replace the <literal>HashSet</literal> with an instance of Hibernate's own implementation of <literal>Set</literal>. Watch out for errors like this:"
+#. Tag: para
+#: collection_mapping.xml:26
+#, no-c-format
+msgid ""
+"Notice how we initialized the instance variable with an instance of "
+"<literal>HashSet</literal>. This is the best way to initialize collection "
+"valued properties of newly instantiated (non-persistent) instances. When you "
+"make the instance persistent - by calling <literal>persist()</literal>, for "
+"example - Hibernate will actually replace the <literal>HashSet</literal> "
+"with an instance of Hibernate's own implementation of <literal>Set</"
+"literal>. Watch out for errors like this:"
 msgstr ""
+"注意我们是如何用一个<literal>HashSet</literal>实例来初始化实例变量的.这是用于"
+"初始化新创建(尚未持久化)的类实例中集合值属性的最佳方法。当你持久化这个实例时"
+"——比如通过调用<literal>persist()</literal>——Hibernate 会自动把"
+"<literal>HashSet</literal>替换为Hibernate自己的<literal>Set</literal>实现。观"
+"察下面的错误:"
 
-#: index.docbook:36
+#. Tag: programlisting
+#: collection_mapping.xml:36
+#, no-c-format
 msgid ""
-      "<![CDATA[Cat cat = new DomesticCat();\n"
-      "Cat kitten = new DomesticCat();\n"
-      "....\n"
-      "Set kittens = new HashSet();\n"
-      "kittens.add(kitten);\n"
-      "cat.setKittens(kittens);\n"
-      "session.persist(cat);\n"
-      "kittens = cat.getKittens(); // Okay, kittens collection is a Set\n"
-      "(HashSet) cat.getKittens(); // Error!]]>"
+"<![CDATA[Cat cat = new DomesticCat();\n"
+"Cat kitten = new DomesticCat();\n"
+"....\n"
+"Set kittens = new HashSet();\n"
+"kittens.add(kitten);\n"
+"cat.setKittens(kittens);\n"
+"session.persist(cat);\n"
+"kittens = cat.getKittens(); // Okay, kittens collection is a Set\n"
+"(HashSet) cat.getKittens(); // Error!]]>"
 msgstr ""
 
-#: index.docbook:38
-msgid "The persistent collections injected by Hibernate behave like <literal>HashMap</literal>, <literal>HashSet</literal>, <literal>TreeMap</literal>, <literal>TreeSet</literal> or <literal>ArrayList</literal>, depending upon the interface type."
+#. Tag: para
+#: collection_mapping.xml:38
+#, no-c-format
+msgid ""
+"The persistent collections injected by Hibernate behave like "
+"<literal>HashMap</literal>, <literal>HashSet</literal>, <literal>TreeMap</"
+"literal>, <literal>TreeSet</literal> or <literal>ArrayList</literal>, "
+"depending upon the interface type."
 msgstr ""
+"根据不同的接口类型,被Hibernate注射的持久化集合类的表现类似<literal>HashMap</"
+"literal>, <literal>HashSet</literal>, <literal>TreeMap</literal>, "
+"<literal>TreeSet</literal> or <literal>ArrayList</literal>。"
 
-#: index.docbook:45
-msgid "Collections instances have the usual behavior of value types. They are automatically persisted when referenced by a persistent object and automatically deleted when unreferenced. If a collection is passed from one persistent object to another, its elements might be moved from one table to another. Two entities may not share a reference to the same collection instance. Due to the underlying relational model, collection-valued properties do not support null value semantics; Hibernate does not distinguish between a null collection reference and an empty collection."
+#. Tag: para
+#: collection_mapping.xml:45
+#, no-c-format
+msgid ""
+"Collections instances have the usual behavior of value types. They are "
+"automatically persisted when referenced by a persistent object and "
+"automatically deleted when unreferenced. If a collection is passed from one "
+"persistent object to another, its elements might be moved from one table to "
+"another. Two entities may not share a reference to the same collection "
+"instance. Due to the underlying relational model, collection-valued "
+"properties do not support null value semantics; Hibernate does not "
+"distinguish between a null collection reference and an empty collection."
 msgstr ""
+"集合类实例具有值类型的通常行为。当被持久化对象引用后,他们会自动被持久化,当"
+"不再被引用后,自动被删除。假若实例被从一个持久化对象传递到另一个,它的元素可"
+"能从一个表转移到另一个表。两个实体不能共享同一个集合类实例的引用。因为底层关"
+"系数据库模型的原因,集合值属性无法支持空值语义;Hibernate对空的集合引用和空集"
+"合不加区别。"
 
-#: index.docbook:56
-msgid "You shouldn't have to worry much about any of this. Use persistent collections the same way you use ordinary Java collections. Just make sure you understand the semantics of bidirectional associations (discussed later)."
+#. Tag: para
+#: collection_mapping.xml:56
+#, no-c-format
+msgid ""
+"You shouldn't have to worry much about any of this. Use persistent "
+"collections the same way you use ordinary Java collections. Just make sure "
+"you understand the semantics of bidirectional associations (discussed later)."
 msgstr ""
+"你不需要过多的为此担心。就如同你平时使用普通的Java集合类一样来使用持久化集合"
+"类。只是要确认你理解了双向关联的语义(后文讨论)。"
 
-#: index.docbook:65
+#. Tag: title
+#: collection_mapping.xml:65
+#, no-c-format
 msgid "Collection mappings"
-msgstr ""
+msgstr "集合映射( Collection mappings )"
 
-#: index.docbook:67
-msgid "The Hibernate mapping element used for mapping a collection depends upon the type of the interface. For example, a <literal>&lt;set&gt;</literal> element is used for mapping properties of type <literal>Set</literal>."
+#. Tag: para
+#: collection_mapping.xml:67
+#, no-c-format
+msgid ""
+"The Hibernate mapping element used for mapping a collection depends upon the "
+"type of the interface. For example, a <literal>&lt;set&gt;</literal> element "
+"is used for mapping properties of type <literal>Set</literal>."
 msgstr ""
+"用于映射集合类的Hibernate映射元素取决于接口的类型。比如, <literal>&lt;"
+"set&gt;</literal> 元素用来映射<literal>Set</literal>类型的属性。"
 
-#: index.docbook:73
+#. Tag: programlisting
+#: collection_mapping.xml:73
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Product\">\n"
-      "    <id name=\"serialNumber\" column=\"productSerialNumber\"/>\n"
-      "    <set name=\"parts\">\n"
-      "        <key column=\"productSerialNumber\" not-null=\"true\"/>\n"
-      "        <one-to-many class=\"Part\"/>\n"
-      "    </set>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Product\">\n"
+"    <id name=\"serialNumber\" column=\"productSerialNumber\"/>\n"
+"    <set name=\"parts\">\n"
+"        <key column=\"productSerialNumber\" not-null=\"true\"/>\n"
+"        <one-to-many class=\"Part\"/>\n"
+"    </set>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:75
-msgid "Apart from <literal>&lt;set&gt;</literal>, there is also <literal>&lt;list&gt;</literal>, <literal>&lt;map&gt;</literal>, <literal>&lt;bag&gt;</literal>, <literal>&lt;array&gt;</literal> and <literal>&lt;primitive-array&gt;</literal> mapping elements. The <literal>&lt;map&gt;</literal> element is representative:"
+#. Tag: para
+#: collection_mapping.xml:75
+#, no-c-format
+msgid ""
+"Apart from <literal>&lt;set&gt;</literal>, there is also <literal>&lt;"
+"list&gt;</literal>, <literal>&lt;map&gt;</literal>, <literal>&lt;bag&gt;</"
+"literal>, <literal>&lt;array&gt;</literal> and <literal>&lt;primitive-"
+"array&gt;</literal> mapping elements. The <literal>&lt;map&gt;</literal> "
+"element is representative:"
 msgstr ""
+"除了<literal>&lt;set&gt;</literal>,还有<literal>&lt;list&gt;</literal>, "
+"<literal>&lt;map&gt;</literal>, <literal>&lt;bag&gt;</literal>, <literal>&lt;"
+"array&gt;</literal> 和 <literal>&lt;primitive-array&gt;</literal> 映射元素。"
+"<literal>&lt;map&gt;</literal>具有代表性:"
 
-#: index.docbook:100
+#. Tag: programlisting
+#: collection_mapping.xml:100
+#, no-c-format
 msgid ""
-      "<![CDATA[<map\n"
-      "    name=\"propertyName\"\n"
-      "    table=\"table_name\"\n"
-      "    schema=\"schema_name\"\n"
-      "    lazy=\"true|extra|false\"\n"
-      "    inverse=\"true|false\"\n"
-      "    cascade=\"all|none|save-update|delete|all-delete-orphan|delete-orphan\"\n"
-      "    sort=\"unsorted|natural|comparatorClass\"\n"
-      "    order-by=\"column_name asc|desc\"\n"
-      "    where=\"arbitrary sql where condition\"\n"
-      "    fetch=\"join|select|subselect\"\n"
-      "    batch-size=\"N\"\n"
-      "    access=\"field|property|ClassName\"\n"
-      "    optimistic-lock=\"true|false\"\n"
-      "    mutable=\"true|false\"\n"
-      "    node=\"element-name|.\"\n"
-      "    embed-xml=\"true|false\"\n"
-      ">\n"
-      "\n"
-      "    <key .... />\n"
-      "    <map-key .... />\n"
-      "    <element .... />\n"
-      "</map>]]>"
+"<![CDATA[<map\n"
+"    name=\"propertyName\"\n"
+"    table=\"table_name\"\n"
+"    schema=\"schema_name\"\n"
+"    lazy=\"true|extra|false\"\n"
+"    inverse=\"true|false\"\n"
+"    cascade=\"all|none|save-update|delete|all-delete-orphan|delete-orphan\"\n"
+"    sort=\"unsorted|natural|comparatorClass\"\n"
+"    order-by=\"column_name asc|desc\"\n"
+"    where=\"arbitrary sql where condition\"\n"
+"    fetch=\"join|select|subselect\"\n"
+"    batch-size=\"N\"\n"
+"    access=\"field|property|ClassName\"\n"
+"    optimistic-lock=\"true|false\"\n"
+"    mutable=\"true|false\"\n"
+"    node=\"element-name|.\"\n"
+"    embed-xml=\"true|false\"\n"
+">\n"
+"\n"
+"    <key .... />\n"
+"    <map-key .... />\n"
+"    <element .... />\n"
+"</map>]]>"
 msgstr ""
 
-#: index.docbook:103
+#. Tag: para
+#: collection_mapping.xml:103
+#, no-c-format
 msgid "<literal>name</literal> the collection property name"
-msgstr ""
+msgstr "<literal>name</literal> 集合属性的名称"
 
-#: index.docbook:108
-msgid "<literal>table</literal> (optional - defaults to property name) the name of the collection table (not used for one-to-many associations)"
+#. Tag: para
+#: collection_mapping.xml:108
+#, no-c-format
+msgid ""
+"<literal>table</literal> (optional - defaults to property name) the name of "
+"the collection table (not used for one-to-many associations)"
 msgstr ""
+"<literal>table</literal> (可选——默认为属性的名称)这个集合表的名称(不能在一"
+"对多的关联关系中使用)"
 
-#: index.docbook:114
-msgid "<literal>schema</literal> (optional) the name of a table schema to override the schema declared on the root element"
+#. Tag: para
+#: collection_mapping.xml:114
+#, no-c-format
+msgid ""
+"<literal>schema</literal> (optional) the name of a table schema to override "
+"the schema declared on the root element"
 msgstr ""
+"<literal>schema</literal> (可选) 表的schema的名称, 他将覆盖在根元素中定义的"
+"schema"
 
-#: index.docbook:120
-msgid "<literal>lazy</literal> (optional - defaults to <literal>true</literal>) may be used to disable lazy fetching and specify that the association is always eagerly fetched, or to enable \"extra-lazy\" fetching where most operations do not initialize the collection (suitable for very large collections)"
+#. Tag: para
+#: collection_mapping.xml:120
+#, no-c-format
+msgid ""
+"<literal>lazy</literal> (optional - defaults to <literal>true</literal>) may "
+"be used to disable lazy fetching and specify that the association is always "
+"eagerly fetched, or to enable \"extra-lazy\" fetching where most operations "
+"do not initialize the collection (suitable for very large collections)"
 msgstr ""
+"<literal>lazy</literal> (可选--默认为true) 可以用来关闭延迟加载(false),指定"
+"一直使用预先抓取,或者打开\"extra-lazy\" 抓取,此时大多数操作不会初始化集合类"
+"(适用于非常大的集合)"
 
-#: index.docbook:129
-msgid "<literal>inverse</literal> (optional - defaults to <literal>false</literal>) mark this collection as the \"inverse\" end of a bidirectional association"
+#. Tag: para
+#: collection_mapping.xml:129
+#, no-c-format
+msgid ""
+"<literal>inverse</literal> (optional - defaults to <literal>false</literal>) "
+"mark this collection as the \"inverse\" end of a bidirectional association"
 msgstr ""
+"<literal>inverse</literal> (可选——默认为<literal>false</literal>) 标记这个集"
+"合作为双向关联关系中的方向一端。"
 
-#: index.docbook:135
-msgid "<literal>cascade</literal> (optional - defaults to <literal>none</literal>) enable operations to cascade to child entities"
+#. Tag: para
+#: collection_mapping.xml:135
+#, no-c-format
+msgid ""
+"<literal>cascade</literal> (optional - defaults to <literal>none</literal>) "
+"enable operations to cascade to child entities"
 msgstr ""
+"<literal>cascade</literal> (可选——默认为<literal>none</literal>) 让操作级联到"
+"子实体"
 
-#: index.docbook:141
-msgid "<literal>sort</literal> (optional) specify a sorted collection with <literal>natural</literal> sort order, or a given comparator class"
+#. Tag: para
+#: collection_mapping.xml:141
+#, no-c-format
+msgid ""
+"<literal>sort</literal> (optional) specify a sorted collection with "
+"<literal>natural</literal> sort order, or a given comparator class"
 msgstr ""
+"<literal>sort</literal>(可选)指定集合的排序顺序, 其可以为自然的"
+"(<literal>natural</literal>)或者给定一个用来比较的类。"
 
-#: index.docbook:147
-msgid "<literal>order-by</literal> (optional, JDK1.4 only) specify a table column (or columns) that define the iteration order of the <literal>Map</literal>, <literal>Set</literal> or bag, together with an optional <literal>asc</literal> or <literal>desc</literal>"
+#. Tag: para
+#: collection_mapping.xml:147
+#, no-c-format
+msgid ""
+"<literal>order-by</literal> (optional, JDK1.4 only) specify a table column "
+"(or columns) that define the iteration order of the <literal>Map</literal>, "
+"<literal>Set</literal> or bag, together with an optional <literal>asc</"
+"literal> or <literal>desc</literal>"
 msgstr ""
+"<literal>order-by</literal> (可选, 仅用于jdk1.4) 指定表的字段(一个或几个)再加"
+"上asc或者desc(可选), 定义Map,Set和Bag的迭代顺序"
 
-#: index.docbook:154
-msgid "<literal>where</literal> (optional) specify an arbitrary SQL <literal>WHERE</literal> condition to be used when retrieving or removing the collection (useful if the collection should contain only a subset of the available data)"
+#. Tag: para
+#: collection_mapping.xml:154
+#, no-c-format
+msgid ""
+"<literal>where</literal> (optional) specify an arbitrary SQL <literal>WHERE</"
+"literal> condition to be used when retrieving or removing the collection "
+"(useful if the collection should contain only a subset of the available data)"
 msgstr ""
+"<literal>where</literal> (可选) 指定任意的SQL where条件, 该条件将在重新载入或"
+"者删除这个集合时使用(当集合中的数据仅仅是所有可用数据的一个子集时这个条件非常"
+"有用)"
 
-#: index.docbook:161
-msgid "<literal>fetch</literal> (optional, defaults to <literal>select</literal>) Choose between outer-join fetching, fetching by sequential select, and fetching by sequential subselect."
+#. Tag: para
+#: collection_mapping.xml:161
+#, no-c-format
+msgid ""
+"<literal>fetch</literal> (optional, defaults to <literal>select</literal>) "
+"Choose between outer-join fetching, fetching by sequential select, and "
+"fetching by sequential subselect."
 msgstr ""
+"<literal>fetch</literal> (可选, 默认为<literal>select</literal>) 用于在外连接"
+"抓取、通过后续select抓取和通过后续subselect抓取之间选择。"
 
-#: index.docbook:168
-msgid "<literal>batch-size</literal> (optional, defaults to <literal>1</literal>) specify a \"batch size\" for lazily fetching instances of this collection."
+#. Tag: para
+#: collection_mapping.xml:168
+#, no-c-format
+msgid ""
+"<literal>batch-size</literal> (optional, defaults to <literal>1</literal>) "
+"specify a \"batch size\" for lazily fetching instances of this collection."
 msgstr ""
+"<literal>batch-size</literal> (可选, 默认为<literal>1</literal>) 指定通过延迟"
+"加载取得集合实例的批处理块大小(\"batch size\")。"
 
-#: index.docbook:174
-msgid "<literal>access</literal> (optional - defaults to <literal>property</literal>): The strategy Hibernate should use for accessing the collection property value."
+#. Tag: para
+#: collection_mapping.xml:174
+#, no-c-format
+msgid ""
+"<literal>access</literal> (optional - defaults to <literal>property</"
+"literal>): The strategy Hibernate should use for accessing the collection "
+"property value."
 msgstr ""
+"<literal>access</literal>(可选-默认为属性property):Hibernate取得集合属性值时"
+"使用的策略"
 
-#: index.docbook:180
-msgid "<literal>optimistic-lock</literal> (optional - defaults to <literal>true</literal>): Species that changes to the state of the collection results in increment of the owning entity's version. (For one to many associations, it is often reasonable to disable this setting.)"
+#. Tag: para
+#: collection_mapping.xml:180
+#, no-c-format
+msgid ""
+"<literal>optimistic-lock</literal> (optional - defaults to <literal>true</"
+"literal>): Species that changes to the state of the collection results in "
+"increment of the owning entity's version. (For one to many associations, it "
+"is often reasonable to disable this setting.)"
 msgstr ""
+"<literal>乐观锁</literal> (可选 - 默认为 <literal>true</literal>): 对集合的状"
+"态的改变会是否导致其所属的实体的版本增长。 (对一对多关联来说,关闭这个属性常"
+"常是有理的)"
 
-#: index.docbook:188
-msgid "<literal>mutable</literal> (optional - defaults to <literal>true</literal>): A value of <literal>false</literal> specifies that the elements of the collection never change (a minor performance optimization in some cases)."
+#. Tag: para
+#: collection_mapping.xml:188
+#, no-c-format
+msgid ""
+"<literal>mutable</literal> (optional - defaults to <literal>true</literal>): "
+"A value of <literal>false</literal> specifies that the elements of the "
+"collection never change (a minor performance optimization in some cases)."
 msgstr ""
+"<literal>mutable(可变)</literal> (可选 - 默认为<literal>true</literal>): 若"
+"值为<literal>false</literal>,表明集合中的元素不会改变(在某些情况下可以进行一"
+"些小的性能优化)。"
 
-#: index.docbook:198
+#. Tag: title
+#: collection_mapping.xml:198
+#, no-c-format
 msgid "Collection foreign keys"
-msgstr ""
+msgstr "集合外键(Collection foreign keys)"
 
-#: index.docbook:200
-msgid "Collection instances are distinguished in the database by the foreign key of the entity that owns the collection. This foreign key is referred to as the <emphasis>collection key column</emphasis> (or columns) of the collection table. The collection key column is mapped by the <literal>&lt;key&gt;</literal> element."
+#. Tag: para
+#: collection_mapping.xml:200
+#, no-c-format
+msgid ""
+"Collection instances are distinguished in the database by the foreign key of "
+"the entity that owns the collection. This foreign key is referred to as the "
+"<emphasis>collection key column</emphasis> (or columns) of the collection "
+"table. The collection key column is mapped by the <literal>&lt;key&gt;</"
+"literal> element."
 msgstr ""
+"集合实例在数据库中依靠持有集合的实体的外键加以辨别。此外键作为<emphasis>集合"
+"关键字段(collection key column)</emphasis>(或多个字段)加以引用。集合关键"
+"字段通过<literal>&lt;key&gt;</literal> 元素映射。"
 
-#: index.docbook:208
-msgid "There may be a nullability constraint on the foreign key column. For most collections, this is implied. For unidirectional one to many associations, the foreign key column is nullable by default, so you might need to specify <literal>not-null=\"true\"</literal>."
+#. Tag: para
+#: collection_mapping.xml:208
+#, no-c-format
+msgid ""
+"There may be a nullability constraint on the foreign key column. For most "
+"collections, this is implied. For unidirectional one to many associations, "
+"the foreign key column is nullable by default, so you might need to specify "
+"<literal>not-null=\"true\"</literal>."
 msgstr ""
+"在外键字段上可能具有非空约束。对于大多数集合来说,这是隐含的。对单向一对多关"
+"联来说,外键字段默认是可以为空的,因此你可能需要指明 <literal>not-null=\"true"
+"\"</literal>。"
 
-#: index.docbook:215
+#. Tag: programlisting
+#: collection_mapping.xml:215
+#, no-c-format
 msgid "<![CDATA[<key column=\"productSerialNumber\" not-null=\"true\"/>]]>"
 msgstr ""
 
-#: index.docbook:217
-msgid "The foreign key constraint may use <literal>ON DELETE CASCADE</literal>."
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:217
+#, no-c-format
+msgid ""
+"The foreign key constraint may use <literal>ON DELETE CASCADE</literal>."
+msgstr "外键约束可以使用<literal>ON DELETE CASCADE</literal>。"
 
-#: index.docbook:221
+#. Tag: programlisting
+#: collection_mapping.xml:221
+#, no-c-format
 msgid "<![CDATA[<key column=\"productSerialNumber\" on-delete=\"cascade\"/>]]>"
 msgstr ""
 
-#: index.docbook:223
-msgid "See the previous chapter for a full definition of the <literal>&lt;key&gt;</literal> element."
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:223
+#, no-c-format
+msgid ""
+"See the previous chapter for a full definition of the <literal>&lt;key&gt;</"
+"literal> element."
+msgstr "对<literal>&lt;key&gt;</literal> 元素的完整定义,请参阅前面的章节。"
 
-#: index.docbook:231
+#. Tag: title
+#: collection_mapping.xml:231
+#, no-c-format
 msgid "Collection elements"
-msgstr ""
+msgstr "集合元素(Collection elements)"
 
-#: index.docbook:233
-msgid "Collections may contain almost any other Hibernate type, including all basic types, custom types, components, and of course, references to other entities. This is an important distinction: an object in a collection might be handled with \"value\" semantics (its life cycle fully depends on the collection owner) or it might be a reference to another entity, with its own life cycle. In the latter case, only the \"link\" between the two objects is considered to be state held by the collection."
+#. Tag: para
+#: collection_mapping.xml:233
+#, no-c-format
+msgid ""
+"Collections may contain almost any other Hibernate type, including all basic "
+"types, custom types, components, and of course, references to other "
+"entities. This is an important distinction: an object in a collection might "
+"be handled with \"value\" semantics (its life cycle fully depends on the "
+"collection owner) or it might be a reference to another entity, with its own "
+"life cycle. In the latter case, only the \"link\" between the two objects is "
+"considered to be state held by the collection."
 msgstr ""
+"集合几乎可以包含任何其他的Hibernate类型,包括所有的基本类型、自定义类型、组"
+"件,当然还有对其他实体的引用。存在一个重要的区别:位于集合中的对象可能是根"
+"据“值”语义来操作(其声明周期完全依赖于集合持有者),或者它可能是指向另一个实"
+"体的引用,具有其自己的生命周期。在后者的情况下,被作为集合持有的状态考虑的,"
+"只有两个对象之间的“连接”。"
 
-#: index.docbook:242
-msgid "The contained type is referred to as the <emphasis>collection element type</emphasis>. Collection elements are mapped by <literal>&lt;element&gt;</literal> or <literal>&lt;composite-element&gt;</literal>, or in the case of entity references, with <literal>&lt;one-to-many&gt;</literal> or <literal>&lt;many-to-many&gt;</literal>. The first two map elements with value semantics, the next two are used to map entity associations."
+#. Tag: para
+#: collection_mapping.xml:242
+#, no-c-format
+msgid ""
+"The contained type is referred to as the <emphasis>collection element type</"
+"emphasis>. Collection elements are mapped by <literal>&lt;element&gt;</"
+"literal> or <literal>&lt;composite-element&gt;</literal>, or in the case of "
+"entity references, with <literal>&lt;one-to-many&gt;</literal> or "
+"<literal>&lt;many-to-many&gt;</literal>. The first two map elements with "
+"value semantics, the next two are used to map entity associations."
 msgstr ""
+"被包容的类型被称为<emphasis>集合元素类型(collection element type)</"
+"emphasis>。集合元素通过<literal>&lt;element&gt;</literal>或<literal>&lt;"
+"composite-element&gt;</literal>映射,或在其是实体引用的时候,通过"
+"<literal>&lt;one-to-many&gt;</literal> 或<literal>&lt;many-to-many&gt;</"
+"literal>映射。前两种用于使用值语义映射元素,后两种用于映射实体关联。"
 
-#: index.docbook:254
+#. Tag: title
+#: collection_mapping.xml:254
+#, no-c-format
 msgid "Indexed collections"
-msgstr ""
+msgstr "索引集合类(Indexed collections)"
 
-#: index.docbook:256
-msgid "All collection mappings, except those with set and bag semantics, need an <emphasis>index column</emphasis> in the collection table - a column that maps to an array index, or <literal>List</literal> index, or <literal>Map</literal> key. The index of a <literal>Map</literal> may be of any basic type, mapped with <literal>&lt;map-key&gt;</literal>, it may be an entity reference mapped with <literal>&lt;map-key-many-to-many&gt;</literal>, or it may be a composite type, mapped with <literal>&lt;composite-map-key&gt;</literal>. The index of an array or list is always of type <literal>integer</literal> and is mapped using the <literal>&lt;list-index&gt;</literal> element. The mapped column contains sequential integers (numbered from zero, by default)."
+#. Tag: para
+#: collection_mapping.xml:256
+#, no-c-format
+msgid ""
+"All collection mappings, except those with set and bag semantics, need an "
+"<emphasis>index column</emphasis> in the collection table - a column that "
+"maps to an array index, or <literal>List</literal> index, or <literal>Map</"
+"literal> key. The index of a <literal>Map</literal> may be of any basic "
+"type, mapped with <literal>&lt;map-key&gt;</literal>, it may be an entity "
+"reference mapped with <literal>&lt;map-key-many-to-many&gt;</literal>, or it "
+"may be a composite type, mapped with <literal>&lt;composite-map-key&gt;</"
+"literal>. The index of an array or list is always of type <literal>integer</"
+"literal> and is mapped using the <literal>&lt;list-index&gt;</literal> "
+"element. The mapped column contains sequential integers (numbered from zero, "
+"by default)."
 msgstr ""
+"所有的集合映射,除了set和bag语义的以外,都需要指定一个集合表的<emphasis>索引"
+"字段(index column)</emphasis>——用于对应到数组索引,或者<literal>List</"
+"literal>的索引,或者<literal>Map</literal>的关键字。通过<literal>&lt;map-"
+"key&gt;</literal>,<literal>Map</literal> 的索引可以是任何基础类型;若通过"
+"<literal>&lt;map-key-many-to-many&gt;</literal>,它也可以是一个实体引用;若通"
+"过<literal>&lt;composite-map-key&gt;</literal>,它还可以是一个组合类型。数组"
+"或列表的索引必须是<literal>integer</literal>类型,并且使用 <literal>&lt;list-"
+"index&gt;</literal>元素定义映射。被映射的字段包含有顺序排列的整数(默认从0开"
+"始)。"
 
-#: index.docbook:267
+#. Tag: sect2
+#: collection_mapping.xml:267
+#, no-c-format
 msgid ""
-      "<programlistingco> <areaspec> <area id=\"index1\" coords=\"2 45\"/> <area id=\"index2\" coords=\"3 45\"/> </areaspec> <programlisting><![CDATA[<list-index \n"
-      "        column=\"column_name\"\n"
-      "        base=\"0|1|...\"/>]]></programlisting> <calloutlist> <callout arearefs=\"index1\"> <para> <literal>column_name</literal> (required): The name of the column holding the collection index values. </para> </callout> <callout arearefs=\"index1\"> <para> <literal>base</literal> (optional, defaults to <literal>0</literal>): The value of the index column that corresponds to the first element of the list or array. </para> </callout> </calloutlist> </programlistingco> <programlistingco> <areaspec> <area id=\"mapkey1\" coords=\"2 45\"/> <area id=\"mapkey2\" coords=\"3 45\"/> <area id=\"mapkey3\" coords=\"4 45\"/> </areaspec> <programlisting><![CDATA[<map-key \n"
-      "        column=\"column_name\"\n"
-      "        formula=\"any SQL expression\"\n"
-      "        type=\"type_name\"\n"
-      "        node=\"@attribute-name\"\n"
-      "        length=\"N\"/>]]></programlisting> <calloutlist> <callout arearefs=\"mapkey1\"> <para> <literal>column</literal> (optional): The name of the column holding the collection index values. </para> </callout> <callout arearefs=\"mapkey2\"> <para> <literal>formula</literal> (optional): A SQL formula used to evaluate the key of the map. </para> </callout> <callout arearefs=\"mapkey3\"> <para> <literal>type</literal> (reguired): The type of the map keys. </para> </callout> </calloutlist> </programlistingco> <programlistingco> <areaspec> <area id=\"indexmanytomany1\" coords=\"2 45\"/> <area id=\"indexmanytomany2\" coords=\"3 45\"/> <area id=\"indexmanytomany3\" coords=\"3 45\"/> </areaspec> <programlisting><![CDATA[<map-key-many-to-many\n"
-      "        column=\"column_name\"\n"
-      "        formula=\"any SQL expression\"\n"
-      "        class=\"ClassName\"\n"
-      "/>]]></programlisting> <calloutlist> <callout arearefs=\"indexmanytomany1\"> <para> <literal>column</literal> (optional): The name of the foreign key column for the collection index values. </para> </callout> <callout arearefs=\"indexmanytomany2\"> <para> <literal>formula</literal> (optional): A SQL formula used to evaluate the foreign key of the map key. </para> </callout> <callout arearefs=\"indexmanytomany3\"> <para> <literal>class</literal> (required): The entity class used as the map key. </para> </callout> </calloutlist> </programlistingco>"
+"<programlistingco> <areaspec> <area id=\"index1\" coords=\"2 45\"/> <area id="
+"\"index2\" coords=\"3 45\"/> </areaspec> <programlisting><![CDATA[<list-"
+"index \n"
+"        column=\"column_name\"\n"
+"        base=\"0|1|...\"/>]]></programlisting> <calloutlist> <callout "
+"arearefs=\"index1\"> <para> <literal>column_name</literal> (required): The "
+"name of the column holding the collection index values. </para> </callout> "
+"<callout arearefs=\"index1\"> <para> <literal>base</literal> (optional, "
+"defaults to <literal>0</literal>): The value of the index column that "
+"corresponds to the first element of the list or array. </para> </callout> </"
+"calloutlist> </programlistingco> <programlistingco> <areaspec> <area id="
+"\"mapkey1\" coords=\"2 45\"/> <area id=\"mapkey2\" coords=\"3 45\"/> <area "
+"id=\"mapkey3\" coords=\"4 45\"/> </areaspec> <programlisting><![CDATA[<map-"
+"key \n"
+"        column=\"column_name\"\n"
+"        formula=\"any SQL expression\"\n"
+"        type=\"type_name\"\n"
+"        node=\"@attribute-name\"\n"
+"        length=\"N\"/>]]></programlisting> <calloutlist> <callout arearefs="
+"\"mapkey1\"> <para> <literal>column</literal> (optional): The name of the "
+"column holding the collection index values. </para> </callout> <callout "
+"arearefs=\"mapkey2\"> <para> <literal>formula</literal> (optional): A SQL "
+"formula used to evaluate the key of the map. </para> </callout> <callout "
+"arearefs=\"mapkey3\"> <para> <literal>type</literal> (reguired): The type of "
+"the map keys. </para> </callout> </calloutlist> </programlistingco> "
+"<programlistingco> <areaspec> <area id=\"indexmanytomany1\" coords=\"2 45\"/"
+"> <area id=\"indexmanytomany2\" coords=\"3 45\"/> <area id=\"indexmanytomany3"
+"\" coords=\"3 45\"/> </areaspec> <programlisting><![CDATA[<map-key-many-to-"
+"many\n"
+"        column=\"column_name\"\n"
+"        formula=\"any SQL expression\"\n"
+"        class=\"ClassName\"\n"
+"/>]]></programlisting> <calloutlist> <callout arearefs=\"indexmanytomany1\"> "
+"<para> <literal>column</literal> (optional): The name of the foreign key "
+"column for the collection index values. </para> </callout> <callout arearefs="
+"\"indexmanytomany2\"> <para> <literal>formula</literal> (optional): A SQL "
+"formula used to evaluate the foreign key of the map key. </para> </callout> "
+"<callout arearefs=\"indexmanytomany3\"> <para> <literal>class</literal> "
+"(required): The entity class used as the map key. </para> </callout> </"
+"calloutlist> </programlistingco>"
 msgstr ""
 
-#: index.docbook:348
-msgid "If your table doesn't have an index column, and you still wish to use <literal>List</literal> as the property type, you should map the property as a Hibernate <emphasis>&lt;bag&gt;</emphasis>. A bag does not retain its order when it is retrieved from the database, but it may be optionally sorted or ordered."
+#. Tag: para
+#: collection_mapping.xml:348
+#, no-c-format
+msgid ""
+"If your table doesn't have an index column, and you still wish to use "
+"<literal>List</literal> as the property type, you should map the property as "
+"a Hibernate <emphasis>&lt;bag&gt;</emphasis>. A bag does not retain its "
+"order when it is retrieved from the database, but it may be optionally "
+"sorted or ordered."
 msgstr ""
+"值集合于多对多关联(Collections of values and many-to-many associations)"
 
-#: index.docbook:357
-msgid "There are quite a range of mappings that can be generated for collections, covering many common relational models. We suggest you experiment with the schema generation tool to get a feeling for how various mapping declarations translate to database tables."
+#. Tag: para
+#: collection_mapping.xml:357
+#, no-c-format
+msgid ""
+"There are quite a range of mappings that can be generated for collections, "
+"covering many common relational models. We suggest you experiment with the "
+"schema generation tool to get a feeling for how various mapping declarations "
+"translate to database tables."
 msgstr ""
+"任何值集合或者多对多关联需要专用的具有一个或多个外键字段的"
+"<emphasis>collection table</emphasis>、一个或多个<emphasis>collection "
+"element column</emphasis>,以及还可能有一个或多个索引字段。"
 
-#: index.docbook:364
+#. Tag: title
+#: collection_mapping.xml:364
+#, no-c-format
 msgid "Collections of values and many-to-many associations"
-msgstr ""
+msgstr "对于一个值集合, 我们使用<literal>&lt;element&gt;</literal>标签。"
 
-#: index.docbook:366
-msgid "Any collection of values or many-to-many association requires a dedicated <emphasis>collection table</emphasis> with a foreign key column or columns, <emphasis>collection element column</emphasis> or columns and possibly an index column or columns."
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:366
+#, no-c-format
+msgid ""
+"Any collection of values or many-to-many association requires a dedicated "
+"<emphasis>collection table</emphasis> with a foreign key column or columns, "
+"<emphasis>collection element column</emphasis> or columns and possibly an "
+"index column or columns."
+msgstr "<literal>column</literal>(可选):保存集合元素值的字段名。"
 
-#: index.docbook:373
-msgid "For a collection of values, we use the <literal>&lt;element&gt;</literal> tag."
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:373
+#, no-c-format
+msgid ""
+"For a collection of values, we use the <literal>&lt;element&gt;</literal> "
+"tag."
+msgstr "<literal>formula</literal> (可选): 用于计算元素的SQL公式"
 
-#: index.docbook:375
+#. Tag: sect2
+#: collection_mapping.xml:375
+#, no-c-format
 msgid ""
-      "<programlistingco> <areaspec> <area id=\"element1b\" coords=\"2 50\"/> <area id=\"element2b\" coords=\"3 50\"/> <area id=\"element3b\" coords=\"4 50\"/> </areaspec> <programlisting><![CDATA[<element\n"
-      "        column=\"column_name\"\n"
-      "        formula=\"any SQL expression\"\n"
-      "        type=\"typename\"\n"
-      "        length=\"L\"\n"
-      "        precision=\"P\"\n"
-      "        scale=\"S\"\n"
-      "        not-null=\"true|false\"\n"
-      "        unique=\"true|false\"\n"
-      "        node=\"element-name\"\n"
-      "/>]]></programlisting> <calloutlist> <callout arearefs=\"element1b\"> <para> <literal>column</literal> (optional): The name of the column holding the collection element values. </para> </callout> <callout arearefs=\"element2b\"> <para> <literal>formula</literal> (optional): An SQL formula used to evaluate the element. </para> </callout> <callout arearefs=\"element3b\"> <para> <literal>type</literal> (required): The type of the collection element. </para> </callout> </calloutlist> </programlistingco> <para> A <emphasis>many-to-many association</emphasis> is specified using the <literal>&lt;many-to-many&gt;</literal> element. </para> <programlistingco> <areaspec> <area id=\"manytomany1\" coords=\"2 60\"/> <area id=\"manytomany2\" coords=\"3 60\"/> <area id=\"manytomany3\" coords=\"4 60\"/> <area id=\"manytomany4\" coords=\"5 60\"/> <area id=\"manytomany5\" coords=\"6 60\"/> <area id=\"manytomany6\" coords=\"7 60\"/> <area id=\"manytomany7\" coords=\"8 60\"/> <area id=\!
 "manytomany8\" coords=\"9 60\"/> </areaspec> <programlisting><![CDATA[<many-to-many\n"
-      "        column=\"column_name\"\n"
-      "        formula=\"any SQL expression\"\n"
-      "        class=\"ClassName\"\n"
-      "        fetch=\"select|join\"\n"
-      "        unique=\"true|false\"\n"
-      "        not-found=\"ignore|exception\"\n"
-      "        entity-name=\"EntityName\"\n"
-      "        property-ref=\"propertyNameFromAssociatedClass\"\n"
-      "        node=\"element-name\"\n"
-      "        embed-xml=\"true|false\"\n"
-      "    />]]></programlisting> <calloutlist> <callout arearefs=\"manytomany1\"> <para> <literal>column</literal> (optional): The name of the element foreign key column. </para> </callout> <callout arearefs=\"manytomany2\"> <para> <literal>formula</literal> (optional): An SQL formula used to evaluate the element foreign key value. </para> </callout> <callout arearefs=\"manytomany3\"> <para> <literal>class</literal> (required): The name of the associated class. </para> </callout> <callout arearefs=\"manytomany4\"> <para> <literal>fetch</literal> (optional - defaults to <literal>join</literal>): enables outer-join or sequential select fetching for this association. This is a special case; for full eager fetching (in a single <literal>SELECT</literal>) of an entity and its many-to-many relationships to other entities, you would enable <literal>join</literal> fetching not only of the collection itself, but also with this attribute on the <literal>&lt;many-to-many&gt;</literal!
 > nested element. </para> </callout> <callout arearefs=\"manytomany5\"> <para> <literal>unique</literal> (optional): Enable the DDL generation of a unique constraint for the foreign-key column. This makes the association multiplicity effectively one to many. </para> </callout> <callout arearefs=\"manytomany6\"> <para> <literal>not-found</literal> (optional - defaults to <literal>exception</literal>): Specifies how foreign keys that reference missing rows will be handled: <literal>ignore</literal> will treat a missing row as a null association. </para> </callout> <callout arearefs=\"manytomany7\"> <para> <literal>entity-name</literal> (optional): The entity name of the associated class, as an alternative to <literal>class</literal>. </para> </callout> <callout arearefs=\"manytomany8\"> <para> <literal>property-ref</literal>: (optional) The name of a property of the associated class that is joined to this foreign key. If not specified, the primary key of the associated class !
 is used. </para> </callout> </calloutlist> </programlistingco>"
+"<programlistingco> <areaspec> <area id=\"element1b\" coords=\"2 50\"/> <area "
+"id=\"element2b\" coords=\"3 50\"/> <area id=\"element3b\" coords=\"4 50\"/> "
+"</areaspec> <programlisting><![CDATA[<element\n"
+"        column=\"column_name\"\n"
+"        formula=\"any SQL expression\"\n"
+"        type=\"typename\"\n"
+"        length=\"L\"\n"
+"        precision=\"P\"\n"
+"        scale=\"S\"\n"
+"        not-null=\"true|false\"\n"
+"        unique=\"true|false\"\n"
+"        node=\"element-name\"\n"
+"/>]]></programlisting> <calloutlist> <callout arearefs=\"element1b\"> <para> "
+"<literal>column</literal> (optional): The name of the column holding the "
+"collection element values. </para> </callout> <callout arearefs=\"element2b"
+"\"> <para> <literal>formula</literal> (optional): An SQL formula used to "
+"evaluate the element. </para> </callout> <callout arearefs=\"element3b\"> "
+"<para> <literal>type</literal> (required): The type of the collection "
+"element. </para> </callout> </calloutlist> </programlistingco> <para> A "
+"<emphasis>many-to-many association</emphasis> is specified using the "
+"<literal>&lt;many-to-many&gt;</literal> element. </para> <programlistingco> "
+"<areaspec> <area id=\"manytomany1\" coords=\"2 60\"/> <area id=\"manytomany2"
+"\" coords=\"3 60\"/> <area id=\"manytomany3\" coords=\"4 60\"/> <area id="
+"\"manytomany4\" coords=\"5 60\"/> <area id=\"manytomany5\" coords=\"6 60\"/> "
+"<area id=\"manytomany6\" coords=\"7 60\"/> <area id=\"manytomany7\" coords="
+"\"8 60\"/> <area id=\"manytomany8\" coords=\"9 60\"/> </areaspec> "
+"<programlisting><![CDATA[<many-to-many\n"
+"        column=\"column_name\"\n"
+"        formula=\"any SQL expression\"\n"
+"        class=\"ClassName\"\n"
+"        fetch=\"select|join\"\n"
+"        unique=\"true|false\"\n"
+"        not-found=\"ignore|exception\"\n"
+"        entity-name=\"EntityName\"\n"
+"        property-ref=\"propertyNameFromAssociatedClass\"\n"
+"        node=\"element-name\"\n"
+"        embed-xml=\"true|false\"\n"
+"    />]]></programlisting> <calloutlist> <callout arearefs=\"manytomany1\"> "
+"<para> <literal>column</literal> (optional): The name of the element foreign "
+"key column. </para> </callout> <callout arearefs=\"manytomany2\"> <para> "
+"<literal>formula</literal> (optional): An SQL formula used to evaluate the "
+"element foreign key value. </para> </callout> <callout arearefs=\"manytomany3"
+"\"> <para> <literal>class</literal> (required): The name of the associated "
+"class. </para> </callout> <callout arearefs=\"manytomany4\"> <para> "
+"<literal>fetch</literal> (optional - defaults to <literal>join</literal>): "
+"enables outer-join or sequential select fetching for this association. This "
+"is a special case; for full eager fetching (in a single <literal>SELECT</"
+"literal>) of an entity and its many-to-many relationships to other entities, "
+"you would enable <literal>join</literal> fetching not only of the collection "
+"itself, but also with this attribute on the <literal>&lt;many-to-many&gt;</"
+"literal> nested element. </para> </callout> <callout arearefs=\"manytomany5"
+"\"> <para> <literal>unique</literal> (optional): Enable the DDL generation "
+"of a unique constraint for the foreign-key column. This makes the "
+"association multiplicity effectively one to many. </para> </callout> "
+"<callout arearefs=\"manytomany6\"> <para> <literal>not-found</literal> "
+"(optional - defaults to <literal>exception</literal>): Specifies how foreign "
+"keys that reference missing rows will be handled: <literal>ignore</literal> "
+"will treat a missing row as a null association. </para> </callout> <callout "
+"arearefs=\"manytomany7\"> <para> <literal>entity-name</literal> (optional): "
+"The entity name of the associated class, as an alternative to "
+"<literal>class</literal>. </para> </callout> <callout arearefs=\"manytomany8"
+"\"> <para> <literal>property-ref</literal>: (optional) The name of a "
+"property of the associated class that is joined to this foreign key. If not "
+"specified, the primary key of the associated class is used. </para> </"
+"callout> </calloutlist> </programlistingco>"
 msgstr ""
 
-#: index.docbook:480
+#. Tag: para
+#: collection_mapping.xml:480
+#, no-c-format
 msgid "Some examples, first, a set of strings:"
 msgstr ""
+"包含一组整数的bag(还设置了<literal>order-by</literal>参数指定了迭代的顺序):"
 
-#: index.docbook:484
+#. Tag: programlisting
+#: collection_mapping.xml:484
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"names\" table=\"person_names\">\n"
-      "    <key column=\"person_id\"/>\n"
-      "    <element column=\"person_name\" type=\"string\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"names\" table=\"person_names\">\n"
+"    <key column=\"person_id\"/>\n"
+"    <element column=\"person_name\" type=\"string\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:486
-msgid "A bag containing integers (with an iteration order determined by the <literal>order-by</literal> attribute):"
+#. Tag: para
+#: collection_mapping.xml:486
+#, no-c-format
+msgid ""
+"A bag containing integers (with an iteration order determined by the "
+"<literal>order-by</literal> attribute):"
 msgstr ""
+"一个实体数组,在这个案例中是一个多对多的关联(注意这里的实体是自动管理生命周期"
+"的对象(life cycle objects),<literal>cascade=\"all\"</literal>):"
 
-#: index.docbook:491
+#. Tag: programlisting
+#: collection_mapping.xml:491
+#, no-c-format
 msgid ""
-      "<![CDATA[<bag name=\"sizes\" \n"
-      "        table=\"item_sizes\" \n"
-      "        order-by=\"size asc\">\n"
-      "    <key column=\"item_id\"/>\n"
-      "    <element column=\"size\" type=\"integer\"/>\n"
-      "</bag>]]>"
+"<![CDATA[<bag name=\"sizes\" \n"
+"        table=\"item_sizes\" \n"
+"        order-by=\"size asc\">\n"
+"    <key column=\"item_id\"/>\n"
+"    <element column=\"size\" type=\"integer\"/>\n"
+"</bag>]]>"
 msgstr ""
 
-#: index.docbook:493
+#. Tag: para
+#: collection_mapping.xml:493
+#, no-c-format
 msgid "An array of entities - in this case, a many to many association:"
-msgstr ""
+msgstr "一个map,通过字符串的索引来指明日期:"
 
-#: index.docbook:497
+#. Tag: programlisting
+#: collection_mapping.xml:497
+#, no-c-format
 msgid ""
-      "<![CDATA[<array name=\"addresses\" \n"
-      "        table=\"PersonAddress\" \n"
-      "        cascade=\"persist\">\n"
-      "    <key column=\"personId\"/>\n"
-      "    <list-index column=\"sortOrder\"/>\n"
-      "    <many-to-many column=\"addressId\" class=\"Address\"/>\n"
-      "</array>]]>"
+"<![CDATA[<array name=\"addresses\" \n"
+"        table=\"PersonAddress\" \n"
+"        cascade=\"persist\">\n"
+"    <key column=\"personId\"/>\n"
+"    <list-index column=\"sortOrder\"/>\n"
+"    <many-to-many column=\"addressId\" class=\"Address\"/>\n"
+"</array>]]>"
 msgstr ""
 
-#: index.docbook:499
+#. Tag: para
+#: collection_mapping.xml:499
+#, no-c-format
 msgid "A map from string indices to dates:"
-msgstr ""
+msgstr "一个组件的列表:(下一章讨论)"
 
-#: index.docbook:503
+#. Tag: programlisting
+#: collection_mapping.xml:503
+#, no-c-format
 msgid ""
-      "<![CDATA[<map name=\"holidays\" \n"
-      "        table=\"holidays\" \n"
-      "        schema=\"dbo\" \n"
-      "        order-by=\"hol_name asc\">\n"
-      "    <key column=\"id\"/>\n"
-      "    <map-key column=\"hol_name\" type=\"string\"/>\n"
-      "    <element column=\"hol_date\" type=\"date\"/>\n"
-      "</map>]]>"
+"<![CDATA[<map name=\"holidays\" \n"
+"        table=\"holidays\" \n"
+"        schema=\"dbo\" \n"
+"        order-by=\"hol_name asc\">\n"
+"    <key column=\"id\"/>\n"
+"    <map-key column=\"hol_name\" type=\"string\"/>\n"
+"    <element column=\"hol_date\" type=\"date\"/>\n"
+"</map>]]>"
 msgstr ""
 
-#: index.docbook:505
+#. Tag: para
+#: collection_mapping.xml:505
+#, no-c-format
 msgid "A list of components (discussed in the next chapter):"
-msgstr ""
+msgstr "一对多关联(One-to-many Associations)"
 
-#: index.docbook:509
+#. Tag: programlisting
+#: collection_mapping.xml:509
+#, no-c-format
 msgid ""
-      "<![CDATA[<list name=\"carComponents\" \n"
-      "        table=\"CarComponents\">\n"
-      "    <key column=\"carId\"/>\n"
-      "    <list-index column=\"sortOrder\"/>\n"
-      "    <composite-element class=\"CarComponent\">\n"
-      "        <property name=\"price\"/>\n"
-      "        <property name=\"type\"/>\n"
-      "        <property name=\"serialNumber\" column=\"serialNum\"/>\n"
-      "    </composite-element>\n"
-      "</list>]]>"
+"<![CDATA[<list name=\"carComponents\" \n"
+"        table=\"CarComponents\">\n"
+"    <key column=\"carId\"/>\n"
+"    <list-index column=\"sortOrder\"/>\n"
+"    <composite-element class=\"CarComponent\">\n"
+"        <property name=\"price\"/>\n"
+"        <property name=\"type\"/>\n"
+"        <property name=\"serialNumber\" column=\"serialNum\"/>\n"
+"    </composite-element>\n"
+"</list>]]>"
 msgstr ""
 
-#: index.docbook:514
+#. Tag: title
+#: collection_mapping.xml:514
+#, no-c-format
 msgid "One-to-many associations"
 msgstr ""
+"<emphasis>一对多关联</emphasis><emphasis>通过外键</emphasis>连接两个类对应的"
+"表,而没有中间集合表。 这个关系模型失去了一些Java集合的语义:"
 
-#: index.docbook:516
-msgid "A <emphasis>one to many association</emphasis> links the tables of two classes via a foreign key, with no intervening collection table. This mapping loses certain semantics of normal Java collections:"
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:516
+#, no-c-format
+msgid ""
+"A <emphasis>one to many association</emphasis> links the tables of two "
+"classes via a foreign key, with no intervening collection table. This "
+"mapping loses certain semantics of normal Java collections:"
+msgstr "一个被包含的实体的实例只能被包含在一个集合的实例中"
 
-#: index.docbook:524
-msgid "An instance of the contained entity class may not belong to more than one instance of the collection"
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:524
+#, no-c-format
+msgid ""
+"An instance of the contained entity class may not belong to more than one "
+"instance of the collection"
+msgstr "一个被包含的实体的实例只能对应于集合索引的一个值中"
 
-#: index.docbook:530
-msgid "An instance of the contained entity class may not appear at more than one value of the collection index"
+#. Tag: para
+#: collection_mapping.xml:530
+#, no-c-format
+msgid ""
+"An instance of the contained entity class may not appear at more than one "
+"value of the collection index"
 msgstr ""
+"一个从<literal>Product</literal>到<literal>Part</literal>的关联需要关键字字"
+"段,可能还有一个索引字段指向<literal>Part</literal>所对应的表。 <literal>&lt;"
+"one-to-many&gt;</literal>标记指明了一个一对多的关联。"
 
-#: index.docbook:537
-msgid "An association from <literal>Product</literal> to <literal>Part</literal> requires existence of a foreign key column and possibly an index column to the <literal>Part</literal> table. A <literal>&lt;one-to-many&gt;</literal> tag indicates that this is a one to many association."
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:537
+#, no-c-format
+msgid ""
+"An association from <literal>Product</literal> to <literal>Part</literal> "
+"requires existence of a foreign key column and possibly an index column to "
+"the <literal>Part</literal> table. A <literal>&lt;one-to-many&gt;</literal> "
+"tag indicates that this is a one to many association."
+msgstr "<literal>class</literal>(必须):被关联类的名称。"
 
-#: index.docbook:550
+#. Tag: programlisting
+#: collection_mapping.xml:550
+#, no-c-format
 msgid ""
-      "<![CDATA[<one-to-many \n"
-      "        class=\"ClassName\"\n"
-      "        not-found=\"ignore|exception\"\n"
-      "        entity-name=\"EntityName\"\n"
-      "        node=\"element-name\"\n"
-      "        embed-xml=\"true|false\"\n"
-      "    />]]>"
+"<![CDATA[<one-to-many \n"
+"        class=\"ClassName\"\n"
+"        not-found=\"ignore|exception\"\n"
+"        entity-name=\"EntityName\"\n"
+"        node=\"element-name\"\n"
+"        embed-xml=\"true|false\"\n"
+"    />]]>"
 msgstr ""
 
-#: index.docbook:553
+#. Tag: para
+#: collection_mapping.xml:553
+#, fuzzy, no-c-format
 msgid "<literal>class</literal> (required): The name of the associated class."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"为此关联打开外连接抓取或者后续select抓取。这是特殊情况;对于一个实体及其指向"
+"其他实体的多对多关联进全预先抓取(使用一条单独的<literal>SELECT</literal>),"
+"你不仅需要对集合自身打开<literal>join</literal>,也需要对<literal>&lt;many-"
+"to-many&gt;</literal>这个内嵌元素打开此属性。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>not-found</literal> (可选 - 默认为<literal>exception</literal>): 指"
+"明若缓存的标示值关联的行缺失,该如何处理: <literal>ignore</literal> 会把缺失的"
+"行作为一个空关联处理。"
 
-#: index.docbook:558
-msgid "<literal>not-found</literal> (optional - defaults to <literal>exception</literal>): Specifies how cached identifiers that reference missing rows will be handled: <literal>ignore</literal> will treat a missing row as a null association."
+#. Tag: para
+#: collection_mapping.xml:558
+#, no-c-format
+msgid ""
+"<literal>not-found</literal> (optional - defaults to <literal>exception</"
+"literal>): Specifies how cached identifiers that reference missing rows will "
+"be handled: <literal>ignore</literal> will treat a missing row as a null "
+"association."
 msgstr ""
+"<literal>entity-name</literal> (可选): 被关联的类的实体名,作为"
+"<literal>class</literal>的替代。"
 
-#: index.docbook:565
-msgid "<literal>entity-name</literal> (optional): The entity name of the associated class, as an alternative to <literal>class</literal>."
+#. Tag: para
+#: collection_mapping.xml:565
+#, fuzzy, no-c-format
+msgid ""
+"<literal>entity-name</literal> (optional): The entity name of the associated "
+"class, as an alternative to <literal>class</literal>."
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<literal>property-ref</literal>: (可选) 被关联到此外键(foreign key)的类中的对"
+"应属性的名字。若未指定,使用被关联类的主键。\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"例子"
 
-#: index.docbook:573
-msgid "Notice that the <literal>&lt;one-to-many&gt;</literal> element does not need to declare any columns. Nor is it necessary to specify the <literal>table</literal> name anywhere."
+#. Tag: para
+#: collection_mapping.xml:573
+#, no-c-format
+msgid ""
+"Notice that the <literal>&lt;one-to-many&gt;</literal> element does not need "
+"to declare any columns. Nor is it necessary to specify the <literal>table</"
+"literal> name anywhere."
 msgstr ""
+"注意:<literal>&lt;one-to-many&gt;</literal>元素不需要定义任何字段。 也不需要"
+"指定表名。"
 
-#: index.docbook:579
-msgid "<emphasis>Very important note:</emphasis> If the foreign key column of a <literal>&lt;one-to-many&gt;</literal> association is declared <literal>NOT NULL</literal>, you must declare the <literal>&lt;key&gt;</literal> mapping <literal>not-null=\"true\"</literal> or <emphasis>use a bidirectional association</emphasis> with the collection mapping marked <literal>inverse=\"true\"</literal>. See the discussion of bidirectional associations later in this chapter."
+#. Tag: para
+#: collection_mapping.xml:579
+#, no-c-format
+msgid ""
+"<emphasis>Very important note:</emphasis> If the foreign key column of a "
+"<literal>&lt;one-to-many&gt;</literal> association is declared <literal>NOT "
+"NULL</literal>, you must declare the <literal>&lt;key&gt;</literal> mapping "
+"<literal>not-null=\"true\"</literal> or <emphasis>use a bidirectional "
+"association</emphasis> with the collection mapping marked <literal>inverse="
+"\"true\"</literal>. See the discussion of bidirectional associations later "
+"in this chapter."
 msgstr ""
+"<emphasis>重要提示</emphasis>:如果<literal>一对多</literal>关联中的外键字段定"
+"义成<literal>NOT NULL</literal>,你必须把<literal>&lt;key&gt;</literal>映射声"
+"明为<literal>not-null=\"true\"</literal>,或者使用<emphasis>双向关联</"
+"emphasis>,并且标明<literal>inverse=\"true\"</literal>。参阅本章后面关于双向"
+"关联的讨论。"
 
-#: index.docbook:588
-msgid "This example shows a map of <literal>Part</literal> entities by name (where <literal>partName</literal> is a persistent property of <literal>Part</literal>). Notice the use of a formula-based index."
+#. Tag: para
+#: collection_mapping.xml:588
+#, no-c-format
+msgid ""
+"This example shows a map of <literal>Part</literal> entities by name (where "
+"<literal>partName</literal> is a persistent property of <literal>Part</"
+"literal>). Notice the use of a formula-based index."
 msgstr ""
+"下面的例子展示一个<literal>Part</literal>实体的map,把name作为关键字。"
+"( <literal>partName</literal> 是<literal>Part</literal>的持久化属性)。注意其"
+"中的基于公式的索引的用法。"
 
-#: index.docbook:594
+#. Tag: programlisting
+#: collection_mapping.xml:594
+#, no-c-format
 msgid ""
-      "<![CDATA[<map name=\"parts\"\n"
-      "        cascade=\"all\">\n"
-      "    <key column=\"productId\" not-null=\"true\"/>\n"
-      "    <map-key formula=\"partName\"/>\n"
-      "    <one-to-many class=\"Part\"/>\n"
-      "</map>]]>"
+"<![CDATA[<map name=\"parts\"\n"
+"        cascade=\"all\">\n"
+"    <key column=\"productId\" not-null=\"true\"/>\n"
+"    <map-key formula=\"partName\"/>\n"
+"    <one-to-many class=\"Part\"/>\n"
+"</map>]]>"
 msgstr ""
 
-#: index.docbook:600
+#. Tag: title
+#: collection_mapping.xml:600
+#, no-c-format
 msgid "Advanced collection mappings"
-msgstr ""
+msgstr "高级集合映射(Advanced collection mappings)"
 
-#: index.docbook:603
+#. Tag: title
+#: collection_mapping.xml:603
+#, no-c-format
 msgid "Sorted collections"
-msgstr ""
+msgstr "有序集合(Sorted collections)"
 
-#: index.docbook:605
-msgid "Hibernate supports collections implementing <literal>java.util.SortedMap</literal> and <literal>java.util.SortedSet</literal>. You must specify a comparator in the mapping file:"
+#. Tag: para
+#: collection_mapping.xml:605
+#, no-c-format
+msgid ""
+"Hibernate supports collections implementing <literal>java.util.SortedMap</"
+"literal> and <literal>java.util.SortedSet</literal>. You must specify a "
+"comparator in the mapping file:"
 msgstr ""
+"Hibernate支持实现<literal>java.util.SortedMap</literal>和<literal>java.util."
+"SortedSet</literal>的集合。 你必须在映射文件中指定一个比较器:"
 
-#: index.docbook:610
+#. Tag: programlisting
+#: collection_mapping.xml:610
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"aliases\" \n"
-      "            table=\"person_aliases\" \n"
-      "            sort=\"natural\">\n"
-      "    <key column=\"person\"/>\n"
-      "    <element column=\"name\" type=\"string\"/>\n"
-      "</set>\n"
-      "\n"
-      "<map name=\"holidays\" sort=\"my.custom.HolidayComparator\">\n"
-      "    <key column=\"year_id\"/>\n"
-      "    <map-key column=\"hol_name\" type=\"string\"/>\n"
-      "    <element column=\"hol_date\" type=\"date\"/>\n"
-      "</map>]]>"
+"<![CDATA[<set name=\"aliases\" \n"
+"            table=\"person_aliases\" \n"
+"            sort=\"natural\">\n"
+"    <key column=\"person\"/>\n"
+"    <element column=\"name\" type=\"string\"/>\n"
+"</set>\n"
+"\n"
+"<map name=\"holidays\" sort=\"my.custom.HolidayComparator\">\n"
+"    <key column=\"year_id\"/>\n"
+"    <map-key column=\"hol_name\" type=\"string\"/>\n"
+"    <element column=\"hol_date\" type=\"date\"/>\n"
+"</map>]]>"
 msgstr ""
 
-#: index.docbook:612
-msgid "Allowed values of the <literal>sort</literal> attribute are <literal>unsorted</literal>, <literal>natural</literal> and the name of a class implementing <literal>java.util.Comparator</literal>."
+#. Tag: para
+#: collection_mapping.xml:612
+#, no-c-format
+msgid ""
+"Allowed values of the <literal>sort</literal> attribute are "
+"<literal>unsorted</literal>, <literal>natural</literal> and the name of a "
+"class implementing <literal>java.util.Comparator</literal>."
 msgstr ""
+"<literal>sort</literal>属性中允许的值包括<literal>unsorted</literal>,"
+"<literal>natural</literal>和某个实现了<literal>java.util.Comparator</literal>"
+"的类的名称。"
 
-#: index.docbook:618
-msgid "Sorted collections actually behave like <literal>java.util.TreeSet</literal> or <literal>java.util.TreeMap</literal>."
+#. Tag: para
+#: collection_mapping.xml:618
+#, no-c-format
+msgid ""
+"Sorted collections actually behave like <literal>java.util.TreeSet</literal> "
+"or <literal>java.util.TreeMap</literal>."
 msgstr ""
+"分类集合的行为事实上象<literal>java.util.TreeSet</literal>或者<literal>java."
+"util.TreeMap</literal>。"
 
-#: index.docbook:623
-msgid "If you want the database itself to order the collection elements use the <literal>order-by</literal> attribute of <literal>set</literal>, <literal>bag</literal> or <literal>map</literal> mappings. This solution is only available under JDK 1.4 or higher (it is implemented using <literal>LinkedHashSet</literal> or <literal>LinkedHashMap</literal>). This performs the ordering in the SQL query, not in memory."
+#. Tag: para
+#: collection_mapping.xml:623
+#, no-c-format
+msgid ""
+"If you want the database itself to order the collection elements use the "
+"<literal>order-by</literal> attribute of <literal>set</literal>, "
+"<literal>bag</literal> or <literal>map</literal> mappings. This solution is "
+"only available under JDK 1.4 or higher (it is implemented using "
+"<literal>LinkedHashSet</literal> or <literal>LinkedHashMap</literal>). This "
+"performs the ordering in the SQL query, not in memory."
 msgstr ""
+"如果你希望数据库自己对集合元素排序,可以利用<literal>set</literal>,"
+"<literal>bag</literal>或者<literal>map</literal>映射中的<literal>order-by</"
+"literal>属性。这个解决方案只能在jdk1.4或者更高的jdk版本中才可以实现(通过"
+"LinkedHashSet或者 LinkedHashMap实现)。 它是在SQL查询中完成排序,而不是在内存"
+"中。"
 
-#: index.docbook:632
+#. Tag: programlisting
+#: collection_mapping.xml:632
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"aliases\" table=\"person_aliases\" order-by=\"lower(name) asc\">\n"
-      "    <key column=\"person\"/>\n"
-      "    <element column=\"name\" type=\"string\"/>\n"
-      "</set>\n"
-      "\n"
-      "<map name=\"holidays\" order-by=\"hol_date, hol_name\">\n"
-      "    <key column=\"year_id\"/>\n"
-      "    <map-key column=\"hol_name\" type=\"string\"/>\n"
-      "    <element column=\"hol_date type=\"date\"/>\n"
-      "</map>]]>"
+"<![CDATA[<set name=\"aliases\" table=\"person_aliases\" order-by=\"lower"
+"(name) asc\">\n"
+"    <key column=\"person\"/>\n"
+"    <element column=\"name\" type=\"string\"/>\n"
+"</set>\n"
+"\n"
+"<map name=\"holidays\" order-by=\"hol_date, hol_name\">\n"
+"    <key column=\"year_id\"/>\n"
+"    <map-key column=\"hol_name\" type=\"string\"/>\n"
+"    <element column=\"hol_date type=\"date\"/>\n"
+"</map>]]>"
 msgstr ""
 
-#: index.docbook:634
-msgid "Note that the value of the <literal>order-by</literal> attribute is an SQL ordering, not a HQL ordering!"
+#. Tag: para
+#: collection_mapping.xml:634
+#, no-c-format
+msgid ""
+"Note that the value of the <literal>order-by</literal> attribute is an SQL "
+"ordering, not a HQL ordering!"
 msgstr ""
+"注意: 这个<literal>order-by</literal>属性的值是一个SQL排序子句而不是HQL的!"
 
-#: index.docbook:639
-msgid "Associations may even be sorted by some arbitrary criteria at runtime using a collection <literal>filter()</literal>."
+#. Tag: para
+#: collection_mapping.xml:639
+#, no-c-format
+msgid ""
+"Associations may even be sorted by some arbitrary criteria at runtime using "
+"a collection <literal>filter()</literal>."
 msgstr ""
+"关联还可以在运行时使用集合<literal>filter()</literal>根据任意的条件来排序。"
 
-#: index.docbook:644
-msgid "<![CDATA[sortedUsers = s.createFilter( group.getUsers(), \"order by this.name\" ).list();]]>"
+#. Tag: programlisting
+#: collection_mapping.xml:644
+#, no-c-format
+msgid ""
+"<![CDATA[sortedUsers = s.createFilter( group.getUsers(), \"order by this.name"
+"\" ).list();]]>"
 msgstr ""
 
-#: index.docbook:649
+#. Tag: title
+#: collection_mapping.xml:649
+#, no-c-format
 msgid "Bidirectional associations"
-msgstr ""
+msgstr "双向关联(Bidirectional associations)"
 
-#: index.docbook:651
-msgid "A <emphasis>bidirectional association</emphasis> allows navigation from both \"ends\" of the association. Two kinds of bidirectional association are supported:"
+#. Tag: para
+#: collection_mapping.xml:651
+#, fuzzy, no-c-format
+msgid ""
+"A <emphasis>bidirectional association</emphasis> allows navigation from both "
+"\"ends\" of the association. Two kinds of bidirectional association are "
+"supported:"
 msgstr ""
+"<emphasis>双向关联</emphasis>允许通过关联的任一端访问另外一端。在Hibernate"
+"中, 支持两种类型的双向关联: <placeholder-1/>"
 
-#: index.docbook:658
+#. Tag: term
+#: collection_mapping.xml:658
+#, no-c-format
 msgid "one-to-many"
-msgstr ""
+msgstr "一对多(one-to-many)"
 
-#: index.docbook:660
+#. Tag: para
+#: collection_mapping.xml:660
+#, no-c-format
 msgid "set or bag valued at one end, single-valued at the other"
-msgstr ""
+msgstr "Set或者bag值在一端, 单独值(非集合)在另外一端"
 
-#: index.docbook:666
+#. Tag: term
+#: collection_mapping.xml:666
+#, no-c-format
 msgid "many-to-many"
-msgstr ""
+msgstr "多对多(many-to-many)"
 
-#: index.docbook:668
+#. Tag: para
+#: collection_mapping.xml:668
+#, no-c-format
 msgid "set or bag valued at both ends"
-msgstr ""
+msgstr "两端都是set或bag值"
 
-#: index.docbook:677
-msgid "You may specify a bidirectional many-to-many association simply by mapping two many-to-many associations to the same database table and declaring one end as <emphasis>inverse</emphasis> (which one is your choice, but it can not be an indexed collection)."
+#. Tag: para
+#: collection_mapping.xml:677
+#, no-c-format
+msgid ""
+"You may specify a bidirectional many-to-many association simply by mapping "
+"two many-to-many associations to the same database table and declaring one "
+"end as <emphasis>inverse</emphasis> (which one is your choice, but it can "
+"not be an indexed collection)."
 msgstr ""
+"要建立一个双向的多对多关联,只需要映射两个many-to-many关联到同一个数据库表"
+"中,并再定义其中的一端为<emphasis>inverse</emphasis>(使用哪一端要根据你的选"
+"择,但它不能是一个索引集合)。"
 
-#: index.docbook:684
-msgid "Here's an example of a bidirectional many-to-many association; each category can have many items and each item can be in many categories:"
+#. Tag: para
+#: collection_mapping.xml:684
+#, no-c-format
+msgid ""
+"Here's an example of a bidirectional many-to-many association; each category "
+"can have many items and each item can be in many categories:"
 msgstr ""
+"这里有一个many-to-many的双向关联的例子;每一个category都可以有很多items,每一个"
+"items可以属于很多categories:"
 
-#: index.docbook:689
+#. Tag: programlisting
+#: collection_mapping.xml:689
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Category\">\n"
-      "    <id name=\"id\" column=\"CATEGORY_ID\"/>\n"
-      "    ...\n"
-      "    <bag name=\"items\" table=\"CATEGORY_ITEM\">\n"
-      "        <key column=\"CATEGORY_ID\"/>\n"
-      "        <many-to-many class=\"Item\" column=\"ITEM_ID\"/>\n"
-      "    </bag>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Item\">\n"
-      "    <id name=\"id\" column=\"ITEM_ID\"/>\n"
-      "    ...\n"
-      "\n"
-      "    <!-- inverse end -->\n"
-      "    <bag name=\"categories\" table=\"CATEGORY_ITEM\" inverse=\"true\">\n"
-      "        <key column=\"ITEM_ID\"/>\n"
-      "        <many-to-many class=\"Category\" column=\"CATEGORY_ID\"/>\n"
-      "    </bag>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Category\">\n"
+"    <id name=\"id\" column=\"CATEGORY_ID\"/>\n"
+"    ...\n"
+"    <bag name=\"items\" table=\"CATEGORY_ITEM\">\n"
+"        <key column=\"CATEGORY_ID\"/>\n"
+"        <many-to-many class=\"Item\" column=\"ITEM_ID\"/>\n"
+"    </bag>\n"
+"</class>\n"
+"\n"
+"<class name=\"Item\">\n"
+"    <id name=\"id\" column=\"ITEM_ID\"/>\n"
+"    ...\n"
+"\n"
+"    <!-- inverse end -->\n"
+"    <bag name=\"categories\" table=\"CATEGORY_ITEM\" inverse=\"true\">\n"
+"        <key column=\"ITEM_ID\"/>\n"
+"        <many-to-many class=\"Category\" column=\"CATEGORY_ID\"/>\n"
+"    </bag>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:691
-msgid "Changes made only to the inverse end of the association are <emphasis>not</emphasis> persisted. This means that Hibernate has two representations in memory for every bidirectional association, one link from A to B and another link from B to A. This is easier to understand if you think about the Java object model and how we create a many-to-many relationship in Java:"
+#. Tag: para
+#: collection_mapping.xml:691
+#, no-c-format
+msgid ""
+"Changes made only to the inverse end of the association are <emphasis>not</"
+"emphasis> persisted. This means that Hibernate has two representations in "
+"memory for every bidirectional association, one link from A to B and another "
+"link from B to A. This is easier to understand if you think about the Java "
+"object model and how we create a many-to-many relationship in Java:"
 msgstr ""
+"如果只对关联的反向端进行了改变,这个改变<emphasis>不会</emphasis>被持久化。 "
+"这表示Hibernate为每个双向关联在内存中存在两次表现,一个从A连接到B,另一个从B连"
+"接到A。如果你回想一下Java对象模型,我们是如何在Java中创建多对多关系的,这可以"
+"让你更容易理解:"
 
-#: index.docbook:699
+#. Tag: programlisting
+#: collection_mapping.xml:699
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "category.getItems().add(item);          // The category now \"knows\" about the relationship\n"
-      "item.getCategories().add(category);     // The item now \"knows\" about the relationship\n"
-      "\n"
-      "session.persist(item);                   // The relationship won't be saved!\n"
-      "session.persist(category);               // The relationship will be saved]]>"
+"<![CDATA[\n"
+"category.getItems().add(item);          // The category now \"knows\" about "
+"the relationship\n"
+"item.getCategories().add(category);     // The item now \"knows\" about the "
+"relationship\n"
+"\n"
+"session.persist(item);                   // The relationship won't be "
+"saved!\n"
+"session.persist(category);               // The relationship will be saved]]>"
 msgstr ""
 
-#: index.docbook:701
-msgid "The non-inverse side is used to save the in-memory representation to the database."
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:701
+#, no-c-format
+msgid ""
+"The non-inverse side is used to save the in-memory representation to the "
+"database."
+msgstr "非反向端用于把内存中的表示保存到数据库中。"
 
-#: index.docbook:705
-msgid "You may define a bidirectional one-to-many association by mapping a one-to-many association to the same table column(s) as a many-to-one association and declaring the many-valued end <literal>inverse=\"true\"</literal>."
+#. Tag: para
+#: collection_mapping.xml:705
+#, no-c-format
+msgid ""
+"You may define a bidirectional one-to-many association by mapping a one-to-"
+"many association to the same table column(s) as a many-to-one association "
+"and declaring the many-valued end <literal>inverse=\"true\"</literal>."
 msgstr ""
+"要建立一个一对多的双向关联,你可以通过把一个一对多关联,作为一个多对一关联映"
+"射到到同一张表的字段上,并且在\"多\"的那一端定义<literal>inverse=\"true\"</"
+"literal>。"
 
-#: index.docbook:711
+#. Tag: programlisting
+#: collection_mapping.xml:711
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Parent\">\n"
-      "    <id name=\"id\" column=\"parent_id\"/>\n"
-      "    ....\n"
-      "    <set name=\"children\" inverse=\"true\">\n"
-      "        <key column=\"parent_id\"/>\n"
-      "        <one-to-many class=\"Child\"/>\n"
-      "    </set>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Child\">\n"
-      "    <id name=\"id\" column=\"child_id\"/>\n"
-      "    ....\n"
-      "    <many-to-one name=\"parent\" \n"
-      "        class=\"Parent\" \n"
-      "        column=\"parent_id\"\n"
-      "        not-null=\"true\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Parent\">\n"
+"    <id name=\"id\" column=\"parent_id\"/>\n"
+"    ....\n"
+"    <set name=\"children\" inverse=\"true\">\n"
+"        <key column=\"parent_id\"/>\n"
+"        <one-to-many class=\"Child\"/>\n"
+"    </set>\n"
+"</class>\n"
+"\n"
+"<class name=\"Child\">\n"
+"    <id name=\"id\" column=\"child_id\"/>\n"
+"    ....\n"
+"    <many-to-one name=\"parent\" \n"
+"        class=\"Parent\" \n"
+"        column=\"parent_id\"\n"
+"        not-null=\"true\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:713
-msgid "Mapping one end of an association with <literal>inverse=\"true\"</literal> doesn't affect the operation of cascades, these are orthogonal concepts!"
+#. Tag: para
+#: collection_mapping.xml:713
+#, no-c-format
+msgid ""
+"Mapping one end of an association with <literal>inverse=\"true\"</literal> "
+"doesn't affect the operation of cascades, these are orthogonal concepts!"
 msgstr ""
+"在“一”这一端定义<literal>inverse=\"true\"</literal>不会影响级联操作,二者是正"
+"交的概念!"
 
-#: index.docbook:721
+#. Tag: title
+#: collection_mapping.xml:721
+#, no-c-format
 msgid "Bidirectional associations with indexed collections"
-msgstr ""
+msgstr "双向关联,涉及有序集合类"
 
-#: index.docbook:722
-msgid "A bidirectional association where one end is represented as a <literal>&lt;list&gt;</literal> or <literal>&lt;map&gt;</literal> requires special consideration. If there is a property of the child class which maps to the index column, no problem, we can continue using <literal>inverse=\"true\"</literal> on the collection mapping:"
+#. Tag: para
+#: collection_mapping.xml:722
+#, no-c-format
+msgid ""
+"A bidirectional association where one end is represented as a <literal>&lt;"
+"list&gt;</literal> or <literal>&lt;map&gt;</literal> requires special "
+"consideration. If there is a property of the child class which maps to the "
+"index column, no problem, we can continue using <literal>inverse=\"true\"</"
+"literal> on the collection mapping:"
 msgstr ""
+"对于有一端是<literal>&lt;list&gt;</literal>或者<literal>&lt;map&gt;</literal>"
+"的双向关联,需要加以特别考虑。假若子类中的一个属性映射到索引字段,没问题,我"
+"们仍然可以在集合类映射上使用<literal>inverse=\"true\"</literal>:"
 
-#: index.docbook:729
+#. Tag: programlisting
+#: collection_mapping.xml:729
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Parent\">\n"
-      "    <id name=\"id\" column=\"parent_id\"/>\n"
-      "    ....\n"
-      "    <map name=\"children\" inverse=\"true\">\n"
-      "        <key column=\"parent_id\"/>\n"
-      "        <map-key column=\"name\" \n"
-      "            type=\"string\"/>\n"
-      "        <one-to-many class=\"Child\"/>\n"
-      "    </map>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Child\">\n"
-      "    <id name=\"id\" column=\"child_id\"/>\n"
-      "    ....\n"
-      "    <property name=\"name\" \n"
-      "        not-null=\"true\"/>\n"
-      "    <many-to-one name=\"parent\" \n"
-      "        class=\"Parent\" \n"
-      "        column=\"parent_id\"\n"
-      "        not-null=\"true\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Parent\">\n"
+"    <id name=\"id\" column=\"parent_id\"/>\n"
+"    ....\n"
+"    <map name=\"children\" inverse=\"true\">\n"
+"        <key column=\"parent_id\"/>\n"
+"        <map-key column=\"name\" \n"
+"            type=\"string\"/>\n"
+"        <one-to-many class=\"Child\"/>\n"
+"    </map>\n"
+"</class>\n"
+"\n"
+"<class name=\"Child\">\n"
+"    <id name=\"id\" column=\"child_id\"/>\n"
+"    ....\n"
+"    <property name=\"name\" \n"
+"        not-null=\"true\"/>\n"
+"    <many-to-one name=\"parent\" \n"
+"        class=\"Parent\" \n"
+"        column=\"parent_id\"\n"
+"        not-null=\"true\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:731
-msgid "But, if there is no such property on the child class, we can't think of the association as truly bidirectional (there is information available at one end of the association that is not available at the other end). In this case, we can't map the collection <literal>inverse=\"true\"</literal>. Instead, we could use the following mapping:"
+#. Tag: para
+#: collection_mapping.xml:731
+#, no-c-format
+msgid ""
+"But, if there is no such property on the child class, we can't think of the "
+"association as truly bidirectional (there is information available at one "
+"end of the association that is not available at the other end). In this "
+"case, we can't map the collection <literal>inverse=\"true\"</literal>. "
+"Instead, we could use the following mapping:"
 msgstr ""
+"但是,假若子类中没有这样的属性存在,我们不能认为这个关联是真正的双向关联(信"
+"息不对称,在关联的一端有一些另外一端没有的信息)。在这种情况下,我们不能使用"
+"<literal>inverse=\"true\"</literal>。我们需要这样用:"
 
-#: index.docbook:738
+#. Tag: programlisting
+#: collection_mapping.xml:738
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Parent\">\n"
-      "    <id name=\"id\" column=\"parent_id\"/>\n"
-      "    ....\n"
-      "    <map name=\"children\">\n"
-      "        <key column=\"parent_id\"\n"
-      "            not-null=\"true\"/>\n"
-      "        <map-key column=\"name\" \n"
-      "            type=\"string\"/>\n"
-      "        <one-to-many class=\"Child\"/>\n"
-      "    </map>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Child\">\n"
-      "    <id name=\"id\" column=\"child_id\"/>\n"
-      "    ....\n"
-      "    <many-to-one name=\"parent\" \n"
-      "        class=\"Parent\" \n"
-      "        column=\"parent_id\"\n"
-      "        insert=\"false\"\n"
-      "        update=\"false\"\n"
-      "        not-null=\"true\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Parent\">\n"
+"    <id name=\"id\" column=\"parent_id\"/>\n"
+"    ....\n"
+"    <map name=\"children\">\n"
+"        <key column=\"parent_id\"\n"
+"            not-null=\"true\"/>\n"
+"        <map-key column=\"name\" \n"
+"            type=\"string\"/>\n"
+"        <one-to-many class=\"Child\"/>\n"
+"    </map>\n"
+"</class>\n"
+"\n"
+"<class name=\"Child\">\n"
+"    <id name=\"id\" column=\"child_id\"/>\n"
+"    ....\n"
+"    <many-to-one name=\"parent\" \n"
+"        class=\"Parent\" \n"
+"        column=\"parent_id\"\n"
+"        insert=\"false\"\n"
+"        update=\"false\"\n"
+"        not-null=\"true\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:740
-msgid "Note that in this mapping, the collection-valued end of the association is responsible for updates to the foreign key. TODO: Does this really result in some unnecessary update statements?"
+#. Tag: para
+#: collection_mapping.xml:740
+#, no-c-format
+msgid ""
+"Note that in this mapping, the collection-valued end of the association is "
+"responsible for updates to the foreign key. TODO: Does this really result in "
+"some unnecessary update statements?"
 msgstr ""
+"注意在这个映射中,关联中集合类\"值\"一端负责来更新外键.TODO: Does this "
+"really result in some unnecessary update statements?"
 
-#: index.docbook:748
+#. Tag: title
+#: collection_mapping.xml:748
+#, no-c-format
 msgid "Ternary associations"
-msgstr ""
+msgstr "三重关联(Ternary associations)"
 
-#: index.docbook:750
-msgid "There are three possible approaches to mapping a ternary association. One is to use a <literal>Map</literal> with an association as its index:"
+#. Tag: para
+#: collection_mapping.xml:750
+#, no-c-format
+msgid ""
+"There are three possible approaches to mapping a ternary association. One is "
+"to use a <literal>Map</literal> with an association as its index:"
 msgstr ""
+"有三种可能的途径来映射一个三重关联。第一种是使用一个<literal>Map</literal>,"
+"把一个关联作为其索引:"
 
-#: index.docbook:755
+#. Tag: programlisting
+#: collection_mapping.xml:755
+#, no-c-format
 msgid ""
-      "<![CDATA[<map name=\"contracts\">\n"
-      "    <key column=\"employer_id\" not-null=\"true\"/>\n"
-      "    <map-key-many-to-many column=\"employee_id\" class=\"Employee\"/>\n"
-      "    <one-to-many class=\"Contract\"/>\n"
-      "</map>]]>"
+"<![CDATA[<map name=\"contracts\">\n"
+"    <key column=\"employer_id\" not-null=\"true\"/>\n"
+"    <map-key-many-to-many column=\"employee_id\" class=\"Employee\"/>\n"
+"    <one-to-many class=\"Contract\"/>\n"
+"</map>]]>"
 msgstr ""
 
-#: index.docbook:757
+#. Tag: programlisting
+#: collection_mapping.xml:757
+#, no-c-format
 msgid ""
-      "<![CDATA[<map name=\"connections\">\n"
-      "    <key column=\"incoming_node_id\"/>\n"
-      "    <map-key-many-to-many column=\"outgoing_node_id\" class=\"Node\"/>\n"
-      "    <many-to-many column=\"connection_id\" class=\"Connection\"/>\n"
-      "</map>]]>"
+"<![CDATA[<map name=\"connections\">\n"
+"    <key column=\"incoming_node_id\"/>\n"
+"    <map-key-many-to-many column=\"outgoing_node_id\" class=\"Node\"/>\n"
+"    <many-to-many column=\"connection_id\" class=\"Connection\"/>\n"
+"</map>]]>"
 msgstr ""
 
-#: index.docbook:759
-msgid "A second approach is to simply remodel the association as an entity class. This is the approach we use most commonly."
+#. Tag: para
+#: collection_mapping.xml:759
+#, no-c-format
+msgid ""
+"A second approach is to simply remodel the association as an entity class. "
+"This is the approach we use most commonly."
 msgstr ""
+"第二种方法是简单的把关联重新建模为一个实体类。这使我们最经常使用的方法。"
 
-#: index.docbook:764
-msgid "A final alternative is to use composite elements, which we will discuss later."
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:764
+#, no-c-format
+msgid ""
+"A final alternative is to use composite elements, which we will discuss "
+"later."
+msgstr "最后一种选择是使用复合元素,我们会在后面讨论"
 
-#: index.docbook:771
+#. Tag: literal
+#: collection_mapping.xml:771
+#, no-c-format
 msgid "Using an &lt;idbag&gt;"
-msgstr ""
+msgstr "使用&lt;idbag&gt;"
 
-#: index.docbook:773
-msgid "If you've fully embraced our view that composite keys are a bad thing and that entities should have synthetic identifiers (surrogate keys), then you might find it a bit odd that the many to many associations and collections of values that we've shown so far all map to tables with composite keys! Now, this point is quite arguable; a pure association table doesn't seem to benefit much from a surrogate key (though a collection of composite values <emphasis>might</emphasis>). Nevertheless, Hibernate provides a feature that allows you to map many to many associations and collections of values to a table with a surrogate key."
+#. Tag: para
+#: collection_mapping.xml:773
+#, no-c-format
+msgid ""
+"If you've fully embraced our view that composite keys are a bad thing and "
+"that entities should have synthetic identifiers (surrogate keys), then you "
+"might find it a bit odd that the many to many associations and collections "
+"of values that we've shown so far all map to tables with composite keys! "
+"Now, this point is quite arguable; a pure association table doesn't seem to "
+"benefit much from a surrogate key (though a collection of composite values "
+"<emphasis>might</emphasis>). Nevertheless, Hibernate provides a feature that "
+"allows you to map many to many associations and collections of values to a "
+"table with a surrogate key."
 msgstr ""
+"如果你完全信奉我们对于“联合主键(composite keys)是个坏东西”,和“实体应该使用"
+"(无机的)自己生成的代用标识符(surrogate keys)”的观点,也许你会感到有一些奇"
+"怪,我们目前为止展示的多对多关联和值集合都是映射成为带有联合主键的表的!现"
+"在,这一点非常值得争辩;看上去一个单纯的关联表并不能从代用标识符中获得什么好"
+"处(虽然使用组合值的集合<emphasis>可能</emphasis>会获得一点好处)。不过,"
+"Hibernate提供了一个(一点点试验性质的)功能,让你把多对多关联和值集合应得到一"
+"个使用代用标识符的表去。"
 
-#: index.docbook:784
-msgid "The <literal>&lt;idbag&gt;</literal> element lets you map a <literal>List</literal> (or <literal>Collection</literal>) with bag semantics."
+#. Tag: para
+#: collection_mapping.xml:784
+#, no-c-format
+msgid ""
+"The <literal>&lt;idbag&gt;</literal> element lets you map a <literal>List</"
+"literal> (or <literal>Collection</literal>) with bag semantics."
 msgstr ""
+"<literal>&lt;idbag&gt;</literal> 属性让你使用bag语义来映射一个<literal>List</"
+"literal> (或<literal>Collection</literal>)。"
 
-#: index.docbook:789
+#. Tag: programlisting
+#: collection_mapping.xml:789
+#, no-c-format
 msgid ""
-      "<![CDATA[<idbag name=\"lovers\" table=\"LOVERS\">\n"
-      "    <collection-id column=\"ID\" type=\"long\">\n"
-      "        <generator class=\"sequence\"/>\n"
-      "    </collection-id>\n"
-      "    <key column=\"PERSON1\"/>\n"
-      "    <many-to-many column=\"PERSON2\" class=\"Person\" fetch=\"join\"/>\n"
-      "</idbag>]]>"
+"<![CDATA[<idbag name=\"lovers\" table=\"LOVERS\">\n"
+"    <collection-id column=\"ID\" type=\"long\">\n"
+"        <generator class=\"sequence\"/>\n"
+"    </collection-id>\n"
+"    <key column=\"PERSON1\"/>\n"
+"    <many-to-many column=\"PERSON2\" class=\"Person\" fetch=\"join\"/>\n"
+"</idbag>]]>"
 msgstr ""
 
-#: index.docbook:791
-msgid "As you can see, an <literal>&lt;idbag&gt;</literal> has a synthetic id generator, just like an entity class! A different surrogate key is assigned to each collection row. Hibernate does not provide any mechanism to discover the surrogate key value of a particular row, however."
+#. Tag: para
+#: collection_mapping.xml:791
+#, no-c-format
+msgid ""
+"As you can see, an <literal>&lt;idbag&gt;</literal> has a synthetic id "
+"generator, just like an entity class! A different surrogate key is assigned "
+"to each collection row. Hibernate does not provide any mechanism to discover "
+"the surrogate key value of a particular row, however."
 msgstr ""
+"你可以理解,<literal>&lt;idbag&gt;</literal>人工的id生成器,就好像是实体类一"
+"样!集合的每一行都有一个不同的人造关键字。但是,Hibernate没有提供任何机制来让"
+"你取得某个特定行的人造关键字。"
 
-#: index.docbook:798
-msgid "Note that the update performance of an <literal>&lt;idbag&gt;</literal> is <emphasis>much</emphasis> better than a regular <literal>&lt;bag&gt;</literal>! Hibernate can locate individual rows efficiently and update or delete them individually, just like a list, map or set."
+#. Tag: para
+#: collection_mapping.xml:798
+#, no-c-format
+msgid ""
+"Note that the update performance of an <literal>&lt;idbag&gt;</literal> is "
+"<emphasis>much</emphasis> better than a regular <literal>&lt;bag&gt;</"
+"literal>! Hibernate can locate individual rows efficiently and update or "
+"delete them individually, just like a list, map or set."
 msgstr ""
+"注意<literal>&lt;idbag&gt;</literal>的更新性能要比普通的<literal>&lt;bag&gt;"
+"</literal>高得多!Hibernate可以有效的定位到不同的行,分别进行更新或删除工作,"
+"就如同处理一个list, map或者set一样。"
 
-#: index.docbook:805
-msgid "In the current implementation, the <literal>native</literal> identifier generation strategy is not supported for <literal>&lt;idbag&gt;</literal> collection identifiers."
+#. Tag: para
+#: collection_mapping.xml:805
+#, no-c-format
+msgid ""
+"In the current implementation, the <literal>native</literal> identifier "
+"generation strategy is not supported for <literal>&lt;idbag&gt;</literal> "
+"collection identifiers."
 msgstr ""
+"在目前的实现中,还不支持使用<literal>identity</literal>标识符生成器策略来生成"
+"<literal>&lt;idbag&gt;</literal>集合的标识符。"
 
-#: index.docbook:829
+#. Tag: title
+#: collection_mapping.xml:829
+#, no-c-format
 msgid "Collection examples"
-msgstr ""
+msgstr "集合例子(Collection example)"
 
-#: index.docbook:831
-msgid "The previous sections are pretty confusing. So lets look at an example. This class:"
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:831
+#, no-c-format
+msgid ""
+"The previous sections are pretty confusing. So lets look at an example. This "
+"class:"
+msgstr "在前面的几个章节的确非常令人迷惑。 因此让我们来看一个例子。这个类:"
 
-#: index.docbook:836
+#. Tag: programlisting
+#: collection_mapping.xml:836
+#, no-c-format
 msgid ""
-      "<![CDATA[package eg;\n"
-      "import java.util.Set;\n"
-      "\n"
-      "public class Parent {\n"
-      "    private long id;\n"
-      "    private Set children;\n"
-      "\n"
-      "    public long getId() { return id; }\n"
-      "    private void setId(long id) { this.id=id; }\n"
-      "\n"
-      "    private Set getChildren() { return children; }\n"
-      "    private void setChildren(Set children) { this.children=children; }\n"
-      "\n"
-      "    ....\n"
-      "    ....\n"
-      "}]]>"
+"<![CDATA[package eg;\n"
+"import java.util.Set;\n"
+"\n"
+"public class Parent {\n"
+"    private long id;\n"
+"    private Set children;\n"
+"\n"
+"    public long getId() { return id; }\n"
+"    private void setId(long id) { this.id=id; }\n"
+"\n"
+"    private Set getChildren() { return children; }\n"
+"    private void setChildren(Set children) { this.children=children; }\n"
+"\n"
+"    ....\n"
+"    ....\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:838
-msgid "has a collection of <literal>Child</literal> instances. If each child has at most one parent, the most natural mapping is a one-to-many association:"
+#. Tag: para
+#: collection_mapping.xml:838
+#, no-c-format
+msgid ""
+"has a collection of <literal>Child</literal> instances. If each child has at "
+"most one parent, the most natural mapping is a one-to-many association:"
 msgstr ""
+"这个类有一个<literal>Child</literal>的实例集合。如果每一个子实例至多有一个父"
+"实例, 那么最自然的映射是一个one-to-many的关联关系:"
 
-#: index.docbook:844
+#. Tag: programlisting
+#: collection_mapping.xml:844
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "\n"
-      "    <class name=\"Parent\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\"/>\n"
-      "        </id>\n"
-      "        <set name=\"children\">\n"
-      "            <key column=\"parent_id\"/>\n"
-      "            <one-to-many class=\"Child\"/>\n"
-      "        </set>\n"
-      "    </class>\n"
-      "\n"
-      "    <class name=\"Child\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\"/>\n"
-      "        </id>\n"
-      "        <property name=\"name\"/>\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"\n"
+"    <class name=\"Parent\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\"/>\n"
+"        </id>\n"
+"        <set name=\"children\">\n"
+"            <key column=\"parent_id\"/>\n"
+"            <one-to-many class=\"Child\"/>\n"
+"        </set>\n"
+"    </class>\n"
+"\n"
+"    <class name=\"Child\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\"/>\n"
+"        </id>\n"
+"        <property name=\"name\"/>\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:846
+#. Tag: para
+#: collection_mapping.xml:846
+#, no-c-format
 msgid "This maps to the following table definitions:"
-msgstr ""
+msgstr "在以下的表定义中反应了这个映射关系:"
 
-#: index.docbook:850
+#. Tag: programlisting
+#: collection_mapping.xml:850
+#, no-c-format
 msgid ""
-      "<![CDATA[create table parent ( id bigint not null primary key )\n"
-      "create table child ( id bigint not null primary key, name varchar(255), parent_id bigint )\n"
-      "alter table child add constraint childfk0 (parent_id) references parent]]>"
+"<![CDATA[create table parent ( id bigint not null primary key )\n"
+"create table child ( id bigint not null primary key, name varchar(255), "
+"parent_id bigint )\n"
+"alter table child add constraint childfk0 (parent_id) references parent]]>"
 msgstr ""
 
-#: index.docbook:852
-msgid "If the parent is <emphasis>required</emphasis>, use a bidirectional one-to-many association:"
+#. Tag: para
+#: collection_mapping.xml:852
+#, no-c-format
+msgid ""
+"If the parent is <emphasis>required</emphasis>, use a bidirectional one-to-"
+"many association:"
 msgstr ""
+"如果父亲是<emphasis>必须</emphasis>的, 那么就可以使用双向one-to-many的关联"
+"了:"
 
-#: index.docbook:857
+#. Tag: programlisting
+#: collection_mapping.xml:857
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "\n"
-      "    <class name=\"Parent\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\"/>\n"
-      "        </id>\n"
-      "        <set name=\"children\" inverse=\"true\">\n"
-      "            <key column=\"parent_id\"/>\n"
-      "            <one-to-many class=\"Child\"/>\n"
-      "        </set>\n"
-      "    </class>\n"
-      "\n"
-      "    <class name=\"Child\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\"/>\n"
-      "        </id>\n"
-      "        <property name=\"name\"/>\n"
-      "        <many-to-one name=\"parent\" class=\"Parent\" column=\"parent_id\" not-null=\"true\"/>\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"\n"
+"    <class name=\"Parent\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\"/>\n"
+"        </id>\n"
+"        <set name=\"children\" inverse=\"true\">\n"
+"            <key column=\"parent_id\"/>\n"
+"            <one-to-many class=\"Child\"/>\n"
+"        </set>\n"
+"    </class>\n"
+"\n"
+"    <class name=\"Child\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\"/>\n"
+"        </id>\n"
+"        <property name=\"name\"/>\n"
+"        <many-to-one name=\"parent\" class=\"Parent\" column=\"parent_id\" "
+"not-null=\"true\"/>\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:859
+#. Tag: para
+#: collection_mapping.xml:859
+#, no-c-format
 msgid "Notice the <literal>NOT NULL</literal> constraint:"
-msgstr ""
+msgstr "请注意<literal>NOT NULL</literal>的约束:"
 
-#: index.docbook:863
+#. Tag: programlisting
+#: collection_mapping.xml:863
+#, no-c-format
 msgid ""
-      "<![CDATA[create table parent ( id bigint not null primary key )\n"
-      "create table child ( id bigint not null\n"
-      "                     primary key,\n"
-      "                     name varchar(255),\n"
-      "                     parent_id bigint not null )\n"
-      "alter table child add constraint childfk0 (parent_id) references parent]]>"
+"<![CDATA[create table parent ( id bigint not null primary key )\n"
+"create table child ( id bigint not null\n"
+"                     primary key,\n"
+"                     name varchar(255),\n"
+"                     parent_id bigint not null )\n"
+"alter table child add constraint childfk0 (parent_id) references parent]]>"
 msgstr ""
 
-#: index.docbook:865
-msgid "Alternatively, if you absolutely insist that this association should be unidirectional, you can declare the <literal>NOT NULL</literal> constraint on the <literal>&lt;key&gt;</literal> mapping:"
+#. Tag: para
+#: collection_mapping.xml:865
+#, no-c-format
+msgid ""
+"Alternatively, if you absolutely insist that this association should be "
+"unidirectional, you can declare the <literal>NOT NULL</literal> constraint "
+"on the <literal>&lt;key&gt;</literal> mapping:"
 msgstr ""
+"另外,如果你绝对坚持这个关联应该是单向的,你可以对<literal>&lt;key&gt;</"
+"literal>映射声明<literal>NOT NULL</literal>约束:"
 
-#: index.docbook:871
+#. Tag: programlisting
+#: collection_mapping.xml:871
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "\n"
-      "    <class name=\"Parent\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\"/>\n"
-      "        </id>\n"
-      "        <set name=\"children\">\n"
-      "            <key column=\"parent_id\" not-null=\"true\"/>\n"
-      "            <one-to-many class=\"Child\"/>\n"
-      "        </set>\n"
-      "    </class>\n"
-      "\n"
-      "    <class name=\"Child\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\"/>\n"
-      "        </id>\n"
-      "        <property name=\"name\"/>\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"\n"
+"    <class name=\"Parent\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\"/>\n"
+"        </id>\n"
+"        <set name=\"children\">\n"
+"            <key column=\"parent_id\" not-null=\"true\"/>\n"
+"            <one-to-many class=\"Child\"/>\n"
+"        </set>\n"
+"    </class>\n"
+"\n"
+"    <class name=\"Child\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\"/>\n"
+"        </id>\n"
+"        <property name=\"name\"/>\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:873
-msgid "On the other hand, if a child might have multiple parents, a many-to-many association is appropriate:"
+#. Tag: para
+#: collection_mapping.xml:873
+#, no-c-format
+msgid ""
+"On the other hand, if a child might have multiple parents, a many-to-many "
+"association is appropriate:"
 msgstr ""
+"另外一方面,如果一个子实例可能有多个父实例, 那么就应该使用many-to-many关联:"
 
-#: index.docbook:878
+#. Tag: programlisting
+#: collection_mapping.xml:878
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "\n"
-      "    <class name=\"Parent\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\"/>\n"
-      "        </id>\n"
-      "        <set name=\"children\" table=\"childset\">\n"
-      "            <key column=\"parent_id\"/>\n"
-      "            <many-to-many class=\"Child\" column=\"child_id\"/>\n"
-      "        </set>\n"
-      "    </class>\n"
-      "\n"
-      "    <class name=\"Child\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\"/>\n"
-      "        </id>\n"
-      "        <property name=\"name\"/>\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"\n"
+"    <class name=\"Parent\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\"/>\n"
+"        </id>\n"
+"        <set name=\"children\" table=\"childset\">\n"
+"            <key column=\"parent_id\"/>\n"
+"            <many-to-many class=\"Child\" column=\"child_id\"/>\n"
+"        </set>\n"
+"    </class>\n"
+"\n"
+"    <class name=\"Child\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\"/>\n"
+"        </id>\n"
+"        <property name=\"name\"/>\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:880
+#. Tag: para
+#: collection_mapping.xml:880
+#, no-c-format
 msgid "Table definitions:"
-msgstr ""
+msgstr "表定义:"
 
-#: index.docbook:884
+#. Tag: programlisting
+#: collection_mapping.xml:884
+#, no-c-format
 msgid ""
-      "<![CDATA[create table parent ( id bigint not null primary key )\n"
-      "create table child ( id bigint not null primary key, name varchar(255) )\n"
-      "create table childset ( parent_id bigint not null,\n"
-      "                        child_id bigint not null,\n"
-      "                        primary key ( parent_id, child_id ) )\n"
-      "alter table childset add constraint childsetfk0 (parent_id) references parent\n"
-      "alter table childset add constraint childsetfk1 (child_id) references child]]>"
+"<![CDATA[create table parent ( id bigint not null primary key )\n"
+"create table child ( id bigint not null primary key, name varchar(255) )\n"
+"create table childset ( parent_id bigint not null,\n"
+"                        child_id bigint not null,\n"
+"                        primary key ( parent_id, child_id ) )\n"
+"alter table childset add constraint childsetfk0 (parent_id) references "
+"parent\n"
+"alter table childset add constraint childsetfk1 (child_id) references child]]"
+">"
 msgstr ""
 
-#: index.docbook:886
-msgid "For more examples and a complete walk-through a parent/child relationship mapping, see <xref linkend=\"example-parentchild\"/>."
+#. Tag: para
+#: collection_mapping.xml:886
+#, no-c-format
+msgid ""
+"For more examples and a complete walk-through a parent/child relationship "
+"mapping, see <xref linkend=\"example-parentchild\"/>."
 msgstr ""
+"更多的例子,以及一个完整的父/子关系映射的排练,请参阅<xref linkend=\"example-"
+"parentchild\"/>."
 
-#: index.docbook:891
-msgid "Even more exotic association mappings are possible, we will catalog all possibilities in the next chapter."
-msgstr ""
+#. Tag: para
+#: collection_mapping.xml:891
+#, no-c-format
+msgid ""
+"Even more exotic association mappings are possible, we will catalog all "
+"possibilities in the next chapter."
+msgstr "甚至可能出现更加复杂的关联映射,我们会在下一章中列出所有可能性。"
 
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
+#~ msgid ""
+#~ "<literal>column_name</literal> (required): The name of the column holding "
+#~ "the collection index values."
+#~ msgstr "<literal>column</literal>(可选):保存集合索引值的字段名。"
 
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
+#~ msgid ""
+#~ "<literal>base</literal> (optional, defaults to <literal>0</literal>): The "
+#~ "value of the index column that corresponds to the first element of the "
+#~ "list or array."
+#~ msgstr "<literal>formula</literal> (可选): 用于计算map关键字的SQL公式"
 
+#~ msgid ""
+#~ "<literal>column</literal> (optional): The name of the column holding the "
+#~ "collection index values."
+#~ msgstr "<literal>type</literal> (必须):映射键(map key)的类型。"
+
+#~ msgid ""
+#~ "<literal>formula</literal> (optional): A SQL formula used to evaluate the "
+#~ "key of the map."
+#~ msgstr "<literal>column</literal>(可选):集合索引值中外键字段的名称"
+
+#~ msgid "<literal>type</literal> (reguired): The type of the map keys."
+#~ msgstr "<literal>formula</literal> (可选): 用于计算map关键字的外键的SQL公式"
+
+#~ msgid ""
+#~ "<literal>column</literal> (optional): The name of the foreign key column "
+#~ "for the collection index values."
+#~ msgstr "<literal>class</literal> (必需):映射的键(map key)使用的实体类。"
+
+#~ msgid ""
+#~ "<literal>formula</literal> (optional): A SQL formula used to evaluate the "
+#~ "foreign key of the map key."
+#~ msgstr ""
+#~ "假若你的表没有一个索引字段,当你仍然希望使用<literal>List</literal>作为属性"
+#~ "类型,你应该把此属性映射为Hibernate <emphasis>&lt;bag&gt;</emphasis>。从数"
+#~ "据库中获取的时候,bag不维护其顺序,但也可选择性的进行排序。"
+
+#~ msgid ""
+#~ "<literal>class</literal> (required): The entity class used as the map key."
+#~ msgstr ""
+#~ "从集合类可以产生很大一部分映射,覆盖了很多常见的关系模型。我们建议你试验"
+#~ "schema生成工具,来体会一下不同的映射声明是如何被翻译为数据库表的。"
+
+#~ msgid ""
+#~ "<literal>column</literal> (optional): The name of the column holding the "
+#~ "collection element values."
+#~ msgstr "<literal>type</literal> (必需):集合元素的类型"
+
+#~ msgid ""
+#~ "<literal>formula</literal> (optional): An SQL formula used to evaluate "
+#~ "the element."
+#~ msgstr ""
+#~ "<emphasis>多对多关联(many-to-many association)</emphasis> 使用 "
+#~ "<literal>&lt;many-to-many&gt;</literal>元素定义."
+
+#~ msgid ""
+#~ "<literal>type</literal> (required): The type of the collection element."
+#~ msgstr "<literal>column</literal>(可选): 这个元素的外键关键字段名"
+
+#~ msgid ""
+#~ "A <emphasis>many-to-many association</emphasis> is specified using the "
+#~ "<literal>&lt;many-to-many&gt;</literal> element."
+#~ msgstr "<literal>formula</literal> (可选): 用于计算元素外键值的SQL公式."
+
+#~ msgid ""
+#~ "<literal>column</literal> (optional): The name of the element foreign key "
+#~ "column."
+#~ msgstr "<literal>class</literal> (必需): 关联类的名称"
+
+#~ msgid ""
+#~ "<literal>formula</literal> (optional): An SQL formula used to evaluate "
+#~ "the element foreign key value."
+#~ msgstr ""
+#~ "<literal>outer-join</literal> (可选 - 默认为<literal>auto</literal>): 在"
+#~ "Hibernate系统参数中<literal>hibernate.use_outer_join</literal>被打开的情况"
+#~ "下,该参数用来允许使用outer join来载入此集合的数据。"
+
+#~ msgid ""
+#~ "<literal>fetch</literal> (optional - defaults to <literal>join</"
+#~ "literal>): enables outer-join or sequential select fetching for this "
+#~ "association. This is a special case; for full eager fetching (in a single "
+#~ "<literal>SELECT</literal>) of an entity and its many-to-many "
+#~ "relationships to other entities, you would enable <literal>join</literal> "
+#~ "fetching not only of the collection itself, but also with this attribute "
+#~ "on the <literal>&lt;many-to-many&gt;</literal> nested element."
+#~ msgstr ""
+#~ "对外键字段允许DDL生成的时候生成一个惟一约束。这使关联变成了一个高效的一对"
+#~ "多关联。(此句存疑:原文为This makes the association multiplicity "
+#~ "effectively one to many.)"
+
+#~ msgid ""
+#~ "<literal>unique</literal> (optional): Enable the DDL generation of a "
+#~ "unique constraint for the foreign-key column. This makes the association "
+#~ "multiplicity effectively one to many."
+#~ msgstr ""
+#~ "<literal>not-found</literal> (可选 - 默认为 <literal>exception</"
+#~ "literal>): 指明引用的外键中缺少某些行该如何处理: <literal>ignore</"
+#~ "literal> 会把缺失的行作为一个空引用处理。"
+
+#~ msgid ""
+#~ "<literal>not-found</literal> (optional - defaults to <literal>exception</"
+#~ "literal>): Specifies how foreign keys that reference missing rows will be "
+#~ "handled: <literal>ignore</literal> will treat a missing row as a null "
+#~ "association."
+#~ msgstr ""
+#~ "<literal>entity-name</literal> (可选): 被关联的类的实体名,作为"
+#~ "<literal>class</literal>的替代。"
+
+#~ msgid ""
+#~ "<literal>property-ref</literal>: (optional) The name of a property of the "
+#~ "associated class that is joined to this foreign key. If not specified, "
+#~ "the primary key of the associated class is used."
+#~ msgstr "例子:首先, 一组字符串:"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/component_mapping.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/component_mapping.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/component_mapping.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,372 +1,653 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: component_mapping.xml:5
+#, no-c-format
 msgid "Component Mapping"
-msgstr ""
+msgstr "组件(Component)映射"
 
-#: index.docbook:7
-msgid "The notion of a <emphasis>component</emphasis> is re-used in several different contexts, for different purposes, throughout Hibernate."
+#. Tag: para
+#: component_mapping.xml:7
+#, no-c-format
+msgid ""
+"The notion of a <emphasis>component</emphasis> is re-used in several "
+"different contexts, for different purposes, throughout Hibernate."
 msgstr ""
+"<emphasis>组件</emphasis>(Component)这个概念在Hibernate中几处不同的地方为了不"
+"同的目的被重复使用."
 
-#: index.docbook:13
+#. Tag: title
+#: component_mapping.xml:13
+#, no-c-format
 msgid "Dependent objects"
-msgstr ""
+msgstr "依赖对象(Dependent objects)"
 
-#: index.docbook:15
-msgid "A component is a contained object that is persisted as a value type, not an entity reference. The term \"component\" refers to the object-oriented notion of composition (not to architecture-level components). For example, you might model a person like this:"
+#. Tag: para
+#: component_mapping.xml:15
+#, no-c-format
+msgid ""
+"A component is a contained object that is persisted as a value type, not an "
+"entity reference. The term \"component\" refers to the object-oriented "
+"notion of composition (not to architecture-level components). For example, "
+"you might model a person like this:"
 msgstr ""
+"组件(Component)是一个被包含的对象,在持久化的过程中,它被当作值类型,而并非一"
+"个实体的引用。在这篇文档中,组件这一术语指的是面向对象的合成概念(而并不是系"
+"统构架层次上的组件的概念)。举个例子, 你对人(Person)这个概念可以像下面这样来"
+"建模:"
 
-#: index.docbook:21
+#. Tag: programlisting
+#: component_mapping.xml:21
+#, no-c-format
 msgid ""
-      "<![CDATA[public class Person {\n"
-      "    private java.util.Date birthday;\n"
-      "    private Name name;\n"
-      "    private String key;\n"
-      "    public String getKey() {\n"
-      "        return key;\n"
-      "    }\n"
-      "    private void setKey(String key) {\n"
-      "        this.key=key;\n"
-      "    }\n"
-      "    public java.util.Date getBirthday() {\n"
-      "        return birthday;\n"
-      "    }\n"
-      "    public void setBirthday(java.util.Date birthday) {\n"
-      "        this.birthday = birthday;\n"
-      "    }\n"
-      "    public Name getName() {\n"
-      "        return name;\n"
-      "    }\n"
-      "    public void setName(Name name) {\n"
-      "        this.name = name;\n"
-      "    }\n"
-      "    ......\n"
-      "    ......\n"
-      "}]]>"
+"<![CDATA[public class Person {\n"
+"    private java.util.Date birthday;\n"
+"    private Name name;\n"
+"    private String key;\n"
+"    public String getKey() {\n"
+"        return key;\n"
+"    }\n"
+"    private void setKey(String key) {\n"
+"        this.key=key;\n"
+"    }\n"
+"    public java.util.Date getBirthday() {\n"
+"        return birthday;\n"
+"    }\n"
+"    public void setBirthday(java.util.Date birthday) {\n"
+"        this.birthday = birthday;\n"
+"    }\n"
+"    public Name getName() {\n"
+"        return name;\n"
+"    }\n"
+"    public void setName(Name name) {\n"
+"        this.name = name;\n"
+"    }\n"
+"    ......\n"
+"    ......\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:23
+#. Tag: programlisting
+#: component_mapping.xml:23
+#, no-c-format
 msgid ""
-      "<![CDATA[public class Name {\n"
-      "    char initial;\n"
-      "    String first;\n"
-      "    String last;\n"
-      "    public String getFirst() {\n"
-      "        return first;\n"
-      "    }\n"
-      "    void setFirst(String first) {\n"
-      "        this.first = first;\n"
-      "    }\n"
-      "    public String getLast() {\n"
-      "        return last;\n"
-      "    }\n"
-      "    void setLast(String last) {\n"
-      "        this.last = last;\n"
-      "    }\n"
-      "    public char getInitial() {\n"
-      "        return initial;\n"
-      "    }\n"
-      "    void setInitial(char initial) {\n"
-      "        this.initial = initial;\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[public class Name {\n"
+"    char initial;\n"
+"    String first;\n"
+"    String last;\n"
+"    public String getFirst() {\n"
+"        return first;\n"
+"    }\n"
+"    void setFirst(String first) {\n"
+"        this.first = first;\n"
+"    }\n"
+"    public String getLast() {\n"
+"        return last;\n"
+"    }\n"
+"    void setLast(String last) {\n"
+"        this.last = last;\n"
+"    }\n"
+"    public char getInitial() {\n"
+"        return initial;\n"
+"    }\n"
+"    void setInitial(char initial) {\n"
+"        this.initial = initial;\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:25
-msgid "Now <literal>Name</literal> may be persisted as a component of <literal>Person</literal>. Notice that <literal>Name</literal> defines getter and setter methods for its persistent properties, but doesn't need to declare any interfaces or identifier properties."
+#. Tag: para
+#: component_mapping.xml:25
+#, no-c-format
+msgid ""
+"Now <literal>Name</literal> may be persisted as a component of "
+"<literal>Person</literal>. Notice that <literal>Name</literal> defines "
+"getter and setter methods for its persistent properties, but doesn't need to "
+"declare any interfaces or identifier properties."
 msgstr ""
+"在持久化的过程中,<literal>姓名(Name)</literal>可以作为<literal>人(Person)</"
+"literal>的一个组件。需要注意的是:你应该为<literal>姓名</literal>的持久化属性"
+"定义getter和setter方法,但是你不需要实现任何的接口或申明标识符字段。"
 
-#: index.docbook:32
+#. Tag: para
+#: component_mapping.xml:32
+#, no-c-format
 msgid "Our Hibernate mapping would look like:"
-msgstr ""
+msgstr "以下是这个例子的Hibernate映射文件:"
 
-#: index.docbook:36
+#. Tag: programlisting
+#: component_mapping.xml:36
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"eg.Person\" table=\"person\">\n"
-      "    <id name=\"Key\" column=\"pid\" type=\"string\">\n"
-      "        <generator class=\"uuid\"/>\n"
-      "    </id>\n"
-      "    <property name=\"birthday\" type=\"date\"/>\n"
-      "    <component name=\"Name\" class=\"eg.Name\"> <!-- class attribute optional -->\n"
-      "        <property name=\"initial\"/>\n"
-      "        <property name=\"first\"/>\n"
-      "        <property name=\"last\"/>\n"
-      "    </component>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"eg.Person\" table=\"person\">\n"
+"    <id name=\"Key\" column=\"pid\" type=\"string\">\n"
+"        <generator class=\"uuid\"/>\n"
+"    </id>\n"
+"    <property name=\"birthday\" type=\"date\"/>\n"
+"    <component name=\"Name\" class=\"eg.Name\"> <!-- class attribute "
+"optional -->\n"
+"        <property name=\"initial\"/>\n"
+"        <property name=\"first\"/>\n"
+"        <property name=\"last\"/>\n"
+"    </component>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:38
-msgid "The person table would have the columns <literal>pid</literal>, <literal>birthday</literal>, <literal>initial</literal>, <literal>first</literal> and <literal>last</literal>."
+#. Tag: para
+#: component_mapping.xml:38
+#, no-c-format
+msgid ""
+"The person table would have the columns <literal>pid</literal>, "
+"<literal>birthday</literal>, <literal>initial</literal>, <literal>first</"
+"literal> and <literal>last</literal>."
 msgstr ""
+"人员(Person)表中将包括<literal>pid</literal>, <literal>birthday</literal>, "
+"<literal>initial</literal>, <literal>first</literal>和 <literal>last</"
+"literal>等字段。"
 
-#: index.docbook:46
-msgid "Like all value types, components do not support shared references. In other words, two persons could have the same name, but the two person objects would contain two independent name ojects, only \"the same\" by value. The null value semantics of a component are <emphasis>ad hoc</emphasis>. When reloading the containing object, Hibernate will assume that if all component columns are null, then the entire component is null. This should be okay for most purposes."
+#. Tag: para
+#: component_mapping.xml:46
+#, no-c-format
+msgid ""
+"Like all value types, components do not support shared references. In other "
+"words, two persons could have the same name, but the two person objects "
+"would contain two independent name ojects, only \"the same\" by value. The "
+"null value semantics of a component are <emphasis>ad hoc</emphasis>. When "
+"reloading the containing object, Hibernate will assume that if all component "
+"columns are null, then the entire component is null. This should be okay for "
+"most purposes."
 msgstr ""
+"就像所有的值类型一样, 组件不支持共享引用。 换句话说,两个人可能重名,但是两个"
+"Person对象应该包含两个独立的Name对象,只不过这两个Name对象具有“同样”的值。 组"
+"件的值可以为空,其定义如下。 每当Hibernate重新加载一个包含组件的对象,如果该组"
+"件的所有字段为空,Hibernate将假定整个组件为空。 在大多数情况下,这样假定应该是"
+"没有问题的。"
 
-#: index.docbook:55
-msgid "The properties of a component may be of any Hibernate type (collections, many-to-one associations, other components, etc). Nested components should <emphasis>not</emphasis> be considered an exotic usage. Hibernate is intended to support a very fine-grained object model."
+#. Tag: para
+#: component_mapping.xml:55
+#, no-c-format
+msgid ""
+"The properties of a component may be of any Hibernate type (collections, "
+"many-to-one associations, other components, etc). Nested components should "
+"<emphasis>not</emphasis> be considered an exotic usage. Hibernate is "
+"intended to support a very fine-grained object model."
 msgstr ""
+"组件的属性可以是任意一种Hibernate类型(包括集合, 多对多关联, 以及其它组件等"
+"等)。嵌套组件不应该被当作一种特殊的应用(Nested components should not be "
+"considered an exotic usage)。 Hibernate倾向于支持细致的(fine-grained)对象模"
+"型。"
 
-#: index.docbook:62
-msgid "The <literal>&lt;component&gt;</literal> element allows a <literal>&lt;parent&gt;</literal> subelement that maps a property of the component class as a reference back to the containing entity."
+#. Tag: para
+#: component_mapping.xml:62
+#, no-c-format
+msgid ""
+"The <literal>&lt;component&gt;</literal> element allows a <literal>&lt;"
+"parent&gt;</literal> subelement that maps a property of the component class "
+"as a reference back to the containing entity."
 msgstr ""
+"<literal>&lt;component&gt;</literal> 元素还允许有 <literal>&lt;parent&gt;</"
+"literal>子元素,用来表明component类中的一个属性是指向包含它的实体的引用。"
 
-#: index.docbook:68
+#. Tag: programlisting
+#: component_mapping.xml:68
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"eg.Person\" table=\"person\">\n"
-      "    <id name=\"Key\" column=\"pid\" type=\"string\">\n"
-      "        <generator class=\"uuid\"/>\n"
-      "    </id>\n"
-      "    <property name=\"birthday\" type=\"date\"/>\n"
-      "    <component name=\"Name\" class=\"eg.Name\" unique=\"true\">\n"
-      "        <parent name=\"namedPerson\"/> <!-- reference back to the Person -->\n"
-      "        <property name=\"initial\"/>\n"
-      "        <property name=\"first\"/>\n"
-      "        <property name=\"last\"/>\n"
-      "    </component>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"eg.Person\" table=\"person\">\n"
+"    <id name=\"Key\" column=\"pid\" type=\"string\">\n"
+"        <generator class=\"uuid\"/>\n"
+"    </id>\n"
+"    <property name=\"birthday\" type=\"date\"/>\n"
+"    <component name=\"Name\" class=\"eg.Name\" unique=\"true\">\n"
+"        <parent name=\"namedPerson\"/> <!-- reference back to the Person --"
+">\n"
+"        <property name=\"initial\"/>\n"
+"        <property name=\"first\"/>\n"
+"        <property name=\"last\"/>\n"
+"    </component>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:73
+#. Tag: title
+#: component_mapping.xml:73
+#, no-c-format
 msgid "Collections of dependent objects"
-msgstr ""
+msgstr "在集合中出现的依赖对象 (Collections of dependent objects)"
 
-#: index.docbook:75
-msgid "Collections of components are supported (eg. an array of type <literal>Name</literal>). Declare your component collection by replacing the <literal>&lt;element&gt;</literal> tag with a <literal>&lt;composite-element&gt;</literal> tag."
+#. Tag: para
+#: component_mapping.xml:75
+#, no-c-format
+msgid ""
+"Collections of components are supported (eg. an array of type <literal>Name</"
+"literal>). Declare your component collection by replacing the <literal>&lt;"
+"element&gt;</literal> tag with a <literal>&lt;composite-element&gt;</"
+"literal> tag."
 msgstr ""
+"Hibernate支持组件的集合(例如: 一个元素是姓名(Name)这种类型的数组)。 你可以使"
+"用<literal>&lt;composite-element&gt;</literal>标签替代<literal>&lt;"
+"element&gt;</literal>标签来定义你的组件集合。"
 
-#: index.docbook:82
+#. Tag: programlisting
+#: component_mapping.xml:82
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"someNames\" table=\"some_names\" lazy=\"true\">\n"
-      "    <key column=\"id\"/>\n"
-      "    <composite-element class=\"eg.Name\"> <!-- class attribute required -->\n"
-      "        <property name=\"initial\"/>\n"
-      "        <property name=\"first\"/>\n"
-      "        <property name=\"last\"/>\n"
-      "    </composite-element>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"someNames\" table=\"some_names\" lazy=\"true\">\n"
+"    <key column=\"id\"/>\n"
+"    <composite-element class=\"eg.Name\"> <!-- class attribute required -->\n"
+"        <property name=\"initial\"/>\n"
+"        <property name=\"first\"/>\n"
+"        <property name=\"last\"/>\n"
+"    </composite-element>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:84
-msgid "Note: if you define a <literal>Set</literal> of composite elements, it is very important to implement <literal>equals()</literal> and <literal>hashCode()</literal> correctly."
+#. Tag: para
+#: component_mapping.xml:84
+#, no-c-format
+msgid ""
+"Note: if you define a <literal>Set</literal> of composite elements, it is "
+"very important to implement <literal>equals()</literal> and <literal>hashCode"
+"()</literal> correctly."
 msgstr ""
+"注意,如果你定义的Set包含组合元素(composite-element),正确地实现"
+"<literal>equals()</literal>和<literal>hashCode()</literal>是非常重要的。"
 
-#: index.docbook:90
-msgid "Composite elements may contain components but not collections. If your composite element itself contains components, use the <literal>&lt;nested-composite-element&gt;</literal> tag. This is a pretty exotic case - a collection of components which themselves have components. By this stage you should be asking yourself if a one-to-many association is more appropriate. Try remodelling the composite element as an entity - but note that even though the Java model is the same, the relational model and persistence semantics are still slightly different."
+#. Tag: para
+#: component_mapping.xml:90
+#, no-c-format
+msgid ""
+"Composite elements may contain components but not collections. If your "
+"composite element itself contains components, use the <literal>&lt;nested-"
+"composite-element&gt;</literal> tag. This is a pretty exotic case - a "
+"collection of components which themselves have components. By this stage you "
+"should be asking yourself if a one-to-many association is more appropriate. "
+"Try remodelling the composite element as an entity - but note that even "
+"though the Java model is the same, the relational model and persistence "
+"semantics are still slightly different."
 msgstr ""
+"组合元素可以包含组件,但是不能包含集合。如果你的组合元素自身包含组件, 你必须"
+"使用<literal>&lt;nested-composite-element&gt;</literal>标签。这是一个相当特殊"
+"的案例 - 在一个组件的集合里,那些组件本身又可以包含其他的组件。这个时候你就应"
+"该考虑一下使用one-to-many关联是否会更恰当。 尝试对这个组合元素重新建模为一个"
+"实体-但是需要注意的是,虽然Java模型和重新建模前是一样的,关系模型和持久性语"
+"义会有细微的变化。"
 
-#: index.docbook:102
-msgid "Please note that a composite element mapping doesn't support null-able properties if you're using a <literal>&lt;set&gt;</literal>. Hibernate has to use each columns value to identify a record when deleting objects (there is no separate primary key column in the composite element table), which is not possible with null values. You have to either use only not-null properties in a composite-element or choose a <literal>&lt;list&gt;</literal>, <literal>&lt;map&gt;</literal>, <literal>&lt;bag&gt;</literal> or <literal>&lt;idbag&gt;</literal>."
+#. Tag: para
+#: component_mapping.xml:102
+#, no-c-format
+msgid ""
+"Please note that a composite element mapping doesn't support null-able "
+"properties if you're using a <literal>&lt;set&gt;</literal>. Hibernate has "
+"to use each columns value to identify a record when deleting objects (there "
+"is no separate primary key column in the composite element table), which is "
+"not possible with null values. You have to either use only not-null "
+"properties in a composite-element or choose a <literal>&lt;list&gt;</"
+"literal>, <literal>&lt;map&gt;</literal>, <literal>&lt;bag&gt;</literal> or "
+"<literal>&lt;idbag&gt;</literal>."
 msgstr ""
+"请注意如果你使用<literal>&lt;set&gt;</literal>标签,一个组合元素的映射不支持可"
+"能为空的属性. 当删除对象时, Hibernate必须使用每一个字段的值来确定一条记录(在"
+"组合元素表中,没有单独的关键字段), 如果有为null的字段,这样做就不可能了。你"
+"必须作出一个选择,要么在组合元素中使用不能为空的属性,要么选择使用"
+"<literal>&lt;list&gt;</literal>,<literal>&lt;map&gt;</literal>,<literal>&lt;"
+"bag&gt;</literal> 或者 <literal>&lt;idbag&gt;</literal>而不是 <literal>&lt;"
+"set&gt;</literal>。"
 
-#: index.docbook:113
-msgid "A special case of a composite element is a composite element with a nested <literal>&lt;many-to-one&gt;</literal> element. A mapping like this allows you to map extra columns of a many-to-many association table to the composite element class. The following is a many-to-many association from <literal>Order</literal> to <literal>Item</literal> where <literal>purchaseDate</literal>, <literal>price</literal> and <literal>quantity</literal> are properties of the association:"
+#. Tag: para
+#: component_mapping.xml:113
+#, no-c-format
+msgid ""
+"A special case of a composite element is a composite element with a nested "
+"<literal>&lt;many-to-one&gt;</literal> element. A mapping like this allows "
+"you to map extra columns of a many-to-many association table to the "
+"composite element class. The following is a many-to-many association from "
+"<literal>Order</literal> to <literal>Item</literal> where "
+"<literal>purchaseDate</literal>, <literal>price</literal> and "
+"<literal>quantity</literal> are properties of the association:"
 msgstr ""
+"组合元素有个特别的用法是它可以包含一个<literal>&lt;many-to-one&gt;</literal>"
+"元素。类似这样的映射允许你将一个many-to-many关联表映射为组合元素的集合。(A "
+"mapping like this allows you to map extra columns of a many-to-many "
+"association table to the composite element class.) 接下来的的例子是从"
+"<literal>Order</literal>到<literal>Item</literal>的一个多对多的关联关系, 关联"
+"属性是 <literal>purchaseDate</literal>, <literal>price</literal> 和 "
+"<literal>quantity</literal> 。"
 
-#: index.docbook:123
+#. Tag: programlisting
+#: component_mapping.xml:123
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"eg.Order\" .... >\n"
-      "    ....\n"
-      "    <set name=\"purchasedItems\" table=\"purchase_items\" lazy=\"true\">\n"
-      "        <key column=\"order_id\">\n"
-      "        <composite-element class=\"eg.Purchase\">\n"
-      "            <property name=\"purchaseDate\"/>\n"
-      "            <property name=\"price\"/>\n"
-      "            <property name=\"quantity\"/>\n"
-      "            <many-to-one name=\"item\" class=\"eg.Item\"/> <!-- class attribute is optional -->\n"
-      "        </composite-element>\n"
-      "    </set>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"eg.Order\" .... >\n"
+"    ....\n"
+"    <set name=\"purchasedItems\" table=\"purchase_items\" lazy=\"true\">\n"
+"        <key column=\"order_id\">\n"
+"        <composite-element class=\"eg.Purchase\">\n"
+"            <property name=\"purchaseDate\"/>\n"
+"            <property name=\"price\"/>\n"
+"            <property name=\"quantity\"/>\n"
+"            <many-to-one name=\"item\" class=\"eg.Item\"/> <!-- class "
+"attribute is optional -->\n"
+"        </composite-element>\n"
+"    </set>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:125
-msgid "Of course, there can't be a reference to the purchae on the other side, for bidirectional association navigation. Remember that components are value types and don't allow shared references. A single <literal>Purchase</literal> can be in the set of an <literal>Order</literal>, but it can't be referenced by the <literal>Item</literal> at the same time."
+#. Tag: para
+#: component_mapping.xml:125
+#, no-c-format
+msgid ""
+"Of course, there can't be a reference to the purchae on the other side, for "
+"bidirectional association navigation. Remember that components are value "
+"types and don't allow shared references. A single <literal>Purchase</"
+"literal> can be in the set of an <literal>Order</literal>, but it can't be "
+"referenced by the <literal>Item</literal> at the same time."
 msgstr ""
+"当然,当你定义Item时,你无法引用这些purchase,因此你无法实现双向关联查询。记"
+"住组件是值类型,并且不允许共享引用。某一个特定的<literal>Purchase</literal> "
+"可以放在<literal>Order</literal>的集合中,但它不能同时被<literal>Item</"
+"literal>所引用。"
 
-#: index.docbook:133
+#. Tag: para
+#: component_mapping.xml:133
+#, no-c-format
 msgid "Even ternary (or quaternary, etc) associations are possible:"
-msgstr ""
+msgstr "其实组合元素的这个用法可以扩展到三重或多重关联:"
 
-#: index.docbook:135
+#. Tag: programlisting
+#: component_mapping.xml:135
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"eg.Order\" .... >\n"
-      "    ....\n"
-      "    <set name=\"purchasedItems\" table=\"purchase_items\" lazy=\"true\">\n"
-      "        <key column=\"order_id\">\n"
-      "        <composite-element class=\"eg.OrderLine\">\n"
-      "            <many-to-one name=\"purchaseDetails class=\"eg.Purchase\"/>\n"
-      "            <many-to-one name=\"item\" class=\"eg.Item\"/>\n"
-      "        </composite-element>\n"
-      "    </set>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"eg.Order\" .... >\n"
+"    ....\n"
+"    <set name=\"purchasedItems\" table=\"purchase_items\" lazy=\"true\">\n"
+"        <key column=\"order_id\">\n"
+"        <composite-element class=\"eg.OrderLine\">\n"
+"            <many-to-one name=\"purchaseDetails class=\"eg.Purchase\"/>\n"
+"            <many-to-one name=\"item\" class=\"eg.Item\"/>\n"
+"        </composite-element>\n"
+"    </set>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:137
-msgid "Composite elements may appear in queries using the same syntax as associations to other entities."
-msgstr ""
+#. Tag: para
+#: component_mapping.xml:137
+#, no-c-format
+msgid ""
+"Composite elements may appear in queries using the same syntax as "
+"associations to other entities."
+msgstr "在查询中,表达组合元素的语法和关联到其他实体的语法是一样的。"
 
-#: index.docbook:145
+#. Tag: title
+#: component_mapping.xml:145
+#, no-c-format
 msgid "Components as Map indices"
-msgstr ""
+msgstr "组件作为Map的索引(Components as Map indices )"
 
-#: index.docbook:147
-msgid "The <literal>&lt;composite-map-key&gt;</literal> element lets you map a component class as the key of a <literal>Map</literal>. Make sure you override <literal>hashCode()</literal> and <literal>equals()</literal> correctly on the component class."
+#. Tag: para
+#: component_mapping.xml:147
+#, no-c-format
+msgid ""
+"The <literal>&lt;composite-map-key&gt;</literal> element lets you map a "
+"component class as the key of a <literal>Map</literal>. Make sure you "
+"override <literal>hashCode()</literal> and <literal>equals()</literal> "
+"correctly on the component class."
 msgstr ""
+"<literal>&lt;composite-map-key&gt;</literal>元素允许你映射一个组件类作为一个"
+"<literal>Map</literal>的key,前提是你必须正确的在这个类中重写了"
+"<literal>hashCode()</literal> 和 <literal>equals()</literal>方法。"
 
-#: index.docbook:156
+#. Tag: title
+#: component_mapping.xml:156
+#, no-c-format
 msgid "Components as composite identifiers"
-msgstr ""
+msgstr "组件作为联合标识符(Components as composite identifiers)"
 
-#: index.docbook:158
-msgid "You may use a component as an identifier of an entity class. Your component class must satisfy certain requirements:"
+#. Tag: para
+#: component_mapping.xml:158
+#, no-c-format
+msgid ""
+"You may use a component as an identifier of an entity class. Your component "
+"class must satisfy certain requirements:"
 msgstr ""
+"你可以使用一个组件作为一个实体类的标识符。 你的组件类必须满足以下要求:"
 
-#: index.docbook:165
+#. Tag: para
+#: component_mapping.xml:165
+#, no-c-format
 msgid "It must implement <literal>java.io.Serializable</literal>."
-msgstr ""
+msgstr "它必须实现<literal>java.io.Serializable</literal>接口"
 
-#: index.docbook:170
-msgid "It must re-implement <literal>equals()</literal> and <literal>hashCode()</literal>, consistently with the database's notion of composite key equality."
+#. Tag: para
+#: component_mapping.xml:170
+#, no-c-format
+msgid ""
+"It must re-implement <literal>equals()</literal> and <literal>hashCode()</"
+"literal>, consistently with the database's notion of composite key equality."
 msgstr ""
+"它必须重新实现<literal>equals()</literal>和<literal>hashCode()</literal>方"
+"法, 始终和组合关键字在数据库中的概念保持一致"
 
-#: index.docbook:179
-msgid "Note: in Hibernate3, the second requirement is not an absolutely hard requirement of Hibernate. But do it anyway."
+#. Tag: emphasis
+#: component_mapping.xml:179
+#, no-c-format
+msgid ""
+"Note: in Hibernate3, the second requirement is not an absolutely hard "
+"requirement of Hibernate. But do it anyway."
 msgstr ""
+"注意:在Hibernate3中,第二个要求并非是Hibernate强制必须的。但最好这样做。"
 
-#: index.docbook:183
-msgid "You can't use an <literal>IdentifierGenerator</literal> to generate composite keys. Instead the application must assign its own identifiers."
+#. Tag: para
+#: component_mapping.xml:183
+#, no-c-format
+msgid ""
+"You can't use an <literal>IdentifierGenerator</literal> to generate "
+"composite keys. Instead the application must assign its own identifiers."
 msgstr ""
+"你不能使用一个<literal>IdentifierGenerator</literal>产生组合关键字。一个应用"
+"程序必须分配它自己的标识符。"
 
-#: index.docbook:188
-msgid "Use the <literal>&lt;composite-id&gt;</literal> tag (with nested <literal>&lt;key-property&gt;</literal> elements) in place of the usual <literal>&lt;id&gt;</literal> declaration. For example, the <literal>OrderLine</literal> class has a primary key that depends upon the (composite) primary key of <literal>Order</literal>."
+#. Tag: para
+#: component_mapping.xml:188
+#, no-c-format
+msgid ""
+"Use the <literal>&lt;composite-id&gt;</literal> tag (with nested "
+"<literal>&lt;key-property&gt;</literal> elements) in place of the usual "
+"<literal>&lt;id&gt;</literal> declaration. For example, the "
+"<literal>OrderLine</literal> class has a primary key that depends upon the "
+"(composite) primary key of <literal>Order</literal>."
 msgstr ""
+"使用<literal>&lt;composite-id&gt;</literal> 标签(并且内嵌<literal>&lt;key-"
+"property&gt;</literal>元素)代替通常的<literal>&lt;id&gt;</literal>标签。比如,"
+"<literal>OrderLine</literal>类具有一个主键,这个主键依赖于<literal>Order</"
+"literal>的(联合)主键。"
 
-#: index.docbook:196
+#. Tag: programlisting
+#: component_mapping.xml:196
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"OrderLine\">\n"
-      "    \n"
-      "    <composite-id name=\"id\" class=\"OrderLineId\">\n"
-      "        <key-property name=\"lineId\"/>\n"
-      "        <key-property name=\"orderId\"/>\n"
-      "        <key-property name=\"customerId\"/>\n"
-      "    </composite-id>\n"
-      "    \n"
-      "    <property name=\"name\"/>\n"
-      "    \n"
-      "    <many-to-one name=\"order\" class=\"Order\"\n"
-      "            insert=\"false\" update=\"false\">\n"
-      "        <column name=\"orderId\"/>\n"
-      "        <column name=\"customerId\"/>\n"
-      "    </many-to-one>\n"
-      "    ....\n"
-      "    \n"
-      "</class>]]>"
+"<![CDATA[<class name=\"OrderLine\">\n"
+"    \n"
+"    <composite-id name=\"id\" class=\"OrderLineId\">\n"
+"        <key-property name=\"lineId\"/>\n"
+"        <key-property name=\"orderId\"/>\n"
+"        <key-property name=\"customerId\"/>\n"
+"    </composite-id>\n"
+"    \n"
+"    <property name=\"name\"/>\n"
+"    \n"
+"    <many-to-one name=\"order\" class=\"Order\"\n"
+"            insert=\"false\" update=\"false\">\n"
+"        <column name=\"orderId\"/>\n"
+"        <column name=\"customerId\"/>\n"
+"    </many-to-one>\n"
+"    ....\n"
+"    \n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:198
-msgid "Now, any foreign keys referencing the <literal>OrderLine</literal> table are also composite. You must declare this in your mappings for other classes. An association to <literal>OrderLine</literal> would be mapped like this:"
+#. Tag: para
+#: component_mapping.xml:198
+#, no-c-format
+msgid ""
+"Now, any foreign keys referencing the <literal>OrderLine</literal> table are "
+"also composite. You must declare this in your mappings for other classes. An "
+"association to <literal>OrderLine</literal> would be mapped like this:"
 msgstr ""
+"现在,任何指向<literal>OrderLine</literal>的外键都是复合的。在你的映射文件"
+"中,必须为其他类也这样声明。例如,一个指向<literal>OrderLine</literal>的关联"
+"可能被这样映射:"
 
-#: index.docbook:204
+#. Tag: programlisting
+#: component_mapping.xml:204
+#, no-c-format
 msgid ""
-      "<![CDATA[<many-to-one name=\"orderLine\" class=\"OrderLine\">\n"
-      "<!-- the \"class\" attribute is optional, as usual -->\n"
-      "    <column name=\"lineId\"/>\n"
-      "    <column name=\"orderId\"/>\n"
-      "    <column name=\"customerId\"/>\n"
-      "</many-to-one>]]>"
+"<![CDATA[<many-to-one name=\"orderLine\" class=\"OrderLine\">\n"
+"<!-- the \"class\" attribute is optional, as usual -->\n"
+"    <column name=\"lineId\"/>\n"
+"    <column name=\"orderId\"/>\n"
+"    <column name=\"customerId\"/>\n"
+"</many-to-one>]]>"
 msgstr ""
 
-#: index.docbook:206
-msgid "(Note that the <literal>&lt;column&gt;</literal> tag is an alternative to the <literal>column</literal> attribute everywhere.)"
+#. Tag: para
+#: component_mapping.xml:206
+#, no-c-format
+msgid ""
+"(Note that the <literal>&lt;column&gt;</literal> tag is an alternative to "
+"the <literal>column</literal> attribute everywhere.)"
 msgstr ""
+"(注意在各个地方<literal>&lt;column&gt;</literal>标签都是<literal>column</"
+"literal>属性的替代写法。)"
 
-#: index.docbook:211
-msgid "A <literal>many-to-many</literal> association to <literal>OrderLine</literal> also uses the composite foreign key:"
+#. Tag: para
+#: component_mapping.xml:211
+#, no-c-format
+msgid ""
+"A <literal>many-to-many</literal> association to <literal>OrderLine</"
+"literal> also uses the composite foreign key:"
 msgstr ""
+"指向<literal>OrderLine</literal>的<literal>多对多</literal>关联也使用联合外"
+"键:"
 
-#: index.docbook:216
+#. Tag: programlisting
+#: component_mapping.xml:216
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"undeliveredOrderLines\">\n"
-      "    <key column name=\"warehouseId\"/>\n"
-      "    <many-to-many class=\"OrderLine\">\n"
-      "        <column name=\"lineId\"/>\n"
-      "        <column name=\"orderId\"/>\n"
-      "        <column name=\"customerId\"/>\n"
-      "    </many-to-many>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"undeliveredOrderLines\">\n"
+"    <key column name=\"warehouseId\"/>\n"
+"    <many-to-many class=\"OrderLine\">\n"
+"        <column name=\"lineId\"/>\n"
+"        <column name=\"orderId\"/>\n"
+"        <column name=\"customerId\"/>\n"
+"    </many-to-many>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:218
-msgid "The collection of <literal>OrderLine</literal>s in <literal>Order</literal> would use:"
+#. Tag: para
+#: component_mapping.xml:218
+#, no-c-format
+msgid ""
+"The collection of <literal>OrderLine</literal>s in <literal>Order</literal> "
+"would use:"
 msgstr ""
+"在<literal>Order</literal>中,<literal>OrderLine</literal>的集合则是这样:"
 
-#: index.docbook:223
+#. Tag: programlisting
+#: component_mapping.xml:223
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"orderLines\" inverse=\"true\">\n"
-      "    <key>\n"
-      "        <column name=\"orderId\"/>\n"
-      "        <column name=\"customerId\"/>\n"
-      "    </key>\n"
-      "    <one-to-many class=\"OrderLine\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"orderLines\" inverse=\"true\">\n"
+"    <key>\n"
+"        <column name=\"orderId\"/>\n"
+"        <column name=\"customerId\"/>\n"
+"    </key>\n"
+"    <one-to-many class=\"OrderLine\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:225
-msgid "(The <literal>&lt;one-to-many&gt;</literal> element, as usual, declares no columns.)"
-msgstr ""
+#. Tag: para
+#: component_mapping.xml:225
+#, no-c-format
+msgid ""
+"(The <literal>&lt;one-to-many&gt;</literal> element, as usual, declares no "
+"columns.)"
+msgstr "(与通常一样,<literal>&lt;one-to-many&gt;</literal>元素不声明任何列.)"
 
-#: index.docbook:229
-msgid "If <literal>OrderLine</literal> itself owns a collection, it also has a composite foreign key."
-msgstr ""
+#. Tag: para
+#: component_mapping.xml:229
+#, no-c-format
+msgid ""
+"If <literal>OrderLine</literal> itself owns a collection, it also has a "
+"composite foreign key."
+msgstr "假若<literal>OrderLine</literal>本身拥有一个集合,它也具有组合外键。"
 
-#: index.docbook:234
+#. Tag: programlisting
+#: component_mapping.xml:234
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"OrderLine\">\n"
-      "    ....\n"
-      "    ....\n"
-      "    <list name=\"deliveryAttempts\">\n"
-      "        <key>   <!-- a collection inherits the composite key type -->\n"
-      "            <column name=\"lineId\"/>\n"
-      "            <column name=\"orderId\"/>\n"
-      "            <column name=\"customerId\"/>\n"
-      "        </key>\n"
-      "        <list-index column=\"attemptId\" base=\"1\"/>\n"
-      "        <composite-element class=\"DeliveryAttempt\">\n"
-      "            ...\n"
-      "        </composite-element>\n"
-      "    </set>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"OrderLine\">\n"
+"    ....\n"
+"    ....\n"
+"    <list name=\"deliveryAttempts\">\n"
+"        <key>   <!-- a collection inherits the composite key type -->\n"
+"            <column name=\"lineId\"/>\n"
+"            <column name=\"orderId\"/>\n"
+"            <column name=\"customerId\"/>\n"
+"        </key>\n"
+"        <list-index column=\"attemptId\" base=\"1\"/>\n"
+"        <composite-element class=\"DeliveryAttempt\">\n"
+"            ...\n"
+"        </composite-element>\n"
+"    </set>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:239
+#. Tag: title
+#: component_mapping.xml:239
+#, no-c-format
 msgid "Dynamic components"
-msgstr ""
+msgstr "动态组件 (Dynamic components)"
 
-#: index.docbook:241
+#. Tag: para
+#: component_mapping.xml:241
+#, no-c-format
 msgid "You may even map a property of type <literal>Map</literal>:"
-msgstr ""
+msgstr "你甚至可以映射<literal>Map</literal>类型的属性:"
 
-#: index.docbook:245
+#. Tag: programlisting
+#: component_mapping.xml:245
+#, no-c-format
 msgid ""
-      "<![CDATA[<dynamic-component name=\"userAttributes\">\n"
-      "    <property name=\"foo\" column=\"FOO\" type=\"string\"/>\n"
-      "    <property name=\"bar\" column=\"BAR\" type=\"integer\"/>\n"
-      "    <many-to-one name=\"baz\" class=\"Baz\" column=\"BAZ_ID\"/>\n"
-      "</dynamic-component>]]>"
+"<![CDATA[<dynamic-component name=\"userAttributes\">\n"
+"    <property name=\"foo\" column=\"FOO\" type=\"string\"/>\n"
+"    <property name=\"bar\" column=\"BAR\" type=\"integer\"/>\n"
+"    <many-to-one name=\"baz\" class=\"Baz\" column=\"BAZ_ID\"/>\n"
+"</dynamic-component>]]>"
 msgstr ""
 
-#: index.docbook:247
-msgid "The semantics of a <literal>&lt;dynamic-component&gt;</literal> mapping are identical to <literal>&lt;component&gt;</literal>. The advantage of this kind of mapping is the ability to determine the actual properties of the bean at deployment time, just by editing the mapping document. Runtime manipulation of the mapping document is also possible, using a DOM parser. Even better, you can access (and change) Hibernate's configuration-time metamodel via the <literal>Configuration</literal> object."
+#. Tag: para
+#: component_mapping.xml:247
+#, no-c-format
+msgid ""
+"The semantics of a <literal>&lt;dynamic-component&gt;</literal> mapping are "
+"identical to <literal>&lt;component&gt;</literal>. The advantage of this "
+"kind of mapping is the ability to determine the actual properties of the "
+"bean at deployment time, just by editing the mapping document. Runtime "
+"manipulation of the mapping document is also possible, using a DOM parser. "
+"Even better, you can access (and change) Hibernate's configuration-time "
+"metamodel via the <literal>Configuration</literal> object."
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+"从<literal>&lt;dynamic-component&gt;</literal>映射的语义上来讲,它和"
+"<literal>&lt;component&gt;</literal>是相同的。 这种映射类型的优点在于通过修改"
+"映射文件,就可以具有在部署时检测真实属性的能力。利用一个DOM解析器,也可以在程"
+"序运行时操作映射文件。 更好的是,你可以通过<literal>Configuration</literal>对"
+"象来访问(或者修改)Hibernate的运行时元模型。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/configuration.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/configuration.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/configuration.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,1489 +1,3731 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: configuration.xml:5
+#, no-c-format
 msgid "Configuration"
-msgstr ""
+msgstr "配置"
 
-#: index.docbook:7
-msgid "Because Hibernate is designed to operate in many different environments, there are a large number of configuration parameters. Fortunately, most have sensible default values and Hibernate is distributed with an example <literal>hibernate.properties</literal> file in <literal>etc/</literal> that shows the various options. Just put the example file in your classpath and customize it."
+#. Tag: para
+#: configuration.xml:7
+#, no-c-format
+msgid ""
+"Because Hibernate is designed to operate in many different environments, "
+"there are a large number of configuration parameters. Fortunately, most have "
+"sensible default values and Hibernate is distributed with an example "
+"<literal>hibernate.properties</literal> file in <literal>etc/</literal> that "
+"shows the various options. Just put the example file in your classpath and "
+"customize it."
 msgstr ""
+"由于Hibernate是为了能在各种不同环境下工作而设计的, 因此存在着大量的配置参数. "
+"幸运的是多数配置参数都 有比较直观的默认值, 并有随Hibernate一同分发的配置样例"
+"<literal>hibernate.properties</literal> (位于<literal>etc/</literal>)来展示各"
+"种配置选项. 所需做的仅仅是将这个样例文件复制到类路径 (classpath)下并做一些自"
+"定义的修改."
 
-#: index.docbook:16
+#. Tag: title
+#: configuration.xml:16
+#, no-c-format
 msgid "Programmatic configuration"
-msgstr ""
+msgstr "可编程的配置方式"
 
-#: index.docbook:18
-msgid "An instance of <literal>org.hibernate.cfg.Configuration</literal> represents an entire set of mappings of an application's Java types to an SQL database. The <literal>Configuration</literal> is used to build an (immutable) <literal>SessionFactory</literal>. The mappings are compiled from various XML mapping files."
+#. Tag: para
+#: configuration.xml:18
+#, no-c-format
+msgid ""
+"An instance of <literal>org.hibernate.cfg.Configuration</literal> represents "
+"an entire set of mappings of an application's Java types to an SQL database. "
+"The <literal>Configuration</literal> is used to build an (immutable) "
+"<literal>SessionFactory</literal>. The mappings are compiled from various "
+"XML mapping files."
 msgstr ""
+"一个<literal>org.hibernate.cfg.Configuration</literal>实例代表了一个应用程序"
+"中Java类型 到SQL数据库映射的完整集合. <literal>Configuration</literal>被用来"
+"构建一个(不可变的 (immutable))<literal>SessionFactory</literal>. 映射定义则由"
+"不同的XML映射定义文件编译而来."
 
-#: index.docbook:26
-msgid "You may obtain a <literal>Configuration</literal> instance by instantiating it directly and specifying XML mapping documents. If the mapping files are in the classpath, use <literal>addResource()</literal>:"
+#. Tag: para
+#: configuration.xml:26
+#, no-c-format
+msgid ""
+"You may obtain a <literal>Configuration</literal> instance by instantiating "
+"it directly and specifying XML mapping documents. If the mapping files are "
+"in the classpath, use <literal>addResource()</literal>:"
 msgstr ""
+"你可以直接实例化<literal>Configuration</literal>来获取一个实例,并为它指定XML"
+"映射定义 文件. 如果映射定 义文件在类路径(classpath)中, 请使用"
+"<literal>addResource()</literal>:"
 
-#: index.docbook:32
+#. Tag: programlisting
+#: configuration.xml:32
+#, no-c-format
 msgid ""
-      "<![CDATA[Configuration cfg = new Configuration()\n"
-      "    .addResource(\"Item.hbm.xml\")\n"
-      "    .addResource(\"Bid.hbm.xml\");]]>"
+"<![CDATA[Configuration cfg = new Configuration()\n"
+"    .addResource(\"Item.hbm.xml\")\n"
+"    .addResource(\"Bid.hbm.xml\");]]>"
 msgstr ""
 
-#: index.docbook:34
-msgid "An alternative (sometimes better) way is to specify the mapped class, and let Hibernate find the mapping document for you:"
+#. Tag: para
+#: configuration.xml:34
+#, no-c-format
+msgid ""
+"An alternative (sometimes better) way is to specify the mapped class, and "
+"let Hibernate find the mapping document for you:"
 msgstr ""
+"一个替代方法(有时是更好的选择)是,指定被映射的类,让Hibernate帮你寻找映射定"
+"义文件:"
 
-#: index.docbook:39
+#. Tag: programlisting
+#: configuration.xml:39
+#, no-c-format
 msgid ""
-      "<![CDATA[Configuration cfg = new Configuration()\n"
-      "    .addClass(org.hibernate.auction.Item.class)\n"
-      "    .addClass(org.hibernate.auction.Bid.class);]]>"
+"<![CDATA[Configuration cfg = new Configuration()\n"
+"    .addClass(org.hibernate.auction.Item.class)\n"
+"    .addClass(org.hibernate.auction.Bid.class);]]>"
 msgstr ""
 
-#: index.docbook:41
-msgid "Then Hibernate will look for mapping files named <literal>/org/hibernate/auction/Item.hbm.xml</literal> and <literal>/org/hibernate/auction/Bid.hbm.xml</literal> in the classpath. This approach eliminates any hardcoded filenames."
+#. Tag: para
+#: configuration.xml:41
+#, no-c-format
+msgid ""
+"Then Hibernate will look for mapping files named <literal>/org/hibernate/"
+"auction/Item.hbm.xml</literal> and <literal>/org/hibernate/auction/Bid.hbm."
+"xml</literal> in the classpath. This approach eliminates any hardcoded "
+"filenames."
 msgstr ""
+"Hibernate将会在类路径(classpath)中寻找名字为 <literal>/org/hibernate/auction/"
+"Item.hbm.xml</literal>和 <literal>/org/hibernate/auction/Bid.hbm.xml</"
+"literal>映射定义文件. 这种方式消除了任何对文件名的硬编码(hardcoded)."
 
-#: index.docbook:48
-msgid "A <literal>Configuration</literal> also allows you to specify configuration properties:"
-msgstr ""
+#. Tag: para
+#: configuration.xml:48
+#, no-c-format
+msgid ""
+"A <literal>Configuration</literal> also allows you to specify configuration "
+"properties:"
+msgstr "<literal>Configuration</literal>也允许你指定配置属性:"
 
-#: index.docbook:53
+#. Tag: programlisting
+#: configuration.xml:53
+#, no-c-format
 msgid ""
-      "<![CDATA[Configuration cfg = new Configuration()\n"
-      "    .addClass(org.hibernate.auction.Item.class)\n"
-      "    .addClass(org.hibernate.auction.Bid.class)\n"
-      "    .setProperty(\"hibernate.dialect\", \"org.hibernate.dialect.MySQLInnoDBDialect\")\n"
-      "    .setProperty(\"hibernate.connection.datasource\", \"java:comp/env/jdbc/test\")\n"
-      "    .setProperty(\"hibernate.order_updates\", \"true\");]]>"
+"<![CDATA[Configuration cfg = new Configuration()\n"
+"    .addClass(org.hibernate.auction.Item.class)\n"
+"    .addClass(org.hibernate.auction.Bid.class)\n"
+"    .setProperty(\"hibernate.dialect\", \"org.hibernate.dialect."
+"MySQLInnoDBDialect\")\n"
+"    .setProperty(\"hibernate.connection.datasource\", \"java:comp/env/jdbc/"
+"test\")\n"
+"    .setProperty(\"hibernate.order_updates\", \"true\");]]>"
 msgstr ""
 
-#: index.docbook:55
-msgid "This is not the only way to pass configuration properties to Hibernate. The various options include:"
-msgstr ""
+#. Tag: para
+#: configuration.xml:55
+#, no-c-format
+msgid ""
+"This is not the only way to pass configuration properties to Hibernate. The "
+"various options include:"
+msgstr "当然这不是唯一的传递Hibernate配置属性的方式, 其他可选方式还包括:"
 
-#: index.docbook:62
-msgid "Pass an instance of <literal>java.util.Properties</literal> to <literal>Configuration.setProperties()</literal>."
+#. Tag: para
+#: configuration.xml:62
+#, no-c-format
+msgid ""
+"Pass an instance of <literal>java.util.Properties</literal> to "
+"<literal>Configuration.setProperties()</literal>."
 msgstr ""
+"传一个<literal>java.util.Properties</literal>实例给 <literal>Configuration."
+"setProperties()</literal>."
 
-#: index.docbook:68
-msgid "Place <literal>hibernate.properties</literal> in a root directory of the classpath."
+#. Tag: para
+#: configuration.xml:68
+#, no-c-format
+msgid ""
+"Place <literal>hibernate.properties</literal> in a root directory of the "
+"classpath."
 msgstr ""
+"将<literal>hibernate.properties</literal>放置在类路径(classpath)的根目录下 "
+"(root directory)."
 
-#: index.docbook:74
-msgid "Set <literal>System</literal> properties using <literal>java -Dproperty=value</literal>."
+#. Tag: para
+#: configuration.xml:74
+#, no-c-format
+msgid ""
+"Set <literal>System</literal> properties using <literal>java -"
+"Dproperty=value</literal>."
 msgstr ""
+"通过<literal>java -Dproperty=value</literal>来设置系统 (<literal>System</"
+"literal>)属性."
 
-#: index.docbook:80
-msgid "Include <literal>&lt;property&gt;</literal> elements in <literal>hibernate.cfg.xml</literal> (discussed later)."
+#. Tag: para
+#: configuration.xml:80
+#, no-c-format
+msgid ""
+"Include <literal>&lt;property&gt;</literal> elements in <literal>hibernate."
+"cfg.xml</literal> (discussed later)."
 msgstr ""
+"在<literal>hibernate.cfg.xml</literal>中加入元素 <literal>&lt;property&gt;</"
+"literal> (稍后讨论)."
 
-#: index.docbook:87
-msgid "<literal>hibernate.properties</literal> is the easiest approach if you want to get started quickly."
+#. Tag: para
+#: configuration.xml:87
+#, no-c-format
+msgid ""
+"<literal>hibernate.properties</literal> is the easiest approach if you want "
+"to get started quickly."
 msgstr ""
+"如果想尽快体验Hibernate, <literal>hibernate.properties</literal>是最简单的方"
+"式."
 
-#: index.docbook:92
-msgid "The <literal>Configuration</literal> is intended as a startup-time object, to be discarded once a <literal>SessionFactory</literal> is created."
+#. Tag: para
+#: configuration.xml:92
+#, no-c-format
+msgid ""
+"The <literal>Configuration</literal> is intended as a startup-time object, "
+"to be discarded once a <literal>SessionFactory</literal> is created."
 msgstr ""
+"<literal>Configuration</literal>实例被设计成启动期间(startup-time)对象, 一"
+"旦<literal>SessionFactory</literal>创建完成它就被丢弃了."
 
-#: index.docbook:100
+#. Tag: title
+#: configuration.xml:100
+#, no-c-format
 msgid "Obtaining a SessionFactory"
-msgstr ""
+msgstr "获得SessionFactory"
 
-#: index.docbook:102
-msgid "When all mappings have been parsed by the <literal>Configuration</literal>, the application must obtain a factory for <literal>Session</literal> instances. This factory is intended to be shared by all application threads:"
+#. Tag: para
+#: configuration.xml:102
+#, no-c-format
+msgid ""
+"When all mappings have been parsed by the <literal>Configuration</literal>, "
+"the application must obtain a factory for <literal>Session</literal> "
+"instances. This factory is intended to be shared by all application threads:"
 msgstr ""
+"当所有映射定义被<literal>Configuration</literal>解析后, 应用程序必须获得一个"
+"用于构造<literal>Session</literal>实例的工厂. 这个工厂将被应用程序的所有线程"
+"共享:"
 
-#: index.docbook:108
+#. Tag: programlisting
+#: configuration.xml:108
+#, no-c-format
 msgid "<![CDATA[SessionFactory sessions = cfg.buildSessionFactory();]]>"
 msgstr ""
 
-#: index.docbook:110
-msgid "Hibernate does allow your application to instantiate more than one <literal>SessionFactory</literal>. This is useful if you are using more than one database."
+#. Tag: para
+#: configuration.xml:110
+#, no-c-format
+msgid ""
+"Hibernate does allow your application to instantiate more than one "
+"<literal>SessionFactory</literal>. This is useful if you are using more than "
+"one database."
 msgstr ""
+"Hibernate允许你的应用程序创建多个<literal>SessionFactory</literal>实例. 这对 "
+"使用多个数据库的应用来说很有用."
 
-#: index.docbook:119
+#. Tag: title
+#: configuration.xml:119
+#, no-c-format
 msgid "JDBC connections"
-msgstr ""
+msgstr "JDBC连接"
 
-#: index.docbook:121
-msgid "Usually, you want to have the <literal>SessionFactory</literal> create and pool JDBC connections for you. If you take this approach, opening a <literal>Session</literal> is as simple as:"
+#. Tag: para
+#: configuration.xml:121
+#, no-c-format
+msgid ""
+"Usually, you want to have the <literal>SessionFactory</literal> create and "
+"pool JDBC connections for you. If you take this approach, opening a "
+"<literal>Session</literal> is as simple as:"
 msgstr ""
+"通常你希望<literal>SessionFactory</literal>来为你创建和缓存(pool)JDBC连接. 如"
+"果你采用这种方式, 只需要如下例所示那样,打开一个<literal>Session</literal>:"
 
-#: index.docbook:127
-msgid "<![CDATA[Session session = sessions.openSession(); // open a new Session]]>"
+#. Tag: programlisting
+#: configuration.xml:127
+#, no-c-format
+msgid ""
+"<![CDATA[Session session = sessions.openSession(); // open a new Session]]>"
 msgstr ""
 
-#: index.docbook:129
-msgid "As soon as you do something that requires access to the database, a JDBC connection will be obtained from the pool."
+#. Tag: para
+#: configuration.xml:129
+#, no-c-format
+msgid ""
+"As soon as you do something that requires access to the database, a JDBC "
+"connection will be obtained from the pool."
 msgstr ""
+"一旦你需要进行数据访问时, 就会从连接池(connection pool)获得一个JDBC连接."
 
-#: index.docbook:134
-msgid "For this to work, we need to pass some JDBC connection properties to Hibernate. All Hibernate property names and semantics are defined on the class <literal>org.hibernate.cfg.Environment</literal>. We will now describe the most important settings for JDBC connection configuration."
+#. Tag: para
+#: configuration.xml:134
+#, no-c-format
+msgid ""
+"For this to work, we need to pass some JDBC connection properties to "
+"Hibernate. All Hibernate property names and semantics are defined on the "
+"class <literal>org.hibernate.cfg.Environment</literal>. We will now describe "
+"the most important settings for JDBC connection configuration."
 msgstr ""
+"为了使这种方式工作起来, 我们需要向Hibernate传递一些JDBC连接的属性. 所有"
+"Hibernate属性的名字和语义都在<literal>org.hibernate.cfg.Environment</literal>"
+"中定义. 我们现在将描述JDBC连接配置中最重要的设置."
 
-#: index.docbook:141
-msgid "Hibernate will obtain (and pool) connections using <literal>java.sql.DriverManager</literal> if you set the following properties:"
+#. Tag: para
+#: configuration.xml:141
+#, no-c-format
+msgid ""
+"Hibernate will obtain (and pool) connections using <literal>java.sql."
+"DriverManager</literal> if you set the following properties:"
 msgstr ""
+"如果你设置如下属性,Hibernate将使用<literal>java.sql.DriverManager</literal>"
+"来获得(和缓存)JDBC连接 :"
 
-#: index.docbook:147
+#. Tag: title
+#: configuration.xml:147
+#, no-c-format
 msgid "Hibernate JDBC Properties"
-msgstr ""
+msgstr "Hibernate JDBC属性"
 
-#: index.docbook:153, index.docbook:241, index.docbook:338, index.docbook:529, index.docbook:725, index.docbook:832, index.docbook:920
+#. Tag: entry
+#: configuration.xml:153 configuration.xml:241 configuration.xml:338
+#: configuration.xml:529 configuration.xml:725 configuration.xml:832
+#: configuration.xml:920
+#, no-c-format
 msgid "Property name"
-msgstr ""
+msgstr "属性名"
 
-#: index.docbook:154, index.docbook:242, index.docbook:339, index.docbook:530, index.docbook:726, index.docbook:833, index.docbook:921
+#. Tag: entry
+#: configuration.xml:154 configuration.xml:242 configuration.xml:339
+#: configuration.xml:530 configuration.xml:726 configuration.xml:833
+#: configuration.xml:921
+#, no-c-format
 msgid "Purpose"
-msgstr ""
+msgstr "用途"
 
-#: index.docbook:160
+#. Tag: literal
+#: configuration.xml:160
+#, no-c-format
 msgid "hibernate.connection.driver_class"
-msgstr ""
+msgstr "hibernate.connection.driver_class"
 
-#: index.docbook:163
+#. Tag: emphasis
+#: configuration.xml:163
+#, no-c-format
 msgid "JDBC driver class"
-msgstr ""
+msgstr "jdbc驱动类"
 
-#: index.docbook:168
+#. Tag: literal
+#: configuration.xml:168
+#, no-c-format
 msgid "hibernate.connection.url"
-msgstr ""
+msgstr "hibernate.connection.url"
 
-#: index.docbook:171
+#. Tag: emphasis
+#: configuration.xml:171
+#, no-c-format
 msgid "JDBC URL"
-msgstr ""
+msgstr "jdbc URL"
 
-#: index.docbook:176, index.docbook:272
+#. Tag: literal
+#: configuration.xml:176 configuration.xml:272
+#, no-c-format
 msgid "hibernate.connection.username"
-msgstr ""
+msgstr "hibernate.connection.username"
 
-#: index.docbook:179
+#. Tag: emphasis
+#: configuration.xml:179
+#, no-c-format
 msgid "database user"
-msgstr ""
+msgstr "数据库用户"
 
-#: index.docbook:184, index.docbook:280
+#. Tag: literal
+#: configuration.xml:184 configuration.xml:280
+#, no-c-format
 msgid "hibernate.connection.password"
-msgstr ""
+msgstr "hibernate.connection.password"
 
-#: index.docbook:187
+#. Tag: emphasis
+#: configuration.xml:187
+#, no-c-format
 msgid "database user password"
-msgstr ""
+msgstr "数据库用户密码"
 
-#: index.docbook:192
+#. Tag: literal
+#: configuration.xml:192
+#, no-c-format
 msgid "hibernate.connection.pool_size"
-msgstr ""
+msgstr "hibernate.connection.pool_size"
 
-#: index.docbook:195
+#. Tag: emphasis
+#: configuration.xml:195
+#, no-c-format
 msgid "maximum number of pooled connections"
-msgstr ""
+msgstr "连接池容量上限数目"
 
-#: index.docbook:202
-msgid "Hibernate's own connection pooling algorithm is however quite rudimentary. It is intended to help you get started and is <emphasis>not intended for use in a production system</emphasis> or even for performance testing. You should use a third party pool for best performance and stability. Just replace the <literal>hibernate.connection.pool_size</literal> property with connection pool specific settings. This will turn off Hibernate's internal pool. For example, you might like to use C3P0."
+#. Tag: para
+#: configuration.xml:202
+#, no-c-format
+msgid ""
+"Hibernate's own connection pooling algorithm is however quite rudimentary. "
+"It is intended to help you get started and is <emphasis>not intended for use "
+"in a production system</emphasis> or even for performance testing. You "
+"should use a third party pool for best performance and stability. Just "
+"replace the <literal>hibernate.connection.pool_size</literal> property with "
+"connection pool specific settings. This will turn off Hibernate's internal "
+"pool. For example, you might like to use C3P0."
 msgstr ""
+"但Hibernate自带的连接池算法相当不成熟. 它只是为了让你快些上手<emphasis>,并不"
+"适合用于产品系统</emphasis>或性能测试中。 出于最佳性能和稳定性考虑你应该使用"
+"第三方的连接池。只需要用特定连接池的设置替换 <literal>hibernate.connection."
+"pool_size</literal>即可。这将关闭Hibernate自带的连接池. 例如, 你可能会想用"
+"C3P0."
 
-#: index.docbook:212
-msgid "C3P0 is an open source JDBC connection pool distributed along with Hibernate in the <literal>lib</literal> directory. Hibernate will use its <literal>C3P0ConnectionProvider</literal> for connection pooling if you set <literal>hibernate.c3p0.*</literal> properties. If you'd like to use Proxool refer to the packaged <literal>hibernate.properties</literal> and the Hibernate web site for more information."
+#. Tag: para
+#: configuration.xml:212
+#, no-c-format
+msgid ""
+"C3P0 is an open source JDBC connection pool distributed along with Hibernate "
+"in the <literal>lib</literal> directory. Hibernate will use its "
+"<literal>C3P0ConnectionProvider</literal> for connection pooling if you set "
+"<literal>hibernate.c3p0.*</literal> properties. If you'd like to use Proxool "
+"refer to the packaged <literal>hibernate.properties</literal> and the "
+"Hibernate web site for more information."
 msgstr ""
+"C3P0是一个随Hibernate一同分发的开源的JDBC连接池, 它位于<literal>lib</literal>"
+"目录下。 如果你设置了<literal>hibernate.c3p0.*</literal>相关的属性, Hibernate"
+"将使用 <literal>C3P0ConnectionProvider</literal>来缓存JDBC连接. 如果你更原意"
+"使用Proxool, 请参考发 行包中的<literal>hibernate.properties</literal>并到"
+"Hibernate网站获取更多的信息."
 
-#: index.docbook:221
-msgid "Here is an example <literal>hibernate.properties</literal> file for C3P0:"
-msgstr ""
+#. Tag: para
+#: configuration.xml:221
+#, no-c-format
+msgid ""
+"Here is an example <literal>hibernate.properties</literal> file for C3P0:"
+msgstr "这是一个使用C3P0的<literal>hibernate.properties</literal>样例文件:"
 
-#: index.docbook:225
+#. Tag: programlisting
+#: configuration.xml:225
+#, no-c-format
 msgid ""
-      "<![CDATA[hibernate.connection.driver_class = org.postgresql.Driver\n"
-      "hibernate.connection.url = jdbc:postgresql://localhost/mydatabase\n"
-      "hibernate.connection.username = myuser\n"
-      "hibernate.connection.password = secret\n"
-      "hibernate.c3p0.min_size=5\n"
-      "hibernate.c3p0.max_size=20\n"
-      "hibernate.c3p0.timeout=1800\n"
-      "hibernate.c3p0.max_statements=50\n"
-      "hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]>"
+"<![CDATA[hibernate.connection.driver_class = org.postgresql.Driver\n"
+"hibernate.connection.url = jdbc:postgresql://localhost/mydatabase\n"
+"hibernate.connection.username = myuser\n"
+"hibernate.connection.password = secret\n"
+"hibernate.c3p0.min_size=5\n"
+"hibernate.c3p0.max_size=20\n"
+"hibernate.c3p0.timeout=1800\n"
+"hibernate.c3p0.max_statements=50\n"
+"hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]>"
 msgstr ""
 
-#: index.docbook:227
-msgid "For use inside an application server, you should almost always configure Hibernate to obtain connections from an application server <literal>Datasource</literal> registered in JNDI. You'll need to set at least one of the following properties:"
+#. Tag: para
+#: configuration.xml:227
+#, no-c-format
+msgid ""
+"For use inside an application server, you should almost always configure "
+"Hibernate to obtain connections from an application server "
+"<literal>Datasource</literal> registered in JNDI. You'll need to set at "
+"least one of the following properties:"
 msgstr ""
+"为了能在应用程序服务器(application server)中使用Hibernate, 应当总是将"
+"Hibernate 配置成从注册在JNDI中的<literal>Datasource</literal>处获得连接,你至"
+"少需要设置下列属性中的一个:"
 
-#: index.docbook:235
+#. Tag: title
+#: configuration.xml:235
+#, no-c-format
 msgid "Hibernate Datasource Properties"
-msgstr ""
+msgstr "Hibernate数据源属性"
 
-#: index.docbook:248
+#. Tag: literal
+#: configuration.xml:248
+#, no-c-format
 msgid "hibernate.connection.datasource"
-msgstr ""
+msgstr "hibernate.connection.datasource"
 
-#: index.docbook:251
+#. Tag: emphasis
+#: configuration.xml:251
+#, no-c-format
 msgid "datasource JNDI name"
-msgstr ""
+msgstr "数据源JNDI名字"
 
-#: index.docbook:256
+#. Tag: literal
+#: configuration.xml:256
+#, no-c-format
 msgid "hibernate.jndi.url"
-msgstr ""
+msgstr "hibernate.jndi.url"
 
-#: index.docbook:258
+#. Tag: entry
+#: configuration.xml:258
+#, fuzzy, no-c-format
 msgid "<emphasis>URL of the JNDI provider</emphasis> (optional)"
-msgstr ""
+msgstr "JNDI提供者的URL"
 
-#: index.docbook:264
+#. Tag: literal
+#: configuration.xml:264
+#, no-c-format
 msgid "hibernate.jndi.class"
-msgstr ""
+msgstr "hibernate.jndi.class"
 
-#: index.docbook:266
-msgid "<emphasis>class of the JNDI <literal>InitialContextFactory</literal></emphasis> (optional)"
+#. Tag: entry
+#: configuration.xml:266
+#, no-c-format
+msgid ""
+"<emphasis>class of the JNDI <literal>InitialContextFactory</literal></"
+"emphasis> (optional)"
 msgstr ""
 
-#: index.docbook:274
+#. Tag: entry
+#: configuration.xml:274
+#, no-c-format
 msgid "<emphasis>database user</emphasis> (optional)"
 msgstr ""
 
-#: index.docbook:282
+#. Tag: entry
+#: configuration.xml:282
+#, no-c-format
 msgid "<emphasis>database user password</emphasis> (optional)"
 msgstr ""
 
-#: index.docbook:290
-msgid "Here's an example <literal>hibernate.properties</literal> file for an application server provided JNDI datasource:"
+#. Tag: para
+#: configuration.xml:290
+#, no-c-format
+msgid ""
+"Here's an example <literal>hibernate.properties</literal> file for an "
+"application server provided JNDI datasource:"
 msgstr ""
+"这是一个使用应用程序服务器提供的JNDI数据源的<literal>hibernate.properties</"
+"literal>样例文件:"
 
-#: index.docbook:295
+#. Tag: programlisting
+#: configuration.xml:295
+#, no-c-format
 msgid ""
-      "<![CDATA[hibernate.connection.datasource = java:/comp/env/jdbc/test\n"
-      "hibernate.transaction.factory_class = \\\n"
-      "    org.hibernate.transaction.JTATransactionFactory\n"
-      "hibernate.transaction.manager_lookup_class = \\\n"
-      "    org.hibernate.transaction.JBossTransactionManagerLookup\n"
-      "hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]>"
+"<![CDATA[hibernate.connection.datasource = java:/comp/env/jdbc/test\n"
+"hibernate.transaction.factory_class = \\\n"
+"    org.hibernate.transaction.JTATransactionFactory\n"
+"hibernate.transaction.manager_lookup_class = \\\n"
+"    org.hibernate.transaction.JBossTransactionManagerLookup\n"
+"hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]>"
 msgstr ""
 
-#: index.docbook:297
-msgid "JDBC connections obtained from a JNDI datasource will automatically participate in the container-managed transactions of the application server."
+#. Tag: para
+#: configuration.xml:297
+#, no-c-format
+msgid ""
+"JDBC connections obtained from a JNDI datasource will automatically "
+"participate in the container-managed transactions of the application server."
 msgstr ""
+"从JNDI数据源获得的JDBC连接将自动参与到应用程序服务器中容器管理的事务"
+"(container-managed transactions)中去."
 
-#: index.docbook:302
-msgid "Arbitrary connection properties may be given by prepending \"<literal>hibernate.connection</literal>\" to the property name. For example, you may specify a <literal>charSet</literal> using <literal>hibernate.connection.charSet</literal>."
+#. Tag: para
+#: configuration.xml:302
+#, no-c-format
+msgid ""
+"Arbitrary connection properties may be given by prepending "
+"\"<literal>hibernate.connection</literal>\" to the property name. For "
+"example, you may specify a <literal>charSet</literal> using "
+"<literal>hibernate.connection.charSet</literal>."
 msgstr ""
+"任何连接(connection)属性的属性名都要以\"<literal>hibernate.connnection</"
+"literal>\"开头. 例如, 你可能会使用<literal>hibernate.connection.charSet</"
+"literal>来指定字符集<literal>charSet</literal>."
 
-#: index.docbook:308
-msgid "You may define your own plugin strategy for obtaining JDBC connections by implementing the interface <literal>org.hibernate.connection.ConnectionProvider</literal>. You may select a custom implementation by setting <literal>hibernate.connection.provider_class</literal>."
+#. Tag: para
+#: configuration.xml:308
+#, no-c-format
+msgid ""
+"You may define your own plugin strategy for obtaining JDBC connections by "
+"implementing the interface <literal>org.hibernate.connection."
+"ConnectionProvider</literal>. You may select a custom implementation by "
+"setting <literal>hibernate.connection.provider_class</literal>."
 msgstr ""
+"通过实现<literal>org.hibernate.connection.ConnectionProvider</literal>接口,"
+"你可以定义属于 你自己的获得JDBC连接的插件策略。通过设置<literal>hibernate."
+"connection.provider_class</literal>, 你可以选择一个自定义的实现."
 
-#: index.docbook:317
+#. Tag: title
+#: configuration.xml:317
+#, no-c-format
 msgid "Optional configuration properties"
-msgstr ""
+msgstr "可选的配置属性"
 
-#: index.docbook:319
-msgid "There are a number of other properties that control the behaviour of Hibernate at runtime. All are optional and have reasonable default values."
+#. Tag: para
+#: configuration.xml:319
+#, no-c-format
+msgid ""
+"There are a number of other properties that control the behaviour of "
+"Hibernate at runtime. All are optional and have reasonable default values."
 msgstr ""
+"有大量属性能用来控制Hibernate在运行期的行为. 它们都是可选的, 并拥有适当的默认"
+"值."
 
-#: index.docbook:324
-msgid "<emphasis>Warning: some of these properties are \"system-level\" only.</emphasis> System-level properties can be set only via <literal>java -Dproperty=value</literal> or <literal>hibernate.properties</literal>. They may <emphasis>not</emphasis> be set by the other techniques described above."
+#. Tag: para
+#: configuration.xml:324
+#, no-c-format
+msgid ""
+"<emphasis>Warning: some of these properties are \"system-level\" only.</"
+"emphasis> System-level properties can be set only via <literal>java -"
+"Dproperty=value</literal> or <literal>hibernate.properties</literal>. They "
+"may <emphasis>not</emphasis> be set by the other techniques described above."
 msgstr ""
+"<emphasis>警告: 其中一些属性是\"系统级(system-level)的\".</emphasis> 系统级属"
+"性只能通过<literal>java -Dproperty=value</literal>或 <literal>hibernate."
+"properties</literal>来设置, 而<emphasis>不能</emphasis>用上面描述的其他方法来"
+"设置."
 
-#: index.docbook:332
+#. Tag: title
+#: configuration.xml:332
+#, no-c-format
 msgid "Hibernate Configuration Properties"
-msgstr ""
+msgstr "Hibernate配置属性"
 
-#: index.docbook:345
+#. Tag: literal
+#: configuration.xml:345
+#, no-c-format
 msgid "hibernate.dialect"
-msgstr ""
+msgstr "hibernate.dialect"
 
-#: index.docbook:347
-msgid "The classname of a Hibernate <literal>Dialect</literal> which allows Hibernate to generate SQL optimized for a particular relational database."
+#. Tag: entry
+#: configuration.xml:347
+#, fuzzy, no-c-format
+msgid ""
+"The classname of a Hibernate <literal>Dialect</literal> which allows "
+"Hibernate to generate SQL optimized for a particular relational database."
 msgstr ""
+"一个Hibernate <placeholder-1/>类名允许Hibernate针对特定的关系数据库生成优化的"
+"SQL. <placeholder-2/>"
 
-#: index.docbook:351
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>full.classname.of.Dialect</literal>"
+#. Tag: para
+#: configuration.xml:351
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>full.classname.of.Dialect</"
+"literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:359
+#. Tag: literal
+#: configuration.xml:359
+#, no-c-format
 msgid "hibernate.show_sql"
-msgstr ""
+msgstr "hibernate.show_sql"
 
-#: index.docbook:361
-msgid "Write all SQL statements to console. This is an alternative to setting the log category <literal>org.hibernate.SQL</literal> to <literal>debug</literal>."
+#. Tag: entry
+#: configuration.xml:361
+#, fuzzy, no-c-format
+msgid ""
+"Write all SQL statements to console. This is an alternative to setting the "
+"log category <literal>org.hibernate.SQL</literal> to <literal>debug</"
+"literal>."
 msgstr ""
+"输出所有SQL语句到控制台. 有一个另外的选择是把<placeholder-1/>这个log category"
+"设为<placeholder-2/>。 <placeholder-3/>"
 
-#: index.docbook:365, index.docbook:377, index.docbook:471, index.docbook:484, index.docbook:497, index.docbook:510, index.docbook:564, index.docbook:591, index.docbook:605, index.docbook:660, index.docbook:888, index.docbook:903, index.docbook:993
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>true</literal> | <literal>false</literal>"
+#. Tag: para
+#: configuration.xml:365 configuration.xml:377 configuration.xml:471
+#: configuration.xml:484 configuration.xml:497 configuration.xml:510
+#: configuration.xml:564 configuration.xml:591 configuration.xml:605
+#: configuration.xml:660 configuration.xml:888 configuration.xml:903
+#: configuration.xml:993
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>true</literal> | "
+"<literal>false</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:373
+#. Tag: literal
+#: configuration.xml:373
+#, no-c-format
 msgid "hibernate.format_sql"
-msgstr ""
+msgstr "hibernate.format_sql"
 
-#: index.docbook:375
+#. Tag: entry
+#: configuration.xml:375
+#, fuzzy, no-c-format
 msgid "Pretty print the SQL in the log and console."
-msgstr ""
+msgstr "在log和console中打印出更漂亮的SQL。 <placeholder-1/>"
 
-#: index.docbook:385
+#. Tag: literal
+#: configuration.xml:385
+#, no-c-format
 msgid "hibernate.default_schema"
-msgstr ""
+msgstr "hibernate.default_schema"
 
-#: index.docbook:387
-msgid "Qualify unqualified table names with the given schema/tablespace in generated SQL."
+#. Tag: entry
+#: configuration.xml:387
+#, fuzzy, no-c-format
+msgid ""
+"Qualify unqualified table names with the given schema/tablespace in "
+"generated SQL."
 msgstr ""
+"在生成的SQL中, 将给定的schema/tablespace附加于非全限定名的表名上. "
+"<placeholder-1/>"
 
-#: index.docbook:390
+#. Tag: para
+#: configuration.xml:390
+#, fuzzy, no-c-format
 msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>SCHEMA_NAME</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:398
+#. Tag: literal
+#: configuration.xml:398
+#, no-c-format
 msgid "hibernate.default_catalog"
-msgstr ""
+msgstr "hibernate.default_catalog"
 
-#: index.docbook:400
-msgid "Qualify unqualified table names with the given catalog in generated SQL."
+#. Tag: entry
+#: configuration.xml:400
+#, fuzzy, no-c-format
+msgid ""
+"Qualify unqualified table names with the given catalog in generated SQL."
 msgstr ""
+"在生成的SQL中, 将给定的catalog附加于非全限定名的表名上. <placeholder-1/>"
 
-#: index.docbook:403
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>CATALOG_NAME</literal>"
+#. Tag: para
+#: configuration.xml:403
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>CATALOG_NAME</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:411
+#. Tag: literal
+#: configuration.xml:411
+#, no-c-format
 msgid "hibernate.session_factory_name"
-msgstr ""
+msgstr "hibernate.session_factory_name"
 
-#: index.docbook:413
-msgid "The <literal>SessionFactory</literal> will be automatically bound to this name in JNDI after it has been created."
+#. Tag: entry
+#: configuration.xml:413
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>SessionFactory</literal> will be automatically bound to this "
+"name in JNDI after it has been created."
 msgstr ""
+"<placeholder-1/>创建后,将自动使用这个名字绑定到JNDI中. <placeholder-2/>"
 
-#: index.docbook:416, index.docbook:859
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>jndi/composite/name</literal>"
+#. Tag: para
+#: configuration.xml:416 configuration.xml:859
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>jndi/composite/name</"
+"literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:424
+#. Tag: literal
+#: configuration.xml:424
+#, no-c-format
 msgid "hibernate.max_fetch_depth"
-msgstr ""
+msgstr "hibernate.max_fetch_depth"
 
-#: index.docbook:426
-msgid "Set a maximum \"depth\" for the outer join fetch tree for single-ended associations (one-to-one, many-to-one). A <literal>0</literal> disables default outer join fetching."
+#. Tag: entry
+#: configuration.xml:426
+#, fuzzy, no-c-format
+msgid ""
+"Set a maximum \"depth\" for the outer join fetch tree for single-ended "
+"associations (one-to-one, many-to-one). A <literal>0</literal> disables "
+"default outer join fetching."
 msgstr ""
+"为单向关联(一对一, 多对一)的外连接抓取(outer join fetch)树设置最大深度. 值"
+"为<placeholder-1/>意味着将关闭默认的外连接抓取. <placeholder-2/>"
 
-#: index.docbook:430
-msgid "<emphasis role=\"strong\">eg.</emphasis> recommended values between <literal>0</literal> and <literal>3</literal>"
+#. Tag: para
+#: configuration.xml:430
+#, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> recommended values between "
+"<literal>0</literal> and <literal>3</literal>"
 msgstr ""
+"<emphasis role=\"strong\">取值</emphasis> 建议在<literal>0</literal>到"
+"<literal>3</literal>之间取值"
 
-#: index.docbook:439
+#. Tag: literal
+#: configuration.xml:439
+#, no-c-format
 msgid "hibernate.default_batch_fetch_size"
-msgstr ""
+msgstr "hibernate.default_batch_fetch_size"
 
-#: index.docbook:441
+#. Tag: entry
+#: configuration.xml:441
+#, fuzzy, no-c-format
 msgid "Set a default size for Hibernate batch fetching of associations."
-msgstr ""
+msgstr "为Hibernate关联的批量抓取设置默认数量. <placeholder-1/>"
 
-#: index.docbook:443
-msgid "<emphasis role=\"strong\">eg.</emphasis> recommended values <literal>4</literal>, <literal>8</literal>, <literal>16</literal>"
+#. Tag: para
+#: configuration.xml:443
+#, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> recommended values <literal>4</"
+"literal>, <literal>8</literal>, <literal>16</literal>"
 msgstr ""
+"<emphasis role=\"strong\">取值</emphasis> 建议的取值为<literal>4</literal>, "
+"<literal>8</literal>, 和<literal>16</literal>"
 
-#: index.docbook:452
+#. Tag: literal
+#: configuration.xml:452
+#, no-c-format
 msgid "hibernate.default_entity_mode"
-msgstr ""
+msgstr "hibernate.default_entity_mode"
 
-#: index.docbook:454
-msgid "Set a default mode for entity representation for all sessions opened from this <literal>SessionFactory</literal>"
+#. Tag: entry
+#: configuration.xml:454
+#, fuzzy, no-c-format
+msgid ""
+"Set a default mode for entity representation for all sessions opened from "
+"this <literal>SessionFactory</literal>"
 msgstr ""
+"为由这个<placeholder-1/>打开的所有Session指定默认的实体表现模式. "
+"<placeholder-2/>"
 
-#: index.docbook:457
-msgid "<literal>dynamic-map</literal>, <literal>dom4j</literal>, <literal>pojo</literal>"
+#. Tag: para
+#: configuration.xml:457
+#, no-c-format
+msgid ""
+"<literal>dynamic-map</literal>, <literal>dom4j</literal>, <literal>pojo</"
+"literal>"
 msgstr ""
+"<emphasis role=\"strong\">取值</emphasis><literal>dynamic-map</literal>, "
+"<literal>dom4j</literal>, <literal>pojo</literal>"
 
-#: index.docbook:465
+#. Tag: literal
+#: configuration.xml:465
+#, no-c-format
 msgid "hibernate.order_updates"
-msgstr ""
+msgstr "hibernate.order_updates"
 
-#: index.docbook:467
-msgid "Force Hibernate to order SQL updates by the primary key value of the items being updated. This will result in fewer transaction deadlocks in highly concurrent systems."
+#. Tag: entry
+#: configuration.xml:467
+#, fuzzy, no-c-format
+msgid ""
+"Force Hibernate to order SQL updates by the primary key value of the items "
+"being updated. This will result in fewer transaction deadlocks in highly "
+"concurrent systems."
 msgstr ""
+"强制Hibernate按照被更新数据的主键,为SQL更新排序。这么做将减少在高并发系统中"
+"事务的死锁。 <placeholder-1/>"
 
-#: index.docbook:479
+#. Tag: literal
+#: configuration.xml:479
+#, no-c-format
 msgid "hibernate.generate_statistics"
-msgstr ""
+msgstr "hibernate.generate_statistics"
 
-#: index.docbook:481
-msgid "If enabled, Hibernate will collect statistics useful for performance tuning."
-msgstr ""
+#. Tag: entry
+#: configuration.xml:481
+#, fuzzy, no-c-format
+msgid ""
+"If enabled, Hibernate will collect statistics useful for performance tuning."
+msgstr "如果开启, Hibernate将收集有助于性能调节的统计数据. <placeholder-1/>"
 
-#: index.docbook:492
+#. Tag: literal
+#: configuration.xml:492
+#, no-c-format
 msgid "hibernate.use_identifier_rollback"
-msgstr ""
+msgstr "hibernate.use_identifer_rollback"
 
-#: index.docbook:494
-msgid "If enabled, generated identifier properties will be reset to default values when objects are deleted."
+#. Tag: entry
+#: configuration.xml:494
+#, fuzzy, no-c-format
+msgid ""
+"If enabled, generated identifier properties will be reset to default values "
+"when objects are deleted."
 msgstr ""
+"如果开启, 在对象被删除时生成的标识属性将被重设为默认值. <placeholder-1/>"
 
-#: index.docbook:505
+#. Tag: literal
+#: configuration.xml:505
+#, no-c-format
 msgid "hibernate.use_sql_comments"
-msgstr ""
+msgstr "hibernate.use_sql_comments"
 
-#: index.docbook:507
-msgid "If turned on, Hibernate will generate comments inside the SQL, for easier debugging, defaults to <literal>false</literal>."
+#. Tag: entry
+#: configuration.xml:507
+#, fuzzy, no-c-format
+msgid ""
+"If turned on, Hibernate will generate comments inside the SQL, for easier "
+"debugging, defaults to <literal>false</literal>."
 msgstr ""
+"如果开启, Hibernate将在SQL中生成有助于调试的注释信息, 默认值为<placeholder-1/"
+">. <placeholder-2/>"
 
-#: index.docbook:521
+#. Tag: title
+#: configuration.xml:521
+#, no-c-format
 msgid "Hibernate JDBC and Connection Properties"
-msgstr ""
+msgstr "Hibernate JDBC和连接(connection)属性"
 
-#: index.docbook:536
+#. Tag: literal
+#: configuration.xml:536
+#, no-c-format
 msgid "hibernate.jdbc.fetch_size"
-msgstr ""
+msgstr "hibernate.jdbc.fetch_size"
 
-#: index.docbook:538
-msgid "A non-zero value determines the JDBC fetch size (calls <literal>Statement.setFetchSize()</literal>)."
-msgstr ""
+#. Tag: entry
+#: configuration.xml:538
+#, fuzzy, no-c-format
+msgid ""
+"A non-zero value determines the JDBC fetch size (calls <literal>Statement."
+"setFetchSize()</literal>)."
+msgstr "非零值,指定JDBC抓取数量的大小 (调用<placeholder-1/>)."
 
-#: index.docbook:545
+#. Tag: literal
+#: configuration.xml:545
+#, no-c-format
 msgid "hibernate.jdbc.batch_size"
-msgstr ""
+msgstr "hibernate.jdbc.batch_size"
 
-#: index.docbook:547
+#. Tag: entry
+#: configuration.xml:547
+#, fuzzy, no-c-format
 msgid "A non-zero value enables use of JDBC2 batch updates by Hibernate."
-msgstr ""
+msgstr "非零值,允许Hibernate使用JDBC2的批量更新. <placeholder-1/>"
 
-#: index.docbook:549
-msgid "<emphasis role=\"strong\">eg.</emphasis> recommended values between <literal>5</literal> and <literal>30</literal>"
+#. Tag: para
+#: configuration.xml:549
+#, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> recommended values between "
+"<literal>5</literal> and <literal>30</literal>"
 msgstr ""
+"<emphasis role=\"strong\">取值</emphasis> 建议取<literal>5</literal>到"
+"<literal>30</literal>之间的值"
 
-#: index.docbook:557
+#. Tag: literal
+#: configuration.xml:557
+#, no-c-format
 msgid "hibernate.jdbc.batch_versioned_data"
-msgstr ""
+msgstr "hibernate.jdbc.batch_versioned_data"
 
-#: index.docbook:559
-msgid "Set this property to <literal>true</literal> if your JDBC driver returns correct row counts from <literal>executeBatch()</literal> (it is usually safe to turn this option on). Hibernate will then use batched DML for automatically versioned data. Defaults to <literal>false</literal>."
+#. Tag: entry
+#: configuration.xml:559
+#, fuzzy, no-c-format
+msgid ""
+"Set this property to <literal>true</literal> if your JDBC driver returns "
+"correct row counts from <literal>executeBatch()</literal> (it is usually "
+"safe to turn this option on). Hibernate will then use batched DML for "
+"automatically versioned data. Defaults to <literal>false</literal>."
 msgstr ""
+"如果你想让你的JDBC驱动从<placeholder-1/>返回正确的行计数 , 那么将此属性设为"
+"<placeholder-2/>(开启这个选项通常是安全的). 同时,Hibernate将为自动版本化的数"
+"据使用批量DML. 默认值为<placeholder-3/>. <placeholder-4/>"
 
-#: index.docbook:572
+#. Tag: literal
+#: configuration.xml:572
+#, no-c-format
 msgid "hibernate.jdbc.factory_class"
-msgstr ""
+msgstr "hibernate.jdbc.factory_class"
 
-#: index.docbook:574
-msgid "Select a custom <literal>Batcher</literal>. Most applications will not need this configuration property."
+#. Tag: entry
+#: configuration.xml:574
+#, fuzzy, no-c-format
+msgid ""
+"Select a custom <literal>Batcher</literal>. Most applications will not need "
+"this configuration property."
 msgstr ""
+"选择一个自定义的<placeholder-1/>. 多数应用程序不需要这个配置属性. "
+"<placeholder-2/>"
 
-#: index.docbook:577
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of.BatcherFactory</literal>"
+#. Tag: para
+#: configuration.xml:577
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of."
+"BatcherFactory</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:585
+#. Tag: literal
+#: configuration.xml:585
+#, no-c-format
 msgid "hibernate.jdbc.use_scrollable_resultset"
-msgstr ""
+msgstr "hibernate.jdbc.use_scrollable_resultset"
 
-#: index.docbook:587
-msgid "Enables use of JDBC2 scrollable resultsets by Hibernate. This property is only necessary when using user supplied JDBC connections, Hibernate uses connection metadata otherwise."
+#. Tag: entry
+#: configuration.xml:587
+#, fuzzy, no-c-format
+msgid ""
+"Enables use of JDBC2 scrollable resultsets by Hibernate. This property is "
+"only necessary when using user supplied JDBC connections, Hibernate uses "
+"connection metadata otherwise."
 msgstr ""
+"允许Hibernate使用JDBC2的可滚动结果集. 只有在使用用户提供的JDBC连接时,这个选"
+"项才是必要的, 否则Hibernate会使用连接的元数据. <placeholder-1/>"
 
-#: index.docbook:599
+#. Tag: literal
+#: configuration.xml:599
+#, no-c-format
 msgid "hibernate.jdbc.use_streams_for_binary"
-msgstr ""
+msgstr "hibernate.jdbc.use_streams_for_binary"
 
-#: index.docbook:601
-msgid "Use streams when writing/reading <literal>binary</literal> or <literal>serializable</literal> types to/from JDBC (system-level property)."
+#. Tag: entry
+#: configuration.xml:601
+#, fuzzy, no-c-format
+msgid ""
+"Use streams when writing/reading <literal>binary</literal> or "
+"<literal>serializable</literal> types to/from JDBC (system-level property)."
 msgstr ""
+"在JDBC读写<placeholder-1/>或<placeholder-2/> 的类型时使用流(stream)(系统级属"
+"性). <placeholder-3/>"
 
-#: index.docbook:613
+#. Tag: literal
+#: configuration.xml:613
+#, no-c-format
 msgid "hibernate.jdbc.use_get_generated_keys"
-msgstr ""
+msgstr "hibernate.jdbc.use_get_generated_keys"
 
-#: index.docbook:615
-msgid "Enable use of JDBC3 <literal>PreparedStatement.getGeneratedKeys()</literal> to retrieve natively generated keys after insert. Requires JDBC3+ driver and JRE1.4+, set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata."
+#. Tag: entry
+#: configuration.xml:615
+#, fuzzy, no-c-format
+msgid ""
+"Enable use of JDBC3 <literal>PreparedStatement.getGeneratedKeys()</literal> "
+"to retrieve natively generated keys after insert. Requires JDBC3+ driver and "
+"JRE1.4+, set to false if your driver has problems with the Hibernate "
+"identifier generators. By default, tries to determine the driver "
+"capabilities using connection metadata."
 msgstr ""
+"在数据插入数据库之后,允许使用JDBC3 <placeholder-1/> 来获取数据库生成的key"
+"(键)。需要JDBC3+驱动和JRE1.4+, 如果你的数据库驱动在使用Hibernate的标 识生成器"
+"时遇到问题,请将此值设为false. 默认情况下将使用连接的元数据来判定驱动的能力. "
+"<placeholder-2/>"
 
-#: index.docbook:621, index.docbook:751, index.docbook:763, index.docbook:777, index.docbook:815
+#. Tag: para
+#: configuration.xml:621 configuration.xml:751 configuration.xml:763
+#: configuration.xml:777 configuration.xml:815
+#, fuzzy, no-c-format
 msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>true|false</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:629
+#. Tag: literal
+#: configuration.xml:629
+#, no-c-format
 msgid "hibernate.connection.provider_class"
-msgstr ""
+msgstr "hibernate.connection.provider_class"
 
-#: index.docbook:631
-msgid "The classname of a custom <literal>ConnectionProvider</literal> which provides JDBC connections to Hibernate."
+#. Tag: entry
+#: configuration.xml:631
+#, fuzzy, no-c-format
+msgid ""
+"The classname of a custom <literal>ConnectionProvider</literal> which "
+"provides JDBC connections to Hibernate."
 msgstr ""
+"自定义<placeholder-1/>的类名, 此类用来向Hibernate提供JDBC连接. <placeholder-"
+"2/>"
 
-#: index.docbook:634
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of.ConnectionProvider</literal>"
+#. Tag: para
+#: configuration.xml:634
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of."
+"ConnectionProvider</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:642
+#. Tag: literal
+#: configuration.xml:642
+#, no-c-format
 msgid "hibernate.connection.isolation"
-msgstr ""
+msgstr "hibernate.connection.isolation"
 
-#: index.docbook:644
-msgid "Set the JDBC transaction isolation level. Check <literal>java.sql.Connection</literal> for meaningful values but note that most databases do not support all isolation levels."
+#. Tag: entry
+#: configuration.xml:644
+#, fuzzy, no-c-format
+msgid ""
+"Set the JDBC transaction isolation level. Check <literal>java.sql."
+"Connection</literal> for meaningful values but note that most databases do "
+"not support all isolation levels."
 msgstr ""
+"设置JDBC事务隔离级别. 查看<placeholder-1/>来了解各个值的具体意义, 但请注意多"
+"数数据库都不支持所有的隔离级别. <placeholder-2/>"
 
-#: index.docbook:648
+#. Tag: para
+#: configuration.xml:648
+#, fuzzy, no-c-format
 msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>1, 2, 4, 8</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:656
+#. Tag: literal
+#: configuration.xml:656
+#, no-c-format
 msgid "hibernate.connection.autocommit"
-msgstr ""
+msgstr "hibernate.connection.autocommit"
 
-#: index.docbook:658
+#. Tag: entry
+#: configuration.xml:658
+#, fuzzy, no-c-format
 msgid "Enables autocommit for JDBC pooled connections (not recommended)."
 msgstr ""
+"允许被缓存的JDBC连接开启自动提交(autocommit) (不建议). <placeholder-1/>"
 
-#: index.docbook:668
+#. Tag: literal
+#: configuration.xml:668
+#, no-c-format
 msgid "hibernate.connection.release_mode"
-msgstr ""
+msgstr "hibernate.connection.release_mode"
 
-#: index.docbook:670
-msgid "Specify when Hibernate should release JDBC connections. By default, a JDBC connection is held until the session is explicitly closed or disconnected. For an application server JTA datasource, you should use <literal>after_statement</literal> to aggressively release connections after every JDBC call. For a non-JTA connection, it often makes sense to release the connection at the end of each transaction, by using <literal>after_transaction</literal>. <literal>auto</literal> will choose <literal>after_statement</literal> for the JTA and CMT transaction strategies and <literal>after_transaction</literal> for the JDBC transaction strategy."
+#. Tag: entry
+#: configuration.xml:670
+#, fuzzy, no-c-format
+msgid ""
+"Specify when Hibernate should release JDBC connections. By default, a JDBC "
+"connection is held until the session is explicitly closed or disconnected. "
+"For an application server JTA datasource, you should use "
+"<literal>after_statement</literal> to aggressively release connections after "
+"every JDBC call. For a non-JTA connection, it often makes sense to release "
+"the connection at the end of each transaction, by using "
+"<literal>after_transaction</literal>. <literal>auto</literal> will choose "
+"<literal>after_statement</literal> for the JTA and CMT transaction "
+"strategies and <literal>after_transaction</literal> for the JDBC transaction "
+"strategy."
 msgstr ""
+"指定Hibernate在何时释放JDBC连接. 默认情况下,直到Session被显式关闭或被断开连接"
+"时,才会释放JDBC连接. 对于应用程序服务器的JTA数据源, 你应当使用<placeholder-1/"
+">, 这样在每次JDBC调用后,都会主动的释放连接. 对于非JTA的连接, 使用"
+"<placeholder-2/>在每个事务结束时释放连接是合理的. <placeholder-3/>将为JTA和"
+"CMT事务策略选择<placeholder-4/>, 为JDBC事务策略选择<placeholder-5/>. "
+"<placeholder-6/><placeholder-7/>"
 
-#: index.docbook:681
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>auto</literal> (default) | <literal>on_close</literal> | <literal>after_transaction</literal> | <literal>after_statement</literal>"
+#. Tag: para
+#: configuration.xml:681
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>auto</literal> (default) | "
+"<literal>on_close</literal> | <literal>after_transaction</literal> | "
+"<literal>after_statement</literal>"
 msgstr ""
+"<emphasis role=\"strong\">取值</emphasis><literal>auto</literal> (默认) | "
+"<literal>on_close</literal> | <literal>after_transaction</literal> | "
+"<literal>after_statement</literal>"
 
-#: index.docbook:686
-msgid "Note that this setting only affects <literal>Session</literal>s returned from <literal>SessionFactory.openSession</literal>. For <literal>Session</literal>s obtained through <literal>SessionFactory.getCurrentSession</literal>, the <literal>CurrentSessionContext</literal> implementation configured for use controls the connection release mode for those <literal>Session</literal>s. See"
+#. Tag: para
+#: configuration.xml:686
+#, fuzzy, no-c-format
+msgid ""
+"Note that this setting only affects <literal>Session</literal>s returned "
+"from <literal>SessionFactory.openSession</literal>. For <literal>Session</"
+"literal>s obtained through <literal>SessionFactory.getCurrentSession</"
+"literal>, the <literal>CurrentSessionContext</literal> implementation "
+"configured for use controls the connection release mode for those "
+"<literal>Session</literal>s. See"
 msgstr ""
+"注意,这些设置仅对通过<literal>SessionFactory.openSession</literal>得到的"
+"<literal>Session</literal>起作用。对于通过<literal>SessionFactory."
+"getCurrentSession</literal>得到的<literal>Session</literal>,所配置的"
+"<literal>CurrentSessionContext</literal>实现控制这些<literal>Session</"
+"literal>的连接释放模式。请参阅<xref linkend=\"architecture-current-session\"/"
+">。"
 
-#: index.docbook:698
+#. Tag: literal
+#: configuration.xml:698
+#, no-c-format
 msgid "hibernate.connection.<emphasis>&lt;propertyName&gt;</emphasis>"
 msgstr ""
 
-#: index.docbook:700
-msgid "Pass the JDBC property <literal>propertyName</literal> to <literal>DriverManager.getConnection()</literal>."
+#. Tag: entry
+#: configuration.xml:700
+#, fuzzy, no-c-format
+msgid ""
+"Pass the JDBC property <literal>propertyName</literal> to "
+"<literal>DriverManager.getConnection()</literal>."
 msgstr ""
+"传一个<literal>java.util.Properties</literal>实例给 <literal>Configuration."
+"setProperties()</literal>."
 
-#: index.docbook:707
+#. Tag: literal
+#: configuration.xml:707
+#, no-c-format
 msgid "hibernate.jndi.<emphasis>&lt;propertyName&gt;</emphasis>"
 msgstr ""
 
-#: index.docbook:709
-msgid "Pass the property <literal>propertyName</literal> to the JNDI <literal>InitialContextFactory</literal>."
+#. Tag: entry
+#: configuration.xml:709
+#, fuzzy, no-c-format
+msgid ""
+"Pass the property <literal>propertyName</literal> to the JNDI "
+"<literal>InitialContextFactory</literal>."
 msgstr ""
+"传一个<literal>java.util.Properties</literal>实例给 <literal>Configuration."
+"setProperties()</literal>."
 
-#: index.docbook:719
+#. Tag: title
+#: configuration.xml:719
+#, no-c-format
 msgid "Hibernate Cache Properties"
-msgstr ""
+msgstr "Hibernate缓存属性"
 
-#: index.docbook:732
+#. Tag: literal
+#: configuration.xml:732
+#, no-c-format
 msgid "hibernate.cache.provider_class"
-msgstr ""
+msgstr "hibernate.cache.provider_class"
 
-#: index.docbook:734
+#. Tag: entry
+#: configuration.xml:734
+#, fuzzy, no-c-format
 msgid "The classname of a custom <literal>CacheProvider</literal>."
-msgstr ""
+msgstr "自定义的<placeholder-1/>的类名. <placeholder-2/>"
 
-#: index.docbook:736
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of.CacheProvider</literal>"
+#. Tag: para
+#: configuration.xml:736
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of."
+"CacheProvider</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:744
+#. Tag: literal
+#: configuration.xml:744
+#, no-c-format
 msgid "hibernate.cache.use_minimal_puts"
-msgstr ""
+msgstr "hibernate.cache.use_minimal_puts"
 
-#: index.docbook:746
-msgid "Optimize second-level cache operation to minimize writes, at the cost of more frequent reads. This setting is most useful for clustered caches and, in Hibernate3, is enabled by default for clustered cache implementations."
+#. Tag: entry
+#: configuration.xml:746
+#, fuzzy, no-c-format
+msgid ""
+"Optimize second-level cache operation to minimize writes, at the cost of "
+"more frequent reads. This setting is most useful for clustered caches and, "
+"in Hibernate3, is enabled by default for clustered cache implementations."
 msgstr ""
+"以频繁的读操作为代价, 优化二级缓存来最小化写操作. 在Hibernate3中,这个设置对"
+"的集群缓存非常有用, 对集群缓存的实现而言,默认是开启的. <placeholder-1/>"
 
-#: index.docbook:759
+#. Tag: literal
+#: configuration.xml:759
+#, no-c-format
 msgid "hibernate.cache.use_query_cache"
-msgstr ""
+msgstr "hibernate.cache.use_query_cache"
 
-#: index.docbook:761
-msgid "Enable the query cache, individual queries still have to be set cachable."
-msgstr ""
+#. Tag: entry
+#: configuration.xml:761
+#, fuzzy, no-c-format
+msgid ""
+"Enable the query cache, individual queries still have to be set cachable."
+msgstr "允许查询缓存, 个别查询仍然需要被设置为可缓存的. <placeholder-1/>"
 
-#: index.docbook:771
+#. Tag: literal
+#: configuration.xml:771
+#, no-c-format
 msgid "hibernate.cache.use_second_level_cache"
-msgstr ""
+msgstr "hibernate.cache.use_second_level_cache"
 
-#: index.docbook:773
-msgid "May be used to completely disable the second level cache, which is enabled by default for classes which specify a <literal>&lt;cache&gt;</literal> mapping."
+#. Tag: entry
+#: configuration.xml:773
+#, fuzzy, no-c-format
+msgid ""
+"May be used to completely disable the second level cache, which is enabled "
+"by default for classes which specify a <literal>&lt;cache&gt;</literal> "
+"mapping."
 msgstr ""
+"能用来完全禁止使用二级缓存. 对那些在类的映射定义中指定<placeholder-1/>的类,"
+"会默认开启二级缓存. <placeholder-2/>"
 
-#: index.docbook:785
+#. Tag: literal
+#: configuration.xml:785
+#, no-c-format
 msgid "hibernate.cache.query_cache_factory"
-msgstr ""
+msgstr "hibernate.cache.query_cache_factory"
 
-#: index.docbook:787
-msgid "The classname of a custom <literal>QueryCache</literal> interface, defaults to the built-in <literal>StandardQueryCache</literal>."
+#. Tag: entry
+#: configuration.xml:787
+#, fuzzy, no-c-format
+msgid ""
+"The classname of a custom <literal>QueryCache</literal> interface, defaults "
+"to the built-in <literal>StandardQueryCache</literal>."
 msgstr ""
+"自定义实现<placeholder-1/>接口的类名, 默认为内建的<placeholder-2/>. "
+"<placeholder-3/>"
 
-#: index.docbook:790
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of.QueryCache</literal>"
+#. Tag: para
+#: configuration.xml:790
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of.QueryCache</"
+"literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:798
+#. Tag: literal
+#: configuration.xml:798
+#, no-c-format
 msgid "hibernate.cache.region_prefix"
-msgstr ""
+msgstr "hibernate.cache.region_prefix"
 
-#: index.docbook:800
+#. Tag: entry
+#: configuration.xml:800
+#, fuzzy, no-c-format
 msgid "A prefix to use for second-level cache region names."
-msgstr ""
+msgstr "二级缓存区域名的前缀. <placeholder-1/>"
 
-#: index.docbook:802
+#. Tag: para
+#: configuration.xml:802
+#, fuzzy, no-c-format
 msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>prefix</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:810
+#. Tag: literal
+#: configuration.xml:810
+#, no-c-format
 msgid "hibernate.cache.use_structured_entries"
-msgstr ""
+msgstr "hibernate.cache.use_structured_entries"
 
-#: index.docbook:812
-msgid "Forces Hibernate to store data in the second-level cache in a more human-friendly format."
-msgstr ""
+#. Tag: entry
+#: configuration.xml:812
+#, fuzzy, no-c-format
+msgid ""
+"Forces Hibernate to store data in the second-level cache in a more human-"
+"friendly format."
+msgstr "强制Hibernate以更人性化的格式将数据存入二级缓存. <placeholder-1/>"
 
-#: index.docbook:826
+#. Tag: title
+#: configuration.xml:826
+#, no-c-format
 msgid "Hibernate Transaction Properties"
-msgstr ""
+msgstr "Hibernate事务属性"
 
-#: index.docbook:839
+#. Tag: literal
+#: configuration.xml:839
+#, no-c-format
 msgid "hibernate.transaction.factory_class"
-msgstr ""
+msgstr "hibernate.transaction.factory_class"
 
-#: index.docbook:841
-msgid "The classname of a <literal>TransactionFactory</literal> to use with Hibernate <literal>Transaction</literal> API (defaults to <literal>JDBCTransactionFactory</literal>)."
+#. Tag: entry
+#: configuration.xml:841
+#, fuzzy, no-c-format
+msgid ""
+"The classname of a <literal>TransactionFactory</literal> to use with "
+"Hibernate <literal>Transaction</literal> API (defaults to "
+"<literal>JDBCTransactionFactory</literal>)."
 msgstr ""
+"一个<placeholder-1/>的类名, 用于Hibernate <placeholder-2/> API (默认为"
+"<placeholder-3/>). <placeholder-4/>"
 
-#: index.docbook:845
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of.TransactionFactory</literal>"
+#. Tag: para
+#: configuration.xml:845
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of."
+"TransactionFactory</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:853
+#. Tag: literal
+#: configuration.xml:853
+#, no-c-format
 msgid "jta.UserTransaction"
-msgstr ""
+msgstr "jta.UserTransaction"
 
-#: index.docbook:855
-msgid "A JNDI name used by <literal>JTATransactionFactory</literal> to obtain the JTA <literal>UserTransaction</literal> from the application server."
+#. Tag: entry
+#: configuration.xml:855
+#, fuzzy, no-c-format
+msgid ""
+"A JNDI name used by <literal>JTATransactionFactory</literal> to obtain the "
+"JTA <literal>UserTransaction</literal> from the application server."
 msgstr ""
+"一个JNDI名字,被<placeholder-1/>用来从应用服务器获取JTA <placeholder-2/>. "
+"<placeholder-3/>"
 
-#: index.docbook:867
+#. Tag: literal
+#: configuration.xml:867
+#, no-c-format
 msgid "hibernate.transaction.manager_lookup_class"
-msgstr ""
+msgstr "hibernate.transaction.manager_lookup_class"
 
-#: index.docbook:869
-msgid "The classname of a <literal>TransactionManagerLookup</literal> - required when JVM-level caching is enabled or when using hilo generator in a JTA environment."
+#. Tag: entry
+#: configuration.xml:869
+#, fuzzy, no-c-format
+msgid ""
+"The classname of a <literal>TransactionManagerLookup</literal> - required "
+"when JVM-level caching is enabled or when using hilo generator in a JTA "
+"environment."
 msgstr ""
+"一个<placeholder-1/>的类名 - 当使用JVM级缓存,或在JTA环境中使用hilo生成器的时"
+"候需要该类. <placeholder-2/>"
 
-#: index.docbook:873
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of.TransactionManagerLookup</literal>"
+#. Tag: para
+#: configuration.xml:873
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>classname.of."
+"TransactionManagerLookup</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:881
+#. Tag: literal
+#: configuration.xml:881
+#, no-c-format
 msgid "hibernate.transaction.flush_before_completion"
-msgstr ""
+msgstr "hibernate.transaction.flush_before_completion"
 
-#: index.docbook:883
-msgid "If enabled, the session will be automatically flushed during the before completion phase of the transaction. Built-in and automatic session context management is preferred, see <xref linkend=\"architecture-current-session\"/>."
+#. Tag: entry
+#: configuration.xml:883
+#, fuzzy, no-c-format
+msgid ""
+"If enabled, the session will be automatically flushed during the before "
+"completion phase of the transaction. Built-in and automatic session context "
+"management is preferred, see <xref linkend=\"architecture-current-session\"/"
+">."
 msgstr ""
+"如果开启, session在事务完成后将被自动清洗(flush)。 现在更好的方法是使用自动"
+"session上下文管理。请参见<xref linkend=\"architecture-current-session\"/>。 "
+"<placeholder-1/>"
 
-#: index.docbook:896
+#. Tag: literal
+#: configuration.xml:896
+#, no-c-format
 msgid "hibernate.transaction.auto_close_session"
-msgstr ""
+msgstr "hibernate.transaction.auto_close_session"
 
-#: index.docbook:898
-msgid "If enabled, the session will be automatically closed during the after completion phase of the transaction. Built-in and utomatic session context management is preferred, see <xref linkend=\"architecture-current-session\"/>."
+#. Tag: entry
+#: configuration.xml:898
+#, fuzzy, no-c-format
+msgid ""
+"If enabled, the session will be automatically closed during the after "
+"completion phase of the transaction. Built-in and utomatic session context "
+"management is preferred, see <xref linkend=\"architecture-current-session\"/"
+">."
 msgstr ""
+"如果开启, session在事务完成后将被自动关闭。 现在更好的方法是使用自动session上"
+"下文管理。请参见<xref linkend=\"architecture-current-session\"/>。 "
+"<placeholder-1/>"
 
-#: index.docbook:914
+#. Tag: title
+#: configuration.xml:914
+#, no-c-format
 msgid "Miscellaneous Properties"
-msgstr ""
+msgstr "其他属性"
 
-#: index.docbook:927
+#. Tag: literal
+#: configuration.xml:927
+#, no-c-format
 msgid "hibernate.current_session_context_class"
-msgstr ""
+msgstr "hibernate.current_session_context_class"
 
-#: index.docbook:929
-msgid "Supply a (custom) strategy for the scoping of the \"current\" <literal>Session</literal>. See <xref linkend=\"architecture-current-session\"/> for more information about the built-in strategies."
+#. Tag: entry
+#: configuration.xml:929
+#, fuzzy, no-c-format
+msgid ""
+"Supply a (custom) strategy for the scoping of the \"current\" "
+"<literal>Session</literal>. See <xref linkend=\"architecture-current-session"
+"\"/> for more information about the built-in strategies."
 msgstr ""
+"为\"当前\" <placeholder-1/>指定一个(自定义的)策略。关于内置策略的详情,请参见"
+"<xref linkend=\"architecture-current-session\"/> 。 <placeholder-2/>"
 
-#: index.docbook:934
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>jta</literal> | <literal>thread</literal> | <literal>managed</literal> | <literal>custom.Class</literal>"
+#. Tag: para
+#: configuration.xml:934
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>jta</literal> | "
+"<literal>thread</literal> | <literal>managed</literal> | <literal>custom."
+"Class</literal>"
 msgstr ""
+"<emphasis role=\"strong\">eg.</emphasis><literal>jta</literal> | "
+"<literal>thread</literal> | <literal>managed</literal> | <literal>custom."
+"Class</literal>"
 
-#: index.docbook:943
+#. Tag: literal
+#: configuration.xml:943
+#, no-c-format
 msgid "hibernate.query.factory_class"
-msgstr ""
+msgstr "hibernate.query.factory_class"
 
-#: index.docbook:945
+#. Tag: entry
+#: configuration.xml:945
+#, fuzzy, no-c-format
 msgid "Chooses the HQL parser implementation."
-msgstr ""
+msgstr "选择HQL解析器的实现. <placeholder-1/>"
 
-#: index.docbook:947
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>org.hibernate.hql.ast.ASTQueryTranslatorFactory</literal> or <literal>org.hibernate.hql.classic.ClassicQueryTranslatorFactory</literal>"
+#. Tag: para
+#: configuration.xml:947
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>org.hibernate.hql.ast."
+"ASTQueryTranslatorFactory</literal> or <literal>org.hibernate.hql.classic."
+"ClassicQueryTranslatorFactory</literal>"
 msgstr ""
+"<emphasis role=\"strong\">取值</emphasis><literal>org.hibernate.hql.ast."
+"ASTQueryTranslatorFactory</literal> or <literal>org.hibernate.hql.classic."
+"ClassicQueryTranslatorFactory</literal>"
 
-#: index.docbook:956
+#. Tag: literal
+#: configuration.xml:956
+#, no-c-format
 msgid "hibernate.query.substitutions"
-msgstr ""
+msgstr "hibernate.query.substitutions"
 
-#: index.docbook:958
-msgid "Mapping from tokens in Hibernate queries to SQL tokens (tokens might be function or literal names, for example)."
+#. Tag: entry
+#: configuration.xml:958
+#, fuzzy, no-c-format
+msgid ""
+"Mapping from tokens in Hibernate queries to SQL tokens (tokens might be "
+"function or literal names, for example)."
 msgstr ""
+"将Hibernate查询中的符号映射到SQL查询中的符号 (符号可能是函数名或常量名字). "
+"<placeholder-1/>"
 
-#: index.docbook:961
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC</literal>"
+#. Tag: para
+#: configuration.xml:961
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>hqlLiteral=SQL_LITERAL, "
+"hqlFunction=SQLFUNC</literal>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"<emphasis role=\"strong\">取值</emphasis><literal>true</literal> | "
+"<literal>false</literal>"
 
-#: index.docbook:969
+#. Tag: literal
+#: configuration.xml:969
+#, no-c-format
 msgid "hibernate.hbm2ddl.auto"
-msgstr ""
+msgstr "hibernate.hbm2ddl.auto"
 
-#: index.docbook:971
-msgid "Automatically validate or export schema DDL to the database when the <literal>SessionFactory</literal> is created. With <literal>create-drop</literal>, the database schema will be dropped when the <literal>SessionFactory</literal> is closed explicitly."
+#. Tag: entry
+#: configuration.xml:971
+#, fuzzy, no-c-format
+msgid ""
+"Automatically validate or export schema DDL to the database when the "
+"<literal>SessionFactory</literal> is created. With <literal>create-drop</"
+"literal>, the database schema will be dropped when the "
+"<literal>SessionFactory</literal> is closed explicitly."
 msgstr ""
+"在<placeholder-1/>创建时,自动检查数据库结构,或者将数据库schema的DDL导出到数"
+"据库. 使用 <placeholder-2/>时,在显式关闭<placeholder-3/>时,将drop掉数据库"
+"schema. <placeholder-4/>"
 
-#: index.docbook:977
-msgid "<emphasis role=\"strong\">eg.</emphasis> <literal>validate</literal> | <literal>update</literal> | <literal>create</literal> | <literal>create-drop</literal>"
+#. Tag: para
+#: configuration.xml:977
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"strong\">eg.</emphasis> <literal>validate</literal> | "
+"<literal>update</literal> | <literal>create</literal> | <literal>create-"
+"drop</literal>"
 msgstr ""
+"<emphasis role=\"strong\">取值</emphasis><literal>validate</literal> | "
+"<literal>update</literal> | <literal>create</literal> | <literal>create-"
+"drop</literal>"
 
-#: index.docbook:986
+#. Tag: literal
+#: configuration.xml:986
+#, no-c-format
 msgid "hibernate.cglib.use_reflection_optimizer"
-msgstr ""
+msgstr "hibernate.cglib.use_reflection_optimizer"
 
-#: index.docbook:988
-msgid "Enables use of CGLIB instead of runtime reflection (System-level property). Reflection can sometimes be useful when troubleshooting, note that Hibernate always requires CGLIB even if you turn off the optimizer. You can not set this property in <literal>hibernate.cfg.xml</literal>."
+#. Tag: entry
+#: configuration.xml:988
+#, fuzzy, no-c-format
+msgid ""
+"Enables use of CGLIB instead of runtime reflection (System-level property). "
+"Reflection can sometimes be useful when troubleshooting, note that Hibernate "
+"always requires CGLIB even if you turn off the optimizer. You can not set "
+"this property in <literal>hibernate.cfg.xml</literal>."
 msgstr ""
+"开启CGLIB来替代运行时反射机制(系统级属性). 反射机制有时在除错时比较有用. 注意"
+"即使关闭这个优化, Hibernate还是需要CGLIB. 你不能在<placeholder-1/>中设置此属"
+"性. <placeholder-2/>"
 
-#: index.docbook:1004
+#. Tag: title
+#: configuration.xml:1004
+#, no-c-format
 msgid "SQL Dialects"
-msgstr ""
+msgstr "SQL方言"
 
-#: index.docbook:1006
-msgid "You should always set the <literal>hibernate.dialect</literal> property to the correct <literal>org.hibernate.dialect.Dialect</literal> subclass for your database. If you specify a dialect, Hibernate will use sensible defaults for some of the other properties listed above, saving you the effort of specifying them manually."
+#. Tag: para
+#: configuration.xml:1006
+#, no-c-format
+msgid ""
+"You should always set the <literal>hibernate.dialect</literal> property to "
+"the correct <literal>org.hibernate.dialect.Dialect</literal> subclass for "
+"your database. If you specify a dialect, Hibernate will use sensible "
+"defaults for some of the other properties listed above, saving you the "
+"effort of specifying them manually."
 msgstr ""
+"你应当总是为你的数据库将<literal>hibernate.dialect</literal>属性设置成正确的 "
+"<literal>org.hibernate.dialect.Dialect</literal>子类. 如果你指定一种方言, "
+"Hibernate将为上面列出的一些属性使用合理的默认值, 为你省去了手工指定它们的功"
+"夫."
 
-#: index.docbook:1014
+#. Tag: title
+#: configuration.xml:1014
+#, no-c-format
 msgid "Hibernate SQL Dialects (<literal>hibernate.dialect</literal>)"
-msgstr ""
+msgstr "Hibernate SQL方言 (<literal>hibernate.dialect</literal>)"
 
-#: index.docbook:1022
+#. Tag: entry
+#: configuration.xml:1022
+#, no-c-format
 msgid "RDBMS"
-msgstr ""
+msgstr "RDBMS"
 
-#: index.docbook:1023
+#. Tag: entry
+#: configuration.xml:1023
+#, fuzzy, no-c-format
 msgid "Dialect"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"Dialect\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"方言"
 
-#: index.docbook:1028
+#. Tag: entry
+#: configuration.xml:1028
+#, no-c-format
 msgid "<entry>DB2</entry>"
 msgstr ""
 
-#: index.docbook:1028
+#. Tag: literal
+#: configuration.xml:1028
+#, no-c-format
 msgid "org.hibernate.dialect.DB2Dialect"
-msgstr ""
+msgstr "org.hibernate.dialect.DB2Dialect"
 
-#: index.docbook:1031
+#. Tag: entry
+#: configuration.xml:1031
+#, no-c-format
 msgid "DB2 AS/400"
-msgstr ""
+msgstr "DB2 AS/400"
 
-#: index.docbook:1031
+#. Tag: literal
+#: configuration.xml:1031
+#, no-c-format
 msgid "org.hibernate.dialect.DB2400Dialect"
-msgstr ""
+msgstr "org.hibernate.dialect.DB2400Dialect"
 
-#: index.docbook:1034
+#. Tag: entry
+#: configuration.xml:1034
+#, no-c-format
 msgid "DB2 OS390"
-msgstr ""
+msgstr "DB2 OS390"
 
-#: index.docbook:1034
+#. Tag: literal
+#: configuration.xml:1034
+#, no-c-format
 msgid "org.hibernate.dialect.DB2390Dialect"
-msgstr ""
+msgstr "org.hibernate.dialect.DB2390Dialect"
 
-#: index.docbook:1037
+#. Tag: entry
+#: configuration.xml:1037
+#, no-c-format
 msgid "PostgreSQL"
-msgstr ""
+msgstr "PostgreSQL"
 
-#: index.docbook:1037
+#. Tag: literal
+#: configuration.xml:1037
+#, no-c-format
 msgid "org.hibernate.dialect.PostgreSQLDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.PostgreSQLDialect"
 
-#: index.docbook:1040
+#. Tag: entry
+#: configuration.xml:1040
+#, no-c-format
 msgid "MySQL"
-msgstr ""
+msgstr "MySQL"
 
-#: index.docbook:1040
+#. Tag: literal
+#: configuration.xml:1040
+#, no-c-format
 msgid "org.hibernate.dialect.MySQLDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.MySQLDialect"
 
-#: index.docbook:1043
+#. Tag: entry
+#: configuration.xml:1043
+#, no-c-format
 msgid "MySQL with InnoDB"
-msgstr ""
+msgstr "MySQL with InnoDB"
 
-#: index.docbook:1043
+#. Tag: literal
+#: configuration.xml:1043
+#, no-c-format
 msgid "org.hibernate.dialect.MySQLInnoDBDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.MySQLInnoDBDialect"
 
-#: index.docbook:1046
+#. Tag: entry
+#: configuration.xml:1046
+#, no-c-format
 msgid "MySQL with MyISAM"
-msgstr ""
+msgstr "MySQL with MyISAM"
 
-#: index.docbook:1046
+#. Tag: literal
+#: configuration.xml:1046
+#, no-c-format
 msgid "org.hibernate.dialect.MySQLMyISAMDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.MySQLMyISAMDialect"
 
-#: index.docbook:1049
+#. Tag: entry
+#: configuration.xml:1049
+#, no-c-format
 msgid "Oracle (any version)"
-msgstr ""
+msgstr "Oracle (any version)"
 
-#: index.docbook:1049
+#. Tag: literal
+#: configuration.xml:1049
+#, no-c-format
 msgid "org.hibernate.dialect.OracleDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.OracleDialect"
 
-#: index.docbook:1052
+#. Tag: entry
+#: configuration.xml:1052
+#, no-c-format
 msgid "Oracle 9i/10g"
-msgstr ""
+msgstr "Oracle 9i/10g"
 
-#: index.docbook:1052
+#. Tag: literal
+#: configuration.xml:1052
+#, no-c-format
 msgid "org.hibernate.dialect.Oracle9Dialect"
-msgstr ""
+msgstr "org.hibernate.dialect.Oracle9Dialect"
 
-#: index.docbook:1055
+#. Tag: entry
+#: configuration.xml:1055
+#, no-c-format
 msgid "Sybase"
-msgstr ""
+msgstr "Sybase"
 
-#: index.docbook:1055
+#. Tag: literal
+#: configuration.xml:1055
+#, no-c-format
 msgid "org.hibernate.dialect.SybaseDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.SybaseDialect"
 
-#: index.docbook:1058
+#. Tag: entry
+#: configuration.xml:1058
+#, no-c-format
 msgid "Sybase Anywhere"
-msgstr ""
+msgstr "Sybase Anywhere"
 
-#: index.docbook:1058
+#. Tag: literal
+#: configuration.xml:1058
+#, no-c-format
 msgid "org.hibernate.dialect.SybaseAnywhereDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.SybaseAnywhereDialect"
 
-#: index.docbook:1061
+#. Tag: entry
+#: configuration.xml:1061
+#, no-c-format
 msgid "Microsoft SQL Server"
-msgstr ""
+msgstr "Microsoft SQL Server"
 
-#: index.docbook:1061
+#. Tag: literal
+#: configuration.xml:1061
+#, no-c-format
 msgid "org.hibernate.dialect.SQLServerDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.SQLServerDialect"
 
-#: index.docbook:1064
+#. Tag: entry
+#: configuration.xml:1064
+#, no-c-format
 msgid "SAP DB"
-msgstr ""
+msgstr "SAP DB"
 
-#: index.docbook:1064
+#. Tag: literal
+#: configuration.xml:1064
+#, no-c-format
 msgid "org.hibernate.dialect.SAPDBDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.SAPDBDialect"
 
-#: index.docbook:1067
+#. Tag: entry
+#: configuration.xml:1067
+#, no-c-format
 msgid "Informix"
-msgstr ""
+msgstr "Informix"
 
-#: index.docbook:1067
+#. Tag: literal
+#: configuration.xml:1067
+#, no-c-format
 msgid "org.hibernate.dialect.InformixDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.InformixDialect"
 
-#: index.docbook:1070
+#. Tag: entry
+#: configuration.xml:1070
+#, no-c-format
 msgid "HypersonicSQL"
-msgstr ""
+msgstr "HypersonicSQL"
 
-#: index.docbook:1070
+#. Tag: literal
+#: configuration.xml:1070
+#, no-c-format
 msgid "org.hibernate.dialect.HSQLDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.HSQLDialect"
 
-#: index.docbook:1073
+#. Tag: entry
+#: configuration.xml:1073
+#, no-c-format
 msgid "Ingres"
-msgstr ""
+msgstr "Ingres"
 
-#: index.docbook:1073
+#. Tag: literal
+#: configuration.xml:1073
+#, no-c-format
 msgid "org.hibernate.dialect.IngresDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.IngresDialect"
 
-#: index.docbook:1076
+#. Tag: entry
+#: configuration.xml:1076
+#, no-c-format
 msgid "Progress"
-msgstr ""
+msgstr "Progress"
 
-#: index.docbook:1076
+#. Tag: literal
+#: configuration.xml:1076
+#, no-c-format
 msgid "org.hibernate.dialect.ProgressDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.ProgressDialect"
 
-#: index.docbook:1079
+#. Tag: entry
+#: configuration.xml:1079
+#, no-c-format
 msgid "Mckoi SQL"
-msgstr ""
+msgstr "Mckoi SQL"
 
-#: index.docbook:1079
+#. Tag: literal
+#: configuration.xml:1079
+#, no-c-format
 msgid "org.hibernate.dialect.MckoiDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.MckoiDialect"
 
-#: index.docbook:1082
+#. Tag: entry
+#: configuration.xml:1082
+#, no-c-format
 msgid "Interbase"
-msgstr ""
+msgstr "Interbase"
 
-#: index.docbook:1082
+#. Tag: literal
+#: configuration.xml:1082
+#, no-c-format
 msgid "org.hibernate.dialect.InterbaseDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.InterbaseDialect"
 
-#: index.docbook:1085
+#. Tag: entry
+#: configuration.xml:1085
+#, no-c-format
 msgid "Pointbase"
-msgstr ""
+msgstr "Pointbase"
 
-#: index.docbook:1085
+#. Tag: literal
+#: configuration.xml:1085
+#, no-c-format
 msgid "org.hibernate.dialect.PointbaseDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.PointbaseDialect"
 
-#: index.docbook:1088
+#. Tag: entry
+#: configuration.xml:1088
+#, no-c-format
 msgid "FrontBase"
-msgstr ""
+msgstr "FrontBase"
 
-#: index.docbook:1088
+#. Tag: literal
+#: configuration.xml:1088
+#, no-c-format
 msgid "org.hibernate.dialect.FrontbaseDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.FrontbaseDialect"
 
-#: index.docbook:1091
+#. Tag: entry
+#: configuration.xml:1091
+#, no-c-format
 msgid "Firebird"
-msgstr ""
+msgstr "Firebird"
 
-#: index.docbook:1091
+#. Tag: literal
+#: configuration.xml:1091
+#, no-c-format
 msgid "org.hibernate.dialect.FirebirdDialect"
-msgstr ""
+msgstr "org.hibernate.dialect.FirebirdDialect"
 
-#: index.docbook:1100
+#. Tag: title
+#: configuration.xml:1100
+#, no-c-format
 msgid "Outer Join Fetching"
-msgstr ""
+msgstr "外连接抓取(Outer Join Fetching)"
 
-#: index.docbook:1102
-msgid "If your database supports ANSI, Oracle or Sybase style outer joins, <emphasis>outer join fetching</emphasis> will often increase performance by limiting the number of round trips to and from the database (at the cost of possibly more work performed by the database itself). Outer join fetching allows a whole graph of objects connected by many-to-one, one-to-many, many-to-many and one-to-one associations to be retrieved in a single SQL <literal>SELECT</literal>."
+#. Tag: para
+#: configuration.xml:1102
+#, no-c-format
+msgid ""
+"If your database supports ANSI, Oracle or Sybase style outer joins, "
+"<emphasis>outer join fetching</emphasis> will often increase performance by "
+"limiting the number of round trips to and from the database (at the cost of "
+"possibly more work performed by the database itself). Outer join fetching "
+"allows a whole graph of objects connected by many-to-one, one-to-many, many-"
+"to-many and one-to-one associations to be retrieved in a single SQL "
+"<literal>SELECT</literal>."
 msgstr ""
+"如果你的数据库支持ANSI, Oracle或Sybase风格的外连接, <emphasis>外连接抓取</"
+"emphasis>通常能通过限制往返数据库次数 (更多的工作交由数据库自己来完成)来提高"
+"效率. 外连接抓取允许在单个<literal>SELECT</literal>SQL语句中, 通过many-to-"
+"one, one-to-many, many-to-many和one-to-one关联获取连接对象的整个对象图."
 
-#: index.docbook:1111
-msgid "Outer join fetching may be disabled <emphasis>globally</emphasis> by setting the property <literal>hibernate.max_fetch_depth</literal> to <literal>0</literal>. A setting of <literal>1</literal> or higher enables outer join fetching for one-to-one and many-to-one associations which have been mapped with <literal>fetch=\"join\"</literal>."
+#. Tag: para
+#: configuration.xml:1111
+#, no-c-format
+msgid ""
+"Outer join fetching may be disabled <emphasis>globally</emphasis> by setting "
+"the property <literal>hibernate.max_fetch_depth</literal> to <literal>0</"
+"literal>. A setting of <literal>1</literal> or higher enables outer join "
+"fetching for one-to-one and many-to-one associations which have been mapped "
+"with <literal>fetch=\"join\"</literal>."
 msgstr ""
+"将<literal>hibernate.max_fetch_depth</literal>设为<literal>0</literal>能在"
+"<emphasis>全局</emphasis> 范围内禁止外连接抓取. 设为<literal>1</literal>或更"
+"高值能启用one-to-one和many-to-oneouter关联的外连接抓取, 它们通过 "
+"<literal>fetch=\"join\"</literal>来映射."
 
-#: index.docbook:1119
+#. Tag: para
+#: configuration.xml:1119
+#, no-c-format
 msgid "See <xref linkend=\"performance-fetching\"/> for more information."
-msgstr ""
+msgstr "参见<xref linkend=\"performance-fetching\"/>获得更多信息."
 
-#: index.docbook:1126
+#. Tag: title
+#: configuration.xml:1126
+#, no-c-format
 msgid "Binary Streams"
-msgstr ""
+msgstr "二进制流 (Binary Streams)"
 
-#: index.docbook:1128
-msgid "Oracle limits the size of <literal>byte</literal> arrays that may be passed to/from its JDBC driver. If you wish to use large instances of <literal>binary</literal> or <literal>serializable</literal> type, you should enable <literal>hibernate.jdbc.use_streams_for_binary</literal>. <emphasis>This is a system-level setting only.</emphasis>"
+#. Tag: para
+#: configuration.xml:1128
+#, no-c-format
+msgid ""
+"Oracle limits the size of <literal>byte</literal> arrays that may be passed "
+"to/from its JDBC driver. If you wish to use large instances of "
+"<literal>binary</literal> or <literal>serializable</literal> type, you "
+"should enable <literal>hibernate.jdbc.use_streams_for_binary</literal>. "
+"<emphasis>This is a system-level setting only.</emphasis>"
 msgstr ""
+"Oracle限制那些通过JDBC驱动传输的<literal>字节</literal>数组的数目. 如果你希望"
+"使用<literal>二进值 (binary)</literal>或 <literal>可序列化的 (serializable)</"
+"literal>类型的大对象, 你应该开启 <literal>hibernate.jdbc."
+"use_streams_for_binary</literal>属性. <emphasis>这是系统级属性.</emphasis>"
 
-#: index.docbook:1139
+#. Tag: title
+#: configuration.xml:1139
+#, no-c-format
 msgid "Second-level and query cache"
-msgstr ""
+msgstr "二级缓存与查询缓存"
 
-#: index.docbook:1141
-msgid "The properties prefixed by <literal>hibernate.cache</literal> allow you to use a process or cluster scoped second-level cache system with Hibernate. See the <xref linkend=\"performance-cache\"/> for more details."
+#. Tag: para
+#: configuration.xml:1141
+#, no-c-format
+msgid ""
+"The properties prefixed by <literal>hibernate.cache</literal> allow you to "
+"use a process or cluster scoped second-level cache system with Hibernate. "
+"See the <xref linkend=\"performance-cache\"/> for more details."
 msgstr ""
+"以<literal>hibernate.cache</literal>为前缀的属性允许你在Hibernate中,使用进程"
+"或群集范围内的二级缓存系统. 参见<xref linkend=\"performance-cache\"/>获取更多"
+"的详情."
 
-#: index.docbook:1151
+#. Tag: title
+#: configuration.xml:1151
+#, no-c-format
 msgid "Query Language Substitution"
-msgstr ""
+msgstr "查询语言中的替换"
 
-#: index.docbook:1153
-msgid "You may define new Hibernate query tokens using <literal>hibernate.query.substitutions</literal>. For example:"
+#. Tag: para
+#: configuration.xml:1153
+#, no-c-format
+msgid ""
+"You may define new Hibernate query tokens using <literal>hibernate.query."
+"substitutions</literal>. For example:"
 msgstr ""
+"你可以使用<literal>hibernate.query.substitutions</literal>在Hibernate中定义新"
+"的查询符号. 例如:"
 
-#: index.docbook:1158
+#. Tag: programlisting
+#: configuration.xml:1158
+#, no-c-format
 msgid "hibernate.query.substitutions true=1, false=0"
-msgstr ""
+msgstr "hibernate.query.substitutions true=1, false=0"
 
-#: index.docbook:1160
-msgid "would cause the tokens <literal>true</literal> and <literal>false</literal> to be translated to integer literals in the generated SQL."
+#. Tag: para
+#: configuration.xml:1160
+#, no-c-format
+msgid ""
+"would cause the tokens <literal>true</literal> and <literal>false</literal> "
+"to be translated to integer literals in the generated SQL."
 msgstr ""
+"将导致符号<literal>true</literal>和<literal>false</literal>在生成的SQL中被翻"
+"译成整数常量."
 
-#: index.docbook:1165
+#. Tag: programlisting
+#: configuration.xml:1165
+#, no-c-format
 msgid "hibernate.query.substitutions toLowercase=LOWER"
-msgstr ""
+msgstr "hibernate.query.substitutions toLowercase=LOWER"
 
-#: index.docbook:1167
+#. Tag: para
+#: configuration.xml:1167
+#, no-c-format
 msgid "would allow you to rename the SQL <literal>LOWER</literal> function."
-msgstr ""
+msgstr "将允许你重命名SQL中的<literal>LOWER</literal>函数."
 
-#: index.docbook:1174
+#. Tag: title
+#: configuration.xml:1174
+#, no-c-format
 msgid "Hibernate statistics"
-msgstr ""
+msgstr "Hibernate的统计(statistics)机制"
 
-#: index.docbook:1176
-msgid "If you enable <literal>hibernate.generate_statistics</literal>, Hibernate will expose a number of metrics that are useful when tuning a running system via <literal>SessionFactory.getStatistics()</literal>. Hibernate can even be configured to expose these statistics via JMX. Read the Javadoc of the interfaces in <literal>org.hibernate.stats</literal> for more information."
+#. Tag: para
+#: configuration.xml:1176
+#, no-c-format
+msgid ""
+"If you enable <literal>hibernate.generate_statistics</literal>, Hibernate "
+"will expose a number of metrics that are useful when tuning a running system "
+"via <literal>SessionFactory.getStatistics()</literal>. Hibernate can even be "
+"configured to expose these statistics via JMX. Read the Javadoc of the "
+"interfaces in <literal>org.hibernate.stats</literal> for more information."
 msgstr ""
+"如果你开启<literal>hibernate.generate_statistics</literal>, 那么当你通过 "
+"<literal>SessionFactory.getStatistics()</literal>调整正在运行的系统时,"
+"Hibernate将导出大量有用的数据. Hibernate甚至能被配置成通过JMX导出这些统计信"
+"息. 参考<literal>org.hibernate.stats</literal>中接口的Javadoc,以获得更多信"
+"息."
 
-#: index.docbook:1188
+#. Tag: title
+#: configuration.xml:1188
+#, no-c-format
 msgid "Logging"
-msgstr ""
+msgstr "日志"
 
-#: index.docbook:1190
+#. Tag: para
+#: configuration.xml:1190
+#, no-c-format
 msgid "Hibernate logs various events using Apache commons-logging."
-msgstr ""
+msgstr "Hibernate使用Apache commons-logging来为各种事件记录日志."
 
-#: index.docbook:1194
-msgid "The commons-logging service will direct output to either Apache Log4j (if you include <literal>log4j.jar</literal> in your classpath) or JDK1.4 logging (if running under JDK1.4 or above). You may download Log4j from <literal>http://jakarta.apache.org</literal>. To use Log4j you will need to place a <literal>log4j.properties</literal> file in your classpath, an example properties file is distributed with Hibernate in the <literal>src/</literal> directory."
+#. Tag: para
+#: configuration.xml:1194
+#, no-c-format
+msgid ""
+"The commons-logging service will direct output to either Apache Log4j (if "
+"you include <literal>log4j.jar</literal> in your classpath) or JDK1.4 "
+"logging (if running under JDK1.4 or above). You may download Log4j from "
+"<literal>http://jakarta.apache.org</literal>. To use Log4j you will need to "
+"place a <literal>log4j.properties</literal> file in your classpath, an "
+"example properties file is distributed with Hibernate in the <literal>src/</"
+"literal> directory."
 msgstr ""
+"commons-logging将直接输出到Apache Log4j(如果在类路径中包括<literal>log4j."
+"jar</literal>)或 JDK1.4 logging (如果运行在JDK1.4或以上的环境下). 你可以从"
+"<literal>http://jakarta.apache.org</literal> 下载Log4j. 要使用Log4j,你需要将"
+"<literal>log4j.properties</literal>文件放置在类路径下, 随Hibernate 一同分发的"
+"样例属性文件在<literal>src/</literal>目录下."
 
-#: index.docbook:1204
-msgid "We strongly recommend that you familiarize yourself with Hibernate's log messages. A lot of work has been put into making the Hibernate log as detailed as possible, without making it unreadable. It is an essential troubleshooting device. The most interesting log categories are the following:"
+#. Tag: para
+#: configuration.xml:1204
+#, no-c-format
+msgid ""
+"We strongly recommend that you familiarize yourself with Hibernate's log "
+"messages. A lot of work has been put into making the Hibernate log as "
+"detailed as possible, without making it unreadable. It is an essential "
+"troubleshooting device. The most interesting log categories are the "
+"following:"
 msgstr ""
+"我们强烈建议你熟悉一下Hibernate的日志消息. 在不失可读性的前提下, 我们做了很"
+"多工作,使Hibernate的日志可能地详细. 这是必要的查错利器. 最令人感兴趣的日志分"
+"类有如下这些:"
 
-#: index.docbook:1213
+#. Tag: title
+#: configuration.xml:1213
+#, no-c-format
 msgid "Hibernate Log Categories"
-msgstr ""
+msgstr "Hibernate日志类别"
 
-#: index.docbook:1219
+#. Tag: entry
+#: configuration.xml:1219
+#, no-c-format
 msgid "Category"
-msgstr ""
+msgstr "类别"
 
-#: index.docbook:1220
+#. Tag: entry
+#: configuration.xml:1220
+#, no-c-format
 msgid "Function"
-msgstr ""
+msgstr "功能"
 
-#: index.docbook:1225
+#. Tag: literal
+#: configuration.xml:1225
+#, no-c-format
 msgid "org.hibernate.SQL"
-msgstr ""
+msgstr "org.hibernate.SQL"
 
-#: index.docbook:1226
+#. Tag: entry
+#: configuration.xml:1226
+#, no-c-format
 msgid "Log all SQL DML statements as they are executed"
-msgstr ""
+msgstr "在所有SQL DML语句被执行时为它们记录日志"
 
-#: index.docbook:1229
+#. Tag: literal
+#: configuration.xml:1229
+#, no-c-format
 msgid "org.hibernate.type"
-msgstr ""
+msgstr "org.hibernate.type"
 
-#: index.docbook:1230
+#. Tag: entry
+#: configuration.xml:1230
+#, no-c-format
 msgid "Log all JDBC parameters"
-msgstr ""
+msgstr "为所有JDBC参数记录日志"
 
-#: index.docbook:1233
+#. Tag: literal
+#: configuration.xml:1233
+#, no-c-format
 msgid "org.hibernate.tool.hbm2ddl"
-msgstr ""
+msgstr "org.hibernate.tool.hbm2ddl"
 
-#: index.docbook:1234
+#. Tag: entry
+#: configuration.xml:1234
+#, no-c-format
 msgid "Log all SQL DDL statements as they are executed"
-msgstr ""
+msgstr "在所有SQL DDL语句执行时为它们记录日志"
 
-#: index.docbook:1237
+#. Tag: literal
+#: configuration.xml:1237
+#, no-c-format
 msgid "org.hibernate.pretty"
-msgstr ""
+msgstr "org.hibernate.pretty"
 
-#: index.docbook:1238
-msgid "Log the state of all entities (max 20 entities) associated with the session at flush time"
-msgstr ""
+#. Tag: entry
+#: configuration.xml:1238
+#, no-c-format
+msgid ""
+"Log the state of all entities (max 20 entities) associated with the session "
+"at flush time"
+msgstr "在session清洗(flush)时,为所有与其关联的实体(最多20个)的状态记录日志"
 
-#: index.docbook:1244
+#. Tag: literal
+#: configuration.xml:1244
+#, no-c-format
 msgid "org.hibernate.cache"
-msgstr ""
+msgstr "org.hibernate.cache"
 
-#: index.docbook:1245
+#. Tag: entry
+#: configuration.xml:1245
+#, no-c-format
 msgid "Log all second-level cache activity"
-msgstr ""
+msgstr "为所有二级缓存的活动记录日志"
 
-#: index.docbook:1248
+#. Tag: literal
+#: configuration.xml:1248
+#, no-c-format
 msgid "org.hibernate.transaction"
-msgstr ""
+msgstr "org.hibernate.transaction"
 
-#: index.docbook:1249
+#. Tag: entry
+#: configuration.xml:1249
+#, no-c-format
 msgid "Log transaction related activity"
-msgstr ""
+msgstr "为事务相关的活动记录日志"
 
-#: index.docbook:1252
+#. Tag: literal
+#: configuration.xml:1252
+#, no-c-format
 msgid "org.hibernate.jdbc"
-msgstr ""
+msgstr "org.hibernate.jdbc"
 
-#: index.docbook:1253
+#. Tag: entry
+#: configuration.xml:1253
+#, no-c-format
 msgid "Log all JDBC resource acquisition"
-msgstr ""
+msgstr "为所有JDBC资源的获取记录日志"
 
-#: index.docbook:1256
+#. Tag: literal
+#: configuration.xml:1256
+#, no-c-format
 msgid "org.hibernate.hql.ast.AST"
-msgstr ""
+msgstr "org.hibernate.hql.AST"
 
-#: index.docbook:1257
+#. Tag: entry
+#: configuration.xml:1257
+#, no-c-format
 msgid "Log HQL and SQL ASTs during query parsing"
-msgstr ""
+msgstr "在解析查询的时候,记录HQL和SQL的AST分析日志"
 
-#: index.docbook:1262
+#. Tag: literal
+#: configuration.xml:1262
+#, no-c-format
 msgid "org.hibernate.secure"
-msgstr ""
+msgstr "org.hibernate.secure"
 
-#: index.docbook:1263
+#. Tag: entry
+#: configuration.xml:1263
+#, no-c-format
 msgid "Log all JAAS authorization requests"
-msgstr ""
+msgstr "为JAAS认证请求做日志"
 
-#: index.docbook:1266
+#. Tag: literal
+#: configuration.xml:1266
+#, no-c-format
 msgid "org.hibernate"
-msgstr ""
+msgstr "org.hibernate"
 
-#: index.docbook:1267
-msgid "Log everything (a lot of information, but very useful for troubleshooting)"
-msgstr ""
+#. Tag: entry
+#: configuration.xml:1267
+#, no-c-format
+msgid ""
+"Log everything (a lot of information, but very useful for troubleshooting)"
+msgstr "为任何Hibernate相关信息做日志 (信息量较大, 但对查错非常有帮助)"
 
-#: index.docbook:1276
-msgid "When developing applications with Hibernate, you should almost always work with <literal>debug</literal> enabled for the category <literal>org.hibernate.SQL</literal>, or, alternatively, the property <literal>hibernate.show_sql</literal> enabled."
+#. Tag: para
+#: configuration.xml:1276
+#, no-c-format
+msgid ""
+"When developing applications with Hibernate, you should almost always work "
+"with <literal>debug</literal> enabled for the category <literal>org."
+"hibernate.SQL</literal>, or, alternatively, the property <literal>hibernate."
+"show_sql</literal> enabled."
 msgstr ""
+"在使用Hibernate开发应用程序时, 你应当总是为<literal>org.hibernate.SQL</"
+"literal> 开启<literal>debug</literal>级别的日志记录,或者开启"
+"<literal>hibernate.show_sql</literal>属性。"
 
-#: index.docbook:1286
+#. Tag: title
+#: configuration.xml:1286
+#, no-c-format
 msgid "Implementing a <literal>NamingStrategy</literal>"
-msgstr ""
+msgstr "实现<literal>NamingStrategy</literal>"
 
-#: index.docbook:1288
-msgid "The interface <literal>org.hibernate.cfg.NamingStrategy</literal> allows you to specify a \"naming standard\" for database objects and schema elements."
+#. Tag: para
+#: configuration.xml:1288
+#, no-c-format
+msgid ""
+"The interface <literal>org.hibernate.cfg.NamingStrategy</literal> allows you "
+"to specify a \"naming standard\" for database objects and schema elements."
 msgstr ""
+"<literal>org.hibernate.cfg.NamingStrategy</literal>接口允许你为数据库中的对象"
+"和schema 元素指定一个“命名标准”."
 
-#: index.docbook:1293
-msgid "You may provide rules for automatically generating database identifiers from Java identifiers or for processing \"logical\" column and table names given in the mapping file into \"physical\" table and column names. This feature helps reduce the verbosity of the mapping document, eliminating repetitive noise (<literal>TBL_</literal> prefixes, for example). The default strategy used by Hibernate is quite minimal."
+#. Tag: para
+#: configuration.xml:1293
+#, no-c-format
+msgid ""
+"You may provide rules for automatically generating database identifiers from "
+"Java identifiers or for processing \"logical\" column and table names given "
+"in the mapping file into \"physical\" table and column names. This feature "
+"helps reduce the verbosity of the mapping document, eliminating repetitive "
+"noise (<literal>TBL_</literal> prefixes, for example). The default strategy "
+"used by Hibernate is quite minimal."
 msgstr ""
+"你可能会提供一些通过Java标识生成数据库标识或将映射定义文件中\"逻辑\"表/列名处"
+"理成\"物理\"表/列名的规则. 这个特性有助于减少冗长的映射定义文件."
 
-#: index.docbook:1302
-msgid "You may specify a different strategy by calling <literal>Configuration.setNamingStrategy()</literal> before adding mappings:"
+#. Tag: para
+#: configuration.xml:1302
+#, no-c-format
+msgid ""
+"You may specify a different strategy by calling <literal>Configuration."
+"setNamingStrategy()</literal> before adding mappings:"
 msgstr ""
+"在加入映射定义前,你可以调用 <literal>Configuration.setNamingStrategy()</"
+"literal>指定一个不同的命名策略:"
 
-#: index.docbook:1307
+#. Tag: programlisting
+#: configuration.xml:1307
+#, no-c-format
 msgid ""
-      "<![CDATA[SessionFactory sf = new Configuration()\n"
-      "    .setNamingStrategy(ImprovedNamingStrategy.INSTANCE)\n"
-      "    .addFile(\"Item.hbm.xml\")\n"
-      "    .addFile(\"Bid.hbm.xml\")\n"
-      "    .buildSessionFactory();]]>"
+"<![CDATA[SessionFactory sf = new Configuration()\n"
+"    .setNamingStrategy(ImprovedNamingStrategy.INSTANCE)\n"
+"    .addFile(\"Item.hbm.xml\")\n"
+"    .addFile(\"Bid.hbm.xml\")\n"
+"    .buildSessionFactory();]]>"
 msgstr ""
 
-#: index.docbook:1309
-msgid "<literal>org.hibernate.cfg.ImprovedNamingStrategy</literal> is a built-in strategy that might be a useful starting point for some applications."
+#. Tag: para
+#: configuration.xml:1309
+#, no-c-format
+msgid ""
+"<literal>org.hibernate.cfg.ImprovedNamingStrategy</literal> is a built-in "
+"strategy that might be a useful starting point for some applications."
 msgstr ""
+"<literal>org.hibernate.cfg.ImprovedNamingStrategy</literal>是一个内建的命名策"
+"略, 对 一些应用程序而言,可能是非常有用的起点."
 
-#: index.docbook:1317
+#. Tag: title
+#: configuration.xml:1317
+#, no-c-format
 msgid "XML configuration file"
-msgstr ""
+msgstr "XML配置文件"
 
-#: index.docbook:1319
-msgid "An alternative approach to configuration is to specify a full configuration in a file named <literal>hibernate.cfg.xml</literal>. This file can be used as a replacement for the <literal>hibernate.properties</literal> file or, if both are present, to override properties."
+#. Tag: para
+#: configuration.xml:1319
+#, no-c-format
+msgid ""
+"An alternative approach to configuration is to specify a full configuration "
+"in a file named <literal>hibernate.cfg.xml</literal>. This file can be used "
+"as a replacement for the <literal>hibernate.properties</literal> file or, if "
+"both are present, to override properties."
 msgstr ""
+"另一个配置方法是在<literal>hibernate.cfg.xml</literal>文件中指定一套完整的配"
+"置. 这个文件可以当成<literal>hibernate.properties</literal>的替代。 若两个文"
+"件同时存在,它将覆盖前者的属性."
 
-#: index.docbook:1326
-msgid "The XML configuration file is by default expected to be in the root o your <literal>CLASSPATH</literal>. Here is an example:"
+#. Tag: para
+#: configuration.xml:1326
+#, no-c-format
+msgid ""
+"The XML configuration file is by default expected to be in the root o your "
+"<literal>CLASSPATH</literal>. Here is an example:"
 msgstr ""
+"XML配置文件被默认是放在<literal>CLASSPATH</literal>的根目录下. 这是一个例子:"
 
-#: index.docbook:1331
+#. Tag: programlisting
+#: configuration.xml:1331
+#, no-c-format
 msgid ""
-      "<![CDATA[<?xml version='1.0' encoding='utf-8'?>\n"
-      "<!DOCTYPE hibernate-configuration PUBLIC\n"
-      "    \"-//Hibernate/Hibernate Configuration DTD//EN\"\n"
-      "    \"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd\">\n"
-      "\n"
-      "<hibernate-configuration>\n"
-      "\n"
-      "    <!-- a SessionFactory instance listed as /jndi/name -->\n"
-      "    <session-factory\n"
-      "        name=\"java:hibernate/SessionFactory\">\n"
-      "\n"
-      "        <!-- properties -->\n"
-      "        <property name=\"connection.datasource\">java:/comp/env/jdbc/MyDB</property>\n"
-      "        <property name=\"dialect\">org.hibernate.dialect.MySQLDialect</property>\n"
-      "        <property name=\"show_sql\">false</property>\n"
-      "        <property name=\"transaction.factory_class\">\n"
-      "            org.hibernate.transaction.JTATransactionFactory\n"
-      "        </property>\n"
-      "        <property name=\"jta.UserTransaction\">java:comp/UserTransaction</property>\n"
-      "\n"
-      "        <!-- mapping files -->\n"
-      "        <mapping resource=\"org/hibernate/auction/Item.hbm.xml\"/>\n"
-      "        <mapping resource=\"org/hibernate/auction/Bid.hbm.xml\"/>\n"
-      "\n"
-      "        <!-- cache settings -->\n"
-      "        <class-cache class=\"org.hibernate.auction.Item\" usage=\"read-write\"/>\n"
-      "        <class-cache class=\"org.hibernate.auction.Bid\" usage=\"read-only\"/>\n"
-      "        <collection-cache collection=\"org.hibernate.auction.Item.bids\" usage=\"read-write\"/>\n"
-      "\n"
-      "    </session-factory>\n"
-      "\n"
-      "</hibernate-configuration>]]>"
+"<![CDATA[<?xml version='1.0' encoding='utf-8'?>\n"
+"<!DOCTYPE hibernate-configuration PUBLIC\n"
+"    \"-//Hibernate/Hibernate Configuration DTD//EN\"\n"
+"    \"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd\">\n"
+"\n"
+"<hibernate-configuration>\n"
+"\n"
+"    <!-- a SessionFactory instance listed as /jndi/name -->\n"
+"    <session-factory\n"
+"        name=\"java:hibernate/SessionFactory\">\n"
+"\n"
+"        <!-- properties -->\n"
+"        <property name=\"connection.datasource\">java:/comp/env/jdbc/MyDB</"
+"property>\n"
+"        <property name=\"dialect\">org.hibernate.dialect.MySQLDialect</"
+"property>\n"
+"        <property name=\"show_sql\">false</property>\n"
+"        <property name=\"transaction.factory_class\">\n"
+"            org.hibernate.transaction.JTATransactionFactory\n"
+"        </property>\n"
+"        <property name=\"jta.UserTransaction\">java:comp/UserTransaction</"
+"property>\n"
+"\n"
+"        <!-- mapping files -->\n"
+"        <mapping resource=\"org/hibernate/auction/Item.hbm.xml\"/>\n"
+"        <mapping resource=\"org/hibernate/auction/Bid.hbm.xml\"/>\n"
+"\n"
+"        <!-- cache settings -->\n"
+"        <class-cache class=\"org.hibernate.auction.Item\" usage=\"read-write"
+"\"/>\n"
+"        <class-cache class=\"org.hibernate.auction.Bid\" usage=\"read-only\"/"
+">\n"
+"        <collection-cache collection=\"org.hibernate.auction.Item.bids\" "
+"usage=\"read-write\"/>\n"
+"\n"
+"    </session-factory>\n"
+"\n"
+"</hibernate-configuration>]]>"
 msgstr ""
 
-#: index.docbook:1333
-msgid "As you can see, the advantage of this approach is the externalization of the mapping file names to configuration. The <literal>hibernate.cfg.xml</literal> is also more convenient once you have to tune the Hibernate cache. Note that is your choice to use either <literal>hibernate.properties</literal> or <literal>hibernate.cfg.xml</literal>, both are equivalent, except for the above mentioned benefits of using the XML syntax."
+#. Tag: para
+#: configuration.xml:1333
+#, no-c-format
+msgid ""
+"As you can see, the advantage of this approach is the externalization of the "
+"mapping file names to configuration. The <literal>hibernate.cfg.xml</"
+"literal> is also more convenient once you have to tune the Hibernate cache. "
+"Note that is your choice to use either <literal>hibernate.properties</"
+"literal> or <literal>hibernate.cfg.xml</literal>, both are equivalent, "
+"except for the above mentioned benefits of using the XML syntax."
 msgstr ""
+"如你所见, 这个方法优势在于,在配置文件中指出了映射定义文件的名字. 一旦你需要"
+"调整Hibernate的缓存, <literal>hibernate.cfg.xml</literal>也是更方便. 注意,"
+"使用<literal>hibernate.properties</literal>还是 <literal>hibernate.cfg.xml</"
+"literal>完全是由你来决定, 除了上面提到的XML语法的优势之外, 两者是等价的."
 
-#: index.docbook:1342
+#. Tag: para
+#: configuration.xml:1342
+#, no-c-format
 msgid "With the XML configuration, starting Hibernate is then as simple as"
 msgstr ""
+"使用XML配置,使得启动Hibernate变的异常简单, 如下所示,一行代码就可以搞定:"
 
-#: index.docbook:1346
-msgid "<![CDATA[SessionFactory sf = new Configuration().configure().buildSessionFactory();]]>"
+#. Tag: programlisting
+#: configuration.xml:1346
+#, no-c-format
+msgid ""
+"<![CDATA[SessionFactory sf = new Configuration().configure()."
+"buildSessionFactory();]]>"
 msgstr ""
 
-#: index.docbook:1348
+#. Tag: para
+#: configuration.xml:1348
+#, no-c-format
 msgid "You can pick a different XML configuration file using"
-msgstr ""
+msgstr "你可以使用如下代码来添加一个不同的XML配置文件"
 
-#: index.docbook:1352
+#. Tag: programlisting
+#: configuration.xml:1352
+#, no-c-format
 msgid ""
-      "<![CDATA[SessionFactory sf = new Configuration()\n"
-      "    .configure(\"catdb.cfg.xml\")\n"
-      "    .buildSessionFactory();]]>"
+"<![CDATA[SessionFactory sf = new Configuration()\n"
+"    .configure(\"catdb.cfg.xml\")\n"
+"    .buildSessionFactory();]]>"
 msgstr ""
 
-#: index.docbook:1357
+#. Tag: title
+#: configuration.xml:1357
+#, no-c-format
 msgid "J2EE Application Server integration"
-msgstr ""
+msgstr "J2EE应用程序服务器的集成"
 
-#: index.docbook:1359
+#. Tag: para
+#: configuration.xml:1359
+#, no-c-format
 msgid "Hibernate has the following integration points for J2EE infrastructure:"
-msgstr ""
+msgstr "针对J2EE体系,Hibernate有如下几个集成的方面:"
 
-#: index.docbook:1365
-msgid "<emphasis>Container-managed datasources</emphasis>: Hibernate can use JDBC connections managed by the container and provided through JNDI. Usually, a JTA compatible <literal>TransactionManager</literal> and a <literal>ResourceManager</literal> take care of transaction management (CMT), esp. distributed transaction handling across several datasources. You may of course also demarcate transaction boundaries programmatically (BMT) or you might want to use the optional Hibernate <literal>Transaction</literal> API for this to keep your code portable."
+#. Tag: para
+#: configuration.xml:1365
+#, no-c-format
+msgid ""
+"<emphasis>Container-managed datasources</emphasis>: Hibernate can use JDBC "
+"connections managed by the container and provided through JNDI. Usually, a "
+"JTA compatible <literal>TransactionManager</literal> and a "
+"<literal>ResourceManager</literal> take care of transaction management "
+"(CMT), esp. distributed transaction handling across several datasources. You "
+"may of course also demarcate transaction boundaries programmatically (BMT) "
+"or you might want to use the optional Hibernate <literal>Transaction</"
+"literal> API for this to keep your code portable."
 msgstr ""
+"<emphasis>容器管理的数据源(Container-managed datasources)</emphasis>: "
+"Hibernate能使用通过容器管理,并由JNDI提供的JDBC连接. 通常, 特别是当处理多个数"
+"据源的分布式事务的时候, 由一个JTA兼容的<literal>TransactionManager</literal>"
+"和一个 <literal>ResourceManager</literal>来处理事务管理(CMT, 容器管理的事"
+"务). 当然你可以通过 编程方式来划分事务边界(BMT, Bean管理的事务). 或者为了代码"
+"的可移植性,你也也许会想使用可选的 Hibernate <literal>Transaction</literal> "
+"API."
 
-#: index.docbook:1380
-msgid "<emphasis>Automatic JNDI binding</emphasis>: Hibernate can bind its <literal>SessionFactory</literal> to JNDI after startup."
+#. Tag: para
+#: configuration.xml:1380
+#, no-c-format
+msgid ""
+"<emphasis>Automatic JNDI binding</emphasis>: Hibernate can bind its "
+"<literal>SessionFactory</literal> to JNDI after startup."
 msgstr ""
+"<emphasis>自动JNDI绑定</emphasis>: Hibernate可以在启动后将 "
+"<literal>SessionFactory</literal>绑定到JNDI."
 
-#: index.docbook:1389
-msgid "<emphasis>JTA Session binding:</emphasis> The Hibernate <literal>Session</literal> may be automatically bound to the scope of JTA transactions. Simply lookup the <literal>SessionFactory</literal> from JNDI and get the current <literal>Session</literal>. Let Hibernate take care of flushing and closing the <literal>Session</literal> when your JTA transaction completes. Transaction demarcation is either declarative (CMT) or programmatic (BMT/UserTransaction)."
+#. Tag: para
+#: configuration.xml:1389
+#, no-c-format
+msgid ""
+"<emphasis>JTA Session binding:</emphasis> The Hibernate <literal>Session</"
+"literal> may be automatically bound to the scope of JTA transactions. Simply "
+"lookup the <literal>SessionFactory</literal> from JNDI and get the current "
+"<literal>Session</literal>. Let Hibernate take care of flushing and closing "
+"the <literal>Session</literal> when your JTA transaction completes. "
+"Transaction demarcation is either declarative (CMT) or programmatic (BMT/"
+"UserTransaction)."
 msgstr ""
+"<emphasis>JTA Session绑定:</emphasis> Hibernate <literal>Session</literal> 可"
+"以自动绑定到JTA事务作用的范围. 只需简单地从JNDI查找<literal>SessionFactory</"
+"literal>并获得当前的 <literal>Session</literal>. 当JTA事务完成时, 让Hibernate"
+"来处理 <literal>Session</literal>的清洗(flush)与关闭. 事务的划分可以是声明式"
+"的(CMT),也可以是编程式的(BMT/UserTransaction)."
 
-#: index.docbook:1402
-msgid "<emphasis>JMX deployment:</emphasis> If you have a JMX capable application server (e.g. JBoss AS), you can chose to deploy Hibernate as a managed MBean. This saves you the one line startup code to build your <literal>SessionFactory</literal> from a <literal>Configuration</literal>. The container will startup your <literal>HibernateService</literal>, and ideally also take care of service dependencies (Datasource has to be available before Hibernate starts, etc)."
+#. Tag: para
+#: configuration.xml:1402
+#, no-c-format
+msgid ""
+"<emphasis>JMX deployment:</emphasis> If you have a JMX capable application "
+"server (e.g. JBoss AS), you can chose to deploy Hibernate as a managed "
+"MBean. This saves you the one line startup code to build your "
+"<literal>SessionFactory</literal> from a <literal>Configuration</literal>. "
+"The container will startup your <literal>HibernateService</literal>, and "
+"ideally also take care of service dependencies (Datasource has to be "
+"available before Hibernate starts, etc)."
 msgstr ""
+"<emphasis>JMX部署:</emphasis> 如果你使用支持JMX应用程序服务器(如, JBoss AS), "
+"那么你可以选择将Hibernate部署成托管MBean. 这将为你省去一行从"
+"<literal>Configuration</literal>构建<literal>SessionFactory</literal>的启动代"
+"码. 容器将启动你的<literal>HibernateService</literal>, 并完美地处理好服务间的"
+"依赖关系 (在Hibernate启动前,数据源必须是可用的,等等)."
 
-#: index.docbook:1413
-msgid "Depending on your environment, you might have to set the configuration option <literal>hibernate.connection.aggressive_release</literal> to true if your application server shows \"connection containment\" exceptions."
+#. Tag: para
+#: configuration.xml:1413
+#, no-c-format
+msgid ""
+"Depending on your environment, you might have to set the configuration "
+"option <literal>hibernate.connection.aggressive_release</literal> to true if "
+"your application server shows \"connection containment\" exceptions."
 msgstr ""
+"如果应用程序服务器抛出\"connection containment\"异常, 根据你的环境,也许该将"
+"配置属性 <literal>hibernate.connection.release_mode</literal>设为"
+"<literal>after_statement</literal>."
 
-#: index.docbook:1420
+#. Tag: title
+#: configuration.xml:1420
+#, no-c-format
 msgid "Transaction strategy configuration"
-msgstr ""
+msgstr "事务策略配置"
 
-#: index.docbook:1422
-msgid "The Hibernate <literal>Session</literal> API is independent of any transaction demarcation system in your architecture. If you let Hibernate use JDBC directly, through a connection pool, you may begin and end your transactions by calling the JDBC API. If you run in a J2EE application server, you might want to use bean-managed transactions and call the JTA API and <literal>UserTransaction</literal> when needed."
+#. Tag: para
+#: configuration.xml:1422
+#, no-c-format
+msgid ""
+"The Hibernate <literal>Session</literal> API is independent of any "
+"transaction demarcation system in your architecture. If you let Hibernate "
+"use JDBC directly, through a connection pool, you may begin and end your "
+"transactions by calling the JDBC API. If you run in a J2EE application "
+"server, you might want to use bean-managed transactions and call the JTA API "
+"and <literal>UserTransaction</literal> when needed."
 msgstr ""
+"在你的架构中,Hibernate的<literal>Session</literal> API是独立于任何事务分界系"
+"统的. 如果你让Hibernate通过连接池直接使用JDBC, 你需要调用JDBC API来打开和关闭"
+"你的事务. 如果你运行在J2EE应用程序服务器中, 你也许想用Bean管理的事务并在需要"
+"的时候调用JTA API和<literal>UserTransaction</literal>."
 
-#: index.docbook:1430
-msgid "To keep your code portable between these two (and other) environments we recommend the optional Hibernate <literal>Transaction</literal> API, which wraps and hides the underlying system. You have to specify a factory class for <literal>Transaction</literal> instances by setting the Hibernate configuration property <literal>hibernate.transaction.factory_class</literal>."
+#. Tag: para
+#: configuration.xml:1430
+#, no-c-format
+msgid ""
+"To keep your code portable between these two (and other) environments we "
+"recommend the optional Hibernate <literal>Transaction</literal> API, which "
+"wraps and hides the underlying system. You have to specify a factory class "
+"for <literal>Transaction</literal> instances by setting the Hibernate "
+"configuration property <literal>hibernate.transaction.factory_class</"
+"literal>."
 msgstr ""
+"为了让你的代码在两种(或其他)环境中可以移植,我们建议使用可选的Hibernate "
+"<literal>Transaction</literal> API, 它包装并隐藏了底层系统. 你必须通过设置"
+"Hibernate配置属性<literal>hibernate.transaction.factory_class</literal>来指"
+"定 一个<literal>Transaction</literal>实例的工厂类."
 
-#: index.docbook:1437
+#. Tag: para
+#: configuration.xml:1437
+#, no-c-format
 msgid "There are three standard (built-in) choices:"
-msgstr ""
+msgstr "有三个标准(内建)的选择:"
 
-#: index.docbook:1443
+#. Tag: literal
+#: configuration.xml:1443
+#, no-c-format
 msgid "org.hibernate.transaction.JDBCTransactionFactory"
-msgstr ""
+msgstr "org.hibernate.transaction.JDBCTransactionFactory"
 
-#: index.docbook:1445
+#. Tag: para
+#: configuration.xml:1445
+#, no-c-format
 msgid "delegates to database (JDBC) transactions (default)"
-msgstr ""
+msgstr "委托给数据库(JDBC)事务(默认)"
 
-#: index.docbook:1449
+#. Tag: literal
+#: configuration.xml:1449
+#, no-c-format
 msgid "org.hibernate.transaction.JTATransactionFactory"
-msgstr ""
+msgstr "org.hibernate.transaction.JTATransactionFactory"
 
-#: index.docbook:1451
-msgid "delegates to container-managed transaction if an existing transaction is underway in this context (e.g. EJB session bean method), otherwise a new transaction is started and bean-managed transaction are used."
+#. Tag: para
+#: configuration.xml:1451
+#, no-c-format
+msgid ""
+"delegates to container-managed transaction if an existing transaction is "
+"underway in this context (e.g. EJB session bean method), otherwise a new "
+"transaction is started and bean-managed transaction are used."
 msgstr ""
+"如果在上下文环境中存在运行着的事务(如, EJB会话Bean的方法), 则委托给容器管 理"
+"的事务, 否则,将启动一个新的事务,并使用Bean管理的事务."
 
-#: index.docbook:1459
+#. Tag: literal
+#: configuration.xml:1459
+#, no-c-format
 msgid "org.hibernate.transaction.CMTTransactionFactory"
-msgstr ""
+msgstr "org.hibernate.transaction.CMTTransactionFactory"
 
-#: index.docbook:1461
+#. Tag: para
+#: configuration.xml:1461
+#, no-c-format
 msgid "delegates to container-managed JTA transactions"
-msgstr ""
+msgstr "委托给容器管理的JTA事务"
 
-#: index.docbook:1466
-msgid "You may also define your own transaction strategies (for a CORBA transaction service, for example)."
-msgstr ""
+#. Tag: para
+#: configuration.xml:1466
+#, no-c-format
+msgid ""
+"You may also define your own transaction strategies (for a CORBA transaction "
+"service, for example)."
+msgstr "你也可以定义属于你自己的事务策略 (如, 针对CORBA的事务服务)"
 
-#: index.docbook:1471
-msgid "Some features in Hibernate (i.e. the second level cache, Contextual Sessions with JTA, etc.) require access to the JTA <literal>TransactionManager</literal> in a managed environment. In an application server you have to specify how Hibernate should obtain a reference to the <literal>TransactionManager</literal>, since J2EE does not standardize a single mechanism:"
+#. Tag: para
+#: configuration.xml:1471
+#, no-c-format
+msgid ""
+"Some features in Hibernate (i.e. the second level cache, Contextual Sessions "
+"with JTA, etc.) require access to the JTA <literal>TransactionManager</"
+"literal> in a managed environment. In an application server you have to "
+"specify how Hibernate should obtain a reference to the "
+"<literal>TransactionManager</literal>, since J2EE does not standardize a "
+"single mechanism:"
 msgstr ""
+"Hibernate的一些特性 (比如二级缓存, Contextual Sessions with JTA等等)需要访问"
+"在托管环境中的JTA <literal>TransactionManager</literal>. 由于J2EE没有标准化一"
+"个单一的机制,Hibernate在应用程序服务器中,你必须指定Hibernate如何获得"
+"<literal>TransactionManager</literal>的引用:"
 
-#: index.docbook:1479
+#. Tag: title
+#: configuration.xml:1479
+#, no-c-format
 msgid "JTA TransactionManagers"
-msgstr ""
+msgstr "JTA TransactionManagers"
 
-#: index.docbook:1485
+#. Tag: entry
+#: configuration.xml:1485
+#, no-c-format
 msgid "Transaction Factory"
-msgstr ""
+msgstr "Transaction工厂类"
 
-#: index.docbook:1486
+#. Tag: entry
+#: configuration.xml:1486
+#, no-c-format
 msgid "Application Server"
-msgstr ""
+msgstr "应用程序服务器"
 
-#: index.docbook:1491
+#. Tag: literal
+#: configuration.xml:1491
+#, no-c-format
 msgid "org.hibernate.transaction.JBossTransactionManagerLookup"
-msgstr ""
+msgstr "org.hibernate.transaction.JBossTransactionManagerLookup"
 
-#: index.docbook:1492
+#. Tag: entry
+#: configuration.xml:1492
+#, no-c-format
 msgid "JBoss"
-msgstr ""
+msgstr "JBoss"
 
-#: index.docbook:1495
+#. Tag: literal
+#: configuration.xml:1495
+#, no-c-format
 msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup"
-msgstr ""
+msgstr "org.hibernate.transaction.WeblogicTransactionManagerLookup"
 
-#: index.docbook:1496
+#. Tag: entry
+#: configuration.xml:1496
+#, no-c-format
 msgid "Weblogic"
-msgstr ""
+msgstr "Weblogic"
 
-#: index.docbook:1499
+#. Tag: literal
+#: configuration.xml:1499
+#, no-c-format
 msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup"
-msgstr ""
+msgstr "org.hibernate.transaction.WebSphereTransactionManagerLookup"
 
-#: index.docbook:1500
+#. Tag: entry
+#: configuration.xml:1500
+#, no-c-format
 msgid "WebSphere"
-msgstr ""
+msgstr "WebSphere"
 
-#: index.docbook:1503
+#. Tag: literal
+#: configuration.xml:1503
+#, no-c-format
 msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"
-msgstr ""
+msgstr "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"
 
-#: index.docbook:1504
+#. Tag: entry
+#: configuration.xml:1504
+#, no-c-format
 msgid "WebSphere 6"
-msgstr ""
+msgstr "WebSphere 6"
 
-#: index.docbook:1507
+#. Tag: literal
+#: configuration.xml:1507
+#, no-c-format
 msgid "org.hibernate.transaction.OrionTransactionManagerLookup"
-msgstr ""
+msgstr "org.hibernate.transaction.OrionTransactionManagerLookup"
 
-#: index.docbook:1508
+#. Tag: entry
+#: configuration.xml:1508
+#, no-c-format
 msgid "Orion"
-msgstr ""
+msgstr "Orion"
 
-#: index.docbook:1511
+#. Tag: literal
+#: configuration.xml:1511
+#, no-c-format
 msgid "org.hibernate.transaction.ResinTransactionManagerLookup"
-msgstr ""
+msgstr "org.hibernate.transaction.ResinTransactionManagerLookup"
 
-#: index.docbook:1512
+#. Tag: entry
+#: configuration.xml:1512
+#, no-c-format
 msgid "Resin"
-msgstr ""
+msgstr "Resin"
 
-#: index.docbook:1515
+#. Tag: literal
+#: configuration.xml:1515
+#, no-c-format
 msgid "org.hibernate.transaction.JOTMTransactionManagerLookup"
-msgstr ""
+msgstr "org.hibernate.transaction.JOTMTransactionManagerLookup"
 
-#: index.docbook:1516
+#. Tag: entry
+#: configuration.xml:1516
+#, no-c-format
 msgid "JOTM"
-msgstr ""
+msgstr "JOTM"
 
-#: index.docbook:1519
+#. Tag: literal
+#: configuration.xml:1519
+#, no-c-format
 msgid "org.hibernate.transaction.JOnASTransactionManagerLookup"
-msgstr ""
+msgstr "org.hibernate.transaction.JOnASTransactionManagerLookup"
 
-#: index.docbook:1520
+#. Tag: entry
+#: configuration.xml:1520
+#, no-c-format
 msgid "JOnAS"
-msgstr ""
+msgstr "JOnAS"
 
-#: index.docbook:1523
+#. Tag: literal
+#: configuration.xml:1523
+#, no-c-format
 msgid "org.hibernate.transaction.JRun4TransactionManagerLookup"
-msgstr ""
+msgstr "org.hibernate.transaction.JRun4TransactionManagerLookup"
 
-#: index.docbook:1524
+#. Tag: entry
+#: configuration.xml:1524
+#, no-c-format
 msgid "JRun4"
-msgstr ""
+msgstr "JRun4"
 
-#: index.docbook:1527
+#. Tag: literal
+#: configuration.xml:1527
+#, no-c-format
 msgid "org.hibernate.transaction.BESTransactionManagerLookup"
-msgstr ""
+msgstr "org.hibernate.transaction.BESTransactionManagerLookup"
 
-#: index.docbook:1528
+#. Tag: entry
+#: configuration.xml:1528
+#, no-c-format
 msgid "Borland ES"
-msgstr ""
+msgstr "Borland ES"
 
-#: index.docbook:1537
+#. Tag: title
+#: configuration.xml:1537
+#, no-c-format
 msgid "JNDI-bound <literal>SessionFactory</literal>"
-msgstr ""
+msgstr "JNDI绑定的<literal>SessionFactory</literal>"
 
-#: index.docbook:1539
-msgid "A JNDI bound Hibernate <literal>SessionFactory</literal> can simplify the lookup of the factory and the creation of new <literal>Session</literal>s. Note that this is not related to a JNDI bound <literal>Datasource</literal>, both simply use the same registry!"
+#. Tag: para
+#: configuration.xml:1539
+#, no-c-format
+msgid ""
+"A JNDI bound Hibernate <literal>SessionFactory</literal> can simplify the "
+"lookup of the factory and the creation of new <literal>Session</literal>s. "
+"Note that this is not related to a JNDI bound <literal>Datasource</literal>, "
+"both simply use the same registry!"
 msgstr ""
+"与JNDI绑定的Hibernate的<literal>SessionFactory</literal>能简化工厂的查询,简"
+"化创建新的<literal>Session</literal>. 需要注意的是这与JNDI绑定"
+"<literal>Datasource</literal>没有关系, 它们只是恰巧用了相同的注册表!"
 
-#: index.docbook:1546
-msgid "If you wish to have the <literal>SessionFactory</literal> bound to a JNDI namespace, specify a name (eg. <literal>java:hibernate/SessionFactory</literal>) using the property <literal>hibernate.session_factory_name</literal>. If this property is omitted, the <literal>SessionFactory</literal> will not be bound to JNDI. (This is especially useful in environments with a read-only JNDI default implementation, e.g. Tomcat.)"
+#. Tag: para
+#: configuration.xml:1546
+#, no-c-format
+msgid ""
+"If you wish to have the <literal>SessionFactory</literal> bound to a JNDI "
+"namespace, specify a name (eg. <literal>java:hibernate/SessionFactory</"
+"literal>) using the property <literal>hibernate.session_factory_name</"
+"literal>. If this property is omitted, the <literal>SessionFactory</literal> "
+"will not be bound to JNDI. (This is especially useful in environments with a "
+"read-only JNDI default implementation, e.g. Tomcat.)"
 msgstr ""
+"如果你希望将<literal>SessionFactory</literal>绑定到一个JNDI的名字空间, 用属性"
+"<literal>hibernate.session_factory_name</literal>指定一个名字(如, "
+"<literal>java:hibernate/SessionFactory</literal>). 如果不设置这个属性, "
+"<literal>SessionFactory</literal>将不会被绑定到JNDI中. (在以只读JNDI为默认实"
+"现的环境中,这个设置尤其有用, 如Tomcat.)"
 
-#: index.docbook:1554
-msgid "When binding the <literal>SessionFactory</literal> to JNDI, Hibernate will use the values of <literal>hibernate.jndi.url</literal>, <literal>hibernate.jndi.class</literal> to instantiate an initial context. If they are not specified, the default <literal>InitialContext</literal> will be used."
+#. Tag: para
+#: configuration.xml:1554
+#, no-c-format
+msgid ""
+"When binding the <literal>SessionFactory</literal> to JNDI, Hibernate will "
+"use the values of <literal>hibernate.jndi.url</literal>, <literal>hibernate."
+"jndi.class</literal> to instantiate an initial context. If they are not "
+"specified, the default <literal>InitialContext</literal> will be used."
 msgstr ""
+"在将<literal>SessionFactory</literal>绑定至JNDI时, Hibernate将使用"
+"<literal>hibernate.jndi.url</literal>, 和<literal>hibernate.jndi.class</"
+"literal>的值来实例化初始环境(initial context). 如果它们没有被指定, 将使用默认"
+"的<literal>InitialContext</literal>."
 
-#: index.docbook:1561
-msgid "Hibernate will automatically place the <literal>SessionFactory</literal> in JNDI after you call <literal>cfg.buildSessionFactory()</literal>. This means you will at least have this call in some startup code (or utility class) in your application, unless you use JMX deployment with the <literal>HibernateService</literal> (discussed later)."
+#. Tag: para
+#: configuration.xml:1561
+#, no-c-format
+msgid ""
+"Hibernate will automatically place the <literal>SessionFactory</literal> in "
+"JNDI after you call <literal>cfg.buildSessionFactory()</literal>. This means "
+"you will at least have this call in some startup code (or utility class) in "
+"your application, unless you use JMX deployment with the "
+"<literal>HibernateService</literal> (discussed later)."
 msgstr ""
+"在你调用<literal>cfg.buildSessionFactory()</literal>后, Hibernate会自动将"
+"<literal>SessionFactory</literal>注册到JNDI. 这意味这你至少需要在你应用程序的"
+"启动代码(或工具类)中完成这个调用, 除非你使用<literal>HibernateService</"
+"literal>来做JMX部署 (见后面讨论)."
 
-#: index.docbook:1568
-msgid "If you use a JNDI <literal>SessionFactory</literal>, an EJB or any other class may obtain the <literal>SessionFactory</literal> using a JNDI lookup."
+#. Tag: para
+#: configuration.xml:1568
+#, no-c-format
+msgid ""
+"If you use a JNDI <literal>SessionFactory</literal>, an EJB or any other "
+"class may obtain the <literal>SessionFactory</literal> using a JNDI lookup."
 msgstr ""
+"假若你使用JNDI <literal>SessionFactory</literal>,EJB或者任何其它类都可以从"
+"JNDI中找到此<literal>SessionFactory</literal>。"
 
-#: index.docbook:1573
-msgid "We recommend that you bind the <literal>SessionFactory</literal> to JNDI in a managed environment and use a <literal>static</literal> singleton otherwise. To shield your application code from these details, we also recommend to hide the actual lookup code for a <literal>SessionFactory</literal> in a helper class, such as <literal>HibernateUtil.getSessionFactory()</literal>. Note that such a class is also a convenient way to startup Hibernate&mdash;see chapter 1."
+#. Tag: para
+#: configuration.xml:1573
+#, no-c-format
+msgid ""
+"We recommend that you bind the <literal>SessionFactory</literal> to JNDI in "
+"a managed environment and use a <literal>static</literal> singleton "
+"otherwise. To shield your application code from these details, we also "
+"recommend to hide the actual lookup code for a <literal>SessionFactory</"
+"literal> in a helper class, such as <literal>HibernateUtil.getSessionFactory"
+"()</literal>. Note that such a class is also a convenient way to startup "
+"Hibernate&mdash;see chapter 1."
 msgstr ""
+"我们建议,在受管理的环境中,把<literal>SessionFactory</literal>绑定到JNDI,在"
+"其它情况下,使用一个<literal>static(静态的)</literal>singleton。为了在你的应"
+"用程序代码中隐藏这些细节,我们还建议你用一个helper类把实际查找"
+"<literal>SessionFactory</literal>的代码隐藏起来,比如<literal>HibernateUtil."
+"getSessionFactory()</literal>。注意,这个类也就可以方便地启动Hibernate,参见"
+"第一章。"
 
-#: index.docbook:1585
+#. Tag: title
+#: configuration.xml:1585
+#, no-c-format
 msgid "Current Session context management with JTA"
-msgstr ""
+msgstr "在JTA环境下使用Current Session context (当前session上下文)管理"
 
-#: index.docbook:1587
-msgid "The easiest way to handle <literal>Session</literal>s and transactions is Hibernates automatic \"current\" <literal>Session</literal> management. See the discussion of <xref linkend=\"architecture-current-session\"/>current sessions. Using the <literal>\"jta\"</literal> session context, if there is no Hibernate <literal>Session</literal> associated with the current JTA transaction, one will be started and associated with that JTA transaction the first time you call <literal>sessionFactory.getCurrentSession()</literal>. The <literal>Session</literal>s retrieved via <literal>getCurrentSession()</literal> in <literal>\"jta\"</literal> context will be set to automatically flush before the transaction completes, close after the transaction completes, and aggressively release JDBC connections after each statement. This allows the <literal>Session</literal>s to be managed by the life cycle of the JTA transaction to which it is associated, keeping user code clean of such man!
 agement concerns. Your code can either use JTA programmatically through <literal>UserTransaction</literal>, or (recommended for portable code) use the Hibernate <literal>Transaction</literal> API to set transaction boundaries. If you run in an EJB container, declarative transaction demarcation with CMT is preferred."
+#. Tag: para
+#: configuration.xml:1587
+#, fuzzy, no-c-format
+msgid ""
+"The easiest way to handle <literal>Session</literal>s and transactions is "
+"Hibernates automatic \"current\" <literal>Session</literal> management. See "
+"the discussion of <xref linkend=\"architecture-current-session\"/>current "
+"sessions. Using the <literal>\"jta\"</literal> session context, if there is "
+"no Hibernate <literal>Session</literal> associated with the current JTA "
+"transaction, one will be started and associated with that JTA transaction "
+"the first time you call <literal>sessionFactory.getCurrentSession()</"
+"literal>. The <literal>Session</literal>s retrieved via "
+"<literal>getCurrentSession()</literal> in <literal>\"jta\"</literal> context "
+"will be set to automatically flush before the transaction completes, close "
+"after the transaction completes, and aggressively release JDBC connections "
+"after each statement. This allows the <literal>Session</literal>s to be "
+"managed by the life cycle of the JTA transaction to which it is associated, "
+"keeping user code clean of such management concerns. Your code can either "
+"use JTA programmatically through <literal>UserTransaction</literal>, or "
+"(recommended for portable code) use the Hibernate <literal>Transaction</"
+"literal> API to set transaction boundaries. If you run in an EJB container, "
+"declarative transaction demarcation with CMT is preferred."
 msgstr ""
+"在Hibernate中,管理<literal>Session</literal>和transaction最好的方法是自动的"
+"\"当前\"<literal>Session</literal>管理。请参见<xref linkend=\"architecture-"
+"current-session\">contextual sessions</xref>一节的讨论。使用<literal>\"jta"
+"\"</literal>session上下文,假若在当前JTA事务中还没有"
+"Hibernate<literal>Session</literal>关联,第一次<literal>sessionFactory."
+"getCurrentSession()</literal>调用会启动一个Session,并关联到当前的JTA事务。在"
+"<literal>\"jta\"</literal>上下文中调用<literal>getCurrentSession()</literal>"
+"获得的<literal>Session</literal>,会被设置为在transaction关闭的时候自动flush"
+"(清洗)、在transaction关闭之后自动关闭,每句语句之后主动释放JDBC连接。这就可"
+"以根据JTA事务的生命周期来管理与之关联的<literal>Session</literal>,用户代码中"
+"就可以不再考虑这些管理。你的代码也可以通过<literal>UserTransaction</literal>"
+"用编程方式使用JTA,或者(我们建议,为了便于移植代码)使用Hibernate的"
+"<literal>Transaction</literal> API来设置transaction边界。如果你的代码运行在"
+"EJB容器中,建议对CMT使用声明式事务声明。"
 
-#: index.docbook:1610
+#. Tag: title
+#: configuration.xml:1610
+#, no-c-format
 msgid "JMX deployment"
-msgstr ""
+msgstr "JMX部署"
 
-#: index.docbook:1612
-msgid "The line <literal>cfg.buildSessionFactory()</literal> still has to be executed somewhere to get a <literal>SessionFactory</literal> into JNDI. You can do this either in a <literal>static</literal> initializer block (like the one in <literal>HibernateUtil</literal>) or you deploy Hibernate as a <emphasis>managed service</emphasis>."
+#. Tag: para
+#: configuration.xml:1612
+#, no-c-format
+msgid ""
+"The line <literal>cfg.buildSessionFactory()</literal> still has to be "
+"executed somewhere to get a <literal>SessionFactory</literal> into JNDI. You "
+"can do this either in a <literal>static</literal> initializer block (like "
+"the one in <literal>HibernateUtil</literal>) or you deploy Hibernate as a "
+"<emphasis>managed service</emphasis>."
 msgstr ""
+"为了将<literal>SessionFactory</literal>注册到JNDI中,<literal>cfg."
+"buildSessionFactory()</literal>这行代码仍需在某处被执行. 你可在一个"
+"<literal>static</literal>初始化块(像<literal>HibernateUtil</literal>中的那样)"
+"中执行它或将Hibernate部署为一个<emphasis>托管的服务</emphasis>."
 
-#: index.docbook:1620
-msgid "Hibernate is distributed with <literal>org.hibernate.jmx.HibernateService</literal> for deployment on an application server with JMX capabilities, such as JBoss AS. The actual deployment and configuration is vendor specific. Here is an example <literal>jboss-service.xml</literal> for JBoss 4.0.x:"
+#. Tag: para
+#: configuration.xml:1620
+#, no-c-format
+msgid ""
+"Hibernate is distributed with <literal>org.hibernate.jmx.HibernateService</"
+"literal> for deployment on an application server with JMX capabilities, such "
+"as JBoss AS. The actual deployment and configuration is vendor specific. "
+"Here is an example <literal>jboss-service.xml</literal> for JBoss 4.0.x:"
 msgstr ""
+"为了部署在一个支持JMX的应用程序服务器上,Hibernate和 <literal>org.hibernate."
+"jmx.HibernateService</literal>一同分发,如Jboss AS。 实际的部署和配置是由应用"
+"程序服务器提供者指定的. 这里是JBoss 4.0.x的<literal>jboss-service.xml</"
+"literal>样例:"
 
-#: index.docbook:1627
+#. Tag: programlisting
+#: configuration.xml:1627
+#, no-c-format
 msgid ""
-      "<![CDATA[<?xml version=\"1.0\"?>\n"
-      "<server>\n"
-      "\n"
-      "<mbean code=\"org.hibernate.jmx.HibernateService\"\n"
-      "    name=\"jboss.jca:service=HibernateFactory,name=HibernateFactory\">\n"
-      "\n"
-      "    <!-- Required services -->\n"
-      "    <depends>jboss.jca:service=RARDeployer</depends>\n"
-      "    <depends>jboss.jca:service=LocalTxCM,name=HsqlDS</depends>\n"
-      "\n"
-      "    <!-- Bind the Hibernate service to JNDI -->\n"
-      "    <attribute name=\"JndiName\">java:/hibernate/SessionFactory</attribute>\n"
-      "\n"
-      "    <!-- Datasource settings -->\n"
-      "    <attribute name=\"Datasource\">java:HsqlDS</attribute>\n"
-      "    <attribute name=\"Dialect\">org.hibernate.dialect.HSQLDialect</attribute>\n"
-      "\n"
-      "    <!-- Transaction integration -->\n"
-      "    <attribute name=\"TransactionStrategy\">\n"
-      "        org.hibernate.transaction.JTATransactionFactory</attribute>\n"
-      "    <attribute name=\"TransactionManagerLookupStrategy\">\n"
-      "        org.hibernate.transaction.JBossTransactionManagerLookup</attribute>\n"
-      "    <attribute name=\"FlushBeforeCompletionEnabled\">true</attribute>\n"
-      "    <attribute name=\"AutoCloseSessionEnabled\">true</attribute>\n"
-      "\n"
-      "    <!-- Fetching options -->\n"
-      "    <attribute name=\"MaximumFetchDepth\">5</attribute>\n"
-      "\n"
-      "    <!-- Second-level caching -->\n"
-      "    <attribute name=\"SecondLevelCacheEnabled\">true</attribute>\n"
-      "    <attribute name=\"CacheProviderClass\">org.hibernate.cache.EhCacheProvider</attribute>\n"
-      "    <attribute name=\"QueryCacheEnabled\">true</attribute>\n"
-      "\n"
-      "    <!-- Logging -->\n"
-      "    <attribute name=\"ShowSqlEnabled\">true</attribute>\n"
-      "\n"
-      "    <!-- Mapping files -->\n"
-      "    <attribute name=\"MapResources\">auction/Item.hbm.xml,auction/Category.hbm.xml</attribute>\n"
-      "\n"
-      "</mbean>\n"
-      "\n"
-      "</server>]]>"
+"<![CDATA[<?xml version=\"1.0\"?>\n"
+"<server>\n"
+"\n"
+"<mbean code=\"org.hibernate.jmx.HibernateService\"\n"
+"    name=\"jboss.jca:service=HibernateFactory,name=HibernateFactory\">\n"
+"\n"
+"    <!-- Required services -->\n"
+"    <depends>jboss.jca:service=RARDeployer</depends>\n"
+"    <depends>jboss.jca:service=LocalTxCM,name=HsqlDS</depends>\n"
+"\n"
+"    <!-- Bind the Hibernate service to JNDI -->\n"
+"    <attribute name=\"JndiName\">java:/hibernate/SessionFactory</attribute>\n"
+"\n"
+"    <!-- Datasource settings -->\n"
+"    <attribute name=\"Datasource\">java:HsqlDS</attribute>\n"
+"    <attribute name=\"Dialect\">org.hibernate.dialect.HSQLDialect</"
+"attribute>\n"
+"\n"
+"    <!-- Transaction integration -->\n"
+"    <attribute name=\"TransactionStrategy\">\n"
+"        org.hibernate.transaction.JTATransactionFactory</attribute>\n"
+"    <attribute name=\"TransactionManagerLookupStrategy\">\n"
+"        org.hibernate.transaction.JBossTransactionManagerLookup</attribute>\n"
+"    <attribute name=\"FlushBeforeCompletionEnabled\">true</attribute>\n"
+"    <attribute name=\"AutoCloseSessionEnabled\">true</attribute>\n"
+"\n"
+"    <!-- Fetching options -->\n"
+"    <attribute name=\"MaximumFetchDepth\">5</attribute>\n"
+"\n"
+"    <!-- Second-level caching -->\n"
+"    <attribute name=\"SecondLevelCacheEnabled\">true</attribute>\n"
+"    <attribute name=\"CacheProviderClass\">org.hibernate.cache."
+"EhCacheProvider</attribute>\n"
+"    <attribute name=\"QueryCacheEnabled\">true</attribute>\n"
+"\n"
+"    <!-- Logging -->\n"
+"    <attribute name=\"ShowSqlEnabled\">true</attribute>\n"
+"\n"
+"    <!-- Mapping files -->\n"
+"    <attribute name=\"MapResources\">auction/Item.hbm.xml,auction/Category."
+"hbm.xml</attribute>\n"
+"\n"
+"</mbean>\n"
+"\n"
+"</server>]]>"
 msgstr ""
 
-#: index.docbook:1629
-msgid "This file is deployed in a directory called <literal>META-INF</literal> and packaged in a JAR file with the extension <literal>.sar</literal> (service archive). You also need to package Hibernate, its required third-party libraries, your compiled persistent classes, as well as your mapping files in the same archive. Your enterprise beans (usually session beans) may be kept in their own JAR file, but you may include this EJB JAR file in the main service archive to get a single (hot-)deployable unit. Consult the JBoss AS documentation for more information about JMX service and EJB deployment."
+#. Tag: para
+#: configuration.xml:1629
+#, no-c-format
+msgid ""
+"This file is deployed in a directory called <literal>META-INF</literal> and "
+"packaged in a JAR file with the extension <literal>.sar</literal> (service "
+"archive). You also need to package Hibernate, its required third-party "
+"libraries, your compiled persistent classes, as well as your mapping files "
+"in the same archive. Your enterprise beans (usually session beans) may be "
+"kept in their own JAR file, but you may include this EJB JAR file in the "
+"main service archive to get a single (hot-)deployable unit. Consult the "
+"JBoss AS documentation for more information about JMX service and EJB "
+"deployment."
 msgstr ""
+"这个文件是部署在<literal>META-INF</literal>目录下的, 并会被打包到以<literal>."
+"sar</literal> (service archive)为扩展名的JAR文件中. 同时,你需要将Hibernate、"
+"它所需要的第三方库、你编译好的持久化类以及你的映射定义文件打包进同一个文档. "
+"你的企业Bean(一般为会话Bean)可能会被打包成它们自己的JAR文件, 但你也许会将EJB "
+"JAR文件一同包含进能独立(热)部署的主服务文档. 参考JBoss AS文档以了解更多的JMX"
+"服务与EJB部署的信息."
 
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
+#~ msgid "<placeholder-1/> (optional)"
+#~ msgstr "<placeholder-1/> (可选)"
 
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
+#~ msgid "InitialContextFactory"
+#~ msgstr "InitialContextFactory"
 
+#~ msgid "class of the JNDI <placeholder-1/>"
+#~ msgstr "JNDI <placeholder-1/>类"
+
+#, fuzzy
+#~ msgid "eg."
+#~ msgstr ""
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "eg.\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "取值"
+
+#~ msgid "full.classname.of.Dialect"
+#~ msgstr "full.classname.of.Dialect"
+
+#~ msgid "debug"
+#~ msgstr "debug"
+
+#~ msgid "SCHEMA_NAME"
+#~ msgstr "SCHEMA_NAME"
+
+#~ msgid "CATALOG_NAME"
+#~ msgstr "CATALOG_NAME"
+
+#~ msgid "SessionFactory"
+#~ msgstr "SessionFactory"
+
+#~ msgid "jndi/composite/name"
+#~ msgstr "jndi/composite/name"
+
+#~ msgid "0"
+#~ msgstr "0"
+
+#~ msgid "false"
+#~ msgstr "false"
+
+#~ msgid "Statement.setFetchSize()"
+#~ msgstr "Statement.setFetchSize()"
+
+#~ msgid "true"
+#~ msgstr "executeBatch()"
+
+#~ msgid "executeBatch()"
+#~ msgstr "true"
+
+#~ msgid "Batcher"
+#~ msgstr "Batcher"
+
+#~ msgid "classname.of.BatcherFactory"
+#~ msgstr "classname.of.BatcherFactory"
+
+#~ msgid "binary"
+#~ msgstr "binary (二进制)"
+
+#~ msgid "serializable"
+#~ msgstr "serializable (可序列化)"
+
+#~ msgid "PreparedStatement.getGeneratedKeys()"
+#~ msgstr "PreparedStatement.getGeneratedKeys()"
+
+#~ msgid "true|false"
+#~ msgstr "true|false"
+
+#~ msgid "ConnectionProvider"
+#~ msgstr "ConnectionProvider"
+
+#~ msgid "classname.of.ConnectionProvider"
+#~ msgstr "classname.of.ConnectionProvider"
+
+#~ msgid "java.sql.Connection"
+#~ msgstr "java.sql.Connection"
+
+#~ msgid "1, 2, 4, 8"
+#~ msgstr "1, 2, 4, 8"
+
+#~ msgid "after_statement"
+#~ msgstr "after_statement"
+
+#~ msgid "after_transaction"
+#~ msgstr "after_transaction"
+
+#~ msgid "auto"
+#~ msgstr "auto"
+
+#~ msgid "&lt;propertyName&gt;"
+#~ msgstr "&lt;propertyName&gt;"
+
+#~ msgid "hibernate.connection.<placeholder-1/>"
+#~ msgstr "hibernate.connection.<placeholder-1/>"
+
+#~ msgid "propertyName"
+#~ msgstr "propertyName"
+
+#~ msgid "DriverManager.getConnection()"
+#~ msgstr "DriverManager.getConnection()"
+
+#~ msgid "Pass the JDBC property <placeholder-1/> to <placeholder-2/>."
+#~ msgstr "将JDBC属性<placeholder-1/>传递到<placeholder-2/>中去."
+
+#~ msgid "hibernate.jndi.<placeholder-1/>"
+#~ msgstr "hibernate.jndi.<placeholder-1/>"
+
+#~ msgid "Pass the property <placeholder-1/> to the JNDI <placeholder-2/>."
+#~ msgstr "将属性<placeholder-1/>传递到JNDI <placeholder-2/>中去."
+
+#~ msgid "CacheProvider"
+#~ msgstr "CacheProvider"
+
+#~ msgid "classname.of.CacheProvider"
+#~ msgstr "classname.of.CacheProvider"
+
+#~ msgid "&lt;cache&gt;"
+#~ msgstr "&lt;cache&gt;"
+
+#~ msgid "QueryCache"
+#~ msgstr "QueryCache"
+
+#~ msgid "StandardQueryCache"
+#~ msgstr "StandardQueryCache"
+
+#~ msgid "classname.of.QueryCache"
+#~ msgstr "classname.of.QueryCache"
+
+#~ msgid "prefix"
+#~ msgstr "prefix"
+
+#~ msgid "TransactionFactory"
+#~ msgstr "TransactionFactory"
+
+#~ msgid "Transaction"
+#~ msgstr "Transaction"
+
+#~ msgid "JDBCTransactionFactory"
+#~ msgstr "JDBCTransactionFactory"
+
+#~ msgid "classname.of.TransactionFactory"
+#~ msgstr "classname.of.TransactionFactory"
+
+#~ msgid "JTATransactionFactory"
+#~ msgstr "JTATransactionFactory"
+
+#~ msgid "UserTransaction"
+#~ msgstr "UserTransaction"
+
+#~ msgid "TransactionManagerLookup"
+#~ msgstr "TransactionManagerLookup"
+
+#~ msgid "classname.of.TransactionManagerLookup"
+#~ msgstr "classname.of.TransactionManagerLookup"
+
+#~ msgid "Session"
+#~ msgstr "Session"
+
+#~ msgid "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC"
+#~ msgstr "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC"
+
+#~ msgid "create-drop"
+#~ msgstr "create-drop"
+
+#~ msgid "hibernate.cfg.xml"
+#~ msgstr "hibernate.cfg.xml"
+
+#~ msgid "DB2"
+#~ msgstr "DB2"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/events.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/events.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/events.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,245 +1,457 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: events.xml:5
+#, no-c-format
 msgid "Interceptors and events"
-msgstr ""
+msgstr "拦截器与事件(Interceptors and events)"
 
-#: index.docbook:7
-msgid "It is often useful for the application to react to certain events that occur inside Hibernate. This allows implementation of certain kinds of generic functionality, and extension of Hibernate functionality."
+#. Tag: para
+#: events.xml:7
+#, no-c-format
+msgid ""
+"It is often useful for the application to react to certain events that occur "
+"inside Hibernate. This allows implementation of certain kinds of generic "
+"functionality, and extension of Hibernate functionality."
 msgstr ""
+"应用程序能够响应Hibernate内部产生的特定事件是非常有用的。这样就允许实现某些通"
+"用的功能 以及允许对Hibernate功能进行扩展。"
 
-#: index.docbook:14
+#. Tag: title
+#: events.xml:14
+#, no-c-format
 msgid "Interceptors"
-msgstr ""
+msgstr "拦截器(Interceptors)"
 
-#: index.docbook:16
-msgid "The <literal>Interceptor</literal> interface provides callbacks from the session to the application allowing the application to inspect and/or manipulate properties of a persistent object before it is saved, updated, deleted or loaded. One possible use for this is to track auditing information. For example, the following <literal>Interceptor</literal> automatically sets the <literal>createTimestamp</literal> when an <literal>Auditable</literal> is created and updates the <literal>lastUpdateTimestamp</literal> property when an <literal>Auditable</literal> is updated."
+#. Tag: para
+#: events.xml:16
+#, no-c-format
+msgid ""
+"The <literal>Interceptor</literal> interface provides callbacks from the "
+"session to the application allowing the application to inspect and/or "
+"manipulate properties of a persistent object before it is saved, updated, "
+"deleted or loaded. One possible use for this is to track auditing "
+"information. For example, the following <literal>Interceptor</literal> "
+"automatically sets the <literal>createTimestamp</literal> when an "
+"<literal>Auditable</literal> is created and updates the "
+"<literal>lastUpdateTimestamp</literal> property when an <literal>Auditable</"
+"literal> is updated."
 msgstr ""
+"<literal>Interceptor</literal>接口提供了从会话(session)回调(callback)应用程序"
+"(application)的机制, 这种回调机制可以允许应用程序在持久化对象被保存、更新、"
+"删除或是加载之前,检查并(或)修改其 属性。一个可能的用途,就是用来跟踪审核"
+"(auditing)信息。例如:下面的这个<literal>拦截器</literal>,会在一个实现了 "
+"<literal>Auditable</literal>接口的对象被创建时自动地设置"
+"<literal>createTimestamp</literal>属性,并在实现了 <literal>Auditable</"
+"literal>接口的对象被更新时,同步更新<literal>lastUpdateTimestamp</literal>属"
+"性。"
 
-#: index.docbook:27
-msgid "You may either implement <literal>Interceptor</literal> directly or (better) extend <literal>EmptyInterceptor</literal>."
+#. Tag: para
+#: events.xml:27
+#, no-c-format
+msgid ""
+"You may either implement <literal>Interceptor</literal> directly or (better) "
+"extend <literal>EmptyInterceptor</literal>."
 msgstr ""
+"你可以直接实现<literal>Interceptor</literal>接口,也可以(最好)继承自"
+"<literal>EmptyInterceptor</literal>。"
 
-#: index.docbook:32
+#. Tag: programlisting
+#: events.xml:32
+#, no-c-format
 msgid ""
-      "<![CDATA[package org.hibernate.test;\n"
-      "\n"
-      "import java.io.Serializable;\n"
-      "import java.util.Date;\n"
-      "import java.util.Iterator;\n"
-      "\n"
-      "import org.hibernate.EmptyInterceptor;\n"
-      "import org.hibernate.Transaction;\n"
-      "import org.hibernate.type.Type;\n"
-      "\n"
-      "public class AuditInterceptor extends EmptyInterceptor {\n"
-      "\n"
-      "    private int updates;\n"
-      "    private int creates;\n"
-      "    private int loads;\n"
-      "\n"
-      "    public void onDelete(Object entity,\n"
-      "                         Serializable id,\n"
-      "                         Object[] state,\n"
-      "                         String[] propertyNames,\n"
-      "                         Type[] types) {\n"
-      "        // do nothing\n"
-      "    }\n"
-      "\n"
-      "    public boolean onFlushDirty(Object entity,\n"
-      "                                Serializable id,\n"
-      "                                Object[] currentState,\n"
-      "                                Object[] previousState,\n"
-      "                                String[] propertyNames,\n"
-      "                                Type[] types) {\n"
-      "\n"
-      "        if ( entity instanceof Auditable ) {\n"
-      "            updates++;\n"
-      "            for ( int i=0; i < propertyNames.length; i++ ) {\n"
-      "                if ( \"lastUpdateTimestamp\".equals( propertyNames[i] ) ) {\n"
-      "                    currentState[i] = new Date();\n"
-      "                    return true;\n"
-      "                }\n"
-      "            }\n"
-      "        }\n"
-      "        return false;\n"
-      "    }\n"
-      "\n"
-      "    public boolean onLoad(Object entity,\n"
-      "                          Serializable id,\n"
-      "                          Object[] state,\n"
-      "                          String[] propertyNames,\n"
-      "                          Type[] types) {\n"
-      "        if ( entity instanceof Auditable ) {\n"
-      "            loads++;\n"
-      "        }\n"
-      "        return false;\n"
-      "    }\n"
-      "\n"
-      "    public boolean onSave(Object entity,\n"
-      "                          Serializable id,\n"
-      "                          Object[] state,\n"
-      "                          String[] propertyNames,\n"
-      "                          Type[] types) {\n"
-      "\n"
-      "        if ( entity instanceof Auditable ) {\n"
-      "            creates++;\n"
-      "            for ( int i=0; i<propertyNames.length; i++ ) {\n"
-      "                if ( \"createTimestamp\".equals( propertyNames[i] ) ) {\n"
-      "                    state[i] = new Date();\n"
-      "                    return true;\n"
-      "                }\n"
-      "            }\n"
-      "        }\n"
-      "        return false;\n"
-      "    }\n"
-      "\n"
-      "    public void afterTransactionCompletion(Transaction tx) {\n"
-      "        if ( tx.wasCommitted() ) {\n"
-      "            System.out.println(\"Creations: \" + creates + \", Updates: \" + updates, \"Loads: \" + loads);\n"
-      "        }\n"
-      "        updates=0;\n"
-      "        creates=0;\n"
-      "        loads=0;\n"
-      "    }\n"
-      "\n"
-      "}]]>"
+"<![CDATA[package org.hibernate.test;\n"
+"\n"
+"import java.io.Serializable;\n"
+"import java.util.Date;\n"
+"import java.util.Iterator;\n"
+"\n"
+"import org.hibernate.EmptyInterceptor;\n"
+"import org.hibernate.Transaction;\n"
+"import org.hibernate.type.Type;\n"
+"\n"
+"public class AuditInterceptor extends EmptyInterceptor {\n"
+"\n"
+"    private int updates;\n"
+"    private int creates;\n"
+"    private int loads;\n"
+"\n"
+"    public void onDelete(Object entity,\n"
+"                         Serializable id,\n"
+"                         Object[] state,\n"
+"                         String[] propertyNames,\n"
+"                         Type[] types) {\n"
+"        // do nothing\n"
+"    }\n"
+"\n"
+"    public boolean onFlushDirty(Object entity,\n"
+"                                Serializable id,\n"
+"                                Object[] currentState,\n"
+"                                Object[] previousState,\n"
+"                                String[] propertyNames,\n"
+"                                Type[] types) {\n"
+"\n"
+"        if ( entity instanceof Auditable ) {\n"
+"            updates++;\n"
+"            for ( int i=0; i < propertyNames.length; i++ ) {\n"
+"                if ( \"lastUpdateTimestamp\".equals( propertyNames[i] ) ) {\n"
+"                    currentState[i] = new Date();\n"
+"                    return true;\n"
+"                }\n"
+"            }\n"
+"        }\n"
+"        return false;\n"
+"    }\n"
+"\n"
+"    public boolean onLoad(Object entity,\n"
+"                          Serializable id,\n"
+"                          Object[] state,\n"
+"                          String[] propertyNames,\n"
+"                          Type[] types) {\n"
+"        if ( entity instanceof Auditable ) {\n"
+"            loads++;\n"
+"        }\n"
+"        return false;\n"
+"    }\n"
+"\n"
+"    public boolean onSave(Object entity,\n"
+"                          Serializable id,\n"
+"                          Object[] state,\n"
+"                          String[] propertyNames,\n"
+"                          Type[] types) {\n"
+"\n"
+"        if ( entity instanceof Auditable ) {\n"
+"            creates++;\n"
+"            for ( int i=0; i<propertyNames.length; i++ ) {\n"
+"                if ( \"createTimestamp\".equals( propertyNames[i] ) ) {\n"
+"                    state[i] = new Date();\n"
+"                    return true;\n"
+"                }\n"
+"            }\n"
+"        }\n"
+"        return false;\n"
+"    }\n"
+"\n"
+"    public void afterTransactionCompletion(Transaction tx) {\n"
+"        if ( tx.wasCommitted() ) {\n"
+"            System.out.println(\"Creations: \" + creates + \", Updates: \" + "
+"updates, \"Loads: \" + loads);\n"
+"        }\n"
+"        updates=0;\n"
+"        creates=0;\n"
+"        loads=0;\n"
+"    }\n"
+"\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:34
-msgid "Interceptors come in two flavors: <literal>Session</literal>-scoped and <literal>SessionFactory</literal>-scoped."
+#. Tag: para
+#: events.xml:34
+#, no-c-format
+msgid ""
+"Interceptors come in two flavors: <literal>Session</literal>-scoped and "
+"<literal>SessionFactory</literal>-scoped."
 msgstr ""
+"拦截器可以有两种:<literal>Session</literal>范围内的,和"
+"<literal>SessionFactory</literal>范围内的。"
 
-#: index.docbook:39
-msgid "A <literal>Session</literal>-scoped interceptor is specified when a session is opened using one of the overloaded SessionFactory.openSession() methods accepting an <literal>Interceptor</literal>."
+#. Tag: para
+#: events.xml:39
+#, no-c-format
+msgid ""
+"A <literal>Session</literal>-scoped interceptor is specified when a session "
+"is opened using one of the overloaded SessionFactory.openSession() methods "
+"accepting an <literal>Interceptor</literal>."
 msgstr ""
+"当使用某个重载的SessionFactory.openSession()使用<literal>Interceptor</"
+"literal>作为参数调用打开一个session的时候,就指定了<literal>Session</literal>"
+"范围内的拦截器。"
 
-#: index.docbook:45
+#. Tag: programlisting
+#: events.xml:45
+#, no-c-format
 msgid "<![CDATA[Session session = sf.openSession( new AuditInterceptor() );]]>"
 msgstr ""
 
-#: index.docbook:47
-msgid "A <literal>SessionFactory</literal>-scoped interceptor is registered with the <literal>Configuration</literal> object prior to building the <literal>SessionFactory</literal>. In this case, the supplied interceptor will be applied to all sessions opened from that <literal>SessionFactory</literal>; this is true unless a session is opened explicitly specifying the interceptor to use. <literal>SessionFactory</literal>-scoped interceptors must be thread safe, taking care to not store session-specific state since multiple sessions will use this interceptor (potentially) concurrently."
+#. Tag: para
+#: events.xml:47
+#, no-c-format
+msgid ""
+"A <literal>SessionFactory</literal>-scoped interceptor is registered with "
+"the <literal>Configuration</literal> object prior to building the "
+"<literal>SessionFactory</literal>. In this case, the supplied interceptor "
+"will be applied to all sessions opened from that <literal>SessionFactory</"
+"literal>; this is true unless a session is opened explicitly specifying the "
+"interceptor to use. <literal>SessionFactory</literal>-scoped interceptors "
+"must be thread safe, taking care to not store session-specific state since "
+"multiple sessions will use this interceptor (potentially) concurrently."
 msgstr ""
+"<literal>SessionFactory</literal>范围内的拦截器要通过<literal>Configuration</"
+"literal>中注册,而这必须在创建<literal>SessionFactory</literal>之前。在这种情"
+"况下,给出的拦截器会被这个<literal>SessionFactory</literal>所打开的所有"
+"session使用了;除非session打开时明确指明了使用的拦截器。"
+"<literal>SessionFactory</literal>范围内的拦截器,必须是线程安全的,因为多个"
+"session可能并发使用这个拦截器,要因此小心不要保存与session相关的状态。"
 
-#: index.docbook:56
-msgid "<![CDATA[new Configuration().setInterceptor( new AuditInterceptor() );]]>"
+#. Tag: programlisting
+#: events.xml:56
+#, no-c-format
+msgid ""
+"<![CDATA[new Configuration().setInterceptor( new AuditInterceptor() );]]>"
 msgstr ""
 
-#: index.docbook:61
+#. Tag: title
+#: events.xml:61
+#, no-c-format
 msgid "Event system"
-msgstr ""
+msgstr "事件系统(Event system)"
 
-#: index.docbook:63
-msgid "If you have to react to particular events in your persistence layer, you may also use the Hibernate3 <emphasis>event</emphasis> architecture. The event system can be used in addition or as a replacement for interceptors."
+#. Tag: para
+#: events.xml:63
+#, no-c-format
+msgid ""
+"If you have to react to particular events in your persistence layer, you may "
+"also use the Hibernate3 <emphasis>event</emphasis> architecture. The event "
+"system can be used in addition or as a replacement for interceptors."
 msgstr ""
+"如果需要响应持久层的某些特殊事件,你也可以使用Hibernate3的事件框架。 该事件系"
+"统可以用来替代拦截器,也可以作为拦截器的补充来使用。"
 
-#: index.docbook:69
-msgid "Essentially all of the methods of the <literal>Session</literal> interface correlate to an event. You have a <literal>LoadEvent</literal>, a <literal>FlushEvent</literal>, etc (consult the XML configuration-file DTD or the <literal>org.hibernate.event</literal> package for the full list of defined event types). When a request is made of one of these methods, the Hibernate <literal>Session</literal> generates an appropriate event and passes it to the configured event listeners for that type. Out-of-the-box, these listeners implement the same processing in which those methods always resulted. However, you are free to implement a customization of one of the listener interfaces (i.e., the <literal>LoadEvent</literal> is processed by the registered implemenation of the <literal>LoadEventListener</literal> interface), in which case their implementation would be responsible for processing any <literal>load()</literal> requests made of the <literal>Session</literal>."
+#. Tag: para
+#: events.xml:69
+#, no-c-format
+msgid ""
+"Essentially all of the methods of the <literal>Session</literal> interface "
+"correlate to an event. You have a <literal>LoadEvent</literal>, a "
+"<literal>FlushEvent</literal>, etc (consult the XML configuration-file DTD "
+"or the <literal>org.hibernate.event</literal> package for the full list of "
+"defined event types). When a request is made of one of these methods, the "
+"Hibernate <literal>Session</literal> generates an appropriate event and "
+"passes it to the configured event listeners for that type. Out-of-the-box, "
+"these listeners implement the same processing in which those methods always "
+"resulted. However, you are free to implement a customization of one of the "
+"listener interfaces (i.e., the <literal>LoadEvent</literal> is processed by "
+"the registered implemenation of the <literal>LoadEventListener</literal> "
+"interface), in which case their implementation would be responsible for "
+"processing any <literal>load()</literal> requests made of the "
+"<literal>Session</literal>."
 msgstr ""
+"基本上,<literal>Session</literal>接口的每个方法都有相对应的事件。比如 "
+"<literal>LoadEvent</literal>,<literal>FlushEvent</literal>,等等(查阅XML配"
+"置文件 的DTD,以及<literal>org.hibernate.event</literal>包来获得所有已定义的"
+"事件的列表)。当某个方 法被调用时,Hibernate <literal>Session</literal>会生成"
+"一个相对应的事件并激活所 有配置好的事件监听器。系统预设的监听器实现的处理过程"
+"就是被监听的方法要做的(被监听的方法所做的其实仅仅是激活监听器, “实际”的工作"
+"是由监听器完成的)。不过,你可以自由地选择实现 一个自己定制的监听器(比如,实"
+"现并注册用来处理处理<literal>LoadEvent</literal>的"
+"<literal>LoadEventListener</literal>接口), 来负责处理所有的调用"
+"<literal>Session</literal>的<literal>load()</literal>方法的请求。"
 
-#: index.docbook:84
-msgid "The listeners should be considered effectively singletons; meaning, they are shared between requests, and thus should not save any state as instance variables."
+#. Tag: para
+#: events.xml:84
+#, no-c-format
+msgid ""
+"The listeners should be considered effectively singletons; meaning, they are "
+"shared between requests, and thus should not save any state as instance "
+"variables."
 msgstr ""
+"监听器应该被看作是单例(singleton)对象,也就是说,所有同类型的事件的处理共享同"
+"一个监听器实例,因此监听器 不应该保存任何状态(也就是不应该使用成员变量)。"
 
-#: index.docbook:89
-msgid "A custom listener should implement the appropriate interface for the event it wants to process and/or extend one of the convenience base classes (or even the default event listeners used by Hibernate out-of-the-box as these are declared non-final for this purpose). Custom listeners can either be registered programmatically through the <literal>Configuration</literal> object, or specified in the Hibernate configuration XML (declarative configuration through the properties file is not supported). Here's an example of a custom load event listener:"
+#. Tag: para
+#: events.xml:89
+#, no-c-format
+msgid ""
+"A custom listener should implement the appropriate interface for the event "
+"it wants to process and/or extend one of the convenience base classes (or "
+"even the default event listeners used by Hibernate out-of-the-box as these "
+"are declared non-final for this purpose). Custom listeners can either be "
+"registered programmatically through the <literal>Configuration</literal> "
+"object, or specified in the Hibernate configuration XML (declarative "
+"configuration through the properties file is not supported). Here's an "
+"example of a custom load event listener:"
 msgstr ""
+"用户定制的监听器应该实现与所要处理的事件相对应的接口,或者从一个合适的基类继"
+"承(甚至是从Hibernate自带的默认事件监听器类继承, 为了方便你这样做,这些类都"
+"被声明成non-final的了)。用户定制的监听器可以通过编程使用"
+"<literal>Configuration</literal>对象 来注册,也可以在Hibernate的XML格式的配置"
+"文件中进行声明(不支持在Properties格式的配置文件声明监听器)。 下面是一个用户"
+"定制的加载事件(load event)的监听器:"
 
-#: index.docbook:99
+#. Tag: programlisting
+#: events.xml:99
+#, no-c-format
 msgid ""
-      "<![CDATA[public class MyLoadListener implements LoadEventListener {\n"
-      "    // this is the single method defined by the LoadEventListener interface\n"
-      "    public void onLoad(LoadEvent event, LoadEventListener.LoadType loadType)\n"
-      "            throws HibernateException {\n"
-      "        if ( !MySecurity.isAuthorized( event.getEntityClassName(), event.getEntityId() ) ) {\n"
-      "            throw MySecurityException(\"Unauthorized access\");\n"
-      "        }\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[public class MyLoadListener implements LoadEventListener {\n"
+"    // this is the single method defined by the LoadEventListener interface\n"
+"    public void onLoad(LoadEvent event, LoadEventListener.LoadType "
+"loadType)\n"
+"            throws HibernateException {\n"
+"        if ( !MySecurity.isAuthorized( event.getEntityClassName(), event."
+"getEntityId() ) ) {\n"
+"            throw MySecurityException(\"Unauthorized access\");\n"
+"        }\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:101
-msgid "You also need a configuration entry telling Hibernate to use the listener in addition to the default listener:"
+#. Tag: para
+#: events.xml:101
+#, no-c-format
+msgid ""
+"You also need a configuration entry telling Hibernate to use the listener in "
+"addition to the default listener:"
 msgstr ""
+"你还需要修改一处配置,来告诉Hibernate,除了默认的监听器,还要附加选定的监听"
+"器。"
 
-#: index.docbook:106
+#. Tag: programlisting
+#: events.xml:106
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-configuration>\n"
-      "    <session-factory>\n"
-      "        ...\n"
-      "        <event type=\"load\">\n"
-      "            <listener class=\"com.eg.MyLoadListener\"/>\n"
-      "            <listener class=\"org.hibernate.event.def.DefaultLoadEventListener\"/>\n"
-      "        </event>\n"
-      "    </session-factory>\n"
-      "</hibernate-configuration>]]>"
+"<![CDATA[<hibernate-configuration>\n"
+"    <session-factory>\n"
+"        ...\n"
+"        <event type=\"load\">\n"
+"            <listener class=\"com.eg.MyLoadListener\"/>\n"
+"            <listener class=\"org.hibernate.event.def."
+"DefaultLoadEventListener\"/>\n"
+"        </event>\n"
+"    </session-factory>\n"
+"</hibernate-configuration>]]>"
 msgstr ""
 
-#: index.docbook:108
+#. Tag: para
+#: events.xml:108
+#, no-c-format
 msgid "Instead, you may register it programmatically:"
-msgstr ""
+msgstr "看看用另一种方式,通过编程的方式来注册它。"
 
-#: index.docbook:112
+#. Tag: programlisting
+#: events.xml:112
+#, no-c-format
 msgid ""
-      "<![CDATA[Configuration cfg = new Configuration();\n"
-      "LoadEventListener[] stack = { new MyLoadListener(), new DefaultLoadEventListener() };\n"
-      "cfg.EventListeners().setLoadEventListeners(stack);]]>"
+"<![CDATA[Configuration cfg = new Configuration();\n"
+"LoadEventListener[] stack = { new MyLoadListener(), new "
+"DefaultLoadEventListener() };\n"
+"cfg.EventListeners().setLoadEventListeners(stack);]]>"
 msgstr ""
 
-#: index.docbook:114
-msgid "Listeners registered declaratively cannot share instances. If the same class name is used in multiple <literal>&lt;listener/&gt;</literal> elements, each reference will result in a separate instance of that class. If you need the capability to share listener instances between listener types you must use the programmatic registration approach."
+#. Tag: para
+#: events.xml:114
+#, no-c-format
+msgid ""
+"Listeners registered declaratively cannot share instances. If the same class "
+"name is used in multiple <literal>&lt;listener/&gt;</literal> elements, each "
+"reference will result in a separate instance of that class. If you need the "
+"capability to share listener instances between listener types you must use "
+"the programmatic registration approach."
 msgstr ""
+"通过在XML配置文件声明而注册的监听器不能共享实例。如果在多个<literal>&lt;"
+"listener/&gt;</literal>节点中使用 了相同的类的名字,则每一个引用都将会产生一"
+"个独立的实例。如果你需要在多个监听器类型之间共享 监听器的实例,则你必须使用编"
+"程的方式来进行注册。"
 
-#: index.docbook:122
-msgid "Why implement an interface and define the specific type during configuration? Well, a listener implementation could implement multiple event listener interfaces. Having the type additionally defined during registration makes it easier to turn custom listeners on or off during configuration."
+#. Tag: para
+#: events.xml:122
+#, no-c-format
+msgid ""
+"Why implement an interface and define the specific type during "
+"configuration? Well, a listener implementation could implement multiple "
+"event listener interfaces. Having the type additionally defined during "
+"registration makes it easier to turn custom listeners on or off during "
+"configuration."
 msgstr ""
+"为什么我们实现了特定监听器的接口,在注册的时候还要明确指出我们要注册哪个事件"
+"的监听器呢? 这是因为一个类可能实现多个监听器的接口。在注册的时候明确指定要监"
+"听的事件,可以让启用或者禁用对某个事件的监听的配置工作简单些。"
 
-#: index.docbook:132
+#. Tag: title
+#: events.xml:132
+#, no-c-format
 msgid "Hibernate declarative security"
-msgstr ""
+msgstr "Hibernate的声明式安全机制"
 
-#: index.docbook:133
-msgid "Usually, declarative security in Hibernate applications is managed in a session facade layer. Now, Hibernate3 allows certain actions to be permissioned via JACC, and authorized via JAAS. This is optional functionality built on top of the event architecture."
+#. Tag: para
+#: events.xml:133
+#, no-c-format
+msgid ""
+"Usually, declarative security in Hibernate applications is managed in a "
+"session facade layer. Now, Hibernate3 allows certain actions to be "
+"permissioned via JACC, and authorized via JAAS. This is optional "
+"functionality built on top of the event architecture."
 msgstr ""
+"通常,Hibernate应用程序的声明式安全机制由会话外观层(session facade)所管理。 "
+"现在,Hibernate3允许某些特定的行为由JACC进行许可管理,由JAAS进行授权管理。 本"
+"功能是一个建立在事件框架之上的可选的功能。"
 
-#: index.docbook:139
-msgid "First, you must configure the appropriate event listeners, to enable the use of JAAS authorization."
+#. Tag: para
+#: events.xml:139
+#, no-c-format
+msgid ""
+"First, you must configure the appropriate event listeners, to enable the use "
+"of JAAS authorization."
 msgstr ""
+"首先,你必须要配置适当的事件监听器(event listener),来激活使用JAAS管理授权"
+"的功能。"
 
-#: index.docbook:144
+#. Tag: programlisting
+#: events.xml:144
+#, no-c-format
 msgid ""
-      "<![CDATA[<listener type=\"pre-delete\" class=\"org.hibernate.secure.JACCPreDeleteEventListener\"/>\n"
-      "<listener type=\"pre-update\" class=\"org.hibernate.secure.JACCPreUpdateEventListener\"/>\n"
-      "<listener type=\"pre-insert\" class=\"org.hibernate.secure.JACCPreInsertEventListener\"/>\n"
-      "<listener type=\"pre-load\" class=\"org.hibernate.secure.JACCPreLoadEventListener\"/>]]>"
+"<![CDATA[<listener type=\"pre-delete\" class=\"org.hibernate.secure."
+"JACCPreDeleteEventListener\"/>\n"
+"<listener type=\"pre-update\" class=\"org.hibernate.secure."
+"JACCPreUpdateEventListener\"/>\n"
+"<listener type=\"pre-insert\" class=\"org.hibernate.secure."
+"JACCPreInsertEventListener\"/>\n"
+"<listener type=\"pre-load\" class=\"org.hibernate.secure."
+"JACCPreLoadEventListener\"/>]]>"
 msgstr ""
 
-#: index.docbook:146
-msgid "Note that <literal>&lt;listener type=\"...\" class=\"...\"/&gt;</literal> is just a shorthand for <literal>&lt;event type=\"...\"&gt;&lt;listener class=\"...\"/&gt;&lt;/event&gt;</literal> when there is exactly one listener for a particular event type."
+#. Tag: para
+#: events.xml:146
+#, no-c-format
+msgid ""
+"Note that <literal>&lt;listener type=\"...\" class=\"...\"/&gt;</literal> is "
+"just a shorthand for <literal>&lt;event type=\"...\"&gt;&lt;listener class="
+"\"...\"/&gt;&lt;/event&gt;</literal> when there is exactly one listener for "
+"a particular event type."
 msgstr ""
+"注意,<literal>&lt;listener type=\"...\" class=\"...\"/&gt;</literal>只是"
+"<literal>&lt;event type=\"...\"&gt;&lt;listener class=\"...\"/&gt;&lt;/"
+"event&gt;</literal>的简写,对每一个事件类型都必须严格的有一个监听器与之对应。"
 
-#: index.docbook:152
-msgid "Next, still in <literal>hibernate.cfg.xml</literal>, bind the permissions to roles:"
+#. Tag: para
+#: events.xml:152
+#, no-c-format
+msgid ""
+"Next, still in <literal>hibernate.cfg.xml</literal>, bind the permissions to "
+"roles:"
 msgstr ""
+"接下来,仍然在<literal>hibernate.cfg.xml</literal>文件中,绑定角色的权限:"
 
-#: index.docbook:156
+#. Tag: programlisting
+#: events.xml:156
+#, no-c-format
 msgid ""
-      "<![CDATA[<grant role=\"admin\" entity-name=\"User\" actions=\"insert,update,read\"/>\n"
-      "<grant role=\"su\" entity-name=\"User\" actions=\"*\"/>]]>"
+"<![CDATA[<grant role=\"admin\" entity-name=\"User\" actions=\"insert,update,"
+"read\"/>\n"
+"<grant role=\"su\" entity-name=\"User\" actions=\"*\"/>]]>"
 msgstr ""
 
-#: index.docbook:158
+#. Tag: para
+#: events.xml:158
+#, no-c-format
 msgid "The role names are the roles understood by your JACC provider."
-msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+msgstr "这些角色的名字就是你的JACC provider所定义的角色的名字。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/example_mappings.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/example_mappings.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/example_mappings.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,653 +1,785 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:20
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: example_mappings.xml:20
+#, no-c-format
 msgid "Example: Various Mappings"
-msgstr ""
+msgstr "示例:复杂映射实例"
 
-#: index.docbook:22
+#. Tag: para
+#: example_mappings.xml:22
+#, no-c-format
 msgid "This chapters shows off some more complex association mappings."
-msgstr ""
+msgstr "本章展示了一些较为复杂的关系映射。"
 
-#: index.docbook:27
+#. Tag: title
+#: example_mappings.xml:27
+#, no-c-format
 msgid "Employer/Employee"
-msgstr ""
+msgstr "Employer(雇主)/Employee(雇员)"
 
-#: index.docbook:29
-msgid "The following model of the relationship between <literal>Employer</literal> and <literal>Employee</literal> uses an actual entity class (<literal>Employment</literal>) to represent the association. This is done because there might be more than one period of employment for the same two parties. Components are used to model monetary values and employee names."
+#. Tag: para
+#: example_mappings.xml:29
+#, no-c-format
+msgid ""
+"The following model of the relationship between <literal>Employer</literal> "
+"and <literal>Employee</literal> uses an actual entity class "
+"(<literal>Employment</literal>) to represent the association. This is done "
+"because there might be more than one period of employment for the same two "
+"parties. Components are used to model monetary values and employee names."
 msgstr ""
+"下面关于<literal>Employer</literal> 和 <literal>Employee</literal>的关系模型"
+"使用了一个真实的实体类 (<literal>Employment</literal>)来表述,这是因为对于相"
+"同的雇员和雇主可能会有多个雇佣时间段。 对于金额和雇员姓名,用Components建模。"
 
-#: index.docbook:46
+#. Tag: para
+#: example_mappings.xml:46
+#, no-c-format
 msgid "Heres a possible mapping document:"
-msgstr ""
+msgstr "映射文件可能是这样:"
 
-#: index.docbook:50
+#. Tag: programlisting
+#: example_mappings.xml:50
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "        \n"
-      "    <class name=\"Employer\" table=\"employers\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\">\n"
-      "                <param name=\"sequence\">employer_id_seq</param>\n"
-      "            </generator>\n"
-      "        </id>\n"
-      "        <property name=\"name\"/>\n"
-      "    </class>\n"
-      "\n"
-      "    <class name=\"Employment\" table=\"employment_periods\">\n"
-      "\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\">\n"
-      "                <param name=\"sequence\">employment_id_seq</param>\n"
-      "            </generator>\n"
-      "        </id>\n"
-      "        <property name=\"startDate\" column=\"start_date\"/>\n"
-      "        <property name=\"endDate\" column=\"end_date\"/>\n"
-      "\n"
-      "        <component name=\"hourlyRate\" class=\"MonetaryAmount\">\n"
-      "            <property name=\"amount\">\n"
-      "                <column name=\"hourly_rate\" sql-type=\"NUMERIC(12, 2)\"/>\n"
-      "            </property>\n"
-      "            <property name=\"currency\" length=\"12\"/>\n"
-      "        </component>\n"
-      "\n"
-      "        <many-to-one name=\"employer\" column=\"employer_id\" not-null=\"true\"/>\n"
-      "        <many-to-one name=\"employee\" column=\"employee_id\" not-null=\"true\"/>\n"
-      "\n"
-      "    </class>\n"
-      "\n"
-      "    <class name=\"Employee\" table=\"employees\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"sequence\">\n"
-      "                <param name=\"sequence\">employee_id_seq</param>\n"
-      "            </generator>\n"
-      "        </id>\n"
-      "        <property name=\"taxfileNumber\"/>\n"
-      "        <component name=\"name\" class=\"Name\">\n"
-      "            <property name=\"firstName\"/>\n"
-      "            <property name=\"initial\"/>\n"
-      "            <property name=\"lastName\"/>\n"
-      "        </component>\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"        \n"
+"    <class name=\"Employer\" table=\"employers\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\">\n"
+"                <param name=\"sequence\">employer_id_seq</param>\n"
+"            </generator>\n"
+"        </id>\n"
+"        <property name=\"name\"/>\n"
+"    </class>\n"
+"\n"
+"    <class name=\"Employment\" table=\"employment_periods\">\n"
+"\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\">\n"
+"                <param name=\"sequence\">employment_id_seq</param>\n"
+"            </generator>\n"
+"        </id>\n"
+"        <property name=\"startDate\" column=\"start_date\"/>\n"
+"        <property name=\"endDate\" column=\"end_date\"/>\n"
+"\n"
+"        <component name=\"hourlyRate\" class=\"MonetaryAmount\">\n"
+"            <property name=\"amount\">\n"
+"                <column name=\"hourly_rate\" sql-type=\"NUMERIC(12, 2)\"/>\n"
+"            </property>\n"
+"            <property name=\"currency\" length=\"12\"/>\n"
+"        </component>\n"
+"\n"
+"        <many-to-one name=\"employer\" column=\"employer_id\" not-null=\"true"
+"\"/>\n"
+"        <many-to-one name=\"employee\" column=\"employee_id\" not-null=\"true"
+"\"/>\n"
+"\n"
+"    </class>\n"
+"\n"
+"    <class name=\"Employee\" table=\"employees\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"sequence\">\n"
+"                <param name=\"sequence\">employee_id_seq</param>\n"
+"            </generator>\n"
+"        </id>\n"
+"        <property name=\"taxfileNumber\"/>\n"
+"        <component name=\"name\" class=\"Name\">\n"
+"            <property name=\"firstName\"/>\n"
+"            <property name=\"initial\"/>\n"
+"            <property name=\"lastName\"/>\n"
+"        </component>\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:52
-msgid "And heres the table schema generated by <literal>SchemaExport</literal>."
-msgstr ""
+#. Tag: para
+#: example_mappings.xml:52
+#, no-c-format
+msgid ""
+"And heres the table schema generated by <literal>SchemaExport</literal>."
+msgstr "用<literal>SchemaExport</literal>生成表结构。"
 
-#: index.docbook:56
+#. Tag: programlisting
+#: example_mappings.xml:56
+#, no-c-format
 msgid ""
-      "<![CDATA[create table employers (\n"
-      "    id BIGINT not null, \n"
-      "    name VARCHAR(255), \n"
-      "    primary key (id)\n"
-      ")\n"
-      "\n"
-      "create table employment_periods (\n"
-      "    id BIGINT not null,\n"
-      "    hourly_rate NUMERIC(12, 2),\n"
-      "    currency VARCHAR(12), \n"
-      "    employee_id BIGINT not null, \n"
-      "    employer_id BIGINT not null, \n"
-      "    end_date TIMESTAMP, \n"
-      "    start_date TIMESTAMP, \n"
-      "    primary key (id)\n"
-      ")\n"
-      "\n"
-      "create table employees (\n"
-      "    id BIGINT not null, \n"
-      "    firstName VARCHAR(255), \n"
-      "    initial CHAR(1), \n"
-      "    lastName VARCHAR(255), \n"
-      "    taxfileNumber VARCHAR(255), \n"
-      "    primary key (id)\n"
-      ")\n"
-      "\n"
-      "alter table employment_periods \n"
-      "    add constraint employment_periodsFK0 foreign key (employer_id) references employers\n"
-      "alter table employment_periods \n"
-      "    add constraint employment_periodsFK1 foreign key (employee_id) references employees\n"
-      "create sequence employee_id_seq\n"
-      "create sequence employment_id_seq\n"
-      "create sequence employer_id_seq]]>"
+"<![CDATA[create table employers (\n"
+"    id BIGINT not null, \n"
+"    name VARCHAR(255), \n"
+"    primary key (id)\n"
+")\n"
+"\n"
+"create table employment_periods (\n"
+"    id BIGINT not null,\n"
+"    hourly_rate NUMERIC(12, 2),\n"
+"    currency VARCHAR(12), \n"
+"    employee_id BIGINT not null, \n"
+"    employer_id BIGINT not null, \n"
+"    end_date TIMESTAMP, \n"
+"    start_date TIMESTAMP, \n"
+"    primary key (id)\n"
+")\n"
+"\n"
+"create table employees (\n"
+"    id BIGINT not null, \n"
+"    firstName VARCHAR(255), \n"
+"    initial CHAR(1), \n"
+"    lastName VARCHAR(255), \n"
+"    taxfileNumber VARCHAR(255), \n"
+"    primary key (id)\n"
+")\n"
+"\n"
+"alter table employment_periods \n"
+"    add constraint employment_periodsFK0 foreign key (employer_id) "
+"references employers\n"
+"alter table employment_periods \n"
+"    add constraint employment_periodsFK1 foreign key (employee_id) "
+"references employees\n"
+"create sequence employee_id_seq\n"
+"create sequence employment_id_seq\n"
+"create sequence employer_id_seq]]>"
 msgstr ""
 
-#: index.docbook:61
+#. Tag: title
+#: example_mappings.xml:61
+#, no-c-format
 msgid "Author/Work"
-msgstr ""
+msgstr "Author(作家)/Work(作品)"
 
-#: index.docbook:63
-msgid "Consider the following model of the relationships between <literal>Work</literal>, <literal>Author</literal> and <literal>Person</literal>. We represent the relationship between <literal>Work</literal> and <literal>Author</literal> as a many-to-many association. We choose to represent the relationship between <literal>Author</literal> and <literal>Person</literal> as one-to-one association. Another possibility would be to have <literal>Author</literal> extend <literal>Person</literal>."
+#. Tag: para
+#: example_mappings.xml:63
+#, no-c-format
+msgid ""
+"Consider the following model of the relationships between <literal>Work</"
+"literal>, <literal>Author</literal> and <literal>Person</literal>. We "
+"represent the relationship between <literal>Work</literal> and "
+"<literal>Author</literal> as a many-to-many association. We choose to "
+"represent the relationship between <literal>Author</literal> and "
+"<literal>Person</literal> as one-to-one association. Another possibility "
+"would be to have <literal>Author</literal> extend <literal>Person</literal>."
 msgstr ""
+"考虑下面的<literal>Work</literal>,<literal>Author</literal> 和 "
+"<literal>Person</literal>模型的关系。 我们用多对多关系来描述<literal>Work</"
+"literal> 和 <literal>Author</literal>, 用一对一关系来描述<literal>Author</"
+"literal> 和 <literal>Person</literal>, 另一种可能性是<literal>Author</"
+"literal>继承<literal>Person</literal>。"
 
-#: index.docbook:81
-msgid "The following mapping document correctly represents these relationships:"
-msgstr ""
+#. Tag: para
+#: example_mappings.xml:81
+#, no-c-format
+msgid ""
+"The following mapping document correctly represents these relationships:"
+msgstr "下面的映射文件正确的描述了这些关系:"
 
-#: index.docbook:85
+#. Tag: programlisting
+#: example_mappings.xml:85
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "\n"
-      "    <class name=\"Work\" table=\"works\" discriminator-value=\"W\">\n"
-      "\n"
-      "        <id name=\"id\" column=\"id\">\n"
-      "            <generator class=\"native\"/>\n"
-      "        </id>\n"
-      "        <discriminator column=\"type\" type=\"character\"/>\n"
-      "\n"
-      "        <property name=\"title\"/>\n"
-      "        <set name=\"authors\" table=\"author_work\">\n"
-      "            <key column name=\"work_id\"/>\n"
-      "            <many-to-many class=\"Author\" column name=\"author_id\"/>\n"
-      "        </set>\n"
-      "\n"
-      "        <subclass name=\"Book\" discriminator-value=\"B\">\n"
-      "            <property name=\"text\"/>\n"
-      "        </subclass>\n"
-      "\n"
-      "        <subclass name=\"Song\" discriminator-value=\"S\">\n"
-      "            <property name=\"tempo\"/>\n"
-      "            <property name=\"genre\"/>\n"
-      "        </subclass>\n"
-      "\n"
-      "    </class>\n"
-      "\n"
-      "    <class name=\"Author\" table=\"authors\">\n"
-      "\n"
-      "        <id name=\"id\" column=\"id\">\n"
-      "            <!-- The Author must have the same identifier as the Person -->\n"
-      "            <generator class=\"assigned\"/> \n"
-      "        </id>\n"
-      "\n"
-      "        <property name=\"alias\"/>\n"
-      "        <one-to-one name=\"person\" constrained=\"true\"/>\n"
-      "\n"
-      "        <set name=\"works\" table=\"author_work\" inverse=\"true\">\n"
-      "            <key column=\"author_id\"/>\n"
-      "            <many-to-many class=\"Work\" column=\"work_id\"/>\n"
-      "        </set>\n"
-      "\n"
-      "    </class>\n"
-      "\n"
-      "    <class name=\"Person\" table=\"persons\">\n"
-      "        <id name=\"id\" column=\"id\">\n"
-      "            <generator class=\"native\"/>\n"
-      "        </id>\n"
-      "        <property name=\"name\"/>\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"\n"
+"    <class name=\"Work\" table=\"works\" discriminator-value=\"W\">\n"
+"\n"
+"        <id name=\"id\" column=\"id\">\n"
+"            <generator class=\"native\"/>\n"
+"        </id>\n"
+"        <discriminator column=\"type\" type=\"character\"/>\n"
+"\n"
+"        <property name=\"title\"/>\n"
+"        <set name=\"authors\" table=\"author_work\">\n"
+"            <key column name=\"work_id\"/>\n"
+"            <many-to-many class=\"Author\" column name=\"author_id\"/>\n"
+"        </set>\n"
+"\n"
+"        <subclass name=\"Book\" discriminator-value=\"B\">\n"
+"            <property name=\"text\"/>\n"
+"        </subclass>\n"
+"\n"
+"        <subclass name=\"Song\" discriminator-value=\"S\">\n"
+"            <property name=\"tempo\"/>\n"
+"            <property name=\"genre\"/>\n"
+"        </subclass>\n"
+"\n"
+"    </class>\n"
+"\n"
+"    <class name=\"Author\" table=\"authors\">\n"
+"\n"
+"        <id name=\"id\" column=\"id\">\n"
+"            <!-- The Author must have the same identifier as the Person -->\n"
+"            <generator class=\"assigned\"/> \n"
+"        </id>\n"
+"\n"
+"        <property name=\"alias\"/>\n"
+"        <one-to-one name=\"person\" constrained=\"true\"/>\n"
+"\n"
+"        <set name=\"works\" table=\"author_work\" inverse=\"true\">\n"
+"            <key column=\"author_id\"/>\n"
+"            <many-to-many class=\"Work\" column=\"work_id\"/>\n"
+"        </set>\n"
+"\n"
+"    </class>\n"
+"\n"
+"    <class name=\"Person\" table=\"persons\">\n"
+"        <id name=\"id\" column=\"id\">\n"
+"            <generator class=\"native\"/>\n"
+"        </id>\n"
+"        <property name=\"name\"/>\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:87
-msgid "There are four tables in this mapping. <literal>works</literal>, <literal>authors</literal> and <literal>persons</literal> hold work, author and person data respectively. <literal>author_work</literal> is an association table linking authors to works. Heres the table schema, as generated by <literal>SchemaExport</literal>."
+#. Tag: para
+#: example_mappings.xml:87
+#, no-c-format
+msgid ""
+"There are four tables in this mapping. <literal>works</literal>, "
+"<literal>authors</literal> and <literal>persons</literal> hold work, author "
+"and person data respectively. <literal>author_work</literal> is an "
+"association table linking authors to works. Heres the table schema, as "
+"generated by <literal>SchemaExport</literal>."
 msgstr ""
+"映射中有4个表。<literal>works</literal>, <literal>authors</literal> 和 "
+"<literal>persons</literal> 分别保存着work,author和person的数据。"
+"<literal>author_work</literal>是authors和works的关联表。 表结构是由"
+"<literal>SchemaExport</literal>生成的。"
 
-#: index.docbook:95
+#. Tag: programlisting
+#: example_mappings.xml:95
+#, no-c-format
 msgid ""
-      "<![CDATA[create table works (\n"
-      "    id BIGINT not null generated by default as identity, \n"
-      "    tempo FLOAT, \n"
-      "    genre VARCHAR(255), \n"
-      "    text INTEGER, \n"
-      "    title VARCHAR(255), \n"
-      "    type CHAR(1) not null, \n"
-      "    primary key (id)\n"
-      ")\n"
-      "\n"
-      "create table author_work (\n"
-      "    author_id BIGINT not null, \n"
-      "    work_id BIGINT not null, \n"
-      "    primary key (work_id, author_id)\n"
-      ")\n"
-      "\n"
-      "create table authors (\n"
-      "    id BIGINT not null generated by default as identity, \n"
-      "    alias VARCHAR(255), \n"
-      "    primary key (id)\n"
-      ")\n"
-      "\n"
-      "create table persons (\n"
-      "    id BIGINT not null generated by default as identity, \n"
-      "    name VARCHAR(255), \n"
-      "    primary key (id)\n"
-      ")\n"
-      "\n"
-      "alter table authors \n"
-      "    add constraint authorsFK0 foreign key (id) references persons\n"
-      "alter table author_work \n"
-      "    add constraint author_workFK0 foreign key (author_id) references authors\n"
-      "alter table author_work\n"
-      "    add constraint author_workFK1 foreign key (work_id) references works]]>"
+"<![CDATA[create table works (\n"
+"    id BIGINT not null generated by default as identity, \n"
+"    tempo FLOAT, \n"
+"    genre VARCHAR(255), \n"
+"    text INTEGER, \n"
+"    title VARCHAR(255), \n"
+"    type CHAR(1) not null, \n"
+"    primary key (id)\n"
+")\n"
+"\n"
+"create table author_work (\n"
+"    author_id BIGINT not null, \n"
+"    work_id BIGINT not null, \n"
+"    primary key (work_id, author_id)\n"
+")\n"
+"\n"
+"create table authors (\n"
+"    id BIGINT not null generated by default as identity, \n"
+"    alias VARCHAR(255), \n"
+"    primary key (id)\n"
+")\n"
+"\n"
+"create table persons (\n"
+"    id BIGINT not null generated by default as identity, \n"
+"    name VARCHAR(255), \n"
+"    primary key (id)\n"
+")\n"
+"\n"
+"alter table authors \n"
+"    add constraint authorsFK0 foreign key (id) references persons\n"
+"alter table author_work \n"
+"    add constraint author_workFK0 foreign key (author_id) references "
+"authors\n"
+"alter table author_work\n"
+"    add constraint author_workFK1 foreign key (work_id) references works]]>"
 msgstr ""
 
-#: index.docbook:100
+#. Tag: title
+#: example_mappings.xml:100
+#, no-c-format
 msgid "Customer/Order/Product"
-msgstr ""
+msgstr "Customer(客户)/Order(订单)/Product(产品)"
 
-#: index.docbook:102
-msgid "Now consider a model of the relationships between <literal>Customer</literal>, <literal>Order</literal> and <literal>LineItem</literal> and <literal>Product</literal>. There is a one-to-many association between <literal>Customer</literal> and <literal>Order</literal>, but how should we represent <literal>Order</literal> / <literal>LineItem</literal> / <literal>Product</literal>? I've chosen to map <literal>LineItem</literal> as an association class representing the many-to-many association between <literal>Order</literal> and <literal>Product</literal>. In Hibernate, this is called a composite element."
+#. Tag: para
+#: example_mappings.xml:102
+#, no-c-format
+msgid ""
+"Now consider a model of the relationships between <literal>Customer</"
+"literal>, <literal>Order</literal> and <literal>LineItem</literal> and "
+"<literal>Product</literal>. There is a one-to-many association between "
+"<literal>Customer</literal> and <literal>Order</literal>, but how should we "
+"represent <literal>Order</literal> / <literal>LineItem</literal> / "
+"<literal>Product</literal>? I've chosen to map <literal>LineItem</literal> "
+"as an association class representing the many-to-many association between "
+"<literal>Order</literal> and <literal>Product</literal>. In Hibernate, this "
+"is called a composite element."
 msgstr ""
+"现在来考虑<literal>Customer</literal>,<literal>Order</literal> , "
+"<literal>LineItem</literal> 和 <literal>Product</literal>关系的模型。"
+"<literal>Customer</literal> 和 <literal>Order</literal>之间 是一对多的关系,"
+"但是我们怎么来描述<literal>Order</literal> / <literal>LineItem</literal> / "
+"<literal>Product</literal>呢? 我可以把<literal>LineItem</literal>作为描述"
+"<literal>Order</literal> 和 <literal>Product</literal> 多对多关系的关联类,在"
+"Hibernate,这叫做组合元素。"
 
-#: index.docbook:122
+#. Tag: para
+#: example_mappings.xml:122
+#, no-c-format
 msgid "The mapping document:"
-msgstr ""
+msgstr "映射文件如下:"
 
-#: index.docbook:126
+#. Tag: programlisting
+#: example_mappings.xml:126
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "\n"
-      "    <class name=\"Customer\" table=\"customers\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"native\"/>\n"
-      "        </id>\n"
-      "        <property name=\"name\"/>\n"
-      "        <set name=\"orders\" inverse=\"true\">\n"
-      "            <key column=\"customer_id\"/>\n"
-      "            <one-to-many class=\"Order\"/>\n"
-      "        </set>\n"
-      "    </class>\n"
-      "\n"
-      "    <class name=\"Order\" table=\"orders\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"native\"/>\n"
-      "        </id>\n"
-      "        <property name=\"date\"/>\n"
-      "        <many-to-one name=\"customer\" column=\"customer_id\"/>\n"
-      "        <list name=\"lineItems\" table=\"line_items\">\n"
-      "            <key column=\"order_id\"/>\n"
-      "            <list-index column=\"line_number\"/>\n"
-      "            <composite-element class=\"LineItem\">\n"
-      "                <property name=\"quantity\"/>\n"
-      "                <many-to-one name=\"product\" column=\"product_id\"/>\n"
-      "            </composite-element>\n"
-      "        </list>\n"
-      "    </class>\n"
-      "\n"
-      "    <class name=\"Product\" table=\"products\">\n"
-      "        <id name=\"id\">\n"
-      "            <generator class=\"native\"/>\n"
-      "        </id>\n"
-      "        <property name=\"serialNumber\"/>\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"\n"
+"    <class name=\"Customer\" table=\"customers\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"native\"/>\n"
+"        </id>\n"
+"        <property name=\"name\"/>\n"
+"        <set name=\"orders\" inverse=\"true\">\n"
+"            <key column=\"customer_id\"/>\n"
+"            <one-to-many class=\"Order\"/>\n"
+"        </set>\n"
+"    </class>\n"
+"\n"
+"    <class name=\"Order\" table=\"orders\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"native\"/>\n"
+"        </id>\n"
+"        <property name=\"date\"/>\n"
+"        <many-to-one name=\"customer\" column=\"customer_id\"/>\n"
+"        <list name=\"lineItems\" table=\"line_items\">\n"
+"            <key column=\"order_id\"/>\n"
+"            <list-index column=\"line_number\"/>\n"
+"            <composite-element class=\"LineItem\">\n"
+"                <property name=\"quantity\"/>\n"
+"                <many-to-one name=\"product\" column=\"product_id\"/>\n"
+"            </composite-element>\n"
+"        </list>\n"
+"    </class>\n"
+"\n"
+"    <class name=\"Product\" table=\"products\">\n"
+"        <id name=\"id\">\n"
+"            <generator class=\"native\"/>\n"
+"        </id>\n"
+"        <property name=\"serialNumber\"/>\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:128
-msgid "<literal>customers</literal>, <literal>orders</literal>, <literal>line_items</literal> and <literal>products</literal> hold customer, order, order line item and product data respectively. <literal>line_items</literal> also acts as an association table linking orders with products."
+#. Tag: para
+#: example_mappings.xml:128
+#, no-c-format
+msgid ""
+"<literal>customers</literal>, <literal>orders</literal>, "
+"<literal>line_items</literal> and <literal>products</literal> hold customer, "
+"order, order line item and product data respectively. <literal>line_items</"
+"literal> also acts as an association table linking orders with products."
 msgstr ""
+"<literal>customers</literal>, <literal>orders</literal>, "
+"<literal>line_items</literal> 和 <literal>products</literal> 分别保存着"
+"customer, order, order line item 和 product的数据。 <literal>line_items</"
+"literal>也作为连接orders 和 products的关联表。"
 
-#: index.docbook:135
+#. Tag: programlisting
+#: example_mappings.xml:135
+#, no-c-format
 msgid ""
-      "<![CDATA[create table customers (\n"
-      "    id BIGINT not null generated by default as identity, \n"
-      "    name VARCHAR(255), \n"
-      "    primary key (id)\n"
-      ")\n"
-      "\n"
-      "create table orders (\n"
-      "    id BIGINT not null generated by default as identity, \n"
-      "    customer_id BIGINT, \n"
-      "    date TIMESTAMP, \n"
-      "    primary key (id)\n"
-      ")\n"
-      "\n"
-      "create table line_items (\n"
-      "    line_number INTEGER not null, \n"
-      "    order_id BIGINT not null, \n"
-      "    product_id BIGINT, \n"
-      "    quantity INTEGER, \n"
-      "    primary key (order_id, line_number)\n"
-      ")\n"
-      "\n"
-      "create table products (\n"
-      "    id BIGINT not null generated by default as identity, \n"
-      "    serialNumber VARCHAR(255), \n"
-      "    primary key (id)\n"
-      ")\n"
-      "\n"
-      "alter table orders \n"
-      "    add constraint ordersFK0 foreign key (customer_id) references customers\n"
-      "alter table line_items\n"
-      "    add constraint line_itemsFK0 foreign key (product_id) references products\n"
-      "alter table line_items\n"
-      "    add constraint line_itemsFK1 foreign key (order_id) references orders]]>"
+"<![CDATA[create table customers (\n"
+"    id BIGINT not null generated by default as identity, \n"
+"    name VARCHAR(255), \n"
+"    primary key (id)\n"
+")\n"
+"\n"
+"create table orders (\n"
+"    id BIGINT not null generated by default as identity, \n"
+"    customer_id BIGINT, \n"
+"    date TIMESTAMP, \n"
+"    primary key (id)\n"
+")\n"
+"\n"
+"create table line_items (\n"
+"    line_number INTEGER not null, \n"
+"    order_id BIGINT not null, \n"
+"    product_id BIGINT, \n"
+"    quantity INTEGER, \n"
+"    primary key (order_id, line_number)\n"
+")\n"
+"\n"
+"create table products (\n"
+"    id BIGINT not null generated by default as identity, \n"
+"    serialNumber VARCHAR(255), \n"
+"    primary key (id)\n"
+")\n"
+"\n"
+"alter table orders \n"
+"    add constraint ordersFK0 foreign key (customer_id) references customers\n"
+"alter table line_items\n"
+"    add constraint line_itemsFK0 foreign key (product_id) references "
+"products\n"
+"alter table line_items\n"
+"    add constraint line_itemsFK1 foreign key (order_id) references orders]]>"
 msgstr ""
 
-#: index.docbook:140
+#. Tag: title
+#: example_mappings.xml:140
+#, no-c-format
 msgid "Miscellaneous example mappings"
-msgstr ""
+msgstr "杂例"
 
-#: index.docbook:142
-msgid "These examples are all taken from the Hibernate test suite. You will find many other useful example mappings there. Look in the <literal>test</literal> folder of the Hibernate distribution."
+#. Tag: para
+#: example_mappings.xml:142
+#, no-c-format
+msgid ""
+"These examples are all taken from the Hibernate test suite. You will find "
+"many other useful example mappings there. Look in the <literal>test</"
+"literal> folder of the Hibernate distribution."
 msgstr ""
+"这些例子全部来自于Hibernate的test suite,同时你也可以找到其他有用的例子。 可"
+"以参考Hibernate的<literal>test</literal>目录。"
 
-#: index.docbook:148
+#. Tag: para
+#: example_mappings.xml:148
+#, no-c-format
 msgid "TODO: put words around this stuff"
-msgstr ""
+msgstr "TODO: put words around this stuff"
 
-#: index.docbook:151
+#. Tag: title
+#: example_mappings.xml:151
+#, no-c-format
 msgid "\"Typed\" one-to-one association"
-msgstr ""
+msgstr "\"Typed\" one-to-one association"
 
-#: index.docbook:152
+#. Tag: programlisting
+#: example_mappings.xml:152
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"name\"/>\n"
-      "    <one-to-one name=\"address\" \n"
-      "            cascade=\"all\">\n"
-      "        <formula>name</formula>\n"
-      "        <formula>'HOME'</formula>\n"
-      "    </one-to-one>\n"
-      "    <one-to-one name=\"mailingAddress\" \n"
-      "            cascade=\"all\">\n"
-      "        <formula>name</formula>\n"
-      "        <formula>'MAILING'</formula>\n"
-      "    </one-to-one>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\" batch-size=\"2\" \n"
-      "        check=\"addressType in ('MAILING', 'HOME', 'BUSINESS')\">\n"
-      "    <composite-id>\n"
-      "        <key-many-to-one name=\"person\" \n"
-      "                column=\"personName\"/>\n"
-      "        <key-property name=\"type\" \n"
-      "                column=\"addressType\"/>\n"
-      "    </composite-id>\n"
-      "    <property name=\"street\" type=\"text\"/>\n"
-      "    <property name=\"state\"/>\n"
-      "    <property name=\"zip\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"name\"/>\n"
+"    <one-to-one name=\"address\" \n"
+"            cascade=\"all\">\n"
+"        <formula>name</formula>\n"
+"        <formula>'HOME'</formula>\n"
+"    </one-to-one>\n"
+"    <one-to-one name=\"mailingAddress\" \n"
+"            cascade=\"all\">\n"
+"        <formula>name</formula>\n"
+"        <formula>'MAILING'</formula>\n"
+"    </one-to-one>\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\" batch-size=\"2\" \n"
+"        check=\"addressType in ('MAILING', 'HOME', 'BUSINESS')\">\n"
+"    <composite-id>\n"
+"        <key-many-to-one name=\"person\" \n"
+"                column=\"personName\"/>\n"
+"        <key-property name=\"type\" \n"
+"                column=\"addressType\"/>\n"
+"    </composite-id>\n"
+"    <property name=\"street\" type=\"text\"/>\n"
+"    <property name=\"state\"/>\n"
+"    <property name=\"zip\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:156
+#. Tag: title
+#: example_mappings.xml:156
+#, no-c-format
 msgid "Composite key example"
-msgstr ""
+msgstr "Composite key example"
 
-#: index.docbook:157
+#. Tag: programlisting
+#: example_mappings.xml:157
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Customer\">\n"
-      "\n"
-      "    <id name=\"customerId\"\n"
-      "        length=\"10\">\n"
-      "        <generator class=\"assigned\"/>\n"
-      "    </id>\n"
-      "\n"
-      "    <property name=\"name\" not-null=\"true\" length=\"100\"/>\n"
-      "    <property name=\"address\" not-null=\"true\" length=\"200\"/>\n"
-      "\n"
-      "    <list name=\"orders\"\n"
-      "            inverse=\"true\"\n"
-      "            cascade=\"save-update\">\n"
-      "        <key column=\"customerId\"/>\n"
-      "        <index column=\"orderNumber\"/>\n"
-      "        <one-to-many class=\"Order\"/>\n"
-      "    </list>\n"
-      "\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Order\" table=\"CustomerOrder\" lazy=\"true\">\n"
-      "    <synchronize table=\"LineItem\"/>\n"
-      "    <synchronize table=\"Product\"/>\n"
-      "    \n"
-      "    <composite-id name=\"id\" \n"
-      "            class=\"Order$Id\">\n"
-      "        <key-property name=\"customerId\" length=\"10\"/>\n"
-      "        <key-property name=\"orderNumber\"/>\n"
-      "    </composite-id>\n"
-      "    \n"
-      "    <property name=\"orderDate\" \n"
-      "            type=\"calendar_date\"\n"
-      "            not-null=\"true\"/>\n"
-      "    \n"
-      "    <property name=\"total\">\n"
-      "        <formula>\n"
-      "            ( select sum(li.quantity*p.price) \n"
-      "            from LineItem li, Product p \n"
-      "            where li.productId = p.productId \n"
-      "                and li.customerId = customerId \n"
-      "                and li.orderNumber = orderNumber )\n"
-      "        </formula>\n"
-      "    </property>\n"
-      "    \n"
-      "    <many-to-one name=\"customer\"\n"
-      "            column=\"customerId\"\n"
-      "            insert=\"false\"\n"
-      "            update=\"false\" \n"
-      "            not-null=\"true\"/>\n"
-      "        \n"
-      "    <bag name=\"lineItems\"\n"
-      "            fetch=\"join\" \n"
-      "            inverse=\"true\"\n"
-      "            cascade=\"save-update\">\n"
-      "        <key>\n"
-      "            <column name=\"customerId\"/>\n"
-      "            <column name=\"orderNumber\"/>\n"
-      "        </key>\n"
-      "        <one-to-many class=\"LineItem\"/>\n"
-      "    </bag>\n"
-      "    \n"
-      "</class>\n"
-      "    \n"
-      "<class name=\"LineItem\">\n"
-      "    \n"
-      "    <composite-id name=\"id\" \n"
-      "            class=\"LineItem$Id\">\n"
-      "        <key-property name=\"customerId\" length=\"10\"/>\n"
-      "        <key-property name=\"orderNumber\"/>\n"
-      "        <key-property name=\"productId\" length=\"10\"/>\n"
-      "    </composite-id>\n"
-      "    \n"
-      "    <property name=\"quantity\"/>\n"
-      "    \n"
-      "    <many-to-one name=\"order\"\n"
-      "            insert=\"false\"\n"
-      "            update=\"false\" \n"
-      "            not-null=\"true\">\n"
-      "        <column name=\"customerId\"/>\n"
-      "        <column name=\"orderNumber\"/>\n"
-      "    </many-to-one>\n"
-      "    \n"
-      "    <many-to-one name=\"product\"\n"
-      "            insert=\"false\"\n"
-      "            update=\"false\" \n"
-      "            not-null=\"true\"\n"
-      "            column=\"productId\"/>\n"
-      "        \n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Product\">\n"
-      "    <synchronize table=\"LineItem\"/>\n"
-      "\n"
-      "    <id name=\"productId\"\n"
-      "        length=\"10\">\n"
-      "        <generator class=\"assigned\"/>\n"
-      "    </id>\n"
-      "    \n"
-      "    <property name=\"description\" \n"
-      "        not-null=\"true\" \n"
-      "        length=\"200\"/>\n"
-      "    <property name=\"price\" length=\"3\"/>\n"
-      "    <property name=\"numberAvailable\"/>\n"
-      "    \n"
-      "    <property name=\"numberOrdered\">\n"
-      "        <formula>\n"
-      "            ( select sum(li.quantity) \n"
-      "            from LineItem li \n"
-      "            where li.productId = productId )\n"
-      "        </formula>\n"
-      "    </property>\n"
-      "    \n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Customer\">\n"
+"\n"
+"    <id name=\"customerId\"\n"
+"        length=\"10\">\n"
+"        <generator class=\"assigned\"/>\n"
+"    </id>\n"
+"\n"
+"    <property name=\"name\" not-null=\"true\" length=\"100\"/>\n"
+"    <property name=\"address\" not-null=\"true\" length=\"200\"/>\n"
+"\n"
+"    <list name=\"orders\"\n"
+"            inverse=\"true\"\n"
+"            cascade=\"save-update\">\n"
+"        <key column=\"customerId\"/>\n"
+"        <index column=\"orderNumber\"/>\n"
+"        <one-to-many class=\"Order\"/>\n"
+"    </list>\n"
+"\n"
+"</class>\n"
+"\n"
+"<class name=\"Order\" table=\"CustomerOrder\" lazy=\"true\">\n"
+"    <synchronize table=\"LineItem\"/>\n"
+"    <synchronize table=\"Product\"/>\n"
+"    \n"
+"    <composite-id name=\"id\" \n"
+"            class=\"Order$Id\">\n"
+"        <key-property name=\"customerId\" length=\"10\"/>\n"
+"        <key-property name=\"orderNumber\"/>\n"
+"    </composite-id>\n"
+"    \n"
+"    <property name=\"orderDate\" \n"
+"            type=\"calendar_date\"\n"
+"            not-null=\"true\"/>\n"
+"    \n"
+"    <property name=\"total\">\n"
+"        <formula>\n"
+"            ( select sum(li.quantity*p.price) \n"
+"            from LineItem li, Product p \n"
+"            where li.productId = p.productId \n"
+"                and li.customerId = customerId \n"
+"                and li.orderNumber = orderNumber )\n"
+"        </formula>\n"
+"    </property>\n"
+"    \n"
+"    <many-to-one name=\"customer\"\n"
+"            column=\"customerId\"\n"
+"            insert=\"false\"\n"
+"            update=\"false\" \n"
+"            not-null=\"true\"/>\n"
+"        \n"
+"    <bag name=\"lineItems\"\n"
+"            fetch=\"join\" \n"
+"            inverse=\"true\"\n"
+"            cascade=\"save-update\">\n"
+"        <key>\n"
+"            <column name=\"customerId\"/>\n"
+"            <column name=\"orderNumber\"/>\n"
+"        </key>\n"
+"        <one-to-many class=\"LineItem\"/>\n"
+"    </bag>\n"
+"    \n"
+"</class>\n"
+"    \n"
+"<class name=\"LineItem\">\n"
+"    \n"
+"    <composite-id name=\"id\" \n"
+"            class=\"LineItem$Id\">\n"
+"        <key-property name=\"customerId\" length=\"10\"/>\n"
+"        <key-property name=\"orderNumber\"/>\n"
+"        <key-property name=\"productId\" length=\"10\"/>\n"
+"    </composite-id>\n"
+"    \n"
+"    <property name=\"quantity\"/>\n"
+"    \n"
+"    <many-to-one name=\"order\"\n"
+"            insert=\"false\"\n"
+"            update=\"false\" \n"
+"            not-null=\"true\">\n"
+"        <column name=\"customerId\"/>\n"
+"        <column name=\"orderNumber\"/>\n"
+"    </many-to-one>\n"
+"    \n"
+"    <many-to-one name=\"product\"\n"
+"            insert=\"false\"\n"
+"            update=\"false\" \n"
+"            not-null=\"true\"\n"
+"            column=\"productId\"/>\n"
+"        \n"
+"</class>\n"
+"\n"
+"<class name=\"Product\">\n"
+"    <synchronize table=\"LineItem\"/>\n"
+"\n"
+"    <id name=\"productId\"\n"
+"        length=\"10\">\n"
+"        <generator class=\"assigned\"/>\n"
+"    </id>\n"
+"    \n"
+"    <property name=\"description\" \n"
+"        not-null=\"true\" \n"
+"        length=\"200\"/>\n"
+"    <property name=\"price\" length=\"3\"/>\n"
+"    <property name=\"numberAvailable\"/>\n"
+"    \n"
+"    <property name=\"numberOrdered\">\n"
+"        <formula>\n"
+"            ( select sum(li.quantity) \n"
+"            from LineItem li \n"
+"            where li.productId = productId )\n"
+"        </formula>\n"
+"    </property>\n"
+"    \n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:161
+#. Tag: title
+#: example_mappings.xml:161
+#, no-c-format
 msgid "Many-to-many with shared composite key attribute"
 msgstr ""
+"共有组合键属性的多对多(Many-to-many with shared composite key attribute)"
 
-#: index.docbook:162
+#. Tag: programlisting
+#: example_mappings.xml:162
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"User\" table=\"`User`\">\n"
-      "    <composite-id>\n"
-      "        <key-property name=\"name\"/>\n"
-      "        <key-property name=\"org\"/>\n"
-      "    </composite-id>\n"
-      "    <set name=\"groups\" table=\"UserGroup\">\n"
-      "        <key>\n"
-      "            <column name=\"userName\"/>\n"
-      "            <column name=\"org\"/>\n"
-      "        </key>\n"
-      "        <many-to-many class=\"Group\">\n"
-      "            <column name=\"groupName\"/>\n"
-      "            <formula>org</formula>\n"
-      "        </many-to-many>\n"
-      "    </set>\n"
-      "</class>\n"
-      "    \n"
-      "<class name=\"Group\" table=\"`Group`\">\n"
-      "    <composite-id>\n"
-      "        <key-property name=\"name\"/>\n"
-      "        <key-property name=\"org\"/>\n"
-      "    </composite-id>\n"
-      "    <property name=\"description\"/>\n"
-      "    <set name=\"users\" table=\"UserGroup\" inverse=\"true\">\n"
-      "        <key>\n"
-      "            <column name=\"groupName\"/>\n"
-      "            <column name=\"org\"/>\n"
-      "        </key>\n"
-      "        <many-to-many class=\"User\">\n"
-      "            <column name=\"userName\"/>\n"
-      "            <formula>org</formula>\n"
-      "        </many-to-many>\n"
-      "    </set>\n"
-      "</class>\n"
-      "]]>"
+"<![CDATA[<class name=\"User\" table=\"`User`\">\n"
+"    <composite-id>\n"
+"        <key-property name=\"name\"/>\n"
+"        <key-property name=\"org\"/>\n"
+"    </composite-id>\n"
+"    <set name=\"groups\" table=\"UserGroup\">\n"
+"        <key>\n"
+"            <column name=\"userName\"/>\n"
+"            <column name=\"org\"/>\n"
+"        </key>\n"
+"        <many-to-many class=\"Group\">\n"
+"            <column name=\"groupName\"/>\n"
+"            <formula>org</formula>\n"
+"        </many-to-many>\n"
+"    </set>\n"
+"</class>\n"
+"    \n"
+"<class name=\"Group\" table=\"`Group`\">\n"
+"    <composite-id>\n"
+"        <key-property name=\"name\"/>\n"
+"        <key-property name=\"org\"/>\n"
+"    </composite-id>\n"
+"    <property name=\"description\"/>\n"
+"    <set name=\"users\" table=\"UserGroup\" inverse=\"true\">\n"
+"        <key>\n"
+"            <column name=\"groupName\"/>\n"
+"            <column name=\"org\"/>\n"
+"        </key>\n"
+"        <many-to-many class=\"User\">\n"
+"            <column name=\"userName\"/>\n"
+"            <formula>org</formula>\n"
+"        </many-to-many>\n"
+"    </set>\n"
+"</class>\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:166
+#. Tag: title
+#: example_mappings.xml:166
+#, no-c-format
 msgid "Content based discrimination"
-msgstr ""
+msgstr "Content based discrimination"
 
-#: index.docbook:167
+#. Tag: programlisting
+#: example_mappings.xml:167
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\"\n"
-      "    discriminator-value=\"P\">\n"
-      "    \n"
-      "    <id name=\"id\" \n"
-      "        column=\"person_id\" \n"
-      "        unsaved-value=\"0\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    \n"
-      "            \n"
-      "    <discriminator \n"
-      "        type=\"character\">\n"
-      "        <formula>\n"
-      "            case \n"
-      "                when title is not null then 'E' \n"
-      "                when salesperson is not null then 'C' \n"
-      "                else 'P' \n"
-      "            end\n"
-      "        </formula>\n"
-      "    </discriminator>\n"
-      "\n"
-      "    <property name=\"name\" \n"
-      "        not-null=\"true\"\n"
-      "        length=\"80\"/>\n"
-      "        \n"
-      "    <property name=\"sex\" \n"
-      "        not-null=\"true\"\n"
-      "        update=\"false\"/>\n"
-      "    \n"
-      "    <component name=\"address\">\n"
-      "        <property name=\"address\"/>\n"
-      "        <property name=\"zip\"/>\n"
-      "        <property name=\"country\"/>\n"
-      "    </component>\n"
-      "    \n"
-      "    <subclass name=\"Employee\" \n"
-      "        discriminator-value=\"E\">\n"
-      "            <property name=\"title\"\n"
-      "                length=\"20\"/>\n"
-      "            <property name=\"salary\"/>\n"
-      "            <many-to-one name=\"manager\"/>\n"
-      "    </subclass>\n"
-      "    \n"
-      "    <subclass name=\"Customer\" \n"
-      "        discriminator-value=\"C\">\n"
-      "            <property name=\"comments\"/>\n"
-      "            <many-to-one name=\"salesperson\"/>\n"
-      "    </subclass>\n"
-      "    \n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\"\n"
+"    discriminator-value=\"P\">\n"
+"    \n"
+"    <id name=\"id\" \n"
+"        column=\"person_id\" \n"
+"        unsaved-value=\"0\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    \n"
+"            \n"
+"    <discriminator \n"
+"        type=\"character\">\n"
+"        <formula>\n"
+"            case \n"
+"                when title is not null then 'E' \n"
+"                when salesperson is not null then 'C' \n"
+"                else 'P' \n"
+"            end\n"
+"        </formula>\n"
+"    </discriminator>\n"
+"\n"
+"    <property name=\"name\" \n"
+"        not-null=\"true\"\n"
+"        length=\"80\"/>\n"
+"        \n"
+"    <property name=\"sex\" \n"
+"        not-null=\"true\"\n"
+"        update=\"false\"/>\n"
+"    \n"
+"    <component name=\"address\">\n"
+"        <property name=\"address\"/>\n"
+"        <property name=\"zip\"/>\n"
+"        <property name=\"country\"/>\n"
+"    </component>\n"
+"    \n"
+"    <subclass name=\"Employee\" \n"
+"        discriminator-value=\"E\">\n"
+"            <property name=\"title\"\n"
+"                length=\"20\"/>\n"
+"            <property name=\"salary\"/>\n"
+"            <many-to-one name=\"manager\"/>\n"
+"    </subclass>\n"
+"    \n"
+"    <subclass name=\"Customer\" \n"
+"        discriminator-value=\"C\">\n"
+"            <property name=\"comments\"/>\n"
+"            <many-to-one name=\"salesperson\"/>\n"
+"    </subclass>\n"
+"    \n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:171
+#. Tag: title
+#: example_mappings.xml:171
+#, no-c-format
 msgid "Associations on alternate keys"
-msgstr ""
+msgstr "Associations on alternate keys"
 
-#: index.docbook:172
+#. Tag: programlisting
+#: example_mappings.xml:172
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    \n"
-      "    <id name=\"id\">\n"
-      "        <generator class=\"hilo\"/>\n"
-      "    </id>\n"
-      "    \n"
-      "    <property name=\"name\" length=\"100\"/>\n"
-      "    \n"
-      "    <one-to-one name=\"address\" \n"
-      "        property-ref=\"person\"\n"
-      "        cascade=\"all\"\n"
-      "        fetch=\"join\"/>\n"
-      "    \n"
-      "    <set name=\"accounts\" \n"
-      "        inverse=\"true\">\n"
-      "        <key column=\"userId\"\n"
-      "            property-ref=\"userId\"/>\n"
-      "        <one-to-many class=\"Account\"/>\n"
-      "    </set>\n"
-      "    \n"
-      "    <property name=\"userId\" length=\"8\"/>\n"
-      "\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Address\">\n"
-      "\n"
-      "    <id name=\"id\">\n"
-      "        <generator class=\"hilo\"/>\n"
-      "    </id>\n"
-      "\n"
-      "    <property name=\"address\" length=\"300\"/>\n"
-      "    <property name=\"zip\" length=\"5\"/>\n"
-      "    <property name=\"country\" length=\"25\"/>\n"
-      "    <many-to-one name=\"person\" unique=\"true\" not-null=\"true\"/>\n"
-      "\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Account\">\n"
-      "    <id name=\"accountId\" length=\"32\">\n"
-      "        <generator class=\"uuid\"/>\n"
-      "    </id>\n"
-      "    \n"
-      "    <many-to-one name=\"user\"\n"
-      "        column=\"userId\"\n"
-      "        property-ref=\"userId\"/>\n"
-      "    \n"
-      "    <property name=\"type\" not-null=\"true\"/>\n"
-      "    \n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    \n"
+"    <id name=\"id\">\n"
+"        <generator class=\"hilo\"/>\n"
+"    </id>\n"
+"    \n"
+"    <property name=\"name\" length=\"100\"/>\n"
+"    \n"
+"    <one-to-one name=\"address\" \n"
+"        property-ref=\"person\"\n"
+"        cascade=\"all\"\n"
+"        fetch=\"join\"/>\n"
+"    \n"
+"    <set name=\"accounts\" \n"
+"        inverse=\"true\">\n"
+"        <key column=\"userId\"\n"
+"            property-ref=\"userId\"/>\n"
+"        <one-to-many class=\"Account\"/>\n"
+"    </set>\n"
+"    \n"
+"    <property name=\"userId\" length=\"8\"/>\n"
+"\n"
+"</class>\n"
+"\n"
+"<class name=\"Address\">\n"
+"\n"
+"    <id name=\"id\">\n"
+"        <generator class=\"hilo\"/>\n"
+"    </id>\n"
+"\n"
+"    <property name=\"address\" length=\"300\"/>\n"
+"    <property name=\"zip\" length=\"5\"/>\n"
+"    <property name=\"country\" length=\"25\"/>\n"
+"    <many-to-one name=\"person\" unique=\"true\" not-null=\"true\"/>\n"
+"\n"
+"</class>\n"
+"\n"
+"<class name=\"Account\">\n"
+"    <id name=\"accountId\" length=\"32\">\n"
+"        <generator class=\"uuid\"/>\n"
+"    </id>\n"
+"    \n"
+"    <many-to-one name=\"user\"\n"
+"        column=\"userId\"\n"
+"        property-ref=\"userId\"/>\n"
+"    \n"
+"    <property name=\"type\" not-null=\"true\"/>\n"
+"    \n"
+"</class>]]>"
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-

Modified: core/trunk/documentation/manual/translations/zh-CN/content/example_parentchild.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/example_parentchild.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/example_parentchild.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,287 +1,572 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: example_parentchild.xml:5
+#, no-c-format
 msgid "Example: Parent/Child"
-msgstr ""
+msgstr "示例:父子关系(Parent Child Relationships)"
 
-#: index.docbook:7
-msgid "One of the very first things that new users try to do with Hibernate is to model a parent / child type relationship. There are two different approaches to this. For various reasons the most convenient approach, especially for new users, is to model both <literal>Parent</literal> and <literal>Child</literal> as entity classes with a <literal>&lt;one-to-many&gt;</literal> association from <literal>Parent</literal> to <literal>Child</literal>. (The alternative approach is to declare the <literal>Child</literal> as a <literal>&lt;composite-element&gt;</literal>.) Now, it turns out that default semantics of a one to many association (in Hibernate) are much less close to the usual semantics of a parent / child relationship than those of a composite element mapping. We will explain how to use a <emphasis>bidirectional one to many association with cascades</emphasis> to model a parent / child relationship efficiently and elegantly. It's not at all difficult!"
+#. Tag: para
+#: example_parentchild.xml:7
+#, no-c-format
+msgid ""
+"One of the very first things that new users try to do with Hibernate is to "
+"model a parent / child type relationship. There are two different approaches "
+"to this. For various reasons the most convenient approach, especially for "
+"new users, is to model both <literal>Parent</literal> and <literal>Child</"
+"literal> as entity classes with a <literal>&lt;one-to-many&gt;</literal> "
+"association from <literal>Parent</literal> to <literal>Child</literal>. (The "
+"alternative approach is to declare the <literal>Child</literal> as a "
+"<literal>&lt;composite-element&gt;</literal>.) Now, it turns out that "
+"default semantics of a one to many association (in Hibernate) are much less "
+"close to the usual semantics of a parent / child relationship than those of "
+"a composite element mapping. We will explain how to use a "
+"<emphasis>bidirectional one to many association with cascades</emphasis> to "
+"model a parent / child relationship efficiently and elegantly. It's not at "
+"all difficult!"
 msgstr ""
+"刚刚接触Hibernate的人大多是从父子关系(parent / child type relationship)的建"
+"模入手的。父子关系的建模有两种方法。由于种种原因,最方便的方法是把"
+"<literal>Parent</literal>和<literal>Child</literal>都建模成实体类,并创建一个"
+"从<literal>Parent</literal>指向<literal>Child</literal>的&lt;one-to-many&gt;"
+"关联,对新手来说尤其如此。还有一种方法,就是将<literal>Child</literal>声明为"
+"一个<literal>&lt;composite-element&gt;</literal>(组合元素)。 事实上在"
+"Hibernate中one to many关联的默认语义远没有composite element贴近parent / child"
+"关系的通常语义。下面我们会阐述如何使用<emphasis>带有级联的双向一对多关联"
+"(bidirectional one to many association with cascades)</emphasis>去建立有效、"
+"优美的parent / child关系。这一点也不难!"
 
-#: index.docbook:21
+#. Tag: title
+#: example_parentchild.xml:21
+#, no-c-format
 msgid "A note about collections"
-msgstr ""
+msgstr "关于collections需要注意的一点"
 
-#: index.docbook:23
-msgid "Hibernate collections are considered to be a logical part of their owning entity; never of the contained entities. This is a crucial distinction! It has the following consequences:"
+#. Tag: para
+#: example_parentchild.xml:23
+#, no-c-format
+msgid ""
+"Hibernate collections are considered to be a logical part of their owning "
+"entity; never of the contained entities. This is a crucial distinction! It "
+"has the following consequences:"
 msgstr ""
+"Hibernate collections被当作其所属实体而不是其包含实体的一个逻辑部分。这非常重"
+"要!它主要体现为以下几点:"
 
-#: index.docbook:30
-msgid "When we remove / add an object from / to a collection, the version number of the collection owner is incremented."
-msgstr ""
+#. Tag: para
+#: example_parentchild.xml:30
+#, no-c-format
+msgid ""
+"When we remove / add an object from / to a collection, the version number of "
+"the collection owner is incremented."
+msgstr "当删除或增加collection中对象的时候,collection所属者的版本值会递增。"
 
-#: index.docbook:36
-msgid "If an object that was removed from a collection is an instance of a value type (eg, a composite element), that object will cease to be persistent and its state will be completely removed from the database. Likewise, adding a value type instance to the collection will cause its state to be immediately persistent."
+#. Tag: para
+#: example_parentchild.xml:36
+#, no-c-format
+msgid ""
+"If an object that was removed from a collection is an instance of a value "
+"type (eg, a composite element), that object will cease to be persistent and "
+"its state will be completely removed from the database. Likewise, adding a "
+"value type instance to the collection will cause its state to be immediately "
+"persistent."
 msgstr ""
+"如果一个从collection中移除的对象是一个值类型(value type)的实例,比如"
+"composite element,那么这个对象的持久化状态将会终止,其在数据库中对应的记录会"
+"被删除。同样的,向collection增加一个value type的实例将会使之立即被持久化。"
 
-#: index.docbook:44
-msgid "On the other hand, if an entity is removed from a collection (a one-to-many or many-to-many association), it will not be deleted, by default. This behaviour is completely consistent - a change to the internal state of another entity should not cause the associated entity to vanish! Likewise, adding an entity to a collection does not cause that entity to become persistent, by default."
+#. Tag: para
+#: example_parentchild.xml:44
+#, no-c-format
+msgid ""
+"On the other hand, if an entity is removed from a collection (a one-to-many "
+"or many-to-many association), it will not be deleted, by default. This "
+"behaviour is completely consistent - a change to the internal state of "
+"another entity should not cause the associated entity to vanish! Likewise, "
+"adding an entity to a collection does not cause that entity to become "
+"persistent, by default."
 msgstr ""
+"另一方面,如果从一对多或多对多关联的collection中移除一个实体,在缺省情况下这"
+"个对象并不会被删除。这个行为是完全合乎逻辑的--改变一个实体的内部状态不应该"
+"使与它关联的实体消失掉!同样的,向collection增加一个实体不会使之被持久化。"
 
-#: index.docbook:54
-msgid "Instead, the default behaviour is that adding an entity to a collection merely creates a link between the two entities, while removing it removes the link. This is very appropriate for all sorts of cases. Where it is not appropriate at all is the case of a parent / child relationship, where the life of the child is bound to the life cycle of the parent."
+#. Tag: para
+#: example_parentchild.xml:54
+#, no-c-format
+msgid ""
+"Instead, the default behaviour is that adding an entity to a collection "
+"merely creates a link between the two entities, while removing it removes "
+"the link. This is very appropriate for all sorts of cases. Where it is not "
+"appropriate at all is the case of a parent / child relationship, where the "
+"life of the child is bound to the life cycle of the parent."
 msgstr ""
+"实际上,向Collection增加一个实体的缺省动作只是在两个实体之间创建一个连接而"
+"已,同样移除的时候也只是删除连接。这种处理对于所有的情况都是合适的。对于父子"
+"关系则是完全不适合的,在这种关系下,子对象的生存绑定于父对象的生存周期。"
 
-#: index.docbook:64
+#. Tag: title
+#: example_parentchild.xml:64
+#, no-c-format
 msgid "Bidirectional one-to-many"
-msgstr ""
+msgstr "双向的一对多关系(Bidirectional one-to-many)"
 
-#: index.docbook:66
-msgid "Suppose we start with a simple <literal>&lt;one-to-many&gt;</literal> association from <literal>Parent</literal> to <literal>Child</literal>."
-msgstr ""
+#. Tag: para
+#: example_parentchild.xml:66
+#, no-c-format
+msgid ""
+"Suppose we start with a simple <literal>&lt;one-to-many&gt;</literal> "
+"association from <literal>Parent</literal> to <literal>Child</literal>."
+msgstr "假设我们要实现一个简单的从Parent到Child的&lt;one-to-many&gt;关联。"
 
-#: index.docbook:71
+#. Tag: programlisting
+#: example_parentchild.xml:71
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"children\">\n"
-      "    <key column=\"parent_id\"/>\n"
-      "    <one-to-many class=\"Child\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"children\">\n"
+"    <key column=\"parent_id\"/>\n"
+"    <one-to-many class=\"Child\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:73
+#. Tag: para
+#: example_parentchild.xml:73
+#, no-c-format
 msgid "If we were to execute the following code"
-msgstr ""
+msgstr "如果我们运行下面的代码"
 
-#: index.docbook:77
+#. Tag: programlisting
+#: example_parentchild.xml:77
+#, no-c-format
 msgid ""
-      "<![CDATA[Parent p = .....;\n"
-      "Child c = new Child();\n"
-      "p.getChildren().add(c);\n"
-      "session.save(c);\n"
-      "session.flush();]]>"
+"<![CDATA[Parent p = .....;\n"
+"Child c = new Child();\n"
+"p.getChildren().add(c);\n"
+"session.save(c);\n"
+"session.flush();]]>"
 msgstr ""
 
-#: index.docbook:79
+#. Tag: para
+#: example_parentchild.xml:79
+#, no-c-format
 msgid "Hibernate would issue two SQL statements:"
-msgstr ""
+msgstr "Hibernate会产生两条SQL语句:"
 
-#: index.docbook:85
-msgid "an <literal>INSERT</literal> to create the record for <literal>c</literal>"
-msgstr ""
+#. Tag: para
+#: example_parentchild.xml:85
+#, no-c-format
+msgid ""
+"an <literal>INSERT</literal> to create the record for <literal>c</literal>"
+msgstr "一条<literal>INSERT</literal>语句,为<literal>c</literal>创建一条记录"
 
-#: index.docbook:88
-msgid "an <literal>UPDATE</literal> to create the link from <literal>p</literal> to <literal>c</literal>"
+#. Tag: para
+#: example_parentchild.xml:88
+#, no-c-format
+msgid ""
+"an <literal>UPDATE</literal> to create the link from <literal>p</literal> to "
+"<literal>c</literal>"
 msgstr ""
+"一条<literal>UPDATE</literal>语句,创建从<literal>p</literal>到<literal>c</"
+"literal>的连接"
 
-#: index.docbook:95
-msgid "This is not only inefficient, but also violates any <literal>NOT NULL</literal> constraint on the <literal>parent_id</literal> column. We can fix the nullability constraint violation by specifying <literal>not-null=\"true\"</literal> in the collection mapping:"
+#. Tag: para
+#: example_parentchild.xml:95
+#, no-c-format
+msgid ""
+"This is not only inefficient, but also violates any <literal>NOT NULL</"
+"literal> constraint on the <literal>parent_id</literal> column. We can fix "
+"the nullability constraint violation by specifying <literal>not-null=\"true"
+"\"</literal> in the collection mapping:"
 msgstr ""
+"这样做不仅效率低,而且违反了列<literal>parent_id</literal>非空的限制。我们可"
+"以通过在集合类映射上指定<literal>not-null=\"true\"</literal>来解决违反非空约"
+"束的问题:"
 
-#: index.docbook:101
+#. Tag: programlisting
+#: example_parentchild.xml:101
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"children\">\n"
-      "    <key column=\"parent_id\" not-null=\"true\"/>\n"
-      "    <one-to-many class=\"Child\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"children\">\n"
+"    <key column=\"parent_id\" not-null=\"true\"/>\n"
+"    <one-to-many class=\"Child\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:103
+#. Tag: para
+#: example_parentchild.xml:103
+#, no-c-format
 msgid "However, this is not the recommended solution."
-msgstr ""
+msgstr "然而,这并非是推荐的解决方法。"
 
-#: index.docbook:106
-msgid "The underlying cause of this behaviour is that the link (the foreign key <literal>parent_id</literal>) from <literal>p</literal> to <literal>c</literal> is not considered part of the state of the <literal>Child</literal> object and is therefore not created in the <literal>INSERT</literal>. So the solution is to make the link part of the <literal>Child</literal> mapping."
+#. Tag: para
+#: example_parentchild.xml:106
+#, no-c-format
+msgid ""
+"The underlying cause of this behaviour is that the link (the foreign key "
+"<literal>parent_id</literal>) from <literal>p</literal> to <literal>c</"
+"literal> is not considered part of the state of the <literal>Child</literal> "
+"object and is therefore not created in the <literal>INSERT</literal>. So the "
+"solution is to make the link part of the <literal>Child</literal> mapping."
 msgstr ""
+"这种现象的根本原因是从<literal>p</literal>到<literal>c</literal>的连接(外键"
+"parent_id)没有被当作<literal>Child</literal>对象状态的一部分,因而没有在"
+"INSERT语句中被创建。因此解决的办法就是把这个连接添加到Child的映射中。"
 
-#: index.docbook:113
-msgid "<![CDATA[<many-to-one name=\"parent\" column=\"parent_id\" not-null=\"true\"/>]]>"
+#. Tag: programlisting
+#: example_parentchild.xml:113
+#, no-c-format
+msgid ""
+"<![CDATA[<many-to-one name=\"parent\" column=\"parent_id\" not-null=\"true\"/"
+">]]>"
 msgstr ""
 
-#: index.docbook:115
-msgid "(We also need to add the <literal>parent</literal> property to the <literal>Child</literal> class.)"
+#. Tag: para
+#: example_parentchild.xml:115
+#, no-c-format
+msgid ""
+"(We also need to add the <literal>parent</literal> property to the "
+"<literal>Child</literal> class.)"
 msgstr ""
+"(我们还需要为类<literal>Child</literal>添加<literal>parent</literal>属性)"
 
-#: index.docbook:119
-msgid "Now that the <literal>Child</literal> entity is managing the state of the link, we tell the collection not to update the link. We use the <literal>inverse</literal> attribute."
+#. Tag: para
+#: example_parentchild.xml:119
+#, no-c-format
+msgid ""
+"Now that the <literal>Child</literal> entity is managing the state of the "
+"link, we tell the collection not to update the link. We use the "
+"<literal>inverse</literal> attribute."
 msgstr ""
+"现在实体<literal>Child</literal>在管理连接的状态,为了使collection不更新连"
+"接,我们使用<literal>inverse</literal>属性。"
 
-#: index.docbook:124
+#. Tag: programlisting
+#: example_parentchild.xml:124
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"children\" inverse=\"true\">\n"
-      "    <key column=\"parent_id\"/>\n"
-      "    <one-to-many class=\"Child\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"children\" inverse=\"true\">\n"
+"    <key column=\"parent_id\"/>\n"
+"    <one-to-many class=\"Child\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:126
+#. Tag: para
+#: example_parentchild.xml:126
+#, no-c-format
 msgid "The following code would be used to add a new <literal>Child</literal>"
-msgstr ""
+msgstr "下面的代码是用来添加一个新的<literal>Child</literal>"
 
-#: index.docbook:130
+#. Tag: programlisting
+#: example_parentchild.xml:130
+#, no-c-format
 msgid ""
-      "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-      "Child c = new Child();\n"
-      "c.setParent(p);\n"
-      "p.getChildren().add(c);\n"
-      "session.save(c);\n"
-      "session.flush();]]>"
+"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+"Child c = new Child();\n"
+"c.setParent(p);\n"
+"p.getChildren().add(c);\n"
+"session.save(c);\n"
+"session.flush();]]>"
 msgstr ""
 
-#: index.docbook:132
+#. Tag: para
+#: example_parentchild.xml:132
+#, no-c-format
 msgid "And now, only one SQL <literal>INSERT</literal> would be issued!"
-msgstr ""
+msgstr "现在,只会有一条<literal>INSERT</literal>语句被执行!"
 
-#: index.docbook:136
-msgid "To tighten things up a bit, we could create an <literal>addChild()</literal> method of <literal>Parent</literal>."
+#. Tag: para
+#: example_parentchild.xml:136
+#, no-c-format
+msgid ""
+"To tighten things up a bit, we could create an <literal>addChild()</literal> "
+"method of <literal>Parent</literal>."
 msgstr ""
+"为了让事情变得井井有条,可以为<literal>Parent</literal>加一个"
+"<literal>addChild()</literal>方法。"
 
-#: index.docbook:141
+#. Tag: programlisting
+#: example_parentchild.xml:141
+#, no-c-format
 msgid ""
-      "<![CDATA[public void addChild(Child c) {\n"
-      "    c.setParent(this);\n"
-      "    children.add(c);\n"
-      "}]]>"
+"<![CDATA[public void addChild(Child c) {\n"
+"    c.setParent(this);\n"
+"    children.add(c);\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:143
+#. Tag: para
+#: example_parentchild.xml:143
+#, no-c-format
 msgid "Now, the code to add a <literal>Child</literal> looks like"
-msgstr ""
+msgstr "现在,添加<literal>Child</literal>的代码就是这样"
 
-#: index.docbook:147
+#. Tag: programlisting
+#: example_parentchild.xml:147
+#, no-c-format
 msgid ""
-      "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-      "Child c = new Child();\n"
-      "p.addChild(c);\n"
-      "session.save(c);\n"
-      "session.flush();]]>"
+"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+"Child c = new Child();\n"
+"p.addChild(c);\n"
+"session.save(c);\n"
+"session.flush();]]>"
 msgstr ""
 
-#: index.docbook:152
+#. Tag: title
+#: example_parentchild.xml:152
+#, no-c-format
 msgid "Cascading life cycle"
-msgstr ""
+msgstr "级联生命周期(Cascading life cycle)"
 
-#: index.docbook:154
-msgid "The explicit call to <literal>save()</literal> is still annoying. We will address this by using cascades."
+#. Tag: para
+#: example_parentchild.xml:154
+#, no-c-format
+msgid ""
+"The explicit call to <literal>save()</literal> is still annoying. We will "
+"address this by using cascades."
 msgstr ""
+"需要显式调用<literal>save()</literal>仍然很麻烦,我们可以用级联来解决这个问"
+"题。"
 
-#: index.docbook:159
+#. Tag: programlisting
+#: example_parentchild.xml:159
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"children\" inverse=\"true\" cascade=\"all\">\n"
-      "    <key column=\"parent_id\"/>\n"
-      "    <one-to-many class=\"Child\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"children\" inverse=\"true\" cascade=\"all\">\n"
+"    <key column=\"parent_id\"/>\n"
+"    <one-to-many class=\"Child\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:161
+#. Tag: para
+#: example_parentchild.xml:161
+#, no-c-format
 msgid "This simplifies the code above to"
-msgstr ""
+msgstr "这样上面的代码可以简化为:"
 
-#: index.docbook:165
+#. Tag: programlisting
+#: example_parentchild.xml:165
+#, no-c-format
 msgid ""
-      "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-      "Child c = new Child();\n"
-      "p.addChild(c);\n"
-      "session.flush();]]>"
+"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+"Child c = new Child();\n"
+"p.addChild(c);\n"
+"session.flush();]]>"
 msgstr ""
 
-#: index.docbook:167
-msgid "Similarly, we don't need to iterate over the children when saving or deleting a <literal>Parent</literal>. The following removes <literal>p</literal> and all its children from the database."
+#. Tag: para
+#: example_parentchild.xml:167
+#, no-c-format
+msgid ""
+"Similarly, we don't need to iterate over the children when saving or "
+"deleting a <literal>Parent</literal>. The following removes <literal>p</"
+"literal> and all its children from the database."
 msgstr ""
+"同样的,保存或删除<literal>Parent</literal>对象的时候并不需要遍历其子对象。 "
+"下面的代码会删除对象<literal>p</literal>及其所有子对象对应的数据库记录。"
 
-#: index.docbook:172
+#. Tag: programlisting
+#: example_parentchild.xml:172
+#, no-c-format
 msgid ""
-      "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-      "session.delete(p);\n"
-      "session.flush();]]>"
+"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+"session.delete(p);\n"
+"session.flush();]]>"
 msgstr ""
 
-#: index.docbook:174
+#. Tag: para
+#: example_parentchild.xml:174
+#, no-c-format
 msgid "However, this code"
-msgstr ""
+msgstr "然而,这段代码"
 
-#: index.docbook:178
+#. Tag: programlisting
+#: example_parentchild.xml:178
+#, no-c-format
 msgid ""
-      "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-      "Child c = (Child) p.getChildren().iterator().next();\n"
-      "p.getChildren().remove(c);\n"
-      "c.setParent(null);\n"
-      "session.flush();]]>"
+"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+"Child c = (Child) p.getChildren().iterator().next();\n"
+"p.getChildren().remove(c);\n"
+"c.setParent(null);\n"
+"session.flush();]]>"
 msgstr ""
 
-#: index.docbook:180
-msgid "will not remove <literal>c</literal> from the database; it will ony remove the link to <literal>p</literal> (and cause a <literal>NOT NULL</literal> constraint violation, in this case). You need to explicitly <literal>delete()</literal> the <literal>Child</literal>."
+#. Tag: para
+#: example_parentchild.xml:180
+#, no-c-format
+msgid ""
+"will not remove <literal>c</literal> from the database; it will ony remove "
+"the link to <literal>p</literal> (and cause a <literal>NOT NULL</literal> "
+"constraint violation, in this case). You need to explicitly <literal>delete()"
+"</literal> the <literal>Child</literal>."
 msgstr ""
+"不会从数据库删除<literal>c</literal>;它只会删除与<literal>p</literal>之间的"
+"连接(并且会导致违反<literal>NOT NULL</literal>约束,在这个例子中)。你需要显"
+"式调用<literal>delete()</literal>来删除<literal>Child</literal>。"
 
-#: index.docbook:186
+#. Tag: programlisting
+#: example_parentchild.xml:186
+#, no-c-format
 msgid ""
-      "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-      "Child c = (Child) p.getChildren().iterator().next();\n"
-      "p.getChildren().remove(c);\n"
-      "session.delete(c);\n"
-      "session.flush();]]>"
+"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+"Child c = (Child) p.getChildren().iterator().next();\n"
+"p.getChildren().remove(c);\n"
+"session.delete(c);\n"
+"session.flush();]]>"
 msgstr ""
 
-#: index.docbook:188
-msgid "Now, in our case, a <literal>Child</literal> can't really exist without its parent. So if we remove a <literal>Child</literal> from the collection, we really do want it to be deleted. For this, we must use <literal>cascade=\"all-delete-orphan\"</literal>."
+#. Tag: para
+#: example_parentchild.xml:188
+#, no-c-format
+msgid ""
+"Now, in our case, a <literal>Child</literal> can't really exist without its "
+"parent. So if we remove a <literal>Child</literal> from the collection, we "
+"really do want it to be deleted. For this, we must use <literal>cascade="
+"\"all-delete-orphan\"</literal>."
 msgstr ""
+"在我们的例子中,如果没有父对象,子对象就不应该存在,如果将子对象从collection"
+"中移除,实际上我们是想删除它。要实现这种要求,就必须使用<literal>cascade="
+"\"all-delete-orphan\"</literal>。"
 
-#: index.docbook:194
+#. Tag: programlisting
+#: example_parentchild.xml:194
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"children\" inverse=\"true\" cascade=\"all-delete-orphan\">\n"
-      "    <key column=\"parent_id\"/>\n"
-      "    <one-to-many class=\"Child\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"children\" inverse=\"true\" cascade=\"all-delete-orphan"
+"\">\n"
+"    <key column=\"parent_id\"/>\n"
+"    <one-to-many class=\"Child\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:196
-msgid "Note: even though the collection mapping specifies <literal>inverse=\"true\"</literal>, cascades are still processed by iterating the collection elements. So if you require that an object be saved, deleted or updated by cascade, you must add it to the collection. It is not enough to simply call <literal>setParent()</literal>."
+#. Tag: para
+#: example_parentchild.xml:196
+#, no-c-format
+msgid ""
+"Note: even though the collection mapping specifies <literal>inverse=\"true"
+"\"</literal>, cascades are still processed by iterating the collection "
+"elements. So if you require that an object be saved, deleted or updated by "
+"cascade, you must add it to the collection. It is not enough to simply call "
+"<literal>setParent()</literal>."
 msgstr ""
+"注意:即使在collection一方的映射中指定<literal>inverse=\"true\"</literal>,级"
+"联仍然是通过遍历collection中的元素来处理的。如果你想要通过级联进行子对象的插"
+"入、删除、更新操作,就必须把它加到collection中,只调用<literal>setParent()</"
+"literal>是不够的。"
 
-#: index.docbook:206
+#. Tag: title
+#: example_parentchild.xml:206
+#, no-c-format
 msgid "Cascades and <literal>unsaved-value</literal>"
 msgstr ""
+"级联与<literal>未保存值</literal>(Cascades and <literal>unsaved-value</"
+"literal>)"
 
-#: index.docbook:208
-msgid "Suppose we loaded up a <literal>Parent</literal> in one <literal>Session</literal>, made some changes in a UI action and wish to persist these changes in a new session by calling <literal>update()</literal>. The <literal>Parent</literal> will contain a collection of childen and, since cascading update is enabled, Hibernate needs to know which children are newly instantiated and which represent existing rows in the database. Lets assume that both <literal>Parent</literal> and <literal>Child</literal> have genenerated identifier properties of type <literal>Long</literal>. Hibernate will use the identifier and version/timestamp property value to determine which of the children are new. (See <xref linkend=\"objectstate-saveorupdate\"/>.) <emphasis>In Hibernate3, it is no longer necessary to specify an <literal>unsaved-value</literal> explicitly.</emphasis>"
+#. Tag: para
+#: example_parentchild.xml:208
+#, no-c-format
+msgid ""
+"Suppose we loaded up a <literal>Parent</literal> in one <literal>Session</"
+"literal>, made some changes in a UI action and wish to persist these changes "
+"in a new session by calling <literal>update()</literal>. The "
+"<literal>Parent</literal> will contain a collection of childen and, since "
+"cascading update is enabled, Hibernate needs to know which children are "
+"newly instantiated and which represent existing rows in the database. Lets "
+"assume that both <literal>Parent</literal> and <literal>Child</literal> have "
+"genenerated identifier properties of type <literal>Long</literal>. Hibernate "
+"will use the identifier and version/timestamp property value to determine "
+"which of the children are new. (See <xref linkend=\"objectstate-saveorupdate"
+"\"/>.) <emphasis>In Hibernate3, it is no longer necessary to specify an "
+"<literal>unsaved-value</literal> explicitly.</emphasis>"
 msgstr ""
+"假设我们从<literal>Session</literal>中装入了一个<literal>Parent</literal>对"
+"象,用户界面对其进行了修改,然后希望在一个新的Session里面调用<literal>update"
+"()</literal>来保存这些修改。对象<literal>Parent</literal>包含了子对象的集合,"
+"由于打开了级联更新,Hibernate需要知道哪些Child对象是新实例化的,哪些代表数据"
+"库中已经存在的记录。我们假设<literal>Parent</literal>和<literal>Child</"
+"literal>对象的标识属性都是自动生成的,类型为<literal>java.lang.Long</"
+"literal>。Hibernate会使用标识属性的值,和version 或 timestamp 属性,来判断哪"
+"些子对象是新的。(参见<xref linkend=\"objectstate-saveorupdate\"/>.) "
+"<emphasis>在 Hibernate3 中,显式指定<literal>unsaved-value</literal>不再是必须"
+"的了。</emphasis>"
 
-#: index.docbook:220
-msgid "The following code will update <literal>parent</literal> and <literal>child</literal> and insert <literal>newChild</literal>."
+#. Tag: para
+#: example_parentchild.xml:220
+#, no-c-format
+msgid ""
+"The following code will update <literal>parent</literal> and <literal>child</"
+"literal> and insert <literal>newChild</literal>."
 msgstr ""
+"下面的代码会更新<literal>parent</literal>和<literal>child</literal>对象,并且"
+"插入<literal>newChild</literal>对象。"
 
-#: index.docbook:225
+#. Tag: programlisting
+#: example_parentchild.xml:225
+#, no-c-format
 msgid ""
-      "<![CDATA[//parent and child were both loaded in a previous session\n"
-      "parent.addChild(child);\n"
-      "Child newChild = new Child();\n"
-      "parent.addChild(newChild);\n"
-      "session.update(parent);\n"
-      "session.flush();]]>"
+"<![CDATA[//parent and child were both loaded in a previous session\n"
+"parent.addChild(child);\n"
+"Child newChild = new Child();\n"
+"parent.addChild(newChild);\n"
+"session.update(parent);\n"
+"session.flush();]]>"
 msgstr ""
 
-#: index.docbook:227
-msgid "Well, that's all very well for the case of a generated identifier, but what about assigned identifiers and composite identifiers? This is more difficult, since Hibernate can't use the identifier property to distinguish between a newly instantiated object (with an identifier assigned by the user) and an object loaded in a previous session. In this case, Hibernate will either use the timestamp or version property, or will actually query the second-level cache or, worst case, the database, to see if the row exists."
+#. Tag: para
+#: example_parentchild.xml:227
+#, no-c-format
+msgid ""
+"Well, that's all very well for the case of a generated identifier, but what "
+"about assigned identifiers and composite identifiers? This is more "
+"difficult, since Hibernate can't use the identifier property to distinguish "
+"between a newly instantiated object (with an identifier assigned by the "
+"user) and an object loaded in a previous session. In this case, Hibernate "
+"will either use the timestamp or version property, or will actually query "
+"the second-level cache or, worst case, the database, to see if the row "
+"exists."
 msgstr ""
+"这对于自动生成标识的情况是非常好的,但是自分配的标识和复合标识怎么办呢?这是"
+"有点麻烦,因为Hibernate没有办法区分新实例化的对象(标识被用户指定了)和前一个"
+"Session装入的对象。在这种情况下,Hibernate会使用timestamp或version属性,或者"
+"查询第二级缓存,或者最坏的情况,查询数据库,来确认是否此行存在。"
 
-#: index.docbook:260
+#. Tag: title
+#: example_parentchild.xml:260
+#, no-c-format
 msgid "Conclusion"
-msgstr ""
+msgstr "结论"
 
-#: index.docbook:262
-msgid "There is quite a bit to digest here and it might look confusing first time around. However, in practice, it all works out very nicely. Most Hibernate applications use the parent / child pattern in many places."
+#. Tag: para
+#: example_parentchild.xml:262
+#, no-c-format
+msgid ""
+"There is quite a bit to digest here and it might look confusing first time "
+"around. However, in practice, it all works out very nicely. Most Hibernate "
+"applications use the parent / child pattern in many places."
 msgstr ""
+"这里有不少东西需要融会贯通,可能会让新手感到迷惑。但是在实践中它们都工作地非"
+"常好。大部分Hibernate应用程序都会经常用到父子对象模式。"
 
-#: index.docbook:267
-msgid "We mentioned an alternative in the first paragraph. None of the above issues exist in the case of <literal>&lt;composite-element&gt;</literal> mappings, which have exactly the semantics of a parent / child relationship. Unfortunately, there are two big limitations to composite element classes: composite elements may not own collections, and they should not be the child of any entity other than the unique parent."
+#. Tag: para
+#: example_parentchild.xml:267
+#, no-c-format
+msgid ""
+"We mentioned an alternative in the first paragraph. None of the above issues "
+"exist in the case of <literal>&lt;composite-element&gt;</literal> mappings, "
+"which have exactly the semantics of a parent / child relationship. "
+"Unfortunately, there are two big limitations to composite element classes: "
+"composite elements may not own collections, and they should not be the child "
+"of any entity other than the unique parent."
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+"在第一段中我们曾经提到另一个方案。上面的这些问题都不会出现在<literal>&lt;"
+"composite-element&gt;</literal>映射中,它准确地表达了父子关系的语义。很不幸复"
+"合元素还有两个重大限制:复合元素不能拥有collections,并且,除了用于惟一的父对"
+"象外,它们不能再作为其它任何实体的子对象。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/example_weblog.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/example_weblog.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/example_weblog.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,450 +1,481 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: example_weblog.xml:5
+#, no-c-format
 msgid "Example: Weblog Application"
-msgstr ""
+msgstr "示例:Weblog 应用程序"
 
-#: index.docbook:8
+#. Tag: title
+#: example_weblog.xml:8
+#, no-c-format
 msgid "Persistent Classes"
-msgstr ""
+msgstr "持久化类"
 
-#: index.docbook:10
-msgid "The persistent classes represent a weblog, and an item posted in a weblog. They are to be modelled as a standard parent/child relationship, but we will use an ordered bag, instead of a set."
+#. Tag: para
+#: example_weblog.xml:10
+#, no-c-format
+msgid ""
+"The persistent classes represent a weblog, and an item posted in a weblog. "
+"They are to be modelled as a standard parent/child relationship, but we will "
+"use an ordered bag, instead of a set."
 msgstr ""
+"下面的持久化类表示一个weblog和在其中张贴的一个贴子。他们是标准的父/子关系模"
+"型,但是我们会用一个有序包(ordered bag)而非集合(set)。"
 
-#: index.docbook:16
+#. Tag: programlisting
+#: example_weblog.xml:16
+#, no-c-format
 msgid ""
-      "<![CDATA[package eg;\n"
-      "\n"
-      "import java.util.List;\n"
-      "\n"
-      "public class Blog {\n"
-      "    private Long _id;\n"
-      "    private String _name;\n"
-      "    private List _items;\n"
-      "\n"
-      "    public Long getId() {\n"
-      "        return _id;\n"
-      "    }\n"
-      "    public List getItems() {\n"
-      "        return _items;\n"
-      "    }\n"
-      "    public String getName() {\n"
-      "        return _name;\n"
-      "    }\n"
-      "    public void setId(Long long1) {\n"
-      "        _id = long1;\n"
-      "    }\n"
-      "    public void setItems(List list) {\n"
-      "        _items = list;\n"
-      "    }\n"
-      "    public void setName(String string) {\n"
-      "        _name = string;\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[package eg;\n"
+"\n"
+"import java.util.List;\n"
+"\n"
+"public class Blog {\n"
+"    private Long _id;\n"
+"    private String _name;\n"
+"    private List _items;\n"
+"\n"
+"    public Long getId() {\n"
+"        return _id;\n"
+"    }\n"
+"    public List getItems() {\n"
+"        return _items;\n"
+"    }\n"
+"    public String getName() {\n"
+"        return _name;\n"
+"    }\n"
+"    public void setId(Long long1) {\n"
+"        _id = long1;\n"
+"    }\n"
+"    public void setItems(List list) {\n"
+"        _items = list;\n"
+"    }\n"
+"    public void setName(String string) {\n"
+"        _name = string;\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:18
+#. Tag: programlisting
+#: example_weblog.xml:18
+#, no-c-format
 msgid ""
-      "<![CDATA[package eg;\n"
-      "\n"
-      "import java.text.DateFormat;\n"
-      "import java.util.Calendar;\n"
-      "\n"
-      "public class BlogItem {\n"
-      "    private Long _id;\n"
-      "    private Calendar _datetime;\n"
-      "    private String _text;\n"
-      "    private String _title;\n"
-      "    private Blog _blog;\n"
-      "\n"
-      "    public Blog getBlog() {\n"
-      "        return _blog;\n"
-      "    }\n"
-      "    public Calendar getDatetime() {\n"
-      "        return _datetime;\n"
-      "    }\n"
-      "    public Long getId() {\n"
-      "        return _id;\n"
-      "    }\n"
-      "    public String getText() {\n"
-      "        return _text;\n"
-      "    }\n"
-      "    public String getTitle() {\n"
-      "        return _title;\n"
-      "    }\n"
-      "    public void setBlog(Blog blog) {\n"
-      "        _blog = blog;\n"
-      "    }\n"
-      "    public void setDatetime(Calendar calendar) {\n"
-      "        _datetime = calendar;\n"
-      "    }\n"
-      "    public void setId(Long long1) {\n"
-      "        _id = long1;\n"
-      "    }\n"
-      "    public void setText(String string) {\n"
-      "        _text = string;\n"
-      "    }\n"
-      "    public void setTitle(String string) {\n"
-      "        _title = string;\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[package eg;\n"
+"\n"
+"import java.text.DateFormat;\n"
+"import java.util.Calendar;\n"
+"\n"
+"public class BlogItem {\n"
+"    private Long _id;\n"
+"    private Calendar _datetime;\n"
+"    private String _text;\n"
+"    private String _title;\n"
+"    private Blog _blog;\n"
+"\n"
+"    public Blog getBlog() {\n"
+"        return _blog;\n"
+"    }\n"
+"    public Calendar getDatetime() {\n"
+"        return _datetime;\n"
+"    }\n"
+"    public Long getId() {\n"
+"        return _id;\n"
+"    }\n"
+"    public String getText() {\n"
+"        return _text;\n"
+"    }\n"
+"    public String getTitle() {\n"
+"        return _title;\n"
+"    }\n"
+"    public void setBlog(Blog blog) {\n"
+"        _blog = blog;\n"
+"    }\n"
+"    public void setDatetime(Calendar calendar) {\n"
+"        _datetime = calendar;\n"
+"    }\n"
+"    public void setId(Long long1) {\n"
+"        _id = long1;\n"
+"    }\n"
+"    public void setText(String string) {\n"
+"        _text = string;\n"
+"    }\n"
+"    public void setTitle(String string) {\n"
+"        _title = string;\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:23
+#. Tag: title
+#: example_weblog.xml:23
+#, no-c-format
 msgid "Hibernate Mappings"
-msgstr ""
+msgstr "Hibernate 映射"
 
-#: index.docbook:25
+#. Tag: para
+#: example_weblog.xml:25
+#, no-c-format
 msgid "The XML mappings should now be quite straightforward."
-msgstr ""
+msgstr "下列的XML映射应该是很直白的。"
 
-#: index.docbook:29
+#. Tag: programlisting
+#: example_weblog.xml:29
+#, no-c-format
 msgid ""
-      "<![CDATA[<?xml version=\"1.0\"?>\n"
-      "<!DOCTYPE hibernate-mapping PUBLIC\n"
-      "    \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
-      "    \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
-      "\n"
-      "<hibernate-mapping package=\"eg\">\n"
-      "\n"
-      "    <class\n"
-      "        name=\"Blog\"\n"
-      "        table=\"BLOGS\">\n"
-      "\n"
-      "        <id\n"
-      "            name=\"id\"\n"
-      "            column=\"BLOG_ID\">\n"
-      "\n"
-      "            <generator class=\"native\"/>\n"
-      "\n"
-      "        </id>\n"
-      "\n"
-      "        <property\n"
-      "            name=\"name\"\n"
-      "            column=\"NAME\"\n"
-      "            not-null=\"true\"\n"
-      "            unique=\"true\"/>\n"
-      "\n"
-      "        <bag\n"
-      "            name=\"items\"\n"
-      "            inverse=\"true\"\n"
-      "            order-by=\"DATE_TIME\"\n"
-      "            cascade=\"all\">\n"
-      "\n"
-      "            <key column=\"BLOG_ID\"/>\n"
-      "            <one-to-many class=\"BlogItem\"/>\n"
-      "\n"
-      "        </bag>\n"
-      "\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE hibernate-mapping PUBLIC\n"
+"    \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+"    \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+"\n"
+"<hibernate-mapping package=\"eg\">\n"
+"\n"
+"    <class\n"
+"        name=\"Blog\"\n"
+"        table=\"BLOGS\">\n"
+"\n"
+"        <id\n"
+"            name=\"id\"\n"
+"            column=\"BLOG_ID\">\n"
+"\n"
+"            <generator class=\"native\"/>\n"
+"\n"
+"        </id>\n"
+"\n"
+"        <property\n"
+"            name=\"name\"\n"
+"            column=\"NAME\"\n"
+"            not-null=\"true\"\n"
+"            unique=\"true\"/>\n"
+"\n"
+"        <bag\n"
+"            name=\"items\"\n"
+"            inverse=\"true\"\n"
+"            order-by=\"DATE_TIME\"\n"
+"            cascade=\"all\">\n"
+"\n"
+"            <key column=\"BLOG_ID\"/>\n"
+"            <one-to-many class=\"BlogItem\"/>\n"
+"\n"
+"        </bag>\n"
+"\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:31
+#. Tag: programlisting
+#: example_weblog.xml:31
+#, no-c-format
 msgid ""
-      "<![CDATA[<?xml version=\"1.0\"?>\n"
-      "<!DOCTYPE hibernate-mapping PUBLIC\n"
-      "    \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
-      "    \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
-      "\n"
-      "<hibernate-mapping package=\"eg\">\n"
-      "\n"
-      "    <class\n"
-      "        name=\"BlogItem\"\n"
-      "        table=\"BLOG_ITEMS\"\n"
-      "        dynamic-update=\"true\">\n"
-      "\n"
-      "        <id\n"
-      "            name=\"id\"\n"
-      "            column=\"BLOG_ITEM_ID\">\n"
-      "\n"
-      "            <generator class=\"native\"/>\n"
-      "\n"
-      "        </id>\n"
-      "\n"
-      "        <property\n"
-      "            name=\"title\"\n"
-      "            column=\"TITLE\"\n"
-      "            not-null=\"true\"/>\n"
-      "\n"
-      "        <property\n"
-      "            name=\"text\"\n"
-      "            column=\"TEXT\"\n"
-      "            not-null=\"true\"/>\n"
-      "\n"
-      "        <property\n"
-      "            name=\"datetime\"\n"
-      "            column=\"DATE_TIME\"\n"
-      "            not-null=\"true\"/>\n"
-      "\n"
-      "        <many-to-one\n"
-      "            name=\"blog\"\n"
-      "            column=\"BLOG_ID\"\n"
-      "            not-null=\"true\"/>\n"
-      "\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE hibernate-mapping PUBLIC\n"
+"    \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+"    \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+"\n"
+"<hibernate-mapping package=\"eg\">\n"
+"\n"
+"    <class\n"
+"        name=\"BlogItem\"\n"
+"        table=\"BLOG_ITEMS\"\n"
+"        dynamic-update=\"true\">\n"
+"\n"
+"        <id\n"
+"            name=\"id\"\n"
+"            column=\"BLOG_ITEM_ID\">\n"
+"\n"
+"            <generator class=\"native\"/>\n"
+"\n"
+"        </id>\n"
+"\n"
+"        <property\n"
+"            name=\"title\"\n"
+"            column=\"TITLE\"\n"
+"            not-null=\"true\"/>\n"
+"\n"
+"        <property\n"
+"            name=\"text\"\n"
+"            column=\"TEXT\"\n"
+"            not-null=\"true\"/>\n"
+"\n"
+"        <property\n"
+"            name=\"datetime\"\n"
+"            column=\"DATE_TIME\"\n"
+"            not-null=\"true\"/>\n"
+"\n"
+"        <many-to-one\n"
+"            name=\"blog\"\n"
+"            column=\"BLOG_ID\"\n"
+"            not-null=\"true\"/>\n"
+"\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:36
+#. Tag: title
+#: example_weblog.xml:36
+#, no-c-format
 msgid "Hibernate Code"
-msgstr ""
+msgstr "Hibernate 代码"
 
-#: index.docbook:38
-msgid "The following class demonstrates some of the kinds of things we can do with these classes, using Hibernate."
-msgstr ""
+#. Tag: para
+#: example_weblog.xml:38
+#, no-c-format
+msgid ""
+"The following class demonstrates some of the kinds of things we can do with "
+"these classes, using Hibernate."
+msgstr "下面的类演示了我们可以使用Hibernate对这些类进行的一些操作。"
 
-#: index.docbook:43
+#. Tag: programlisting
+#: example_weblog.xml:43
+#, no-c-format
 msgid ""
-      "<![CDATA[package eg;\n"
-      "\n"
-      "import java.util.ArrayList;\n"
-      "import java.util.Calendar;\n"
-      "import java.util.Iterator;\n"
-      "import java.util.List;\n"
-      "\n"
-      "import org.hibernate.HibernateException;\n"
-      "import org.hibernate.Query;\n"
-      "import org.hibernate.Session;\n"
-      "import org.hibernate.SessionFactory;\n"
-      "import org.hibernate.Transaction;\n"
-      "import org.hibernate.cfg.Configuration;\n"
-      "import org.hibernate.tool.hbm2ddl.SchemaExport;\n"
-      "\n"
-      "public class BlogMain {\n"
-      "    \n"
-      "    private SessionFactory _sessions;\n"
-      "    \n"
-      "    public void configure() throws HibernateException {\n"
-      "        _sessions = new Configuration()\n"
-      "            .addClass(Blog.class)\n"
-      "            .addClass(BlogItem.class)\n"
-      "            .buildSessionFactory();\n"
-      "    }\n"
-      "    \n"
-      "    public void exportTables() throws HibernateException {\n"
-      "        Configuration cfg = new Configuration()\n"
-      "            .addClass(Blog.class)\n"
-      "            .addClass(BlogItem.class);\n"
-      "        new SchemaExport(cfg).create(true, true);\n"
-      "    }\n"
-      "    \n"
-      "    public Blog createBlog(String name) throws HibernateException {\n"
-      "        \n"
-      "        Blog blog = new Blog();\n"
-      "        blog.setName(name);\n"
-      "        blog.setItems( new ArrayList() );\n"
-      "        \n"
-      "        Session session = _sessions.openSession();\n"
-      "        Transaction tx = null;\n"
-      "        try {\n"
-      "            tx = session.beginTransaction();\n"
-      "            session.persist(blog);\n"
-      "            tx.commit();\n"
-      "        }\n"
-      "        catch (HibernateException he) {\n"
-      "            if (tx!=null) tx.rollback();\n"
-      "            throw he;\n"
-      "        }\n"
-      "        finally {\n"
-      "            session.close();\n"
-      "        }\n"
-      "        return blog;\n"
-      "    }\n"
-      "    \n"
-      "    public BlogItem createBlogItem(Blog blog, String title, String text)\n"
-      "                        throws HibernateException {\n"
-      "        \n"
-      "        BlogItem item = new BlogItem();\n"
-      "        item.setTitle(title);\n"
-      "        item.setText(text);\n"
-      "        item.setBlog(blog);\n"
-      "        item.setDatetime( Calendar.getInstance() );\n"
-      "        blog.getItems().add(item);\n"
-      "        \n"
-      "        Session session = _sessions.openSession();\n"
-      "        Transaction tx = null;\n"
-      "        try {\n"
-      "            tx = session.beginTransaction();\n"
-      "            session.update(blog);\n"
-      "            tx.commit();\n"
-      "        }\n"
-      "        catch (HibernateException he) {\n"
-      "            if (tx!=null) tx.rollback();\n"
-      "            throw he;\n"
-      "        }\n"
-      "        finally {\n"
-      "            session.close();\n"
-      "        }\n"
-      "        return item;\n"
-      "    }\n"
-      "    \n"
-      "    public BlogItem createBlogItem(Long blogid, String title, String text)\n"
-      "                        throws HibernateException {\n"
-      "        \n"
-      "        BlogItem item = new BlogItem();\n"
-      "        item.setTitle(title);\n"
-      "        item.setText(text);\n"
-      "        item.setDatetime( Calendar.getInstance() );\n"
-      "        \n"
-      "        Session session = _sessions.openSession();\n"
-      "        Transaction tx = null;\n"
-      "        try {\n"
-      "            tx = session.beginTransaction();\n"
-      "            Blog blog = (Blog) session.load(Blog.class, blogid);\n"
-      "            item.setBlog(blog);\n"
-      "            blog.getItems().add(item);\n"
-      "            tx.commit();\n"
-      "        }\n"
-      "        catch (HibernateException he) {\n"
-      "            if (tx!=null) tx.rollback();\n"
-      "            throw he;\n"
-      "        }\n"
-      "        finally {\n"
-      "            session.close();\n"
-      "        }\n"
-      "        return item;\n"
-      "    }\n"
-      "    \n"
-      "    public void updateBlogItem(BlogItem item, String text)\n"
-      "                    throws HibernateException {\n"
-      "        \n"
-      "        item.setText(text);\n"
-      "        \n"
-      "        Session session = _sessions.openSession();\n"
-      "        Transaction tx = null;\n"
-      "        try {\n"
-      "            tx = session.beginTransaction();\n"
-      "            session.update(item);\n"
-      "            tx.commit();\n"
-      "        }\n"
-      "        catch (HibernateException he) {\n"
-      "            if (tx!=null) tx.rollback();\n"
-      "            throw he;\n"
-      "        }\n"
-      "        finally {\n"
-      "            session.close();\n"
-      "        }\n"
-      "    }\n"
-      "    \n"
-      "    public void updateBlogItem(Long itemid, String text)\n"
-      "                    throws HibernateException {\n"
-      "    \n"
-      "        Session session = _sessions.openSession();\n"
-      "        Transaction tx = null;\n"
-      "        try {\n"
-      "            tx = session.beginTransaction();\n"
-      "            BlogItem item = (BlogItem) session.load(BlogItem.class, itemid);\n"
-      "            item.setText(text);\n"
-      "            tx.commit();\n"
-      "        }\n"
-      "        catch (HibernateException he) {\n"
-      "            if (tx!=null) tx.rollback();\n"
-      "            throw he;\n"
-      "        }\n"
-      "        finally {\n"
-      "            session.close();\n"
-      "        }\n"
-      "    }\n"
-      "    \n"
-      "    public List listAllBlogNamesAndItemCounts(int max)\n"
-      "                    throws HibernateException {\n"
-      "        \n"
-      "        Session session = _sessions.openSession();\n"
-      "        Transaction tx = null;\n"
-      "        List result = null;\n"
-      "        try {\n"
-      "            tx = session.beginTransaction();\n"
-      "            Query q = session.createQuery(\n"
-      "                \"select blog.id, blog.name, count(blogItem) \" +\n"
-      "                \"from Blog as blog \" +\n"
-      "                \"left outer join blog.items as blogItem \" +\n"
-      "                \"group by blog.name, blog.id \" +\n"
-      "                \"order by max(blogItem.datetime)\"\n"
-      "            );\n"
-      "            q.setMaxResults(max);\n"
-      "            result = q.list();\n"
-      "            tx.commit();\n"
-      "        }\n"
-      "        catch (HibernateException he) {\n"
-      "            if (tx!=null) tx.rollback();\n"
-      "            throw he;\n"
-      "        }\n"
-      "        finally {\n"
-      "            session.close();\n"
-      "        }\n"
-      "        return result;\n"
-      "    }\n"
-      "    \n"
-      "    public Blog getBlogAndAllItems(Long blogid)\n"
-      "                    throws HibernateException {\n"
-      "        \n"
-      "        Session session = _sessions.openSession();\n"
-      "        Transaction tx = null;\n"
-      "        Blog blog = null;\n"
-      "        try {\n"
-      "            tx = session.beginTransaction();\n"
-      "            Query q = session.createQuery(\n"
-      "                \"from Blog as blog \" +\n"
-      "                \"left outer join fetch blog.items \" +\n"
-      "                \"where blog.id = :blogid\"\n"
-      "            );\n"
-      "            q.setParameter(\"blogid\", blogid);\n"
-      "            blog  = (Blog) q.uniqueResult();\n"
-      "            tx.commit();\n"
-      "        }\n"
-      "        catch (HibernateException he) {\n"
-      "            if (tx!=null) tx.rollback();\n"
-      "            throw he;\n"
-      "        }\n"
-      "        finally {\n"
-      "            session.close();\n"
-      "        }\n"
-      "        return blog;\n"
-      "    }\n"
-      "    \n"
-      "    public List listBlogsAndRecentItems() throws HibernateException {\n"
-      "        \n"
-      "        Session session = _sessions.openSession();\n"
-      "        Transaction tx = null;\n"
-      "        List result = null;\n"
-      "        try {\n"
-      "            tx = session.beginTransaction();\n"
-      "            Query q = session.createQuery(\n"
-      "                \"from Blog as blog \" +\n"
-      "                \"inner join blog.items as blogItem \" +\n"
-      "                \"where blogItem.datetime > :minDate\"\n"
-      "            );\n"
-      "\n"
-      "            Calendar cal = Calendar.getInstance();\n"
-      "            cal.roll(Calendar.MONTH, false);\n"
-      "            q.setCalendar(\"minDate\", cal);\n"
-      "            \n"
-      "            result = q.list();\n"
-      "            tx.commit();\n"
-      "        }\n"
-      "        catch (HibernateException he) {\n"
-      "            if (tx!=null) tx.rollback();\n"
-      "            throw he;\n"
-      "        }\n"
-      "        finally {\n"
-      "            session.close();\n"
-      "        }\n"
-      "        return result;\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[package eg;\n"
+"\n"
+"import java.util.ArrayList;\n"
+"import java.util.Calendar;\n"
+"import java.util.Iterator;\n"
+"import java.util.List;\n"
+"\n"
+"import org.hibernate.HibernateException;\n"
+"import org.hibernate.Query;\n"
+"import org.hibernate.Session;\n"
+"import org.hibernate.SessionFactory;\n"
+"import org.hibernate.Transaction;\n"
+"import org.hibernate.cfg.Configuration;\n"
+"import org.hibernate.tool.hbm2ddl.SchemaExport;\n"
+"\n"
+"public class BlogMain {\n"
+"    \n"
+"    private SessionFactory _sessions;\n"
+"    \n"
+"    public void configure() throws HibernateException {\n"
+"        _sessions = new Configuration()\n"
+"            .addClass(Blog.class)\n"
+"            .addClass(BlogItem.class)\n"
+"            .buildSessionFactory();\n"
+"    }\n"
+"    \n"
+"    public void exportTables() throws HibernateException {\n"
+"        Configuration cfg = new Configuration()\n"
+"            .addClass(Blog.class)\n"
+"            .addClass(BlogItem.class);\n"
+"        new SchemaExport(cfg).create(true, true);\n"
+"    }\n"
+"    \n"
+"    public Blog createBlog(String name) throws HibernateException {\n"
+"        \n"
+"        Blog blog = new Blog();\n"
+"        blog.setName(name);\n"
+"        blog.setItems( new ArrayList() );\n"
+"        \n"
+"        Session session = _sessions.openSession();\n"
+"        Transaction tx = null;\n"
+"        try {\n"
+"            tx = session.beginTransaction();\n"
+"            session.persist(blog);\n"
+"            tx.commit();\n"
+"        }\n"
+"        catch (HibernateException he) {\n"
+"            if (tx!=null) tx.rollback();\n"
+"            throw he;\n"
+"        }\n"
+"        finally {\n"
+"            session.close();\n"
+"        }\n"
+"        return blog;\n"
+"    }\n"
+"    \n"
+"    public BlogItem createBlogItem(Blog blog, String title, String text)\n"
+"                        throws HibernateException {\n"
+"        \n"
+"        BlogItem item = new BlogItem();\n"
+"        item.setTitle(title);\n"
+"        item.setText(text);\n"
+"        item.setBlog(blog);\n"
+"        item.setDatetime( Calendar.getInstance() );\n"
+"        blog.getItems().add(item);\n"
+"        \n"
+"        Session session = _sessions.openSession();\n"
+"        Transaction tx = null;\n"
+"        try {\n"
+"            tx = session.beginTransaction();\n"
+"            session.update(blog);\n"
+"            tx.commit();\n"
+"        }\n"
+"        catch (HibernateException he) {\n"
+"            if (tx!=null) tx.rollback();\n"
+"            throw he;\n"
+"        }\n"
+"        finally {\n"
+"            session.close();\n"
+"        }\n"
+"        return item;\n"
+"    }\n"
+"    \n"
+"    public BlogItem createBlogItem(Long blogid, String title, String text)\n"
+"                        throws HibernateException {\n"
+"        \n"
+"        BlogItem item = new BlogItem();\n"
+"        item.setTitle(title);\n"
+"        item.setText(text);\n"
+"        item.setDatetime( Calendar.getInstance() );\n"
+"        \n"
+"        Session session = _sessions.openSession();\n"
+"        Transaction tx = null;\n"
+"        try {\n"
+"            tx = session.beginTransaction();\n"
+"            Blog blog = (Blog) session.load(Blog.class, blogid);\n"
+"            item.setBlog(blog);\n"
+"            blog.getItems().add(item);\n"
+"            tx.commit();\n"
+"        }\n"
+"        catch (HibernateException he) {\n"
+"            if (tx!=null) tx.rollback();\n"
+"            throw he;\n"
+"        }\n"
+"        finally {\n"
+"            session.close();\n"
+"        }\n"
+"        return item;\n"
+"    }\n"
+"    \n"
+"    public void updateBlogItem(BlogItem item, String text)\n"
+"                    throws HibernateException {\n"
+"        \n"
+"        item.setText(text);\n"
+"        \n"
+"        Session session = _sessions.openSession();\n"
+"        Transaction tx = null;\n"
+"        try {\n"
+"            tx = session.beginTransaction();\n"
+"            session.update(item);\n"
+"            tx.commit();\n"
+"        }\n"
+"        catch (HibernateException he) {\n"
+"            if (tx!=null) tx.rollback();\n"
+"            throw he;\n"
+"        }\n"
+"        finally {\n"
+"            session.close();\n"
+"        }\n"
+"    }\n"
+"    \n"
+"    public void updateBlogItem(Long itemid, String text)\n"
+"                    throws HibernateException {\n"
+"    \n"
+"        Session session = _sessions.openSession();\n"
+"        Transaction tx = null;\n"
+"        try {\n"
+"            tx = session.beginTransaction();\n"
+"            BlogItem item = (BlogItem) session.load(BlogItem.class, "
+"itemid);\n"
+"            item.setText(text);\n"
+"            tx.commit();\n"
+"        }\n"
+"        catch (HibernateException he) {\n"
+"            if (tx!=null) tx.rollback();\n"
+"            throw he;\n"
+"        }\n"
+"        finally {\n"
+"            session.close();\n"
+"        }\n"
+"    }\n"
+"    \n"
+"    public List listAllBlogNamesAndItemCounts(int max)\n"
+"                    throws HibernateException {\n"
+"        \n"
+"        Session session = _sessions.openSession();\n"
+"        Transaction tx = null;\n"
+"        List result = null;\n"
+"        try {\n"
+"            tx = session.beginTransaction();\n"
+"            Query q = session.createQuery(\n"
+"                \"select blog.id, blog.name, count(blogItem) \" +\n"
+"                \"from Blog as blog \" +\n"
+"                \"left outer join blog.items as blogItem \" +\n"
+"                \"group by blog.name, blog.id \" +\n"
+"                \"order by max(blogItem.datetime)\"\n"
+"            );\n"
+"            q.setMaxResults(max);\n"
+"            result = q.list();\n"
+"            tx.commit();\n"
+"        }\n"
+"        catch (HibernateException he) {\n"
+"            if (tx!=null) tx.rollback();\n"
+"            throw he;\n"
+"        }\n"
+"        finally {\n"
+"            session.close();\n"
+"        }\n"
+"        return result;\n"
+"    }\n"
+"    \n"
+"    public Blog getBlogAndAllItems(Long blogid)\n"
+"                    throws HibernateException {\n"
+"        \n"
+"        Session session = _sessions.openSession();\n"
+"        Transaction tx = null;\n"
+"        Blog blog = null;\n"
+"        try {\n"
+"            tx = session.beginTransaction();\n"
+"            Query q = session.createQuery(\n"
+"                \"from Blog as blog \" +\n"
+"                \"left outer join fetch blog.items \" +\n"
+"                \"where blog.id = :blogid\"\n"
+"            );\n"
+"            q.setParameter(\"blogid\", blogid);\n"
+"            blog  = (Blog) q.uniqueResult();\n"
+"            tx.commit();\n"
+"        }\n"
+"        catch (HibernateException he) {\n"
+"            if (tx!=null) tx.rollback();\n"
+"            throw he;\n"
+"        }\n"
+"        finally {\n"
+"            session.close();\n"
+"        }\n"
+"        return blog;\n"
+"    }\n"
+"    \n"
+"    public List listBlogsAndRecentItems() throws HibernateException {\n"
+"        \n"
+"        Session session = _sessions.openSession();\n"
+"        Transaction tx = null;\n"
+"        List result = null;\n"
+"        try {\n"
+"            tx = session.beginTransaction();\n"
+"            Query q = session.createQuery(\n"
+"                \"from Blog as blog \" +\n"
+"                \"inner join blog.items as blogItem \" +\n"
+"                \"where blogItem.datetime > :minDate\"\n"
+"            );\n"
+"\n"
+"            Calendar cal = Calendar.getInstance();\n"
+"            cal.roll(Calendar.MONTH, false);\n"
+"            q.setCalendar(\"minDate\", cal);\n"
+"            \n"
+"            result = q.list();\n"
+"            tx.commit();\n"
+"        }\n"
+"        catch (HibernateException he) {\n"
+"            if (tx!=null) tx.rollback();\n"
+"            throw he;\n"
+"        }\n"
+"        finally {\n"
+"            session.close();\n"
+"        }\n"
+"        return result;\n"
+"    }\n"
+"}]]>"
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-

Modified: core/trunk/documentation/manual/translations/zh-CN/content/filters.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/filters.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/filters.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,149 +1,286 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: filters.xml:5
+#, no-c-format
 msgid "Filtering data"
-msgstr ""
+msgstr "过滤数据"
 
-#: index.docbook:7
-msgid "Hibernate3 provides an innovative new approach to handling data with \"visibility\" rules. A <emphasis>Hibernate filter</emphasis> is a global, named, parameterized filter that may be enabled or disabled for a particular Hibernate session."
+#. Tag: para
+#: filters.xml:7
+#, no-c-format
+msgid ""
+"Hibernate3 provides an innovative new approach to handling data with "
+"\"visibility\" rules. A <emphasis>Hibernate filter</emphasis> is a global, "
+"named, parameterized filter that may be enabled or disabled for a particular "
+"Hibernate session."
 msgstr ""
+"Hibernate3 提供了一种创新的方式来处理具有“显性(visibility)”规则的数据,那就是"
+"使用<emphasis>Hibernate filter</emphasis>。 <emphasis>Hibernate filter</"
+"emphasis>是全局有效的、具有名字、可以带参数的过滤器, 对于某个特定的"
+"Hibernate session您可以选择是否启用(或禁用)某个过滤器。"
 
-#: index.docbook:14
+#. Tag: title
+#: filters.xml:14
+#, no-c-format
 msgid "Hibernate filters"
-msgstr ""
+msgstr "Hibernate 过滤器(filters)"
 
-#: index.docbook:16
-msgid "Hibernate3 adds the ability to pre-define filter criteria and attach those filters at both a class and a collection level. A filter criteria is the ability to define a restriction clause very similiar to the existing \"where\" attribute available on the class and various collection elements. Except these filter conditions can be parameterized. The application can then make the decision at runtime whether given filters should be enabled and what their parameter values should be. Filters can be used like database views, but parameterized inside the application."
+#. Tag: para
+#: filters.xml:16
+#, no-c-format
+msgid ""
+"Hibernate3 adds the ability to pre-define filter criteria and attach those "
+"filters at both a class and a collection level. A filter criteria is the "
+"ability to define a restriction clause very similiar to the existing \"where"
+"\" attribute available on the class and various collection elements. Except "
+"these filter conditions can be parameterized. The application can then make "
+"the decision at runtime whether given filters should be enabled and what "
+"their parameter values should be. Filters can be used like database views, "
+"but parameterized inside the application."
 msgstr ""
+"Hibernate3新增了对某个类或者集合使用预先定义的过滤器条件(filter criteria)的功"
+"能。过滤器条件相当于定义一个 非常类似于类和各种集合上的“where”属性的约束子"
+"句,但是过滤器条件可以带参数。 应用程序可以在运行时决定是否启用给定的过滤器,"
+"以及使用什么样的参数值。 过滤器的用法很像数据库视图,只不过是在应用程序中确定"
+"使用什么样的参数的。"
 
-#: index.docbook:26
-msgid "In order to use filters, they must first be defined and then attached to the appropriate mapping elements. To define a filter, use the <literal>&lt;filter-def/&gt;</literal> element within a <literal>&lt;hibernate-mapping/&gt;</literal> element:"
+#. Tag: para
+#: filters.xml:26
+#, no-c-format
+msgid ""
+"In order to use filters, they must first be defined and then attached to the "
+"appropriate mapping elements. To define a filter, use the <literal>&lt;"
+"filter-def/&gt;</literal> element within a <literal>&lt;hibernate-mapping/"
+"&gt;</literal> element:"
 msgstr ""
+"要使用过滤器,必须首先在相应的映射节点中定义。而定义一个过滤器,要用到位于"
+"<literal>&lt;hibernate-mapping/&gt;</literal> 节点之内的<literal>&lt;filter-"
+"def/&gt;</literal>节点:"
 
-#: index.docbook:32
+#. Tag: programlisting
+#: filters.xml:32
+#, no-c-format
 msgid ""
-      "<![CDATA[<filter-def name=\"myFilter\">\n"
-      "    <filter-param name=\"myFilterParam\" type=\"string\"/>\n"
-      "</filter-def>]]>"
+"<![CDATA[<filter-def name=\"myFilter\">\n"
+"    <filter-param name=\"myFilterParam\" type=\"string\"/>\n"
+"</filter-def>]]>"
 msgstr ""
 
-#: index.docbook:34
+#. Tag: para
+#: filters.xml:34
+#, no-c-format
 msgid "Then, this filter can be attached to a class:"
-msgstr ""
+msgstr "定义好之后,就可以在某个类中使用这个过滤器:"
 
-#: index.docbook:38
+#. Tag: programlisting
+#: filters.xml:38
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"myClass\" ...>\n"
-      "    ...\n"
-      "    <filter name=\"myFilter\" condition=\":myFilterParam = MY_FILTERED_COLUMN\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"myClass\" ...>\n"
+"    ...\n"
+"    <filter name=\"myFilter\" condition=\":myFilterParam = MY_FILTERED_COLUMN"
+"\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:40
+#. Tag: para
+#: filters.xml:40
+#, no-c-format
 msgid "or, to a collection:"
-msgstr ""
+msgstr "也可以在某个集合使用它:"
 
-#: index.docbook:44
+#. Tag: programlisting
+#: filters.xml:44
+#, no-c-format
 msgid ""
-      "<![CDATA[<set ...>\n"
-      "    <filter name=\"myFilter\" condition=\":myFilterParam = MY_FILTERED_COLUMN\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set ...>\n"
+"    <filter name=\"myFilter\" condition=\":myFilterParam = MY_FILTERED_COLUMN"
+"\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:46
+#. Tag: para
+#: filters.xml:46
+#, no-c-format
 msgid "or, even to both (or multiples of each) at the same time."
 msgstr ""
+"可以在多个类或集合中使用某个过滤器;某个类或者集合中也可以使用多个过滤器。"
 
-#: index.docbook:50
-msgid "The methods on <literal>Session</literal> are: <literal>enableFilter(String filterName)</literal>, <literal>getEnabledFilter(String filterName)</literal>, and <literal>disableFilter(String filterName)</literal>. By default, filters are <emphasis>not</emphasis> enabled for a given session; they must be explcitly enabled through use of the <literal>Session.enabledFilter()</literal> method, which returns an instance of the <literal>Filter</literal> interface. Using the simple filter defined above, this would look like:"
+#. Tag: para
+#: filters.xml:50
+#, no-c-format
+msgid ""
+"The methods on <literal>Session</literal> are: <literal>enableFilter(String "
+"filterName)</literal>, <literal>getEnabledFilter(String filterName)</"
+"literal>, and <literal>disableFilter(String filterName)</literal>. By "
+"default, filters are <emphasis>not</emphasis> enabled for a given session; "
+"they must be explcitly enabled through use of the <literal>Session."
+"enabledFilter()</literal> method, which returns an instance of the "
+"<literal>Filter</literal> interface. Using the simple filter defined above, "
+"this would look like:"
 msgstr ""
+"<literal>Session</literal>对象中会用到的方法有:<literal>enableFilter(String "
+"filterName)</literal>, <literal>getEnabledFilter(String filterName)</"
+"literal>, 和 <literal>disableFilter(String filterName)</literal>. Session中默"
+"认是<emphasis>不</emphasis>启用过滤器的,必须通过<literal>Session."
+"enabledFilter()</literal>方法显式的启用。 该方法返回被启用的<literal>Filter</"
+"literal>的实例。以上文定义的过滤器为例:"
 
-#: index.docbook:59
-msgid "<![CDATA[session.enableFilter(\"myFilter\").setParameter(\"myFilterParam\", \"some-value\");]]>"
+#. Tag: programlisting
+#: filters.xml:59
+#, no-c-format
+msgid ""
+"<![CDATA[session.enableFilter(\"myFilter\").setParameter(\"myFilterParam\", "
+"\"some-value\");]]>"
 msgstr ""
 
-#: index.docbook:61
-msgid "Note that methods on the org.hibernate.Filter interface do allow the method-chaining common to much of Hibernate."
+#. Tag: para
+#: filters.xml:61
+#, no-c-format
+msgid ""
+"Note that methods on the org.hibernate.Filter interface do allow the method-"
+"chaining common to much of Hibernate."
 msgstr ""
+"注意,org.hibernate.Filter的方法允许链式方法调用。(类似上面例子中启用Filter"
+"之后设定Filter参数这个“方法链”) Hibernate的其他部分也大多有这个特性。"
 
-#: index.docbook:65
-msgid "A full example, using temporal data with an effective record date pattern:"
-msgstr ""
+#. Tag: para
+#: filters.xml:65
+#, no-c-format
+msgid ""
+"A full example, using temporal data with an effective record date pattern:"
+msgstr "下面是一个比较完整的例子,使用了记录生效日期模式过滤有时效的数据:"
 
-#: index.docbook:69
+#. Tag: programlisting
+#: filters.xml:69
+#, no-c-format
 msgid ""
-      "<![CDATA[<filter-def name=\"effectiveDate\">\n"
-      "    <filter-param name=\"asOfDate\" type=\"date\"/>\n"
-      "</filter-def>\n"
-      "\n"
-      "<class name=\"Employee\" ...>\n"
-      "...\n"
-      "    <many-to-one name=\"department\" column=\"dept_id\" class=\"Department\"/>\n"
-      "    <property name=\"effectiveStartDate\" type=\"date\" column=\"eff_start_dt\"/>\n"
-      "    <property name=\"effectiveEndDate\" type=\"date\" column=\"eff_end_dt\"/>\n"
-      "...\n"
-      "    <!--\n"
-      "        Note that this assumes non-terminal records have an eff_end_dt set to\n"
-      "        a max db date for simplicity-sake\n"
-      "    -->\n"
-      "    <filter name=\"effectiveDate\"\n"
-      "            condition=\":asOfDate BETWEEN eff_start_dt and eff_end_dt\"/>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"Department\" ...>\n"
-      "...\n"
-      "    <set name=\"employees\" lazy=\"true\">\n"
-      "        <key column=\"dept_id\"/>\n"
-      "        <one-to-many class=\"Employee\"/>\n"
-      "        <filter name=\"effectiveDate\"\n"
-      "                condition=\":asOfDate BETWEEN eff_start_dt and eff_end_dt\"/>\n"
-      "    </set>\n"
-      "</class>]]>"
+"<![CDATA[<filter-def name=\"effectiveDate\">\n"
+"    <filter-param name=\"asOfDate\" type=\"date\"/>\n"
+"</filter-def>\n"
+"\n"
+"<class name=\"Employee\" ...>\n"
+"...\n"
+"    <many-to-one name=\"department\" column=\"dept_id\" class=\"Department\"/"
+">\n"
+"    <property name=\"effectiveStartDate\" type=\"date\" column=\"eff_start_dt"
+"\"/>\n"
+"    <property name=\"effectiveEndDate\" type=\"date\" column=\"eff_end_dt\"/"
+">\n"
+"...\n"
+"    <!--\n"
+"        Note that this assumes non-terminal records have an eff_end_dt set "
+"to\n"
+"        a max db date for simplicity-sake\n"
+"    -->\n"
+"    <filter name=\"effectiveDate\"\n"
+"            condition=\":asOfDate BETWEEN eff_start_dt and eff_end_dt\"/>\n"
+"</class>\n"
+"\n"
+"<class name=\"Department\" ...>\n"
+"...\n"
+"    <set name=\"employees\" lazy=\"true\">\n"
+"        <key column=\"dept_id\"/>\n"
+"        <one-to-many class=\"Employee\"/>\n"
+"        <filter name=\"effectiveDate\"\n"
+"                condition=\":asOfDate BETWEEN eff_start_dt and eff_end_dt\"/"
+">\n"
+"    </set>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:71
-msgid "Then, in order to ensure that you always get back currently effective records, simply enable the filter on the session prior to retrieving employee data:"
+#. Tag: para
+#: filters.xml:71
+#, no-c-format
+msgid ""
+"Then, in order to ensure that you always get back currently effective "
+"records, simply enable the filter on the session prior to retrieving "
+"employee data:"
 msgstr ""
+"定义好后,如果想要保证取回的都是目前处于生效期的记录,只需在获取雇员数据的操"
+"作之前先开启过滤器即可:"
 
-#: index.docbook:76
+#. Tag: programlisting
+#: filters.xml:76
+#, no-c-format
 msgid ""
-      "<![CDATA[Session session = ...;\n"
-      "session.enabledFilter(\"effectiveDate\").setParameter(\"asOfDate\", new Date());\n"
-      "List results = session.createQuery(\"from Employee as e where e.salary > :targetSalary\")\n"
-      "         .setLong(\"targetSalary\", new Long(1000000))\n"
-      "         .list();\n"
-      "]]>"
+"<![CDATA[Session session = ...;\n"
+"session.enabledFilter(\"effectiveDate\").setParameter(\"asOfDate\", new Date"
+"());\n"
+"List results = session.createQuery(\"from Employee as e where e.salary > :"
+"targetSalary\")\n"
+"         .setLong(\"targetSalary\", new Long(1000000))\n"
+"         .list();\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:78
-msgid "In the HQL above, even though we only explicitly mentioned a salary constraint on the results, because of the enabled filter the query will return only currently active employees who have a salary greater than a million dollars."
+#. Tag: para
+#: filters.xml:78
+#, no-c-format
+msgid ""
+"In the HQL above, even though we only explicitly mentioned a salary "
+"constraint on the results, because of the enabled filter the query will "
+"return only currently active employees who have a salary greater than a "
+"million dollars."
 msgstr ""
+"在上面的HQL中,虽然我们仅仅显式的使用了一个薪水条件,但因为启用了过滤器,查询"
+"将仅返回那些目前雇用 关系处于生效期的,并且薪水高于一百万美刀的雇员的数据。"
 
-#: index.docbook:84
-msgid "Note: if you plan on using filters with outer joining (either through HQL or load fetching) be careful of the direction of the condition expression. Its safest to set this up for left outer joining; in general, place the parameter first followed by the column name(s) after the operator."
+#. Tag: para
+#: filters.xml:84
+#, no-c-format
+msgid ""
+"Note: if you plan on using filters with outer joining (either through HQL or "
+"load fetching) be careful of the direction of the condition expression. Its "
+"safest to set this up for left outer joining; in general, place the "
+"parameter first followed by the column name(s) after the operator."
 msgstr ""
+"注意:如果你打算在使用外连接(或者通过HQL或load fetching)的同时使用过滤器,"
+"要注意条件表达式的方向(左还是右)。 最安全的方式是使用左外连接(left outer "
+"joining)。并且通常来说,先写参数, 然后是操作符,最后写数据库字段名。"
 
-#: index.docbook:91
-msgid "After being defined a filter might be attached to multiple entities and/or collections each with its own condition. That can be tedious when the conditions are the same each time. Thus <literal>&lt;filter-def/&gt;</literal> allows defining a default condition, either as an attribute or CDATA:"
+#. Tag: para
+#: filters.xml:91
+#, no-c-format
+msgid ""
+"After being defined a filter might be attached to multiple entities and/or "
+"collections each with its own condition. That can be tedious when the "
+"conditions are the same each time. Thus <literal>&lt;filter-def/&gt;</"
+"literal> allows defining a default condition, either as an attribute or "
+"CDATA:"
 msgstr ""
+"在Filter定义之后,它可能被附加到多个实体和/或集合类,每个都有自己的条件。假若这"
+"些条件都是一样的,每次都要定义就显得很繁琐。因此,<literal>&lt;filter-def/"
+"&gt;</literal>被用来定义一个默认条件,它可能作为属性或者CDATA出现:"
 
-#: index.docbook:98
+#. Tag: programlisting
+#: filters.xml:98
+#, no-c-format
 msgid ""
-      "<![CDATA[<filter-def name=\"myFilter\" condition=\"abc > xyz\">...</filter-def>\n"
-      "<filter-def name=\"myOtherFilter\">abc=xyz</filter-def>]]>"
+"<![CDATA[<filter-def name=\"myFilter\" condition=\"abc > xyz\">...</filter-"
+"def>\n"
+"<filter-def name=\"myOtherFilter\">abc=xyz</filter-def>]]>"
 msgstr ""
 
-#: index.docbook:100
-msgid "This default condition will then be used whenever the filter is attached to something without specifying a condition. Note that this means you can give a specific condition as part of the attachment of the filter which overrides the default condition in that particular case."
+#. Tag: para
+#: filters.xml:100
+#, no-c-format
+msgid ""
+"This default condition will then be used whenever the filter is attached to "
+"something without specifying a condition. Note that this means you can give "
+"a specific condition as part of the attachment of the filter which overrides "
+"the default condition in that particular case."
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+"当这个filter被附加到任何目的地,而又没有指明条件时,这个条件就会被使用。注"
+"意,换句话说,你可以通过给filter附加特别的条件来重载默认条件。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/inheritance_mapping.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/inheritance_mapping.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/inheritance_mapping.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,477 +1,820 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: inheritance_mapping.xml:5
+#, no-c-format
 msgid "Inheritance Mapping"
-msgstr ""
+msgstr "继承映射(Inheritance Mappings)"
 
-#: index.docbook:8
+#. Tag: title
+#: inheritance_mapping.xml:8
+#, no-c-format
 msgid "The Three Strategies"
-msgstr ""
+msgstr "三种策略"
 
-#: index.docbook:10
+#. Tag: para
+#: inheritance_mapping.xml:10
+#, no-c-format
 msgid "Hibernate supports the three basic inheritance mapping strategies:"
-msgstr ""
+msgstr "Hibernate支持三种基本的继承映射策略:"
 
-#: index.docbook:16
+#. Tag: para
+#: inheritance_mapping.xml:16
+#, no-c-format
 msgid "table per class hierarchy"
-msgstr ""
+msgstr "每个类分层结构一张表(table per class hierarchy)"
 
-#: index.docbook:21
+#. Tag: para
+#: inheritance_mapping.xml:21
+#, fuzzy, no-c-format
 msgid "<para>table per subclass</para>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"每个子类一张表(table per subclass)\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"每个子类一张表"
 
-#: index.docbook:26
+#. Tag: para
+#: inheritance_mapping.xml:26
+#, no-c-format
 msgid "table per concrete class"
-msgstr ""
+msgstr "每个具体类一张表(table per concrete class)"
 
-#: index.docbook:32
-msgid "In addition, Hibernate supports a fourth, slightly different kind of polymorphism:"
-msgstr ""
+#. Tag: para
+#: inheritance_mapping.xml:32
+#, no-c-format
+msgid ""
+"In addition, Hibernate supports a fourth, slightly different kind of "
+"polymorphism:"
+msgstr "此外,Hibernate还支持第四种稍有不同的多态映射策略:"
 
-#: index.docbook:39
+#. Tag: para
+#: inheritance_mapping.xml:39
+#, no-c-format
 msgid "implicit polymorphism"
-msgstr ""
+msgstr "隐式多态(implicit polymorphism)"
 
-#: index.docbook:45
-msgid "It is possible to use different mapping strategies for different branches of the same inheritance hierarchy, and then make use of implicit polymorphism to achieve polymorphism across the whole hierarchy. However, Hibernate does not support mixing <literal>&lt;subclass&gt;</literal>, and <literal>&lt;joined-subclass&gt;</literal> and <literal>&lt;union-subclass&gt;</literal> mappings under the same root <literal>&lt;class&gt;</literal> element. It is possible to mix together the table per hierarchy and table per subclass strategies, under the the same <literal>&lt;class&gt;</literal> element, by combining the <literal>&lt;subclass&gt;</literal> and <literal>&lt;join&gt;</literal> elements (see below)."
+#. Tag: para
+#: inheritance_mapping.xml:45
+#, no-c-format
+msgid ""
+"It is possible to use different mapping strategies for different branches of "
+"the same inheritance hierarchy, and then make use of implicit polymorphism "
+"to achieve polymorphism across the whole hierarchy. However, Hibernate does "
+"not support mixing <literal>&lt;subclass&gt;</literal>, and <literal>&lt;"
+"joined-subclass&gt;</literal> and <literal>&lt;union-subclass&gt;</literal> "
+"mappings under the same root <literal>&lt;class&gt;</literal> element. It is "
+"possible to mix together the table per hierarchy and table per subclass "
+"strategies, under the the same <literal>&lt;class&gt;</literal> element, by "
+"combining the <literal>&lt;subclass&gt;</literal> and <literal>&lt;join&gt;</"
+"literal> elements (see below)."
 msgstr ""
+"对于同一个继承层次内的不同分支,可以采用不同的映射策略,然后用隐式多 态来完成"
+"跨越整个层次的多态。但是在同一个<literal>&lt;class&gt;</literal>根元素 下,"
+"Hibernate不支持混合了元素<literal>&lt;subclass&gt;</literal>、 <literal>&lt;"
+"joined-subclass&gt;</literal>和<literal>&lt;union-subclass&gt;</literal> 的映"
+"射。在同一个<literal>&lt;class&gt;</literal>元素下,可以混合使用 “每个类分层"
+"结构一张表”(table per hierarchy) 和“每个子类一张表”(table per subclass) "
+"这两种映射策略,这是通过结合元素<literal>&lt;subclass&gt;</literal>和 "
+"<literal>&lt;join&gt;</literal>来实现的(见后)。"
 
-#: index.docbook:59
-msgid "It is possible to define <literal>subclass</literal>, <literal>union-subclass</literal>, and <literal>joined-subclass</literal> mappings in separate mapping documents, directly beneath <literal>hibernate-mapping</literal>. This allows you to extend a class hierachy just by adding a new mapping file. You must specify an <literal>extends</literal> attribute in the subclass mapping, naming a previously mapped superclass. Note: Previously this feature made the ordering of the mapping documents important. Since Hibernate3, the ordering of mapping files does not matter when using the extends keyword. The ordering inside a single mapping file still needs to be defined as superclasses before subclasses."
+#. Tag: para
+#: inheritance_mapping.xml:59
+#, no-c-format
+msgid ""
+"It is possible to define <literal>subclass</literal>, <literal>union-"
+"subclass</literal>, and <literal>joined-subclass</literal> mappings in "
+"separate mapping documents, directly beneath <literal>hibernate-mapping</"
+"literal>. This allows you to extend a class hierachy just by adding a new "
+"mapping file. You must specify an <literal>extends</literal> attribute in "
+"the subclass mapping, naming a previously mapped superclass. Note: "
+"Previously this feature made the ordering of the mapping documents "
+"important. Since Hibernate3, the ordering of mapping files does not matter "
+"when using the extends keyword. The ordering inside a single mapping file "
+"still needs to be defined as superclasses before subclasses."
 msgstr ""
+"在多个映射文件中,可以直接在<literal>hibernate-mapping</literal>根下定义"
+"<literal>subclass</literal>,<literal>union-subclass</literal>和"
+"<literal>joined-subclass</literal>。也就是说,你可以仅加入一个新的映射文件来"
+"扩展类层次。你必须在subclass的映射中指明<literal>extends</literal>属性,给出"
+"一个之前定义的超类的名字。注意,在以前,这一功能对映射文件的顺序有严格的要"
+"求,从Hibernate 3开始,使用extends关键字的时侯,对映射文件的顺序不再有要求;"
+"但在每个映射文件里,超类必须在子类之前定义。"
 
-#: index.docbook:70
+#. Tag: programlisting
+#: inheritance_mapping.xml:70
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      " <hibernate-mapping>\n"
-      "     <subclass name=\"DomesticCat\" extends=\"Cat\" discriminator-value=\"D\">\n"
-      "          <property name=\"name\" type=\"string\"/>\n"
-      "     </subclass>\n"
-      " </hibernate-mapping>]]>"
+"<![CDATA[\n"
+" <hibernate-mapping>\n"
+"     <subclass name=\"DomesticCat\" extends=\"Cat\" discriminator-value=\"D"
+"\">\n"
+"          <property name=\"name\" type=\"string\"/>\n"
+"     </subclass>\n"
+" </hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:74
+#. Tag: title
+#: inheritance_mapping.xml:74
+#, no-c-format
 msgid "Table per class hierarchy"
-msgstr ""
+msgstr "每个类分层结构一张表(Table per class hierarchy)"
 
-#: index.docbook:76
-msgid "Suppose we have an interface <literal>Payment</literal>, with implementors <literal>CreditCardPayment</literal>, <literal>CashPayment</literal>, <literal>ChequePayment</literal>. The table per hierarchy mapping would look like:"
+#. Tag: para
+#: inheritance_mapping.xml:76
+#, no-c-format
+msgid ""
+"Suppose we have an interface <literal>Payment</literal>, with implementors "
+"<literal>CreditCardPayment</literal>, <literal>CashPayment</literal>, "
+"<literal>ChequePayment</literal>. The table per hierarchy mapping would look "
+"like:"
 msgstr ""
+"假设我们有接口<literal>Payment</literal>和它的几个实现类: "
+"<literal>CreditCardPayment</literal>, <literal>CashPayment</literal>, 和"
+"<literal>ChequePayment</literal>。则“每个类分层结构一张表”(Table per class "
+"hierarchy)的映射代码如下所示:"
 
-#: index.docbook:83
+#. Tag: programlisting
+#: inheritance_mapping.xml:83
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"
-      "    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"
-      "    <property name=\"amount\" column=\"AMOUNT\"/>\n"
-      "    ...\n"
-      "    <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT\">\n"
-      "        <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
-      "        ...\n"
-      "    </subclass>\n"
-      "    <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"
-      "        ...\n"
-      "    </subclass>\n"
-      "    <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE\">\n"
-      "        ...\n"
-      "    </subclass>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"
+"    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"
+"    <property name=\"amount\" column=\"AMOUNT\"/>\n"
+"    ...\n"
+"    <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT\">\n"
+"        <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
+"        ...\n"
+"    </subclass>\n"
+"    <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"
+"        ...\n"
+"    </subclass>\n"
+"    <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE\">\n"
+"        ...\n"
+"    </subclass>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:85
-msgid "Exactly one table is required. There is one big limitation of this mapping strategy: columns declared by the subclasses, such as <literal>CCTYPE</literal>, may not have <literal>NOT NULL</literal> constraints."
+#. Tag: para
+#: inheritance_mapping.xml:85
+#, no-c-format
+msgid ""
+"Exactly one table is required. There is one big limitation of this mapping "
+"strategy: columns declared by the subclasses, such as <literal>CCTYPE</"
+"literal>, may not have <literal>NOT NULL</literal> constraints."
 msgstr ""
+"采用这种策略只需要一张表即可。它有一个很大的限制:要求那些由子类定义的字段, "
+"如<literal>CCTYPE</literal>,不能有<literal>非空(NOT NULL)</literal>约束。"
 
-#: index.docbook:94
+#. Tag: title
+#: inheritance_mapping.xml:94
+#, no-c-format
 msgid "Table per subclass"
-msgstr ""
+msgstr "每个子类一张表(Table per subclass)"
 
-#: index.docbook:96
+#. Tag: para
+#: inheritance_mapping.xml:96
+#, no-c-format
 msgid "A table per subclass mapping would look like:"
-msgstr ""
+msgstr "对于上例中的几个类而言,采用“每个子类一张表”的映射策略,代码如下所示:"
 
-#: index.docbook:100
+#. Tag: programlisting
+#: inheritance_mapping.xml:100
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"
-      "    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <property name=\"amount\" column=\"AMOUNT\"/>\n"
-      "    ...\n"
-      "    <joined-subclass name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"
-      "        <key column=\"PAYMENT_ID\"/>\n"
-      "        <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
-      "        ...\n"
-      "    </joined-subclass>\n"
-      "    <joined-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
-      "        <key column=\"PAYMENT_ID\"/>\n"
-      "        ...\n"
-      "    </joined-subclass>\n"
-      "    <joined-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"
-      "        <key column=\"PAYMENT_ID\"/>\n"
-      "        ...\n"
-      "    </joined-subclass>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"
+"    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <property name=\"amount\" column=\"AMOUNT\"/>\n"
+"    ...\n"
+"    <joined-subclass name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"
+"        <key column=\"PAYMENT_ID\"/>\n"
+"        <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
+"        ...\n"
+"    </joined-subclass>\n"
+"    <joined-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
+"        <key column=\"PAYMENT_ID\"/>\n"
+"        ...\n"
+"    </joined-subclass>\n"
+"    <joined-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"
+"        <key column=\"PAYMENT_ID\"/>\n"
+"        ...\n"
+"    </joined-subclass>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:102
-msgid "Four tables are required. The three subclass tables have primary key associations to the superclass table (so the relational model is actually a one-to-one association)."
+#. Tag: para
+#: inheritance_mapping.xml:102
+#, no-c-format
+msgid ""
+"Four tables are required. The three subclass tables have primary key "
+"associations to the superclass table (so the relational model is actually a "
+"one-to-one association)."
 msgstr ""
+"需要四张表。三个子类表通过主键关联到超类表(因而关系模型实际上是一对一关联)。"
 
-#: index.docbook:111
+#. Tag: title
+#: inheritance_mapping.xml:111
+#, no-c-format
 msgid "Table per subclass, using a discriminator"
-msgstr ""
+msgstr "每个子类一张表(Table per subclass),使用辨别标志(Discriminator)"
 
-#: index.docbook:113
-msgid "Note that Hibernate's implementation of table per subclass requires no discriminator column. Other object/relational mappers use a different implementation of table per subclass which requires a type discriminator column in the superclass table. The approach taken by Hibernate is much more difficult to implement but arguably more correct from a relational point of view. If you would like to use a discriminator column with the table per subclass strategy, you may combine the use of <literal>&lt;subclass&gt;</literal> and <literal>&lt;join&gt;</literal>, as follow:"
+#. Tag: para
+#: inheritance_mapping.xml:113
+#, no-c-format
+msgid ""
+"Note that Hibernate's implementation of table per subclass requires no "
+"discriminator column. Other object/relational mappers use a different "
+"implementation of table per subclass which requires a type discriminator "
+"column in the superclass table. The approach taken by Hibernate is much more "
+"difficult to implement but arguably more correct from a relational point of "
+"view. If you would like to use a discriminator column with the table per "
+"subclass strategy, you may combine the use of <literal>&lt;subclass&gt;</"
+"literal> and <literal>&lt;join&gt;</literal>, as follow:"
 msgstr ""
+"注意,对“每个子类一张表”的映射策略,Hibernate的实现不需要辨别字段,而其他 的"
+"对象/关系映射工具使用了一种不同于Hibernate的实现方法,该方法要求在超类 表中有"
+"一个类型辨别字段(type discriminator column)。Hibernate采用的方法更 难实现,但"
+"从关系(数据库)的角度来看,按理说它更正确。若你愿意使用带有辨别字 段的“每个"
+"子类一张表”的策略,你可以结合使用<literal>&lt;subclass&gt;</literal> 与"
+"<literal>&lt;join&gt;</literal>,如下所示:"
 
-#: index.docbook:125
+#. Tag: programlisting
+#: inheritance_mapping.xml:125
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"
-      "    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"
-      "    <property name=\"amount\" column=\"AMOUNT\"/>\n"
-      "    ...\n"
-      "    <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT\">\n"
-      "        <join table=\"CREDIT_PAYMENT\">\n"
-      "            <key column=\"PAYMENT_ID\"/>\n"
-      "            <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
-      "            ...\n"
-      "        </join>\n"
-      "    </subclass>\n"
-      "    <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"
-      "        <join table=\"CASH_PAYMENT\">\n"
-      "            <key column=\"PAYMENT_ID\"/>\n"
-      "            ...\n"
-      "        </join>\n"
-      "    </subclass>\n"
-      "    <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE\">\n"
-      "        <join table=\"CHEQUE_PAYMENT\" fetch=\"select\">\n"
-      "            <key column=\"PAYMENT_ID\"/>\n"
-      "            ...\n"
-      "        </join>\n"
-      "    </subclass>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"
+"    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"
+"    <property name=\"amount\" column=\"AMOUNT\"/>\n"
+"    ...\n"
+"    <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT\">\n"
+"        <join table=\"CREDIT_PAYMENT\">\n"
+"            <key column=\"PAYMENT_ID\"/>\n"
+"            <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
+"            ...\n"
+"        </join>\n"
+"    </subclass>\n"
+"    <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"
+"        <join table=\"CASH_PAYMENT\">\n"
+"            <key column=\"PAYMENT_ID\"/>\n"
+"            ...\n"
+"        </join>\n"
+"    </subclass>\n"
+"    <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE\">\n"
+"        <join table=\"CHEQUE_PAYMENT\" fetch=\"select\">\n"
+"            <key column=\"PAYMENT_ID\"/>\n"
+"            ...\n"
+"        </join>\n"
+"    </subclass>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:127
-msgid "The optional <literal>fetch=\"select\"</literal> declaration tells Hibernate not to fetch the <literal>ChequePayment</literal> subclass data using an outer join when querying the superclass."
+#. Tag: para
+#: inheritance_mapping.xml:127
+#, no-c-format
+msgid ""
+"The optional <literal>fetch=\"select\"</literal> declaration tells Hibernate "
+"not to fetch the <literal>ChequePayment</literal> subclass data using an "
+"outer join when querying the superclass."
 msgstr ""
+"可选的声明<literal>fetch=\"select\"</literal>,是用来告诉Hibernate,在查询超"
+"类时, 不要使用外部连接(outer join)来抓取子类<literal>ChequePayment</literal>"
+"的数据。"
 
-#: index.docbook:136
+#. Tag: title
+#: inheritance_mapping.xml:136
+#, no-c-format
 msgid "Mixing table per class hierarchy with table per subclass"
-msgstr ""
+msgstr "混合使用“每个类分层结构一张表”和“每个子类一张表”"
 
-#: index.docbook:138
-msgid "You may even mix the table per hierarchy and table per subclass strategies using this approach:"
+#. Tag: para
+#: inheritance_mapping.xml:138
+#, no-c-format
+msgid ""
+"You may even mix the table per hierarchy and table per subclass strategies "
+"using this approach:"
 msgstr ""
+"你甚至可以采取如下方法混和使用“每个类分层结构一张表”和“每个子类一张表”这两种"
+"策略:"
 
-#: index.docbook:143
+#. Tag: programlisting
+#: inheritance_mapping.xml:143
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"
-      "    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"
-      "    <property name=\"amount\" column=\"AMOUNT\"/>\n"
-      "    ...\n"
-      "    <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT\">\n"
-      "        <join table=\"CREDIT_PAYMENT\">\n"
-      "            <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
-      "            ...\n"
-      "        </join>\n"
-      "    </subclass>\n"
-      "    <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"
-      "        ...\n"
-      "    </subclass>\n"
-      "    <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE\">\n"
-      "        ...\n"
-      "    </subclass>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"
+"    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"
+"    <property name=\"amount\" column=\"AMOUNT\"/>\n"
+"    ...\n"
+"    <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT\">\n"
+"        <join table=\"CREDIT_PAYMENT\">\n"
+"            <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
+"            ...\n"
+"        </join>\n"
+"    </subclass>\n"
+"    <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"
+"        ...\n"
+"    </subclass>\n"
+"    <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE\">\n"
+"        ...\n"
+"    </subclass>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:145
-msgid "For any of these mapping strategies, a polymorphic association to the root <literal>Payment</literal> class is mapped using <literal>&lt;many-to-one&gt;</literal>."
+#. Tag: para
+#: inheritance_mapping.xml:145
+#, no-c-format
+msgid ""
+"For any of these mapping strategies, a polymorphic association to the root "
+"<literal>Payment</literal> class is mapped using <literal>&lt;many-to-one&gt;"
+"</literal>."
 msgstr ""
+"对上述任何一种映射策略而言,指向根类<literal>Payment</literal>的 关联是使用"
+"<literal>&lt;many-to-one&gt;</literal>进行映射的。"
 
-#: index.docbook:151
-msgid "<![CDATA[<many-to-one name=\"payment\" column=\"PAYMENT_ID\" class=\"Payment\"/>]]>"
+#. Tag: programlisting
+#: inheritance_mapping.xml:151
+#, no-c-format
+msgid ""
+"<![CDATA[<many-to-one name=\"payment\" column=\"PAYMENT_ID\" class=\"Payment"
+"\"/>]]>"
 msgstr ""
 
-#: index.docbook:156
+#. Tag: title
+#: inheritance_mapping.xml:156
+#, no-c-format
 msgid "Table per concrete class"
-msgstr ""
+msgstr "每个具体类一张表(Table per concrete class)"
 
-#: index.docbook:158
-msgid "There are two ways we could go about mapping the table per concrete class strategy. The first is to use <literal>&lt;union-subclass&gt;</literal>."
+#. Tag: para
+#: inheritance_mapping.xml:158
+#, no-c-format
+msgid ""
+"There are two ways we could go about mapping the table per concrete class "
+"strategy. The first is to use <literal>&lt;union-subclass&gt;</literal>."
 msgstr ""
+"对于“每个具体类一张表”的映射策略,可以采用两种方法。第一种方法是使用 "
+"<literal>&lt;union-subclass&gt;</literal>。"
 
-#: index.docbook:163
+#. Tag: programlisting
+#: inheritance_mapping.xml:163
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Payment\">\n"
-      "    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
-      "        <generator class=\"sequence\"/>\n"
-      "    </id>\n"
-      "    <property name=\"amount\" column=\"AMOUNT\"/>\n"
-      "    ...\n"
-      "    <union-subclass name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"
-      "        <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
-      "        ...\n"
-      "    </union-subclass>\n"
-      "    <union-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
-      "        ...\n"
-      "    </union-subclass>\n"
-      "    <union-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"
-      "        ...\n"
-      "    </union-subclass>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Payment\">\n"
+"    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
+"        <generator class=\"sequence\"/>\n"
+"    </id>\n"
+"    <property name=\"amount\" column=\"AMOUNT\"/>\n"
+"    ...\n"
+"    <union-subclass name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"
+"        <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
+"        ...\n"
+"    </union-subclass>\n"
+"    <union-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
+"        ...\n"
+"    </union-subclass>\n"
+"    <union-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"
+"        ...\n"
+"    </union-subclass>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:165
-msgid "Three tables are involved for the subclasses. Each table defines columns for all properties of the class, including inherited properties."
+#. Tag: para
+#: inheritance_mapping.xml:165
+#, no-c-format
+msgid ""
+"Three tables are involved for the subclasses. Each table defines columns for "
+"all properties of the class, including inherited properties."
 msgstr ""
+"这里涉及三张与子类相关的表。每张表为对应类的所有属性(包括从超类继承的属性)"
+"定义相应字段。"
 
-#: index.docbook:170
-msgid "The limitation of this approach is that if a property is mapped on the superclass, the column name must be the same on all subclass tables. (We might relax this in a future release of Hibernate.) The identity generator strategy is not allowed in union subclass inheritance, indeed the primary key seed has to be shared accross all unioned subclasses of a hierarchy."
+#. Tag: para
+#: inheritance_mapping.xml:170
+#, no-c-format
+msgid ""
+"The limitation of this approach is that if a property is mapped on the "
+"superclass, the column name must be the same on all subclass tables. (We "
+"might relax this in a future release of Hibernate.) The identity generator "
+"strategy is not allowed in union subclass inheritance, indeed the primary "
+"key seed has to be shared accross all unioned subclasses of a hierarchy."
 msgstr ""
+"这种方式的局限在于,如果一个属性在超类中做了映射,其字段名必须与所有子类 表中"
+"定义的相同。(我们可能会在Hibernate的后续发布版本中放宽此限制。) 不允许在联合"
+"子类(union subclass)的继承层次中使用标识生成器策略(identity generator "
+"strategy), 实际上, 主键的种子(primary key seed)不得不为同一继承层次中的全部被"
+"联合子类所共用."
 
-#: index.docbook:179
-msgid "If your superclass is abstract, map it with <literal>abstract=\"true\"</literal>. Of course, if it is not abstract, an additional table (defaults to <literal>PAYMENT</literal> in the example above) is needed to hold instances of the superclass."
+#. Tag: para
+#: inheritance_mapping.xml:179
+#, no-c-format
+msgid ""
+"If your superclass is abstract, map it with <literal>abstract=\"true\"</"
+"literal>. Of course, if it is not abstract, an additional table (defaults to "
+"<literal>PAYMENT</literal> in the example above) is needed to hold instances "
+"of the superclass."
 msgstr ""
+"假若超类是抽象类,请使用<literal>abstract=\"true\"</literal>。当然,假若它不"
+"是抽象的,需要一个额外的表(上面的例子中,默认是<literal>PAYMENT</"
+"literal>),来保存超类的实例。"
 
-#: index.docbook:189
+#. Tag: title
+#: inheritance_mapping.xml:189
+#, no-c-format
 msgid "Table per concrete class, using implicit polymorphism"
-msgstr ""
+msgstr "每个具体类一张表,使用隐式多态"
 
-#: index.docbook:191
+#. Tag: para
+#: inheritance_mapping.xml:191
+#, no-c-format
 msgid "An alternative approach is to make use of implicit polymorphism:"
-msgstr ""
+msgstr "另一种可供选择的方法是采用隐式多态:"
 
-#: index.docbook:195
+#. Tag: programlisting
+#: inheritance_mapping.xml:195
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"
-      "    <id name=\"id\" type=\"long\" column=\"CREDIT_PAYMENT_ID\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <property name=\"amount\" column=\"CREDIT_AMOUNT\"/>\n"
-      "    ...\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
-      "    <id name=\"id\" type=\"long\" column=\"CASH_PAYMENT_ID\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <property name=\"amount\" column=\"CASH_AMOUNT\"/>\n"
-      "    ...\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"
-      "    <id name=\"id\" type=\"long\" column=\"CHEQUE_PAYMENT_ID\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <property name=\"amount\" column=\"CHEQUE_AMOUNT\"/>\n"
-      "    ...\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"
+"    <id name=\"id\" type=\"long\" column=\"CREDIT_PAYMENT_ID\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <property name=\"amount\" column=\"CREDIT_AMOUNT\"/>\n"
+"    ...\n"
+"</class>\n"
+"\n"
+"<class name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
+"    <id name=\"id\" type=\"long\" column=\"CASH_PAYMENT_ID\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <property name=\"amount\" column=\"CASH_AMOUNT\"/>\n"
+"    ...\n"
+"</class>\n"
+"\n"
+"<class name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"
+"    <id name=\"id\" type=\"long\" column=\"CHEQUE_PAYMENT_ID\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <property name=\"amount\" column=\"CHEQUE_AMOUNT\"/>\n"
+"    ...\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:197
-msgid "Notice that nowhere do we mention the <literal>Payment</literal> interface explicitly. Also notice that properties of <literal>Payment</literal> are mapped in each of the subclasses. If you want to avoid duplication, consider using XML entities (e.g. <literal>[ &lt;!ENTITY allproperties SYSTEM \"allproperties.xml\"&gt; ]</literal> in the <literal>DOCTYPE</literal> declartion and <literal>&amp;allproperties;</literal> in the mapping)."
+#. Tag: para
+#: inheritance_mapping.xml:197
+#, no-c-format
+msgid ""
+"Notice that nowhere do we mention the <literal>Payment</literal> interface "
+"explicitly. Also notice that properties of <literal>Payment</literal> are "
+"mapped in each of the subclasses. If you want to avoid duplication, consider "
+"using XML entities (e.g. <literal>[ &lt;!ENTITY allproperties SYSTEM "
+"\"allproperties.xml\"&gt; ]</literal> in the <literal>DOCTYPE</literal> "
+"declartion and <literal>&amp;allproperties;</literal> in the mapping)."
 msgstr ""
+"注意,我们没有在任何地方明确的提及接口<literal>Payment</literal>。同时注意 "
+"<literal>Payment</literal>的属性在每个子类中都进行了映射。如果你想避免重复, "
+"可以考虑使用XML实体(例如:位于<literal>DOCTYPE</literal>声明内的 <literal>"
+"[ &lt;!ENTITY allproperties SYSTEM \"allproperties.xml\"&gt; ]</literal> 和映"
+"射中的<literal>&amp;allproperties;</literal>)。"
 
-#: index.docbook:207
-msgid "The disadvantage of this approach is that Hibernate does not generate SQL <literal>UNION</literal>s when performing polymorphic queries."
+#. Tag: para
+#: inheritance_mapping.xml:207
+#, no-c-format
+msgid ""
+"The disadvantage of this approach is that Hibernate does not generate SQL "
+"<literal>UNION</literal>s when performing polymorphic queries."
 msgstr ""
+"这种方法的缺陷在于,在Hibernate执行多态查询时(polymorphic queries)无法生成带 "
+"<literal>UNION</literal>的SQL语句。"
 
-#: index.docbook:212
-msgid "For this mapping strategy, a polymorphic association to <literal>Payment</literal> is usually mapped using <literal>&lt;any&gt;</literal>."
+#. Tag: para
+#: inheritance_mapping.xml:212
+#, no-c-format
+msgid ""
+"For this mapping strategy, a polymorphic association to <literal>Payment</"
+"literal> is usually mapped using <literal>&lt;any&gt;</literal>."
 msgstr ""
+"对于这种映射策略而言,通常用<literal>&lt;any&gt;</literal>来实现到 "
+"<literal>Payment</literal>的多态关联映射。"
 
-#: index.docbook:217
+#. Tag: programlisting
+#: inheritance_mapping.xml:217
+#, no-c-format
 msgid ""
-      "<![CDATA[<any name=\"payment\" meta-type=\"string\" id-type=\"long\">\n"
-      "    <meta-value value=\"CREDIT\" class=\"CreditCardPayment\"/>\n"
-      "    <meta-value value=\"CASH\" class=\"CashPayment\"/>\n"
-      "    <meta-value value=\"CHEQUE\" class=\"ChequePayment\"/>\n"
-      "    <column name=\"PAYMENT_CLASS\"/>\n"
-      "    <column name=\"PAYMENT_ID\"/>\n"
-      "</any>]]>"
+"<![CDATA[<any name=\"payment\" meta-type=\"string\" id-type=\"long\">\n"
+"    <meta-value value=\"CREDIT\" class=\"CreditCardPayment\"/>\n"
+"    <meta-value value=\"CASH\" class=\"CashPayment\"/>\n"
+"    <meta-value value=\"CHEQUE\" class=\"ChequePayment\"/>\n"
+"    <column name=\"PAYMENT_CLASS\"/>\n"
+"    <column name=\"PAYMENT_ID\"/>\n"
+"</any>]]>"
 msgstr ""
 
-#: index.docbook:222
+#. Tag: title
+#: inheritance_mapping.xml:222
+#, no-c-format
 msgid "Mixing implicit polymorphism with other inheritance mappings"
-msgstr ""
+msgstr "隐式多态和其他继承映射混合使用"
 
-#: index.docbook:224
-msgid "There is one further thing to notice about this mapping. Since the subclasses are each mapped in their own <literal>&lt;class&gt;</literal> element (and since <literal>Payment</literal> is just an interface), each of the subclasses could easily be part of another inheritance hierarchy! (And you can still use polymorphic queries against the <literal>Payment</literal> interface.)"
+#. Tag: para
+#: inheritance_mapping.xml:224
+#, no-c-format
+msgid ""
+"There is one further thing to notice about this mapping. Since the "
+"subclasses are each mapped in their own <literal>&lt;class&gt;</literal> "
+"element (and since <literal>Payment</literal> is just an interface), each of "
+"the subclasses could easily be part of another inheritance hierarchy! (And "
+"you can still use polymorphic queries against the <literal>Payment</literal> "
+"interface.)"
 msgstr ""
+"对这一映射还有一点需要注意。因为每个子类都在各自独立的元素<literal>&lt;"
+"class&gt;</literal> 中映射(并且<literal>Payment</literal>只是一个接口),每个"
+"子类可以很容易的成为另一 个继承体系中的一部分!(你仍然可以对接口"
+"<literal>Payment</literal>使用多态查询。)"
 
-#: index.docbook:232
+#. Tag: programlisting
+#: inheritance_mapping.xml:232
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"
-      "    <id name=\"id\" type=\"long\" column=\"CREDIT_PAYMENT_ID\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <discriminator column=\"CREDIT_CARD\" type=\"string\"/>\n"
-      "    <property name=\"amount\" column=\"CREDIT_AMOUNT\"/>\n"
-      "    ...\n"
-      "    <subclass name=\"MasterCardPayment\" discriminator-value=\"MDC\"/>\n"
-      "    <subclass name=\"VisaPayment\" discriminator-value=\"VISA\"/>\n"
-      "</class>\n"
-      "\n"
-      "<class name=\"NonelectronicTransaction\" table=\"NONELECTRONIC_TXN\">\n"
-      "    <id name=\"id\" type=\"long\" column=\"TXN_ID\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    ...\n"
-      "    <joined-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
-      "        <key column=\"PAYMENT_ID\"/>\n"
-      "        <property name=\"amount\" column=\"CASH_AMOUNT\"/>\n"
-      "        ...\n"
-      "    </joined-subclass>\n"
-      "    <joined-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"
-      "        <key column=\"PAYMENT_ID\"/>\n"
-      "        <property name=\"amount\" column=\"CHEQUE_AMOUNT\"/>\n"
-      "        ...\n"
-      "    </joined-subclass>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"
+"    <id name=\"id\" type=\"long\" column=\"CREDIT_PAYMENT_ID\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <discriminator column=\"CREDIT_CARD\" type=\"string\"/>\n"
+"    <property name=\"amount\" column=\"CREDIT_AMOUNT\"/>\n"
+"    ...\n"
+"    <subclass name=\"MasterCardPayment\" discriminator-value=\"MDC\"/>\n"
+"    <subclass name=\"VisaPayment\" discriminator-value=\"VISA\"/>\n"
+"</class>\n"
+"\n"
+"<class name=\"NonelectronicTransaction\" table=\"NONELECTRONIC_TXN\">\n"
+"    <id name=\"id\" type=\"long\" column=\"TXN_ID\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    ...\n"
+"    <joined-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
+"        <key column=\"PAYMENT_ID\"/>\n"
+"        <property name=\"amount\" column=\"CASH_AMOUNT\"/>\n"
+"        ...\n"
+"    </joined-subclass>\n"
+"    <joined-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"
+"        <key column=\"PAYMENT_ID\"/>\n"
+"        <property name=\"amount\" column=\"CHEQUE_AMOUNT\"/>\n"
+"        ...\n"
+"    </joined-subclass>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:234
-msgid "Once again, we don't mention <literal>Payment</literal> explicitly. If we execute a query against the <literal>Payment</literal> interface - for example, <literal>from Payment</literal> - Hibernate automatically returns instances of <literal>CreditCardPayment</literal> (and its subclasses, since they also implement <literal>Payment</literal>), <literal>CashPayment</literal> and <literal>ChequePayment</literal> but not instances of <literal>NonelectronicTransaction</literal>."
+#. Tag: para
+#: inheritance_mapping.xml:234
+#, no-c-format
+msgid ""
+"Once again, we don't mention <literal>Payment</literal> explicitly. If we "
+"execute a query against the <literal>Payment</literal> interface - for "
+"example, <literal>from Payment</literal> - Hibernate automatically returns "
+"instances of <literal>CreditCardPayment</literal> (and its subclasses, since "
+"they also implement <literal>Payment</literal>), <literal>CashPayment</"
+"literal> and <literal>ChequePayment</literal> but not instances of "
+"<literal>NonelectronicTransaction</literal>."
 msgstr ""
+"我们还是没有明确的提到<literal>Payment</literal>。 如果我们针对接口"
+"<literal>Payment</literal>执行查询 ——如<literal>from Payment</literal>—— "
+"Hibernate 自动返回<literal>CreditCardPayment</literal>(和它的子类,因为 它们"
+"也实现了接口<literal>Payment</literal>)、 <literal>CashPayment</literal>和"
+"<literal>Chequepayment</literal>的实例, 但不返回"
+"<literal>NonelectronicTransaction</literal>的实例。"
 
-#: index.docbook:249
+#. Tag: title
+#: inheritance_mapping.xml:249
+#, no-c-format
 msgid "Limitations"
-msgstr ""
+msgstr "限制"
 
-#: index.docbook:251
-msgid "There are certain limitations to the \"implicit polymorphism\" approach to the table per concrete-class mapping strategy. There are somewhat less restrictive limitations to <literal>&lt;union-subclass&gt;</literal> mappings."
+#. Tag: para
+#: inheritance_mapping.xml:251
+#, no-c-format
+msgid ""
+"There are certain limitations to the \"implicit polymorphism\" approach to "
+"the table per concrete-class mapping strategy. There are somewhat less "
+"restrictive limitations to <literal>&lt;union-subclass&gt;</literal> "
+"mappings."
 msgstr ""
+"对“每个具体类映射一张表”(table per concrete-class)的映射策略而言,隐式多态"
+"的 方式有一定的限制。而<literal>&lt;union-subclass&gt;</literal>映射的限制则"
+"没有那 么严格。"
 
-#: index.docbook:258
-msgid "The following table shows the limitations of table per concrete-class mappings, and of implicit polymorphism, in Hibernate."
-msgstr ""
+#. Tag: para
+#: inheritance_mapping.xml:258
+#, no-c-format
+msgid ""
+"The following table shows the limitations of table per concrete-class "
+"mappings, and of implicit polymorphism, in Hibernate."
+msgstr "下面表格中列出了在Hibernte中“每个具体类一张表”的策略和隐式多态的限制。"
 
-#: index.docbook:264
+#. Tag: title
+#: inheritance_mapping.xml:264
+#, no-c-format
 msgid "Features of inheritance mappings"
-msgstr ""
+msgstr "继承映射特性(Features of inheritance mappings)"
 
-#: index.docbook:276
+#. Tag: entry
+#: inheritance_mapping.xml:276
+#, no-c-format
 msgid "Inheritance strategy"
-msgstr ""
+msgstr "继承策略(Inheritance strategy)"
 
-#: index.docbook:277
+#. Tag: entry
+#: inheritance_mapping.xml:277
+#, no-c-format
 msgid "Polymorphic many-to-one"
-msgstr ""
+msgstr "多态多对一"
 
-#: index.docbook:278
+#. Tag: entry
+#: inheritance_mapping.xml:278
+#, no-c-format
 msgid "Polymorphic one-to-one"
-msgstr ""
+msgstr "多态一对一"
 
-#: index.docbook:279
+#. Tag: entry
+#: inheritance_mapping.xml:279
+#, no-c-format
 msgid "Polymorphic one-to-many"
-msgstr ""
+msgstr "多态一对多"
 
-#: index.docbook:280
+#. Tag: entry
+#: inheritance_mapping.xml:280
+#, no-c-format
 msgid "Polymorphic many-to-many"
-msgstr ""
+msgstr "多态多对多"
 
-#: index.docbook:281
+#. Tag: entry
+#: inheritance_mapping.xml:281
+#, no-c-format
 msgid "Polymorphic <literal>load()/get()</literal>"
 msgstr ""
 
-#: index.docbook:282
+#. Tag: entry
+#: inheritance_mapping.xml:282
+#, no-c-format
 msgid "Polymorphic queries"
-msgstr ""
+msgstr "多态查询"
 
-#: index.docbook:283
+#. Tag: entry
+#: inheritance_mapping.xml:283
+#, no-c-format
 msgid "Polymorphic joins"
-msgstr ""
+msgstr "多态连接(join)"
 
-#: index.docbook:284
+#. Tag: entry
+#: inheritance_mapping.xml:284
+#, no-c-format
 msgid "Outer join fetching"
-msgstr ""
+msgstr "外连接(Outer join)读取"
 
-#: index.docbook:289
+#. Tag: entry
+#: inheritance_mapping.xml:289
+#, no-c-format
 msgid "table per class-hierarchy"
-msgstr ""
+msgstr "每个类分层结构一张表"
 
-#: index.docbook:290, index.docbook:301, index.docbook:312
+#. Tag: literal
+#: inheritance_mapping.xml:290 inheritance_mapping.xml:301
+#: inheritance_mapping.xml:312
+#, no-c-format
 msgid "&lt;many-to-one&gt;"
-msgstr ""
+msgstr "&lt;many-to-one&gt;"
 
-#: index.docbook:291, index.docbook:302, index.docbook:313
+#. Tag: literal
+#: inheritance_mapping.xml:291 inheritance_mapping.xml:302
+#: inheritance_mapping.xml:313
+#, no-c-format
 msgid "&lt;one-to-one&gt;"
-msgstr ""
+msgstr "&lt;one-to-one&gt;"
 
-#: index.docbook:292, index.docbook:303
+#. Tag: literal
+#: inheritance_mapping.xml:292 inheritance_mapping.xml:303
+#, no-c-format
 msgid "&lt;one-to-many&gt;"
-msgstr ""
+msgstr "&lt;one-to-many&gt;"
 
-#: index.docbook:293, index.docbook:304, index.docbook:315
+#. Tag: literal
+#: inheritance_mapping.xml:293 inheritance_mapping.xml:304
+#: inheritance_mapping.xml:315
+#, no-c-format
 msgid "&lt;many-to-many&gt;"
-msgstr ""
+msgstr "&lt;many-to-many&gt;"
 
-#: index.docbook:294, index.docbook:305, index.docbook:316
+#. Tag: literal
+#: inheritance_mapping.xml:294 inheritance_mapping.xml:305
+#: inheritance_mapping.xml:316
+#, no-c-format
 msgid "s.get(Payment.class, id)"
-msgstr ""
+msgstr "s.get(Payment.class, id)"
 
-#: index.docbook:295, index.docbook:306, index.docbook:317, index.docbook:328
+#. Tag: literal
+#: inheritance_mapping.xml:295 inheritance_mapping.xml:306
+#: inheritance_mapping.xml:317 inheritance_mapping.xml:328
+#, no-c-format
 msgid "from Payment p"
-msgstr ""
+msgstr "from Payment p"
 
-#: index.docbook:296, index.docbook:307, index.docbook:318
+#. Tag: literal
+#: inheritance_mapping.xml:296 inheritance_mapping.xml:307
+#: inheritance_mapping.xml:318
+#, no-c-format
 msgid "from Order o join o.payment p"
-msgstr ""
+msgstr "from Order o join o.payment p"
 
-#: index.docbook:297, index.docbook:308, index.docbook:319
+#. Tag: emphasis
+#: inheritance_mapping.xml:297 inheritance_mapping.xml:308
+#: inheritance_mapping.xml:319
+#, no-c-format
 msgid "supported"
-msgstr ""
+msgstr "支持"
 
-#: index.docbook:300
+#. Tag: entry
+#: inheritance_mapping.xml:300
+#, fuzzy, no-c-format
 msgid "<entry>table per subclass</entry>"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"每个子类一张表(table per subclass)\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"每个子类一张表"
 
-#: index.docbook:311
+#. Tag: entry
+#: inheritance_mapping.xml:311
+#, no-c-format
 msgid "table per concrete-class (union-subclass)"
-msgstr ""
+msgstr "每个具体类一张表(union-subclass)"
 
-#: index.docbook:314
-msgid "<literal>&lt;one-to-many&gt;</literal> (for <literal>inverse=\"true\"</literal> only)"
+#. Tag: entry
+#: inheritance_mapping.xml:314
+#, no-c-format
+msgid ""
+"<literal>&lt;one-to-many&gt;</literal> (for <literal>inverse=\"true\"</"
+"literal> only)"
 msgstr ""
 
-#: index.docbook:322
+#. Tag: entry
+#: inheritance_mapping.xml:322
+#, no-c-format
 msgid "table per concrete class (implicit polymorphism)"
-msgstr ""
+msgstr "每个具体类一张表(隐式多态)"
 
-#: index.docbook:323
+#. Tag: literal
+#: inheritance_mapping.xml:323
+#, no-c-format
 msgid "&lt;any&gt;"
-msgstr ""
+msgstr "&lt;any&gt;"
 
-#: index.docbook:324, index.docbook:325, index.docbook:329, index.docbook:330
+#. Tag: emphasis
+#: inheritance_mapping.xml:324 inheritance_mapping.xml:325
+#: inheritance_mapping.xml:329 inheritance_mapping.xml:330
+#, no-c-format
 msgid "not supported"
-msgstr ""
+msgstr "不支持"
 
-#: index.docbook:326
+#. Tag: literal
+#: inheritance_mapping.xml:326
+#, no-c-format
 msgid "&lt;many-to-any&gt;"
-msgstr ""
+msgstr "&lt;many-to-any&gt;"
 
-#: index.docbook:327
-msgid "s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"
+#. Tag: literal
+#: inheritance_mapping.xml:327
+#, no-c-format
+msgid ""
+"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"
 msgstr ""
+"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"
 
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
+#~ msgid "load()/get()"
+#~ msgstr "load()/get()"
 
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
+#~ msgid "Polymorphic <placeholder-1/>"
+#~ msgstr "多态 <placeholder-1/>"
 
+#~ msgid "inverse=\"true\""
+#~ msgstr "inverse=\"true\""
+
+#~ msgid "<placeholder-1/> (for <placeholder-2/> only)"
+#~ msgstr "<placeholder-1/> (仅对于<placeholder-2/>的情况)"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/performance.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/performance.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/performance.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,1068 +1,2430 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: performance.xml:5
+#, no-c-format
 msgid "Improving performance"
-msgstr ""
+msgstr "提升性能"
 
-#: index.docbook:8
+#. Tag: title
+#: performance.xml:8
+#, no-c-format
 msgid "Fetching strategies"
-msgstr ""
+msgstr "抓取策略(Fetching strategies)"
 
-#: index.docbook:10
-msgid "A <emphasis>fetching strategy</emphasis> is the strategy Hibernate will use for retrieving associated objects if the application needs to navigate the association. Fetch strategies may be declared in the O/R mapping metadata, or over-ridden by a particular HQL or <literal>Criteria</literal> query."
+#. Tag: para
+#: performance.xml:10
+#, no-c-format
+msgid ""
+"A <emphasis>fetching strategy</emphasis> is the strategy Hibernate will use "
+"for retrieving associated objects if the application needs to navigate the "
+"association. Fetch strategies may be declared in the O/R mapping metadata, "
+"or over-ridden by a particular HQL or <literal>Criteria</literal> query."
 msgstr ""
+"<emphasis>抓取策略(fetching strategy)</emphasis> 是指:当应用程序需要在"
+"(Hibernate实体对象图的)关联关系间进行导航的时候, Hibernate如何获取关联对象"
+"的策略。抓取策略可以在O/R映射的元数据中声明,也可以在特定的HQL 或<literal>条"
+"件查询(Criteria Query)</literal>中重载声明。"
 
-#: index.docbook:17
+#. Tag: para
+#: performance.xml:17
+#, no-c-format
 msgid "Hibernate3 defines the following fetching strategies:"
-msgstr ""
+msgstr "Hibernate3 定义了如下几种抓取策略:"
 
-#: index.docbook:23
-msgid "<emphasis>Join fetching</emphasis> - Hibernate retrieves the associated instance or collection in the same <literal>SELECT</literal>, using an <literal>OUTER JOIN</literal>."
+#. Tag: para
+#: performance.xml:23
+#, no-c-format
+msgid ""
+"<emphasis>Join fetching</emphasis> - Hibernate retrieves the associated "
+"instance or collection in the same <literal>SELECT</literal>, using an "
+"<literal>OUTER JOIN</literal>."
 msgstr ""
+"<emphasis>连接抓取(Join fetching)</emphasis> - Hibernate通过 在"
+"<literal>SELECT</literal>语句使用<literal>OUTER JOIN</literal>(外连接)来 获"
+"得对象的关联实例或者关联集合。"
 
-#: index.docbook:30
-msgid "<emphasis>Select fetching</emphasis> - a second <literal>SELECT</literal> is used to retrieve the associated entity or collection. Unless you explicitly disable lazy fetching by specifying <literal>lazy=\"false\"</literal>, this second select will only be executed when you actually access the association."
+#. Tag: para
+#: performance.xml:30
+#, no-c-format
+msgid ""
+"<emphasis>Select fetching</emphasis> - a second <literal>SELECT</literal> is "
+"used to retrieve the associated entity or collection. Unless you explicitly "
+"disable lazy fetching by specifying <literal>lazy=\"false\"</literal>, this "
+"second select will only be executed when you actually access the association."
 msgstr ""
+"<emphasis>查询抓取(Select fetching)</emphasis> - 另外发送一条 "
+"<literal>SELECT</literal> 语句抓取当前对象的关联实体或集合。除非你显式的指定"
+"<literal>lazy=\"false\"</literal>禁止 延迟抓取(lazy fetching),否则只有当你"
+"真正访问关联关系的时候,才会执行第二条select语句。"
 
-#: index.docbook:39
-msgid "<emphasis>Subselect fetching</emphasis> - a second <literal>SELECT</literal> is used to retrieve the associated collections for all entities retrieved in a previous query or fetch. Unless you explicitly disable lazy fetching by specifying <literal>lazy=\"false\"</literal>, this second select will only be executed when you actually access the association."
+#. Tag: para
+#: performance.xml:39
+#, no-c-format
+msgid ""
+"<emphasis>Subselect fetching</emphasis> - a second <literal>SELECT</literal> "
+"is used to retrieve the associated collections for all entities retrieved in "
+"a previous query or fetch. Unless you explicitly disable lazy fetching by "
+"specifying <literal>lazy=\"false\"</literal>, this second select will only "
+"be executed when you actually access the association."
 msgstr ""
+"<emphasis>子查询抓取(Subselect fetching)</emphasis> - 另外发送一条"
+"<literal>SELECT</literal> 语句抓取在前面查询到(或者抓取到)的所有实体对象的"
+"关联集合。除非你显式的指定<literal>lazy=\"false\"</literal> 禁止延迟抓取"
+"(lazy fetching),否则只有当你真正访问关联关系的时候,才会执行第二条select语"
+"句。"
 
-#: index.docbook:48
-msgid "<emphasis>Batch fetching</emphasis> - an optimization strategy for select fetching - Hibernate retrieves a batch of entity instances or collections in a single <literal>SELECT</literal>, by specifying a list of primary keys or foreign keys."
+#. Tag: para
+#: performance.xml:48
+#, no-c-format
+msgid ""
+"<emphasis>Batch fetching</emphasis> - an optimization strategy for select "
+"fetching - Hibernate retrieves a batch of entity instances or collections in "
+"a single <literal>SELECT</literal>, by specifying a list of primary keys or "
+"foreign keys."
 msgstr ""
+"<emphasis>批量抓取(Batch fetching)</emphasis> - 对查询抓取的优化方案, 通过"
+"指定一个主键或外键列表,Hibernate使用单条<literal>SELECT</literal>语句获取一"
+"批对象实例或集合。"
 
-#: index.docbook:57
+#. Tag: para
+#: performance.xml:57
+#, no-c-format
 msgid "Hibernate also distinguishes between:"
-msgstr ""
+msgstr "Hibernate会区分下列各种情况:"
 
-#: index.docbook:63
-msgid "<emphasis>Immediate fetching</emphasis> - an association, collection or attribute is fetched immediately, when the owner is loaded."
+#. Tag: para
+#: performance.xml:63
+#, no-c-format
+msgid ""
+"<emphasis>Immediate fetching</emphasis> - an association, collection or "
+"attribute is fetched immediately, when the owner is loaded."
 msgstr ""
+"<emphasis>Immediate fetching,立即抓取</emphasis> - 当宿主被加载时,关联、集"
+"合或属性被立即抓取。"
 
-#: index.docbook:69
-msgid "<emphasis>Lazy collection fetching</emphasis> - a collection is fetched when the application invokes an operation upon that collection. (This is the default for collections.)"
+#. Tag: para
+#: performance.xml:69
+#, no-c-format
+msgid ""
+"<emphasis>Lazy collection fetching</emphasis> - a collection is fetched when "
+"the application invokes an operation upon that collection. (This is the "
+"default for collections.)"
 msgstr ""
+"<emphasis>Lazy collection fetching,延迟集合抓取</emphasis>- 直到应用程序对集"
+"合进行了一次操作时,集合才被抓取。(对集合而言这是默认行为。)"
 
-#: index.docbook:76
-msgid "<emphasis>\"Extra-lazy\" collection fetching</emphasis> - individual elements of the collection are accessed from the database as needed. Hibernate tries not to fetch the whole collection into memory unless absolutely needed (suitable for very large collections)"
+#. Tag: para
+#: performance.xml:76
+#, no-c-format
+msgid ""
+"<emphasis>\"Extra-lazy\" collection fetching</emphasis> - individual "
+"elements of the collection are accessed from the database as needed. "
+"Hibernate tries not to fetch the whole collection into memory unless "
+"absolutely needed (suitable for very large collections)"
 msgstr ""
+"<emphasis>\"Extra-lazy\" collection fetching,\"Extra-lazy\"集合抓取</"
+"emphasis> -对集合类中的每个元素而言,都是直到需要时才去访问数据库。除非绝对必"
+"要,Hibernate不会试图去把整个集合都抓取到内存里来(适用于非常大的集合)。"
 
-#: index.docbook:84
-msgid "<emphasis>Proxy fetching</emphasis> - a single-valued association is fetched when a method other than the identifier getter is invoked upon the associated object."
+#. Tag: para
+#: performance.xml:84
+#, no-c-format
+msgid ""
+"<emphasis>Proxy fetching</emphasis> - a single-valued association is fetched "
+"when a method other than the identifier getter is invoked upon the "
+"associated object."
 msgstr ""
+"<emphasis>Proxy fetching,代理抓取</emphasis> - 对返回单值的关联而言,当其某"
+"个方法被调用,而非对其关键字进行get操作时才抓取。"
 
-#: index.docbook:91
-msgid "<emphasis>\"No-proxy\" fetching</emphasis> - a single-valued association is fetched when the instance variable is accessed. Compared to proxy fetching, this approach is less lazy (the association is fetched even when only the identifier is accessed) but more transparent, since no proxy is visible to the application. This approach requires buildtime bytecode instrumentation and is rarely necessary."
+#. Tag: para
+#: performance.xml:91
+#, no-c-format
+msgid ""
+"<emphasis>\"No-proxy\" fetching</emphasis> - a single-valued association is "
+"fetched when the instance variable is accessed. Compared to proxy fetching, "
+"this approach is less lazy (the association is fetched even when only the "
+"identifier is accessed) but more transparent, since no proxy is visible to "
+"the application. This approach requires buildtime bytecode instrumentation "
+"and is rarely necessary."
 msgstr ""
+"<emphasis>\"No-proxy\" fetching,非代理抓取</emphasis> - 对返回单值的关联而"
+"言,当实例变量被访问的时候进行抓取。与上面的代理抓取相比,这种方法没有那么“延"
+"迟”得厉害(就算只访问标识符,也会导致关联抓取)但是更加透明,因为对应用程序来"
+"说,不再看到proxy。这种方法需要在编译期间进行字节码增强操作,因此很少需要用"
+"到。"
 
-#: index.docbook:101
-msgid "<emphasis>Lazy attribute fetching</emphasis> - an attribute or single valued association is fetched when the instance variable is accessed. This approach requires buildtime bytecode instrumentation and is rarely necessary."
+#. Tag: para
+#: performance.xml:101
+#, no-c-format
+msgid ""
+"<emphasis>Lazy attribute fetching</emphasis> - an attribute or single valued "
+"association is fetched when the instance variable is accessed. This approach "
+"requires buildtime bytecode instrumentation and is rarely necessary."
 msgstr ""
+"<emphasis>Lazy attribute fetching,属性延迟加载</emphasis> - 对属性或返回单值"
+"的关联而言,当其实例变量被访问的时候进行抓取。需要编译期字节码强化,因此这一"
+"方法很少是必要的。"
 
-#: index.docbook:110
-msgid "We have two orthogonal notions here: <emphasis>when</emphasis> is the association fetched, and <emphasis>how</emphasis> is it fetched (what SQL is used). Don't confuse them! We use <literal>fetch</literal> to tune performance. We may use <literal>lazy</literal> to define a contract for what data is always available in any detached instance of a particular class."
+#. Tag: para
+#: performance.xml:110
+#, no-c-format
+msgid ""
+"We have two orthogonal notions here: <emphasis>when</emphasis> is the "
+"association fetched, and <emphasis>how</emphasis> is it fetched (what SQL is "
+"used). Don't confuse them! We use <literal>fetch</literal> to tune "
+"performance. We may use <literal>lazy</literal> to define a contract for "
+"what data is always available in any detached instance of a particular class."
 msgstr ""
+"这里有两个正交的概念:关联<emphasis>何时</emphasis>被抓取,以及被<emphasis>如"
+"何</emphasis>抓取(会采用什么样的SQL语句)。不要混淆它们!我们使用<literal>抓"
+"取</literal>来改善性能。我们使用<literal>延迟</literal>来定义一些契约,对某特"
+"定类的某个脱管的实例,知道有哪些数据是可以使用的。"
 
-#: index.docbook:119
+#. Tag: title
+#: performance.xml:119
+#, no-c-format
 msgid "Working with lazy associations"
-msgstr ""
+msgstr "操作延迟加载的关联"
 
-#: index.docbook:121
-msgid "By default, Hibernate3 uses lazy select fetching for collections and lazy proxy fetching for single-valued associations. These defaults make sense for almost all associations in almost all applications."
+#. Tag: para
+#: performance.xml:121
+#, no-c-format
+msgid ""
+"By default, Hibernate3 uses lazy select fetching for collections and lazy "
+"proxy fetching for single-valued associations. These defaults make sense for "
+"almost all associations in almost all applications."
 msgstr ""
+"默认情况下,Hibernate 3对集合使用延迟select抓取,对返回单值的关联使用延迟代理"
+"抓取。对几乎是所有的应用而言,其绝大多数的关联,这种策略都是有效的。"
 
-#: index.docbook:127
-msgid "<emphasis>Note:</emphasis> if you set <literal>hibernate.default_batch_fetch_size</literal>, Hibernate will use the batch fetch optimization for lazy fetching (this optimization may also be enabled at a more granular level)."
+#. Tag: para
+#: performance.xml:127
+#, no-c-format
+msgid ""
+"<emphasis>Note:</emphasis> if you set <literal>hibernate."
+"default_batch_fetch_size</literal>, Hibernate will use the batch fetch "
+"optimization for lazy fetching (this optimization may also be enabled at a "
+"more granular level)."
 msgstr ""
+"<emphasis>注意:</emphasis>假若你设置了<literal>hibernate."
+"default_batch_fetch_size</literal>,Hibernate会对延迟加载采取批量抓取优化措施"
+"(这种优化也可能会在更细化的级别打开)。"
 
-#: index.docbook:134
-msgid "However, lazy fetching poses one problem that you must be aware of. Access to a lazy association outside of the context of an open Hibernate session will result in an exception. For example:"
+#. Tag: para
+#: performance.xml:134
+#, no-c-format
+msgid ""
+"However, lazy fetching poses one problem that you must be aware of. Access "
+"to a lazy association outside of the context of an open Hibernate session "
+"will result in an exception. For example:"
 msgstr ""
+"然而,你必须了解延迟抓取带来的一个问题。在一个打开的Hibernate session上下文之"
+"外调用延迟集合会导致一次意外。比如:"
 
-#: index.docbook:140
+#. Tag: programlisting
+#: performance.xml:140
+#, no-c-format
 msgid ""
-      "<![CDATA[s = sessions.openSession();\n"
-      "Transaction tx = s.beginTransaction();\n"
-      "            \n"
-      "User u = (User) s.createQuery(\"from User u where u.name=:userName\")\n"
-      "    .setString(\"userName\", userName).uniqueResult();\n"
-      "Map permissions = u.getPermissions();\n"
-      "\n"
-      "tx.commit();\n"
-      "s.close();\n"
-      "\n"
-      "Integer accessLevel = (Integer) permissions.get(\"accounts\");  // Error!]]>"
+"<![CDATA[s = sessions.openSession();\n"
+"Transaction tx = s.beginTransaction();\n"
+"            \n"
+"User u = (User) s.createQuery(\"from User u where u.name=:userName\")\n"
+"    .setString(\"userName\", userName).uniqueResult();\n"
+"Map permissions = u.getPermissions();\n"
+"\n"
+"tx.commit();\n"
+"s.close();\n"
+"\n"
+"Integer accessLevel = (Integer) permissions.get(\"accounts\");  // Error!]]>"
 msgstr ""
 
-#: index.docbook:142
-msgid "Since the permissions collection was not initialized when the <literal>Session</literal> was closed, the collection will not be able to load its state. <emphasis>Hibernate does not support lazy initialization for detached objects</emphasis>. The fix is to move the code that reads from the collection to just before the transaction is committed."
+#. Tag: para
+#: performance.xml:142
+#, no-c-format
+msgid ""
+"Since the permissions collection was not initialized when the "
+"<literal>Session</literal> was closed, the collection will not be able to "
+"load its state. <emphasis>Hibernate does not support lazy initialization for "
+"detached objects</emphasis>. The fix is to move the code that reads from the "
+"collection to just before the transaction is committed."
 msgstr ""
+"在<literal>Session</literal>关闭后,permessions集合将是未实例化的、不再可用,"
+"因此无法正常载入其状态。 <emphasis>Hibernate对脱管对象不支持延迟实例化</"
+"emphasis>. 这里的修改方法是:将permissions读取数据的代码 移到tx.commit()之"
+"前。"
 
-#: index.docbook:150
-msgid "Alternatively, we could use a non-lazy collection or association, by specifying <literal>lazy=\"false\"</literal> for the association mapping. However, it is intended that lazy initialization be used for almost all collections and associations. If you define too many non-lazy associations in your object model, Hibernate will end up needing to fetch the entire database into memory in every transaction!"
+#. Tag: para
+#: performance.xml:150
+#, no-c-format
+msgid ""
+"Alternatively, we could use a non-lazy collection or association, by "
+"specifying <literal>lazy=\"false\"</literal> for the association mapping. "
+"However, it is intended that lazy initialization be used for almost all "
+"collections and associations. If you define too many non-lazy associations "
+"in your object model, Hibernate will end up needing to fetch the entire "
+"database into memory in every transaction!"
 msgstr ""
+"除此之外,通过对关联映射指定<literal>lazy=\"false\"</literal>,我们也可以使用"
+"非延迟的集合或关联。但是, 对绝大部分集合来说,更推荐使用延迟方式抓取数据。如"
+"果在你的对象模型中定义了太多的非延迟关联,Hibernate最终几乎需要在每个事务中载"
+"入整个数据库到内存中!"
 
-#: index.docbook:159
-msgid "On the other hand, we often want to choose join fetching (which is non-lazy by nature) instead of select fetching in a particular transaction. We'll now see how to customize the fetching strategy. In Hibernate3, the mechanisms for choosing a fetch strategy are identical for single-valued associations and collections."
+#. Tag: para
+#: performance.xml:159
+#, no-c-format
+msgid ""
+"On the other hand, we often want to choose join fetching (which is non-lazy "
+"by nature) instead of select fetching in a particular transaction. We'll now "
+"see how to customize the fetching strategy. In Hibernate3, the mechanisms "
+"for choosing a fetch strategy are identical for single-valued associations "
+"and collections."
 msgstr ""
+"但是,另一方面,在一些特殊的事务中,我们也经常需要使用到连接抓取(它本身上就"
+"是非延迟的),以代替查询抓取。 下面我们将会很快明白如何具体的定制Hibernate中"
+"的抓取策略。在Hibernate3中,具体选择哪种抓取策略的机制是和选择 单值关联或集合"
+"关联相一致的。"
 
-#: index.docbook:170
+#. Tag: title
+#: performance.xml:170
+#, no-c-format
 msgid "Tuning fetch strategies"
-msgstr ""
+msgstr "调整抓取策略(Tuning fetch strategies)"
 
-#: index.docbook:172
-msgid "Select fetching (the default) is extremely vulnerable to N+1 selects problems, so we might want to enable join fetching in the mapping document:"
+#. Tag: para
+#: performance.xml:172
+#, no-c-format
+msgid ""
+"Select fetching (the default) is extremely vulnerable to N+1 selects "
+"problems, so we might want to enable join fetching in the mapping document:"
 msgstr ""
+"查询抓取(默认的)在N+1查询的情况下是极其脆弱的,因此我们可能会要求在映射文档"
+"中定义使用连接抓取:"
 
-#: index.docbook:177
+#. Tag: programlisting
+#: performance.xml:177
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"permissions\" \n"
-      "            fetch=\"join\">\n"
-      "    <key column=\"userId\"/>\n"
-      "    <one-to-many class=\"Permission\"/>\n"
-      "</set]]>"
+"<![CDATA[<set name=\"permissions\" \n"
+"            fetch=\"join\">\n"
+"    <key column=\"userId\"/>\n"
+"    <one-to-many class=\"Permission\"/>\n"
+"</set]]>"
 msgstr ""
 
-#: index.docbook:179
+#. Tag: programlisting
+#: performance.xml:179
+#, no-c-format
 msgid "<![CDATA[<many-to-one name=\"mother\" class=\"Cat\" fetch=\"join\"/>]]>"
 msgstr ""
 
-#: index.docbook:181
-msgid "The <literal>fetch</literal> strategy defined in the mapping document affects:"
+#. Tag: para
+#: performance.xml:181
+#, no-c-format
+msgid ""
+"The <literal>fetch</literal> strategy defined in the mapping document "
+"affects:"
 msgstr ""
+"在映射文档中定义的<literal>抓取</literal>策略将会对以下列表条目产生影响:"
 
-#: index.docbook:187
+#. Tag: para
+#: performance.xml:187
+#, no-c-format
 msgid "retrieval via <literal>get()</literal> or <literal>load()</literal>"
-msgstr ""
+msgstr "通过<literal>get()</literal>或<literal>load()</literal>方法取得数据。"
 
-#: index.docbook:192
+#. Tag: para
+#: performance.xml:192
+#, no-c-format
 msgid "retrieval that happens implicitly when an association is navigated"
-msgstr ""
+msgstr "只有在关联之间进行导航时,才会隐式的取得数据。"
 
-#: index.docbook:197
+#. Tag: para
+#: performance.xml:197
+#, no-c-format
 msgid "<literal>Criteria</literal> queries"
-msgstr ""
+msgstr "条件查询"
 
-#: index.docbook:202
+#. Tag: para
+#: performance.xml:202
+#, no-c-format
 msgid "HQL queries if <literal>subselect</literal> fetching is used"
-msgstr ""
+msgstr "使用了<literal>subselect</literal>抓取的HQL查询"
 
-#: index.docbook:208
-msgid "No matter what fetching strategy you use, the defined non-lazy graph is guaranteed to be loaded into memory. Note that this might result in several immediate selects being used to execute a particular HQL query."
+#. Tag: para
+#: performance.xml:208
+#, no-c-format
+msgid ""
+"No matter what fetching strategy you use, the defined non-lazy graph is "
+"guaranteed to be loaded into memory. Note that this might result in several "
+"immediate selects being used to execute a particular HQL query."
 msgstr ""
+"不管你使用哪种抓取策略,定义为非延迟的类图会被保证一定装载入内存。注意这可能"
+"意味着在一条HQL查询后紧跟着一系列的查询。"
 
-#: index.docbook:214
-msgid "Usually, we don't use the mapping document to customize fetching. Instead, we keep the default behavior, and override it for a particular transaction, using <literal>left join fetch</literal> in HQL. This tells Hibernate to fetch the association eagerly in the first select, using an outer join. In the <literal>Criteria</literal> query API, you would use <literal>setFetchMode(FetchMode.JOIN)</literal>."
+#. Tag: para
+#: performance.xml:214
+#, no-c-format
+msgid ""
+"Usually, we don't use the mapping document to customize fetching. Instead, "
+"we keep the default behavior, and override it for a particular transaction, "
+"using <literal>left join fetch</literal> in HQL. This tells Hibernate to "
+"fetch the association eagerly in the first select, using an outer join. In "
+"the <literal>Criteria</literal> query API, you would use "
+"<literal>setFetchMode(FetchMode.JOIN)</literal>."
 msgstr ""
+"通常情况下,我们并不使用映射文档进行抓取策略的定制。更多的是,保持其默认值,"
+"然后在特定的事务中, 使用HQL的<literal>左连接抓取(left join fetch)</"
+"literal> 对其进行重载。这将通知 Hibernate在第一次查询中使用外部关联(outer "
+"join),直接得到其关联数据。 在<literal>条件查询</literal> API中,应该调用 "
+"<literal>setFetchMode(FetchMode.JOIN)</literal>语句。"
 
-#: index.docbook:223
-msgid "If you ever feel like you wish you could change the fetching strategy used by <literal>get()</literal> or <literal>load()</literal>, simply use a <literal>Criteria</literal> query, for example:"
+#. Tag: para
+#: performance.xml:223
+#, no-c-format
+msgid ""
+"If you ever feel like you wish you could change the fetching strategy used "
+"by <literal>get()</literal> or <literal>load()</literal>, simply use a "
+"<literal>Criteria</literal> query, for example:"
 msgstr ""
+"也许你喜欢仅仅通过条件查询,就可以改变<literal>get()</literal> 或 "
+"<literal>load()</literal>语句中的数据抓取策略。例如:"
 
-#: index.docbook:229
+#. Tag: programlisting
+#: performance.xml:229
+#, no-c-format
 msgid ""
-      "<![CDATA[User user = (User) session.createCriteria(User.class)\n"
-      "                .setFetchMode(\"permissions\", FetchMode.JOIN)\n"
-      "                .add( Restrictions.idEq(userId) )\n"
-      "                .uniqueResult();]]>"
+"<![CDATA[User user = (User) session.createCriteria(User.class)\n"
+"                .setFetchMode(\"permissions\", FetchMode.JOIN)\n"
+"                .add( Restrictions.idEq(userId) )\n"
+"                .uniqueResult();]]>"
 msgstr ""
 
-#: index.docbook:231
-msgid "(This is Hibernate's equivalent of what some ORM solutions call a \"fetch plan\".)"
+#. Tag: para
+#: performance.xml:231
+#, no-c-format
+msgid ""
+"(This is Hibernate's equivalent of what some ORM solutions call a \"fetch "
+"plan\".)"
 msgstr ""
+"(这就是其他ORM解决方案的“抓取计划(fetch plan)”在Hibernate中的等价物。)"
 
-#: index.docbook:235
-msgid "A completely different way to avoid problems with N+1 selects is to use the second-level cache."
-msgstr ""
+#. Tag: para
+#: performance.xml:235
+#, no-c-format
+msgid ""
+"A completely different way to avoid problems with N+1 selects is to use the "
+"second-level cache."
+msgstr "截然不同的一种避免N+1次查询的方法是,使用二级缓存。"
 
-#: index.docbook:243
+#. Tag: title
+#: performance.xml:243
+#, no-c-format
 msgid "Single-ended association proxies"
-msgstr ""
+msgstr "单端关联代理(Single-ended association proxies)"
 
-#: index.docbook:245
-msgid "Lazy fetching for collections is implemented using Hibernate's own implementation of persistent collections. However, a different mechanism is needed for lazy behavior in single-ended associations. The target entity of the association must be proxied. Hibernate implements lazy initializing proxies for persistent objects using runtime bytecode enhancement (via the excellent CGLIB library)."
+#. Tag: para
+#: performance.xml:245
+#, no-c-format
+msgid ""
+"Lazy fetching for collections is implemented using Hibernate's own "
+"implementation of persistent collections. However, a different mechanism is "
+"needed for lazy behavior in single-ended associations. The target entity of "
+"the association must be proxied. Hibernate implements lazy initializing "
+"proxies for persistent objects using runtime bytecode enhancement (via the "
+"excellent CGLIB library)."
 msgstr ""
+"在Hinerbate中,对集合的延迟抓取的采用了自己的实现方法。但是,对于单端关联的延"
+"迟抓取,则需要采用 其他不同的机制。单端关联的目标实体必须使用代理,Hihernate"
+"在运行期二进制级(通过优异的CGLIB库), 为持久对象实现了延迟载入代理。"
 
-#: index.docbook:253
-msgid "By default, Hibernate3 generates proxies (at startup) for all persistent classes and uses them to enable lazy fetching of <literal>many-to-one</literal> and <literal>one-to-one</literal> associations."
+#. Tag: para
+#: performance.xml:253
+#, no-c-format
+msgid ""
+"By default, Hibernate3 generates proxies (at startup) for all persistent "
+"classes and uses them to enable lazy fetching of <literal>many-to-one</"
+"literal> and <literal>one-to-one</literal> associations."
 msgstr ""
+"默认的,Hibernate3将会为所有的持久对象产生代理(在启动阶段),然后使用他们实"
+"现 <literal>多对一(many-to-one)</literal>关联和<literal>一对一(one-to-"
+"one)</literal> 关联的延迟抓取。"
 
-#: index.docbook:259
-msgid "The mapping file may declare an interface to use as the proxy interface for that class, with the <literal>proxy</literal> attribute. By default, Hibernate uses a subclass of the class. <emphasis>Note that the proxied class must implement a default constructor with at least package visibility. We recommend this constructor for all persistent classes!</emphasis>"
+#. Tag: para
+#: performance.xml:259
+#, no-c-format
+msgid ""
+"The mapping file may declare an interface to use as the proxy interface for "
+"that class, with the <literal>proxy</literal> attribute. By default, "
+"Hibernate uses a subclass of the class. <emphasis>Note that the proxied "
+"class must implement a default constructor with at least package visibility. "
+"We recommend this constructor for all persistent classes!</emphasis>"
 msgstr ""
+"在映射文件中,可以通过设置<literal>proxy</literal>属性为目标class声明一个接口"
+"供代理接口使用。 默认的,Hibernate将会使用该类的一个子类。 <emphasis>注意:被"
+"代理的类必须实现一个至少包可见的默认构造函数,我们建议所有的持久类都应拥有这"
+"样的构造函数</emphasis>"
 
-#: index.docbook:266
-msgid "There are some gotchas to be aware of when extending this approach to polymorphic classes, eg."
-msgstr ""
+#. Tag: para
+#: performance.xml:266
+#, no-c-format
+msgid ""
+"There are some gotchas to be aware of when extending this approach to "
+"polymorphic classes, eg."
+msgstr "在如此方式定义一个多态类的时候,有许多值得注意的常见性的问题,例如:"
 
-#: index.docbook:271
+#. Tag: programlisting
+#: performance.xml:271
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Cat\" proxy=\"Cat\">\n"
-      "    ......\n"
-      "    <subclass name=\"DomesticCat\">\n"
-      "        .....\n"
-      "    </subclass>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Cat\" proxy=\"Cat\">\n"
+"    ......\n"
+"    <subclass name=\"DomesticCat\">\n"
+"        .....\n"
+"    </subclass>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:273
-msgid "Firstly, instances of <literal>Cat</literal> will never be castable to <literal>DomesticCat</literal>, even if the underlying instance is an instance of <literal>DomesticCat</literal>:"
+#. Tag: para
+#: performance.xml:273
+#, no-c-format
+msgid ""
+"Firstly, instances of <literal>Cat</literal> will never be castable to "
+"<literal>DomesticCat</literal>, even if the underlying instance is an "
+"instance of <literal>DomesticCat</literal>:"
 msgstr ""
+"首先,<literal>Cat</literal>实例永远不可以被强制转换为<literal>DomesticCat</"
+"literal>, 即使它本身就是<literal>DomesticCat</literal>实例。"
 
-#: index.docbook:279
+#. Tag: programlisting
+#: performance.xml:279
+#, no-c-format
 msgid ""
-      "<![CDATA[Cat cat = (Cat) session.load(Cat.class, id);  // instantiate a proxy (does not hit the db)\n"
-      "if ( cat.isDomesticCat() ) {                  // hit the db to initialize the proxy\n"
-      "    DomesticCat dc = (DomesticCat) cat;       // Error!\n"
-      "    ....\n"
-      "}]]>"
+"<![CDATA[Cat cat = (Cat) session.load(Cat.class, id);  // instantiate a "
+"proxy (does not hit the db)\n"
+"if ( cat.isDomesticCat() ) {                  // hit the db to initialize "
+"the proxy\n"
+"    DomesticCat dc = (DomesticCat) cat;       // Error!\n"
+"    ....\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:281
+#. Tag: para
+#: performance.xml:281
+#, no-c-format
 msgid "Secondly, it is possible to break proxy <literal>==</literal>."
-msgstr ""
+msgstr "其次,代理的“<literal>==</literal>”可能不再成立。"
 
-#: index.docbook:285
+#. Tag: programlisting
+#: performance.xml:285
+#, no-c-format
 msgid ""
-      "<![CDATA[Cat cat = (Cat) session.load(Cat.class, id);            // instantiate a Cat proxy\n"
-      "DomesticCat dc = \n"
-      "        (DomesticCat) session.load(DomesticCat.class, id);  // acquire new DomesticCat proxy!\n"
-      "System.out.println(cat==dc);                            // false]]>"
+"<![CDATA[Cat cat = (Cat) session.load(Cat.class, id);            // "
+"instantiate a Cat proxy\n"
+"DomesticCat dc = \n"
+"        (DomesticCat) session.load(DomesticCat.class, id);  // acquire new "
+"DomesticCat proxy!\n"
+"System.out.println(cat==dc);                            // false]]>"
 msgstr ""
 
-#: index.docbook:287
-msgid "However, the situation is not quite as bad as it looks. Even though we now have two references to different proxy objects, the underlying instance will still be the same object:"
+#. Tag: para
+#: performance.xml:287
+#, no-c-format
+msgid ""
+"However, the situation is not quite as bad as it looks. Even though we now "
+"have two references to different proxy objects, the underlying instance will "
+"still be the same object:"
 msgstr ""
+"虽然如此,但实际情况并没有看上去那么糟糕。虽然我们现在有两个不同的引用,分别"
+"指向这两个不同的代理对象, 但实际上,其底层应该是同一个实例对象:"
 
-#: index.docbook:292
+#. Tag: programlisting
+#: performance.xml:292
+#, no-c-format
 msgid ""
-      "<![CDATA[cat.setWeight(11.0);  // hit the db to initialize the proxy\n"
-      "System.out.println( dc.getWeight() );  // 11.0]]>"
+"<![CDATA[cat.setWeight(11.0);  // hit the db to initialize the proxy\n"
+"System.out.println( dc.getWeight() );  // 11.0]]>"
 msgstr ""
 
-#: index.docbook:294
-msgid "Third, you may not use a CGLIB proxy for a <literal>final</literal> class or a class with any <literal>final</literal> methods."
-msgstr ""
+#. Tag: para
+#: performance.xml:294
+#, no-c-format
+msgid ""
+"Third, you may not use a CGLIB proxy for a <literal>final</literal> class or "
+"a class with any <literal>final</literal> methods."
+msgstr "第三,你不能对“final类”或“具有final方法的类”使用CGLIB代理。"
 
-#: index.docbook:299
-msgid "Finally, if your persistent object acquires any resources upon instantiation (eg. in initializers or default constructor), then those resources will also be acquired by the proxy. The proxy class is an actual subclass of the persistent class."
+#. Tag: para
+#: performance.xml:299
+#, no-c-format
+msgid ""
+"Finally, if your persistent object acquires any resources upon instantiation "
+"(eg. in initializers or default constructor), then those resources will also "
+"be acquired by the proxy. The proxy class is an actual subclass of the "
+"persistent class."
 msgstr ""
+"最后,如果你的持久化对象在实例化时需要某些资源(例如,在实例化方法、默认构造"
+"方法中), 那么代理对象也同样需要使用这些资源。实际上,代理类是持久化类的子"
+"类。"
 
-#: index.docbook:305
-msgid "These problems are all due to fundamental limitations in Java's single inheritance model. If you wish to avoid these problems your persistent classes must each implement an interface that declares its business methods. You should specify these interfaces in the mapping file. eg."
+#. Tag: para
+#: performance.xml:305
+#, no-c-format
+msgid ""
+"These problems are all due to fundamental limitations in Java's single "
+"inheritance model. If you wish to avoid these problems your persistent "
+"classes must each implement an interface that declares its business methods. "
+"You should specify these interfaces in the mapping file. eg."
 msgstr ""
+"这些问题都源于Java的单根继承模型的天生限制。如果你希望避免这些问题,那么你的"
+"每个持久化类必须实现一个接口, 在此接口中已经声明了其业务方法。然后,你需要在"
+"映射文档中再指定这些接口。例如:"
 
-#: index.docbook:311
+#. Tag: programlisting
+#: performance.xml:311
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"CatImpl\" proxy=\"Cat\">\n"
-      "    ......\n"
-      "    <subclass name=\"DomesticCatImpl\" proxy=\"DomesticCat\">\n"
-      "        .....\n"
-      "    </subclass>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"CatImpl\" proxy=\"Cat\">\n"
+"    ......\n"
+"    <subclass name=\"DomesticCatImpl\" proxy=\"DomesticCat\">\n"
+"        .....\n"
+"    </subclass>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:313
-msgid "where <literal>CatImpl</literal> implements the interface <literal>Cat</literal> and <literal>DomesticCatImpl</literal> implements the interface <literal>DomesticCat</literal>. Then proxies for instances of <literal>Cat</literal> and <literal>DomesticCat</literal> may be returned by <literal>load()</literal> or <literal>iterate()</literal>. (Note that <literal>list()</literal> does not usually return proxies.)"
+#. Tag: para
+#: performance.xml:313
+#, no-c-format
+msgid ""
+"where <literal>CatImpl</literal> implements the interface <literal>Cat</"
+"literal> and <literal>DomesticCatImpl</literal> implements the interface "
+"<literal>DomesticCat</literal>. Then proxies for instances of <literal>Cat</"
+"literal> and <literal>DomesticCat</literal> may be returned by <literal>load"
+"()</literal> or <literal>iterate()</literal>. (Note that <literal>list()</"
+"literal> does not usually return proxies.)"
 msgstr ""
+"这里<literal>CatImpl</literal>实现了<literal>Cat</literal>接口, "
+"<literal>DomesticCatImpl</literal>实现<literal>DomesticCat</literal>接口。 在"
+"<literal>load()</literal>、<literal>iterate()</literal>方法中就会返回 "
+"<literal>Cat</literal>和<literal>DomesticCat</literal>的代理对象。 (注意"
+"<literal>list()</literal>并不会返回代理对象。)"
 
-#: index.docbook:321
+#. Tag: programlisting
+#: performance.xml:321
+#, no-c-format
 msgid ""
-      "<![CDATA[Cat cat = (Cat) session.load(CatImpl.class, catid);\n"
-      "Iterator iter = session.createQuery(\"from CatImpl as cat where cat.name='fritz'\").iterate();\n"
-      "Cat fritz = (Cat) iter.next();]]>"
+"<![CDATA[Cat cat = (Cat) session.load(CatImpl.class, catid);\n"
+"Iterator iter = session.createQuery(\"from CatImpl as cat where cat."
+"name='fritz'\").iterate();\n"
+"Cat fritz = (Cat) iter.next();]]>"
 msgstr ""
 
-#: index.docbook:323
-msgid "Relationships are also lazily initialized. This means you must declare any properties to be of type <literal>Cat</literal>, not <literal>CatImpl</literal>."
+#. Tag: para
+#: performance.xml:323
+#, no-c-format
+msgid ""
+"Relationships are also lazily initialized. This means you must declare any "
+"properties to be of type <literal>Cat</literal>, not <literal>CatImpl</"
+"literal>."
 msgstr ""
+"这里,对象之间的关系也将被延迟载入。这就意味着,你应该将属性声明为"
+"<literal>Cat</literal>,而不是<literal>CatImpl</literal>。"
 
-#: index.docbook:328
-msgid "Certain operations do <emphasis>not</emphasis> require proxy initialization"
-msgstr ""
+#. Tag: para
+#: performance.xml:328
+#, no-c-format
+msgid ""
+"Certain operations do <emphasis>not</emphasis> require proxy initialization"
+msgstr "但是,在有些方法中是<emphasis>不需要</emphasis>使用代理的。例如:"
 
-#: index.docbook:334
-msgid "<literal>equals()</literal>, if the persistent class does not override <literal>equals()</literal>"
+#. Tag: para
+#: performance.xml:334
+#, no-c-format
+msgid ""
+"<literal>equals()</literal>, if the persistent class does not override "
+"<literal>equals()</literal>"
 msgstr ""
+"<literal>equals()</literal>方法,如果持久类没有重载<literal>equals()</"
+"literal>方法。"
 
-#: index.docbook:340
-msgid "<literal>hashCode()</literal>, if the persistent class does not override <literal>hashCode()</literal>"
+#. Tag: para
+#: performance.xml:340
+#, no-c-format
+msgid ""
+"<literal>hashCode()</literal>, if the persistent class does not override "
+"<literal>hashCode()</literal>"
 msgstr ""
+"<literal>hashCode()</literal>方法,如果持久类没有重载<literal>hashCode()</"
+"literal>方法。"
 
-#: index.docbook:346
+#. Tag: para
+#: performance.xml:346
+#, no-c-format
 msgid "The identifier getter method"
-msgstr ""
+msgstr "标志符的getter方法。"
 
-#: index.docbook:352
-msgid "Hibernate will detect persistent classes that override <literal>equals()</literal> or <literal>hashCode()</literal>."
+#. Tag: para
+#: performance.xml:352
+#, no-c-format
+msgid ""
+"Hibernate will detect persistent classes that override <literal>equals()</"
+"literal> or <literal>hashCode()</literal>."
 msgstr ""
+"Hibernate将会识别出那些重载了<literal>equals()</literal>、或<literal>hashCode"
+"()</literal>方法的持久化类。"
 
-#: index.docbook:357
-msgid "By choosing <literal>lazy=\"no-proxy\"</literal> instead of the default <literal>lazy=\"proxy\"</literal>, we can avoid the problems associated with typecasting. However, we will require buildtime bytecode instrumentation, and all operations will result in immediate proxy initialization."
+#. Tag: para
+#: performance.xml:357
+#, no-c-format
+msgid ""
+"By choosing <literal>lazy=\"no-proxy\"</literal> instead of the default "
+"<literal>lazy=\"proxy\"</literal>, we can avoid the problems associated with "
+"typecasting. However, we will require buildtime bytecode instrumentation, "
+"and all operations will result in immediate proxy initialization."
 msgstr ""
+"若选择<literal>lazy=\"no-proxy\"</literal>而非默认的<literal>lazy=\"proxy\"</"
+"literal>,我们可以避免类型转换带来的问题。然而,这样我们就需要编译期字节码增"
+"强,并且所有的操作都会导致立刻进行代理初始化。"
 
-#: index.docbook:367
+#. Tag: title
+#: performance.xml:367
+#, no-c-format
 msgid "Initializing collections and proxies"
-msgstr ""
+msgstr "实例化集合和代理(Initializing collections and proxies)"
 
-#: index.docbook:369
-msgid "A <literal>LazyInitializationException</literal> will be thrown by Hibernate if an uninitialized collection or proxy is accessed outside of the scope of the <literal>Session</literal>, ie. when the entity owning the collection or having the reference to the proxy is in the detached state."
+#. Tag: para
+#: performance.xml:369
+#, no-c-format
+msgid ""
+"A <literal>LazyInitializationException</literal> will be thrown by Hibernate "
+"if an uninitialized collection or proxy is accessed outside of the scope of "
+"the <literal>Session</literal>, ie. when the entity owning the collection or "
+"having the reference to the proxy is in the detached state."
 msgstr ""
+"在<literal>Session</literal>范围之外访问未初始化的集合或代理,Hibernate将会抛"
+"出<literal>LazyInitializationException</literal>异常。 也就是说,在分离状态"
+"下,访问一个实体所拥有的集合,或者访问其指向代理的属性时,会引发此异常。"
 
-#: index.docbook:375
-msgid "Sometimes we need to ensure that a proxy or collection is initialized before closing the <literal>Session</literal>. Of course, we can alway force initialization by calling <literal>cat.getSex()</literal> or <literal>cat.getKittens().size()</literal>, for example. But that is confusing to readers of the code and is not convenient for generic code."
+#. Tag: para
+#: performance.xml:375
+#, no-c-format
+msgid ""
+"Sometimes we need to ensure that a proxy or collection is initialized before "
+"closing the <literal>Session</literal>. Of course, we can alway force "
+"initialization by calling <literal>cat.getSex()</literal> or <literal>cat."
+"getKittens().size()</literal>, for example. But that is confusing to readers "
+"of the code and is not convenient for generic code."
 msgstr ""
+"有时候我们需要保证某个代理或者集合在Session关闭前就已经被初始化了。 当然,我"
+"们可以通过强行调用<literal>cat.getSex()</literal>或者<literal>cat.getKittens"
+"().size()</literal>之类的方法来确保这一点。 但是这样的程序会造成读者的疑惑,"
+"也不符合通常的代码规范。"
 
-#: index.docbook:382
-msgid "The static methods <literal>Hibernate.initialize()</literal> and <literal>Hibernate.isInitialized()</literal> provide the application with a convenient way of working with lazily initialized collections or proxies. <literal>Hibernate.initialize(cat)</literal> will force the initialization of a proxy, <literal>cat</literal>, as long as its <literal>Session</literal> is still open. <literal>Hibernate.initialize( cat.getKittens() )</literal> has a similar effect for the collection of kittens."
+#. Tag: para
+#: performance.xml:382
+#, no-c-format
+msgid ""
+"The static methods <literal>Hibernate.initialize()</literal> and "
+"<literal>Hibernate.isInitialized()</literal> provide the application with a "
+"convenient way of working with lazily initialized collections or proxies. "
+"<literal>Hibernate.initialize(cat)</literal> will force the initialization "
+"of a proxy, <literal>cat</literal>, as long as its <literal>Session</"
+"literal> is still open. <literal>Hibernate.initialize( cat.getKittens() )</"
+"literal> has a similar effect for the collection of kittens."
 msgstr ""
+"静态方法<literal>Hibernate.initialized()</literal> 为你的应用程序提供了一个便"
+"捷的途径来延迟加载集合或代理。 只要它的Session处于open状态,"
+"<literal>Hibernate.initialize(cat)</literal> 将会为cat强制对代理实例化。 同"
+"样,<literal>Hibernate.initialize( cat.getKittens() )</literal> 对kittens的集"
+"合具有同样的功能。"
 
-#: index.docbook:391
-msgid "Another option is to keep the <literal>Session</literal> open until all needed collections and proxies have been loaded. In some application architectures, particularly where the code that accesses data using Hibernate, and the code that uses it are in different application layers or different physical processes, it can be a problem to ensure that the <literal>Session</literal> is open when a collection is initialized. There are two basic ways to deal with this issue:"
+#. Tag: para
+#: performance.xml:391
+#, no-c-format
+msgid ""
+"Another option is to keep the <literal>Session</literal> open until all "
+"needed collections and proxies have been loaded. In some application "
+"architectures, particularly where the code that accesses data using "
+"Hibernate, and the code that uses it are in different application layers or "
+"different physical processes, it can be a problem to ensure that the "
+"<literal>Session</literal> is open when a collection is initialized. There "
+"are two basic ways to deal with this issue:"
 msgstr ""
+"还有另外一种选择,就是保持<literal>Session</literal>一直处于open状态,直到所"
+"有需要的集合或代理都被载入。 在某些应用架构中,特别是对于那些使用Hibernate进"
+"行数据访问的代码,以及那些在不同应用层和不同物理进程中使用Hibernate的代码。 "
+"在集合实例化时,如何保证<literal>Session</literal>处于open状态经常会是一个问"
+"题。有两种方法可以解决此问题:"
 
-#: index.docbook:402
-msgid "In a web-based application, a servlet filter can be used to close the <literal>Session</literal> only at the very end of a user request, once the rendering of the view is complete (the <emphasis>Open Session in View</emphasis> pattern). Of course, this places heavy demands on the correctness of the exception handling of your application infrastructure. It is vitally important that the <literal>Session</literal> is closed and the transaction ended before returning to the user, even when an exception occurs during rendering of the view. See the Hibernate Wiki for examples of this \"Open Session in View\" pattern."
+#. Tag: para
+#: performance.xml:402
+#, no-c-format
+msgid ""
+"In a web-based application, a servlet filter can be used to close the "
+"<literal>Session</literal> only at the very end of a user request, once the "
+"rendering of the view is complete (the <emphasis>Open Session in View</"
+"emphasis> pattern). Of course, this places heavy demands on the correctness "
+"of the exception handling of your application infrastructure. It is vitally "
+"important that the <literal>Session</literal> is closed and the transaction "
+"ended before returning to the user, even when an exception occurs during "
+"rendering of the view. See the Hibernate Wiki for examples of this \"Open "
+"Session in View\" pattern."
 msgstr ""
+"在一个基于Web的应用中,可以利用servlet过滤器(filter),在用户请求(request)"
+"结束、页面生成 结束时关闭<literal>Session</literal>(这里使用了<emphasis>在展"
+"示层保持打开Session模式(Open Session in View)</emphasis>), 当然,这将依赖"
+"于应用框架中异常需要被正确的处理。在返回界面给用户之前,乃至在生成界面过程中"
+"发生异常的情况下, 正确关闭<literal>Session</literal>和结束事务将是非常重要"
+"的, 请参见Hibernate wiki上的\"Open Session in View\"模式,你可以找到示例。"
 
-#: index.docbook:415
-msgid "In an application with a separate business tier, the business logic must \"prepare\" all collections that will be needed by the web tier before returning. This means that the business tier should load all the data and return all the data already initialized to the presentation/web tier that is required for a particular use case. Usually, the application calls <literal>Hibernate.initialize()</literal> for each collection that will be needed in the web tier (this call must occur before the session is closed) or retrieves the collection eagerly using a Hibernate query with a <literal>FETCH</literal> clause or a <literal>FetchMode.JOIN</literal> in <literal>Criteria</literal>. This is usually easier if you adopt the <emphasis>Command</emphasis> pattern instead of a <emphasis>Session Facade</emphasis>."
+#. Tag: para
+#: performance.xml:415
+#, no-c-format
+msgid ""
+"In an application with a separate business tier, the business logic must "
+"\"prepare\" all collections that will be needed by the web tier before "
+"returning. This means that the business tier should load all the data and "
+"return all the data already initialized to the presentation/web tier that is "
+"required for a particular use case. Usually, the application calls "
+"<literal>Hibernate.initialize()</literal> for each collection that will be "
+"needed in the web tier (this call must occur before the session is closed) "
+"or retrieves the collection eagerly using a Hibernate query with a "
+"<literal>FETCH</literal> clause or a <literal>FetchMode.JOIN</literal> in "
+"<literal>Criteria</literal>. This is usually easier if you adopt the "
+"<emphasis>Command</emphasis> pattern instead of a <emphasis>Session Facade</"
+"emphasis>."
 msgstr ""
+"在一个拥有单独业务层的应用中,业务层必须在返回之前,为web层“准备”好其所需的数"
+"据集合。这就意味着 业务层应该载入所有表现层/web层所需的数据,并将这些已实例化"
+"完毕的数据返回。通常,应用程序应该 为web层所需的每个集合调用"
+"<literal>Hibernate.initialize()</literal>(这个调用必须发生咱session关闭之"
+"前); 或者使用带有<literal>FETCH</literal>从句,或<literal>FetchMode.JOIN</"
+"literal>的Hibernate查询, 事先取得所有的数据集合。如果你在应用中使用了"
+"<emphasis>Command</emphasis>模式,代替<emphasis>Session Facade</emphasis> , "
+"那么这项任务将会变得简单的多。"
 
-#: index.docbook:430
-msgid "You may also attach a previously loaded object to a new <literal>Session</literal> with <literal>merge()</literal> or <literal>lock()</literal> before accessing uninitialized collections (or other proxies). No, Hibernate does not, and certainly <emphasis>should</emphasis> not do this automatically, since it would introduce ad hoc transaction semantics!"
+#. Tag: para
+#: performance.xml:430
+#, no-c-format
+msgid ""
+"You may also attach a previously loaded object to a new <literal>Session</"
+"literal> with <literal>merge()</literal> or <literal>lock()</literal> before "
+"accessing uninitialized collections (or other proxies). No, Hibernate does "
+"not, and certainly <emphasis>should</emphasis> not do this automatically, "
+"since it would introduce ad hoc transaction semantics!"
 msgstr ""
+"你也可以通过<literal>merge()</literal>或<literal>lock()</literal>方法,在访问"
+"未实例化的集合(或代理)之前, 为先前载入的对象绑定一个新的<literal>Session</"
+"literal>。 显然,Hibernate将不会,也不<emphasis>应该</emphasis>自动完成这些任"
+"务,因为这将引入一个特殊的事务语义。"
 
-#: index.docbook:440
-msgid "Sometimes you don't want to initialize a large collection, but still need some information about it (like its size) or a subset of the data."
+#. Tag: para
+#: performance.xml:440
+#, no-c-format
+msgid ""
+"Sometimes you don't want to initialize a large collection, but still need "
+"some information about it (like its size) or a subset of the data."
 msgstr ""
+"有时候,你并不需要完全实例化整个大的集合,仅需要了解它的部分信息(例如其大"
+"小)、或者集合的部分内容。"
 
-#: index.docbook:445
-msgid "You can use a collection filter to get the size of a collection without initializing it:"
-msgstr ""
+#. Tag: para
+#: performance.xml:445
+#, no-c-format
+msgid ""
+"You can use a collection filter to get the size of a collection without "
+"initializing it:"
+msgstr "你可以使用集合过滤器得到其集合的大小,而不必实例化整个集合:"
 
-#: index.docbook:449
-msgid "<![CDATA[( (Integer) s.createFilter( collection, \"select count(*)\" ).list().get(0) ).intValue()]]>"
+#. Tag: programlisting
+#: performance.xml:449
+#, no-c-format
+msgid ""
+"<![CDATA[( (Integer) s.createFilter( collection, \"select count(*)\" ).list"
+"().get(0) ).intValue()]]>"
 msgstr ""
 
-#: index.docbook:451
-msgid "The <literal>createFilter()</literal> method is also used to efficiently retrieve subsets of a collection without needing to initialize the whole collection:"
+#. Tag: para
+#: performance.xml:451
+#, no-c-format
+msgid ""
+"The <literal>createFilter()</literal> method is also used to efficiently "
+"retrieve subsets of a collection without needing to initialize the whole "
+"collection:"
 msgstr ""
+"这里的<literal>createFilter()</literal>方法也可以被用来有效的抓取集合的部分内"
+"容,而无需实例化整个集合:"
 
-#: index.docbook:456
-msgid "<![CDATA[s.createFilter( lazyCollection, \"\").setFirstResult(0).setMaxResults(10).list();]]>"
+#. Tag: programlisting
+#: performance.xml:456
+#, no-c-format
+msgid ""
+"<![CDATA[s.createFilter( lazyCollection, \"\").setFirstResult(0)."
+"setMaxResults(10).list();]]>"
 msgstr ""
 
-#: index.docbook:461
+#. Tag: title
+#: performance.xml:461
+#, no-c-format
 msgid "Using batch fetching"
-msgstr ""
+msgstr "使用批量抓取(Using batch fetching)"
 
-#: index.docbook:463
-msgid "Hibernate can make efficient use of batch fetching, that is, Hibernate can load several uninitialized proxies if one proxy is accessed (or collections. Batch fetching is an optimization of the lazy select fetching strategy. There are two ways you can tune batch fetching: on the class and the collection level."
+#. Tag: para
+#: performance.xml:463
+#, no-c-format
+msgid ""
+"Hibernate can make efficient use of batch fetching, that is, Hibernate can "
+"load several uninitialized proxies if one proxy is accessed (or collections. "
+"Batch fetching is an optimization of the lazy select fetching strategy. "
+"There are two ways you can tune batch fetching: on the class and the "
+"collection level."
 msgstr ""
+"Hibernate可以充分有效的使用批量抓取,也就是说,如果仅一个访问代理(或集合),"
+"那么Hibernate将不载入其他未实例化的代理。 批量抓取是延迟查询抓取的优化方案,"
+"你可以在两种批量抓取方案之间进行选择:在类级别和集合级别。"
 
-#: index.docbook:469
-msgid "Batch fetching for classes/entities is easier to understand. Imagine you have the following situation at runtime: You have 25 <literal>Cat</literal> instances loaded in a <literal>Session</literal>, each <literal>Cat</literal> has a reference to its <literal>owner</literal>, a <literal>Person</literal>. The <literal>Person</literal> class is mapped with a proxy, <literal>lazy=\"true\"</literal>. If you now iterate through all cats and call <literal>getOwner()</literal> on each, Hibernate will by default execute 25 <literal>SELECT</literal> statements, to retrieve the proxied owners. You can tune this behavior by specifying a <literal>batch-size</literal> in the mapping of <literal>Person</literal>:"
+#. Tag: para
+#: performance.xml:469
+#, no-c-format
+msgid ""
+"Batch fetching for classes/entities is easier to understand. Imagine you "
+"have the following situation at runtime: You have 25 <literal>Cat</literal> "
+"instances loaded in a <literal>Session</literal>, each <literal>Cat</"
+"literal> has a reference to its <literal>owner</literal>, a <literal>Person</"
+"literal>. The <literal>Person</literal> class is mapped with a proxy, "
+"<literal>lazy=\"true\"</literal>. If you now iterate through all cats and "
+"call <literal>getOwner()</literal> on each, Hibernate will by default "
+"execute 25 <literal>SELECT</literal> statements, to retrieve the proxied "
+"owners. You can tune this behavior by specifying a <literal>batch-size</"
+"literal> in the mapping of <literal>Person</literal>:"
 msgstr ""
+"类/实体级别的批量抓取很容易理解。假设你在运行时将需要面对下面的问题:你在一个"
+"<literal>Session</literal>中载入了25个 <literal>Cat</literal>实例,每个"
+"<literal>Cat</literal>实例都拥有一个引用成员<literal>owner</literal>, 其指向"
+"<literal>Person</literal>,而<literal>Person</literal>类是代理,同时"
+"<literal>lazy=\"true\"</literal>。 如果你必须遍历整个cats集合,对每个元素调用"
+"<literal>getOwner()</literal>方法,Hibernate将会默认的执行25次"
+"<literal>SELECT</literal>查询, 得到其owner的代理对象。这时,你可以通过在映射"
+"文件的<literal>Person</literal>属性,显式声明<literal>batch-size</literal>,"
+"改变其行为:"
 
-#: index.docbook:479
+#. Tag: programlisting
+#: performance.xml:479
+#, no-c-format
 msgid "<![CDATA[<class name=\"Person\" batch-size=\"10\">...</class>]]>"
 msgstr ""
 
-#: index.docbook:481
-msgid "Hibernate will now execute only three queries, the pattern is 10, 10, 5."
-msgstr ""
+#. Tag: para
+#: performance.xml:481
+#, no-c-format
+msgid ""
+"Hibernate will now execute only three queries, the pattern is 10, 10, 5."
+msgstr "随之,Hibernate将只需要执行三次查询,分别为10、10、 5。"
 
-#: index.docbook:485
-msgid "You may also enable batch fetching of collections. For example, if each <literal>Person</literal> has a lazy collection of <literal>Cat</literal>s, and 10 persons are currently loaded in the <literal>Sesssion</literal>, iterating through all persons will generate 10 <literal>SELECT</literal>s, one for every call to <literal>getCats()</literal>. If you enable batch fetching for the <literal>cats</literal> collection in the mapping of <literal>Person</literal>, Hibernate can pre-fetch collections:"
+#. Tag: para
+#: performance.xml:485
+#, no-c-format
+msgid ""
+"You may also enable batch fetching of collections. For example, if each "
+"<literal>Person</literal> has a lazy collection of <literal>Cat</literal>s, "
+"and 10 persons are currently loaded in the <literal>Sesssion</literal>, "
+"iterating through all persons will generate 10 <literal>SELECT</literal>s, "
+"one for every call to <literal>getCats()</literal>. If you enable batch "
+"fetching for the <literal>cats</literal> collection in the mapping of "
+"<literal>Person</literal>, Hibernate can pre-fetch collections:"
 msgstr ""
+"你也可以在集合级别定义批量抓取。例如,如果每个<literal>Person</literal>都拥有"
+"一个延迟载入的<literal>Cats</literal>集合, 现在,<literal>Sesssion</literal>"
+"中载入了10个person对象,遍历person集合将会引起10次<literal>SELECT</literal>查"
+"询, 每次查询都会调用<literal>getCats()</literal>方法。如果你在"
+"<literal>Person</literal>的映射定义部分,允许对<literal>cats</literal>批量抓"
+"取, 那么,Hibernate将可以预先抓取整个集合。请看例子:"
 
-#: index.docbook:494
+#. Tag: programlisting
+#: performance.xml:494
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <set name=\"cats\" batch-size=\"3\">\n"
-      "        ...\n"
-      "    </set>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <set name=\"cats\" batch-size=\"3\">\n"
+"        ...\n"
+"    </set>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:496
-msgid "With a <literal>batch-size</literal> of 3, Hibernate will load 3, 3, 3, 1 collections in four <literal>SELECT</literal>s. Again, the value of the attribute depends on the expected number of uninitialized collections in a particular <literal>Session</literal>."
+#. Tag: para
+#: performance.xml:496
+#, no-c-format
+msgid ""
+"With a <literal>batch-size</literal> of 3, Hibernate will load 3, 3, 3, 1 "
+"collections in four <literal>SELECT</literal>s. Again, the value of the "
+"attribute depends on the expected number of uninitialized collections in a "
+"particular <literal>Session</literal>."
 msgstr ""
+"如果整个的<literal>batch-size</literal>是3(笔误?),那么Hibernate将会分四次"
+"执行<literal>SELECT</literal>查询, 按照3、3、3、1的大小分别载入数据。这里的"
+"每次载入的数据量还具体依赖于当前<literal>Session</literal>中未实例化集合的个"
+"数。"
 
-#: index.docbook:502
-msgid "Batch fetching of collections is particularly useful if you have a nested tree of items, ie. the typical bill-of-materials pattern. (Although a <emphasis>nested set</emphasis> or a <emphasis>materialized path</emphasis> might be a better option for read-mostly trees.)"
+#. Tag: para
+#: performance.xml:502
+#, no-c-format
+msgid ""
+"Batch fetching of collections is particularly useful if you have a nested "
+"tree of items, ie. the typical bill-of-materials pattern. (Although a "
+"<emphasis>nested set</emphasis> or a <emphasis>materialized path</emphasis> "
+"might be a better option for read-mostly trees.)"
 msgstr ""
+"如果你的模型中有嵌套的树状结构,例如典型的帐单-原料结构(bill-of-materials "
+"pattern),集合的批量抓取是非常有用的。 (尽管在更多情况下对树进行读取时,"
+"<emphasis>嵌套集合(nested set)</emphasis>或<emphasis>原料路径(materialized "
+"path)</emphasis>(××) 是更好的解决方法。)"
 
-#: index.docbook:511
+#. Tag: title
+#: performance.xml:511
+#, no-c-format
 msgid "Using subselect fetching"
-msgstr ""
+msgstr "使用子查询抓取(Using subselect fetching)"
 
-#: index.docbook:513
-msgid "If one lazy collection or single-valued proxy has to be fetched, Hibernate loads all of them, re-running the original query in a subselect. This works in the same way as batch-fetching, without the piecemeal loading."
+#. Tag: para
+#: performance.xml:513
+#, no-c-format
+msgid ""
+"If one lazy collection or single-valued proxy has to be fetched, Hibernate "
+"loads all of them, re-running the original query in a subselect. This works "
+"in the same way as batch-fetching, without the piecemeal loading."
 msgstr ""
+"假若一个延迟集合或单值代理需要抓取,Hibernate会使用一个subselect重新运行原来"
+"的查询,一次性读入所有的实例。这和批量抓取的实现方法是一样的,不会有破碎的加"
+"载。"
 
-#: index.docbook:524
+#. Tag: title
+#: performance.xml:524
+#, no-c-format
 msgid "Using lazy property fetching"
-msgstr ""
+msgstr "使用延迟属性抓取(Using lazy property fetching)"
 
-#: index.docbook:526
-msgid "Hibernate3 supports the lazy fetching of individual properties. This optimization technique is also known as <emphasis>fetch groups</emphasis>. Please note that this is mostly a marketing feature, as in practice, optimizing row reads is much more important than optimization of column reads. However, only loading some properties of a class might be useful in extreme cases, when legacy tables have hundreds of columns and the data model can not be improved."
+#. Tag: para
+#: performance.xml:526
+#, no-c-format
+msgid ""
+"Hibernate3 supports the lazy fetching of individual properties. This "
+"optimization technique is also known as <emphasis>fetch groups</emphasis>. "
+"Please note that this is mostly a marketing feature, as in practice, "
+"optimizing row reads is much more important than optimization of column "
+"reads. However, only loading some properties of a class might be useful in "
+"extreme cases, when legacy tables have hundreds of columns and the data "
+"model can not be improved."
 msgstr ""
+"Hibernate3对单独的属性支持延迟抓取,这项优化技术也被称为<emphasis>组抓取"
+"(fetch groups)</emphasis>。 请注意,该技术更多的属于市场特性。在实际应用"
+"中,优化行读取比优化列读取更重要。但是,仅载入类的部分属性在某些特定情况下会"
+"有用,例如在原有表中拥有几百列数据、数据模型无法改动的情况下。"
 
-#: index.docbook:535
-msgid "To enable lazy property loading, set the <literal>lazy</literal> attribute on your particular property mappings:"
+#. Tag: para
+#: performance.xml:535
+#, no-c-format
+msgid ""
+"To enable lazy property loading, set the <literal>lazy</literal> attribute "
+"on your particular property mappings:"
 msgstr ""
+"可以在映射文件中对特定的属性设置<literal>lazy</literal>,定义该属性为延迟载"
+"入。"
 
-#: index.docbook:540
+#. Tag: programlisting
+#: performance.xml:540
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Document\">\n"
-      "       <id name=\"id\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <property name=\"name\" not-null=\"true\" length=\"50\"/>\n"
-      "    <property name=\"summary\" not-null=\"true\" length=\"200\" lazy=\"true\"/>\n"
-      "    <property name=\"text\" not-null=\"true\" length=\"2000\" lazy=\"true\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Document\">\n"
+"       <id name=\"id\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <property name=\"name\" not-null=\"true\" length=\"50\"/>\n"
+"    <property name=\"summary\" not-null=\"true\" length=\"200\" lazy=\"true"
+"\"/>\n"
+"    <property name=\"text\" not-null=\"true\" length=\"2000\" lazy=\"true\"/"
+">\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:542
-msgid "Lazy property loading requires buildtime bytecode instrumentation! If your persistent classes are not enhanced, Hibernate will silently ignore lazy property settings and fall back to immediate fetching."
+#. Tag: para
+#: performance.xml:542
+#, no-c-format
+msgid ""
+"Lazy property loading requires buildtime bytecode instrumentation! If your "
+"persistent classes are not enhanced, Hibernate will silently ignore lazy "
+"property settings and fall back to immediate fetching."
 msgstr ""
+"属性的延迟载入要求在其代码构建时加入二进制指示指令(bytecode "
+"instrumentation),如果你的持久类代码中未含有这些指令, Hibernate将会忽略这些"
+"属性的延迟设置,仍然将其直接载入。"
 
-#: index.docbook:548
+#. Tag: para
+#: performance.xml:548
+#, no-c-format
 msgid "For bytecode instrumentation, use the following Ant task:"
-msgstr ""
+msgstr "你可以在Ant的Task中,进行如下定义,对持久类代码加入“二进制指令。”"
 
-#: index.docbook:552
+#. Tag: programlisting
+#: performance.xml:552
+#, no-c-format
 msgid ""
-      "<![CDATA[<target name=\"instrument\" depends=\"compile\">\n"
-      "    <taskdef name=\"instrument\" classname=\"org.hibernate.tool.instrument.InstrumentTask\">\n"
-      "        <classpath path=\"${jar.path}\"/>\n"
-      "        <classpath path=\"${classes.dir}\"/>\n"
-      "        <classpath refid=\"lib.class.path\"/>\n"
-      "    </taskdef>\n"
-      "\n"
-      "    <instrument verbose=\"true\">\n"
-      "        <fileset dir=\"${testclasses.dir}/org/hibernate/auction/model\">\n"
-      "            <include name=\"*.class\"/>\n"
-      "        </fileset>\n"
-      "    </instrument>\n"
-      "</target>]]>"
+"<![CDATA[<target name=\"instrument\" depends=\"compile\">\n"
+"    <taskdef name=\"instrument\" classname=\"org.hibernate.tool.instrument."
+"InstrumentTask\">\n"
+"        <classpath path=\"${jar.path}\"/>\n"
+"        <classpath path=\"${classes.dir}\"/>\n"
+"        <classpath refid=\"lib.class.path\"/>\n"
+"    </taskdef>\n"
+"\n"
+"    <instrument verbose=\"true\">\n"
+"        <fileset dir=\"${testclasses.dir}/org/hibernate/auction/model\">\n"
+"            <include name=\"*.class\"/>\n"
+"        </fileset>\n"
+"    </instrument>\n"
+"</target>]]>"
 msgstr ""
 
-#: index.docbook:554
-msgid "A different (better?) way to avoid unnecessary column reads, at least for read-only transactions is to use the projection features of HQL or Criteria queries. This avoids the need for buildtime bytecode processing and is certainly a prefered solution."
+#. Tag: para
+#: performance.xml:554
+#, no-c-format
+msgid ""
+"A different (better?) way to avoid unnecessary column reads, at least for "
+"read-only transactions is to use the projection features of HQL or Criteria "
+"queries. This avoids the need for buildtime bytecode processing and is "
+"certainly a prefered solution."
 msgstr ""
+"还有一种可以优化的方法,它使用HQL或条件查询的投影(projection)特性,可以避免"
+"读取非必要的列, 这一点至少对只读事务是非常有用的。它无需在代码构建时“二进制"
+"指令”处理,因此是一个更加值得选择的解决方法。"
 
-#: index.docbook:561
-msgid "You may force the usual eager fetching of properties using <literal>fetch all properties</literal> in HQL."
+#. Tag: para
+#: performance.xml:561
+#, no-c-format
+msgid ""
+"You may force the usual eager fetching of properties using <literal>fetch "
+"all properties</literal> in HQL."
 msgstr ""
+"有时你需要在HQL中通过<literal>抓取所有属性</literal>,强行抓取所有内容。"
 
-#: index.docbook:571
+#. Tag: title
+#: performance.xml:571
+#, no-c-format
 msgid "The Second Level Cache"
-msgstr ""
+msgstr "二级缓存(The Second Level Cache)"
 
-#: index.docbook:573
-msgid "A Hibernate <literal>Session</literal> is a transaction-level cache of persistent data. It is possible to configure a cluster or JVM-level (<literal>SessionFactory</literal>-level) cache on a class-by-class and collection-by-collection basis. You may even plug in a clustered cache. Be careful. Caches are never aware of changes made to the persistent store by another application (though they may be configured to regularly expire cached data)."
+#. Tag: para
+#: performance.xml:573
+#, no-c-format
+msgid ""
+"A Hibernate <literal>Session</literal> is a transaction-level cache of "
+"persistent data. It is possible to configure a cluster or JVM-level "
+"(<literal>SessionFactory</literal>-level) cache on a class-by-class and "
+"collection-by-collection basis. You may even plug in a clustered cache. Be "
+"careful. Caches are never aware of changes made to the persistent store by "
+"another application (though they may be configured to regularly expire "
+"cached data)."
 msgstr ""
+"Hibernate的<literal>Session</literal>在事务级别进行持久化数据的缓存操作。 当"
+"然,也有可能分别为每个类(或集合),配置集群、或JVM级别"
+"(<literal>SessionFactory级别</literal>)的缓存。 你甚至可以为之插入一个集群的"
+"缓存。注意,缓存永远不知道其他应用程序对持久化仓库(数据库)可能进行的修改 "
+"(即使可以将缓存数据设定为定期失效)。"
 
-#: index.docbook:581
-msgid "You have the option to tell Hibernate which caching implementation to use by specifying the name of a class that implements <literal>org.hibernate.cache.CacheProvider</literal> using the property <literal>hibernate.cache.provider_class</literal>. Hibernate comes bundled with a number of built-in integrations with open-source cache providers (listed below); additionally, you could implement your own and plug it in as outlined above. Note that versions prior to 3.2 defaulted to use EhCache as the default cache provider; that is no longer the case as of 3.2."
+#. Tag: para
+#: performance.xml:581
+#, no-c-format
+msgid ""
+"You have the option to tell Hibernate which caching implementation to use by "
+"specifying the name of a class that implements <literal>org.hibernate.cache."
+"CacheProvider</literal> using the property <literal>hibernate.cache."
+"provider_class</literal>. Hibernate comes bundled with a number of built-in "
+"integrations with open-source cache providers (listed below); additionally, "
+"you could implement your own and plug it in as outlined above. Note that "
+"versions prior to 3.2 defaulted to use EhCache as the default cache "
+"provider; that is no longer the case as of 3.2."
 msgstr ""
+"通过在<literal>hibernate.cache.provider_class</literal>属性中指定"
+"<literal>org.hibernate.cache.CacheProvider</literal>的某个实现的类名,你可以选"
+"择让Hibernate使用哪个缓存实现。Hibernate打包一些开源缓存实现,提供对它们的内"
+"置支持(见下表)。除此之外,你也可以实现你自己的实现,将它们插入到系统中。注"
+"意,在3.2版本之前,默认使用EhCache 作为缓存实现,但从3.2起就不再这样了。"
 
-#: index.docbook:592
+#. Tag: title
+#: performance.xml:592
+#, no-c-format
 msgid "Cache Providers"
-msgstr ""
+msgstr "缓存策略提供商(Cache Providers)"
 
-#: index.docbook:601, index.docbook:774
+#. Tag: entry
+#: performance.xml:601 performance.xml:774
+#, no-c-format
 msgid "Cache"
-msgstr ""
+msgstr "Cache"
 
-#: index.docbook:602
+#. Tag: entry
+#: performance.xml:602
+#, no-c-format
 msgid "Provider class"
-msgstr ""
+msgstr "Provider class"
 
-#: index.docbook:603
+#. Tag: entry
+#: performance.xml:603
+#, no-c-format
 msgid "Type"
-msgstr ""
+msgstr "Type"
 
-#: index.docbook:604
+#. Tag: entry
+#: performance.xml:604
+#, no-c-format
 msgid "Cluster Safe"
-msgstr ""
+msgstr "Cluster Safe"
 
-#: index.docbook:605
+#. Tag: entry
+#: performance.xml:605
+#, no-c-format
 msgid "Query Cache Supported"
-msgstr ""
+msgstr "Query Cache Supported"
 
-#: index.docbook:610, index.docbook:783
+#. Tag: entry
+#: performance.xml:610 performance.xml:783
+#, no-c-format
 msgid "Hashtable (not intended for production use)"
-msgstr ""
+msgstr "Hashtable (not intended for production use)"
 
-#: index.docbook:611
+#. Tag: literal
+#: performance.xml:611
+#, no-c-format
 msgid "org.hibernate.cache.HashtableCacheProvider"
-msgstr ""
+msgstr "org.hibernate.cache.HashtableCacheProvider"
 
-#: index.docbook:612
+#. Tag: entry
+#: performance.xml:612
+#, no-c-format
 msgid "memory"
-msgstr ""
+msgstr "memory"
 
-#: index.docbook:614, index.docbook:621, index.docbook:628, index.docbook:784, index.docbook:785, index.docbook:786, index.docbook:791, index.docbook:792, index.docbook:793, index.docbook:798, index.docbook:799, index.docbook:800, index.docbook:805, index.docbook:806, index.docbook:812, index.docbook:815
+#. Tag: entry
+#: performance.xml:614 performance.xml:621 performance.xml:628
+#: performance.xml:784 performance.xml:785 performance.xml:786
+#: performance.xml:791 performance.xml:792 performance.xml:793
+#: performance.xml:798 performance.xml:799 performance.xml:800
+#: performance.xml:805 performance.xml:806 performance.xml:812
+#: performance.xml:815
+#, no-c-format
 msgid "<entry>yes</entry>"
 msgstr ""
 
-#: index.docbook:617, index.docbook:790
+#. Tag: entry
+#: performance.xml:617 performance.xml:790
+#, no-c-format
 msgid "EHCache"
-msgstr ""
+msgstr "EHCache"
 
-#: index.docbook:618
+#. Tag: literal
+#: performance.xml:618
+#, no-c-format
 msgid "org.hibernate.cache.EhCacheProvider"
-msgstr ""
+msgstr "org.hibernate.cache.EhCacheProvider"
 
-#: index.docbook:619, index.docbook:626
+#. Tag: entry
+#: performance.xml:619 performance.xml:626
+#, no-c-format
 msgid "memory, disk"
-msgstr ""
+msgstr "memory, disk"
 
-#: index.docbook:624, index.docbook:797
+#. Tag: entry
+#: performance.xml:624 performance.xml:797
+#, no-c-format
 msgid "OSCache"
-msgstr ""
+msgstr "OSCache"
 
-#: index.docbook:625
+#. Tag: literal
+#: performance.xml:625
+#, no-c-format
 msgid "org.hibernate.cache.OSCacheProvider"
-msgstr ""
+msgstr "org.hibernate.cache.OSCacheProvider"
 
-#: index.docbook:631, index.docbook:804
+#. Tag: entry
+#: performance.xml:631 performance.xml:804
+#, no-c-format
 msgid "SwarmCache"
-msgstr ""
+msgstr "SwarmCache"
 
-#: index.docbook:632
+#. Tag: literal
+#: performance.xml:632
+#, no-c-format
 msgid "org.hibernate.cache.SwarmCacheProvider"
-msgstr ""
+msgstr "org.hibernate.cache.SwarmCacheProvider"
 
-#: index.docbook:633
+#. Tag: entry
+#: performance.xml:633
+#, no-c-format
 msgid "clustered (ip multicast)"
-msgstr ""
+msgstr "clustered (ip multicast)"
 
-#: index.docbook:634
+#. Tag: entry
+#: performance.xml:634
+#, no-c-format
 msgid "yes (clustered invalidation)"
-msgstr ""
+msgstr "yes (clustered invalidation)"
 
-#: index.docbook:638, index.docbook:811
+#. Tag: entry
+#: performance.xml:638 performance.xml:811
+#, no-c-format
 msgid "JBoss TreeCache"
-msgstr ""
+msgstr "JBoss TreeCache"
 
-#: index.docbook:639
+#. Tag: literal
+#: performance.xml:639
+#, no-c-format
 msgid "org.hibernate.cache.TreeCacheProvider"
-msgstr ""
+msgstr "org.hibernate.cache.TreeCacheProvider"
 
-#: index.docbook:640
+#. Tag: entry
+#: performance.xml:640
+#, no-c-format
 msgid "clustered (ip multicast), transactional"
-msgstr ""
+msgstr "clustered (ip multicast), transactional"
 
-#: index.docbook:641
+#. Tag: entry
+#: performance.xml:641
+#, no-c-format
 msgid "yes (replication)"
-msgstr ""
+msgstr "yes (replication)"
 
-#: index.docbook:642
+#. Tag: entry
+#: performance.xml:642
+#, no-c-format
 msgid "yes (clock sync req.)"
-msgstr ""
+msgstr "yes (clock sync req.)"
 
-#: index.docbook:649
+#. Tag: title
+#: performance.xml:649
+#, no-c-format
 msgid "Cache mappings"
-msgstr ""
+msgstr "缓存映射(Cache mappings)"
 
-#: index.docbook:651
-msgid "The <literal>&lt;cache&gt;</literal> element of a class or collection mapping has the following form:"
-msgstr ""
+#. Tag: para
+#: performance.xml:651
+#, no-c-format
+msgid ""
+"The <literal>&lt;cache&gt;</literal> element of a class or collection "
+"mapping has the following form:"
+msgstr "类或者集合映射的“<literal>&lt;cache&gt;</literal>元素”可以有下列形式:"
 
-#: index.docbook:662
+#. Tag: programlisting
+#: performance.xml:662
+#, no-c-format
 msgid ""
-      "<![CDATA[<cache \n"
-      "    usage=\"transactional|read-write|nonstrict-read-write|read-only\"\n"
-      "    region=\"RegionName\"\n"
-      "    include=\"all|non-lazy\"\n"
-      "/>]]>"
+"<![CDATA[<cache \n"
+"    usage=\"transactional|read-write|nonstrict-read-write|read-only\"\n"
+"    region=\"RegionName\"\n"
+"    include=\"all|non-lazy\"\n"
+"/>]]>"
 msgstr ""
 
-#: index.docbook:665
-msgid "<literal>usage</literal> (required) specifies the caching strategy: <literal>transactional</literal>, <literal>read-write</literal>, <literal>nonstrict-read-write</literal> or <literal>read-only</literal>"
+#. Tag: para
+#: performance.xml:665
+#, no-c-format
+msgid ""
+"<literal>usage</literal> (required) specifies the caching strategy: "
+"<literal>transactional</literal>, <literal>read-write</literal>, "
+"<literal>nonstrict-read-write</literal> or <literal>read-only</literal>"
 msgstr ""
+"<literal>usage</literal>(必须)说明了缓存的策略: <literal>transactional</"
+"literal>、 <literal>read-write</literal>、 <literal>nonstrict-read-write</"
+"literal>或 <literal>read-only</literal>。"
 
-#: index.docbook:674
-msgid "<literal>region</literal> (optional, defaults to the class or collection role name) specifies the name of the second level cache region"
+#. Tag: para
+#: performance.xml:674
+#, no-c-format
+msgid ""
+"<literal>region</literal> (optional, defaults to the class or collection "
+"role name) specifies the name of the second level cache region"
 msgstr ""
+"<literal>region</literal> (可选, 默认为类或者集合的名字(class or collection "
+"role name)) 指定第二级缓存的区域名(name of the second level cache region)"
 
-#: index.docbook:681
-msgid "<literal>include</literal> (optional, defaults to <literal>all</literal>) <literal>non-lazy</literal> specifies that properties of the entity mapped with <literal>lazy=\"true\"</literal> may not be cached when attribute-level lazy fetching is enabled"
+#. Tag: para
+#: performance.xml:681
+#, no-c-format
+msgid ""
+"<literal>include</literal> (optional, defaults to <literal>all</literal>) "
+"<literal>non-lazy</literal> specifies that properties of the entity mapped "
+"with <literal>lazy=\"true\"</literal> may not be cached when attribute-level "
+"lazy fetching is enabled"
 msgstr ""
+"<literal>include</literal> (可选,默认为 <literal>all</literal>) <literal>non-"
+"lazy</literal> 当属性级延迟抓取打开时, 标记为<literal>lazy=\"true\"</literal>"
+"的实体的属性可能无法被缓存"
 
-#: index.docbook:691
-msgid "Alternatively (preferrably?), you may specify <literal>&lt;class-cache&gt;</literal> and <literal>&lt;collection-cache&gt;</literal> elements in <literal>hibernate.cfg.xml</literal>."
+#. Tag: para
+#: performance.xml:691
+#, no-c-format
+msgid ""
+"Alternatively (preferrably?), you may specify <literal>&lt;class-cache&gt;</"
+"literal> and <literal>&lt;collection-cache&gt;</literal> elements in "
+"<literal>hibernate.cfg.xml</literal>."
 msgstr ""
+"另外(首选?), 你可以在hibernate.cfg.xml中指定<literal>&lt;class-cache&gt;</"
+"literal>和 <literal>&lt;collection-cache&gt;</literal> 元素。"
 
-#: index.docbook:696
-msgid "The <literal>usage</literal> attribute specifies a <emphasis>cache concurrency strategy</emphasis>."
+#. Tag: para
+#: performance.xml:696
+#, no-c-format
+msgid ""
+"The <literal>usage</literal> attribute specifies a <emphasis>cache "
+"concurrency strategy</emphasis>."
 msgstr ""
+"这里的<literal>usage</literal> 属性指明了<emphasis>缓存并发策略(cache "
+"concurrency strategy)</emphasis>。"
 
-#: index.docbook:703
+#. Tag: title
+#: performance.xml:703
+#, no-c-format
 msgid "Strategy: read only"
-msgstr ""
+msgstr "策略:只读缓存(Strategy: read only)"
 
-#: index.docbook:705
-msgid "If your application needs to read but never modify instances of a persistent class, a <literal>read-only</literal> cache may be used. This is the simplest and best performing strategy. It's even perfectly safe for use in a cluster."
+#. Tag: para
+#: performance.xml:705
+#, no-c-format
+msgid ""
+"If your application needs to read but never modify instances of a persistent "
+"class, a <literal>read-only</literal> cache may be used. This is the "
+"simplest and best performing strategy. It's even perfectly safe for use in a "
+"cluster."
 msgstr ""
+"如果你的应用程序只需读取一个持久化类的实例,而无需对其修改, 那么就可以对其进"
+"行<literal>只读</literal> 缓存。这是最简单,也是实用性最好的方法。甚至在集群"
+"中,它也能完美地运作。"
 
-#: index.docbook:711
+#. Tag: programlisting
+#: performance.xml:711
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"eg.Immutable\" mutable=\"false\">\n"
-      "    <cache usage=\"read-only\"/>\n"
-      "    ....\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"eg.Immutable\" mutable=\"false\">\n"
+"    <cache usage=\"read-only\"/>\n"
+"    ....\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:717
+#. Tag: title
+#: performance.xml:717
+#, no-c-format
 msgid "Strategy: read/write"
-msgstr ""
+msgstr "策略:读/写缓存(Strategy: read/write)"
 
-#: index.docbook:719
-msgid "If the application needs to update data, a <literal>read-write</literal> cache might be appropriate. This cache strategy should never be used if serializable transaction isolation level is required. If the cache is used in a JTA environment, you must specify the property <literal>hibernate.transaction.manager_lookup_class</literal>, naming a strategy for obtaining the JTA <literal>TransactionManager</literal>. In other environments, you should ensure that the transaction is completed when <literal>Session.close()</literal> or <literal>Session.disconnect()</literal> is called. If you wish to use this strategy in a cluster, you should ensure that the underlying cache implementation supports locking. The built-in cache providers do <emphasis>not</emphasis>."
+#. Tag: para
+#: performance.xml:719
+#, no-c-format
+msgid ""
+"If the application needs to update data, a <literal>read-write</literal> "
+"cache might be appropriate. This cache strategy should never be used if "
+"serializable transaction isolation level is required. If the cache is used "
+"in a JTA environment, you must specify the property <literal>hibernate."
+"transaction.manager_lookup_class</literal>, naming a strategy for obtaining "
+"the JTA <literal>TransactionManager</literal>. In other environments, you "
+"should ensure that the transaction is completed when <literal>Session.close()"
+"</literal> or <literal>Session.disconnect()</literal> is called. If you wish "
+"to use this strategy in a cluster, you should ensure that the underlying "
+"cache implementation supports locking. The built-in cache providers do "
+"<emphasis>not</emphasis>."
 msgstr ""
+"如果应用程序需要更新数据,那么使用<literal>读/写缓存</literal> 比较合适。 如"
+"果应用程序要求“序列化事务”的隔离级别(serializable transaction isolation "
+"level),那么就决不能使用这种缓存策略。 如果在JTA环境中使用缓存,你必须指定"
+"<literal>hibernate.transaction.manager_lookup_class</literal>属性的值, 通过"
+"它,Hibernate才能知道该应用程序中JTA的<literal>TransactionManager</literal>的"
+"具体策略。 在其它环境中,你必须保证在<literal>Session.close()</literal>、或"
+"<literal>Session.disconnect()</literal>调用前, 整个事务已经结束。 如果你想在"
+"集群环境中使用此策略,你必须保证底层的缓存实现支持锁定(locking)。Hibernate内"
+"置的缓存策略并不支持锁定功能。"
 
-#: index.docbook:730
+#. Tag: programlisting
+#: performance.xml:730
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"eg.Cat\" .... >\n"
-      "    <cache usage=\"read-write\"/>\n"
-      "    ....\n"
-      "    <set name=\"kittens\" ... >\n"
-      "        <cache usage=\"read-write\"/>\n"
-      "        ....\n"
-      "    </set>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"eg.Cat\" .... >\n"
+"    <cache usage=\"read-write\"/>\n"
+"    ....\n"
+"    <set name=\"kittens\" ... >\n"
+"        <cache usage=\"read-write\"/>\n"
+"        ....\n"
+"    </set>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:735
+#. Tag: title
+#: performance.xml:735
+#, no-c-format
 msgid "Strategy: nonstrict read/write"
-msgstr ""
+msgstr "策略:非严格读/写缓存(Strategy: nonstrict read/write)"
 
-#: index.docbook:737
-msgid "If the application only occasionally needs to update data (ie. if it is extremely unlikely that two transactions would try to update the same item simultaneously) and strict transaction isolation is not required, a <literal>nonstrict-read-write</literal> cache might be appropriate. If the cache is used in a JTA environment, you must specify <literal>hibernate.transaction.manager_lookup_class</literal>. In other environments, you should ensure that the transaction is completed when <literal>Session.close()</literal> or <literal>Session.disconnect()</literal> is called."
+#. Tag: para
+#: performance.xml:737
+#, no-c-format
+msgid ""
+"If the application only occasionally needs to update data (ie. if it is "
+"extremely unlikely that two transactions would try to update the same item "
+"simultaneously) and strict transaction isolation is not required, a "
+"<literal>nonstrict-read-write</literal> cache might be appropriate. If the "
+"cache is used in a JTA environment, you must specify <literal>hibernate."
+"transaction.manager_lookup_class</literal>. In other environments, you "
+"should ensure that the transaction is completed when <literal>Session.close()"
+"</literal> or <literal>Session.disconnect()</literal> is called."
 msgstr ""
+"如果应用程序只偶尔需要更新数据(也就是说,两个事务同时更新同一记录的情况很不"
+"常见),也不需要十分严格的事务隔离, 那么比较适合使用<literal>非严格读/写缓存"
+"</literal>策略。如果在JTA环境中使用该策略, 你必须为其指定<literal>hibernate."
+"transaction.manager_lookup_class</literal>属性的值, 在其它环境中,你必须保证"
+"在<literal>Session.close()</literal>、或<literal>Session.disconnect()</"
+"literal>调用前, 整个事务已经结束。"
 
-#: index.docbook:749
+#. Tag: title
+#: performance.xml:749
+#, no-c-format
 msgid "Strategy: transactional"
-msgstr ""
+msgstr "策略:事务缓存(transactional)"
 
-#: index.docbook:751
-msgid "The <literal>transactional</literal> cache strategy provides support for fully transactional cache providers such as JBoss TreeCache. Such a cache may only be used in a JTA environment and you must specify <literal>hibernate.transaction.manager_lookup_class</literal>."
+#. Tag: para
+#: performance.xml:751
+#, no-c-format
+msgid ""
+"The <literal>transactional</literal> cache strategy provides support for "
+"fully transactional cache providers such as JBoss TreeCache. Such a cache "
+"may only be used in a JTA environment and you must specify "
+"<literal>hibernate.transaction.manager_lookup_class</literal>."
 msgstr ""
+"Hibernate的<literal>事务缓存</literal>策略提供了全事务的缓存支持, 例如对"
+"JBoss TreeCache的支持。这样的缓存只能用于JTA环境中,你必须指定 为其"
+"<literal>hibernate.transaction.manager_lookup_class</literal>属性。"
 
-#: index.docbook:759
-msgid "None of the cache providers support all of the cache concurrency strategies. The following table shows which providers are compatible with which concurrency strategies."
+#. Tag: para
+#: performance.xml:759
+#, no-c-format
+msgid ""
+"None of the cache providers support all of the cache concurrency strategies. "
+"The following table shows which providers are compatible with which "
+"concurrency strategies."
 msgstr ""
+"没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及"
+"其各自适用的并发策略。"
 
-#: index.docbook:765
+#. Tag: title
+#: performance.xml:765
+#, no-c-format
 msgid "Cache Concurrency Strategy Support"
 msgstr ""
+"各种缓存提供商对缓存并发策略的支持情况(Cache Concurrency Strategy Support)"
 
-#: index.docbook:775
+#. Tag: entry
+#: performance.xml:775
+#, no-c-format
 msgid "read-only"
-msgstr ""
+msgstr "read-only"
 
-#: index.docbook:776
+#. Tag: entry
+#: performance.xml:776
+#, no-c-format
 msgid "nonstrict-read-write"
-msgstr ""
+msgstr "nonstrict-read-write"
 
-#: index.docbook:777
+#. Tag: entry
+#: performance.xml:777
+#, no-c-format
 msgid "read-write"
-msgstr ""
+msgstr "read-write"
 
-#: index.docbook:778
+#. Tag: entry
+#: performance.xml:778
+#, no-c-format
 msgid "transactional"
-msgstr ""
+msgstr "transactional"
 
-#: index.docbook:824
+#. Tag: title
+#: performance.xml:824
+#, no-c-format
 msgid "Managing the caches"
-msgstr ""
+msgstr "管理缓存(Managing the caches)"
 
-#: index.docbook:826
-msgid "Whenever you pass an object to <literal>save()</literal>, <literal>update()</literal> or <literal>saveOrUpdate()</literal> and whenever you retrieve an object using <literal>load()</literal>, <literal>get()</literal>, <literal>list()</literal>, <literal>iterate()</literal> or <literal>scroll()</literal>, that object is added to the internal cache of the <literal>Session</literal>."
+#. Tag: para
+#: performance.xml:826
+#, no-c-format
+msgid ""
+"Whenever you pass an object to <literal>save()</literal>, <literal>update()</"
+"literal> or <literal>saveOrUpdate()</literal> and whenever you retrieve an "
+"object using <literal>load()</literal>, <literal>get()</literal>, "
+"<literal>list()</literal>, <literal>iterate()</literal> or <literal>scroll()"
+"</literal>, that object is added to the internal cache of the "
+"<literal>Session</literal>."
 msgstr ""
+"无论何时,当你给<literal>save()</literal>、<literal>update()</literal>或 "
+"<literal>saveOrUpdate()</literal>方法传递一个对象时,或使用<literal>load()</"
+"literal>、 <literal>get()</literal>、<literal>list()</literal>、"
+"<literal>iterate()</literal> 或<literal>scroll()</literal>方法获得一个对象"
+"时, 该对象都将被加入到<literal>Session</literal>的内部缓存中。"
 
-#: index.docbook:833
-msgid "When <literal>flush()</literal> is subsequently called, the state of that object will be synchronized with the database. If you do not want this synchronization to occur or if you are processing a huge number of objects and need to manage memory efficiently, the <literal>evict()</literal> method may be used to remove the object and its collections from the first-level cache."
+#. Tag: para
+#: performance.xml:833
+#, no-c-format
+msgid ""
+"When <literal>flush()</literal> is subsequently called, the state of that "
+"object will be synchronized with the database. If you do not want this "
+"synchronization to occur or if you are processing a huge number of objects "
+"and need to manage memory efficiently, the <literal>evict()</literal> method "
+"may be used to remove the object and its collections from the first-level "
+"cache."
 msgstr ""
+"当随后flush()方法被调用时,对象的状态会和数据库取得同步。 如果你不希望此同步"
+"操作发生,或者你正处理大量对象、需要对有效管理内存时,你可以调用"
+"<literal>evict()</literal> 方法,从一级缓存中去掉这些对象及其集合。"
 
-#: index.docbook:841
+#. Tag: programlisting
+#: performance.xml:841
+#, no-c-format
 msgid ""
-      "<![CDATA[ScrollableResult cats = sess.createQuery(\"from Cat as cat\").scroll(); //a huge result set\n"
-      "while ( cats.next() ) {\n"
-      "    Cat cat = (Cat) cats.get(0);\n"
-      "    doSomethingWithACat(cat);\n"
-      "    sess.evict(cat);\n"
-      "}]]>"
+"<![CDATA[ScrollableResult cats = sess.createQuery(\"from Cat as cat\").scroll"
+"(); //a huge result set\n"
+"while ( cats.next() ) {\n"
+"    Cat cat = (Cat) cats.get(0);\n"
+"    doSomethingWithACat(cat);\n"
+"    sess.evict(cat);\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:843
-msgid "The <literal>Session</literal> also provides a <literal>contains()</literal> method to determine if an instance belongs to the session cache."
+#. Tag: para
+#: performance.xml:843
+#, no-c-format
+msgid ""
+"The <literal>Session</literal> also provides a <literal>contains()</literal> "
+"method to determine if an instance belongs to the session cache."
 msgstr ""
+"Session还提供了一个<literal>contains()</literal>方法,用来判断某个实例是否处"
+"于当前session的缓存中。"
 
-#: index.docbook:848
-msgid "To completely evict all objects from the session cache, call <literal>Session.clear()</literal>"
+#. Tag: para
+#: performance.xml:848
+#, no-c-format
+msgid ""
+"To completely evict all objects from the session cache, call "
+"<literal>Session.clear()</literal>"
 msgstr ""
+"如若要把所有的对象从session缓存中彻底清除,则需要调用<literal>Session.clear()"
+"</literal>。"
 
-#: index.docbook:852
-msgid "For the second-level cache, there are methods defined on <literal>SessionFactory</literal> for evicting the cached state of an instance, entire class, collection instance or entire collection role."
+#. Tag: para
+#: performance.xml:852
+#, no-c-format
+msgid ""
+"For the second-level cache, there are methods defined on "
+"<literal>SessionFactory</literal> for evicting the cached state of an "
+"instance, entire class, collection instance or entire collection role."
 msgstr ""
+"对于二级缓存来说,在<literal>SessionFactory</literal>中定义了许多方法, 清除"
+"缓存中实例、整个类、集合实例或者整个集合。"
 
-#: index.docbook:858
+#. Tag: programlisting
+#: performance.xml:858
+#, no-c-format
 msgid ""
-      "<![CDATA[sessionFactory.evict(Cat.class, catId); //evict a particular Cat\n"
-      "sessionFactory.evict(Cat.class);  //evict all Cats\n"
-      "sessionFactory.evictCollection(\"Cat.kittens\", catId); //evict a particular collection of kittens\n"
-      "sessionFactory.evictCollection(\"Cat.kittens\"); //evict all kitten collections]]>"
+"<![CDATA[sessionFactory.evict(Cat.class, catId); //evict a particular Cat\n"
+"sessionFactory.evict(Cat.class);  //evict all Cats\n"
+"sessionFactory.evictCollection(\"Cat.kittens\", catId); //evict a particular "
+"collection of kittens\n"
+"sessionFactory.evictCollection(\"Cat.kittens\"); //evict all kitten "
+"collections]]>"
 msgstr ""
 
-#: index.docbook:860
-msgid "The <literal>CacheMode</literal> controls how a particular session interacts with the second-level cache."
+#. Tag: para
+#: performance.xml:860
+#, no-c-format
+msgid ""
+"The <literal>CacheMode</literal> controls how a particular session interacts "
+"with the second-level cache."
 msgstr ""
+"<literal>CacheMode</literal>参数用于控制具体的Session如何与二级缓存进行交互。"
 
-#: index.docbook:867
-msgid "<literal>CacheMode.NORMAL</literal> - read items from and write items to the second-level cache"
-msgstr ""
+#. Tag: para
+#: performance.xml:867
+#, no-c-format
+msgid ""
+"<literal>CacheMode.NORMAL</literal> - read items from and write items to the "
+"second-level cache"
+msgstr "<literal>CacheMode.NORMAL</literal> - 从二级缓存中读、写数据。"
 
-#: index.docbook:872
-msgid "<literal>CacheMode.GET</literal> - read items from the second-level cache, but don't write to the second-level cache except when updating data"
+#. Tag: para
+#: performance.xml:872
+#, no-c-format
+msgid ""
+"<literal>CacheMode.GET</literal> - read items from the second-level cache, "
+"but don't write to the second-level cache except when updating data"
 msgstr ""
+"<literal>CacheMode.GET</literal> - 从二级缓存中读取数据,仅在数据更新时对二级"
+"缓存写数据。"
 
-#: index.docbook:878
-msgid "<literal>CacheMode.PUT</literal> - write items to the second-level cache, but don't read from the second-level cache"
+#. Tag: para
+#: performance.xml:878
+#, no-c-format
+msgid ""
+"<literal>CacheMode.PUT</literal> - write items to the second-level cache, "
+"but don't read from the second-level cache"
 msgstr ""
+"<literal>CacheMode.PUT</literal> - 仅向二级缓存写数据,但不从二级缓存中读数"
+"据。"
 
-#: index.docbook:884
-msgid "<literal>CacheMode.REFRESH</literal> - write items to the second-level cache, but don't read from the second-level cache, bypass the effect of <literal>hibernate.cache.use_minimal_puts</literal>, forcing a refresh of the second-level cache for all items read from the database"
+#. Tag: para
+#: performance.xml:884
+#, no-c-format
+msgid ""
+"<literal>CacheMode.REFRESH</literal> - write items to the second-level "
+"cache, but don't read from the second-level cache, bypass the effect of "
+"<literal>hibernate.cache.use_minimal_puts</literal>, forcing a refresh of "
+"the second-level cache for all items read from the database"
 msgstr ""
+"<literal>CacheMode.REFRESH</literal> - 仅向二级缓存写数据,但不从二级缓存中读"
+"数据。通过 <literal>hibernate.cache.use_minimal_puts</literal>的设置,强制二"
+"级缓存从数据库中读取数据,刷新缓存内容。"
 
-#: index.docbook:892
-msgid "To browse the contents of a second-level or query cache region, use the <literal>Statistics</literal> API:"
+#. Tag: para
+#: performance.xml:892
+#, no-c-format
+msgid ""
+"To browse the contents of a second-level or query cache region, use the "
+"<literal>Statistics</literal> API:"
 msgstr ""
+"如若需要查看二级缓存或查询缓存区域的内容,你可以使用<literal>统计"
+"(Statistics)</literal> API。"
 
-#: index.docbook:897
+#. Tag: programlisting
+#: performance.xml:897
+#, no-c-format
 msgid ""
-      "<![CDATA[Map cacheEntries = sessionFactory.getStatistics()\n"
-      "        .getSecondLevelCacheStatistics(regionName)\n"
-      "        .getEntries();]]>"
+"<![CDATA[Map cacheEntries = sessionFactory.getStatistics()\n"
+"        .getSecondLevelCacheStatistics(regionName)\n"
+"        .getEntries();]]>"
 msgstr ""
 
-#: index.docbook:899
-msgid "You'll need to enable statistics, and, optionally, force Hibernate to keep the cache entries in a more human-understandable format:"
+#. Tag: para
+#: performance.xml:899
+#, no-c-format
+msgid ""
+"You'll need to enable statistics, and, optionally, force Hibernate to keep "
+"the cache entries in a more human-understandable format:"
 msgstr ""
+"此时,你必须手工打开统计选项。可选的,你可以让Hibernate更人工可读的方式维护缓"
+"存内容。"
 
-#: index.docbook:904
+#. Tag: programlisting
+#: performance.xml:904
+#, no-c-format
 msgid ""
-      "<![CDATA[hibernate.generate_statistics true\n"
-      "hibernate.cache.use_structured_entries true]]>"
+"<![CDATA[hibernate.generate_statistics true\n"
+"hibernate.cache.use_structured_entries true]]>"
 msgstr ""
 
-#: index.docbook:909
+#. Tag: title
+#: performance.xml:909
+#, no-c-format
 msgid "The Query Cache"
-msgstr ""
+msgstr "查询缓存(The Query Cache)"
 
-#: index.docbook:911
-msgid "Query result sets may also be cached. This is only useful for queries that are run frequently with the same parameters. To use the query cache you must first enable it:"
+#. Tag: para
+#: performance.xml:911
+#, no-c-format
+msgid ""
+"Query result sets may also be cached. This is only useful for queries that "
+"are run frequently with the same parameters. To use the query cache you must "
+"first enable it:"
 msgstr ""
+"查询的结果集也可以被缓存。只有当经常使用同样的参数进行查询时,这才会有些用"
+"处。 要使用查询缓存,首先你必须打开它:"
 
-#: index.docbook:916
+#. Tag: programlisting
+#: performance.xml:916
+#, no-c-format
 msgid "<![CDATA[hibernate.cache.use_query_cache true]]>"
 msgstr ""
 
-#: index.docbook:918
-msgid "This setting causes the creation of two new cache regions - one holding cached query result sets (<literal>org.hibernate.cache.StandardQueryCache</literal>), the other holding timestamps of the most recent updates to queryable tables (<literal>org.hibernate.cache.UpdateTimestampsCache</literal>). Note that the query cache does not cache the state of the actual entities in the result set; it caches only identifier values and results of value type. So the query cache should always be used in conjunction with the second-level cache."
+#. Tag: para
+#: performance.xml:918
+#, no-c-format
+msgid ""
+"This setting causes the creation of two new cache regions - one holding "
+"cached query result sets (<literal>org.hibernate.cache.StandardQueryCache</"
+"literal>), the other holding timestamps of the most recent updates to "
+"queryable tables (<literal>org.hibernate.cache.UpdateTimestampsCache</"
+"literal>). Note that the query cache does not cache the state of the actual "
+"entities in the result set; it caches only identifier values and results of "
+"value type. So the query cache should always be used in conjunction with the "
+"second-level cache."
 msgstr ""
+"该设置将会创建两个缓存区域 - 一个用于保存查询结果集(<literal>org.hibernate."
+"cache.StandardQueryCache</literal>); 另一个则用于保存最近查询的一系列表的时"
+"间戳(<literal>org.hibernate.cache.UpdateTimestampsCache</literal>)。 请注意:"
+"在查询缓存中,它并不缓存结果集中所包含的实体的确切状态;它只缓存这些实体的标"
+"识符属性的值、以及各值类型的结果。 所以查询缓存通常会和二级缓存一起使用。"
 
-#: index.docbook:928
-msgid "Most queries do not benefit from caching, so by default queries are not cached. To enable caching, call <literal>Query.setCacheable(true)</literal>. This call allows the query to look for existing cache results or add its results to the cache when it is executed."
+#. Tag: para
+#: performance.xml:928
+#, no-c-format
+msgid ""
+"Most queries do not benefit from caching, so by default queries are not "
+"cached. To enable caching, call <literal>Query.setCacheable(true)</literal>. "
+"This call allows the query to look for existing cache results or add its "
+"results to the cache when it is executed."
 msgstr ""
+"绝大多数的查询并不能从查询缓存中受益,所以Hibernate默认是不进行查询缓存的。如"
+"若需要进行缓存,请调用 <literal>Query.setCacheable(true)</literal>方法。这个"
+"调用会让查询在执行过程中时先从缓存中查找结果, 并将自己的结果集放到缓存中去。"
 
-#: index.docbook:935
-msgid "If you require fine-grained control over query cache expiration policies, you may specify a named cache region for a particular query by calling <literal>Query.setCacheRegion()</literal>."
+#. Tag: para
+#: performance.xml:935
+#, no-c-format
+msgid ""
+"If you require fine-grained control over query cache expiration policies, "
+"you may specify a named cache region for a particular query by calling "
+"<literal>Query.setCacheRegion()</literal>."
 msgstr ""
+"如果你要对查询缓存的失效政策进行精确的控制,你必须调用<literal>Query."
+"setCacheRegion()</literal>方法, 为每个查询指定其命名的缓存区域。"
 
-#: index.docbook:941
+#. Tag: programlisting
+#: performance.xml:941
+#, no-c-format
 msgid ""
-      "<![CDATA[List blogs = sess.createQuery(\"from Blog blog where blog.blogger = :blogger\")\n"
-      "    .setEntity(\"blogger\", blogger)\n"
-      "    .setMaxResults(15)\n"
-      "    .setCacheable(true)\n"
-      "    .setCacheRegion(\"frontpages\")\n"
-      "    .list();]]>"
+"<![CDATA[List blogs = sess.createQuery(\"from Blog blog where blog.blogger "
+"= :blogger\")\n"
+"    .setEntity(\"blogger\", blogger)\n"
+"    .setMaxResults(15)\n"
+"    .setCacheable(true)\n"
+"    .setCacheRegion(\"frontpages\")\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:943
-msgid "If the query should force a refresh of its query cache region, you should call <literal>Query.setCacheMode(CacheMode.REFRESH)</literal>. This is particularly useful in cases where underlying data may have been updated via a separate process (i.e., not modified through Hibernate) and allows the application to selectively refresh particular query result sets. This is a more efficient alternative to eviction of a query cache region via <literal>SessionFactory.evictQueries()</literal>."
+#. Tag: para
+#: performance.xml:943
+#, no-c-format
+msgid ""
+"If the query should force a refresh of its query cache region, you should "
+"call <literal>Query.setCacheMode(CacheMode.REFRESH)</literal>. This is "
+"particularly useful in cases where underlying data may have been updated via "
+"a separate process (i.e., not modified through Hibernate) and allows the "
+"application to selectively refresh particular query result sets. This is a "
+"more efficient alternative to eviction of a query cache region via "
+"<literal>SessionFactory.evictQueries()</literal>."
 msgstr ""
+"如果查询需要强行刷新其查询缓存区域,那么你应该调用<literal>Query.setCacheMode"
+"(CacheMode.REFRESH)</literal>方法。 这对在其他进程中修改底层数据(例如,不通"
+"过Hibernate修改数据),或对那些需要选择性更新特定查询结果集的情况特别有用。 "
+"这是对<literal>SessionFactory.evictQueries()</literal>的更为有效的替代方案,"
+"同样可以清除查询缓存区域。"
 
-#: index.docbook:955
+#. Tag: title
+#: performance.xml:955
+#, no-c-format
 msgid "Understanding Collection performance"
-msgstr ""
+msgstr "理解集合性能(Understanding Collection performance)"
 
-#: index.docbook:957
-msgid "We've already spent quite some time talking about collections. In this section we will highlight a couple more issues about how collections behave at runtime."
+#. Tag: para
+#: performance.xml:957
+#, no-c-format
+msgid ""
+"We've already spent quite some time talking about collections. In this "
+"section we will highlight a couple more issues about how collections behave "
+"at runtime."
 msgstr ""
+"前面我们已经对集合进行了足够的讨论。本段中,我们将着重讲述集合在运行时的事"
+"宜。"
 
-#: index.docbook:964
+#. Tag: title
+#: performance.xml:964
+#, no-c-format
 msgid "Taxonomy"
-msgstr ""
+msgstr "分类(Taxonomy)"
 
-#: index.docbook:966
+#. Tag: para
+#: performance.xml:966
+#, no-c-format
 msgid "Hibernate defines three basic kinds of collections:"
-msgstr ""
+msgstr "Hibernate定义了三种基本类型的集合:"
 
-#: index.docbook:970
+#. Tag: para
+#: performance.xml:970
+#, no-c-format
 msgid "collections of values"
-msgstr ""
+msgstr "值数据集合"
 
-#: index.docbook:973
+#. Tag: para
+#: performance.xml:973
+#, no-c-format
 msgid "one to many associations"
-msgstr ""
+msgstr "一对多关联"
 
-#: index.docbook:976
+#. Tag: para
+#: performance.xml:976
+#, no-c-format
 msgid "many to many associations"
-msgstr ""
+msgstr "多对多关联"
 
-#: index.docbook:980
-msgid "This classification distinguishes the various table and foreign key relationships but does not tell us quite everything we need to know about the relational model. To fully understand the relational structure and performance characteristics, we must also consider the structure of the primary key that is used by Hibernate to update or delete collection rows. This suggests the following classification:"
+#. Tag: para
+#: performance.xml:980
+#, no-c-format
+msgid ""
+"This classification distinguishes the various table and foreign key "
+"relationships but does not tell us quite everything we need to know about "
+"the relational model. To fully understand the relational structure and "
+"performance characteristics, we must also consider the structure of the "
+"primary key that is used by Hibernate to update or delete collection rows. "
+"This suggests the following classification:"
 msgstr ""
+"这个分类是区分了不同的表和外键关系类型,但是它没有告诉我们关系模型的所有内"
+"容。 要完全理解他们的关系结构和性能特点,我们必须同时考虑“用于Hibernate更新或"
+"删除集合行数据的主键的结构”。 因此得到了如下的分类:"
 
-#: index.docbook:991
+#. Tag: para
+#: performance.xml:991
+#, no-c-format
 msgid "indexed collections"
-msgstr ""
+msgstr "有序集合类"
 
-#: index.docbook:994
+#. Tag: para
+#: performance.xml:994
+#, no-c-format
 msgid "sets"
-msgstr ""
+msgstr "集合(sets)"
 
-#: index.docbook:997
+#. Tag: para
+#: performance.xml:997
+#, no-c-format
 msgid "bags"
-msgstr ""
+msgstr "包(bags)"
 
-#: index.docbook:1001
-msgid "All indexed collections (maps, lists, arrays) have a primary key consisting of the <literal>&lt;key&gt;</literal> and <literal>&lt;index&gt;</literal> columns. In this case collection updates are usually extremely efficient - the primary key may be efficiently indexed and a particular row may be efficiently located when Hibernate tries to update or delete it."
+#. Tag: para
+#: performance.xml:1001
+#, no-c-format
+msgid ""
+"All indexed collections (maps, lists, arrays) have a primary key consisting "
+"of the <literal>&lt;key&gt;</literal> and <literal>&lt;index&gt;</literal> "
+"columns. In this case collection updates are usually extremely efficient - "
+"the primary key may be efficiently indexed and a particular row may be "
+"efficiently located when Hibernate tries to update or delete it."
 msgstr ""
+"所有的有序集合类(maps, lists, arrays)都拥有一个由<literal>&lt;key&gt;</"
+"literal>和 <literal>&lt;index&gt;</literal>组成的主键。 这种情况下集合类的更"
+"新是非常高效的——主键已经被有效的索引,因此当Hibernate试图更新或删除一行时,可"
+"以迅速找到该行数据。"
 
-#: index.docbook:1009
-msgid "Sets have a primary key consisting of <literal>&lt;key&gt;</literal> and element columns. This may be less efficient for some types of collection element, particularly composite elements or large text or binary fields; the database may not be able to index a complex primary key as efficently. On the other hand, for one to many or many to many associations, particularly in the case of synthetic identifiers, it is likely to be just as efficient. (Side-note: if you want <literal>SchemaExport</literal> to actually create the primary key of a <literal>&lt;set&gt;</literal> for you, you must declare all columns as <literal>not-null=\"true\"</literal>.)"
+#. Tag: para
+#: performance.xml:1009
+#, no-c-format
+msgid ""
+"Sets have a primary key consisting of <literal>&lt;key&gt;</literal> and "
+"element columns. This may be less efficient for some types of collection "
+"element, particularly composite elements or large text or binary fields; the "
+"database may not be able to index a complex primary key as efficently. On "
+"the other hand, for one to many or many to many associations, particularly "
+"in the case of synthetic identifiers, it is likely to be just as efficient. "
+"(Side-note: if you want <literal>SchemaExport</literal> to actually create "
+"the primary key of a <literal>&lt;set&gt;</literal> for you, you must "
+"declare all columns as <literal>not-null=\"true\"</literal>.)"
 msgstr ""
+"集合(sets)的主键由<literal>&lt;key&gt;</literal>和其他元素字段构成。 对于有些"
+"元素类型来说,这很低效,特别是组合元素或者大文本、大二进制字段; 数据库可能无"
+"法有效的对复杂的主键进行索引。 另一方面,对于一对多、多对多关联,特别是合成的"
+"标识符来说,集合也可以达到同样的高效性能。( 附注:如果你希望"
+"<literal>SchemaExport</literal>为你的<literal>&lt;set&gt;</literal>创建主"
+"键, 你必须把所有的字段都声明为<literal>not-null=\"true\"</literal>。)"
 
-#: index.docbook:1020
-msgid "<literal>&lt;idbag&gt;</literal> mappings define a surrogate key, so they are always very efficient to update. In fact, they are the best case."
+#. Tag: para
+#: performance.xml:1020
+#, no-c-format
+msgid ""
+"<literal>&lt;idbag&gt;</literal> mappings define a surrogate key, so they "
+"are always very efficient to update. In fact, they are the best case."
 msgstr ""
+"<literal>&lt;idbag&gt;</literal>映射定义了代理键,因此它总是可以很高效的被更"
+"新。事实上, <literal>&lt;idbag&gt;</literal>拥有着最好的性能表现。"
 
-#: index.docbook:1025
-msgid "Bags are the worst case. Since a bag permits duplicate element values and has no index column, no primary key may be defined. Hibernate has no way of distinguishing between duplicate rows. Hibernate resolves this problem by completely removing (in a single <literal>DELETE</literal>) and recreating the collection whenever it changes. This might be very inefficient."
+#. Tag: para
+#: performance.xml:1025
+#, no-c-format
+msgid ""
+"Bags are the worst case. Since a bag permits duplicate element values and "
+"has no index column, no primary key may be defined. Hibernate has no way of "
+"distinguishing between duplicate rows. Hibernate resolves this problem by "
+"completely removing (in a single <literal>DELETE</literal>) and recreating "
+"the collection whenever it changes. This might be very inefficient."
 msgstr ""
+"Bag是最差的。因为bag允许重复的元素值,也没有索引字段,因此不可能定义主键。 "
+"Hibernate无法判断出重复的行。当这种集合被更改时,Hibernate将会先完整地移除 "
+"(通过一个(in a single <literal>DELETE</literal>))整个集合,然后再重新创建整"
+"个集合。 因此Bag是非常低效的。"
 
-#: index.docbook:1033
-msgid "Note that for a one-to-many association, the \"primary key\" may not be the physical primary key of the database table - but even in this case, the above classification is still useful. (It still reflects how Hibernate \"locates\" individual rows of the collection.)"
+#. Tag: para
+#: performance.xml:1033
+#, no-c-format
+msgid ""
+"Note that for a one-to-many association, the \"primary key\" may not be the "
+"physical primary key of the database table - but even in this case, the "
+"above classification is still useful. (It still reflects how Hibernate "
+"\"locates\" individual rows of the collection.)"
 msgstr ""
+"请注意:对于一对多关联来说,“主键”很可能并不是数据库表的物理主键。 但就算在此"
+"情况下,上面的分类仍然是有用的。(它仍然反映了Hibernate在集合的各数据行中是如"
+"何进行“定位”的。)"
 
-#: index.docbook:1043
-msgid "Lists, maps, idbags and sets are the most efficient collections to update"
-msgstr ""
+#. Tag: title
+#: performance.xml:1043
+#, no-c-format
+msgid ""
+"Lists, maps, idbags and sets are the most efficient collections to update"
+msgstr "Lists, maps 和sets用于更新效率最高"
 
-#: index.docbook:1045
-msgid "From the discussion above, it should be clear that indexed collections and (usually) sets allow the most efficient operation in terms of adding, removing and updating elements."
+#. Tag: para
+#: performance.xml:1045
+#, no-c-format
+msgid ""
+"From the discussion above, it should be clear that indexed collections and "
+"(usually) sets allow the most efficient operation in terms of adding, "
+"removing and updating elements."
 msgstr ""
+"根据我们上面的讨论,显然有序集合类型和大多数set都可以在增加、删除、修改元素中"
+"拥有最好的性能。"
 
-#: index.docbook:1051
-msgid "There is, arguably, one more advantage that indexed collections have over sets for many to many associations or collections of values. Because of the structure of a <literal>Set</literal>, Hibernate doesn't ever <literal>UPDATE</literal> a row when an element is \"changed\". Changes to a <literal>Set</literal> always work via <literal>INSERT</literal> and <literal>DELETE</literal> (of individual rows). Once again, this consideration does not apply to one to many associations."
+#. Tag: para
+#: performance.xml:1051
+#, no-c-format
+msgid ""
+"There is, arguably, one more advantage that indexed collections have over "
+"sets for many to many associations or collections of values. Because of the "
+"structure of a <literal>Set</literal>, Hibernate doesn't ever "
+"<literal>UPDATE</literal> a row when an element is \"changed\". Changes to a "
+"<literal>Set</literal> always work via <literal>INSERT</literal> and "
+"<literal>DELETE</literal> (of individual rows). Once again, this "
+"consideration does not apply to one to many associations."
 msgstr ""
+"可论证的是对于多对多关联、值数据集合而言,有序集合类比集合(set)有一个好处。因"
+"为<literal>Set</literal>的内在结构, 如果“改变”了一个元素,Hibernate并不会"
+"<literal>更新(UPDATE)</literal>这一行。 对于<literal>Set</literal>来说,只"
+"有在<literal>插入(INSERT)</literal>和<literal>删除(DELETE)</literal> 操作"
+"时“改变”才有效。再次强调:这段讨论对“一对多关联”并不适用。"
 
-#: index.docbook:1060
-msgid "After observing that arrays cannot be lazy, we would conclude that lists, maps and idbags are the most performant (non-inverse) collection types, with sets not far behind. Sets are expected to be the most common kind of collection in Hibernate applications. This is because the \"set\" semantics are most natural in the relational model."
+#. Tag: para
+#: performance.xml:1060
+#, no-c-format
+msgid ""
+"After observing that arrays cannot be lazy, we would conclude that lists, "
+"maps and idbags are the most performant (non-inverse) collection types, with "
+"sets not far behind. Sets are expected to be the most common kind of "
+"collection in Hibernate applications. This is because the \"set\" semantics "
+"are most natural in the relational model."
 msgstr ""
+"注意到数组无法延迟载入,我们可以得出结论,list, map和idbags是最高效的(非反"
+"向)集合类型,set则紧随其后。 在Hibernate中,set应该时最通用的集合类型,这时"
+"因为“set”的语义在关系模型中是最自然的。"
 
-#: index.docbook:1068
-msgid "However, in well-designed Hibernate domain models, we usually see that most collections are in fact one-to-many associations with <literal>inverse=\"true\"</literal>. For these associations, the update is handled by the many-to-one end of the association, and so considerations of collection update performance simply do not apply."
+#. Tag: para
+#: performance.xml:1068
+#, no-c-format
+msgid ""
+"However, in well-designed Hibernate domain models, we usually see that most "
+"collections are in fact one-to-many associations with <literal>inverse=\"true"
+"\"</literal>. For these associations, the update is handled by the many-to-"
+"one end of the association, and so considerations of collection update "
+"performance simply do not apply."
 msgstr ""
+"但是,在设计良好的Hibernate领域模型中,我们通常可以看到更多的集合事实上是带有"
+"<literal>inverse=\"true\"</literal> 的一对多的关联。对于这些关联,更新操作将"
+"会在多对一的这一端进行处理。因此对于此类情况,无需考虑其集合的更新性能。"
 
-#: index.docbook:1078
+#. Tag: title
+#: performance.xml:1078
+#, no-c-format
 msgid "Bags and lists are the most efficient inverse collections"
-msgstr ""
+msgstr "Bag和list是反向集合类中效率最高的"
 
-#: index.docbook:1080
-msgid "Just before you ditch bags forever, there is a particular case in which bags (and also lists) are much more performant than sets. For a collection with <literal>inverse=\"true\"</literal> (the standard bidirectional one-to-many relationship idiom, for example) we can add elements to a bag or list without needing to initialize (fetch) the bag elements! This is because <literal>Collection.add()</literal> or <literal>Collection.addAll()</literal> must always return true for a bag or <literal>List</literal> (unlike a <literal>Set</literal>). This can make the following common code much faster."
+#. Tag: para
+#: performance.xml:1080
+#, no-c-format
+msgid ""
+"Just before you ditch bags forever, there is a particular case in which bags "
+"(and also lists) are much more performant than sets. For a collection with "
+"<literal>inverse=\"true\"</literal> (the standard bidirectional one-to-many "
+"relationship idiom, for example) we can add elements to a bag or list "
+"without needing to initialize (fetch) the bag elements! This is because "
+"<literal>Collection.add()</literal> or <literal>Collection.addAll()</"
+"literal> must always return true for a bag or <literal>List</literal> "
+"(unlike a <literal>Set</literal>). This can make the following common code "
+"much faster."
 msgstr ""
+"在把bag扔进水沟之前,你必须了解,在一种情况下,bag的性能(包括list)要比set高得"
+"多: 对于指明了<literal>inverse=\"true\"</literal>的集合类(比如说,标准的双"
+"向的一对多关联), 我们可以在未初始化(fetch)包元素的情况下直接向bag或list添加"
+"新元素! 这是因为<literal>Collection.add()</literal>)或者<literal>Collection."
+"addAll()</literal> 方法 对bag或者List总是返回true(这点与与Set不同)。因此对"
+"于下面的相同代码来说,速度会快得多。"
 
-#: index.docbook:1090
+#. Tag: programlisting
+#: performance.xml:1090
+#, no-c-format
 msgid ""
-      "<![CDATA[Parent p = (Parent) sess.load(Parent.class, id);\n"
-      "Child c = new Child();\n"
-      "c.setParent(p);\n"
-      "p.getChildren().add(c);  //no need to fetch the collection!\n"
-      "sess.flush();]]>"
+"<![CDATA[Parent p = (Parent) sess.load(Parent.class, id);\n"
+"Child c = new Child();\n"
+"c.setParent(p);\n"
+"p.getChildren().add(c);  //no need to fetch the collection!\n"
+"sess.flush();]]>"
 msgstr ""
 
-#: index.docbook:1095
+#. Tag: title
+#: performance.xml:1095
+#, no-c-format
 msgid "One shot delete"
-msgstr ""
+msgstr "一次性删除(One shot delete)"
 
-#: index.docbook:1097
-msgid "Occasionally, deleting collection elements one by one can be extremely inefficient. Hibernate isn't completely stupid, so it knows not to do that in the case of an newly-empty collection (if you called <literal>list.clear()</literal>, for example). In this case, Hibernate will issue a single <literal>DELETE</literal> and we are done!"
+#. Tag: para
+#: performance.xml:1097
+#, no-c-format
+msgid ""
+"Occasionally, deleting collection elements one by one can be extremely "
+"inefficient. Hibernate isn't completely stupid, so it knows not to do that "
+"in the case of an newly-empty collection (if you called <literal>list.clear()"
+"</literal>, for example). In this case, Hibernate will issue a single "
+"<literal>DELETE</literal> and we are done!"
 msgstr ""
+"偶尔的,逐个删除集合类中的元素是相当低效的。Hibernate并没那么笨, 如果你想要"
+"把整个集合都删除(比如说调用list.clear()),Hibernate只需要一个DELETE就搞定"
+"了。"
 
-#: index.docbook:1104
-msgid "Suppose we add a single element to a collection of size twenty and then remove two elements. Hibernate will issue one <literal>INSERT</literal> statement and two <literal>DELETE</literal> statements (unless the collection is a bag). This is certainly desirable."
+#. Tag: para
+#: performance.xml:1104
+#, no-c-format
+msgid ""
+"Suppose we add a single element to a collection of size twenty and then "
+"remove two elements. Hibernate will issue one <literal>INSERT</literal> "
+"statement and two <literal>DELETE</literal> statements (unless the "
+"collection is a bag). This is certainly desirable."
 msgstr ""
+"假设我们在一个长度为20的集合类中新增加了一个元素,然后再删除两个。 Hibernate"
+"会安排一条<literal>INSERT</literal>语句和两条<literal>DELETE</literal>语句"
+"(除非集合类是一个bag)。 这当然是显而易见的。"
 
-#: index.docbook:1110
-msgid "However, suppose that we remove eighteen elements, leaving two and then add thee new elements. There are two possible ways to proceed"
+#. Tag: para
+#: performance.xml:1110
+#, no-c-format
+msgid ""
+"However, suppose that we remove eighteen elements, leaving two and then add "
+"thee new elements. There are two possible ways to proceed"
 msgstr ""
+"但是,假设我们删除了18个数据,只剩下2个,然后新增3个。则有两种处理方式:"
 
-#: index.docbook:1117
+#. Tag: para
+#: performance.xml:1117
+#, no-c-format
 msgid "delete eighteen rows one by one and then insert three rows"
-msgstr ""
+msgstr "逐一的删除这18个数据,再新增三个;"
 
-#: index.docbook:1120
-msgid "remove the whole collection (in one SQL <literal>DELETE</literal>) and insert all five current elements (one by one)"
-msgstr ""
+#. Tag: para
+#: performance.xml:1120
+#, no-c-format
+msgid ""
+"remove the whole collection (in one SQL <literal>DELETE</literal>) and "
+"insert all five current elements (one by one)"
+msgstr "删除整个集合类(只用一句DELETE语句),然后增加5个数据。"
 
-#: index.docbook:1125
-msgid "Hibernate isn't smart enough to know that the second option is probably quicker in this case. (And it would probably be undesirable for Hibernate to be that smart; such behaviour might confuse database triggers, etc.)"
+#. Tag: para
+#: performance.xml:1125
+#, no-c-format
+msgid ""
+"Hibernate isn't smart enough to know that the second option is probably "
+"quicker in this case. (And it would probably be undesirable for Hibernate to "
+"be that smart; such behaviour might confuse database triggers, etc.)"
 msgstr ""
+"Hibernate还没那么聪明,知道第二种选择可能会比较快。 (也许让Hibernate不这么聪"
+"明也是好事,否则可能会引发意外的“数据库触发器”之类的问题。)"
 
-#: index.docbook:1131
-msgid "Fortunately, you can force this behaviour (ie. the second strategy) at any time by discarding (ie. dereferencing) the original collection and returning a newly instantiated collection with all the current elements. This can be very useful and powerful from time to time."
+#. Tag: para
+#: performance.xml:1131
+#, no-c-format
+msgid ""
+"Fortunately, you can force this behaviour (ie. the second strategy) at any "
+"time by discarding (ie. dereferencing) the original collection and returning "
+"a newly instantiated collection with all the current elements. This can be "
+"very useful and powerful from time to time."
 msgstr ""
+"幸运的是,你可以强制使用第二种策略。你需要取消原来的整个集合类(解除其引"
+"用), 然后再返回一个新的实例化的集合类,只包含需要的元素。有些时候这是非常有"
+"用的。"
 
-#: index.docbook:1137
-msgid "Of course, one-shot-delete does not apply to collections mapped <literal>inverse=\"true\"</literal>."
+#. Tag: para
+#: performance.xml:1137
+#, no-c-format
+msgid ""
+"Of course, one-shot-delete does not apply to collections mapped "
+"<literal>inverse=\"true\"</literal>."
 msgstr ""
+"显然,一次性删除并不适用于被映射为<literal>inverse=\"true\"</literal>的集合。"
 
-#: index.docbook:1146
+#. Tag: title
+#: performance.xml:1146
+#, no-c-format
 msgid "Monitoring performance"
-msgstr ""
+msgstr "监测性能(Monitoring performance)"
 
-#: index.docbook:1148
-msgid "Optimization is not much use without monitoring and access to performance numbers. Hibernate provides a full range of figures about its internal operations. Statistics in Hibernate are available per <literal>SessionFactory</literal>."
+#. Tag: para
+#: performance.xml:1148
+#, no-c-format
+msgid ""
+"Optimization is not much use without monitoring and access to performance "
+"numbers. Hibernate provides a full range of figures about its internal "
+"operations. Statistics in Hibernate are available per "
+"<literal>SessionFactory</literal>."
 msgstr ""
+"没有监测和性能参数而进行优化是毫无意义的。Hibernate为其内部操作提供了一系列的"
+"示意图,因此可以从 每个<literal>SessionFactory</literal>抓取其统计数据。"
 
-#: index.docbook:1155
+#. Tag: title
+#: performance.xml:1155
+#, no-c-format
 msgid "Monitoring a SessionFactory"
-msgstr ""
+msgstr "监测SessionFactory"
 
-#: index.docbook:1157
-msgid "You can access <literal>SessionFactory</literal> metrics in two ways. Your first option is to call <literal>sessionFactory.getStatistics()</literal> and read or display the <literal>Statistics</literal> yourself."
+#. Tag: para
+#: performance.xml:1157
+#, no-c-format
+msgid ""
+"You can access <literal>SessionFactory</literal> metrics in two ways. Your "
+"first option is to call <literal>sessionFactory.getStatistics()</literal> "
+"and read or display the <literal>Statistics</literal> yourself."
 msgstr ""
+"你可以有两种方式访问<literal>SessionFactory</literal>的数据记录,第一种就是自"
+"己直接调用 <literal>sessionFactory.getStatistics()</literal>方法读取、显示"
+"<literal>统计</literal>数据。"
 
-#: index.docbook:1163
-msgid "Hibernate can also use JMX to publish metrics if you enable the <literal>StatisticsService</literal> MBean. You may enable a single MBean for all your <literal>SessionFactory</literal> or one per factory. See the following code for minimalistic configuration examples:"
+#. Tag: para
+#: performance.xml:1163
+#, no-c-format
+msgid ""
+"Hibernate can also use JMX to publish metrics if you enable the "
+"<literal>StatisticsService</literal> MBean. You may enable a single MBean "
+"for all your <literal>SessionFactory</literal> or one per factory. See the "
+"following code for minimalistic configuration examples:"
 msgstr ""
+"此外,如果你打开<literal>StatisticsService</literal> MBean选项,那么Hibernate"
+"则可以使用JMX技术 发布其数据记录。你可以让应用中所有的"
+"<literal>SessionFactory</literal>同时共享一个MBean,也可以每个 SessionFactory"
+"分配一个MBean。下面的代码即是其演示代码:"
 
-#: index.docbook:1170
+#. Tag: programlisting
+#: performance.xml:1170
+#, no-c-format
 msgid ""
-      "<![CDATA[// MBean service registration for a specific SessionFactory\n"
-      "Hashtable tb = new Hashtable();\n"
-      "tb.put(\"type\", \"statistics\");\n"
-      "tb.put(\"sessionFactory\", \"myFinancialApp\");\n"
-      "ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
-      "\n"
-      "StatisticsService stats = new StatisticsService(); // MBean implementation\n"
-      "stats.setSessionFactory(sessionFactory); // Bind the stats to a SessionFactory\n"
-      "server.registerMBean(stats, on); // Register the Mbean on the server]]>"
+"<![CDATA[// MBean service registration for a specific SessionFactory\n"
+"Hashtable tb = new Hashtable();\n"
+"tb.put(\"type\", \"statistics\");\n"
+"tb.put(\"sessionFactory\", \"myFinancialApp\");\n"
+"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
+"\n"
+"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
+"stats.setSessionFactory(sessionFactory); // Bind the stats to a "
+"SessionFactory\n"
+"server.registerMBean(stats, on); // Register the Mbean on the server]]>"
 msgstr ""
 
-#: index.docbook:1173
+#. Tag: programlisting
+#: performance.xml:1173
+#, no-c-format
 msgid ""
-      "<![CDATA[// MBean service registration for all SessionFactory's\n"
-      "Hashtable tb = new Hashtable();\n"
-      "tb.put(\"type\", \"statistics\");\n"
-      "tb.put(\"sessionFactory\", \"all\");\n"
-      "ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
-      "\n"
-      "StatisticsService stats = new StatisticsService(); // MBean implementation\n"
-      "server.registerMBean(stats, on); // Register the MBean on the server]]>"
+"<![CDATA[// MBean service registration for all SessionFactory's\n"
+"Hashtable tb = new Hashtable();\n"
+"tb.put(\"type\", \"statistics\");\n"
+"tb.put(\"sessionFactory\", \"all\");\n"
+"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
+"\n"
+"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
+"server.registerMBean(stats, on); // Register the MBean on the server]]>"
 msgstr ""
 
-#: index.docbook:1175
-msgid "TODO: This doesn't make sense: In the first case, we retrieve and use the MBean directly. In the second one, we must give the JNDI name in which the session factory is held before using it. Use <literal>hibernateStatsBean.setSessionFactoryJNDIName(\"my/JNDI/Name\")</literal>"
+#. Tag: para
+#: performance.xml:1175
+#, no-c-format
+msgid ""
+"TODO: This doesn't make sense: In the first case, we retrieve and use the "
+"MBean directly. In the second one, we must give the JNDI name in which the "
+"session factory is held before using it. Use <literal>hibernateStatsBean."
+"setSessionFactoryJNDIName(\"my/JNDI/Name\")</literal>"
 msgstr ""
+"TODO:仍需要说明的是:在第一个例子中,我们直接得到和使用MBean;而在第二个例子"
+"中,在使用MBean之前 我们则需要给出SessionFactory的JNDI名,使用"
+"<literal>hibernateStatsBean.setSessionFactoryJNDIName(\"my/JNDI/Name\")</"
+"literal> 得到SessionFactory,然后将MBean保存于其中。"
 
-#: index.docbook:1180
-msgid "You can (de)activate the monitoring for a <literal>SessionFactory</literal>"
+#. Tag: para
+#: performance.xml:1180
+#, no-c-format
+msgid ""
+"You can (de)activate the monitoring for a <literal>SessionFactory</literal>"
 msgstr ""
+"你可以通过以下方法打开或关闭<literal>SessionFactory</literal>的监测功能:"
 
-#: index.docbook:1185
-msgid "at configuration time, set <literal>hibernate.generate_statistics</literal> to <literal>false</literal>"
+#. Tag: para
+#: performance.xml:1185
+#, no-c-format
+msgid ""
+"at configuration time, set <literal>hibernate.generate_statistics</literal> "
+"to <literal>false</literal>"
 msgstr ""
+"在配置期间,将<literal>hibernate.generate_statistics</literal>设置为"
+"<literal>true</literal>或<literal>false</literal>;"
 
-#: index.docbook:1192
-msgid "at runtime: <literal>sf.getStatistics().setStatisticsEnabled(true)</literal> or <literal>hibernateStatsBean.setStatisticsEnabled(true)</literal>"
+#. Tag: para
+#: performance.xml:1192
+#, no-c-format
+msgid ""
+"at runtime: <literal>sf.getStatistics().setStatisticsEnabled(true)</literal> "
+"or <literal>hibernateStatsBean.setStatisticsEnabled(true)</literal>"
 msgstr ""
+"在运行期间,则可以可以通过<literal>sf.getStatistics().setStatisticsEnabled"
+"(true)</literal> 或<literal>hibernateStatsBean.setStatisticsEnabled(true)</"
+"literal>"
 
-#: index.docbook:1199
-msgid "Statistics can be reset programatically using the <literal>clear()</literal> method. A summary can be sent to a logger (info level) using the <literal>logSummary()</literal> method."
+#. Tag: para
+#: performance.xml:1199
+#, no-c-format
+msgid ""
+"Statistics can be reset programatically using the <literal>clear()</literal> "
+"method. A summary can be sent to a logger (info level) using the "
+"<literal>logSummary()</literal> method."
 msgstr ""
+"你也可以在程序中调用<literal>clear()</literal>方法重置统计数据,调用"
+"<literal>logSummary()</literal> 在日志中记录(info级别)其总结。"
 
-#: index.docbook:1208
+#. Tag: title
+#: performance.xml:1208
+#, no-c-format
 msgid "Metrics"
-msgstr ""
+msgstr "数据记录(Metrics)"
 
-#: index.docbook:1210
-msgid "Hibernate provides a number of metrics, from very basic to the specialized information only relevant in certain scenarios. All available counters are described in the <literal>Statistics</literal> interface API, in three categories:"
+#. Tag: para
+#: performance.xml:1210
+#, no-c-format
+msgid ""
+"Hibernate provides a number of metrics, from very basic to the specialized "
+"information only relevant in certain scenarios. All available counters are "
+"described in the <literal>Statistics</literal> interface API, in three "
+"categories:"
 msgstr ""
+"Hibernate提供了一系列数据记录,其记录的内容包括从最基本的信息到与具体场景的特"
+"殊信息。所有的测量值都可以由 <literal>Statistics</literal>接口进行访问,主要"
+"分为三类:"
 
-#: index.docbook:1217
-msgid "Metrics related to the general <literal>Session</literal> usage, such as number of open sessions, retrieved JDBC connections, etc."
+#. Tag: para
+#: performance.xml:1217
+#, no-c-format
+msgid ""
+"Metrics related to the general <literal>Session</literal> usage, such as "
+"number of open sessions, retrieved JDBC connections, etc."
 msgstr ""
+"使用<literal>Session</literal>的普通数据记录,例如打开的Session的个数、取得的"
+"JDBC的连接数等;"
 
-#: index.docbook:1223
-msgid "Metrics related to he entities, collections, queries, and caches as a whole (aka global metrics),"
-msgstr ""
+#. Tag: para
+#: performance.xml:1223
+#, no-c-format
+msgid ""
+"Metrics related to he entities, collections, queries, and caches as a whole "
+"(aka global metrics),"
+msgstr "实体、集合、查询、缓存等内容的统一数据记录"
 
-#: index.docbook:1229
-msgid "Detailed metrics related to a particular entity, collection, query or cache region."
-msgstr ""
+#. Tag: para
+#: performance.xml:1229
+#, no-c-format
+msgid ""
+"Detailed metrics related to a particular entity, collection, query or cache "
+"region."
+msgstr "和具体实体、集合、查询、缓存相关的详细数据记录"
 
-#: index.docbook:1236
-msgid "For exampl,e you can check the cache hit, miss, and put ratio of entities, collections and queries, and the average time a query needs. Beware that the number of milliseconds is subject to approximation in Java. Hibernate is tied to the JVM precision, on some platforms this might even only be accurate to 10 seconds."
+#. Tag: para
+#: performance.xml:1236
+#, no-c-format
+msgid ""
+"For exampl,e you can check the cache hit, miss, and put ratio of entities, "
+"collections and queries, and the average time a query needs. Beware that the "
+"number of milliseconds is subject to approximation in Java. Hibernate is "
+"tied to the JVM precision, on some platforms this might even only be "
+"accurate to 10 seconds."
 msgstr ""
+"例如:你可以检查缓存的命中成功次数,缓存的命中失败次数,实体、集合和查询的使"
+"用概率,查询的平均时间等。请注意 Java中时间的近似精度是毫秒。Hibernate的数据"
+"精度和具体的JVM有关,在有些平台上其精度甚至只能精确到10秒。"
 
-#: index.docbook:1243
-msgid "Simple getters are used to access the global metrics (i.e. not tied to a particular entity, collection, cache region, etc.). You can access the metrics of a particular entity, collection or cache region through its name, and through its HQL or SQL representation for queries. Please refer to the <literal>Statistics</literal>, <literal>EntityStatistics</literal>, <literal>CollectionStatistics</literal>, <literal>SecondLevelCacheStatistics</literal>, and <literal>QueryStatistics</literal> API Javadoc for more information. The following code shows a simple example:"
+#. Tag: para
+#: performance.xml:1243
+#, no-c-format
+msgid ""
+"Simple getters are used to access the global metrics (i.e. not tied to a "
+"particular entity, collection, cache region, etc.). You can access the "
+"metrics of a particular entity, collection or cache region through its name, "
+"and through its HQL or SQL representation for queries. Please refer to the "
+"<literal>Statistics</literal>, <literal>EntityStatistics</literal>, "
+"<literal>CollectionStatistics</literal>, "
+"<literal>SecondLevelCacheStatistics</literal>, and <literal>QueryStatistics</"
+"literal> API Javadoc for more information. The following code shows a simple "
+"example:"
 msgstr ""
+"你可以直接使用getter方法得到全局数据记录(例如,和具体的实体、集合、缓存区无"
+"关的数据),你也可以在具体查询中通过标记实体名、 或HQL、SQL语句得到某实体的数"
+"据记录。请参考<literal>Statistics</literal>、<literal>EntityStatistics</"
+"literal>、 <literal>CollectionStatistics</literal>、"
+"<literal>SecondLevelCacheStatistics</literal>、 和<literal>QueryStatistics</"
+"literal>的API文档以抓取更多信息。下面的代码则是个简单的例子:"
 
-#: index.docbook:1253
+#. Tag: programlisting
+#: performance.xml:1253
+#, no-c-format
 msgid ""
-      "<![CDATA[Statistics stats = HibernateUtil.sessionFactory.getStatistics();\n"
-      "\n"
-      "double queryCacheHitCount  = stats.getQueryCacheHitCount();\n"
-      "double queryCacheMissCount = stats.getQueryCacheMissCount();\n"
-      "double queryCacheHitRatio =\n"
-      "  queryCacheHitCount / (queryCacheHitCount + queryCacheMissCount);\n"
-      "\n"
-      "log.info(\"Query Hit ratio:\" + queryCacheHitRatio);\n"
-      "\n"
-      "EntityStatistics entityStats =\n"
-      "  stats.getEntityStatistics( Cat.class.getName() );\n"
-      "long changes =\n"
-      "        entityStats.getInsertCount()\n"
-      "        + entityStats.getUpdateCount()\n"
-      "        + entityStats.getDeleteCount();\n"
-      "log.info(Cat.class.getName() + \" changed \" + changes + \"times\"  );]]>"
+"<![CDATA[Statistics stats = HibernateUtil.sessionFactory.getStatistics();\n"
+"\n"
+"double queryCacheHitCount  = stats.getQueryCacheHitCount();\n"
+"double queryCacheMissCount = stats.getQueryCacheMissCount();\n"
+"double queryCacheHitRatio =\n"
+"  queryCacheHitCount / (queryCacheHitCount + queryCacheMissCount);\n"
+"\n"
+"log.info(\"Query Hit ratio:\" + queryCacheHitRatio);\n"
+"\n"
+"EntityStatistics entityStats =\n"
+"  stats.getEntityStatistics( Cat.class.getName() );\n"
+"long changes =\n"
+"        entityStats.getInsertCount()\n"
+"        + entityStats.getUpdateCount()\n"
+"        + entityStats.getDeleteCount();\n"
+"log.info(Cat.class.getName() + \" changed \" + changes + \"times\"  );]]>"
 msgstr ""
 
-#: index.docbook:1255
-msgid "To work on all entities, collections, queries and region caches, you can retrieve the list of names of entities, collections, queries and region caches with the following methods: <literal>getQueries()</literal>, <literal>getEntityNames()</literal>, <literal>getCollectionRoleNames()</literal>, and <literal>getSecondLevelCacheRegionNames()</literal>."
+#. Tag: para
+#: performance.xml:1255
+#, no-c-format
+msgid ""
+"To work on all entities, collections, queries and region caches, you can "
+"retrieve the list of names of entities, collections, queries and region "
+"caches with the following methods: <literal>getQueries()</literal>, "
+"<literal>getEntityNames()</literal>, <literal>getCollectionRoleNames()</"
+"literal>, and <literal>getSecondLevelCacheRegionNames()</literal>."
 msgstr ""
+"如果你想得到所有实体、集合、查询和缓存区的数据,你可以通过以下方法获得实体、"
+"集合、查询和缓存区列表: <literal>getQueries()</literal>、"
+"<literal>getEntityNames()</literal>、 <literal>getCollectionRoleNames()</"
+"literal>和 <literal>getSecondLevelCacheRegionNames()</literal>。"
 
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+#~ msgid "yes"
+#~ msgstr "yes"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/persistent_classes.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/persistent_classes.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/persistent_classes.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,446 +1,809 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: persistent_classes.xml:5
+#, no-c-format
 msgid "Persistent Classes"
-msgstr ""
+msgstr "持久化类(Persistent Classes)"
 
-#: index.docbook:7
-msgid "Persistent classes are classes in an application that implement the entities of the business problem (e.g. Customer and Order in an E-commerce application). Not all instances of a persistent class are considered to be in the persistent state - an instance may instead be transient or detached."
+#. Tag: para
+#: persistent_classes.xml:7
+#, no-c-format
+msgid ""
+"Persistent classes are classes in an application that implement the entities "
+"of the business problem (e.g. Customer and Order in an E-commerce "
+"application). Not all instances of a persistent class are considered to be "
+"in the persistent state - an instance may instead be transient or detached."
 msgstr ""
+"在应用程序中,用来实现业务问题实体的(如,在电子商务应用程序中的Customer和"
+"Order) 类就是持久化类。不能认为所有的持久化类的实例都是持久的状态——一个实例"
+"的状态也可能 是瞬时的或脱管的。"
 
-#: index.docbook:14
-msgid "Hibernate works best if these classes follow some simple rules, also known as the Plain Old Java Object (POJO) programming model. However, none of these rules are hard requirements. Indeed, Hibernate3 assumes very little about the nature of your persistent objects. You may express a domain model in other ways: using trees of <literal>Map</literal> instances, for example."
+#. Tag: para
+#: persistent_classes.xml:14
+#, no-c-format
+msgid ""
+"Hibernate works best if these classes follow some simple rules, also known "
+"as the Plain Old Java Object (POJO) programming model. However, none of "
+"these rules are hard requirements. Indeed, Hibernate3 assumes very little "
+"about the nature of your persistent objects. You may express a domain model "
+"in other ways: using trees of <literal>Map</literal> instances, for example."
 msgstr ""
+"如果这些持久化类遵循一些简单的规则,Hibernate能够工作得更好,这些规则也被称"
+"作 简单传统Java对象(POJO:Plain Old Java Object)编程模型。但是这些规则并不是必"
+"需的。 实际上,Hibernate3对于你的持久化类几乎不做任何设想。你可以用其他的方法"
+"来表达领域模型: 比如,使用<literal>Map</literal>实例的树型结构。"
 
-#: index.docbook:23
+#. Tag: title
+#: persistent_classes.xml:23
+#, no-c-format
 msgid "A simple POJO example"
-msgstr ""
+msgstr "一个简单的POJO例子"
 
-#: index.docbook:25
+#. Tag: para
+#: persistent_classes.xml:25
+#, no-c-format
 msgid "Most Java applications require a persistent class representing felines."
-msgstr ""
+msgstr "大多数Java程序需要用一个持久化类来表示猫科动物。"
 
-#: index.docbook:29
+#. Tag: programlisting
+#: persistent_classes.xml:29
+#, no-c-format
 msgid ""
-      "<![CDATA[package eg;\n"
-      "import java.util.Set;\n"
-      "import java.util.Date;\n"
-      "\n"
-      "public class Cat {\n"
-      "    private Long id; // identifier\n"
-      "\n"
-      "    private Date birthdate;\n"
-      "    private Color color;\n"
-      "    private char sex;\n"
-      "    private float weight;\n"
-      "    private int litterId;\n"
-      "\n"
-      "    private Cat mother;\n"
-      "    private Set kittens = new HashSet();\n"
-      "\n"
-      "    private void setId(Long id) {\n"
-      "        this.id=id;\n"
-      "    }\n"
-      "    public Long getId() {\n"
-      "        return id;\n"
-      "    }\n"
-      "\n"
-      "    void setBirthdate(Date date) {\n"
-      "        birthdate = date;\n"
-      "    }\n"
-      "    public Date getBirthdate() {\n"
-      "        return birthdate;\n"
-      "    }\n"
-      "\n"
-      "    void setWeight(float weight) {\n"
-      "        this.weight = weight;\n"
-      "    }\n"
-      "    public float getWeight() {\n"
-      "        return weight;\n"
-      "    }\n"
-      "\n"
-      "    public Color getColor() {\n"
-      "        return color;\n"
-      "    }\n"
-      "    void setColor(Color color) {\n"
-      "        this.color = color;\n"
-      "    }\n"
-      "\n"
-      "    void setSex(char sex) {\n"
-      "        this.sex=sex;\n"
-      "    }\n"
-      "    public char getSex() {\n"
-      "        return sex;\n"
-      "    }\n"
-      "\n"
-      "    void setLitterId(int id) {\n"
-      "        this.litterId = id;\n"
-      "    }\n"
-      "    public int getLitterId() {\n"
-      "        return litterId;\n"
-      "    }\n"
-      "\n"
-      "    void setMother(Cat mother) {\n"
-      "        this.mother = mother;\n"
-      "    }\n"
-      "    public Cat getMother() {\n"
-      "        return mother;\n"
-      "    }\n"
-      "    void setKittens(Set kittens) {\n"
-      "        this.kittens = kittens;\n"
-      "    }\n"
-      "    public Set getKittens() {\n"
-      "        return kittens;\n"
-      "    }\n"
-      "    \n"
-      "    // addKitten not needed by Hibernate\n"
-      "    public void addKitten(Cat kitten) {\n"
-      "            kitten.setMother(this);\n"
-      "        kitten.setLitterId( kittens.size() ); \n"
-      "        kittens.add(kitten);\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[package eg;\n"
+"import java.util.Set;\n"
+"import java.util.Date;\n"
+"\n"
+"public class Cat {\n"
+"    private Long id; // identifier\n"
+"\n"
+"    private Date birthdate;\n"
+"    private Color color;\n"
+"    private char sex;\n"
+"    private float weight;\n"
+"    private int litterId;\n"
+"\n"
+"    private Cat mother;\n"
+"    private Set kittens = new HashSet();\n"
+"\n"
+"    private void setId(Long id) {\n"
+"        this.id=id;\n"
+"    }\n"
+"    public Long getId() {\n"
+"        return id;\n"
+"    }\n"
+"\n"
+"    void setBirthdate(Date date) {\n"
+"        birthdate = date;\n"
+"    }\n"
+"    public Date getBirthdate() {\n"
+"        return birthdate;\n"
+"    }\n"
+"\n"
+"    void setWeight(float weight) {\n"
+"        this.weight = weight;\n"
+"    }\n"
+"    public float getWeight() {\n"
+"        return weight;\n"
+"    }\n"
+"\n"
+"    public Color getColor() {\n"
+"        return color;\n"
+"    }\n"
+"    void setColor(Color color) {\n"
+"        this.color = color;\n"
+"    }\n"
+"\n"
+"    void setSex(char sex) {\n"
+"        this.sex=sex;\n"
+"    }\n"
+"    public char getSex() {\n"
+"        return sex;\n"
+"    }\n"
+"\n"
+"    void setLitterId(int id) {\n"
+"        this.litterId = id;\n"
+"    }\n"
+"    public int getLitterId() {\n"
+"        return litterId;\n"
+"    }\n"
+"\n"
+"    void setMother(Cat mother) {\n"
+"        this.mother = mother;\n"
+"    }\n"
+"    public Cat getMother() {\n"
+"        return mother;\n"
+"    }\n"
+"    void setKittens(Set kittens) {\n"
+"        this.kittens = kittens;\n"
+"    }\n"
+"    public Set getKittens() {\n"
+"        return kittens;\n"
+"    }\n"
+"    \n"
+"    // addKitten not needed by Hibernate\n"
+"    public void addKitten(Cat kitten) {\n"
+"            kitten.setMother(this);\n"
+"        kitten.setLitterId( kittens.size() ); \n"
+"        kittens.add(kitten);\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:31
+#. Tag: para
+#: persistent_classes.xml:31
+#, no-c-format
 msgid "There are four main rules to follow here:"
-msgstr ""
+msgstr "这里要遵循四条主要的规则:"
 
-#: index.docbook:37
+#. Tag: title
+#: persistent_classes.xml:37
+#, no-c-format
 msgid "Implement a no-argument constructor"
-msgstr ""
+msgstr "实现一个默认的(即无参数的)构造方法(constructor)"
 
-#: index.docbook:39
-msgid "<literal>Cat</literal> has a no-argument constructor. All persistent classes must have a default constructor (which may be non-public) so that Hibernate can instantiate them using <literal>Constructor.newInstance()</literal>. We strongly recommend having a default constructor with at least <emphasis>package</emphasis> visibility for runtime proxy generation in Hibernate."
+#. Tag: para
+#: persistent_classes.xml:39
+#, no-c-format
+msgid ""
+"<literal>Cat</literal> has a no-argument constructor. All persistent classes "
+"must have a default constructor (which may be non-public) so that Hibernate "
+"can instantiate them using <literal>Constructor.newInstance()</literal>. We "
+"strongly recommend having a default constructor with at least "
+"<emphasis>package</emphasis> visibility for runtime proxy generation in "
+"Hibernate."
 msgstr ""
+"<literal>Cat</literal>有一个无参数的构造方法。所有的持久化类都必须有一个 默认"
+"的构造方法(可以不是public的),这样的话Hibernate就可以使用 "
+"<literal>Constructor.newInstance()</literal>来实例化它们。 我们强烈建议,在"
+"Hibernate中,为了运行期代理的生成,构造方法至少是 <emphasis>包(package)</"
+"emphasis>内可见的。"
 
-#: index.docbook:49
+#. Tag: title
+#: persistent_classes.xml:49
+#, no-c-format
 msgid "Provide an identifier property (optional)"
-msgstr ""
+msgstr "提供一个标识属性(identifier property)(可选)"
 
-#: index.docbook:51
-msgid "<literal>Cat</literal> has a property called <literal>id</literal>. This property maps to the primary key column of a database table. The property might have been called anything, and its type might have been any primitive type, any primitive \"wrapper\" type, <literal>java.lang.String</literal> or <literal>java.util.Date</literal>. (If your legacy database table has composite keys, you can even use a user-defined class with properties of these types - see the section on composite identifiers later.)"
+#. Tag: para
+#: persistent_classes.xml:51
+#, no-c-format
+msgid ""
+"<literal>Cat</literal> has a property called <literal>id</literal>. This "
+"property maps to the primary key column of a database table. The property "
+"might have been called anything, and its type might have been any primitive "
+"type, any primitive \"wrapper\" type, <literal>java.lang.String</literal> or "
+"<literal>java.util.Date</literal>. (If your legacy database table has "
+"composite keys, you can even use a user-defined class with properties of "
+"these types - see the section on composite identifiers later.)"
 msgstr ""
+"<literal>Cat</literal>有一个属性叫做<literal>id</literal>。这个属性映射数据库"
+"表的主 键字段。这个属性可以叫任何名字,其类型可以是任何的原始类型、原始类型的"
+"包装类型、 <literal>java.lang.String</literal> 或者是 <literal>java.util."
+"Date</literal>。 (如果你的遗留数据库表有联合主键,你甚至可以用一个用户自定义"
+"的类,该类拥有这些类型 的属性。参见后面的关于联合标识符的章节。)"
 
-#: index.docbook:60
-msgid "The identifier property is strictly optional. You can leave them off and let Hibernate keep track of object identifiers internally. We do not recommend this, however."
+#. Tag: para
+#: persistent_classes.xml:60
+#, no-c-format
+msgid ""
+"The identifier property is strictly optional. You can leave them off and let "
+"Hibernate keep track of object identifiers internally. We do not recommend "
+"this, however."
 msgstr ""
+"标识符属性是可选的。可以不用管它,让Hibernate内部来追踪对象的识别。 但是我们"
+"并不推荐这样做。"
 
-#: index.docbook:65
-msgid "In fact, some functionality is available only to classes which declare an identifier property:"
-msgstr ""
+#. Tag: para
+#: persistent_classes.xml:65
+#, no-c-format
+msgid ""
+"In fact, some functionality is available only to classes which declare an "
+"identifier property:"
+msgstr "实际上,一些功能只对那些声明了标识符属性的类起作用:"
 
-#: index.docbook:72
-msgid "Transitive reattachment for detached objects (cascade update or cascade merge) - see"
+#. Tag: para
+#: persistent_classes.xml:72
+#, fuzzy, no-c-format
+msgid ""
+"Transitive reattachment for detached objects (cascade update or cascade "
+"merge) - see"
 msgstr ""
+"托管对象的传播性再连接(级联更新或级联合并) ——参阅 <xref linkend="
+"\"objectstate-transitive\"/>"
 
-#: index.docbook:79
+#. Tag: literal
+#: persistent_classes.xml:79
+#, no-c-format
 msgid "Session.saveOrUpdate()"
-msgstr ""
+msgstr "Session.saveOrUpdate()"
 
-#: index.docbook:84
+#. Tag: literal
+#: persistent_classes.xml:84
+#, no-c-format
 msgid "Session.merge()"
-msgstr ""
+msgstr "Session.merge()"
 
-#: index.docbook:89
-msgid "We recommend you declare consistently-named identifier properties on persistent classes. We further recommend that you use a nullable (ie. non-primitive) type."
+#. Tag: para
+#: persistent_classes.xml:89
+#, no-c-format
+msgid ""
+"We recommend you declare consistently-named identifier properties on "
+"persistent classes. We further recommend that you use a nullable (ie. non-"
+"primitive) type."
 msgstr ""
+"我们建议你对持久化类声明命名一致的标识属性。我们还建议你使用一 个可以为空(也"
+"就是说,不是原始类型)的类型。"
 
-#: index.docbook:96
+#. Tag: title
+#: persistent_classes.xml:96
+#, no-c-format
 msgid "Prefer non-final classes (optional)"
-msgstr ""
+msgstr "使用非final的类 (可选)"
 
-#: index.docbook:97
-msgid "A central feature of Hibernate, <emphasis>proxies</emphasis>, depends upon the persistent class being either non-final, or the implementation of an interface that declares all public methods."
+#. Tag: para
+#: persistent_classes.xml:97
+#, no-c-format
+msgid ""
+"A central feature of Hibernate, <emphasis>proxies</emphasis>, depends upon "
+"the persistent class being either non-final, or the implementation of an "
+"interface that declares all public methods."
 msgstr ""
+"<emphasis>代理(proxies)</emphasis>是Hibernate的一个重要的功能,它依赖的条件"
+"是,持久 化类或者是非final的,或者是实现了一个所有方法都声明为public的接口。"
 
-#: index.docbook:102
-msgid "You can persist <literal>final</literal> classes that do not implement an interface with Hibernate, but you won't be able to use proxies for lazy association fetching - which will limit your options for performance tuning."
+#. Tag: para
+#: persistent_classes.xml:102
+#, no-c-format
+msgid ""
+"You can persist <literal>final</literal> classes that do not implement an "
+"interface with Hibernate, but you won't be able to use proxies for lazy "
+"association fetching - which will limit your options for performance tuning."
 msgstr ""
+"你可以用Hibernate持久化一个没有实现任何接口的<literal>final</literal>类,但是"
+"你 不能使用代理来延迟关联加载,这会限制你进行性能优化的选择。"
 
-#: index.docbook:107
-msgid "You should also avoid declaring <literal>public final</literal> methods on the non-final classes. If you want to use a class with a <literal>public final</literal> method, you must explicitly disable proxying by setting <literal>lazy=\"false\"</literal>."
+#. Tag: para
+#: persistent_classes.xml:107
+#, no-c-format
+msgid ""
+"You should also avoid declaring <literal>public final</literal> methods on "
+"the non-final classes. If you want to use a class with a <literal>public "
+"final</literal> method, you must explicitly disable proxying by setting "
+"<literal>lazy=\"false\"</literal>."
 msgstr ""
+"你也应该避免在非final类中声明 <literal>public final</literal>的方法。如果你想"
+"使用一 个有<literal>public final</literal>方法的类,你必须通过设置"
+"<literal>lazy=\"false\"</literal> 来明确地禁用代理。"
 
-#: index.docbook:115
+#. Tag: title
+#: persistent_classes.xml:115
+#, no-c-format
 msgid "Declare accessors and mutators for persistent fields (optional)"
-msgstr ""
+msgstr "为持久化字段声明访问器(accessors)和是否可变的标志(mutators)(可选)"
 
-#: index.docbook:117
-msgid "<literal>Cat</literal> declares accessor methods for all its persistent fields. Many other ORM tools directly persist instance variables. We believe it is better to provide an indirection between the relational schema and internal data structures of the class. By default, Hibernate persists JavaBeans style properties, and recognizes method names of the form <literal>getFoo</literal>, <literal>isFoo</literal> and <literal>setFoo</literal>. You may switch to direct field access for particular properties, if needed."
+#. Tag: para
+#: persistent_classes.xml:117
+#, no-c-format
+msgid ""
+"<literal>Cat</literal> declares accessor methods for all its persistent "
+"fields. Many other ORM tools directly persist instance variables. We believe "
+"it is better to provide an indirection between the relational schema and "
+"internal data structures of the class. By default, Hibernate persists "
+"JavaBeans style properties, and recognizes method names of the form "
+"<literal>getFoo</literal>, <literal>isFoo</literal> and <literal>setFoo</"
+"literal>. You may switch to direct field access for particular properties, "
+"if needed."
 msgstr ""
+"<literal>Cat</literal>为它的所有持久化字段声明了访问方法。很多其他ORM工具直接"
+"对 实例变量进行持久化。我们相信,在关系数据库schema和类的内部数据结构之间引入"
+"间接层(原文为\"非直接\",indirection)会好一些。默认情况下Hibernate持久化"
+"JavaBeans风格的属性,认可 <literal>getFoo</literal>,<literal>isFoo</"
+"literal> 和 <literal>setFoo</literal>这种形式的方法名。 如果需要,你可以对某"
+"些特定属性实行直接字段访问。"
 
-#: index.docbook:127
-msgid "Properties need <emphasis>not</emphasis> be declared public - Hibernate can persist a property with a default, <literal>protected</literal> or <literal>private</literal> get / set pair."
+#. Tag: para
+#: persistent_classes.xml:127
+#, no-c-format
+msgid ""
+"Properties need <emphasis>not</emphasis> be declared public - Hibernate can "
+"persist a property with a default, <literal>protected</literal> or "
+"<literal>private</literal> get / set pair."
 msgstr ""
+"属性<emphasis>不需要</emphasis>要声明为public的。Hibernate可以持久化一个有 "
+"<literal>default</literal>、<literal>protected</literal>或<literal>private</"
+"literal>的get/set方法对 的属性进行持久化。"
 
-#: index.docbook:138
+#. Tag: title
+#: persistent_classes.xml:138
+#, no-c-format
 msgid "Implementing inheritance"
-msgstr ""
+msgstr "实现继承(Inheritance)"
 
-#: index.docbook:140
-msgid "A subclass must also observe the first and second rules. It inherits its identifier property from the superclass, <literal>Cat</literal>."
+#. Tag: para
+#: persistent_classes.xml:140
+#, no-c-format
+msgid ""
+"A subclass must also observe the first and second rules. It inherits its "
+"identifier property from the superclass, <literal>Cat</literal>."
 msgstr ""
+"子类也必须遵守第一条和第二条规则。它从超类<literal>Cat</literal>继承了标识属"
+"性。"
 
-#: index.docbook:145
+#. Tag: programlisting
+#: persistent_classes.xml:145
+#, no-c-format
 msgid ""
-      "<![CDATA[package eg;\n"
-      "\n"
-      "public class DomesticCat extends Cat {\n"
-      "        private String name;\n"
-      "\n"
-      "        public String getName() {\n"
-      "                return name;\n"
-      "        }\n"
-      "        protected void setName(String name) {\n"
-      "                this.name=name;\n"
-      "        }\n"
-      "}]]>"
+"<![CDATA[package eg;\n"
+"\n"
+"public class DomesticCat extends Cat {\n"
+"        private String name;\n"
+"\n"
+"        public String getName() {\n"
+"                return name;\n"
+"        }\n"
+"        protected void setName(String name) {\n"
+"                this.name=name;\n"
+"        }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:149
-msgid "Implementing <literal>equals()</literal> and <literal>hashCode()</literal>"
-msgstr ""
+#. Tag: title
+#: persistent_classes.xml:149
+#, no-c-format
+msgid ""
+"Implementing <literal>equals()</literal> and <literal>hashCode()</literal>"
+msgstr "实现<literal>equals()</literal>和<literal>hashCode()</literal>"
 
-#: index.docbook:151
-msgid "You have to override the <literal>equals()</literal> and <literal>hashCode()</literal> methods if you"
+#. Tag: para
+#: persistent_classes.xml:151
+#, no-c-format
+msgid ""
+"You have to override the <literal>equals()</literal> and <literal>hashCode()"
+"</literal> methods if you"
 msgstr ""
+"如果你有如下需求,你必须重载 <literal>equals()</literal> 和 <literal>hashCode"
+"()</literal>方法:"
 
-#: index.docbook:157
-msgid "intend to put instances of persistent classes in a <literal>Set</literal> (the recommended way to represent many-valued associations) <emphasis>and</emphasis>"
+#. Tag: para
+#: persistent_classes.xml:157
+#, no-c-format
+msgid ""
+"intend to put instances of persistent classes in a <literal>Set</literal> "
+"(the recommended way to represent many-valued associations) <emphasis>and</"
+"emphasis>"
 msgstr ""
+"想把持久类的实例放入<literal>Set</literal>中(当表示多值关联时,推荐这么做)"
 
-#: index.docbook:164
+#. Tag: para
+#: persistent_classes.xml:164
+#, no-c-format
 msgid "intend to use reattachment of detached instances"
-msgstr ""
+msgstr "想重用脱管实例"
 
-#: index.docbook:170
-msgid "Hibernate guarantees equivalence of persistent identity (database row) and Java identity only inside a particular session scope. So as soon as we mix instances retrieved in different sessions, we must implement <literal>equals()</literal> and <literal>hashCode()</literal> if we wish to have meaningful semantics for <literal>Set</literal>s."
+#. Tag: para
+#: persistent_classes.xml:170
+#, no-c-format
+msgid ""
+"Hibernate guarantees equivalence of persistent identity (database row) and "
+"Java identity only inside a particular session scope. So as soon as we mix "
+"instances retrieved in different sessions, we must implement <literal>equals"
+"()</literal> and <literal>hashCode()</literal> if we wish to have meaningful "
+"semantics for <literal>Set</literal>s."
 msgstr ""
+"Hibernate保证,仅在特定会话范围内,持久化标识(数据库的行)和Java标识是等价"
+"的。因此,一旦 我们混合了从不同会话中获取的实例,如果希望<literal>Set</"
+"literal>有明确的语义,就必 须实现<literal>equals()</literal> 和"
+"<literal>hashCode()</literal>。"
 
-#: index.docbook:178
-msgid "The most obvious way is to implement <literal>equals()</literal>/<literal>hashCode()</literal> by comparing the identifier value of both objects. If the value is the same, both must be the same database row, they are therefore equal (if both are added to a <literal>Set</literal>, we will only have one element in the <literal>Set</literal>). Unfortunately, we can't use that approach with generated identifiers! Hibernate will only assign identifier values to objects that are persistent, a newly created instance will not have any identifier value! Furthermore, if an instance is unsaved and currently in a <literal>Set</literal>, saving it will assign an identifier value to the object. If <literal>equals()</literal> and <literal>hashCode()</literal> are based on the identifier value, the hash code would change, breaking the contract of the <literal>Set</literal>. See the Hibernate website for a full discussion of this problem. Note that this is not a Hibernate issue, but !
 normal Java semantics of object identity and equality."
+#. Tag: para
+#: persistent_classes.xml:178
+#, no-c-format
+msgid ""
+"The most obvious way is to implement <literal>equals()</literal>/"
+"<literal>hashCode()</literal> by comparing the identifier value of both "
+"objects. If the value is the same, both must be the same database row, they "
+"are therefore equal (if both are added to a <literal>Set</literal>, we will "
+"only have one element in the <literal>Set</literal>). Unfortunately, we "
+"can't use that approach with generated identifiers! Hibernate will only "
+"assign identifier values to objects that are persistent, a newly created "
+"instance will not have any identifier value! Furthermore, if an instance is "
+"unsaved and currently in a <literal>Set</literal>, saving it will assign an "
+"identifier value to the object. If <literal>equals()</literal> and "
+"<literal>hashCode()</literal> are based on the identifier value, the hash "
+"code would change, breaking the contract of the <literal>Set</literal>. See "
+"the Hibernate website for a full discussion of this problem. Note that this "
+"is not a Hibernate issue, but normal Java semantics of object identity and "
+"equality."
 msgstr ""
+"实现<literal>equals()</literal>/<literal>hashCode()</literal>最显而易见的方法"
+"是比较两个对象 标识符的值。如果值相同,则两个对象对应于数据库的同一行,因此它"
+"们是相等的(如果都被添加到 <literal>Set</literal>,则在<literal>Set</literal>"
+"中只有一个元素)。不幸的是,对生成的标识不能 使用这种方法。Hibernate仅对那些"
+"持久化对象赋标识值,一个新创建的实例将不会有任何标识值。此外, 如果一个实例没"
+"有被保存(unsaved),并且它当前正在一个<literal>Set</literal>中,保存它将会给这"
+"个对象 赋一个标识值。如果<literal>equals()</literal> 和 <literal>hashCode()</"
+"literal>是基于标识值 实现的,则其哈希码将会改变,这违反了<literal>Set</"
+"literal>的契约。建议去Hibernate的站点阅读关于这个 问题的全部讨论。注意,这不"
+"是Hibernate的问题,而是一般的Java对象标识和Java对象等价的语义问题。"
 
-#: index.docbook:192
-msgid "We recommend implementing <literal>equals()</literal> and <literal>hashCode()</literal> using <emphasis>Business key equality</emphasis>. Business key equality means that the <literal>equals()</literal> method compares only the properties that form the business key, a key that would identify our instance in the real world (a <emphasis>natural</emphasis> candidate key):"
+#. Tag: para
+#: persistent_classes.xml:192
+#, no-c-format
+msgid ""
+"We recommend implementing <literal>equals()</literal> and <literal>hashCode()"
+"</literal> using <emphasis>Business key equality</emphasis>. Business key "
+"equality means that the <literal>equals()</literal> method compares only the "
+"properties that form the business key, a key that would identify our "
+"instance in the real world (a <emphasis>natural</emphasis> candidate key):"
 msgstr ""
+"我们建议使用<emphasis>业务键值相等(Business key equality)</emphasis>来实现"
+"<literal>equals()</literal> 和 <literal>hashCode()</literal>。业务键值相等的"
+"意思是,<literal>equals()</literal>方法 仅仅比较形成业务键的属性,它能在现实"
+"世界里标识我们的实例(是一个<emphasis>自然的</emphasis>候选码)。"
 
-#: index.docbook:200
+#. Tag: programlisting
+#: persistent_classes.xml:200
+#, no-c-format
 msgid ""
-      "<![CDATA[public class Cat {\n"
-      "\n"
-      "    ...\n"
-      "    public boolean equals(Object other) {\n"
-      "        if (this == other) return true;\n"
-      "        if ( !(other instanceof Cat) ) return false;\n"
-      "\n"
-      "        final Cat cat = (Cat) other;\n"
-      "\n"
-      "        if ( !cat.getLitterId().equals( getLitterId() ) ) return false;\n"
-      "        if ( !cat.getMother().equals( getMother() ) ) return false;\n"
-      "\n"
-      "        return true;\n"
-      "    }\n"
-      "\n"
-      "    public int hashCode() {\n"
-      "        int result;\n"
-      "        result = getMother().hashCode();\n"
-      "        result = 29 * result + getLitterId();\n"
-      "        return result;\n"
-      "    }\n"
-      "\n"
-      "}]]>"
+"<![CDATA[public class Cat {\n"
+"\n"
+"    ...\n"
+"    public boolean equals(Object other) {\n"
+"        if (this == other) return true;\n"
+"        if ( !(other instanceof Cat) ) return false;\n"
+"\n"
+"        final Cat cat = (Cat) other;\n"
+"\n"
+"        if ( !cat.getLitterId().equals( getLitterId() ) ) return false;\n"
+"        if ( !cat.getMother().equals( getMother() ) ) return false;\n"
+"\n"
+"        return true;\n"
+"    }\n"
+"\n"
+"    public int hashCode() {\n"
+"        int result;\n"
+"        result = getMother().hashCode();\n"
+"        result = 29 * result + getLitterId();\n"
+"        return result;\n"
+"    }\n"
+"\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:202
-msgid "Note that a business key does not have to be as solid as a database primary key candidate (see <xref linkend=\"transactions-basics-identity\"/>). Immutable or unique properties are usually good candidates for a business key."
+#. Tag: para
+#: persistent_classes.xml:202
+#, no-c-format
+msgid ""
+"Note that a business key does not have to be as solid as a database primary "
+"key candidate (see <xref linkend=\"transactions-basics-identity\"/>). "
+"Immutable or unique properties are usually good candidates for a business "
+"key."
 msgstr ""
+"注意,业务键不必像数据库的主键那样固定不变(参见<xref linkend=\"transactions-"
+"basics-identity\"/>)。 对业务键而言,不可变或唯一的属性是不错的选择。"
 
-#: index.docbook:212
+#. Tag: title
+#: persistent_classes.xml:212
+#, no-c-format
 msgid "Dynamic models"
-msgstr ""
+msgstr "动态模型(Dynamic models)"
 
-#: index.docbook:215
-msgid "Note that the following features are currently considered experimental and may change in the near future."
-msgstr ""
+#. Tag: emphasis
+#: persistent_classes.xml:215
+#, no-c-format
+msgid ""
+"Note that the following features are currently considered experimental and "
+"may change in the near future."
+msgstr "注意,以下特性在当前处于试验阶段,将来可能会有变化。"
 
-#: index.docbook:219
-msgid "Persistent entities don't necessarily have to be represented as POJO classes or as JavaBean objects at runtime. Hibernate also supports dynamic models (using <literal>Map</literal>s of <literal>Map</literal>s at runtime) and the representation of entities as DOM4J trees. With this approach, you don't write persistent classes, only mapping files."
+#. Tag: para
+#: persistent_classes.xml:219
+#, no-c-format
+msgid ""
+"Persistent entities don't necessarily have to be represented as POJO classes "
+"or as JavaBean objects at runtime. Hibernate also supports dynamic models "
+"(using <literal>Map</literal>s of <literal>Map</literal>s at runtime) and "
+"the representation of entities as DOM4J trees. With this approach, you don't "
+"write persistent classes, only mapping files."
 msgstr ""
+"运行期的持久化实体没有必要一定表示为像POJO类或JavaBean对象那样的形式。"
+"Hibernate也支持动态模型 (在运行期使用<literal>Map</literal>的<literal>Map</"
+"literal>)和象DOM4J的树模型那 样的实体表示。使用这种方法,你不用写持久化类,"
+"只写映射文件就行了。"
 
-#: index.docbook:227
-msgid "By default, Hibernate works in normal POJO mode. You may set a default entity representation mode for a particular <literal>SessionFactory</literal> using the <literal>default_entity_mode</literal> configuration option (see <xref linkend=\"configuration-optional-properties\"/>."
+#. Tag: para
+#: persistent_classes.xml:227
+#, no-c-format
+msgid ""
+"By default, Hibernate works in normal POJO mode. You may set a default "
+"entity representation mode for a particular <literal>SessionFactory</"
+"literal> using the <literal>default_entity_mode</literal> configuration "
+"option (see <xref linkend=\"configuration-optional-properties\"/>."
 msgstr ""
+"Hibernate默认工作在普通POJO模式。你可以使用配置选项"
+"<literal>default_entity_mode</literal>, 对特定的<literal>SessionFactory</"
+"literal>,设置一个默认的实体表示模式。 (参见<xref linkend=\"configuration-"
+"optional-properties\"/>。)"
 
-#: index.docbook:234
-msgid "The following examples demonstrates the representation using <literal>Map</literal>s. First, in the mapping file, an <literal>entity-name</literal> has to be declared instead of (or in addition to) a class name:"
+#. Tag: para
+#: persistent_classes.xml:234
+#, no-c-format
+msgid ""
+"The following examples demonstrates the representation using <literal>Map</"
+"literal>s. First, in the mapping file, an <literal>entity-name</literal> has "
+"to be declared instead of (or in addition to) a class name:"
 msgstr ""
+"下面是用<literal>Map</literal>来表示的例子。首先,在映射文件中,要声明 "
+"<literal>entity-name</literal>来代替一个类名(或作为一种附属)。"
 
-#: index.docbook:240
+#. Tag: programlisting
+#: persistent_classes.xml:240
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "\n"
-      "    <class entity-name=\"Customer\">\n"
-      "\n"
-      "        <id name=\"id\"\n"
-      "            type=\"long\"\n"
-      "            column=\"ID\">\n"
-      "            <generator class=\"sequence\"/>\n"
-      "        </id>\n"
-      "\n"
-      "        <property name=\"name\"\n"
-      "            column=\"NAME\"\n"
-      "            type=\"string\"/>\n"
-      "\n"
-      "        <property name=\"address\"\n"
-      "            column=\"ADDRESS\"\n"
-      "            type=\"string\"/>\n"
-      "\n"
-      "        <many-to-one name=\"organization\"\n"
-      "            column=\"ORGANIZATION_ID\"\n"
-      "            class=\"Organization\"/>\n"
-      "\n"
-      "        <bag name=\"orders\"\n"
-      "            inverse=\"true\"\n"
-      "            lazy=\"false\"\n"
-      "            cascade=\"all\">\n"
-      "            <key column=\"CUSTOMER_ID\"/>\n"
-      "            <one-to-many class=\"Order\"/>\n"
-      "        </bag>\n"
-      "\n"
-      "    </class>\n"
-      "    \n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"\n"
+"    <class entity-name=\"Customer\">\n"
+"\n"
+"        <id name=\"id\"\n"
+"            type=\"long\"\n"
+"            column=\"ID\">\n"
+"            <generator class=\"sequence\"/>\n"
+"        </id>\n"
+"\n"
+"        <property name=\"name\"\n"
+"            column=\"NAME\"\n"
+"            type=\"string\"/>\n"
+"\n"
+"        <property name=\"address\"\n"
+"            column=\"ADDRESS\"\n"
+"            type=\"string\"/>\n"
+"\n"
+"        <many-to-one name=\"organization\"\n"
+"            column=\"ORGANIZATION_ID\"\n"
+"            class=\"Organization\"/>\n"
+"\n"
+"        <bag name=\"orders\"\n"
+"            inverse=\"true\"\n"
+"            lazy=\"false\"\n"
+"            cascade=\"all\">\n"
+"            <key column=\"CUSTOMER_ID\"/>\n"
+"            <one-to-many class=\"Order\"/>\n"
+"        </bag>\n"
+"\n"
+"    </class>\n"
+"    \n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:242
-msgid "Note that even though associations are declared using target class names, the target type of an associations may also be a dynamic entity instead of a POJO."
+#. Tag: para
+#: persistent_classes.xml:242
+#, no-c-format
+msgid ""
+"Note that even though associations are declared using target class names, "
+"the target type of an associations may also be a dynamic entity instead of a "
+"POJO."
 msgstr ""
+"注意,虽然是用目标类名来声明关联的,但是关联的目标类型除了是POJO之外,也可以 "
+"是一个动态的实体。"
 
-#: index.docbook:249
-msgid "After setting the default entity mode to <literal>dynamic-map</literal> for the <literal>SessionFactory</literal>, we can at runtime work with <literal>Map</literal>s of <literal>Map</literal>s:"
+#. Tag: para
+#: persistent_classes.xml:249
+#, no-c-format
+msgid ""
+"After setting the default entity mode to <literal>dynamic-map</literal> for "
+"the <literal>SessionFactory</literal>, we can at runtime work with "
+"<literal>Map</literal>s of <literal>Map</literal>s:"
 msgstr ""
+"在使用<literal>dynamic-map</literal>为<literal>SessionFactory</literal> 设置"
+"了默认的实体模式之后,可以在运行期使用<literal>Map</literal>的 <literal>Map</"
+"literal>。"
 
-#: index.docbook:255
+#. Tag: programlisting
+#: persistent_classes.xml:255
+#, no-c-format
 msgid ""
-      "<![CDATA[Session s = openSession();\n"
-      "Transaction tx = s.beginTransaction();\n"
-      "Session s = openSession();\n"
-      "\n"
-      "// Create a customer\n"
-      "Map david = new HashMap();\n"
-      "david.put(\"name\", \"David\");\n"
-      "\n"
-      "// Create an organization\n"
-      "Map foobar = new HashMap();\n"
-      "foobar.put(\"name\", \"Foobar Inc.\");\n"
-      "\n"
-      "// Link both\n"
-      "david.put(\"organization\", foobar);\n"
-      "\n"
-      "// Save both\n"
-      "s.save(\"Customer\", david);\n"
-      "s.save(\"Organization\", foobar);\n"
-      "\n"
-      "tx.commit();\n"
-      "s.close();]]>"
+"<![CDATA[Session s = openSession();\n"
+"Transaction tx = s.beginTransaction();\n"
+"Session s = openSession();\n"
+"\n"
+"// Create a customer\n"
+"Map david = new HashMap();\n"
+"david.put(\"name\", \"David\");\n"
+"\n"
+"// Create an organization\n"
+"Map foobar = new HashMap();\n"
+"foobar.put(\"name\", \"Foobar Inc.\");\n"
+"\n"
+"// Link both\n"
+"david.put(\"organization\", foobar);\n"
+"\n"
+"// Save both\n"
+"s.save(\"Customer\", david);\n"
+"s.save(\"Organization\", foobar);\n"
+"\n"
+"tx.commit();\n"
+"s.close();]]>"
 msgstr ""
 
-#: index.docbook:257
-msgid "The advantages of a dynamic mapping are quick turnaround time for prototyping without the need for entity class implementation. However, you lose compile-time type checking and will very likely deal with many exceptions at runtime. Thanks to the Hibernate mapping, the database schema can easily be normalized and sound, allowing to add a proper domain model implementation on top later on."
+#. Tag: para
+#: persistent_classes.xml:257
+#, no-c-format
+msgid ""
+"The advantages of a dynamic mapping are quick turnaround time for "
+"prototyping without the need for entity class implementation. However, you "
+"lose compile-time type checking and will very likely deal with many "
+"exceptions at runtime. Thanks to the Hibernate mapping, the database schema "
+"can easily be normalized and sound, allowing to add a proper domain model "
+"implementation on top later on."
 msgstr ""
+"动态映射的好处是,变化所需要的时间少了,因为原型不需要实现实体类。然而,你无"
+"法进行 编译期的类型检查,并可能由此会处理很多的运行期异常。幸亏有了Hibernate"
+"映射,它使得数 据库的schema能容易的规格化和合理化,并允许稍后在此之上添加合适"
+"的领域模型实现。"
 
-#: index.docbook:265
-msgid "Entity representation modes can also be set on a per <literal>Session</literal> basis:"
-msgstr ""
+#. Tag: para
+#: persistent_classes.xml:265
+#, no-c-format
+msgid ""
+"Entity representation modes can also be set on a per <literal>Session</"
+"literal> basis:"
+msgstr "实体表示模式也能在每个<literal>Session</literal>的基础上设置:"
 
-#: index.docbook:270
+#. Tag: programlisting
+#: persistent_classes.xml:270
+#, no-c-format
 msgid ""
-      "<![CDATA[Session dynamicSession = pojoSession.getSession(EntityMode.MAP);\n"
-      "\n"
-      "// Create a customer\n"
-      "Map david = new HashMap();\n"
-      "david.put(\"name\", \"David\");\n"
-      "dynamicSession.save(\"Customer\", david);\n"
-      "...\n"
-      "dynamicSession.flush();\n"
-      "dynamicSession.close()\n"
-      "...\n"
-      "// Continue on pojoSession\n"
-      "]]>"
+"<![CDATA[Session dynamicSession = pojoSession.getSession(EntityMode.MAP);\n"
+"\n"
+"// Create a customer\n"
+"Map david = new HashMap();\n"
+"david.put(\"name\", \"David\");\n"
+"dynamicSession.save(\"Customer\", david);\n"
+"...\n"
+"dynamicSession.flush();\n"
+"dynamicSession.close()\n"
+"...\n"
+"// Continue on pojoSession\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:273
-msgid "Please note that the call to <literal>getSession()</literal> using an <literal>EntityMode</literal> is on the <literal>Session</literal> API, not the <literal>SessionFactory</literal>. That way, the new <literal>Session</literal> shares the underlying JDBC connection, transaction, and other context information. This means you don't have tocall <literal>flush()</literal> and <literal>close()</literal> on the secondary <literal>Session</literal>, and also leave the transaction and connection handling to the primary unit of work."
+#. Tag: para
+#: persistent_classes.xml:273
+#, no-c-format
+msgid ""
+"Please note that the call to <literal>getSession()</literal> using an "
+"<literal>EntityMode</literal> is on the <literal>Session</literal> API, not "
+"the <literal>SessionFactory</literal>. That way, the new <literal>Session</"
+"literal> shares the underlying JDBC connection, transaction, and other "
+"context information. This means you don't have tocall <literal>flush()</"
+"literal> and <literal>close()</literal> on the secondary <literal>Session</"
+"literal>, and also leave the transaction and connection handling to the "
+"primary unit of work."
 msgstr ""
+"请注意,用<literal>EntityMode</literal>调用<literal>getSession()</literal>是"
+"在 <literal>Session</literal>的API中,而不是<literal>SessionFactory</"
+"literal>。 这样,新的<literal>Session</literal>共享底层的JDBC连接,事务,和其"
+"他的上下文信 息。这意味着,你不需要在第二个<literal>Session</literal>中调用 "
+"<literal>flush()</literal>和<literal>close()</literal>,同样的,把事务和连接"
+"的处理 交给原来的工作单元。"
 
-#: index.docbook:283
-msgid "More information about the XML representation capabilities can be found in <xref linkend=\"xml\"/>."
-msgstr ""
+#. Tag: para
+#: persistent_classes.xml:283
+#, no-c-format
+msgid ""
+"More information about the XML representation capabilities can be found in "
+"<xref linkend=\"xml\"/>."
+msgstr "关于XML表示能力的更多信息可以在<xref linkend=\"xml\"/>中找到。"
 
-#: index.docbook:291
+#. Tag: title
+#: persistent_classes.xml:291
+#, no-c-format
 msgid "Tuplizers"
-msgstr ""
+msgstr "元组片断映射(Tuplizers)"
 
-#: index.docbook:293
-msgid "<literal>org.hibernate.tuple.Tuplizer</literal>, and its sub-interfaces, are responsible for managing a particular representation of a piece of data, given that representation's <literal>org.hibernate.EntityMode</literal>. If a given piece of data is thought of as a data structure, then a tuplizer is the thing which knows how to create such a data structure and how to extract values from and inject values into such a data structure. For example, for the POJO entity mode, the correpsonding tuplizer knows how create the POJO through its constructor and how to access the POJO properties using the defined property accessors. There are two high-level types of Tuplizers, represented by the <literal>org.hibernate.tuple.entity.EntityTuplizer</literal> and <literal>org.hibernate.tuple.component.ComponentTuplizer</literal> interfaces. <literal>EntityTuplizer</literal>s are responsible for managing the above mentioned contracts in regards to entities, while <literal>ComponentTu!
 plizer</literal>s do the same for components."
+#. Tag: para
+#: persistent_classes.xml:293
+#, no-c-format
+msgid ""
+"<literal>org.hibernate.tuple.Tuplizer</literal>, and its sub-interfaces, are "
+"responsible for managing a particular representation of a piece of data, "
+"given that representation's <literal>org.hibernate.EntityMode</literal>. If "
+"a given piece of data is thought of as a data structure, then a tuplizer is "
+"the thing which knows how to create such a data structure and how to extract "
+"values from and inject values into such a data structure. For example, for "
+"the POJO entity mode, the correpsonding tuplizer knows how create the POJO "
+"through its constructor and how to access the POJO properties using the "
+"defined property accessors. There are two high-level types of Tuplizers, "
+"represented by the <literal>org.hibernate.tuple.entity.EntityTuplizer</"
+"literal> and <literal>org.hibernate.tuple.component.ComponentTuplizer</"
+"literal> interfaces. <literal>EntityTuplizer</literal>s are responsible for "
+"managing the above mentioned contracts in regards to entities, while "
+"<literal>ComponentTuplizer</literal>s do the same for components."
 msgstr ""
+"<literal>org.hibernate.tuple.Tuplizer</literal>,以及其子接口,负责根据给定的"
+"<literal>org.hibernate.EntityMode</literal>,来复现片断数据。如果给定的片断数"
+"据被认为其是一种数据结构,\"tuplizer\"就是一个知道如何创建这样的数据结构,以"
+"及如何给这个数据结构赋值的东西。比如说,对于POJO这种Entity Mode,对应的"
+"tuplizer知道通过其构造方法来创建一个POJO,再通过其属性访问器来访问POJO属性。"
+"有两大类高层Tuplizer,分别是<literal>org.hibernate.tuple.entity."
+"EntityTuplizer</literal> 和<literal>org.hibernate.tuple.entity."
+"ComponentTuplizer</literal>接口。<literal>EntityTuplizer</literal>负责管理上"
+"面提到的实体的契约,而<literal>ComponentTuplizer</literal>则是针对组件的。"
 
-#: index.docbook:308
-msgid "Users may also plug in their own tuplizers. Perhaps you require that a <literal>java.util.Map</literal> implementation other than <literal>java.util.HashMap</literal> be used while in the dynamic-map entity-mode; or perhaps you need to define a different proxy generation strategy than the one used by default. Both would be achieved by defining a custom tuplizer implementation. Tuplizers definitions are attached to the entity or component mapping they are meant to manage. Going back to the example of our customer entity:"
+#. Tag: para
+#: persistent_classes.xml:308
+#, no-c-format
+msgid ""
+"Users may also plug in their own tuplizers. Perhaps you require that a "
+"<literal>java.util.Map</literal> implementation other than <literal>java."
+"util.HashMap</literal> be used while in the dynamic-map entity-mode; or "
+"perhaps you need to define a different proxy generation strategy than the "
+"one used by default. Both would be achieved by defining a custom tuplizer "
+"implementation. Tuplizers definitions are attached to the entity or "
+"component mapping they are meant to manage. Going back to the example of our "
+"customer entity:"
 msgstr ""
+"用户也可以插入其自定义的tuplizer。或许您需要一种不同于dynamic-map entity-mode"
+"中使用的<literal>java.util.HashMap</literal>的<literal>java.util.Map</"
+"literal>实现;或许您需要与默认策略不同的代理生成策略(proxy generation "
+"strategy)。通过自定义tuplizer实现,这两个目标您都可以达到。Tuplizer定义被附加"
+"到它们期望管理的entity或者component映射中。回到我们的customer entity例子:"
 
-#: index.docbook:317
+#. Tag: programlisting
+#: persistent_classes.xml:317
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "    <class entity-name=\"Customer\">\n"
-      "        <!--\n"
-      "            Override the dynamic-map entity-mode\n"
-      "            tuplizer for the customer entity\n"
-      "        -->\n"
-      "        <tuplizer entity-mode=\"dynamic-map\"\n"
-      "                class=\"CustomMapTuplizerImpl\"/>\n"
-      "\n"
-      "        <id name=\"id\" type=\"long\" column=\"ID\">\n"
-      "            <generator class=\"sequence\"/>\n"
-      "        </id>\n"
-      "\n"
-      "        <!-- other properties -->\n"
-      "        ...\n"
-      "    </class>\n"
-      "</hibernate-mapping>\n"
-      "\n"
-      "\n"
-      "public class CustomMapTuplizerImpl\n"
-      "        extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n"
-      "    // override the buildInstantiator() method to plug in our custom map...\n"
-      "    protected final Instantiator buildInstantiator(\n"
-      "            org.hibernate.mapping.PersistentClass mappingInfo) {\n"
-      "        return new CustomMapInstantiator( mappingInfo );\n"
-      "    }\n"
-      "\n"
-      "    private static final class CustomMapInstantiator\n"
-      "            extends org.hibernate.tuple.DynamicMapInstantitor {\n"
-      "        // override the generateMap() method to return our custom map...\n"
-      "            protected final Map generateMap() {\n"
-      "                    return new CustomMap();\n"
-      "            }\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"    <class entity-name=\"Customer\">\n"
+"        <!--\n"
+"            Override the dynamic-map entity-mode\n"
+"            tuplizer for the customer entity\n"
+"        -->\n"
+"        <tuplizer entity-mode=\"dynamic-map\"\n"
+"                class=\"CustomMapTuplizerImpl\"/>\n"
+"\n"
+"        <id name=\"id\" type=\"long\" column=\"ID\">\n"
+"            <generator class=\"sequence\"/>\n"
+"        </id>\n"
+"\n"
+"        <!-- other properties -->\n"
+"        ...\n"
+"    </class>\n"
+"</hibernate-mapping>\n"
+"\n"
+"\n"
+"public class CustomMapTuplizerImpl\n"
+"        extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n"
+"    // override the buildInstantiator() method to plug in our custom map...\n"
+"    protected final Instantiator buildInstantiator(\n"
+"            org.hibernate.mapping.PersistentClass mappingInfo) {\n"
+"        return new CustomMapInstantiator( mappingInfo );\n"
+"    }\n"
+"\n"
+"    private static final class CustomMapInstantiator\n"
+"            extends org.hibernate.tuple.DynamicMapInstantitor {\n"
+"        // override the generateMap() method to return our custom map...\n"
+"            protected final Map generateMap() {\n"
+"                    return new CustomMap();\n"
+"            }\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:322
-msgid "TODO: Document user-extension framework in the property and proxy packages"
-msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+#. Tag: para
+#: persistent_classes.xml:322
+#, no-c-format
+msgid ""
+"TODO: Document user-extension framework in the property and proxy packages"
+msgstr "TODO:property和proxy包里的用户扩展框架文档。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/preface.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/preface.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/preface.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,68 +1,180 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:21
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: preface.xml:21
+#, no-c-format
 msgid "Preface"
-msgstr "<title>前言</title>"
+msgstr "前言"
 
-#: index.docbook:23
-msgid "Working with object-oriented software and a relational database can be cumbersome and time consuming in today's enterprise environments. Hibernate is an object/relational mapping tool for Java environments. The term object/relational mapping (ORM) refers to the technique of mapping a data representation from an object model to a relational data model with a SQL-based schema."
-msgstr "在今日的企业环境中,把面向对象的软件和关系数据库一起使用可能是相当麻烦、浪费时间的。Hibernate是一个面向Java环境的对象/关系数据库映射工具。对象/关系数据库映射(object/relational mapping (ORM))这个术语表示一种技术,用来把对象模型表示的对象映射到基于SQL的关系模型数据结构中去。"
+#. Tag: para
+#: preface.xml:23
+#, no-c-format
+msgid ""
+"Working with object-oriented software and a relational database can be "
+"cumbersome and time consuming in today's enterprise environments. Hibernate "
+"is an object/relational mapping tool for Java environments. The term object/"
+"relational mapping (ORM) refers to the technique of mapping a data "
+"representation from an object model to a relational data model with a SQL-"
+"based schema."
+msgstr ""
+"在今日的企业环境中,把面向对象的软件和关系数据库一起使用可能是相当麻烦、浪费"
+"时间的。Hibernate是一个面向Java环境的对象/关系数据库映射工具。对象/关系数据库"
+"映射(object/relational mapping (ORM))这个术语表示一种技术,用来把对象模型表示"
+"的对象映射到基于SQL的关系模型数据结构中去。"
 
-#: index.docbook:31
-msgid "Hibernate not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), but also provides data query and retrieval facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC."
-msgstr "Hibernate不仅仅管理Java类到数据库表的映射(包括Java数据类型到SQL数据类型的映射),还提供数据查询和获取数据的方法,可以大幅度减少开发时人工使用SQL和JDBC处理数据的时间。"
+#. Tag: para
+#: preface.xml:31
+#, no-c-format
+msgid ""
+"Hibernate not only takes care of the mapping from Java classes to database "
+"tables (and from Java data types to SQL data types), but also provides data "
+"query and retrieval facilities and can significantly reduce development time "
+"otherwise spent with manual data handling in SQL and JDBC."
+msgstr ""
+"Hibernate不仅仅管理Java类到数据库表的映射(包括Java数据类型到SQL数据类型的映"
+"射),还提供数据查询和获取数据的方法,可以大幅度减少开发时人工使用SQL和JDBC处"
+"理数据的时间。"
 
-#: index.docbook:38
-msgid "Hibernates goal is to relieve the developer from 95 percent of common data persistence related programming tasks. Hibernate may not be the best solution for data-centric applications that only use stored-procedures to implement the business logic in the database, it is most useful with object-oriented domain models and business logic in the Java-based middle-tier. However, Hibernate can certainly help you to remove or encapsulate vendor-specific SQL code and will help with the common task of result set translation from a tabular representation to a graph of objects."
-msgstr "Hibernate的目标是对于开发者通常的数据持久化相关的编程任务,解放其中的95%。对于以数据为中心的程序来说,它们往往只在数据库中使用存储过程来实现商业逻辑,Hibernate可能不是最好的解决方案;对于那些在基于Java的中间层应用中,它们实现面向对象的业务模型和商业逻辑的应用,Hibernate是最有用的。不管怎样,Hibernate一定可以帮助你消除或者包装那些针对特定厂商的SQL代码,并且帮你把结果集从表格式的表示形式转换到一系列的对象去。"
+#. Tag: para
+#: preface.xml:38
+#, no-c-format
+msgid ""
+"Hibernates goal is to relieve the developer from 95 percent of common data "
+"persistence related programming tasks. Hibernate may not be the best "
+"solution for data-centric applications that only use stored-procedures to "
+"implement the business logic in the database, it is most useful with object-"
+"oriented domain models and business logic in the Java-based middle-tier. "
+"However, Hibernate can certainly help you to remove or encapsulate vendor-"
+"specific SQL code and will help with the common task of result set "
+"translation from a tabular representation to a graph of objects."
+msgstr ""
+"Hibernate的目标是对于开发者通常的数据持久化相关的编程任务,解放其中的95%。对"
+"于以数据为中心的程序来说,它们往往只在数据库中使用存储过程来实现商业逻辑,"
+"Hibernate可能不是最好的解决方案;对于那些在基于Java的中间层应用中,它们实现面"
+"向对象的业务模型和商业逻辑的应用,Hibernate是最有用的。不管怎样,Hibernate一"
+"定可以帮助你消除或者包装那些针对特定厂商的SQL代码,并且帮你把结果集从表格式的"
+"表示形式转换到一系列的对象去。"
 
-#: index.docbook:48
-msgid "If you are new to Hibernate and Object/Relational Mapping or even Java, please follow these steps:"
-msgstr "如果你对Hibernate和对象/关系数据库映射还是个新手,或者甚至对Java也不熟悉,请按照下面的步骤来学习。"
+#. Tag: para
+#: preface.xml:48
+#, no-c-format
+msgid ""
+"If you are new to Hibernate and Object/Relational Mapping or even Java, "
+"please follow these steps:"
+msgstr ""
+"如果你对Hibernate和对象/关系数据库映射还是个新手,或者甚至对Java也不熟悉,请"
+"按照下面的步骤来学习。"
 
-#: index.docbook:55
-msgid "Read <xref linkend=\"tutorial\"/> for a tutorial with step-by-step instructions. The source code for the tutorial is included in the distribution in the <literal>doc/reference/tutorial/</literal> directory."
-msgstr "阅读<xref linkend=\"tutorial\"/>,这是一篇包含详细的逐步指导的指南。本指南的源代码包含在发行包中,你可以在<literal>doc/reference/tutorial/</literal>目录下找到。"
+#. Tag: para
+#: preface.xml:55
+#, no-c-format
+msgid ""
+"Read <xref linkend=\"tutorial\"/> for a tutorial with step-by-step "
+"instructions. The source code for the tutorial is included in the "
+"distribution in the <literal>doc/reference/tutorial/</literal> directory."
+msgstr ""
+"阅读<xref linkend=\"tutorial\"/>,这是一篇包含详细的逐步指导的指南。本指南的"
+"源代码包含在发行包中,你可以在<literal>doc/reference/tutorial/</literal>目录"
+"下找到。"
 
-#: index.docbook:63
-msgid "Read <xref linkend=\"architecture\"/> to understand the environments where Hibernate can be used."
+#. Tag: para
+#: preface.xml:63
+#, no-c-format
+msgid ""
+"Read <xref linkend=\"architecture\"/> to understand the environments where "
+"Hibernate can be used."
 msgstr "阅读<xref linkend=\"architecture\"/>来理解Hibernate可以使用的环境。"
 
-#: index.docbook:69
-msgid "Have a look at the <literal>eg/</literal> directory in the Hibernate distribution, it contains a simple standalone application. Copy your JDBC driver to the <literal>lib/</literal> directory and edit <literal>etc/hibernate.properties</literal>, specifying correct values for your database. From a command prompt in the distribution directory, type <literal>ant eg</literal> (using Ant), or under Windows, type <literal>build eg</literal>."
-msgstr "查看Hibernate发行包中的<literal>eg/</literal>目录,里面有一个简单的独立运行的程序。把你的JDBC驱动拷贝到<literal>lib/</literal>目录下,修改一下<literal>src/hibernate.properties</literal>,指定其中你的数据库的信息。进入命令行,切换到你的发行包的目录,输入<literal>ant eg</literal>(使用了Ant),或者在Windows操作系统中使用<literal>build eg</literal>。"
+#. Tag: para
+#: preface.xml:69
+#, no-c-format
+msgid ""
+"Have a look at the <literal>eg/</literal> directory in the Hibernate "
+"distribution, it contains a simple standalone application. Copy your JDBC "
+"driver to the <literal>lib/</literal> directory and edit <literal>etc/"
+"hibernate.properties</literal>, specifying correct values for your database. "
+"From a command prompt in the distribution directory, type <literal>ant eg</"
+"literal> (using Ant), or under Windows, type <literal>build eg</literal>."
+msgstr ""
+"查看Hibernate发行包中的<literal>eg/</literal>目录,里面有一个简单的独立运行的"
+"程序。把你的JDBC驱动拷贝到<literal>lib/</literal>目录下,修改一下"
+"<literal>src/hibernate.properties</literal>,指定其中你的数据库的信息。进入命"
+"令行,切换到你的发行包的目录,输入<literal>ant eg</literal>(使用了Ant),或者"
+"在Windows操作系统中使用<literal>build eg</literal>。"
 
-#: index.docbook:80
-msgid "Use this reference documentation as your primary source of information. Consider reading <emphasis>Java Persistence with Hibernate</emphasis> (http://www.manning.com/bauer2) if you need more help with application design or if you prefer a step-by-step tutorial. Also visit http://caveatemptor.hibernate.org and download the example application for Java Persistence with Hibernate."
+#. Tag: para
+#: preface.xml:80
+#, no-c-format
+msgid ""
+"Use this reference documentation as your primary source of information. "
+"Consider reading <emphasis>Java Persistence with Hibernate</emphasis> "
+"(http://www.manning.com/bauer2) if you need more help with application "
+"design or if you prefer a step-by-step tutorial. Also visit http://"
+"caveatemptor.hibernate.org and download the example application for Java "
+"Persistence with Hibernate."
 msgstr "把这份参考文档作为你学习的主要信息来源。"
 
-#: index.docbook:90
+#. Tag: para
+#: preface.xml:90
+#, no-c-format
 msgid "FAQs are answered on the Hibernate website."
 msgstr "在Hibernate 的网站上可以找到经常提问的问题与解答(FAQ)。"
 
-#: index.docbook:95
-msgid "Third party demos, examples, and tutorials are linked on the Hibernate website."
+#. Tag: para
+#: preface.xml:95
+#, no-c-format
+msgid ""
+"Third party demos, examples, and tutorials are linked on the Hibernate "
+"website."
 msgstr "在Hibernate网站上还有第三方的演示、示例和教程的链接。"
 
-#: index.docbook:101
-msgid "The Community Area on the Hibernate website is a good resource for design patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, etc.)."
-msgstr "Hibernate网站的“社区(Community Area)”是讨论关于设计模式以及很多整合方案(Tomcat, JBoss AS, Struts, EJB,等等)的好地方。"
+#. Tag: para
+#: preface.xml:101
+#, no-c-format
+msgid ""
+"The Community Area on the Hibernate website is a good resource for design "
+"patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, "
+"etc.)."
+msgstr ""
+"Hibernate网站的“社区(Community Area)”是讨论关于设计模式以及很多整合方案"
+"(Tomcat, JBoss AS, Struts, EJB,等等)的好地方。"
 
-#: index.docbook:109
-msgid "If you have questions, use the user forum linked on the Hibernate website. We also provide a JIRA issue trackings system for bug reports and feature requests. If you are interested in the development of Hibernate, join the developer mailing list. If you are interested in translating this documentation into your language, contact us on the developer mailing list."
-msgstr "如果你有问题,请使用Hibernate网站上链接的用户论坛。我们也提供一个JIRA问题追踪系统,来搜集bug报告和新功能请求。如果你对开发Hibernate有兴趣,请加入开发者的邮件列表。(Hibernate网站上的用户论坛有一个中文版面,JavaEye也有Hibernate中文版面,您可以在那里交流问题与经验。)"
+#. Tag: para
+#: preface.xml:109
+#, no-c-format
+msgid ""
+"If you have questions, use the user forum linked on the Hibernate website. "
+"We also provide a JIRA issue trackings system for bug reports and feature "
+"requests. If you are interested in the development of Hibernate, join the "
+"developer mailing list. If you are interested in translating this "
+"documentation into your language, contact us on the developer mailing list."
+msgstr ""
+"如果你有问题,请使用Hibernate网站上链接的用户论坛。我们也提供一个JIRA问题追踪"
+"系统,来搜集bug报告和新功能请求。如果你对开发Hibernate有兴趣,请加入开发者的"
+"邮件列表。(Hibernate网站上的用户论坛有一个中文版面,JavaEye也有Hibernate中文"
+"版面,您可以在那里交流问题与经验。)"
 
-#: index.docbook:117
-msgid "Commercial development support, production support, and training for Hibernate is available through JBoss Inc. (see http://www.hibernate.org/SupportTraining/). Hibernate is a Professional Open Source project and a critical component of the JBoss Enterprise Middleware System (JEMS) suite of products."
-msgstr "商业开发、产品支持和Hibernate培训可以通过JBoss Inc.获得。(请查阅:http://www.hibernate.org/SupportTraining/)。 Hibernate是一个专业的开放源代码项目(Professional Open Source project),也是JBoss Enterprise Middleware System(JEMS),JBoss企业级中间件系统的一个核心组件。"
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+#. Tag: para
+#: preface.xml:117
+#, no-c-format
+msgid ""
+"Commercial development support, production support, and training for "
+"Hibernate is available through JBoss Inc. (see http://www.hibernate.org/"
+"SupportTraining/). Hibernate is a Professional Open Source project and a "
+"critical component of the JBoss Enterprise Middleware System (JEMS) suite of "
+"products."
+msgstr ""
+"商业开发、产品支持和Hibernate培训可以通过JBoss Inc.获得。(请查阅:http://"
+"www.hibernate.org/SupportTraining/)。 Hibernate是一个专业的开放源代码项目"
+"(Professional Open Source project),也是JBoss Enterprise Middleware System"
+"(JEMS),JBoss企业级中间件系统的一个核心组件。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/query_criteria.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/query_criteria.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/query_criteria.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,484 +1,750 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: query_criteria.xml:5
+#, no-c-format
 msgid "Criteria Queries"
-msgstr ""
+msgstr "条件查询(Criteria Queries)"
 
-#: index.docbook:7
+#. Tag: para
+#: query_criteria.xml:7
+#, no-c-format
 msgid "Hibernate features an intuitive, extensible criteria query API."
-msgstr ""
+msgstr "具有一个直观的、可扩展的条件查询API是Hibernate的特色。"
 
-#: index.docbook:12
+#. Tag: title
+#: query_criteria.xml:12
+#, no-c-format
 msgid "Creating a <literal>Criteria</literal> instance"
-msgstr ""
+msgstr "创建一个<literal>Criteria</literal> 实例"
 
-#: index.docbook:14
-msgid "The interface <literal>org.hibernate.Criteria</literal> represents a query against a particular persistent class. The <literal>Session</literal> is a factory for <literal>Criteria</literal> instances."
+#. Tag: para
+#: query_criteria.xml:14
+#, no-c-format
+msgid ""
+"The interface <literal>org.hibernate.Criteria</literal> represents a query "
+"against a particular persistent class. The <literal>Session</literal> is a "
+"factory for <literal>Criteria</literal> instances."
 msgstr ""
+"<literal>org.hibernate.Criteria</literal>接口表示特定持久类的一个查询。"
+"<literal>Session</literal>是 <literal>Criteria</literal>实例的工厂。"
 
-#: index.docbook:20
+#. Tag: programlisting
+#: query_criteria.xml:20
+#, no-c-format
 msgid ""
-      "<![CDATA[Criteria crit = sess.createCriteria(Cat.class);\n"
-      "crit.setMaxResults(50);\n"
-      "List cats = crit.list();]]>"
+"<![CDATA[Criteria crit = sess.createCriteria(Cat.class);\n"
+"crit.setMaxResults(50);\n"
+"List cats = crit.list();]]>"
 msgstr ""
 
-#: index.docbook:25
+#. Tag: title
+#: query_criteria.xml:25
+#, no-c-format
 msgid "Narrowing the result set"
-msgstr ""
+msgstr "限制结果集内容"
 
-#: index.docbook:27
-msgid "An individual query criterion is an instance of the interface <literal>org.hibernate.criterion.Criterion</literal>. The class <literal>org.hibernate.criterion.Restrictions</literal> defines factory methods for obtaining certain built-in <literal>Criterion</literal> types."
+#. Tag: para
+#: query_criteria.xml:27
+#, no-c-format
+msgid ""
+"An individual query criterion is an instance of the interface <literal>org."
+"hibernate.criterion.Criterion</literal>. The class <literal>org.hibernate."
+"criterion.Restrictions</literal> defines factory methods for obtaining "
+"certain built-in <literal>Criterion</literal> types."
 msgstr ""
+"一个单独的查询条件是<literal>org.hibernate.criterion.Criterion</literal> 接口"
+"的一个实例。<literal>org.hibernate.criterion.Restrictions</literal>类 定义了"
+"获得某些内置<literal>Criterion</literal>类型的工厂方法。"
 
-#: index.docbook:35
+#. Tag: programlisting
+#: query_criteria.xml:35
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-      "    .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
-      "    .add( Restrictions.between(\"weight\", minWeight, maxWeight) )\n"
-      "    .list();]]>"
+"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+"    .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
+"    .add( Restrictions.between(\"weight\", minWeight, maxWeight) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:37
+#. Tag: para
+#: query_criteria.xml:37
+#, no-c-format
 msgid "Restrictions may be grouped logically."
-msgstr ""
+msgstr "约束可以按逻辑分组。"
 
-#: index.docbook:41
+#. Tag: programlisting
+#: query_criteria.xml:41
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-      "    .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
-      "    .add( Restrictions.or(\n"
-      "        Restrictions.eq( \"age\", new Integer(0) ),\n"
-      "        Restrictions.isNull(\"age\")\n"
-      "    ) )\n"
-      "    .list();]]>"
+"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+"    .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
+"    .add( Restrictions.or(\n"
+"        Restrictions.eq( \"age\", new Integer(0) ),\n"
+"        Restrictions.isNull(\"age\")\n"
+"    ) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:43
+#. Tag: programlisting
+#: query_criteria.xml:43
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-      "    .add( Restrictions.in( \"name\", new String[] { \"Fritz\", \"Izi\", \"Pk\" } ) )\n"
-      "    .add( Restrictions.disjunction()\n"
-      "        .add( Restrictions.isNull(\"age\") )\n"
-      "        .add( Restrictions.eq(\"age\", new Integer(0) ) )\n"
-      "        .add( Restrictions.eq(\"age\", new Integer(1) ) )\n"
-      "        .add( Restrictions.eq(\"age\", new Integer(2) ) )\n"
-      "    ) )\n"
-      "    .list();]]>"
+"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+"    .add( Restrictions.in( \"name\", new String[] { \"Fritz\", \"Izi\", \"Pk"
+"\" } ) )\n"
+"    .add( Restrictions.disjunction()\n"
+"        .add( Restrictions.isNull(\"age\") )\n"
+"        .add( Restrictions.eq(\"age\", new Integer(0) ) )\n"
+"        .add( Restrictions.eq(\"age\", new Integer(1) ) )\n"
+"        .add( Restrictions.eq(\"age\", new Integer(2) ) )\n"
+"    ) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:45
-msgid "There are quite a range of built-in criterion types (<literal>Restrictions</literal> subclasses), but one that is especially useful lets you specify SQL directly."
+#. Tag: para
+#: query_criteria.xml:45
+#, no-c-format
+msgid ""
+"There are quite a range of built-in criterion types (<literal>Restrictions</"
+"literal> subclasses), but one that is especially useful lets you specify SQL "
+"directly."
 msgstr ""
+"Hibernate提供了相当多的内置criterion类型(<literal>Restrictions</literal> 子"
+"类), 但是尤其有用的是可以允许你直接使用SQL。"
 
-#: index.docbook:50
+#. Tag: programlisting
+#: query_criteria.xml:50
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-      "    .add( Restrictions.sqlRestriction(\"lower({alias}.name) like lower(?)\", \"Fritz%\", Hibernate.STRING) )\n"
-      "    .list();]]>"
+"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+"    .add( Restrictions.sqlRestriction(\"lower({alias}.name) like lower(?)\", "
+"\"Fritz%\", Hibernate.STRING) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:52
-msgid "The <literal>{alias}</literal> placeholder with be replaced by the row alias of the queried entity."
-msgstr ""
+#. Tag: para
+#: query_criteria.xml:52
+#, no-c-format
+msgid ""
+"The <literal>{alias}</literal> placeholder with be replaced by the row alias "
+"of the queried entity."
+msgstr "<literal>{alias}</literal>占位符应当被替换为被查询实体的列别名。"
 
-#: index.docbook:57
-msgid "An alternative approach to obtaining a criterion is to get it from a <literal>Property</literal> instance. You can create a <literal>Property</literal> by calling <literal>Property.forName()</literal>."
+#. Tag: para
+#: query_criteria.xml:57
+#, no-c-format
+msgid ""
+"An alternative approach to obtaining a criterion is to get it from a "
+"<literal>Property</literal> instance. You can create a <literal>Property</"
+"literal> by calling <literal>Property.forName()</literal>."
 msgstr ""
+"<literal>Property</literal>实例是获得一个条件的另外一种途径。你可以通过调用"
+"<literal>Property.forName()</literal> 创建一个<literal>Property</literal>。"
 
-#: index.docbook:63
+#. Tag: programlisting
+#: query_criteria.xml:63
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "Property age = Property.forName(\"age\");\n"
-      "List cats = sess.createCriteria(Cat.class)\n"
-      "    .add( Restrictions.disjunction()\n"
-      "        .add( age.isNull() )\n"
-      "        .add( age.eq( new Integer(0) ) )\n"
-      "        .add( age.eq( new Integer(1) ) )\n"
-      "        .add( age.eq( new Integer(2) ) )\n"
-      "    ) )\n"
-      "    .add( Property.forName(\"name\").in( new String[] { \"Fritz\", \"Izi\", \"Pk\" } ) )\n"
-      "    .list();]]>"
+"<![CDATA[\n"
+"Property age = Property.forName(\"age\");\n"
+"List cats = sess.createCriteria(Cat.class)\n"
+"    .add( Restrictions.disjunction()\n"
+"        .add( age.isNull() )\n"
+"        .add( age.eq( new Integer(0) ) )\n"
+"        .add( age.eq( new Integer(1) ) )\n"
+"        .add( age.eq( new Integer(2) ) )\n"
+"    ) )\n"
+"    .add( Property.forName(\"name\").in( new String[] { \"Fritz\", \"Izi\", "
+"\"Pk\" } ) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:68
+#. Tag: title
+#: query_criteria.xml:68
+#, no-c-format
 msgid "Ordering the results"
-msgstr ""
+msgstr "结果集排序"
 
-#: index.docbook:70
-msgid "You may order the results using <literal>org.hibernate.criterion.Order</literal>."
+#. Tag: para
+#: query_criteria.xml:70
+#, no-c-format
+msgid ""
+"You may order the results using <literal>org.hibernate.criterion.Order</"
+"literal>."
 msgstr ""
+"你可以使用<literal>org.hibernate.criterion.Order</literal>来为查询结果排序。"
 
-#: index.docbook:74
+#. Tag: programlisting
+#: query_criteria.xml:74
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-      "    .add( Restrictions.like(\"name\", \"F%\")\n"
-      "    .addOrder( Order.asc(\"name\") )\n"
-      "    .addOrder( Order.desc(\"age\") )\n"
-      "    .setMaxResults(50)\n"
-      "    .list();]]>"
+"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+"    .add( Restrictions.like(\"name\", \"F%\")\n"
+"    .addOrder( Order.asc(\"name\") )\n"
+"    .addOrder( Order.desc(\"age\") )\n"
+"    .setMaxResults(50)\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:76
+#. Tag: programlisting
+#: query_criteria.xml:76
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-      "    .add( Property.forName(\"name\").like(\"F%\") )\n"
-      "    .addOrder( Property.forName(\"name\").asc() )\n"
-      "    .addOrder( Property.forName(\"age\").desc() )\n"
-      "    .setMaxResults(50)\n"
-      "    .list();]]>"
+"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+"    .add( Property.forName(\"name\").like(\"F%\") )\n"
+"    .addOrder( Property.forName(\"name\").asc() )\n"
+"    .addOrder( Property.forName(\"age\").desc() )\n"
+"    .setMaxResults(50)\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:81
+#. Tag: title
+#: query_criteria.xml:81
+#, no-c-format
 msgid "Associations"
-msgstr ""
+msgstr "关联"
 
-#: index.docbook:83
-msgid "You may easily specify constraints upon related entities by navigating associations using <literal>createCriteria()</literal>."
+#. Tag: para
+#: query_criteria.xml:83
+#, no-c-format
+msgid ""
+"You may easily specify constraints upon related entities by navigating "
+"associations using <literal>createCriteria()</literal>."
 msgstr ""
+"你可以使用<literal>createCriteria()</literal>非常容易的在互相关联的实体间建"
+"立 约束。"
 
-#: index.docbook:88
+#. Tag: programlisting
+#: query_criteria.xml:88
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-      "    .add( Restrictions.like(\"name\", \"F%\") )\n"
-      "    .createCriteria(\"kittens\")\n"
-      "        .add( Restrictions.like(\"name\", \"F%\") )\n"
-      "    .list();]]>"
+"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+"    .add( Restrictions.like(\"name\", \"F%\") )\n"
+"    .createCriteria(\"kittens\")\n"
+"        .add( Restrictions.like(\"name\", \"F%\") )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:90
-msgid "note that the second <literal>createCriteria()</literal> returns a new instance of <literal>Criteria</literal>, which refers to the elements of the <literal>kittens</literal> collection."
+#. Tag: para
+#: query_criteria.xml:90
+#, no-c-format
+msgid ""
+"note that the second <literal>createCriteria()</literal> returns a new "
+"instance of <literal>Criteria</literal>, which refers to the elements of the "
+"<literal>kittens</literal> collection."
 msgstr ""
+"注意第二个 <literal>createCriteria()</literal>返回一个新的 "
+"<literal>Criteria</literal>实例,该实例引用<literal>kittens</literal> 集合中"
+"的元素。"
 
-#: index.docbook:96
+#. Tag: para
+#: query_criteria.xml:96
+#, no-c-format
 msgid "The following, alternate form is useful in certain circumstances."
-msgstr ""
+msgstr "接下来,替换形态在某些情况下也是很有用的。"
 
-#: index.docbook:100
+#. Tag: programlisting
+#: query_criteria.xml:100
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-      "    .createAlias(\"kittens\", \"kt\")\n"
-      "    .createAlias(\"mate\", \"mt\")\n"
-      "    .add( Restrictions.eqProperty(\"kt.name\", \"mt.name\") )\n"
-      "    .list();]]>"
+"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+"    .createAlias(\"kittens\", \"kt\")\n"
+"    .createAlias(\"mate\", \"mt\")\n"
+"    .add( Restrictions.eqProperty(\"kt.name\", \"mt.name\") )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:102
-msgid "(<literal>createAlias()</literal> does not create a new instance of <literal>Criteria</literal>.)"
+#. Tag: para
+#: query_criteria.xml:102
+#, no-c-format
+msgid ""
+"(<literal>createAlias()</literal> does not create a new instance of "
+"<literal>Criteria</literal>.)"
 msgstr ""
+"(<literal>createAlias()</literal>并不创建一个新的 <literal>Criteria</literal>"
+"实例。)"
 
-#: index.docbook:107
-msgid "Note that the kittens collections held by the <literal>Cat</literal> instances returned by the previous two queries are <emphasis>not</emphasis> pre-filtered by the criteria! If you wish to retrieve just the kittens that match the criteria, you must use a <literal>ResultTransformer</literal>."
+#. Tag: para
+#: query_criteria.xml:107
+#, no-c-format
+msgid ""
+"Note that the kittens collections held by the <literal>Cat</literal> "
+"instances returned by the previous two queries are <emphasis>not</emphasis> "
+"pre-filtered by the criteria! If you wish to retrieve just the kittens that "
+"match the criteria, you must use a <literal>ResultTransformer</literal>."
 msgstr ""
+"<literal>Cat</literal>实例所保存的之前两次查询所返回的kittens集合是 "
+"<emphasis>没有</emphasis>被条件预过滤的。如果你希望只获得符合条件的kittens, "
+"你必须使用<literal>ResultTransformer</literal>。"
 
-#: index.docbook:114
+#. Tag: programlisting
+#: query_criteria.xml:114
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-      "    .createCriteria(\"kittens\", \"kt\")\n"
-      "        .add( Restrictions.eq(\"name\", \"F%\") )\n"
-      "    .setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)\n"
-      "    .list();\n"
-      "Iterator iter = cats.iterator();\n"
-      "while ( iter.hasNext() ) {\n"
-      "    Map map = (Map) iter.next();\n"
-      "    Cat cat = (Cat) map.get(Criteria.ROOT_ALIAS);\n"
-      "    Cat kitten = (Cat) map.get(\"kt\");\n"
-      "}]]>"
+"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+"    .createCriteria(\"kittens\", \"kt\")\n"
+"        .add( Restrictions.eq(\"name\", \"F%\") )\n"
+"    .setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)\n"
+"    .list();\n"
+"Iterator iter = cats.iterator();\n"
+"while ( iter.hasNext() ) {\n"
+"    Map map = (Map) iter.next();\n"
+"    Cat cat = (Cat) map.get(Criteria.ROOT_ALIAS);\n"
+"    Cat kitten = (Cat) map.get(\"kt\");\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:119
+#. Tag: title
+#: query_criteria.xml:119
+#, no-c-format
 msgid "Dynamic association fetching"
-msgstr ""
+msgstr "动态关联抓取"
 
-#: index.docbook:121
-msgid "You may specify association fetching semantics at runtime using <literal>setFetchMode()</literal>."
+#. Tag: para
+#: query_criteria.xml:121
+#, no-c-format
+msgid ""
+"You may specify association fetching semantics at runtime using "
+"<literal>setFetchMode()</literal>."
 msgstr ""
+"你可以使用<literal>setFetchMode()</literal>在运行时定义动态关联抓取的语义。"
 
-#: index.docbook:126
+#. Tag: programlisting
+#: query_criteria.xml:126
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-      "    .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
-      "    .setFetchMode(\"mate\", FetchMode.EAGER)\n"
-      "    .setFetchMode(\"kittens\", FetchMode.EAGER)\n"
-      "    .list();]]>"
+"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+"    .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
+"    .setFetchMode(\"mate\", FetchMode.EAGER)\n"
+"    .setFetchMode(\"kittens\", FetchMode.EAGER)\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:128
-msgid "This query will fetch both <literal>mate</literal> and <literal>kittens</literal> by outer join. See <xref linkend=\"performance-fetching\"/> for more information."
+#. Tag: para
+#: query_criteria.xml:128
+#, no-c-format
+msgid ""
+"This query will fetch both <literal>mate</literal> and <literal>kittens</"
+"literal> by outer join. See <xref linkend=\"performance-fetching\"/> for "
+"more information."
 msgstr ""
+"这个查询可以通过外连接抓取<literal>mate</literal>和<literal>kittens</"
+"literal>。 查看<xref linkend=\"performance-fetching\"/>可以获得更多信息。"
 
-#: index.docbook:136
+#. Tag: title
+#: query_criteria.xml:136
+#, no-c-format
 msgid "Example queries"
-msgstr ""
+msgstr "查询示例"
 
-#: index.docbook:138
-msgid "The class <literal>org.hibernate.criterion.Example</literal> allows you to construct a query criterion from a given instance."
+#. Tag: para
+#: query_criteria.xml:138
+#, no-c-format
+msgid ""
+"The class <literal>org.hibernate.criterion.Example</literal> allows you to "
+"construct a query criterion from a given instance."
 msgstr ""
+"<literal>org.hibernate.criterion.Example</literal>类允许你通过一个给定实例 构"
+"建一个条件查询。"
 
-#: index.docbook:143
+#. Tag: programlisting
+#: query_criteria.xml:143
+#, no-c-format
 msgid ""
-      "<![CDATA[Cat cat = new Cat();\n"
-      "cat.setSex('F');\n"
-      "cat.setColor(Color.BLACK);\n"
-      "List results = session.createCriteria(Cat.class)\n"
-      "    .add( Example.create(cat) )\n"
-      "    .list();]]>"
+"<![CDATA[Cat cat = new Cat();\n"
+"cat.setSex('F');\n"
+"cat.setColor(Color.BLACK);\n"
+"List results = session.createCriteria(Cat.class)\n"
+"    .add( Example.create(cat) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:145
-msgid "Version properties, identifiers and associations are ignored. By default, null valued properties are excluded."
-msgstr ""
+#. Tag: para
+#: query_criteria.xml:145
+#, no-c-format
+msgid ""
+"Version properties, identifiers and associations are ignored. By default, "
+"null valued properties are excluded."
+msgstr "版本属性、标识符和关联被忽略。默认情况下值为null的属性将被排除。"
 
-#: index.docbook:150
+#. Tag: para
+#: query_criteria.xml:150
+#, no-c-format
 msgid "You can adjust how the <literal>Example</literal> is applied."
-msgstr ""
+msgstr "你可以自行调整<literal>Example</literal>使之更实用。"
 
-#: index.docbook:154
+#. Tag: programlisting
+#: query_criteria.xml:154
+#, no-c-format
 msgid ""
-      "<![CDATA[Example example = Example.create(cat)\n"
-      "    .excludeZeroes()           //exclude zero valued properties\n"
-      "    .excludeProperty(\"color\")  //exclude the property named \"color\"\n"
-      "    .ignoreCase()              //perform case insensitive string comparisons\n"
-      "    .enableLike();             //use like for string comparisons\n"
-      "List results = session.createCriteria(Cat.class)\n"
-      "    .add(example)\n"
-      "    .list();]]>"
+"<![CDATA[Example example = Example.create(cat)\n"
+"    .excludeZeroes()           //exclude zero valued properties\n"
+"    .excludeProperty(\"color\")  //exclude the property named \"color\"\n"
+"    .ignoreCase()              //perform case insensitive string "
+"comparisons\n"
+"    .enableLike();             //use like for string comparisons\n"
+"List results = session.createCriteria(Cat.class)\n"
+"    .add(example)\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:156
+#. Tag: para
+#: query_criteria.xml:156
+#, no-c-format
 msgid "You can even use examples to place criteria upon associated objects."
-msgstr ""
+msgstr "你甚至可以使用examples在关联对象上放置条件。"
 
-#: index.docbook:160
+#. Tag: programlisting
+#: query_criteria.xml:160
+#, no-c-format
 msgid ""
-      "<![CDATA[List results = session.createCriteria(Cat.class)\n"
-      "    .add( Example.create(cat) )\n"
-      "    .createCriteria(\"mate\")\n"
-      "        .add( Example.create( cat.getMate() ) )\n"
-      "    .list();]]>"
+"<![CDATA[List results = session.createCriteria(Cat.class)\n"
+"    .add( Example.create(cat) )\n"
+"    .createCriteria(\"mate\")\n"
+"        .add( Example.create( cat.getMate() ) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:165
+#. Tag: title
+#: query_criteria.xml:165
+#, no-c-format
 msgid "Projections, aggregation and grouping"
-msgstr ""
+msgstr "投影(Projections)、聚合(aggregation)和分组(grouping)"
 
-#: index.docbook:166
-msgid "The class <literal>org.hibernate.criterion.Projections</literal> is a factory for <literal>Projection</literal> instances. We apply a projection to a query by calling <literal>setProjection()</literal>."
+#. Tag: para
+#: query_criteria.xml:166
+#, no-c-format
+msgid ""
+"The class <literal>org.hibernate.criterion.Projections</literal> is a "
+"factory for <literal>Projection</literal> instances. We apply a projection "
+"to a query by calling <literal>setProjection()</literal>."
 msgstr ""
+"<literal>org.hibernate.criterion.Projections</literal>是 "
+"<literal>Projection</literal> 的实例工厂。我们通过调用 <literal>setProjection"
+"()</literal>应用投影到一个查询。"
 
-#: index.docbook:172
+#. Tag: programlisting
+#: query_criteria.xml:172
+#, no-c-format
 msgid ""
-      "<![CDATA[List results = session.createCriteria(Cat.class)\n"
-      "    .setProjection( Projections.rowCount() )\n"
-      "    .add( Restrictions.eq(\"color\", Color.BLACK) )\n"
-      "    .list();]]>"
+"<![CDATA[List results = session.createCriteria(Cat.class)\n"
+"    .setProjection( Projections.rowCount() )\n"
+"    .add( Restrictions.eq(\"color\", Color.BLACK) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:174
+#. Tag: programlisting
+#: query_criteria.xml:174
+#, no-c-format
 msgid ""
-      "<![CDATA[List results = session.createCriteria(Cat.class)\n"
-      "    .setProjection( Projections.projectionList()\n"
-      "        .add( Projections.rowCount() )\n"
-      "        .add( Projections.avg(\"weight\") )\n"
-      "        .add( Projections.max(\"weight\") )\n"
-      "        .add( Projections.groupProperty(\"color\") )\n"
-      "    )\n"
-      "    .list();]]>"
+"<![CDATA[List results = session.createCriteria(Cat.class)\n"
+"    .setProjection( Projections.projectionList()\n"
+"        .add( Projections.rowCount() )\n"
+"        .add( Projections.avg(\"weight\") )\n"
+"        .add( Projections.max(\"weight\") )\n"
+"        .add( Projections.groupProperty(\"color\") )\n"
+"    )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:176
-msgid "There is no explicit \"group by\" necessary in a criteria query. Certain projection types are defined to be <emphasis>grouping projections</emphasis>, which also appear in the SQL <literal>group by</literal> clause."
+#. Tag: para
+#: query_criteria.xml:176
+#, no-c-format
+msgid ""
+"There is no explicit \"group by\" necessary in a criteria query. Certain "
+"projection types are defined to be <emphasis>grouping projections</"
+"emphasis>, which also appear in the SQL <literal>group by</literal> clause."
 msgstr ""
+"在一个条件查询中没有必要显式的使用 \"group by\" 。某些投影类型就是被定义为"
+"<emphasis> 分组投影</emphasis>,他们也出现在SQL的<literal>group by</literal>"
+"子句中。"
 
-#: index.docbook:182
-msgid "An alias may optionally be assigned to a projection, so that the projected value may be referred to in restrictions or orderings. Here are two different ways to do this:"
+#. Tag: para
+#: query_criteria.xml:182
+#, no-c-format
+msgid ""
+"An alias may optionally be assigned to a projection, so that the projected "
+"value may be referred to in restrictions or orderings. Here are two "
+"different ways to do this:"
 msgstr ""
+"你可以选择把一个别名指派给一个投影,这样可以使投影值被约束或排序所引用。下面"
+"是两种不同的实现方式:"
 
-#: index.docbook:188
+#. Tag: programlisting
+#: query_criteria.xml:188
+#, no-c-format
 msgid ""
-      "<![CDATA[List results = session.createCriteria(Cat.class)\n"
-      "    .setProjection( Projections.alias( Projections.groupProperty(\"color\"), \"colr\" ) )\n"
-      "    .addOrder( Order.asc(\"colr\") )\n"
-      "    .list();]]>"
+"<![CDATA[List results = session.createCriteria(Cat.class)\n"
+"    .setProjection( Projections.alias( Projections.groupProperty(\"color\"), "
+"\"colr\" ) )\n"
+"    .addOrder( Order.asc(\"colr\") )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:190
+#. Tag: programlisting
+#: query_criteria.xml:190
+#, no-c-format
 msgid ""
-      "<![CDATA[List results = session.createCriteria(Cat.class)\n"
-      "    .setProjection( Projections.groupProperty(\"color\").as(\"colr\") )\n"
-      "    .addOrder( Order.asc(\"colr\") )\n"
-      "    .list();]]>"
+"<![CDATA[List results = session.createCriteria(Cat.class)\n"
+"    .setProjection( Projections.groupProperty(\"color\").as(\"colr\") )\n"
+"    .addOrder( Order.asc(\"colr\") )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:192
-msgid "The <literal>alias()</literal> and <literal>as()</literal> methods simply wrap a projection instance in another, aliased, instance of <literal>Projection</literal>. As a shortcut, you can assign an alias when you add the projection to a projection list:"
+#. Tag: para
+#: query_criteria.xml:192
+#, no-c-format
+msgid ""
+"The <literal>alias()</literal> and <literal>as()</literal> methods simply "
+"wrap a projection instance in another, aliased, instance of "
+"<literal>Projection</literal>. As a shortcut, you can assign an alias when "
+"you add the projection to a projection list:"
 msgstr ""
+"<literal>alias()</literal>和<literal>as()</literal>方法简便的将一个投影实例包"
+"装到另外一个 别名的<literal>Projection</literal>实例中。简而言之,当你添加一"
+"个投影到一个投影列表中时 你可以为它指定一个别名:"
 
-#: index.docbook:199
+#. Tag: programlisting
+#: query_criteria.xml:199
+#, no-c-format
 msgid ""
-      "<![CDATA[List results = session.createCriteria(Cat.class)\n"
-      "    .setProjection( Projections.projectionList()\n"
-      "        .add( Projections.rowCount(), \"catCountByColor\" )\n"
-      "        .add( Projections.avg(\"weight\"), \"avgWeight\" )\n"
-      "        .add( Projections.max(\"weight\"), \"maxWeight\" )\n"
-      "        .add( Projections.groupProperty(\"color\"), \"color\" )\n"
-      "    )\n"
-      "    .addOrder( Order.desc(\"catCountByColor\") )\n"
-      "    .addOrder( Order.desc(\"avgWeight\") )\n"
-      "    .list();]]>"
+"<![CDATA[List results = session.createCriteria(Cat.class)\n"
+"    .setProjection( Projections.projectionList()\n"
+"        .add( Projections.rowCount(), \"catCountByColor\" )\n"
+"        .add( Projections.avg(\"weight\"), \"avgWeight\" )\n"
+"        .add( Projections.max(\"weight\"), \"maxWeight\" )\n"
+"        .add( Projections.groupProperty(\"color\"), \"color\" )\n"
+"    )\n"
+"    .addOrder( Order.desc(\"catCountByColor\") )\n"
+"    .addOrder( Order.desc(\"avgWeight\") )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:201
+#. Tag: programlisting
+#: query_criteria.xml:201
+#, no-c-format
 msgid ""
-      "<![CDATA[List results = session.createCriteria(Domestic.class, \"cat\")\n"
-      "    .createAlias(\"kittens\", \"kit\")\n"
-      "    .setProjection( Projections.projectionList()\n"
-      "        .add( Projections.property(\"cat.name\"), \"catName\" )\n"
-      "        .add( Projections.property(\"kit.name\"), \"kitName\" )\n"
-      "    )\n"
-      "    .addOrder( Order.asc(\"catName\") )\n"
-      "    .addOrder( Order.asc(\"kitName\") )\n"
-      "    .list();]]>"
+"<![CDATA[List results = session.createCriteria(Domestic.class, \"cat\")\n"
+"    .createAlias(\"kittens\", \"kit\")\n"
+"    .setProjection( Projections.projectionList()\n"
+"        .add( Projections.property(\"cat.name\"), \"catName\" )\n"
+"        .add( Projections.property(\"kit.name\"), \"kitName\" )\n"
+"    )\n"
+"    .addOrder( Order.asc(\"catName\") )\n"
+"    .addOrder( Order.asc(\"kitName\") )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:203
-msgid "You can also use <literal>Property.forName()</literal> to express projections:"
-msgstr ""
+#. Tag: para
+#: query_criteria.xml:203
+#, no-c-format
+msgid ""
+"You can also use <literal>Property.forName()</literal> to express "
+"projections:"
+msgstr "你也可以使用<literal>Property.forName()</literal>来表示投影:"
 
-#: index.docbook:207
+#. Tag: programlisting
+#: query_criteria.xml:207
+#, no-c-format
 msgid ""
-      "<![CDATA[List results = session.createCriteria(Cat.class)\n"
-      "    .setProjection( Property.forName(\"name\") )\n"
-      "    .add( Property.forName(\"color\").eq(Color.BLACK) )\n"
-      "    .list();]]>"
+"<![CDATA[List results = session.createCriteria(Cat.class)\n"
+"    .setProjection( Property.forName(\"name\") )\n"
+"    .add( Property.forName(\"color\").eq(Color.BLACK) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:209
+#. Tag: programlisting
+#: query_criteria.xml:209
+#, no-c-format
 msgid ""
-      "<![CDATA[List results = session.createCriteria(Cat.class)\n"
-      "    .setProjection( Projections.projectionList()\n"
-      "        .add( Projections.rowCount().as(\"catCountByColor\") )\n"
-      "        .add( Property.forName(\"weight\").avg().as(\"avgWeight\") )\n"
-      "        .add( Property.forName(\"weight\").max().as(\"maxWeight\") )\n"
-      "        .add( Property.forName(\"color\").group().as(\"color\" )\n"
-      "    )\n"
-      "    .addOrder( Order.desc(\"catCountByColor\") )\n"
-      "    .addOrder( Order.desc(\"avgWeight\") )\n"
-      "    .list();]]>"
+"<![CDATA[List results = session.createCriteria(Cat.class)\n"
+"    .setProjection( Projections.projectionList()\n"
+"        .add( Projections.rowCount().as(\"catCountByColor\") )\n"
+"        .add( Property.forName(\"weight\").avg().as(\"avgWeight\") )\n"
+"        .add( Property.forName(\"weight\").max().as(\"maxWeight\") )\n"
+"        .add( Property.forName(\"color\").group().as(\"color\" )\n"
+"    )\n"
+"    .addOrder( Order.desc(\"catCountByColor\") )\n"
+"    .addOrder( Order.desc(\"avgWeight\") )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:214
+#. Tag: title
+#: query_criteria.xml:214
+#, no-c-format
 msgid "Detached queries and subqueries"
-msgstr ""
+msgstr "离线(detached)查询和子查询"
 
-#: index.docbook:215
-msgid "The <literal>DetachedCriteria</literal> class lets you create a query outside the scope of a session, and then later execute it using some arbitrary <literal>Session</literal>."
+#. Tag: para
+#: query_criteria.xml:215
+#, no-c-format
+msgid ""
+"The <literal>DetachedCriteria</literal> class lets you create a query "
+"outside the scope of a session, and then later execute it using some "
+"arbitrary <literal>Session</literal>."
 msgstr ""
+"<literal>DetachedCriteria</literal>类使你在一个session范围之外创建一个查询,"
+"并且可以使用任意的 <literal>Session</literal>来执行它。"
 
-#: index.docbook:220
+#. Tag: programlisting
+#: query_criteria.xml:220
+#, no-c-format
 msgid ""
-      "<![CDATA[DetachedCriteria query = DetachedCriteria.forClass(Cat.class)\n"
-      "    .add( Property.forName(\"sex\").eq('F') );\n"
-      "    \n"
-      "Session session = ....;\n"
-      "Transaction txn = session.beginTransaction();\n"
-      "List results = query.getExecutableCriteria(session).setMaxResults(100).list();\n"
-      "txn.commit();\n"
-      "session.close();]]>"
+"<![CDATA[DetachedCriteria query = DetachedCriteria.forClass(Cat.class)\n"
+"    .add( Property.forName(\"sex\").eq('F') );\n"
+"    \n"
+"Session session = ....;\n"
+"Transaction txn = session.beginTransaction();\n"
+"List results = query.getExecutableCriteria(session).setMaxResults(100).list"
+"();\n"
+"txn.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:222
-msgid "A <literal>DetachedCriteria</literal> may also be used to express a subquery. Criterion instances involving subqueries may be obtained via <literal>Subqueries</literal> or <literal>Property</literal>."
+#. Tag: para
+#: query_criteria.xml:222
+#, no-c-format
+msgid ""
+"A <literal>DetachedCriteria</literal> may also be used to express a "
+"subquery. Criterion instances involving subqueries may be obtained via "
+"<literal>Subqueries</literal> or <literal>Property</literal>."
 msgstr ""
+"<literal>DetachedCriteria</literal>也可以用以表示子查询。条件实例包含子查询可"
+"以通过 <literal>Subqueries</literal>或者<literal>Property</literal>获得。"
 
-#: index.docbook:228
+#. Tag: programlisting
+#: query_criteria.xml:228
+#, no-c-format
 msgid ""
-      "<![CDATA[DetachedCriteria avgWeight = DetachedCriteria.forClass(Cat.class)\n"
-      "    .setProjection( Property.forName(\"weight\").avg() );\n"
-      "session.createCriteria(Cat.class)\n"
-      "    .add( Property.forName(\"weight\").gt(avgWeight) )\n"
-      "    .list();]]>"
+"<![CDATA[DetachedCriteria avgWeight = DetachedCriteria.forClass(Cat.class)\n"
+"    .setProjection( Property.forName(\"weight\").avg() );\n"
+"session.createCriteria(Cat.class)\n"
+"    .add( Property.forName(\"weight\").gt(avgWeight) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:230
+#. Tag: programlisting
+#: query_criteria.xml:230
+#, no-c-format
 msgid ""
-      "<![CDATA[DetachedCriteria weights = DetachedCriteria.forClass(Cat.class)\n"
-      "    .setProjection( Property.forName(\"weight\") );\n"
-      "session.createCriteria(Cat.class)\n"
-      "    .add( Subqueries.geAll(\"weight\", weights) )\n"
-      "    .list();]]>"
+"<![CDATA[DetachedCriteria weights = DetachedCriteria.forClass(Cat.class)\n"
+"    .setProjection( Property.forName(\"weight\") );\n"
+"session.createCriteria(Cat.class)\n"
+"    .add( Subqueries.geAll(\"weight\", weights) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:232
+#. Tag: para
+#: query_criteria.xml:232
+#, no-c-format
 msgid "Even correlated subqueries are possible:"
-msgstr ""
+msgstr "甚至相互关联的子查询也是有可能的:"
 
-#: index.docbook:236
+#. Tag: programlisting
+#: query_criteria.xml:236
+#, no-c-format
 msgid ""
-      "<![CDATA[DetachedCriteria avgWeightForSex = DetachedCriteria.forClass(Cat.class, \"cat2\")\n"
-      "    .setProjection( Property.forName(\"weight\").avg() )\n"
-      "    .add( Property.forName(\"cat2.sex\").eqProperty(\"cat.sex\") );\n"
-      "session.createCriteria(Cat.class, \"cat\")\n"
-      "    .add( Property.forName(\"weight\").gt(avgWeightForSex) )\n"
-      "    .list();]]>"
+"<![CDATA[DetachedCriteria avgWeightForSex = DetachedCriteria.forClass(Cat."
+"class, \"cat2\")\n"
+"    .setProjection( Property.forName(\"weight\").avg() )\n"
+"    .add( Property.forName(\"cat2.sex\").eqProperty(\"cat.sex\") );\n"
+"session.createCriteria(Cat.class, \"cat\")\n"
+"    .add( Property.forName(\"weight\").gt(avgWeightForSex) )\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:245
+#. Tag: title
+#: query_criteria.xml:245
+#, no-c-format
 msgid "Queries by natural identifier"
-msgstr ""
+msgstr "根据自然标识查询(Queries by natural identifier)"
 
-#: index.docbook:247
-msgid "For most queries, including criteria queries, the query cache is not very efficient, because query cache invalidation occurs too frequently. However, there is one special kind of query where we can optimize the cache invalidation algorithm: lookups by a constant natural key. In some applications, this kind of query occurs frequently. The criteria API provides special provision for this use case."
+#. Tag: para
+#: query_criteria.xml:247
+#, no-c-format
+msgid ""
+"For most queries, including criteria queries, the query cache is not very "
+"efficient, because query cache invalidation occurs too frequently. However, "
+"there is one special kind of query where we can optimize the cache "
+"invalidation algorithm: lookups by a constant natural key. In some "
+"applications, this kind of query occurs frequently. The criteria API "
+"provides special provision for this use case."
 msgstr ""
+"对大多数查询,包括条件查询而言,因为查询缓存的失效(invalidation)发生得太频"
+"繁,查询缓存不是非常高效。然而,有一种特别的查询,可以通过不变的自然键优化缓"
+"存的失效算法。在某些应用中,这种类型的查询比较常见。条件查询API对这种用例提供"
+"了特别规约。"
 
-#: index.docbook:255
-msgid "First, you should map the natural key of your entity using <literal>&lt;natural-id&gt;</literal>, and enable use of the second-level cache."
+#. Tag: para
+#: query_criteria.xml:255
+#, no-c-format
+msgid ""
+"First, you should map the natural key of your entity using <literal>&lt;"
+"natural-id&gt;</literal>, and enable use of the second-level cache."
 msgstr ""
+"首先,你应该对你的entity使用<literal>&lt;natural-id&gt;</literal>来映射自然"
+"键,然后打开第二级缓存。"
 
-#: index.docbook:260
+#. Tag: programlisting
+#: query_criteria.xml:260
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"User\">\n"
-      "    <cache usage=\"read-write\"/>\n"
-      "    <id name=\"id\">\n"
-      "        <generator class=\"increment\"/>\n"
-      "    </id>\n"
-      "    <natural-id>\n"
-      "        <property name=\"name\"/>\n"
-      "        <property name=\"org\"/>\n"
-      "    </natural-id>\n"
-      "    <property name=\"password\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"User\">\n"
+"    <cache usage=\"read-write\"/>\n"
+"    <id name=\"id\">\n"
+"        <generator class=\"increment\"/>\n"
+"    </id>\n"
+"    <natural-id>\n"
+"        <property name=\"name\"/>\n"
+"        <property name=\"org\"/>\n"
+"    </natural-id>\n"
+"    <property name=\"password\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:262
-msgid "Note that this functionality is not intended for use with entities with <emphasis>mutable</emphasis> natural keys."
-msgstr ""
+#. Tag: para
+#: query_criteria.xml:262
+#, no-c-format
+msgid ""
+"Note that this functionality is not intended for use with entities with "
+"<emphasis>mutable</emphasis> natural keys."
+msgstr "注意,此功能对具有<emphasis>mutable</emphasis>自然键的entity并不适用。"
 
-#: index.docbook:267
+#. Tag: para
+#: query_criteria.xml:267
+#, no-c-format
 msgid "Next, enable the Hibernate query cache."
-msgstr ""
+msgstr "然后,打开Hibernate 查询缓存。"
 
-#: index.docbook:271
-msgid "Now, <literal>Restrictions.naturalId()</literal> allows us to make use of the more efficient cache algorithm."
+#. Tag: para
+#: query_criteria.xml:271
+#, no-c-format
+msgid ""
+"Now, <literal>Restrictions.naturalId()</literal> allows us to make use of "
+"the more efficient cache algorithm."
 msgstr ""
+"现在,我们可以用<literal>Restrictions.naturalId()</literal>来使用更加高效的缓"
+"存算法。"
 
-#: index.docbook:276
+#. Tag: programlisting
+#: query_criteria.xml:276
+#, no-c-format
 msgid ""
-      "<![CDATA[session.createCriteria(User.class)\n"
-      "    .add( Restrictions.naturalId()\n"
-      "        .set(\"name\", \"gavin\")\n"
-      "        .set(\"org\", \"hb\") \n"
-      "    ).setCacheable(true)\n"
-      "    .uniqueResult();]]>"
+"<![CDATA[session.createCriteria(User.class)\n"
+"    .add( Restrictions.naturalId()\n"
+"        .set(\"name\", \"gavin\")\n"
+"        .set(\"org\", \"hb\") \n"
+"    ).setCacheable(true)\n"
+"    .uniqueResult();]]>"
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-

Modified: core/trunk/documentation/manual/translations/zh-CN/content/query_hql.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/query_hql.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/query_hql.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,1275 +1,2347 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: query_hql.xml:5
+#, no-c-format
 msgid "HQL: The Hibernate Query Language"
-msgstr ""
+msgstr "HQL: Hibernate查询语言"
 
-#: index.docbook:7
-msgid "Hibernate is equipped with an extremely powerful query language that (quite intentionally) looks very much like SQL. But don't be fooled by the syntax; HQL is fully object-oriented, understanding notions like inheritence, polymorphism and association."
+#. Tag: para
+#: query_hql.xml:7
+#, no-c-format
+msgid ""
+"Hibernate is equipped with an extremely powerful query language that (quite "
+"intentionally) looks very much like SQL. But don't be fooled by the syntax; "
+"HQL is fully object-oriented, understanding notions like inheritence, "
+"polymorphism and association."
 msgstr ""
+"Hibernate配备了一种非常强大的查询语言,这种语言看上去很像SQL。但是不要被语法"
+"结构 上的相似所迷惑,HQL是非常有意识的被设计为完全面向对象的查询,它可以理解"
+"如继承、多态 和关联之类的概念。"
 
-#: index.docbook:14
+#. Tag: title
+#: query_hql.xml:14
+#, no-c-format
 msgid "Case Sensitivity"
-msgstr ""
+msgstr "大小写敏感性问题"
 
-#: index.docbook:16
-msgid "Queries are case-insensitive, except for names of Java classes and properties. So <literal>SeLeCT</literal> is the same as <literal>sELEct</literal> is the same as <literal>SELECT</literal> but <literal>org.hibernate.eg.FOO</literal> is not <literal>org.hibernate.eg.Foo</literal> and <literal>foo.barSet</literal> is not <literal>foo.BARSET</literal>."
+#. Tag: para
+#: query_hql.xml:16
+#, no-c-format
+msgid ""
+"Queries are case-insensitive, except for names of Java classes and "
+"properties. So <literal>SeLeCT</literal> is the same as <literal>sELEct</"
+"literal> is the same as <literal>SELECT</literal> but <literal>org.hibernate."
+"eg.FOO</literal> is not <literal>org.hibernate.eg.Foo</literal> and "
+"<literal>foo.barSet</literal> is not <literal>foo.BARSET</literal>."
 msgstr ""
+"除了Java类与属性的名称外,查询语句对大小写并不敏感。 所以 <literal>SeLeCT</"
+"literal> 与 <literal>sELEct</literal> 以及 <literal>SELECT</literal> 是相同"
+"的,但是 <literal>org.hibernate.eg.FOO</literal> 并不等价于 <literal>org."
+"hibernate.eg.Foo</literal> 并且 <literal>foo.barSet</literal> 也不等价于 "
+"<literal>foo.BARSET</literal>。"
 
-#: index.docbook:27
-msgid "This manual uses lowercase HQL keywords. Some users find queries with uppercase keywords more readable, but we find this convention ugly when embedded in Java code."
+#. Tag: para
+#: query_hql.xml:27
+#, no-c-format
+msgid ""
+"This manual uses lowercase HQL keywords. Some users find queries with "
+"uppercase keywords more readable, but we find this convention ugly when "
+"embedded in Java code."
 msgstr ""
+"本手册中的HQL关键字将使用小写字母. 很多用户发现使用完全大写的关键字会使查询语"
+"句 的可读性更强, 但我们发现,当把查询语句嵌入到Java语句中的时候使用大写关键字"
+"比较难看。"
 
-#: index.docbook:35
+#. Tag: title
+#: query_hql.xml:35
+#, no-c-format
 msgid "The from clause"
-msgstr ""
+msgstr "from子句"
 
-#: index.docbook:37
+#. Tag: para
+#: query_hql.xml:37
+#, no-c-format
 msgid "The simplest possible Hibernate query is of the form:"
-msgstr ""
+msgstr "Hibernate中最简单的查询语句的形式如下:"
 
-#: index.docbook:41
+#. Tag: programlisting
+#: query_hql.xml:41
+#, no-c-format
 msgid "<![CDATA[from eg.Cat]]>"
 msgstr ""
 
-#: index.docbook:43
-msgid "which simply returns all instances of the class <literal>eg.Cat</literal>. We don't usually need to qualify the class name, since <literal>auto-import</literal> is the default. So we almost always just write:"
+#. Tag: para
+#: query_hql.xml:43
+#, no-c-format
+msgid ""
+"which simply returns all instances of the class <literal>eg.Cat</literal>. "
+"We don't usually need to qualify the class name, since <literal>auto-import</"
+"literal> is the default. So we almost always just write:"
 msgstr ""
+"该子句简单的返回<literal>eg.Cat</literal>类的所有实例。 通常我们不需要使用类"
+"的全限定名, 因为 <literal>auto-import</literal>(自动引入) 是缺省的情况。 所"
+"以我们几乎只使用如下的简单写法:"
 
-#: index.docbook:49
+#. Tag: programlisting
+#: query_hql.xml:49
+#, no-c-format
 msgid "<![CDATA[from Cat]]>"
 msgstr ""
 
-#: index.docbook:51
-msgid "Most of the time, you will need to assign an <emphasis>alias</emphasis>, since you will want to refer to the <literal>Cat</literal> in other parts of the query."
+#. Tag: para
+#: query_hql.xml:51
+#, no-c-format
+msgid ""
+"Most of the time, you will need to assign an <emphasis>alias</emphasis>, "
+"since you will want to refer to the <literal>Cat</literal> in other parts of "
+"the query."
 msgstr ""
+"大多数情况下, 你需要指定一个<emphasis>别名</emphasis>, 原因是你可能需要 在查"
+"询语句的其它部分引用到<literal>Cat</literal>"
 
-#: index.docbook:57, index.docbook:372
+#. Tag: programlisting
+#: query_hql.xml:57 query_hql.xml:372
+#, no-c-format
 msgid "<![CDATA[from Cat as cat]]>"
 msgstr ""
 
-#: index.docbook:59
-msgid "This query assigns the alias <literal>cat</literal> to <literal>Cat</literal> instances, so we could use that alias later in the query. The <literal>as</literal> keyword is optional; we could also write:"
+#. Tag: para
+#: query_hql.xml:59
+#, no-c-format
+msgid ""
+"This query assigns the alias <literal>cat</literal> to <literal>Cat</"
+"literal> instances, so we could use that alias later in the query. The "
+"<literal>as</literal> keyword is optional; we could also write:"
 msgstr ""
+"这个语句把别名<literal>cat</literal>指定给类<literal>Cat</literal> 的实例, 这"
+"样我们就可以在随后的查询中使用此别名了。 关键字<literal>as</literal> 是可选"
+"的,我们也可以这样写:"
 
-#: index.docbook:65
+#. Tag: programlisting
+#: query_hql.xml:65
+#, no-c-format
 msgid "<![CDATA[from Cat cat]]>"
 msgstr ""
 
-#: index.docbook:67
-msgid "Multiple classes may appear, resulting in a cartesian product or \"cross\" join."
+#. Tag: para
+#: query_hql.xml:67
+#, no-c-format
+msgid ""
+"Multiple classes may appear, resulting in a cartesian product or \"cross\" "
+"join."
 msgstr ""
+"子句中可以同时出现多个类, 其查询结果是产生一个笛卡儿积或产生跨表的连接。"
 
-#: index.docbook:71
+#. Tag: programlisting
+#: query_hql.xml:71
+#, no-c-format
 msgid "<![CDATA[from Formula, Parameter]]>"
 msgstr ""
 
-#: index.docbook:72
+#. Tag: programlisting
+#: query_hql.xml:72
+#, no-c-format
 msgid "<![CDATA[from Formula as form, Parameter as param]]>"
 msgstr ""
 
-#: index.docbook:74
-msgid "It is considered good practice to name query aliases using an initial lowercase, consistent with Java naming standards for local variables (eg. <literal>domesticCat</literal>)."
+#. Tag: para
+#: query_hql.xml:74
+#, no-c-format
+msgid ""
+"It is considered good practice to name query aliases using an initial "
+"lowercase, consistent with Java naming standards for local variables (eg. "
+"<literal>domesticCat</literal>)."
 msgstr ""
+"查询语句中别名的开头部分小写被认为是实践中的好习惯, 这样做与Java变量的命名标"
+"准保持了一致 (比如,<literal>domesticCat</literal>)。"
 
-#: index.docbook:83
+#. Tag: title
+#: query_hql.xml:83
+#, no-c-format
 msgid "Associations and joins"
-msgstr ""
+msgstr "关联(Association)与连接(Join)"
 
-#: index.docbook:85
-msgid "We may also assign aliases to associated entities, or even to elements of a collection of values, using a <literal>join</literal>."
+#. Tag: para
+#: query_hql.xml:85
+#, no-c-format
+msgid ""
+"We may also assign aliases to associated entities, or even to elements of a "
+"collection of values, using a <literal>join</literal>."
 msgstr ""
+"我们也可以为相关联的实体甚至是对一个集合中的全部元素指定一个别名, 这时要使用"
+"关键字<literal>join</literal>。"
 
-#: index.docbook:90
+#. Tag: programlisting
+#: query_hql.xml:90
+#, no-c-format
 msgid ""
-      "<![CDATA[from Cat as cat\n"
-      "    inner join cat.mate as mate\n"
-      "    left outer join cat.kittens as kitten]]>"
+"<![CDATA[from Cat as cat\n"
+"    inner join cat.mate as mate\n"
+"    left outer join cat.kittens as kitten]]>"
 msgstr ""
 
-#: index.docbook:92
+#. Tag: programlisting
+#: query_hql.xml:92
+#, no-c-format
 msgid "<![CDATA[from Cat as cat left join cat.mate.kittens as kittens]]>"
 msgstr ""
 
-#: index.docbook:94
+#. Tag: programlisting
+#: query_hql.xml:94
+#, no-c-format
 msgid "<![CDATA[from Formula form full join form.parameter param]]>"
 msgstr ""
 
-#: index.docbook:96
+#. Tag: para
+#: query_hql.xml:96
+#, no-c-format
 msgid "The supported join types are borrowed from ANSI SQL"
-msgstr ""
+msgstr "受支持的连接类型是从ANSI SQL中借鉴来的。"
 
-#: index.docbook:103
+#. Tag: literal
+#: query_hql.xml:103
+#, no-c-format
 msgid "inner join"
-msgstr ""
+msgstr "<literal>inner join</literal>(内连接)"
 
-#: index.docbook:108
+#. Tag: literal
+#: query_hql.xml:108
+#, no-c-format
 msgid "left outer join"
-msgstr ""
+msgstr "<literal>left outer join</literal>(左外连接)"
 
-#: index.docbook:113
+#. Tag: literal
+#: query_hql.xml:113
+#, no-c-format
 msgid "right outer join"
-msgstr ""
+msgstr "<literal>right outer join</literal>(右外连接)"
 
-#: index.docbook:117
+#. Tag: para
+#: query_hql.xml:117
+#, no-c-format
 msgid "<literal>full join</literal> (not usually useful)"
-msgstr ""
+msgstr "<literal>full join</literal> (全连接,并不常用)"
 
-#: index.docbook:123
-msgid "The <literal>inner join</literal>, <literal>left outer join</literal> and <literal>right outer join</literal> constructs may be abbreviated."
+#. Tag: para
+#: query_hql.xml:123
+#, no-c-format
+msgid ""
+"The <literal>inner join</literal>, <literal>left outer join</literal> and "
+"<literal>right outer join</literal> constructs may be abbreviated."
 msgstr ""
+"语句<literal>inner join</literal>, <literal>left outer join</literal> 以及 "
+"<literal>right outer join</literal> 可以简写。"
 
-#: index.docbook:128
+#. Tag: programlisting
+#: query_hql.xml:128
+#, no-c-format
 msgid ""
-      "<![CDATA[from Cat as cat\n"
-      "    join cat.mate as mate\n"
-      "    left join cat.kittens as kitten]]>"
+"<![CDATA[from Cat as cat\n"
+"    join cat.mate as mate\n"
+"    left join cat.kittens as kitten]]>"
 msgstr ""
 
-#: index.docbook:130
-msgid "You may supply extra join conditions using the HQL <literal>with</literal> keyword."
-msgstr ""
+#. Tag: para
+#: query_hql.xml:130
+#, no-c-format
+msgid ""
+"You may supply extra join conditions using the HQL <literal>with</literal> "
+"keyword."
+msgstr "通过HQL的<literal>with</literal>关键字,你可以提供额外的join条件。"
 
-#: index.docbook:135
+#. Tag: programlisting
+#: query_hql.xml:135
+#, no-c-format
 msgid ""
-      "<![CDATA[from Cat as cat\n"
-      "    left join cat.kittens as kitten\n"
-      "        with kitten.bodyWeight > 10.0]]>"
+"<![CDATA[from Cat as cat\n"
+"    left join cat.kittens as kitten\n"
+"        with kitten.bodyWeight > 10.0]]>"
 msgstr ""
 
-#: index.docbook:137
-msgid "In addition, a \"fetch\" join allows associations or collections of values to be initialized along with their parent objects, using a single select. This is particularly useful in the case of a collection. It effectively overrides the outer join and lazy declarations of the mapping file for associations and collections. See <xref linkend=\"performance-fetching\"/> for more information."
+#. Tag: para
+#: query_hql.xml:137
+#, no-c-format
+msgid ""
+"In addition, a \"fetch\" join allows associations or collections of values "
+"to be initialized along with their parent objects, using a single select. "
+"This is particularly useful in the case of a collection. It effectively "
+"overrides the outer join and lazy declarations of the mapping file for "
+"associations and collections. See <xref linkend=\"performance-fetching\"/> "
+"for more information."
 msgstr ""
+"还有,一个\"fetch\"连接允许仅仅使用一个选择语句就将相关联的对象或一组值的集合"
+"随着他们的父对象的初始化而被初始化,这种方法在使用到集合的情况下尤其有用,对"
+"于关联和集合来说,它有效的代替了映射文件中的外联接 与延迟声明(lazy "
+"declarations). 查看 <xref linkend=\"performance-fetching\"/> 以获得等多的信"
+"息。"
 
-#: index.docbook:145
+#. Tag: programlisting
+#: query_hql.xml:145
+#, no-c-format
 msgid ""
-      "<![CDATA[from Cat as cat\n"
-      "    inner join fetch cat.mate\n"
-      "    left join fetch cat.kittens]]>"
+"<![CDATA[from Cat as cat\n"
+"    inner join fetch cat.mate\n"
+"    left join fetch cat.kittens]]>"
 msgstr ""
 
-#: index.docbook:147
-msgid "A fetch join does not usually need to assign an alias, because the associated objects should not be used in the <literal>where</literal> clause (or any other clause). Also, the associated objects are not returned directly in the query results. Instead, they may be accessed via the parent object. The only reason we might need an alias is if we are recursively join fetching a further collection:"
+#. Tag: para
+#: query_hql.xml:147
+#, no-c-format
+msgid ""
+"A fetch join does not usually need to assign an alias, because the "
+"associated objects should not be used in the <literal>where</literal> clause "
+"(or any other clause). Also, the associated objects are not returned "
+"directly in the query results. Instead, they may be accessed via the parent "
+"object. The only reason we might need an alias is if we are recursively join "
+"fetching a further collection:"
 msgstr ""
+"一个fetch连接通常不需要被指定别名, 因为相关联的对象不应当被用在 "
+"<literal>where</literal> 子句 (或其它任何子句)中。同时,相关联的对象 并不在查"
+"询的结果中直接返回,但可以通过他们的父对象来访问到他们。"
 
-#: index.docbook:155
+#. Tag: programlisting
+#: query_hql.xml:155
+#, no-c-format
 msgid ""
-      "<![CDATA[from Cat as cat\n"
-      "    inner join fetch cat.mate\n"
-      "    left join fetch cat.kittens child\n"
-      "    left join fetch child.kittens]]>"
+"<![CDATA[from Cat as cat\n"
+"    inner join fetch cat.mate\n"
+"    left join fetch cat.kittens child\n"
+"    left join fetch child.kittens]]>"
 msgstr ""
 
-#: index.docbook:157
-msgid "Note that the <literal>fetch</literal> construct may not be used in queries called using <literal>iterate()</literal> (though <literal>scroll()</literal> can be used). Nor should <literal>fetch</literal> be used together with <literal>setMaxResults()</literal> or <literal>setFirstResult()</literal> as these operations are based on the result rows, which usually contain duplicates for eager collection fetching, hence, the number of rows is not what you'd expect. Nor may <literal>fetch</literal> be used together with an ad hoc <literal>with</literal> condition. It is possible to create a cartesian product by join fetching more than one collection in a query, so take care in this case. Join fetching multiple collection roles also sometimes gives unexpected results for bag mappings, so be careful about how you formulate your queries in this case. Finally, note that <literal>full join fetch</literal> and <literal>right join fetch</literal> are not meaningful."
+#. Tag: para
+#: query_hql.xml:157
+#, no-c-format
+msgid ""
+"Note that the <literal>fetch</literal> construct may not be used in queries "
+"called using <literal>iterate()</literal> (though <literal>scroll()</"
+"literal> can be used). Nor should <literal>fetch</literal> be used together "
+"with <literal>setMaxResults()</literal> or <literal>setFirstResult()</"
+"literal> as these operations are based on the result rows, which usually "
+"contain duplicates for eager collection fetching, hence, the number of rows "
+"is not what you'd expect. Nor may <literal>fetch</literal> be used together "
+"with an ad hoc <literal>with</literal> condition. It is possible to create a "
+"cartesian product by join fetching more than one collection in a query, so "
+"take care in this case. Join fetching multiple collection roles also "
+"sometimes gives unexpected results for bag mappings, so be careful about how "
+"you formulate your queries in this case. Finally, note that <literal>full "
+"join fetch</literal> and <literal>right join fetch</literal> are not "
+"meaningful."
 msgstr ""
+"假若使用<literal>iterate()</literal>来调用查询,请注意<literal>fetch</"
+"literal>构造是不能使用的(<literal>scroll()</literal> 可以使用)。"
+"<literal>fetch</literal>也不应该与<literal>setMaxResults()</literal> 或"
+"<literal>setFirstResult()</literal>共用,这是因为这些操作是基于结果集的,而在"
+"预先抓取集合类时可能包含重复的数据,也就是说无法预先知道精确的行数。"
+"<literal>fetch</literal>还不能与独立的 <literal>with</literal>条件一起使用。"
+"通过在一次查询中fetch多个集合,可以制造出笛卡尔积,因此请多加注意。对bag映射"
+"来说,同时join fetch多个集合角色可能在某些情况下给出并非预期的结果,也请小"
+"心。最后注意,使用<literal>full join fetch</literal> 与 <literal>right join "
+"fetch</literal>是没有意义的。"
 
-#: index.docbook:172
-msgid "If you are using property-level lazy fetching (with bytecode instrumentation), it is possible to force Hibernate to fetch the lazy properties immediately (in the first query) using <literal>fetch all properties</literal>."
+#. Tag: para
+#: query_hql.xml:172
+#, no-c-format
+msgid ""
+"If you are using property-level lazy fetching (with bytecode "
+"instrumentation), it is possible to force Hibernate to fetch the lazy "
+"properties immediately (in the first query) using <literal>fetch all "
+"properties</literal>."
 msgstr ""
+"如果你使用属性级别的延迟获取(lazy fetching)(这是通过重新编写字节码实现"
+"的),可以使用 <literal>fetch all properties</literal> 来强制Hibernate立即取"
+"得那些原本需要延迟加载的属性(在第一个查询中)。"
 
-#: index.docbook:178
+#. Tag: programlisting
+#: query_hql.xml:178
+#, no-c-format
 msgid "<![CDATA[from Document fetch all properties order by name]]>"
 msgstr ""
 
-#: index.docbook:179
-msgid "<![CDATA[from Document doc fetch all properties where lower(doc.name) like '%cats%']]>"
+#. Tag: programlisting
+#: query_hql.xml:179
+#, no-c-format
+msgid ""
+"<![CDATA[from Document doc fetch all properties where lower(doc.name) like '%"
+"cats%']]>"
 msgstr ""
 
-#: index.docbook:184
+#. Tag: title
+#: query_hql.xml:184
+#, no-c-format
 msgid "Forms of join syntax"
-msgstr ""
+msgstr "join 语法的形式"
 
-#: index.docbook:186
-msgid "HQL supports two forms of association joining: <literal>implicit</literal> and <literal>explicit</literal>."
+#. Tag: para
+#: query_hql.xml:186
+#, no-c-format
+msgid ""
+"HQL supports two forms of association joining: <literal>implicit</literal> "
+"and <literal>explicit</literal>."
 msgstr ""
+"HQL支持两种关联join的形式:<literal>implicit(隐式)</literal> 与"
+"<literal>explicit(显式)</literal>。"
 
-#: index.docbook:190
-msgid "The queries shown in the previous section all use the <literal>explicit</literal> form where the join keyword is explicitly used in the from clause. This is the recommended form."
+#. Tag: para
+#: query_hql.xml:190
+#, no-c-format
+msgid ""
+"The queries shown in the previous section all use the <literal>explicit</"
+"literal> form where the join keyword is explicitly used in the from clause. "
+"This is the recommended form."
 msgstr ""
+"上一节中给出的查询都是使用<literal>explicit(显式)</literal>形式的,其中form子"
+"句中明确给出了join关键字。这是建议使用的方式。"
 
-#: index.docbook:195
-msgid "The <literal>implicit</literal> form does not use the join keyword. Instead, the associations are \"dereferenced\" using dot-notation. <literal>implicit</literal> joins can appear in any of the HQL clauses. <literal>implicit</literal> join result in inner joins in the resulting SQL statement."
+#. Tag: para
+#: query_hql.xml:195
+#, no-c-format
+msgid ""
+"The <literal>implicit</literal> form does not use the join keyword. Instead, "
+"the associations are \"dereferenced\" using dot-notation. <literal>implicit</"
+"literal> joins can appear in any of the HQL clauses. <literal>implicit</"
+"literal> join result in inner joins in the resulting SQL statement."
 msgstr ""
+"<literal>implicit(隐式)</literal>形式不使用join关键字。关联使用\"点号\"来进"
+"行“引用”。<literal>implicit</literal> join可以在任何HQL子句中出现."
+"<literal>implicit</literal> join在最终的SQL语句中以inner join的方式出现。"
 
-#: index.docbook:202
+#. Tag: programlisting
+#: query_hql.xml:202
+#, no-c-format
 msgid "<![CDATA[from Cat as cat where cat.mate.name like '%s%']]>"
 msgstr ""
 
-#: index.docbook:206
+#. Tag: title
+#: query_hql.xml:206
+#, no-c-format
 msgid "Refering to identifier property"
-msgstr ""
+msgstr "Refering to identifier property"
 
-#: index.docbook:208
-msgid "There are, generally speaking, 2 ways to refer to an entity's identifier property:"
+#. Tag: para
+#: query_hql.xml:208
+#, no-c-format
+msgid ""
+"There are, generally speaking, 2 ways to refer to an entity's identifier "
+"property:"
 msgstr ""
+"There are, generally speaking, 2 ways to refer to an entity's identifier "
+"property:"
 
-#: index.docbook:213
-msgid "The special property (lowercase) <literal>id</literal> may be used to reference the identifier property of an entity <emphasis>provided that entity does not define a non-identifier property named id</emphasis>."
+#. Tag: para
+#: query_hql.xml:213
+#, no-c-format
+msgid ""
+"The special property (lowercase) <literal>id</literal> may be used to "
+"reference the identifier property of an entity <emphasis>provided that "
+"entity does not define a non-identifier property named id</emphasis>."
 msgstr ""
+"The special property (lowercase) <literal>id</literal> may be used to "
+"reference the identifier property of an entity <emphasis>provided that "
+"entity does not define a non-identifier property named id</emphasis>."
 
-#: index.docbook:220
-msgid "If the entity defines a named identifier property, you may use that property name."
+#. Tag: para
+#: query_hql.xml:220
+#, no-c-format
+msgid ""
+"If the entity defines a named identifier property, you may use that property "
+"name."
 msgstr ""
+"If the entity defines a named identifier property, you may use that property "
+"name."
 
-#: index.docbook:226
-msgid "References to composite identifier properties follow the same naming rules. If the entity has a non-identifier property named id, the composite identifier property can only be referenced by its defined named; otherwise, the special <literal>id</literal> property can be used to rerference the identifier property."
+#. Tag: para
+#: query_hql.xml:226
+#, no-c-format
+msgid ""
+"References to composite identifier properties follow the same naming rules. "
+"If the entity has a non-identifier property named id, the composite "
+"identifier property can only be referenced by its defined named; otherwise, "
+"the special <literal>id</literal> property can be used to rerference the "
+"identifier property."
 msgstr ""
+"References to composite identifier properties follow the same naming rules. "
+"If the entity has a non-identifier property named id, the composite "
+"identifier property can only be referenced by its defined named; otherwise, "
+"the special <literal>id</literal> property can be used to rerference the "
+"identifier property."
 
-#: index.docbook:233
-msgid "Note: this has changed significantly starting in version 3.2.2. In previous versions, <literal>id</literal> <emphasis>always</emphasis> referred to the identifier property no matter what its actual name. A ramification of that decision was that non-identifier properties named <literal>id</literal> could never be referenced in Hibernate queries."
+#. Tag: para
+#: query_hql.xml:233
+#, fuzzy, no-c-format
+msgid ""
+"Note: this has changed significantly starting in version 3.2.2. In previous "
+"versions, <literal>id</literal> <emphasis>always</emphasis> referred to the "
+"identifier property no matter what its actual name. A ramification of that "
+"decision was that non-identifier properties named <literal>id</literal> "
+"could never be referenced in Hibernate queries."
 msgstr ""
+"Note: this has changed significantly starting in version 3.2.2. In previous "
+"versions, <literal>id</literal><emphasis>always</emphasis> referred to the "
+"identifier property no matter what its actual name. A ramification of that "
+"decision was that non-identifier properties named <literal>id</literal> "
+"could never be referenced in Hibernate queries."
 
-#: index.docbook:242
+#. Tag: title
+#: query_hql.xml:242
+#, no-c-format
 msgid "The select clause"
-msgstr ""
+msgstr "select子句"
 
-#: index.docbook:244
-msgid "The <literal>select</literal> clause picks which objects and properties to return in the query result set. Consider:"
+#. Tag: para
+#: query_hql.xml:244
+#, no-c-format
+msgid ""
+"The <literal>select</literal> clause picks which objects and properties to "
+"return in the query result set. Consider:"
 msgstr ""
+"<literal>select</literal> 子句选择将哪些对象与属性返 回到查询结果集中. 考虑如"
+"下情况:"
 
-#: index.docbook:249
+#. Tag: programlisting
+#: query_hql.xml:249
+#, no-c-format
 msgid ""
-      "<![CDATA[select mate\n"
-      "from Cat as cat\n"
-      "    inner join cat.mate as mate]]>"
+"<![CDATA[select mate\n"
+"from Cat as cat\n"
+"    inner join cat.mate as mate]]>"
 msgstr ""
 
-#: index.docbook:251
-msgid "The query will select <literal>mate</literal>s of other <literal>Cat</literal>s. Actually, you may express this query more compactly as:"
+#. Tag: para
+#: query_hql.xml:251
+#, no-c-format
+msgid ""
+"The query will select <literal>mate</literal>s of other <literal>Cat</"
+"literal>s. Actually, you may express this query more compactly as:"
 msgstr ""
+"该语句将选择<literal>mate</literal>s of other <literal>Cat</literal>s。(其他"
+"猫的配偶) 实际上, 你可以更简洁的用以下的查询语句表达相同的含义:"
 
-#: index.docbook:256
+#. Tag: programlisting
+#: query_hql.xml:256
+#, no-c-format
 msgid "<![CDATA[select cat.mate from Cat cat]]>"
 msgstr ""
 
-#: index.docbook:258
-msgid "Queries may return properties of any value type including properties of component type:"
+#. Tag: para
+#: query_hql.xml:258
+#, no-c-format
+msgid ""
+"Queries may return properties of any value type including properties of "
+"component type:"
 msgstr ""
+"查询语句可以返回值为任何类型的属性,包括返回类型为某种组件(Component)的属性:"
 
-#: index.docbook:262
+#. Tag: programlisting
+#: query_hql.xml:262
+#, no-c-format
 msgid ""
-      "<![CDATA[select cat.name from DomesticCat cat\n"
-      "where cat.name like 'fri%']]>"
+"<![CDATA[select cat.name from DomesticCat cat\n"
+"where cat.name like 'fri%']]>"
 msgstr ""
 
-#: index.docbook:264
+#. Tag: programlisting
+#: query_hql.xml:264
+#, no-c-format
 msgid "<![CDATA[select cust.name.firstName from Customer as cust]]>"
 msgstr ""
 
-#: index.docbook:266
-msgid "Queries may return multiple objects and/or properties as an array of type <literal>Object[]</literal>,"
+#. Tag: para
+#: query_hql.xml:266
+#, no-c-format
+msgid ""
+"Queries may return multiple objects and/or properties as an array of type "
+"<literal>Object[]</literal>,"
 msgstr ""
+"查询语句可以返回多个对象和(或)属性,存放在 <literal>Object[]</literal>队列"
+"中,"
 
-#: index.docbook:271
+#. Tag: programlisting
+#: query_hql.xml:271
+#, no-c-format
 msgid ""
-      "<![CDATA[select mother, offspr, mate.name\n"
-      "from DomesticCat as mother\n"
-      "    inner join mother.mate as mate\n"
-      "    left outer join mother.kittens as offspr]]>"
+"<![CDATA[select mother, offspr, mate.name\n"
+"from DomesticCat as mother\n"
+"    inner join mother.mate as mate\n"
+"    left outer join mother.kittens as offspr]]>"
 msgstr ""
 
-#: index.docbook:273
+#. Tag: para
+#: query_hql.xml:273
+#, no-c-format
 msgid "or as a <literal>List</literal>,"
-msgstr ""
+msgstr "或存放在一个<literal>List</literal>对象中,"
 
-#: index.docbook:277
+#. Tag: programlisting
+#: query_hql.xml:277
+#, no-c-format
 msgid ""
-      "<![CDATA[select new list(mother, offspr, mate.name)\n"
-      "from DomesticCat as mother\n"
-      "    inner join mother.mate as mate\n"
-      "    left outer join mother.kittens as offspr]]>"
+"<![CDATA[select new list(mother, offspr, mate.name)\n"
+"from DomesticCat as mother\n"
+"    inner join mother.mate as mate\n"
+"    left outer join mother.kittens as offspr]]>"
 msgstr ""
 
-#: index.docbook:279
+#. Tag: para
+#: query_hql.xml:279
+#, no-c-format
 msgid "or as an actual typesafe Java object,"
-msgstr ""
+msgstr "也可能直接返回一个实际的类型安全的Java对象,"
 
-#: index.docbook:283
+#. Tag: programlisting
+#: query_hql.xml:283
+#, no-c-format
 msgid ""
-      "<![CDATA[select new Family(mother, mate, offspr)\n"
-      "from DomesticCat as mother\n"
-      "    join mother.mate as mate\n"
-      "    left join mother.kittens as offspr]]>"
+"<![CDATA[select new Family(mother, mate, offspr)\n"
+"from DomesticCat as mother\n"
+"    join mother.mate as mate\n"
+"    left join mother.kittens as offspr]]>"
 msgstr ""
 
-#: index.docbook:285
-msgid "assuming that the class <literal>Family</literal> has an appropriate constructor."
-msgstr ""
+#. Tag: para
+#: query_hql.xml:285
+#, no-c-format
+msgid ""
+"assuming that the class <literal>Family</literal> has an appropriate "
+"constructor."
+msgstr "假设类<literal>Family</literal>有一个合适的构造函数."
 
-#: index.docbook:289
-msgid "You may assign aliases to selected expressions using <literal>as</literal>:"
-msgstr ""
+#. Tag: para
+#: query_hql.xml:289
+#, no-c-format
+msgid ""
+"You may assign aliases to selected expressions using <literal>as</literal>:"
+msgstr "你可以使用关键字<literal>as</literal>给“被选择了的表达式”指派别名:"
 
-#: index.docbook:293
+#. Tag: programlisting
+#: query_hql.xml:293
+#, no-c-format
 msgid ""
-      "<![CDATA[select max(bodyWeight) as max, min(bodyWeight) as min, count(*) as n\n"
-      "from Cat cat]]>"
+"<![CDATA[select max(bodyWeight) as max, min(bodyWeight) as min, count(*) as "
+"n\n"
+"from Cat cat]]>"
 msgstr ""
 
-#: index.docbook:295
-msgid "This is most useful when used together with <literal>select new map</literal>:"
-msgstr ""
+#. Tag: para
+#: query_hql.xml:295
+#, no-c-format
+msgid ""
+"This is most useful when used together with <literal>select new map</"
+"literal>:"
+msgstr "这种做法在与子句<literal>select new map</literal>一起使用时最有用:"
 
-#: index.docbook:299
+#. Tag: programlisting
+#: query_hql.xml:299
+#, no-c-format
 msgid ""
-      "<![CDATA[select new map( max(bodyWeight) as max, min(bodyWeight) as min, count(*) as n )\n"
-      "from Cat cat]]>"
+"<![CDATA[select new map( max(bodyWeight) as max, min(bodyWeight) as min, "
+"count(*) as n )\n"
+"from Cat cat]]>"
 msgstr ""
 
-#: index.docbook:301
-msgid "This query returns a <literal>Map</literal> from aliases to selected values."
+#. Tag: para
+#: query_hql.xml:301
+#, no-c-format
+msgid ""
+"This query returns a <literal>Map</literal> from aliases to selected values."
 msgstr ""
+"该查询返回了一个<literal>Map</literal>的对象,内容是别名与被选择的值组成的名-"
+"值映射。"
 
-#: index.docbook:308
+#. Tag: title
+#: query_hql.xml:308
+#, no-c-format
 msgid "Aggregate functions"
-msgstr ""
+msgstr "聚集函数"
 
-#: index.docbook:310
-msgid "HQL queries may even return the results of aggregate functions on properties:"
-msgstr ""
+#. Tag: para
+#: query_hql.xml:310
+#, no-c-format
+msgid ""
+"HQL queries may even return the results of aggregate functions on properties:"
+msgstr "HQL查询甚至可以返回作用于属性之上的聚集函数的计算结果:"
 
-#: index.docbook:314
+#. Tag: programlisting
+#: query_hql.xml:314
+#, no-c-format
 msgid ""
-      "<![CDATA[select avg(cat.weight), sum(cat.weight), max(cat.weight), count(cat)\n"
-      "from Cat cat]]>"
+"<![CDATA[select avg(cat.weight), sum(cat.weight), max(cat.weight), count"
+"(cat)\n"
+"from Cat cat]]>"
 msgstr ""
 
-#: index.docbook:325
+#. Tag: para
+#: query_hql.xml:325
+#, no-c-format
 msgid "The supported aggregate functions are"
-msgstr ""
+msgstr "受支持的聚集函数如下:"
 
-#: index.docbook:332
+#. Tag: literal
+#: query_hql.xml:332
+#, no-c-format
 msgid "avg(...), sum(...), min(...), max(...)"
-msgstr ""
+msgstr "avg(...), sum(...), min(...), max(...)"
 
-#: index.docbook:337
+#. Tag: literal
+#: query_hql.xml:337
+#, no-c-format
 msgid "count(*)"
-msgstr ""
+msgstr "count(*)"
 
-#: index.docbook:342
+#. Tag: literal
+#: query_hql.xml:342
+#, no-c-format
 msgid "count(...), count(distinct ...), count(all...)"
-msgstr ""
+msgstr "count(...), count(distinct ...), count(all...)"
 
-#: index.docbook:347
-msgid "You may use arithmetic operators, concatenation, and recognized SQL functions in the select clause:"
-msgstr ""
+#. Tag: para
+#: query_hql.xml:347
+#, no-c-format
+msgid ""
+"You may use arithmetic operators, concatenation, and recognized SQL "
+"functions in the select clause:"
+msgstr "你可以在选择子句中使用数学操作符、连接以及经过验证的SQL函数:"
 
-#: index.docbook:352
+#. Tag: programlisting
+#: query_hql.xml:352
+#, no-c-format
 msgid ""
-      "<![CDATA[select cat.weight + sum(kitten.weight)\n"
-      "from Cat cat\n"
-      "    join cat.kittens kitten\n"
-      "group by cat.id, cat.weight]]>"
+"<![CDATA[select cat.weight + sum(kitten.weight)\n"
+"from Cat cat\n"
+"    join cat.kittens kitten\n"
+"group by cat.id, cat.weight]]>"
 msgstr ""
 
-#: index.docbook:354
-msgid "<![CDATA[select firstName||' '||initial||' '||upper(lastName) from Person]]>"
+#. Tag: programlisting
+#: query_hql.xml:354
+#, no-c-format
+msgid ""
+"<![CDATA[select firstName||' '||initial||' '||upper(lastName) from Person]]>"
 msgstr ""
 
-#: index.docbook:356
-msgid "The <literal>distinct</literal> and <literal>all</literal> keywords may be used and have the same semantics as in SQL."
+#. Tag: para
+#: query_hql.xml:356
+#, no-c-format
+msgid ""
+"The <literal>distinct</literal> and <literal>all</literal> keywords may be "
+"used and have the same semantics as in SQL."
 msgstr ""
+"关键字<literal>distinct</literal>与<literal>all</literal> 也可以使用,它们具"
+"有与SQL相同的语义."
 
-#: index.docbook:361
+#. Tag: programlisting
+#: query_hql.xml:361
+#, no-c-format
 msgid ""
-      "<![CDATA[select distinct cat.name from Cat cat\n"
-      "\n"
-      "select count(distinct cat.name), count(cat) from Cat cat]]>"
+"<![CDATA[select distinct cat.name from Cat cat\n"
+"\n"
+"select count(distinct cat.name), count(cat) from Cat cat]]>"
 msgstr ""
 
-#: index.docbook:366
+#. Tag: title
+#: query_hql.xml:366
+#, no-c-format
 msgid "Polymorphic queries"
-msgstr ""
+msgstr "多态查询"
 
-#: index.docbook:368
+#. Tag: para
+#: query_hql.xml:368
+#, no-c-format
 msgid "A query like:"
-msgstr ""
+msgstr "一个如下的查询语句:"
 
-#: index.docbook:374
-msgid "returns instances not only of <literal>Cat</literal>, but also of subclasses like <literal>DomesticCat</literal>. Hibernate queries may name <emphasis>any</emphasis> Java class or interface in the <literal>from</literal> clause. The query will return instances of all persistent classes that extend that class or implement the interface. The following query would return all persistent objects:"
+#. Tag: para
+#: query_hql.xml:374
+#, no-c-format
+msgid ""
+"returns instances not only of <literal>Cat</literal>, but also of subclasses "
+"like <literal>DomesticCat</literal>. Hibernate queries may name "
+"<emphasis>any</emphasis> Java class or interface in the <literal>from</"
+"literal> clause. The query will return instances of all persistent classes "
+"that extend that class or implement the interface. The following query would "
+"return all persistent objects:"
 msgstr ""
+"不仅返回<literal>Cat</literal>类的实例, 也同时返回子类 <literal>DomesticCat</"
+"literal>的实例. Hibernate 可以在<literal>from</literal>子句中指定<emphasis>任"
+"何</emphasis> Java 类或接口. 查询会返回继承了该类的所有持久化子类 的实例或返"
+"回声明了该接口的所有持久化类的实例。下面的查询语句返回所有的被持久化的对象:"
 
-#: index.docbook:382
+#. Tag: programlisting
+#: query_hql.xml:382
+#, no-c-format
 msgid "<![CDATA[from java.lang.Object o]]>"
 msgstr ""
 
-#: index.docbook:384
-msgid "The interface <literal>Named</literal> might be implemented by various persistent classes:"
-msgstr ""
+#. Tag: para
+#: query_hql.xml:384
+#, no-c-format
+msgid ""
+"The interface <literal>Named</literal> might be implemented by various "
+"persistent classes:"
+msgstr "接口<literal>Named</literal> 可能被各种各样的持久化类声明:"
 
-#: index.docbook:389
+#. Tag: programlisting
+#: query_hql.xml:389
+#, no-c-format
 msgid "<![CDATA[from Named n, Named m where n.name = m.name]]>"
 msgstr ""
 
-#: index.docbook:391
-msgid "Note that these last two queries will require more than one SQL <literal>SELECT</literal>. This means that the <literal>order by</literal> clause does not correctly order the whole result set. (It also means you can't call these queries using <literal>Query.scroll()</literal>.)"
+#. Tag: para
+#: query_hql.xml:391
+#, no-c-format
+msgid ""
+"Note that these last two queries will require more than one SQL "
+"<literal>SELECT</literal>. This means that the <literal>order by</literal> "
+"clause does not correctly order the whole result set. (It also means you "
+"can't call these queries using <literal>Query.scroll()</literal>.)"
 msgstr ""
+"注意,最后的两个查询将需要超过一个的SQL <literal>SELECT</literal>.这表明"
+"<literal>order by</literal>子句 没有对整个结果集进行正确的排序. (这也说明你不"
+"能对这样的查询使用<literal>Query.scroll()</literal>方法.)"
 
-#: index.docbook:400
+#. Tag: title
+#: query_hql.xml:400
+#, no-c-format
 msgid "The where clause"
-msgstr ""
+msgstr "where子句"
 
-#: index.docbook:402
-msgid "The <literal>where</literal> clause allows you to narrow the list of instances returned. If no alias exists, you may refer to properties by name:"
+#. Tag: para
+#: query_hql.xml:402
+#, no-c-format
+msgid ""
+"The <literal>where</literal> clause allows you to narrow the list of "
+"instances returned. If no alias exists, you may refer to properties by name:"
 msgstr ""
+"<literal>where</literal>子句允许你将返回的实例列表的范围缩小. 如果没有指定别"
+"名,你可以使用属性名来直接引用属性:"
 
-#: index.docbook:407
+#. Tag: programlisting
+#: query_hql.xml:407
+#, no-c-format
 msgid "<![CDATA[from Cat where name='Fritz']]>"
 msgstr ""
 
-#: index.docbook:409
+#. Tag: para
+#: query_hql.xml:409
+#, no-c-format
 msgid "If there is an alias, use a qualified property name:"
-msgstr ""
+msgstr "如果指派了别名,需要使用完整的属性名:"
 
-#: index.docbook:413
+#. Tag: programlisting
+#: query_hql.xml:413
+#, no-c-format
 msgid "<![CDATA[from Cat as cat where cat.name='Fritz']]>"
 msgstr ""
 
-#: index.docbook:415
+#. Tag: para
+#: query_hql.xml:415
+#, no-c-format
 msgid "returns instances of <literal>Cat</literal> named 'Fritz'."
-msgstr ""
+msgstr "返回名为(属性name等于)'Fritz'的<literal>Cat</literal>类的实例。"
 
-#: index.docbook:419
+#. Tag: programlisting
+#: query_hql.xml:419
+#, no-c-format
 msgid ""
-      "<![CDATA[select foo\n"
-      "from Foo foo, Bar bar\n"
-      "where foo.startDate = bar.date]]>"
+"<![CDATA[select foo\n"
+"from Foo foo, Bar bar\n"
+"where foo.startDate = bar.date]]>"
 msgstr ""
 
-#: index.docbook:421
-msgid "will return all instances of <literal>Foo</literal> for which there exists an instance of <literal>bar</literal> with a <literal>date</literal> property equal to the <literal>startDate</literal> property of the <literal>Foo</literal>. Compound path expressions make the <literal>where</literal> clause extremely powerful. Consider:"
+#. Tag: para
+#: query_hql.xml:421
+#, no-c-format
+msgid ""
+"will return all instances of <literal>Foo</literal> for which there exists "
+"an instance of <literal>bar</literal> with a <literal>date</literal> "
+"property equal to the <literal>startDate</literal> property of the "
+"<literal>Foo</literal>. Compound path expressions make the <literal>where</"
+"literal> clause extremely powerful. Consider:"
 msgstr ""
+"将返回所有满足下面条件的<literal>Foo</literal>类的实例: 存在如下的"
+"<literal>bar</literal>的一个实例,其<literal>date</literal>属性等于 "
+"<literal>Foo</literal>的<literal>startDate</literal>属性。 复合路径表达式使得"
+"<literal>where</literal>子句非常的强大,考虑如下情况:"
 
-#: index.docbook:430
+#. Tag: programlisting
+#: query_hql.xml:430
+#, no-c-format
 msgid "<![CDATA[from Cat cat where cat.mate.name is not null]]>"
 msgstr ""
 
-#: index.docbook:432
-msgid "This query translates to an SQL query with a table (inner) join. If you were to write something like"
+#. Tag: para
+#: query_hql.xml:432
+#, no-c-format
+msgid ""
+"This query translates to an SQL query with a table (inner) join. If you were "
+"to write something like"
 msgstr ""
+"该查询将被翻译成为一个含有表连接(内连接)的SQL查询。如果你打算写像这样的查询"
+"语句"
 
-#: index.docbook:437
+#. Tag: programlisting
+#: query_hql.xml:437
+#, no-c-format
 msgid ""
-      "<![CDATA[from Foo foo\n"
-      "where foo.bar.baz.customer.address.city is not null]]>"
+"<![CDATA[from Foo foo\n"
+"where foo.bar.baz.customer.address.city is not null]]>"
 msgstr ""
 
-#: index.docbook:439
-msgid "you would end up with a query that would require four table joins in SQL."
-msgstr ""
+#. Tag: para
+#: query_hql.xml:439
+#, no-c-format
+msgid ""
+"you would end up with a query that would require four table joins in SQL."
+msgstr "在SQL中,你为达此目的将需要进行一个四表连接的查询。"
 
-#: index.docbook:443
-msgid "The <literal>=</literal> operator may be used to compare not only properties, but also instances:"
+#. Tag: para
+#: query_hql.xml:443
+#, no-c-format
+msgid ""
+"The <literal>=</literal> operator may be used to compare not only "
+"properties, but also instances:"
 msgstr ""
+"<literal>=</literal>运算符不仅可以被用来比较属性的值,也可以用来比较实例:"
 
-#: index.docbook:448
+#. Tag: programlisting
+#: query_hql.xml:448
+#, no-c-format
 msgid "<![CDATA[from Cat cat, Cat rival where cat.mate = rival.mate]]>"
 msgstr ""
 
-#: index.docbook:450
+#. Tag: programlisting
+#: query_hql.xml:450
+#, no-c-format
 msgid ""
-      "<![CDATA[select cat, mate\n"
-      "from Cat cat, Cat mate\n"
-      "where cat.mate = mate]]>"
+"<![CDATA[select cat, mate\n"
+"from Cat cat, Cat mate\n"
+"where cat.mate = mate]]>"
 msgstr ""
 
-#: index.docbook:452
-msgid "The special property (lowercase) <literal>id</literal> may be used to reference the unique identifier of an object. See <xref linkend=\"queryhql-identifier-property\"/> for more information."
+#. Tag: para
+#: query_hql.xml:452
+#, no-c-format
+msgid ""
+"The special property (lowercase) <literal>id</literal> may be used to "
+"reference the unique identifier of an object. See <xref linkend=\"queryhql-"
+"identifier-property\"/> for more information."
 msgstr ""
+"特殊属性(小写)<literal>id</literal>可以用来表示一个对象的唯一的标识符。(你"
+"也可以使用该对象的属性名。)"
 
-#: index.docbook:458
+#. Tag: programlisting
+#: query_hql.xml:458
+#, no-c-format
 msgid ""
-      "<![CDATA[from Cat as cat where cat.id = 123\n"
-      "\n"
-      "from Cat as cat where cat.mate.id = 69]]>"
+"<![CDATA[from Cat as cat where cat.id = 123\n"
+"\n"
+"from Cat as cat where cat.mate.id = 69]]>"
 msgstr ""
 
-#: index.docbook:460
+#. Tag: para
+#: query_hql.xml:460
+#, no-c-format
 msgid "The second query is efficient. No table join is required!"
-msgstr ""
+msgstr "第二个查询是有效的。此时不需要进行表连接!"
 
-#: index.docbook:464
-msgid "Properties of composite identifiers may also be used. Suppose <literal>Person</literal> has a composite identifier consisting of <literal>country</literal> and <literal>medicareNumber</literal>. Again, see <xref linkend=\"queryhql-identifier-property\"/> for more information regarding referencing identifier properties."
+#. Tag: para
+#: query_hql.xml:464
+#, no-c-format
+msgid ""
+"Properties of composite identifiers may also be used. Suppose "
+"<literal>Person</literal> has a composite identifier consisting of "
+"<literal>country</literal> and <literal>medicareNumber</literal>. Again, see "
+"<xref linkend=\"queryhql-identifier-property\"/> for more information "
+"regarding referencing identifier properties."
 msgstr ""
+"同样也可以使用复合标识符。比如<literal>Person</literal>类有一个复合标识符,它"
+"由<literal>country</literal>属性 与<literal>medicareNumber</literal>属性组"
+"成。"
 
-#: index.docbook:471
+#. Tag: programlisting
+#: query_hql.xml:471
+#, no-c-format
 msgid ""
-      "<![CDATA[from bank.Person person\n"
-      "where person.id.country = 'AU'\n"
-      "    and person.id.medicareNumber = 123456]]>"
+"<![CDATA[from bank.Person person\n"
+"where person.id.country = 'AU'\n"
+"    and person.id.medicareNumber = 123456]]>"
 msgstr ""
 
-#: index.docbook:473
+#. Tag: programlisting
+#: query_hql.xml:473
+#, no-c-format
 msgid ""
-      "<![CDATA[from bank.Account account\n"
-      "where account.owner.id.country = 'AU'\n"
-      "    and account.owner.id.medicareNumber = 123456]]>"
+"<![CDATA[from bank.Account account\n"
+"where account.owner.id.country = 'AU'\n"
+"    and account.owner.id.medicareNumber = 123456]]>"
 msgstr ""
 
-#: index.docbook:475
+#. Tag: para
+#: query_hql.xml:475
+#, no-c-format
 msgid "Once again, the second query requires no table join."
-msgstr ""
+msgstr "第二个查询也不需要进行表连接。"
 
-#: index.docbook:479
-msgid "Likewise, the special property <literal>class</literal> accesses the discriminator value of an instance in the case of polymorphic persistence. A Java class name embedded in the where clause will be translated to its discriminator value."
+#. Tag: para
+#: query_hql.xml:479
+#, no-c-format
+msgid ""
+"Likewise, the special property <literal>class</literal> accesses the "
+"discriminator value of an instance in the case of polymorphic persistence. A "
+"Java class name embedded in the where clause will be translated to its "
+"discriminator value."
 msgstr ""
+"同样的,特殊属性<literal>class</literal>在进行多态持久化的情况下被用来存取一"
+"个实例的鉴别值(discriminator value)。 一个嵌入到where子句中的Java类的名字将"
+"被转换为该类的鉴别值。"
 
-#: index.docbook:485
+#. Tag: programlisting
+#: query_hql.xml:485
+#, no-c-format
 msgid "<![CDATA[from Cat cat where cat.class = DomesticCat]]>"
 msgstr ""
 
-#: index.docbook:487
-msgid "You may also use components or composite user types, or properties of said component types. See <xref linkend=\"queryhql-coomponents\"/> for more details."
+#. Tag: para
+#: query_hql.xml:487
+#, no-c-format
+msgid ""
+"You may also use components or composite user types, or properties of said "
+"component types. See <xref linkend=\"queryhql-coomponents\"/> for more "
+"details."
 msgstr ""
+"你也可以声明一个属性的类型是组件或者复合用户类型(以及由组件构成的组件等"
+"等)。永远不要尝试使用以组件类型来结尾的路径表达式(path-expression) (与此"
+"相反,你应当使用组件的一个属性来结尾)。 举例来说,如果<literal>store.owner</"
+"literal>含有一个包含了组件的实体<literal>address</literal>"
 
-#: index.docbook:492
-msgid "An \"any\" type has the special properties <literal>id</literal> and <literal>class</literal>, allowing us to express a join in the following way (where <literal>AuditLog.item</literal> is a property mapped with <literal>&lt;any&gt;</literal>)."
+#. Tag: para
+#: query_hql.xml:492
+#, no-c-format
+msgid ""
+"An \"any\" type has the special properties <literal>id</literal> and "
+"<literal>class</literal>, allowing us to express a join in the following way "
+"(where <literal>AuditLog.item</literal> is a property mapped with "
+"<literal>&lt;any&gt;</literal>)."
 msgstr ""
+"一个“任意”类型有两个特殊的属性<literal>id</literal>和<literal>class</"
+"literal>, 来允许我们按照下面的方式表达一个连接(<literal>AuditLog.item</"
+"literal> 是一个属性,该属性被映射为<literal>&lt;any&gt;</literal>)。"
 
-#: index.docbook:498
+#. Tag: programlisting
+#: query_hql.xml:498
+#, no-c-format
 msgid ""
-      "<![CDATA[from AuditLog log, Payment payment\n"
-      "where log.item.class = 'Payment' and log.item.id = payment.id]]>"
+"<![CDATA[from AuditLog log, Payment payment\n"
+"where log.item.class = 'Payment' and log.item.id = payment.id]]>"
 msgstr ""
 
-#: index.docbook:500
-msgid "Notice that <literal>log.item.class</literal> and <literal>payment.class</literal> would refer to the values of completely different database columns in the above query."
+#. Tag: para
+#: query_hql.xml:500
+#, no-c-format
+msgid ""
+"Notice that <literal>log.item.class</literal> and <literal>payment.class</"
+"literal> would refer to the values of completely different database columns "
+"in the above query."
 msgstr ""
+"注意,在上面的查询与句中,<literal>log.item.class</literal> 和 "
+"<literal>payment.class</literal> 将涉及到完全不同的数据库中的列。"
 
-#: index.docbook:508
+#. Tag: title
+#: query_hql.xml:508
+#, no-c-format
 msgid "Expressions"
-msgstr ""
+msgstr "表达式"
 
-#: index.docbook:510
-msgid "Expressions allowed in the <literal>where</literal> clause include most of the kind of things you could write in SQL:"
+#. Tag: para
+#: query_hql.xml:510
+#, no-c-format
+msgid ""
+"Expressions allowed in the <literal>where</literal> clause include most of "
+"the kind of things you could write in SQL:"
 msgstr ""
+"在<literal>where</literal>子句中允许使用的表达式包括 大多数你可以在SQL使用的"
+"表达式种类:"
 
-#: index.docbook:517
+#. Tag: para
+#: query_hql.xml:517
+#, no-c-format
 msgid "mathematical operators <literal>+, -, *, /</literal>"
-msgstr ""
+msgstr "数学运算符<literal>+, -, *, /</literal>"
 
-#: index.docbook:522
-msgid "binary comparison operators <literal>=, &gt;=, &lt;=, &lt;&gt;, !=, like</literal>"
-msgstr ""
+#. Tag: para
+#: query_hql.xml:522
+#, no-c-format
+msgid ""
+"binary comparison operators <literal>=, &gt;=, &lt;=, &lt;&gt;, !=, like</"
+"literal>"
+msgstr "二进制比较运算符<literal>=, &gt;=, &lt;=, &lt;&gt;, !=, like</literal>"
 
-#: index.docbook:527
+#. Tag: para
+#: query_hql.xml:527
+#, no-c-format
 msgid "logical operations <literal>and, or, not</literal>"
-msgstr ""
+msgstr "逻辑运算符<literal>and, or, not</literal>"
 
-#: index.docbook:532
+#. Tag: para
+#: query_hql.xml:532
+#, no-c-format
 msgid "Parentheses <literal>( )</literal>, indicating grouping"
-msgstr ""
+msgstr "Parentheses <literal>( )</literal>, indicating grouping"
 
-#: index.docbook:537
-msgid "<literal>in</literal>, <literal>not in</literal>, <literal>between</literal>, <literal>is null</literal>, <literal>is not null</literal>, <literal>is empty</literal>, <literal>is not empty</literal>, <literal>member of</literal> and <literal>not member of</literal>"
+#. Tag: para
+#: query_hql.xml:537
+#, no-c-format
+msgid ""
+"<literal>in</literal>, <literal>not in</literal>, <literal>between</"
+"literal>, <literal>is null</literal>, <literal>is not null</literal>, "
+"<literal>is empty</literal>, <literal>is not empty</literal>, "
+"<literal>member of</literal> and <literal>not member of</literal>"
 msgstr ""
+"<literal>in</literal>, <literal>not in</literal>, <literal>between</"
+"literal>, <literal>is null</literal>, <literal>is not null</literal>, "
+"<literal>is empty</literal>, <literal>is not empty</literal>, "
+"<literal>member of</literal> and <literal>not member of</literal>"
 
-#: index.docbook:550
-msgid "\"Simple\" case, <literal>case ... when ... then ... else ... end</literal>, and \"searched\" case, <literal>case when ... then ... else ... end</literal>"
+#. Tag: para
+#: query_hql.xml:550
+#, no-c-format
+msgid ""
+"\"Simple\" case, <literal>case ... when ... then ... else ... end</literal>, "
+"and \"searched\" case, <literal>case when ... then ... else ... end</literal>"
 msgstr ""
+"\"简单的\" case, <literal>case ... when ... then ... else ... end</literal>,"
+"和 \"搜索\" case, <literal>case when ... then ... else ... end</literal>"
 
-#: index.docbook:556
-msgid "string concatenation <literal>...||...</literal> or <literal>concat(...,...)</literal>"
+#. Tag: para
+#: query_hql.xml:556
+#, no-c-format
+msgid ""
+"string concatenation <literal>...||...</literal> or <literal>concat(...,...)"
+"</literal>"
 msgstr ""
+"字符串连接符<literal>...||...</literal> or <literal>concat(...,...)</literal>"
 
-#: index.docbook:561
-msgid "<literal>current_date()</literal>, <literal>current_time()</literal>, <literal>current_timestamp()</literal>"
+#. Tag: para
+#: query_hql.xml:561
+#, no-c-format
+msgid ""
+"<literal>current_date()</literal>, <literal>current_time()</literal>, "
+"<literal>current_timestamp()</literal>"
 msgstr ""
+"<literal>current_date()</literal>, <literal>current_time()</literal>, "
+"<literal>current_timestamp()</literal>"
 
-#: index.docbook:567
-msgid "<literal>second(...)</literal>, <literal>minute(...)</literal>, <literal>hour(...)</literal>, <literal>day(...)</literal>, <literal>month(...)</literal>, <literal>year(...)</literal>,"
+#. Tag: para
+#: query_hql.xml:567
+#, no-c-format
+msgid ""
+"<literal>second(...)</literal>, <literal>minute(...)</literal>, <literal>hour"
+"(...)</literal>, <literal>day(...)</literal>, <literal>month(...)</literal>, "
+"<literal>year(...)</literal>,"
 msgstr ""
+"<literal>second(...)</literal>, <literal>minute(...)</literal>, <literal>hour"
+"(...)</literal>, <literal>day(...)</literal>, <literal>month(...)</literal>, "
+"<literal>year(...)</literal>,"
 
-#: index.docbook:574
-msgid "Any function or operator defined by EJB-QL 3.0: <literal>substring(), trim(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()</literal>"
+#. Tag: para
+#: query_hql.xml:574
+#, no-c-format
+msgid ""
+"Any function or operator defined by EJB-QL 3.0: <literal>substring(), trim"
+"(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()"
+"</literal>"
 msgstr ""
+"EJB-QL 3.0定义的任何函数或操作:<literal>substring(), trim(), lower(), upper"
+"(), length(), locate(), abs(), sqrt(), bit_length(), mod()</literal>"
 
-#: index.docbook:580
+#. Tag: para
+#: query_hql.xml:580
+#, no-c-format
 msgid "<literal>coalesce()</literal> and <literal>nullif()</literal>"
-msgstr ""
+msgstr "<literal>coalesce()</literal> 和 <literal>nullif()</literal>"
 
-#: index.docbook:585
-msgid "<literal>str()</literal> for converting numeric or temporal values to a readable string"
-msgstr ""
+#. Tag: para
+#: query_hql.xml:585
+#, no-c-format
+msgid ""
+"<literal>str()</literal> for converting numeric or temporal values to a "
+"readable string"
+msgstr "<literal>str()</literal> 把数字或者时间值转换为可读的字符串"
 
-#: index.docbook:591
-msgid "<literal>cast(... as ...)</literal>, where the second argument is the name of a Hibernate type, and <literal>extract(... from ...)</literal> if ANSI <literal>cast()</literal> and <literal>extract()</literal> is supported by the underlying database"
+#. Tag: para
+#: query_hql.xml:591
+#, no-c-format
+msgid ""
+"<literal>cast(... as ...)</literal>, where the second argument is the name "
+"of a Hibernate type, and <literal>extract(... from ...)</literal> if ANSI "
+"<literal>cast()</literal> and <literal>extract()</literal> is supported by "
+"the underlying database"
 msgstr ""
+"<literal>cast(... as ...)</literal>, 其第二个参数是某Hibernate类型的名字,以"
+"及<literal>extract(... from ...)</literal>,只要ANSI <literal>cast()</"
+"literal> 和 <literal>extract()</literal> 被底层数据库支持"
 
-#: index.docbook:599
-msgid "the HQL <literal>index()</literal> function, that applies to aliases of a joined indexed collection"
-msgstr ""
+#. Tag: para
+#: query_hql.xml:599
+#, no-c-format
+msgid ""
+"the HQL <literal>index()</literal> function, that applies to aliases of a "
+"joined indexed collection"
+msgstr "HQL <literal>index()</literal> 函数,作用于join的有序集合的别名。"
 
-#: index.docbook:605
-msgid "HQL functions that take collection-valued path expressions: <literal>size(), minelement(), maxelement(), minindex(), maxindex()</literal>, along with the special <literal>elements()</literal> and <literal>indices</literal> functions which may be quantified using <literal>some, all, exists, any, in</literal>."
+#. Tag: para
+#: query_hql.xml:605
+#, no-c-format
+msgid ""
+"HQL functions that take collection-valued path expressions: <literal>size(), "
+"minelement(), maxelement(), minindex(), maxindex()</literal>, along with the "
+"special <literal>elements()</literal> and <literal>indices</literal> "
+"functions which may be quantified using <literal>some, all, exists, any, in</"
+"literal>."
 msgstr ""
+"HQL函数,把集合作为参数:<literal>size(), minelement(), maxelement(), minindex"
+"(), maxindex()</literal>,还有特别的<literal>elements()</literal> 和"
+"<literal>indices</literal>函数,可以与数量词加以限定:<literal>some, all, "
+"exists, any, in</literal>。"
 
-#: index.docbook:613
-msgid "Any database-supported SQL scalar function like <literal>sign()</literal>, <literal>trunc()</literal>, <literal>rtrim()</literal>, <literal>sin()</literal>"
+#. Tag: para
+#: query_hql.xml:613
+#, no-c-format
+msgid ""
+"Any database-supported SQL scalar function like <literal>sign()</literal>, "
+"<literal>trunc()</literal>, <literal>rtrim()</literal>, <literal>sin()</"
+"literal>"
 msgstr ""
+"任何数据库支持的SQL标量函数,比如<literal>sign()</literal>, <literal>trunc()"
+"</literal>, <literal>rtrim()</literal>, <literal>sin()</literal>"
 
-#: index.docbook:619
+#. Tag: para
+#: query_hql.xml:619
+#, no-c-format
 msgid "JDBC-style positional parameters <literal>?</literal>"
-msgstr ""
+msgstr "JDBC风格的参数传入 <literal>?</literal>"
 
-#: index.docbook:624
-msgid "named parameters <literal>:name</literal>, <literal>:start_date</literal>, <literal>:x1</literal>"
+#. Tag: para
+#: query_hql.xml:624
+#, no-c-format
+msgid ""
+"named parameters <literal>:name</literal>, <literal>:start_date</literal>, "
+"<literal>:x1</literal>"
 msgstr ""
+"命名参数<literal>:name</literal>, <literal>:start_date</literal>, <literal>:"
+"x1</literal>"
 
-#: index.docbook:629
-msgid "SQL literals <literal>'foo'</literal>, <literal>69</literal>, <literal>6.66E+2</literal>, <literal>'1970-01-01 10:00:01.0'</literal>"
+#. Tag: para
+#: query_hql.xml:629
+#, no-c-format
+msgid ""
+"SQL literals <literal>'foo'</literal>, <literal>69</literal>, <literal>6.66E"
+"+2</literal>, <literal>'1970-01-01 10:00:01.0'</literal>"
 msgstr ""
+"SQL 直接常量 <literal>'foo'</literal>, <literal>69</literal>, <literal>6.66E"
+"+2</literal>, <literal>'1970-01-01 10:00:01.0'</literal>"
 
-#: index.docbook:635
-msgid "Java <literal>public static final</literal> constants <literal>eg.Color.TABBY</literal>"
+#. Tag: para
+#: query_hql.xml:635
+#, no-c-format
+msgid ""
+"Java <literal>public static final</literal> constants <literal>eg.Color."
+"TABBY</literal>"
 msgstr ""
+"Java <literal>public static final</literal> 类型的常量 <literal>eg.Color."
+"TABBY</literal>"
 
-#: index.docbook:641
-msgid "<literal>in</literal> and <literal>between</literal> may be used as follows:"
+#. Tag: para
+#: query_hql.xml:641
+#, no-c-format
+msgid ""
+"<literal>in</literal> and <literal>between</literal> may be used as follows:"
 msgstr ""
+"关键字<literal>in</literal>与<literal>between</literal>可按如下方法使用:"
 
-#: index.docbook:645
+#. Tag: programlisting
+#: query_hql.xml:645
+#, no-c-format
 msgid "<![CDATA[from DomesticCat cat where cat.name between 'A' and 'B']]>"
 msgstr ""
 
-#: index.docbook:647
-msgid "<![CDATA[from DomesticCat cat where cat.name in ( 'Foo', 'Bar', 'Baz' )]]>"
+#. Tag: programlisting
+#: query_hql.xml:647
+#, no-c-format
+msgid ""
+"<![CDATA[from DomesticCat cat where cat.name in ( 'Foo', 'Bar', 'Baz' )]]>"
 msgstr ""
 
-#: index.docbook:649
+#. Tag: para
+#: query_hql.xml:649
+#, no-c-format
 msgid "and the negated forms may be written"
-msgstr ""
+msgstr "而且否定的格式也可以如下书写:"
 
-#: index.docbook:653
+#. Tag: programlisting
+#: query_hql.xml:653
+#, no-c-format
 msgid "<![CDATA[from DomesticCat cat where cat.name not between 'A' and 'B']]>"
 msgstr ""
 
-#: index.docbook:655
-msgid "<![CDATA[from DomesticCat cat where cat.name not in ( 'Foo', 'Bar', 'Baz' )]]>"
+#. Tag: programlisting
+#: query_hql.xml:655
+#, no-c-format
+msgid ""
+"<![CDATA[from DomesticCat cat where cat.name not in ( 'Foo', 'Bar', 'Baz' )]]"
+">"
 msgstr ""
 
-#: index.docbook:657
-msgid "Likewise, <literal>is null</literal> and <literal>is not null</literal> may be used to test for null values."
+#. Tag: para
+#: query_hql.xml:657
+#, no-c-format
+msgid ""
+"Likewise, <literal>is null</literal> and <literal>is not null</literal> may "
+"be used to test for null values."
 msgstr ""
+"同样, 子句<literal>is null</literal>与<literal>is not null</literal>可以被用"
+"来测试空值(null)."
 
-#: index.docbook:662
-msgid "Booleans may be easily used in expressions by declaring HQL query substitutions in Hibernate configuration:"
+#. Tag: para
+#: query_hql.xml:662
+#, no-c-format
+msgid ""
+"Booleans may be easily used in expressions by declaring HQL query "
+"substitutions in Hibernate configuration:"
 msgstr ""
+"在Hibernate配置文件中声明HQL“查询替代(query substitutions)”之后, 布尔表达"
+"式(Booleans)可以在其他表达式中轻松的使用:"
 
-#: index.docbook:667
-msgid "<![CDATA[<property name=\"hibernate.query.substitutions\">true 1, false 0</property>]]>"
+#. Tag: programlisting
+#: query_hql.xml:667
+#, no-c-format
+msgid ""
+"<![CDATA[<property name=\"hibernate.query.substitutions\">true 1, false 0</"
+"property>]]>"
 msgstr ""
 
-#: index.docbook:669
-msgid "This will replace the keywords <literal>true</literal> and <literal>false</literal> with the literals <literal>1</literal> and <literal>0</literal> in the translated SQL from this HQL:"
+#. Tag: para
+#: query_hql.xml:669
+#, no-c-format
+msgid ""
+"This will replace the keywords <literal>true</literal> and <literal>false</"
+"literal> with the literals <literal>1</literal> and <literal>0</literal> in "
+"the translated SQL from this HQL:"
 msgstr ""
+"系统将该HQL转换为SQL语句时,该设置表明将用字符 <literal>1</literal> 和 "
+"<literal>0</literal> 来 取代关键字<literal>true</literal> 和 <literal>false</"
+"literal>:"
 
-#: index.docbook:674
+#. Tag: programlisting
+#: query_hql.xml:674
+#, no-c-format
 msgid "<![CDATA[from Cat cat where cat.alive = true]]>"
 msgstr ""
 
-#: index.docbook:676
-msgid "You may test the size of a collection with the special property <literal>size</literal>, or the special <literal>size()</literal> function."
+#. Tag: para
+#: query_hql.xml:676
+#, no-c-format
+msgid ""
+"You may test the size of a collection with the special property "
+"<literal>size</literal>, or the special <literal>size()</literal> function."
 msgstr ""
+"你可以用特殊属性<literal>size</literal>, 或是特殊函数<literal>size()</"
+"literal>测试一个集合的大小。"
 
-#: index.docbook:681
+#. Tag: programlisting
+#: query_hql.xml:681
+#, no-c-format
 msgid "<![CDATA[from Cat cat where cat.kittens.size > 0]]>"
 msgstr ""
 
-#: index.docbook:683
+#. Tag: programlisting
+#: query_hql.xml:683
+#, no-c-format
 msgid "<![CDATA[from Cat cat where size(cat.kittens) > 0]]>"
 msgstr ""
 
-#: index.docbook:685
-msgid "For indexed collections, you may refer to the minimum and maximum indices using <literal>minindex</literal> and <literal>maxindex</literal> functions. Similarly, you may refer to the minimum and maximum elements of a collection of basic type using the <literal>minelement</literal> and <literal>maxelement</literal> functions."
+#. Tag: para
+#: query_hql.xml:685
+#, no-c-format
+msgid ""
+"For indexed collections, you may refer to the minimum and maximum indices "
+"using <literal>minindex</literal> and <literal>maxindex</literal> functions. "
+"Similarly, you may refer to the minimum and maximum elements of a collection "
+"of basic type using the <literal>minelement</literal> and "
+"<literal>maxelement</literal> functions."
 msgstr ""
+"对于索引了(有序)的集合,你可以使用<literal>minindex</literal> 与 "
+"<literal>maxindex</literal>函数来引用到最小与最大的索引序数。 同理,你可以使"
+"用<literal>minelement</literal> 与 <literal>maxelement</literal>函数来 引用到"
+"一个基本数据类型的集合中最小与最大的元素。"
 
-#: index.docbook:693
-msgid "<![CDATA[from Calendar cal where maxelement(cal.holidays) > current_date]]>"
+#. Tag: programlisting
+#: query_hql.xml:693
+#, no-c-format
+msgid ""
+"<![CDATA[from Calendar cal where maxelement(cal.holidays) > current_date]]>"
 msgstr ""
 
-#: index.docbook:695
+#. Tag: programlisting
+#: query_hql.xml:695
+#, no-c-format
 msgid "<![CDATA[from Order order where maxindex(order.items) > 100]]>"
 msgstr ""
 
-#: index.docbook:697
+#. Tag: programlisting
+#: query_hql.xml:697
+#, no-c-format
 msgid "<![CDATA[from Order order where minelement(order.items) > 10000]]>"
 msgstr ""
 
-#: index.docbook:699
-msgid "The SQL functions <literal>any, some, all, exists, in</literal> are supported when passed the element or index set of a collection (<literal>elements</literal> and <literal>indices</literal> functions) or the result of a subquery (see below)."
+#. Tag: para
+#: query_hql.xml:699
+#, no-c-format
+msgid ""
+"The SQL functions <literal>any, some, all, exists, in</literal> are "
+"supported when passed the element or index set of a collection "
+"(<literal>elements</literal> and <literal>indices</literal> functions) or "
+"the result of a subquery (see below)."
 msgstr ""
+"在传递一个集合的索引集或者是元素集(<literal>elements</literal>与"
+"<literal>indices</literal> 函数) 或者传递一个子查询的结果的时候,可以使用SQL"
+"函数<literal>any, some, all, exists, in</literal>"
 
-#: index.docbook:705
+#. Tag: programlisting
+#: query_hql.xml:705
+#, no-c-format
 msgid ""
-      "<![CDATA[select mother from Cat as mother, Cat as kit\n"
-      "where kit in elements(foo.kittens)]]>"
+"<![CDATA[select mother from Cat as mother, Cat as kit\n"
+"where kit in elements(foo.kittens)]]>"
 msgstr ""
 
-#: index.docbook:707
+#. Tag: programlisting
+#: query_hql.xml:707
+#, no-c-format
 msgid ""
-      "<![CDATA[select p from NameList list, Person p\n"
-      "where p.name = some elements(list.names)]]>"
+"<![CDATA[select p from NameList list, Person p\n"
+"where p.name = some elements(list.names)]]>"
 msgstr ""
 
-#: index.docbook:709
+#. Tag: programlisting
+#: query_hql.xml:709
+#, no-c-format
 msgid "<![CDATA[from Cat cat where exists elements(cat.kittens)]]>"
 msgstr ""
 
-#: index.docbook:711
+#. Tag: programlisting
+#: query_hql.xml:711
+#, no-c-format
 msgid "<![CDATA[from Player p where 3 > all elements(p.scores)]]>"
 msgstr ""
 
-#: index.docbook:713
+#. Tag: programlisting
+#: query_hql.xml:713
+#, no-c-format
 msgid "<![CDATA[from Show show where 'fizard' in indices(show.acts)]]>"
 msgstr ""
 
-#: index.docbook:715
-msgid "Note that these constructs - <literal>size</literal>, <literal>elements</literal>, <literal>indices</literal>, <literal>minindex</literal>, <literal>maxindex</literal>, <literal>minelement</literal>, <literal>maxelement</literal> - may only be used in the where clause in Hibernate3."
+#. Tag: para
+#: query_hql.xml:715
+#, no-c-format
+msgid ""
+"Note that these constructs - <literal>size</literal>, <literal>elements</"
+"literal>, <literal>indices</literal>, <literal>minindex</literal>, "
+"<literal>maxindex</literal>, <literal>minelement</literal>, "
+"<literal>maxelement</literal> - may only be used in the where clause in "
+"Hibernate3."
 msgstr ""
+"注意,在Hibernate3种,这些结构变量- <literal>size</literal>, "
+"<literal>elements</literal>, <literal>indices</literal>, <literal>minindex</"
+"literal>, <literal>maxindex</literal>, <literal>minelement</literal>, "
+"<literal>maxelement</literal> - 只能在where子句中使用。"
 
-#: index.docbook:722
-msgid "Elements of indexed collections (arrays, lists, maps) may be referred to by index (in a where clause only):"
+#. Tag: para
+#: query_hql.xml:722
+#, no-c-format
+msgid ""
+"Elements of indexed collections (arrays, lists, maps) may be referred to by "
+"index (in a where clause only):"
 msgstr ""
+"一个被索引过的(有序的)集合的元素(arrays, lists, maps)可以在其他索引中被引用"
+"(只能在where子句中):"
 
-#: index.docbook:727
+#. Tag: programlisting
+#: query_hql.xml:727
+#, no-c-format
 msgid "<![CDATA[from Order order where order.items[0].id = 1234]]>"
 msgstr ""
 
-#: index.docbook:729
+#. Tag: programlisting
+#: query_hql.xml:729
+#, no-c-format
 msgid ""
-      "<![CDATA[select person from Person person, Calendar calendar\n"
-      "where calendar.holidays['national day'] = person.birthDay\n"
-      "    and person.nationality.calendar = calendar]]>"
+"<![CDATA[select person from Person person, Calendar calendar\n"
+"where calendar.holidays['national day'] = person.birthDay\n"
+"    and person.nationality.calendar = calendar]]>"
 msgstr ""
 
-#: index.docbook:731
+#. Tag: programlisting
+#: query_hql.xml:731
+#, no-c-format
 msgid ""
-      "<![CDATA[select item from Item item, Order order\n"
-      "where order.items[ order.deliveredItemIndices[0] ] = item and order.id = 11]]>"
+"<![CDATA[select item from Item item, Order order\n"
+"where order.items[ order.deliveredItemIndices[0] ] = item and order.id = 11]]"
+">"
 msgstr ""
 
-#: index.docbook:733
+#. Tag: programlisting
+#: query_hql.xml:733
+#, no-c-format
 msgid ""
-      "<![CDATA[select item from Item item, Order order\n"
-      "where order.items[ maxindex(order.items) ] = item and order.id = 11]]>"
+"<![CDATA[select item from Item item, Order order\n"
+"where order.items[ maxindex(order.items) ] = item and order.id = 11]]>"
 msgstr ""
 
-#: index.docbook:735
-msgid "The expression inside <literal>[]</literal> may even be an arithmetic expression."
-msgstr ""
+#. Tag: para
+#: query_hql.xml:735
+#, no-c-format
+msgid ""
+"The expression inside <literal>[]</literal> may even be an arithmetic "
+"expression."
+msgstr "在<literal>[]</literal>中的表达式甚至可以是一个算数表达式。"
 
-#: index.docbook:739
+#. Tag: programlisting
+#: query_hql.xml:739
+#, no-c-format
 msgid ""
-      "<![CDATA[select item from Item item, Order order\n"
-      "where order.items[ size(order.items) - 1 ] = item]]>"
+"<![CDATA[select item from Item item, Order order\n"
+"where order.items[ size(order.items) - 1 ] = item]]>"
 msgstr ""
 
-#: index.docbook:741
-msgid "HQL also provides the built-in <literal>index()</literal> function, for elements of a one-to-many association or collection of values."
+#. Tag: para
+#: query_hql.xml:741
+#, no-c-format
+msgid ""
+"HQL also provides the built-in <literal>index()</literal> function, for "
+"elements of a one-to-many association or collection of values."
 msgstr ""
+"对于一个一对多的关联(one-to-many association)或是值的集合中的元素, HQL也提"
+"供内建的<literal>index()</literal>函数,"
 
-#: index.docbook:746
+#. Tag: programlisting
+#: query_hql.xml:746
+#, no-c-format
 msgid ""
-      "<![CDATA[select item, index(item) from Order order\n"
-      "    join order.items item\n"
-      "where index(item) < 5]]>"
+"<![CDATA[select item, index(item) from Order order\n"
+"    join order.items item\n"
+"where index(item) < 5]]>"
 msgstr ""
 
-#: index.docbook:748
+#. Tag: para
+#: query_hql.xml:748
+#, no-c-format
 msgid "Scalar SQL functions supported by the underlying database may be used"
-msgstr ""
+msgstr "如果底层数据库支持标量的SQL函数,它们也可以被使用"
 
-#: index.docbook:752
+#. Tag: programlisting
+#: query_hql.xml:752
+#, no-c-format
 msgid "<![CDATA[from DomesticCat cat where upper(cat.name) like 'FRI%']]>"
 msgstr ""
 
-#: index.docbook:754
-msgid "If you are not yet convinced by all this, think how much longer and less readable the following query would be in SQL:"
+#. Tag: para
+#: query_hql.xml:754
+#, no-c-format
+msgid ""
+"If you are not yet convinced by all this, think how much longer and less "
+"readable the following query would be in SQL:"
 msgstr ""
+"如果你还不能对所有的这些深信不疑,想想下面的查询。如果使用SQL,语句长度会增长"
+"多少,可读性会下降多少:"
 
-#: index.docbook:759
+#. Tag: programlisting
+#: query_hql.xml:759
+#, no-c-format
 msgid ""
-      "<![CDATA[select cust\n"
-      "from Product prod,\n"
-      "    Store store\n"
-      "    inner join store.customers cust\n"
-      "where prod.name = 'widget'\n"
-      "    and store.location.name in ( 'Melbourne', 'Sydney' )\n"
-      "    and prod = all elements(cust.currentOrder.lineItems)]]>"
+"<![CDATA[select cust\n"
+"from Product prod,\n"
+"    Store store\n"
+"    inner join store.customers cust\n"
+"where prod.name = 'widget'\n"
+"    and store.location.name in ( 'Melbourne', 'Sydney' )\n"
+"    and prod = all elements(cust.currentOrder.lineItems)]]>"
 msgstr ""
 
-#: index.docbook:761
+#. Tag: para
+#: query_hql.xml:761
+#, no-c-format
 msgid "<emphasis>Hint:</emphasis> something like"
-msgstr ""
+msgstr "<emphasis>提示:</emphasis> 会像如下的语句"
 
-#: index.docbook:765
+#. Tag: programlisting
+#: query_hql.xml:765
+#, no-c-format
 msgid ""
-      "<![CDATA[SELECT cust.name, cust.address, cust.phone, cust.id, cust.current_order\n"
-      "FROM customers cust,\n"
-      "    stores store,\n"
-      "    locations loc,\n"
-      "    store_customers sc,\n"
-      "    product prod\n"
-      "WHERE prod.name = 'widget'\n"
-      "    AND store.loc_id = loc.id\n"
-      "    AND loc.name IN ( 'Melbourne', 'Sydney' )\n"
-      "    AND sc.store_id = store.id\n"
-      "    AND sc.cust_id = cust.id\n"
-      "    AND prod.id = ALL(\n"
-      "        SELECT item.prod_id\n"
-      "        FROM line_items item, orders o\n"
-      "        WHERE item.order_id = o.id\n"
-      "            AND cust.current_order = o.id\n"
-      "    )]]>"
+"<![CDATA[SELECT cust.name, cust.address, cust.phone, cust.id, cust."
+"current_order\n"
+"FROM customers cust,\n"
+"    stores store,\n"
+"    locations loc,\n"
+"    store_customers sc,\n"
+"    product prod\n"
+"WHERE prod.name = 'widget'\n"
+"    AND store.loc_id = loc.id\n"
+"    AND loc.name IN ( 'Melbourne', 'Sydney' )\n"
+"    AND sc.store_id = store.id\n"
+"    AND sc.cust_id = cust.id\n"
+"    AND prod.id = ALL(\n"
+"        SELECT item.prod_id\n"
+"        FROM line_items item, orders o\n"
+"        WHERE item.order_id = o.id\n"
+"            AND cust.current_order = o.id\n"
+"    )]]>"
 msgstr ""
 
-#: index.docbook:770
+#. Tag: title
+#: query_hql.xml:770
+#, no-c-format
 msgid "The order by clause"
-msgstr ""
+msgstr "order by子句"
 
-#: index.docbook:772
-msgid "The list returned by a query may be ordered by any property of a returned class or components:"
+#. Tag: para
+#: query_hql.xml:772
+#, no-c-format
+msgid ""
+"The list returned by a query may be ordered by any property of a returned "
+"class or components:"
 msgstr ""
+"查询返回的列表(list)可以按照一个返回的类或组件(components)中的任何属性"
+"(property)进行排序:"
 
-#: index.docbook:776
+#. Tag: programlisting
+#: query_hql.xml:776
+#, no-c-format
 msgid ""
-      "<![CDATA[from DomesticCat cat\n"
-      "order by cat.name asc, cat.weight desc, cat.birthdate]]>"
+"<![CDATA[from DomesticCat cat\n"
+"order by cat.name asc, cat.weight desc, cat.birthdate]]>"
 msgstr ""
 
-#: index.docbook:778
-msgid "The optional <literal>asc</literal> or <literal>desc</literal> indicate ascending or descending order respectively."
+#. Tag: para
+#: query_hql.xml:778
+#, no-c-format
+msgid ""
+"The optional <literal>asc</literal> or <literal>desc</literal> indicate "
+"ascending or descending order respectively."
 msgstr ""
+"可选的<literal>asc</literal>或<literal>desc</literal>关键字指明了按照升序或降"
+"序进行排序."
 
-#: index.docbook:785
+#. Tag: title
+#: query_hql.xml:785
+#, no-c-format
 msgid "The group by clause"
-msgstr ""
+msgstr "group by子句"
 
-#: index.docbook:787
-msgid "A query that returns aggregate values may be grouped by any property of a returned class or components:"
+#. Tag: para
+#: query_hql.xml:787
+#, no-c-format
+msgid ""
+"A query that returns aggregate values may be grouped by any property of a "
+"returned class or components:"
 msgstr ""
+"一个返回聚集值(aggregate values)的查询可以按照一个返回的类或组件(components)"
+"中的任何属性(property)进行分组:"
 
-#: index.docbook:791
+#. Tag: programlisting
+#: query_hql.xml:791
+#, no-c-format
 msgid ""
-      "<![CDATA[select cat.color, sum(cat.weight), count(cat)\n"
-      "from Cat cat\n"
-      "group by cat.color]]>"
+"<![CDATA[select cat.color, sum(cat.weight), count(cat)\n"
+"from Cat cat\n"
+"group by cat.color]]>"
 msgstr ""
 
-#: index.docbook:793
+#. Tag: programlisting
+#: query_hql.xml:793
+#, no-c-format
 msgid ""
-      "<![CDATA[select foo.id, avg(name), max(name)\n"
-      "from Foo foo join foo.names name\n"
-      "group by foo.id]]>"
+"<![CDATA[select foo.id, avg(name), max(name)\n"
+"from Foo foo join foo.names name\n"
+"group by foo.id]]>"
 msgstr ""
 
-#: index.docbook:795
+#. Tag: para
+#: query_hql.xml:795
+#, no-c-format
 msgid "A <literal>having</literal> clause is also allowed."
-msgstr ""
+msgstr "<literal>having</literal>子句在这里也允许使用."
 
-#: index.docbook:799
+#. Tag: programlisting
+#: query_hql.xml:799
+#, no-c-format
 msgid ""
-      "<![CDATA[select cat.color, sum(cat.weight), count(cat)\n"
-      "from Cat cat\n"
-      "group by cat.color\n"
-      "having cat.color in (eg.Color.TABBY, eg.Color.BLACK)]]>"
+"<![CDATA[select cat.color, sum(cat.weight), count(cat)\n"
+"from Cat cat\n"
+"group by cat.color\n"
+"having cat.color in (eg.Color.TABBY, eg.Color.BLACK)]]>"
 msgstr ""
 
-#: index.docbook:801
-msgid "SQL functions and aggregate functions are allowed in the <literal>having</literal> and <literal>order by</literal> clauses, if supported by the underlying database (eg. not in MySQL)."
+#. Tag: para
+#: query_hql.xml:801
+#, no-c-format
+msgid ""
+"SQL functions and aggregate functions are allowed in the <literal>having</"
+"literal> and <literal>order by</literal> clauses, if supported by the "
+"underlying database (eg. not in MySQL)."
 msgstr ""
+"如果底层的数据库支持的话(例如不能在MySQL中使用),SQL的一般函数与聚集函数也可"
+"以出现 在<literal>having</literal>与<literal>order by</literal> 子句中。"
 
-#: index.docbook:807
+#. Tag: programlisting
+#: query_hql.xml:807
+#, no-c-format
 msgid ""
-      "<![CDATA[select cat\n"
-      "from Cat cat\n"
-      "    join cat.kittens kitten\n"
-      "group by cat.id, cat.name, cat.other, cat.properties\n"
-      "having avg(kitten.weight) > 100\n"
-      "order by count(kitten) asc, sum(kitten.weight) desc]]>"
+"<![CDATA[select cat\n"
+"from Cat cat\n"
+"    join cat.kittens kitten\n"
+"group by cat.id, cat.name, cat.other, cat.properties\n"
+"having avg(kitten.weight) > 100\n"
+"order by count(kitten) asc, sum(kitten.weight) desc]]>"
 msgstr ""
 
-#: index.docbook:809
-msgid "Note that neither the <literal>group by</literal> clause nor the <literal>order by</literal> clause may contain arithmetic expressions. Also note that Hibernate currently does not expand a grouped entity, so you can't write <literal>group by cat</literal> if all properties of <literal>cat</literal> are non-aggregated. You have to list all non-aggregated properties explicitly."
+#. Tag: para
+#: query_hql.xml:809
+#, no-c-format
+msgid ""
+"Note that neither the <literal>group by</literal> clause nor the "
+"<literal>order by</literal> clause may contain arithmetic expressions. Also "
+"note that Hibernate currently does not expand a grouped entity, so you can't "
+"write <literal>group by cat</literal> if all properties of <literal>cat</"
+"literal> are non-aggregated. You have to list all non-aggregated properties "
+"explicitly."
 msgstr ""
+"注意<literal>group by</literal>子句与 <literal>order by</literal>子句中都不能"
+"包含算术表达式(arithmetic expressions). 也要注意Hibernate目前不会扩展group"
+"的实体,因此你不能写<literal>group by cat</literal>,除非<literal>cat</literal>"
+"的所有属性都不是聚集的(non-aggregated)。你必须明确的列出所有的非聚集属性。"
 
-#: index.docbook:821
+#. Tag: title
+#: query_hql.xml:821
+#, no-c-format
 msgid "Subqueries"
-msgstr ""
+msgstr "子查询"
 
-#: index.docbook:823
-msgid "For databases that support subselects, Hibernate supports subqueries within queries. A subquery must be surrounded by parentheses (often by an SQL aggregate function call). Even correlated subqueries (subqueries that refer to an alias in the outer query) are allowed."
+#. Tag: para
+#: query_hql.xml:823
+#, no-c-format
+msgid ""
+"For databases that support subselects, Hibernate supports subqueries within "
+"queries. A subquery must be surrounded by parentheses (often by an SQL "
+"aggregate function call). Even correlated subqueries (subqueries that refer "
+"to an alias in the outer query) are allowed."
 msgstr ""
+"对于支持子查询的数据库,Hibernate支持在查询中使用子查询。一个子查询必须被圆括"
+"号包围起来(经常是SQL聚集函数的圆括号)。 甚至相互关联的子查询(引用到外部查"
+"询中的别名的子查询)也是允许的。"
 
-#: index.docbook:829
+#. Tag: programlisting
+#: query_hql.xml:829
+#, no-c-format
 msgid ""
-      "<![CDATA[from Cat as fatcat\n"
-      "where fatcat.weight > (\n"
-      "    select avg(cat.weight) from DomesticCat cat\n"
-      ")]]>"
+"<![CDATA[from Cat as fatcat\n"
+"where fatcat.weight > (\n"
+"    select avg(cat.weight) from DomesticCat cat\n"
+")]]>"
 msgstr ""
 
-#: index.docbook:831
+#. Tag: programlisting
+#: query_hql.xml:831
+#, no-c-format
 msgid ""
-      "<![CDATA[from DomesticCat as cat\n"
-      "where cat.name = some (\n"
-      "    select name.nickName from Name as name\n"
-      ")]]>"
+"<![CDATA[from DomesticCat as cat\n"
+"where cat.name = some (\n"
+"    select name.nickName from Name as name\n"
+")]]>"
 msgstr ""
 
-#: index.docbook:833
+#. Tag: programlisting
+#: query_hql.xml:833
+#, no-c-format
 msgid ""
-      "<![CDATA[from Cat as cat\n"
-      "where not exists (\n"
-      "    from Cat as mate where mate.mate = cat\n"
-      ")]]>"
+"<![CDATA[from Cat as cat\n"
+"where not exists (\n"
+"    from Cat as mate where mate.mate = cat\n"
+")]]>"
 msgstr ""
 
-#: index.docbook:835
+#. Tag: programlisting
+#: query_hql.xml:835
+#, no-c-format
 msgid ""
-      "<![CDATA[from DomesticCat as cat\n"
-      "where cat.name not in (\n"
-      "    select name.nickName from Name as name\n"
-      ")]]>"
+"<![CDATA[from DomesticCat as cat\n"
+"where cat.name not in (\n"
+"    select name.nickName from Name as name\n"
+")]]>"
 msgstr ""
 
-#: index.docbook:837
+#. Tag: programlisting
+#: query_hql.xml:837
+#, no-c-format
 msgid ""
-      "<![CDATA[select cat.id, (select max(kit.weight) from cat.kitten kit)\n"
-      "from Cat as cat]]>"
+"<![CDATA[select cat.id, (select max(kit.weight) from cat.kitten kit)\n"
+"from Cat as cat]]>"
 msgstr ""
 
-#: index.docbook:839
+#. Tag: para
+#: query_hql.xml:839
+#, no-c-format
 msgid "Note that HQL subqueries may occur only in the select or where clauses."
-msgstr ""
+msgstr "注意,HQL自查询只可以在select或者where子句中出现。"
 
-#: index.docbook:843
-msgid "Note that subqueries can also utilize <literal>row value constructor</literal> syntax. See <xref linkend=\"queryhql-tuple\"/> for more details."
+#. Tag: para
+#: query_hql.xml:843
+#, no-c-format
+msgid ""
+"Note that subqueries can also utilize <literal>row value constructor</"
+"literal> syntax. See <xref linkend=\"queryhql-tuple\"/> for more details."
 msgstr ""
+"Note that subqueries can also utilize <literal>row value constructor</"
+"literal> syntax. See <xref linkend=\"queryhql-tuple\"/> for more details."
 
-#: index.docbook:851
+#. Tag: title
+#: query_hql.xml:851
+#, no-c-format
 msgid "HQL examples"
-msgstr ""
+msgstr "HQL示例"
 
-#: index.docbook:853
-msgid "Hibernate queries can be quite powerful and complex. In fact, the power of the query language is one of Hibernate's main selling points. Here are some example queries very similar to queries that I used on a recent project. Note that most queries you will write are much simpler than these!"
+#. Tag: para
+#: query_hql.xml:853
+#, no-c-format
+msgid ""
+"Hibernate queries can be quite powerful and complex. In fact, the power of "
+"the query language is one of Hibernate's main selling points. Here are some "
+"example queries very similar to queries that I used on a recent project. "
+"Note that most queries you will write are much simpler than these!"
 msgstr ""
+"Hibernate查询可以非常的强大与复杂。实际上,Hibernate的一个主要卖点就是查询语"
+"句的威力。这里有一些例子,它们与我在最近的 一个项目中使用的查询非常相似。注意"
+"你能用到的大多数查询比这些要简单的多!"
 
-#: index.docbook:859
-msgid "The following query returns the order id, number of items and total value of the order for all unpaid orders for a particular customer and given minimum total value, ordering the results by total value. In determining the prices, it uses the current catalog. The resulting SQL query, against the <literal>ORDER</literal>, <literal>ORDER_LINE</literal>, <literal>PRODUCT</literal>, <literal>CATALOG</literal> and <literal>PRICE</literal> tables has four inner joins and an (uncorrelated) subselect."
+#. Tag: para
+#: query_hql.xml:859
+#, no-c-format
+msgid ""
+"The following query returns the order id, number of items and total value of "
+"the order for all unpaid orders for a particular customer and given minimum "
+"total value, ordering the results by total value. In determining the prices, "
+"it uses the current catalog. The resulting SQL query, against the "
+"<literal>ORDER</literal>, <literal>ORDER_LINE</literal>, <literal>PRODUCT</"
+"literal>, <literal>CATALOG</literal> and <literal>PRICE</literal> tables has "
+"four inner joins and an (uncorrelated) subselect."
 msgstr ""
+"下面的查询对于某个特定的客户的所有未支付的账单,在给定给最小总价值的情况下,"
+"返回订单的id,条目的数量和总价值, 返回值按照总价值的结果进行排序。为了决定价"
+"格,查询使用了当前目录。作为转换结果的SQL查询,使用了<literal>ORDER</"
+"literal>, <literal>ORDER_LINE</literal>, <literal>PRODUCT</literal>, "
+"<literal>CATALOG</literal> 和<literal>PRICE</literal> 库表。"
 
-#: index.docbook:868
+#. Tag: programlisting
+#: query_hql.xml:868
+#, no-c-format
 msgid ""
-      "<![CDATA[select order.id, sum(price.amount), count(item)\n"
-      "from Order as order\n"
-      "    join order.lineItems as item\n"
-      "    join item.product as product,\n"
-      "    Catalog as catalog\n"
-      "    join catalog.prices as price\n"
-      "where order.paid = false\n"
-      "    and order.customer = :customer\n"
-      "    and price.product = product\n"
-      "    and catalog.effectiveDate < sysdate\n"
-      "    and catalog.effectiveDate >= all (\n"
-      "        select cat.effectiveDate\n"
-      "        from Catalog as cat\n"
-      "        where cat.effectiveDate < sysdate\n"
-      "    )\n"
-      "group by order\n"
-      "having sum(price.amount) > :minAmount\n"
-      "order by sum(price.amount) desc]]>"
+"<![CDATA[select order.id, sum(price.amount), count(item)\n"
+"from Order as order\n"
+"    join order.lineItems as item\n"
+"    join item.product as product,\n"
+"    Catalog as catalog\n"
+"    join catalog.prices as price\n"
+"where order.paid = false\n"
+"    and order.customer = :customer\n"
+"    and price.product = product\n"
+"    and catalog.effectiveDate < sysdate\n"
+"    and catalog.effectiveDate >= all (\n"
+"        select cat.effectiveDate\n"
+"        from Catalog as cat\n"
+"        where cat.effectiveDate < sysdate\n"
+"    )\n"
+"group by order\n"
+"having sum(price.amount) > :minAmount\n"
+"order by sum(price.amount) desc]]>"
 msgstr ""
 
-#: index.docbook:870
-msgid "What a monster! Actually, in real life, I'm not very keen on subqueries, so my query was really more like this:"
+#. Tag: para
+#: query_hql.xml:870
+#, no-c-format
+msgid ""
+"What a monster! Actually, in real life, I'm not very keen on subqueries, so "
+"my query was really more like this:"
 msgstr ""
+"这简直是一个怪物!实际上,在现实生活中,我并不热衷于子查询,所以我的查询语句"
+"看起来更像这个:"
 
-#: index.docbook:875
+#. Tag: programlisting
+#: query_hql.xml:875
+#, no-c-format
 msgid ""
-      "<![CDATA[select order.id, sum(price.amount), count(item)\n"
-      "from Order as order\n"
-      "    join order.lineItems as item\n"
-      "    join item.product as product,\n"
-      "    Catalog as catalog\n"
-      "    join catalog.prices as price\n"
-      "where order.paid = false\n"
-      "    and order.customer = :customer\n"
-      "    and price.product = product\n"
-      "    and catalog = :currentCatalog\n"
-      "group by order\n"
-      "having sum(price.amount) > :minAmount\n"
-      "order by sum(price.amount) desc]]>"
+"<![CDATA[select order.id, sum(price.amount), count(item)\n"
+"from Order as order\n"
+"    join order.lineItems as item\n"
+"    join item.product as product,\n"
+"    Catalog as catalog\n"
+"    join catalog.prices as price\n"
+"where order.paid = false\n"
+"    and order.customer = :customer\n"
+"    and price.product = product\n"
+"    and catalog = :currentCatalog\n"
+"group by order\n"
+"having sum(price.amount) > :minAmount\n"
+"order by sum(price.amount) desc]]>"
 msgstr ""
 
-#: index.docbook:877
-msgid "The next query counts the number of payments in each status, excluding all payments in the <literal>AWAITING_APPROVAL</literal> status where the most recent status change was made by the current user. It translates to an SQL query with two inner joins and a correlated subselect against the <literal>PAYMENT</literal>, <literal>PAYMENT_STATUS</literal> and <literal>PAYMENT_STATUS_CHANGE</literal> tables."
+#. Tag: para
+#: query_hql.xml:877
+#, no-c-format
+msgid ""
+"The next query counts the number of payments in each status, excluding all "
+"payments in the <literal>AWAITING_APPROVAL</literal> status where the most "
+"recent status change was made by the current user. It translates to an SQL "
+"query with two inner joins and a correlated subselect against the "
+"<literal>PAYMENT</literal>, <literal>PAYMENT_STATUS</literal> and "
+"<literal>PAYMENT_STATUS_CHANGE</literal> tables."
 msgstr ""
+"下面一个查询计算每一种状态下的支付的数目,除去所有处于"
+"<literal>AWAITING_APPROVAL</literal>状态的支付,因为在该状态下 当前的用户作出"
+"了状态的最新改变。该查询被转换成含有两个内连接以及一个相关联的子选择的SQL查"
+"询,该查询使用了表 <literal>PAYMENT</literal>, <literal>PAYMENT_STATUS</"
+"literal> 以及 <literal>PAYMENT_STATUS_CHANGE</literal>。"
 
-#: index.docbook:885
+#. Tag: programlisting
+#: query_hql.xml:885
+#, no-c-format
 msgid ""
-      "<![CDATA[select count(payment), status.name\n"
-      "from Payment as payment\n"
-      "    join payment.currentStatus as status\n"
-      "    join payment.statusChanges as statusChange\n"
-      "where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
-      "    or (\n"
-      "        statusChange.timeStamp = (\n"
-      "            select max(change.timeStamp)\n"
-      "            from PaymentStatusChange change\n"
-      "            where change.payment = payment\n"
-      "        )\n"
-      "        and statusChange.user <> :currentUser\n"
-      "    )\n"
-      "group by status.name, status.sortOrder\n"
-      "order by status.sortOrder]]>"
+"<![CDATA[select count(payment), status.name\n"
+"from Payment as payment\n"
+"    join payment.currentStatus as status\n"
+"    join payment.statusChanges as statusChange\n"
+"where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
+"    or (\n"
+"        statusChange.timeStamp = (\n"
+"            select max(change.timeStamp)\n"
+"            from PaymentStatusChange change\n"
+"            where change.payment = payment\n"
+"        )\n"
+"        and statusChange.user <> :currentUser\n"
+"    )\n"
+"group by status.name, status.sortOrder\n"
+"order by status.sortOrder]]>"
 msgstr ""
 
-#: index.docbook:887
-msgid "If I would have mapped the <literal>statusChanges</literal> collection as a list, instead of a set, the query would have been much simpler to write."
+#. Tag: para
+#: query_hql.xml:887
+#, no-c-format
+msgid ""
+"If I would have mapped the <literal>statusChanges</literal> collection as a "
+"list, instead of a set, the query would have been much simpler to write."
 msgstr ""
+"如果我把<literal>statusChanges</literal>实例集映射为一个列表(list)而不是一"
+"个集合(set), 书写查询语句将更加简单."
 
-#: index.docbook:892
+#. Tag: programlisting
+#: query_hql.xml:892
+#, no-c-format
 msgid ""
-      "<![CDATA[select count(payment), status.name\n"
-      "from Payment as payment\n"
-      "    join payment.currentStatus as status\n"
-      "where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
-      "    or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :currentUser\n"
-      "group by status.name, status.sortOrder\n"
-      "order by status.sortOrder]]>"
+"<![CDATA[select count(payment), status.name\n"
+"from Payment as payment\n"
+"    join payment.currentStatus as status\n"
+"where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
+"    or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :"
+"currentUser\n"
+"group by status.name, status.sortOrder\n"
+"order by status.sortOrder]]>"
 msgstr ""
 
-#: index.docbook:894
-msgid "The next query uses the MS SQL Server <literal>isNull()</literal> function to return all the accounts and unpaid payments for the organization to which the current user belongs. It translates to an SQL query with three inner joins, an outer join and a subselect against the <literal>ACCOUNT</literal>, <literal>PAYMENT</literal>, <literal>PAYMENT_STATUS</literal>, <literal>ACCOUNT_TYPE</literal>, <literal>ORGANIZATION</literal> and <literal>ORG_USER</literal> tables."
+#. Tag: para
+#: query_hql.xml:894
+#, no-c-format
+msgid ""
+"The next query uses the MS SQL Server <literal>isNull()</literal> function "
+"to return all the accounts and unpaid payments for the organization to which "
+"the current user belongs. It translates to an SQL query with three inner "
+"joins, an outer join and a subselect against the <literal>ACCOUNT</literal>, "
+"<literal>PAYMENT</literal>, <literal>PAYMENT_STATUS</literal>, "
+"<literal>ACCOUNT_TYPE</literal>, <literal>ORGANIZATION</literal> and "
+"<literal>ORG_USER</literal> tables."
 msgstr ""
+"下面一个查询使用了MS SQL Server的 <literal>isNull()</literal>函数用以返回当前"
+"用户所属组织的组织帐号及组织未支付的账。 它被转换成一个对表<literal>ACCOUNT</"
+"literal>, <literal>PAYMENT</literal>, <literal>PAYMENT_STATUS</literal>, "
+"<literal>ACCOUNT_TYPE</literal>, <literal>ORGANIZATION</literal> 以及 "
+"<literal>ORG_USER</literal>进行的三个内连接, 一个外连接和一个子选择的SQL查"
+"询。"
 
-#: index.docbook:903
+#. Tag: programlisting
+#: query_hql.xml:903
+#, no-c-format
 msgid ""
-      "<![CDATA[select account, payment\n"
-      "from Account as account\n"
-      "    left outer join account.payments as payment\n"
-      "where :currentUser in elements(account.holder.users)\n"
-      "    and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, PaymentStatus.UNPAID)\n"
-      "order by account.type.sortOrder, account.accountNumber, payment.dueDate]]>"
+"<![CDATA[select account, payment\n"
+"from Account as account\n"
+"    left outer join account.payments as payment\n"
+"where :currentUser in elements(account.holder.users)\n"
+"    and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
+"PaymentStatus.UNPAID)\n"
+"order by account.type.sortOrder, account.accountNumber, payment.dueDate]]>"
 msgstr ""
 
-#: index.docbook:905
-msgid "For some databases, we would need to do away with the (correlated) subselect."
-msgstr ""
+#. Tag: para
+#: query_hql.xml:905
+#, no-c-format
+msgid ""
+"For some databases, we would need to do away with the (correlated) subselect."
+msgstr "对于一些数据库,我们需要弃用(相关的)子选择。"
 
-#: index.docbook:909
+#. Tag: programlisting
+#: query_hql.xml:909
+#, no-c-format
 msgid ""
-      "<![CDATA[select account, payment\n"
-      "from Account as account\n"
-      "    join account.holder.users as user\n"
-      "    left outer join account.payments as payment\n"
-      "where :currentUser = user\n"
-      "    and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, PaymentStatus.UNPAID)\n"
-      "order by account.type.sortOrder, account.accountNumber, payment.dueDate]]>"
+"<![CDATA[select account, payment\n"
+"from Account as account\n"
+"    join account.holder.users as user\n"
+"    left outer join account.payments as payment\n"
+"where :currentUser = user\n"
+"    and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
+"PaymentStatus.UNPAID)\n"
+"order by account.type.sortOrder, account.accountNumber, payment.dueDate]]>"
 msgstr ""
 
-#: index.docbook:914
+#. Tag: title
+#: query_hql.xml:914
+#, no-c-format
 msgid "Bulk update and delete"
-msgstr ""
+msgstr "批量的UPDATE和DELETE"
 
-#: index.docbook:916
-msgid "HQL now supports <literal>update</literal>, <literal>delete</literal> and <literal>insert ... select ...</literal> statements. See <xref linkend=\"batch-direct\"/> for details."
+#. Tag: para
+#: query_hql.xml:916
+#, no-c-format
+msgid ""
+"HQL now supports <literal>update</literal>, <literal>delete</literal> and "
+"<literal>insert ... select ...</literal> statements. See <xref linkend="
+"\"batch-direct\"/> for details."
 msgstr ""
+"HQL现在支持 <literal>update</literal>, <literal>delete</literal> 和 "
+"<literal>insert ... select ...</literal>语句. 查阅 <xref linkend=\"batch-"
+"direct\"/> 以获得更多信息。"
 
-#: index.docbook:924
+#. Tag: title
+#: query_hql.xml:924
+#, no-c-format
 msgid "Tips &amp; Tricks"
-msgstr ""
+msgstr "小技巧 &amp; 小窍门"
 
-#: index.docbook:926
-msgid "You can count the number of query results without actually returning them:"
-msgstr ""
+#. Tag: para
+#: query_hql.xml:926
+#, no-c-format
+msgid ""
+"You can count the number of query results without actually returning them:"
+msgstr "你可以统计查询结果的数目而不必实际的返回他们:"
 
-#: index.docbook:930
-msgid "<![CDATA[( (Integer) session.createQuery(\"select count(*) from ....\").iterate().next() ).intValue()]]>"
+#. Tag: programlisting
+#: query_hql.xml:930
+#, no-c-format
+msgid ""
+"<![CDATA[( (Integer) session.createQuery(\"select count(*) from ....\")."
+"iterate().next() ).intValue()]]>"
 msgstr ""
 
-#: index.docbook:932
+#. Tag: para
+#: query_hql.xml:932
+#, no-c-format
 msgid "To order a result by the size of a collection, use the following query:"
-msgstr ""
+msgstr "若想根据一个集合的大小来进行排序,可以使用如下的语句:"
 
-#: index.docbook:936
+#. Tag: programlisting
+#: query_hql.xml:936
+#, no-c-format
 msgid ""
-      "<![CDATA[select usr.id, usr.name\n"
-      "from User as usr\n"
-      "    left join usr.messages as msg\n"
-      "group by usr.id, usr.name\n"
-      "order by count(msg)]]>"
+"<![CDATA[select usr.id, usr.name\n"
+"from User as usr\n"
+"    left join usr.messages as msg\n"
+"group by usr.id, usr.name\n"
+"order by count(msg)]]>"
 msgstr ""
 
-#: index.docbook:938
-msgid "If your database supports subselects, you can place a condition upon selection size in the where clause of your query:"
+#. Tag: para
+#: query_hql.xml:938
+#, no-c-format
+msgid ""
+"If your database supports subselects, you can place a condition upon "
+"selection size in the where clause of your query:"
 msgstr ""
+"如果你的数据库支持子选择,你可以在你的查询的where子句中为选择的大小"
+"(selection size)指定一个条件:"
 
-#: index.docbook:943
+#. Tag: programlisting
+#: query_hql.xml:943
+#, no-c-format
 msgid "<![CDATA[from User usr where size(usr.messages) >= 1]]>"
 msgstr ""
 
-#: index.docbook:945
+#. Tag: para
+#: query_hql.xml:945
+#, no-c-format
 msgid "If your database doesn't support subselects, use the following query:"
-msgstr ""
+msgstr "如果你的数据库不支持子选择语句,使用下面的查询:"
 
-#: index.docbook:949
+#. Tag: programlisting
+#: query_hql.xml:949
+#, no-c-format
 msgid ""
-      "<![CDATA[select usr.id, usr.name\n"
-      "from User usr.name\n"
-      "    join usr.messages msg\n"
-      "group by usr.id, usr.name\n"
-      "having count(msg) >= 1]]>"
+"<![CDATA[select usr.id, usr.name\n"
+"from User usr.name\n"
+"    join usr.messages msg\n"
+"group by usr.id, usr.name\n"
+"having count(msg) >= 1]]>"
 msgstr ""
 
-#: index.docbook:951
-msgid "As this solution can't return a <literal>User</literal> with zero messages because of the inner join, the following form is also useful:"
+#. Tag: para
+#: query_hql.xml:951
+#, no-c-format
+msgid ""
+"As this solution can't return a <literal>User</literal> with zero messages "
+"because of the inner join, the following form is also useful:"
 msgstr ""
+"因为内连接(inner join)的原因,这个解决方案不能返回含有零个信息的"
+"<literal>User</literal> 类的实例, 所以这种情况下使用下面的格式将是有帮助的:"
 
-#: index.docbook:956
+#. Tag: programlisting
+#: query_hql.xml:956
+#, no-c-format
 msgid ""
-      "<![CDATA[select usr.id, usr.name\n"
-      "from User as usr\n"
-      "    left join usr.messages as msg\n"
-      "group by usr.id, usr.name\n"
-      "having count(msg) = 0]]>"
+"<![CDATA[select usr.id, usr.name\n"
+"from User as usr\n"
+"    left join usr.messages as msg\n"
+"group by usr.id, usr.name\n"
+"having count(msg) = 0]]>"
 msgstr ""
 
-#: index.docbook:958
+#. Tag: para
+#: query_hql.xml:958
+#, no-c-format
 msgid "Properties of a JavaBean can be bound to named query parameters:"
-msgstr ""
+msgstr "JavaBean的属性可以被绑定到一个命名查询(named query)的参数上:"
 
-#: index.docbook:962
+#. Tag: programlisting
+#: query_hql.xml:962
+#, no-c-format
 msgid ""
-      "<![CDATA[Query q = s.createQuery(\"from foo Foo as foo where foo.name=:name and foo.size=:size\");\n"
-      "q.setProperties(fooBean); // fooBean has getName() and getSize()\n"
-      "List foos = q.list();]]>"
+"<![CDATA[Query q = s.createQuery(\"from foo Foo as foo where foo.name=:name "
+"and foo.size=:size\");\n"
+"q.setProperties(fooBean); // fooBean has getName() and getSize()\n"
+"List foos = q.list();]]>"
 msgstr ""
 
-#: index.docbook:964
-msgid "Collections are pageable by using the <literal>Query</literal> interface with a filter:"
+#. Tag: para
+#: query_hql.xml:964
+#, no-c-format
+msgid ""
+"Collections are pageable by using the <literal>Query</literal> interface "
+"with a filter:"
 msgstr ""
+"通过将接口<literal>Query</literal>与一个过滤器(filter)一起使用,集合"
+"(Collections)是可以分页的:"
 
-#: index.docbook:968
+#. Tag: programlisting
+#: query_hql.xml:968
+#, no-c-format
 msgid ""
-      "<![CDATA[Query q = s.createFilter( collection, \"\" ); // the trivial filter\n"
-      "q.setMaxResults(PAGE_SIZE);\n"
-      "q.setFirstResult(PAGE_SIZE * pageNumber);\n"
-      "List page = q.list();]]>"
+"<![CDATA[Query q = s.createFilter( collection, \"\" ); // the trivial "
+"filter\n"
+"q.setMaxResults(PAGE_SIZE);\n"
+"q.setFirstResult(PAGE_SIZE * pageNumber);\n"
+"List page = q.list();]]>"
 msgstr ""
 
-#: index.docbook:970
+#. Tag: para
+#: query_hql.xml:970
+#, no-c-format
 msgid "Collection elements may be ordered or grouped using a query filter:"
 msgstr ""
+"通过使用查询过滤器(query filter)可以将集合(Collection)的原素分组或排序:"
 
-#: index.docbook:974
+#. Tag: programlisting
+#: query_hql.xml:974
+#, no-c-format
 msgid ""
-      "<![CDATA[Collection orderedCollection = s.filter( collection, \"order by this.amount\" );\n"
-      "Collection counts = s.filter( collection, \"select this.type, count(this) group by this.type\" );]]>"
+"<![CDATA[Collection orderedCollection = s.filter( collection, \"order by "
+"this.amount\" );\n"
+"Collection counts = s.filter( collection, \"select this.type, count(this) "
+"group by this.type\" );]]>"
 msgstr ""
 
-#: index.docbook:976
+#. Tag: para
+#: query_hql.xml:976
+#, no-c-format
 msgid "You can find the size of a collection without initializing it:"
-msgstr ""
+msgstr "不用通过初始化,你就可以知道一个集合(Collection)的大小:"
 
-#: index.docbook:980
-msgid "<![CDATA[( (Integer) session.createQuery(\"select count(*) from ....\").iterate().next() ).intValue();]]>"
+#. Tag: programlisting
+#: query_hql.xml:980
+#, no-c-format
+msgid ""
+"<![CDATA[( (Integer) session.createQuery(\"select count(*) from ....\")."
+"iterate().next() ).intValue();]]>"
 msgstr ""
 
-#: index.docbook:985
+#. Tag: title
+#: query_hql.xml:985
+#, no-c-format
 msgid "Components"
-msgstr ""
+msgstr "translator-credits"
 
-#: index.docbook:987
-msgid "Components might be used in just about every way that simple value types can be used in HQL queries. They can appear in the <literal>select</literal> clause:"
+#. Tag: para
+#: query_hql.xml:987
+#, no-c-format
+msgid ""
+"Components might be used in just about every way that simple value types can "
+"be used in HQL queries. They can appear in the <literal>select</literal> "
+"clause:"
 msgstr ""
 
-#: index.docbook:992, index.docbook:1038
+#. Tag: programlisting
+#: query_hql.xml:992 query_hql.xml:1038
+#, no-c-format
 msgid "<![CDATA[select p.name from from Person p]]>"
 msgstr ""
 
-#: index.docbook:993
+#. Tag: programlisting
+#: query_hql.xml:993
+#, no-c-format
 msgid "<![CDATA[select p.name.first from from Person p]]>"
 msgstr ""
 
-#: index.docbook:995
-msgid "where the Person's name property is a component. Components can also be used in the <literal>where</literal> clause:"
+#. Tag: para
+#: query_hql.xml:995
+#, no-c-format
+msgid ""
+"where the Person's name property is a component. Components can also be used "
+"in the <literal>where</literal> clause:"
 msgstr ""
 
-#: index.docbook:1000
+#. Tag: programlisting
+#: query_hql.xml:1000
+#, no-c-format
 msgid "<![CDATA[from from Person p where p.name = :name]]>"
 msgstr ""
 
-#: index.docbook:1001
+#. Tag: programlisting
+#: query_hql.xml:1001
+#, no-c-format
 msgid "<![CDATA[from from Person p where p.name.first = :firstName]]>"
 msgstr ""
 
-#: index.docbook:1003
+#. Tag: para
+#: query_hql.xml:1003
+#, no-c-format
 msgid "Components can also be used in the <literal>order by</literal> clause:"
 msgstr ""
 
-#: index.docbook:1007
+#. Tag: programlisting
+#: query_hql.xml:1007
+#, no-c-format
 msgid "<![CDATA[from from Person p order by p.name]]>"
 msgstr ""
 
-#: index.docbook:1008
+#. Tag: programlisting
+#: query_hql.xml:1008
+#, no-c-format
 msgid "<![CDATA[from from Person p order by p.name.first]]>"
 msgstr ""
 
-#: index.docbook:1010
-msgid "Another common use of components is in <xref linkend=\"queryhql-tuple\"/>row value constructors."
+#. Tag: para
+#: query_hql.xml:1010
+#, no-c-format
+msgid ""
+"Another common use of components is in <xref linkend=\"queryhql-tuple\"/>row "
+"value constructors."
 msgstr ""
 
-#: index.docbook:1016
+#. Tag: title
+#: query_hql.xml:1016
+#, no-c-format
 msgid "Row value constructor syntax"
 msgstr ""
 
-#: index.docbook:1018
-msgid "HQL supports the use of ANSI SQL <literal>row value constructor</literal> syntax (sometimes called <literal>tuple</literal> syntax), even though the underlying database may not support that notion. Here we are generally referring to multi-valued comparisons, typically associated with components. Consider an entity Person which defines a name component:"
+#. Tag: para
+#: query_hql.xml:1018
+#, no-c-format
+msgid ""
+"HQL supports the use of ANSI SQL <literal>row value constructor</literal> "
+"syntax (sometimes called <literal>tuple</literal> syntax), even though the "
+"underlying database may not support that notion. Here we are generally "
+"referring to multi-valued comparisons, typically associated with components. "
+"Consider an entity Person which defines a name component:"
 msgstr ""
 
-#: index.docbook:1025
-msgid "<![CDATA[from Person p where p.name.first='John' and p.name.last='Jingleheimer-Schmidt']]>"
+#. Tag: programlisting
+#: query_hql.xml:1025
+#, no-c-format
+msgid ""
+"<![CDATA[from Person p where p.name.first='John' and p.name."
+"last='Jingleheimer-Schmidt']]>"
 msgstr ""
 
-#: index.docbook:1027
-msgid "That's valid syntax, although a little verbose. It be nice to make this a bit more concise and use <literal>row value constructor</literal> syntax:"
+#. Tag: para
+#: query_hql.xml:1027
+#, no-c-format
+msgid ""
+"That's valid syntax, although a little verbose. It be nice to make this a "
+"bit more concise and use <literal>row value constructor</literal> syntax:"
 msgstr ""
 
-#: index.docbook:1032
+#. Tag: programlisting
+#: query_hql.xml:1032
+#, no-c-format
 msgid "<![CDATA[from Person p where p.name=('John', 'Jingleheimer-Schmidt')]]>"
 msgstr ""
 
-#: index.docbook:1034
-msgid "It can also be useful to specify this in the <literal>select</literal> clause:"
+#. Tag: para
+#: query_hql.xml:1034
+#, no-c-format
+msgid ""
+"It can also be useful to specify this in the <literal>select</literal> "
+"clause:"
 msgstr ""
 
-#: index.docbook:1040
-msgid "Another time using <literal>row value constructor</literal> syntax can be beneficial is when using subqueries needing to compare against multiple values:"
+#. Tag: para
+#: query_hql.xml:1040
+#, no-c-format
+msgid ""
+"Another time using <literal>row value constructor</literal> syntax can be "
+"beneficial is when using subqueries needing to compare against multiple "
+"values:"
 msgstr ""
 
-#: index.docbook:1045
+#. Tag: programlisting
+#: query_hql.xml:1045
+#, no-c-format
 msgid ""
-      "<![CDATA[from Cat as cat\n"
-      "where not ( cat.name, cat.color ) in (\n"
-      "    select cat.name, cat.color from DomesticCat cat\n"
-      ")]]>"
+"<![CDATA[from Cat as cat\n"
+"where not ( cat.name, cat.color ) in (\n"
+"    select cat.name, cat.color from DomesticCat cat\n"
+")]]>"
 msgstr ""
 
-#: index.docbook:1047
-msgid "One thing to consider when deciding if you want to use this syntax is that the query will be dependent upon the ordering of the component sub-properties in the metadata."
+#. Tag: para
+#: query_hql.xml:1047
+#, no-c-format
+msgid ""
+"One thing to consider when deciding if you want to use this syntax is that "
+"the query will be dependent upon the ordering of the component sub-"
+"properties in the metadata."
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-

Modified: core/trunk/documentation/manual/translations/zh-CN/content/query_sql.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/query_sql.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/query_sql.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,818 +1,1426 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: query_sql.xml:5
+#, no-c-format
 msgid "Native SQL"
-msgstr ""
+msgstr "Native SQL查询"
 
-#: index.docbook:7
-msgid "You may also express queries in the native SQL dialect of your database. This is useful if you want to utilize database specific features such as query hints or the <literal>CONNECT</literal> keyword in Oracle. It also provides a clean migration path from a direct SQL/JDBC based application to Hibernate."
+#. Tag: para
+#: query_sql.xml:7
+#, no-c-format
+msgid ""
+"You may also express queries in the native SQL dialect of your database. "
+"This is useful if you want to utilize database specific features such as "
+"query hints or the <literal>CONNECT</literal> keyword in Oracle. It also "
+"provides a clean migration path from a direct SQL/JDBC based application to "
+"Hibernate."
 msgstr ""
+"你也可以使用你的数据库的Native SQL语言来查询数据。这对你在要使用数据库的某些"
+"特性的时候(比如说在查询提示或者Oracle中的 <literal>CONNECT</literal>关键字),"
+"这是非常有用的。这就能够扫清你把原来直接使用SQL/JDBC 的程序迁移到基于 "
+"Hibernate应用的道路上的障碍。"
 
-#: index.docbook:13
-msgid "Hibernate3 allows you to specify handwritten SQL (including stored procedures) for all create, update, delete, and load operations."
+#. Tag: para
+#: query_sql.xml:13
+#, no-c-format
+msgid ""
+"Hibernate3 allows you to specify handwritten SQL (including stored "
+"procedures) for all create, update, delete, and load operations."
 msgstr ""
+"Hibernate3允许你使用手写的sql来完成所有的create,update,delete,和load操作(包"
+"括存储过程)"
 
-#: index.docbook:17
+#. Tag: title
+#: query_sql.xml:17
+#, no-c-format
 msgid "Using a <literal>SQLQuery</literal>"
-msgstr ""
+msgstr "使用<literal>SQLQuery</literal>"
 
-#: index.docbook:19
-msgid "Execution of native SQL queries is controlled via the <literal>SQLQuery</literal> interface, which is obtained by calling <literal>Session.createSQLQuery()</literal>. The following describes how to use this API for querying."
+#. Tag: para
+#: query_sql.xml:19
+#, no-c-format
+msgid ""
+"Execution of native SQL queries is controlled via the <literal>SQLQuery</"
+"literal> interface, which is obtained by calling <literal>Session."
+"createSQLQuery()</literal>. The following describes how to use this API for "
+"querying."
 msgstr ""
+"对原生SQL查询执行的控制是通过<literal>SQLQuery</literal>接口进行的,通过执行"
+"<literal>Session.createSQLQuery()</literal>获取这个接口。下面来描述如何使用这"
+"个API进行查询。"
 
-#: index.docbook:25
+#. Tag: title
+#: query_sql.xml:25
+#, no-c-format
 msgid "Scalar queries"
-msgstr ""
+msgstr "标量查询(Scalar queries)"
 
-#: index.docbook:27
+#. Tag: para
+#: query_sql.xml:27
+#, no-c-format
 msgid "The most basic SQL query is to get a list of scalars (values)."
-msgstr ""
+msgstr "最基本的SQL查询就是获得一个标量(数值)的列表。"
 
-#: index.docbook:30
+#. Tag: programlisting
+#: query_sql.xml:30
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\").list();\n"
-      "sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE FROM CATS\").list();\n"
-      "]]>"
+"<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\").list();\n"
+"sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE FROM CATS\").list();\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:32
-msgid "These will both return a List of Object arrays (Object[]) with scalar values for each column in the CATS table. Hibernate will use ResultSetMetadata to deduce the actual order and types of the returned scalar values."
+#. Tag: para
+#: query_sql.xml:32
+#, no-c-format
+msgid ""
+"These will both return a List of Object arrays (Object[]) with scalar values "
+"for each column in the CATS table. Hibernate will use ResultSetMetadata to "
+"deduce the actual order and types of the returned scalar values."
 msgstr ""
+"它们都将返回一个Object数组(Object[])组成的List,数组每个元素都是CATS表的一个"
+"字段值。Hibernate会使用ResultSetMetadata来判定返回的标量值的实际顺序和类型。"
 
-#: index.docbook:37
-msgid "To avoid the overhead of using <literal>ResultSetMetadata</literal> or simply to be more explicit in what is returned one can use <literal>addScalar()</literal>."
+#. Tag: para
+#: query_sql.xml:37
+#, no-c-format
+msgid ""
+"To avoid the overhead of using <literal>ResultSetMetadata</literal> or "
+"simply to be more explicit in what is returned one can use <literal>addScalar"
+"()</literal>."
 msgstr ""
+"如果要避免过多的使用<literal>ResultSetMetadata</literal>,或者只是为了更加明确"
+"的指名返回值,可以使用<literal>addScalar()</literal>。"
 
-#: index.docbook:41
+#. Tag: programlisting
+#: query_sql.xml:41
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\")\n"
-      " .addScalar(\"ID\", Hibernate.LONG)\n"
-      " .addScalar(\"NAME\", Hibernate.STRING)\n"
-      " .addScalar(\"BIRTHDATE\", Hibernate.DATE)\n"
-      "]]>"
+"<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\")\n"
+" .addScalar(\"ID\", Hibernate.LONG)\n"
+" .addScalar(\"NAME\", Hibernate.STRING)\n"
+" .addScalar(\"BIRTHDATE\", Hibernate.DATE)\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:43, index.docbook:89, index.docbook:170, index.docbook:321
+#. Tag: para
+#: query_sql.xml:43 query_sql.xml:89 query_sql.xml:170 query_sql.xml:321
+#, fuzzy, no-c-format
 msgid "This query specified:"
 msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"这个查询指定了:\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"这个查询指定:\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"这个查询指明:\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"这个查询指定:"
 
-#: index.docbook:47, index.docbook:93, index.docbook:325
+#. Tag: para
+#: query_sql.xml:47 query_sql.xml:93 query_sql.xml:325
+#, no-c-format
 msgid "the SQL query string"
-msgstr ""
+msgstr "SQL查询字符串"
 
-#: index.docbook:51
+#. Tag: para
+#: query_sql.xml:51
+#, no-c-format
 msgid "the columns and types to return"
-msgstr ""
+msgstr "要返回的字段和类型"
 
-#: index.docbook:55
-msgid "This will still return Object arrays, but now it will not use <literal>ResultSetMetdata</literal> but will instead explicitly get the ID, NAME and BIRTHDATE column as respectively a Long, String and a Short from the underlying resultset. This also means that only these three columns will be returned, even though the query is using <literal>*</literal> and could return more than the three listed columns."
+#. Tag: para
+#: query_sql.xml:55
+#, no-c-format
+msgid ""
+"This will still return Object arrays, but now it will not use "
+"<literal>ResultSetMetdata</literal> but will instead explicitly get the ID, "
+"NAME and BIRTHDATE column as respectively a Long, String and a Short from "
+"the underlying resultset. This also means that only these three columns will "
+"be returned, even though the query is using <literal>*</literal> and could "
+"return more than the three listed columns."
 msgstr ""
+"它仍然会返回Object数组,但是此时不再使用<literal>ResultSetMetdata</literal>,而"
+"是明确的将ID,NAME和BIRTHDATE按照Long,String和Short类型从resultset中取出。同"
+"时,也指明了就算query是使用<literal>*</literal>来查询的,可能获得超过列出的这"
+"三个字段,也仅仅会返回这三个字段。"
 
-#: index.docbook:63
-msgid "It is possible to leave out the type information for all or some of the scalars."
-msgstr ""
+#. Tag: para
+#: query_sql.xml:63
+#, no-c-format
+msgid ""
+"It is possible to leave out the type information for all or some of the "
+"scalars."
+msgstr "对全部或者部分的标量值不设置类型信息也是可以的。"
 
-#: index.docbook:66
+#. Tag: programlisting
+#: query_sql.xml:66
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\")\n"
-      " .addScalar(\"ID\", Hibernate.LONG)\n"
-      " .addScalar(\"NAME\")\n"
-      " .addScalar(\"BIRTHDATE\")\n"
-      "]]>"
+"<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\")\n"
+" .addScalar(\"ID\", Hibernate.LONG)\n"
+" .addScalar(\"NAME\")\n"
+" .addScalar(\"BIRTHDATE\")\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:68
-msgid "This is essentially the same query as before, but now <literal>ResultSetMetaData</literal> is used to decide the type of NAME and BIRTHDATE where as the type of ID is explicitly specified."
+#. Tag: para
+#: query_sql.xml:68
+#, no-c-format
+msgid ""
+"This is essentially the same query as before, but now "
+"<literal>ResultSetMetaData</literal> is used to decide the type of NAME and "
+"BIRTHDATE where as the type of ID is explicitly specified."
 msgstr ""
+"基本上这和前面一个查询相同,只是此时使用<literal>ResultSetMetaData</literal>来"
+"决定NAME和BIRTHDATE的类型,而ID的类型是明确指出的。"
 
-#: index.docbook:72
-msgid "How the java.sql.Types returned from ResultSetMetaData is mapped to Hibernate types is controlled by the Dialect. If a specific type is not mapped or does not result in the expected type it is possible to customize it via calls to <literal>registerHibernateType</literal> in the Dialect."
+#. Tag: para
+#: query_sql.xml:72
+#, no-c-format
+msgid ""
+"How the java.sql.Types returned from ResultSetMetaData is mapped to "
+"Hibernate types is controlled by the Dialect. If a specific type is not "
+"mapped or does not result in the expected type it is possible to customize "
+"it via calls to <literal>registerHibernateType</literal> in the Dialect."
 msgstr ""
+"关于从ResultSetMetaData返回的java.sql.Types是如何映射到Hibernate类型,是由方"
+"言(Dialect)控制的。假若某个指定的类型没有被映射,或者不是你所预期的类型,你可"
+"以通过Dialet的<literal>registerHibernateType</literal>调用自行定义。"
 
-#: index.docbook:80
+#. Tag: title
+#: query_sql.xml:80
+#, no-c-format
 msgid "Entity queries"
-msgstr ""
+msgstr "实体查询(Entity queries)"
 
-#: index.docbook:82
-msgid "The above queries were all about returning scalar values, basically returning the \"raw\" values from the resultset. The following shows how to get entity objects from a native sql query via <literal>addEntity()</literal>."
+#. Tag: para
+#: query_sql.xml:82
+#, no-c-format
+msgid ""
+"The above queries were all about returning scalar values, basically "
+"returning the \"raw\" values from the resultset. The following shows how to "
+"get entity objects from a native sql query via <literal>addEntity()</"
+"literal>."
 msgstr ""
+"上面的查询都是返回标量值的,也就是从resultset中返回的“裸”数据。下面展示如何通"
+"过<literal>addEntity()</literal>让原生查询返回实体对象。"
 
-#: index.docbook:87
+#. Tag: programlisting
+#: query_sql.xml:87
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\").addEntity(Cat.class);\n"
-      "sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE FROM CATS\").addEntity(Cat.class);\n"
-      "]]>"
+"<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\").addEntity(Cat.class);\n"
+"sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE FROM CATS\").addEntity(Cat."
+"class);\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:97
+#. Tag: para
+#: query_sql.xml:97
+#, no-c-format
 msgid "the entity returned by the query"
-msgstr ""
+msgstr "要返回的实体"
 
-#: index.docbook:101
-msgid "Assuming that Cat is mapped as a class with the columns ID, NAME and BIRTHDATE the above queries will both return a List where each element is a Cat entity."
+#. Tag: para
+#: query_sql.xml:101
+#, no-c-format
+msgid ""
+"Assuming that Cat is mapped as a class with the columns ID, NAME and "
+"BIRTHDATE the above queries will both return a List where each element is a "
+"Cat entity."
 msgstr ""
+"假设Cat被映射为拥有ID,NAME和BIRTHDATE三个字段的类,以上的两个查询都返回一个"
+"List,每个元素都是一个Cat实体。"
 
-#: index.docbook:105
-msgid "If the entity is mapped with a <literal>many-to-one</literal> to another entity it is required to also return this when performing the native query, otherwise a database specific \"column not found\" error will occur. The additional columns will automatically be returned when using the * notation, but we prefer to be explicit as in the following example for a <literal>many-to-one</literal> to a <literal>Dog</literal>:"
+#. Tag: para
+#: query_sql.xml:105
+#, no-c-format
+msgid ""
+"If the entity is mapped with a <literal>many-to-one</literal> to another "
+"entity it is required to also return this when performing the native query, "
+"otherwise a database specific \"column not found\" error will occur. The "
+"additional columns will automatically be returned when using the * notation, "
+"but we prefer to be explicit as in the following example for a <literal>many-"
+"to-one</literal> to a <literal>Dog</literal>:"
 msgstr ""
+"假若实体在映射时有一个<literal>many-to-one</literal>的关联指向另外一个实体,"
+"在查询时必须也返回那个实体,否则会导致发生一个\"column not found\"的数据库错"
+"误。这些附加的字段可以使用*标注来自动返回,但我们希望还是明确指明,看下面这个"
+"具有指向<literal>Dog</literal>的<literal>many-to-one</literal>的例子:"
 
-#: index.docbook:113
+#. Tag: programlisting
+#: query_sql.xml:113
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE, DOG_ID FROM CATS\").addEntity(Cat.class);\n"
-      "]]>"
+"<![CDATA[sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE, DOG_ID FROM CATS"
+"\").addEntity(Cat.class);\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:115
+#. Tag: para
+#: query_sql.xml:115
+#, no-c-format
 msgid "This will allow cat.getDog() to function properly."
-msgstr ""
+msgstr "这样cat.getDog()就能正常运作。"
 
-#: index.docbook:119
+#. Tag: title
+#: query_sql.xml:119
+#, no-c-format
 msgid "Handling associations and collections"
-msgstr ""
+msgstr "处理关联和集合类(Handling associations and collections)"
 
-#: index.docbook:121
-msgid "It is possible to eagerly join in the <literal>Dog</literal> to avoid the possible extra roundtrip for initializing the proxy. This is done via the <literal>addJoin()</literal> method, which allows you to join in an association or collection."
+#. Tag: para
+#: query_sql.xml:121
+#, no-c-format
+msgid ""
+"It is possible to eagerly join in the <literal>Dog</literal> to avoid the "
+"possible extra roundtrip for initializing the proxy. This is done via the "
+"<literal>addJoin()</literal> method, which allows you to join in an "
+"association or collection."
 msgstr ""
+"通过提前抓取将<literal>Dog</literal>连接获得,而避免初始化proxy带来的额外开销"
+"也是可能的。这是通过<literal>addJoin()</literal>方法进行的,这个方法可以让你"
+"将关联或集合连接进来。"
 
-#: index.docbook:126
+#. Tag: programlisting
+#: query_sql.xml:126
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.createSQLQuery(\"SELECT c.ID, NAME, BIRTHDATE, DOG_ID, D_ID, D_NAME FROM CATS c, DOGS d WHERE c.DOG_ID = d.D_ID\")\n"
-      " .addEntity(\"cat\", Cat.class)\n"
-      " .addJoin(\"cat.dog\");\n"
-      "]]>"
+"<![CDATA[sess.createSQLQuery(\"SELECT c.ID, NAME, BIRTHDATE, DOG_ID, D_ID, "
+"D_NAME FROM CATS c, DOGS d WHERE c.DOG_ID = d.D_ID\")\n"
+" .addEntity(\"cat\", Cat.class)\n"
+" .addJoin(\"cat.dog\");\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:128
-msgid "In this example the returned <literal>Cat</literal>'s will have their <literal>dog</literal> property fully initialized without any extra roundtrip to the database. Notice that we added a alias name (\"cat\") to be able to specify the target property path of the join. It is possible to do the same eager joining for collections, e.g. if the <literal>Cat</literal> had a one-to-many to <literal>Dog</literal> instead."
+#. Tag: para
+#: query_sql.xml:128
+#, no-c-format
+msgid ""
+"In this example the returned <literal>Cat</literal>'s will have their "
+"<literal>dog</literal> property fully initialized without any extra "
+"roundtrip to the database. Notice that we added a alias name (\"cat\") to be "
+"able to specify the target property path of the join. It is possible to do "
+"the same eager joining for collections, e.g. if the <literal>Cat</literal> "
+"had a one-to-many to <literal>Dog</literal> instead."
 msgstr ""
+"上面这个例子中,返回的<literal>Cat</literal>对象,其<literal>dog</literal>属"
+"性被完全初始化了,不再需要数据库的额外操作。注意,我们加了一个别名(\"cat\"),"
+"以便指明join的目标属性路径。通过同样的提前连接也可以作用于集合类,例如,假若"
+"<literal>Cat</literal>有一个指向<literal>Dog</literal>的一对多关联。"
 
-#: index.docbook:136
+#. Tag: programlisting
+#: query_sql.xml:136
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE, D_ID, D_NAME, CAT_ID FROM CATS c, DOGS d WHERE c.ID = d.CAT_ID\")\n"
-      " .addEntity(\"cat\", Cat.class)\n"
-      " .addJoin(\"cat.dogs\");\n"
-      "]]>"
+"<![CDATA[sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE, D_ID, D_NAME, "
+"CAT_ID FROM CATS c, DOGS d WHERE c.ID = d.CAT_ID\")\n"
+" .addEntity(\"cat\", Cat.class)\n"
+" .addJoin(\"cat.dogs\");\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:138
-msgid "At this stage we are reaching the limits of what is possible with native queries without starting to enhance the sql queries to make them usable in Hibernate; the problems starts to arise when returning multiple entities of the same type or when the default alias/column names are not enough."
+#. Tag: p
+#: query_sql.xml:138
+#, no-c-format
+msgid ""
+"At this stage we are reaching the limits of what is possible with native "
+"queries without starting to enhance the sql queries to make them usable in "
+"Hibernate; the problems starts to arise when returning multiple entities of "
+"the same type or when the default alias/column names are not enough."
 msgstr ""
+"到此为止,我们碰到了天花板:若不对SQL查询进行增强,这些已经是在Hibernate中使"
+"用原生SQL查询所能做到的最大可能了。下面的问题即将出现:返回多个同样类型的实体"
+"怎么办?或者默认的别名/字段不够又怎么办?"
 
-#: index.docbook:146
+#. Tag: title
+#: query_sql.xml:146
+#, no-c-format
 msgid "Returning multiple entities"
-msgstr ""
+msgstr "返回多个实体(Returning multiple entities)"
 
-#: index.docbook:148
-msgid "Until now the result set column names are assumed to be the same as the column names specified in the mapping document. This can be problematic for SQL queries which join multiple tables, since the same column names may appear in more than one table."
+#. Tag: para
+#: query_sql.xml:148
+#, no-c-format
+msgid ""
+"Until now the result set column names are assumed to be the same as the "
+"column names specified in the mapping document. This can be problematic for "
+"SQL queries which join multiple tables, since the same column names may "
+"appear in more than one table."
 msgstr ""
+"到目前为止,结果集字段名被假定为和映射文件中指定的的字段名是一致的。假若SQL查"
+"询连接了多个表,同一个字段名可能在多个表中出现多次,这就会造成问题。"
 
-#: index.docbook:153
-msgid "Column alias injection is needed in the following query (which most likely will fail):"
-msgstr ""
+#. Tag: para
+#: query_sql.xml:153
+#, no-c-format
+msgid ""
+"Column alias injection is needed in the following query (which most likely "
+"will fail):"
+msgstr "下面的查询中需要使用字段别名注射(这个例子本身会失败):"
 
-#: index.docbook:156
+#. Tag: programlisting
+#: query_sql.xml:156
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.createSQLQuery(\"SELECT c.*, m.*  FROM CATS c, CATS m WHERE c.MOTHER_ID = c.ID\")\n"
-      " .addEntity(\"cat\", Cat.class)\n"
-      " .addEntity(\"mother\", Cat.class)\n"
-      "]]>"
+"<![CDATA[sess.createSQLQuery(\"SELECT c.*, m.*  FROM CATS c, CATS m WHERE c."
+"MOTHER_ID = c.ID\")\n"
+" .addEntity(\"cat\", Cat.class)\n"
+" .addEntity(\"mother\", Cat.class)\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:158
-msgid "The intention for this query is to return two Cat instances per row, a cat and its mother. This will fail since there is a conflict of names since they are mapped to the same column names and on some databases the returned column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. which are not equal to the columns specificed in the mappings (\"ID\" and \"NAME\")."
+#. Tag: para
+#: query_sql.xml:158
+#, no-c-format
+msgid ""
+"The intention for this query is to return two Cat instances per row, a cat "
+"and its mother. This will fail since there is a conflict of names since they "
+"are mapped to the same column names and on some databases the returned "
+"column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. "
+"which are not equal to the columns specificed in the mappings (\"ID\" and "
+"\"NAME\")."
 msgstr ""
+"这个查询的本意是希望每行返回两个Cat实例,一个是cat,另一个是它的妈妈。但是因为"
+"它们的字段名被映射为相同的,而且在某些数据库中,返回的字段别名是“c.ID”,\"c."
+"NAME\"这样的形式,而它们和在映射文件中的名字(\"ID\"和\"NAME\")不匹配,这就"
+"会造成失败。"
 
-#: index.docbook:165
+#. Tag: para
+#: query_sql.xml:165
+#, no-c-format
 msgid "The following form is not vulnerable to column name duplication:"
-msgstr ""
+msgstr "下面的形式可以解决字段名重复:"
 
-#: index.docbook:168
+#. Tag: programlisting
+#: query_sql.xml:168
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.createSQLQuery(\"SELECT {cat.*}, {mother.*}  FROM CATS c, CATS m WHERE c.MOTHER_ID = c.ID\")\n"
-      " .addEntity(\"cat\", Cat.class)\n"
-      " .addEntity(\"mother\", Cat.class)\n"
-      "]]>"
+"<![CDATA[sess.createSQLQuery(\"SELECT {cat.*}, {mother.*}  FROM CATS c, CATS "
+"m WHERE c.MOTHER_ID = c.ID\")\n"
+" .addEntity(\"cat\", Cat.class)\n"
+" .addEntity(\"mother\", Cat.class)\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:174
-msgid "the SQL query string, with placeholders for Hibernate to inject column aliases"
-msgstr ""
+#. Tag: para
+#: query_sql.xml:174
+#, no-c-format
+msgid ""
+"the SQL query string, with placeholders for Hibernate to inject column "
+"aliases"
+msgstr "SQL查询语句,其中包含占位附来让Hibernate注射字段别名"
 
-#: index.docbook:179
+#. Tag: para
+#: query_sql.xml:179
+#, no-c-format
 msgid "the entities returned by the query"
-msgstr ""
+msgstr "查询返回的实体"
 
-#: index.docbook:183
-msgid "The {cat.*} and {mother.*} notation used above is a shorthand for \"all properties\". Alternatively, you may list the columns explicity, but even in this case we let Hibernate inject the SQL column aliases for each property. The placeholder for a column alias is just the property name qualified by the table alias. In the following example, we retrieve Cats and their mothers from a different table (cat_log) to the one declared in the mapping metadata. Notice that we may even use the property aliases in the where clause if we like."
+#. Tag: para
+#: query_sql.xml:183
+#, no-c-format
+msgid ""
+"The {cat.*} and {mother.*} notation used above is a shorthand for \"all "
+"properties\". Alternatively, you may list the columns explicity, but even in "
+"this case we let Hibernate inject the SQL column aliases for each property. "
+"The placeholder for a column alias is just the property name qualified by "
+"the table alias. In the following example, we retrieve Cats and their "
+"mothers from a different table (cat_log) to the one declared in the mapping "
+"metadata. Notice that we may even use the property aliases in the where "
+"clause if we like."
 msgstr ""
+"上面使用的{cat.*}和{mother.*}标记是作为“所有属性”的简写形式出现的。当然你也可"
+"以明确地罗列出字段名,但在这个例子里面我们让Hibernate来为每个属性注射SQL字段"
+"别名。字段别名的占位符是属性名加上表别名的前缀。在下面的例子中,我们从另外一"
+"个表(cat_log)中通过映射元数据中的指定获取Cat和它的妈妈。注意,要是我们愿"
+"意,我们甚至可以在where子句中使用属性别名。"
 
-#: index.docbook:192
+#. Tag: programlisting
+#: query_sql.xml:192
+#, no-c-format
 msgid ""
-      "<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
-      "         \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} \" +\n"
-      "         \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID\";\n"
-      "\n"
-      "List loggedCats = sess.createSQLQuery(sql)\n"
-      "        .addEntity(\"cat\", Cat.class)\n"
-      "        .addEntity(\"mother\", Cat.class).list()\n"
-      "]]>"
+"<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
+"         \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} "
+"\" +\n"
+"         \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID\";\n"
+"\n"
+"List loggedCats = sess.createSQLQuery(sql)\n"
+"        .addEntity(\"cat\", Cat.class)\n"
+"        .addEntity(\"mother\", Cat.class).list()\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:195
+#. Tag: title
+#: query_sql.xml:195
+#, no-c-format
 msgid "Alias and property references"
-msgstr ""
+msgstr "别名和属性引用(Alias and property references)"
 
-#: index.docbook:197
-msgid "For most cases the above alias injection is needed, but for queries relating to more complex mappings like composite properties, inheritance discriminators, collections etc. there are some specific aliases to use to allow Hibernate to inject the proper aliases."
+#. Tag: para
+#: query_sql.xml:197
+#, no-c-format
+msgid ""
+"For most cases the above alias injection is needed, but for queries relating "
+"to more complex mappings like composite properties, inheritance "
+"discriminators, collections etc. there are some specific aliases to use to "
+"allow Hibernate to inject the proper aliases."
 msgstr ""
+"大多数情况下,都需要上面的属性注射,但在使用更加复杂的映射,比如复合属性、通"
+"过标识符构造继承树,以及集合类等等情况下,也有一些特别的别名,来允许Hibernate"
+"注射合适的别名。"
 
-#: index.docbook:202
-msgid "The following table shows the different possibilities of using the alias injection. Note: the alias names in the result are examples, each alias will have a unique and probably different name when used."
+#. Tag: para
+#: query_sql.xml:202
+#, no-c-format
+msgid ""
+"The following table shows the different possibilities of using the alias "
+"injection. Note: the alias names in the result are examples, each alias will "
+"have a unique and probably different name when used."
 msgstr ""
+"下表列出了使用别名注射参数的不同可能性。注意:下面结果中的别名只是示例,实用"
+"时每个别名需要唯一并且不同的名字。"
 
-#: index.docbook:208
+#. Tag: title
+#: query_sql.xml:208
+#, no-c-format
 msgid "Alias injection names"
-msgstr ""
+msgstr "别名注射(alias injection names)"
 
-#: index.docbook:219
+#. Tag: entry
+#: query_sql.xml:219
+#, no-c-format
 msgid "Description"
-msgstr ""
+msgstr "描述"
 
-#: index.docbook:221
+#. Tag: entry
+#: query_sql.xml:221
+#, no-c-format
 msgid "Syntax"
-msgstr ""
+msgstr "语法"
 
-#: index.docbook:223
+#. Tag: entry
+#: query_sql.xml:223
+#, no-c-format
 msgid "Example"
-msgstr ""
+msgstr "示例"
 
-#: index.docbook:229
+#. Tag: entry
+#: query_sql.xml:229
+#, no-c-format
 msgid "A simple property"
-msgstr ""
+msgstr "简单属性"
 
-#: index.docbook:231
+#. Tag: literal
+#: query_sql.xml:231
+#, no-c-format
 msgid "{[aliasname].[propertyname]"
-msgstr ""
+msgstr "{[aliasname].[propertyname]"
 
-#: index.docbook:233
+#. Tag: literal
+#: query_sql.xml:233
+#, no-c-format
 msgid "A_NAME as {item.name}"
-msgstr ""
+msgstr "A_NAME as {item.name}"
 
-#: index.docbook:237
+#. Tag: entry
+#: query_sql.xml:237
+#, no-c-format
 msgid "A composite property"
-msgstr ""
+msgstr "复合属性"
 
-#: index.docbook:239
+#. Tag: literal
+#: query_sql.xml:239
+#, no-c-format
 msgid "{[aliasname].[componentname].[propertyname]}"
-msgstr ""
+msgstr "{[aliasname].[componentname].[propertyname]}"
 
-#: index.docbook:241
+#. Tag: literal
+#: query_sql.xml:241
+#, no-c-format
 msgid "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}"
-msgstr ""
+msgstr "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}"
 
-#: index.docbook:246
+#. Tag: entry
+#: query_sql.xml:246
+#, no-c-format
 msgid "Discriminator of an entity"
-msgstr ""
+msgstr "实体辨别器(Discriminator of an entity)"
 
-#: index.docbook:248
+#. Tag: literal
+#: query_sql.xml:248
+#, no-c-format
 msgid "{[aliasname].class}"
-msgstr ""
+msgstr "{[aliasname].class}"
 
-#: index.docbook:250
+#. Tag: literal
+#: query_sql.xml:250
+#, no-c-format
 msgid "DISC as {item.class}"
-msgstr ""
+msgstr "DISC as {item.class}"
 
-#: index.docbook:254
+#. Tag: entry
+#: query_sql.xml:254
+#, no-c-format
 msgid "All properties of an entity"
-msgstr ""
+msgstr "实体的所有属性"
 
-#: index.docbook:256, index.docbook:304
+#. Tag: literal
+#: query_sql.xml:256 query_sql.xml:304
+#, no-c-format
 msgid "{[aliasname].*}"
-msgstr ""
+msgstr "{[aliasname].*}"
 
-#: index.docbook:258
+#. Tag: literal
+#: query_sql.xml:258
+#, no-c-format
 msgid "{item.*}"
-msgstr ""
+msgstr "{item.*}"
 
-#: index.docbook:262
+#. Tag: entry
+#: query_sql.xml:262
+#, no-c-format
 msgid "A collection key"
-msgstr ""
+msgstr "集合键(collection key)"
 
-#: index.docbook:264
+#. Tag: literal
+#: query_sql.xml:264
+#, no-c-format
 msgid "{[aliasname].key}"
-msgstr ""
+msgstr "{[aliasname].key}"
 
-#: index.docbook:266
+#. Tag: literal
+#: query_sql.xml:266
+#, no-c-format
 msgid "ORGID as {coll.key}"
-msgstr ""
+msgstr "ORGID as {coll.key}"
 
-#: index.docbook:270
+#. Tag: entry
+#: query_sql.xml:270
+#, no-c-format
 msgid "The id of an collection"
-msgstr ""
+msgstr "集合id"
 
-#: index.docbook:272
+#. Tag: literal
+#: query_sql.xml:272
+#, no-c-format
 msgid "{[aliasname].id}"
-msgstr ""
+msgstr "{[aliasname].id}"
 
-#: index.docbook:274
+#. Tag: literal
+#: query_sql.xml:274
+#, no-c-format
 msgid "EMPID as {coll.id}"
-msgstr ""
+msgstr "EMPID as {coll.id}"
 
-#: index.docbook:278
+#. Tag: entry
+#: query_sql.xml:278
+#, no-c-format
 msgid "The element of an collection"
-msgstr ""
+msgstr "集合元素"
 
-#: index.docbook:280
+#. Tag: literal
+#: query_sql.xml:280
+#, no-c-format
 msgid "{[aliasname].element}"
-msgstr ""
+msgstr "{[aliasname].element}"
 
-#: index.docbook:282
+#. Tag: literal
+#: query_sql.xml:282
+#, no-c-format
 msgid "XID as {coll.element}"
-msgstr ""
+msgstr "XID as {coll.element}"
 
-#: index.docbook:286
+#. Tag: entry
+#: query_sql.xml:286
+#, no-c-format
 msgid "roperty of the element in the collection"
-msgstr ""
+msgstr "集合元素的属性"
 
-#: index.docbook:288
+#. Tag: literal
+#: query_sql.xml:288
+#, no-c-format
 msgid "{[aliasname].element.[propertyname]}"
-msgstr ""
+msgstr "{[aliasname].element.[propertyname]}"
 
-#: index.docbook:290
+#. Tag: literal
+#: query_sql.xml:290
+#, no-c-format
 msgid "NAME as {coll.element.name}"
-msgstr ""
+msgstr "NAME as {coll.element.name}"
 
-#: index.docbook:294
+#. Tag: entry
+#: query_sql.xml:294
+#, no-c-format
 msgid "All properties of the element in the collection"
-msgstr ""
+msgstr "集合元素的所有属性"
 
-#: index.docbook:296
+#. Tag: literal
+#: query_sql.xml:296
+#, no-c-format
 msgid "{[aliasname].element.*}"
-msgstr ""
+msgstr "{[aliasname].element.*}"
 
-#: index.docbook:298
+#. Tag: literal
+#: query_sql.xml:298
+#, no-c-format
 msgid "{coll.element.*}"
-msgstr ""
+msgstr "{coll.element.*}"
 
-#: index.docbook:302
+#. Tag: entry
+#: query_sql.xml:302
+#, no-c-format
 msgid "All properties of the the collection"
-msgstr ""
+msgstr "集合的所有属性"
 
-#: index.docbook:306
+#. Tag: literal
+#: query_sql.xml:306
+#, no-c-format
 msgid "{coll.*}"
-msgstr ""
+msgstr "{coll.*}"
 
-#: index.docbook:315
+#. Tag: title
+#: query_sql.xml:315
+#, no-c-format
 msgid "Returning non-managed entities"
-msgstr ""
+msgstr "返回非受管实体(Returning non-managed entities)"
 
-#: index.docbook:317
-msgid "It is possible to apply a ResultTransformer to native sql queries. Allowing it to e.g. return non-managed entities."
+#. Tag: para
+#: query_sql.xml:317
+#, no-c-format
+msgid ""
+"It is possible to apply a ResultTransformer to native sql queries. Allowing "
+"it to e.g. return non-managed entities."
 msgstr ""
+"可以对原生sql 查询使用ResultTransformer。这会返回不受Hibernate管理的实体。"
 
-#: index.docbook:319
+#. Tag: programlisting
+#: query_sql.xml:319
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.createSQLQuery(\"SELECT NAME, BIRTHDATE FROM CATS\")\n"
-      "        .setResultTransformer(Transformers.aliasToBean(CatDTO.class))]]>"
+"<![CDATA[sess.createSQLQuery(\"SELECT NAME, BIRTHDATE FROM CATS\")\n"
+"        .setResultTransformer(Transformers.aliasToBean(CatDTO.class))]]>"
 msgstr ""
 
-#: index.docbook:329
+#. Tag: para
+#: query_sql.xml:329
+#, no-c-format
 msgid "a result transformer"
-msgstr ""
+msgstr "结果转换器(result transformer)"
 
-#: index.docbook:333
-msgid "The above query will return a list of <literal>CatDTO</literal> which has been instantiated and injected the values of NAME and BIRTHNAME into its corresponding properties or fields."
+#. Tag: para
+#: query_sql.xml:333
+#, no-c-format
+msgid ""
+"The above query will return a list of <literal>CatDTO</literal> which has "
+"been instantiated and injected the values of NAME and BIRTHNAME into its "
+"corresponding properties or fields."
 msgstr ""
+"上面的查询将会返回<literal>CatDTO</literal>的列表,它将被实例化并且将NAME和"
+"BIRTHDAY的值注射入对应的属性或者字段。"
 
-#: index.docbook:340
+#. Tag: title
+#: query_sql.xml:340
+#, no-c-format
 msgid "Handling inheritance"
-msgstr ""
+msgstr "处理继承(Handling inheritance)"
 
-#: index.docbook:342
-msgid "Native sql queries which query for entities that is mapped as part of an inheritance must include all properties for the baseclass and all it subclasses."
+#. Tag: para
+#: query_sql.xml:342
+#, no-c-format
+msgid ""
+"Native sql queries which query for entities that is mapped as part of an "
+"inheritance must include all properties for the baseclass and all it "
+"subclasses."
 msgstr ""
+"原生SQL查询假若其查询结果实体是继承树中的一部分,它必须包含基类和所有子类的所"
+"有属性。"
 
-#: index.docbook:348
+#. Tag: title
+#: query_sql.xml:348
+#, no-c-format
 msgid "Parameters"
-msgstr ""
+msgstr "参数(Parameters)"
 
-#: index.docbook:350
+#. Tag: para
+#: query_sql.xml:350
+#, no-c-format
 msgid "Native sql queries support positional as well as named parameters:"
-msgstr ""
+msgstr "原生查询支持位置参数和命名参数:"
 
-#: index.docbook:353
+#. Tag: programlisting
+#: query_sql.xml:353
+#, no-c-format
 msgid ""
-      "<![CDATA[Query query = sess.createSQLQuery(\"SELECT * FROM CATS WHERE NAME like ?\").addEntity(Cat.class);\n"
-      "List pusList = query.setString(0, \"Pus%\").list();\n"
-      "     \n"
-      "query = sess.createSQLQuery(\"SELECT * FROM CATS WHERE NAME like :name\").addEntity(Cat.class);\n"
-      "List pusList = query.setString(\"name\", \"Pus%\").list();          ]]>"
+"<![CDATA[Query query = sess.createSQLQuery(\"SELECT * FROM CATS WHERE NAME "
+"like ?\").addEntity(Cat.class);\n"
+"List pusList = query.setString(0, \"Pus%\").list();\n"
+"     \n"
+"query = sess.createSQLQuery(\"SELECT * FROM CATS WHERE NAME like :name\")."
+"addEntity(Cat.class);\n"
+"List pusList = query.setString(\"name\", \"Pus%\").list();          ]]>"
 msgstr ""
 
-#: index.docbook:361
+#. Tag: title
+#: query_sql.xml:361
+#, no-c-format
 msgid "Named SQL queries"
-msgstr ""
+msgstr "命名SQL查询"
 
-#: index.docbook:363
-msgid "Named SQL queries may be defined in the mapping document and called in exactly the same way as a named HQL query. In this case, we do <emphasis>not</emphasis> need to call <literal>addEntity()</literal>."
+#. Tag: para
+#: query_sql.xml:363
+#, no-c-format
+msgid ""
+"Named SQL queries may be defined in the mapping document and called in "
+"exactly the same way as a named HQL query. In this case, we do "
+"<emphasis>not</emphasis> need to call <literal>addEntity()</literal>."
 msgstr ""
+"可以在映射文档中定义查询的名字,然后就可以象调用一个命名的HQL查询一样直接调用"
+"命名SQL查询.在这种情况下,我们<emphasis>不</emphasis> 需要调用"
+"<literal>addEntity()</literal>方法."
 
-#: index.docbook:368
+#. Tag: programlisting
+#: query_sql.xml:368
+#, no-c-format
 msgid ""
-      "<![CDATA[<sql-query name=\"persons\">\n"
-      "    <return alias=\"person\" class=\"eg.Person\"/>\n"
-      "    SELECT person.NAME AS {person.name},\n"
-      "           person.AGE AS {person.age},\n"
-      "           person.SEX AS {person.sex}\n"
-      "    FROM PERSON person\n"
-      "    WHERE person.NAME LIKE :namePattern\n"
-      "</sql-query>]]>"
+"<![CDATA[<sql-query name=\"persons\">\n"
+"    <return alias=\"person\" class=\"eg.Person\"/>\n"
+"    SELECT person.NAME AS {person.name},\n"
+"           person.AGE AS {person.age},\n"
+"           person.SEX AS {person.sex}\n"
+"    FROM PERSON person\n"
+"    WHERE person.NAME LIKE :namePattern\n"
+"</sql-query>]]>"
 msgstr ""
 
-#: index.docbook:370
+#. Tag: programlisting
+#: query_sql.xml:370
+#, no-c-format
 msgid ""
-      "<![CDATA[List people = sess.getNamedQuery(\"persons\")\n"
-      "    .setString(\"namePattern\", namePattern)\n"
-      "    .setMaxResults(50)\n"
-      "    .list();]]>"
+"<![CDATA[List people = sess.getNamedQuery(\"persons\")\n"
+"    .setString(\"namePattern\", namePattern)\n"
+"    .setMaxResults(50)\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:372
-msgid "The <literal>&lt;return-join&gt;</literal> and <literal>&lt;load-collection&gt;</literal> elements are used to join associations and define queries which initialize collections, respectively."
+#. Tag: para
+#: query_sql.xml:372
+#, no-c-format
+msgid ""
+"The <literal>&lt;return-join&gt;</literal> and <literal>&lt;load-"
+"collection&gt;</literal> elements are used to join associations and define "
+"queries which initialize collections, respectively."
 msgstr ""
+"<literal>&lt;return-join&gt;</literal>和 <literal>&lt;load-collection&gt;</"
+"literal> 元素是用来连接关联以及将查询定义为预先初始化各个集合的。"
 
-#: index.docbook:377
+#. Tag: programlisting
+#: query_sql.xml:377
+#, no-c-format
 msgid ""
-      "<![CDATA[<sql-query name=\"personsWith\">\n"
-      "    <return alias=\"person\" class=\"eg.Person\"/>\n"
-      "    <return-join alias=\"address\" property=\"person.mailingAddress\"/>\n"
-      "    SELECT person.NAME AS {person.name},\n"
-      "           person.AGE AS {person.age},\n"
-      "           person.SEX AS {person.sex},\n"
-      "           address.STREET AS {address.street},\n"
-      "           address.CITY AS {address.city},\n"
-      "           address.STATE AS {address.state},\n"
-      "           address.ZIP AS {address.zip}\n"
-      "    FROM PERSON person\n"
-      "    JOIN ADDRESS address\n"
-      "        ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n"
-      "    WHERE person.NAME LIKE :namePattern\n"
-      "</sql-query>]]>"
+"<![CDATA[<sql-query name=\"personsWith\">\n"
+"    <return alias=\"person\" class=\"eg.Person\"/>\n"
+"    <return-join alias=\"address\" property=\"person.mailingAddress\"/>\n"
+"    SELECT person.NAME AS {person.name},\n"
+"           person.AGE AS {person.age},\n"
+"           person.SEX AS {person.sex},\n"
+"           address.STREET AS {address.street},\n"
+"           address.CITY AS {address.city},\n"
+"           address.STATE AS {address.state},\n"
+"           address.ZIP AS {address.zip}\n"
+"    FROM PERSON person\n"
+"    JOIN ADDRESS address\n"
+"        ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n"
+"    WHERE person.NAME LIKE :namePattern\n"
+"</sql-query>]]>"
 msgstr ""
 
-#: index.docbook:379
-msgid "A named SQL query may return a scalar value. You must declare the column alias and Hibernate type using the <literal>&lt;return-scalar&gt;</literal> element:"
+#. Tag: para
+#: query_sql.xml:379
+#, no-c-format
+msgid ""
+"A named SQL query may return a scalar value. You must declare the column "
+"alias and Hibernate type using the <literal>&lt;return-scalar&gt;</literal> "
+"element:"
 msgstr ""
+"一个命名查询可能会返回一个标量值.你必须使用<literal>&lt;return-scalar&gt;</"
+"literal>元素来指定字段的别名和 Hibernate类型"
 
-#: index.docbook:383
+#. Tag: programlisting
+#: query_sql.xml:383
+#, no-c-format
 msgid ""
-      "<![CDATA[<sql-query name=\"mySqlQuery\">\n"
-      "    <return-scalar column=\"name\" type=\"string\"/>\n"
-      "    <return-scalar column=\"age\" type=\"long\"/>\n"
-      "    SELECT p.NAME AS name,\n"
-      "           p.AGE AS age,\n"
-      "    FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n"
-      "</sql-query>]]>"
+"<![CDATA[<sql-query name=\"mySqlQuery\">\n"
+"    <return-scalar column=\"name\" type=\"string\"/>\n"
+"    <return-scalar column=\"age\" type=\"long\"/>\n"
+"    SELECT p.NAME AS name,\n"
+"           p.AGE AS age,\n"
+"    FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n"
+"</sql-query>]]>"
 msgstr ""
 
-#: index.docbook:385
-msgid "You can externalize the resultset mapping informations in a <literal>&lt;resultset&gt;</literal> element to either reuse them accross several named queries or through the <literal>setResultSetMapping()</literal> API."
+#. Tag: para
+#: query_sql.xml:385
+#, no-c-format
+msgid ""
+"You can externalize the resultset mapping informations in a <literal>&lt;"
+"resultset&gt;</literal> element to either reuse them accross several named "
+"queries or through the <literal>setResultSetMapping()</literal> API."
 msgstr ""
+"你可以把结果集映射的信息放在外部的<literal>&lt;resultset&gt;</literal>元素"
+"中,这样就可以在多个命名查询间,或者通过<literal>setResultSetMapping()</"
+"literal>API来访问。(此处原文即存疑。原文为:You can externalize the "
+"resultset mapping informations in a <literal>&lt;resultset&gt;</literal> "
+"element to either reuse them accross several named queries or through the "
+"<literal>setResultSetMapping()</literal> API.)"
 
-#: index.docbook:390
+#. Tag: programlisting
+#: query_sql.xml:390
+#, no-c-format
 msgid ""
-      "<![CDATA[<resultset name=\"personAddress\">\n"
-      "    <return alias=\"person\" class=\"eg.Person\"/>\n"
-      "    <return-join alias=\"address\" property=\"person.mailingAddress\"/>\n"
-      "</resultset>\n"
-      "\n"
-      "<sql-query name=\"personsWith\" resultset-ref=\"personAddress\">\n"
-      "    SELECT person.NAME AS {person.name},\n"
-      "           person.AGE AS {person.age},\n"
-      "           person.SEX AS {person.sex},\n"
-      "           address.STREET AS {address.street},\n"
-      "           address.CITY AS {address.city},\n"
-      "           address.STATE AS {address.state},\n"
-      "           address.ZIP AS {address.zip}\n"
-      "    FROM PERSON person\n"
-      "    JOIN ADDRESS address\n"
-      "        ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n"
-      "    WHERE person.NAME LIKE :namePattern\n"
-      "</sql-query>]]>"
+"<![CDATA[<resultset name=\"personAddress\">\n"
+"    <return alias=\"person\" class=\"eg.Person\"/>\n"
+"    <return-join alias=\"address\" property=\"person.mailingAddress\"/>\n"
+"</resultset>\n"
+"\n"
+"<sql-query name=\"personsWith\" resultset-ref=\"personAddress\">\n"
+"    SELECT person.NAME AS {person.name},\n"
+"           person.AGE AS {person.age},\n"
+"           person.SEX AS {person.sex},\n"
+"           address.STREET AS {address.street},\n"
+"           address.CITY AS {address.city},\n"
+"           address.STATE AS {address.state},\n"
+"           address.ZIP AS {address.zip}\n"
+"    FROM PERSON person\n"
+"    JOIN ADDRESS address\n"
+"        ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n"
+"    WHERE person.NAME LIKE :namePattern\n"
+"</sql-query>]]>"
 msgstr ""
 
-#: index.docbook:392
-msgid "You can alternatively use the resultset mapping information in your hbm files directly in java code."
-msgstr ""
+#. Tag: para
+#: query_sql.xml:392
+#, no-c-format
+msgid ""
+"You can alternatively use the resultset mapping information in your hbm "
+"files directly in java code."
+msgstr "另外,你可以在java代码中直接使用hbm文件中的结果集定义信息。"
 
-#: index.docbook:395
+#. Tag: programlisting
+#: query_sql.xml:395
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = sess.createSQLQuery(\n"
-      "        \"select {cat.*}, {kitten.*} from cats cat, cats kitten where kitten.mother = cat.id\"\n"
-      "    )\n"
-      "    .setResultSetMapping(\"catAndKitten\")\n"
-      "    .list();]]>"
+"<![CDATA[List cats = sess.createSQLQuery(\n"
+"        \"select {cat.*}, {kitten.*} from cats cat, cats kitten where kitten."
+"mother = cat.id\"\n"
+"    )\n"
+"    .setResultSetMapping(\"catAndKitten\")\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:398
+#. Tag: title
+#: query_sql.xml:398
+#, no-c-format
 msgid "Using return-property to explicitly specify column/alias names"
-msgstr ""
+msgstr "使用return-property来明确地指定字段/别名"
 
-#: index.docbook:401
-msgid "With <literal>&lt;return-property&gt;</literal> you can explicitly tell Hibernate what column aliases to use, instead of using the <literal>{}</literal>-syntax to let Hibernate inject its own aliases."
+#. Tag: para
+#: query_sql.xml:401
+#, no-c-format
+msgid ""
+"With <literal>&lt;return-property&gt;</literal> you can explicitly tell "
+"Hibernate what column aliases to use, instead of using the <literal>{}</"
+"literal>-syntax to let Hibernate inject its own aliases."
 msgstr ""
+"使用<literal>&lt;return-property&gt;</literal>你可以明确的告诉Hibernate使用哪"
+"些字段别名,这取代了使用<literal>{}</literal>-语法 来让Hibernate注入它自己的别"
+"名."
 
-#: index.docbook:406
+#. Tag: programlisting
+#: query_sql.xml:406
+#, no-c-format
 msgid ""
-      "<![CDATA[<sql-query name=\"mySqlQuery\">\n"
-      "    <return alias=\"person\" class=\"eg.Person\">\n"
-      "        <return-property name=\"name\" column=\"myName\"/>\n"
-      "        <return-property name=\"age\" column=\"myAge\"/>\n"
-      "        <return-property name=\"sex\" column=\"mySex\"/>\n"
-      "    </return>\n"
-      "    SELECT person.NAME AS myName,\n"
-      "           person.AGE AS myAge,\n"
-      "           person.SEX AS mySex,\n"
-      "    FROM PERSON person WHERE person.NAME LIKE :name\n"
-      "</sql-query>\n"
-      "]]>"
+"<![CDATA[<sql-query name=\"mySqlQuery\">\n"
+"    <return alias=\"person\" class=\"eg.Person\">\n"
+"        <return-property name=\"name\" column=\"myName\"/>\n"
+"        <return-property name=\"age\" column=\"myAge\"/>\n"
+"        <return-property name=\"sex\" column=\"mySex\"/>\n"
+"    </return>\n"
+"    SELECT person.NAME AS myName,\n"
+"           person.AGE AS myAge,\n"
+"           person.SEX AS mySex,\n"
+"    FROM PERSON person WHERE person.NAME LIKE :name\n"
+"</sql-query>\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:408
-msgid "<literal>&lt;return-property&gt;</literal> also works with multiple columns. This solves a limitation with the <literal>{}</literal>-syntax which can not allow fine grained control of multi-column properties."
+#. Tag: para
+#: query_sql.xml:408
+#, no-c-format
+msgid ""
+"<literal>&lt;return-property&gt;</literal> also works with multiple columns. "
+"This solves a limitation with the <literal>{}</literal>-syntax which can not "
+"allow fine grained control of multi-column properties."
 msgstr ""
+"<literal>&lt;return-property&gt;</literal>也可用于多个字段,它解决了使用"
+"<literal>{}</literal>-语法不能细粒度控制多个字段的限制"
 
-#: index.docbook:413
+#. Tag: programlisting
+#: query_sql.xml:413
+#, no-c-format
 msgid ""
-      "<![CDATA[<sql-query name=\"organizationCurrentEmployments\">\n"
-      "    <return alias=\"emp\" class=\"Employment\">\n"
-      "        <return-property name=\"salary\">\n"
-      "            <return-column name=\"VALUE\"/>\n"
-      "            <return-column name=\"CURRENCY\"/>\n"
-      "        </return-property>\n"
-      "        <return-property name=\"endDate\" column=\"myEndDate\"/>\n"
-      "    </return>\n"
-      "        SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n"
-      "        STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n"
-      "        REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n"
-      "        FROM EMPLOYMENT\n"
-      "        WHERE EMPLOYER = :id AND ENDDATE IS NULL\n"
-      "        ORDER BY STARTDATE ASC\n"
-      "</sql-query>]]>"
+"<![CDATA[<sql-query name=\"organizationCurrentEmployments\">\n"
+"    <return alias=\"emp\" class=\"Employment\">\n"
+"        <return-property name=\"salary\">\n"
+"            <return-column name=\"VALUE\"/>\n"
+"            <return-column name=\"CURRENCY\"/>\n"
+"        </return-property>\n"
+"        <return-property name=\"endDate\" column=\"myEndDate\"/>\n"
+"    </return>\n"
+"        SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n"
+"        STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n"
+"        REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n"
+"        FROM EMPLOYMENT\n"
+"        WHERE EMPLOYER = :id AND ENDDATE IS NULL\n"
+"        ORDER BY STARTDATE ASC\n"
+"</sql-query>]]>"
 msgstr ""
 
-#: index.docbook:415
-msgid "Notice that in this example we used <literal>&lt;return-property&gt;</literal> in combination with the <literal>{}</literal>-syntax for injection. Allowing users to choose how they want to refer column and properties."
+#. Tag: para
+#: query_sql.xml:415
+#, no-c-format
+msgid ""
+"Notice that in this example we used <literal>&lt;return-property&gt;</"
+"literal> in combination with the <literal>{}</literal>-syntax for injection. "
+"Allowing users to choose how they want to refer column and properties."
 msgstr ""
+"注意在这个例子中,我们使用了<literal>&lt;return-property&gt;</literal>结合"
+"<literal>{}</literal>的注入语法. 允许用户来选择如何引用字段以及属性."
 
-#: index.docbook:420
-msgid "If your mapping has a discriminator you must use <literal>&lt;return-discriminator&gt;</literal> to specify the discriminator column."
+#. Tag: para
+#: query_sql.xml:420
+#, no-c-format
+msgid ""
+"If your mapping has a discriminator you must use <literal>&lt;return-"
+"discriminator&gt;</literal> to specify the discriminator column."
 msgstr ""
+"如果你映射一个识别器(discriminator),你必须使用<literal>&lt;return-"
+"discriminator&gt;</literal> 来指定识别器字段"
 
-#: index.docbook:426
+#. Tag: title
+#: query_sql.xml:426
+#, no-c-format
 msgid "Using stored procedures for querying"
-msgstr ""
+msgstr "使用存储过程来查询"
 
-#: index.docbook:428
-msgid "Hibernate 3 introduces support for queries via stored procedures and functions. Most of the following documentation is equivalent for both. The stored procedure/function must return a resultset as the first out-parameter to be able to work with Hibernate. An example of such a stored function in Oracle 9 and higher is as follows:"
+#. Tag: para
+#: query_sql.xml:428
+#, no-c-format
+msgid ""
+"Hibernate 3 introduces support for queries via stored procedures and "
+"functions. Most of the following documentation is equivalent for both. The "
+"stored procedure/function must return a resultset as the first out-parameter "
+"to be able to work with Hibernate. An example of such a stored function in "
+"Oracle 9 and higher is as follows:"
 msgstr ""
+"Hibernate 3引入了对存储过程查询(stored procedure)和函数(function)的支持.以下"
+"的说明中,这二者一般都适用。 存储过程/函数必须返回一个结果集,作为Hibernate能"
+"够使用的第一个外部参数. 下面是一个Oracle9和更高版本的存储过程例子."
 
-#: index.docbook:434
+#. Tag: programlisting
+#: query_sql.xml:434
+#, no-c-format
 msgid ""
-      "<![CDATA[CREATE OR REPLACE FUNCTION selectAllEmployments\n"
-      "    RETURN SYS_REFCURSOR\n"
-      "AS\n"
-      "    st_cursor SYS_REFCURSOR;\n"
-      "BEGIN\n"
-      "    OPEN st_cursor FOR\n"
-      " SELECT EMPLOYEE, EMPLOYER,\n"
-      " STARTDATE, ENDDATE,\n"
-      " REGIONCODE, EID, VALUE, CURRENCY\n"
-      " FROM EMPLOYMENT;\n"
-      "      RETURN  st_cursor;\n"
-      " END;]]>"
+"<![CDATA[CREATE OR REPLACE FUNCTION selectAllEmployments\n"
+"    RETURN SYS_REFCURSOR\n"
+"AS\n"
+"    st_cursor SYS_REFCURSOR;\n"
+"BEGIN\n"
+"    OPEN st_cursor FOR\n"
+" SELECT EMPLOYEE, EMPLOYER,\n"
+" STARTDATE, ENDDATE,\n"
+" REGIONCODE, EID, VALUE, CURRENCY\n"
+" FROM EMPLOYMENT;\n"
+"      RETURN  st_cursor;\n"
+" END;]]>"
 msgstr ""
 
-#: index.docbook:436
+#. Tag: para
+#: query_sql.xml:436
+#, no-c-format
 msgid "To use this query in Hibernate you need to map it via a named query."
-msgstr ""
+msgstr "在Hibernate里要要使用这个查询,你需要通过命名查询来映射它."
 
-#: index.docbook:439
+#. Tag: programlisting
+#: query_sql.xml:439
+#, no-c-format
 msgid ""
-      "<![CDATA[<sql-query name=\"selectAllEmployees_SP\" callable=\"true\">\n"
-      "    <return alias=\"emp\" class=\"Employment\">\n"
-      "        <return-property name=\"employee\" column=\"EMPLOYEE\"/>\n"
-      "        <return-property name=\"employer\" column=\"EMPLOYER\"/>\n"
-      "        <return-property name=\"startDate\" column=\"STARTDATE\"/>\n"
-      "        <return-property name=\"endDate\" column=\"ENDDATE\"/>\n"
-      "        <return-property name=\"regionCode\" column=\"REGIONCODE\"/>\n"
-      "        <return-property name=\"id\" column=\"EID\"/>\n"
-      "        <return-property name=\"salary\">\n"
-      "            <return-column name=\"VALUE\"/>\n"
-      "            <return-column name=\"CURRENCY\"/>\n"
-      "        </return-property>\n"
-      "    </return>\n"
-      "    { ? = call selectAllEmployments() }\n"
-      "</sql-query>]]>"
+"<![CDATA[<sql-query name=\"selectAllEmployees_SP\" callable=\"true\">\n"
+"    <return alias=\"emp\" class=\"Employment\">\n"
+"        <return-property name=\"employee\" column=\"EMPLOYEE\"/>\n"
+"        <return-property name=\"employer\" column=\"EMPLOYER\"/>\n"
+"        <return-property name=\"startDate\" column=\"STARTDATE\"/>\n"
+"        <return-property name=\"endDate\" column=\"ENDDATE\"/>\n"
+"        <return-property name=\"regionCode\" column=\"REGIONCODE\"/>\n"
+"        <return-property name=\"id\" column=\"EID\"/>\n"
+"        <return-property name=\"salary\">\n"
+"            <return-column name=\"VALUE\"/>\n"
+"            <return-column name=\"CURRENCY\"/>\n"
+"        </return-property>\n"
+"    </return>\n"
+"    { ? = call selectAllEmployments() }\n"
+"</sql-query>]]>"
 msgstr ""
 
-#: index.docbook:441
-msgid "Notice stored procedures currently only return scalars and entities. <literal>&lt;return-join&gt;</literal> and <literal>&lt;load-collection&gt;</literal> are not supported."
+#. Tag: para
+#: query_sql.xml:441
+#, no-c-format
+msgid ""
+"Notice stored procedures currently only return scalars and entities. "
+"<literal>&lt;return-join&gt;</literal> and <literal>&lt;load-collection&gt;</"
+"literal> are not supported."
 msgstr ""
+"注意存储过程当前仅仅返回标量和实体.现在不支持<literal>&lt;return-join&gt;</"
+"literal>和<literal>&lt;load-collection&gt;</literal>"
 
-#: index.docbook:446
+#. Tag: title
+#: query_sql.xml:446
+#, no-c-format
 msgid "Rules/limitations for using stored procedures"
-msgstr ""
+msgstr "使用存储过程的规则和限制"
 
-#: index.docbook:448
-msgid "To use stored procedures with Hibernate the procedures/functions have to follow some rules. If they do not follow those rules they are not usable with Hibernate. If you still want to use these procedures you have to execute them via <literal>session.connection()</literal>. The rules are different for each database, since database vendors have different stored procedure semantics/syntax."
+#. Tag: para
+#: query_sql.xml:448
+#, no-c-format
+msgid ""
+"To use stored procedures with Hibernate the procedures/functions have to "
+"follow some rules. If they do not follow those rules they are not usable "
+"with Hibernate. If you still want to use these procedures you have to "
+"execute them via <literal>session.connection()</literal>. The rules are "
+"different for each database, since database vendors have different stored "
+"procedure semantics/syntax."
 msgstr ""
+"为了在Hibernate中使用存储过程,你必须遵循一些规则.不遵循这些规则的存储过程将不"
+"可用.如果你仍然想要使用他们, 你必须通过<literal>session.connection()</"
+"literal>来执行他们.这些规则针对于不同的数据库.因为数据库 提供商有各种不同的存"
+"储过程语法和语义."
 
-#: index.docbook:455
-msgid "Stored procedure queries can't be paged with <literal>setFirstResult()/setMaxResults()</literal>."
+#. Tag: para
+#: query_sql.xml:455
+#, no-c-format
+msgid ""
+"Stored procedure queries can't be paged with <literal>setFirstResult()/"
+"setMaxResults()</literal>."
 msgstr ""
+"对存储过程进行的查询无法使用<literal>setFirstResult()/setMaxResults()</"
+"literal>进行分页。"
 
-#: index.docbook:458
-msgid "Recommended call form is standard SQL92: <literal>{ ? = call functionName(&lt;parameters&gt;) }</literal> or <literal>{ ? = call procedureName(&lt;parameters&gt;}</literal>. Native call syntax is not supported."
+#. Tag: para
+#: query_sql.xml:458
+#, no-c-format
+msgid ""
+"Recommended call form is standard SQL92: <literal>{ ? = call functionName"
+"(&lt;parameters&gt;) }</literal> or <literal>{ ? = call procedureName(&lt;"
+"parameters&gt;}</literal>. Native call syntax is not supported."
 msgstr ""
+"建议采用的调用方式是标准SQL92: <literal>{ ? = call functionName(&lt;"
+"parameters&gt;) }</literal> 或者 <literal>{ ? = call procedureName(&lt;"
+"parameters&gt;}</literal>.原生调用语法不被支持。"
 
-#: index.docbook:463
+#. Tag: para
+#: query_sql.xml:463
+#, no-c-format
 msgid "For Oracle the following rules apply:"
-msgstr ""
+msgstr "对于Oracle有如下规则:"
 
-#: index.docbook:467
-msgid "A function must return a result set. The first parameter of a procedure must be an <literal>OUT</literal> that returns a result set. This is done by using a <literal>SYS_REFCURSOR</literal> type in Oracle 9 or 10. In Oracle you need to define a <literal>REF CURSOR</literal> type, see Oracle literature."
+#. Tag: para
+#: query_sql.xml:467
+#, no-c-format
+msgid ""
+"A function must return a result set. The first parameter of a procedure must "
+"be an <literal>OUT</literal> that returns a result set. This is done by "
+"using a <literal>SYS_REFCURSOR</literal> type in Oracle 9 or 10. In Oracle "
+"you need to define a <literal>REF CURSOR</literal> type, see Oracle "
+"literature."
 msgstr ""
+"函数必须返回一个结果集。存储过程的第一个参数必须是<literal>OUT</literal>,它"
+"返回一个结果集。这是通过Oracle 9或10的<literal>SYS_REFCURSOR</literal>类型来"
+"完成的。在Oracle中你需要定义一个<literal>REF CURSOR</literal>类型,参见Oracle"
+"的手册。"
 
-#: index.docbook:476
+#. Tag: para
+#: query_sql.xml:476
+#, no-c-format
 msgid "For Sybase or MS SQL server the following rules apply:"
-msgstr ""
+msgstr "对于Sybase或者MS SQL server有如下规则:"
 
-#: index.docbook:480
-msgid "The procedure must return a result set. Note that since these servers can/will return multiple result sets and update counts, Hibernate will iterate the results and take the first result that is a result set as its return value. Everything else will be discarded."
+#. Tag: para
+#: query_sql.xml:480
+#, no-c-format
+msgid ""
+"The procedure must return a result set. Note that since these servers can/"
+"will return multiple result sets and update counts, Hibernate will iterate "
+"the results and take the first result that is a result set as its return "
+"value. Everything else will be discarded."
 msgstr ""
+"存储过程必须返回一个结果集。.注意这些servers可能返回多个结果集以及更新的数目."
+"Hibernate将取出第一条结果集作为它的返回值, 其他将被丢弃。"
 
-#: index.docbook:488
-msgid "If you can enable <literal>SET NOCOUNT ON</literal> in your procedure it will probably be more efficient, but this is not a requirement."
+#. Tag: para
+#: query_sql.xml:488
+#, no-c-format
+msgid ""
+"If you can enable <literal>SET NOCOUNT ON</literal> in your procedure it "
+"will probably be more efficient, but this is not a requirement."
 msgstr ""
+"如果你能够在存储过程里设定<literal>SET NOCOUNT ON</literal>,这可能会效率更"
+"高,但这不是必需的。"
 
-#: index.docbook:498
+#. Tag: title
+#: query_sql.xml:498
+#, no-c-format
 msgid "Custom SQL for create, update and delete"
-msgstr ""
+msgstr "定制SQL用来create,update和delete"
 
-#: index.docbook:500
-msgid "Hibernate3 can use custom SQL statements for create, update, and delete operations. The class and collection persisters in Hibernate already contain a set of configuration time generated strings (insertsql, deletesql, updatesql etc.). The mapping tags <literal>&lt;sql-insert&gt;</literal>, <literal>&lt;sql-delete&gt;</literal>, and <literal>&lt;sql-update&gt;</literal> override these strings:"
+#. Tag: para
+#: query_sql.xml:500
+#, no-c-format
+msgid ""
+"Hibernate3 can use custom SQL statements for create, update, and delete "
+"operations. The class and collection persisters in Hibernate already contain "
+"a set of configuration time generated strings (insertsql, deletesql, "
+"updatesql etc.). The mapping tags <literal>&lt;sql-insert&gt;</literal>, "
+"<literal>&lt;sql-delete&gt;</literal>, and <literal>&lt;sql-update&gt;</"
+"literal> override these strings:"
 msgstr ""
+"Hibernate3能够使用定制的SQL语句来执行create,update和delete操作。在Hibernate"
+"中,持久化的类和集合已经 包含了一套配置期产生的语句(insertsql, deletesql, "
+"updatesql等等),这些映射标记 <literal>&lt;sql-insert&gt;</literal>, "
+"<literal>&lt;sql-delete&gt;</literal>, and <literal>&lt;sql-update&gt;</"
+"literal>重载了 这些语句。"
 
-#: index.docbook:508
+#. Tag: programlisting
+#: query_sql.xml:508
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\">\n"
-      "        <generator class=\"increment\"/>\n"
-      "    </id>\n"
-      "    <property name=\"name\" not-null=\"true\"/>\n"
-      "    <sql-insert>INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? )</sql-insert>\n"
-      "    <sql-update>UPDATE PERSON SET NAME=UPPER(?) WHERE ID=?</sql-update>\n"
-      "    <sql-delete>DELETE FROM PERSON WHERE ID=?</sql-delete>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\">\n"
+"        <generator class=\"increment\"/>\n"
+"    </id>\n"
+"    <property name=\"name\" not-null=\"true\"/>\n"
+"    <sql-insert>INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? )</sql-"
+"insert>\n"
+"    <sql-update>UPDATE PERSON SET NAME=UPPER(?) WHERE ID=?</sql-update>\n"
+"    <sql-delete>DELETE FROM PERSON WHERE ID=?</sql-delete>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:510
-msgid "The SQL is directly executed in your database, so you are free to use any dialect you like. This will of course reduce the portability of your mapping if you use database specific SQL."
+#. Tag: para
+#: query_sql.xml:510
+#, no-c-format
+msgid ""
+"The SQL is directly executed in your database, so you are free to use any "
+"dialect you like. This will of course reduce the portability of your mapping "
+"if you use database specific SQL."
 msgstr ""
+"这些SQL直接在你的数据库里执行,所以你可以自由的使用你喜欢的任意语法。但如果你"
+"使用数据库特定的语法, 这当然会降低你映射的可移植性。"
 
-#: index.docbook:514
-msgid "Stored procedures are supported if the <literal>callable</literal> attribute is set:"
-msgstr ""
+#. Tag: para
+#: query_sql.xml:514
+#, no-c-format
+msgid ""
+"Stored procedures are supported if the <literal>callable</literal> attribute "
+"is set:"
+msgstr "如果设定<literal>callable</literal>,则能够支持存储过程了。"
 
-#: index.docbook:517
+#. Tag: programlisting
+#: query_sql.xml:517
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\">\n"
-      "        <generator class=\"increment\"/>\n"
-      "    </id>\n"
-      "    <property name=\"name\" not-null=\"true\"/>\n"
-      "    <sql-insert callable=\"true\">{call createPerson (?, ?)}</sql-insert>\n"
-      "    <sql-delete callable=\"true\">{? = call deletePerson (?)}</sql-delete>\n"
-      "    <sql-update callable=\"true\">{? = call updatePerson (?, ?)}</sql-update>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\">\n"
+"        <generator class=\"increment\"/>\n"
+"    </id>\n"
+"    <property name=\"name\" not-null=\"true\"/>\n"
+"    <sql-insert callable=\"true\">{call createPerson (?, ?)}</sql-insert>\n"
+"    <sql-delete callable=\"true\">{? = call deletePerson (?)}</sql-delete>\n"
+"    <sql-update callable=\"true\">{? = call updatePerson (?, ?)}</sql-"
+"update>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:519
-msgid "The order of the positional parameters are currently vital, as they must be in the same sequence as Hibernate expects them."
-msgstr ""
+#. Tag: para
+#: query_sql.xml:519
+#, no-c-format
+msgid ""
+"The order of the positional parameters are currently vital, as they must be "
+"in the same sequence as Hibernate expects them."
+msgstr "参数的位置顺序是非常重要的,他们必须和Hibernate所期待的顺序相同。"
 
-#: index.docbook:522
-msgid "You can see the expected order by enabling debug logging for the <literal>org.hibernate.persister.entity</literal> level. With this level enabled Hibernate will print out the static SQL that is used to create, update, delete etc. entities. (To see the expected sequence, remember to not include your custom SQL in the mapping files as that will override the Hibernate generated static sql.)"
+#. Tag: para
+#: query_sql.xml:522
+#, no-c-format
+msgid ""
+"You can see the expected order by enabling debug logging for the "
+"<literal>org.hibernate.persister.entity</literal> level. With this level "
+"enabled Hibernate will print out the static SQL that is used to create, "
+"update, delete etc. entities. (To see the expected sequence, remember to not "
+"include your custom SQL in the mapping files as that will override the "
+"Hibernate generated static sql.)"
 msgstr ""
+"你能够通过设定日志调试级别为<literal>org.hiberante.persister.entity</"
+"literal>,来查看Hibernate所期待的顺序。在这个级别下, Hibernate将会打印出"
+"create,update和delete实体的静态SQL。(如果想看到预计的顺序。记得不要将定制SQL"
+"包含在映射文件里, 因为他们会重载Hibernate生成的静态SQL。)"
 
-#: index.docbook:529
-msgid "The stored procedures are in most cases (read: better do it than not) required to return the number of rows inserted/updated/deleted, as Hibernate has some runtime checks for the success of the statement. Hibernate always registers the first statement parameter as a numeric output parameter for the CUD operations:"
+#. Tag: para
+#: query_sql.xml:529
+#, no-c-format
+msgid ""
+"The stored procedures are in most cases (read: better do it than not) "
+"required to return the number of rows inserted/updated/deleted, as Hibernate "
+"has some runtime checks for the success of the statement. Hibernate always "
+"registers the first statement parameter as a numeric output parameter for "
+"the CUD operations:"
 msgstr ""
+"在大多数情况下(最好这么做),存储过程需要返回插入/更新/删除的行数,因为"
+"Hibernate对语句的成功执行有些运行时的检查。 Hibernate常会把进行CUD操作的语句"
+"的第一个参数注册为一个数值型输出参数。"
 
-#: index.docbook:535
+#. Tag: programlisting
+#: query_sql.xml:535
+#, no-c-format
 msgid ""
-      "<![CDATA[CREATE OR REPLACE FUNCTION updatePerson (uid IN NUMBER, uname IN VARCHAR2)\n"
-      "    RETURN NUMBER IS\n"
-      "BEGIN\n"
-      "\n"
-      "    update PERSON\n"
-      "    set\n"
-      "        NAME = uname,\n"
-      "    where\n"
-      "        ID = uid;\n"
-      "\n"
-      "    return SQL%ROWCOUNT;\n"
-      "\n"
-      "END updatePerson;]]>"
+"<![CDATA[CREATE OR REPLACE FUNCTION updatePerson (uid IN NUMBER, uname IN "
+"VARCHAR2)\n"
+"    RETURN NUMBER IS\n"
+"BEGIN\n"
+"\n"
+"    update PERSON\n"
+"    set\n"
+"        NAME = uname,\n"
+"    where\n"
+"        ID = uid;\n"
+"\n"
+"    return SQL%ROWCOUNT;\n"
+"\n"
+"END updatePerson;]]>"
 msgstr ""
 
-#: index.docbook:539
+#. Tag: title
+#: query_sql.xml:539
+#, no-c-format
 msgid "Custom SQL for loading"
-msgstr ""
+msgstr "定制装载SQL"
 
-#: index.docbook:541
+#. Tag: para
+#: query_sql.xml:541
+#, no-c-format
 msgid "You may also declare your own SQL (or HQL) queries for entity loading:"
-msgstr ""
+msgstr "你可能需要声明你自己的SQL(或HQL)来装载实体"
 
-#: index.docbook:544
+#. Tag: programlisting
+#: query_sql.xml:544
+#, no-c-format
 msgid ""
-      "<![CDATA[<sql-query name=\"person\">\n"
-      "    <return alias=\"pers\" class=\"Person\" lock-mode=\"upgrade\"/>\n"
-      "    SELECT NAME AS {pers.name}, ID AS {pers.id}\n"
-      "    FROM PERSON\n"
-      "    WHERE ID=?\n"
-      "    FOR UPDATE\n"
-      "</sql-query>]]>"
+"<![CDATA[<sql-query name=\"person\">\n"
+"    <return alias=\"pers\" class=\"Person\" lock-mode=\"upgrade\"/>\n"
+"    SELECT NAME AS {pers.name}, ID AS {pers.id}\n"
+"    FROM PERSON\n"
+"    WHERE ID=?\n"
+"    FOR UPDATE\n"
+"</sql-query>]]>"
 msgstr ""
 
-#: index.docbook:546
-msgid "This is just a named query declaration, as discussed earlier. You may reference this named query in a class mapping:"
-msgstr ""
+#. Tag: para
+#: query_sql.xml:546
+#, no-c-format
+msgid ""
+"This is just a named query declaration, as discussed earlier. You may "
+"reference this named query in a class mapping:"
+msgstr "这只是一个前面讨论过的命名查询声明,你可以在类映射里引用这个命名查询。"
 
-#: index.docbook:549
+#. Tag: programlisting
+#: query_sql.xml:549
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Person\">\n"
-      "    <id name=\"id\">\n"
-      "        <generator class=\"increment\"/>\n"
-      "    </id>\n"
-      "    <property name=\"name\" not-null=\"true\"/>\n"
-      "    <loader query-ref=\"person\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Person\">\n"
+"    <id name=\"id\">\n"
+"        <generator class=\"increment\"/>\n"
+"    </id>\n"
+"    <property name=\"name\" not-null=\"true\"/>\n"
+"    <loader query-ref=\"person\"/>\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:551
+#. Tag: para
+#: query_sql.xml:551
+#, no-c-format
 msgid "This even works with stored procedures."
-msgstr ""
+msgstr "这也可以用于存储过程"
 
-#: index.docbook:553
+#. Tag: para
+#: query_sql.xml:553
+#, no-c-format
 msgid "You may even define a query for collection loading:"
-msgstr ""
+msgstr "你甚至可以定一个用于集合装载的查询:"
 
-#: index.docbook:555
+#. Tag: programlisting
+#: query_sql.xml:555
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"employments\" inverse=\"true\">\n"
-      "    <key/>\n"
-      "    <one-to-many class=\"Employment\"/>\n"
-      "    <loader query-ref=\"employments\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"employments\" inverse=\"true\">\n"
+"    <key/>\n"
+"    <one-to-many class=\"Employment\"/>\n"
+"    <loader query-ref=\"employments\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:557
+#. Tag: programlisting
+#: query_sql.xml:557
+#, no-c-format
 msgid ""
-      "<![CDATA[<sql-query name=\"employments\">\n"
-      "    <load-collection alias=\"emp\" role=\"Person.employments\"/>\n"
-      "    SELECT {emp.*}\n"
-      "    FROM EMPLOYMENT emp\n"
-      "    WHERE EMPLOYER = :id\n"
-      "    ORDER BY STARTDATE ASC, EMPLOYEE ASC\n"
-      "</sql-query>]]>"
+"<![CDATA[<sql-query name=\"employments\">\n"
+"    <load-collection alias=\"emp\" role=\"Person.employments\"/>\n"
+"    SELECT {emp.*}\n"
+"    FROM EMPLOYMENT emp\n"
+"    WHERE EMPLOYER = :id\n"
+"    ORDER BY STARTDATE ASC, EMPLOYEE ASC\n"
+"</sql-query>]]>"
 msgstr ""
 
-#: index.docbook:559
-msgid "You could even define an entity loader that loads a collection by join fetching:"
-msgstr ""
+#. Tag: para
+#: query_sql.xml:559
+#, no-c-format
+msgid ""
+"You could even define an entity loader that loads a collection by join "
+"fetching:"
+msgstr "你甚至还可以定义一个实体装载器,它通过连接抓取装载一个集合:"
 
-#: index.docbook:562
+#. Tag: programlisting
+#: query_sql.xml:562
+#, no-c-format
 msgid ""
-      "<![CDATA[<sql-query name=\"person\">\n"
-      "    <return alias=\"pers\" class=\"Person\"/>\n"
-      "    <return-join alias=\"emp\" property=\"pers.employments\"/>\n"
-      "    SELECT NAME AS {pers.*}, {emp.*}\n"
-      "    FROM PERSON pers\n"
-      "    LEFT OUTER JOIN EMPLOYMENT emp\n"
-      "        ON pers.ID = emp.PERSON_ID\n"
-      "    WHERE ID=?\n"
-      "</sql-query>]]>"
+"<![CDATA[<sql-query name=\"person\">\n"
+"    <return alias=\"pers\" class=\"Person\"/>\n"
+"    <return-join alias=\"emp\" property=\"pers.employments\"/>\n"
+"    SELECT NAME AS {pers.*}, {emp.*}\n"
+"    FROM PERSON pers\n"
+"    LEFT OUTER JOIN EMPLOYMENT emp\n"
+"        ON pers.ID = emp.PERSON_ID\n"
+"    WHERE ID=?\n"
+"</sql-query>]]>"
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-

Modified: core/trunk/documentation/manual/translations/zh-CN/content/session_api.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/session_api.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/session_api.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,982 +1,2127 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: session_api.xml:5
+#, no-c-format
 msgid "Working with objects"
-msgstr ""
+msgstr "与对象共事"
 
-#: index.docbook:7
-msgid "Hibernate is a full object/relational mapping solution that not only shields the developer from the details of the underlying database management system, but also offers <emphasis>state management</emphasis> of objects. This is, contrary to the management of SQL <literal>statements</literal> in common JDBC/SQL persistence layers, a very natural object-oriented view of persistence in Java applications."
+#. Tag: para
+#: session_api.xml:7
+#, no-c-format
+msgid ""
+"Hibernate is a full object/relational mapping solution that not only shields "
+"the developer from the details of the underlying database management system, "
+"but also offers <emphasis>state management</emphasis> of objects. This is, "
+"contrary to the management of SQL <literal>statements</literal> in common "
+"JDBC/SQL persistence layers, a very natural object-oriented view of "
+"persistence in Java applications."
 msgstr ""
+"Hibernate是完整的对象/关系映射解决方案,它提供了对象<emphasis>状态管理(state "
+"management)</emphasis>的功能,使开发者不再需要理会底层数据库系统的细节。 也就"
+"是说,相对于常见的JDBC/SQL持久层方案中需要<literal>管理SQL语句</literal>,"
+"Hibernate采用了更自然的面向对象的视角来持久化Java应用中的数据。"
 
-#: index.docbook:16
-msgid "In other words, Hibernate application developers should always think about the <emphasis>state</emphasis> of their objects, and not necessarily about the execution of SQL statements. This part is taken care of by Hibernate and is only relevant for the application developer when tuning the performance of the system."
+#. Tag: para
+#: session_api.xml:16
+#, no-c-format
+msgid ""
+"In other words, Hibernate application developers should always think about "
+"the <emphasis>state</emphasis> of their objects, and not necessarily about "
+"the execution of SQL statements. This part is taken care of by Hibernate and "
+"is only relevant for the application developer when tuning the performance "
+"of the system."
 msgstr ""
+"换句话说,使用Hibernate的开发者应该总是关注对象的<emphasis>状态(state)</"
+"emphasis>,不必考虑SQL语句的执行。 这部分细节已经由Hibernate掌管妥当,只有开"
+"发者在进行系统性能调优的时候才需要进行了解。"
 
-#: index.docbook:24
+#. Tag: title
+#: session_api.xml:24
+#, no-c-format
 msgid "Hibernate object states"
-msgstr ""
+msgstr "Hibernate对象状态(object states)"
 
-#: index.docbook:26
+#. Tag: para
+#: session_api.xml:26
+#, no-c-format
 msgid "Hibernate defines and supports the following object states:"
-msgstr ""
+msgstr "Hibernate定义并支持下列对象状态(state):"
 
-#: index.docbook:32
-msgid "<emphasis>Transient</emphasis> - an object is transient if it has just been instantiated using the <literal>new</literal> operator, and it is not associated with a Hibernate <literal>Session</literal>. It has no persistent representation in the database and no identifier value has been assigned. Transient instances will be destroyed by the garbage collector if the application doesn't hold a reference anymore. Use the Hibernate <literal>Session</literal> to make an object persistent (and let Hibernate take care of the SQL statements that need to be executed for this transition)."
+#. Tag: para
+#: session_api.xml:32
+#, no-c-format
+msgid ""
+"<emphasis>Transient</emphasis> - an object is transient if it has just been "
+"instantiated using the <literal>new</literal> operator, and it is not "
+"associated with a Hibernate <literal>Session</literal>. It has no persistent "
+"representation in the database and no identifier value has been assigned. "
+"Transient instances will be destroyed by the garbage collector if the "
+"application doesn't hold a reference anymore. Use the Hibernate "
+"<literal>Session</literal> to make an object persistent (and let Hibernate "
+"take care of the SQL statements that need to be executed for this "
+"transition)."
 msgstr ""
+"<emphasis>瞬时(Transient)</emphasis> - 由<literal>new</literal>操作符创建,且"
+"尚未与Hibernate <literal>Session</literal> 关联的对象被认定为瞬时(Transient)"
+"的。瞬时(Transient)对象不会被持久化到数据库中,也不会被赋予持久化标识"
+"(identifier)。 如果瞬时(Transient)对象在程序中没有被引用,它会被垃圾回收器"
+"(garbage collector)销毁。 使用Hibernate <literal>Session</literal>可以将其变"
+"为持久(Persistent)状态。(Hibernate会自动执行必要的SQL语句)"
 
-#: index.docbook:44
-msgid "<emphasis>Persistent</emphasis> - a persistent instance has a representation in the database and an identifier value. It might just have been saved or loaded, however, it is by definition in the scope of a <literal>Session</literal>. Hibernate will detect any changes made to an object in persistent state and synchronize the state with the database when the unit of work completes. Developers don't execute manual <literal>UPDATE</literal> statements, or <literal>DELETE</literal> statements when an object should be made transient."
+#. Tag: para
+#: session_api.xml:44
+#, no-c-format
+msgid ""
+"<emphasis>Persistent</emphasis> - a persistent instance has a representation "
+"in the database and an identifier value. It might just have been saved or "
+"loaded, however, it is by definition in the scope of a <literal>Session</"
+"literal>. Hibernate will detect any changes made to an object in persistent "
+"state and synchronize the state with the database when the unit of work "
+"completes. Developers don't execute manual <literal>UPDATE</literal> "
+"statements, or <literal>DELETE</literal> statements when an object should be "
+"made transient."
 msgstr ""
+"<emphasis>持久(Persistent)</emphasis> - 持久(Persistent)的实例在数据库中有对"
+"应的记录,并拥有一个持久化标识(identifier)。 持久(Persistent)的实例可能是刚被"
+"保存的,或刚被加载的,无论哪一种,按定义,它存在于相关联的<literal>Session</"
+"literal>作用范围内。 Hibernate会检测到处于持久(Persistent)状态的对象的任何改"
+"动,在当前操作单元(unit of work)执行完毕时将对象数据(state)与数据库同步"
+"(synchronize)。 开发者不需要手动执行<literal>UPDATE</literal>。将对象从持久"
+"(Persistent)状态变成瞬时(Transient)状态同样也不需要手动执行<literal>DELETE</"
+"literal>语句。"
 
-#: index.docbook:55
-msgid "<emphasis>Detached</emphasis> - a detached instance is an object that has been persistent, but its <literal>Session</literal> has been closed. The reference to the object is still valid, of course, and the detached instance might even be modified in this state. A detached instance can be reattached to a new <literal>Session</literal> at a later point in time, making it (and all the modifications) persistent again. This feature enables a programming model for long running units of work that require user think-time. We call them <emphasis>application transactions</emphasis>, i.e. a unit of work from the point of view of the user."
+#. Tag: para
+#: session_api.xml:55
+#, no-c-format
+msgid ""
+"<emphasis>Detached</emphasis> - a detached instance is an object that has "
+"been persistent, but its <literal>Session</literal> has been closed. The "
+"reference to the object is still valid, of course, and the detached instance "
+"might even be modified in this state. A detached instance can be reattached "
+"to a new <literal>Session</literal> at a later point in time, making it (and "
+"all the modifications) persistent again. This feature enables a programming "
+"model for long running units of work that require user think-time. We call "
+"them <emphasis>application transactions</emphasis>, i.e. a unit of work from "
+"the point of view of the user."
 msgstr ""
+"<emphasis>脱管(Detached)</emphasis> - 与持久(Persistent)对象关联的"
+"<literal>Session</literal>被关闭后,对象就变为脱管(Detached)的。 对脱管"
+"(Detached)对象的引用依然有效,对象可继续被修改。脱管(Detached)对象如果重新关"
+"联到某个新的<literal>Session</literal>上, 会再次转变为持久(Persistent)的(在"
+"Detached其间的改动将被持久化到数据库)。 这个功能使得一种编程模型,即中间会给"
+"用户思考时间(user think-time)的长时间运行的操作单元(unit of work)的编程模型成"
+"为可能。 我们称之为<emphasis>应用程序事务</emphasis>,即从用户观点看是一个操"
+"作单元(unit of work)。"
 
-#: index.docbook:69
-msgid "We'll now discuss the states and state transitions (and the Hibernate methods that trigger a transition) in more detail."
+#. Tag: para
+#: session_api.xml:69
+#, no-c-format
+msgid ""
+"We'll now discuss the states and state transitions (and the Hibernate "
+"methods that trigger a transition) in more detail."
 msgstr ""
+"接下来我们来细致的讨论下状态(states)及状态间的转换(state transitions)(以及触"
+"发状态转换的Hibernate方法)。"
 
-#: index.docbook:77
+#. Tag: title
+#: session_api.xml:77
+#, no-c-format
 msgid "Making objects persistent"
-msgstr ""
+msgstr "使对象持久化"
 
-#: index.docbook:79
-msgid "Newly instantiated instances of a a persistent class are considered <emphasis>transient</emphasis> by Hibernate. We can make a transient instance <emphasis>persistent</emphasis> by associating it with a session:"
+#. Tag: para
+#: session_api.xml:79
+#, no-c-format
+msgid ""
+"Newly instantiated instances of a a persistent class are considered "
+"<emphasis>transient</emphasis> by Hibernate. We can make a transient "
+"instance <emphasis>persistent</emphasis> by associating it with a session:"
 msgstr ""
+"Hibernate认为持久化类(persistent class)新实例化的对象是<emphasis>瞬时"
+"(Transient)</emphasis>的。 我们可通过将瞬时(Transient)对象与session关联而把它"
+"变为<emphasis>持久(Persistent)</emphasis>的。"
 
-#: index.docbook:86
+#. Tag: programlisting
+#: session_api.xml:86
+#, no-c-format
 msgid ""
-      "<![CDATA[DomesticCat fritz = new DomesticCat();\n"
-      "fritz.setColor(Color.GINGER);\n"
-      "fritz.setSex('M');\n"
-      "fritz.setName(\"Fritz\");\n"
-      "Long generatedId = (Long) sess.save(fritz);]]>"
+"<![CDATA[DomesticCat fritz = new DomesticCat();\n"
+"fritz.setColor(Color.GINGER);\n"
+"fritz.setSex('M');\n"
+"fritz.setName(\"Fritz\");\n"
+"Long generatedId = (Long) sess.save(fritz);]]>"
 msgstr ""
 
-#: index.docbook:88
-msgid "If <literal>Cat</literal> has a generated identifier, the identifier is generated and assigned to the <literal>cat</literal> when <literal>save()</literal> is called. If <literal>Cat</literal> has an <literal>assigned</literal> identifier, or a composite key, the identifier should be assigned to the <literal>cat</literal> instance before calling <literal>save()</literal>. You may also use <literal>persist()</literal> instead of <literal>save()</literal>, with the semantics defined in the EJB3 early draft."
+#. Tag: para
+#: session_api.xml:88
+#, no-c-format
+msgid ""
+"If <literal>Cat</literal> has a generated identifier, the identifier is "
+"generated and assigned to the <literal>cat</literal> when <literal>save()</"
+"literal> is called. If <literal>Cat</literal> has an <literal>assigned</"
+"literal> identifier, or a composite key, the identifier should be assigned "
+"to the <literal>cat</literal> instance before calling <literal>save()</"
+"literal>. You may also use <literal>persist()</literal> instead of "
+"<literal>save()</literal>, with the semantics defined in the EJB3 early "
+"draft."
 msgstr ""
+"如果<literal>Cat</literal>的持久化标识(identifier)是<literal>generated</"
+"literal>类型的, 那么该标识(identifier)会自动在<literal>save()</literal>被调"
+"用时产生并分配给<literal>cat</literal>。 如果<literal>Cat</literal>的持久化标"
+"识(identifier)是<literal>assigned</literal>类型的,或是一个复合主键"
+"(composite key), 那么该标识(identifier)应当在调用<literal>save()</literal>之"
+"前手动赋予给<literal>cat</literal>。 你也可以按照EJB3 early draft中定义的语"
+"义,使用<literal>persist()</literal>替代<literal>save()</literal>。"
 
-#: index.docbook:100
-msgid "<literal>persist()</literal> makes a transient instance persistent. However, it doesn't guarantee that the identifier value will be assigned to the persistent instance immediately, the assignment might happen at flush time. <literal>persist()</literal> also guarantees that it will not execute an <literal>INSERT</literal> statement if it is called outside of transaction boundaries. This is useful in long-running conversations with an extended Session/persistence context."
+#. Tag: para
+#: session_api.xml:100
+#, no-c-format
+msgid ""
+"<literal>persist()</literal> makes a transient instance persistent. However, "
+"it doesn't guarantee that the identifier value will be assigned to the "
+"persistent instance immediately, the assignment might happen at flush time. "
+"<literal>persist()</literal> also guarantees that it will not execute an "
+"<literal>INSERT</literal> statement if it is called outside of transaction "
+"boundaries. This is useful in long-running conversations with an extended "
+"Session/persistence context."
 msgstr ""
+"<literal>persist()</literal> makes a transient instance persistent. However, "
+"it doesn't guarantee that the identifier value will be assigned to the "
+"persistent instance immediately, the assignment might happen at flush time. "
+"<literal>persist()</literal> also guarantees that it will not execute an "
+"<literal>INSERT</literal> statement if it is called outside of transaction "
+"boundaries. This is useful in long-running conversations with an extended "
+"Session/persistence context."
 
-#: index.docbook:111
-msgid "<literal>save()</literal> does guarantee to return an identifier. If an INSERT has to be executed to get the identifier ( e.g. \"identity\" generator, not \"sequence\"), this INSERT happens immediately, no matter if you are inside or outside of a transaction. This is problematic in a long-running conversation with an extended Session/persistence context."
+#. Tag: para
+#: session_api.xml:111
+#, no-c-format
+msgid ""
+"<literal>save()</literal> does guarantee to return an identifier. If an "
+"INSERT has to be executed to get the identifier ( e.g. \"identity\" "
+"generator, not \"sequence\"), this INSERT happens immediately, no matter if "
+"you are inside or outside of a transaction. This is problematic in a long-"
+"running conversation with an extended Session/persistence context."
 msgstr ""
+"<literal>save()</literal> does guarantee to return an identifier. If an "
+"INSERT has to be executed to get the identifier ( e.g. \"identity\" "
+"generator, not \"sequence\"), this INSERT happens immediately, no matter if "
+"you are inside or outside of a transaction. This is problematic in a long-"
+"running conversation with an extended Session/persistence context."
 
-#: index.docbook:121
-msgid "Alternatively, you may assign the identifier using an overloaded version of <literal>save()</literal>."
-msgstr ""
+#. Tag: para
+#: session_api.xml:121
+#, no-c-format
+msgid ""
+"Alternatively, you may assign the identifier using an overloaded version of "
+"<literal>save()</literal>."
+msgstr "此外,你可以用一个重载版本的<literal>save()</literal>方法。"
 
-#: index.docbook:126
+#. Tag: programlisting
+#: session_api.xml:126
+#, no-c-format
 msgid ""
-      "<![CDATA[DomesticCat pk = new DomesticCat();\n"
-      "pk.setColor(Color.TABBY);\n"
-      "pk.setSex('F');\n"
-      "pk.setName(\"PK\");\n"
-      "pk.setKittens( new HashSet() );\n"
-      "pk.addKitten(fritz);\n"
-      "sess.save( pk, new Long(1234) );]]>"
+"<![CDATA[DomesticCat pk = new DomesticCat();\n"
+"pk.setColor(Color.TABBY);\n"
+"pk.setSex('F');\n"
+"pk.setName(\"PK\");\n"
+"pk.setKittens( new HashSet() );\n"
+"pk.addKitten(fritz);\n"
+"sess.save( pk, new Long(1234) );]]>"
 msgstr ""
 
-#: index.docbook:128
-msgid "If the object you make persistent has associated objects (e.g. the <literal>kittens</literal> collection in the previous example), these objects may be made persistent in any order you like unless you have a <literal>NOT NULL</literal> constraint upon a foreign key column. There is never a risk of violating foreign key constraints. However, you might violate a <literal>NOT NULL</literal> constraint if you <literal>save()</literal> the objects in the wrong order."
+#. Tag: para
+#: session_api.xml:128
+#, no-c-format
+msgid ""
+"If the object you make persistent has associated objects (e.g. the "
+"<literal>kittens</literal> collection in the previous example), these "
+"objects may be made persistent in any order you like unless you have a "
+"<literal>NOT NULL</literal> constraint upon a foreign key column. There is "
+"never a risk of violating foreign key constraints. However, you might "
+"violate a <literal>NOT NULL</literal> constraint if you <literal>save()</"
+"literal> the objects in the wrong order."
 msgstr ""
+"如果你持久化的对象有关联的对象(associated objects)(例如上例中的"
+"<literal>kittens</literal>集合) 那么对这些对象(译注:pk和kittens)进行持久"
+"化的顺序是任意的(也就是说可以先对kittens进行持久化也可以先对pk进行持久"
+"化), 除非你在外键列上有<literal>NOT NULL</literal>约束。 Hibernate不会违反"
+"外键约束,但是如果你用错误的顺序持久化对象(译注:在pk持久化之前持久化"
+"kitten),那么可能会违反<literal>NOT NULL</literal>约束。"
 
-#: index.docbook:138
-msgid "Usually you don't bother with this detail, as you'll very likely use Hibernate's <emphasis>transitive persistence</emphasis> feature to save the associated objects automatically. Then, even <literal>NOT NULL</literal> constraint violations don't occur - Hibernate will take care of everything. Transitive persistence is discussed later in this chapter."
+#. Tag: para
+#: session_api.xml:138
+#, no-c-format
+msgid ""
+"Usually you don't bother with this detail, as you'll very likely use "
+"Hibernate's <emphasis>transitive persistence</emphasis> feature to save the "
+"associated objects automatically. Then, even <literal>NOT NULL</literal> "
+"constraint violations don't occur - Hibernate will take care of everything. "
+"Transitive persistence is discussed later in this chapter."
 msgstr ""
+"通常你不会为这些细节烦心,因为你很可能会使用Hibernate的 <emphasis>传播性持久"
+"化(transitive persistence)</emphasis>功能自动保存相关联那些对象。 这样连违反"
+"<literal>NOT NULL</literal>约束的情况都不会出现了 - Hibernate会管好所有的事"
+"情。 传播性持久化(transitive persistence)将在本章稍后讨论。"
 
-#: index.docbook:149
+#. Tag: title
+#: session_api.xml:149
+#, no-c-format
 msgid "Loading an object"
-msgstr ""
+msgstr "装载对象"
 
-#: index.docbook:151
-msgid "The <literal>load()</literal> methods of <literal>Session</literal> gives you a way to retrieve a persistent instance if you already know its identifier. <literal>load()</literal> takes a class object and will load the state into a newly instantiated instance of that class, in persistent state."
+#. Tag: para
+#: session_api.xml:151
+#, no-c-format
+msgid ""
+"The <literal>load()</literal> methods of <literal>Session</literal> gives "
+"you a way to retrieve a persistent instance if you already know its "
+"identifier. <literal>load()</literal> takes a class object and will load the "
+"state into a newly instantiated instance of that class, in persistent state."
 msgstr ""
+"如果你知道某个实例的持久化标识(identifier),你就可以使用<literal>Session</"
+"literal>的<literal>load()</literal>方法 来获取它。 <literal>load()</literal>"
+"的另一个参数是指定类的.class对象。 本方法会创建指定类的持久化实例,并从数据库"
+"加载其数据(state)。"
 
-#: index.docbook:158
+#. Tag: programlisting
+#: session_api.xml:158
+#, no-c-format
 msgid "<![CDATA[Cat fritz = (Cat) sess.load(Cat.class, generatedId);]]>"
 msgstr ""
 
-#: index.docbook:160
+#. Tag: programlisting
+#: session_api.xml:160
+#, no-c-format
 msgid ""
-      "<![CDATA[// you need to wrap primitive identifiers\n"
-      "long id = 1234;\n"
-      "DomesticCat pk = (DomesticCat) sess.load( DomesticCat.class, new Long(id) );]]>"
+"<![CDATA[// you need to wrap primitive identifiers\n"
+"long id = 1234;\n"
+"DomesticCat pk = (DomesticCat) sess.load( DomesticCat.class, new Long"
+"(id) );]]>"
 msgstr ""
 
-#: index.docbook:162
+#. Tag: para
+#: session_api.xml:162
+#, no-c-format
 msgid "Alternatively, you can load state into a given instance:"
 msgstr ""
+"此外, 你可以把数据(state)加载到指定的对象实例上(覆盖掉该实例原来的数据)。"
 
-#: index.docbook:166
+#. Tag: programlisting
+#: session_api.xml:166
+#, no-c-format
 msgid ""
-      "<![CDATA[Cat cat = new DomesticCat();\n"
-      "// load pk's state into cat\n"
-      "sess.load( cat, new Long(pkId) );\n"
-      "Set kittens = cat.getKittens();]]>"
+"<![CDATA[Cat cat = new DomesticCat();\n"
+"// load pk's state into cat\n"
+"sess.load( cat, new Long(pkId) );\n"
+"Set kittens = cat.getKittens();]]>"
 msgstr ""
 
-#: index.docbook:168
-msgid "Note that <literal>load()</literal> will throw an unrecoverable exception if there is no matching database row. If the class is mapped with a proxy, <literal>load()</literal> just returns an uninitialized proxy and does not actually hit the database until you invoke a method of the proxy. This behaviour is very useful if you wish to create an association to an object without actually loading it from the database. It also allows multiple instances to be loaded as a batch if <literal>batch-size</literal> is defined for the class mapping."
+#. Tag: para
+#: session_api.xml:168
+#, no-c-format
+msgid ""
+"Note that <literal>load()</literal> will throw an unrecoverable exception if "
+"there is no matching database row. If the class is mapped with a proxy, "
+"<literal>load()</literal> just returns an uninitialized proxy and does not "
+"actually hit the database until you invoke a method of the proxy. This "
+"behaviour is very useful if you wish to create an association to an object "
+"without actually loading it from the database. It also allows multiple "
+"instances to be loaded as a batch if <literal>batch-size</literal> is "
+"defined for the class mapping."
 msgstr ""
+"请注意如果没有匹配的数据库记录,<literal>load()</literal>方法可能抛出无法恢复"
+"的异常(unrecoverable exception)。 如果类的映射使用了代理(proxy),"
+"<literal>load()</literal>方法会返回一个未初始化的代理,直到你调用该代理的某方"
+"法时才会去访问数据库。 若你希望在某对象中创建一个指向另一个对象的关联,又不想"
+"在从数据库中装载该对象时同时装载相关联的那个对象,那么这种操作方式就用得上的"
+"了。 如果为相应类映射关系设置了<literal>batch-size</literal>, 那么使用这种操"
+"作方式允许多个对象被一批装载(因为返回的是代理,无需从数据库中抓取所有对象的"
+"数据)。"
 
-#: index.docbook:179
-msgid "If you are not certain that a matching row exists, you should use the <literal>get()</literal> method, which hits the database immediately and returns null if there is no matching row."
+#. Tag: para
+#: session_api.xml:179
+#, no-c-format
+msgid ""
+"If you are not certain that a matching row exists, you should use the "
+"<literal>get()</literal> method, which hits the database immediately and "
+"returns null if there is no matching row."
 msgstr ""
+"如果你不确定是否有匹配的行存在,应该使用<literal>get()</literal>方法,它会立"
+"刻访问数据库,如果没有对应的记录,会返回null。"
 
-#: index.docbook:185
+#. Tag: programlisting
+#: session_api.xml:185
+#, no-c-format
 msgid ""
-      "<![CDATA[Cat cat = (Cat) sess.get(Cat.class, id);\n"
-      "if (cat==null) {\n"
-      "    cat = new Cat();\n"
-      "    sess.save(cat, id);\n"
-      "}\n"
-      "return cat;]]>"
+"<![CDATA[Cat cat = (Cat) sess.get(Cat.class, id);\n"
+"if (cat==null) {\n"
+"    cat = new Cat();\n"
+"    sess.save(cat, id);\n"
+"}\n"
+"return cat;]]>"
 msgstr ""
 
-#: index.docbook:187
-msgid "You may even load an object using an SQL <literal>SELECT ... FOR UPDATE</literal>, using a <literal>LockMode</literal>. See the API documentation for more information."
+#. Tag: para
+#: session_api.xml:187
+#, no-c-format
+msgid ""
+"You may even load an object using an SQL <literal>SELECT ... FOR UPDATE</"
+"literal>, using a <literal>LockMode</literal>. See the API documentation for "
+"more information."
 msgstr ""
+"你甚至可以选用某个<literal>LockMode</literal>,用SQL的<literal>SELECT ... "
+"FOR UPDATE</literal>装载对象。 请查阅API文档以获取更多信息。"
 
-#: index.docbook:192
+#. Tag: programlisting
+#: session_api.xml:192
+#, no-c-format
 msgid "<![CDATA[Cat cat = (Cat) sess.get(Cat.class, id, LockMode.UPGRADE);]]>"
 msgstr ""
 
-#: index.docbook:194
-msgid "Note that any associated instances or contained collections are <emphasis>not</emphasis> selected <literal>FOR UPDATE</literal>, unless you decide to specify <literal>lock</literal> or <literal>all</literal> as a cascade style for the association."
+#. Tag: para
+#: session_api.xml:194
+#, no-c-format
+msgid ""
+"Note that any associated instances or contained collections are "
+"<emphasis>not</emphasis> selected <literal>FOR UPDATE</literal>, unless you "
+"decide to specify <literal>lock</literal> or <literal>all</literal> as a "
+"cascade style for the association."
 msgstr ""
+"注意,任何关联的对象或者包含的集合都<emphasis>不会</emphasis>被以"
+"<literal>FOR UPDATE</literal>方式返回, 除非你指定了<literal>lock</literal>或"
+"者<literal>all</literal>作为关联(association)的级联风格(cascade style)。"
 
-#: index.docbook:201
-msgid "It is possible to re-load an object and all its collections at any time, using the <literal>refresh()</literal> method. This is useful when database triggers are used to initialize some of the properties of the object."
+#. Tag: para
+#: session_api.xml:201
+#, no-c-format
+msgid ""
+"It is possible to re-load an object and all its collections at any time, "
+"using the <literal>refresh()</literal> method. This is useful when database "
+"triggers are used to initialize some of the properties of the object."
 msgstr ""
+"任何时候都可以使用<literal>refresh()</literal>方法强迫装载对象和它的集合。如"
+"果你使用数据库触发器功能来处理对象的某些属性,这个方法就很有用了。"
 
-#: index.docbook:207
+#. Tag: programlisting
+#: session_api.xml:207
+#, no-c-format
 msgid ""
-      "<![CDATA[sess.save(cat);\n"
-      "sess.flush(); //force the SQL INSERT\n"
-      "sess.refresh(cat); //re-read the state (after the trigger executes)]]>"
+"<![CDATA[sess.save(cat);\n"
+"sess.flush(); //force the SQL INSERT\n"
+"sess.refresh(cat); //re-read the state (after the trigger executes)]]>"
 msgstr ""
 
-#: index.docbook:209
-msgid "An important question usually appears at this point: How much does Hibernate load from the database and how many SQL <literal>SELECT</literal>s will it use? This depends on the <emphasis>fetching strategy</emphasis> and is explained in <xref linkend=\"performance-fetching\"/>."
+#. Tag: para
+#: session_api.xml:209
+#, no-c-format
+msgid ""
+"An important question usually appears at this point: How much does Hibernate "
+"load from the database and how many SQL <literal>SELECT</literal>s will it "
+"use? This depends on the <emphasis>fetching strategy</emphasis> and is "
+"explained in <xref linkend=\"performance-fetching\"/>."
 msgstr ""
+"此处通常会出现一个重要问题: Hibernate会从数据库中装载多少东西?会执行多少条相"
+"应的SQL<literal>SELECT</literal>语句? 这取决于<emphasis>抓取策略(fetching "
+"strategy)</emphasis>,会在<xref linkend=\"performance-fetching\"/>中解释。"
 
-#: index.docbook:219
+#. Tag: title
+#: session_api.xml:219
+#, no-c-format
 msgid "Querying"
-msgstr ""
+msgstr "查询"
 
-#: index.docbook:221
-msgid "If you don't know the identifiers of the objects you are looking for, you need a query. Hibernate supports an easy-to-use but powerful object oriented query language (HQL). For programmatic query creation, Hibernate supports a sophisticated Criteria and Example query feature (QBC and QBE). You may also express your query in the native SQL of your database, with optional support from Hibernate for result set conversion into objects."
+#. Tag: para
+#: session_api.xml:221
+#, no-c-format
+msgid ""
+"If you don't know the identifiers of the objects you are looking for, you "
+"need a query. Hibernate supports an easy-to-use but powerful object oriented "
+"query language (HQL). For programmatic query creation, Hibernate supports a "
+"sophisticated Criteria and Example query feature (QBC and QBE). You may also "
+"express your query in the native SQL of your database, with optional support "
+"from Hibernate for result set conversion into objects."
 msgstr ""
+"如果不知道所要寻找的对象的持久化标识,那么你需要使用查询。Hibernate支持强大且"
+"易于使用的面向对象查询语言(HQL)。 如果希望通过编程的方式创建查询,Hibernate提"
+"供了完善的按条件(Query By Criteria, QBC)以及按样例(Query By Example, QBE)进行"
+"查询的功能。 你也可以用原生SQL(native SQL)描述查询,Hibernate额外提供了将结果"
+"集(result set)转化为对象的支持。"
 
-#: index.docbook:231
+#. Tag: title
+#: session_api.xml:231
+#, no-c-format
 msgid "Executing queries"
-msgstr ""
+msgstr "执行查询"
 
-#: index.docbook:233
-msgid "HQL and native SQL queries are represented with an instance of <literal>org.hibernate.Query</literal>. This interface offers methods for parameter binding, result set handling, and for the execution of the actual query. You always obtain a <literal>Query</literal> using the current <literal>Session</literal>:"
+#. Tag: para
+#: session_api.xml:233
+#, no-c-format
+msgid ""
+"HQL and native SQL queries are represented with an instance of <literal>org."
+"hibernate.Query</literal>. This interface offers methods for parameter "
+"binding, result set handling, and for the execution of the actual query. You "
+"always obtain a <literal>Query</literal> using the current <literal>Session</"
+"literal>:"
 msgstr ""
+"HQL和原生SQL(native SQL)查询要通过为<literal>org.hibernate.Query</literal>的"
+"实例来表达。 这个接口提供了参数绑定、结果集处理以及运行实际查询的方法。 你总"
+"是可以通过当前<literal>Session</literal>获取一个<literal>Query</literal>对"
+"象:"
 
-#: index.docbook:240
+#. Tag: programlisting
+#: session_api.xml:240
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = session.createQuery(\n"
-      "    \"from Cat as cat where cat.birthdate < ?\")\n"
-      "    .setDate(0, date)\n"
-      "    .list();\n"
-      "\n"
-      "List mothers = session.createQuery(\n"
-      "    \"select mother from Cat as cat join cat.mother as mother where cat.name = ?\")\n"
-      "    .setString(0, name)\n"
-      "    .list();\n"
-      "\n"
-      "List kittens = session.createQuery(\n"
-      "    \"from Cat as cat where cat.mother = ?\")\n"
-      "    .setEntity(0, pk)\n"
-      "    .list();\n"
-      "\n"
-      "Cat mother = (Cat) session.createQuery(\n"
-      "    \"select cat.mother from Cat as cat where cat = ?\")\n"
-      "    .setEntity(0, izi)\n"
-      "    .uniqueResult();]]\n"
-      "\n"
-      "Query mothersWithKittens = (Cat) session.createQuery(\n"
-      "    \"select mother from Cat as mother left join fetch mother.kittens\");\n"
-      "Set uniqueMothers = new HashSet(mothersWithKittens.list());]]>"
+"<![CDATA[List cats = session.createQuery(\n"
+"    \"from Cat as cat where cat.birthdate < ?\")\n"
+"    .setDate(0, date)\n"
+"    .list();\n"
+"\n"
+"List mothers = session.createQuery(\n"
+"    \"select mother from Cat as cat join cat.mother as mother where cat.name "
+"= ?\")\n"
+"    .setString(0, name)\n"
+"    .list();\n"
+"\n"
+"List kittens = session.createQuery(\n"
+"    \"from Cat as cat where cat.mother = ?\")\n"
+"    .setEntity(0, pk)\n"
+"    .list();\n"
+"\n"
+"Cat mother = (Cat) session.createQuery(\n"
+"    \"select cat.mother from Cat as cat where cat = ?\")\n"
+"    .setEntity(0, izi)\n"
+"    .uniqueResult();]]\n"
+"\n"
+"Query mothersWithKittens = (Cat) session.createQuery(\n"
+"    \"select mother from Cat as mother left join fetch mother.kittens\");\n"
+"Set uniqueMothers = new HashSet(mothersWithKittens.list());]]>"
 msgstr ""
 
-#: index.docbook:242
-msgid "A query is usually executed by invoking <literal>list()</literal>, the result of the query will be loaded completely into a collection in memory. Entity instances retrieved by a query are in persistent state. The <literal>uniqueResult()</literal> method offers a shortcut if you know your query will only return a single object. Note that queries that make use of eager fetching of collections usually return duplicates of the root objects (but with their collections initialized). You can filter these duplicates simply through a <literal>Set</literal>."
+#. Tag: para
+#: session_api.xml:242
+#, no-c-format
+msgid ""
+"A query is usually executed by invoking <literal>list()</literal>, the "
+"result of the query will be loaded completely into a collection in memory. "
+"Entity instances retrieved by a query are in persistent state. The "
+"<literal>uniqueResult()</literal> method offers a shortcut if you know your "
+"query will only return a single object. Note that queries that make use of "
+"eager fetching of collections usually return duplicates of the root objects "
+"(but with their collections initialized). You can filter these duplicates "
+"simply through a <literal>Set</literal>."
 msgstr ""
+"一个查询通常在调用<literal>list()</literal>时被执行,执行结果会完全装载进内存"
+"中的一个集合(collection)。 查询返回的对象处于持久(persistent)状态。如果你知道"
+"的查询只会返回一个对象,可使用<literal>list()</literal>的快捷方式"
+"<literal>uniqueResult()</literal>。 注意,使用集合预先抓取的查询往往会返回多"
+"次根对象(他们的集合类都被初始化了)。你可以通过一个集合来过滤这些重复对象。"
 
-#: index.docbook:254
+#. Tag: title
+#: session_api.xml:254
+#, no-c-format
 msgid "Iterating results"
-msgstr ""
+msgstr "迭代式获取结果(Iterating results)"
 
-#: index.docbook:256
-msgid "Occasionally, you might be able to achieve better performance by executing the query using the <literal>iterate()</literal> method. This will only usually be the case if you expect that the actual entity instances returned by the query will already be in the session or second-level cache. If they are not already cached, <literal>iterate()</literal> will be slower than <literal>list()</literal> and might require many database hits for a simple query, usually <emphasis>1</emphasis> for the initial select which only returns identifiers, and <emphasis>n</emphasis> additional selects to initialize the actual instances."
+#. Tag: para
+#: session_api.xml:256
+#, no-c-format
+msgid ""
+"Occasionally, you might be able to achieve better performance by executing "
+"the query using the <literal>iterate()</literal> method. This will only "
+"usually be the case if you expect that the actual entity instances returned "
+"by the query will already be in the session or second-level cache. If they "
+"are not already cached, <literal>iterate()</literal> will be slower than "
+"<literal>list()</literal> and might require many database hits for a simple "
+"query, usually <emphasis>1</emphasis> for the initial select which only "
+"returns identifiers, and <emphasis>n</emphasis> additional selects to "
+"initialize the actual instances."
 msgstr ""
+"某些情况下,你可以使用<literal>iterate()</literal>方法得到更好的性能。 这通常"
+"是你预期返回的结果在session,或二级缓存(second-level cache)中已经存在时的情"
+"况。 如若不然,<literal>iterate()</literal>会比<literal>list()</literal>慢,"
+"而且可能简单查询也需要进行多次数据库访问: <literal>iterate()</literal>会首先"
+"使用<emphasis>1</emphasis>条语句得到所有对象的持久化标识(identifiers),再根据"
+"持久化标识执行<emphasis>n</emphasis>条附加的select语句实例化实际的对象。"
 
-#: index.docbook:268
+#. Tag: programlisting
+#: session_api.xml:268
+#, no-c-format
 msgid ""
-      "<![CDATA[// fetch ids\n"
-      "Iterator iter = sess.createQuery(\"from eg.Qux q order by q.likeliness\").iterate();\n"
-      "while ( iter.hasNext() ) {\n"
-      "    Qux qux = (Qux) iter.next();  // fetch the object\n"
-      "    // something we couldnt express in the query\n"
-      "    if ( qux.calculateComplicatedAlgorithm() ) {\n"
-      "        // delete the current instance\n"
-      "        iter.remove();\n"
-      "        // dont need to process the rest\n"
-      "        break;\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[// fetch ids\n"
+"Iterator iter = sess.createQuery(\"from eg.Qux q order by q.likeliness\")."
+"iterate();\n"
+"while ( iter.hasNext() ) {\n"
+"    Qux qux = (Qux) iter.next();  // fetch the object\n"
+"    // something we couldnt express in the query\n"
+"    if ( qux.calculateComplicatedAlgorithm() ) {\n"
+"        // delete the current instance\n"
+"        iter.remove();\n"
+"        // dont need to process the rest\n"
+"        break;\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:272
+#. Tag: title
+#: session_api.xml:272
+#, no-c-format
 msgid "Queries that return tuples"
-msgstr ""
+msgstr "返回元组(tuples)的查询"
 
-#: index.docbook:274
-msgid "Hibernate queries sometimes return tuples of objects, in which case each tuple is returned as an array:"
+#. Tag: para
+#: session_api.xml:274
+#, no-c-format
+msgid ""
+"Hibernate queries sometimes return tuples of objects, in which case each "
+"tuple is returned as an array:"
 msgstr ""
+"(译注:元组(tuples)指一条结果行包含多个对象) Hibernate查询有时返回元组"
+"(tuples),每个元组(tuples)以数组的形式返回:"
 
-#: index.docbook:279
+#. Tag: programlisting
+#: session_api.xml:279
+#, no-c-format
 msgid ""
-      "<![CDATA[Iterator kittensAndMothers = sess.createQuery(\n"
-      "            \"select kitten, mother from Cat kitten join kitten.mother mother\")\n"
-      "            .list()\n"
-      "            .iterator();\n"
-      "\n"
-      "while ( kittensAndMothers.hasNext() ) {\n"
-      "    Object[] tuple = (Object[]) kittensAndMothers.next();\n"
-      "    Cat kitten = (Cat) tuple[0];\n"
-      "    Cat mother = (Cat) tuple[1];\n"
-      "    ....\n"
-      "}]]>"
+"<![CDATA[Iterator kittensAndMothers = sess.createQuery(\n"
+"            \"select kitten, mother from Cat kitten join kitten.mother mother"
+"\")\n"
+"            .list()\n"
+"            .iterator();\n"
+"\n"
+"while ( kittensAndMothers.hasNext() ) {\n"
+"    Object[] tuple = (Object[]) kittensAndMothers.next();\n"
+"    Cat kitten = (Cat) tuple[0];\n"
+"    Cat mother = (Cat) tuple[1];\n"
+"    ....\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:284
+#. Tag: title
+#: session_api.xml:284
+#, no-c-format
 msgid "Scalar results"
-msgstr ""
+msgstr "标量(Scalar)结果"
 
-#: index.docbook:286
-msgid "Queries may specify a property of a class in the <literal>select</literal> clause. They may even call SQL aggregate functions. Properties or aggregates are considered \"scalar\" results (and not entities in persistent state)."
+#. Tag: para
+#: session_api.xml:286
+#, no-c-format
+msgid ""
+"Queries may specify a property of a class in the <literal>select</literal> "
+"clause. They may even call SQL aggregate functions. Properties or aggregates "
+"are considered \"scalar\" results (and not entities in persistent state)."
 msgstr ""
+"查询可在<literal>select</literal>从句中指定类的属性,甚至可以调用SQL统计"
+"(aggregate)函数。 属性或统计结果被认定为\"标量(Scalar)\"的结果(而不是持久"
+"(persistent state)的实体)。"
 
-#: index.docbook:292
+#. Tag: programlisting
+#: session_api.xml:292
+#, no-c-format
 msgid ""
-      "<![CDATA[Iterator results = sess.createQuery(\n"
-      "        \"select cat.color, min(cat.birthdate), count(cat) from Cat cat \" +\n"
-      "        \"group by cat.color\")\n"
-      "        .list()\n"
-      "        .iterator();\n"
-      "\n"
-      "while ( results.hasNext() ) {\n"
-      "    Object[] row = (Object[]) results.next();\n"
-      "    Color type = (Color) row[0];\n"
-      "    Date oldest = (Date) row[1];\n"
-      "    Integer count = (Integer) row[2];\n"
-      "    .....\n"
-      "}]]>"
+"<![CDATA[Iterator results = sess.createQuery(\n"
+"        \"select cat.color, min(cat.birthdate), count(cat) from Cat cat \" "
+"+\n"
+"        \"group by cat.color\")\n"
+"        .list()\n"
+"        .iterator();\n"
+"\n"
+"while ( results.hasNext() ) {\n"
+"    Object[] row = (Object[]) results.next();\n"
+"    Color type = (Color) row[0];\n"
+"    Date oldest = (Date) row[1];\n"
+"    Integer count = (Integer) row[2];\n"
+"    .....\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:297
+#. Tag: title
+#: session_api.xml:297
+#, no-c-format
 msgid "Bind parameters"
-msgstr ""
+msgstr "绑定参数"
 
-#: index.docbook:299
-msgid "Methods on <literal>Query</literal> are provided for binding values to named parameters or JDBC-style <literal>?</literal> parameters. <emphasis>Contrary to JDBC, Hibernate numbers parameters from zero.</emphasis> Named parameters are identifiers of the form <literal>:name</literal> in the query string. The advantages of named parameters are:"
+#. Tag: para
+#: session_api.xml:299
+#, no-c-format
+msgid ""
+"Methods on <literal>Query</literal> are provided for binding values to named "
+"parameters or JDBC-style <literal>?</literal> parameters. <emphasis>Contrary "
+"to JDBC, Hibernate numbers parameters from zero.</emphasis> Named parameters "
+"are identifiers of the form <literal>:name</literal> in the query string. "
+"The advantages of named parameters are:"
 msgstr ""
+"接口<literal>Query</literal>提供了对命名参数(named parameters)、JDBC风格的"
+"<literal>问号(?)</literal>参数进行绑定的方法。 <emphasis>不同于JDBC,"
+"Hibernate对参数从0开始计数。</emphasis> 命名参数(named parameters)在查询字符"
+"串中是形如<literal>:name</literal>的标识符。 命名参数(named parameters)的优点"
+"是:"
 
-#: index.docbook:309
-msgid "named parameters are insensitive to the order they occur in the query string"
-msgstr ""
+#. Tag: para
+#: session_api.xml:309
+#, no-c-format
+msgid ""
+"named parameters are insensitive to the order they occur in the query string"
+msgstr "命名参数(named parameters)与其在查询串中出现的顺序无关"
 
-#: index.docbook:315
+#. Tag: para
+#: session_api.xml:315
+#, no-c-format
 msgid "they may occur multiple times in the same query"
-msgstr ""
+msgstr "它们可在同一查询串中多次出现"
 
-#: index.docbook:320
+#. Tag: para
+#: session_api.xml:320
+#, no-c-format
 msgid "they are self-documenting"
-msgstr ""
+msgstr "它们本身是自我说明的"
 
-#: index.docbook:326
+#. Tag: programlisting
+#: session_api.xml:326
+#, no-c-format
 msgid ""
-      "<![CDATA[//named parameter (preferred)\n"
-      "Query q = sess.createQuery(\"from DomesticCat cat where cat.name = :name\");\n"
-      "q.setString(\"name\", \"Fritz\");\n"
-      "Iterator cats = q.iterate();]]>"
+"<![CDATA[//named parameter (preferred)\n"
+"Query q = sess.createQuery(\"from DomesticCat cat where cat.name = :name"
+"\");\n"
+"q.setString(\"name\", \"Fritz\");\n"
+"Iterator cats = q.iterate();]]>"
 msgstr ""
 
-#: index.docbook:328
+#. Tag: programlisting
+#: session_api.xml:328
+#, no-c-format
 msgid ""
-      "<![CDATA[//positional parameter\n"
-      "Query q = sess.createQuery(\"from DomesticCat cat where cat.name = ?\");\n"
-      "q.setString(0, \"Izi\");\n"
-      "Iterator cats = q.iterate();]]>"
+"<![CDATA[//positional parameter\n"
+"Query q = sess.createQuery(\"from DomesticCat cat where cat.name = ?\");\n"
+"q.setString(0, \"Izi\");\n"
+"Iterator cats = q.iterate();]]>"
 msgstr ""
 
-#: index.docbook:330
+#. Tag: programlisting
+#: session_api.xml:330
+#, no-c-format
 msgid ""
-      "<![CDATA[//named parameter list\n"
-      "List names = new ArrayList();\n"
-      "names.add(\"Izi\");\n"
-      "names.add(\"Fritz\");\n"
-      "Query q = sess.createQuery(\"from DomesticCat cat where cat.name in (:namesList)\");\n"
-      "q.setParameterList(\"namesList\", names);\n"
-      "List cats = q.list();]]>"
+"<![CDATA[//named parameter list\n"
+"List names = new ArrayList();\n"
+"names.add(\"Izi\");\n"
+"names.add(\"Fritz\");\n"
+"Query q = sess.createQuery(\"from DomesticCat cat where cat.name in (:"
+"namesList)\");\n"
+"q.setParameterList(\"namesList\", names);\n"
+"List cats = q.list();]]>"
 msgstr ""
 
-#: index.docbook:335
+#. Tag: title
+#: session_api.xml:335
+#, no-c-format
 msgid "Pagination"
-msgstr ""
+msgstr "分页"
 
-#: index.docbook:337
-msgid "If you need to specify bounds upon your result set (the maximum number of rows you want to retrieve and / or the first row you want to retrieve) you should use methods of the <literal>Query</literal> interface:"
+#. Tag: para
+#: session_api.xml:337
+#, no-c-format
+msgid ""
+"If you need to specify bounds upon your result set (the maximum number of "
+"rows you want to retrieve and / or the first row you want to retrieve) you "
+"should use methods of the <literal>Query</literal> interface:"
 msgstr ""
+"如果你需要指定结果集的范围(希望返回的最大行数/或开始的行数),应该使用"
+"<literal>Query</literal>接口提供的方法:"
 
-#: index.docbook:343
+#. Tag: programlisting
+#: session_api.xml:343
+#, no-c-format
 msgid ""
-      "<![CDATA[Query q = sess.createQuery(\"from DomesticCat cat\");\n"
-      "q.setFirstResult(20);\n"
-      "q.setMaxResults(10);\n"
-      "List cats = q.list();]]>"
+"<![CDATA[Query q = sess.createQuery(\"from DomesticCat cat\");\n"
+"q.setFirstResult(20);\n"
+"q.setMaxResults(10);\n"
+"List cats = q.list();]]>"
 msgstr ""
 
-#: index.docbook:345
-msgid "Hibernate knows how to translate this limit query into the native SQL of your DBMS."
+#. Tag: para
+#: session_api.xml:345
+#, no-c-format
+msgid ""
+"Hibernate knows how to translate this limit query into the native SQL of "
+"your DBMS."
 msgstr ""
+"Hibernate 知道如何将这个有限定条件的查询转换成你的数据库的原生SQL(native "
+"SQL)。"
 
-#: index.docbook:353
+#. Tag: title
+#: session_api.xml:353
+#, no-c-format
 msgid "Scrollable iteration"
-msgstr ""
+msgstr "可滚动遍历(Scrollable iteration)"
 
-#: index.docbook:355
-msgid "If your JDBC driver supports scrollable <literal>ResultSet</literal>s, the <literal>Query</literal> interface may be used to obtain a <literal>ScrollableResults</literal> object, which allows flexible navigation of the query results."
+#. Tag: para
+#: session_api.xml:355
+#, no-c-format
+msgid ""
+"If your JDBC driver supports scrollable <literal>ResultSet</literal>s, the "
+"<literal>Query</literal> interface may be used to obtain a "
+"<literal>ScrollableResults</literal> object, which allows flexible "
+"navigation of the query results."
 msgstr ""
+"如果你的JDBC驱动支持可滚动的<literal>ResuleSet</literal>,<literal>Query</"
+"literal>接口可以使用<literal>ScrollableResults</literal>,允许你在查询结果中"
+"灵活游走。"
 
-#: index.docbook:362
+#. Tag: programlisting
+#: session_api.xml:362
+#, no-c-format
 msgid ""
-      "<![CDATA[Query q = sess.createQuery(\"select cat.name, cat from DomesticCat cat \" +\n"
-      "                            \"order by cat.name\");\n"
-      "ScrollableResults cats = q.scroll();\n"
-      "if ( cats.first() ) {\n"
-      "\n"
-      "    // find the first name on each page of an alphabetical list of cats by name\n"
-      "    firstNamesOfPages = new ArrayList();\n"
-      "    do {\n"
-      "        String name = cats.getString(0);\n"
-      "        firstNamesOfPages.add(name);\n"
-      "    }\n"
-      "    while ( cats.scroll(PAGE_SIZE) );\n"
-      "\n"
-      "    // Now get the first page of cats\n"
-      "    pageOfCats = new ArrayList();\n"
-      "    cats.beforeFirst();\n"
-      "    int i=0;\n"
-      "    while( ( PAGE_SIZE > i++ ) && cats.next() ) pageOfCats.add( cats.get(1) );\n"
-      "\n"
-      "}\n"
-      "cats.close()]]>"
+"<![CDATA[Query q = sess.createQuery(\"select cat.name, cat from DomesticCat "
+"cat \" +\n"
+"                            \"order by cat.name\");\n"
+"ScrollableResults cats = q.scroll();\n"
+"if ( cats.first() ) {\n"
+"\n"
+"    // find the first name on each page of an alphabetical list of cats by "
+"name\n"
+"    firstNamesOfPages = new ArrayList();\n"
+"    do {\n"
+"        String name = cats.getString(0);\n"
+"        firstNamesOfPages.add(name);\n"
+"    }\n"
+"    while ( cats.scroll(PAGE_SIZE) );\n"
+"\n"
+"    // Now get the first page of cats\n"
+"    pageOfCats = new ArrayList();\n"
+"    cats.beforeFirst();\n"
+"    int i=0;\n"
+"    while( ( PAGE_SIZE > i++ ) && cats.next() ) pageOfCats.add( cats.get"
+"(1) );\n"
+"\n"
+"}\n"
+"cats.close()]]>"
 msgstr ""
 
-#: index.docbook:364
-msgid "Note that an open database connection (and cursor) is required for this functionality, use <literal>setMaxResult()</literal>/<literal>setFirstResult()</literal> if you need offline pagination functionality."
+#. Tag: para
+#: session_api.xml:364
+#, no-c-format
+msgid ""
+"Note that an open database connection (and cursor) is required for this "
+"functionality, use <literal>setMaxResult()</literal>/<literal>setFirstResult"
+"()</literal> if you need offline pagination functionality."
 msgstr ""
+"请注意,使用此功能需要保持数据库连接(以及游标(cursor))处于一直打开状态。 如"
+"果你需要断开连接使用分页功能,请使用<literal>setMaxResult()</literal>/"
+"<literal>setFirstResult()</literal>"
 
-#: index.docbook:373
+#. Tag: title
+#: session_api.xml:373
+#, no-c-format
 msgid "Externalizing named queries"
-msgstr ""
+msgstr "外置命名查询(Externalizing named queries)"
 
-#: index.docbook:375
-msgid "You may also define named queries in the mapping document. (Remember to use a <literal>CDATA</literal> section if your query contains characters that could be interpreted as markup.)"
+#. Tag: para
+#: session_api.xml:375
+#, no-c-format
+msgid ""
+"You may also define named queries in the mapping document. (Remember to use "
+"a <literal>CDATA</literal> section if your query contains characters that "
+"could be interpreted as markup.)"
 msgstr ""
+"你可以在映射文件中定义命名查询(named queries)。 (如果你的查询串中包含可能被"
+"解释为XML标记(markup)的字符,别忘了用<literal>CDATA</literal>包裹起来。)"
 
-#: index.docbook:381
+#. Tag: programlisting
+#: session_api.xml:381
+#, no-c-format
 msgid ""
-      "<![CDATA[<query name=\"ByNameAndMaximumWeight\"><![CDATA[\n"
-      "    from eg.DomesticCat as cat\n"
-      "        where cat.name = ?\n"
-      "        and cat.weight > ?\n"
-      "] ]></query>]]>"
+"<![CDATA[<query name=\"ByNameAndMaximumWeight\"><![CDATA[\n"
+"    from eg.DomesticCat as cat\n"
+"        where cat.name = ?\n"
+"        and cat.weight > ?\n"
+"] ]></query>]]>"
 msgstr ""
 
-#: index.docbook:383
+#. Tag: para
+#: session_api.xml:383
+#, no-c-format
 msgid "Parameter binding and executing is done programatically:"
-msgstr ""
+msgstr "参数绑定及执行以编程方式(programatically)完成:"
 
-#: index.docbook:387
+#. Tag: programlisting
+#: session_api.xml:387
+#, no-c-format
 msgid ""
-      "<![CDATA[Query q = sess.getNamedQuery(\"ByNameAndMaximumWeight\");\n"
-      "q.setString(0, name);\n"
-      "q.setInt(1, minWeight);\n"
-      "List cats = q.list();]]>"
+"<![CDATA[Query q = sess.getNamedQuery(\"ByNameAndMaximumWeight\");\n"
+"q.setString(0, name);\n"
+"q.setInt(1, minWeight);\n"
+"List cats = q.list();]]>"
 msgstr ""
 
-#: index.docbook:389
-msgid "Note that the actual program code is independent of the query language that is used, you may also define native SQL queries in metadata, or migrate existing queries to Hibernate by placing them in mapping files."
+#. Tag: para
+#: session_api.xml:389
+#, no-c-format
+msgid ""
+"Note that the actual program code is independent of the query language that "
+"is used, you may also define native SQL queries in metadata, or migrate "
+"existing queries to Hibernate by placing them in mapping files."
 msgstr ""
+"请注意实际的程序代码与所用的查询语言无关,你也可在元数据中定义原生SQL(native "
+"SQL)查询, 或将原有的其他的查询语句放在配置文件中,这样就可以让Hibernate统一"
+"管理,达到迁移的目的。"
 
-#: index.docbook:395
-msgid "Also note that a query declaration inside a <literal>&lt;hibernate-mapping&gt;</literal> element requires a global unique name for the query, while a query declaration inside a <literal>&lt;class&gt;</literal> element is made unique automatically by prepending the fully qualified name of the class, for example <literal>eg.Cat.ByNameAndMaximumWeight</literal>."
+#. Tag: para
+#: session_api.xml:395
+#, no-c-format
+msgid ""
+"Also note that a query declaration inside a <literal>&lt;hibernate-"
+"mapping&gt;</literal> element requires a global unique name for the query, "
+"while a query declaration inside a <literal>&lt;class&gt;</literal> element "
+"is made unique automatically by prepending the fully qualified name of the "
+"class, for example <literal>eg.Cat.ByNameAndMaximumWeight</literal>."
 msgstr ""
+"也请注意在<literal>&lt;hibernate-mapping&gt;</literal>元素中声明的查询必须有"
+"一个全局唯一的名字,而在<literal>&lt;class&gt;</literal>元素中声明的查询自动具"
+"有全局名,是通过类的全名加以限定的。比如<literal>eg.Cat."
+"ByNameAndMaximumWeight</literal>。"
 
-#: index.docbook:408
+#. Tag: title
+#: session_api.xml:408
+#, no-c-format
 msgid "Filtering collections"
-msgstr ""
+msgstr "过滤集合"
 
-#: index.docbook:409
-msgid "A collection <emphasis>filter</emphasis> is a special type of query that may be applied to a persistent collection or array. The query string may refer to <literal>this</literal>, meaning the current collection element."
+#. Tag: para
+#: session_api.xml:409
+#, no-c-format
+msgid ""
+"A collection <emphasis>filter</emphasis> is a special type of query that may "
+"be applied to a persistent collection or array. The query string may refer "
+"to <literal>this</literal>, meaning the current collection element."
 msgstr ""
+"集合<emphasis>过滤器(filter)</emphasis>是一种用于一个持久化集合或者数组的特殊"
+"的查询。查询字符串中可以使用<literal>\"this\"</literal>来引用集合中的当前元"
+"素。"
 
-#: index.docbook:415
+#. Tag: programlisting
+#: session_api.xml:415
+#, no-c-format
 msgid ""
-      "<![CDATA[Collection blackKittens = session.createFilter(\n"
-      "    pk.getKittens(), \n"
-      "    \"where this.color = ?\")\n"
-      "    .setParameter( Color.BLACK, Hibernate.custom(ColorUserType.class) )\n"
-      "    .list()\n"
-      ");]]>"
+"<![CDATA[Collection blackKittens = session.createFilter(\n"
+"    pk.getKittens(), \n"
+"    \"where this.color = ?\")\n"
+"    .setParameter( Color.BLACK, Hibernate.custom(ColorUserType.class) )\n"
+"    .list()\n"
+");]]>"
 msgstr ""
 
-#: index.docbook:417
-msgid "The returned collection is considered a bag, and it's a copy of the given collection. The original collection is not modified (this is contrary to the implication of the name \"filter\", but consistent with expected behavior)."
+#. Tag: para
+#: session_api.xml:417
+#, no-c-format
+msgid ""
+"The returned collection is considered a bag, and it's a copy of the given "
+"collection. The original collection is not modified (this is contrary to the "
+"implication of the name \"filter\", but consistent with expected behavior)."
 msgstr ""
+"返回的集合可以被认为是一个包(bag, 无顺序可重复的集合(collection)),它是所给集"
+"合的副本。 原来的集合不会被改动(这与“过滤器(filter)”的隐含的含义不符,不过与"
+"我们期待的行为一致)。"
 
-#: index.docbook:423
-msgid "Observe that filters do not require a <literal>from</literal> clause (though they may have one if required). Filters are not limited to returning the collection elements themselves."
+#. Tag: para
+#: session_api.xml:423
+#, no-c-format
+msgid ""
+"Observe that filters do not require a <literal>from</literal> clause (though "
+"they may have one if required). Filters are not limited to returning the "
+"collection elements themselves."
 msgstr ""
+"请注意过滤器(filter)并不需要<literal>from</literal>子句(当然需要的话它们也可"
+"以加上)。过滤器(filter)不限定于只能返回集合元素本身。"
 
-#: index.docbook:428
+#. Tag: programlisting
+#: session_api.xml:428
+#, no-c-format
 msgid ""
-      "<![CDATA[Collection blackKittenMates = session.createFilter(\n"
-      "    pk.getKittens(), \n"
-      "    \"select this.mate where this.color = eg.Color.BLACK.intValue\")\n"
-      "    .list();]]>"
+"<![CDATA[Collection blackKittenMates = session.createFilter(\n"
+"    pk.getKittens(), \n"
+"    \"select this.mate where this.color = eg.Color.BLACK.intValue\")\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:430
-msgid "Even an empty filter query is useful, e.g. to load a subset of elements in a huge collection:"
+#. Tag: para
+#: session_api.xml:430
+#, no-c-format
+msgid ""
+"Even an empty filter query is useful, e.g. to load a subset of elements in a "
+"huge collection:"
 msgstr ""
+"即使无条件的过滤器(filter)也是有意义的。例如,用于加载一个大集合的子集:"
 
-#: index.docbook:435
+#. Tag: programlisting
+#: session_api.xml:435
+#, no-c-format
 msgid ""
-      "<![CDATA[Collection tenKittens = session.createFilter(\n"
-      "    mother.getKittens(), \"\")\n"
-      "    .setFirstResult(0).setMaxResults(10)\n"
-      "    .list();]]>"
+"<![CDATA[Collection tenKittens = session.createFilter(\n"
+"    mother.getKittens(), \"\")\n"
+"    .setFirstResult(0).setMaxResults(10)\n"
+"    .list();]]>"
 msgstr ""
 
-#: index.docbook:440
+#. Tag: title
+#: session_api.xml:440
+#, no-c-format
 msgid "Criteria queries"
-msgstr ""
+msgstr "条件查询(Criteria queries)"
 
-#: index.docbook:442
-msgid "HQL is extremely powerful but some developers prefer to build queries dynamically, using an object-oriented API, rather than building query strings. Hibernate provides an intuitive <literal>Criteria</literal> query API for these cases:"
+#. Tag: para
+#: session_api.xml:442
+#, no-c-format
+msgid ""
+"HQL is extremely powerful but some developers prefer to build queries "
+"dynamically, using an object-oriented API, rather than building query "
+"strings. Hibernate provides an intuitive <literal>Criteria</literal> query "
+"API for these cases:"
 msgstr ""
+"HQL极为强大,但是有些人希望能够动态的使用一种面向对象API创建查询,而非在他们"
+"的Java代码中嵌入字符串。对于那部分人来说,Hibernate提供了直观的"
+"<literal>Criteria</literal>查询API。"
 
-#: index.docbook:448
+#. Tag: programlisting
+#: session_api.xml:448
+#, no-c-format
 msgid ""
-      "<![CDATA[Criteria crit = session.createCriteria(Cat.class);\n"
-      "crit.add( Restrictions.eq( \"color\", eg.Color.BLACK ) );\n"
-      "crit.setMaxResults(10);\n"
-      "List cats = crit.list();]]>"
+"<![CDATA[Criteria crit = session.createCriteria(Cat.class);\n"
+"crit.add( Restrictions.eq( \"color\", eg.Color.BLACK ) );\n"
+"crit.setMaxResults(10);\n"
+"List cats = crit.list();]]>"
 msgstr ""
 
-#: index.docbook:450
-msgid "The <literal>Criteria</literal> and the associated <literal>Example</literal> API are discussed in more detail in <xref linkend=\"querycriteria\"/>."
+#. Tag: para
+#: session_api.xml:450
+#, no-c-format
+msgid ""
+"The <literal>Criteria</literal> and the associated <literal>Example</"
+"literal> API are discussed in more detail in <xref linkend=\"querycriteria\"/"
+">."
 msgstr ""
+"<literal>Criteria</literal>以及相关的<literal>样例(Example)</literal>API将会"
+"再<xref linkend=\"querycriteria\"/>中详细讨论。"
 
-#: index.docbook:458
+#. Tag: title
+#: session_api.xml:458
+#, no-c-format
 msgid "Queries in native SQL"
-msgstr ""
+msgstr "使用原生SQL的查询"
 
-#: index.docbook:460
-msgid "You may express a query in SQL, using <literal>createSQLQuery()</literal> and let Hibernate take care of the mapping from result sets to objects. Note that you may at any time call <literal>session.connection()</literal> and use the JDBC <literal>Connection</literal> directly. If you chose to use the Hibernate API, you must enclose SQL aliases in braces:"
+#. Tag: para
+#: session_api.xml:460
+#, no-c-format
+msgid ""
+"You may express a query in SQL, using <literal>createSQLQuery()</literal> "
+"and let Hibernate take care of the mapping from result sets to objects. Note "
+"that you may at any time call <literal>session.connection()</literal> and "
+"use the JDBC <literal>Connection</literal> directly. If you chose to use the "
+"Hibernate API, you must enclose SQL aliases in braces:"
 msgstr ""
+"你可以使用<literal>createSQLQuery()</literal>方法,用SQL来描述查询,并由"
+"Hibernate将结果集转换成对象。 请注意,你可以在任何时候调用<literal>session."
+"connection()</literal>来获得并使用JDBC <literal>Connection</literal>对象。 如"
+"果你选择使用Hibernate的API, 你必须把SQL别名用大括号包围起来:"
 
-#: index.docbook:468
+#. Tag: programlisting
+#: session_api.xml:468
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = session.createSQLQuery(\"SELECT {cat.*} FROM CAT {cat} WHERE ROWNUM<10\")\n"
-      "    .addEntity(\"cat\", Cat.class)\n"
-      ".list();]]>"
+"<![CDATA[List cats = session.createSQLQuery(\"SELECT {cat.*} FROM CAT {cat} "
+"WHERE ROWNUM<10\")\n"
+"    .addEntity(\"cat\", Cat.class)\n"
+".list();]]>"
 msgstr ""
 
-#: index.docbook:470
+#. Tag: programlisting
+#: session_api.xml:470
+#, no-c-format
 msgid ""
-      "<![CDATA[List cats = session.createSQLQuery(\n"
-      "    \"SELECT {cat}.ID AS {cat.id}, {cat}.SEX AS {cat.sex}, \" +\n"
-      "           \"{cat}.MATE AS {cat.mate}, {cat}.SUBCLASS AS {cat.class}, ... \" +\n"
-      "    \"FROM CAT {cat} WHERE ROWNUM<10\")\n"
-      "    .addEntity(\"cat\", Cat.class)\n"
-      ".list()]]>"
+"<![CDATA[List cats = session.createSQLQuery(\n"
+"    \"SELECT {cat}.ID AS {cat.id}, {cat}.SEX AS {cat.sex}, \" +\n"
+"           \"{cat}.MATE AS {cat.mate}, {cat}.SUBCLASS AS {cat.class}, ... \" "
+"+\n"
+"    \"FROM CAT {cat} WHERE ROWNUM<10\")\n"
+"    .addEntity(\"cat\", Cat.class)\n"
+".list()]]>"
 msgstr ""
 
-#: index.docbook:472
-msgid "SQL queries may contain named and positional parameters, just like Hibernate queries. More information about native SQL queries in Hibernate can be found in <xref linkend=\"querysql\"/>."
+#. Tag: para
+#: session_api.xml:472
+#, no-c-format
+msgid ""
+"SQL queries may contain named and positional parameters, just like Hibernate "
+"queries. More information about native SQL queries in Hibernate can be found "
+"in <xref linkend=\"querysql\"/>."
 msgstr ""
+"和Hibernate查询一样,SQL查询也可以包含命名参数和占位参数。 可以在<xref "
+"linkend=\"querysql\"/>找到更多关于Hibernate中原生SQL(native SQL)的信息。"
 
-#: index.docbook:483
+#. Tag: title
+#: session_api.xml:483
+#, no-c-format
 msgid "Modifying persistent objects"
-msgstr ""
+msgstr "修改持久对象"
 
-#: index.docbook:485
-msgid "<emphasis>Transactional persistent instances</emphasis> (ie. objects loaded, saved, created or queried by the <literal>Session</literal>) may be manipulated by the application and any changes to persistent state will be persisted when the <literal>Session</literal> is <emphasis>flushed</emphasis> (discussed later in this chapter). There is no need to call a particular method (like <literal>update()</literal>, which has a different purpose) to make your modifications persistent. So the most straightforward way to update the state of an object is to <literal>load()</literal> it, and then manipulate it directly, while the <literal>Session</literal> is open:"
+#. Tag: para
+#: session_api.xml:485
+#, no-c-format
+msgid ""
+"<emphasis>Transactional persistent instances</emphasis> (ie. objects loaded, "
+"saved, created or queried by the <literal>Session</literal>) may be "
+"manipulated by the application and any changes to persistent state will be "
+"persisted when the <literal>Session</literal> is <emphasis>flushed</"
+"emphasis> (discussed later in this chapter). There is no need to call a "
+"particular method (like <literal>update()</literal>, which has a different "
+"purpose) to make your modifications persistent. So the most straightforward "
+"way to update the state of an object is to <literal>load()</literal> it, and "
+"then manipulate it directly, while the <literal>Session</literal> is open:"
 msgstr ""
+"<emphasis>事务中的持久实例</emphasis>(就是通过<literal>session</literal>装"
+"载、保存、创建或者查询出的对象) 被应用程序操作所造成的任何修改都会在"
+"<literal>Session</literal>被<emphasis>刷出(flushed)</emphasis>的时候被持久"
+"化(本章后面会详细讨论)。 这里不需要调用某个特定的方法(比如<literal>update"
+"()</literal>,设计它的目的是不同的)将你的修改持久化。 所以最直接的更新一个对"
+"象的方法就是在<literal>Session</literal>处于打开状态时<literal>load()</"
+"literal>它,然后直接修改即可:"
 
-#: index.docbook:496
+#. Tag: programlisting
+#: session_api.xml:496
+#, no-c-format
 msgid ""
-      "<![CDATA[DomesticCat cat = (DomesticCat) sess.load( Cat.class, new Long(69) );\n"
-      "cat.setName(\"PK\");\n"
-      "sess.flush();  // changes to cat are automatically detected and persisted]]>"
+"<![CDATA[DomesticCat cat = (DomesticCat) sess.load( Cat.class, new Long"
+"(69) );\n"
+"cat.setName(\"PK\");\n"
+"sess.flush();  // changes to cat are automatically detected and persisted]]>"
 msgstr ""
 
-#: index.docbook:498
-msgid "Sometimes this programming model is inefficient since it would require both an SQL <literal>SELECT</literal> (to load an object) and an SQL <literal>UPDATE</literal> (to persist its updated state) in the same session. Therefore Hibernate offers an alternate approach, using detached instances."
+#. Tag: para
+#: session_api.xml:498
+#, no-c-format
+msgid ""
+"Sometimes this programming model is inefficient since it would require both "
+"an SQL <literal>SELECT</literal> (to load an object) and an SQL "
+"<literal>UPDATE</literal> (to persist its updated state) in the same "
+"session. Therefore Hibernate offers an alternate approach, using detached "
+"instances."
 msgstr ""
+"有时这种程序模型效率低下,因为它在同一Session里需要一条SQL <literal>SELECT</"
+"literal>语句(用于加载对象) 以及一条SQL <literal>UPDATE</literal>语句(持久化"
+"更新的状态)。 为此Hibernate提供了另一种途径,使用脱管(detached)实例。"
 
-#: index.docbook:506
-msgid "Note that Hibernate does not offer its own API for direct execution of <literal>UPDATE</literal> or <literal>DELETE</literal> statements. Hibernate is a <emphasis>state management</emphasis> service, you don't have to think in <emphasis>statements</emphasis> to use it. JDBC is a perfect API for executing SQL statements, you can get a JDBC <literal>Connection</literal> at any time by calling <literal>session.connection()</literal>. Furthermore, the notion of mass operations conflicts with object/relational mapping for online transaction processing-oriented applications. Future versions of Hibernate may however provide special mass operation functions. See <xref linkend=\"batch\"/> for some possible batch operation tricks."
+#. Tag: emphasis
+#: session_api.xml:506
+#, fuzzy, no-c-format
+msgid ""
+"Note that Hibernate does not offer its own API for direct execution of "
+"<literal>UPDATE</literal> or <literal>DELETE</literal> statements. Hibernate "
+"is a <emphasis>state management</emphasis> service, you don't have to think "
+"in <emphasis>statements</emphasis> to use it. JDBC is a perfect API for "
+"executing SQL statements, you can get a JDBC <literal>Connection</literal> "
+"at any time by calling <literal>session.connection()</literal>. Furthermore, "
+"the notion of mass operations conflicts with object/relational mapping for "
+"online transaction processing-oriented applications. Future versions of "
+"Hibernate may however provide special mass operation functions. See <xref "
+"linkend=\"batch\"/> for some possible batch operation tricks."
 msgstr ""
+"请注意Hibernate本身不提供直接执行<placeholder-1/>或<placeholder-2/>语句的"
+"API。 Hibernate提供的是<placeholder-3/>服务,你不必考虑要使用的<placeholder-"
+"4/>。 JDBC是出色的执行SQL语句的API,任何时候调用<placeholder-5/>你都可以得到"
+"一个JDBC <placeholder-6/>对象。 此外,在联机事务处理(OLTP)程序中,大量操作"
+"(mass operations)与对象/关系映射的观点是相冲突的。 Hibernate的将来版本可能会"
+"提供专门的进行大量操作(mass operation)的功能。 参考<xref linkend=\"batch\"/"
+">,寻找一些可用的批量(batch)操作技巧。"
 
-#: index.docbook:521
+#. Tag: title
+#: session_api.xml:521
+#, no-c-format
 msgid "Modifying detached objects"
-msgstr ""
+msgstr "修改脱管(Detached)对象"
 
-#: index.docbook:523
-msgid "Many applications need to retrieve an object in one transaction, send it to the UI layer for manipulation, then save the changes in a new transaction. Applications that use this kind of approach in a high-concurrency environment usually use versioned data to ensure isolation for the \"long\" unit of work."
+#. Tag: para
+#: session_api.xml:523
+#, no-c-format
+msgid ""
+"Many applications need to retrieve an object in one transaction, send it to "
+"the UI layer for manipulation, then save the changes in a new transaction. "
+"Applications that use this kind of approach in a high-concurrency "
+"environment usually use versioned data to ensure isolation for the \"long\" "
+"unit of work."
 msgstr ""
+"很多程序需要在某个事务中获取对象,然后将对象发送到界面层去操作,最后在一个新"
+"的事务保存所做的修改。 在高并发访问的环境中使用这种方式,通常使用附带版本信息"
+"的数据来保证这些“长“工作单元之间的隔离。"
 
-#: index.docbook:530
-msgid "Hibernate supports this model by providing for reattachment of detached instances using the <literal>Session.update()</literal> or <literal>Session.merge()</literal> methods:"
+#. Tag: para
+#: session_api.xml:530
+#, no-c-format
+msgid ""
+"Hibernate supports this model by providing for reattachment of detached "
+"instances using the <literal>Session.update()</literal> or <literal>Session."
+"merge()</literal> methods:"
 msgstr ""
+"Hibernate通过提供<literal>Session.update()</literal>或<literal>Session.merge"
+"()</literal> 重新关联脱管实例的办法来支持这种模型。"
 
-#: index.docbook:536
+#. Tag: programlisting
+#: session_api.xml:536
+#, no-c-format
 msgid ""
-      "<![CDATA[// in the first session\n"
-      "Cat cat = (Cat) firstSession.load(Cat.class, catId);\n"
-      "Cat potentialMate = new Cat();\n"
-      "firstSession.save(potentialMate);\n"
-      "\n"
-      "// in a higher layer of the application\n"
-      "cat.setMate(potentialMate);\n"
-      "\n"
-      "// later, in a new session\n"
-      "secondSession.update(cat);  // update cat\n"
-      "secondSession.update(mate); // update mate]]>"
+"<![CDATA[// in the first session\n"
+"Cat cat = (Cat) firstSession.load(Cat.class, catId);\n"
+"Cat potentialMate = new Cat();\n"
+"firstSession.save(potentialMate);\n"
+"\n"
+"// in a higher layer of the application\n"
+"cat.setMate(potentialMate);\n"
+"\n"
+"// later, in a new session\n"
+"secondSession.update(cat);  // update cat\n"
+"secondSession.update(mate); // update mate]]>"
 msgstr ""
 
-#: index.docbook:538
-msgid "If the <literal>Cat</literal> with identifier <literal>catId</literal> had already been loaded by <literal>secondSession</literal> when the application tried to reattach it, an exception would have been thrown."
+#. Tag: para
+#: session_api.xml:538
+#, no-c-format
+msgid ""
+"If the <literal>Cat</literal> with identifier <literal>catId</literal> had "
+"already been loaded by <literal>secondSession</literal> when the application "
+"tried to reattach it, an exception would have been thrown."
 msgstr ""
+"如果具有<literal>catId</literal>持久化标识的<literal>Cat</literal>之前已经被"
+"<literal>另一Session(secondSession)</literal>装载了, 应用程序进行重关联操作"
+"(reattach)的时候会抛出一个异常。"
 
-#: index.docbook:544
-msgid "Use <literal>update()</literal> if you are sure that the session does not contain an already persistent instance with the same identifier, and <literal>merge()</literal> if you want to merge your modifications at any time without consideration of the state of the session. In other words, <literal>update()</literal> is usually the first method you would call in a fresh session, ensuring that reattachment of your detached instances is the first operation that is executed."
+#. Tag: para
+#: session_api.xml:544
+#, no-c-format
+msgid ""
+"Use <literal>update()</literal> if you are sure that the session does not "
+"contain an already persistent instance with the same identifier, and "
+"<literal>merge()</literal> if you want to merge your modifications at any "
+"time without consideration of the state of the session. In other words, "
+"<literal>update()</literal> is usually the first method you would call in a "
+"fresh session, ensuring that reattachment of your detached instances is the "
+"first operation that is executed."
 msgstr ""
+"如果你确定当前session没有包含与之具有相同持久化标识的持久实例,使用"
+"<literal>update()</literal>。 如果想随时合并你的的改动而不考虑session的状态,"
+"使用<literal>merge()</literal>。 换句话说,在一个新session中通常第一个调用的"
+"是<literal>update()</literal>方法,以便保证重新关联脱管(detached)对象的操作首"
+"先被执行。"
 
-#: index.docbook:553
-msgid "The application should individually <literal>update()</literal> detached instances reachable from the given detached instance if and <emphasis>only</emphasis> if it wants their state also updated. This can be automated of course, using <emphasis>transitive persistence</emphasis>, see <xref linkend=\"objectstate-transitive\"/>."
+#. Tag: para
+#: session_api.xml:553
+#, no-c-format
+msgid ""
+"The application should individually <literal>update()</literal> detached "
+"instances reachable from the given detached instance if and <emphasis>only</"
+"emphasis> if it wants their state also updated. This can be automated of "
+"course, using <emphasis>transitive persistence</emphasis>, see <xref linkend="
+"\"objectstate-transitive\"/>."
 msgstr ""
+"如果希望相关联的脱管对象(通过引用“可到达”的脱管对象)的数据也要更新到数据库"
+"时(并且也<emphasis>仅仅</emphasis>在这种情况), 可以对该相关联的脱管对象单"
+"独调用<literal>update()</literal> 当然这些可以自动完成,即通过使用<emphasis>"
+"传播性持久化(transitive persistence)</emphasis>,请看<xref linkend="
+"\"objectstate-transitive\"/>。"
 
-#: index.docbook:560
-msgid "The <literal>lock()</literal> method also allows an application to reassociate an object with a new session. However, the detached instance has to be unmodified!"
+#. Tag: para
+#: session_api.xml:560
+#, no-c-format
+msgid ""
+"The <literal>lock()</literal> method also allows an application to "
+"reassociate an object with a new session. However, the detached instance has "
+"to be unmodified!"
 msgstr ""
+"<literal>lock()</literal>方法也允许程序重新关联某个对象到一个新session上。不"
+"过,该脱管(detached)的对象必须是没有修改过的!"
 
-#: index.docbook:565
+#. Tag: programlisting
+#: session_api.xml:565
+#, no-c-format
 msgid ""
-      "<![CDATA[//just reassociate:\n"
-      "sess.lock(fritz, LockMode.NONE);\n"
-      "//do a version check, then reassociate:\n"
-      "sess.lock(izi, LockMode.READ);\n"
-      "//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n"
-      "sess.lock(pk, LockMode.UPGRADE);]]>"
+"<![CDATA[//just reassociate:\n"
+"sess.lock(fritz, LockMode.NONE);\n"
+"//do a version check, then reassociate:\n"
+"sess.lock(izi, LockMode.READ);\n"
+"//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n"
+"sess.lock(pk, LockMode.UPGRADE);]]>"
 msgstr ""
 
-#: index.docbook:567
-msgid "Note that <literal>lock()</literal> can be used with various <literal>LockMode</literal>s, see the API documentation and the chapter on transaction handling for more information. Reattachment is not the only usecase for <literal>lock()</literal>."
+#. Tag: para
+#: session_api.xml:567
+#, no-c-format
+msgid ""
+"Note that <literal>lock()</literal> can be used with various "
+"<literal>LockMode</literal>s, see the API documentation and the chapter on "
+"transaction handling for more information. Reattachment is not the only "
+"usecase for <literal>lock()</literal>."
 msgstr ""
+"请注意,<literal>lock()</literal>可以搭配多种<literal>LockMode</literal>, 更"
+"多信息请阅读API文档以及关于事务处理(transaction handling)的章节。重新关联不是"
+"<literal>lock()</literal>的唯一用途。"
 
-#: index.docbook:574
-msgid "Other models for long units of work are discussed in <xref linkend=\"transactions-optimistic\"/>."
+#. Tag: para
+#: session_api.xml:574
+#, no-c-format
+msgid ""
+"Other models for long units of work are discussed in <xref linkend="
+"\"transactions-optimistic\"/>."
 msgstr ""
+"其他用于长时间工作单元的模型会在<xref linkend=\"transactions-optimistic\"/>中"
+"讨论。"
 
-#: index.docbook:581
+#. Tag: title
+#: session_api.xml:581
+#, no-c-format
 msgid "Automatic state detection"
-msgstr ""
+msgstr "自动状态检测"
 
-#: index.docbook:583
-msgid "Hibernate users have requested a general purpose method that either saves a transient instance by generating a new identifier or updates/reattaches the detached instances associated with its current identifier. The <literal>saveOrUpdate()</literal> method implements this functionality."
+#. Tag: para
+#: session_api.xml:583
+#, no-c-format
+msgid ""
+"Hibernate users have requested a general purpose method that either saves a "
+"transient instance by generating a new identifier or updates/reattaches the "
+"detached instances associated with its current identifier. The "
+"<literal>saveOrUpdate()</literal> method implements this functionality."
 msgstr ""
+"Hibernate的用户曾要求一个既可自动分配新持久化标识(identifier)保存瞬时"
+"(transient)对象,又可更新/重新关联脱管(detached)实例的通用方法。 "
+"<literal>saveOrUpdate()</literal>方法实现了这个功能。"
 
-#: index.docbook:590
+#. Tag: programlisting
+#: session_api.xml:590
+#, no-c-format
 msgid ""
-      "<![CDATA[// in the first session\n"
-      "Cat cat = (Cat) firstSession.load(Cat.class, catID);\n"
-      "\n"
-      "// in a higher tier of the application\n"
-      "Cat mate = new Cat();\n"
-      "cat.setMate(mate);\n"
-      "\n"
-      "// later, in a new session\n"
-      "secondSession.saveOrUpdate(cat);   // update existing state (cat has a non-null id)\n"
-      "secondSession.saveOrUpdate(mate);  // save the new instance (mate has a null id)]]>"
+"<![CDATA[// in the first session\n"
+"Cat cat = (Cat) firstSession.load(Cat.class, catID);\n"
+"\n"
+"// in a higher tier of the application\n"
+"Cat mate = new Cat();\n"
+"cat.setMate(mate);\n"
+"\n"
+"// later, in a new session\n"
+"secondSession.saveOrUpdate(cat);   // update existing state (cat has a non-"
+"null id)\n"
+"secondSession.saveOrUpdate(mate);  // save the new instance (mate has a null "
+"id)]]>"
 msgstr ""
 
-#: index.docbook:592
-msgid "The usage and semantics of <literal>saveOrUpdate()</literal> seems to be confusing for new users. Firstly, so long as you are not trying to use instances from one session in another new session, you should not need to use <literal>update()</literal>, <literal>saveOrUpdate()</literal>, or <literal>merge()</literal>. Some whole applications will never use either of these methods."
+#. Tag: para
+#: session_api.xml:592
+#, no-c-format
+msgid ""
+"The usage and semantics of <literal>saveOrUpdate()</literal> seems to be "
+"confusing for new users. Firstly, so long as you are not trying to use "
+"instances from one session in another new session, you should not need to "
+"use <literal>update()</literal>, <literal>saveOrUpdate()</literal>, or "
+"<literal>merge()</literal>. Some whole applications will never use either of "
+"these methods."
 msgstr ""
+"<literal>saveOrUpdate()</literal>用途和语义可能会使新用户感到迷惑。 首先,只"
+"要你没有尝试在某个session中使用来自另一session的实例,你就应该不需要使用"
+"<literal>update()</literal>, <literal>saveOrUpdate()</literal>,或"
+"<literal>merge()</literal>。有些程序从来不用这些方法。"
 
-#: index.docbook:600
-msgid "Usually <literal>update()</literal> or <literal>saveOrUpdate()</literal> are used in the following scenario:"
+#. Tag: para
+#: session_api.xml:600
+#, no-c-format
+msgid ""
+"Usually <literal>update()</literal> or <literal>saveOrUpdate()</literal> are "
+"used in the following scenario:"
 msgstr ""
+"通常下面的场景会使用<literal>update()</literal>或<literal>saveOrUpdate()</"
+"literal>:"
 
-#: index.docbook:607
+#. Tag: para
+#: session_api.xml:607
+#, no-c-format
 msgid "the application loads an object in the first session"
-msgstr ""
+msgstr "程序在第一个session中加载对象"
 
-#: index.docbook:612
+#. Tag: para
+#: session_api.xml:612
+#, no-c-format
 msgid "the object is passed up to the UI tier"
-msgstr ""
+msgstr "该对象被传递到表现层"
 
-#: index.docbook:617
+#. Tag: para
+#: session_api.xml:617
+#, no-c-format
 msgid "some modifications are made to the object"
-msgstr ""
+msgstr "对象发生了一些改动"
 
-#: index.docbook:622
+#. Tag: para
+#: session_api.xml:622
+#, no-c-format
 msgid "the object is passed back down to the business logic tier"
-msgstr ""
+msgstr "该对象被返回到业务逻辑层"
 
-#: index.docbook:627
-msgid "the application persists these modifications by calling <literal>update()</literal> in a second session"
-msgstr ""
+#. Tag: para
+#: session_api.xml:627
+#, no-c-format
+msgid ""
+"the application persists these modifications by calling <literal>update()</"
+"literal> in a second session"
+msgstr "程序调用第二个session的<literal>update()</literal>方法持久这些改动"
 
-#: index.docbook:634
+#. Tag: para
+#: session_api.xml:634
+#, no-c-format
 msgid "<literal>saveOrUpdate()</literal> does the following:"
-msgstr ""
+msgstr "<literal>saveOrUpdate()</literal>做下面的事:"
 
-#: index.docbook:640
+#. Tag: para
+#: session_api.xml:640
+#, no-c-format
 msgid "if the object is already persistent in this session, do nothing"
-msgstr ""
+msgstr "如果对象已经在本session中持久化了,不做任何事"
 
-#: index.docbook:645
-msgid "if another object associated with the session has the same identifier, throw an exception"
+#. Tag: para
+#: session_api.xml:645
+#, no-c-format
+msgid ""
+"if another object associated with the session has the same identifier, throw "
+"an exception"
 msgstr ""
+"如果另一个与本session关联的对象拥有相同的持久化标识(identifier),抛出一个异常"
 
-#: index.docbook:651
+#. Tag: para
+#: session_api.xml:651
+#, no-c-format
 msgid "if the object has no identifier property, <literal>save()</literal> it"
 msgstr ""
+"如果对象没有持久化标识(identifier)属性,对其调用<literal>save()</literal>"
 
-#: index.docbook:656
-msgid "if the object's identifier has the value assigned to a newly instantiated object, <literal>save()</literal> it"
+#. Tag: para
+#: session_api.xml:656
+#, no-c-format
+msgid ""
+"if the object's identifier has the value assigned to a newly instantiated "
+"object, <literal>save()</literal> it"
 msgstr ""
+"如果对象的持久标识(identifier)表明其是一个新实例化的对象,对其调用"
+"<literal>save()</literal>"
 
-#: index.docbook:662
-msgid "if the object is versioned (by a <literal>&lt;version&gt;</literal> or <literal>&lt;timestamp&gt;</literal>), and the version property value is the same value assigned to a newly instantiated object, <literal>save()</literal> it"
+#. Tag: para
+#: session_api.xml:662
+#, no-c-format
+msgid ""
+"if the object is versioned (by a <literal>&lt;version&gt;</literal> or "
+"<literal>&lt;timestamp&gt;</literal>), and the version property value is the "
+"same value assigned to a newly instantiated object, <literal>save()</"
+"literal> it"
 msgstr ""
+"如果对象是附带版本信息的(通过<literal>&lt;version&gt;</literal>或"
+"<literal>&lt;timestamp&gt;</literal>) 并且版本属性的值表明其是一个新实例化的"
+"对象,<literal>save()</literal>它。"
 
-#: index.docbook:670
+#. Tag: para
+#: session_api.xml:670
+#, no-c-format
 msgid "otherwise <literal>update()</literal> the object"
-msgstr ""
+msgstr "否则<literal>update()</literal> 这个对象"
 
-#: index.docbook:676
+#. Tag: para
+#: session_api.xml:676
+#, no-c-format
 msgid "and <literal>merge()</literal> is very different:"
-msgstr ""
+msgstr "<literal>merge()</literal>可非常不同:"
 
-#: index.docbook:682
-msgid "if there is a persistent instance with the same identifier currently associated with the session, copy the state of the given object onto the persistent instance"
+#. Tag: para
+#: session_api.xml:682
+#, no-c-format
+msgid ""
+"if there is a persistent instance with the same identifier currently "
+"associated with the session, copy the state of the given object onto the "
+"persistent instance"
 msgstr ""
+"如果session中存在相同持久化标识(identifier)的实例,用用户给出的对象的状态覆盖"
+"旧有的持久实例"
 
-#: index.docbook:689
-msgid "if there is no persistent instance currently associated with the session, try to load it from the database, or create a new persistent instance"
+#. Tag: para
+#: session_api.xml:689
+#, no-c-format
+msgid ""
+"if there is no persistent instance currently associated with the session, "
+"try to load it from the database, or create a new persistent instance"
 msgstr ""
+"如果session没有相应的持久实例,则尝试从数据库中加载,或创建新的持久化实例"
 
-#: index.docbook:695
+#. Tag: para
+#: session_api.xml:695
+#, no-c-format
 msgid "the persistent instance is returned"
-msgstr ""
+msgstr "最后返回该持久实例"
 
-#: index.docbook:700
-msgid "the given instance does not become associated with the session, it remains detached"
-msgstr ""
+#. Tag: para
+#: session_api.xml:700
+#, no-c-format
+msgid ""
+"the given instance does not become associated with the session, it remains "
+"detached"
+msgstr "用户给出的这个对象没有被关联到session上,它依旧是脱管的"
 
-#: index.docbook:710
+#. Tag: title
+#: session_api.xml:710
+#, no-c-format
 msgid "Deleting persistent objects"
-msgstr ""
+msgstr "删除持久对象"
 
-#: index.docbook:712
-msgid "<literal>Session.delete()</literal> will remove an object's state from the database. Of course, your application might still hold a reference to a deleted object. It's best to think of <literal>delete()</literal> as making a persistent instance transient."
+#. Tag: para
+#: session_api.xml:712
+#, no-c-format
+msgid ""
+"<literal>Session.delete()</literal> will remove an object's state from the "
+"database. Of course, your application might still hold a reference to a "
+"deleted object. It's best to think of <literal>delete()</literal> as making "
+"a persistent instance transient."
 msgstr ""
+"使用<literal>Session.delete()</literal>会把对象的状态从数据库中移除。 当然,"
+"你的应用程序可能仍然持有一个指向已删除对象的引用。所以,最好这样理解:"
+"<literal>delete()</literal>的用途是把一个持久实例变成瞬时(transient)实例。"
 
-#: index.docbook:719
+#. Tag: programlisting
+#: session_api.xml:719
+#, no-c-format
 msgid "<![CDATA[sess.delete(cat);]]>"
 msgstr ""
 
-#: index.docbook:721
-msgid "You may delete objects in any order you like, without risk of foreign key constraint violations. It is still possible to violate a <literal>NOT NULL</literal> constraint on a foreign key column by deleting objects in the wrong order, e.g. if you delete the parent, but forget to delete the children."
+#. Tag: para
+#: session_api.xml:721
+#, no-c-format
+msgid ""
+"You may delete objects in any order you like, without risk of foreign key "
+"constraint violations. It is still possible to violate a <literal>NOT NULL</"
+"literal> constraint on a foreign key column by deleting objects in the wrong "
+"order, e.g. if you delete the parent, but forget to delete the children."
 msgstr ""
+"你可以用你喜欢的任何顺序删除对象,不用担心外键约束冲突。当然,如果你搞错了顺"
+"序,还是有可能引发在外键字段定义的<literal>NOT NULL</literal>约束冲突。 例如"
+"你删除了父对象,但是忘记删除孩子们。"
 
-#: index.docbook:732
+#. Tag: title
+#: session_api.xml:732
+#, no-c-format
 msgid "Replicating object between two different datastores"
-msgstr ""
+msgstr "在两个不同数据库间复制对象"
 
-#: index.docbook:734
-msgid "It is occasionally useful to be able to take a graph of persistent instances and make them persistent in a different datastore, without regenerating identifier values."
+#. Tag: para
+#: session_api.xml:734
+#, no-c-format
+msgid ""
+"It is occasionally useful to be able to take a graph of persistent instances "
+"and make them persistent in a different datastore, without regenerating "
+"identifier values."
 msgstr ""
+"偶尔会用到不重新生成持久化标识(identifier),将持久实例以及其关联的实例持久到"
+"不同的数据库中的操作。"
 
-#: index.docbook:740
+#. Tag: programlisting
+#: session_api.xml:740
+#, no-c-format
 msgid ""
-      "<![CDATA[//retrieve a cat from one database\n"
-      "Session session1 = factory1.openSession();\n"
-      "Transaction tx1 = session1.beginTransaction();\n"
-      "Cat cat = session1.get(Cat.class, catId);\n"
-      "tx1.commit();\n"
-      "session1.close();\n"
-      "\n"
-      "//reconcile with a second database\n"
-      "Session session2 = factory2.openSession();\n"
-      "Transaction tx2 = session2.beginTransaction();\n"
-      "session2.replicate(cat, ReplicationMode.LATEST_VERSION);\n"
-      "tx2.commit();\n"
-      "session2.close();]]>"
+"<![CDATA[//retrieve a cat from one database\n"
+"Session session1 = factory1.openSession();\n"
+"Transaction tx1 = session1.beginTransaction();\n"
+"Cat cat = session1.get(Cat.class, catId);\n"
+"tx1.commit();\n"
+"session1.close();\n"
+"\n"
+"//reconcile with a second database\n"
+"Session session2 = factory2.openSession();\n"
+"Transaction tx2 = session2.beginTransaction();\n"
+"session2.replicate(cat, ReplicationMode.LATEST_VERSION);\n"
+"tx2.commit();\n"
+"session2.close();]]>"
 msgstr ""
 
-#: index.docbook:742
-msgid "The <literal>ReplicationMode</literal> determines how <literal>replicate()</literal> will deal with conflicts with existing rows in the database."
+#. Tag: para
+#: session_api.xml:742
+#, no-c-format
+msgid ""
+"The <literal>ReplicationMode</literal> determines how <literal>replicate()</"
+"literal> will deal with conflicts with existing rows in the database."
 msgstr ""
+"<literal>ReplicationMode</literal>决定在和数据库中已存在记录由冲突时,"
+"<literal>replicate()</literal>如何处理。"
 
-#: index.docbook:749
-msgid "<literal>ReplicationMode.IGNORE</literal> - ignore the object when there is an existing database row with the same identifier"
-msgstr ""
+#. Tag: para
+#: session_api.xml:749
+#, no-c-format
+msgid ""
+"<literal>ReplicationMode.IGNORE</literal> - ignore the object when there is "
+"an existing database row with the same identifier"
+msgstr "<literal>ReplicationMode.IGNORE</literal> - 忽略它"
 
-#: index.docbook:755
-msgid "<literal>ReplicationMode.OVERWRITE</literal> - overwrite any existing database row with the same identifier"
-msgstr ""
+#. Tag: para
+#: session_api.xml:755
+#, no-c-format
+msgid ""
+"<literal>ReplicationMode.OVERWRITE</literal> - overwrite any existing "
+"database row with the same identifier"
+msgstr "<literal>ReplicationMode.OVERWRITE</literal> - 覆盖相同的行"
 
-#: index.docbook:761
-msgid "<literal>ReplicationMode.EXCEPTION</literal> - throw an exception if there is an existing database row with the same identifier"
-msgstr ""
+#. Tag: para
+#: session_api.xml:761
+#, no-c-format
+msgid ""
+"<literal>ReplicationMode.EXCEPTION</literal> - throw an exception if there "
+"is an existing database row with the same identifier"
+msgstr "<literal>ReplicationMode.EXCEPTION</literal> - 抛出异常"
 
-#: index.docbook:767
-msgid "<literal>ReplicationMode.LATEST_VERSION</literal> - overwrite the row if its version number is earlier than the version number of the object, or ignore the object otherwise"
+#. Tag: para
+#: session_api.xml:767
+#, no-c-format
+msgid ""
+"<literal>ReplicationMode.LATEST_VERSION</literal> - overwrite the row if its "
+"version number is earlier than the version number of the object, or ignore "
+"the object otherwise"
 msgstr ""
+"<literal>ReplicationMode.LATEST_VERSION</literal> - 如果当前的版本较新,则覆"
+"盖,否则忽略"
 
-#: index.docbook:775
-msgid "Usecases for this feature include reconciling data entered into different database instances, upgrading system configuration information during product upgrades, rolling back changes made during non-ACID transactions and more."
+#. Tag: para
+#: session_api.xml:775
+#, no-c-format
+msgid ""
+"Usecases for this feature include reconciling data entered into different "
+"database instances, upgrading system configuration information during "
+"product upgrades, rolling back changes made during non-ACID transactions and "
+"more."
 msgstr ""
+"这个功能的用途包括使录入的数据在不同数据库中一致,产品升级时升级系统配置信"
+"息,回滚non-ACID事务中的修改等等。 (译注,non-ACID,非ACID;ACID,Atomic,"
+"Consistent,Isolated and Durable的缩写)"
 
-#: index.docbook:784
+#. Tag: title
+#: session_api.xml:784
+#, no-c-format
 msgid "Flushing the Session"
-msgstr ""
+msgstr "Session刷出(flush)"
 
-#: index.docbook:786
-msgid "From time to time the <literal>Session</literal> will execute the SQL statements needed to synchronize the JDBC connection's state with the state of objects held in memory. This process, <emphasis>flush</emphasis>, occurs by default at the following points"
+#. Tag: para
+#: session_api.xml:786
+#, no-c-format
+msgid ""
+"From time to time the <literal>Session</literal> will execute the SQL "
+"statements needed to synchronize the JDBC connection's state with the state "
+"of objects held in memory. This process, <emphasis>flush</emphasis>, occurs "
+"by default at the following points"
 msgstr ""
+"每间隔一段时间,<literal>Session</literal>会执行一些必需的SQL语句来把内存中的"
+"对象的状态同步到JDBC连接中。这个过程被称为<emphasis>刷出(flush)</emphasis>,"
+"默认会在下面的时间点执行:"
 
-#: index.docbook:795
+#. Tag: para
+#: session_api.xml:795
+#, no-c-format
 msgid "before some query executions"
-msgstr ""
+msgstr "在某些查询执行之前"
 
-#: index.docbook:800
+#. Tag: para
+#: session_api.xml:800
+#, no-c-format
 msgid "from <literal>org.hibernate.Transaction.commit()</literal>"
-msgstr ""
+msgstr "在调用<literal>org.hibernate.Transaction.commit()</literal>的时候"
 
-#: index.docbook:805
+#. Tag: para
+#: session_api.xml:805
+#, no-c-format
 msgid "from <literal>Session.flush()</literal>"
-msgstr ""
+msgstr "在调用<literal>Session.flush()</literal>的时候"
 
-#: index.docbook:811
+#. Tag: para
+#: session_api.xml:811
+#, no-c-format
 msgid "The SQL statements are issued in the following order"
-msgstr ""
+msgstr "涉及的SQL语句会按照下面的顺序发出执行:"
 
-#: index.docbook:817
-msgid "all entity insertions, in the same order the corresponding objects were saved using <literal>Session.save()</literal>"
+#. Tag: para
+#: session_api.xml:817
+#, no-c-format
+msgid ""
+"all entity insertions, in the same order the corresponding objects were "
+"saved using <literal>Session.save()</literal>"
 msgstr ""
+"所有对实体进行插入的语句,其顺序按照对象执行<literal>Session.save()</literal>"
+"的时间顺序"
 
-#: index.docbook:823
+#. Tag: para
+#: session_api.xml:823
+#, no-c-format
 msgid "all entity updates"
-msgstr ""
+msgstr "所有对实体进行更新的语句"
 
-#: index.docbook:828
+#. Tag: para
+#: session_api.xml:828
+#, no-c-format
 msgid "all collection deletions"
-msgstr ""
+msgstr "所有进行集合删除的语句"
 
-#: index.docbook:833
+#. Tag: para
+#: session_api.xml:833
+#, no-c-format
 msgid "all collection element deletions, updates and insertions"
-msgstr ""
+msgstr "所有对集合元素进行删除,更新或者插入的语句"
 
-#: index.docbook:838
+#. Tag: para
+#: session_api.xml:838
+#, no-c-format
 msgid "all collection insertions"
-msgstr ""
+msgstr "所有进行集合插入的语句"
 
-#: index.docbook:843
-msgid "all entity deletions, in the same order the corresponding objects were deleted using <literal>Session.delete()</literal>"
+#. Tag: para
+#: session_api.xml:843
+#, no-c-format
+msgid ""
+"all entity deletions, in the same order the corresponding objects were "
+"deleted using <literal>Session.delete()</literal>"
 msgstr ""
+"所有对实体进行删除的语句,其顺序按照对象执行<literal>Session.delete()</"
+"literal>的时间顺序"
 
-#: index.docbook:850
-msgid "(An exception is that objects using <literal>native</literal> ID generation are inserted when they are saved.)"
+#. Tag: para
+#: session_api.xml:850
+#, no-c-format
+msgid ""
+"(An exception is that objects using <literal>native</literal> ID generation "
+"are inserted when they are saved.)"
 msgstr ""
+"(有一个例外是,如果对象使用<literal>native</literal>方式来生成ID(持久化标"
+"识)的话,它们一执行save就会被插入。)"
 
-#: index.docbook:855
-msgid "Except when you explicity <literal>flush()</literal>, there are absolutely no guarantees about <emphasis>when</emphasis> the <literal>Session</literal> executes the JDBC calls, only the <emphasis>order</emphasis> in which they are executed. However, Hibernate does guarantee that the <literal>Query.list(..)</literal> will never return stale data; nor will they return the wrong data."
+#. Tag: para
+#: session_api.xml:855
+#, no-c-format
+msgid ""
+"Except when you explicity <literal>flush()</literal>, there are absolutely "
+"no guarantees about <emphasis>when</emphasis> the <literal>Session</literal> "
+"executes the JDBC calls, only the <emphasis>order</emphasis> in which they "
+"are executed. However, Hibernate does guarantee that the <literal>Query.list"
+"(..)</literal> will never return stale data; nor will they return the wrong "
+"data."
 msgstr ""
+"除非你明确地发出了<literal>flush()</literal>指令,关于Session<emphasis>何时</"
+"emphasis>会执行这些JDBC调用是完全无法保证的,只能保证它们执行的前后顺序。 当"
+"然,Hibernate保证,<literal>Query.list(..)</literal>绝对不会返回已经失效的数"
+"据,也不会返回错误数据。"
 
-#: index.docbook:863
-msgid "It is possible to change the default behavior so that flush occurs less frequently. The <literal>FlushMode</literal> class defines three different modes: only flush at commit time (and only when the Hibernate <literal>Transaction</literal> API is used), flush automatically using the explained routine, or never flush unless <literal>flush()</literal> is called explicitly. The last mode is useful for long running units of work, where a <literal>Session</literal> is kept open and disconnected for a long time (see <xref linkend=\"transactions-optimistic-longsession\"/>)."
+#. Tag: para
+#: session_api.xml:863
+#, no-c-format
+msgid ""
+"It is possible to change the default behavior so that flush occurs less "
+"frequently. The <literal>FlushMode</literal> class defines three different "
+"modes: only flush at commit time (and only when the Hibernate "
+"<literal>Transaction</literal> API is used), flush automatically using the "
+"explained routine, or never flush unless <literal>flush()</literal> is "
+"called explicitly. The last mode is useful for long running units of work, "
+"where a <literal>Session</literal> is kept open and disconnected for a long "
+"time (see <xref linkend=\"transactions-optimistic-longsession\"/>)."
 msgstr ""
+"也可以改变默认的设置,来让刷出(flush)操作发生的不那么频繁。 "
+"<literal>FlushMode</literal>类定义了三种不同的方式。 仅在提交时刷出(仅当"
+"Hibernate的<literal>Transaction</literal> API被使用时有效), 按照刚才说的方式"
+"刷出, 以及除非明确使用<literal>flush()</literal>否则从不刷出。 最后一种模式"
+"对于那些需要长时间保持<literal>Session</literal>为打开或者断线状态的长时间运"
+"行的工作单元很有用。 (参见 <xref linkend=\"transactions-optimistic-"
+"longsession\"/>)."
 
-#: index.docbook:873
+#. Tag: programlisting
+#: session_api.xml:873
+#, no-c-format
 msgid ""
-      "<![CDATA[sess = sf.openSession();\n"
-      "Transaction tx = sess.beginTransaction();\n"
-      "sess.setFlushMode(FlushMode.COMMIT); // allow queries to return stale state\n"
-      "\n"
-      "Cat izi = (Cat) sess.load(Cat.class, id);\n"
-      "izi.setName(iznizi);\n"
-      "\n"
-      "// might return stale data\n"
-      "sess.find(\"from Cat as cat left outer join cat.kittens kitten\");\n"
-      "\n"
-      "// change to izi is not flushed!\n"
-      "...\n"
-      "tx.commit(); // flush occurs\n"
-      "sess.close();]]>"
+"<![CDATA[sess = sf.openSession();\n"
+"Transaction tx = sess.beginTransaction();\n"
+"sess.setFlushMode(FlushMode.COMMIT); // allow queries to return stale state\n"
+"\n"
+"Cat izi = (Cat) sess.load(Cat.class, id);\n"
+"izi.setName(iznizi);\n"
+"\n"
+"// might return stale data\n"
+"sess.find(\"from Cat as cat left outer join cat.kittens kitten\");\n"
+"\n"
+"// change to izi is not flushed!\n"
+"...\n"
+"tx.commit(); // flush occurs\n"
+"sess.close();]]>"
 msgstr ""
 
-#: index.docbook:875
-msgid "During flush, an exception might occur (e.g. if a DML operation violates a constraint). Since handling exceptions involves some understanding of Hibernate's transactional behavior, we discuss it in <xref linkend=\"transactions\"/>."
+#. Tag: para
+#: session_api.xml:875
+#, no-c-format
+msgid ""
+"During flush, an exception might occur (e.g. if a DML operation violates a "
+"constraint). Since handling exceptions involves some understanding of "
+"Hibernate's transactional behavior, we discuss it in <xref linkend="
+"\"transactions\"/>."
 msgstr ""
+"刷出(flush)期间,可能会抛出异常。(例如一个DML操作违反了约束) 异常处理涉及到"
+"对Hibernate事务性行为的理解,因此我们将在<xref linkend=\"transactions\"/>中讨"
+"论。"
 
-#: index.docbook:884
+#. Tag: title
+#: session_api.xml:884
+#, no-c-format
 msgid "Transitive persistence"
-msgstr ""
+msgstr "传播性持久化(transitive persistence)"
 
-#: index.docbook:886
-msgid "It is quite cumbersome to save, delete, or reattach individual objects, especially if you deal with a graph of associated objects. A common case is a parent/child relationship. Consider the following example:"
+#. Tag: para
+#: session_api.xml:886
+#, no-c-format
+msgid ""
+"It is quite cumbersome to save, delete, or reattach individual objects, "
+"especially if you deal with a graph of associated objects. A common case is "
+"a parent/child relationship. Consider the following example:"
 msgstr ""
+"对每一个对象都要执行保存,删除或重关联操作让人感觉有点麻烦,尤其是在处理许多"
+"彼此关联的对象的时候。 一个常见的例子是父子关系。考虑下面的例子:"
 
-#: index.docbook:892
-msgid "If the children in a parent/child relationship would be value typed (e.g. a collection of addresses or strings), their life cycle would depend on the parent and no further action would be required for convenient \"cascading\" of state changes. When the parent is saved, the value-typed child objects are saved as well, when the parent is deleted, the children will be deleted, etc. This even works for operations such as the removal of a child from the collection; Hibernate will detect this and, since value-typed objects can't have shared references, delete the child from the database."
+#. Tag: para
+#: session_api.xml:892
+#, no-c-format
+msgid ""
+"If the children in a parent/child relationship would be value typed (e.g. a "
+"collection of addresses or strings), their life cycle would depend on the "
+"parent and no further action would be required for convenient \"cascading\" "
+"of state changes. When the parent is saved, the value-typed child objects "
+"are saved as well, when the parent is deleted, the children will be deleted, "
+"etc. This even works for operations such as the removal of a child from the "
+"collection; Hibernate will detect this and, since value-typed objects can't "
+"have shared references, delete the child from the database."
 msgstr ""
+"如果一个父子关系中的子对象是值类型(value typed)(例如,地址或字符串的集合)"
+"的,他们的生命周期会依赖于父对象,可以享受方便的级联操作(Cascading),不需要额"
+"外的动作。 父对象被保存时,这些值类型(value typed)子对象也将被保存;父对象被"
+"删除时,子对象也将被删除。 这对将一个子对象从集合中移除是同样有效:Hibernate"
+"会检测到,并且因为值类型(value typed)的对象不可能被其他对象引用,所以"
+"Hibernate会在数据库中删除这个子对象。"
 
-#: index.docbook:903
-msgid "Now consider the same scenario with parent and child objects being entities, not value-types (e.g. categories and items, or parent and child cats). Entities have their own life cycle, support shared references (so removing an entity from the collection does not mean it can be deleted), and there is by default no cascading of state from one entity to any other associated entities. Hibernate does not implement <emphasis>persistence by reachability</emphasis> by default."
+#. Tag: para
+#: session_api.xml:903
+#, no-c-format
+msgid ""
+"Now consider the same scenario with parent and child objects being entities, "
+"not value-types (e.g. categories and items, or parent and child cats). "
+"Entities have their own life cycle, support shared references (so removing "
+"an entity from the collection does not mean it can be deleted), and there is "
+"by default no cascading of state from one entity to any other associated "
+"entities. Hibernate does not implement <emphasis>persistence by "
+"reachability</emphasis> by default."
 msgstr ""
+"现在考虑同样的场景,不过父子对象都是实体(entities)类型,而非值类型(value "
+"typed)(例如,类别与个体,或母猫和小猫)。 实体有自己的生命期,允许共享对其的"
+"引用(因此从集合中移除一个实体,不意味着它可以被删除), 并且实体到其他关联实"
+"体之间默认没有级联操作的设置。 Hibernate默认不实现所谓的<emphasis>可到达即持"
+"久化(persistence by reachability)</emphasis>的策略。"
 
-#: index.docbook:912
-msgid "For each basic operation of the Hibernate session - including <literal>persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), evict(), replicate()</literal> - there is a corresponding cascade style. Respectively, the cascade styles are named <literal>create, merge, save-update, delete, lock, refresh, evict, replicate</literal>. If you want an operation to be cascaded along an association, you must indicate that in the mapping document. For example:"
+#. Tag: para
+#: session_api.xml:912
+#, no-c-format
+msgid ""
+"For each basic operation of the Hibernate session - including "
+"<literal>persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), "
+"evict(), replicate()</literal> - there is a corresponding cascade style. "
+"Respectively, the cascade styles are named <literal>create, merge, save-"
+"update, delete, lock, refresh, evict, replicate</literal>. If you want an "
+"operation to be cascaded along an association, you must indicate that in the "
+"mapping document. For example:"
 msgstr ""
+"每个Hibernate session的基本操作 - 包括 <literal>persist(), merge(), "
+"saveOrUpdate(), delete(), lock(), refresh(), evict(), replicate()</literal> "
+"- 都有对应的级联风格(cascade style)。 这些级联风格(cascade style)风格分别命名"
+"为 <literal>create, merge, save-update, delete, lock, refresh, evict, "
+"replicate</literal>。 如果你希望一个操作被顺着关联关系级联传播,你必须在映射"
+"文件中指出这一点。例如:"
 
-#: index.docbook:921
+#. Tag: programlisting
+#: session_api.xml:921
+#, no-c-format
 msgid "<![CDATA[<one-to-one name=\"person\" cascade=\"persist\"/>]]>"
 msgstr ""
 
-#: index.docbook:923
+#. Tag: para
+#: session_api.xml:923
+#, no-c-format
 msgid "Cascade styles my be combined:"
-msgstr ""
+msgstr "级联风格(cascade style)是可组合的:"
 
-#: index.docbook:927
-msgid "<![CDATA[<one-to-one name=\"person\" cascade=\"persist,delete,lock\"/>]]>"
+#. Tag: programlisting
+#: session_api.xml:927
+#, no-c-format
+msgid ""
+"<![CDATA[<one-to-one name=\"person\" cascade=\"persist,delete,lock\"/>]]>"
 msgstr ""
 
-#: index.docbook:929
-msgid "You may even use <literal>cascade=\"all\"</literal> to specify that <emphasis>all</emphasis> operations should be cascaded along the association. The default <literal>cascade=\"none\"</literal> specifies that no operations are to be cascaded."
+#. Tag: para
+#: session_api.xml:929
+#, no-c-format
+msgid ""
+"You may even use <literal>cascade=\"all\"</literal> to specify that "
+"<emphasis>all</emphasis> operations should be cascaded along the "
+"association. The default <literal>cascade=\"none\"</literal> specifies that "
+"no operations are to be cascaded."
 msgstr ""
+"你可以使用<literal>cascade=\"all\"</literal>来指定<emphasis>全部</emphasis>操"
+"作都顺着关联关系级联(cascaded)。 默认值是<literal>cascade=\"none\"</"
+"literal>,即任何操作都不会被级联(cascaded)。"
 
-#: index.docbook:935
-msgid "A special cascade style, <literal>delete-orphan</literal>, applies only to one-to-many associations, and indicates that the <literal>delete()</literal> operation should be applied to any child object that is removed from the association."
+#. Tag: para
+#: session_api.xml:935
+#, no-c-format
+msgid ""
+"A special cascade style, <literal>delete-orphan</literal>, applies only to "
+"one-to-many associations, and indicates that the <literal>delete()</literal> "
+"operation should be applied to any child object that is removed from the "
+"association."
 msgstr ""
+"注意有一个特殊的级联风格(cascade style) <literal>delete-orphan</literal>,只"
+"应用于one-to-many关联,表明<literal>delete()</literal>操作 应该被应用于所有从"
+"关联中删除的对象。"
 
-#: index.docbook:942
+#. Tag: para
+#: session_api.xml:942
+#, no-c-format
 msgid "Recommendations:"
-msgstr ""
+msgstr "建议:"
 
-#: index.docbook:948
-msgid "It doesn't usually make sense to enable cascade on a <literal>&lt;many-to-one&gt;</literal> or <literal>&lt;many-to-many&gt;</literal> association. Cascade is often useful for <literal>&lt;one-to-one&gt;</literal> and <literal>&lt;one-to-many&gt;</literal> associations."
+#. Tag: para
+#: session_api.xml:948
+#, no-c-format
+msgid ""
+"It doesn't usually make sense to enable cascade on a <literal>&lt;many-to-"
+"one&gt;</literal> or <literal>&lt;many-to-many&gt;</literal> association. "
+"Cascade is often useful for <literal>&lt;one-to-one&gt;</literal> and "
+"<literal>&lt;one-to-many&gt;</literal> associations."
 msgstr ""
+"通常在<literal>&lt;many-to-one&gt;</literal>或<literal>&lt;many-to-many&gt;</"
+"literal>关系中应用级联(cascade)没什么意义。 级联(cascade)通常在 <literal>&lt;"
+"one-to-one&gt;</literal>和<literal>&lt;one-to-many&gt;</literal>关系中比较有"
+"用。"
 
-#: index.docbook:956
-msgid "If the child object's lifespan is bounded by the lifespan of the parent object, make it a <emphasis>life cycle object</emphasis> by specifying <literal>cascade=\"all,delete-orphan\"</literal>."
+#. Tag: para
+#: session_api.xml:956
+#, no-c-format
+msgid ""
+"If the child object's lifespan is bounded by the lifespan of the parent "
+"object, make it a <emphasis>life cycle object</emphasis> by specifying "
+"<literal>cascade=\"all,delete-orphan\"</literal>."
 msgstr ""
+"如果子对象的寿命限定在父亲对象的寿命之内,可通过指定<literal>cascade=\"all,"
+"delete-orphan\"</literal>将其变为<emphasis>自动生命周期管理的对象(life cycle "
+"object)</emphasis>。"
 
-#: index.docbook:963
-msgid "Otherwise, you might not need cascade at all. But if you think that you will often be working with the parent and children together in the same transaction, and you want to save yourself some typing, consider using <literal>cascade=\"persist,merge,save-update\"</literal>."
+#. Tag: para
+#: session_api.xml:963
+#, no-c-format
+msgid ""
+"Otherwise, you might not need cascade at all. But if you think that you will "
+"often be working with the parent and children together in the same "
+"transaction, and you want to save yourself some typing, consider using "
+"<literal>cascade=\"persist,merge,save-update\"</literal>."
 msgstr ""
+"其他情况,你可根本不需要级联(cascade)。但是如果你认为你会经常在某个事务中同时"
+"用到父对象与子对象,并且你希望少打点儿字,可以考虑使用<literal>cascade="
+"\"persist,merge,save-update\"</literal>。"
 
-#: index.docbook:971
-msgid "Mapping an association (either a single valued association, or a collection) with <literal>cascade=\"all\"</literal> marks the association as a <emphasis>parent/child</emphasis> style relationship where save/update/delete of the parent results in save/update/delete of the child or children."
+#. Tag: para
+#: session_api.xml:971
+#, no-c-format
+msgid ""
+"Mapping an association (either a single valued association, or a collection) "
+"with <literal>cascade=\"all\"</literal> marks the association as a "
+"<emphasis>parent/child</emphasis> style relationship where save/update/"
+"delete of the parent results in save/update/delete of the child or children."
 msgstr ""
+"可以使用<literal>cascade=\"all\"</literal>将一个关联关系(无论是对值对象的关"
+"联,或者对一个集合的关联)标记为<emphasis>父/子</emphasis>关系的关联。 这样对"
+"父对象进行save/update/delete操作就会导致子对象也进行save/update/delete操作。"
 
-#: index.docbook:977
-msgid "Futhermore, a mere reference to a child from a persistent parent will result in save/update of the child. This metaphor is incomplete, however. A child which becomes unreferenced by its parent is <emphasis>not</emphasis> automatically deleted, except in the case of a <literal>&lt;one-to-many&gt;</literal> association mapped with <literal>cascade=\"delete-orphan\"</literal>. The precise semantics of cascading operations for a parent/child relationship are as follows:"
+#. Tag: para
+#: session_api.xml:977
+#, no-c-format
+msgid ""
+"Futhermore, a mere reference to a child from a persistent parent will result "
+"in save/update of the child. This metaphor is incomplete, however. A child "
+"which becomes unreferenced by its parent is <emphasis>not</emphasis> "
+"automatically deleted, except in the case of a <literal>&lt;one-to-many&gt;</"
+"literal> association mapped with <literal>cascade=\"delete-orphan\"</"
+"literal>. The precise semantics of cascading operations for a parent/child "
+"relationship are as follows:"
 msgstr ""
+"此外,一个持久的父对象对子对象的浅引用(mere reference)会导致子对象被同步save/"
+"update。 不过,这个隐喻(metaphor)的说法并不完整。除非关联是<literal>&lt;one-"
+"to-many&gt;</literal>关联并且被标记为<literal>cascade=\"delete-orphan\"</"
+"literal>, 否则父对象失去对某个子对象的引用<emphasis>不会</emphasis>导致该子"
+"对象被自动删除。 父子关系的级联(cascading)操作准确语义如下:"
 
-#: index.docbook:988
-msgid "If a parent is passed to <literal>persist()</literal>, all children are passed to <literal>persist()</literal>"
+#. Tag: para
+#: session_api.xml:988
+#, no-c-format
+msgid ""
+"If a parent is passed to <literal>persist()</literal>, all children are "
+"passed to <literal>persist()</literal>"
 msgstr ""
+"如果父对象被<literal>persist()</literal>,那么所有子对象也会被"
+"<literal>persist()</literal>"
 
-#: index.docbook:994
-msgid "If a parent is passed to <literal>merge()</literal>, all children are passed to <literal>merge()</literal>"
+#. Tag: para
+#: session_api.xml:994
+#, no-c-format
+msgid ""
+"If a parent is passed to <literal>merge()</literal>, all children are passed "
+"to <literal>merge()</literal>"
 msgstr ""
+"如果父对象被<literal>merge()</literal>,那么所有子对象也会被<literal>merge()"
+"</literal>"
 
-#: index.docbook:1000
-msgid "If a parent is passed to <literal>save()</literal>, <literal>update()</literal> or <literal>saveOrUpdate()</literal>, all children are passed to <literal>saveOrUpdate()</literal>"
+#. Tag: para
+#: session_api.xml:1000
+#, no-c-format
+msgid ""
+"If a parent is passed to <literal>save()</literal>, <literal>update()</"
+"literal> or <literal>saveOrUpdate()</literal>, all children are passed to "
+"<literal>saveOrUpdate()</literal>"
 msgstr ""
+"如果父对象被<literal>save()</literal>,<literal>update()</literal>或 "
+"<literal>saveOrUpdate()</literal>,那么所有子对象则会被<literal>saveOrUpdate"
+"()</literal>"
 
-#: index.docbook:1006
-msgid "If a transient or detached child becomes referenced by a persistent parent, it is passed to <literal>saveOrUpdate()</literal>"
+#. Tag: para
+#: session_api.xml:1006
+#, no-c-format
+msgid ""
+"If a transient or detached child becomes referenced by a persistent parent, "
+"it is passed to <literal>saveOrUpdate()</literal>"
 msgstr ""
+"如果某个持久的父对象引用了瞬时(transient)或者脱管(detached)的子对象,那么子对"
+"象将会被<literal>saveOrUpdate()</literal>"
 
-#: index.docbook:1012
-msgid "If a parent is deleted, all children are passed to <literal>delete()</literal>"
-msgstr ""
+#. Tag: para
+#: session_api.xml:1012
+#, no-c-format
+msgid ""
+"If a parent is deleted, all children are passed to <literal>delete()</"
+"literal>"
+msgstr "如果父对象被删除,那么所有子对象也会被<literal>delete()</literal>"
 
-#: index.docbook:1017
-msgid "If a child is dereferenced by a persistent parent, <emphasis>nothing special happens</emphasis> - the application should explicitly delete the child if necessary - unless <literal>cascade=\"delete-orphan\"</literal>, in which case the \"orphaned\" child is deleted."
+#. Tag: para
+#: session_api.xml:1017
+#, no-c-format
+msgid ""
+"If a child is dereferenced by a persistent parent, <emphasis>nothing special "
+"happens</emphasis> - the application should explicitly delete the child if "
+"necessary - unless <literal>cascade=\"delete-orphan\"</literal>, in which "
+"case the \"orphaned\" child is deleted."
 msgstr ""
+"除非被标记为<literal>cascade=\"delete-orphan\"</literal>(删除“孤儿”模式,此"
+"时不被任何一个父对象引用的子对象会被删除), 否则子对象失掉父对象对其的引用"
+"时,<emphasis>什么事也不会发生</emphasis>。 如果有特殊需要,应用程序可通过显"
+"式调用delete()删除子对象。"
 
-#: index.docbook:1026
-msgid "Finally, note that cascading of operations can be applied to an object graph at <emphasis>call time</emphasis> or at <emphasis>flush time</emphasis>. All operations, if enabled, are cascaded to associated entities reachable when the operation is executed. However, <literal>save-upate</literal> and <literal>delete-orphan</literal> are transitive for all associated entities reachable during flush of the <literal>Session</literal>."
+#. Tag: para
+#: session_api.xml:1026
+#, no-c-format
+msgid ""
+"Finally, note that cascading of operations can be applied to an object graph "
+"at <emphasis>call time</emphasis> or at <emphasis>flush time</emphasis>. All "
+"operations, if enabled, are cascaded to associated entities reachable when "
+"the operation is executed. However, <literal>save-upate</literal> and "
+"<literal>delete-orphan</literal> are transitive for all associated entities "
+"reachable during flush of the <literal>Session</literal>."
 msgstr ""
+"最后,注意操作的级联可能是在<emphasis>调用期(call time)</emphasis>或者"
+"<emphasis>写入期(flush time)</emphasis>作用到对象图上的。所有的操作,如果允"
+"许,都在操作被执行的时候级联到可触及的关联实体上。然而,<literal>save-upate</"
+"literal>和<literal>delete-orphan</literal>是在<literal>Session</literal> "
+"flush的时候才作用到所有可触及的被关联对象上的。"
 
-#: index.docbook:1038
+#. Tag: title
+#: session_api.xml:1038
+#, no-c-format
 msgid "Using metadata"
-msgstr ""
+msgstr "使用元数据"
 
-#: index.docbook:1040
-msgid "Hibernate requires a very rich meta-level model of all entity and value types. From time to time, this model is very useful to the application itself. For example, the application might use Hibernate's metadata to implement a \"smart\" deep-copy algorithm that understands which objects should be copied (eg. mutable value types) and which should not (eg. immutable value types and, possibly, associated entities)."
+#. Tag: para
+#: session_api.xml:1040
+#, no-c-format
+msgid ""
+"Hibernate requires a very rich meta-level model of all entity and value "
+"types. From time to time, this model is very useful to the application "
+"itself. For example, the application might use Hibernate's metadata to "
+"implement a \"smart\" deep-copy algorithm that understands which objects "
+"should be copied (eg. mutable value types) and which should not (eg. "
+"immutable value types and, possibly, associated entities)."
 msgstr ""
+"Hibernate中有一个非常丰富的元级别(meta-level)的模型,含有所有的实体和值类型数"
+"据的元数据。 有时这个模型对应用程序本身也会非常有用。 比如说,应用程序可能在"
+"实现一种“智能”的深度拷贝算法时, 通过使用Hibernate的元数据来了解哪些对象应该"
+"被拷贝(比如,可变的值类型数据), 那些不应该(不可变的值类型数据,也许还有某"
+"些被关联的实体)。"
 
-#: index.docbook:1047
-msgid "Hibernate exposes metadata via the <literal>ClassMetadata</literal> and <literal>CollectionMetadata</literal> interfaces and the <literal>Type</literal> hierarchy. Instances of the metadata interfaces may be obtained from the <literal>SessionFactory</literal>."
+#. Tag: para
+#: session_api.xml:1047
+#, no-c-format
+msgid ""
+"Hibernate exposes metadata via the <literal>ClassMetadata</literal> and "
+"<literal>CollectionMetadata</literal> interfaces and the <literal>Type</"
+"literal> hierarchy. Instances of the metadata interfaces may be obtained "
+"from the <literal>SessionFactory</literal>."
 msgstr ""
+"Hibernate提供了<literal>ClassMetadata</literal>接口,"
+"<literal>CollectionMetadata</literal>接口和<literal>Type</literal>层次体系来"
+"访问元数据。 可以通过<literal>SessionFactory</literal>获取元数据接口的实例。"
 
-#: index.docbook:1054
+#. Tag: programlisting
+#: session_api.xml:1054
+#, no-c-format
 msgid ""
-      "<![CDATA[Cat fritz = ......;\n"
-      "ClassMetadata catMeta = sessionfactory.getClassMetadata(Cat.class);\n"
-      "\n"
-      "Object[] propertyValues = catMeta.getPropertyValues(fritz);\n"
-      "String[] propertyNames = catMeta.getPropertyNames();\n"
-      "Type[] propertyTypes = catMeta.getPropertyTypes();\n"
-      "\n"
-      "// get a Map of all properties which are not collections or associations\n"
-      "Map namedValues = new HashMap();\n"
-      "for ( int i=0; i<propertyNames.length; i++ ) {\n"
-      "    if ( !propertyTypes[i].isEntityType() && !propertyTypes[i].isCollectionType() ) {\n"
-      "        namedValues.put( propertyNames[i], propertyValues[i] );\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[Cat fritz = ......;\n"
+"ClassMetadata catMeta = sessionfactory.getClassMetadata(Cat.class);\n"
+"\n"
+"Object[] propertyValues = catMeta.getPropertyValues(fritz);\n"
+"String[] propertyNames = catMeta.getPropertyNames();\n"
+"Type[] propertyTypes = catMeta.getPropertyTypes();\n"
+"\n"
+"// get a Map of all properties which are not collections or associations\n"
+"Map namedValues = new HashMap();\n"
+"for ( int i=0; i<propertyNames.length; i++ ) {\n"
+"    if ( !propertyTypes[i].isEntityType() && !propertyTypes[i]."
+"isCollectionType() ) {\n"
+"        namedValues.put( propertyNames[i], propertyValues[i] );\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
+#~ msgid "UPDATE"
+#~ msgstr "UPDATE"
 
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
+#~ msgid "DELETE"
+#~ msgstr "DELETE"
 
+#~ msgid "state management"
+#~ msgstr "状态管理(state management)"
+
+#~ msgid "statements"
+#~ msgstr "语句(statements)"
+
+#~ msgid "Connection"
+#~ msgstr "session.connection()"
+
+#~ msgid "session.connection()"
+#~ msgstr "Connection"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/toolset_guide.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/toolset_guide.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/toolset_guide.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,744 +1,1183 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: toolset_guide.xml:5
+#, no-c-format
 msgid "Toolset Guide"
 msgstr "工具箱指南"
 
-#: index.docbook:7
-msgid "Roundtrip engineering with Hibernate is possible using a set of Eclipse plugins, commandline tools, as well as Ant tasks."
-msgstr "可以通过一系列Eclipse插件、命令行工具和Ant任务来进行与Hibernate关联的转换。"
+#. Tag: para
+#: toolset_guide.xml:7
+#, no-c-format
+msgid ""
+"Roundtrip engineering with Hibernate is possible using a set of Eclipse "
+"plugins, commandline tools, as well as Ant tasks."
+msgstr ""
+"可以通过一系列Eclipse插件、命令行工具和Ant任务来进行与Hibernate关联的转换。"
 
-#: index.docbook:12
-msgid "The <emphasis>Hibernate Tools</emphasis> currently include plugins for the Eclipse IDE as well as Ant tasks for reverse engineering of existing databases:"
-msgstr "除了Ant任务外,当前的<emphasis>Hibernate Tools</emphasis>也包含了Eclipse IDE的插件,用于与现存数据库的逆向工程。"
+#. Tag: para
+#: toolset_guide.xml:12
+#, no-c-format
+msgid ""
+"The <emphasis>Hibernate Tools</emphasis> currently include plugins for the "
+"Eclipse IDE as well as Ant tasks for reverse engineering of existing "
+"databases:"
+msgstr ""
+"除了Ant任务外,当前的<emphasis>Hibernate Tools</emphasis>也包含了Eclipse IDE"
+"的插件,用于与现存数据库的逆向工程。"
 
-#: index.docbook:18
-msgid "<emphasis>Mapping Editor:</emphasis> An editor for Hibernate XML mapping files, supporting auto-completion and syntax highlighting. It also supports semantic auto-completion for class names and property/field names, making it much more versatile than a normal XML editor."
-msgstr "<emphasis>Mapping Editor:</emphasis> Hibernate XML映射文件的编辑器,支持自动完成和语法高亮。它也支持对类名和属性/字段名的语义自动完成,比通常的XML编辑器方便得多。"
+#. Tag: para
+#: toolset_guide.xml:18
+#, no-c-format
+msgid ""
+"<emphasis>Mapping Editor:</emphasis> An editor for Hibernate XML mapping "
+"files, supporting auto-completion and syntax highlighting. It also supports "
+"semantic auto-completion for class names and property/field names, making it "
+"much more versatile than a normal XML editor."
+msgstr ""
+"<emphasis>Mapping Editor:</emphasis> Hibernate XML映射文件的编辑器,支持自动"
+"完成和语法高亮。它也支持对类名和属性/字段名的语义自动完成,比通常的XML编辑器"
+"方便得多。"
 
-#: index.docbook:23
-msgid "<emphasis>Console:</emphasis> The console is a new view in Eclipse. In addition to a tree overview of your console configurations, you also get an interactive view of your persistent classes and their relationships. The console allows you to execute HQL queries against your database and browse the result directly in Eclipse."
-msgstr "<emphasis>Console:</emphasis> Console是Eclipse的一个新视图。除了对你的console配置的树状概览,你还可以获得对你持久化类及其关联的交互式视图。Console允许你对数据库执行HQL查询,并直接在Eclipse中浏览结果。"
+#. Tag: para
+#: toolset_guide.xml:23
+#, no-c-format
+msgid ""
+"<emphasis>Console:</emphasis> The console is a new view in Eclipse. In "
+"addition to a tree overview of your console configurations, you also get an "
+"interactive view of your persistent classes and their relationships. The "
+"console allows you to execute HQL queries against your database and browse "
+"the result directly in Eclipse."
+msgstr ""
+"<emphasis>Console:</emphasis> Console是Eclipse的一个新视图。除了对你的console"
+"配置的树状概览,你还可以获得对你持久化类及其关联的交互式视图。Console允许你对"
+"数据库执行HQL查询,并直接在Eclipse中浏览结果。"
 
-#: index.docbook:30
-msgid "<emphasis>Development Wizards:</emphasis> Several wizards are provided with the Hibernate Eclipse tools; you can use a wizard to quickly generate Hibernate configuration (cfg.xml) files, or you may even completely reverse engineer an existing database schema into POJO source files and Hibernate mapping files. The reverse engineering wizard supports customizable templates."
-msgstr "<emphasis>Development Wizards:</emphasis> 在Hibernate Eclipse tools中还提供了几个向导;你可以用向导快速生成Hibernate 配置文件(cfg.xml),你甚至还可以同现存的数据库schema中反向工程出POJO源代码与Hibernate 映射文件。反向工程支持可定制的模版。"
+#. Tag: para
+#: toolset_guide.xml:30
+#, no-c-format
+msgid ""
+"<emphasis>Development Wizards:</emphasis> Several wizards are provided with "
+"the Hibernate Eclipse tools; you can use a wizard to quickly generate "
+"Hibernate configuration (cfg.xml) files, or you may even completely reverse "
+"engineer an existing database schema into POJO source files and Hibernate "
+"mapping files. The reverse engineering wizard supports customizable "
+"templates."
+msgstr ""
+"<emphasis>Development Wizards:</emphasis> 在Hibernate Eclipse tools中还提供了"
+"几个向导;你可以用向导快速生成Hibernate 配置文件(cfg.xml),你甚至还可以同现"
+"存的数据库schema中反向工程出POJO源代码与Hibernate 映射文件。反向工程支持可定"
+"制的模版。"
 
-#: index.docbook:38
+#. Tag: emphasis
+#: toolset_guide.xml:38
+#, no-c-format
 msgid "Ant Tasks:"
 msgstr "Ant Tasks:"
 
-#: index.docbook:43
-msgid "Please refer to the <emphasis>Hibernate Tools</emphasis> package and it's documentation for more information."
-msgstr "要得到更多信息,请查阅 <emphasis>Hibernate Tools</emphasis> 包及其文档。"
+#. Tag: para
+#: toolset_guide.xml:43
+#, no-c-format
+msgid ""
+"Please refer to the <emphasis>Hibernate Tools</emphasis> package and it's "
+"documentation for more information."
+msgstr ""
+"要得到更多信息,请查阅 <emphasis>Hibernate Tools</emphasis> 包及其文档。"
 
-#: index.docbook:48
-msgid "However, the Hibernate main package comes bundled with an integrated tool (it can even be used from \"inside\" Hibernate on-the-fly): <emphasis>SchemaExport</emphasis> aka <literal>hbm2ddl</literal>."
-msgstr "同时,Hibernate主发行包还附带了一个集成的工具(它甚至可以在Hibernate“内部”快速运行)<emphasis>SchemaExport</emphasis> ,也就是 <literal>hbm2ddl</literal>。"
+#. Tag: para
+#: toolset_guide.xml:48
+#, no-c-format
+msgid ""
+"However, the Hibernate main package comes bundled with an integrated tool "
+"(it can even be used from \"inside\" Hibernate on-the-fly): "
+"<emphasis>SchemaExport</emphasis> aka <literal>hbm2ddl</literal>."
+msgstr ""
+"同时,Hibernate主发行包还附带了一个集成的工具(它甚至可以在Hibernate“内部”快"
+"速运行)<emphasis>SchemaExport</emphasis> ,也就是 <literal>hbm2ddl</"
+"literal>。"
 
-#: index.docbook:55
+#. Tag: title
+#: toolset_guide.xml:55
+#, no-c-format
 msgid "Automatic schema generation"
 msgstr "Schema自动生成(Automatic schema generation)"
 
-#: index.docbook:57
-msgid "DDL may be generated from your mapping files by a Hibernate utility. The generated schema includes referential integrity constraints (primary and foreign keys) for entity and collection tables. Tables and sequences are also created for mapped identifier generators."
-msgstr "可以从你的映射文件使用一个Hibernate工具生成DDL。 生成的schema包含有对实体和集合类表的完整性引用约束(主键和外键)。涉及到的标示符生成器所需的表和sequence也会同时生成。"
+#. Tag: para
+#: toolset_guide.xml:57
+#, no-c-format
+msgid ""
+"DDL may be generated from your mapping files by a Hibernate utility. The "
+"generated schema includes referential integrity constraints (primary and "
+"foreign keys) for entity and collection tables. Tables and sequences are "
+"also created for mapped identifier generators."
+msgstr ""
+"可以从你的映射文件使用一个Hibernate工具生成DDL。 生成的schema包含有对实体和集"
+"合类表的完整性引用约束(主键和外键)。涉及到的标示符生成器所需的表和sequence"
+"也会同时生成。"
 
-#: index.docbook:64
-msgid "You <emphasis>must</emphasis> specify a SQL <literal>Dialect</literal> via the <literal>hibernate.dialect</literal> property when using this tool, as DDL is highly vendor specific."
-msgstr "在使用这个工具的时候,你<emphasis>必须</emphasis> 通过<literal>hibernate.dialet</literal>属性指定一个SQL<literal>方言(Dialet)</literal>,因为DDL是与供应商高度相关的。"
+#. Tag: para
+#: toolset_guide.xml:64
+#, no-c-format
+msgid ""
+"You <emphasis>must</emphasis> specify a SQL <literal>Dialect</literal> via "
+"the <literal>hibernate.dialect</literal> property when using this tool, as "
+"DDL is highly vendor specific."
+msgstr ""
+"在使用这个工具的时候,你<emphasis>必须</emphasis> 通过<literal>hibernate."
+"dialet</literal>属性指定一个SQL<literal>方言(Dialet)</literal>,因为DDL是与供"
+"应商高度相关的。"
 
-#: index.docbook:70
+#. Tag: para
+#: toolset_guide.xml:70
+#, no-c-format
 msgid "First, customize your mapping files to improve the generated schema."
 msgstr "首先,要定制你的映射文件,来改善生成的schema。"
 
-#: index.docbook:75
+#. Tag: title
+#: toolset_guide.xml:75
+#, no-c-format
 msgid "Customizing the schema"
 msgstr "对schema定制化(Customizing the schema)"
 
-#: index.docbook:77
-msgid "Many Hibernate mapping elements define optional attributes named <literal>length</literal>, <literal>precision</literal> and <literal>scale</literal>. You may set the length, precision and scale of a column with this attribute."
-msgstr "很多Hibernate映射元素定义了可选的<literal>length</literal>、<literal>precision</literal> 或者 <literal>scale</literal>属性。你可以通过这个属性设置字段的长度、精度、小数点位数。"
+#. Tag: para
+#: toolset_guide.xml:77
+#, no-c-format
+msgid ""
+"Many Hibernate mapping elements define optional attributes named "
+"<literal>length</literal>, <literal>precision</literal> and <literal>scale</"
+"literal>. You may set the length, precision and scale of a column with this "
+"attribute."
+msgstr ""
+"很多Hibernate映射元素定义了可选的<literal>length</literal>、"
+"<literal>precision</literal> 或者 <literal>scale</literal>属性。你可以通过这"
+"个属性设置字段的长度、精度、小数点位数。"
 
-#: index.docbook:84
+#. Tag: programlisting
+#: toolset_guide.xml:84
+#, no-c-format
 msgid "<![CDATA[<property name=\"zip\" length=\"5\"/>]]>"
-msgstr "<![CDATA[<property name=\"zip\" length=\"5\"/>]]>"
+msgstr ""
 
-#: index.docbook:85
+#. Tag: programlisting
+#: toolset_guide.xml:85
+#, no-c-format
 msgid "<![CDATA[<property name=\"balance\" precision=\"12\" scale=\"2\"/>]]>"
-msgstr "<![CDATA[<property name=\"balance\" precision=\"12\" scale=\"2\"/>]]>"
+msgstr ""
 
-#: index.docbook:87
-msgid "Some tags also accept a <literal>not-null</literal> attribute (for generating a <literal>NOT NULL</literal> constraint on table columns) and a <literal>unique</literal> attribute (for generating <literal>UNIQUE</literal> constraint on table columns)."
-msgstr "有些tag还接受<literal>not-null</literal>属性(用来在表字段上生成<literal>NOT NULL</literal>约束)和<literal>unique</literal>属性(用来在表字段上生成<literal>UNIQUE</literal>约束)。"
+#. Tag: para
+#: toolset_guide.xml:87
+#, no-c-format
+msgid ""
+"Some tags also accept a <literal>not-null</literal> attribute (for "
+"generating a <literal>NOT NULL</literal> constraint on table columns) and a "
+"<literal>unique</literal> attribute (for generating <literal>UNIQUE</"
+"literal> constraint on table columns)."
+msgstr ""
+"有些tag还接受<literal>not-null</literal>属性(用来在表字段上生成<literal>NOT "
+"NULL</literal>约束)和<literal>unique</literal>属性(用来在表字段上生成"
+"<literal>UNIQUE</literal>约束)。"
 
-#: index.docbook:93
-msgid "<![CDATA[<many-to-one name=\"bar\" column=\"barId\" not-null=\"true\"/>]]>"
-msgstr "<![CDATA[<many-to-one name=\"bar\" column=\"barId\" not-null=\"true\"/>]]>"
+#. Tag: programlisting
+#: toolset_guide.xml:93
+#, no-c-format
+msgid ""
+"<![CDATA[<many-to-one name=\"bar\" column=\"barId\" not-null=\"true\"/>]]>"
+msgstr ""
 
-#: index.docbook:95
-msgid "<![CDATA[<element column=\"serialNumber\" type=\"long\" not-null=\"true\" unique=\"true\"/>]]>"
-msgstr "<![CDATA[<element column=\"serialNumber\" type=\"long\" not-null=\"true\" unique=\"true\"/>]]>"
+#. Tag: programlisting
+#: toolset_guide.xml:95
+#, no-c-format
+msgid ""
+"<![CDATA[<element column=\"serialNumber\" type=\"long\" not-null=\"true\" "
+"unique=\"true\"/>]]>"
+msgstr ""
 
-#: index.docbook:97
-msgid "A <literal>unique-key</literal> attribute may be used to group columns in a single unique key constraint. Currently, the specified value of the <literal>unique-key</literal> attribute is <emphasis>not</emphasis> used to name the constraint in the generated DDL, only to group the columns in the mapping file."
-msgstr "<literal>unique-key</literal>属性可以对成组的字段指定一个唯一键约束(unique key constraint)。目前,<literal>unique-key</literal>属性指定的值在生成DDL时<emphasis>并不会</emphasis>被当作这个约束的名字,它们只是在用来在映射文件内部用作区分的。"
+#. Tag: para
+#: toolset_guide.xml:97
+#, no-c-format
+msgid ""
+"A <literal>unique-key</literal> attribute may be used to group columns in a "
+"single unique key constraint. Currently, the specified value of the "
+"<literal>unique-key</literal> attribute is <emphasis>not</emphasis> used to "
+"name the constraint in the generated DDL, only to group the columns in the "
+"mapping file."
+msgstr ""
+"<literal>unique-key</literal>属性可以对成组的字段指定一个唯一键约束(unique "
+"key constraint)。目前,<literal>unique-key</literal>属性指定的值在生成DDL时"
+"<emphasis>并不会</emphasis>被当作这个约束的名字,它们只是在用来在映射文件内部"
+"用作区分的。"
 
-#: index.docbook:105
+#. Tag: programlisting
+#: toolset_guide.xml:105
+#, no-c-format
 msgid ""
-      "<![CDATA[<many-to-one name=\"org\" column=\"orgId\" unique-key=\"OrgEmployeeId\"/>\n"
-      "<property name=\"employeeId\" unique-key=\"OrgEmployee\"/>]]>"
+"<![CDATA[<many-to-one name=\"org\" column=\"orgId\" unique-key="
+"\"OrgEmployeeId\"/>\n"
+"<property name=\"employeeId\" unique-key=\"OrgEmployee\"/>]]>"
 msgstr ""
-      "<![CDATA[<many-to-one name=\"org\" column=\"orgId\" unique-key=\"OrgEmployeeId\"/>\n"
-      "<property name=\"employeeId\" unique-key=\"OrgEmployee\"/>]]>"
 
-#: index.docbook:107
-msgid "An <literal>index</literal> attribute specifies the name of an index that will be created using the mapped column or columns. Multiple columns may be grouped into the same index, simply by specifying the same index name."
-msgstr "<literal>index</literal>属性会用对应的字段(一个或多个)生成一个index,它指出了这个index的名字。如果多个字段对应的index名字相同,就会生成包含这些字段的index。"
+#. Tag: para
+#: toolset_guide.xml:107
+#, no-c-format
+msgid ""
+"An <literal>index</literal> attribute specifies the name of an index that "
+"will be created using the mapped column or columns. Multiple columns may be "
+"grouped into the same index, simply by specifying the same index name."
+msgstr ""
+"<literal>index</literal>属性会用对应的字段(一个或多个)生成一个index,它指出"
+"了这个index的名字。如果多个字段对应的index名字相同,就会生成包含这些字段的"
+"index。"
 
-#: index.docbook:113
+#. Tag: programlisting
+#: toolset_guide.xml:113
+#, no-c-format
 msgid ""
-      "<![CDATA[<property name=\"lastName\" index=\"CustName\"/>\n"
-      "<property name=\"firstName\" index=\"CustName\"/>]]>"
+"<![CDATA[<property name=\"lastName\" index=\"CustName\"/>\n"
+"<property name=\"firstName\" index=\"CustName\"/>]]>"
 msgstr ""
-      "<![CDATA[<property name=\"lastName\" index=\"CustName\"/>\n"
-      "<property name=\"firstName\" index=\"CustName\"/>]]>"
 
-#: index.docbook:115
-msgid "A <literal>foreign-key</literal> attribute may be used to override the name of any generated foreign key constraint."
-msgstr "<literal>foreign-key</literal>属性可以用来覆盖任何生成的外键约束的名字。"
+#. Tag: para
+#: toolset_guide.xml:115
+#, no-c-format
+msgid ""
+"A <literal>foreign-key</literal> attribute may be used to override the name "
+"of any generated foreign key constraint."
+msgstr ""
+"<literal>foreign-key</literal>属性可以用来覆盖任何生成的外键约束的名字。"
 
-#: index.docbook:120
-msgid "<![CDATA[<many-to-one name=\"bar\" column=\"barId\" foreign-key=\"FKFooBar\"/>]]>"
-msgstr "<![CDATA[<many-to-one name=\"bar\" column=\"barId\" foreign-key=\"FKFooBar\"/>]]>"
+#. Tag: programlisting
+#: toolset_guide.xml:120
+#, no-c-format
+msgid ""
+"<![CDATA[<many-to-one name=\"bar\" column=\"barId\" foreign-key=\"FKFooBar\"/"
+">]]>"
+msgstr ""
 
-#: index.docbook:122
-msgid "Many mapping elements also accept a child <literal>&lt;column&gt;</literal> element. This is particularly useful for mapping multi-column types:"
-msgstr "很多映射元素还接受<literal>&lt;column&gt;</literal>子元素。这在定义跨越多字段的类型时特别有用。"
+#. Tag: para
+#: toolset_guide.xml:122
+#, no-c-format
+msgid ""
+"Many mapping elements also accept a child <literal>&lt;column&gt;</literal> "
+"element. This is particularly useful for mapping multi-column types:"
+msgstr ""
+"很多映射元素还接受<literal>&lt;column&gt;</literal>子元素。这在定义跨越多字段"
+"的类型时特别有用。"
 
-#: index.docbook:127
+#. Tag: programlisting
+#: toolset_guide.xml:127
+#, no-c-format
 msgid ""
-      "<![CDATA[<property name=\"name\" type=\"my.customtypes.Name\"/>\n"
-      "    <column name=\"last\" not-null=\"true\" index=\"bar_idx\" length=\"30\"/>\n"
-      "    <column name=\"first\" not-null=\"true\" index=\"bar_idx\" length=\"20\"/>\n"
-      "    <column name=\"initial\"/>\n"
-      "</property>]]>"
+"<![CDATA[<property name=\"name\" type=\"my.customtypes.Name\"/>\n"
+"    <column name=\"last\" not-null=\"true\" index=\"bar_idx\" length=\"30\"/"
+">\n"
+"    <column name=\"first\" not-null=\"true\" index=\"bar_idx\" length=\"20\"/"
+">\n"
+"    <column name=\"initial\"/>\n"
+"</property>]]>"
 msgstr ""
-      "<![CDATA[<property name=\"name\" type=\"my.customtypes.Name\"/>\n"
-      "    <column name=\"last\" not-null=\"true\" index=\"bar_idx\" length=\"30\"/>\n"
-      "    <column name=\"first\" not-null=\"true\" index=\"bar_idx\" length=\"20\"/>\n"
-      "    <column name=\"initial\"/>\n"
-      "</property>]]>"
 
-#: index.docbook:129
-msgid "The <literal>default</literal> attribute lets you specify a default value for a column (you should assign the same value to the mapped property before saving a new instance of the mapped class)."
-msgstr "<literal>default</literal>属性为字段指定一个默认值 (在保存被映射的类的新实例之前,你应该将同样的值赋于对应的属性)。"
+#. Tag: para
+#: toolset_guide.xml:129
+#, no-c-format
+msgid ""
+"The <literal>default</literal> attribute lets you specify a default value "
+"for a column (you should assign the same value to the mapped property before "
+"saving a new instance of the mapped class)."
+msgstr ""
+"<literal>default</literal>属性为字段指定一个默认值 (在保存被映射的类的新实例"
+"之前,你应该将同样的值赋于对应的属性)。"
 
-#: index.docbook:135
+#. Tag: programlisting
+#: toolset_guide.xml:135
+#, no-c-format
 msgid ""
-      "<![CDATA[<property name=\"credits\" type=\"integer\" insert=\"false\">\n"
-      "    <column name=\"credits\" default=\"10\"/>\n"
-      "</property>]]>"
+"<![CDATA[<property name=\"credits\" type=\"integer\" insert=\"false\">\n"
+"    <column name=\"credits\" default=\"10\"/>\n"
+"</property>]]>"
 msgstr ""
-      "<![CDATA[<property name=\"credits\" type=\"integer\" insert=\"false\">\n"
-      "    <column name=\"credits\" default=\"10\"/>\n"
-      "</property>]]>"
 
-#: index.docbook:137
+#. Tag: programlisting
+#: toolset_guide.xml:137
+#, no-c-format
 msgid ""
-      "<![CDATA[<version name=\"version\" type=\"integer\" insert=\"false\">\n"
-      "    <column name=\"version\" default=\"0\"/>\n"
-      "</property>]]>"
+"<![CDATA[<version name=\"version\" type=\"integer\" insert=\"false\">\n"
+"    <column name=\"version\" default=\"0\"/>\n"
+"</property>]]>"
 msgstr ""
-      "<![CDATA[<version name=\"version\" type=\"integer\" insert=\"false\">\n"
-      "    <column name=\"version\" default=\"0\"/>\n"
-      "</property>]]>"
 
-#: index.docbook:139
-msgid "The <literal>sql-type</literal> attribute allows the user to override the default mapping of a Hibernate type to SQL datatype."
-msgstr "<literal>sql-type</literal>属性允许用户覆盖默认的Hibernate类型到SQL数据类型的映射。"
+#. Tag: para
+#: toolset_guide.xml:139
+#, no-c-format
+msgid ""
+"The <literal>sql-type</literal> attribute allows the user to override the "
+"default mapping of a Hibernate type to SQL datatype."
+msgstr ""
+"<literal>sql-type</literal>属性允许用户覆盖默认的Hibernate类型到SQL数据类型的"
+"映射。"
 
-#: index.docbook:144
+#. Tag: programlisting
+#: toolset_guide.xml:144
+#, no-c-format
 msgid ""
-      "<![CDATA[<property name=\"balance\" type=\"float\">\n"
-      "    <column name=\"balance\" sql-type=\"decimal(13,3)\"/>\n"
-      "</property>]]>"
+"<![CDATA[<property name=\"balance\" type=\"float\">\n"
+"    <column name=\"balance\" sql-type=\"decimal(13,3)\"/>\n"
+"</property>]]>"
 msgstr ""
-      "<![CDATA[<property name=\"balance\" type=\"float\">\n"
-      "    <column name=\"balance\" sql-type=\"decimal(13,3)\"/>\n"
-      "</property>]]>"
 
-#: index.docbook:146
-msgid "The <literal>check</literal> attribute allows you to specify a check constraint."
+#. Tag: para
+#: toolset_guide.xml:146
+#, no-c-format
+msgid ""
+"The <literal>check</literal> attribute allows you to specify a check "
+"constraint."
 msgstr "<literal>check</literal>属性允许用户指定一个约束检查。"
 
-#: index.docbook:150
+#. Tag: programlisting
+#: toolset_guide.xml:150
+#, no-c-format
 msgid ""
-      "<![CDATA[<property name=\"foo\" type=\"integer\">\n"
-      "    <column name=\"foo\" check=\"foo > 10\"/>\n"
-      "</property>]]>"
+"<![CDATA[<property name=\"foo\" type=\"integer\">\n"
+"    <column name=\"foo\" check=\"foo > 10\"/>\n"
+"</property>]]>"
 msgstr ""
-      "<![CDATA[<property name=\"foo\" type=\"integer\">\n"
-      "    <column name=\"foo\" check=\"foo > 10\"/>\n"
-      "</property>]]>"
 
-#: index.docbook:152
+#. Tag: programlisting
+#: toolset_guide.xml:152
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Foo\" table=\"foos\" check=\"bar < 100.0\">\n"
-      "    ...\n"
-      "    <property name=\"bar\" type=\"float\"/>\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Foo\" table=\"foos\" check=\"bar < 100.0\">\n"
+"    ...\n"
+"    <property name=\"bar\" type=\"float\"/>\n"
+"</class>]]>"
 msgstr ""
-      "<![CDATA[<class name=\"Foo\" table=\"foos\" check=\"bar < 100.0\">\n"
-      "    ...\n"
-      "    <property name=\"bar\" type=\"float\"/>\n"
-      "</class>]]>"
 
-#: index.docbook:156
+#. Tag: title
+#: toolset_guide.xml:156
+#, no-c-format
 msgid "Summary"
 msgstr "Summary"
 
-#: index.docbook:163
+#. Tag: entry
+#: toolset_guide.xml:163
+#, no-c-format
 msgid "Attribute"
 msgstr "属性(Attribute)"
 
-#: index.docbook:164
+#. Tag: entry
+#: toolset_guide.xml:164
+#, no-c-format
 msgid "Values"
 msgstr "值(Values)"
 
-#: index.docbook:165
+#. Tag: entry
+#: toolset_guide.xml:165
+#, no-c-format
 msgid "Interpretation"
 msgstr "解释(Interpretation)"
 
-#: index.docbook:170
+#. Tag: literal
+#: toolset_guide.xml:170
+#, no-c-format
 msgid "length"
 msgstr "length"
 
-#: index.docbook:171, index.docbook:176, index.docbook:181
+#. Tag: entry
+#: toolset_guide.xml:171 toolset_guide.xml:176 toolset_guide.xml:181
+#, no-c-format
 msgid "number"
-msgstr "<entry>数字</entry>"
+msgstr "数字"
 
-#: index.docbook:172
+#. Tag: entry
+#: toolset_guide.xml:172
+#, no-c-format
 msgid "column length"
 msgstr "字段长度"
 
-#: index.docbook:175
+#. Tag: literal
+#: toolset_guide.xml:175
+#, no-c-format
 msgid "precision"
 msgstr "precision"
 
-#: index.docbook:177
+#. Tag: entry
+#: toolset_guide.xml:177
+#, no-c-format
 msgid "column decimal precision"
 msgstr "精度(decimal precision)"
 
-#: index.docbook:180
+#. Tag: literal
+#: toolset_guide.xml:180
+#, no-c-format
 msgid "scale"
 msgstr "scale"
 
-#: index.docbook:182
+#. Tag: entry
+#: toolset_guide.xml:182
+#, no-c-format
 msgid "column decimal scale"
 msgstr "小数点位数(decimal scale)"
 
-#: index.docbook:185
+#. Tag: literal
+#: toolset_guide.xml:185
+#, no-c-format
 msgid "not-null"
 msgstr "not-null"
 
-#: index.docbook:186, index.docbook:191
+#. Tag: literal
+#: toolset_guide.xml:186 toolset_guide.xml:191
+#, no-c-format
 msgid "true|false"
 msgstr "true|false"
 
-#: index.docbook:187
+#. Tag: entry
+#: toolset_guide.xml:187
+#, no-c-format
 msgid "specfies that the column should be non-nullable"
 msgstr "指明字段是否应该是非空的"
 
-#: index.docbook:190
+#. Tag: literal
+#: toolset_guide.xml:190
+#, no-c-format
 msgid "unique"
 msgstr "unique"
 
-#: index.docbook:192
+#. Tag: entry
+#: toolset_guide.xml:192
+#, no-c-format
 msgid "specifies that the column should have a unique constraint"
 msgstr "指明是否该字段具有惟一约束"
 
-#: index.docbook:195
+#. Tag: literal
+#: toolset_guide.xml:195
+#, no-c-format
 msgid "index"
 msgstr "index"
 
-#: index.docbook:196
+#. Tag: literal
+#: toolset_guide.xml:196
+#, no-c-format
 msgid "index_name"
 msgstr "index_name"
 
-#: index.docbook:197
+#. Tag: entry
+#: toolset_guide.xml:197
+#, no-c-format
 msgid "specifies the name of a (multi-column) index"
 msgstr "指明一个(多字段)的索引(index)的名字"
 
-#: index.docbook:200
+#. Tag: literal
+#: toolset_guide.xml:200
+#, no-c-format
 msgid "unique-key"
 msgstr "unique-key"
 
-#: index.docbook:201
+#. Tag: literal
+#: toolset_guide.xml:201
+#, no-c-format
 msgid "unique_key_name"
 msgstr "unique_key_name"
 
-#: index.docbook:202
+#. Tag: entry
+#: toolset_guide.xml:202
+#, no-c-format
 msgid "specifies the name of a multi-column unique constraint"
 msgstr "指明多字段惟一约束的名字(参见上面的说明)"
 
-#: index.docbook:205
+#. Tag: literal
+#: toolset_guide.xml:205
+#, no-c-format
 msgid "foreign-key"
 msgstr "foreign-key"
 
-#: index.docbook:206
+#. Tag: literal
+#: toolset_guide.xml:206
+#, no-c-format
 msgid "foreign_key_name"
 msgstr "foreign_key_name"
 
-#: index.docbook:207
-msgid "specifies the name of the foreign key constraint generated for an association, for a <literal>&lt;one-to-one&gt;</literal>, <literal>&lt;many-to-one&gt;</literal>, <literal>&lt;key&gt;</literal>, or <literal>&lt;many-to-many&gt;</literal> mapping element. Note that <literal>inverse=\"true\"</literal> sides will not be considered by <literal>SchemaExport</literal>."
-msgstr "specifies the name of the foreign key constraint generated for an association, for a <literal>&lt;one-to-one&gt;</literal>, <literal>&lt;many-to-one&gt;</literal>, <literal>&lt;key&gt;</literal>, or <literal>&lt;many-to-many&gt;</literal> mapping element. Note that <literal>inverse=\"true\"</literal> sides will not be considered by <literal>SchemaExport</literal>. 指明一个外键的名字,它是为关联生成的,或者<literal>&lt;one-to-one&gt;</literal>,<literal>&lt;many-to-one&gt;</literal>, <literal>&lt;key&gt;</literal>, 或者<literal>&lt;many-to-many&gt;</literal>映射元素。注意<literal>inverse=\"true\"</literal>在<literal>SchemaExport</literal>时会被忽略。"
+#. Tag: entry
+#: toolset_guide.xml:207
+#, fuzzy, no-c-format
+msgid ""
+"specifies the name of the foreign key constraint generated for an "
+"association, for a <literal>&lt;one-to-one&gt;</literal>, <literal>&lt;many-"
+"to-one&gt;</literal>, <literal>&lt;key&gt;</literal>, or <literal>&lt;many-"
+"to-many&gt;</literal> mapping element. Note that <literal>inverse=\"true\"</"
+"literal> sides will not be considered by <literal>SchemaExport</literal>."
+msgstr ""
+"指明一个外键的名字,它是为关联生成的,或者<placeholder-1/>,<placeholder-2/"
+">, <placeholder-3/>, 或者<placeholder-4/>映射元素。注意<placeholder-5/>在"
+"<placeholder-6/>时会被忽略。"
 
-#: index.docbook:217
+#. Tag: literal
+#: toolset_guide.xml:217
+#, no-c-format
 msgid "sql-type"
 msgstr "sql-type"
 
-#: index.docbook:218
+#. Tag: literal
+#: toolset_guide.xml:218
+#, no-c-format
 msgid "SQL column type"
 msgstr "SQL 字段类型"
 
-#: index.docbook:219
-msgid "overrides the default column type (attribute of <literal>&lt;column&gt;</literal> element only)"
-msgstr "覆盖默认的字段类型(只能用于<literal>&lt;column&gt;</literal>属性)"
+#. Tag: entry
+#: toolset_guide.xml:219
+#, fuzzy, no-c-format
+msgid ""
+"overrides the default column type (attribute of <literal>&lt;column&gt;</"
+"literal> element only)"
+msgstr "覆盖默认的字段类型(只能用于<placeholder-1/>属性)"
 
-#: index.docbook:225
+#. Tag: literal
+#: toolset_guide.xml:225
+#, no-c-format
 msgid "default"
 msgstr "default"
 
-#: index.docbook:226, index.docbook:233
+#. Tag: entry
+#: toolset_guide.xml:226 toolset_guide.xml:233
+#, fuzzy, no-c-format
 msgid "SQL expression"
-msgstr "SQL表达式"
+msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"SQL表达式\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"SQL 表达式"
 
-#: index.docbook:227
+#. Tag: entry
+#: toolset_guide.xml:227
+#, no-c-format
 msgid "specify a default value for the column"
 msgstr "为字段指定默认值"
 
-#: index.docbook:232
+#. Tag: literal
+#: toolset_guide.xml:232
+#, no-c-format
 msgid "check"
 msgstr "check"
 
-#: index.docbook:234
+#. Tag: entry
+#: toolset_guide.xml:234
+#, no-c-format
 msgid "create an SQL check constraint on either column or table"
 msgstr "对字段或表加入SQL约束检查"
 
-#: index.docbook:242
-msgid "The <literal>&lt;comment&gt;</literal> element allows you to specify comments for the generated schema."
-msgstr "<literal>&lt;comment&gt;</literal>元素可以让你在生成的schema中加入注释。"
+#. Tag: para
+#: toolset_guide.xml:242
+#, no-c-format
+msgid ""
+"The <literal>&lt;comment&gt;</literal> element allows you to specify "
+"comments for the generated schema."
+msgstr ""
+"<literal>&lt;comment&gt;</literal>元素可以让你在生成的schema中加入注释。"
 
-#: index.docbook:247
+#. Tag: programlisting
+#: toolset_guide.xml:247
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Customer\" table=\"CurCust\">\n"
-      "    <comment>Current customers only</comment>\n"
-      "    ...\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Customer\" table=\"CurCust\">\n"
+"    <comment>Current customers only</comment>\n"
+"    ...\n"
+"</class>]]>"
 msgstr ""
-      "<![CDATA[<class name=\"Customer\" table=\"CurCust\">\n"
-      "    <comment>Current customers only</comment>\n"
-      "    ...\n"
-      "</class>]]>"
 
-#: index.docbook:249
+#. Tag: programlisting
+#: toolset_guide.xml:249
+#, no-c-format
 msgid ""
-      "<![CDATA[<property name=\"balance\">\n"
-      "    <column name=\"bal\">\n"
-      "        <comment>Balance in USD</comment>\n"
-      "    </column>\n"
-      "</property>]]>"
+"<![CDATA[<property name=\"balance\">\n"
+"    <column name=\"bal\">\n"
+"        <comment>Balance in USD</comment>\n"
+"    </column>\n"
+"</property>]]>"
 msgstr ""
-      "<![CDATA[<property name=\"balance\">\n"
-      "    <column name=\"bal\">\n"
-      "        <comment>Balance in USD</comment>\n"
-      "    </column>\n"
-      "</property>]]>"
 
-#: index.docbook:251
-msgid "This results in a <literal>comment on table</literal> or <literal>comment on column</literal> statement in the generated DDL (where supported)."
-msgstr "结果是在生成的DDL中包含<literal>comment on table</literal> 或者 <literal>comment on column</literal>语句(假若支持的话)。"
+#. Tag: para
+#: toolset_guide.xml:251
+#, no-c-format
+msgid ""
+"This results in a <literal>comment on table</literal> or <literal>comment on "
+"column</literal> statement in the generated DDL (where supported)."
+msgstr ""
+"结果是在生成的DDL中包含<literal>comment on table</literal> 或者 "
+"<literal>comment on column</literal>语句(假若支持的话)。"
 
-#: index.docbook:260
+#. Tag: title
+#: toolset_guide.xml:260
+#, no-c-format
 msgid "Running the tool"
 msgstr "运行该工具"
 
-#: index.docbook:262
-msgid "The <literal>SchemaExport</literal> tool writes a DDL script to standard out and/or executes the DDL statements."
-msgstr "<literal>SchemaExport</literal>工具把DDL脚本写到标准输出,同时/或者执行DDL语句。"
+#. Tag: para
+#: toolset_guide.xml:262
+#, no-c-format
+msgid ""
+"The <literal>SchemaExport</literal> tool writes a DDL script to standard out "
+"and/or executes the DDL statements."
+msgstr ""
+"<literal>SchemaExport</literal>工具把DDL脚本写到标准输出,同时/或者执行DDL语"
+"句。"
 
-#: index.docbook:267
-msgid "<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <literal>org.hibernate.tool.hbm2ddl.SchemaExport</literal> <emphasis>options mapping_files</emphasis>"
-msgstr "<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <literal>org.hibernate.tool.hbm2ddl.SchemaExport</literal> <emphasis>options mapping_files</emphasis>"
+#. Tag: para
+#: toolset_guide.xml:267
+#, no-c-format
+msgid ""
+"<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> "
+"<literal>org.hibernate.tool.hbm2ddl.SchemaExport</literal> <emphasis>options "
+"mapping_files</emphasis>"
+msgstr ""
 
-#: index.docbook:273
+#. Tag: title
+#: toolset_guide.xml:273
+#, no-c-format
 msgid "<literal>SchemaExport</literal> Command Line Options"
 msgstr "<literal>SchemaExport</literal>命令行选项"
 
-#: index.docbook:279, index.docbook:429, index.docbook:498
+#. Tag: entry
+#: toolset_guide.xml:279 toolset_guide.xml:429 toolset_guide.xml:498
+#, no-c-format
 msgid "Option"
-msgstr "<entry>选项</entry>"
+msgstr "选项"
 
-#: index.docbook:280, index.docbook:367, index.docbook:430, index.docbook:499
+#. Tag: entry
+#: toolset_guide.xml:280 toolset_guide.xml:367 toolset_guide.xml:430
+#: toolset_guide.xml:499
+#, fuzzy, no-c-format
 msgid "Description"
-msgstr "<entry>说明</entry>"
+msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"说明\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"说明\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"说明\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"描述"
 
-#: index.docbook:285, index.docbook:435
+#. Tag: literal
+#: toolset_guide.xml:285 toolset_guide.xml:435
+#, no-c-format
 msgid "--quiet"
 msgstr "--quiet"
 
-#: index.docbook:286, index.docbook:436
+#. Tag: entry
+#: toolset_guide.xml:286 toolset_guide.xml:436
+#, no-c-format
 msgid "don't output the script to stdout"
 msgstr "不要把脚本输出到stdout"
 
-#: index.docbook:289
+#. Tag: literal
+#: toolset_guide.xml:289
+#, no-c-format
 msgid "--drop"
 msgstr "--drop"
 
-#: index.docbook:290
+#. Tag: entry
+#: toolset_guide.xml:290
+#, no-c-format
 msgid "only drop the tables"
 msgstr "只进行drop tables的步骤"
 
-#: index.docbook:293
+#. Tag: literal
+#: toolset_guide.xml:293
+#, no-c-format
 msgid "--create"
 msgstr "--create"
 
-#: index.docbook:294
+#. Tag: entry
+#: toolset_guide.xml:294
+#, no-c-format
 msgid "only create the tables"
 msgstr "只创建表"
 
-#: index.docbook:297, index.docbook:439
+#. Tag: literal
+#: toolset_guide.xml:297 toolset_guide.xml:439
+#, no-c-format
 msgid "--text"
 msgstr "--text"
 
-#: index.docbook:298
+#. Tag: entry
+#: toolset_guide.xml:298
+#, no-c-format
 msgid "don't export to the database"
 msgstr "不执行在数据库中运行的步骤"
 
-#: index.docbook:301
+#. Tag: literal
+#: toolset_guide.xml:301
+#, no-c-format
 msgid "--output=my_schema.ddl"
 msgstr "--output=my_schema.ddl"
 
-#: index.docbook:302
+#. Tag: entry
+#: toolset_guide.xml:302
+#, no-c-format
 msgid "output the ddl script to a file"
 msgstr "把输出的ddl脚本输出到一个文件"
 
-#: index.docbook:305, index.docbook:443, index.docbook:504
+#. Tag: literal
+#: toolset_guide.xml:305 toolset_guide.xml:443 toolset_guide.xml:504
+#, no-c-format
 msgid "--naming=eg.MyNamingStrategy"
 msgstr "--naming=eg.MyNamingStrategy"
 
-#: index.docbook:306, index.docbook:444, index.docbook:505
+#. Tag: entry
+#: toolset_guide.xml:306 toolset_guide.xml:444 toolset_guide.xml:505
+#, fuzzy, no-c-format
 msgid "select a <literal>NamingStrategy</literal>"
-msgstr "选择一个命名策略(<literal>NamingStrategy</literal>)"
+msgstr "在<literal>hibernate.properties</literal>文件中"
 
-#: index.docbook:309, index.docbook:451, index.docbook:512
+#. Tag: literal
+#: toolset_guide.xml:309 toolset_guide.xml:451 toolset_guide.xml:512
+#, no-c-format
 msgid "--config=hibernate.cfg.xml"
 msgstr "--config=hibernate.cfg.xml"
 
-#: index.docbook:310
+#. Tag: entry
+#: toolset_guide.xml:310
+#, no-c-format
 msgid "read Hibernate configuration from an XML file"
 msgstr "从XML文件读入Hibernate配置"
 
-#: index.docbook:313, index.docbook:447, index.docbook:508
+#. Tag: literal
+#: toolset_guide.xml:313 toolset_guide.xml:447 toolset_guide.xml:508
+#, no-c-format
 msgid "--properties=hibernate.properties"
 msgstr "--properties=hibernate.properties"
 
-#: index.docbook:314, index.docbook:448, index.docbook:509
+#. Tag: entry
+#: toolset_guide.xml:314 toolset_guide.xml:448 toolset_guide.xml:509
+#, fuzzy, no-c-format
 msgid "read database properties from a file"
-msgstr "从文件读入数据库属性"
+msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"从文件读入数据库属性\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"从指定文件读入数据库属性\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"从文件中读取数据库属性"
 
-#: index.docbook:317
+#. Tag: literal
+#: toolset_guide.xml:317
+#, no-c-format
 msgid "--format"
 msgstr "--format"
 
-#: index.docbook:318
+#. Tag: entry
+#: toolset_guide.xml:318
+#, no-c-format
 msgid "format the generated SQL nicely in the script"
 msgstr "把脚本中的SQL语句对齐和美化"
 
-#: index.docbook:321
+#. Tag: literal
+#: toolset_guide.xml:321
+#, no-c-format
 msgid "--delimiter=;"
 msgstr "--delimiter=;"
 
-#: index.docbook:322
+#. Tag: entry
+#: toolset_guide.xml:322
+#, no-c-format
 msgid "set an end of line delimiter for the script"
 msgstr "为脚本设置行结束符"
 
-#: index.docbook:328
+#. Tag: para
+#: toolset_guide.xml:328
+#, no-c-format
 msgid "You may even embed <literal>SchemaExport</literal> in your application:"
 msgstr "你甚至可以在你的应用程序中嵌入<literal>SchemaExport</literal>工具:"
 
-#: index.docbook:332
+#. Tag: programlisting
+#: toolset_guide.xml:332
+#, no-c-format
 msgid ""
-      "<![CDATA[Configuration cfg = ....;\n"
-      "new SchemaExport(cfg).create(false, true);]]>"
+"<![CDATA[Configuration cfg = ....;\n"
+"new SchemaExport(cfg).create(false, true);]]>"
 msgstr ""
-      "<![CDATA[Configuration cfg = ....;\n"
-      "new SchemaExport(cfg).create(false, true);]]>"
 
-#: index.docbook:337
+#. Tag: title
+#: toolset_guide.xml:337
+#, no-c-format
 msgid "Properties"
 msgstr "属性(Properties)"
 
-#: index.docbook:339
+#. Tag: para
+#: toolset_guide.xml:339
+#, no-c-format
 msgid "Database properties may be specified"
 msgstr "可以通过如下方式指定数据库属性:"
 
-#: index.docbook:345
-msgid "as system properties with <literal>-D</literal><emphasis>&lt;property&gt;</emphasis>"
+#. Tag: para
+#: toolset_guide.xml:345
+#, no-c-format
+msgid ""
+"as system properties with <literal>-D</literal><emphasis>&lt;property&gt;</"
+"emphasis>"
 msgstr "通过<literal>-D</literal><emphasis>&lt;property&gt;</emphasis>系统参数"
 
-#: index.docbook:348
+#. Tag: para
+#: toolset_guide.xml:348
+#, no-c-format
 msgid "in <literal>hibernate.properties</literal>"
 msgstr "在<literal>hibernate.properties</literal>文件中"
 
-#: index.docbook:351
+#. Tag: para
+#: toolset_guide.xml:351
+#, no-c-format
 msgid "in a named properties file with <literal>--properties</literal>"
-msgstr "位于一个其它名字的properties文件中,然后用 <literal>--properties</literal>参数指定"
+msgstr ""
+"位于一个其它名字的properties文件中,然后用 <literal>--properties</literal>参数"
+"指定"
 
-#: index.docbook:355
+#. Tag: para
+#: toolset_guide.xml:355
+#, no-c-format
 msgid "The needed properties are:"
 msgstr "所需的参数包括:"
 
-#: index.docbook:360
+#. Tag: title
+#: toolset_guide.xml:360
+#, no-c-format
 msgid "SchemaExport Connection Properties"
 msgstr "SchemaExport 连接属性"
 
-#: index.docbook:366
+#. Tag: entry
+#: toolset_guide.xml:366
+#, no-c-format
 msgid "Property Name"
-msgstr "<entry>属性名</entry>"
+msgstr "属性名"
 
-#: index.docbook:372
+#. Tag: literal
+#: toolset_guide.xml:372
+#, no-c-format
 msgid "hibernate.connection.driver_class"
 msgstr "hibernate.connection.driver_class"
 
-#: index.docbook:373
+#. Tag: entry
+#: toolset_guide.xml:373
+#, no-c-format
 msgid "jdbc driver class"
 msgstr "jdbc driver class"
 
-#: index.docbook:376
+#. Tag: literal
+#: toolset_guide.xml:376
+#, no-c-format
 msgid "hibernate.connection.url"
 msgstr "hibernate.connection.url"
 
-#: index.docbook:377
+#. Tag: entry
+#: toolset_guide.xml:377
+#, no-c-format
 msgid "jdbc url"
 msgstr "jdbc url"
 
-#: index.docbook:380
+#. Tag: literal
+#: toolset_guide.xml:380
+#, no-c-format
 msgid "hibernate.connection.username"
 msgstr "hibernate.connection.username"
 
-#: index.docbook:381
+#. Tag: entry
+#: toolset_guide.xml:381
+#, no-c-format
 msgid "database user"
 msgstr "database user"
 
-#: index.docbook:384
+#. Tag: literal
+#: toolset_guide.xml:384
+#, no-c-format
 msgid "hibernate.connection.password"
 msgstr "hibernate.connection.password"
 
-#: index.docbook:385
+#. Tag: entry
+#: toolset_guide.xml:385
+#, no-c-format
 msgid "user password"
 msgstr "user password"
 
-#: index.docbook:388
+#. Tag: literal
+#: toolset_guide.xml:388
+#, no-c-format
 msgid "hibernate.dialect"
 msgstr "hibernate.dialect"
 
-#: index.docbook:389
+#. Tag: entry
+#: toolset_guide.xml:389
+#, no-c-format
 msgid "dialect"
 msgstr "方言(dialect)"
 
-#: index.docbook:398
+#. Tag: title
+#: toolset_guide.xml:398
+#, no-c-format
 msgid "Using Ant"
 msgstr "使用Ant(Using Ant)"
 
-#: index.docbook:400
-msgid "You can call <literal>SchemaExport</literal> from your Ant build script:"
+#. Tag: para
+#: toolset_guide.xml:400
+#, no-c-format
+msgid ""
+"You can call <literal>SchemaExport</literal> from your Ant build script:"
 msgstr "你可以在你的Ant build脚本中调用<literal>SchemaExport</literal>:"
 
-#: index.docbook:404
+#. Tag: programlisting
+#: toolset_guide.xml:404
+#, no-c-format
 msgid ""
-      "<![CDATA[<target name=\"schemaexport\">\n"
-      "    <taskdef name=\"schemaexport\"\n"
-      "        classname=\"org.hibernate.tool.hbm2ddl.SchemaExportTask\"\n"
-      "        classpathref=\"class.path\"/>\n"
-      "    \n"
-      "    <schemaexport\n"
-      "        properties=\"hibernate.properties\"\n"
-      "        quiet=\"no\"\n"
-      "        text=\"no\"\n"
-      "        drop=\"no\"\n"
-      "        delimiter=\";\"\n"
-      "        output=\"schema-export.sql\">\n"
-      "        <fileset dir=\"src\">\n"
-      "            <include name=\"**/*.hbm.xml\"/>\n"
-      "        </fileset>\n"
-      "    </schemaexport>\n"
-      "</target>]]>"
+"<![CDATA[<target name=\"schemaexport\">\n"
+"    <taskdef name=\"schemaexport\"\n"
+"        classname=\"org.hibernate.tool.hbm2ddl.SchemaExportTask\"\n"
+"        classpathref=\"class.path\"/>\n"
+"    \n"
+"    <schemaexport\n"
+"        properties=\"hibernate.properties\"\n"
+"        quiet=\"no\"\n"
+"        text=\"no\"\n"
+"        drop=\"no\"\n"
+"        delimiter=\";\"\n"
+"        output=\"schema-export.sql\">\n"
+"        <fileset dir=\"src\">\n"
+"            <include name=\"**/*.hbm.xml\"/>\n"
+"        </fileset>\n"
+"    </schemaexport>\n"
+"</target>]]>"
 msgstr ""
-      "<![CDATA[<target name=\"schemaexport\">\n"
-      "    <taskdef name=\"schemaexport\"\n"
-      "        classname=\"org.hibernate.tool.hbm2ddl.SchemaExportTask\"\n"
-      "        classpathref=\"class.path\"/>\n"
-      "    \n"
-      "    <schemaexport\n"
-      "        properties=\"hibernate.properties\"\n"
-      "        quiet=\"no\"\n"
-      "        text=\"no\"\n"
-      "        drop=\"no\"\n"
-      "        delimiter=\";\"\n"
-      "        output=\"schema-export.sql\">\n"
-      "        <fileset dir=\"src\">\n"
-      "            <include name=\"**/*.hbm.xml\"/>\n"
-      "        </fileset>\n"
-      "    </schemaexport>\n"
-      "</target>]]>"
 
-#: index.docbook:409
+#. Tag: title
+#: toolset_guide.xml:409
+#, no-c-format
 msgid "Incremental schema updates"
 msgstr "对schema的增量更新(Incremental schema updates)"
 
-#: index.docbook:411
-msgid "The <literal>SchemaUpdate</literal> tool will update an existing schema with \"incremental\" changes. Note that <literal>SchemaUpdate</literal> depends heavily upon the JDBC metadata API, so it will not work with all JDBC drivers."
-msgstr "<literal>SchemaUpdate</literal>工具对已存在的schema采用\"增量\"方式进行更新。注意<literal>SchemaUpdate</literal>严重依赖于JDBC metadata API,所以它并非对所有JDBC驱动都有效。"
+#. Tag: para
+#: toolset_guide.xml:411
+#, no-c-format
+msgid ""
+"The <literal>SchemaUpdate</literal> tool will update an existing schema with "
+"\"incremental\" changes. Note that <literal>SchemaUpdate</literal> depends "
+"heavily upon the JDBC metadata API, so it will not work with all JDBC "
+"drivers."
+msgstr ""
+"<literal>SchemaUpdate</literal>工具对已存在的schema采用\"增量\"方式进行更新。"
+"注意<literal>SchemaUpdate</literal>严重依赖于JDBC metadata API,所以它并非对所"
+"有JDBC驱动都有效。"
 
-#: index.docbook:417
-msgid "<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <literal>org.hibernate.tool.hbm2ddl.SchemaUpdate</literal> <emphasis>options mapping_files</emphasis>"
-msgstr "<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <literal>org.hibernate.tool.hbm2ddl.SchemaUpdate</literal> <emphasis>options mapping_files</emphasis>"
+#. Tag: para
+#: toolset_guide.xml:417
+#, no-c-format
+msgid ""
+"<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> "
+"<literal>org.hibernate.tool.hbm2ddl.SchemaUpdate</literal> <emphasis>options "
+"mapping_files</emphasis>"
+msgstr ""
 
-#: index.docbook:423
+#. Tag: title
+#: toolset_guide.xml:423
+#, no-c-format
 msgid "<literal>SchemaUpdate</literal> Command Line Options"
 msgstr "<literal>SchemaUpdate</literal>命令行选项"
 
-#: index.docbook:440
+#. Tag: entry
+#: toolset_guide.xml:440
+#, no-c-format
 msgid "don't export the script to the database"
 msgstr "不把脚本输出到数据库"
 
-#: index.docbook:452, index.docbook:513
+#. Tag: entry
+#: toolset_guide.xml:452 toolset_guide.xml:513
+#, fuzzy, no-c-format
 msgid "specify a <literal>.cfg.xml</literal> file"
-msgstr "指定一个 <literal>.cfg.xml</literal>文件"
+msgstr ""
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"指定一个 <placeholder-1/>文件\n"
+"#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+"指定一个<placeholder-1/>文件"
 
-#: index.docbook:458
+#. Tag: para
+#: toolset_guide.xml:458
+#, no-c-format
 msgid "You may embed <literal>SchemaUpdate</literal> in your application:"
 msgstr "你可以在你的应用程序中嵌入<literal>SchemaUpdate</literal>工具:"
 
-#: index.docbook:462
+#. Tag: programlisting
+#: toolset_guide.xml:462
+#, no-c-format
 msgid ""
-      "<![CDATA[Configuration cfg = ....;\n"
-      "new SchemaUpdate(cfg).execute(false);]]>"
+"<![CDATA[Configuration cfg = ....;\n"
+"new SchemaUpdate(cfg).execute(false);]]>"
 msgstr ""
-      "<![CDATA[Configuration cfg = ....;\n"
-      "new SchemaUpdate(cfg).execute(false);]]>"
 
-#: index.docbook:467
+#. Tag: title
+#: toolset_guide.xml:467
+#, no-c-format
 msgid "Using Ant for incremental schema updates"
 msgstr "用Ant来增量更新schema(Using Ant for incremental schema updates)"
 
-#: index.docbook:469
+#. Tag: para
+#: toolset_guide.xml:469
+#, no-c-format
 msgid "You can call <literal>SchemaUpdate</literal> from the Ant script:"
 msgstr "你可以在Ant脚本中调用<literal>SchemaUpdate</literal>:"
 
-#: index.docbook:473
+#. Tag: programlisting
+#: toolset_guide.xml:473
+#, no-c-format
 msgid ""
-      "<![CDATA[<target name=\"schemaupdate\">\n"
-      "    <taskdef name=\"schemaupdate\"\n"
-      "        classname=\"org.hibernate.tool.hbm2ddl.SchemaUpdateTask\"\n"
-      "        classpathref=\"class.path\"/>\n"
-      "    \n"
-      "    <schemaupdate\n"
-      "        properties=\"hibernate.properties\"\n"
-      "        quiet=\"no\">\n"
-      "        <fileset dir=\"src\">\n"
-      "            <include name=\"**/*.hbm.xml\"/>\n"
-      "        </fileset>\n"
-      "    </schemaupdate>\n"
-      "</target>]]>"
+"<![CDATA[<target name=\"schemaupdate\">\n"
+"    <taskdef name=\"schemaupdate\"\n"
+"        classname=\"org.hibernate.tool.hbm2ddl.SchemaUpdateTask\"\n"
+"        classpathref=\"class.path\"/>\n"
+"    \n"
+"    <schemaupdate\n"
+"        properties=\"hibernate.properties\"\n"
+"        quiet=\"no\">\n"
+"        <fileset dir=\"src\">\n"
+"            <include name=\"**/*.hbm.xml\"/>\n"
+"        </fileset>\n"
+"    </schemaupdate>\n"
+"</target>]]>"
 msgstr ""
-      "<![CDATA[<target name=\"schemaupdate\">\n"
-      "    <taskdef name=\"schemaupdate\"\n"
-      "        classname=\"org.hibernate.tool.hbm2ddl.SchemaUpdateTask\"\n"
-      "        classpathref=\"class.path\"/>\n"
-      "    \n"
-      "    <schemaupdate\n"
-      "        properties=\"hibernate.properties\"\n"
-      "        quiet=\"no\">\n"
-      "        <fileset dir=\"src\">\n"
-      "            <include name=\"**/*.hbm.xml\"/>\n"
-      "        </fileset>\n"
-      "    </schemaupdate>\n"
-      "</target>]]>"
 
-#: index.docbook:478
+#. Tag: title
+#: toolset_guide.xml:478
+#, no-c-format
 msgid "Schema validation"
 msgstr "Schema 校验"
 
-#: index.docbook:480
-msgid "The <literal>SchemaValidator</literal> tool will validate that the existing database schema \"matches\" your mapping documents. Note that <literal>SchemaValidator</literal> depends heavily upon the JDBC metadata API, so it will not work with all JDBC drivers. This tool is extremely useful for testing."
-msgstr "<literal>SchemaValidator</literal>工具会比较数据库现状是否与映射文档“匹配”。注意,<literal>SchemaValidator</literal> 严重依赖于JDBC的metadata API,因此不是对所有的JDBC驱动都适用。这一工具在测试的时候特别有用。"
+#. Tag: para
+#: toolset_guide.xml:480
+#, no-c-format
+msgid ""
+"The <literal>SchemaValidator</literal> tool will validate that the existing "
+"database schema \"matches\" your mapping documents. Note that "
+"<literal>SchemaValidator</literal> depends heavily upon the JDBC metadata "
+"API, so it will not work with all JDBC drivers. This tool is extremely "
+"useful for testing."
+msgstr ""
+"<literal>SchemaValidator</literal>工具会比较数据库现状是否与映射文档“匹配”。"
+"注意,<literal>SchemaValidator</literal> 严重依赖于JDBC的metadata API,因此不"
+"是对所有的JDBC驱动都适用。这一工具在测试的时候特别有用。"
 
-#: index.docbook:486
-msgid "<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <literal>org.hibernate.tool.hbm2ddl.SchemaValidator</literal> <emphasis>options mapping_files</emphasis>"
-msgstr "<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <literal>org.hibernate.tool.hbm2ddl.SchemaValidator</literal> <emphasis>options mapping_files</emphasis>"
+#. Tag: para
+#: toolset_guide.xml:486
+#, no-c-format
+msgid ""
+"<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> "
+"<literal>org.hibernate.tool.hbm2ddl.SchemaValidator</literal> "
+"<emphasis>options mapping_files</emphasis>"
+msgstr ""
 
-#: index.docbook:492
+#. Tag: title
+#: toolset_guide.xml:492
+#, no-c-format
 msgid "<literal>SchemaValidator</literal> Command Line Options"
 msgstr "<literal>SchemaValidator</literal>命令行参数"
 
-#: index.docbook:519
+#. Tag: para
+#: toolset_guide.xml:519
+#, no-c-format
 msgid "You may embed <literal>SchemaValidator</literal> in your application:"
 msgstr "你可以在你的应用程序中嵌入<literal>SchemaValidator</literal>:"
 
-#: index.docbook:523
+#. Tag: programlisting
+#: toolset_guide.xml:523
+#, no-c-format
 msgid ""
-      "<![CDATA[Configuration cfg = ....;\n"
-      "new SchemaValidator(cfg).validate();]]>"
+"<![CDATA[Configuration cfg = ....;\n"
+"new SchemaValidator(cfg).validate();]]>"
 msgstr ""
-      "<![CDATA[Configuration cfg = ....;\n"
-      "new SchemaValidator(cfg).validate();]]>"
 
-#: index.docbook:528
+#. Tag: title
+#: toolset_guide.xml:528
+#, no-c-format
 msgid "Using Ant for schema validation"
 msgstr "使用Ant进行schema校验"
 
-#: index.docbook:530
+#. Tag: para
+#: toolset_guide.xml:530
+#, no-c-format
 msgid "You can call <literal>SchemaValidator</literal> from the Ant script:"
 msgstr "你可以在Ant脚本中调用<literal>SchemaValidator</literal>:"
 
-#: index.docbook:534
+#. Tag: programlisting
+#: toolset_guide.xml:534
+#, no-c-format
 msgid ""
-      "<![CDATA[<target name=\"schemavalidate\">\n"
-      "    <taskdef name=\"schemavalidator\"\n"
-      "        classname=\"org.hibernate.tool.hbm2ddl.SchemaValidatorTask\"\n"
-      "        classpathref=\"class.path\"/>\n"
-      "    \n"
-      "    <schemavalidator\n"
-      "        properties=\"hibernate.properties\">\n"
-      "        <fileset dir=\"src\">\n"
-      "            <include name=\"**/*.hbm.xml\"/>\n"
-      "        </fileset>\n"
-      "    </schemavalidator>\n"
-      "</target>]]>"
+"<![CDATA[<target name=\"schemavalidate\">\n"
+"    <taskdef name=\"schemavalidator\"\n"
+"        classname=\"org.hibernate.tool.hbm2ddl.SchemaValidatorTask\"\n"
+"        classpathref=\"class.path\"/>\n"
+"    \n"
+"    <schemavalidator\n"
+"        properties=\"hibernate.properties\">\n"
+"        <fileset dir=\"src\">\n"
+"            <include name=\"**/*.hbm.xml\"/>\n"
+"        </fileset>\n"
+"    </schemavalidator>\n"
+"</target>]]>"
 msgstr ""
-      "<![CDATA[<target name=\"schemavalidate\">\n"
-      "    <taskdef name=\"schemavalidator\"\n"
-      "        classname=\"org.hibernate.tool.hbm2ddl.SchemaValidatorTask\"\n"
-      "        classpathref=\"class.path\"/>\n"
-      "    \n"
-      "    <schemavalidator\n"
-      "        properties=\"hibernate.properties\">\n"
-      "        <fileset dir=\"src\">\n"
-      "            <include name=\"**/*.hbm.xml\"/>\n"
-      "        </fileset>\n"
-      "    </schemavalidator>\n"
-      "</target>]]>"
 
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
+#~ msgid "&lt;one-to-one&gt;"
+#~ msgstr "&lt;one-to-one&gt;"
 
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
+#~ msgid "&lt;many-to-one&gt;"
+#~ msgstr "&lt;many-to-one&gt;"
 
+#~ msgid "&lt;key&gt;"
+#~ msgstr "&lt;key&gt;"
+
+#~ msgid "&lt;many-to-many&gt;"
+#~ msgstr "&lt;many-to-many&gt;"
+
+#~ msgid "inverse=\"true\""
+#~ msgstr "inverse=\"true\""
+
+#~ msgid "SchemaExport"
+#~ msgstr "SchemaExport"
+
+#~ msgid "&lt;column&gt;"
+#~ msgstr "&lt;column&gt;"
+
+#~ msgid "java -cp"
+#~ msgstr "java -cp"
+
+#~ msgid "hibernate_classpaths"
+#~ msgstr "hibernate_classpaths"
+
+#~ msgid "org.hibernate.tool.hbm2ddl.SchemaExport"
+#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaExport"
+
+#~ msgid "options mapping_files"
+#~ msgstr "options mapping_files"
+
+#~ msgid "NamingStrategy"
+#~ msgstr "NamingStrategy"
+
+#, fuzzy
+#~ msgid "select a <placeholder-1/>"
+#~ msgstr ""
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "选择一个命名策略(<placeholder-1/>)\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "选择一个命名策略 (<placeholder-1/>)\n"
+#~ "#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n"
+#~ "选择一个命名策略 (<placeholder-1/>)"
+
+#~ msgid "org.hibernate.tool.hbm2ddl.SchemaUpdate"
+#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaUpdate"
+
+#~ msgid ".cfg.xml"
+#~ msgstr ".cfg.xml"
+
+#~ msgid "org.hibernate.tool.hbm2ddl.SchemaValidator"
+#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaValidator"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/transactions.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/transactions.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/transactions.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,673 +1,1934 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: transactions.xml:5
+#, no-c-format
 msgid "Transactions And Concurrency"
-msgstr ""
+msgstr "事务和并发"
 
-#: index.docbook:7
-msgid "The most important point about Hibernate and concurrency control is that it is very easy to understand. Hibernate directly uses JDBC connections and JTA resources without adding any additional locking behavior. We highly recommend you spend some time with the JDBC, ANSI, and transaction isolation specification of your database management system."
+#. Tag: para
+#: transactions.xml:7
+#, no-c-format
+msgid ""
+"The most important point about Hibernate and concurrency control is that it "
+"is very easy to understand. Hibernate directly uses JDBC connections and JTA "
+"resources without adding any additional locking behavior. We highly "
+"recommend you spend some time with the JDBC, ANSI, and transaction isolation "
+"specification of your database management system."
 msgstr ""
+"Hibernate的事务和并发控制很容易掌握。Hibernate直接使用JDBC连接和JTA资源,不添"
+"加任何附加锁定 行为。我们强烈推荐你花点时间了解JDBC编程,ANSI SQL查询语言和你"
+"使用 的数据库系统的事务隔离规范。"
 
-#: index.docbook:14
-msgid "Hibernate does not lock objects in memory. Your application can expect the behavior as defined by the isolation level of your database transactions. Note that thanks to the <literal>Session</literal>, which is also a transaction-scoped cache, Hibernate provides repeatable reads for lookup by identifier and entity queries (not reporting queries that return scalar values)."
+#. Tag: para
+#: transactions.xml:14
+#, no-c-format
+msgid ""
+"Hibernate does not lock objects in memory. Your application can expect the "
+"behavior as defined by the isolation level of your database transactions. "
+"Note that thanks to the <literal>Session</literal>, which is also a "
+"transaction-scoped cache, Hibernate provides repeatable reads for lookup by "
+"identifier and entity queries (not reporting queries that return scalar "
+"values)."
 msgstr ""
+"Hibernate不锁定内存中的对象。你的应用程序会按照你的数据库事务的隔离级别规定的"
+"那样运作。幸亏有了<literal>Session</literal>,使得Hibernate通过标识符查找,和"
+"实体查询(不是返回标量值的报表查询)提供了可重复的读取(Repeatable reads)功"
+"能,<literal>Session</literal>同时也是事务范围内的缓存(cache)。"
 
-#: index.docbook:22
-msgid "In addition to versioning for automatic optimistic concurrency control, Hibernate also offers a (minor) API for pessimistic locking of rows, using the <literal>SELECT FOR UPDATE</literal> syntax. Optimistic concurrency control and this API are discussed later in this chapter."
+#. Tag: para
+#: transactions.xml:22
+#, no-c-format
+msgid ""
+"In addition to versioning for automatic optimistic concurrency control, "
+"Hibernate also offers a (minor) API for pessimistic locking of rows, using "
+"the <literal>SELECT FOR UPDATE</literal> syntax. Optimistic concurrency "
+"control and this API are discussed later in this chapter."
 msgstr ""
+"除了对自动乐观并发控制提供版本管理,针对行级悲观锁定,Hibernate也提供了辅助的"
+"(较小的)API,它使用了 <literal>SELECT FOR UPDATE</literal>的SQL语法。本章后"
+"面会讨论乐观并发控制和这个API。"
 
-#: index.docbook:29
-msgid "We start the discussion of concurrency control in Hibernate with the granularity of <literal>Configuration</literal>, <literal>SessionFactory</literal>, and <literal>Session</literal>, as well as database transactions and long conversations."
+#. Tag: para
+#: transactions.xml:29
+#, no-c-format
+msgid ""
+"We start the discussion of concurrency control in Hibernate with the "
+"granularity of <literal>Configuration</literal>, <literal>SessionFactory</"
+"literal>, and <literal>Session</literal>, as well as database transactions "
+"and long conversations."
 msgstr ""
+"我们从<literal>Configuration</literal>层、<literal>SessionFactory</literal>"
+"层, 和 <literal>Session</literal>层开始讨论Hibernate的并行控制、数据库事务和"
+"应用 程序的长事务。"
 
-#: index.docbook:36
+#. Tag: title
+#: transactions.xml:36
+#, no-c-format
 msgid "Session and transaction scopes"
-msgstr ""
+msgstr "Session和事务范围(transaction scope)"
 
-#: index.docbook:38
-msgid "A <literal>SessionFactory</literal> is an expensive-to-create, threadsafe object intended to be shared by all application threads. It is created once, usually on application startup, from a <literal>Configuration</literal> instance."
+#. Tag: para
+#: transactions.xml:38
+#, no-c-format
+msgid ""
+"A <literal>SessionFactory</literal> is an expensive-to-create, threadsafe "
+"object intended to be shared by all application threads. It is created once, "
+"usually on application startup, from a <literal>Configuration</literal> "
+"instance."
 msgstr ""
+"<literal>SessionFactory</literal>对象的创建代价很昂贵,它是线程安全的对象,它"
+"为所有的应用程序线程所共享。它只创建一次,通常是在应用程序启动的时候,由一个"
+"<literal>Configuraion</literal>的实例来创建。"
 
-#: index.docbook:44
-msgid "A <literal>Session</literal> is an inexpensive, non-threadsafe object that should be used once, for a single request, a conversation, single unit of work, and then discarded. A <literal>Session</literal> will not obtain a JDBC <literal>Connection</literal> (or a <literal>Datasource</literal>) unless it is needed, hence consume no resources until used."
+#. Tag: para
+#: transactions.xml:44
+#, no-c-format
+msgid ""
+"A <literal>Session</literal> is an inexpensive, non-threadsafe object that "
+"should be used once, for a single request, a conversation, single unit of "
+"work, and then discarded. A <literal>Session</literal> will not obtain a "
+"JDBC <literal>Connection</literal> (or a <literal>Datasource</literal>) "
+"unless it is needed, hence consume no resources until used."
 msgstr ""
+"<literal>Session</literal>对象的创建代价比较小,是非线程安全的,对于单个请"
+"求,单个会话、单个的 工作单元而言,它只被使用一次,然后就丢弃。只有在需要的时"
+"候,一个<literal>Session</literal>对象 才会获取一个JDBC的"
+"<literal>Connection</literal>(或一个<literal>Datasource</literal>) 对象,因"
+"此假若不使用的时候它不消费任何资源。"
 
-#: index.docbook:52
-msgid "To complete this picture you also have to think about database transactions. A database transaction has to be as short as possible, to reduce lock contention in the database. Long database transactions will prevent your application from scaling to highly concurrent load. Hence, it is almost never good design to hold a database transaction open during user think time, until the unit of work is complete."
+#. Tag: para
+#: transactions.xml:52
+#, no-c-format
+msgid ""
+"To complete this picture you also have to think about database transactions. "
+"A database transaction has to be as short as possible, to reduce lock "
+"contention in the database. Long database transactions will prevent your "
+"application from scaling to highly concurrent load. Hence, it is almost "
+"never good design to hold a database transaction open during user think "
+"time, until the unit of work is complete."
 msgstr ""
+"此外我们还要考虑数据库事务。数据库事务应该尽可能的短,降低数据库中的锁争用。 "
+"数据库长事务会阻止你的应用程序扩展到高的并发负载。因此,假若在用户思考期间让"
+"数据库事务开着,直到整个工作单元完成才关闭这个事务,这绝不是一个好的设计。"
 
-#: index.docbook:61
-msgid "What is the scope of a unit of work? Can a single Hibernate <literal>Session</literal> span several database transactions or is this a one-to-one relationship of scopes? When should you open and close a <literal>Session</literal> and how do you demarcate the database transaction boundaries?"
+#. Tag: para
+#: transactions.xml:61
+#, no-c-format
+msgid ""
+"What is the scope of a unit of work? Can a single Hibernate "
+"<literal>Session</literal> span several database transactions or is this a "
+"one-to-one relationship of scopes? When should you open and close a "
+"<literal>Session</literal> and how do you demarcate the database transaction "
+"boundaries?"
 msgstr ""
+"一个操作单元(Unit of work)的范围是多大?单个的Hibernate <literal>Session</"
+"literal>能跨越多个 数据库事务吗?还是一个<literal>Session</literal>的作用范围"
+"对应一个数据库事务的范围?应该何时打开 <literal>Session</literal>,何时关闭"
+"<literal>Session</literal>?,你又如何划分数据库事务的边界呢?"
 
-#: index.docbook:69
+#. Tag: title
+#: transactions.xml:69
+#, no-c-format
 msgid "Unit of work"
-msgstr ""
+msgstr "操作单元(Unit of work)"
 
-#: index.docbook:71
-msgid "First, don't use the <emphasis>session-per-operation</emphasis> antipattern, that is, don't open and close a <literal>Session</literal> for every simple database call in a single thread! Of course, the same is true for database transactions. Database calls in an application are made using a planned sequence, they are grouped into atomic units of work. (Note that this also means that auto-commit after every single SQL statement is useless in an application, this mode is intended for ad-hoc SQL console work. Hibernate disables, or expects the application server to do so, auto-commit mode immediately.) Database transactions are never optional, all communication with a database has to occur inside a transaction, no matter if you read or write data. As explained, auto-commit behavior for reading data should be avoided, as many small transactions are unlikely to perform better than one clearly defined unit of work. The latter is also much more maintainable and extensible."
+#. Tag: para
+#: transactions.xml:71
+#, no-c-format
+msgid ""
+"First, don't use the <emphasis>session-per-operation</emphasis> antipattern, "
+"that is, don't open and close a <literal>Session</literal> for every simple "
+"database call in a single thread! Of course, the same is true for database "
+"transactions. Database calls in an application are made using a planned "
+"sequence, they are grouped into atomic units of work. (Note that this also "
+"means that auto-commit after every single SQL statement is useless in an "
+"application, this mode is intended for ad-hoc SQL console work. Hibernate "
+"disables, or expects the application server to do so, auto-commit mode "
+"immediately.) Database transactions are never optional, all communication "
+"with a database has to occur inside a transaction, no matter if you read or "
+"write data. As explained, auto-commit behavior for reading data should be "
+"avoided, as many small transactions are unlikely to perform better than one "
+"clearly defined unit of work. The latter is also much more maintainable and "
+"extensible."
 msgstr ""
+"首先,别用<emphasis>session-per-operation</emphasis>这种反模式了,也就是说,"
+"在单个线程中, 不要因为一次简单的数据库调用,就打开和关闭一次"
+"<literal>Session</literal>!数据库事务也是如此。 应用程序中的数据库调用是按照"
+"计划好的次序,分组为原子的操作单元。(注意,这也意味着,应用程 序中,在单个的"
+"SQL语句发送之后,自动事务提交(auto-commit)模式失效了。这种模式专门为SQL控制台"
+"操作设计的。 Hibernate禁止立即自动事务提交模式,或者期望应用服务器禁止立即自"
+"动事务提交模式。)数据库事务绝不是可有可无的,任何与数据库之间的通讯都必须在"
+"某个事务中进行,不管你是在读还是在写数据。对读数据而言,应该避免auto-commit行"
+"为,因为很多小的事务比一个清晰定义的工作单元性能差。后者也更容易维护和扩展。"
 
-#: index.docbook:87
-msgid "The most common pattern in a multi-user client/server application is <emphasis>session-per-request</emphasis>. In this model, a request from the client is send to the server (where the Hibernate persistence layer runs), a new Hibernate <literal>Session</literal> is opened, and all database operations are executed in this unit of work. Once the work has been completed (and the response for the client has been prepared), the session is flushed and closed. You would also use a single database transaction to serve the clients request, starting and committing it when you open and close the <literal>Session</literal>. The relationship between the two is one-to-one and this model is a perfect fit for many applications."
+#. Tag: para
+#: transactions.xml:87
+#, no-c-format
+msgid ""
+"The most common pattern in a multi-user client/server application is "
+"<emphasis>session-per-request</emphasis>. In this model, a request from the "
+"client is send to the server (where the Hibernate persistence layer runs), a "
+"new Hibernate <literal>Session</literal> is opened, and all database "
+"operations are executed in this unit of work. Once the work has been "
+"completed (and the response for the client has been prepared), the session "
+"is flushed and closed. You would also use a single database transaction to "
+"serve the clients request, starting and committing it when you open and "
+"close the <literal>Session</literal>. The relationship between the two is "
+"one-to-one and this model is a perfect fit for many applications."
 msgstr ""
+"在多用户的client/server应用程序中,最常用的模式是 <emphasis>每个请求一个会话"
+"(session-per-request)</emphasis>。 在这种模式下,来自客户端的请求被发送到服务"
+"器端(即Hibernate持久化层运行的地方),一 个新的Hibernate <literal>Session</"
+"literal>被打开,并且执行这个操作单元中所有的数据库操作。 一旦操作完成(同时对"
+"客户端的响应也准备就绪),session被同步,然后关闭。你也可以使用单 个数据库事"
+"务来处理客户端请求,在你打开<literal>Session</literal>之后启动事务,在你关闭 "
+"<literal>Session</literal>之前提交事务。会话和请求之间的关系是一对一的关系,"
+"这种模式对 于大多数应用程序来说是很棒的。"
 
-#: index.docbook:99
-msgid "The challenge lies in the implementation. Hibernate provides built-in management of the \"current session\" to simplify this pattern. All you have to do is start a transaction when a server request has to be processed, and end the transaction before the response is send to the client. You can do this in any way you like, common solutions are <literal>ServletFilter</literal>, AOP interceptor with a pointcut on the service methods, or a proxy/interception container. An EJB container is a standardized way to implement cross-cutting aspects such as transaction demarcation on EJB session beans, declaratively with CMT. If you decide to use programmatic transaction demarcation, prefer the Hibernate <literal>Transaction</literal> API shown later in this chapter, for ease of use and code portability."
+#. Tag: para
+#: transactions.xml:99
+#, no-c-format
+msgid ""
+"The challenge lies in the implementation. Hibernate provides built-in "
+"management of the \"current session\" to simplify this pattern. All you have "
+"to do is start a transaction when a server request has to be processed, and "
+"end the transaction before the response is send to the client. You can do "
+"this in any way you like, common solutions are <literal>ServletFilter</"
+"literal>, AOP interceptor with a pointcut on the service methods, or a proxy/"
+"interception container. An EJB container is a standardized way to implement "
+"cross-cutting aspects such as transaction demarcation on EJB session beans, "
+"declaratively with CMT. If you decide to use programmatic transaction "
+"demarcation, prefer the Hibernate <literal>Transaction</literal> API shown "
+"later in this chapter, for ease of use and code portability."
 msgstr ""
+"实现才是真正的挑战。Hibernate内置了对\"当前session(current session)\" 的管"
+"理,用于简化此模式。你要做的一切就是在服务器端要处理请求的时候,开启事务,在"
+"响应发送给客户之前结束事务。你可以用任何方式来完成这一操作,通常的方案有"
+"<literal>ServletFilter</literal>,在service方法中进行pointcut的AOP拦截器,或"
+"者proxy/interception容器。EJB容器是实现横切诸如EJB session bean上的事务分界,"
+"用CMT对事务进行声明等方面的标准手段。假若你决定使用编程式的事务分界,请参考本"
+"章后面讲到的Hibernate <literal>Transaction</literal> API,这对易用性和代码可"
+"移植性都有好处。"
 
-#: index.docbook:112
-msgid "Your application code can access a \"current session\" to process the request by simply calling <literal>sessionFactory.getCurrentSession()</literal> anywhere and as often as needed. You will always get a <literal>Session</literal> scoped to the current database transaction. This has to be configured for either resource-local or JTA environments, see <xref linkend=\"architecture-current-session\"/>."
+#. Tag: para
+#: transactions.xml:112
+#, no-c-format
+msgid ""
+"Your application code can access a \"current session\" to process the "
+"request by simply calling <literal>sessionFactory.getCurrentSession()</"
+"literal> anywhere and as often as needed. You will always get a "
+"<literal>Session</literal> scoped to the current database transaction. This "
+"has to be configured for either resource-local or JTA environments, see "
+"<xref linkend=\"architecture-current-session\"/>."
 msgstr ""
+"在任何时间,任何地方,你的应用代码可以通过简单的调用<literal>sessionFactory."
+"getCurrentSession()</literal>来访问\"当前session\",用于处理请求。你总是会得"
+"到当前数据库事务范围内的<literal>Session</literal>。在使用本地资源或JTA环境"
+"时,必须配置它,请参见<xref linkend=\"architecture-current-session\"/>。"
 
-#: index.docbook:120
-msgid "Sometimes it is convenient to extend the scope of a <literal>Session</literal> and database transaction until the \"view has been rendered\". This is especially useful in servlet applications that utilize a separate rendering phase after the request has been processed. Extending the database transaction until view rendering is complete is easy to do if you implement your own interceptor. However, it is not easily doable if you rely on EJBs with container-managed transactions, as a transaction will be completed when an EJB method returns, before rendering of any view can start. See the Hibernate website and forum for tips and examples around this <emphasis>Open Session in View</emphasis> pattern."
+#. Tag: para
+#: transactions.xml:120
+#, no-c-format
+msgid ""
+"Sometimes it is convenient to extend the scope of a <literal>Session</"
+"literal> and database transaction until the \"view has been rendered\". This "
+"is especially useful in servlet applications that utilize a separate "
+"rendering phase after the request has been processed. Extending the database "
+"transaction until view rendering is complete is easy to do if you implement "
+"your own interceptor. However, it is not easily doable if you rely on EJBs "
+"with container-managed transactions, as a transaction will be completed when "
+"an EJB method returns, before rendering of any view can start. See the "
+"Hibernate website and forum for tips and examples around this <emphasis>Open "
+"Session in View</emphasis> pattern."
 msgstr ""
+"有时,将<literal>Session</literal>和数据库事务的边界延伸到\"展示层被渲染后"
+"\"会带来便利。有些serlvet应用程序在对请求进行处理后,有个单独的渲染期,这种延"
+"伸对这种程序特别有用。假若你实现你自己的拦截器,把事务边界延伸到展示层渲染结"
+"束后非常容易。然而,假若你依赖有容器管理事务的EJB,这就不太容易了,因为事务会"
+"在EJB方法返回后结束,而那是在任何展示层渲染开始之前。请访问Hibernate网站和论"
+"坛,你可以找到<emphasis>Open Session in View</emphasis>这一模式的提示和示例。"
 
-#: index.docbook:135
+#. Tag: title
+#: transactions.xml:135
+#, no-c-format
 msgid "Long conversations"
-msgstr ""
+msgstr "长对话"
 
-#: index.docbook:137
-msgid "The session-per-request pattern is not the only useful concept you can use to design units of work. Many business processes require a whole series of interactions with the user interleaved with database accesses. In web and enterprise applications it is not acceptable for a database transaction to span a user interaction. Consider the following example:"
+#. Tag: para
+#: transactions.xml:137
+#, no-c-format
+msgid ""
+"The session-per-request pattern is not the only useful concept you can use "
+"to design units of work. Many business processes require a whole series of "
+"interactions with the user interleaved with database accesses. In web and "
+"enterprise applications it is not acceptable for a database transaction to "
+"span a user interaction. Consider the following example:"
 msgstr ""
+"session-per-request模式不仅仅是一个可以用来设计操作单元的有用概念。很多业务处"
+"理都需 要一系列完整的与用户之间的交互,而这些用户是指对数据库有交叉访问的用"
+"户。在基于web的应用和企业 应用中,跨用户交互的数据库事务是无法接受的。考虑下"
+"面的例子:"
 
-#: index.docbook:147
-msgid "The first screen of a dialog opens, the data seen by the user has been loaded in a particular <literal>Session</literal> and database transaction. The user is free to modify the objects."
+#. Tag: para
+#: transactions.xml:147
+#, no-c-format
+msgid ""
+"The first screen of a dialog opens, the data seen by the user has been "
+"loaded in a particular <literal>Session</literal> and database transaction. "
+"The user is free to modify the objects."
 msgstr ""
+"在界面的第一屏,打开对话框,用户所看到的数据是被一个特定的 <literal>Session</"
+"literal> 和数据 库事务载入(load)的。用户可以随意修改对话框中的数据对象。"
 
-#: index.docbook:154
-msgid "The user clicks \"Save\" after 5 minutes and expects his modifications to be made persistent; he also expects that he was the only person editing this information and that no conflicting modification can occur."
+#. Tag: para
+#: transactions.xml:154
+#, no-c-format
+msgid ""
+"The user clicks \"Save\" after 5 minutes and expects his modifications to be "
+"made persistent; he also expects that he was the only person editing this "
+"information and that no conflicting modification can occur."
 msgstr ""
+"5分钟后,用户点击“保存”,期望所做出的修改被持久化;同时他也期望自己是唯一修改"
+"这个信息的人,不会出现 修改冲突。"
 
-#: index.docbook:162
-msgid "We call this unit of work, from the point of view of the user, a long running <emphasis>conversation</emphasis> (or <emphasis>application transaction</emphasis>). There are many ways how you can implement this in your application."
+#. Tag: para
+#: transactions.xml:162
+#, no-c-format
+msgid ""
+"We call this unit of work, from the point of view of the user, a long "
+"running <emphasis>conversation</emphasis> (or <emphasis>application "
+"transaction</emphasis>). There are many ways how you can implement this in "
+"your application."
 msgstr ""
+"从用户的角度来看,我们把这个操作单元称为长时间运行的<emphasis>对话</emphasis>"
+"(conversation),或者(or <emphasis>应用事务</emphasis>,application "
+"transaction)。 在你的应用程序中,可以有很多种方法来实现它。"
 
-#: index.docbook:168
-msgid "A first naive implementation might keep the <literal>Session</literal> and database transaction open during user think time, with locks held in the database to prevent concurrent modification, and to guarantee isolation and atomicity. This is of course an anti-pattern, since lock contention would not allow the application to scale with the number of concurrent users."
+#. Tag: para
+#: transactions.xml:168
+#, no-c-format
+msgid ""
+"A first naive implementation might keep the <literal>Session</literal> and "
+"database transaction open during user think time, with locks held in the "
+"database to prevent concurrent modification, and to guarantee isolation and "
+"atomicity. This is of course an anti-pattern, since lock contention would "
+"not allow the application to scale with the number of concurrent users."
 msgstr ""
+"头一个幼稚的做法是,在用户思考的过程中,保持<literal>Session</literal>和数据"
+"库事务是打开的, 保持数据库锁定,以阻止并发修改,从而保证数据库事务隔离级别和"
+"原子操作。这种方式当然是一个反模式, 因为锁争用会导致应用程序无法扩展并发用户"
+"的数目。"
 
-#: index.docbook:176
-msgid "Clearly, we have to use several database transactions to implement the converastion. In this case, maintaining isolation of business processes becomes the partial responsibility of the application tier. A single conversation usually spans several database transactions. It will be atomic if only one of these database transactions (the last one) stores the updated data, all others simply read data (e.g. in a wizard-style dialog spanning several request/response cycles). This is easier to implement than it might sound, especially if you use Hibernate's features:"
+#. Tag: para
+#: transactions.xml:176
+#, no-c-format
+msgid ""
+"Clearly, we have to use several database transactions to implement the "
+"converastion. In this case, maintaining isolation of business processes "
+"becomes the partial responsibility of the application tier. A single "
+"conversation usually spans several database transactions. It will be atomic "
+"if only one of these database transactions (the last one) stores the updated "
+"data, all others simply read data (e.g. in a wizard-style dialog spanning "
+"several request/response cycles). This is easier to implement than it might "
+"sound, especially if you use Hibernate's features:"
 msgstr ""
+"很明显,我们必须使用多个数据库事务来实现这个对话。在这个例子中,维护业务处理"
+"的 事务隔离变成了应用程序层的部分责任。一个对话通常跨越多个数据库事务。如果仅"
+"仅只有一 个数据库事务(最后的那个事务)保存更新过的数据,而所有其他事务只是单"
+"纯的读取数据(例如在一 个跨越多个请求/响应周期的向导风格的对话框中),那么应"
+"用程序事务将保证其原子性。这种方式比听 起来还要容易实现,特别是当你使用了"
+"Hibernate的下述特性的时候:"
 
-#: index.docbook:189
-msgid "<emphasis>Automatic Versioning</emphasis> - Hibernate can do automatic optimistic concurrency control for you, it can automatically detect if a concurrent modification occured during user think time. Usually we only check at the end of the conversation."
+#. Tag: para
+#: transactions.xml:189
+#, no-c-format
+msgid ""
+"<emphasis>Automatic Versioning</emphasis> - Hibernate can do automatic "
+"optimistic concurrency control for you, it can automatically detect if a "
+"concurrent modification occured during user think time. Usually we only "
+"check at the end of the conversation."
 msgstr ""
+"<emphasis>自动版本化</emphasis> - Hibernate能够自动进行乐观并发控制 ,如果在"
+"用户思考 的过程中发生并发修改,Hibernate能够自动检测到。一般我们只在对话结束"
+"时才检查。"
 
-#: index.docbook:197
-msgid "<emphasis>Detached Objects</emphasis> - If you decide to use the already discussed <emphasis>session-per-request</emphasis> pattern, all loaded instances will be in detached state during user think time. Hibernate allows you to reattach the objects and persist the modifications, the pattern is called <emphasis>session-per-request-with-detached-objects</emphasis>. Automatic versioning is used to isolate concurrent modifications."
+#. Tag: para
+#: transactions.xml:197
+#, no-c-format
+msgid ""
+"<emphasis>Detached Objects</emphasis> - If you decide to use the already "
+"discussed <emphasis>session-per-request</emphasis> pattern, all loaded "
+"instances will be in detached state during user think time. Hibernate allows "
+"you to reattach the objects and persist the modifications, the pattern is "
+"called <emphasis>session-per-request-with-detached-objects</emphasis>. "
+"Automatic versioning is used to isolate concurrent modifications."
 msgstr ""
+"<emphasis>脱管对象</emphasis>(Detached Objects)- 如果你决定采用前面已经讨论"
+"过的 <emphasis>session-per-request</emphasis>模式,所有载入的实例在用户思考的"
+"过程 中都处于与Session脱离的状态。Hibernate允许你把与Session脱离的对象重新关"
+"联到Session 上,并且对修改进行持久化,这种模式被称为 <emphasis>session-per-"
+"request-with-detached-objects</emphasis>。自动版本化被用来隔离并发修改。"
 
-#: index.docbook:207
-msgid "<emphasis>Extended (or Long) Session</emphasis> - The Hibernate <literal>Session</literal> may be disconnected from the underlying JDBC connection after the database transaction has been committed, and reconnected when a new client request occurs. This pattern is known as <emphasis>session-per-conversation</emphasis> and makes even reattachment unnecessary. Automatic versioning is used to isolate concurrent modifications and the <literal>Session</literal> is usually not allowed to be flushed automatically, but explicitely."
+#. Tag: para
+#: transactions.xml:207
+#, no-c-format
+msgid ""
+"<emphasis>Extended (or Long) Session</emphasis> - The Hibernate "
+"<literal>Session</literal> may be disconnected from the underlying JDBC "
+"connection after the database transaction has been committed, and "
+"reconnected when a new client request occurs. This pattern is known as "
+"<emphasis>session-per-conversation</emphasis> and makes even reattachment "
+"unnecessary. Automatic versioning is used to isolate concurrent "
+"modifications and the <literal>Session</literal> is usually not allowed to "
+"be flushed automatically, but explicitely."
 msgstr ""
+"<emphasis>Extended (or Long) Session</emphasis> - Hibernate 的"
+"<literal>Session</literal> 可以在数据库事务提交之后和底层的JDBC连接断开,当一"
+"个新的客户端请求到来的时候,它又重新连接上底层的 JDBC连接。这种模式被称之为"
+"<emphasis>session-per-conversation</emphasis>,这种情况可 能会造成不必要的"
+"Session和JDBC连接的重新关联。自动版本化被用来隔离并发修改, <literal>Session</"
+"literal>通常不允许自动flush,而是明确flush。"
 
-#: index.docbook:220
-msgid "Both <emphasis>session-per-request-with-detached-objects</emphasis> and <emphasis>session-per-conversation</emphasis> have advantages and disadvantages, we discuss them later in this chapter in the context of optimistic concurrency control."
+#. Tag: para
+#: transactions.xml:220
+#, no-c-format
+msgid ""
+"Both <emphasis>session-per-request-with-detached-objects</emphasis> and "
+"<emphasis>session-per-conversation</emphasis> have advantages and "
+"disadvantages, we discuss them later in this chapter in the context of "
+"optimistic concurrency control."
 msgstr ""
+"<emphasis>session-per-request-with-detached-objects</emphasis> 和 "
+"<emphasis>session-per-conversation</emphasis> 各有优缺点,我们在本章后面乐观"
+"并发 控制那部分再进行讨论。"
 
-#: index.docbook:229
+#. Tag: title
+#: transactions.xml:229
+#, no-c-format
 msgid "Considering object identity"
-msgstr ""
+msgstr "关注对象标识(Considering object identity)"
 
-#: index.docbook:231
-msgid "An application may concurrently access the same persistent state in two different <literal>Session</literal>s. However, an instance of a persistent class is never shared between two <literal>Session</literal> instances. Hence there are two different notions of identity:"
+#. Tag: para
+#: transactions.xml:231
+#, no-c-format
+msgid ""
+"An application may concurrently access the same persistent state in two "
+"different <literal>Session</literal>s. However, an instance of a persistent "
+"class is never shared between two <literal>Session</literal> instances. "
+"Hence there are two different notions of identity:"
 msgstr ""
+"应用程序可能在两个不同的<literal>Session</literal>中并发访问同一持久化状态,"
+"但是, 一个持久化类的实例无法在两个 <literal>Session</literal>中共享。因此有"
+"两种不同的标识语义:"
 
-#: index.docbook:240
+#. Tag: term
+#: transactions.xml:240
+#, no-c-format
 msgid "Database Identity"
-msgstr ""
+msgstr "数据库标识"
 
-#: index.docbook:243
+#. Tag: literal
+#: transactions.xml:243
+#, no-c-format
 msgid "foo.getId().equals( bar.getId() )"
-msgstr ""
+msgstr "foo.getId().equals( bar.getId() )"
 
-#: index.docbook:248
+#. Tag: term
+#: transactions.xml:248
+#, no-c-format
 msgid "JVM Identity"
-msgstr ""
+msgstr "JVM 标识"
 
-#: index.docbook:251
+#. Tag: literal
+#: transactions.xml:251
+#, no-c-format
 msgid "foo==bar"
-msgstr ""
+msgstr "foo==bar"
 
-#: index.docbook:257
-msgid "Then for objects attached to a <emphasis>particular</emphasis> <literal>Session</literal> (i.e. in the scope of a <literal>Session</literal>) the two notions are equivalent, and JVM identity for database identity is guaranteed by Hibernate. However, while the application might concurrently access the \"same\" (persistent identity) business object in two different sessions, the two instances will actually be \"different\" (JVM identity). Conflicts are resolved using (automatic versioning) at flush/commit time, using an optimistic approach."
+#. Tag: para
+#: transactions.xml:257
+#, fuzzy, no-c-format
+msgid ""
+"Then for objects attached to a <emphasis>particular</emphasis> "
+"<literal>Session</literal> (i.e. in the scope of a <literal>Session</"
+"literal>) the two notions are equivalent, and JVM identity for database "
+"identity is guaranteed by Hibernate. However, while the application might "
+"concurrently access the \"same\" (persistent identity) business object in "
+"two different sessions, the two instances will actually be \"different"
+"\" (JVM identity). Conflicts are resolved using (automatic versioning) at "
+"flush/commit time, using an optimistic approach."
 msgstr ""
+"对于那些关联到 <emphasis>特定</emphasis><literal>Session</literal> (也就是在"
+"单个<literal>Session</literal>的范围内)上的对象来说,这 两种标识的语义是等价"
+"的,与数据库标识对应的JVM标识是由Hibernate来保 证的。不过,当应用程序在两个不"
+"同的session中并发访问具有同一持久化标 识的业务对象实例的时候,这个业务对象的"
+"两个实例事实上是不相同的(从 JVM识别来看)。这种冲突可以通过在同步和提交的时"
+"候使用自动版本化和乐 观锁定方法来解决。"
 
-#: index.docbook:266
-msgid "This approach leaves Hibernate and the database to worry about concurrency; it also provides the best scalability, since guaranteeing identity in single-threaded units of work only doesn't need expensive locking or other means of synchronization. The application never needs to synchronize on any business object, as long as it sticks to a single thread per <literal>Session</literal>. Within a <literal>Session</literal> the application may safely use <literal>==</literal> to compare objects."
+#. Tag: para
+#: transactions.xml:266
+#, no-c-format
+msgid ""
+"This approach leaves Hibernate and the database to worry about concurrency; "
+"it also provides the best scalability, since guaranteeing identity in single-"
+"threaded units of work only doesn't need expensive locking or other means of "
+"synchronization. The application never needs to synchronize on any business "
+"object, as long as it sticks to a single thread per <literal>Session</"
+"literal>. Within a <literal>Session</literal> the application may safely use "
+"<literal>==</literal> to compare objects."
 msgstr ""
+"这种方式把关于并发的头疼问题留给了Hibernate和数据库;由于在单个线程内,操作单"
+"元中的对象识别不 需要代价昂贵的锁定或其他意义上的同步,因此它同时可以提供最好"
+"的可伸缩性。只要在单个线程只持有一个 <literal>Session</literal>,应用程序就不"
+"需要同步任何业务对象。在<literal>Session</literal> 的范围内,应用程序可以放心"
+"的使用<literal>==</literal>进行对象比较。"
 
-#: index.docbook:275
-msgid "However, an application that uses <literal>==</literal> outside of a <literal>Session</literal>, might see unexpected results. This might occur even in some unexpected places, for example, if you put two detached instances into the same <literal>Set</literal>. Both might have the same database identity (i.e. they represent the same row), but JVM identity is by definition not guaranteed for instances in detached state. The developer has to override the <literal>equals()</literal> and <literal>hashCode()</literal> methods in persistent classes and implement his own notion of object equality. There is one caveat: Never use the database identifier to implement equality, use a business key, a combination of unique, usually immutable, attributes. The database identifier will change if a transient object is made persistent. If the transient instance (usually together with detached instances) is held in a <literal>Set</literal>, changing the hashcode breaks the contract of t!
 he <literal>Set</literal>. Attributes for business keys don't have to be as stable as database primary keys, you only have to guarantee stability as long as the objects are in the same <literal>Set</literal>. See the Hibernate website for a more thorough discussion of this issue. Also note that this is not a Hibernate issue, but simply how Java object identity and equality has to be implemented."
+#. Tag: para
+#: transactions.xml:275
+#, no-c-format
+msgid ""
+"However, an application that uses <literal>==</literal> outside of a "
+"<literal>Session</literal>, might see unexpected results. This might occur "
+"even in some unexpected places, for example, if you put two detached "
+"instances into the same <literal>Set</literal>. Both might have the same "
+"database identity (i.e. they represent the same row), but JVM identity is by "
+"definition not guaranteed for instances in detached state. The developer has "
+"to override the <literal>equals()</literal> and <literal>hashCode()</"
+"literal> methods in persistent classes and implement his own notion of "
+"object equality. There is one caveat: Never use the database identifier to "
+"implement equality, use a business key, a combination of unique, usually "
+"immutable, attributes. The database identifier will change if a transient "
+"object is made persistent. If the transient instance (usually together with "
+"detached instances) is held in a <literal>Set</literal>, changing the "
+"hashcode breaks the contract of the <literal>Set</literal>. Attributes for "
+"business keys don't have to be as stable as database primary keys, you only "
+"have to guarantee stability as long as the objects are in the same "
+"<literal>Set</literal>. See the Hibernate website for a more thorough "
+"discussion of this issue. Also note that this is not a Hibernate issue, but "
+"simply how Java object identity and equality has to be implemented."
 msgstr ""
+"不过,应用程序在<literal>Session</literal>的外面使用<literal>==</literal>进行"
+"对象比较可能会 导致无法预期的结果。在一些无法预料的场合,例如,如果你把两个脱"
+"管对象实例放进同一个 <literal>Set</literal>的时候,就可能发生。这两个对象实例"
+"可能有同一个数据库标识(也就是说, 他们代表了表的同一行数据),从JVM标识的定"
+"义上来说,对脱管的对象而言,Hibernate无法保证他们 的的JVM标识一致。开发人员必"
+"须覆盖持久化类的<literal>equals()</literal>方法和 <literal>hashCode()</"
+"literal> 方法,从而实现自定义的对象相等语义。警告:不要使用数据库标识 来实现"
+"对象相等,应该使用业务键值,由唯一的,通常不变的属性组成。当一个瞬时对象被持"
+"久化的时 候,它的数据库标识会发生改变。如果一个瞬时对象(通常也包括脱管对象实"
+"例)被放入一 个<literal>Set</literal>,改变它的hashcode会导致与这个"
+"<literal>Set</literal>的关系中断。虽 然业务键值的属性不象数据库主键那样稳定不"
+"变,但是你只需要保证在同一个<literal>Set</literal> 中的对象属性的稳定性就足够"
+"了。请到Hibernate网站去寻求这个问题更多的详细的讨论。请注意,这不是一 个有关"
+"Hibernate的问题,而仅仅是一个关于Java对象标识和判等行为如何实现的问题。"
 
-#: index.docbook:296
+#. Tag: title
+#: transactions.xml:296
+#, no-c-format
 msgid "Common issues"
-msgstr ""
+msgstr "常见问题"
 
-#: index.docbook:298
-msgid "Never use the anti-patterns <emphasis>session-per-user-session</emphasis> or <emphasis>session-per-application</emphasis> (of course, there are rare exceptions to this rule). Note that some of the following issues might also appear with the recommended patterns, make sure you understand the implications before making a design decision:"
+#. Tag: para
+#: transactions.xml:298
+#, no-c-format
+msgid ""
+"Never use the anti-patterns <emphasis>session-per-user-session</emphasis> or "
+"<emphasis>session-per-application</emphasis> (of course, there are rare "
+"exceptions to this rule). Note that some of the following issues might also "
+"appear with the recommended patterns, make sure you understand the "
+"implications before making a design decision:"
 msgstr ""
+"决不要使用反模式<emphasis>session-per-user-session</emphasis>或者<emphasis> "
+"session-per-application</emphasis>(当然,这个规定几乎没有例外)。请注意, 下"
+"述一些问题可能也会出现在我们推荐的模式中,在你作出某个设计决定之前,请务必理"
+"解该模式的应用前提。"
 
-#: index.docbook:307
-msgid "A <literal>Session</literal> is not thread-safe. Things which are supposed to work concurrently, like HTTP requests, session beans, or Swing workers, will cause race conditions if a <literal>Session</literal> instance would be shared. If you keep your Hibernate <literal>Session</literal> in your <literal>HttpSession</literal> (discussed later), you should consider synchronizing access to your Http session. Otherwise, a user that clicks reload fast enough may use the same <literal>Session</literal> in two concurrently running threads."
+#. Tag: para
+#: transactions.xml:307
+#, no-c-format
+msgid ""
+"A <literal>Session</literal> is not thread-safe. Things which are supposed "
+"to work concurrently, like HTTP requests, session beans, or Swing workers, "
+"will cause race conditions if a <literal>Session</literal> instance would be "
+"shared. If you keep your Hibernate <literal>Session</literal> in your "
+"<literal>HttpSession</literal> (discussed later), you should consider "
+"synchronizing access to your Http session. Otherwise, a user that clicks "
+"reload fast enough may use the same <literal>Session</literal> in two "
+"concurrently running threads."
 msgstr ""
+"<literal>Session</literal> 对象是非线程安全的。如果一个<literal>Session</"
+"literal> 实例允许共享的话,那些支持并发运行的东东,例如HTTP request,session "
+"beans,或者是 Swing workers,将会导致出现资源争用(race condition)。如果在"
+"<literal>HttpSession</literal>中有 Hibernate 的<literal>Session</literal>的话"
+"(稍后讨论),你应该考虑同步访问你的Http session。 否则,只要用户足够快的点击"
+"浏览器的“刷新”,就会导致两个并发运行线程使用同一个 <literal>Session</"
+"literal>。"
 
-#: index.docbook:318
-msgid "An exception thrown by Hibernate means you have to rollback your database transaction and close the <literal>Session</literal> immediately (discussed later in more detail). If your <literal>Session</literal> is bound to the application, you have to stop the application. Rolling back the database transaction doesn't put your business objects back into the state they were at the start of the transaction. This means the database state and the business objects do get out of sync. Usually this is not a problem, because exceptions are not recoverable and you have to start over after rollback anyway."
+#. Tag: para
+#: transactions.xml:318
+#, no-c-format
+msgid ""
+"An exception thrown by Hibernate means you have to rollback your database "
+"transaction and close the <literal>Session</literal> immediately (discussed "
+"later in more detail). If your <literal>Session</literal> is bound to the "
+"application, you have to stop the application. Rolling back the database "
+"transaction doesn't put your business objects back into the state they were "
+"at the start of the transaction. This means the database state and the "
+"business objects do get out of sync. Usually this is not a problem, because "
+"exceptions are not recoverable and you have to start over after rollback "
+"anyway."
 msgstr ""
+"一个由Hibernate抛出的异常意味着你必须立即回滚数据库事务,并立即关闭"
+"<literal>Session</literal> (稍后会展开讨论)。如果你的<literal>Session</"
+"literal>绑定到一个应用程序上,你必 须停止该应用程序。回滚数据库事务并不会把你"
+"的业务对象退回到事务启动时候的状态。这 意味着数据库状态和业务对象状态不同步。"
+"通常情况下,这不是什么问题,因为异常是不可 恢复的,你必须在回滚之后重新开始执"
+"行。"
 
-#: index.docbook:330
-msgid "The <literal>Session</literal> caches every object that is in persistent state (watched and checked for dirty state by Hibernate). This means it grows endlessly until you get an OutOfMemoryException, if you keep it open for a long time or simply load too much data. One solution for this is to call <literal>clear()</literal> and <literal>evict()</literal> to manage the <literal>Session</literal> cache, but you most likely should consider a Stored Procedure if you need mass data operations. Some solutions are shown in <xref linkend=\"batch\"/>. Keeping a <literal>Session</literal> open for the duration of a user session also means a high probability of stale data."
+#. Tag: para
+#: transactions.xml:330
+#, no-c-format
+msgid ""
+"The <literal>Session</literal> caches every object that is in persistent "
+"state (watched and checked for dirty state by Hibernate). This means it "
+"grows endlessly until you get an OutOfMemoryException, if you keep it open "
+"for a long time or simply load too much data. One solution for this is to "
+"call <literal>clear()</literal> and <literal>evict()</literal> to manage the "
+"<literal>Session</literal> cache, but you most likely should consider a "
+"Stored Procedure if you need mass data operations. Some solutions are shown "
+"in <xref linkend=\"batch\"/>. Keeping a <literal>Session</literal> open for "
+"the duration of a user session also means a high probability of stale data."
 msgstr ""
+"<literal>Session</literal> 缓存了处于持久化状态的每个对象(Hibernate会监视和"
+"检查脏数据)。 这意味着,如果你让<literal>Session</literal>打开很长一段时间,"
+"或是仅仅载入了过多的数据, <literal>Session</literal>占用的内存会一直增长,直"
+"到抛出OutOfMemoryException异常。这个 问题的一个解决方法是调用<literal>clear()"
+"</literal> 和<literal>evict()</literal>来管理 <literal>Session</literal>的缓"
+"存,但是如果你需要大批量数据操作的话,最好考虑 使用存储过程。在<xref linkend="
+"\"batch\"/>中有一些解决方案。在用户会话期间一直保持 <literal>Session</"
+"literal>打开也意味着出现脏数据的可能性很高。"
 
-#: index.docbook:348
+#. Tag: title
+#: transactions.xml:348
+#, no-c-format
 msgid "Database transaction demarcation"
-msgstr ""
+msgstr "数据库事务声明"
 
-#: index.docbook:350
-msgid "Datatabase (or system) transaction boundaries are always necessary. No communication with the database can occur outside of a database transaction (this seems to confuse many developers who are used to the auto-commit mode). Always use clear transaction boundaries, even for read-only operations. Depending on your isolation level and database capabilities this might not be required but there is no downside if you always demarcate transactions explicitly. Certainly, a single database transaction is going to perform better than many small transactions, even for reading data."
+#. Tag: para
+#: transactions.xml:350
+#, no-c-format
+msgid ""
+"Datatabase (or system) transaction boundaries are always necessary. No "
+"communication with the database can occur outside of a database transaction "
+"(this seems to confuse many developers who are used to the auto-commit "
+"mode). Always use clear transaction boundaries, even for read-only "
+"operations. Depending on your isolation level and database capabilities this "
+"might not be required but there is no downside if you always demarcate "
+"transactions explicitly. Certainly, a single database transaction is going "
+"to perform better than many small transactions, even for reading data."
 msgstr ""
+"数据库(或者系统)事务的声明总是必须的。在数据库事务之外,就无法和数据库通讯"
+"(这可能会让那些习惯于 自动提交事务模式的开发人员感到迷惑)。永远使用清晰的事"
+"务声明,即使只读操作也是如此。进行 显式的事务声明并不总是需要的,这取决于你的"
+"事务隔离级别和数据库的能力,但不管怎么说,声明事务总归有益无害。当然,一个单"
+"独的数据库事务总是比很多琐碎的事务性能更好,即时对读数据而言也是一样。"
 
-#: index.docbook:360
-msgid "A Hibernate application can run in non-managed (i.e. standalone, simple Web- or Swing applications) and managed J2EE environments. In a non-managed environment, Hibernate is usually responsible for its own database connection pool. The application developer has to manually set transaction boundaries, in other words, begin, commit, or rollback database transactions himself. A managed environment usually provides container-managed transactions (CMT), with the transaction assembly defined declaratively in deployment descriptors of EJB session beans, for example. Programmatic transaction demarcation is then no longer necessary."
+#. Tag: para
+#: transactions.xml:360
+#, no-c-format
+msgid ""
+"A Hibernate application can run in non-managed (i.e. standalone, simple Web- "
+"or Swing applications) and managed J2EE environments. In a non-managed "
+"environment, Hibernate is usually responsible for its own database "
+"connection pool. The application developer has to manually set transaction "
+"boundaries, in other words, begin, commit, or rollback database transactions "
+"himself. A managed environment usually provides container-managed "
+"transactions (CMT), with the transaction assembly defined declaratively in "
+"deployment descriptors of EJB session beans, for example. Programmatic "
+"transaction demarcation is then no longer necessary."
 msgstr ""
+"一个Hibernate应用程序可以运行在非托管环境中(也就是独立运行的应用程序,简单"
+"Web应用程序, 或者Swing图形桌面应用程序),也可以运行在托管的J2EE环境中。在一"
+"个非托管环境中,Hibernate 通常自己负责管理数据库连接池。应用程序开发人员必须"
+"手工设置事务声明,换句话说,就是手工启 动,提交,或者回滚数据库事务。一个托管"
+"的环境通常提供了容器管理事务(CMT),例如事务装配通过可声 明的方式定义在EJB "
+"session beans的部署描述符中。可编程式事务声明不再需要,即使是 "
+"<literal>Session</literal> 的同步也可以自动完成。"
 
-#: index.docbook:370
-msgid "However, it is often desirable to keep your persistence layer portable between non-managed resource-local environments, and systems that can rely on JTA but use BMT instead of CMT. In both cases you'd use programmatic transaction demaracation. Hibernate offers a wrapper API called <literal>Transaction</literal> that translates into the native transaction system of your deployment environment. This API is actually optional, but we strongly encourage its use unless you are in a CMT session bean."
+#. Tag: para
+#: transactions.xml:370
+#, no-c-format
+msgid ""
+"However, it is often desirable to keep your persistence layer portable "
+"between non-managed resource-local environments, and systems that can rely "
+"on JTA but use BMT instead of CMT. In both cases you'd use programmatic "
+"transaction demaracation. Hibernate offers a wrapper API called "
+"<literal>Transaction</literal> that translates into the native transaction "
+"system of your deployment environment. This API is actually optional, but we "
+"strongly encourage its use unless you are in a CMT session bean."
 msgstr ""
+"让持久层具备可移植性是人们的理想,这种移植发生在非托管的本地资源环境,与依赖"
+"JTA但是使用BMT而非CMT的系统之间。在两种情况下你都可以使用编程式的事务管理。"
+"Hibernate提供了一套称为<literal>Transaction</literal>的封装API, 用来把你的部"
+"署环境中的本地事务管理系统转换到Hibernate事务上。这个API是可选的,但是我们强"
+"烈 推荐你使用,除非你用CMT session bean。"
 
-#: index.docbook:379
-msgid "Usually, ending a <literal>Session</literal> involves four distinct phases:"
-msgstr ""
+#. Tag: para
+#: transactions.xml:379
+#, no-c-format
+msgid ""
+"Usually, ending a <literal>Session</literal> involves four distinct phases:"
+msgstr "通常情况下,结束 <literal>Session</literal> 包含了四个不同的阶段:"
 
-#: index.docbook:385
+#. Tag: para
+#: transactions.xml:385
+#, no-c-format
 msgid "flush the session"
-msgstr ""
+msgstr "同步session(flush,刷出到磁盘)"
 
-#: index.docbook:390
+#. Tag: para
+#: transactions.xml:390
+#, no-c-format
 msgid "commit the transaction"
-msgstr ""
+msgstr "提交事务"
 
-#: index.docbook:395
+#. Tag: para
+#: transactions.xml:395
+#, no-c-format
 msgid "close the session"
-msgstr ""
+msgstr "关闭session"
 
-#: index.docbook:400
+#. Tag: para
+#: transactions.xml:400
+#, no-c-format
 msgid "handle exceptions"
-msgstr ""
+msgstr "处理异常"
 
-#: index.docbook:406
-msgid "Flushing the session has been discussed earlier, we'll now have a closer look at transaction demarcation and exception handling in both managed- and non-managed environments."
+#. Tag: para
+#: transactions.xml:406
+#, no-c-format
+msgid ""
+"Flushing the session has been discussed earlier, we'll now have a closer "
+"look at transaction demarcation and exception handling in both managed- and "
+"non-managed environments."
 msgstr ""
+"session的同步(flush,刷出)前面已经讨论过了,我们现在进一步考察在托管和非托管"
+"环境下的事务声明和异常处理。"
 
-#: index.docbook:413
+#. Tag: title
+#: transactions.xml:413
+#, no-c-format
 msgid "Non-managed environment"
-msgstr ""
+msgstr "非托管环境"
 
-#: index.docbook:415
-msgid "If a Hibernate persistence layer runs in a non-managed environment, database connections are usually handled by simple (i.e. non-DataSource) connection pools from which Hibernate obtains connections as needed. The session/transaction handling idiom looks like this:"
+#. Tag: para
+#: transactions.xml:415
+#, no-c-format
+msgid ""
+"If a Hibernate persistence layer runs in a non-managed environment, database "
+"connections are usually handled by simple (i.e. non-DataSource) connection "
+"pools from which Hibernate obtains connections as needed. The session/"
+"transaction handling idiom looks like this:"
 msgstr ""
+"如果Hibernat持久层运行在一个非托管环境中,数据库连接通常由Hibernate的简单(即"
+"非DataSource)连接池机制 来处理。session/transaction处理方式如下所示:"
 
-#: index.docbook:422
+#. Tag: programlisting
+#: transactions.xml:422
+#, no-c-format
 msgid ""
-      "<![CDATA[// Non-managed environment idiom\n"
-      "Session sess = factory.openSession();\n"
-      "Transaction tx = null;\n"
-      "try {\n"
-      "    tx = sess.beginTransaction();\n"
-      "\n"
-      "    // do some work\n"
-      "    ...\n"
-      "\n"
-      "    tx.commit();\n"
-      "}\n"
-      "catch (RuntimeException e) {\n"
-      "    if (tx != null) tx.rollback();\n"
-      "    throw e; // or display error message\n"
-      "}\n"
-      "finally {\n"
-      "    sess.close();\n"
-      "}]]>"
+"<![CDATA[// Non-managed environment idiom\n"
+"Session sess = factory.openSession();\n"
+"Transaction tx = null;\n"
+"try {\n"
+"    tx = sess.beginTransaction();\n"
+"\n"
+"    // do some work\n"
+"    ...\n"
+"\n"
+"    tx.commit();\n"
+"}\n"
+"catch (RuntimeException e) {\n"
+"    if (tx != null) tx.rollback();\n"
+"    throw e; // or display error message\n"
+"}\n"
+"finally {\n"
+"    sess.close();\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:424
-msgid "You don't have to <literal>flush()</literal> the <literal>Session</literal> explicitly - the call to <literal>commit()</literal> automatically triggers the synchronization (depending upon the <xref linkend=\"objectstate-flushing\"/>FlushMode for the session. A call to <literal>close()</literal> marks the end of a session. The main implication of <literal>close()</literal> is that the JDBC connection will be relinquished by the session. This Java code is portable and runs in both non-managed and JTA environments."
+#. Tag: para
+#: transactions.xml:424
+#, fuzzy, no-c-format
+msgid ""
+"You don't have to <literal>flush()</literal> the <literal>Session</literal> "
+"explicitly - the call to <literal>commit()</literal> automatically triggers "
+"the synchronization (depending upon the <xref linkend=\"objectstate-flushing"
+"\"/>FlushMode for the session. A call to <literal>close()</literal> marks "
+"the end of a session. The main implication of <literal>close()</literal> is "
+"that the JDBC connection will be relinquished by the session. This Java code "
+"is portable and runs in both non-managed and JTA environments."
 msgstr ""
+"你不需要显式<literal>flush()</literal><literal>Session</literal> - 对"
+"<literal>commit()</literal>的调用会自动触发session的同步(取决于session的"
+"<xref linkend=\"objectstate-flushing\">FlushMode</xref>)。调用 <literal>close"
+"()</literal> 标志session的结束。<literal>close()</literal>方法重要的暗示是,"
+"<literal>session</literal>释放了JDBC连接。这段Java代码在非托管环境下和JTA环境"
+"下都可以运行。"
 
-#: index.docbook:433
-msgid "A much more flexible solution is Hibernate's built-in \"current session\" context management, as described earlier:"
+#. Tag: para
+#: transactions.xml:433
+#, no-c-format
+msgid ""
+"A much more flexible solution is Hibernate's built-in \"current session\" "
+"context management, as described earlier:"
 msgstr ""
+"更加灵活的方案是Hibernate内置的\"current session\"上下文管理,前文已经讲过:"
 
-#: index.docbook:438
+#. Tag: programlisting
+#: transactions.xml:438
+#, no-c-format
 msgid ""
-      "<![CDATA[// Non-managed environment idiom with getCurrentSession()\n"
-      "try {\n"
-      "    factory.getCurrentSession().beginTransaction();\n"
-      "\n"
-      "    // do some work\n"
-      "    ...\n"
-      "\n"
-      "    factory.getCurrentSession().getTransaction().commit();\n"
-      "}\n"
-      "catch (RuntimeException e) {\n"
-      "    factory.getCurrentSession().getTransaction().rollback();\n"
-      "    throw e; // or display error message\n"
-      "}]]>"
+"<![CDATA[// Non-managed environment idiom with getCurrentSession()\n"
+"try {\n"
+"    factory.getCurrentSession().beginTransaction();\n"
+"\n"
+"    // do some work\n"
+"    ...\n"
+"\n"
+"    factory.getCurrentSession().getTransaction().commit();\n"
+"}\n"
+"catch (RuntimeException e) {\n"
+"    factory.getCurrentSession().getTransaction().rollback();\n"
+"    throw e; // or display error message\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:440
-msgid "You will very likely never see these code snippets in a regular application; fatal (system) exceptions should always be caught at the \"top\". In other words, the code that executes Hibernate calls (in the persistence layer) and the code that handles <literal>RuntimeException</literal> (and usually can only clean up and exit) are in different layers. The current context management by Hibernate can significantly simplify this design, as all you need is access to a <literal>SessionFactory</literal>. Exception handling is discussed later in this chapter."
+#. Tag: para
+#: transactions.xml:440
+#, no-c-format
+msgid ""
+"You will very likely never see these code snippets in a regular application; "
+"fatal (system) exceptions should always be caught at the \"top\". In other "
+"words, the code that executes Hibernate calls (in the persistence layer) and "
+"the code that handles <literal>RuntimeException</literal> (and usually can "
+"only clean up and exit) are in different layers. The current context "
+"management by Hibernate can significantly simplify this design, as all you "
+"need is access to a <literal>SessionFactory</literal>. Exception handling is "
+"discussed later in this chapter."
 msgstr ""
+"你很可能从未在一个通常的应用程序的业务代码中见过这样的代码片断:致命的(系"
+"统)异常应该总是 在应用程序“顶层”被捕获。换句话说,执行Hibernate调用的代码"
+"(在持久层)和处理 <literal>RuntimeException</literal>异常的代码(通常只能清"
+"理和退出应用程序)应该在不同 的应用程序逻辑层。Hibernate的当前上下文管理可以"
+"极大地简化这一设计,你所有的一切就是<literal>SessionFactory</literal>。 异常"
+"处理将在本章稍后进行讨论。"
 
-#: index.docbook:450
-msgid "Note that you should select <literal>org.hibernate.transaction.JDBCTransactionFactory</literal> (which is the default), and for the second example <literal>\"thread\"</literal> as your <literal>hibernate.current_session_context_class</literal>."
+#. Tag: para
+#: transactions.xml:450
+#, no-c-format
+msgid ""
+"Note that you should select <literal>org.hibernate.transaction."
+"JDBCTransactionFactory</literal> (which is the default), and for the second "
+"example <literal>\"thread\"</literal> as your <literal>hibernate."
+"current_session_context_class</literal>."
 msgstr ""
+"请注意,你应该选择 <literal>org.hibernate.transaction."
+"JDBCTransactionFactory</literal> (这是默认选项),对第二个例子来说,"
+"<literal>hibernate.current_session_context_class</literal>应该是<literal>"
+"\"thread\"</literal>"
 
-#: index.docbook:459
+#. Tag: title
+#: transactions.xml:459
+#, no-c-format
 msgid "Using JTA"
-msgstr ""
+msgstr "使用JTA"
 
-#: index.docbook:461
-msgid "If your persistence layer runs in an application server (e.g. behind EJB session beans), every datasource connection obtained by Hibernate will automatically be part of the global JTA transaction. You can also install a standalone JTA implementation and use it without EJB. Hibernate offers two strategies for JTA integration."
+#. Tag: para
+#: transactions.xml:461
+#, no-c-format
+msgid ""
+"If your persistence layer runs in an application server (e.g. behind EJB "
+"session beans), every datasource connection obtained by Hibernate will "
+"automatically be part of the global JTA transaction. You can also install a "
+"standalone JTA implementation and use it without EJB. Hibernate offers two "
+"strategies for JTA integration."
 msgstr ""
+"如果你的持久层运行在一个应用服务器中(例如,在EJB session beans的后面),"
+"Hibernate获取 的每个数据源连接将自动成为全局JTA事务的一部分。 你可以安装一个"
+"独立的JTA实现,使用它而不使用EJB。Hibernate提供了两种策略进行JTA集成。"
 
-#: index.docbook:468
-msgid "If you use bean-managed transactions (BMT) Hibernate will tell the application server to start and end a BMT transaction if you use the <literal>Transaction</literal> API. So, the transaction management code is identical to the non-managed environment."
+#. Tag: para
+#: transactions.xml:468
+#, no-c-format
+msgid ""
+"If you use bean-managed transactions (BMT) Hibernate will tell the "
+"application server to start and end a BMT transaction if you use the "
+"<literal>Transaction</literal> API. So, the transaction management code is "
+"identical to the non-managed environment."
 msgstr ""
+"如果你使用bean管理事务(BMT),可以通过使用Hibernate的 <literal>Transaction</"
+"literal> API来告诉 应用服务器启动和结束BMT事务。因此,事务管理代码和在非托管"
+"环境下是一样的。"
 
-#: index.docbook:474
+#. Tag: programlisting
+#: transactions.xml:474
+#, no-c-format
 msgid ""
-      "<![CDATA[// BMT idiom\n"
-      "Session sess = factory.openSession();\n"
-      "Transaction tx = null;\n"
-      "try {\n"
-      "    tx = sess.beginTransaction();\n"
-      "\n"
-      "    // do some work\n"
-      "    ...\n"
-      "\n"
-      "    tx.commit();\n"
-      "}\n"
-      "catch (RuntimeException e) {\n"
-      "    if (tx != null) tx.rollback();\n"
-      "    throw e; // or display error message\n"
-      "}\n"
-      "finally {\n"
-      "    sess.close();\n"
-      "}]]>"
+"<![CDATA[// BMT idiom\n"
+"Session sess = factory.openSession();\n"
+"Transaction tx = null;\n"
+"try {\n"
+"    tx = sess.beginTransaction();\n"
+"\n"
+"    // do some work\n"
+"    ...\n"
+"\n"
+"    tx.commit();\n"
+"}\n"
+"catch (RuntimeException e) {\n"
+"    if (tx != null) tx.rollback();\n"
+"    throw e; // or display error message\n"
+"}\n"
+"finally {\n"
+"    sess.close();\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:476
-msgid "If you want to use a transaction-bound <literal>Session</literal>, that is, the <literal>getCurrentSession()</literal> functionality for easy context propagation, you will have to use the JTA <literal>UserTransaction</literal> API directly:"
+#. Tag: para
+#: transactions.xml:476
+#, no-c-format
+msgid ""
+"If you want to use a transaction-bound <literal>Session</literal>, that is, "
+"the <literal>getCurrentSession()</literal> functionality for easy context "
+"propagation, you will have to use the JTA <literal>UserTransaction</literal> "
+"API directly:"
 msgstr ""
+"如果你希望使用与事务绑定的<literal>Session</literal>,也就是使用"
+"<literal>getCurrentSession()</literal>来简化上下文管理,你将不得不直接使用"
+"JTA <literal>UserTransaction</literal>API。"
 
-#: index.docbook:482
+#. Tag: programlisting
+#: transactions.xml:482
+#, no-c-format
 msgid ""
-      "<![CDATA[// BMT idiom with getCurrentSession()\n"
-      "try {\n"
-      "    UserTransaction tx = (UserTransaction)new InitialContext()\n"
-      "                            .lookup(\"java:comp/UserTransaction\");\n"
-      "\n"
-      "    tx.begin();\n"
-      "\n"
-      "    // Do some work on Session bound to transaction\n"
-      "    factory.getCurrentSession().load(...);\n"
-      "    factory.getCurrentSession().persist(...);\n"
-      "\n"
-      "    tx.commit();\n"
-      "}\n"
-      "catch (RuntimeException e) {\n"
-      "    tx.rollback();\n"
-      "    throw e; // or display error message\n"
-      "}]]>"
+"<![CDATA[// BMT idiom with getCurrentSession()\n"
+"try {\n"
+"    UserTransaction tx = (UserTransaction)new InitialContext()\n"
+"                            .lookup(\"java:comp/UserTransaction\");\n"
+"\n"
+"    tx.begin();\n"
+"\n"
+"    // Do some work on Session bound to transaction\n"
+"    factory.getCurrentSession().load(...);\n"
+"    factory.getCurrentSession().persist(...);\n"
+"\n"
+"    tx.commit();\n"
+"}\n"
+"catch (RuntimeException e) {\n"
+"    tx.rollback();\n"
+"    throw e; // or display error message\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:484
-msgid "With CMT, transaction demarcation is done in session bean deployment descriptors, not programatically, hence, the code is reduced to:"
+#. Tag: para
+#: transactions.xml:484
+#, no-c-format
+msgid ""
+"With CMT, transaction demarcation is done in session bean deployment "
+"descriptors, not programatically, hence, the code is reduced to:"
 msgstr ""
+"在CMT方式下,事务声明是在session bean的部署描述符中,而不需要编程。 因此,代"
+"码被简化为:"
 
-#: index.docbook:489
+#. Tag: programlisting
+#: transactions.xml:489
+#, no-c-format
 msgid ""
-      "<![CDATA[// CMT idiom\n"
-      " Session sess = factory.getCurrentSession();\n"
-      "\n"
-      " // do some work\n"
-      " ...\n"
-      "]]>"
+"<![CDATA[// CMT idiom\n"
+" Session sess = factory.getCurrentSession();\n"
+"\n"
+" // do some work\n"
+" ...\n"
+"]]>"
 msgstr ""
 
-#: index.docbook:491
-msgid "In a CMT/EJB even rollback happens automatically, since an unhandled <literal>RuntimeException</literal> thrown by a session bean method tells the container to set the global transaction to rollback. <emphasis>This means you do not need to use the Hibernate <literal>Transaction</literal> API at all with BMT or CMT, and you get automatic propagation of the \"current\" Session bound to the transaction.</emphasis>"
+#. Tag: para
+#: transactions.xml:491
+#, no-c-format
+msgid ""
+"In a CMT/EJB even rollback happens automatically, since an unhandled "
+"<literal>RuntimeException</literal> thrown by a session bean method tells "
+"the container to set the global transaction to rollback. <emphasis>This "
+"means you do not need to use the Hibernate <literal>Transaction</literal> "
+"API at all with BMT or CMT, and you get automatic propagation of the "
+"\"current\" Session bound to the transaction.</emphasis>"
 msgstr ""
+"在CMT/EJB中甚至会自动rollback,因为假若有未捕获的<literal>RuntimeException</"
+"literal>从session bean方法中抛出,这就会通知容器把全局事务回滚。<emphasis>这"
+"就意味着,在BMT或者CMT中,你根本就不需要使用Hibernate <literal>Transaction</"
+"literal> API ,你自动得到了绑定到事务的“当前”Session。 </emphasis>"
 
-#: index.docbook:499
-msgid "Note that you should choose <literal>org.hibernate.transaction.JTATransactionFactory</literal> if you use JTA directly (BMT), and <literal>org.hibernate.transaction.CMTTransactionFactory</literal> in a CMT session bean, when you configure Hibernate's transaction factory. Remember to also set <literal>hibernate.transaction.manager_lookup_class</literal>. Furthermore, make sure that your <literal>hibernate.current_session_context_class</literal> is either unset (backwards compatiblity), or set to <literal>\"jta\"</literal>."
+#. Tag: para
+#: transactions.xml:499
+#, no-c-format
+msgid ""
+"Note that you should choose <literal>org.hibernate.transaction."
+"JTATransactionFactory</literal> if you use JTA directly (BMT), and "
+"<literal>org.hibernate.transaction.CMTTransactionFactory</literal> in a CMT "
+"session bean, when you configure Hibernate's transaction factory. Remember "
+"to also set <literal>hibernate.transaction.manager_lookup_class</literal>. "
+"Furthermore, make sure that your <literal>hibernate."
+"current_session_context_class</literal> is either unset (backwards "
+"compatiblity), or set to <literal>\"jta\"</literal>."
 msgstr ""
+"注意,当你配置Hibernate的transaction factory的时候,在直接使用JTA的时候"
+"(BMT),你应该选择<literal>org.hibernate.transaction.JTATransactionFactory</"
+"literal>,在CMT session bean中选择<literal>org.hibernate.transaction."
+"CMTTransactionFactory</literal>。记得也要设置<literal>hibernate.transaction."
+"manager_lookup_class</literal>。还有,确认你的<literal>hibernate."
+"current_session_context_class</literal>未设置(为了向下兼容),或者设置为"
+"<literal>\"jta\"</literal>。"
 
-#: index.docbook:508
-msgid "The <literal>getCurrentSession()</literal> operation has one downside in a JTA environment. There is one caveat to the use of <literal>after_statement</literal> connection release mode, which is then used by default. Due to a silly limitation of the JTA spec, it is not possible for Hibernate to automatically clean up any unclosed <literal>ScrollableResults</literal> or <literal>Iterator</literal> instances returned by <literal>scroll()</literal> or <literal>iterate()</literal>. You <emphasis>must</emphasis> release the underlying database cursor by calling <literal>ScrollableResults.close()</literal> or <literal>Hibernate.close(Iterator)</literal> explicity from a <literal>finally</literal> block. (Of course, most applications can easily avoid using <literal>scroll()</literal> or <literal>iterate()</literal> at all from the JTA or CMT code.)"
+#. Tag: para
+#: transactions.xml:508
+#, no-c-format
+msgid ""
+"The <literal>getCurrentSession()</literal> operation has one downside in a "
+"JTA environment. There is one caveat to the use of <literal>after_statement</"
+"literal> connection release mode, which is then used by default. Due to a "
+"silly limitation of the JTA spec, it is not possible for Hibernate to "
+"automatically clean up any unclosed <literal>ScrollableResults</literal> or "
+"<literal>Iterator</literal> instances returned by <literal>scroll()</"
+"literal> or <literal>iterate()</literal>. You <emphasis>must</emphasis> "
+"release the underlying database cursor by calling <literal>ScrollableResults."
+"close()</literal> or <literal>Hibernate.close(Iterator)</literal> explicity "
+"from a <literal>finally</literal> block. (Of course, most applications can "
+"easily avoid using <literal>scroll()</literal> or <literal>iterate()</"
+"literal> at all from the JTA or CMT code.)"
 msgstr ""
+"<literal>getCurrentSession()</literal>在JTA环境中有一个弊端。对"
+"<literal>after_statement</literal>连接释放方式有一个警告,这是被默认使用的。"
+"因为JTA规范的一个很愚蠢的限制,Hibernate不可能自动清理任何未关闭的"
+"<literal>ScrollableResults</literal> 或者<literal>Iterator</literal>,它们是"
+"由<literal>scroll()</literal>或<literal>iterate()</literal>产生的。你"
+"<emphasis>must</emphasis>通过在<literal>finally</literal>块中,显式调用"
+"<literal>ScrollableResults.close()</literal>或者<literal>Hibernate.close"
+"(Iterator)</literal>方法来释放底层数据库游标。(当然,大部分程序完全可以很容易"
+"的避免在JTA或CMT代码中出现<literal>scroll()</literal>或<literal>iterate()</"
+"literal>。)"
 
-#: index.docbook:524
+#. Tag: title
+#: transactions.xml:524
+#, no-c-format
 msgid "Exception handling"
-msgstr ""
+msgstr "异常处理"
 
-#: index.docbook:526
-msgid "If the <literal>Session</literal> throws an exception (including any <literal>SQLException</literal>), you should immediately rollback the database transaction, call <literal>Session.close()</literal> and discard the <literal>Session</literal> instance. Certain methods of <literal>Session</literal> will <emphasis>not</emphasis> leave the session in a consistent state. No exception thrown by Hibernate can be treated as recoverable. Ensure that the <literal>Session</literal> will be closed by calling <literal>close()</literal> in a <literal>finally</literal> block."
+#. Tag: para
+#: transactions.xml:526
+#, no-c-format
+msgid ""
+"If the <literal>Session</literal> throws an exception (including any "
+"<literal>SQLException</literal>), you should immediately rollback the "
+"database transaction, call <literal>Session.close()</literal> and discard "
+"the <literal>Session</literal> instance. Certain methods of "
+"<literal>Session</literal> will <emphasis>not</emphasis> leave the session "
+"in a consistent state. No exception thrown by Hibernate can be treated as "
+"recoverable. Ensure that the <literal>Session</literal> will be closed by "
+"calling <literal>close()</literal> in a <literal>finally</literal> block."
 msgstr ""
+"如果 <literal>Session</literal> 抛出异常 (包括任何<literal>SQLException</"
+"literal>), 你应该立即回滚数据库事务,调用 <literal>Session.close()</"
+"literal> ,丢弃该 <literal>Session</literal>实例。<literal>Session</literal>"
+"的某些方法可能会导致session 处于不一致的状态。所有由Hibernate抛出的异常都视为"
+"不可以恢复的。确保在 <literal>finally</literal> 代码块中调用<literal>close()"
+"</literal>方法,以关闭掉 <literal>Session</literal>。"
 
-#: index.docbook:537
-msgid "The <literal>HibernateException</literal>, which wraps most of the errors that can occur in a Hibernate persistence layer, is an unchecked exception (it wasn't in older versions of Hibernate). In our opinion, we shouldn't force the application developer to catch an unrecoverable exception at a low layer. In most systems, unchecked and fatal exceptions are handled in one of the first frames of the method call stack (i.e. in higher layers) and an error message is presented to the application user (or some other appropriate action is taken). Note that Hibernate might also throw other unchecked exceptions which are not a <literal>HibernateException</literal>. These are, again, not recoverable and appropriate action should be taken."
+#. Tag: para
+#: transactions.xml:537
+#, no-c-format
+msgid ""
+"The <literal>HibernateException</literal>, which wraps most of the errors "
+"that can occur in a Hibernate persistence layer, is an unchecked exception "
+"(it wasn't in older versions of Hibernate). In our opinion, we shouldn't "
+"force the application developer to catch an unrecoverable exception at a low "
+"layer. In most systems, unchecked and fatal exceptions are handled in one of "
+"the first frames of the method call stack (i.e. in higher layers) and an "
+"error message is presented to the application user (or some other "
+"appropriate action is taken). Note that Hibernate might also throw other "
+"unchecked exceptions which are not a <literal>HibernateException</literal>. "
+"These are, again, not recoverable and appropriate action should be taken."
 msgstr ""
+"<literal>HibernateException</literal>是一个非检查期异常(这不同于Hibernate老"
+"的版本), 它封装了Hibernate持久层可能出现的大多数错误。我们的观点是,不应该"
+"强迫应用程序开发人员 在底层捕获无法恢复的异常。在大多数软件系统中,非检查期异"
+"常和致命异常都是在相应方法调用 的堆栈的顶层被处理的(也就是说,在软件上面的逻"
+"辑层),并且提供一个错误信息给应用软件的用户 (或者采取其他某些相应的操作)。"
+"请注意,Hibernate也有可能抛出其他并不属于 <literal>HibernateException</"
+"literal>的非检查期异常。这些异常同样也是无法恢复的,应该 采取某些相应的操作去"
+"处理。"
 
-#: index.docbook:549
-msgid "Hibernate wraps <literal>SQLException</literal>s thrown while interacting with the database in a <literal>JDBCException</literal>. In fact, Hibernate will attempt to convert the eexception into a more meningful subclass of <literal>JDBCException</literal>. The underlying <literal>SQLException</literal> is always available via <literal>JDBCException.getCause()</literal>. Hibernate converts the <literal>SQLException</literal> into an appropriate <literal>JDBCException</literal> subclass using the <literal>SQLExceptionConverter</literal> attached to the <literal>SessionFactory</literal>. By default, the <literal>SQLExceptionConverter</literal> is defined by the configured dialect; however, it is also possible to plug in a custom implementation (see the javadocs for the <literal>SQLExceptionConverterFactory</literal> class for details). The standard <literal>JDBCException</literal> subtypes are:"
+#. Tag: para
+#: transactions.xml:549
+#, no-c-format
+msgid ""
+"Hibernate wraps <literal>SQLException</literal>s thrown while interacting "
+"with the database in a <literal>JDBCException</literal>. In fact, Hibernate "
+"will attempt to convert the eexception into a more meningful subclass of "
+"<literal>JDBCException</literal>. The underlying <literal>SQLException</"
+"literal> is always available via <literal>JDBCException.getCause()</"
+"literal>. Hibernate converts the <literal>SQLException</literal> into an "
+"appropriate <literal>JDBCException</literal> subclass using the "
+"<literal>SQLExceptionConverter</literal> attached to the "
+"<literal>SessionFactory</literal>. By default, the "
+"<literal>SQLExceptionConverter</literal> is defined by the configured "
+"dialect; however, it is also possible to plug in a custom implementation "
+"(see the javadocs for the <literal>SQLExceptionConverterFactory</literal> "
+"class for details). The standard <literal>JDBCException</literal> subtypes "
+"are:"
 msgstr ""
+"在和数据库进行交互时,Hibernate把捕获的<literal>SQLException</literal>封装为"
+"Hibernate的 <literal>JDBCException</literal>。事实上,Hibernate尝试把异常转换"
+"为更有实际含义 的<literal>JDBCException</literal>异常的子类。底层的"
+"<literal>SQLException</literal>可以 通过<literal>JDBCException.getCause()</"
+"literal>来得到。Hibernate通过使用关联到 <literal>SessionFactory</literal>上的"
+"<literal>SQLExceptionConverter</literal>来 把<literal>SQLException</literal>"
+"转换为一个对应的<literal>JDBCException</literal> 异常的子类。默认情况下,"
+"<literal>SQLExceptionConverter</literal>可以通过配置dialect 选项指定;此外,"
+"也可以使用用户自定义的实现类(参考javadocs "
+"<literal>SQLExceptionConverterFactory</literal>类来了解详情)。标准的 "
+"<literal>JDBCException</literal>子类型是:"
 
-#: index.docbook:565
-msgid "<literal>JDBCConnectionException</literal> - indicates an error with the underlying JDBC communication."
+#. Tag: para
+#: transactions.xml:565
+#, no-c-format
+msgid ""
+"<literal>JDBCConnectionException</literal> - indicates an error with the "
+"underlying JDBC communication."
 msgstr ""
+"<literal>JDBCConnectionException</literal> - 指明底层的JDBC通讯出现错误"
 
-#: index.docbook:571
-msgid "<literal>SQLGrammarException</literal> - indicates a grammar or syntax problem with the issued SQL."
+#. Tag: para
+#: transactions.xml:571
+#, no-c-format
+msgid ""
+"<literal>SQLGrammarException</literal> - indicates a grammar or syntax "
+"problem with the issued SQL."
 msgstr ""
+"<literal>SQLGrammarException</literal> - 指明发送的SQL语句的语法或者格式错误"
 
-#: index.docbook:577
-msgid "<literal>ConstraintViolationException</literal> - indicates some form of integrity constraint violation."
+#. Tag: para
+#: transactions.xml:577
+#, no-c-format
+msgid ""
+"<literal>ConstraintViolationException</literal> - indicates some form of "
+"integrity constraint violation."
 msgstr ""
+"<literal>ConstraintViolationException</literal> - 指明某种类型的约束违例错误"
 
-#: index.docbook:583
-msgid "<literal>LockAcquisitionException</literal> - indicates an error acquiring a lock level necessary to perform the requested operation."
+#. Tag: para
+#: transactions.xml:583
+#, no-c-format
+msgid ""
+"<literal>LockAcquisitionException</literal> - indicates an error acquiring a "
+"lock level necessary to perform the requested operation."
 msgstr ""
+"<literal>LockAcquisitionException</literal> - 指明了在执行请求操作时,获取 所"
+"需的锁级别时出现的错误。"
 
-#: index.docbook:589
-msgid "<literal>GenericJDBCException</literal> - a generic exception which did not fall into any of the other categories."
-msgstr ""
+#. Tag: para
+#: transactions.xml:589
+#, no-c-format
+msgid ""
+"<literal>GenericJDBCException</literal> - a generic exception which did not "
+"fall into any of the other categories."
+msgstr "<literal>GenericJDBCException</literal> - 不属于任何其他种类的原生异常"
 
-#: index.docbook:599
+#. Tag: title
+#: transactions.xml:599
+#, no-c-format
 msgid "Transaction timeout"
-msgstr ""
+msgstr "事务超时"
 
-#: index.docbook:601
-msgid "One extremely important feature provided by a managed environment like EJB that is never provided for non-managed code is transaction timeout. Transaction timeouts ensure that no misbehaving transaction can indefinitely tie up resources while returning no response to the user. Outside a managed (JTA) environment, Hibernate cannot fully provide this functionality. However, Hibernate can at least control data access operations, ensuring that database level deadlocks and queries with huge result sets are limited by a defined timeout. In a managed environment, Hibernate can delegate transaction timeout to JTA. This functioanlity is abstracted by the Hibernate <literal>Transaction</literal> object."
+#. Tag: para
+#: transactions.xml:601
+#, no-c-format
+msgid ""
+"One extremely important feature provided by a managed environment like EJB "
+"that is never provided for non-managed code is transaction timeout. "
+"Transaction timeouts ensure that no misbehaving transaction can indefinitely "
+"tie up resources while returning no response to the user. Outside a managed "
+"(JTA) environment, Hibernate cannot fully provide this functionality. "
+"However, Hibernate can at least control data access operations, ensuring "
+"that database level deadlocks and queries with huge result sets are limited "
+"by a defined timeout. In a managed environment, Hibernate can delegate "
+"transaction timeout to JTA. This functioanlity is abstracted by the "
+"Hibernate <literal>Transaction</literal> object."
 msgstr ""
+"EJB这样的托管环境有一项极为重要的特性,而它从未在非托管环境中提供过,那就是事"
+"务超时。在出现错误的事务行为的时候,超时可以确保不会无限挂起资源、对用户没有"
+"交代。在托管(JTA)环境之外,Hibernate无法完全提供这一功能。但是,Hiberante至少"
+"可以控制数据访问,确保数据库级别的死锁,和返回巨大结果集的查询被限定在一个规"
+"定的时间内。在托管环境中,Hibernate会把事务超时转交给JTA。这一功能通过"
+"Hibernate <literal>Transaction</literal>对象进行抽象。"
 
-#: index.docbook:614
+#. Tag: programlisting
+#: transactions.xml:614
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "Session sess = factory.openSession();\n"
-      "try {\n"
-      "    //set transaction timeout to 3 seconds\n"
-      "    sess.getTransaction().setTimeout(3);\n"
-      "    sess.getTransaction().begin();\n"
-      "\n"
-      "    // do some work\n"
-      "    ...\n"
-      "\n"
-      "    sess.getTransaction().commit()\n"
-      "}\n"
-      "catch (RuntimeException e) {\n"
-      "    sess.getTransaction().rollback();\n"
-      "    throw e; // or display error message\n"
-      "}\n"
-      "finally {\n"
-      "    sess.close();\n"
-      "}]]>"
+"<![CDATA[\n"
+"Session sess = factory.openSession();\n"
+"try {\n"
+"    //set transaction timeout to 3 seconds\n"
+"    sess.getTransaction().setTimeout(3);\n"
+"    sess.getTransaction().begin();\n"
+"\n"
+"    // do some work\n"
+"    ...\n"
+"\n"
+"    sess.getTransaction().commit()\n"
+"}\n"
+"catch (RuntimeException e) {\n"
+"    sess.getTransaction().rollback();\n"
+"    throw e; // or display error message\n"
+"}\n"
+"finally {\n"
+"    sess.close();\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:616
-msgid "Note that <literal>setTimeout()</literal> may not be called in a CMT bean, where transaction timeouts must be defined declaratively."
+#. Tag: para
+#: transactions.xml:616
+#, no-c-format
+msgid ""
+"Note that <literal>setTimeout()</literal> may not be called in a CMT bean, "
+"where transaction timeouts must be defined declaratively."
 msgstr ""
+"注意<literal>setTimeout()</literal>不应该在CMT bean中调用,此时事务超时值应该"
+"是被声明式定义的。"
 
-#: index.docbook:626
+#. Tag: title
+#: transactions.xml:626
+#, no-c-format
 msgid "Optimistic concurrency control"
-msgstr ""
+msgstr "乐观并发控制(Optimistic concurrency control)"
 
-#: index.docbook:628
-msgid "The only approach that is consistent with high concurrency and high scalability is optimistic concurrency control with versioning. Version checking uses version numbers, or timestamps, to detect conflicting updates (and to prevent lost updates). Hibernate provides for three possible approaches to writing application code that uses optimistic concurrency. The use cases we show are in the context of long conversations, but version checking also has the benefit of preventing lost updates in single database transactions."
+#. Tag: para
+#: transactions.xml:628
+#, no-c-format
+msgid ""
+"The only approach that is consistent with high concurrency and high "
+"scalability is optimistic concurrency control with versioning. Version "
+"checking uses version numbers, or timestamps, to detect conflicting updates "
+"(and to prevent lost updates). Hibernate provides for three possible "
+"approaches to writing application code that uses optimistic concurrency. The "
+"use cases we show are in the context of long conversations, but version "
+"checking also has the benefit of preventing lost updates in single database "
+"transactions."
 msgstr ""
+"唯一能够同时保持高并发和高可伸缩性的方法就是使用带版本化的乐观并发控制。版本"
+"检查使用版本号、 或者时间戳来检测更新冲突(并且防止更新丢失)。Hibernate为使"
+"用乐观并发控制的代码提供了三种可 能的方法,应用程序在编写这些代码时,可以采用"
+"它们。我们已经在前面应用程序对话那部分展示了 乐观并发控制的应用场景,此外,在"
+"单个数据库事务范围内,版本检查也提供了防止更新丢失的好处。"
 
-#: index.docbook:639
+#. Tag: title
+#: transactions.xml:639
+#, no-c-format
 msgid "Application version checking"
-msgstr ""
+msgstr "应用程序级别的版本检查(Application version checking)"
 
-#: index.docbook:641
-msgid "In an implementation without much help from Hibernate, each interaction with the database occurs in a new <literal>Session</literal> and the developer is responsible for reloading all persistent instances from the database before manipulating them. This approach forces the application to carry out its own version checking to ensure conversation transaction isolation. This approach is the least efficient in terms of database access. It is the approach most similar to entity EJBs."
+#. Tag: para
+#: transactions.xml:641
+#, no-c-format
+msgid ""
+"In an implementation without much help from Hibernate, each interaction with "
+"the database occurs in a new <literal>Session</literal> and the developer is "
+"responsible for reloading all persistent instances from the database before "
+"manipulating them. This approach forces the application to carry out its own "
+"version checking to ensure conversation transaction isolation. This approach "
+"is the least efficient in terms of database access. It is the approach most "
+"similar to entity EJBs."
 msgstr ""
+"未能充分利用Hibernate功能的实现代码中,每次和数据库交互都需要一个新的 "
+"<literal>Session</literal>,而且开发人员必须在显示数据之前从数据库中重 新载入"
+"所有的持久化对象实例。这种方式迫使应用程序自己实现版本检查来确保 对话事务的隔"
+"离,从数据访问的角度来说是最低效的。这种使用方式和 entity EJB最相似。"
 
-#: index.docbook:650
+#. Tag: programlisting
+#: transactions.xml:650
+#, no-c-format
 msgid ""
-      "<![CDATA[// foo is an instance loaded by a previous Session\n"
-      "session = factory.openSession();\n"
-      "Transaction t = session.beginTransaction();\n"
-      "\n"
-      "int oldVersion = foo.getVersion();\n"
-      "session.load( foo, foo.getKey() ); // load the current state\n"
-      "if ( oldVersion != foo.getVersion() ) throw new StaleObjectStateException();\n"
-      "foo.setProperty(\"bar\");\n"
-      "\n"
-      "t.commit();\n"
-      "session.close();]]>"
+"<![CDATA[// foo is an instance loaded by a previous Session\n"
+"session = factory.openSession();\n"
+"Transaction t = session.beginTransaction();\n"
+"\n"
+"int oldVersion = foo.getVersion();\n"
+"session.load( foo, foo.getKey() ); // load the current state\n"
+"if ( oldVersion != foo.getVersion() ) throw new StaleObjectStateException"
+"();\n"
+"foo.setProperty(\"bar\");\n"
+"\n"
+"t.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:652
-msgid "The <literal>version</literal> property is mapped using <literal>&lt;version&gt;</literal>, and Hibernate will automatically increment it during flush if the entity is dirty."
+#. Tag: para
+#: transactions.xml:652
+#, no-c-format
+msgid ""
+"The <literal>version</literal> property is mapped using <literal>&lt;"
+"version&gt;</literal>, and Hibernate will automatically increment it during "
+"flush if the entity is dirty."
 msgstr ""
+"<literal>version</literal> 属性使用 <literal>&lt;version&gt;</literal>来映"
+"射,如果对象 是脏数据,在同步的时候,Hibernate会自动增加版本号。"
 
-#: index.docbook:658
-msgid "Of course, if you are operating in a low-data-concurrency environment and don't require version checking, you may use this approach and just skip the version check. In that case, <emphasis>last commit wins</emphasis> will be the default strategy for your long conversations. Keep in mind that this might confuse the users of the application, as they might experience lost updates without error messages or a chance to merge conflicting changes."
+#. Tag: para
+#: transactions.xml:658
+#, no-c-format
+msgid ""
+"Of course, if you are operating in a low-data-concurrency environment and "
+"don't require version checking, you may use this approach and just skip the "
+"version check. In that case, <emphasis>last commit wins</emphasis> will be "
+"the default strategy for your long conversations. Keep in mind that this "
+"might confuse the users of the application, as they might experience lost "
+"updates without error messages or a chance to merge conflicting changes."
 msgstr ""
+"当然,如果你的应用是在一个低数据并发环境下,并不需要版本检查的话,你照样可以"
+"使用 这种方式,只不过跳过版本检查就是了。在这种情况下,<emphasis>最晚提交生效"
+"</emphasis> (<emphasis>last commit wins</emphasis>)就是你的长对话的默认处理"
+"策略。 请记住这种策略可能会让应用软件的用户感到困惑,因为他们有可能会碰上更新"
+"丢失掉却没 有出错信息,或者需要合并更改冲突的情况。"
 
-#: index.docbook:667
-msgid "Clearly, manual version checking is only feasible in very trivial circumstances and not practical for most applications. Often not only single instances, but complete graphs of modified ojects have to be checked. Hibernate offers automatic version checking with either an extended <literal>Session</literal> or detached instances as the design paradigm."
+#. Tag: para
+#: transactions.xml:667
+#, no-c-format
+msgid ""
+"Clearly, manual version checking is only feasible in very trivial "
+"circumstances and not practical for most applications. Often not only single "
+"instances, but complete graphs of modified ojects have to be checked. "
+"Hibernate offers automatic version checking with either an extended "
+"<literal>Session</literal> or detached instances as the design paradigm."
 msgstr ""
+"很明显,手工进行版本检查只适合于某些软件规模非常小的应用场景,对于大多数软件"
+"应用场景 来说并不现实。通常情况下,不仅是单个对象实例需要进行版本检查,整个被"
+"修改过的关 联对象图也都需要进行版本检查。作为标准设计范例,Hibernate使用扩展"
+"周期的 <literal>Session</literal>的方式,或者脱管对象实例的方式来提供自动版本"
+"检查。"
 
-#: index.docbook:678
+#. Tag: title
+#: transactions.xml:678
+#, no-c-format
 msgid "Extended session and automatic versioning"
-msgstr ""
+msgstr "扩展周期的session和自动版本化"
 
-#: index.docbook:680
-msgid "A single <literal>Session</literal> instance and its persistent instances are used for the whole conversation, known as <emphasis>session-per-conversation</emphasis>. Hibernate checks instance versions at flush time, throwing an exception if concurrent modification is detected. It's up to the developer to catch and handle this exception (common options are the opportunity for the user to merge changes or to restart the business conversation with non-stale data)."
+#. Tag: para
+#: transactions.xml:680
+#, no-c-format
+msgid ""
+"A single <literal>Session</literal> instance and its persistent instances "
+"are used for the whole conversation, known as <emphasis>session-per-"
+"conversation</emphasis>. Hibernate checks instance versions at flush time, "
+"throwing an exception if concurrent modification is detected. It's up to the "
+"developer to catch and handle this exception (common options are the "
+"opportunity for the user to merge changes or to restart the business "
+"conversation with non-stale data)."
 msgstr ""
+"单个 <literal>Session</literal>实例和它所关联的所有持久化对象实例都被用于整"
+"个 对话,这被称为<emphasis>session-per-conversation</emphasis>。Hibernate在同"
+"步的时候进行对象实例的版本检查,如果检测到并发修 改则抛出异常。由开发人员来决"
+"定是否需要捕获和处理这个异常(通常的抉择是给用户 提供一个合并更改,或者在无脏"
+"数据情况下重新进行业务对话的机会)。"
 
-#: index.docbook:689
-msgid "The <literal>Session</literal> is disconnected from any underlying JDBC connection when waiting for user interaction. This approach is the most efficient in terms of database access. The application need not concern itself with version checking or with reattaching detached instances, nor does it have to reload instances in every database transaction."
+#. Tag: para
+#: transactions.xml:689
+#, no-c-format
+msgid ""
+"The <literal>Session</literal> is disconnected from any underlying JDBC "
+"connection when waiting for user interaction. This approach is the most "
+"efficient in terms of database access. The application need not concern "
+"itself with version checking or with reattaching detached instances, nor "
+"does it have to reload instances in every database transaction."
 msgstr ""
+"在等待用户交互的时候, <literal>Session</literal> 断开底层的JDBC连接。这种方"
+"式 以数据库访问的角度来说是最高效的方式。应用程序不需要关心版本检查或脱管对象"
+"实例 的重新关联,在每个数据库事务中,应用程序也不需要载入读取对象实例。"
 
-#: index.docbook:697
+#. Tag: programlisting
+#: transactions.xml:697
+#, no-c-format
 msgid ""
-      "<![CDATA[// foo is an instance loaded earlier by the old session\n"
-      "Transaction t = session.beginTransaction(); // Obtain a new JDBC connection, start transaction\n"
-      "\n"
-      "foo.setProperty(\"bar\");\n"
-      "\n"
-      "session.flush();    // Only for last transaction in conversation\n"
-      "t.commit();         // Also return JDBC connection\n"
-      "session.close();    // Only for last transaction in conversation]]>"
+"<![CDATA[// foo is an instance loaded earlier by the old session\n"
+"Transaction t = session.beginTransaction(); // Obtain a new JDBC connection, "
+"start transaction\n"
+"\n"
+"foo.setProperty(\"bar\");\n"
+"\n"
+"session.flush();    // Only for last transaction in conversation\n"
+"t.commit();         // Also return JDBC connection\n"
+"session.close();    // Only for last transaction in conversation]]>"
 msgstr ""
 
-#: index.docbook:698
-msgid "The <literal>foo</literal> object still knows which <literal>Session</literal> it was loaded in. Beginning a new database transaction on an old session obtains a new connection and resumes the session. Committing a database transaction disconnects a session from the JDBC connection and returns the connection to the pool. After reconnection, to force a version check on data you aren't updating, you may call <literal>Session.lock()</literal> with <literal>LockMode.READ</literal> on any objects that might have been updated by another transaction. You don't need to lock any data that you <emphasis>are</emphasis> updating. Usually you would set <literal>FlushMode.MANUAL</literal> on an extended <literal>Session</literal>, so that only the last database transaction cycle is allowed to actually persist all modifications made in this conversation. Hence, only this last database transaction would include the <literal>flush()</literal> operation, and then also <literal>close()!
 </literal> the session to end the conversation."
+#. Tag: para
+#: transactions.xml:698
+#, no-c-format
+msgid ""
+"The <literal>foo</literal> object still knows which <literal>Session</"
+"literal> it was loaded in. Beginning a new database transaction on an old "
+"session obtains a new connection and resumes the session. Committing a "
+"database transaction disconnects a session from the JDBC connection and "
+"returns the connection to the pool. After reconnection, to force a version "
+"check on data you aren't updating, you may call <literal>Session.lock()</"
+"literal> with <literal>LockMode.READ</literal> on any objects that might "
+"have been updated by another transaction. You don't need to lock any data "
+"that you <emphasis>are</emphasis> updating. Usually you would set "
+"<literal>FlushMode.MANUAL</literal> on an extended <literal>Session</"
+"literal>, so that only the last database transaction cycle is allowed to "
+"actually persist all modifications made in this conversation. Hence, only "
+"this last database transaction would include the <literal>flush()</literal> "
+"operation, and then also <literal>close()</literal> the session to end the "
+"conversation."
 msgstr ""
+"<literal>foo</literal>对象知道它是在哪个<literal>Session</literal>中被装入"
+"的。在一个旧session中开启一个新的数据库事务,会导致session获取一个新的连接,"
+"并恢复session的功能。将数据库事务提交,使得session从JDBC连接断开,并将此连接"
+"交还给连接池。在重新连接之后,要强制对你没有更新的数据进行一次版本检查,你可"
+"以对所有可能被其他事务修改过的对象,使用参数<literal>LockMode.READ</literal>"
+"来调用<literal>Session.lock()</literal>。你不用lock任何你<emphasis>正在</"
+"emphasis>更新的数据。一般你会在扩展的<literal>Session</literal>上设置"
+"<literal>FlushMode.MANUAL</literal>,因此只有最后一个数据库事务循环才会真正的"
+"吧整个对话中发生的修改发送到数据库。因此,只有这最后一次数据库事务才会包含"
+"<literal>flush()</literal>操作,然后在整个对话结束后,还要<literal>close()</"
+"literal>这个session。"
 
-#: index.docbook:713
-msgid "This pattern is problematic if the <literal>Session</literal> is too big to be stored during user think time, e.g. an <literal>HttpSession</literal> should be kept as small as possible. As the <literal>Session</literal> is also the (mandatory) first-level cache and contains all loaded objects, we can probably use this strategy only for a few request/response cycles. You should use a <literal>Session</literal> only for a single conversation, as it will soon also have stale data."
+#. Tag: para
+#: transactions.xml:713
+#, no-c-format
+msgid ""
+"This pattern is problematic if the <literal>Session</literal> is too big to "
+"be stored during user think time, e.g. an <literal>HttpSession</literal> "
+"should be kept as small as possible. As the <literal>Session</literal> is "
+"also the (mandatory) first-level cache and contains all loaded objects, we "
+"can probably use this strategy only for a few request/response cycles. You "
+"should use a <literal>Session</literal> only for a single conversation, as "
+"it will soon also have stale data."
 msgstr ""
+"如果在用户思考的过程中,<literal>Session</literal>因为太大了而不能保存,那么"
+"这种模式是有 问题的。举例来说,一个<literal>HttpSession</literal>应该尽可能的"
+"小。由于 <literal>Session</literal>是一级缓存,并且保持了所有被载入过的对象,"
+"因此 我们只应该在那些少量的request/response情况下使用这种策略。你应该只把一个"
+"<literal>Session</literal>用于单个对话,因为它很快就会出现脏数据。"
 
-#: index.docbook:723
-msgid "(Note that earlier Hibernate versions required explicit disconnection and reconnection of a <literal>Session</literal>. These methods are deprecated, as beginning and ending a transaction has the same effect.)"
+#. Tag: para
+#: transactions.xml:723
+#, no-c-format
+msgid ""
+"(Note that earlier Hibernate versions required explicit disconnection and "
+"reconnection of a <literal>Session</literal>. These methods are deprecated, "
+"as beginning and ending a transaction has the same effect.)"
 msgstr ""
+"(注意,早期的Hibernate版本需要明确的对<literal>Session</literal>进行"
+"disconnec和reconnect。这些方法现在已经过时了,打开事务和关闭事务会起到同样的"
+"效果。)"
 
-#: index.docbook:729
-msgid "Also note that you should keep the disconnected <literal>Session</literal> close to the persistence layer. In other words, use an EJB stateful session bean to hold the <literal>Session</literal> in a three-tier environment, and don't transfer it to the web layer (or even serialize it to a separate tier) to store it in the <literal>HttpSession</literal>."
+#. Tag: para
+#: transactions.xml:729
+#, no-c-format
+msgid ""
+"Also note that you should keep the disconnected <literal>Session</literal> "
+"close to the persistence layer. In other words, use an EJB stateful session "
+"bean to hold the <literal>Session</literal> in a three-tier environment, and "
+"don't transfer it to the web layer (or even serialize it to a separate tier) "
+"to store it in the <literal>HttpSession</literal>."
 msgstr ""
+"此外,也请注意,你应该让与数据库连接断开的<literal>Session</literal>对持久层"
+"保持 关闭状态。换句话说,在三层环境中,使用有状态的EJB session bean来持有"
+"<literal>Session</literal>, 而不要把它传递到web层(甚至把它序列化到一个单独"
+"的层),保存在<literal>HttpSession</literal>中。"
 
-#: index.docbook:737
-msgid "The extended session pattern, or <emphasis>session-per-conversation</emphasis>, is more difficult to implement with automatic current session context management. You need to supply your own implementation of the <literal>CurrentSessionContext</literal> for this, see the Hibernate Wiki for examples."
+#. Tag: para
+#: transactions.xml:737
+#, no-c-format
+msgid ""
+"The extended session pattern, or <emphasis>session-per-conversation</"
+"emphasis>, is more difficult to implement with automatic current session "
+"context management. You need to supply your own implementation of the "
+"<literal>CurrentSessionContext</literal> for this, see the Hibernate Wiki "
+"for examples."
 msgstr ""
+"扩展session模式,或者被称为<emphasis>每次对话一个session(session-per-"
+"conversation)</emphasis>, 在与自动管理当前session上下文联用的时候会更困难。你"
+"需要提供你自己的<literal>CurrentSessionContext</literal>实现。请参阅"
+"Hibernate Wiki以获得示例。"
 
-#: index.docbook:747
+#. Tag: title
+#: transactions.xml:747
+#, no-c-format
 msgid "Detached objects and automatic versioning"
-msgstr ""
+msgstr "脱管对象(deatched object)和自动版本化"
 
-#: index.docbook:749
-msgid "Each interaction with the persistent store occurs in a new <literal>Session</literal>. However, the same persistent instances are reused for each interaction with the database. The application manipulates the state of detached instances originally loaded in another <literal>Session</literal> and then reattaches them using <literal>Session.update()</literal>, <literal>Session.saveOrUpdate()</literal>, or <literal>Session.merge()</literal>."
+#. Tag: para
+#: transactions.xml:749
+#, no-c-format
+msgid ""
+"Each interaction with the persistent store occurs in a new <literal>Session</"
+"literal>. However, the same persistent instances are reused for each "
+"interaction with the database. The application manipulates the state of "
+"detached instances originally loaded in another <literal>Session</literal> "
+"and then reattaches them using <literal>Session.update()</literal>, "
+"<literal>Session.saveOrUpdate()</literal>, or <literal>Session.merge()</"
+"literal>."
 msgstr ""
+"这种方式下,与持久化存储的每次交互都发生在一个新的<literal>Session</literal>"
+"中。 然而,同一持久化对象实例可以在多次与数据库的交互中重用。应用程序操纵脱管"
+"对象实例 的状态,这个脱管对象实例最初是在另一个<literal>Session</literal> 中"
+"载入的,然后 调用 <literal>Session.update()</literal>,<literal>Session."
+"saveOrUpdate()</literal>, 或者 <literal>Session.merge()</literal> 来重新关联"
+"该对象实例。"
 
-#: index.docbook:757
+#. Tag: programlisting
+#: transactions.xml:757
+#, no-c-format
 msgid ""
-      "<![CDATA[// foo is an instance loaded by a previous Session\n"
-      "foo.setProperty(\"bar\");\n"
-      "session = factory.openSession();\n"
-      "Transaction t = session.beginTransaction();\n"
-      "session.saveOrUpdate(foo); // Use merge() if \"foo\" might have been loaded already\n"
-      "t.commit();\n"
-      "session.close();]]>"
+"<![CDATA[// foo is an instance loaded by a previous Session\n"
+"foo.setProperty(\"bar\");\n"
+"session = factory.openSession();\n"
+"Transaction t = session.beginTransaction();\n"
+"session.saveOrUpdate(foo); // Use merge() if \"foo\" might have been loaded "
+"already\n"
+"t.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:759
-msgid "Again, Hibernate will check instance versions during flush, throwing an exception if conflicting updates occured."
+#. Tag: para
+#: transactions.xml:759
+#, no-c-format
+msgid ""
+"Again, Hibernate will check instance versions during flush, throwing an "
+"exception if conflicting updates occured."
 msgstr ""
+"Hibernate会再一次在同步的时候检查对象实例的版本,如果发生更新冲突,就抛出异"
+"常。"
 
-#: index.docbook:764
-msgid "You may also call <literal>lock()</literal> instead of <literal>update()</literal> and use <literal>LockMode.READ</literal> (performing a version check, bypassing all caches) if you are sure that the object has not been modified."
+#. Tag: para
+#: transactions.xml:764
+#, no-c-format
+msgid ""
+"You may also call <literal>lock()</literal> instead of <literal>update()</"
+"literal> and use <literal>LockMode.READ</literal> (performing a version "
+"check, bypassing all caches) if you are sure that the object has not been "
+"modified."
 msgstr ""
+"如果你确信对象没有被修改过,你也可以调用<literal>lock()</literal> 来设置 "
+"<literal>LockMode.READ</literal>(绕过所有的缓存,执行版本检查),从而取 代 "
+"<literal>update()</literal>操作。"
 
-#: index.docbook:773
+#. Tag: title
+#: transactions.xml:773
+#, no-c-format
 msgid "Customizing automatic versioning"
-msgstr ""
+msgstr "定制自动版本化行为"
 
-#: index.docbook:775
-msgid "You may disable Hibernate's automatic version increment for particular properties and collections by setting the <literal>optimistic-lock</literal> mapping attribute to <literal>false</literal>. Hibernate will then no longer increment versions if the property is dirty."
+#. Tag: para
+#: transactions.xml:775
+#, no-c-format
+msgid ""
+"You may disable Hibernate's automatic version increment for particular "
+"properties and collections by setting the <literal>optimistic-lock</literal> "
+"mapping attribute to <literal>false</literal>. Hibernate will then no longer "
+"increment versions if the property is dirty."
 msgstr ""
+"对于特定的属性和集合,通过为它们设置映射属性<literal>optimistic-lock</"
+"literal>的值 为<literal>false</literal>,来禁止Hibernate的版本自动增加。这样"
+"的话,如果该属性 脏数据,Hibernate将不再增加版本号。"
 
-#: index.docbook:782
-msgid "Legacy database schemas are often static and can't be modified. Or, other applications might also access the same database and don't know how to handle version numbers or even timestamps. In both cases, versioning can't rely on a particular column in a table. To force a version check without a version or timestamp property mapping, with a comparison of the state of all fields in a row, turn on <literal>optimistic-lock=\"all\"</literal> in the <literal>&lt;class&gt;</literal> mapping. Note that this concepetually only works if Hibernate can compare the old and new state, i.e. if you use a single long <literal>Session</literal> and not session-per-request-with-detached-objects."
+#. Tag: para
+#: transactions.xml:782
+#, no-c-format
+msgid ""
+"Legacy database schemas are often static and can't be modified. Or, other "
+"applications might also access the same database and don't know how to "
+"handle version numbers or even timestamps. In both cases, versioning can't "
+"rely on a particular column in a table. To force a version check without a "
+"version or timestamp property mapping, with a comparison of the state of all "
+"fields in a row, turn on <literal>optimistic-lock=\"all\"</literal> in the "
+"<literal>&lt;class&gt;</literal> mapping. Note that this concepetually only "
+"works if Hibernate can compare the old and new state, i.e. if you use a "
+"single long <literal>Session</literal> and not session-per-request-with-"
+"detached-objects."
 msgstr ""
+"遗留系统的数据库Schema通常是静态的,不可修改的。或者,其他应用程序也可能访问"
+"同一数据 库,根本无法得知如何处理版本号,甚至时间戳。在以上的所有场景中,实现"
+"版本化不能依靠 数据库表的某个特定列。在<literal>&lt;class&gt;</literal>的映射"
+"中设置 <literal>optimistic-lock=\"all\"</literal>可以在没有版本或者时间戳属性"
+"映射的情况下实现 版本检查,此时Hibernate将比较一行记录的每个字段的状态。请注"
+"意,只有当Hibernate能够比 较新旧状态的情况下,这种方式才能生效,也就是说, 你"
+"必须使用单个长生命周期<literal>Session</literal>模式,而不能使用 session-per-"
+"request-with-detached-objects模式。"
 
-#: index.docbook:793
-msgid "Sometimes concurrent modification can be permitted as long as the changes that have been made don't overlap. If you set <literal>optimistic-lock=\"dirty\"</literal> when mapping the <literal>&lt;class&gt;</literal>, Hibernate will only compare dirty fields during flush."
+#. Tag: para
+#: transactions.xml:793
+#, no-c-format
+msgid ""
+"Sometimes concurrent modification can be permitted as long as the changes "
+"that have been made don't overlap. If you set <literal>optimistic-lock="
+"\"dirty\"</literal> when mapping the <literal>&lt;class&gt;</literal>, "
+"Hibernate will only compare dirty fields during flush."
 msgstr ""
+"有些情况下,只要更改不发生交错,并发修改也是允许的。当你在<literal>&lt;"
+"class&gt;</literal> 的映射中设置<literal>optimistic-lock=\"dirty\"</"
+"literal>,Hibernate在同步的时候将只比较有脏 数据的字段。"
 
-#: index.docbook:799
-msgid "In both cases, with dedicated version/timestamp columns or with full/dirty field comparison, Hibernate uses a single <literal>UPDATE</literal> statement (with an appropriate <literal>WHERE</literal> clause) per entity to execute the version check and update the information. If you use transitive persistence to cascade reattachment to associated entities, Hibernate might execute uneccessary updates. This is usually not a problem, but <emphasis>on update</emphasis> triggers in the database might be executed even when no changes have been made to detached instances. You can customize this behavior by setting <literal>select-before-update=\"true\"</literal> in the <literal>&lt;class&gt;</literal> mapping, forcing Hibernate to <literal>SELECT</literal> the instance to ensure that changes did actually occur, before updating the row."
+#. Tag: para
+#: transactions.xml:799
+#, no-c-format
+msgid ""
+"In both cases, with dedicated version/timestamp columns or with full/dirty "
+"field comparison, Hibernate uses a single <literal>UPDATE</literal> "
+"statement (with an appropriate <literal>WHERE</literal> clause) per entity "
+"to execute the version check and update the information. If you use "
+"transitive persistence to cascade reattachment to associated entities, "
+"Hibernate might execute uneccessary updates. This is usually not a problem, "
+"but <emphasis>on update</emphasis> triggers in the database might be "
+"executed even when no changes have been made to detached instances. You can "
+"customize this behavior by setting <literal>select-before-update=\"true\"</"
+"literal> in the <literal>&lt;class&gt;</literal> mapping, forcing Hibernate "
+"to <literal>SELECT</literal> the instance to ensure that changes did "
+"actually occur, before updating the row."
 msgstr ""
+"在以上所有场景中,不管是专门设置一个版本/时间戳列,还是进行全部字段/脏数据字"
+"段比较, Hibernate都会针对每个实体对象发送一条<literal>UPDATE</literal>(带有"
+"相应的 <literal>WHERE</literal>语句 )的SQL语句来执行版本检查和数据更新。如果"
+"你对关联实体 设置级联关系使用传播性持久化(transitive persistence),那么"
+"Hibernate可能会执行不必 要的update语句。这通常不是个问题,但是数据库里面对"
+"<emphasis>on update</emphasis>点火 的触发器可能在脱管对象没有任何更改的情况下"
+"被触发。因此,你可以在 <literal>&lt;class&gt;</literal>的映射中,通过设置"
+"<literal>select-before-update=\"true\"</literal> 来定制这一行为,强制"
+"Hibernate <literal>SELECT</literal>这个对象实例,从而保证, 在更新记录之前,"
+"对象的确是被修改过。"
 
-#: index.docbook:817
+#. Tag: title
+#: transactions.xml:817
+#, no-c-format
 msgid "Pessimistic Locking"
-msgstr ""
+msgstr "悲观锁定(Pessimistic Locking)"
 
-#: index.docbook:819
-msgid "It is not intended that users spend much time worring about locking strategies. Its usually enough to specify an isolation level for the JDBC connections and then simply let the database do all the work. However, advanced users may sometimes wish to obtain exclusive pessimistic locks, or re-obtain locks at the start of a new transaction."
+#. Tag: para
+#: transactions.xml:819
+#, no-c-format
+msgid ""
+"It is not intended that users spend much time worring about locking "
+"strategies. Its usually enough to specify an isolation level for the JDBC "
+"connections and then simply let the database do all the work. However, "
+"advanced users may sometimes wish to obtain exclusive pessimistic locks, or "
+"re-obtain locks at the start of a new transaction."
 msgstr ""
+"用户其实并不需要花很多精力去担心锁定策略的问题。通常情况下,只要为JDBC连接指"
+"定一下隔 离级别,然后让数据库去搞定一切就够了。然而,高级用户有时候希望进行一"
+"个排它的悲观锁定, 或者在一个新的事务启动的时候,重新进行锁定。"
 
-#: index.docbook:826
-msgid "Hibernate will always use the locking mechanism of the database, never lock objects in memory!"
-msgstr ""
+#. Tag: para
+#: transactions.xml:826
+#, no-c-format
+msgid ""
+"Hibernate will always use the locking mechanism of the database, never lock "
+"objects in memory!"
+msgstr "Hibernate总是使用数据库的锁定机制,从不在内存中锁定对象!"
 
-#: index.docbook:831
-msgid "The <literal>LockMode</literal> class defines the different lock levels that may be acquired by Hibernate. A lock is obtained by the following mechanisms:"
+#. Tag: para
+#: transactions.xml:831
+#, no-c-format
+msgid ""
+"The <literal>LockMode</literal> class defines the different lock levels that "
+"may be acquired by Hibernate. A lock is obtained by the following mechanisms:"
 msgstr ""
+"类<literal>LockMode</literal> 定义了Hibernate所需的不同的锁定级别。一个锁定 "
+"可以通过以下的机制来设置:"
 
-#: index.docbook:838
-msgid "<literal>LockMode.WRITE</literal> is acquired automatically when Hibernate updates or inserts a row."
+#. Tag: para
+#: transactions.xml:838
+#, no-c-format
+msgid ""
+"<literal>LockMode.WRITE</literal> is acquired automatically when Hibernate "
+"updates or inserts a row."
 msgstr ""
+"当Hibernate更新或者插入一行记录的时候,锁定级别自动设置为<literal>LockMode."
+"WRITE</literal>。"
 
-#: index.docbook:844
-msgid "<literal>LockMode.UPGRADE</literal> may be acquired upon explicit user request using <literal>SELECT ... FOR UPDATE</literal> on databases which support that syntax."
+#. Tag: para
+#: transactions.xml:844
+#, no-c-format
+msgid ""
+"<literal>LockMode.UPGRADE</literal> may be acquired upon explicit user "
+"request using <literal>SELECT ... FOR UPDATE</literal> on databases which "
+"support that syntax."
 msgstr ""
+"当用户显式的使用数据库支持的SQL格式<literal>SELECT ... FOR UPDATE</literal> "
+"发送SQL的时候,锁定级别设置为<literal>LockMode.UPGRADE</literal>"
 
-#: index.docbook:850
-msgid "<literal>LockMode.UPGRADE_NOWAIT</literal> may be acquired upon explicit user request using a <literal>SELECT ... FOR UPDATE NOWAIT</literal> under Oracle."
+#. Tag: para
+#: transactions.xml:850
+#, no-c-format
+msgid ""
+"<literal>LockMode.UPGRADE_NOWAIT</literal> may be acquired upon explicit "
+"user request using a <literal>SELECT ... FOR UPDATE NOWAIT</literal> under "
+"Oracle."
 msgstr ""
+"当用户显式的使用Oracle数据库的SQL语句<literal>SELECT ... FOR UPDATE NOWAIT</"
+"literal> 的时候,锁定级别设置<literal>LockMode.UPGRADE_NOWAIT</literal>"
 
-#: index.docbook:856
-msgid "<literal>LockMode.READ</literal> is acquired automatically when Hibernate reads data under Repeatable Read or Serializable isolation level. May be re-acquired by explicit user request."
+#. Tag: para
+#: transactions.xml:856
+#, no-c-format
+msgid ""
+"<literal>LockMode.READ</literal> is acquired automatically when Hibernate "
+"reads data under Repeatable Read or Serializable isolation level. May be re-"
+"acquired by explicit user request."
 msgstr ""
+"当Hibernate在“可重复读”或者是“序列化”数据库隔离级别下读取数据的时候,锁定模"
+"式 自动设置为<literal>LockMode.READ</literal>。这种模式也可以通过用户显式指定"
+"进行设置。"
 
-#: index.docbook:863
-msgid "<literal>LockMode.NONE</literal> represents the absence of a lock. All objects switch to this lock mode at the end of a <literal>Transaction</literal>. Objects associated with the session via a call to <literal>update()</literal> or <literal>saveOrUpdate()</literal> also start out in this lock mode."
+#. Tag: para
+#: transactions.xml:863
+#, no-c-format
+msgid ""
+"<literal>LockMode.NONE</literal> represents the absence of a lock. All "
+"objects switch to this lock mode at the end of a <literal>Transaction</"
+"literal>. Objects associated with the session via a call to <literal>update()"
+"</literal> or <literal>saveOrUpdate()</literal> also start out in this lock "
+"mode."
 msgstr ""
+"<literal>LockMode.NONE</literal> 代表无需锁定。在<literal>Transaction</"
+"literal>结束时, 所有的对象都切换到该模式上来。与session相关联的对象通过调用"
+"<literal>update()</literal> 或者<literal>saveOrUpdate()</literal>脱离该模式。"
 
-#: index.docbook:872
-msgid "The \"explicit user request\" is expressed in one of the following ways:"
-msgstr ""
+#. Tag: para
+#: transactions.xml:872
+#, no-c-format
+msgid ""
+"The \"explicit user request\" is expressed in one of the following ways:"
+msgstr "\"显式的用户指定\"可以通过以下几种方式之一来表示:"
 
-#: index.docbook:878
-msgid "A call to <literal>Session.load()</literal>, specifying a <literal>LockMode</literal>."
+#. Tag: para
+#: transactions.xml:878
+#, no-c-format
+msgid ""
+"A call to <literal>Session.load()</literal>, specifying a <literal>LockMode</"
+"literal>."
 msgstr ""
+"调用 <literal>Session.load()</literal>的时候指定<literal>锁定模式(LockMode)</"
+"literal>。"
 
-#: index.docbook:883
+#. Tag: para
+#: transactions.xml:883
+#, no-c-format
 msgid "A call to <literal>Session.lock()</literal>."
-msgstr ""
+msgstr "调用<literal>Session.lock()</literal>。"
 
-#: index.docbook:888
+#. Tag: para
+#: transactions.xml:888
+#, no-c-format
 msgid "A call to <literal>Query.setLockMode()</literal>."
-msgstr ""
+msgstr "调用<literal>Query.setLockMode()</literal>。"
 
-#: index.docbook:894
-msgid "If <literal>Session.load()</literal> is called with <literal>UPGRADE</literal> or <literal>UPGRADE_NOWAIT</literal>, and the requested object was not yet loaded by the session, the object is loaded using <literal>SELECT ... FOR UPDATE</literal>. If <literal>load()</literal> is called for an object that is already loaded with a less restrictive lock than the one requested, Hibernate calls <literal>lock()</literal> for that object."
+#. Tag: para
+#: transactions.xml:894
+#, no-c-format
+msgid ""
+"If <literal>Session.load()</literal> is called with <literal>UPGRADE</"
+"literal> or <literal>UPGRADE_NOWAIT</literal>, and the requested object was "
+"not yet loaded by the session, the object is loaded using "
+"<literal>SELECT ... FOR UPDATE</literal>. If <literal>load()</literal> is "
+"called for an object that is already loaded with a less restrictive lock "
+"than the one requested, Hibernate calls <literal>lock()</literal> for that "
+"object."
 msgstr ""
+"如果在<literal>UPGRADE</literal>或者<literal>UPGRADE_NOWAIT</literal>锁定模式"
+"下调 用<literal>Session.load()</literal>,并且要读取的对象尚未被session载入"
+"过,那么对象 通过<literal>SELECT ... FOR UPDATE</literal>这样的SQL语句被载"
+"入。如果为一个对象调用 <literal>load()</literal>方法时,该对象已经在另一个较"
+"少限制的锁定模式下被载入了,那 么Hibernate就对该对象调用<literal>lock()</"
+"literal> 方法。"
 
-#: index.docbook:903
-msgid "<literal>Session.lock()</literal> performs a version number check if the specified lock mode is <literal>READ</literal>, <literal>UPGRADE</literal> or <literal>UPGRADE_NOWAIT</literal>. (In the case of <literal>UPGRADE</literal> or <literal>UPGRADE_NOWAIT</literal>, <literal>SELECT ... FOR UPDATE</literal> is used.)"
+#. Tag: para
+#: transactions.xml:903
+#, no-c-format
+msgid ""
+"<literal>Session.lock()</literal> performs a version number check if the "
+"specified lock mode is <literal>READ</literal>, <literal>UPGRADE</literal> "
+"or <literal>UPGRADE_NOWAIT</literal>. (In the case of <literal>UPGRADE</"
+"literal> or <literal>UPGRADE_NOWAIT</literal>, <literal>SELECT ... FOR "
+"UPDATE</literal> is used.)"
 msgstr ""
+"如果指定的锁定模式是<literal>READ</literal>, <literal>UPGRADE</literal> 或 "
+"<literal>UPGRADE_NOWAIT</literal>,那么<literal>Session.lock()</literal>就 执"
+"行版本号检查。(在<literal>UPGRADE</literal> 或者<literal>UPGRADE_NOWAIT</"
+"literal> 锁定模式下,执行<literal>SELECT ... FOR UPDATE</literal>这样的SQL语"
+"句。)"
 
-#: index.docbook:910
-msgid "If the database does not support the requested lock mode, Hibernate will use an appropriate alternate mode (instead of throwing an exception). This ensures that applications will be portable."
+#. Tag: para
+#: transactions.xml:910
+#, no-c-format
+msgid ""
+"If the database does not support the requested lock mode, Hibernate will use "
+"an appropriate alternate mode (instead of throwing an exception). This "
+"ensures that applications will be portable."
 msgstr ""
+"如果数据库不支持用户设置的锁定模式,Hibernate将使用适当的替代模式(而不是扔出"
+"异常)。 这一点可以确保应用程序的可移植性。"
 
-#: index.docbook:919
+#. Tag: title
+#: transactions.xml:919
+#, no-c-format
 msgid "Connection Release Modes"
-msgstr ""
+msgstr "连接释放模式(Connection Release Modes)"
 
-#: index.docbook:921
-msgid "The legacy (2.x) behavior of Hibernate in regards to JDBC connection management was that a <literal>Session</literal> would obtain a connection when it was first needed and then hold unto that connection until the session was closed. Hibernate 3.x introduced the notion of connection release modes to tell a session how to handle its JDBC connections. Note that the following discussion is pertinent only to connections provided through a configured <literal>ConnectionProvider</literal>; user-supplied connections are outside the breadth of this discussion. The different release modes are identified by the enumerated values of <literal>org.hibernate.ConnectionReleaseMode</literal>:"
+#. Tag: para
+#: transactions.xml:921
+#, no-c-format
+msgid ""
+"The legacy (2.x) behavior of Hibernate in regards to JDBC connection "
+"management was that a <literal>Session</literal> would obtain a connection "
+"when it was first needed and then hold unto that connection until the "
+"session was closed. Hibernate 3.x introduced the notion of connection "
+"release modes to tell a session how to handle its JDBC connections. Note "
+"that the following discussion is pertinent only to connections provided "
+"through a configured <literal>ConnectionProvider</literal>; user-supplied "
+"connections are outside the breadth of this discussion. The different "
+"release modes are identified by the enumerated values of <literal>org."
+"hibernate.ConnectionReleaseMode</literal>:"
 msgstr ""
+"Hibernate关于JDBC连接管理的旧(2.x)行为是,<literal>Session</literal>在第一次"
+"需要的时候获取一个连接,在session关闭之前一直会持有这个连接。Hibernate引入了"
+"连接释放的概念,来告诉session如何处理它的JDBC连接。注意,下面的讨论只适用于采"
+"用配置<literal>ConnectionProvider</literal>来提供连接的情况,用户自己提供的连"
+"接与这里的讨论无关。通过<literal>org.hibernate.ConnectionReleaseMode</"
+"literal>的不同枚举值来使用不用的释放模式:"
 
-#: index.docbook:935
-msgid "<literal>ON_CLOSE</literal> - is essentially the legacy behavior described above. The Hibernate session obatins a connection when it first needs to perform some JDBC access and holds unto that connection until the session is closed."
+#. Tag: para
+#: transactions.xml:935
+#, no-c-format
+msgid ""
+"<literal>ON_CLOSE</literal> - is essentially the legacy behavior described "
+"above. The Hibernate session obatins a connection when it first needs to "
+"perform some JDBC access and holds unto that connection until the session is "
+"closed."
 msgstr ""
+"<literal>ON_CLOSE</literal> - 基本上就是上面提到的老式行为。Hibernate session"
+"在第一次需要进行JDBC操作的时候获取连接,然后持有它,直到session关闭。"
 
-#: index.docbook:942
-msgid "<literal>AFTER_TRANSACTION</literal> - says to release connections after a <literal>org.hibernate.Transaction</literal> has completed."
+#. Tag: para
+#: transactions.xml:942
+#, no-c-format
+msgid ""
+"<literal>AFTER_TRANSACTION</literal> - says to release connections after a "
+"<literal>org.hibernate.Transaction</literal> has completed."
 msgstr ""
+"<literal>AFTER_TRANSACTION</literal> - 在<literal>org.hibernate.Transaction</"
+"literal>结束后释放连接。"
 
-#: index.docbook:948
-msgid "<literal>AFTER_STATEMENT</literal> (also referred to as aggressive release) - says to release connections after each and every statement execution. This aggressive releasing is skipped if that statement leaves open resources associated with the given session; currently the only situation where this occurs is through the use of <literal>org.hibernate.ScrollableResults</literal>."
+#. Tag: para
+#: transactions.xml:948
+#, no-c-format
+msgid ""
+"<literal>AFTER_STATEMENT</literal> (also referred to as aggressive release) "
+"- says to release connections after each and every statement execution. This "
+"aggressive releasing is skipped if that statement leaves open resources "
+"associated with the given session; currently the only situation where this "
+"occurs is through the use of <literal>org.hibernate.ScrollableResults</"
+"literal>."
 msgstr ""
+"<literal>AFTER_STATEMENT</literal> (也被称做积极释放) - 在每一条语句被执行后"
+"就释放连接。但假若语句留下了与session相关的资源,那就不会被释放。目前唯一的这"
+"种情形就是使用<literal>org.hibernate.ScrollableResults</literal>。"
 
-#: index.docbook:958
-msgid "The configuration parameter <literal>hibernate.connection.release_mode</literal> is used to specify which release mode to use. The possible values:"
+#. Tag: para
+#: transactions.xml:958
+#, no-c-format
+msgid ""
+"The configuration parameter <literal>hibernate.connection.release_mode</"
+"literal> is used to specify which release mode to use. The possible values:"
 msgstr ""
+"<literal>hibernate.connection.release_mode</literal>配置参数用来指定使用哪一"
+"种释放模式。可能的值有:"
 
-#: index.docbook:965
-msgid "<literal>auto</literal> (the default) - this choice delegates to the release mode returned by the <literal>org.hibernate.transaction.TransactionFactory.getDefaultReleaseMode()</literal> method. For JTATransactionFactory, this returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely a good idea to change this default behavior as failures due to the value of this setting tend to indicate bugs and/or invalid assumptions in user code."
+#. Tag: para
+#: transactions.xml:965
+#, no-c-format
+msgid ""
+"<literal>auto</literal> (the default) - this choice delegates to the release "
+"mode returned by the <literal>org.hibernate.transaction.TransactionFactory."
+"getDefaultReleaseMode()</literal> method. For JTATransactionFactory, this "
+"returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, "
+"this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely a good "
+"idea to change this default behavior as failures due to the value of this "
+"setting tend to indicate bugs and/or invalid assumptions in user code."
 msgstr ""
+"<literal>auto</literal>(默认) - 这一选择把释放模式委派给<literal>org."
+"hibernate.transaction.TransactionFactory.getDefaultReleaseMode()</literal>方"
+"法。对JTATransactionFactory来说,它会返回ConnectionReleaseMode."
+"AFTER_STATEMENT;对JDBCTransactionFactory来说,则是ConnectionReleaseMode."
+"AFTER_TRANSACTION。很少需要修改这一默认行为,因为假若设置不当,就会带来bug,"
+"或者给用户代码带来误导。"
 
-#: index.docbook:975
-msgid "<literal>on_close</literal> - says to use ConnectionReleaseMode.ON_CLOSE. This setting is left for backwards compatibility, but its use is highly discouraged."
+#. Tag: para
+#: transactions.xml:975
+#, no-c-format
+msgid ""
+"<literal>on_close</literal> - says to use ConnectionReleaseMode.ON_CLOSE. "
+"This setting is left for backwards compatibility, but its use is highly "
+"discouraged."
 msgstr ""
+"<literal>on_close</literal> - 使用 ConnectionReleaseMode.ON_CLOSE. 这种方式是"
+"为了向下兼容的,但是已经完全不被鼓励使用了。"
 
-#: index.docbook:981
-msgid "<literal>after_transaction</literal> - says to use ConnectionReleaseMode.AFTER_TRANSACTION. This setting should not be used in JTA environments. Also note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is considered to be in auto-commit mode connections will be released as if the release mode were AFTER_STATEMENT."
+#. Tag: para
+#: transactions.xml:981
+#, no-c-format
+msgid ""
+"<literal>after_transaction</literal> - says to use ConnectionReleaseMode."
+"AFTER_TRANSACTION. This setting should not be used in JTA environments. Also "
+"note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is "
+"considered to be in auto-commit mode connections will be released as if the "
+"release mode were AFTER_STATEMENT."
 msgstr ""
+"<literal>after_transaction</literal> - 使用ConnectionReleaseMode."
+"AFTER_TRANSACTION。这一设置不应该在JTA环境下使用。也要注意,使用"
+"ConnectionReleaseMode.AFTER_TRANSACTION的时候,假若session 处于auto-commit状"
+"态,连接会像AFTER_STATEMENT那样被释放。"
 
-#: index.docbook:989
-msgid "<literal>after_statement</literal> - says to use ConnectionReleaseMode.AFTER_STATEMENT. Additionally, the configured <literal>ConnectionProvider</literal> is consulted to see if it supports this setting (<literal>supportsAggressiveRelease()</literal>). If not, the release mode is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only safe in environments where we can either re-acquire the same underlying JDBC connection each time we make a call into <literal>ConnectionProvider.getConnection()</literal> or in auto-commit environments where it does not matter whether we get back the same connection."
+#. Tag: para
+#: transactions.xml:989
+#, no-c-format
+msgid ""
+"<literal>after_statement</literal> - says to use ConnectionReleaseMode."
+"AFTER_STATEMENT. Additionally, the configured <literal>ConnectionProvider</"
+"literal> is consulted to see if it supports this setting "
+"(<literal>supportsAggressiveRelease()</literal>). If not, the release mode "
+"is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only "
+"safe in environments where we can either re-acquire the same underlying JDBC "
+"connection each time we make a call into <literal>ConnectionProvider."
+"getConnection()</literal> or in auto-commit environments where it does not "
+"matter whether we get back the same connection."
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+"<literal>after_statement</literal> - 使用ConnectionReleaseMode."
+"AFTER_STATEMENT。除此之外,会查询配置的<literal>ConnectionProvider</"
+"literal>,是否它支持这一设置((<literal>supportsAggressiveRelease()</"
+"literal>))。假若不支持,释放模式会被设置为ConnectionReleaseMode."
+"AFTER_TRANSACTION。只有在你每次调用<literal>ConnectionProvider.getConnection"
+"()</literal>获取底层JDBC连接的时候,都可以确信获得同一个连接的时候,这一设置"
+"才是安全的;或者在auto-commit环境中,你可以不管是否每次都获得同一个连接的时"
+"候,这才是安全的。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/tutorial.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/tutorial.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/tutorial.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,1315 +1,2662 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:7
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: tutorial.xml:7
+#, no-c-format
 msgid "Introduction to Hibernate"
-msgstr ""
+msgstr "Hibernate入门"
 
-#: index.docbook:10
+#. Tag: title
+#: tutorial.xml:10
+#, no-c-format
 msgid "Preface"
-msgstr ""
+msgstr "前言"
 
-#: index.docbook:12
-msgid "This chapter is an introductory tutorial for new users of Hibernate. We start with a simple command line application using an in-memory database and develop it in easy to understand steps."
+#. Tag: para
+#: tutorial.xml:12
+#, no-c-format
+msgid ""
+"This chapter is an introductory tutorial for new users of Hibernate. We "
+"start with a simple command line application using an in-memory database and "
+"develop it in easy to understand steps."
 msgstr ""
+"本章是面向Hibernate初学者的一个入门教程。我们从一个使用驻留内存式(in-memory)"
+"数据库的简单命令行应用程序开始, 用易于理解的方式逐步开发。"
 
-#: index.docbook:18
-msgid "This tutorial is intended for new users of Hibernate but requires Java and SQL knowledge. It is based on a tutorial by Michael Gloegl, the third-party libraries we name are for JDK 1.4 and 5.0. You might need others for JDK 1.3."
+#. Tag: para
+#: tutorial.xml:18
+#, no-c-format
+msgid ""
+"This tutorial is intended for new users of Hibernate but requires Java and "
+"SQL knowledge. It is based on a tutorial by Michael Gloegl, the third-party "
+"libraries we name are for JDK 1.4 and 5.0. You might need others for JDK 1.3."
 msgstr ""
+"本章面向Hibernate初学者,但需要Java和SQL知识。它是在Michael Goegl所写的指南的"
+"基础上完成的。在这里,我们称第三方库文件是指JDK 1.4和5.0。若使用JDK1.3,你可"
+"能需要其它的库文件。"
 
-#: index.docbook:24
-msgid "The source code for the tutorial is included in the distribution in the <literal>doc/reference/tutorial/</literal> directory."
+#. Tag: para
+#: tutorial.xml:24
+#, no-c-format
+msgid ""
+"The source code for the tutorial is included in the distribution in the "
+"<literal>doc/reference/tutorial/</literal> directory."
 msgstr ""
+"本章的源代码已包含在发布包中,位于<literal>doc/reference/tutorial/</literal>"
+"目录下。"
 
-#: index.docbook:32
+#. Tag: title
+#: tutorial.xml:32
+#, no-c-format
 msgid "Part 1 - The first Hibernate Application"
-msgstr ""
+msgstr "第一部分 - 第一个Hibernate应用程序"
 
-#: index.docbook:34
-msgid "First, we'll create a simple console-based Hibernate application. We use an Java database (HSQL DB), so we do not have to install any database server."
+#. Tag: para
+#: tutorial.xml:34
+#, no-c-format
+msgid ""
+"First, we'll create a simple console-based Hibernate application. We use an "
+"Java database (HSQL DB), so we do not have to install any database server."
 msgstr ""
+"首先我们将创建一个简单的基于控制台的(console-based)Hibernate应用程序。由于我"
+"们使用Java数据库(HSQL DB),所以不必安装任何数据库服务器。"
 
-#: index.docbook:39
-msgid "Let's assume we need a small database application that can store events we want to attend, and information about the hosts of these events."
+#. Tag: para
+#: tutorial.xml:39
+#, no-c-format
+msgid ""
+"Let's assume we need a small database application that can store events we "
+"want to attend, and information about the hosts of these events."
 msgstr ""
+"假设我们希望有一个小应用程序可以保存我们希望参加的活动(events)和这些活动主"
+"办方的相关信息。 (译者注:在本教程的后面部分,我们将直接使用event而不是它的"
+"中文翻译“活动”,以免混淆。)"
 
-#: index.docbook:44
-msgid "The first thing we do, is set up our development directory and put all the Java libraries we need into it. Download the Hibernate distribution from the Hibernate website. Extract the package and place all required libraries found in <literal>/lib</literal> into into the <literal>/lib</literal> directory of your new development working directory. It should look like this:"
+#. Tag: para
+#: tutorial.xml:44
+#, no-c-format
+msgid ""
+"The first thing we do, is set up our development directory and put all the "
+"Java libraries we need into it. Download the Hibernate distribution from the "
+"Hibernate website. Extract the package and place all required libraries "
+"found in <literal>/lib</literal> into into the <literal>/lib</literal> "
+"directory of your new development working directory. It should look like "
+"this:"
 msgstr ""
+"我们所做的第一件事就是创建我们的开发目录,并且把所有需要用到的Java库文件放进"
+"去。解压缩从Hibernate网站下载的Hibernate发布包,并把<literal>/lib</literal>目"
+"录下所有需要的库文件拷到我们新建开发目录下的<literal>/lib</literal>目录下。看"
+"起来就像这样:"
 
-#: index.docbook:52
+#. Tag: programlisting
+#: tutorial.xml:52
+#, no-c-format
 msgid ""
-      "<![CDATA[.\n"
-      "+lib\n"
-      "  antlr.jar\n"
-      "  cglib.jar\n"
-      "  asm.jar\n"
-      "  asm-attrs.jars\n"
-      "  commons-collections.jar\n"
-      "  commons-logging.jar\n"
-      "  hibernate3.jar\n"
-      "  jta.jar\n"
-      "  dom4j.jar\n"
-      "  log4j.jar ]]>"
+"<![CDATA[.\n"
+"+lib\n"
+"  antlr.jar\n"
+"  cglib.jar\n"
+"  asm.jar\n"
+"  asm-attrs.jars\n"
+"  commons-collections.jar\n"
+"  commons-logging.jar\n"
+"  hibernate3.jar\n"
+"  jta.jar\n"
+"  dom4j.jar\n"
+"  log4j.jar ]]>"
 msgstr ""
 
-#: index.docbook:54
-msgid "This is the minimum set of required libraries (note that we also copied hibernate3.jar, the main archive) for Hibernate <emphasis>at the time of writing</emphasis>. The Hibernate release you are using might require more or less libraries. See the <literal>README.txt</literal> file in the <literal>lib/</literal> directory of the Hibernate distribution for more information about required and optional third-party libraries. (Actually, Log4j is not required but preferred by many developers.)"
+#. Tag: para
+#: tutorial.xml:54
+#, no-c-format
+msgid ""
+"This is the minimum set of required libraries (note that we also copied "
+"hibernate3.jar, the main archive) for Hibernate <emphasis>at the time of "
+"writing</emphasis>. The Hibernate release you are using might require more "
+"or less libraries. See the <literal>README.txt</literal> file in the "
+"<literal>lib/</literal> directory of the Hibernate distribution for more "
+"information about required and optional third-party libraries. (Actually, "
+"Log4j is not required but preferred by many developers.)"
 msgstr ""
+"<emphasis>到编写本文时为止</emphasis>,这些是Hibernate运行所需要的最小库文件"
+"集合(注意我们也拷贝了 Hibernate3.jar,这个是最主要的文件)。你正使用的"
+"Hibernate版本可能需要比这更多或少一些的库文件。请参见发布包中的<literal>lib/"
+"</literal>目录下的<literal>README.txt</literal>,以获取更多关于所需和可选的第"
+"三方库文件信息(事实上,Log4j并不是必须的库文件,但被许多开发者所喜欢)。"
 
-#: index.docbook:63
-msgid "Next we create a class that represents the event we want to store in database."
-msgstr ""
+#. Tag: para
+#: tutorial.xml:63
+#, no-c-format
+msgid ""
+"Next we create a class that represents the event we want to store in "
+"database."
+msgstr "接下来我们创建一个类,用来代表那些我们希望储存在数据库里的event。"
 
-#: index.docbook:68
+#. Tag: title
+#: tutorial.xml:68
+#, no-c-format
 msgid "The first class"
-msgstr ""
+msgstr "第一个class"
 
-#: index.docbook:70
-msgid "Our first persistent class is a simple JavaBean class with some properties:"
-msgstr ""
+#. Tag: para
+#: tutorial.xml:70
+#, no-c-format
+msgid ""
+"Our first persistent class is a simple JavaBean class with some properties:"
+msgstr "我们的第一个持久化类是一个带有一些属性(property)的简单JavaBean类:"
 
-#: index.docbook:74
+#. Tag: programlisting
+#: tutorial.xml:74
+#, no-c-format
 msgid ""
-      "<![CDATA[package events;\n"
-      "\n"
-      "import java.util.Date;\n"
-      "\n"
-      "public class Event {\n"
-      "    private Long id;\n"
-      "\n"
-      "    private String title;\n"
-      "    private Date date;\n"
-      "\n"
-      "    public Event() {}\n"
-      "\n"
-      "    public Long getId() {\n"
-      "        return id;\n"
-      "    }\n"
-      "\n"
-      "    private void setId(Long id) {\n"
-      "        this.id = id;\n"
-      "    }\n"
-      "\n"
-      "    public Date getDate() {\n"
-      "        return date;\n"
-      "    }\n"
-      "\n"
-      "    public void setDate(Date date) {\n"
-      "        this.date = date;\n"
-      "    }\n"
-      "\n"
-      "    public String getTitle() {\n"
-      "        return title;\n"
-      "    }\n"
-      "\n"
-      "    public void setTitle(String title) {\n"
-      "        this.title = title;\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[package events;\n"
+"\n"
+"import java.util.Date;\n"
+"\n"
+"public class Event {\n"
+"    private Long id;\n"
+"\n"
+"    private String title;\n"
+"    private Date date;\n"
+"\n"
+"    public Event() {}\n"
+"\n"
+"    public Long getId() {\n"
+"        return id;\n"
+"    }\n"
+"\n"
+"    private void setId(Long id) {\n"
+"        this.id = id;\n"
+"    }\n"
+"\n"
+"    public Date getDate() {\n"
+"        return date;\n"
+"    }\n"
+"\n"
+"    public void setDate(Date date) {\n"
+"        this.date = date;\n"
+"    }\n"
+"\n"
+"    public String getTitle() {\n"
+"        return title;\n"
+"    }\n"
+"\n"
+"    public void setTitle(String title) {\n"
+"        this.title = title;\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:76
-msgid "You can see that this class uses standard JavaBean naming conventions for property getter and setter methods, as well as private visibility for the fields. This is a recommended design - but not required. Hibernate can also access fields directly, the benefit of accessor methods is robustness for refactoring. The no-argument constructor is required to instantiate an object of this class through reflection."
+#. Tag: para
+#: tutorial.xml:76
+#, no-c-format
+msgid ""
+"You can see that this class uses standard JavaBean naming conventions for "
+"property getter and setter methods, as well as private visibility for the "
+"fields. This is a recommended design - but not required. Hibernate can also "
+"access fields directly, the benefit of accessor methods is robustness for "
+"refactoring. The no-argument constructor is required to instantiate an "
+"object of this class through reflection."
 msgstr ""
+"你可以看到这个类对属性的存取方法(getter and setter method)使用了标准"
+"JavaBean命名约定,同时把类属性(field)的访问级别设成私有的(private)。这是"
+"推荐的设计,但并不是必须的。Hibernate也可以直接访问这些field,而使用访问方法"
+"(accessor method)的好处是提供了重构时的健壮性(robustness)。为了通过反射机"
+"制(Reflection)来实例化这个类的对象,我们需要提供一个无参的构造器(no-"
+"argument constructor)。"
 
-#: index.docbook:84
-msgid "The <literal>id</literal> property holds a unique identifier value for a particular event. All persistent entity classes (there are less important dependent classes as well) will need such an identifier property if we want to use the full feature set of Hibernate. In fact, most applications (esp. web applications) need to distinguish objects by identifier, so you should consider this a feature rather than a limitation. However, we usually don't manipulate the identity of an object, hence the setter method should be private. Only Hibernate will assign identifiers when an object is saved. You can see that Hibernate can access public, private, and protected accessor methods, as well as (public, private, protected) fields directly. The choice is up to you and you can match it to fit your application design."
+#. Tag: para
+#: tutorial.xml:84
+#, no-c-format
+msgid ""
+"The <literal>id</literal> property holds a unique identifier value for a "
+"particular event. All persistent entity classes (there are less important "
+"dependent classes as well) will need such an identifier property if we want "
+"to use the full feature set of Hibernate. In fact, most applications (esp. "
+"web applications) need to distinguish objects by identifier, so you should "
+"consider this a feature rather than a limitation. However, we usually don't "
+"manipulate the identity of an object, hence the setter method should be "
+"private. Only Hibernate will assign identifiers when an object is saved. You "
+"can see that Hibernate can access public, private, and protected accessor "
+"methods, as well as (public, private, protected) fields directly. The choice "
+"is up to you and you can match it to fit your application design."
 msgstr ""
+"对一特定的event, <literal>id</literal> 属性持有唯一的标识符(identifier)的"
+"值。如果我们希望使用Hibernate提供的所有特性,那么所有的持久化实体"
+"(persistent entity)类(这里也包括一些次要依赖类)都需要一个这样的标识符属"
+"性。而事实上,大多数应用程序(特别是web应用程序)都需要通过标识符来区别对象,"
+"所以你应该考虑使用标识符属性而不是把它当作一种限制。然而,我们通常不会操作对"
+"象的标识(identity),因此它的setter方法的访问级别应该声明private。这样当对象"
+"被保存的时候,只有Hibernate可以为它分配标识符值。你可看到Hibernate可以直接访"
+"问public,private和protected的访问方法和field。所以选择哪种方式完全取决于你,"
+"你可以使你的选择与你的应用程序设计相吻合。"
 
-#: index.docbook:96
-msgid "The no-argument constructor is a requirement for all persistent classes; Hibernate has to create objects for you, using Java Reflection. The constructor can be private, however, package visibility is required for runtime proxy generation and efficient data retrieval without bytecode instrumentation."
+#. Tag: para
+#: tutorial.xml:96
+#, no-c-format
+msgid ""
+"The no-argument constructor is a requirement for all persistent classes; "
+"Hibernate has to create objects for you, using Java Reflection. The "
+"constructor can be private, however, package visibility is required for "
+"runtime proxy generation and efficient data retrieval without bytecode "
+"instrumentation."
 msgstr ""
+"所有的持久化类(persistent classes)都要求有无参的构造器,因为Hibernate必须使"
+"用Java反射机制来为你创建对象。构造器(constructor)的访问级别可以是private,"
+"然而当生成运行时代理(runtime proxy)的时候则要求使用至少是package 级别的访问"
+"控制,这样在没有字节码指令(bytecode instrumentation)的情况下,从持久化类里"
+"获取数据会更有效率。"
 
-#: index.docbook:103
-msgid "Place this Java source file in a directory called <literal>src</literal> in the development folder, and in its correct package. The directory should now look like this:"
+#. Tag: para
+#: tutorial.xml:103
+#, no-c-format
+msgid ""
+"Place this Java source file in a directory called <literal>src</literal> in "
+"the development folder, and in its correct package. The directory should now "
+"look like this:"
 msgstr ""
+"把这个Java源代码文件放到开发目录下的<literal>src</literal>目录里,注意包位置"
+"要正确。 现在这个目录看起来应该像这样:"
 
-#: index.docbook:108
+#. Tag: programlisting
+#: tutorial.xml:108
+#, no-c-format
 msgid ""
-      "<![CDATA[.\n"
-      "+lib\n"
-      "  <Hibernate and third-party libraries>\n"
-      "+src\n"
-      "  +events\n"
-      "    Event.java]]>"
+"<![CDATA[.\n"
+"+lib\n"
+"  <Hibernate and third-party libraries>\n"
+"+src\n"
+"  +events\n"
+"    Event.java]]>"
 msgstr ""
 
-#: index.docbook:110
+#. Tag: para
+#: tutorial.xml:110
+#, no-c-format
 msgid "In the next step, we tell Hibernate about this persistent class."
-msgstr ""
+msgstr "下一步,我们把这个持久化类的信息告诉Hibernate。"
 
-#: index.docbook:117
+#. Tag: title
+#: tutorial.xml:117
+#, no-c-format
 msgid "The mapping file"
-msgstr ""
+msgstr "映射文件"
 
-#: index.docbook:119
-msgid "Hibernate needs to know how to load and store objects of the persistent class. This is where the Hibernate mapping file comes into play. The mapping file tells Hibernate what table in the database it has to access, and what columns in that table it should use."
+#. Tag: para
+#: tutorial.xml:119
+#, no-c-format
+msgid ""
+"Hibernate needs to know how to load and store objects of the persistent "
+"class. This is where the Hibernate mapping file comes into play. The mapping "
+"file tells Hibernate what table in the database it has to access, and what "
+"columns in that table it should use."
 msgstr ""
+"Hibernate需要知道怎样去加载(load)和存储(store)持久化类的对象。这正是"
+"Hibernate映射文件发挥作用的地方。映射文件告诉Hibernate它,应该访问数据库"
+"(database)里面的哪个表(table)及应该使用表里面的哪些字段(column)。"
 
-#: index.docbook:126
+#. Tag: para
+#: tutorial.xml:126
+#, no-c-format
 msgid "The basic structure of a mapping file looks like this:"
-msgstr ""
+msgstr "一个映射文件的基本结构看起来像这样:"
 
-#: index.docbook:130
+#. Tag: programlisting
+#: tutorial.xml:130
+#, no-c-format
 msgid ""
-      "<![CDATA[<?xml version=\"1.0\"?>\n"
-      "<!DOCTYPE hibernate-mapping PUBLIC\n"
-      "        \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
-      "        \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
-      "\n"
-      "<hibernate-mapping>\n"
-      "[...]\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE hibernate-mapping PUBLIC\n"
+"        \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+"        \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+"\n"
+"<hibernate-mapping>\n"
+"[...]\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:132
-msgid "Note that the Hibernate DTD is very sophisticated. You can use it for auto-completion of XML mapping elements and attributes in your editor or IDE. You also should open up the DTD file in your text editor - it's the easiest way to get an overview of all elements and attributes and to see the defaults, as well as some comments. Note that Hibernate will not load the DTD file from the web, but first look it up from the classpath of the application. The DTD file is included in <literal>hibernate3.jar</literal> as well as in the <literal>src/</literal> directory of the Hibernate distribution."
+#. Tag: para
+#: tutorial.xml:132
+#, no-c-format
+msgid ""
+"Note that the Hibernate DTD is very sophisticated. You can use it for auto-"
+"completion of XML mapping elements and attributes in your editor or IDE. You "
+"also should open up the DTD file in your text editor - it's the easiest way "
+"to get an overview of all elements and attributes and to see the defaults, "
+"as well as some comments. Note that Hibernate will not load the DTD file "
+"from the web, but first look it up from the classpath of the application. "
+"The DTD file is included in <literal>hibernate3.jar</literal> as well as in "
+"the <literal>src/</literal> directory of the Hibernate distribution."
 msgstr ""
+"注意Hibernate的DTD是非常复杂的。你的编辑器或者IDE里使用它来自动完成那些用来映"
+"射的XML元素(element)和属性(attribute)。你也可以在文本编辑器里打开DTD-这"
+"是最简单的方式来概览所有的元素和attribute,并查看它们的缺省值以及注释。注意"
+"Hibernate不会从web加载DTD文件,但它会首先在应用程序的classpath中查找。DTD文件"
+"已包括在<literal>hibernate3.jar</literal>里,同时也在Hibernate发布包的"
+"<literal>src/</literal>目录下。"
 
-#: index.docbook:143
-msgid "We will omit the DTD declaration in future examples to shorten the code. It is of course not optional."
+#. Tag: para
+#: tutorial.xml:143
+#, no-c-format
+msgid ""
+"We will omit the DTD declaration in future examples to shorten the code. It "
+"is of course not optional."
 msgstr ""
+"为缩短代码长度,在以后的例子里我们会省略DTD的声明。当然,在实际的应用程序中,"
+"DTD声明是必须的。"
 
-#: index.docbook:148
-msgid "Between the two <literal>hibernate-mapping</literal> tags, include a <literal>class</literal> element. All persistent entity classes (again, there might be dependent classes later on, which are not first-class entities) need such a mapping, to a table in the SQL database:"
+#. Tag: para
+#: tutorial.xml:148
+#, no-c-format
+msgid ""
+"Between the two <literal>hibernate-mapping</literal> tags, include a "
+"<literal>class</literal> element. All persistent entity classes (again, "
+"there might be dependent classes later on, which are not first-class "
+"entities) need such a mapping, to a table in the SQL database:"
 msgstr ""
+"在<literal>hibernate-mapping</literal>标签(tag)之间, 含有一个"
+"<literal>class</literal>元素。所有的持久化实体类(再次声明,或许接下来会有依"
+"赖类,就是那些次要的实体)都需要一个这样的映射,来把类对象映射到SQL数据库里的"
+"表。"
 
-#: index.docbook:155
+#. Tag: programlisting
+#: tutorial.xml:155
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "\n"
-      "    <class name=\"events.Event\" table=\"EVENTS\">\n"
-      "\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"\n"
+"    <class name=\"events.Event\" table=\"EVENTS\">\n"
+"\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:157
-msgid "So far we told Hibernate how to persist and load object of class <literal>Event</literal> to the table <literal>EVENTS</literal>, each instance represented by a row in that table. Now we continue with a mapping of the unique identifier property to the tables primary key. In addition, as we don't want to care about handling this identifier, we configure Hibernate's identifier generation strategy for a surrogate primary key column:"
+#. Tag: para
+#: tutorial.xml:157
+#, no-c-format
+msgid ""
+"So far we told Hibernate how to persist and load object of class "
+"<literal>Event</literal> to the table <literal>EVENTS</literal>, each "
+"instance represented by a row in that table. Now we continue with a mapping "
+"of the unique identifier property to the tables primary key. In addition, as "
+"we don't want to care about handling this identifier, we configure "
+"Hibernate's identifier generation strategy for a surrogate primary key "
+"column:"
 msgstr ""
+"到目前为止,我们告诉了Hibernate怎样把<literal>Events</literal>类的对象持久化"
+"到数据库的<literal>EVENTS</literal>表里,以及怎样从<literal>EVENTS</literal>"
+"表加载到<literal>Events</literal>类的对象。每个实例对应着数据库表中的一行。现"
+"在我们将继续讨论有关唯一标识符属性到数据库表的映射。另外,由于我们不关心怎样"
+"处理这个标识符,我们就配置由Hibernate的标识符生成策略来产生代理主键字段。"
 
-#: index.docbook:165
+#. Tag: programlisting
+#: tutorial.xml:165
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "\n"
-      "    <class name=\"events.Event\" table=\"EVENTS\">\n"
-      "        <id name=\"id\" column=\"EVENT_ID\">\n"
-      "            <generator class=\"native\"/>\n"
-      "        </id>\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"\n"
+"    <class name=\"events.Event\" table=\"EVENTS\">\n"
+"        <id name=\"id\" column=\"EVENT_ID\">\n"
+"            <generator class=\"native\"/>\n"
+"        </id>\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:167
-msgid "The <literal>id</literal> element is the declaration of the identifer property, <literal>name=\"id\"</literal> declares the name of the Java property - Hibernate will use the getter and setter methods to access the property. The column attribute tells Hibernate which column of the <literal>EVENTS</literal> table we use for this primary key. The nested <literal>generator</literal> element specifies the identifier generation strategy, in this case we used <literal>native</literal>, which picks the best strategy depending on the configured database (dialect). Hibernate supports database generated, globally unique, as well as application assigned identifiers (or any strategy you have written an extension for)."
+#. Tag: para
+#: tutorial.xml:167
+#, no-c-format
+msgid ""
+"The <literal>id</literal> element is the declaration of the identifer "
+"property, <literal>name=\"id\"</literal> declares the name of the Java "
+"property - Hibernate will use the getter and setter methods to access the "
+"property. The column attribute tells Hibernate which column of the "
+"<literal>EVENTS</literal> table we use for this primary key. The nested "
+"<literal>generator</literal> element specifies the identifier generation "
+"strategy, in this case we used <literal>native</literal>, which picks the "
+"best strategy depending on the configured database (dialect). Hibernate "
+"supports database generated, globally unique, as well as application "
+"assigned identifiers (or any strategy you have written an extension for)."
 msgstr ""
+"<literal>id</literal>元素是标识符属性的声明,<literal>name=\"id\"</literal> "
+"声明了Java属性的名字 - Hibernate会使用<literal>getId()</literal>和"
+"<literal>setId()</literal>来访问它。 <literal>column</literal>属性则告诉"
+"Hibernate, 我们使用<literal>EVENTS</literal>表的哪个字段作为主键。嵌套的"
+"<literal>generator</literal>元素指定了标识符生成策略,在这里我们指定"
+"<literal>native</literal>,它根据已配置的数据库(方言)自动选择最佳的标识符生"
+"成策略。Hibernate支持由数据库生成,全局唯一性(globally unique)和应用程序指"
+"定(或者你自己为任何已有策略所写的扩展)这些策略来生成标识符。"
 
-#: index.docbook:180
-msgid "Finally we include declarations for the persistent properties of the class in the mapping file. By default, no properties of the class are considered persistent:"
+#. Tag: para
+#: tutorial.xml:180
+#, no-c-format
+msgid ""
+"Finally we include declarations for the persistent properties of the class "
+"in the mapping file. By default, no properties of the class are considered "
+"persistent:"
 msgstr ""
+"最后我们在映射文件里面包含需要持久化属性的声明。默认情况下,类里面的属性都被"
+"视为非持久化的:"
 
-#: index.docbook:186
+#. Tag: programlisting
+#: tutorial.xml:186
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "<hibernate-mapping>\n"
-      "\n"
-      "    <class name=\"events.Event\" table=\"EVENTS\">\n"
-      "        <id name=\"id\" column=\"EVENT_ID\">\n"
-      "            <generator class=\"native\"/>\n"
-      "        </id>\n"
-      "        <property name=\"date\" type=\"timestamp\" column=\"EVENT_DATE\"/>\n"
-      "        <property name=\"title\"/>\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[\n"
+"<hibernate-mapping>\n"
+"\n"
+"    <class name=\"events.Event\" table=\"EVENTS\">\n"
+"        <id name=\"id\" column=\"EVENT_ID\">\n"
+"            <generator class=\"native\"/>\n"
+"        </id>\n"
+"        <property name=\"date\" type=\"timestamp\" column=\"EVENT_DATE\"/>\n"
+"        <property name=\"title\"/>\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:188
-msgid "Just as with the <literal>id</literal> element, the <literal>name</literal> attribute of the <literal>property</literal> element tells Hibernate which getter and setter methods to use. So, in this case, Hibernate will look for <literal>getDate()/setDate()</literal>, as well as <literal>getTitle()/setTitle()</literal>."
+#. Tag: para
+#: tutorial.xml:188
+#, no-c-format
+msgid ""
+"Just as with the <literal>id</literal> element, the <literal>name</literal> "
+"attribute of the <literal>property</literal> element tells Hibernate which "
+"getter and setter methods to use. So, in this case, Hibernate will look for "
+"<literal>getDate()/setDate()</literal>, as well as <literal>getTitle()/"
+"setTitle()</literal>."
 msgstr ""
+"和<literal>id</literal>元素一样,<literal>property</literal>元素的"
+"<literal>name</literal>属性告诉Hibernate使用哪个getter和setter方法。在此例"
+"中,Hibernate会寻找<literal>getDate()/setDate()</literal>, 以及"
+"<literal>getTitle()/setTitle()</literal>。"
 
-#: index.docbook:195
-msgid "Why does the <literal>date</literal> property mapping include the <literal>column</literal> attribute, but the <literal>title</literal> doesn't? Without the <literal>column</literal> attribute Hibernate by default uses the property name as the column name. This works fine for <literal>title</literal>. However, <literal>date</literal> is a reserved keyword in most database, so we better map it to a different name."
+#. Tag: para
+#: tutorial.xml:195
+#, no-c-format
+msgid ""
+"Why does the <literal>date</literal> property mapping include the "
+"<literal>column</literal> attribute, but the <literal>title</literal> "
+"doesn't? Without the <literal>column</literal> attribute Hibernate by "
+"default uses the property name as the column name. This works fine for "
+"<literal>title</literal>. However, <literal>date</literal> is a reserved "
+"keyword in most database, so we better map it to a different name."
 msgstr ""
+"为什么<literal>date</literal>属性的映射含有<literal>column</literal> "
+"attribute,而<literal>title</literal>却没有?当没有设定<literal>column</"
+"literal> attribute 的时候,Hibernate缺省地使用JavaBean的属性名作为字段名。对"
+"于<literal>title</literal>,这样工作得很好。然而,<literal>date</literal>在多"
+"数的数据库里,是一个保留关键字,所以我们最好把它映射成一个不同的名字。"
 
-#: index.docbook:204
-msgid "The next interesting thing is that the <literal>title</literal> mapping also lacks a <literal>type</literal> attribute. The types we declare and use in the mapping files are not, as you might expect, Java data types. They are also not SQL database types. These types are so called <emphasis>Hibernate mapping types</emphasis>, converters which can translate from Java to SQL data types and vice versa. Again, Hibernate will try to determine the correct conversion and mapping type itself if the <literal>type</literal> attribute is not present in the mapping. In some cases this automatic detection (using Reflection on the Java class) might not have the default you expect or need. This is the case with the <literal>date</literal> property. Hibernate can't know if the property (which is of <literal>java.util.Date</literal>) should map to a SQL <literal>date</literal>, <literal>timestamp</literal>, or <literal>time</literal> column. We preserve full date and time information !
 by mapping the property with a <literal>timestamp</literal> converter."
+#. Tag: para
+#: tutorial.xml:204
+#, no-c-format
+msgid ""
+"The next interesting thing is that the <literal>title</literal> mapping also "
+"lacks a <literal>type</literal> attribute. The types we declare and use in "
+"the mapping files are not, as you might expect, Java data types. They are "
+"also not SQL database types. These types are so called <emphasis>Hibernate "
+"mapping types</emphasis>, converters which can translate from Java to SQL "
+"data types and vice versa. Again, Hibernate will try to determine the "
+"correct conversion and mapping type itself if the <literal>type</literal> "
+"attribute is not present in the mapping. In some cases this automatic "
+"detection (using Reflection on the Java class) might not have the default "
+"you expect or need. This is the case with the <literal>date</literal> "
+"property. Hibernate can't know if the property (which is of <literal>java."
+"util.Date</literal>) should map to a SQL <literal>date</literal>, "
+"<literal>timestamp</literal>, or <literal>time</literal> column. We preserve "
+"full date and time information by mapping the property with a "
+"<literal>timestamp</literal> converter."
 msgstr ""
+"另一有趣的事情是<literal>title</literal>属性缺少一个<literal>type</literal> "
+"attribute。我们在映射文件里声明并使用的类型,却不是我们期望的那样,是Java数据"
+"类型,同时也不是SQL数据库的数据类型。这些类型就是所谓的Hibernate 映射类型"
+"<emphasis>(mapping types)</emphasis>,它们能把Java数据类型转换到SQL数据类"
+"型,反之亦然。再次重申,如果在映射文件中没有设置<literal>type</literal>属性的"
+"话,Hibernate会自己试着去确定正确的转换类型和它的映射类型。在某些情况下这个自"
+"动检测机制(在Java 类上使用反射机制)不会产生你所期待或需要的缺省值。"
+"<literal>date</literal>属性就是个很好的例子,Hibernate无法知道这个属性"
+"(<literal>java.util.Date</literal>类型的)应该被映射成:SQL <literal>date</"
+"literal>,或<literal>timestamp</literal>,还是<literal>time</literal> 字段。"
+"在此例中,把这个属性映射成<literal>timestamp</literal> 转换器,这样我们预留了"
+"日期和时间的全部信息。"
 
-#: index.docbook:220
-msgid "This mapping file should be saved as <literal>Event.hbm.xml</literal>, right in the directory next to the <literal>Event</literal> Java class source file. The naming of mapping files can be arbitrary, however the <literal>hbm.xml</literal> suffix is a convention in the Hibernate developer community. The directory structure should now look like this:"
+#. Tag: para
+#: tutorial.xml:220
+#, no-c-format
+msgid ""
+"This mapping file should be saved as <literal>Event.hbm.xml</literal>, right "
+"in the directory next to the <literal>Event</literal> Java class source "
+"file. The naming of mapping files can be arbitrary, however the <literal>hbm."
+"xml</literal> suffix is a convention in the Hibernate developer community. "
+"The directory structure should now look like this:"
 msgstr ""
+"应该把这个映射文件保存为<literal>Event.hbm.xml</literal>,且就在"
+"<literal>Event</literal>Java类的源文件目录下。映射文件可随意地命名,但"
+"<literal>hbm.xml</literal>的后缀已成为Hibernate开发者社区的约定。现在目录结构"
+"看起来应该像这样:"
 
-#: index.docbook:228
+#. Tag: programlisting
+#: tutorial.xml:228
+#, no-c-format
 msgid ""
-      "<![CDATA[.\n"
-      "+lib\n"
-      "  <Hibernate and third-party libraries>\n"
-      "+src\n"
-      "  +events\n"
-      "    Event.java\n"
-      "    Event.hbm.xml]]>"
+"<![CDATA[.\n"
+"+lib\n"
+"  <Hibernate and third-party libraries>\n"
+"+src\n"
+"  +events\n"
+"    Event.java\n"
+"    Event.hbm.xml]]>"
 msgstr ""
 
-#: index.docbook:230
+#. Tag: para
+#: tutorial.xml:230
+#, no-c-format
 msgid "We continue with the main configuration of Hibernate."
-msgstr ""
+msgstr "我们继续进行Hibernate的主要配置。"
 
-#: index.docbook:237
+#. Tag: title
+#: tutorial.xml:237
+#, no-c-format
 msgid "Hibernate configuration"
-msgstr ""
+msgstr "Hibernate配置"
 
-#: index.docbook:239
-msgid "We now have a persistent class and its mapping file in place. It is time to configure Hibernate. Before we do this, we will need a database. HSQL DB, a java-based SQL DBMS, can be downloaded from the HSQL DB website(http://hsqldb.org/). Actually, you only need the <literal>hsqldb.jar</literal> from this download. Place this file in the <literal>lib/</literal> directory of the development folder."
+#. Tag: para
+#: tutorial.xml:239
+#, no-c-format
+msgid ""
+"We now have a persistent class and its mapping file in place. It is time to "
+"configure Hibernate. Before we do this, we will need a database. HSQL DB, a "
+"java-based SQL DBMS, can be downloaded from the HSQL DB website(http://"
+"hsqldb.org/). Actually, you only need the <literal>hsqldb.jar</literal> from "
+"this download. Place this file in the <literal>lib/</literal> directory of "
+"the development folder."
 msgstr ""
+"现在我们已经有了一个持久化类和它的映射文件,该是配置Hibernate的时候了。在此之"
+"前,我们需要一个数据库。 HSQL DB是种基于Java 的SQL数据库管理系统(DBMS),可"
+"以从HSQL DB的网站上下载。实际上,你只需下载的包中的<literal>hsqldb.jar</"
+"literal>文件,并把这个文件放在开发文件夹的<literal>lib/</literal>目录下即可。"
 
-#: index.docbook:247
-msgid "Create a directory called <literal>data</literal> in the root of the development directory - this is where HSQL DB will store its data files. Now start the database by running <literal>java -classpath ../lib/hsqldb.jar org.hsqldb.Server</literal> in this data directory. You can see it start up and bind to a TCP/IP socket, this is where our application will connect later. If you want to start with a fresh database during this tutorial, shutdown HSQL DB (press <literal>CTRL + C</literal> in the window), delete all files in the <literal>data/</literal> directory, and start HSQL DB again."
+#. Tag: para
+#: tutorial.xml:247
+#, no-c-format
+msgid ""
+"Create a directory called <literal>data</literal> in the root of the "
+"development directory - this is where HSQL DB will store its data files. Now "
+"start the database by running <literal>java -classpath ../lib/hsqldb.jar org."
+"hsqldb.Server</literal> in this data directory. You can see it start up and "
+"bind to a TCP/IP socket, this is where our application will connect later. "
+"If you want to start with a fresh database during this tutorial, shutdown "
+"HSQL DB (press <literal>CTRL + C</literal> in the window), delete all files "
+"in the <literal>data/</literal> directory, and start HSQL DB again."
 msgstr ""
+"在开发的根目录下创建一个<literal>data</literal>目录 - 这是HSQL DB存储数据文"
+"件的地方。此时在data目录中运行<literal>java -classpath ../lib/hsqldb.jar org."
+"hsqldb.Server</literal>就可启动数据库。你可以在log中看到它的启动,及绑定到"
+"TCP/IP套结字,这正是我们的应用程序稍后会连接的地方。如果你希望在本例中运行一"
+"个全新的数据库,就在窗口中按下<literal>CTRL + C</literal>来关闭HSQL数据库,并"
+"删除<literal>data/</literal>目录下的所有文件,再重新启动HSQL数据库。"
 
-#: index.docbook:257
-msgid "Hibernate is the layer in your application which connects to this database, so it needs connection information. The connections are made through a JDBC connection pool, which we also have to configure. The Hibernate distribution contains several open source JDBC connection pooling tools, but will use the Hibernate built-in connection pool for this tutorial. Note that you have to copy the required library into your classpath and use different connection pooling settings if you want to use a production-quality third party JDBC pooling software."
+#. Tag: para
+#: tutorial.xml:257
+#, no-c-format
+msgid ""
+"Hibernate is the layer in your application which connects to this database, "
+"so it needs connection information. The connections are made through a JDBC "
+"connection pool, which we also have to configure. The Hibernate distribution "
+"contains several open source JDBC connection pooling tools, but will use the "
+"Hibernate built-in connection pool for this tutorial. Note that you have to "
+"copy the required library into your classpath and use different connection "
+"pooling settings if you want to use a production-quality third party JDBC "
+"pooling software."
 msgstr ""
+"Hibernate是你的应用程序里连接数据库的那层,所以它需要连接用的信息。连接"
+"(connection)是通过一个也由我们配置的JDBC连接池(connection pool)来完成的。"
+"Hibernate的发布包里包含了许多开源的(open source)连接池,但在我们例子中使用"
+"Hibernate内置的连接池。注意,如果你希望使用一个产品级(production-quality)的第"
+"三方连接池软件,你必须拷贝所需的库文件到你的classpath下,并使用不同的连接池设"
+"置。"
 
-#: index.docbook:267
-msgid "For Hibernate's configuration, we can use a simple <literal>hibernate.properties</literal> file, a slightly more sophisticated <literal>hibernate.cfg.xml</literal> file, or even complete programmatic setup. Most users prefer the XML configuration file:"
+#. Tag: para
+#: tutorial.xml:267
+#, no-c-format
+msgid ""
+"For Hibernate's configuration, we can use a simple <literal>hibernate."
+"properties</literal> file, a slightly more sophisticated <literal>hibernate."
+"cfg.xml</literal> file, or even complete programmatic setup. Most users "
+"prefer the XML configuration file:"
 msgstr ""
+"为了保存Hibernate的配置,我们可以使用一个简单的<literal>hibernate."
+"properties</literal>文件,或者一个稍微复杂的<literal>hibernate.cfg.xml</"
+"literal>,甚至可以完全使用程序来配置Hibernate。多数用户更喜欢使用XML配置文"
+"件:"
 
-#: index.docbook:273
+#. Tag: programlisting
+#: tutorial.xml:273
+#, no-c-format
 msgid ""
-      "<![CDATA[<?xml version='1.0' encoding='utf-8'?>\n"
-      "<!DOCTYPE hibernate-configuration PUBLIC\n"
-      "        \"-//Hibernate/Hibernate Configuration DTD 3.0//EN\"\n"
-      "        \"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd\">\n"
-      "\n"
-      "<hibernate-configuration>\n"
-      "\n"
-      "    <session-factory>\n"
-      "\n"
-      "        <!-- Database connection settings -->\n"
-      "        <property name=\"connection.driver_class\">org.hsqldb.jdbcDriver</property>\n"
-      "        <property name=\"connection.url\">jdbc:hsqldb:hsql://localhost</property>\n"
-      "        <property name=\"connection.username\">sa</property>\n"
-      "        <property name=\"connection.password\"></property>\n"
-      "\n"
-      "        <!-- JDBC connection pool (use the built-in) -->\n"
-      "        <property name=\"connection.pool_size\">1</property>\n"
-      "\n"
-      "        <!-- SQL dialect -->\n"
-      "        <property name=\"dialect\">org.hibernate.dialect.HSQLDialect</property>\n"
-      "\n"
-      "        <!-- Enable Hibernate's automatic session context management -->\n"
-      "        <property name=\"current_session_context_class\">thread</property>\n"
-      "\n"
-      "        <!-- Disable the second-level cache  -->\n"
-      "        <property name=\"cache.provider_class\">org.hibernate.cache.NoCacheProvider</property>\n"
-      "\n"
-      "        <!-- Echo all executed SQL to stdout -->\n"
-      "        <property name=\"show_sql\">true</property>\n"
-      "\n"
-      "        <!-- Drop and re-create the database schema on startup -->\n"
-      "        <property name=\"hbm2ddl.auto\">create</property>\n"
-      "\n"
-      "        <mapping resource=\"events/Event.hbm.xml\"/>\n"
-      "\n"
-      "    </session-factory>\n"
-      "\n"
-      "</hibernate-configuration>]]>"
+"<![CDATA[<?xml version='1.0' encoding='utf-8'?>\n"
+"<!DOCTYPE hibernate-configuration PUBLIC\n"
+"        \"-//Hibernate/Hibernate Configuration DTD 3.0//EN\"\n"
+"        \"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"
+"\">\n"
+"\n"
+"<hibernate-configuration>\n"
+"\n"
+"    <session-factory>\n"
+"\n"
+"        <!-- Database connection settings -->\n"
+"        <property name=\"connection.driver_class\">org.hsqldb.jdbcDriver</"
+"property>\n"
+"        <property name=\"connection.url\">jdbc:hsqldb:hsql://localhost</"
+"property>\n"
+"        <property name=\"connection.username\">sa</property>\n"
+"        <property name=\"connection.password\"></property>\n"
+"\n"
+"        <!-- JDBC connection pool (use the built-in) -->\n"
+"        <property name=\"connection.pool_size\">1</property>\n"
+"\n"
+"        <!-- SQL dialect -->\n"
+"        <property name=\"dialect\">org.hibernate.dialect.HSQLDialect</"
+"property>\n"
+"\n"
+"        <!-- Enable Hibernate's automatic session context management -->\n"
+"        <property name=\"current_session_context_class\">thread</property>\n"
+"\n"
+"        <!-- Disable the second-level cache  -->\n"
+"        <property name=\"cache.provider_class\">org.hibernate.cache."
+"NoCacheProvider</property>\n"
+"\n"
+"        <!-- Echo all executed SQL to stdout -->\n"
+"        <property name=\"show_sql\">true</property>\n"
+"\n"
+"        <!-- Drop and re-create the database schema on startup -->\n"
+"        <property name=\"hbm2ddl.auto\">create</property>\n"
+"\n"
+"        <mapping resource=\"events/Event.hbm.xml\"/>\n"
+"\n"
+"    </session-factory>\n"
+"\n"
+"</hibernate-configuration>]]>"
 msgstr ""
 
-#: index.docbook:275
-msgid "Note that this XML configuration uses a different DTD. We configure Hibernate's <literal>SessionFactory</literal> - a global factory responsible for a particular database. If you have several databases, use several <literal>&lt;session-factory&gt;</literal> configurations, usually in several configuration files (for easier startup)."
+#. Tag: para
+#: tutorial.xml:275
+#, no-c-format
+msgid ""
+"Note that this XML configuration uses a different DTD. We configure "
+"Hibernate's <literal>SessionFactory</literal> - a global factory responsible "
+"for a particular database. If you have several databases, use several "
+"<literal>&lt;session-factory&gt;</literal> configurations, usually in "
+"several configuration files (for easier startup)."
 msgstr ""
+"注意这个XML配置使用了一个不同的DTD。在这里,我们配置了Hibernate的"
+"<literal>SessionFactory</literal>-一个关联于特定数据库全局的工厂"
+"(factory)。如果你要使用多个数据库,就要用多个的<literal>&lt;session-"
+"factory&gt;</literal>,通常把它们放在多个配置文件中(为了更容易启动)。"
 
-#: index.docbook:283
-msgid "The first four <literal>property</literal> elements contain the necessary configuration for the JDBC connection. The dialect <literal>property</literal> element specifies the particular SQL variant Hibernate generates. Hibernate's automatic session management for persistence contexts will come in handy as you will soon see. The <literal>hbm2ddl.auto</literal> option turns on automatic generation of database schemas - directly into the database. This can of course also be turned off (by removing the config option) or redirected to a file with the help of the <literal>SchemaExport</literal> Ant task. Finally, we add the mapping file(s) for persistent classes to the configuration."
+#. Tag: para
+#: tutorial.xml:283
+#, no-c-format
+msgid ""
+"The first four <literal>property</literal> elements contain the necessary "
+"configuration for the JDBC connection. The dialect <literal>property</"
+"literal> element specifies the particular SQL variant Hibernate generates. "
+"Hibernate's automatic session management for persistence contexts will come "
+"in handy as you will soon see. The <literal>hbm2ddl.auto</literal> option "
+"turns on automatic generation of database schemas - directly into the "
+"database. This can of course also be turned off (by removing the config "
+"option) or redirected to a file with the help of the <literal>SchemaExport</"
+"literal> Ant task. Finally, we add the mapping file(s) for persistent "
+"classes to the configuration."
 msgstr ""
+"最开始的4个<literal>property</literal>元素包含必要的JDBC连接信息。方言"
+"(dialect)的<literal>property</literal>元素指明Hibernate 生成的特定SQL变量。"
+"你很快会看到,Hibernate对持久化上下文的自动session管理就会派上用场。 打开"
+"<literal>hbm2ddl.auto</literal>选项将自动生成数据库模式(schema)- 直接加入"
+"数据库中。当然这个选项也可以被关闭(通过去除这个配置选项)或者通过Ant任务"
+"<literal>SchemaExport</literal>的帮助来把数据库schema重定向到文件中。最后,在"
+"配置中为持久化类加入映射文件。"
 
-#: index.docbook:296
-msgid "Copy this file into the source directory, so it will end up in the root of the classpath. Hibernate automatically looks for a file called <literal>hibernate.cfg.xml</literal> in the root of the classpath, on startup."
+#. Tag: para
+#: tutorial.xml:296
+#, no-c-format
+msgid ""
+"Copy this file into the source directory, so it will end up in the root of "
+"the classpath. Hibernate automatically looks for a file called "
+"<literal>hibernate.cfg.xml</literal> in the root of the classpath, on "
+"startup."
 msgstr ""
+"把这个文件拷贝到源代码目录下面,这样它就位于classpath的根目录的最后。"
+"Hibernate在启动时会自动在classpath的根目录查找名为<literal>hibernate.cfg."
+"xml</literal>的配置文件。"
 
-#: index.docbook:305
+#. Tag: title
+#: tutorial.xml:305
+#, no-c-format
 msgid "Building with Ant"
-msgstr ""
+msgstr "用Ant构建"
 
-#: index.docbook:307
-msgid "We'll now build the tutorial with Ant. You will need to have Ant installed - get it from the <ulink url=\"http://ant.apache.org/bindownload.cgi\">Ant download page</ulink>. How to install Ant will not be covered here. Please refer to the <ulink url=\"http://ant.apache.org/manual/index.html\">Ant manual</ulink>. After you have installed Ant, we can start to create the buildfile. It will be called <literal>build.xml</literal> and placed directly in the development directory."
+#. Tag: para
+#: tutorial.xml:307
+#, no-c-format
+msgid ""
+"We'll now build the tutorial with Ant. You will need to have Ant installed - "
+"get it from the <ulink url=\"http://ant.apache.org/bindownload.cgi\">Ant "
+"download page</ulink>. How to install Ant will not be covered here. Please "
+"refer to the <ulink url=\"http://ant.apache.org/manual/index.html\">Ant "
+"manual</ulink>. After you have installed Ant, we can start to create the "
+"buildfile. It will be called <literal>build.xml</literal> and placed "
+"directly in the development directory."
 msgstr ""
+"现在我们用Ant来构建应用程序。你必须先安装Ant-可以从<ulink url=\"http://ant."
+"apache.org/bindownload.cgi\">Ant 下载页面</ulink>得到它。怎样安装Ant就不在这"
+"里介绍了,请参考<ulink url=\"http://ant.apache.org/manual/index.html\">Ant 用"
+"户手册</ulink>。当你安装完了Ant,就可以开始创建<literal>build.xml</literal>文"
+"件,把它直接放在开发目录下面。"
 
-#: index.docbook:316
+#. Tag: para
+#: tutorial.xml:316
+#, no-c-format
 msgid "A basic build file looks like this:"
-msgstr ""
+msgstr "一个简单的build文件看起来像这样:"
 
-#: index.docbook:320
+#. Tag: programlisting
+#: tutorial.xml:320
+#, no-c-format
 msgid ""
-      "<![CDATA[<project name=\"hibernate-tutorial\" default=\"compile\">\n"
-      "\n"
-      "    <property name=\"sourcedir\" value=\"${basedir}/src\"/>\n"
-      "    <property name=\"targetdir\" value=\"${basedir}/bin\"/>\n"
-      "    <property name=\"librarydir\" value=\"${basedir}/lib\"/>\n"
-      "\n"
-      "    <path id=\"libraries\">\n"
-      "        <fileset dir=\"${librarydir}\">\n"
-      "            <include name=\"*.jar\"/>\n"
-      "        </fileset>\n"
-      "    </path>\n"
-      "\n"
-      "    <target name=\"clean\">\n"
-      "        <delete dir=\"${targetdir}\"/>\n"
-      "        <mkdir dir=\"${targetdir}\"/>\n"
-      "    </target>\n"
-      "\n"
-      "    <target name=\"compile\" depends=\"clean, copy-resources\">\n"
-      "      <javac srcdir=\"${sourcedir}\"\n"
-      "             destdir=\"${targetdir}\"\n"
-      "             classpathref=\"libraries\"/>\n"
-      "    </target>\n"
-      "\n"
-      "    <target name=\"copy-resources\">\n"
-      "        <copy todir=\"${targetdir}\">\n"
-      "            <fileset dir=\"${sourcedir}\">\n"
-      "                <exclude name=\"**/*.java\"/>\n"
-      "            </fileset>\n"
-      "        </copy>\n"
-      "    </target>\n"
-      "\n"
-      "</project>]]>"
+"<![CDATA[<project name=\"hibernate-tutorial\" default=\"compile\">\n"
+"\n"
+"    <property name=\"sourcedir\" value=\"${basedir}/src\"/>\n"
+"    <property name=\"targetdir\" value=\"${basedir}/bin\"/>\n"
+"    <property name=\"librarydir\" value=\"${basedir}/lib\"/>\n"
+"\n"
+"    <path id=\"libraries\">\n"
+"        <fileset dir=\"${librarydir}\">\n"
+"            <include name=\"*.jar\"/>\n"
+"        </fileset>\n"
+"    </path>\n"
+"\n"
+"    <target name=\"clean\">\n"
+"        <delete dir=\"${targetdir}\"/>\n"
+"        <mkdir dir=\"${targetdir}\"/>\n"
+"    </target>\n"
+"\n"
+"    <target name=\"compile\" depends=\"clean, copy-resources\">\n"
+"      <javac srcdir=\"${sourcedir}\"\n"
+"             destdir=\"${targetdir}\"\n"
+"             classpathref=\"libraries\"/>\n"
+"    </target>\n"
+"\n"
+"    <target name=\"copy-resources\">\n"
+"        <copy todir=\"${targetdir}\">\n"
+"            <fileset dir=\"${sourcedir}\">\n"
+"                <exclude name=\"**/*.java\"/>\n"
+"            </fileset>\n"
+"        </copy>\n"
+"    </target>\n"
+"\n"
+"</project>]]>"
 msgstr ""
 
-#: index.docbook:322
-msgid "This will tell Ant to add all files in the lib directory ending with <literal>.jar</literal> to the classpath used for compilation. It will also copy all non-Java source files to the target directory, e.g. configuration and Hibernate mapping files. If you now run Ant, you should get this output:"
+#. Tag: para
+#: tutorial.xml:322
+#, no-c-format
+msgid ""
+"This will tell Ant to add all files in the lib directory ending with "
+"<literal>.jar</literal> to the classpath used for compilation. It will also "
+"copy all non-Java source files to the target directory, e.g. configuration "
+"and Hibernate mapping files. If you now run Ant, you should get this output:"
 msgstr ""
+"这将告诉Ant把所有在lib目录下以<literal>.jar</literal>结尾的文件拷贝到"
+"classpath中以供编译之用。它也把所有的非Java源代码文件,例如配置和Hibernate映"
+"射文件,拷贝到目标目录。如果你现在运行Ant,会得到以下输出:"
 
-#: index.docbook:329
+#. Tag: programlisting
+#: tutorial.xml:329
+#, no-c-format
 msgid ""
-      "<![CDATA[C:\\hibernateTutorial\\>ant\n"
-      "Buildfile: build.xml\n"
-      "\n"
-      "copy-resources:\n"
-      "     [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n"
-      "\n"
-      "compile:\n"
-      "    [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n"
-      "\n"
-      "BUILD SUCCESSFUL\n"
-      "Total time: 1 second ]]>"
+"<![CDATA[C:\\hibernateTutorial\\>ant\n"
+"Buildfile: build.xml\n"
+"\n"
+"copy-resources:\n"
+"     [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n"
+"\n"
+"compile:\n"
+"    [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n"
+"\n"
+"BUILD SUCCESSFUL\n"
+"Total time: 1 second ]]>"
 msgstr ""
 
-#: index.docbook:334
+#. Tag: title
+#: tutorial.xml:334
+#, no-c-format
 msgid "Startup and helpers"
-msgstr ""
+msgstr "启动和辅助类"
 
-#: index.docbook:336
-msgid "It's time to load and store some <literal>Event</literal> objects, but first we have to complete the setup with some infrastructure code. We have to startup Hibernate. This startup includes building a global <literal>SessionFactory</literal> object and to store it somewhere for easy access in application code. A <literal>SessionFactory</literal> can open up new <literal>Session</literal>'s. A <literal>Session</literal> represents a single-threaded unit of work, the <literal>SessionFactory</literal> is a thread-safe global object, instantiated once."
+#. Tag: para
+#: tutorial.xml:336
+#, no-c-format
+msgid ""
+"It's time to load and store some <literal>Event</literal> objects, but first "
+"we have to complete the setup with some infrastructure code. We have to "
+"startup Hibernate. This startup includes building a global "
+"<literal>SessionFactory</literal> object and to store it somewhere for easy "
+"access in application code. A <literal>SessionFactory</literal> can open up "
+"new <literal>Session</literal>'s. A <literal>Session</literal> represents a "
+"single-threaded unit of work, the <literal>SessionFactory</literal> is a "
+"thread-safe global object, instantiated once."
 msgstr ""
+"是时候来加载和储存一些<literal>Event</literal>对象了,但首先我们得编写一些基"
+"础的代码以完成设置。我们必须启动Hibernate,此过程包括创建一个全局的"
+"<literal>SessoinFactory</literal>,并把它储存在应用程序代码容易访问的地方。"
+"<literal>SessionFactory</literal>可以创建并打开新的<literal>Session</"
+"literal>。一个<literal>Session</literal>代表一个单线程的单元操作,"
+"<literal>SessionFactory</literal>则是个线程安全的全局对象,只需要被实例化一"
+"次。"
 
-#: index.docbook:346
-msgid "We'll create a <literal>HibernateUtil</literal> helper class which takes care of startup and makes accessing a <literal>SessionFactory</literal> convenient. Let's have a look at the implementation:"
+#. Tag: para
+#: tutorial.xml:346
+#, no-c-format
+msgid ""
+"We'll create a <literal>HibernateUtil</literal> helper class which takes "
+"care of startup and makes accessing a <literal>SessionFactory</literal> "
+"convenient. Let's have a look at the implementation:"
 msgstr ""
+"我们将创建一个<literal>HibernateUtil</literal>辅助类(helper class)来负责启"
+"动Hibernate和更方便地操作<literal>SessionFactory</literal>。让我们来看一下它"
+"的实现:"
 
-#: index.docbook:352
+#. Tag: programlisting
+#: tutorial.xml:352
+#, no-c-format
 msgid ""
-      "<![CDATA[package util;\n"
-      "\n"
-      "import org.hibernate.*;\n"
-      "import org.hibernate.cfg.*;\n"
-      "\n"
-      "public class HibernateUtil {\n"
-      "\n"
-      "    private static final SessionFactory sessionFactory;\n"
-      "\n"
-      "    static {\n"
-      "        try {\n"
-      "            // Create the SessionFactory from hibernate.cfg.xml\n"
-      "            sessionFactory = new Configuration().configure().buildSessionFactory();\n"
-      "        } catch (Throwable ex) {\n"
-      "            // Make sure you log the exception, as it might be swallowed\n"
-      "            System.err.println(\"Initial SessionFactory creation failed.\" + ex);\n"
-      "            throw new ExceptionInInitializerError(ex);\n"
-      "        }\n"
-      "    }\n"
-      "\n"
-      "    public static SessionFactory getSessionFactory() {\n"
-      "        return sessionFactory;\n"
-      "    }\n"
-      "\n"
-      "}]]>"
+"<![CDATA[package util;\n"
+"\n"
+"import org.hibernate.*;\n"
+"import org.hibernate.cfg.*;\n"
+"\n"
+"public class HibernateUtil {\n"
+"\n"
+"    private static final SessionFactory sessionFactory;\n"
+"\n"
+"    static {\n"
+"        try {\n"
+"            // Create the SessionFactory from hibernate.cfg.xml\n"
+"            sessionFactory = new Configuration().configure()."
+"buildSessionFactory();\n"
+"        } catch (Throwable ex) {\n"
+"            // Make sure you log the exception, as it might be swallowed\n"
+"            System.err.println(\"Initial SessionFactory creation failed.\" + "
+"ex);\n"
+"            throw new ExceptionInInitializerError(ex);\n"
+"        }\n"
+"    }\n"
+"\n"
+"    public static SessionFactory getSessionFactory() {\n"
+"        return sessionFactory;\n"
+"    }\n"
+"\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:354
-msgid "This class does not only produce the global <literal>SessionFactory</literal> in its static initializer (called once by the JVM when the class is loaded), but also hides the fact that it uses a static singleton. It might as well lookup the <literal>SessionFactory</literal> from JNDI in an application server."
+#. Tag: para
+#: tutorial.xml:354
+#, no-c-format
+msgid ""
+"This class does not only produce the global <literal>SessionFactory</"
+"literal> in its static initializer (called once by the JVM when the class is "
+"loaded), but also hides the fact that it uses a static singleton. It might "
+"as well lookup the <literal>SessionFactory</literal> from JNDI in an "
+"application server."
 msgstr ""
+"这个类不但在它的静态初始化过程(仅当加载这个类的时候被JVM执行一次)中产生全局"
+"的<literal>SessionFactory</literal>,而且隐藏了它使用了静态singleton的事实。"
+"它也可能在应用程序服务器中的JNDI查找<literal>SessionFactory</literal>。"
 
-#: index.docbook:361
-msgid "If you give the <literal>SessionFactory</literal> a name in your configuration file, Hibernate will in fact try to bind it to JNDI after it has been built. To avoid this code completely you could also use JMX deployment and let the JMX-capable container instantiate and bind a <literal>HibernateService</literal> to JNDI. These advanced options are discussed in the Hibernate reference documentation."
+#. Tag: para
+#: tutorial.xml:361
+#, no-c-format
+msgid ""
+"If you give the <literal>SessionFactory</literal> a name in your "
+"configuration file, Hibernate will in fact try to bind it to JNDI after it "
+"has been built. To avoid this code completely you could also use JMX "
+"deployment and let the JMX-capable container instantiate and bind a "
+"<literal>HibernateService</literal> to JNDI. These advanced options are "
+"discussed in the Hibernate reference documentation."
 msgstr ""
+"如果你在配置文件中给<literal>SessionFactory</literal>一个名字,在"
+"<literal>SessionFactory</literal>创建后,Hibernate会试着把它绑定到JNDI。要完"
+"全避免这样的代码,你也可以使用JMX部署,让具有JMX能力的容器来实例化"
+"<literal>HibernateService</literal>并把它绑定到JNDI。这些高级可选项在后面的章"
+"节中会讨论到。"
 
-#: index.docbook:370
-msgid "Place <literal>HibernateUtil.java</literal> in the development source directory, in a package next to <literal>events</literal>:"
+#. Tag: para
+#: tutorial.xml:370
+#, no-c-format
+msgid ""
+"Place <literal>HibernateUtil.java</literal> in the development source "
+"directory, in a package next to <literal>events</literal>:"
 msgstr ""
+"把<literal>HibernateUtil.java</literal>放在开发目录的源代码路径下,与放"
+"<literal>events</literal>的包并列:"
 
-#: index.docbook:375
+#. Tag: programlisting
+#: tutorial.xml:375
+#, no-c-format
 msgid ""
-      "<![CDATA[.\n"
-      "+lib\n"
-      "  <Hibernate and third-party libraries>\n"
-      "+src\n"
-      "  +events\n"
-      "    Event.java\n"
-      "    Event.hbm.xml\n"
-      "  +util\n"
-      "    HibernateUtil.java\n"
-      "  hibernate.cfg.xml\n"
-      "+data\n"
-      "build.xml]]>"
+"<![CDATA[.\n"
+"+lib\n"
+"  <Hibernate and third-party libraries>\n"
+"+src\n"
+"  +events\n"
+"    Event.java\n"
+"    Event.hbm.xml\n"
+"  +util\n"
+"    HibernateUtil.java\n"
+"  hibernate.cfg.xml\n"
+"+data\n"
+"build.xml]]>"
 msgstr ""
 
-#: index.docbook:377
-msgid "This should again compile without problems. We finally need to configure a logging system - Hibernate uses commons logging and leaves you the choice between Log4j and JDK 1.4 logging. Most developers prefer Log4j: copy <literal>log4j.properties</literal> from the Hibernate distribution (it's in the <literal>etc/</literal> directory) to your <literal>src</literal> directory, next to <literal>hibernate.cfg.xml</literal>. Have a look at the example configuration and change the settings if you like to have more verbose output. By default, only Hibernate startup message are shown on stdout."
+#. Tag: para
+#: tutorial.xml:377
+#, no-c-format
+msgid ""
+"This should again compile without problems. We finally need to configure a "
+"logging system - Hibernate uses commons logging and leaves you the choice "
+"between Log4j and JDK 1.4 logging. Most developers prefer Log4j: copy "
+"<literal>log4j.properties</literal> from the Hibernate distribution (it's in "
+"the <literal>etc/</literal> directory) to your <literal>src</literal> "
+"directory, next to <literal>hibernate.cfg.xml</literal>. Have a look at the "
+"example configuration and change the settings if you like to have more "
+"verbose output. By default, only Hibernate startup message are shown on "
+"stdout."
 msgstr ""
+"再次编译这个应用程序应该不会有问题。最后我们需要配置一个日志(logging)系统 "
+"- Hibernate使用通用日志接口,允许你在Log4j和JDK 1.4 日志之间进行选择。多数开"
+"发者更喜欢Log4j:从Hibernate的发布包中(它在<literal>etc/</literal>目录下)拷"
+"贝<literal>log4j.properties</literal>到你的<literal>src</literal>目录,与"
+"<literal>hibernate.cfg.xml</literal>.放在一起。看一下配置示例,如果你希望看到"
+"更加详细的输出信息,你可以修改配置。默认情况下,只有Hibernate的启动信息才会显"
+"示在标准输出上。"
 
-#: index.docbook:387
-msgid "The tutorial infrastructure is complete - and we are ready to do some real work with Hibernate."
-msgstr ""
+#. Tag: para
+#: tutorial.xml:387
+#, no-c-format
+msgid ""
+"The tutorial infrastructure is complete - and we are ready to do some real "
+"work with Hibernate."
+msgstr "示例的基本框架完成了 - 现在我们可以用Hibernate来做些真正的工作。"
 
-#: index.docbook:395
+#. Tag: title
+#: tutorial.xml:395
+#, no-c-format
 msgid "Loading and storing objects"
-msgstr ""
+msgstr "加载并存储对象"
 
-#: index.docbook:397
-msgid "Finally, we can use Hibernate to load and store objects. We write an <literal>EventManager</literal> class with a <literal>main()</literal> method:"
+#. Tag: para
+#: tutorial.xml:397
+#, no-c-format
+msgid ""
+"Finally, we can use Hibernate to load and store objects. We write an "
+"<literal>EventManager</literal> class with a <literal>main()</literal> "
+"method:"
 msgstr ""
+"我们终于可以使用Hibernate来加载和存储对象了,编写一个带有<literal>main()</"
+"literal>方法的<literal>EventManager</literal>类:"
 
-#: index.docbook:402
+#. Tag: programlisting
+#: tutorial.xml:402
+#, no-c-format
 msgid ""
-      "<![CDATA[package events;\n"
-      "import org.hibernate.Session;\n"
-      "\n"
-      "import java.util.Date;\n"
-      "\n"
-      "import util.HibernateUtil;\n"
-      "\n"
-      "public class EventManager {\n"
-      "\n"
-      "    public static void main(String[] args) {\n"
-      "        EventManager mgr = new EventManager();\n"
-      "\n"
-      "        if (args[0].equals(\"store\")) {\n"
-      "            mgr.createAndStoreEvent(\"My Event\", new Date());\n"
-      "        }\n"
-      "\n"
-      "        HibernateUtil.getSessionFactory().close();\n"
-      "    }\n"
-      "\n"
-      "    private void createAndStoreEvent(String title, Date theDate) {\n"
-      "\n"
-      "        Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n"
-      "\n"
-      "        session.beginTransaction();\n"
-      "\n"
-      "        Event theEvent = new Event();\n"
-      "        theEvent.setTitle(title);\n"
-      "        theEvent.setDate(theDate);\n"
-      "\n"
-      "        session.save(theEvent);\n"
-      "\n"
-      "        session.getTransaction().commit();\n"
-      "    }\n"
-      "\n"
-      "}]]>"
+"<![CDATA[package events;\n"
+"import org.hibernate.Session;\n"
+"\n"
+"import java.util.Date;\n"
+"\n"
+"import util.HibernateUtil;\n"
+"\n"
+"public class EventManager {\n"
+"\n"
+"    public static void main(String[] args) {\n"
+"        EventManager mgr = new EventManager();\n"
+"\n"
+"        if (args[0].equals(\"store\")) {\n"
+"            mgr.createAndStoreEvent(\"My Event\", new Date());\n"
+"        }\n"
+"\n"
+"        HibernateUtil.getSessionFactory().close();\n"
+"    }\n"
+"\n"
+"    private void createAndStoreEvent(String title, Date theDate) {\n"
+"\n"
+"        Session session = HibernateUtil.getSessionFactory().getCurrentSession"
+"();\n"
+"\n"
+"        session.beginTransaction();\n"
+"\n"
+"        Event theEvent = new Event();\n"
+"        theEvent.setTitle(title);\n"
+"        theEvent.setDate(theDate);\n"
+"\n"
+"        session.save(theEvent);\n"
+"\n"
+"        session.getTransaction().commit();\n"
+"    }\n"
+"\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:404
-msgid "We create a new <literal>Event</literal> object, and hand it over to Hibernate. Hibernate now takes care of the SQL and executes <literal>INSERT</literal>s on the database. Let's have a look at the <literal>Session</literal> and <literal>Transaction</literal>-handling code before we run this."
+#. Tag: para
+#: tutorial.xml:404
+#, no-c-format
+msgid ""
+"We create a new <literal>Event</literal> object, and hand it over to "
+"Hibernate. Hibernate now takes care of the SQL and executes <literal>INSERT</"
+"literal>s on the database. Let's have a look at the <literal>Session</"
+"literal> and <literal>Transaction</literal>-handling code before we run this."
 msgstr ""
+"我们创建了个新的<literal>Event</literal>对象并把它传递给Hibernate。现在"
+"Hibernate负责与SQL打交道,并把<literal>INSERT</literal>命令传给数据库。在运行"
+"之前,让我们看一下处理<literal>Session</literal>和<literal>Transaction</"
+"literal>的代码。"
 
-#: index.docbook:411
-msgid "A <literal>Session</literal> is a single unit of work. For now we'll keep things simple and assume a one-to-one granularity between a Hibernate <literal>Session</literal> and a database transaction. To shield our code from the actual underlying transaction system (in this case plain JDBC, but it could also run with JTA) we use the <literal>Transaction</literal> API that is available on the Hibernate <literal>Session</literal>."
+#. Tag: para
+#: tutorial.xml:411
+#, no-c-format
+msgid ""
+"A <literal>Session</literal> is a single unit of work. For now we'll keep "
+"things simple and assume a one-to-one granularity between a Hibernate "
+"<literal>Session</literal> and a database transaction. To shield our code "
+"from the actual underlying transaction system (in this case plain JDBC, but "
+"it could also run with JTA) we use the <literal>Transaction</literal> API "
+"that is available on the Hibernate <literal>Session</literal>."
 msgstr ""
+"一个<literal>Session</literal>就是个单一的工作单元。我们暂时让事情简单一些,"
+"并假设Hibernate<literal>Session</literal>和数据库事务是一一对应的。为了让我们"
+"的代码从底层的事务系统中脱离出来(此例中是JDBC,但也可能是JTA),我们使用"
+"Hibernate <literal>Session</literal>中的<literal>Transaction</literal> API。"
 
-#: index.docbook:419
-msgid "What does <literal>sessionFactory.getCurrentSession()</literal> do? First, you can call it as many times and anywhere you like, once you get hold of your <literal>SessionFactory</literal> (easy thanks to <literal>HibernateUtil</literal>). The <literal>getCurrentSession()</literal> method always returns the \"current\" unit of work. Remember that we switched the configuration option for this mechanism to \"thread\" in <literal>hibernate.cfg.xml</literal>? Hence, the current unit of work is bound to the current Java thread that executes our application. However, this is not the full picture, you also have to consider scope, when a unit of work begins and when it ends."
+#. Tag: para
+#: tutorial.xml:419
+#, no-c-format
+msgid ""
+"What does <literal>sessionFactory.getCurrentSession()</literal> do? First, "
+"you can call it as many times and anywhere you like, once you get hold of "
+"your <literal>SessionFactory</literal> (easy thanks to "
+"<literal>HibernateUtil</literal>). The <literal>getCurrentSession()</"
+"literal> method always returns the \"current\" unit of work. Remember that "
+"we switched the configuration option for this mechanism to \"thread\" in "
+"<literal>hibernate.cfg.xml</literal>? Hence, the current unit of work is "
+"bound to the current Java thread that executes our application. However, "
+"this is not the full picture, you also have to consider scope, when a unit "
+"of work begins and when it ends."
 msgstr ""
+"<literal>sessionFactory.getCurrentSession()</literal>是干什么的呢?首先,只要"
+"你持有<literal>SessionFactory</literal>(幸亏我们有<literal>HibernateUtil</"
+"literal>,可以随时获得),大可在任何时候、任何地点调用这个方法。"
+"<literal>getCurrentSession()</literal>方法总会返回“当前的”工作单元。记得我们"
+"在<literal>hibernate.cfg.xml</literal>中把这一配置选项调整为\"thread\"了吗?"
+"因此,因此,当前工作单元被绑定到当前执行我们应用程序的Java线程。但是,这并非"
+"是完全准确的,你还得考虑工作单元的生命周期范围 (scope),它何时开始,又何时结束."
 
-#: index.docbook:430
-msgid "A <literal>Session</literal> begins when it is first needed, when the first call to <literal>getCurrentSession()</literal> is made. It is then bound by Hibernate to the current thread. When the transaction ends, either through commit or rollback, Hibernate automatically unbinds the <literal>Session</literal> from the thread and closes it for you. If you call <literal>getCurrentSession()</literal> again, you get a new <literal>Session</literal> and can start a new unit of work. This <emphasis>thread-bound</emphasis> programming model is the most popular way of using Hibernate, as it allows flexible layering of your code (transaction demarcation code can be separated from data access code, we'll do this later in this tutorial)."
+#. Tag: para
+#: tutorial.xml:430
+#, no-c-format
+msgid ""
+"A <literal>Session</literal> begins when it is first needed, when the first "
+"call to <literal>getCurrentSession()</literal> is made. It is then bound by "
+"Hibernate to the current thread. When the transaction ends, either through "
+"commit or rollback, Hibernate automatically unbinds the <literal>Session</"
+"literal> from the thread and closes it for you. If you call "
+"<literal>getCurrentSession()</literal> again, you get a new "
+"<literal>Session</literal> and can start a new unit of work. This "
+"<emphasis>thread-bound</emphasis> programming model is the most popular way "
+"of using Hibernate, as it allows flexible layering of your code (transaction "
+"demarcation code can be separated from data access code, we'll do this later "
+"in this tutorial)."
 msgstr ""
+"<literal>Session</literal>在第一次被使用的时候,即第一次调用"
+"<literal>getCurrentSession()</literal>的时候,其生命周期就开始。然后它被"
+"Hibernate绑定到当前线程。当事务结束的时候,不管是提交还是回滚,Hibernate会自"
+"动把<literal>Session</literal>从当前线程剥离,并且关闭它。假若你再次调用"
+"<literal>getCurrentSession()</literal>,你会得到一个新的<literal>Session</"
+"literal>,并且开始一个新的工作单元。这种<emphasis>线程绑定(thread-bound)</"
+"emphasis>的编程模型(model)是使用Hibernate的最广泛的方式,因为它支持对你的代"
+"码灵活分层(事务划分可以和你的数据访问代码分离开来,在本教程的后面部分就会这么"
+"做)。"
 
-#: index.docbook:441
-msgid "Related to the unit of work scope, should the Hibernate <literal>Session</literal> be used to execute one or several database operations? The above example uses one <literal>Session</literal> for one operation. This is pure coincidence, the example is just not complex enough to show any other approach. The scope of a Hibernate <literal>Session</literal> is flexible but you should never design your application to use a new Hibernate <literal>Session</literal> for <emphasis>every</emphasis> database operation. So even if you see it a few more times in the following (very trivial) examples, consider <emphasis>session-per-operation</emphasis> an anti-pattern. A real (web) application is shown later in this tutorial."
+#. Tag: para
+#: tutorial.xml:441
+#, no-c-format
+msgid ""
+"Related to the unit of work scope, should the Hibernate <literal>Session</"
+"literal> be used to execute one or several database operations? The above "
+"example uses one <literal>Session</literal> for one operation. This is pure "
+"coincidence, the example is just not complex enough to show any other "
+"approach. The scope of a Hibernate <literal>Session</literal> is flexible "
+"but you should never design your application to use a new Hibernate "
+"<literal>Session</literal> for <emphasis>every</emphasis> database "
+"operation. So even if you see it a few more times in the following (very "
+"trivial) examples, consider <emphasis>session-per-operation</emphasis> an "
+"anti-pattern. A real (web) application is shown later in this tutorial."
 msgstr ""
+"和工作单元的生命周期这个话题相关,Hibernate <literal>Session</literal>是否被"
+"应该用来执行多次数据库操作?上面的例子对每一次操作使用了一个"
+"<literal>Session</literal>,这完全是巧合,这个例子不是很复杂,无法展示其他方"
+"式。Hibernate <literal>Session</literal>的生命周期可以很灵活,但是你绝不要把"
+"你的应用程序设计成为<emphasis>每一次</emphasis>数据库操作都用一个新的"
+"Hibernate <literal>Session</literal>。因此就算下面的例子(它们都很简单)中你"
+"可以看到这种用法,记住<emphasis>每次操作一个session</emphasis>是一个反模式。"
+"在本教程的后面会展示一个真正的(web)程序。"
 
-#: index.docbook:452
-msgid "Have a look at <xref linkend=\"transactions\"/> for more information about transaction handling and demarcation. We also skipped any error handling and rollback in the previous example."
+#. Tag: para
+#: tutorial.xml:452
+#, no-c-format
+msgid ""
+"Have a look at <xref linkend=\"transactions\"/> for more information about "
+"transaction handling and demarcation. We also skipped any error handling and "
+"rollback in the previous example."
 msgstr ""
+"关于事务处理及事务边界界定的详细信息,请参看<xref linkend=\"transactions\"/"
+">。在上面的例子中,我们也忽略了所有的错误与回滚的处理。"
 
-#: index.docbook:458
-msgid "To run this first routine we have to add a callable target to the Ant build file:"
+#. Tag: para
+#: tutorial.xml:458
+#, no-c-format
+msgid ""
+"To run this first routine we have to add a callable target to the Ant build "
+"file:"
 msgstr ""
+"为第一次运行我们的程序,我们得在Ant的build文件中增加一个可以调用得到的"
+"target。"
 
-#: index.docbook:462
+#. Tag: programlisting
+#: tutorial.xml:462
+#, no-c-format
 msgid ""
-      "<![CDATA[<target name=\"run\" depends=\"compile\">\n"
-      "    <java fork=\"true\" classname=\"events.EventManager\" classpathref=\"libraries\">\n"
-      "        <classpath path=\"${targetdir}\"/>\n"
-      "        <arg value=\"${action}\"/>\n"
-      "    </java>\n"
-      "</target>]]>"
+"<![CDATA[<target name=\"run\" depends=\"compile\">\n"
+"    <java fork=\"true\" classname=\"events.EventManager\" classpathref="
+"\"libraries\">\n"
+"        <classpath path=\"${targetdir}\"/>\n"
+"        <arg value=\"${action}\"/>\n"
+"    </java>\n"
+"</target>]]>"
 msgstr ""
 
-#: index.docbook:464
-msgid "The value of the <literal>action</literal> argument is set on the command line when calling the target:"
+#. Tag: para
+#: tutorial.xml:464
+#, no-c-format
+msgid ""
+"The value of the <literal>action</literal> argument is set on the command "
+"line when calling the target:"
 msgstr ""
+"<literal>action</literal>参数(argument)的值是通过命令行调用这个target的时候"
+"设置的:"
 
-#: index.docbook:469
+#. Tag: programlisting
+#: tutorial.xml:469
+#, no-c-format
 msgid "<![CDATA[C:\\hibernateTutorial\\>ant run -Daction=store]]>"
 msgstr ""
 
-#: index.docbook:471
-msgid "You should see, after compilation, Hibernate starting up and, depending on your configuration, lots of log output. At the end you will find the following line:"
+#. Tag: para
+#: tutorial.xml:471
+#, no-c-format
+msgid ""
+"You should see, after compilation, Hibernate starting up and, depending on "
+"your configuration, lots of log output. At the end you will find the "
+"following line:"
 msgstr ""
+"你应该会看到,编译以后,Hibernate根据你的配置启动,并产生一大堆的输出日志。在"
+"日志最后你会看到下面这行:"
 
-#: index.docbook:476
-msgid "<![CDATA[[java] Hibernate: insert into EVENTS (EVENT_DATE, title, EVENT_ID) values (?, ?, ?)]]>"
+#. Tag: programlisting
+#: tutorial.xml:476
+#, no-c-format
+msgid ""
+"<![CDATA[[java] Hibernate: insert into EVENTS (EVENT_DATE, title, EVENT_ID) "
+"values (?, ?, ?)]]>"
 msgstr ""
 
-#: index.docbook:478
-msgid "This is the <literal>INSERT</literal> executed by Hibernate, the question marks represent JDBC bind parameters. To see the values bound as arguments, or to reduce the verbosity of the log, check your <literal>log4j.properties</literal>."
+#. Tag: para
+#: tutorial.xml:478
+#, no-c-format
+msgid ""
+"This is the <literal>INSERT</literal> executed by Hibernate, the question "
+"marks represent JDBC bind parameters. To see the values bound as arguments, "
+"or to reduce the verbosity of the log, check your <literal>log4j.properties</"
+"literal>."
 msgstr ""
+"这是Hibernate执行的<literal>INSERT</literal>命令,问号代表JDBC的绑定参数。如"
+"果想要看到绑定参数的值或者减少日志的长度,就要调整你在<literal>log4j."
+"properties</literal>文件里的设置。"
 
-#: index.docbook:484
-msgid "Now we'd like to list stored events as well, so we add an option to the main method:"
+#. Tag: para
+#: tutorial.xml:484
+#, no-c-format
+msgid ""
+"Now we'd like to list stored events as well, so we add an option to the main "
+"method:"
 msgstr ""
+"我们想要列出所有已经被存储的events,就要增加一个条件分支选项到main方法中去。"
 
-#: index.docbook:488
+#. Tag: programlisting
+#: tutorial.xml:488
+#, no-c-format
 msgid ""
-      "<![CDATA[if (args[0].equals(\"store\")) {\n"
-      "    mgr.createAndStoreEvent(\"My Event\", new Date());\n"
-      "}\n"
-      "else if (args[0].equals(\"list\")) {\n"
-      "    List events = mgr.listEvents();\n"
-      "    for (int i = 0; i < events.size(); i++) {\n"
-      "        Event theEvent = (Event) events.get(i);\n"
-      "        System.out.println(\"Event: \" + theEvent.getTitle() +\n"
-      "                           \" Time: \" + theEvent.getDate());\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[if (args[0].equals(\"store\")) {\n"
+"    mgr.createAndStoreEvent(\"My Event\", new Date());\n"
+"}\n"
+"else if (args[0].equals(\"list\")) {\n"
+"    List events = mgr.listEvents();\n"
+"    for (int i = 0; i < events.size(); i++) {\n"
+"        Event theEvent = (Event) events.get(i);\n"
+"        System.out.println(\"Event: \" + theEvent.getTitle() +\n"
+"                           \" Time: \" + theEvent.getDate());\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:490
+#. Tag: para
+#: tutorial.xml:490
+#, no-c-format
 msgid "We also add a new <literal>listEvents() method</literal>:"
-msgstr ""
+msgstr "我们也增加一个新的<literal>listEvents()</literal>方法:"
 
-#: index.docbook:494
+#. Tag: programlisting
+#: tutorial.xml:494
+#, no-c-format
 msgid ""
-      "<![CDATA[private List listEvents() {\n"
-      "\n"
-      "    Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n"
-      "\n"
-      "    session.beginTransaction();\n"
-      "\n"
-      "    List result = session.createQuery(\"from Event\").list();\n"
-      "\n"
-      "    session.getTransaction().commit();\n"
-      "\n"
-      "    return result;\n"
-      "}]]>"
+"<![CDATA[private List listEvents() {\n"
+"\n"
+"    Session session = HibernateUtil.getSessionFactory().getCurrentSession"
+"();\n"
+"\n"
+"    session.beginTransaction();\n"
+"\n"
+"    List result = session.createQuery(\"from Event\").list();\n"
+"\n"
+"    session.getTransaction().commit();\n"
+"\n"
+"    return result;\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:496
-msgid "What we do here is use an HQL (Hibernate Query Language) query to load all existing <literal>Event</literal> objects from the database. Hibernate will generate the appropriate SQL, send it to the database and populate <literal>Event</literal> objects with the data. You can create more complex queries with HQL, of course."
+#. Tag: para
+#: tutorial.xml:496
+#, no-c-format
+msgid ""
+"What we do here is use an HQL (Hibernate Query Language) query to load all "
+"existing <literal>Event</literal> objects from the database. Hibernate will "
+"generate the appropriate SQL, send it to the database and populate "
+"<literal>Event</literal> objects with the data. You can create more complex "
+"queries with HQL, of course."
 msgstr ""
+"我们在这里是用一个HQL(Hibernate Query Language-Hibernate查询语言)查询语句"
+"来从数据库中加载所有存在的<literal>Event</literal>对象。Hibernate会生成适当的"
+"SQL,把它发送到数据库,并操作从查询得到数据的<literal>Event</literal>对象。当"
+"然,你可以使用HQL来创建更加复杂的查询。"
 
-#: index.docbook:503
+#. Tag: para
+#: tutorial.xml:503
+#, no-c-format
 msgid "Now, to execute and test all of this, follow these steps:"
-msgstr ""
+msgstr "现在,根据以下步骤来执行并测试以上各项:"
 
-#: index.docbook:509
-msgid "Run <literal>ant run -Daction=store</literal> to store something into the database and, of course, to generate the database schema before through hbm2ddl."
+#. Tag: para
+#: tutorial.xml:509
+#, no-c-format
+msgid ""
+"Run <literal>ant run -Daction=store</literal> to store something into the "
+"database and, of course, to generate the database schema before through "
+"hbm2ddl."
 msgstr ""
+"运行<literal>ant run -Daction=store</literal>来保存一些内容到数据库。当然,先"
+"得用hbm2ddl来生成数据库schema。"
 
-#: index.docbook:515
-msgid "Now disable hbm2ddl by commenting out the property in your <literal>hibernate.cfg.xml</literal> file. Usually you only leave it turned on in continous unit testing, but another run of hbm2ddl would <emphasis>drop</emphasis> everything you have stored - the <literal>create</literal> configuration setting actually translates into \"drop all tables from the schema, then re-create all tables, when the SessionFactory is build\"."
+#. Tag: para
+#: tutorial.xml:515
+#, no-c-format
+msgid ""
+"Now disable hbm2ddl by commenting out the property in your "
+"<literal>hibernate.cfg.xml</literal> file. Usually you only leave it turned "
+"on in continous unit testing, but another run of hbm2ddl would "
+"<emphasis>drop</emphasis> everything you have stored - the <literal>create</"
+"literal> configuration setting actually translates into \"drop all tables "
+"from the schema, then re-create all tables, when the SessionFactory is build"
+"\"."
 msgstr ""
+"现在把<literal>hibernate.cfg.xml</literal>文件中hbm2ddl属性注释掉,这样我们就"
+"取消了在启动时用hbm2ddl来生成数据库schema。通常只有在不断重复进行单元测试的时"
+"候才需要打开它,但再次运行hbm2ddl会把你保存的一切都删掉(<emphasis>drop</"
+"emphasis>)——<literal>create</literal>配置的真实含义是:“在创建SessionFactory"
+"的时候,从schema 中drop 掉所有的表,再重新创建它们”。"
 
-#: index.docbook:525
-msgid "If you now call Ant with <literal>-Daction=list</literal>, you should see the events you have stored so far. You can of course also call the <literal>store</literal> action a few times more."
+#. Tag: para
+#: tutorial.xml:525
+#, no-c-format
+msgid ""
+"If you now call Ant with <literal>-Daction=list</literal>, you should see "
+"the events you have stored so far. You can of course also call the "
+"<literal>store</literal> action a few times more."
 msgstr ""
+"如果你现在使用命令行参数<literal>-Daction=list</literal>运行Ant,你会看到那些"
+"至今为止我们所储存的events。当然,你也可以多调用几次<literal>store</literal>"
+"以保存更多的envents。"
 
-#: index.docbook:531
-msgid "Note: Most new Hibernate users fail at this point and we see questions about <emphasis>Table not found</emphasis> error messages regularly. However, if you follow the steps outlined above you will not have this problem, as hbm2ddl creates the database schema on the first run, and subsequent application restarts will use this schema. If you change the mapping and/or database schema, you have to re-enable hbm2ddl once again."
+#. Tag: para
+#: tutorial.xml:531
+#, no-c-format
+msgid ""
+"Note: Most new Hibernate users fail at this point and we see questions about "
+"<emphasis>Table not found</emphasis> error messages regularly. However, if "
+"you follow the steps outlined above you will not have this problem, as "
+"hbm2ddl creates the database schema on the first run, and subsequent "
+"application restarts will use this schema. If you change the mapping and/or "
+"database schema, you have to re-enable hbm2ddl once again."
 msgstr ""
+"注意,很多Hibernate新手在这一步会失败,我们不时看到关于<emphasis>Table not "
+"found</emphasis>错误信息的提问。但是,只要你根据上面描述的步骤来执行,就不会"
+"有这个问题,因为hbm2ddl会在第一次运行的时候创建数据库schema,后继的应用程序重"
+"起后还能继续使用这个schema。假若你修改了映射,或者修改了数据库schema,你必须"
+"把hbm2ddl重新打开一次。"
 
-#: index.docbook:544
+#. Tag: title
+#: tutorial.xml:544
+#, no-c-format
 msgid "Part 2 - Mapping associations"
-msgstr ""
+msgstr "第二部分 - 关联映射"
 
-#: index.docbook:546
-msgid "We mapped a persistent entity class to a table. Let's build on this and add some class associations. First we'll add people to our application, and store a list of events they participate in."
+#. Tag: para
+#: tutorial.xml:546
+#, no-c-format
+msgid ""
+"We mapped a persistent entity class to a table. Let's build on this and add "
+"some class associations. First we'll add people to our application, and "
+"store a list of events they participate in."
 msgstr ""
+"我们已经映射了一个持久化实体类到表上。让我们在这个基础上增加一些类之间的关"
+"联。首先我们往应用程序里增加人(people)的概念,并存储他们所参与的一个Event列"
+"表。(译者注:与Event一样,我们在后面将直接使用person来表示“人”而不是它的中文"
+"翻译)"
 
-#: index.docbook:552
+#. Tag: title
+#: tutorial.xml:552
+#, no-c-format
 msgid "Mapping the Person class"
-msgstr ""
+msgstr "映射Person类"
 
-#: index.docbook:554
+#. Tag: para
+#: tutorial.xml:554
+#, no-c-format
 msgid "The first cut of the <literal>Person</literal> class is simple:"
-msgstr ""
+msgstr "最初简单的<literal>Person</literal>类:"
 
-#: index.docbook:558
+#. Tag: programlisting
+#: tutorial.xml:558
+#, no-c-format
 msgid ""
-      "<![CDATA[package events;\n"
-      "\n"
-      "public class Person {\n"
-      "\n"
-      "    private Long id;\n"
-      "    private int age;\n"
-      "    private String firstname;\n"
-      "    private String lastname;\n"
-      "\n"
-      "    public Person() {}\n"
-      "\n"
-      "    // Accessor methods for all properties, private setter for 'id'\n"
-      "\n"
-      "}]]>"
+"<![CDATA[package events;\n"
+"\n"
+"public class Person {\n"
+"\n"
+"    private Long id;\n"
+"    private int age;\n"
+"    private String firstname;\n"
+"    private String lastname;\n"
+"\n"
+"    public Person() {}\n"
+"\n"
+"    // Accessor methods for all properties, private setter for 'id'\n"
+"\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:560
-msgid "Create a new mapping file called <literal>Person.hbm.xml</literal> (don't forget the DTD reference at the top):"
+#. Tag: para
+#: tutorial.xml:560
+#, no-c-format
+msgid ""
+"Create a new mapping file called <literal>Person.hbm.xml</literal> (don't "
+"forget the DTD reference at the top):"
 msgstr ""
+"创建一个名为<literal>Person.hbm.xml</literal>的新映射文件(别忘了最上面的DTD"
+"引用):"
 
-#: index.docbook:565
+#. Tag: programlisting
+#: tutorial.xml:565
+#, no-c-format
 msgid ""
-      "<![CDATA[<hibernate-mapping>\n"
-      "\n"
-      "    <class name=\"events.Person\" table=\"PERSON\">\n"
-      "        <id name=\"id\" column=\"PERSON_ID\">\n"
-      "            <generator class=\"native\"/>\n"
-      "        </id>\n"
-      "        <property name=\"age\"/>\n"
-      "        <property name=\"firstname\"/>\n"
-      "        <property name=\"lastname\"/>\n"
-      "    </class>\n"
-      "\n"
-      "</hibernate-mapping>]]>"
+"<![CDATA[<hibernate-mapping>\n"
+"\n"
+"    <class name=\"events.Person\" table=\"PERSON\">\n"
+"        <id name=\"id\" column=\"PERSON_ID\">\n"
+"            <generator class=\"native\"/>\n"
+"        </id>\n"
+"        <property name=\"age\"/>\n"
+"        <property name=\"firstname\"/>\n"
+"        <property name=\"lastname\"/>\n"
+"    </class>\n"
+"\n"
+"</hibernate-mapping>]]>"
 msgstr ""
 
-#: index.docbook:567
+#. Tag: para
+#: tutorial.xml:567
+#, no-c-format
 msgid "Finally, add the new mapping to Hibernate's configuration:"
-msgstr ""
+msgstr "最后,把新的映射加入到Hibernate的配置中:"
 
-#: index.docbook:571
+#. Tag: programlisting
+#: tutorial.xml:571
+#, no-c-format
 msgid ""
-      "<![CDATA[<mapping resource=\"events/Event.hbm.xml\"/>\n"
-      "<mapping resource=\"events/Person.hbm.xml\"/>]]>"
+"<![CDATA[<mapping resource=\"events/Event.hbm.xml\"/>\n"
+"<mapping resource=\"events/Person.hbm.xml\"/>]]>"
 msgstr ""
 
-#: index.docbook:573
-msgid "We'll now create an association between these two entities. Obviously, persons can participate in events, and events have participants. The design questions we have to deal with are: directionality, multiplicity, and collection behavior."
+#. Tag: para
+#: tutorial.xml:573
+#, no-c-format
+msgid ""
+"We'll now create an association between these two entities. Obviously, "
+"persons can participate in events, and events have participants. The design "
+"questions we have to deal with are: directionality, multiplicity, and "
+"collection behavior."
 msgstr ""
+"现在我们在这两个实体之间创建一个关联。显然,persons可以参与一系列events,而"
+"events也有不同的参加者(persons)。我们需要处理的设计问题是关联方向"
+"(directionality),阶数(multiplicity)和集合(collection)的行为。"
 
-#: index.docbook:583
+#. Tag: title
+#: tutorial.xml:583
+#, no-c-format
 msgid "A unidirectional Set-based association"
-msgstr ""
+msgstr "单向Set-based的关联"
 
-#: index.docbook:585
-msgid "We'll add a collection of events to the <literal>Person</literal> class. That way we can easily navigate to the events for a particular person, without executing an explicit query - by calling <literal>aPerson.getEvents()</literal>. We use a Java collection, a <literal>Set</literal>, because the collection will not contain duplicate elements and the ordering is not relevant for us."
+#. Tag: para
+#: tutorial.xml:585
+#, no-c-format
+msgid ""
+"We'll add a collection of events to the <literal>Person</literal> class. "
+"That way we can easily navigate to the events for a particular person, "
+"without executing an explicit query - by calling <literal>aPerson.getEvents()"
+"</literal>. We use a Java collection, a <literal>Set</literal>, because the "
+"collection will not contain duplicate elements and the ordering is not "
+"relevant for us."
 msgstr ""
+"我们将向<literal>Person</literal>类增加一连串的events。那样,通过调用"
+"<literal>aPerson.getEvents()</literal>,就可以轻松地导航到特定person所参与的"
+"events,而不用去执行一个显式的查询。我们使用Java的集合类(collection):"
+"<literal>Set</literal>,因为set 不包含重复的元素及与我们无关的排序。"
 
-#: index.docbook:592
-msgid "We need a unidirectional, many-valued associations, implemented with a <literal>Set</literal>. Let's write the code for this in the Java classes and then map it:"
+#. Tag: para
+#: tutorial.xml:592
+#, no-c-format
+msgid ""
+"We need a unidirectional, many-valued associations, implemented with a "
+"<literal>Set</literal>. Let's write the code for this in the Java classes "
+"and then map it:"
 msgstr ""
+"我们需要用set 实现一个单向多值关联。让我们在Java类里为这个关联编码,接着映射"
+"它:"
 
-#: index.docbook:597
+#. Tag: programlisting
+#: tutorial.xml:597
+#, no-c-format
 msgid ""
-      "<![CDATA[public class Person {\n"
-      "\n"
-      "    private Set events = new HashSet();\n"
-      "\n"
-      "    public Set getEvents() {\n"
-      "        return events;\n"
-      "    }\n"
-      "\n"
-      "    public void setEvents(Set events) {\n"
-      "        this.events = events;\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[public class Person {\n"
+"\n"
+"    private Set events = new HashSet();\n"
+"\n"
+"    public Set getEvents() {\n"
+"        return events;\n"
+"    }\n"
+"\n"
+"    public void setEvents(Set events) {\n"
+"        this.events = events;\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:599
-msgid "Before we map this association, think about the other side. Clearly, we could just keep this unidirectional. Or, we could create another collection on the <literal>Event</literal>, if we want to be able to navigate it bi-directional, i.e. <literal>anEvent.getParticipants()</literal>. This is not necessary, from a functional perspective. You could always execute an explicit query to retrieve the participants for a particular event. This is a design choice left to you, but what is clear from this discussion is the multiplicity of the association: \"many\" valued on both sides, we call this a <emphasis>many-to-many</emphasis> association. Hence, we use Hibernate's many-to-many mapping:"
+#. Tag: para
+#: tutorial.xml:599
+#, no-c-format
+msgid ""
+"Before we map this association, think about the other side. Clearly, we "
+"could just keep this unidirectional. Or, we could create another collection "
+"on the <literal>Event</literal>, if we want to be able to navigate it bi-"
+"directional, i.e. <literal>anEvent.getParticipants()</literal>. This is not "
+"necessary, from a functional perspective. You could always execute an "
+"explicit query to retrieve the participants for a particular event. This is "
+"a design choice left to you, but what is clear from this discussion is the "
+"multiplicity of the association: \"many\" valued on both sides, we call this "
+"a <emphasis>many-to-many</emphasis> association. Hence, we use Hibernate's "
+"many-to-many mapping:"
 msgstr ""
+"在映射这个关联之前,先考虑一下此关联的另外一端。很显然,我们可以保持这个关联"
+"是单向的。或者,我们可以在<literal>Event</literal>里创建另外一个集合,如果希"
+"望能够双向地导航,如:<literal>anEvent.getParticipants()</literal>。从功能的"
+"角度来说,这并不是必须的。因为你总可以显式地执行一个查询,以获得某个特定event"
+"的所有参与者。这是个在设计时需要做出的选择,完全由你来决定,但此讨论中关于关"
+"联的阶数是清楚的:即两端都是“多”值的,我们把它叫做<emphasis>多对多(many-to-"
+"many)</emphasis>关联。因而,我们使用Hibernate的多对多映射:"
 
-#: index.docbook:610
+#. Tag: programlisting
+#: tutorial.xml:610
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"events.Person\" table=\"PERSON\">\n"
-      "    <id name=\"id\" column=\"PERSON_ID\">\n"
-      "        <generator class=\"native\"/>\n"
-      "    </id>\n"
-      "    <property name=\"age\"/>\n"
-      "    <property name=\"firstname\"/>\n"
-      "    <property name=\"lastname\"/>\n"
-      "\n"
-      "    <set name=\"events\" table=\"PERSON_EVENT\">\n"
-      "        <key column=\"PERSON_ID\"/>\n"
-      "        <many-to-many column=\"EVENT_ID\" class=\"events.Event\"/>\n"
-      "    </set>\n"
-      "\n"
-      "</class>]]>"
+"<![CDATA[<class name=\"events.Person\" table=\"PERSON\">\n"
+"    <id name=\"id\" column=\"PERSON_ID\">\n"
+"        <generator class=\"native\"/>\n"
+"    </id>\n"
+"    <property name=\"age\"/>\n"
+"    <property name=\"firstname\"/>\n"
+"    <property name=\"lastname\"/>\n"
+"\n"
+"    <set name=\"events\" table=\"PERSON_EVENT\">\n"
+"        <key column=\"PERSON_ID\"/>\n"
+"        <many-to-many column=\"EVENT_ID\" class=\"events.Event\"/>\n"
+"    </set>\n"
+"\n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:612
-msgid "Hibernate supports all kinds of collection mappings, a <literal>&lt;set&gt;</literal> being most common. For a many-to-many association (or <emphasis>n:m</emphasis> entity relationship), an association table is needed. Each row in this table represents a link between a person and an event. The table name is configured with the <literal>table</literal> attribute of the <literal>set</literal> element. The identifier column name in the association, for the person's side, is defined with the <literal>&lt;key&gt;</literal> element, the column name for the event's side with the <literal>column</literal> attribute of the <literal>&lt;many-to-many&gt;</literal>. You also have to tell Hibernate the class of the objects in your collection (correct: the class on the other side of the collection of references)."
+#. Tag: para
+#: tutorial.xml:612
+#, no-c-format
+msgid ""
+"Hibernate supports all kinds of collection mappings, a <literal>&lt;set&gt;</"
+"literal> being most common. For a many-to-many association (or <emphasis>n:"
+"m</emphasis> entity relationship), an association table is needed. Each row "
+"in this table represents a link between a person and an event. The table "
+"name is configured with the <literal>table</literal> attribute of the "
+"<literal>set</literal> element. The identifier column name in the "
+"association, for the person's side, is defined with the <literal>&lt;key&gt;"
+"</literal> element, the column name for the event's side with the "
+"<literal>column</literal> attribute of the <literal>&lt;many-to-many&gt;</"
+"literal>. You also have to tell Hibernate the class of the objects in your "
+"collection (correct: the class on the other side of the collection of "
+"references)."
 msgstr ""
+"Hibernate支持各种各样的集合映射,<literal>&lt;set&gt;</literal>使用的最为普"
+"遍。对于多对多关联(或叫<emphasis>n:m</emphasis>实体关系), 需要一个关联表"
+"(association table)。<literal>表</literal>里面的每一行代表从person到event的"
+"一个关联。表名是由<literal>set</literal>元素的<literal>table</literal>属性配"
+"置的。关联里面的标识符字段名,对于person的一端,是由<literal>&lt;key&gt;</"
+"literal>元素定义,而event一端的字段名是由<literal>&lt;many-to-many&gt;</"
+"literal>元素的<literal>column</literal>属性定义。你也必须告诉Hibernate集合中"
+"对象的类(也就是位于这个集合所代表的关联另外一端的类)。"
 
-#: index.docbook:624
+#. Tag: para
+#: tutorial.xml:624
+#, no-c-format
 msgid "The database schema for this mapping is therefore:"
-msgstr ""
+msgstr "因而这个映射的数据库schema是:"
 
-#: index.docbook:628
+#. Tag: programlisting
+#: tutorial.xml:628
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "    _____________        __________________\n"
-      "   |             |      |                  |       _____________\n"
-      "   |   EVENTS    |      |   PERSON_EVENT   |      |             |\n"
-      "   |_____________|      |__________________|      |    PERSON   |\n"
-      "   |             |      |                  |      |_____________|\n"
-      "   | *EVENT_ID   | <--> | *EVENT_ID        |      |             |\n"
-      "   |  EVENT_DATE |      | *PERSON_ID       | <--> | *PERSON_ID  |\n"
-      "   |  TITLE      |      |__________________|      |  AGE        |\n"
-      "   |_____________|                                |  FIRSTNAME  |\n"
-      "                                                  |  LASTNAME   |\n"
-      "                                                  |_____________|\n"
-      " ]]>"
+"<![CDATA[\n"
+"    _____________        __________________\n"
+"   |             |      |                  |       _____________\n"
+"   |   EVENTS    |      |   PERSON_EVENT   |      |             |\n"
+"   |_____________|      |__________________|      |    PERSON   |\n"
+"   |             |      |                  |      |_____________|\n"
+"   | *EVENT_ID   | <--> | *EVENT_ID        |      |             |\n"
+"   |  EVENT_DATE |      | *PERSON_ID       | <--> | *PERSON_ID  |\n"
+"   |  TITLE      |      |__________________|      |  AGE        |\n"
+"   |_____________|                                |  FIRSTNAME  |\n"
+"                                                  |  LASTNAME   |\n"
+"                                                  |_____________|\n"
+" ]]>"
 msgstr ""
 
-#: index.docbook:633
+#. Tag: title
+#: tutorial.xml:633
+#, no-c-format
 msgid "Working the association"
-msgstr ""
+msgstr "使关联工作"
 
-#: index.docbook:635
-msgid "Let's bring some people and events together in a new method in <literal>EventManager</literal>:"
+#. Tag: para
+#: tutorial.xml:635
+#, no-c-format
+msgid ""
+"Let's bring some people and events together in a new method in "
+"<literal>EventManager</literal>:"
 msgstr ""
+"我们把一些people和events 一起放到<literal>EventManager</literal>的新方法中:"
 
-#: index.docbook:639
+#. Tag: programlisting
+#: tutorial.xml:639
+#, no-c-format
 msgid ""
-      "<![CDATA[private void addPersonToEvent(Long personId, Long eventId) {\n"
-      "\n"
-      "    Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n"
-      "    session.beginTransaction();\n"
-      "\n"
-      "    Person aPerson = (Person) session.load(Person.class, personId);\n"
-      "    Event anEvent = (Event) session.load(Event.class, eventId);\n"
-      "\n"
-      "    aPerson.getEvents().add(anEvent);\n"
-      "\n"
-      "    session.getTransaction().commit();\n"
-      "}]]>"
+"<![CDATA[private void addPersonToEvent(Long personId, Long eventId) {\n"
+"\n"
+"    Session session = HibernateUtil.getSessionFactory().getCurrentSession"
+"();\n"
+"    session.beginTransaction();\n"
+"\n"
+"    Person aPerson = (Person) session.load(Person.class, personId);\n"
+"    Event anEvent = (Event) session.load(Event.class, eventId);\n"
+"\n"
+"    aPerson.getEvents().add(anEvent);\n"
+"\n"
+"    session.getTransaction().commit();\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:641
-msgid "After loading a <literal>Person</literal> and an <literal>Event</literal>, simply modify the collection using the normal collection methods. As you can see, there is no explicit call to <literal>update()</literal> or <literal>save()</literal>, Hibernate automatically detects that the collection has been modified and needs to be updated. This is called <emphasis>automatic dirty checking</emphasis>, and you can also try it by modifying the name or the date property of any of your objects. As long as they are in <emphasis>persistent</emphasis> state, that is, bound to a particular Hibernate <literal>Session</literal> (i.e. they have been just loaded or saved in a unit of work), Hibernate monitors any changes and executes SQL in a write-behind fashion. The process of synchronizing the memory state with the database, usually only at the end of a unit of work, is called <emphasis>flushing</emphasis>. In our code, the unit of work ends with a commit (or rollback) of the dat!
 abase transaction - as defined by the <literal>thread</literal> configuration option for the <literal>CurrentSessionContext</literal> class."
+#. Tag: para
+#: tutorial.xml:641
+#, no-c-format
+msgid ""
+"After loading a <literal>Person</literal> and an <literal>Event</literal>, "
+"simply modify the collection using the normal collection methods. As you can "
+"see, there is no explicit call to <literal>update()</literal> or "
+"<literal>save()</literal>, Hibernate automatically detects that the "
+"collection has been modified and needs to be updated. This is called "
+"<emphasis>automatic dirty checking</emphasis>, and you can also try it by "
+"modifying the name or the date property of any of your objects. As long as "
+"they are in <emphasis>persistent</emphasis> state, that is, bound to a "
+"particular Hibernate <literal>Session</literal> (i.e. they have been just "
+"loaded or saved in a unit of work), Hibernate monitors any changes and "
+"executes SQL in a write-behind fashion. The process of synchronizing the "
+"memory state with the database, usually only at the end of a unit of work, "
+"is called <emphasis>flushing</emphasis>. In our code, the unit of work ends "
+"with a commit (or rollback) of the database transaction - as defined by the "
+"<literal>thread</literal> configuration option for the "
+"<literal>CurrentSessionContext</literal> class."
 msgstr ""
+"在加载一<literal>Person</literal>和<literal>Event</literal>后,使用普通的集合"
+"方法就可容易地修改我们定义的集合。如你所见,没有显式的<literal>update()</"
+"literal>或<literal>save()</literal>,Hibernate会自动检测到集合已经被修改并需"
+"要更新回数据库。这叫做自动脏检查(<emphasis>automatic dirty checking</"
+"emphasis>),你也可以尝试修改任何对象的name或者date属性,只要他们处于"
+"<emphasis>持久化</emphasis>状态,也就是被绑定到某个Hibernate 的"
+"<literal>Session</literal>上(如:他们刚刚在一个单元操作被加载或者保存),"
+"Hibernate监视任何改变并在后台隐式写的方式执行SQL。同步内存状态和数据库的过"
+"程,通常只在单元操作结束的时候发生,称此过程为清理缓存<emphasis>(flushing)"
+"</emphasis>。在我们的代码中,工作单元由数据库事务的提交(或者回滚)来结束——这"
+"是由<literal>CurrentSessionContext</literal>类的<literal>thread</literal>配置"
+"选项定义的。"
 
-#: index.docbook:656
-msgid "You might of course load person and event in different units of work. Or you modify an object outside of a <literal>Session</literal>, when it is not in persistent state (if it was persistent before, we call this state <emphasis>detached</emphasis>). You can even modify a collection when it is detached:"
+#. Tag: para
+#: tutorial.xml:656
+#, no-c-format
+msgid ""
+"You might of course load person and event in different units of work. Or you "
+"modify an object outside of a <literal>Session</literal>, when it is not in "
+"persistent state (if it was persistent before, we call this state "
+"<emphasis>detached</emphasis>). You can even modify a collection when it is "
+"detached:"
 msgstr ""
+"当然,你也可以在不同的单元操作里面加载person和event。或在<literal>Session</"
+"literal>以外修改不是处在持久化(persistent)状态下的对象(如果该对象以前曾经"
+"被持久化,那么我们称这个状态为<emphasis>脱管(detached)</emphasis>)。你甚至"
+"可以在一个集合被脱管时修改它:"
 
-#: index.docbook:663
+#. Tag: programlisting
+#: tutorial.xml:663
+#, no-c-format
 msgid ""
-      "<![CDATA[private void addPersonToEvent(Long personId, Long eventId) {\n"
-      "\n"
-      "    Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n"
-      "    session.beginTransaction();\n"
-      "\n"
-      "    Person aPerson = (Person) session\n"
-      "            .createQuery(\"select p from Person p left join fetch p.events where p.id = :pid\")\n"
-      "            .setParameter(\"pid\", personId)\n"
-      "            .uniqueResult(); // Eager fetch the collection so we can use it detached\n"
-      "\n"
-      "    Event anEvent = (Event) session.load(Event.class, eventId);\n"
-      "\n"
-      "    session.getTransaction().commit();\n"
-      "\n"
-      "    // End of first unit of work\n"
-      "\n"
-      "    aPerson.getEvents().add(anEvent); // aPerson (and its collection) is detached\n"
-      "\n"
-      "    // Begin second unit of work\n"
-      "\n"
-      "    Session session2 = HibernateUtil.getSessionFactory().getCurrentSession();\n"
-      "    session2.beginTransaction();\n"
-      "\n"
-      "    session2.update(aPerson); // Reattachment of aPerson\n"
-      "\n"
-      "    session2.getTransaction().commit();\n"
-      "}]]>"
+"<![CDATA[private void addPersonToEvent(Long personId, Long eventId) {\n"
+"\n"
+"    Session session = HibernateUtil.getSessionFactory().getCurrentSession"
+"();\n"
+"    session.beginTransaction();\n"
+"\n"
+"    Person aPerson = (Person) session\n"
+"            .createQuery(\"select p from Person p left join fetch p.events "
+"where p.id = :pid\")\n"
+"            .setParameter(\"pid\", personId)\n"
+"            .uniqueResult(); // Eager fetch the collection so we can use it "
+"detached\n"
+"\n"
+"    Event anEvent = (Event) session.load(Event.class, eventId);\n"
+"\n"
+"    session.getTransaction().commit();\n"
+"\n"
+"    // End of first unit of work\n"
+"\n"
+"    aPerson.getEvents().add(anEvent); // aPerson (and its collection) is "
+"detached\n"
+"\n"
+"    // Begin second unit of work\n"
+"\n"
+"    Session session2 = HibernateUtil.getSessionFactory().getCurrentSession"
+"();\n"
+"    session2.beginTransaction();\n"
+"\n"
+"    session2.update(aPerson); // Reattachment of aPerson\n"
+"\n"
+"    session2.getTransaction().commit();\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:665
-msgid "The call to <literal>update</literal> makes a detached object persistent again, you could say it binds it to a new unit of work, so any modifications you made to it while detached can be saved to the database. This includes any modifications (additions/deletions) you made to a collection of that entity object."
+#. Tag: para
+#: tutorial.xml:665
+#, no-c-format
+msgid ""
+"The call to <literal>update</literal> makes a detached object persistent "
+"again, you could say it binds it to a new unit of work, so any modifications "
+"you made to it while detached can be saved to the database. This includes "
+"any modifications (additions/deletions) you made to a collection of that "
+"entity object."
 msgstr ""
+"对<literal>update</literal>的调用使一个脱管对象重新持久化,你可以说它被绑定到"
+"一个新的单元操作上,所以在脱管状态下对它所做的任何修改都会被保存到数据库里。"
+"这也包括你对这个实体对象的集合所作的任何改动(增加/删除)。"
 
-#: index.docbook:672
-msgid "Well, this is not much use in our current situation, but it's an important concept you can design into your own application. For now, complete this exercise by adding a new action to the <literal>EventManager</literal>'s main method and call it from the command line. If you need the identifiers of a person and an event - the <literal>save()</literal> method returns it (you might have to modify some of the previous methods to return that identifier):"
+#. Tag: para
+#: tutorial.xml:672
+#, no-c-format
+msgid ""
+"Well, this is not much use in our current situation, but it's an important "
+"concept you can design into your own application. For now, complete this "
+"exercise by adding a new action to the <literal>EventManager</literal>'s "
+"main method and call it from the command line. If you need the identifiers "
+"of a person and an event - the <literal>save()</literal> method returns it "
+"(you might have to modify some of the previous methods to return that "
+"identifier):"
 msgstr ""
+"这对我们当前的情形不是很有用,但它是非常重要的概念,你可以把它融入到你自己的"
+"应用程序设计中。在<literal>EventManager</literal>的main方法中添加一个新的动"
+"作,并从命令行运行它来完成我们所做的练习。如果你需要person及event的标识符 — "
+"那就用<literal>save()</literal>方法返回它(你可能需要修改前面的一些方法来返回"
+"那个标识符):"
 
-#: index.docbook:680
+#. Tag: programlisting
+#: tutorial.xml:680
+#, no-c-format
 msgid ""
-      "<![CDATA[else if (args[0].equals(\"addpersontoevent\")) {\n"
-      "    Long eventId = mgr.createAndStoreEvent(\"My Event\", new Date());\n"
-      "    Long personId = mgr.createAndStorePerson(\"Foo\", \"Bar\");\n"
-      "    mgr.addPersonToEvent(personId, eventId);\n"
-      "    System.out.println(\"Added person \" + personId + \" to event \" + eventId);\n"
-      "}]]>"
+"<![CDATA[else if (args[0].equals(\"addpersontoevent\")) {\n"
+"    Long eventId = mgr.createAndStoreEvent(\"My Event\", new Date());\n"
+"    Long personId = mgr.createAndStorePerson(\"Foo\", \"Bar\");\n"
+"    mgr.addPersonToEvent(personId, eventId);\n"
+"    System.out.println(\"Added person \" + personId + \" to event \" + "
+"eventId);\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:682
-msgid "This was an example of an association between two equally important classes, two entities. As mentioned earlier, there are other classes and types in a typical model, usually \"less important\". Some you have already seen, like an <literal>int</literal> or a <literal>String</literal>. We call these classes <emphasis>value types</emphasis>, and their instances <emphasis>depend</emphasis> on a particular entity. Instances of these types don't have their own identity, nor are they shared between entities (two persons don't reference the same <literal>firstname</literal> object, even if they have the same first name). Of course, value types can not only be found in the JDK (in fact, in a Hibernate application all JDK classes are considered value types), but you can also write dependent classes yourself, <literal>Address</literal> or <literal>MonetaryAmount</literal>, for example."
+#. Tag: para
+#: tutorial.xml:682
+#, no-c-format
+msgid ""
+"This was an example of an association between two equally important classes, "
+"two entities. As mentioned earlier, there are other classes and types in a "
+"typical model, usually \"less important\". Some you have already seen, like "
+"an <literal>int</literal> or a <literal>String</literal>. We call these "
+"classes <emphasis>value types</emphasis>, and their instances "
+"<emphasis>depend</emphasis> on a particular entity. Instances of these types "
+"don't have their own identity, nor are they shared between entities (two "
+"persons don't reference the same <literal>firstname</literal> object, even "
+"if they have the same first name). Of course, value types can not only be "
+"found in the JDK (in fact, in a Hibernate application all JDK classes are "
+"considered value types), but you can also write dependent classes yourself, "
+"<literal>Address</literal> or <literal>MonetaryAmount</literal>, for example."
 msgstr ""
+"上面是个关于两个同等重要的实体类间关联的例子。像前面所提到的那样,在特定的模"
+"型中也存在其它的类和类型,这些类和类型通常是“次要的”。你已看到过其中的一些,"
+"像<literal>int</literal>或<literal>String</literal>。我们称这些类为<emphasis>"
+"值类型(value type)</emphasis>,它们的实例<emphasis>依赖(depend)</"
+"emphasis>在某个特定的实体上。这些类型的实例没有它们自己的标识(identity),也"
+"不能在实体间被共享(比如,两个person不能引用同一个<literal>firstname</"
+"literal>对象,即使他们有相同的first name)。当然,值类型并不仅仅在JDK中存在"
+"(事实上,在一个Hibernate应用程序中,所有的JDK类都被视为值类型),而且你也可"
+"以编写你自己的依赖类,例如<literal>Address</literal>,"
+"<literal>MonetaryAmount</literal>。"
 
-#: index.docbook:695
-msgid "You can also design a collection of value types. This is conceptually very different from a collection of references to other entities, but looks almost the same in Java."
+#. Tag: para
+#: tutorial.xml:695
+#, no-c-format
+msgid ""
+"You can also design a collection of value types. This is conceptually very "
+"different from a collection of references to other entities, but looks "
+"almost the same in Java."
 msgstr ""
+"你也可以设计一个值类型的集合,这在概念上与引用其它实体的集合有很大的不同,但"
+"是在Java里面看起来几乎是一样的。"
 
-#: index.docbook:703
+#. Tag: title
+#: tutorial.xml:703
+#, no-c-format
 msgid "Collection of values"
-msgstr ""
+msgstr "值类型的集合"
 
-#: index.docbook:705
-msgid "We add a collection of value typed objects to the <literal>Person</literal> entity. We want to store email addresses, so the type we use is <literal>String</literal>, and the collection is again a <literal>Set</literal>:"
+#. Tag: para
+#: tutorial.xml:705
+#, no-c-format
+msgid ""
+"We add a collection of value typed objects to the <literal>Person</literal> "
+"entity. We want to store email addresses, so the type we use is "
+"<literal>String</literal>, and the collection is again a <literal>Set</"
+"literal>:"
 msgstr ""
+"我们把一个值类型对象的集合加入<literal>Person</literal>实体中。我们希望保存"
+"email地址,所以使用<literal>String</literal>类型,而且这次的集合类型又是"
+"<literal>Set</literal>:"
 
-#: index.docbook:710
+#. Tag: programlisting
+#: tutorial.xml:710
+#, no-c-format
 msgid ""
-      "<![CDATA[private Set emailAddresses = new HashSet();\n"
-      "\n"
-      "public Set getEmailAddresses() {\n"
-      "    return emailAddresses;\n"
-      "}\n"
-      "\n"
-      "public void setEmailAddresses(Set emailAddresses) {\n"
-      "    this.emailAddresses = emailAddresses;\n"
-      "}]]>"
+"<![CDATA[private Set emailAddresses = new HashSet();\n"
+"\n"
+"public Set getEmailAddresses() {\n"
+"    return emailAddresses;\n"
+"}\n"
+"\n"
+"public void setEmailAddresses(Set emailAddresses) {\n"
+"    this.emailAddresses = emailAddresses;\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:712
+#. Tag: para
+#: tutorial.xml:712
+#, no-c-format
 msgid "The mapping of this <literal>Set</literal>:"
-msgstr ""
+msgstr "这个<literal>Set</literal>的映射"
 
-#: index.docbook:716
+#. Tag: programlisting
+#: tutorial.xml:716
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"emailAddresses\" table=\"PERSON_EMAIL_ADDR\">\n"
-      "    <key column=\"PERSON_ID\"/>\n"
-      "    <element type=\"string\" column=\"EMAIL_ADDR\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"emailAddresses\" table=\"PERSON_EMAIL_ADDR\">\n"
+"    <key column=\"PERSON_ID\"/>\n"
+"    <element type=\"string\" column=\"EMAIL_ADDR\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:718
-msgid "The difference compared with the earlier mapping is the <literal>element</literal> part, which tells Hibernate that the collection does not contain references to another entity, but a collection of elements of type <literal>String</literal> (the lowercase name tells you it's a Hibernate mapping type/converter). Once again, the <literal>table</literal> attribute of the <literal>set</literal> element determines the table name for the collection. The <literal>key</literal> element defines the foreign-key column name in the collection table. The <literal>column</literal> attribute in the <literal>element</literal> element defines the column name where the <literal>String</literal> values will actually be stored."
+#. Tag: para
+#: tutorial.xml:718
+#, no-c-format
+msgid ""
+"The difference compared with the earlier mapping is the <literal>element</"
+"literal> part, which tells Hibernate that the collection does not contain "
+"references to another entity, but a collection of elements of type "
+"<literal>String</literal> (the lowercase name tells you it's a Hibernate "
+"mapping type/converter). Once again, the <literal>table</literal> attribute "
+"of the <literal>set</literal> element determines the table name for the "
+"collection. The <literal>key</literal> element defines the foreign-key "
+"column name in the collection table. The <literal>column</literal> attribute "
+"in the <literal>element</literal> element defines the column name where the "
+"<literal>String</literal> values will actually be stored."
 msgstr ""
+"比较这次和此前映射的差别,主要在于<literal>element</literal>部分,这次并没有"
+"包含对其它实体引用的集合,而是元素类型为<literal>String</literal>的集合(在映"
+"射中使用小写的名字”string“是向你表明它是一个Hibernate的映射类型或者类型转换"
+"器)。和之前一样,<literal>set</literal>元素的<literal>table</literal>属性决"
+"定了用于集合的表名。<literal>key</literal>元素定义了在集合表中外键的字段名。"
+"<literal>element</literal>元素的<literal>column</literal>属性定义用于实际保存"
+"<literal>String</literal>值的字段名。"
 
-#: index.docbook:728
+#. Tag: para
+#: tutorial.xml:728
+#, no-c-format
 msgid "Have a look at the updated schema:"
-msgstr ""
+msgstr "看一下修改后的数据库schema。"
 
-#: index.docbook:732
+#. Tag: programlisting
+#: tutorial.xml:732
+#, no-c-format
 msgid ""
-      "<![CDATA[\n"
-      "  _____________        __________________\n"
-      " |             |      |                  |       _____________\n"
-      " |   EVENTS    |      |   PERSON_EVENT   |      |             |       ___________________\n"
-      " |_____________|      |__________________|      |    PERSON   |      |                   |\n"
-      " |             |      |                  |      |_____________|      | PERSON_EMAIL_ADDR |\n"
-      " | *EVENT_ID   | <--> | *EVENT_ID        |      |             |      |___________________|\n"
-      " |  EVENT_DATE |      | *PERSON_ID       | <--> | *PERSON_ID  | <--> |  *PERSON_ID       |\n"
-      " |  TITLE      |      |__________________|      |  AGE        |      |  *EMAIL_ADDR      |\n"
-      " |_____________|                                |  FIRSTNAME  |      |___________________|\n"
-      "                                                |  LASTNAME   |\n"
-      "                                                |_____________|\n"
-      " ]]>"
+"<![CDATA[\n"
+"  _____________        __________________\n"
+" |             |      |                  |       _____________\n"
+" |   EVENTS    |      |   PERSON_EVENT   |      |             |       "
+"___________________\n"
+" |_____________|      |__________________|      |    PERSON   |      "
+"|                   |\n"
+" |             |      |                  |      |_____________|      | "
+"PERSON_EMAIL_ADDR |\n"
+" | *EVENT_ID   | <--> | *EVENT_ID        |      |             |      |"
+"___________________|\n"
+" |  EVENT_DATE |      | *PERSON_ID       | <--> | *PERSON_ID  | <--> |  "
+"*PERSON_ID       |\n"
+" |  TITLE      |      |__________________|      |  AGE        |      |  "
+"*EMAIL_ADDR      |\n"
+" |_____________|                                |  FIRSTNAME  |      |"
+"___________________|\n"
+"                                                |  LASTNAME   |\n"
+"                                                |_____________|\n"
+" ]]>"
 msgstr ""
 
-#: index.docbook:734
-msgid "You can see that the primary key of the collection table is in fact a composite key, using both columns. This also implies that there can't be duplicate email addresses per person, which is exactly the semantics we need for a set in Java."
+#. Tag: para
+#: tutorial.xml:734
+#, no-c-format
+msgid ""
+"You can see that the primary key of the collection table is in fact a "
+"composite key, using both columns. This also implies that there can't be "
+"duplicate email addresses per person, which is exactly the semantics we need "
+"for a set in Java."
 msgstr ""
+"你可以看到集合表的主键实际上是个复合主键,同时使用了2个字段。这也暗示了对于同"
+"一个person不能有重复的email地址,这正是Java里面使用Set时候所需要的语义(Set里"
+"元素不能重复)。"
 
-#: index.docbook:740
-msgid "You can now try and add elements to this collection, just like we did before by linking persons and events. It's the same code in Java:"
+#. Tag: para
+#: tutorial.xml:740
+#, no-c-format
+msgid ""
+"You can now try and add elements to this collection, just like we did before "
+"by linking persons and events. It's the same code in Java:"
 msgstr ""
+"你现在可以试着把元素加入到这个集合,就像我们在之前关联person和event的那样。其"
+"实现的Java代码是相同的:"
 
-#: index.docbook:745
+#. Tag: programlisting
+#: tutorial.xml:745
+#, no-c-format
 msgid ""
-      "<![CDATA[private void addEmailToPerson(Long personId, String emailAddress) {\n"
-      "\n"
-      "    Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n"
-      "    session.beginTransaction();\n"
-      "\n"
-      "    Person aPerson = (Person) session.load(Person.class, personId);\n"
-      "\n"
-      "    // The getEmailAddresses() might trigger a lazy load of the collection\n"
-      "    aPerson.getEmailAddresses().add(emailAddress);\n"
-      "\n"
-      "    session.getTransaction().commit();\n"
-      "}]]>"
+"<![CDATA[private void addEmailToPerson(Long personId, String emailAddress) "
+"{\n"
+"\n"
+"    Session session = HibernateUtil.getSessionFactory().getCurrentSession"
+"();\n"
+"    session.beginTransaction();\n"
+"\n"
+"    Person aPerson = (Person) session.load(Person.class, personId);\n"
+"\n"
+"    // The getEmailAddresses() might trigger a lazy load of the collection\n"
+"    aPerson.getEmailAddresses().add(emailAddress);\n"
+"\n"
+"    session.getTransaction().commit();\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:747
-msgid "This time we didnt' use a <emphasis>fetch</emphasis> query to initialize the collection. Hence, the call to its getter method will trigger an additional select to initialize it, so we can add an element to it. Monitor the SQL log and try to optimize this with an eager fetch."
+#. Tag: para
+#: tutorial.xml:747
+#, no-c-format
+msgid ""
+"This time we didnt' use a <emphasis>fetch</emphasis> query to initialize the "
+"collection. Hence, the call to its getter method will trigger an additional "
+"select to initialize it, so we can add an element to it. Monitor the SQL log "
+"and try to optimize this with an eager fetch."
 msgstr ""
+"这次我们没有使用<emphasis>fetch</emphasis>查询来初始化集合。因此,调用其"
+"getter方法会触发另一附加的select来初始化集合,这样我们才能把元素添加进去。检"
+"查SQL log,试着通过预先抓取来优化它。"
 
-#: index.docbook:757
+#. Tag: title
+#: tutorial.xml:757
+#, no-c-format
 msgid "Bi-directional associations"
-msgstr ""
+msgstr "双向关联"
 
-#: index.docbook:759
-msgid "Next we are going to map a bi-directional association - making the association between person and event work from both sides in Java. Of course, the database schema doesn't change, we still have many-to-many multiplicity. A relational database is more flexible than a network programming language, so it doesn't need anything like a navigation direction - data can be viewed and retrieved in any possible way."
+#. Tag: para
+#: tutorial.xml:759
+#, no-c-format
+msgid ""
+"Next we are going to map a bi-directional association - making the "
+"association between person and event work from both sides in Java. Of "
+"course, the database schema doesn't change, we still have many-to-many "
+"multiplicity. A relational database is more flexible than a network "
+"programming language, so it doesn't need anything like a navigation "
+"direction - data can be viewed and retrieved in any possible way."
 msgstr ""
+"接下来我们将映射双向关联(bi-directional association)- 在Java里让person和"
+"event可以从关联的任何一端访问另一端。当然,数据库schema没有改变,我们仍然需要"
+"多对多的阶数。一个关系型数据库要比网络编程语言 更加灵活,所以它并不需要任何像"
+"导航方向(navigation direction)的东西 - 数据可以用任何可能的方式进行查看和"
+"获取。"
 
-#: index.docbook:767
-msgid "First, add a collection of participants to the <literal>Event</literal> Event class:"
-msgstr ""
+#. Tag: para
+#: tutorial.xml:767
+#, no-c-format
+msgid ""
+"First, add a collection of participants to the <literal>Event</literal> "
+"Event class:"
+msgstr "首先,把一个参与者(person)的集合加入<literal>Event</literal>类中:"
 
-#: index.docbook:771
+#. Tag: programlisting
+#: tutorial.xml:771
+#, no-c-format
 msgid ""
-      "<![CDATA[private Set participants = new HashSet();\n"
-      "\n"
-      "public Set getParticipants() {\n"
-      "    return participants;\n"
-      "}\n"
-      "\n"
-      "public void setParticipants(Set participants) {\n"
-      "    this.participants = participants;\n"
-      "}]]>"
+"<![CDATA[private Set participants = new HashSet();\n"
+"\n"
+"public Set getParticipants() {\n"
+"    return participants;\n"
+"}\n"
+"\n"
+"public void setParticipants(Set participants) {\n"
+"    this.participants = participants;\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:773
-msgid "Now map this side of the association too, in <literal>Event.hbm.xml</literal>."
-msgstr ""
+#. Tag: para
+#: tutorial.xml:773
+#, no-c-format
+msgid ""
+"Now map this side of the association too, in <literal>Event.hbm.xml</"
+"literal>."
+msgstr "在<literal>Event.hbm.xml</literal>里面也映射这个关联。"
 
-#: index.docbook:777
+#. Tag: programlisting
+#: tutorial.xml:777
+#, no-c-format
 msgid ""
-      "<![CDATA[<set name=\"participants\" table=\"PERSON_EVENT\" inverse=\"true\">\n"
-      "    <key column=\"EVENT_ID\"/>\n"
-      "    <many-to-many column=\"PERSON_ID\" class=\"events.Person\"/>\n"
-      "</set>]]>"
+"<![CDATA[<set name=\"participants\" table=\"PERSON_EVENT\" inverse=\"true"
+"\">\n"
+"    <key column=\"EVENT_ID\"/>\n"
+"    <many-to-many column=\"PERSON_ID\" class=\"events.Person\"/>\n"
+"</set>]]>"
 msgstr ""
 
-#: index.docbook:779
-msgid "As you see, these are normal <literal>set</literal> mappings in both mapping documents. Notice that the column names in <literal>key</literal> and <literal>many-to-many</literal> are swapped in both mapping documents. The most important addition here is the <literal>inverse=\"true\"</literal> attribute in the <literal>set</literal> element of the <literal>Event</literal>'s collection mapping."
+#. Tag: para
+#: tutorial.xml:779
+#, no-c-format
+msgid ""
+"As you see, these are normal <literal>set</literal> mappings in both mapping "
+"documents. Notice that the column names in <literal>key</literal> and "
+"<literal>many-to-many</literal> are swapped in both mapping documents. The "
+"most important addition here is the <literal>inverse=\"true\"</literal> "
+"attribute in the <literal>set</literal> element of the <literal>Event</"
+"literal>'s collection mapping."
 msgstr ""
+"如你所见,两个映射文件里都有普通的<literal>set</literal>映射。注意在两个映射"
+"文件中,互换了<literal>key</literal>和<literal>many-to-many</literal>的字段"
+"名。这里最重要的是<literal>Event</literal>映射文件里增加了<literal>set</"
+"literal>元素的<literal>inverse=\"true\"</literal>属性。"
 
-#: index.docbook:787
-msgid "What this means is that Hibernate should take the other side - the <literal>Person</literal> class - when it needs to find out information about the link between the two. This will be a lot easier to understand once you see how the bi-directional link between our two entities is created ."
+#. Tag: para
+#: tutorial.xml:787
+#, no-c-format
+msgid ""
+"What this means is that Hibernate should take the other side - the "
+"<literal>Person</literal> class - when it needs to find out information "
+"about the link between the two. This will be a lot easier to understand once "
+"you see how the bi-directional link between our two entities is created ."
 msgstr ""
+"这意味着在需要的时候,Hibernate能在关联的另一端 - <literal>Person</literal>"
+"类得到两个实体间关联的信息。这将会极大地帮助你理解双向关联是如何在两个实体间"
+"被创建的。"
 
-#: index.docbook:796
+#. Tag: title
+#: tutorial.xml:796
+#, no-c-format
 msgid "Working bi-directional links"
-msgstr ""
+msgstr "使双向连起来"
 
-#: index.docbook:798
-msgid "First, keep in mind that Hibernate does not affect normal Java semantics. How did we create a link between a <literal>Person</literal> and an <literal>Event</literal> in the unidirectional example? We added an instance of <literal>Event</literal> to the collection of event references, of an instance of <literal>Person</literal>. So, obviously, if we want to make this link working bi-directional, we have to do the same on the other side - adding a <literal>Person</literal> reference to the collection in an <literal>Event</literal>. This \"setting the link on both sides\" is absolutely necessary and you should never forget doing it."
+#. Tag: para
+#: tutorial.xml:798
+#, no-c-format
+msgid ""
+"First, keep in mind that Hibernate does not affect normal Java semantics. "
+"How did we create a link between a <literal>Person</literal> and an "
+"<literal>Event</literal> in the unidirectional example? We added an instance "
+"of <literal>Event</literal> to the collection of event references, of an "
+"instance of <literal>Person</literal>. So, obviously, if we want to make "
+"this link working bi-directional, we have to do the same on the other side - "
+"adding a <literal>Person</literal> reference to the collection in an "
+"<literal>Event</literal>. This \"setting the link on both sides\" is "
+"absolutely necessary and you should never forget doing it."
 msgstr ""
+"首先请记住,Hibernate并不影响通常的Java语义。 在单向关联的例子中,我们是怎样"
+"在<literal>Person</literal>和<literal>Event</literal>之间创建联系的?我们把"
+"<literal>Event</literal>实例添加到<literal>Person</literal>实例内的event引用"
+"集合里。因此很显然,如果我们要让这个关联可以双向地工作,我们需要在另外一端做"
+"同样的事情 - 把<literal>Person</literal>实例加入<literal>Event</literal>类内"
+"的Person引用集合。这“在关联的两端设置联系”是完全必要的而且你都得这么做。"
 
-#: index.docbook:808
-msgid "Many developers program defensive and create link management methods to correctly set both sides, e.g. in <literal>Person</literal>:"
+#. Tag: para
+#: tutorial.xml:808
+#, no-c-format
+msgid ""
+"Many developers program defensive and create link management methods to "
+"correctly set both sides, e.g. in <literal>Person</literal>:"
 msgstr ""
+"许多开发人员防御式地编程,创建管理关联的方法来保证正确的设置了关联的两端,比"
+"如在<literal>Person</literal>里:"
 
-#: index.docbook:813
+#. Tag: programlisting
+#: tutorial.xml:813
+#, no-c-format
 msgid ""
-      "<![CDATA[protected Set getEvents() {\n"
-      "    return events;\n"
-      "}\n"
-      "\n"
-      "protected void setEvents(Set events) {\n"
-      "    this.events = events;\n"
-      "}\n"
-      "\n"
-      "public void addToEvent(Event event) {\n"
-      "    this.getEvents().add(event);\n"
-      "    event.getParticipants().add(this);\n"
-      "}\n"
-      "\n"
-      "public void removeFromEvent(Event event) {\n"
-      "    this.getEvents().remove(event);\n"
-      "    event.getParticipants().remove(this);\n"
-      "}]]>"
+"<![CDATA[protected Set getEvents() {\n"
+"    return events;\n"
+"}\n"
+"\n"
+"protected void setEvents(Set events) {\n"
+"    this.events = events;\n"
+"}\n"
+"\n"
+"public void addToEvent(Event event) {\n"
+"    this.getEvents().add(event);\n"
+"    event.getParticipants().add(this);\n"
+"}\n"
+"\n"
+"public void removeFromEvent(Event event) {\n"
+"    this.getEvents().remove(event);\n"
+"    event.getParticipants().remove(this);\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:815
-msgid "Notice that the get and set methods for the collection are now protected - this allows classes in the same package and subclasses to still access the methods, but prevents everybody else from messing with the collections directly (well, almost). You should probably do the same with the collection on the other side."
+#. Tag: para
+#: tutorial.xml:815
+#, no-c-format
+msgid ""
+"Notice that the get and set methods for the collection are now protected - "
+"this allows classes in the same package and subclasses to still access the "
+"methods, but prevents everybody else from messing with the collections "
+"directly (well, almost). You should probably do the same with the collection "
+"on the other side."
 msgstr ""
+"注意现在对于集合的get和set方法的访问级别是protected - 这允许在位于同一个包"
+"(package)中的类以及继承自这个类的子类可以访问这些方法,但禁止其他任何人的直"
+"接访问,避免了集合内容的混乱。你应尽可能地在另一端也把集合的访问级别设成"
+"protected。"
 
-#: index.docbook:822
-msgid "What about the <literal>inverse</literal> mapping attribute? For you, and for Java, a bi-directional link is simply a matter of setting the references on both sides correctly. Hibernate however doesn't have enough information to correctly arrange SQL <literal>INSERT</literal> and <literal>UPDATE</literal> statements (to avoid constraint violations), and needs some help to handle bi-directional associations properly. Making one side of the association <literal>inverse</literal> tells Hibernate to basically ignore it, to consider it a <emphasis>mirror</emphasis> of the other side. That's all that is necessary for Hibernate to work out all of the issues when transformation a directional navigation model to a SQL database schema. The rules you have to remember are straightforward: All bi-directional associations need one side as <literal>inverse</literal>. In a one-to-many association it has to be the many-side, in many-to-many association you can pick either side, there!
  is no difference."
+#. Tag: para
+#: tutorial.xml:822
+#, no-c-format
+msgid ""
+"What about the <literal>inverse</literal> mapping attribute? For you, and "
+"for Java, a bi-directional link is simply a matter of setting the references "
+"on both sides correctly. Hibernate however doesn't have enough information "
+"to correctly arrange SQL <literal>INSERT</literal> and <literal>UPDATE</"
+"literal> statements (to avoid constraint violations), and needs some help to "
+"handle bi-directional associations properly. Making one side of the "
+"association <literal>inverse</literal> tells Hibernate to basically ignore "
+"it, to consider it a <emphasis>mirror</emphasis> of the other side. That's "
+"all that is necessary for Hibernate to work out all of the issues when "
+"transformation a directional navigation model to a SQL database schema. The "
+"rules you have to remember are straightforward: All bi-directional "
+"associations need one side as <literal>inverse</literal>. In a one-to-many "
+"association it has to be the many-side, in many-to-many association you can "
+"pick either side, there is no difference."
 msgstr ""
+"<literal>inverse</literal>映射属性究竟表示什么呢?对于你和Java来说,一个双向"
+"关联仅仅是在两端简单地正确设置引用。然而,Hibernate并没有足够的信息去正确地执"
+"行<literal>INSERT</literal>和<literal>UPDATE</literal>语句(以避免违反数据库"
+"约束),所以它需要一些帮助来正确的处理双向关联。把关联的一端设置为"
+"<literal>inverse</literal>将告诉Hibernate忽略关联的这一端,把这端看成是另外一"
+"端的一个<emphasis>镜象(mirror)</emphasis>。这就是所需的全部信息,Hibernate"
+"利用这些信息来处理把一个有向导航模型转移到数据库schema时的所有问题。你只需要"
+"记住这个直观的规则:所有的双向关联需要有一端被设置为<literal>inverse</"
+"literal>。在一对多关联中它必须是代表多(many)的那端。而在多对多(many-to-"
+"many)关联中,你可以任意选取一端,因为两端之间并没有差别。"
 
-#: index.docbook:837
+#. Tag: para
+#: tutorial.xml:837
+#, no-c-format
 msgid "Let's turn this into a small web application."
-msgstr ""
+msgstr "让我们把进入一个小型的web应用程序。"
 
-#: index.docbook:844
+#. Tag: title
+#: tutorial.xml:844
+#, no-c-format
 msgid "Part 3 - The EventManager web application"
-msgstr ""
+msgstr "第三部分 - EventManager web应用程序"
 
-#: index.docbook:846
-msgid "A Hibernate web application uses <literal>Session</literal> and <literal>Transaction</literal> almost like a standalone application. However, some common patterns are useful. We now write an <literal>EventManagerServlet</literal>. This servlet can list all events stored in the database, and it provides an HTML form to enter new events."
+#. Tag: para
+#: tutorial.xml:846
+#, no-c-format
+msgid ""
+"A Hibernate web application uses <literal>Session</literal> and "
+"<literal>Transaction</literal> almost like a standalone application. "
+"However, some common patterns are useful. We now write an "
+"<literal>EventManagerServlet</literal>. This servlet can list all events "
+"stored in the database, and it provides an HTML form to enter new events."
 msgstr ""
+"Hibernate web应用程序使用<literal>Session</literal> 和<literal>Transaction</"
+"literal>的方式几乎和独立应用程序是一样的。但是,有一些常见的模式(pattern)非"
+"常有用。现在我们编写一个<literal>EventManagerServlet</literal>。这个servlet可"
+"以列出数据库中保存的所有的events,还提供一个HTML表单来增加新的events。"
 
-#: index.docbook:854
+#. Tag: title
+#: tutorial.xml:854
+#, no-c-format
 msgid "Writing the basic servlet"
-msgstr ""
+msgstr "编写基本的servlet"
 
-#: index.docbook:856
-msgid "Create a new class in your source directory, in the <literal>events</literal> package:"
-msgstr ""
+#. Tag: para
+#: tutorial.xml:856
+#, no-c-format
+msgid ""
+"Create a new class in your source directory, in the <literal>events</"
+"literal> package:"
+msgstr "在你的源代码目录的<literal>events</literal>包中创建一个新的类:"
 
-#: index.docbook:861
+#. Tag: programlisting
+#: tutorial.xml:861
+#, no-c-format
 msgid ""
-      "<![CDATA[package events;\n"
-      "\n"
-      "// Imports\n"
-      "\n"
-      "public class EventManagerServlet extends HttpServlet {\n"
-      "\n"
-      "    // Servlet code\n"
-      "}]]>"
+"<![CDATA[package events;\n"
+"\n"
+"// Imports\n"
+"\n"
+"public class EventManagerServlet extends HttpServlet {\n"
+"\n"
+"    // Servlet code\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:863
-msgid "The servlet handles HTTP <literal>GET</literal> requests only, hence, the method we implement is <literal>doGet()</literal>:"
+#. Tag: para
+#: tutorial.xml:863
+#, no-c-format
+msgid ""
+"The servlet handles HTTP <literal>GET</literal> requests only, hence, the "
+"method we implement is <literal>doGet()</literal>:"
 msgstr ""
+"我们后面会用到<literal>dateFormatter</literal> 的工具, 它把<literal>Date</"
+"literal>对象转换为字符串。只要一个formatter作为servlet的成员就可以了。"
 
-#: index.docbook:868
+#. Tag: programlisting
+#: tutorial.xml:868
+#, no-c-format
 msgid ""
-      "<![CDATA[protected void doGet(HttpServletRequest request,\n"
-      "                     HttpServletResponse response)\n"
-      "        throws ServletException, IOException {\n"
-      "\n"
-      "    SimpleDateFormat dateFormatter = new SimpleDateFormat(\"dd.MM.yyyy\");\n"
-      "\n"
-      "    try {\n"
-      "        // Begin unit of work\n"
-      "        HibernateUtil.getSessionFactory()\n"
-      "                .getCurrentSession().beginTransaction();\n"
-      "\n"
-      "        // Process request and render page...\n"
-      "\n"
-      "        // End unit of work\n"
-      "        HibernateUtil.getSessionFactory()\n"
-      "                .getCurrentSession().getTransaction().commit();\n"
-      "\n"
-      "    } catch (Exception ex) {\n"
-      "        HibernateUtil.getSessionFactory()\n"
-      "                .getCurrentSession().getTransaction().rollback();\n"
-      "        throw new ServletException(ex);\n"
-      "    }\n"
-      "\n"
-      "}]]>"
+"<![CDATA[protected void doGet(HttpServletRequest request,\n"
+"                     HttpServletResponse response)\n"
+"        throws ServletException, IOException {\n"
+"\n"
+"    SimpleDateFormat dateFormatter = new SimpleDateFormat(\"dd.MM.yyyy\");\n"
+"\n"
+"    try {\n"
+"        // Begin unit of work\n"
+"        HibernateUtil.getSessionFactory()\n"
+"                .getCurrentSession().beginTransaction();\n"
+"\n"
+"        // Process request and render page...\n"
+"\n"
+"        // End unit of work\n"
+"        HibernateUtil.getSessionFactory()\n"
+"                .getCurrentSession().getTransaction().commit();\n"
+"\n"
+"    } catch (Exception ex) {\n"
+"        HibernateUtil.getSessionFactory()\n"
+"                .getCurrentSession().getTransaction().rollback();\n"
+"        throw new ServletException(ex);\n"
+"    }\n"
+"\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:870
-msgid "The pattern we are applying here is called <emphasis>session-per-request</emphasis>. When a request hits the servlet, a new Hibernate <literal>Session</literal> is opened through the first call to <literal>getCurrentSession()</literal> on the <literal>SessionFactory</literal>. Then a database transaction is started&mdash;all data access as to occur inside a transaction, no matter if data is read or written (we don't use the auto-commit mode in applications)."
+#. Tag: para
+#: tutorial.xml:870
+#, fuzzy, no-c-format
+msgid ""
+"The pattern we are applying here is called <emphasis>session-per-request</"
+"emphasis>. When a request hits the servlet, a new Hibernate "
+"<literal>Session</literal> is opened through the first call to "
+"<literal>getCurrentSession()</literal> on the <literal>SessionFactory</"
+"literal>. Then a database transaction is started&mdash;all data access as to "
+"occur inside a transaction, no matter if data is read or written (we don't "
+"use the auto-commit mode in applications)."
 msgstr ""
+"这个servlet只处理 HTTP <literal>GET</literal> 请求,因此,我们要实现的是"
+"<literal>doGet()</literal>方法:"
 
-#: index.docbook:879
-msgid "Do <emphasis>not</emphasis> use a new Hibernate <literal>Session</literal> for every database operation. Use one Hibernate <literal>Session</literal> that is scoped to the whole request. Use <literal>getCurrentSession()</literal>, so that it is automatically bound to the current Java thread."
+#. Tag: para
+#: tutorial.xml:879
+#, no-c-format
+msgid ""
+"Do <emphasis>not</emphasis> use a new Hibernate <literal>Session</literal> "
+"for every database operation. Use one Hibernate <literal>Session</literal> "
+"that is scoped to the whole request. Use <literal>getCurrentSession()</"
+"literal>, so that it is automatically bound to the current Java thread."
 msgstr ""
+"我们称这里应用的模式为每次请求一个session<emphasis>(session-per-request)</"
+"emphasis>。当有请求到达这个servlet的时候,通过对<literal>SessionFactory</"
+"literal>的第一次调用,打开一个新的Hibernate <literal>Session</literal>。然后"
+"启动一个数据库事务&mdash;所有的数据访问都是在事务中进行,不管是读还是写(我们"
+"在应用程序中不使用auto-commit模式)。"
 
-#: index.docbook:886
-msgid "Next, the possible actions of the request are processed and the response HTML is rendered. We'll get to that part soon."
+#. Tag: para
+#: tutorial.xml:886
+#, no-c-format
+msgid ""
+"Next, the possible actions of the request are processed and the response "
+"HTML is rendered. We'll get to that part soon."
 msgstr ""
+"<emphasis>不要</emphasis>为每次数据库操作都使用一个新的Hibernate "
+"<literal>Session</literal>。将Hibernate <literal>Session</literal>的范围设置"
+"为整个请求。要用<literal>getCurrentSession()</literal>,这样它自动会绑定到当"
+"前Java线程。"
 
-#: index.docbook:891
-msgid "Finally, the unit of work ends when processing and rendering is complete. If any problem occured during processing or rendering, an exception will be thrown and the database transaction rolled back. This completes the <literal>session-per-request</literal> pattern. Instead of the transaction demarcation code in every servlet you could also write a servlet filter. See the Hibernate website and Wiki for more information about this pattern, called <emphasis>Open Session in View</emphasis>&mdash;you'll need it as soon as you consider rendering your view in JSP, not in a servlet."
+#. Tag: para
+#: tutorial.xml:891
+#, fuzzy, no-c-format
+msgid ""
+"Finally, the unit of work ends when processing and rendering is complete. If "
+"any problem occured during processing or rendering, an exception will be "
+"thrown and the database transaction rolled back. This completes the "
+"<literal>session-per-request</literal> pattern. Instead of the transaction "
+"demarcation code in every servlet you could also write a servlet filter. See "
+"the Hibernate website and Wiki for more information about this pattern, "
+"called <emphasis>Open Session in View</emphasis>&mdash;you'll need it as "
+"soon as you consider rendering your view in JSP, not in a servlet."
 msgstr ""
+"下一步,对请求的可能动作进行处理,渲染出反馈的HTML。我们很快就会涉及到那部"
+"分。"
 
-#: index.docbook:905
+#. Tag: title
+#: tutorial.xml:905
+#, no-c-format
 msgid "Processing and rendering"
 msgstr ""
+"最后,当处理与渲染都结束的时候,这个工作单元就结束了。假若在处理或渲染的时候"
+"有任何错误发生,会抛出一个异常,回滚数据库事务。这样,<literal>session-per-"
+"request</literal>模式就完成了。为了避免在每个servlet中都编写事务边界界定的代"
+"码,可以考虑写一个servlet 过滤器(filter)来更好地解决。关于这一模式的更多信"
+"息,请参阅Hibernate网站和Wiki,这一模式叫做<emphasis>Open Session in View</"
+"emphasis>&mdash;只要你考虑用JSP来渲染你的视图(view),而不是在servlet中,你"
+"就会很快用到它。"
 
-#: index.docbook:907
-msgid "Let's implement the processing of the request and rendering of the page."
-msgstr ""
+#. Tag: para
+#: tutorial.xml:907
+#, no-c-format
+msgid ""
+"Let's implement the processing of the request and rendering of the page."
+msgstr "处理与渲染"
 
-#: index.docbook:911
+#. Tag: programlisting
+#: tutorial.xml:911
+#, no-c-format
 msgid ""
-      "<![CDATA[// Write HTML header\n"
-      "PrintWriter out = response.getWriter();\n"
-      "out.println(\"<html><head><title>Event Manager</title></head><body>\");\n"
-      "\n"
-      "// Handle actions\n"
-      "if ( \"store\".equals(request.getParameter(\"action\")) ) {\n"
-      "\n"
-      "    String eventTitle = request.getParameter(\"eventTitle\");\n"
-      "    String eventDate = request.getParameter(\"eventDate\");\n"
-      "\n"
-      "    if ( \"\".equals(eventTitle) || \"\".equals(eventDate) ) {\n"
-      "        out.println(\"<b><i>Please enter event title and date.</i></b>\");\n"
-      "    } else {\n"
-      "        createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate));\n"
-      "        out.println(\"<b><i>Added event.</i></b>\");\n"
-      "    }\n"
-      "}\n"
-      "\n"
-      "// Print page\n"
-      "printEventForm(out);\n"
-      "listEvents(out, dateFormatter);\n"
-      "\n"
-      "// Write HTML footer\n"
-      "out.println(\"</body></html>\");\n"
-      "out.flush();\n"
-      "out.close();]]>"
+"<![CDATA[// Write HTML header\n"
+"PrintWriter out = response.getWriter();\n"
+"out.println(\"<html><head><title>Event Manager</title></head><body>\");\n"
+"\n"
+"// Handle actions\n"
+"if ( \"store\".equals(request.getParameter(\"action\")) ) {\n"
+"\n"
+"    String eventTitle = request.getParameter(\"eventTitle\");\n"
+"    String eventDate = request.getParameter(\"eventDate\");\n"
+"\n"
+"    if ( \"\".equals(eventTitle) || \"\".equals(eventDate) ) {\n"
+"        out.println(\"<b><i>Please enter event title and date.</i></b>\");\n"
+"    } else {\n"
+"        createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate));\n"
+"        out.println(\"<b><i>Added event.</i></b>\");\n"
+"    }\n"
+"}\n"
+"\n"
+"// Print page\n"
+"printEventForm(out);\n"
+"listEvents(out, dateFormatter);\n"
+"\n"
+"// Write HTML footer\n"
+"out.println(\"</body></html>\");\n"
+"out.flush();\n"
+"out.close();]]>"
 msgstr ""
 
-#: index.docbook:913
-msgid "Granted, this coding style with a mix of Java and HTML would not scale in a more complex application&mdash;keep in mind that we are only illustrating basic Hibernate concepts in this tutorial. The code prints an HTML header and a footer. Inside this page, an HTML form for event entry and a list of all events in the database are printed. The first method is trivial and only outputs HTML:"
-msgstr ""
+#. Tag: para
+#: tutorial.xml:913
+#, fuzzy, no-c-format
+msgid ""
+"Granted, this coding style with a mix of Java and HTML would not scale in a "
+"more complex application&mdash;keep in mind that we are only illustrating "
+"basic Hibernate concepts in this tutorial. The code prints an HTML header "
+"and a footer. Inside this page, an HTML form for event entry and a list of "
+"all events in the database are printed. The first method is trivial and only "
+"outputs HTML:"
+msgstr "我们来实现处理请求以及渲染页面的工作。"
 
-#: index.docbook:922
+#. Tag: programlisting
+#: tutorial.xml:922
+#, no-c-format
 msgid ""
-      "<![CDATA[private void printEventForm(PrintWriter out) {\n"
-      "    out.println(\"<h2>Add new event:</h2>\");\n"
-      "    out.println(\"<form>\");\n"
-      "    out.println(\"Title: <input name='eventTitle' length='50'/><br/>\");\n"
-      "    out.println(\"Date (e.g. 24.12.2009): <input name='eventDate' length='10'/><br/>\");\n"
-      "    out.println(\"<input type='submit' name='action' value='store'/>\");\n"
-      "    out.println(\"</form>\");\n"
-      "}]]>"
+"<![CDATA[private void printEventForm(PrintWriter out) {\n"
+"    out.println(\"<h2>Add new event:</h2>\");\n"
+"    out.println(\"<form>\");\n"
+"    out.println(\"Title: <input name='eventTitle' length='50'/><br/>\");\n"
+"    out.println(\"Date (e.g. 24.12.2009): <input name='eventDate' "
+"length='10'/><br/>\");\n"
+"    out.println(\"<input type='submit' name='action' value='store'/>\");\n"
+"    out.println(\"</form>\");\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:924
-msgid "The <literal>listEvents()</literal> method uses the Hibernate <literal>Session</literal> bound to the current thread to execute a query:"
+#. Tag: para
+#: tutorial.xml:924
+#, no-c-format
+msgid ""
+"The <literal>listEvents()</literal> method uses the Hibernate "
+"<literal>Session</literal> bound to the current thread to execute a query:"
 msgstr ""
+"<literal>listEvents()</literal>方法使用绑定到当前线程的Hibernate "
+"<literal>Session</literal>来执行查询:"
 
-#: index.docbook:930
+#. Tag: programlisting
+#: tutorial.xml:930
+#, no-c-format
 msgid ""
-      "<![CDATA[private void listEvents(PrintWriter out, SimpleDateFormat dateFormatter) {\n"
-      "\n"
-      "    List result = HibernateUtil.getSessionFactory()\n"
-      "                    .getCurrentSession().createCriteria(Event.class).list();\n"
-      "    if (result.size() > 0) {\n"
-      "        out.println(\"<h2>Events in database:</h2>\");\n"
-      "        out.println(\"<table border='1'>\");\n"
-      "        out.println(\"<tr>\");\n"
-      "        out.println(\"<th>Event title</th>\");\n"
-      "        out.println(\"<th>Event date</th>\");\n"
-      "        out.println(\"</tr>\");\n"
-      "        for (Iterator it = result.iterator(); it.hasNext();) {\n"
-      "            Event event = (Event) it.next();\n"
-      "            out.println(\"<tr>\");\n"
-      "            out.println(\"<td>\" + event.getTitle() + \"</td>\");\n"
-      "            out.println(\"<td>\" + dateFormatter.format(event.getDate()) + \"</td>\");\n"
-      "            out.println(\"</tr>\");\n"
-      "        }\n"
-      "        out.println(\"</table>\");\n"
-      "    }\n"
-      "}]]>"
+"<![CDATA[private void listEvents(PrintWriter out, SimpleDateFormat "
+"dateFormatter) {\n"
+"\n"
+"    List result = HibernateUtil.getSessionFactory()\n"
+"                    .getCurrentSession().createCriteria(Event.class).list"
+"();\n"
+"    if (result.size() > 0) {\n"
+"        out.println(\"<h2>Events in database:</h2>\");\n"
+"        out.println(\"<table border='1'>\");\n"
+"        out.println(\"<tr>\");\n"
+"        out.println(\"<th>Event title</th>\");\n"
+"        out.println(\"<th>Event date</th>\");\n"
+"        out.println(\"</tr>\");\n"
+"        for (Iterator it = result.iterator(); it.hasNext();) {\n"
+"            Event event = (Event) it.next();\n"
+"            out.println(\"<tr>\");\n"
+"            out.println(\"<td>\" + event.getTitle() + \"</td>\");\n"
+"            out.println(\"<td>\" + dateFormatter.format(event.getDate()) + "
+"\"</td>\");\n"
+"            out.println(\"</tr>\");\n"
+"        }\n"
+"        out.println(\"</table>\");\n"
+"    }\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:932
-msgid "Finally, the <literal>store</literal> action is dispatched to the <literal>createAndStoreEvent()</literal> method, which also uses the <literal>Session</literal> of the current thread:"
+#. Tag: para
+#: tutorial.xml:932
+#, no-c-format
+msgid ""
+"Finally, the <literal>store</literal> action is dispatched to the "
+"<literal>createAndStoreEvent()</literal> method, which also uses the "
+"<literal>Session</literal> of the current thread:"
 msgstr ""
+"最后,<literal>store</literal>动作会被导向到<literal>createAndStoreEvent()</"
+"literal>方法,它也使用当前线程的<literal>Session</literal>:"
 
-#: index.docbook:938
+#. Tag: programlisting
+#: tutorial.xml:938
+#, no-c-format
 msgid ""
-      "<![CDATA[protected void createAndStoreEvent(String title, Date theDate) {\n"
-      "    Event theEvent = new Event();\n"
-      "    theEvent.setTitle(title);\n"
-      "    theEvent.setDate(theDate);\n"
-      "\n"
-      "    HibernateUtil.getSessionFactory()\n"
-      "                    .getCurrentSession().save(theEvent);\n"
-      "}]]>"
+"<![CDATA[protected void createAndStoreEvent(String title, Date theDate) {\n"
+"    Event theEvent = new Event();\n"
+"    theEvent.setTitle(title);\n"
+"    theEvent.setDate(theDate);\n"
+"\n"
+"    HibernateUtil.getSessionFactory()\n"
+"                    .getCurrentSession().save(theEvent);\n"
+"}]]>"
 msgstr ""
 
-#: index.docbook:940
-msgid "That's it, the servlet is complete. A request to the servlet will be processed in a single <literal>Session</literal> and <literal>Transaction</literal>. As earlier in the standalone application, Hibernate can automatically bind these ojects to the current thread of execution. This gives you the freedom to layer your code and access the <literal>SessionFactory</literal> in any way you like. Usually you'd use a more sophisticated design and move the data access code into data access objects (the DAO pattern). See the Hibernate Wiki for more examples."
+#. Tag: para
+#: tutorial.xml:940
+#, no-c-format
+msgid ""
+"That's it, the servlet is complete. A request to the servlet will be "
+"processed in a single <literal>Session</literal> and <literal>Transaction</"
+"literal>. As earlier in the standalone application, Hibernate can "
+"automatically bind these ojects to the current thread of execution. This "
+"gives you the freedom to layer your code and access the "
+"<literal>SessionFactory</literal> in any way you like. Usually you'd use a "
+"more sophisticated design and move the data access code into data access "
+"objects (the DAO pattern). See the Hibernate Wiki for more examples."
 msgstr ""
+"大功告成,这个servlet写完了。Hibernate会在单一的<literal>Session</literal> 和"
+"<literal>Transaction</literal>中处理到达的servlet请求。如同在前面的独立应用程"
+"序中那样,Hibernate可以自动的把这些对象绑定到当前运行的线程中。这给了你用任何"
+"你喜欢的方式来对代码分层及访问<literal>SessionFactory</literal>的自由。通常,"
+"你会用更加完备的设计,把数据访问代码转移到数据访问对象中(DAO模式)。请参见"
+"Hibernate Wiki,那里有更多的例子。"
 
-#: index.docbook:954
+#. Tag: title
+#: tutorial.xml:954
+#, no-c-format
 msgid "Deploying and testing"
-msgstr ""
+msgstr "部署与测试"
 
-#: index.docbook:956
-msgid "To deploy this application you have to create a web archive, a WAR. Add the following Ant target to your <literal>build.xml</literal>:"
+#. Tag: para
+#: tutorial.xml:956
+#, no-c-format
+msgid ""
+"To deploy this application you have to create a web archive, a WAR. Add the "
+"following Ant target to your <literal>build.xml</literal>:"
 msgstr ""
+"要发布这个程序,你得把它打成web发布包:WAR文件。把下面的脚本加入到你的"
+"<literal>build.xml</literal>中:"
 
-#: index.docbook:961
+#. Tag: programlisting
+#: tutorial.xml:961
+#, no-c-format
 msgid ""
-      "<![CDATA[<target name=\"war\" depends=\"compile\">\n"
-      "    <war destfile=\"hibernate-tutorial.war\" webxml=\"web.xml\">\n"
-      "        <lib dir=\"${librarydir}\">\n"
-      "          <exclude name=\"jsdk*.jar\"/>\n"
-      "        </lib>\n"
-      "\n"
-      "        <classes dir=\"${targetdir}\"/>\n"
-      "    </war>\n"
-      "</target>]]>"
+"<![CDATA[<target name=\"war\" depends=\"compile\">\n"
+"    <war destfile=\"hibernate-tutorial.war\" webxml=\"web.xml\">\n"
+"        <lib dir=\"${librarydir}\">\n"
+"          <exclude name=\"jsdk*.jar\"/>\n"
+"        </lib>\n"
+"\n"
+"        <classes dir=\"${targetdir}\"/>\n"
+"    </war>\n"
+"</target>]]>"
 msgstr ""
 
-#: index.docbook:963
-msgid "This target creates a file called <literal>hibernate-tutorial.war</literal> in your project directory. It packages all libraries and the <literal>web.xml</literal> descriptor, which is expected in the base directory of your project:"
+#. Tag: para
+#: tutorial.xml:963
+#, no-c-format
+msgid ""
+"This target creates a file called <literal>hibernate-tutorial.war</literal> "
+"in your project directory. It packages all libraries and the <literal>web."
+"xml</literal> descriptor, which is expected in the base directory of your "
+"project:"
 msgstr ""
+"这段代码在你的开发目录中创建一个<literal>hibernate-tutorial.war</literal>的文"
+"件。它把所有的类库和<literal>web.xml</literal>描述文件都打包进去,web.xml 文"
+"件应该位于你的开发根目录中:"
 
-#: index.docbook:969
+#. Tag: programlisting
+#: tutorial.xml:969
+#, no-c-format
 msgid ""
-      "<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
-      "<web-app version=\"2.4\"\n"
-      "    xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n"
-      "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-      "    xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\">\n"
-      "\n"
-      "    <servlet>\n"
-      "        <servlet-name>Event Manager</servlet-name>\n"
-      "        <servlet-class>events.EventManagerServlet</servlet-class>\n"
-      "    </servlet>\n"
-      "\n"
-      "    <servlet-mapping>\n"
-      "        <servlet-name>Event Manager</servlet-name>\n"
-      "        <url-pattern>/eventmanager</url-pattern>\n"
-      "    </servlet-mapping>\n"
-      "</web-app>]]>"
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<web-app version=\"2.4\"\n"
+"    xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n"
+"    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"    xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee http://java.sun.com/"
+"xml/ns/j2ee/web-app_2_4.xsd\">\n"
+"\n"
+"    <servlet>\n"
+"        <servlet-name>Event Manager</servlet-name>\n"
+"        <servlet-class>events.EventManagerServlet</servlet-class>\n"
+"    </servlet>\n"
+"\n"
+"    <servlet-mapping>\n"
+"        <servlet-name>Event Manager</servlet-name>\n"
+"        <url-pattern>/eventmanager</url-pattern>\n"
+"    </servlet-mapping>\n"
+"</web-app>]]>"
 msgstr ""
 
-#: index.docbook:971
-msgid "Before you compile and deploy the web application, note that an additional library is required: <literal>jsdk.jar</literal>. This is the Java servlet development kit, if you don't have this library already, get it from the Sun website and copy it to your library directory. However, it will be only used for compliation and excluded from the WAR package."
+#. Tag: para
+#: tutorial.xml:971
+#, no-c-format
+msgid ""
+"Before you compile and deploy the web application, note that an additional "
+"library is required: <literal>jsdk.jar</literal>. This is the Java servlet "
+"development kit, if you don't have this library already, get it from the Sun "
+"website and copy it to your library directory. However, it will be only used "
+"for compliation and excluded from the WAR package."
 msgstr ""
+"请注意在你编译和部署web应用程之前,需要一个附加的类库:<literal>jsdk.jar</"
+"literal>。这是Java Servlet开发包,假若你还没有,可以从Sun网站上下载,把它copy"
+"到你的lib目录。但是,它仅仅是在编译时需要,不会被打入WAR包。"
 
-#: index.docbook:979
-msgid "To build and deploy call <literal>ant war</literal> in your project directory and copy the <literal>hibernate-tutorial.war</literal> file into your Tomcat <literal>webapp</literal> directory. If you don't have Tomcat installed, download it and follow the installation instructions. You don't have to change any Tomcat configuration to deploy this application though."
+#. Tag: para
+#: tutorial.xml:979
+#, no-c-format
+msgid ""
+"To build and deploy call <literal>ant war</literal> in your project "
+"directory and copy the <literal>hibernate-tutorial.war</literal> file into "
+"your Tomcat <literal>webapp</literal> directory. If you don't have Tomcat "
+"installed, download it and follow the installation instructions. You don't "
+"have to change any Tomcat configuration to deploy this application though."
 msgstr ""
+"在你的开发目录中,调用<literal>ant war</literal>来构建、打包,然后把"
+"<literal>hibernate-tutorial.war</literal>文件拷贝到你的tomcat的"
+"<literal>webapps</literal>目录下。假若你还没安装Tomcat,就去下载一个,按照指"
+"南来安装。对此应用的发布,你不需要修改任何Tomcat的配置。"
 
-#: index.docbook:987
-msgid "Once deployed and Tomcat is running, access the application at <literal>http://localhost:8080/hibernate-tutorial/eventmanager</literal>. Make sure you watch the Tomcat log to see Hibernate initialize when the first request hits your servlet (the static initializer in <literal>HibernateUtil</literal> is called) and to get the detailed output if any exceptions occurs."
+#. Tag: para
+#: tutorial.xml:987
+#, no-c-format
+msgid ""
+"Once deployed and Tomcat is running, access the application at "
+"<literal>http://localhost:8080/hibernate-tutorial/eventmanager</literal>. "
+"Make sure you watch the Tomcat log to see Hibernate initialize when the "
+"first request hits your servlet (the static initializer in "
+"<literal>HibernateUtil</literal> is called) and to get the detailed output "
+"if any exceptions occurs."
 msgstr ""
+"在部署完,启动Tomcat之后,通过<literal>http://localhost:8080/hibernate-"
+"tutorial/eventmanager</literal>进行访问你的应用,在第一次servlet 请求发生时,"
+"请在Tomcat log中确认你看到Hibernate被初始化了(<literal>HibernateUtil</"
+"literal>的静态初始化器被调用),假若有任何异常抛出,也可以看到详细的输出。"
 
-#: index.docbook:1000
+#. Tag: title
+#: tutorial.xml:1000
+#, no-c-format
 msgid "Summary"
-msgstr ""
+msgstr "总结"
 
-#: index.docbook:1002
-msgid "This tutorial covered the basics of writing a simple standalone Hibernate application and a small web application."
+#. Tag: para
+#: tutorial.xml:1002
+#, no-c-format
+msgid ""
+"This tutorial covered the basics of writing a simple standalone Hibernate "
+"application and a small web application."
 msgstr ""
+"本章覆盖了如何编写一个简单独立的Hibernate命令行应用程序及小型的Hibernate web"
+"应用程序的基本要素。"
 
-#: index.docbook:1007
-msgid "If you already feel confident with Hibernate, continue browsing through the reference documentation table of contents for topics you find interesting - most asked are transactional processing (<xref linkend=\"transactions\"/>), fetch performance (<xref linkend=\"performance\"/>), or the usage of the API (<xref linkend=\"objectstate\"/>) and the query features (<xref linkend=\"objectstate-querying\"/>)."
+#. Tag: para
+#: tutorial.xml:1007
+#, no-c-format
+msgid ""
+"If you already feel confident with Hibernate, continue browsing through the "
+"reference documentation table of contents for topics you find interesting - "
+"most asked are transactional processing (<xref linkend=\"transactions\"/>), "
+"fetch performance (<xref linkend=\"performance\"/>), or the usage of the API "
+"(<xref linkend=\"objectstate\"/>) and the query features (<xref linkend="
+"\"objectstate-querying\"/>)."
 msgstr ""
+"如果你已经对Hibernate感到自信,通过开发指南目录,继续浏览你感兴趣的内容-那些"
+"会被问到的问题大多是事务处理 (<xref linkend=\"transactions\"/>),抓取"
+"(fetch)的效率 (<xref linkend=\"performance\"/>),或者API的使用 (<xref "
+"linkend=\"objectstate\"/>)和查询的特性(<xref linkend=\"objectstate-querying"
+"\"/>)。"
 
-#: index.docbook:1015
-msgid "Don't forget to check the Hibernate website for more (specialized) tutorials."
-msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+#. Tag: para
+#: tutorial.xml:1015
+#, no-c-format
+msgid ""
+"Don't forget to check the Hibernate website for more (specialized) tutorials."
+msgstr "别忘了去Hibernate的网站查看更多(有针对性的)示例。"

Modified: core/trunk/documentation/manual/translations/zh-CN/content/xml.po
===================================================================
--- core/trunk/documentation/manual/translations/zh-CN/content/xml.po	2007-10-26 00:57:21 UTC (rev 14137)
+++ core/trunk/documentation/manual/translations/zh-CN/content/xml.po	2007-10-26 01:01:14 UTC (rev 14138)
@@ -1,284 +1,433 @@
-#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2007-10-25 01:01+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-#: index.docbook:5
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: xml.xml:5
+#, no-c-format
 msgid "XML Mapping"
-msgstr ""
+msgstr "XML映射"
 
-#: index.docbook:7
-msgid "Note that this is an experimental feature in Hibernate 3.0 and is under extremely active development."
-msgstr ""
+#. Tag: emphasis
+#: xml.xml:7
+#, no-c-format
+msgid ""
+"Note that this is an experimental feature in Hibernate 3.0 and is under "
+"extremely active development."
+msgstr "注意这是Hibernate 3.0的一个实验性的特性。这一特性仍在积极开发中。"
 
-#: index.docbook:13
+#. Tag: title
+#: xml.xml:13
+#, no-c-format
 msgid "Working with XML data"
-msgstr ""
+msgstr "用XML数据进行工作"
 
-#: index.docbook:15
-msgid "Hibernate lets you work with persistent XML data in much the same way you work with persistent POJOs. A parsed XML tree can be thought of as just another way to represent the relational data at the object level, instead of POJOs."
+#. Tag: para
+#: xml.xml:15
+#, no-c-format
+msgid ""
+"Hibernate lets you work with persistent XML data in much the same way you "
+"work with persistent POJOs. A parsed XML tree can be thought of as just "
+"another way to represent the relational data at the object level, instead of "
+"POJOs."
 msgstr ""
+"Hibernate使得你可以用XML数据来进行工作,恰如你用持久化的POJO进行工作那样。解"
+"析过的XML树 可以被认为是代替POJO的另外一种在对象层面上表示关系型数据的途径."
 
-#: index.docbook:22
-msgid "Hibernate supports dom4j as API for manipulating XML trees. You can write queries that retrieve dom4j trees from the database and have any modification you make to the tree automatically synchronized to the database. You can even take an XML document, parse it using dom4j, and write it to the database with any of Hibernate's basic operations: <literal>persist(), saveOrUpdate(), merge(), delete(), replicate()</literal> (merging is not yet supported)."
+#. Tag: para
+#: xml.xml:22
+#, no-c-format
+msgid ""
+"Hibernate supports dom4j as API for manipulating XML trees. You can write "
+"queries that retrieve dom4j trees from the database and have any "
+"modification you make to the tree automatically synchronized to the "
+"database. You can even take an XML document, parse it using dom4j, and write "
+"it to the database with any of Hibernate's basic operations: <literal>persist"
+"(), saveOrUpdate(), merge(), delete(), replicate()</literal> (merging is not "
+"yet supported)."
 msgstr ""
+"Hibernate支持采用dom4j作为操作XML树的API。你可以写一些查询从数据库中检索出 "
+"dom4j树,随后你对这颗树做的任何修改都将自动同步回数据库。你甚至可以用dom4j解"
+"析 一篇XML文档,然后使用Hibernate的任一基本操作将它写入数据库: "
+"<literal>persist(), saveOrUpdate(), merge(), delete(), replicate()</literal> "
+"(合并操作merge()目前还不支持)。"
 
-#: index.docbook:32
-msgid "This feature has many applications including data import/export, externalization of entity data via JMS or SOAP and XSLT-based reporting."
+#. Tag: para
+#: xml.xml:32
+#, no-c-format
+msgid ""
+"This feature has many applications including data import/export, "
+"externalization of entity data via JMS or SOAP and XSLT-based reporting."
 msgstr ""
+"这一特性可以应用在很多场合,包括数据导入导出,通过JMS或SOAP具体化实体数据以"
+"及 基于XSLT的报表。"
 
-#: index.docbook:37
-msgid "A single mapping may be used to simultaneously map properties of a class and nodes of an XML document to the database, or, if there is no class to map, it may be used to map just the XML."
+#. Tag: para
+#: xml.xml:37
+#, no-c-format
+msgid ""
+"A single mapping may be used to simultaneously map properties of a class and "
+"nodes of an XML document to the database, or, if there is no class to map, "
+"it may be used to map just the XML."
 msgstr ""
+"一个单一的映射就可以将类的属性和XML文档的节点同时映射到数据库。如果不需要映射"
+"类, 它也可以用来只映射XML文档。"
 
-#: index.docbook:44
+#. Tag: title
+#: xml.xml:44
+#, no-c-format
 msgid "Specifying XML and class mapping together"
-msgstr ""
+msgstr "指定同时映射XML和类"
 
-#: index.docbook:46
+#. Tag: para
+#: xml.xml:46
+#, no-c-format
 msgid "Here is an example of mapping a POJO and XML simultaneously:"
-msgstr ""
+msgstr "这是一个同时映射POJO和XML的例子:"
 
-#: index.docbook:50
+#. Tag: programlisting
+#: xml.xml:50
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Account\" \n"
-      "        table=\"ACCOUNTS\" \n"
-      "        node=\"account\">\n"
-      "        \n"
-      "    <id name=\"accountId\" \n"
-      "            column=\"ACCOUNT_ID\" \n"
-      "            node=\"@id\"/>\n"
-      "            \n"
-      "    <many-to-one name=\"customer\" \n"
-      "            column=\"CUSTOMER_ID\" \n"
-      "            node=\"customer/@id\" \n"
-      "            embed-xml=\"false\"/>\n"
-      "            \n"
-      "    <property name=\"balance\" \n"
-      "            column=\"BALANCE\" \n"
-      "            node=\"balance\"/>\n"
-      "            \n"
-      "    ...\n"
-      "    \n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Account\" \n"
+"        table=\"ACCOUNTS\" \n"
+"        node=\"account\">\n"
+"        \n"
+"    <id name=\"accountId\" \n"
+"            column=\"ACCOUNT_ID\" \n"
+"            node=\"@id\"/>\n"
+"            \n"
+"    <many-to-one name=\"customer\" \n"
+"            column=\"CUSTOMER_ID\" \n"
+"            node=\"customer/@id\" \n"
+"            embed-xml=\"false\"/>\n"
+"            \n"
+"    <property name=\"balance\" \n"
+"            column=\"BALANCE\" \n"
+"            node=\"balance\"/>\n"
+"            \n"
+"    ...\n"
+"    \n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:54
+#. Tag: title
+#: xml.xml:54
+#, no-c-format
 msgid "Specifying only an XML mapping"
-msgstr ""
+msgstr "只定义XML映射"
 
-#: index.docbook:56
+#. Tag: para
+#: xml.xml:56
+#, no-c-format
 msgid "Here is an example where there is no POJO class:"
-msgstr ""
+msgstr "这是一个不映射POJO的例子:"
 
-#: index.docbook:60
+#. Tag: programlisting
+#: xml.xml:60
+#, no-c-format
 msgid ""
-      "<![CDATA[<class entity-name=\"Account\" \n"
-      "        table=\"ACCOUNTS\" \n"
-      "        node=\"account\">\n"
-      "        \n"
-      "    <id name=\"id\" \n"
-      "            column=\"ACCOUNT_ID\" \n"
-      "            node=\"@id\" \n"
-      "            type=\"string\"/>\n"
-      "            \n"
-      "    <many-to-one name=\"customerId\" \n"
-      "            column=\"CUSTOMER_ID\" \n"
-      "            node=\"customer/@id\" \n"
-      "            embed-xml=\"false\" \n"
-      "            entity-name=\"Customer\"/>\n"
-      "            \n"
-      "    <property name=\"balance\" \n"
-      "            column=\"BALANCE\" \n"
-      "            node=\"balance\" \n"
-      "            type=\"big_decimal\"/>\n"
-      "            \n"
-      "    ...\n"
-      "    \n"
-      "</class>]]>"
+"<![CDATA[<class entity-name=\"Account\" \n"
+"        table=\"ACCOUNTS\" \n"
+"        node=\"account\">\n"
+"        \n"
+"    <id name=\"id\" \n"
+"            column=\"ACCOUNT_ID\" \n"
+"            node=\"@id\" \n"
+"            type=\"string\"/>\n"
+"            \n"
+"    <many-to-one name=\"customerId\" \n"
+"            column=\"CUSTOMER_ID\" \n"
+"            node=\"customer/@id\" \n"
+"            embed-xml=\"false\" \n"
+"            entity-name=\"Customer\"/>\n"
+"            \n"
+"    <property name=\"balance\" \n"
+"            column=\"BALANCE\" \n"
+"            node=\"balance\" \n"
+"            type=\"big_decimal\"/>\n"
+"            \n"
+"    ...\n"
+"    \n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:62
-msgid "This mapping allows you to access the data as a dom4j tree, or as a graph of property name/value pairs (java <literal>Map</literal>s). The property names are purely logical constructs that may be referred to in HQL queries."
+#. Tag: para
+#: xml.xml:62
+#, no-c-format
+msgid ""
+"This mapping allows you to access the data as a dom4j tree, or as a graph of "
+"property name/value pairs (java <literal>Map</literal>s). The property names "
+"are purely logical constructs that may be referred to in HQL queries."
 msgstr ""
+"这个映射使得你既可以把数据作为一棵dom4j树那样访问,又可以作为由属性键值对"
+"(java <literal>Map</literal>s) 组成的图那样访问。属性名字纯粹是逻辑上的结构,"
+"你可以在HQL查询中引用它。"
 
-#: index.docbook:73
+#. Tag: title
+#: xml.xml:73
+#, no-c-format
 msgid "XML mapping metadata"
-msgstr ""
+msgstr "XML映射元数据"
 
-#: index.docbook:75
-msgid "Many Hibernate mapping elements accept the <literal>node</literal> attribute. This let's you specify the name of an XML attribute or element that holds the property or entity data. The format of the <literal>node</literal> attribute must be one of the following:"
+#. Tag: para
+#: xml.xml:75
+#, no-c-format
+msgid ""
+"Many Hibernate mapping elements accept the <literal>node</literal> "
+"attribute. This let's you specify the name of an XML attribute or element "
+"that holds the property or entity data. The format of the <literal>node</"
+"literal> attribute must be one of the following:"
 msgstr ""
+"许多Hibernate映射元素具有<literal>node</literal>属性。这使你可以指定用来保存 "
+"属性或实体数据的XML属性或元素。<literal>node</literal>属性必须是下列格式之"
+"一:"
 
-#: index.docbook:84
+#. Tag: para
+#: xml.xml:84
+#, no-c-format
 msgid "<literal>\"element-name\"</literal> - map to the named XML element"
-msgstr ""
+msgstr "<literal>\"element-name\"</literal> - 映射为指定的XML元素"
 
-#: index.docbook:87
+#. Tag: para
+#: xml.xml:87
+#, no-c-format
 msgid "<literal>\"@attribute-name\"</literal> - map to the named XML attribute"
-msgstr ""
+msgstr "<literal>\"@attribute-name\"</literal> - 映射为指定的XML属性"
 
-#: index.docbook:90
+#. Tag: para
+#: xml.xml:90
+#, no-c-format
 msgid "<literal>\".\"</literal> - map to the parent element"
-msgstr ""
+msgstr "<literal>\".\"</literal> - 映射为父元素"
 
-#: index.docbook:93
-msgid "<literal>\"element-name/@attribute-name\"</literal> - map to the named attribute of the named element"
+#. Tag: para
+#: xml.xml:93
+#, no-c-format
+msgid ""
+"<literal>\"element-name/@attribute-name\"</literal> - map to the named "
+"attribute of the named element"
 msgstr ""
+"<literal>\"element-name/@attribute-name\"</literal> - 映射为指定元素的指定属"
+"性"
 
-#: index.docbook:100
-msgid "For collections and single valued associations, there is an additional <literal>embed-xml</literal> attribute. If <literal>embed-xml=\"true\"</literal>, the default, the XML tree for the associated entity (or collection of value type) will be embedded directly in the XML tree for the entity that owns the association. Otherwise, if <literal>embed-xml=\"false\"</literal>, then only the referenced identifier value will appear in the XML for single point associations and collections will simply not appear at all."
+#. Tag: para
+#: xml.xml:100
+#, no-c-format
+msgid ""
+"For collections and single valued associations, there is an additional "
+"<literal>embed-xml</literal> attribute. If <literal>embed-xml=\"true\"</"
+"literal>, the default, the XML tree for the associated entity (or collection "
+"of value type) will be embedded directly in the XML tree for the entity that "
+"owns the association. Otherwise, if <literal>embed-xml=\"false\"</literal>, "
+"then only the referenced identifier value will appear in the XML for single "
+"point associations and collections will simply not appear at all."
 msgstr ""
+"对于集合和单值的关联,有一个额外的<literal>embed-xml</literal>属性可用。 这个"
+"属性的缺省值是真(<literal>embed-xml=\"true\"</literal>)。如果<literal>embed-"
+"xml=\"true\"</literal>, 则对应于被关联实体或值类型的集合的XML树将直接嵌入拥"
+"有这些关联的实体的XML树中。 否则,如果<literal>embed-xml=\"false\"</"
+"literal>,那么对于单值的关联,仅被引用的实体的标识符出现在 XML树中(被引用实体"
+"本身不出现),而集合则根本不出现。"
 
-#: index.docbook:110
-msgid "You should be careful not to leave <literal>embed-xml=\"true\"</literal> for too many associations, since XML does not deal well with circularity!"
+#. Tag: para
+#: xml.xml:110
+#, no-c-format
+msgid ""
+"You should be careful not to leave <literal>embed-xml=\"true\"</literal> for "
+"too many associations, since XML does not deal well with circularity!"
 msgstr ""
+"你应该小心,不要让太多关联的embed-xml属性为真(<literal>embed-xml=\"true\"</"
+"literal>),因为XML不能很好地处理 循环引用!"
 
-#: index.docbook:115
+#. Tag: programlisting
+#: xml.xml:115
+#, no-c-format
 msgid ""
-      "<![CDATA[<class name=\"Customer\" \n"
-      "        table=\"CUSTOMER\" \n"
-      "        node=\"customer\">\n"
-      "        \n"
-      "    <id name=\"id\" \n"
-      "            column=\"CUST_ID\" \n"
-      "            node=\"@id\"/>\n"
-      "            \n"
-      "    <map name=\"accounts\" \n"
-      "            node=\".\" \n"
-      "            embed-xml=\"true\">\n"
-      "        <key column=\"CUSTOMER_ID\" \n"
-      "                not-null=\"true\"/>\n"
-      "        <map-key column=\"SHORT_DESC\" \n"
-      "                node=\"@short-desc\" \n"
-      "                type=\"string\"/>\n"
-      "        <one-to-many entity-name=\"Account\"\n"
-      "                embed-xml=\"false\" \n"
-      "                node=\"account\"/>\n"
-      "    </map>\n"
-      "    \n"
-      "    <component name=\"name\" \n"
-      "            node=\"name\">\n"
-      "        <property name=\"firstName\" \n"
-      "                node=\"first-name\"/>\n"
-      "        <property name=\"initial\" \n"
-      "                node=\"initial\"/>\n"
-      "        <property name=\"lastName\" \n"
-      "                node=\"last-name\"/>\n"
-      "    </component>\n"
-      "    \n"
-      "    ...\n"
-      "    \n"
-      "</class>]]>"
+"<![CDATA[<class name=\"Customer\" \n"
+"        table=\"CUSTOMER\" \n"
+"        node=\"customer\">\n"
+"        \n"
+"    <id name=\"id\" \n"
+"            column=\"CUST_ID\" \n"
+"            node=\"@id\"/>\n"
+"            \n"
+"    <map name=\"accounts\" \n"
+"            node=\".\" \n"
+"            embed-xml=\"true\">\n"
+"        <key column=\"CUSTOMER_ID\" \n"
+"                not-null=\"true\"/>\n"
+"        <map-key column=\"SHORT_DESC\" \n"
+"                node=\"@short-desc\" \n"
+"                type=\"string\"/>\n"
+"        <one-to-many entity-name=\"Account\"\n"
+"                embed-xml=\"false\" \n"
+"                node=\"account\"/>\n"
+"    </map>\n"
+"    \n"
+"    <component name=\"name\" \n"
+"            node=\"name\">\n"
+"        <property name=\"firstName\" \n"
+"                node=\"first-name\"/>\n"
+"        <property name=\"initial\" \n"
+"                node=\"initial\"/>\n"
+"        <property name=\"lastName\" \n"
+"                node=\"last-name\"/>\n"
+"    </component>\n"
+"    \n"
+"    ...\n"
+"    \n"
+"</class>]]>"
 msgstr ""
 
-#: index.docbook:117
-msgid "in this case, we have decided to embed the collection of account ids, but not the actual account data. The following HQL query:"
+#. Tag: para
+#: xml.xml:117
+#, no-c-format
+msgid ""
+"in this case, we have decided to embed the collection of account ids, but "
+"not the actual account data. The following HQL query:"
 msgstr ""
+"在这个例子中,我们决定嵌入帐目号码(account id)的集合,但不嵌入实际的帐目数"
+"据。下面的HQL查询:"
 
-#: index.docbook:122
-msgid "<![CDATA[from Customer c left join fetch c.accounts where c.lastName like :lastName]]>"
+#. Tag: programlisting
+#: xml.xml:122
+#, no-c-format
+msgid ""
+"<![CDATA[from Customer c left join fetch c.accounts where c.lastName like :"
+"lastName]]>"
 msgstr ""
 
-#: index.docbook:124
+#. Tag: para
+#: xml.xml:124
+#, no-c-format
 msgid "Would return datasets such as this:"
-msgstr ""
+msgstr "返回的数据集将是这样:"
 
-#: index.docbook:128
+#. Tag: programlisting
+#: xml.xml:128
+#, no-c-format
 msgid ""
-      "<![CDATA[<customer id=\"123456789\">\n"
-      "    <account short-desc=\"Savings\">987632567</account>\n"
-      "    <account short-desc=\"Credit Card\">985612323</account>\n"
-      "    <name>\n"
-      "        <first-name>Gavin</first-name>\n"
-      "        <initial>A</initial>\n"
-      "        <last-name>King</last-name>\n"
-      "    </name>\n"
-      "    ...\n"
-      "</customer>]]>"
+"<![CDATA[<customer id=\"123456789\">\n"
+"    <account short-desc=\"Savings\">987632567</account>\n"
+"    <account short-desc=\"Credit Card\">985612323</account>\n"
+"    <name>\n"
+"        <first-name>Gavin</first-name>\n"
+"        <initial>A</initial>\n"
+"        <last-name>King</last-name>\n"
+"    </name>\n"
+"    ...\n"
+"</customer>]]>"
 msgstr ""
 
-#: index.docbook:130
-msgid "If you set <literal>embed-xml=\"true\"</literal> on the <literal>&lt;one-to-many&gt;</literal> mapping, the data might look more like this:"
+#. Tag: para
+#: xml.xml:130
+#, no-c-format
+msgid ""
+"If you set <literal>embed-xml=\"true\"</literal> on the <literal>&lt;one-to-"
+"many&gt;</literal> mapping, the data might look more like this:"
 msgstr ""
+"如果你把一对多映射<literal>&lt;one-to-many&gt;</literal>的embed-xml属性置为真"
+"(<literal>embed-xml=\"true\"</literal>), 则数据看上去就像这样:"
 
-#: index.docbook:135
+#. Tag: programlisting
+#: xml.xml:135
+#, no-c-format
 msgid ""
-      "<![CDATA[<customer id=\"123456789\">\n"
-      "    <account id=\"987632567\" short-desc=\"Savings\">\n"
-      "        <customer id=\"123456789\"/>\n"
-      "        <balance>100.29</balance>\n"
-      "    </account>\n"
-      "    <account id=\"985612323\" short-desc=\"Credit Card\">\n"
-      "        <customer id=\"123456789\"/>\n"
-      "        <balance>-2370.34</balance>\n"
-      "    </account>\n"
-      "    <name>\n"
-      "        <first-name>Gavin</first-name>\n"
-      "        <initial>A</initial>\n"
-      "        <last-name>King</last-name>\n"
-      "    </name>\n"
-      "    ...\n"
-      "</customer>]]>"
+"<![CDATA[<customer id=\"123456789\">\n"
+"    <account id=\"987632567\" short-desc=\"Savings\">\n"
+"        <customer id=\"123456789\"/>\n"
+"        <balance>100.29</balance>\n"
+"    </account>\n"
+"    <account id=\"985612323\" short-desc=\"Credit Card\">\n"
+"        <customer id=\"123456789\"/>\n"
+"        <balance>-2370.34</balance>\n"
+"    </account>\n"
+"    <name>\n"
+"        <first-name>Gavin</first-name>\n"
+"        <initial>A</initial>\n"
+"        <last-name>King</last-name>\n"
+"    </name>\n"
+"    ...\n"
+"</customer>]]>"
 msgstr ""
 
-#: index.docbook:141
+#. Tag: title
+#: xml.xml:141
+#, no-c-format
 msgid "Manipulating XML data"
-msgstr ""
+msgstr "操作XML数据"
 
-#: index.docbook:143
-msgid "Let's rearead and update XML documents in the application. We do this by obtaining a dom4j session:"
+#. Tag: para
+#: xml.xml:143
+#, no-c-format
+msgid ""
+"Let's rearead and update XML documents in the application. We do this by "
+"obtaining a dom4j session:"
 msgstr ""
+"让我们来读入和更新应用程序中的XML文档。通过获取一个dom4j会话可以做到这一点:"
 
-#: index.docbook:148
+#. Tag: programlisting
+#: xml.xml:148
+#, no-c-format
 msgid ""
-      "<![CDATA[Document doc = ....;\n"
-      "       \n"
-      "Session session = factory.openSession();\n"
-      "Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
-      "Transaction tx = session.beginTransaction();\n"
-      "\n"
-      "List results = dom4jSession\n"
-      "    .createQuery(\"from Customer c left join fetch c.accounts where c.lastName like :lastName\")\n"
-      "    .list();\n"
-      "for ( int i=0; i<results.size(); i++ ) {\n"
-      "    //add the customer data to the XML document\n"
-      "    Element customer = (Element) results.get(i);\n"
-      "    doc.add(customer);\n"
-      "}\n"
-      "\n"
-      "tx.commit();\n"
-      "session.close();]]>"
+"<![CDATA[Document doc = ....;\n"
+"       \n"
+"Session session = factory.openSession();\n"
+"Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
+"Transaction tx = session.beginTransaction();\n"
+"\n"
+"List results = dom4jSession\n"
+"    .createQuery(\"from Customer c left join fetch c.accounts where c."
+"lastName like :lastName\")\n"
+"    .list();\n"
+"for ( int i=0; i<results.size(); i++ ) {\n"
+"    //add the customer data to the XML document\n"
+"    Element customer = (Element) results.get(i);\n"
+"    doc.add(customer);\n"
+"}\n"
+"\n"
+"tx.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:150
+#. Tag: programlisting
+#: xml.xml:150
+#, no-c-format
 msgid ""
-      "<![CDATA[Session session = factory.openSession();\n"
-      "Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
-      "Transaction tx = session.beginTransaction();\n"
-      "\n"
-      "Element cust = (Element) dom4jSession.get(\"Customer\", customerId);\n"
-      "for ( int i=0; i<results.size(); i++ ) {\n"
-      "    Element customer = (Element) results.get(i);\n"
-      "    //change the customer name in the XML and database\n"
-      "    Element name = customer.element(\"name\");\n"
-      "    name.element(\"first-name\").setText(firstName);\n"
-      "    name.element(\"initial\").setText(initial);\n"
-      "    name.element(\"last-name\").setText(lastName);\n"
-      "}\n"
-      "\n"
-      "tx.commit();\n"
-      "session.close();]]>"
+"<![CDATA[Session session = factory.openSession();\n"
+"Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
+"Transaction tx = session.beginTransaction();\n"
+"\n"
+"Element cust = (Element) dom4jSession.get(\"Customer\", customerId);\n"
+"for ( int i=0; i<results.size(); i++ ) {\n"
+"    Element customer = (Element) results.get(i);\n"
+"    //change the customer name in the XML and database\n"
+"    Element name = customer.element(\"name\");\n"
+"    name.element(\"first-name\").setText(firstName);\n"
+"    name.element(\"initial\").setText(initial);\n"
+"    name.element(\"last-name\").setText(lastName);\n"
+"}\n"
+"\n"
+"tx.commit();\n"
+"session.close();]]>"
 msgstr ""
 
-#: index.docbook:152
-msgid "It is extremely useful to combine this feature with Hibernate's <literal>replicate()</literal> operation to implement XML-based data import/export."
+#. Tag: para
+#: xml.xml:152
+#, no-c-format
+msgid ""
+"It is extremely useful to combine this feature with Hibernate's "
+"<literal>replicate()</literal> operation to implement XML-based data import/"
+"export."
 msgstr ""
-
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
+"将这一特色与Hibernate的<literal>replicate()</literal>操作结合起来对于实现的基"
+"于XML的数据导入/导出将非常有用."




More information about the hibernate-commits mailing list