diff --git a/documentation/manual/src/main/docbook/zh-CN/Book_Info.po b/documentation/manual/src/main/docbook/zh-CN/Book_Info.po index 94f3bea2cc..ebde2d58e0 100644 --- a/documentation/manual/src/main/docbook/zh-CN/Book_Info.po +++ b/documentation/manual/src/main/docbook/zh-CN/Book_Info.po @@ -5,24 +5,25 @@ msgid "" msgstr "" "Project-Id-Version: 0\n" "POT-Creation-Date: 2010-03-12T00:03:45\n" -"PO-Revision-Date: 2010-02-04T04:51:21\n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2010-03-15 08:44+1000\n" +"Last-Translator: Xi HUANG \n" "Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title #, no-c-format msgid "HIBERNATE - Relational Persistence for Idiomatic Java" -msgstr "" +msgstr "HIBERNATE - Relational Persistence for Idiomatic Java" #. Tag: subtitle #, no-c-format msgid "Hibernate Reference Documentation" -msgstr "" +msgstr "Hibernate Reference Documentation" #. Tag: releaseinfo #, no-c-format msgid "&version;" -msgstr "" +msgstr "&version;" + diff --git a/documentation/manual/src/main/docbook/zh-CN/Hibernate_Reference.po b/documentation/manual/src/main/docbook/zh-CN/Hibernate_Reference.po index ab31d4249e..0a41fff923 100644 --- a/documentation/manual/src/main/docbook/zh-CN/Hibernate_Reference.po +++ b/documentation/manual/src/main/docbook/zh-CN/Hibernate_Reference.po @@ -1,30 +1,30 @@ # SOME DESCRIPTIVE TITLE. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-02-11T05:38:14\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2010-03-15 08:45+1000\n" +"Last-Translator: Xi HUANG \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title #, no-c-format msgid "HIBERNATE - Relational Persistence for Idiomatic Java" -msgstr "" +msgstr "HIBERNATE - Relational Persistence for Idiomatic Java" #. Tag: subtitle #, no-c-format msgid "Hibernate Reference Documentation" -msgstr "" +msgstr "Hibernate Reference Documentation" #. Tag: releaseinfo #, no-c-format msgid "&versionNumber;" -msgstr "" +msgstr "&versionNumber;" + diff --git a/documentation/manual/src/main/docbook/zh-CN/author_group.po b/documentation/manual/src/main/docbook/zh-CN/author_group.po index 03b0980794..1e111318e2 100644 --- a/documentation/manual/src/main/docbook/zh-CN/author_group.po +++ b/documentation/manual/src/main/docbook/zh-CN/author_group.po @@ -6,8 +6,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-02-04T04:51:21\n" -"PO-Revision-Date: 2009-07-14 19:55+0000\n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2010-03-15 08:43+1000\n" +"Last-Translator: Xi HUANG \n" "Language-Team: none\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -16,134 +16,135 @@ msgstr "" #. Tag: firstname #, no-c-format msgid "Gavin" -msgstr "" +msgstr "Gavin" #. Tag: firstname #, no-c-format msgid "Christian" -msgstr "" +msgstr "Christian" #. Tag: firstname #, no-c-format msgid "Max" -msgstr "" +msgstr "Max" #. Tag: firstname #, no-c-format msgid "Emmanuel" -msgstr "" +msgstr "Emmanuel" #. Tag: firstname #, no-c-format msgid "Steve" -msgstr "" +msgstr "Steve" #. Tag: firstname #, no-c-format msgid "James" -msgstr "" +msgstr "James" #. Tag: firstname #, no-c-format msgid "Cheyenne" -msgstr "" +msgstr "Cheyenne" #. Tag: firstname #, no-c-format msgid "Vincent" -msgstr "" +msgstr "Vincent" #. Tag: firstname #, no-c-format msgid "Sebastien" -msgstr "" +msgstr "Sebastien" #. Tag: firstname #, no-c-format msgid "Michael" -msgstr "" +msgstr "Michael" #. Tag: firstname #, no-c-format msgid "Baptiste" -msgstr "" +msgstr "Baptiste" #. Tag: firstname #, no-c-format msgid "Anthony" -msgstr "" +msgstr "Anthony" #. Tag: firstname #, no-c-format msgid "Alvaro" -msgstr "" +msgstr "Alvaro" #. Tag: firstname #, no-c-format msgid "Anderson" -msgstr "" +msgstr "Anderson" #. Tag: firstname #, no-c-format msgid "Daniel Vieira" -msgstr "" +msgstr "Daniel Vieira" #. Tag: firstname #, no-c-format msgid "Francisco" -msgstr "" +msgstr "Francisco" #. Tag: firstname #, no-c-format msgid "Gamarra" -msgstr "" +msgstr "Gamarra" #. Tag: firstname #, no-c-format msgid "Luiz Carlos" -msgstr "" +msgstr "Luiz Carlos" #. Tag: firstname #, no-c-format msgid "Marcel" -msgstr "" +msgstr "Marcel" #. Tag: firstname #, no-c-format msgid "Paulo" -msgstr "" +msgstr "Paulo" #. Tag: firstname #, no-c-format msgid "Pablo L." -msgstr "" +msgstr "Pablo L." #. Tag: firstname #, no-c-format msgid "Renato" -msgstr "" +msgstr "Renato" #. Tag: firstname #, no-c-format msgid "Rogério" -msgstr "" +msgstr "Rogério" #. Tag: firstname #, no-c-format msgid "Wanderson" -msgstr "" +msgstr "Wanderson" #. Tag: firstname #, no-c-format msgid "Cao" -msgstr "" +msgstr "Cao" #. Tag: orgname #, no-c-format msgid "RedSaga" -msgstr "" +msgstr "RedSaga" #. Tag: contrib #, no-c-format msgid "Translation Lead" -msgstr "" +msgstr "Translation Lead" + diff --git a/documentation/manual/src/main/docbook/zh-CN/content/architecture.po b/documentation/manual/src/main/docbook/zh-CN/content/architecture.po index 2d054b4a1e..571df2b490 100644 --- a/documentation/manual/src/main/docbook/zh-CN/content/architecture.po +++ b/documentation/manual/src/main/docbook/zh-CN/content/architecture.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Collection_Mapping\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-03-12T00:03:45\n" -"PO-Revision-Date: 2010-01-11 10:12+1000\n" +"PO-Revision-Date: 2010-03-15 08:47+1000\n" "Last-Translator: Xi HUANG \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -26,50 +26,28 @@ msgstr "概况(Overview)" #. Tag: para #, no-c-format -msgid "" -"The diagram below provides a high-level view of the Hibernate architecture:" +msgid "The diagram below provides a high-level view of the Hibernate architecture:" msgstr "下面的图表提供了 Hibernate 体系结构的高层视图:" #. Tag: para #, no-c-format -msgid "" -"We do not have the scope in this document to provide a more detailed view of " -"all the runtime architectures available; Hibernate is flexible and supports " -"several different approaches. We will, however, show the two extremes: " -"\"minimal\" architecture and \"comprehensive\" architecture." -msgstr "" -"提供 Hibernate 所有运行时体系结构的更多细节不是本文档的范畴。由于 Hibernate " -"非常灵活,且支持多种应用方案, 所以我们这只描述一下两种极端的情况:“最" -"小”和“全面解决”的体系结构方案。" +msgid "We do not have the scope in this document to provide a more detailed view of all the runtime architectures available; Hibernate is flexible and supports several different approaches. We will, however, show the two extremes: \"minimal\" architecture and \"comprehensive\" architecture." +msgstr "提供 Hibernate 所有运行时体系结构的更多细节不是本文档的范畴。由于 Hibernate 非常灵活,且支持多种应用方案, 所以我们这只描述一下两种极端的情况:“最小”和“全面解决”的体系结构方案。" #. Tag: para #, no-c-format -msgid "" -"This next diagram illustrates how Hibernate utilizes database and " -"configuration data to provide persistence services, and persistent objects, " -"to the application." -msgstr "" -"下图演示了 Hibernate 如何使用数据库和配置信息来为应用程序提供持久化服务(以及" -"持久的对象)。" +msgid "This next diagram illustrates how Hibernate utilizes database and configuration data to provide persistence services, and persistent objects, to the application." +msgstr "下图演示了 Hibernate 如何使用数据库和配置信息来为应用程序提供持久化服务(以及持久的对象)。" #. Tag: para #, no-c-format -msgid "" -"The \"minimal\" 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 "" -"“最小”的体系结构方案,要求应用程序提供自己的 JDBC 连接并管理自己的事务。这种" -"方案使用了Hibernate API 的最小子集:" +msgid "The \"minimal\" 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 "“最小”的体系结构方案,要求应用程序提供自己的 JDBC 连接并管理自己的事务。这种方案使用了Hibernate API 的最小子集:" #. Tag: para #, no-c-format -msgid "" -"The \"comprehensive\" architecture abstracts the application away from the " -"underlying JDBC/JTA APIs and allows Hibernate to manage the details." -msgstr "" -"“全面解决”的体系结构方案,将应用层从底层的 JDBC/JTA API 中抽象出来,而让 " -"Hibernate 来处理这些细节。" +msgid "The \"comprehensive\" architecture abstracts the application away from the underlying JDBC/JTA APIs and allows Hibernate to manage the details." +msgstr "“全面解决”的体系结构方案,将应用层从底层的 JDBC/JTA API 中抽象出来,而让 Hibernate 来处理这些细节。" #. Tag: para #, no-c-format @@ -83,17 +61,8 @@ msgstr "SessionFactory (org.hibernate.SessionFactory)" #. Tag: para #, no-c-format -msgid "" -"A threadsafe, immutable cache of compiled mappings for a single database. A " -"factory for Session and a client of " -"ConnectionProvider, SessionFactory can " -"hold an optional (second-level) cache of data that is reusable between " -"transactions at a process, or cluster, level." -msgstr "" -"针对单个数据库映射关系经过编译后的内存镜像,是线程安全的(不可变)。 作为 " -"Session 的工厂和 ConnectionProvider 的" -"客户。SessionFactory 可以在进程或集群的级别上,为那些事务" -"之间可以重用的数据提供可选的二级缓存。" +msgid "A threadsafe, immutable cache of compiled mappings for a single database. A factory for Session and a client of ConnectionProvider, SessionFactory can hold an optional (second-level) cache of data that is reusable between transactions at a process, or cluster, level." +msgstr "针对单个数据库映射关系经过编译后的内存镜像,是线程安全的(不可变)。 作为 Session 的工厂和 ConnectionProvider 的客户。SessionFactory 可以在进程或集群的级别上,为那些事务之间可以重用的数据提供可选的二级缓存。" #. Tag: term #, no-c-format @@ -102,17 +71,8 @@ msgstr "Session (org.hibernate.Session)" #. Tag: para #, no-c-format -msgid "" -"A single-threaded, short-lived object representing a conversation between " -"the application and the persistent store. It wraps a JDBC connection and is " -"a factory for Transaction. Session " -"holds a mandatory first-level cache of persistent objects that are used when " -"navigating the object graph or looking up objects by identifier." -msgstr "" -"表示应用程序与持久储存层之间交互操作的一个单线程对象,此对象生存期很短。其隐" -"藏了 JDBC 连接,也是 Transaction 的工厂。它会持有一个针对" -"持久化对象的必选(第一级)缓存,在遍历对象图或者根据持久化标识查找对象时会用" -"到。" +msgid "A single-threaded, short-lived object representing a conversation between the application and the persistent store. It wraps a JDBC connection and is a factory for Transaction. Session holds a mandatory first-level cache of persistent objects that are used when navigating the object graph or looking up objects by identifier." +msgstr "表示应用程序与持久储存层之间交互操作的一个单线程对象,此对象生存期很短。其隐藏了 JDBC 连接,也是 Transaction 的工厂。它会持有一个针对持久化对象的必选(第一级)缓存,在遍历对象图或者根据持久化标识查找对象时会用到。" #. Tag: term #, no-c-format @@ -121,19 +81,8 @@ msgstr "持久的对象及其集合" #. Tag: para #, no-c-format -msgid "" -"Short-lived, single threaded objects containing persistent state and " -"business function. These can be ordinary JavaBeans/POJOs. They are " -"associated with exactly one Session. Once the " -"Session is closed, they will be detached and free to use " -"in any application layer (for example, directly as data transfer objects to " -"and from presentation)." -msgstr "" -"带有持久化状态的、具有业务功能的单线程对象,此对象生存期很短。这些对象可能是" -"普通的JavaBeans/POJO,唯一特殊的是他们正与(仅仅一个)Session 相关联。一旦这个 Session 被关闭,这些对象就会脱离" -"持久化状态,这样就可被应用程序的任何层自由使用(例如,用作跟表示层打交道的数" -"据传输对象)。" +msgid "Short-lived, single threaded objects containing persistent state and business function. These can be ordinary JavaBeans/POJOs. They are associated with exactly one Session. Once the Session is closed, they will be detached and free to use in any application layer (for example, directly as data transfer objects to and from presentation)." +msgstr "带有持久化状态的、具有业务功能的单线程对象,此对象生存期很短。这些对象可能是普通的JavaBeans/POJO,唯一特殊的是他们正与(仅仅一个)Session 相关联。一旦这个 Session 被关闭,这些对象就会脱离持久化状态,这样就可被应用程序的任何层自由使用(例如,用作跟表示层打交道的数据传输对象)。" #. Tag: term #, no-c-format @@ -142,15 +91,8 @@ msgstr "瞬态(transient)和脱管(detached)的对象及其集合" #. Tag: para #, no-c-format -msgid "" -"Instances of persistent classes that are not currently associated with a " -"Session. They may have been instantiated by the " -"application and not yet persisted, or they may have been instantiated by a " -"closed Session." -msgstr "" -"那些目前没有与 Session关联的持久化类实例。他们可能是在被应" -"用程序实例化后,尚未进行持久化的对象。也可能是因为实例化他们的 " -"Session 已经被关闭而脱离持久化的对象。" +msgid "Instances of persistent classes that are not currently associated with a Session. They may have been instantiated by the application and not yet persisted, or they may have been instantiated by a closed Session." +msgstr "那些目前没有与 Session关联的持久化类实例。他们可能是在被应用程序实例化后,尚未进行持久化的对象。也可能是因为实例化他们的 Session 已经被关闭而脱离持久化的对象。" #. Tag: term #, no-c-format @@ -159,84 +101,43 @@ msgstr "事务 Transaction (org.hibernate.Transaction)" #. Tag: para #, no-c-format -msgid "" -"(Optional) A single-threaded, short-lived object used by the application to " -"specify atomic units of work. It abstracts the application from the " -"underlying JDBC, JTA or CORBA transaction. A Session " -"might span several Transactions in some cases. However, " -"transaction demarcation, either using the underlying API or " -"Transaction, is never optional." -msgstr "" -"(可选的)应用程序用来指定原子操作单元范围的对象,它是单线程的,生命周期很" -"短。它通过抽象将应用从底层具体的 JDBC、JTA 以及 CORBA 事务隔离开。某些情况" -"下,一个 Session 之内可能包含多个 Transaction 对象。尽管是否使用该对象是可选的,但无论是使用底层的 API 还是使用 " -"Transaction 对象,事务边界的开启与关闭是必需的。 " +msgid "(Optional) A single-threaded, short-lived object used by the application to specify atomic units of work. It abstracts the application from the underlying JDBC, JTA or CORBA transaction. A Session might span several Transactions in some cases. However, transaction demarcation, either using the underlying API or Transaction, is never optional." +msgstr "(可选的)应用程序用来指定原子操作单元范围的对象,它是单线程的,生命周期很短。它通过抽象将应用从底层具体的 JDBC、JTA 以及 CORBA 事务隔离开。某些情况下,一个 Session 之内可能包含多个 Transaction 对象。尽管是否使用该对象是可选的,但无论是使用底层的 API 还是使用 Transaction 对象,事务边界的开启与关闭是必需的。 " #. Tag: term #, no-c-format -msgid "" -"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" -msgstr "" -"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" +msgid "ConnectionProvider (org.hibernate.connection.ConnectionProvider)" +msgstr "ConnectionProvider (org.hibernate.connection.ConnectionProvider)" #. Tag: para #, no-c-format -msgid "" -"(Optional) A factory for, and pool of, JDBC connections. It abstracts the " -"application from underlying Datasource or " -"DriverManager. It is not exposed to application, but it " -"can be extended and/or implemented by the developer." -msgstr "" -"(可选的)生成 JDBC 连接的工厂(同时也起到连接池的作用)。它通过抽象将应用从" -"底层的 DatasourceDriverManager 隔离" -"开。仅供开发者扩展/实现用,并不开放给应用程序使用。" +msgid "(Optional) A factory for, and pool of, JDBC connections. It abstracts the application from underlying Datasource or DriverManager. It is not exposed to application, but it can be extended and/or implemented by the developer." +msgstr "(可选的)生成 JDBC 连接的工厂(同时也起到连接池的作用)。它通过抽象将应用从底层的 DatasourceDriverManager 隔离开。仅供开发者扩展/实现用,并不开放给应用程序使用。" #. Tag: term #, no-c-format -msgid "" -"TransactionFactory (org.hibernate.TransactionFactory)" -msgstr "" -"TransactionFactory (org.hibernate.TransactionFactory)" +msgid "TransactionFactory (org.hibernate.TransactionFactory)" +msgstr "TransactionFactory (org.hibernate.TransactionFactory)" #. Tag: para #, no-c-format -msgid "" -"(Optional) A factory for Transaction instances. It is not " -"exposed to the application, but it can be extended and/or implemented by the " -"developer." -msgstr "" -"(可选的)生成 Transaction 对象实例的工厂。仅供开发者扩展/" -"实现用,并不开发能够给应用程序使用。" +msgid "(Optional) A factory for Transaction instances. It is not exposed to the application, but it can be extended and/or implemented by the developer." +msgstr "(可选的)生成 Transaction 对象实例的工厂。仅供开发者扩展/实现用,并不开发能够给应用程序使用。" #. Tag: term -#, fuzzy, no-c-format +#, no-c-format msgid "Extension Interfaces" -msgstr "扩展接口" +msgstr "扩展接口 " #. Tag: para #, no-c-format -msgid "" -"Hibernate offers a range of optional extension interfaces you can implement " -"to customize the behavior of your persistence layer. See the API " -"documentation for details." -msgstr "" -"Hibernate 提供了很多可选的扩展接口,你可以通过实现它们来定制你的持久层的行" -"为。具体请参考 API 文档。" +msgid "Hibernate offers a range of optional extension interfaces you can implement to customize the behavior of your persistence layer. See the API documentation for details." +msgstr "Hibernate 提供了很多可选的扩展接口,你可以通过实现它们来定制你的持久层的行为。具体请参考 API 文档。" #. Tag: para #, no-c-format -msgid "" -"Given a \"minimal\" architecture, the application bypasses the " -"Transaction/TransactionFactory and/or " -"ConnectionProvider APIs to communicate with JTA or JDBC " -"directly." -msgstr "" -"在特定“最小”的体系结构中,应用程序可能绕过 Transaction/" -"TransactionFactory 以及 ConnectionProvider 等 API 直接跟 JTA 或 JDBC 打交道。" +msgid "Given a \"minimal\" architecture, the application bypasses the Transaction/TransactionFactory and/or ConnectionProvider APIs to communicate with JTA or JDBC directly." +msgstr "在特定“最小”的体系结构中,应用程序可能绕过 Transaction/TransactionFactory 以及 ConnectionProvider 等 API 直接跟 JTA 或 JDBC 打交道。" #. Tag: title #, no-c-format @@ -245,16 +146,8 @@ msgstr "实例状态" #. Tag: para #, no-c-format -msgid "" -"An instance of a persistent class can be in one of three different states. " -"These states are defined in relation to a persistence context. The Hibernate Session object is the " -"persistence context. The three different states are as follows:" -msgstr "" -"一个持久化类的实例可能处于三种不同状态中的某一种。这三种状态的定义则与所谓的" -"持久化上下文(persistence context)有关。Hibernate 的 " -"Session 对象就是这个所谓的持久化上下文。这三种不同的状态如" -"下:" +msgid "An instance of a persistent class can be in one of three different states. These states are defined in relation to a persistence context. The Hibernate Session object is the persistence context. The three different states are as follows:" +msgstr "一个持久化类的实例可能处于三种不同状态中的某一种。这三种状态的定义则与所谓的持久化上下文(persistence context)有关。Hibernate 的 Session 对象就是这个所谓的持久化上下文。这三种不同的状态如下:" #. Tag: term #, no-c-format @@ -263,11 +156,8 @@ msgstr "瞬态(transient)" #. Tag: para #, no-c-format -msgid "" -"The instance is not associated with any persistence context. It has no " -"persistent identity or primary key value." -msgstr "" -"该实例从未与任何持久化上下文关联过。它没有持久化标识(相当于主键值)。 " +msgid "The instance is not associated with any persistence context. It has no persistent identity or primary key value." +msgstr "该实例从未与任何持久化上下文关联过。它没有持久化标识(相当于主键值)。 " #. Tag: term #, no-c-format @@ -276,16 +166,8 @@ msgstr "持久化(persistent)" #. Tag: para #, no-c-format -msgid "" -"The instance is currently associated with a persistence context. It has a " -"persistent identity (primary key value) and can have a corresponding row in " -"the database. For a particular persistence context, Hibernate " -"guarantees that persistent identity is equivalent to " -"Java identity in relation to the in-memory location of the object." -msgstr "" -"实例目前与某个持久化上下文有关联。它拥有持久化标识(相当于主键值),并且可能" -"在数据库中有一个对应的行。对于某一个特定的持久化上下文,Hibernate " -"保证 持久化标识与 Java 标识(其值代表对象在内存中的位置)等价。 " +msgid "The instance is currently associated with a persistence context. It has a persistent identity (primary key value) and can have a corresponding row in the database. For a particular persistence context, Hibernate guarantees that persistent identity is equivalent to Java identity in relation to the in-memory location of the object." +msgstr "实例目前与某个持久化上下文有关联。它拥有持久化标识(相当于主键值),并且可能在数据库中有一个对应的行。对于某一个特定的持久化上下文,Hibernate 保证 持久化标识与 Java 标识(其值代表对象在内存中的位置)等价。 " #. Tag: term #, no-c-format @@ -294,17 +176,8 @@ msgstr "脱管(detached)" #. Tag: para #, 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 can have a corresponding row in the database. " -"For detached instances, Hibernate does not guarantee the relationship " -"between persistent identity and Java identity." -msgstr "" -"实例曾经与某个持久化上下文发生过关联,不过那个上下文被关闭了,或者这个实例是" -"被序列化(serialize)到另外的进程。它拥有持久化标识,并且在数据库中可能存在一" -"个对应的行。对于脱管状态的实例,Hibernate 不保证任何持久化标识和 Java 标识的" -"关系。 " +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 can have a corresponding row in the database. For detached instances, Hibernate does not guarantee the relationship between persistent identity and Java identity." +msgstr "实例曾经与某个持久化上下文发生过关联,不过那个上下文被关闭了,或者这个实例是被序列化(serialize)到另外的进程。它拥有持久化标识,并且在数据库中可能存在一个对应的行。对于脱管状态的实例,Hibernate 不保证任何持久化标识和 Java 标识的关系。 " #. Tag: title #, no-c-format @@ -313,79 +186,33 @@ msgstr "JMX 整合" #. Tag: para #, no-c-format -msgid "" -"JMX is the J2EE standard for the management of Java components. Hibernate " -"can be managed via a JMX standard service. AN MBean implementation is " -"provided in the distribution: org.hibernate.jmx.HibernateService." -msgstr "" -"JMX 是管理 Java 组件的 J2EE 标准。Hibernate 可以通过一个 JMX 标准服务来管理。" -"在这个发行版本中,我们提供了一个 MBean 接口的实现,即 org.hibernate." -"jmx.HibernateService。 " +msgid "JMX is the J2EE standard for the management of Java components. Hibernate can be managed via a JMX standard service. AN MBean implementation is provided in the distribution: org.hibernate.jmx.HibernateService." +msgstr "JMX 是管理 Java 组件的 J2EE 标准。Hibernate 可以通过一个 JMX 标准服务来管理。在这个发行版本中,我们提供了一个 MBean 接口的实现,即 org.hibernate.jmx.HibernateService。 " #. Tag: para #, no-c-format -msgid "" -"For an example of how to deploy Hibernate as a JMX service on the JBoss " -"Application Server, please see the JBoss User Guide. JBoss AS also provides " -"these benefits if you deploy using JMX:" -msgstr "" -"想要看如何在 JBoss 应用服务器上将 Hibernate 部署为一个 JMX 服务的例子,您可以" -"参考《JBoss 用户指南》。如果你使用 JMX 来部署 Hibernate,JBoss AS 也提供如下" -"好处:" +msgid "For an example of how to deploy Hibernate as a JMX service on the JBoss Application Server, please see the JBoss User Guide. JBoss AS also provides these benefits if you deploy using JMX:" +msgstr "想要看如何在 JBoss 应用服务器上将 Hibernate 部署为一个 JMX 服务的例子,您可以参考《JBoss 用户指南》。如果你使用 JMX 来部署 Hibernate,JBoss AS 也提供如下好处:" #. Tag: para #, no-c-format -msgid "" -"Session Management: the Hibernate Session's life cycle can be automatically bound to the scope of a JTA " -"transaction. This means that you no longer have to manually open and close " -"the Session; this becomes the job of a JBoss EJB " -"interceptor. You also do not have to worry about transaction demarcation in " -"your code (if you would like to write a portable persistence layer use the " -"optional Hibernate Transaction API for this). You call " -"the HibernateContext to access a Session." -msgstr "" -"会话管理: Hibernate 的 Session 对象" -"的生命周期可以 自动跟一个 JTA 事务边界绑定。这意味着你无需手工开关 " -"Session 了, 这项工作会由 JBoss EJB 拦截器来完成。你再也不" -"用担心你的代码中的事务边界了(除非你想利用 Hibernate 提供可选的 " -"Transaction API 来自己写一个便于移植的的持久层)。你通过调" -"用 HibernateContext 来访问 Session。" +msgid "Session Management: the Hibernate Session's life cycle can be automatically bound to the scope of a JTA transaction. This means that you no longer have to manually open and close the Session; this becomes the job of a JBoss EJB interceptor. You also do not have to worry about transaction demarcation in your code (if you would like to write a portable persistence layer use the optional Hibernate Transaction API for this). You call the HibernateContext to access a Session." +msgstr "会话管理: Hibernate 的 Session 对象的生命周期可以 自动跟一个 JTA 事务边界绑定。这意味着你无需手工开关 Session 了, 这项工作会由 JBoss EJB 拦截器来完成。你再也不用担心你的代码中的事务边界了(除非你想利用 Hibernate 提供可选的 Transaction API 来自己写一个便于移植的的持久层)。你通过调用 HibernateContext 来访问 Session。" #. Tag: para #, no-c-format -msgid "" -"HAR deployment: the Hibernate JMX service is deployed " -"using a JBoss service deployment descriptor in an EAR and/or SAR file, as it " -"supports all the usual configuration options of a Hibernate " -"SessionFactory. However, you still need to name all your " -"mapping files in the deployment descriptor. If you use the optional HAR " -"deployment, JBoss will automatically detect all mapping files in your HAR " -"file." -msgstr "" -"HAR 部署: 通常情况下,你会使用 JBoss 的服务部署描述符" -"(在 EAR 或/和 SAR 文件中)来部署 Hibernate JMX 服务。这种部署方式支持所有常" -"见的 Hibernate SessionFactory 的配置选项。不过,你仍需在部" -"署描述符中,列出你所有的映射文的名字。如果你使用 HAR 部署方式, JBoss 会自动探" -"测出你的 HAR 文件中所有的映射文件。" +msgid "HAR deployment: the Hibernate JMX service is deployed using a JBoss service deployment descriptor in an EAR and/or SAR file, as it supports all the usual configuration options of a Hibernate SessionFactory. However, you still need to name all your mapping files in the deployment descriptor. If you use the optional HAR deployment, JBoss will automatically detect all mapping files in your HAR file." +msgstr "HAR 部署: 通常情况下,你会使用 JBoss 的服务部署描述符(在 EAR 或/和 SAR 文件中)来部署 Hibernate JMX 服务。这种部署方式支持所有常见的 Hibernate SessionFactory 的配置选项。不过,你仍需在部署描述符中,列出你所有的映射文的名字。如果你使用 HAR 部署方式, JBoss 会自动探测出你的 HAR 文件中所有的映射文件。" #. Tag: para #, no-c-format -msgid "" -"Consult the JBoss AS user guide for more information about these options." +msgid "Consult the JBoss AS user guide for more information about these options." msgstr "这些选项更多的描述,请参考 JBoss 应用程序用户指南。" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"Another feature available as a JMX service is runtime Hibernate statistics. " -"See for more " -"information." -msgstr "" -"将 Hibernate 以部署为 JMX 服务的另一个好处是可以查看 Hibernate 的运行时统计信" -"息。参看 。" +#, no-c-format +msgid "Another feature available as a JMX service is runtime Hibernate statistics. See for more information." +msgstr "将 Hibernate 以部署为 JMX 服务的另一个好处是可以查看 Hibernate 的运行时统计信息。参看 。 " #. Tag: title #, no-c-format @@ -394,13 +221,8 @@ msgstr "对 JCA 的支持" #. Tag: para #, no-c-format -msgid "" -"Hibernate can also be configured as a JCA connector. Please see the website " -"for more information. Please note, however, that at this stage Hibernate JCA " -"support is under development." -msgstr "" -"Hibernate 也可以被配置为一个 JCA 连接器(JCA connector)。更多信息请参看网" -"站。请注意,Hibernate 对 JCA 的支持,仍处于实验性阶段。" +msgid "Hibernate can also be configured as a JCA connector. Please see the website for more information. Please note, however, that at this stage Hibernate JCA support is under development." +msgstr "Hibernate 也可以被配置为一个 JCA 连接器(JCA connector)。更多信息请参看网站。请注意,Hibernate 对 JCA 的支持,仍处于实验性阶段。" #. Tag: title #, no-c-format @@ -409,155 +231,46 @@ msgstr "上下文相关的会话(Contextual Session)" #. Tag: para #, no-c-format -msgid "" -"Most applications using Hibernate need some form of \"contextual\" session, " -"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; different contexts define different scopes to the " -"notion of current. Applications using Hibernate prior to version 3.0 tended " -"to utilize either home-grown ThreadLocal-based contextual " -"sessions, helper classes such as HibernateUtil, or " -"utilized third-party frameworks, such as Spring or Pico, which provided " -"proxy/interception-based contextual sessions." -msgstr "" -"使用 Hibernate 的大多数应用程序需要某种形式的“上下文相关的”会话,特定的会话在" -"整个特定的上下文范围内始终有效。然而,对不同类型的应用程序而言,要为什么是组" -"成这种“上下文”下一个定义通常是困难的;不同的上下文对“当前”这个概念定义了不同" -"的范围。在 3.0 版本之前,使用 Hibernate 的程序要么采用自行编写的基于 " -"ThreadLocal 的上下文会话,要么采用 " -"HibernateUtil 这样的辅助类,要么采用第三方框架(比如 " -"Spring 或 Pico),它们提供了基于代理(proxy)或者基于拦截器(interception)的" -"上下文相关的会话。" +msgid "Most applications using Hibernate need some form of \"contextual\" session, 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; different contexts define different scopes to the notion of current. Applications using Hibernate prior to version 3.0 tended to utilize either home-grown ThreadLocal-based contextual sessions, helper classes such as HibernateUtil, or utilized third-party frameworks, such as Spring or Pico, which provided proxy/interception-based contextual sessions." +msgstr "使用 Hibernate 的大多数应用程序需要某种形式的“上下文相关的”会话,特定的会话在整个特定的上下文范围内始终有效。然而,对不同类型的应用程序而言,要为什么是组成这种“上下文”下一个定义通常是困难的;不同的上下文对“当前”这个概念定义了不同的范围。在 3.0 版本之前,使用 Hibernate 的程序要么采用自行编写的基于 ThreadLocal 的上下文会话,要么采用 HibernateUtil 这样的辅助类,要么采用第三方框架(比如 Spring 或 Pico),它们提供了基于代理(proxy)或者基于拦截器(interception)的上下文相关的会话。" #. Tag: para #, no-c-format -msgid "" -"Starting with version 3.0.1, Hibernate added the SessionFactory." -"getCurrentSession() method. Initially, this assumed usage of " -"JTA transactions, where the JTA " -"transaction defined both the scope and context of a current session. Given " -"the maturity of the numerous stand-alone JTA TransactionManager implementations, most, if not all, applications should be using " -"JTA transaction management, whether or not they are " -"deployed into a J2EE container. Based on that, the " -"JTA-based contextual sessions are all you need to use." -msgstr "" -"从 3.0.1 版本开始,Hibernate 增加了 SessionFactory.getCurrentSession" -"() 方法。一开始,它假定了采用 JTA 事务," -"JTA 事务定义了当前 session 的范围和上下文(scope 和 " -"context)。因为有好几个独立的 JTA TransactionManager 实现" -"稳定可用,不论是否被部署到一个 J2EE 容器中,大多数(假若不" -"是所有的)应用程序都应该采用 JTA 事务管理。基于这一点,采" -"用 JTA 的上下文相关的会话可以满足你一切需要。" +msgid "Starting with version 3.0.1, Hibernate added the SessionFactory.getCurrentSession() method. Initially, this assumed usage of JTA transactions, where the JTA transaction defined both the scope and context of a current session. Given the maturity of the numerous stand-alone JTA TransactionManager implementations, most, if not all, applications should be using JTA transaction management, whether or not they are deployed into a J2EE container. Based on that, the JTA-based contextual sessions are all you need to use." +msgstr "从 3.0.1 版本开始,Hibernate 增加了 SessionFactory.getCurrentSession() 方法。一开始,它假定了采用 JTA 事务,JTA 事务定义了当前 session 的范围和上下文(scope 和 context)。因为有好几个独立的 JTA TransactionManager 实现稳定可用,不论是否被部署到一个 J2EE 容器中,大多数(假若不是所有的)应用程序都应该采用 JTA 事务管理。基于这一点,采用 JTA 的上下文相关的会话可以满足你一切需要。" #. Tag: para #, no-c-format -msgid "" -"However, as of version 3.1, the processing behind SessionFactory." -"getCurrentSession() is now pluggable. To that end, a new extension " -"interface, org.hibernate.context.CurrentSessionContext, " -"and a new configuration parameter, hibernate." -"current_session_context_class, have been added to allow " -"pluggability of the scope and context of defining current sessions." -msgstr "" -"更好的是,从 3.1 开始,SessionFactory.getCurrentSession() " -"的后台实现是可拔插的。因此,我们引入了新的扩展接口(org.hibernate." -"context.CurrentSessionContext)和新的配置参数(hibernate." -"current_session_context_class),以便对什么是当前会话的范围" -"(scope)和上下文(context)的定义进行拔插。" +msgid "However, as of version 3.1, the processing behind SessionFactory.getCurrentSession() is now pluggable. To that end, a new extension interface, org.hibernate.context.CurrentSessionContext, and a new configuration parameter, hibernate.current_session_context_class, have been added to allow pluggability of the scope and context of defining current sessions." +msgstr "更好的是,从 3.1 开始,SessionFactory.getCurrentSession() 的后台实现是可拔插的。因此,我们引入了新的扩展接口(org.hibernate.context.CurrentSessionContext)和新的配置参数(hibernate.current_session_context_class),以便对什么是当前会话的范围(scope)和上下文(context)的定义进行拔插。" #. Tag: para #, no-c-format -msgid "" -"See the Javadocs for the org.hibernate.context." -"CurrentSessionContext interface for a detailed discussion of its " -"contract. It defines a single method, currentSession(), " -"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 "" -"请参阅 org.hibernate.context.CurrentSessionContext 接口的 " -"Javadoc,那里有关于它的契约的详细讨论。它定义了单一的方法," -"currentSession(),特定的实现用它来负责跟踪当前的上下文相关" -"的会话。Hibernate 内置了此接口的三种实现:" +msgid "See the Javadocs for the org.hibernate.context.CurrentSessionContext interface for a detailed discussion of its contract. It defines a single method, currentSession(), 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 "请参阅 org.hibernate.context.CurrentSessionContext 接口的 Javadoc,那里有关于它的契约的详细讨论。它定义了单一的方法,currentSession(),特定的实现用它来负责跟踪当前的上下文相关的会话。Hibernate 内置了此接口的三种实现:" #. Tag: para #, no-c-format -msgid "" -"org.hibernate.context.JTASessionContext: current sessions " -"are tracked and scoped by a JTA transaction. The " -"processing here is exactly the same as in the older JTA-only approach. See " -"the Javadocs for details." -msgstr "" -"org.hibernate.context.JTASessionContext:当前会话根据 " -"JTA 来跟踪和界定。这和以前的仅支持 JTA 的方法是完全一样" -"的。详情请参阅 Javadoc。" +msgid "org.hibernate.context.JTASessionContext: current sessions are tracked and scoped by a JTA transaction. The processing here is exactly the same as in the older JTA-only approach. See the Javadocs for details." +msgstr "org.hibernate.context.JTASessionContext:当前会话根据 JTA 来跟踪和界定。这和以前的仅支持 JTA 的方法是完全一样的。详情请参阅 Javadoc。" #. Tag: para #, no-c-format -msgid "" -"org.hibernate.context.ThreadLocalSessionContext:current " -"sessions are tracked by thread of execution. See the Javadocs for details." -msgstr "" -"org.hibernate.context.ThreadLocalSessionContext:当前会话" -"通过当前执行的线程来跟踪和界定。详情也请参阅 Javadoc。" +msgid "org.hibernate.context.ThreadLocalSessionContext:current sessions are tracked by thread of execution. See the Javadocs for details." +msgstr "org.hibernate.context.ThreadLocalSessionContext:当前会话通过当前执行的线程来跟踪和界定。详情也请参阅 Javadoc。" #. Tag: para #, no-c-format -msgid "" -"org.hibernate.context.ManagedSessionContext: current " -"sessions are tracked by thread of execution. However, you are responsible to " -"bind and unbind a Session instance with static methods on " -"this class: it does not open, flush, or close a Session." -msgstr "" -"org.hibernate.context.ManagedSessionContext:当前会话通过" -"当前执行的线程来跟踪和界定。但是,你需要负责使用这个类的静态方法将 " -"Session 实例绑定、或者取消绑定,它并不会打开(open)、" -"flush 或者关闭(close)任何 Session。" - -#. Tag: para -#, fuzzy, no-c-format -msgid "" -"The first two implementations provide a \"one session - one database " -"transaction\" programming model. This is also known and used as " -"session-per-request. The beginning and end of a " -"Hibernate session is defined by the duration of a database transaction. If " -"you use programmatic transaction demarcation in plain JSE without JTA, you " -"are advised to use the Hibernate Transaction API to hide " -"the underlying transaction system from your code. If you use JTA, you can " -"utilize the JTA interfaces to demarcate transactions. If you execute in an " -"EJB container that supports CMT, transaction boundaries are defined " -"declaratively and you do not need any transaction or session demarcation " -"operations in your code. Refer to for more " -"information and code examples." -msgstr "" -"前两种实现都提供了“one session - one database transaction”的编程模型,也称作 " -"session-per-request。Hibernate session 的起始和终结由数" -"据库事务的生存来控制。假若你在纯粹的 Java SE 之上采用自行编写代码来管理事务," -"而不使用 JTA,建议你使用 Hibernate Transaction API 来把底" -"层事务实现从你的代码中隐藏掉。如果你使用 JTA,请使用 JTA 接口来对事务限界。如" -"果你在支持 CMT 的 EJB 容器中执行代码,事务边界是声明式定义的,你不需要在代码" -"中进行任何事务或会话管理操作。请参阅 一节来" -"阅读更多的内容和示例代码。" +msgid "org.hibernate.context.ManagedSessionContext: current sessions are tracked by thread of execution. However, you are responsible to bind and unbind a Session instance with static methods on this class: it does not open, flush, or close a Session." +msgstr "org.hibernate.context.ManagedSessionContext:当前会话通过当前执行的线程来跟踪和界定。但是,你需要负责使用这个类的静态方法将 Session 实例绑定、或者取消绑定,它并不会打开(open)、flush 或者关闭(close)任何 Session。" #. Tag: para #, no-c-format -msgid "" -"The hibernate.current_session_context_class configuration " -"parameter defines which org.hibernate.context." -"CurrentSessionContext implementation should be used. For backwards " -"compatibility, if this configuration parameter is not set but a org." -"hibernate.transaction.TransactionManagerLookup is configured, " -"Hibernate will use the org.hibernate.context.JTASessionContext. 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 "" -"hibernate.current_session_context_class 配置参数定义了应该" -"采用哪个 org.hibernate.context.CurrentSessionContext 实" -"现。注意,为了向下兼容,如果未配置此参数,但是存在 org.hibernate." -"transaction.TransactionManagerLookup 的配置,Hibernate 会采用" -"org.hibernate.context.JTASessionContext。一般而言,此参数" -"的值指明了要使用的实现类的全名,但那三种内置的实现可以使用简写,即 \"jta\"、" -"\"thread\" 和 \"managed\"。 " +msgid "The first two implementations provide a \"one session - one database transaction\" programming model. This is also known and used as session-per-request. The beginning and end of a Hibernate session is defined by the duration of a database transaction. If you use programmatic transaction demarcation in plain JSE without JTA, you are advised to use the Hibernate Transaction API to hide the underlying transaction system from your code. If you use JTA, you can utilize the JTA interfaces to demarcate transactions. If you execute in an EJB container that supports CMT, transaction boundaries are defined declaratively and you do not need any transaction or session demarcation operations in your code. Refer to for more information and code examples." +msgstr "前两种实现都提供了“one session - one database transaction”的编程模型,也称作 session-per-request。Hibernate session 的起始和终结由数据库事务的生存来控制。假若你在纯粹的 Java SE 之上采用自行编写代码来管理事务,而不使用 JTA,建议你使用 Hibernate Transaction API 来把底层事务实现从你的代码中隐藏掉。如果你使用 JTA,请使用 JTA 接口来对事务限界。如果你在支持 CMT 的 EJB 容器中执行代码,事务边界是声明式定义的,你不需要在代码中进行任何事务或会话管理操作。请参阅 一节来阅读更多的内容和示例代码。 " + +#. Tag: para +#, no-c-format +msgid "The hibernate.current_session_context_class configuration parameter defines which org.hibernate.context.CurrentSessionContext implementation should be used. For backwards compatibility, if this configuration parameter is not set but a org.hibernate.transaction.TransactionManagerLookup is configured, Hibernate will use the org.hibernate.context.JTASessionContext. 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 "hibernate.current_session_context_class 配置参数定义了应该采用哪个 org.hibernate.context.CurrentSessionContext 实现。注意,为了向下兼容,如果未配置此参数,但是存在 org.hibernate.transaction.TransactionManagerLookup 的配置,Hibernate 会采用org.hibernate.context.JTASessionContext。一般而言,此参数的值指明了要使用的实现类的全名,但那三种内置的实现可以使用简写,即 \"jta\"、\"thread\" 和 \"managed\"。 " + diff --git a/documentation/manual/src/main/docbook/zh-CN/content/basic_mapping.po b/documentation/manual/src/main/docbook/zh-CN/content/basic_mapping.po index c0ac3191a3..4db1336469 100644 --- a/documentation/manual/src/main/docbook/zh-CN/content/basic_mapping.po +++ b/documentation/manual/src/main/docbook/zh-CN/content/basic_mapping.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: basic_mapping\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-02-11T05:38:15\n" -"PO-Revision-Date: 2010-01-11 10:32+1000\n" +"PO-Revision-Date: 2010-03-15 08:56+1000\n" "Last-Translator: Xi HUANG \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -27,25 +27,13 @@ msgstr "映射定义(Mapping declaration)" #. Tag: para #, 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 and not table declarations." -msgstr "" -"对象和关系数据库之间的映射通常是用一个 XML 文档来定义的。这个映射文档被设计为" -"易读的,并且可以手工修改。映射语言是以 Java 为中心,这意味着映射文档是按照持" -"久化类的定义来创建的,而非表的定义。 " +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 and not table declarations." +msgstr "对象和关系数据库之间的映射通常是用一个 XML 文档来定义的。这个映射文档被设计为易读的,并且可以手工修改。映射语言是以 Java 为中心,这意味着映射文档是按照持久化类的定义来创建的,而非表的定义。 " #. Tag: para #, no-c-format -msgid "" -"Please note that even though many Hibernate users choose to write the XML by " -"hand, a number of tools exist to generate the mapping document. These " -"include XDoclet, Middlegen and AndroMDA." -msgstr "" -"请注意,虽然很多 Hibernate 用户选择手写 XML 映射文档,但也有一些工具可以用来" -"生成映射文档,包括 XDoclet、Middlegen 和 AndroMDA。" +msgid "Please note that even though many Hibernate users choose to write the XML by hand, a number of tools exist to generate the mapping document. These include XDoclet, Middlegen and AndroMDA." +msgstr "请注意,虽然很多 Hibernate 用户选择手写 XML 映射文档,但也有一些工具可以用来生成映射文档,包括 XDoclet、Middlegen 和 AndroMDA。" #. Tag: para #, no-c-format @@ -54,16 +42,8 @@ msgstr "下面是一个映射的例子:" #. Tag: para #, no-c-format -msgid "" -"We will now discuss the content of the mapping document. We will only " -"describe, however, 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 not-null attribute)." -msgstr "" -"我们现在开始讨论映射文档的内容。我们只描述 Hibernate 在运行时用到的文档元素和" -"属性。映射文档还包括一些额外的可选属性和元素,它们在使用 schema 导出工具的时" -"候会影响导出的数据库 schema 结果(比如,not-null 属性)。" +msgid "We will now discuss the content of the mapping document. We will only describe, however, 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 not-null attribute)." +msgstr "我们现在开始讨论映射文档的内容。我们只描述 Hibernate 在运行时用到的文档元素和属性。映射文档还包括一些额外的可选属性和元素,它们在使用 schema 导出工具的时候会影响导出的数据库 schema 结果(比如,not-null 属性)。" #. Tag: title #, no-c-format @@ -72,19 +52,8 @@ msgstr "Doctype" #. Tag: para #, no-c-format -msgid "" -"All XML mappings should declare the doctype shown. The actual DTD can be " -"found at the URL above, in the directory hibernate-x.x.x/src/org/" -"hibernate , or in hibernate3.jar. Hibernate " -"will always look for the DTD in its classpath first. If you experience " -"lookups of the DTD using an Internet connection, check the DTD declaration " -"against the contents of your classpath." -msgstr "" -"所有的 XML 映射都需要定义如上所示的 doctype。DTD 可以从上述 URL 中获取,也可" -"以从 hibernate-x.x.x/src/org/hibernate 目录中、或 " -"hibernate.jar 文件中找到。Hibernate 总是会首先在它的 " -"classptah 中搜索 DTD 文件。如果你发现它是通过连接 Internet 查找 DTD 文件,就" -"对照你的 classpath 目录检查 XML 文件里的 DTD 声明。" +msgid "All XML mappings should declare the doctype shown. The actual DTD can be found at the URL above, in the directory hibernate-x.x.x/src/org/hibernate , or in hibernate3.jar. Hibernate will always look for the DTD in its classpath first. If you experience lookups of the DTD using an Internet connection, check the DTD declaration against the contents of your classpath." +msgstr "所有的 XML 映射都需要定义如上所示的 doctype。DTD 可以从上述 URL 中获取,也可以从 hibernate-x.x.x/src/org/hibernate 目录中、或 hibernate.jar 文件中找到。Hibernate 总是会首先在它的 classptah 中搜索 DTD 文件。如果你发现它是通过连接 Internet 查找 DTD 文件,就对照你的 classpath 目录检查 XML 文件里的 DTD 声明。" #. Tag: title #, no-c-format @@ -93,44 +62,18 @@ msgstr "EntityResolver" #. Tag: para #, no-c-format -msgid "" -"Hibernate will first attempt to resolve DTDs in its classpath. It does this " -"is by registering a custom org.xml.sax.EntityResolver " -"implementation with the SAXReader it uses to read in the xml files. This " -"custom EntityResolver recognizes two different systemId " -"namespaces:" -msgstr "" -"Hibernate 首先试图在其 classpath 中解析 DTD。这是依靠在系统中注册的 " -"org.xml.sax.EntityResolver 的一个具体实现,SAXReader 依靠" -"它来读取 xml 文件。这个自定义的 EntityResolver 能辨认两种" -"不同的 systenId 命名空间:" +msgid "Hibernate will first attempt to resolve DTDs in its classpath. It does this is by registering a custom org.xml.sax.EntityResolver implementation with the SAXReader it uses to read in the xml files. This custom EntityResolver recognizes two different systemId namespaces:" +msgstr "Hibernate 首先试图在其 classpath 中解析 DTD。这是依靠在系统中注册的 org.xml.sax.EntityResolver 的一个具体实现,SAXReader 依靠它来读取 xml 文件。这个自定义的 EntityResolver 能辨认两种不同的 systenId 命名空间:" #. Tag: para #, no-c-format -msgid "" -"a hibernate namespace is recognized whenever the resolver " -"encounters a systemId starting with http://hibernate.sourceforge." -"net/. The resolver attempts to resolve these entities via the " -"classloader which loaded the Hibernate classes." -msgstr "" -"若 resolver 遇到了一个以 http://hibernate.sourceforge.net/ 为开头的 systemId,它会辨认出是 hibernate namespace,resolver 就试图通过加载 Hibernate 类的 classloader 来查找这些实" -"体。 " +msgid "a hibernate namespace is recognized whenever the resolver encounters a systemId starting with http://hibernate.sourceforge.net/. The resolver attempts to resolve these entities via the classloader which loaded the Hibernate classes." +msgstr "若 resolver 遇到了一个以 http://hibernate.sourceforge.net/ 为开头的 systemId,它会辨认出是 hibernate namespace,resolver 就试图通过加载 Hibernate 类的 classloader 来查找这些实体。 " #. Tag: para #, no-c-format -msgid "" -"a user namespace is recognized whenever the resolver " -"encounters a systemId using a classpath:// 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 遇到了一个使用 classpath:// URL 协议的 " -"systemId,它会辨认出这是 user namespace,resolver 试图通过" -"(1) 当前线程上下文的 classloader 和(2) 加载 Hibernate class 的 classloader " -"来查找这些实体。" +msgid "a user namespace is recognized whenever the resolver encounters a systemId using a classpath:// 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 遇到了一个使用 classpath:// URL 协议的 systemId,它会辨认出这是 user namespace,resolver 试图通过(1) 当前线程上下文的 classloader 和(2) 加载 Hibernate class 的 classloader 来查找这些实体。" #. Tag: para #, no-c-format @@ -138,14 +81,9 @@ msgid "The following is an example of utilizing user namespacing:" msgstr "下面是一个使用用户命名空间(user namespace)的例子:" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"Where types.xml is a resource in the your." -"domain package and contains a custom typedef." -msgstr "" -"这里的 types.xmlyour.domain 包中的" -"一个资源,它包含了一个自定义的 。 " +#, no-c-format +msgid "Where types.xml is a resource in the your.domain package and contains a custom typedef." +msgstr "这里的 types.xmlyour.domain 包中的一个资源,它包含了一个自定义的 typedef。 " #. Tag: title #, no-c-format @@ -154,25 +92,8 @@ msgstr "Hibernate-mapping" #. Tag: para #, no-c-format -msgid "" -"This element has several optional attributes. The schema " -"and catalog attributes specify that tables referred to in " -"this mapping belong to the named schema and/or catalog. If they are " -"specified, tablenames will be qualified by the given schema and catalog " -"names. If they are missing, tablenames will be unqualified. The " -"default-cascade attribute specifies what cascade style " -"should be assumed for properties and collections that do not specify a " -"cascade attribute. By default, the auto-import attribute allows you to use unqualified class names in the query " -"language." -msgstr "" -"这个元素包括一些可选的属性。schemacatalog 属性, 指明了这个映射所连接(refer)的表所在的 schema 和/或 catalog " -"名称。假若指定了这个属性,表名会加上所指定的 schema 和 catalog 的名字扩展为全" -"限定名。假若没有指定,表名就不会使用全限定名。default-cascade 指定了未明确注明 cascade 属性的 Java 属性和 集合" -"类 Hibernate 会采取什么样的默认级联风格。auto-import 属性" -"默认让我们在查询语言中可以使用非全限定名的类名。" +msgid "This element has several optional attributes. The schema and catalog attributes specify that tables referred to in this mapping belong to the named schema and/or catalog. If they are specified, tablenames will be qualified by the given schema and catalog names. If they are missing, tablenames will be unqualified. The default-cascade attribute specifies what cascade style should be assumed for properties and collections that do not specify a cascade attribute. By default, the auto-import attribute allows you to use unqualified class names in the query language." +msgstr "这个元素包括一些可选的属性。schemacatalog 属性, 指明了这个映射所连接(refer)的表所在的 schema 和/或 catalog 名称。假若指定了这个属性,表名会加上所指定的 schema 和 catalog 的名字扩展为全限定名。假若没有指定,表名就不会使用全限定名。default-cascade 指定了未明确注明 cascade 属性的 Java 属性和 集合类 Hibernate 会采取什么样的默认级联风格。auto-import 属性默认让我们在查询语言中可以使用非全限定名的类名。" #. Tag: para #, no-c-format @@ -186,81 +107,38 @@ msgstr "catalog(可选):数据库 catalog 的名称。 #. Tag: para #, no-c-format -msgid "" -"default-cascade (optional - defaults to none): a default cascade style." -msgstr "" -"default-cascade(可选 — 默认为 none):" -"默认的级联风格。 " +msgid "default-cascade (optional - defaults to none): a default cascade style." +msgstr "default-cascade(可选 — 默认为 none):默认的级联风格。 " #. Tag: para #, no-c-format -msgid "" -"default-access (optional - defaults to property): the strategy Hibernate should use for accessing all properties. " -"It can be a custom implementation of PropertyAccessor." -msgstr "" -"default-access(可选 — 默认为 property):Hibernate 用来访问所有属性的策略。可以通过实现 " -"PropertyAccessor 接口自定义。 " +msgid "default-access (optional - defaults to property): the strategy Hibernate should use for accessing all properties. It can be a custom implementation of PropertyAccessor." +msgstr "default-access(可选 — 默认为 property):Hibernate 用来访问所有属性的策略。可以通过实现 PropertyAccessor 接口自定义。 " #. Tag: para #, no-c-format -msgid "" -"default-lazy (optional - defaults to true): the default value for unspecified lazy " -"attributes of class and collection mappings." -msgstr "" -"default-lazy(可选 — 默认为 true):指" -"定了未明确注明 lazy 属性的 Java 属性和集合类,Hibernate 会" -"采取什么样的默认加载风格。 " +msgid "default-lazy (optional - defaults to true): the default value for unspecified lazy attributes of class and collection mappings." +msgstr "default-lazy(可选 — 默认为 true):指定了未明确注明 lazy 属性的 Java 属性和集合类,Hibernate 会采取什么样的默认加载风格。 " #. Tag: para #, no-c-format -msgid "" -"auto-import (optional - defaults to true): specifies whether we can use unqualified class names of classes " -"in this mapping in the query language." -msgstr "" -"auto-import(可选 — 默认为 true):指定" -"我们是否可以在查询语言中使用非全限定的类名(仅限于本映射文件中的类)。 " +msgid "auto-import (optional - defaults to true): specifies whether we can use unqualified class names of classes in this mapping in the query language." +msgstr "auto-import(可选 — 默认为 true):指定我们是否可以在查询语言中使用非全限定的类名(仅限于本映射文件中的类)。 " #. Tag: para #, no-c-format -msgid "" -"package (optional): specifies a package prefix to use for " -"unqualified class names in the mapping document." -msgstr "" -"package(可选):指定一个包前缀,如果在映射文档中没有指定" -"全限定的类名,就使用这个作为包名。 " +msgid "package (optional): specifies a package prefix to use for unqualified class names in the mapping document." +msgstr "package(可选):指定一个包前缀,如果在映射文档中没有指定全限定的类名,就使用这个作为包名。 " #. Tag: para #, no-c-format -msgid "" -"If you have two persistent classes with the same unqualified name, you " -"should set auto-import=\"false\". An exception will " -"result if you attempt to assign two classes to the same \"imported\" name." -msgstr "" -"假若你有两个持久化类,它们的非全限定名是一样的(就是两个类的名字一样,所在的" -"包不一样 — 译者注),你应该设置 auto-import=\"false\"。如" -"果你把一个“导入过”的名字同时对应两个类,Hibernate 会抛出一个异常。" +msgid "If you have two persistent classes with the same unqualified name, you should set auto-import=\"false\". An exception will result if you attempt to assign two classes to the same \"imported\" name." +msgstr "假若你有两个持久化类,它们的非全限定名是一样的(就是两个类的名字一样,所在的包不一样 — 译者注),你应该设置 auto-import=\"false\"。如果你把一个“导入过”的名字同时对应两个类,Hibernate 会抛出一个异常。" #. Tag: para #, no-c-format -msgid "" -"The hibernate-mapping element allows you to nest several " -"persistent <class> 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. For example, Cat.hbm.xml, Dog.hbm.xml, or if using inheritance, " -"Animal.hbm.xml." -msgstr "" -"注意 hibernate-mapping 元素允许你嵌套多个如上所示的 " -"<class> 映射。但是最好的做法(也许一些工具需要的)是" -"一个持久化类(或一个类的继承层次)对应一个映射文件,并以持久化的超类名称命" -"名,例如:Cat.hbm.xmlDog.hbm.xml,或" -"者如果使用继承,Animal.hbm.xml。" +msgid "The hibernate-mapping element allows you to nest several persistent <class> 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. For example, Cat.hbm.xml, Dog.hbm.xml, or if using inheritance, Animal.hbm.xml." +msgstr "注意 hibernate-mapping 元素允许你嵌套多个如上所示的 <class> 映射。但是最好的做法(也许一些工具需要的)是一个持久化类(或一个类的继承层次)对应一个映射文件,并以持久化的超类名称命名,例如:Cat.hbm.xmlDog.hbm.xml,或者如果使用继承,Animal.hbm.xml。" #. Tag: title #, no-c-format @@ -269,351 +147,153 @@ msgstr "类" #. Tag: para #, no-c-format -msgid "" -"You can declare a persistent class using the class " -"element. For example:" +msgid "You can declare a persistent class using the class element. For example:" msgstr "你可以使用 class 元素来定义一个持久化类。例如:" #. Tag: para #, no-c-format -msgid "" -"name (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 "" -"name(可选):持久化类(或者接口)的 Java 全限定名。 如果" -"这个属性不存在,Hibernate 将假定这是一个非 POJO 的实体映射。 " +msgid "name (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 "name(可选):持久化类(或者接口)的 Java 全限定名。 如果这个属性不存在,Hibernate 将假定这是一个非 POJO 的实体映射。 " #. Tag: para #, no-c-format -msgid "" -"table (optional - defaults to the unqualified class " -"name): the name of its database table." -msgstr "" -"table(可选 — 默认是类的非全限定名):对应的数据库表名。 " +msgid "table (optional - defaults to the unqualified class name): the name of its database table." +msgstr "table(可选 — 默认是类的非全限定名):对应的数据库表名。 " #. Tag: para #, no-c-format -msgid "" -"discriminator-value (optional - defaults to the class " -"name): a value that distinguishes individual subclasses that is used for " -"polymorphic behavior. Acceptable values include null and " -"not null." -msgstr "" -"discriminator-value(可选 — 默认和类名一样):一个用于区分" -"不同的子类的值,在多态行为时使用。它可以接受的值包括 null " -"和 not null。 " +msgid "discriminator-value (optional - defaults to the class name): a value that distinguishes individual subclasses that is used for polymorphic behavior. Acceptable values include null and not null." +msgstr "discriminator-value(可选 — 默认和类名一样):一个用于区分不同的子类的值,在多态行为时使用。它可以接受的值包括 nullnot null。 " #. Tag: para #, no-c-format -msgid "" -"mutable (optional - defaults to true): " -"specifies that instances of the class are (not) mutable." -msgstr "" -"mutable(可选,默认值为 true):表明该" -"类的实例是可变的或者不可变的。 " +msgid "mutable (optional - defaults to true): specifies that instances of the class are (not) mutable." +msgstr "mutable(可选,默认值为 true):表明该类的实例是可变的或者不可变的。 " #. Tag: para #, no-c-format -msgid "" -"schema (optional): overrides the schema name specified by " -"the root <hibernate-mapping> element." -msgstr "" -"schema(可选):覆盖在根 <hibernate-" -"mapping> 元素中指定的 schema 名字。 " +msgid "schema (optional): overrides the schema name specified by the root <hibernate-mapping> element." +msgstr "schema(可选):覆盖在根 <hibernate-mapping> 元素中指定的 schema 名字。 " #. Tag: para #, no-c-format -msgid "" -"catalog (optional): overrides the catalog name specified " -"by the root <hibernate-mapping> element." -msgstr "" -"catalog(可选):覆盖在根 <hibernate-" -"mapping> 元素中指定的 catalog 名字。 " +msgid "catalog (optional): overrides the catalog name specified by the root <hibernate-mapping> element." +msgstr "catalog(可选):覆盖在根 <hibernate-mapping> 元素中指定的 catalog 名字。 " #. Tag: para #, no-c-format -msgid "" -"proxy (optional): specifies an interface to use for lazy " -"initializing proxies. You can specify the name of the class itself." -msgstr "" -"proxy(可选):指定一个接口,在延迟装载时作为代理使用。你" -"可以在这里使用该类自己的名字。 " +msgid "proxy (optional): specifies an interface to use for lazy initializing proxies. You can specify the name of the class itself." +msgstr "proxy(可选):指定一个接口,在延迟装载时作为代理使用。你可以在这里使用该类自己的名字。 " #. Tag: para #, no-c-format -msgid "" -"dynamic-update (optional - defaults to false): specifies that UPDATE SQL should be generated " -"at runtime and can contain only those columns whose values have changed." -msgstr "" -"dynamic-update(可选,默认为 false):" -"指定用于 UPDATE 的 SQL 将会在运行时动态生成,并且只更新那" -"些改变过的字段。 " +msgid "dynamic-update (optional - defaults to false): specifies that UPDATE SQL should be generated at runtime and can contain only those columns whose values have changed." +msgstr "dynamic-update(可选,默认为 false):指定用于 UPDATE 的 SQL 将会在运行时动态生成,并且只更新那些改变过的字段。 " #. Tag: para #, no-c-format -msgid "" -"dynamic-insert (optional - defaults to false): specifies that INSERT SQL should be generated " -"at runtime and contain only the columns whose values are not null." -msgstr "" -"dynamic-insert(可选,默认为 false):" -"指定用于 INSERT 的 SQL 将会在运行时动态生成,并且只包含那" -"些非空值字段。 " +msgid "dynamic-insert (optional - defaults to false): specifies that INSERT SQL should be generated at runtime and contain only the columns whose values are not null." +msgstr "dynamic-insert(可选,默认为 false):指定用于 INSERT 的 SQL 将会在运行时动态生成,并且只包含那些非空值字段。 " #. Tag: para #, no-c-format -msgid "" -"select-before-update (optional - defaults to " -"false): specifies that Hibernate should never perform an SQL UPDATE unless it is certain that " -"an object is actually modified. Only when a transient object has been " -"associated with a new session using update(), will " -"Hibernate perform an extra SQL SELECT to determine if an " -"UPDATE is actually required." -msgstr "" -"select-before-update(可选,默认为 false):指定 Hibernate 除非确定对象真正被修改了(如果该值为 true — 译" -"注),否则不会执行 SQL UPDATE 操作。" -"在特定场合(实际上,它只在一个瞬时对象(transient object)关联到一个新的 " -"session 中时执行的 update() 中生效),这说明 Hibernate 会在 UPDATE 之前执行一次额外的 SQL SELECT 操作来决定是否确实" -"需要执行 UPDATE。" +msgid "select-before-update (optional - defaults to false): specifies that Hibernate should never perform an SQL UPDATE unless it is certain that an object is actually modified. Only when a transient object has been associated with a new session using update(), will Hibernate perform an extra SQL SELECT to determine if an UPDATE is actually required." +msgstr "select-before-update(可选,默认为 false):指定 Hibernate 除非确定对象真正被修改了(如果该值为 true — 译注),否则不会执行 SQL UPDATE 操作。在特定场合(实际上,它只在一个瞬时对象(transient object)关联到一个新的 session 中时执行的 update() 中生效),这说明 Hibernate 会在 UPDATE 之前执行一次额外的 SQL SELECT 操作来决定是否确实需要执行 UPDATE。" #. Tag: para #, no-c-format -msgid "" -"polymorphism (optional - defaults to implicit): determines whether implicit or explicit query polymorphism is " -"used." -msgstr "" -"polymorphism(多态)(可选,默认值为 implicit " -"(隐式)):界定是隐式还是显式的使用多态查询(这只在 Hibernate 的具" -"体表继承策略中用到 — 译注)。 " +msgid "polymorphism (optional - defaults to implicit): determines whether implicit or explicit query polymorphism is used." +msgstr "polymorphism(多态)(可选,默认值为 implicit (隐式)):界定是隐式还是显式的使用多态查询(这只在 Hibernate 的具体表继承策略中用到 — 译注)。 " #. Tag: para #, no-c-format -msgid "" -"where (optional): specifies an arbitrary SQL " -"WHERE condition to be used when retrieving objects of " -"this class." -msgstr "" -"where(可选)指定一个附加的 SQL WHERE " -"条件,在抓取这个类的对象时会一直增加这个条件。 " +msgid "where (optional): specifies an arbitrary SQL WHERE condition to be used when retrieving objects of this class." +msgstr "where(可选)指定一个附加的 SQL WHERE 条件,在抓取这个类的对象时会一直增加这个条件。 " #. Tag: para #, no-c-format -msgid "" -"persister (optional): specifies a custom " -"ClassPersister." -msgstr "" -"persister(可选):指定一个定制的 " -"ClassPersister。 " +msgid "persister (optional): specifies a custom ClassPersister." +msgstr "persister(可选):指定一个定制的 ClassPersister。 " #. Tag: para #, no-c-format -msgid "" -"batch-size (optional - defaults to 1): " -"specifies a \"batch size\" for fetching instances of this class by " -"identifier." -msgstr "" -"batch-size(可选,默认是 1)指定一个用" -"于 根据标识符(identifier)抓取实例时使用的 \"batch size\"(批次抓取数量)。 " +msgid "batch-size (optional - defaults to 1): specifies a \"batch size\" for fetching instances of this class by identifier." +msgstr "batch-size(可选,默认是 1)指定一个用于 根据标识符(identifier)抓取实例时使用的 \"batch size\"(批次抓取数量)。 " #. Tag: para #, no-c-format -msgid "" -"optimistic-lock (optional - defaults to version): determines the optimistic locking strategy." -msgstr "" -"optimistic-lock(乐观锁定)(可选,默认是 " -"version):决定乐观锁定的策略。 " +msgid "optimistic-lock (optional - defaults to version): determines the optimistic locking strategy." +msgstr "optimistic-lock(乐观锁定)(可选,默认是 version):决定乐观锁定的策略。 " #. Tag: para #, no-c-format -msgid "" -"lazy (optional): lazy fetching can be disabled by setting " -"lazy=\"false\"." -msgstr "" -"lazy(可选):通过设置 lazy=\"false\"," -"所有的延迟加载(Lazy fetching)功能将被全部禁用(disabled)。" +msgid "lazy (optional): lazy fetching can be disabled by setting lazy=\"false\"." +msgstr "lazy(可选):通过设置 lazy=\"false\",所有的延迟加载(Lazy fetching)功能将被全部禁用(disabled)。" #. Tag: para #, no-c-format -msgid "" -"entity-name (optional - defaults to the class name): " -"Hibernate3 allows a class to be mapped multiple times, potentially to " -"different tables. It also 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 and for more information." -msgstr "" -"entity-name(可选,默认为类名):Hibernate3 允许一个类进行" -"多次映射(前提是映射到不同的表),并且允许使用 Maps 或 XML 代替 Java 层次的实" -"体映射(也就是实现动态领域模型,不用写持久化类-译注)。更多信息请看 。 " +msgid "entity-name (optional - defaults to the class name): Hibernate3 allows a class to be mapped multiple times, potentially to different tables. It also 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 and for more information." +msgstr "entity-name(可选,默认为类名):Hibernate3 允许一个类进行多次映射(前提是映射到不同的表),并且允许使用 Maps 或 XML 代替 Java 层次的实体映射(也就是实现动态领域模型,不用写持久化类-译注)。更多信息请看 。 " #. Tag: para #, no-c-format -msgid "" -"check (optional): an SQL expression used to generate a " -"multi-row check constraint for automatic schema " -"generation." -msgstr "" -"check(可选):这是一个 SQL 表达式, 用于为自动生成的 " -"schema 添加多行(multi-row)约束检查。 " +msgid "check (optional): an SQL expression used to generate a multi-row check constraint for automatic schema generation." +msgstr "check(可选):这是一个 SQL 表达式, 用于为自动生成的 schema 添加多行(multi-row)约束检查。 " #. Tag: para #, no-c-format -msgid "" -"rowid (optional): Hibernate can use ROWIDs on databases. " -"On Oracle, for example, Hibernate can use the rowid extra " -"column for fast updates once this option has been set to rowid. A ROWID is an implementation detail and represents the physical " -"location of a stored tuple." -msgstr "" -"rowid(可选):Hibernate 可以使用数据库支持的所谓的 " -"ROWIDs,例如:Oracle 数据库,如果你设置这个可选的 rowid," -"Hibernate 可以使用额外的字段 rowid 实现快速更新。ROWID 是" -"这个功能实现的重点,它代表了一个存储元组(tuple)的物理位置。 " +msgid "rowid (optional): Hibernate can use ROWIDs on databases. On Oracle, for example, Hibernate can use the rowid extra column for fast updates once this option has been set to rowid. A ROWID is an implementation detail and represents the physical location of a stored tuple." +msgstr "rowid(可选):Hibernate 可以使用数据库支持的所谓的 ROWIDs,例如:Oracle 数据库,如果你设置这个可选的 rowid,Hibernate 可以使用额外的字段 rowid 实现快速更新。ROWID 是这个功能实现的重点,它代表了一个存储元组(tuple)的物理位置。 " #. Tag: para #, no-c-format -msgid "" -"subselect (optional): maps an immutable and read-only " -"entity to a database subselect. This is useful if you want to have a view " -"instead of a base table. See below for more information." -msgstr "" -"subselect(可选):它将一个不可变(immutable)并且只读的实" -"体映射到一个数据库的子查询中。当你想用视图代替一张基本表的时候,这是有用的," -"但最好不要这样做。更多的介绍请看下面内容。 " +msgid "subselect (optional): maps an immutable and read-only entity to a database subselect. This is useful if you want to have a view instead of a base table. See below for more information." +msgstr "subselect(可选):它将一个不可变(immutable)并且只读的实体映射到一个数据库的子查询中。当你想用视图代替一张基本表的时候,这是有用的,但最好不要这样做。更多的介绍请看下面内容。 " #. Tag: para #, no-c-format -msgid "" -"abstract (optional): is used to mark abstract " -"superclasses in <union-subclass> hierarchies." -msgstr "" -"abstract(可选):用于在 <union-subclass> 的层次结构(hierarchies)中标识抽象超类。" +msgid "abstract (optional): is used to mark abstract superclasses in <union-subclass> hierarchies." +msgstr "abstract(可选):用于在 <union-subclass> 的层次结构(hierarchies)中标识抽象超类。" #. Tag: para #, no-c-format -msgid "" -"It is acceptable for the named persistent class to be an interface. You can " -"declare implementing classes of that interface using the <" -"subclass> element. You can persist any static inner class. Specify the class name using the standard form i.e. " -"e.g.Foo$Bar." -msgstr "" -"若指明的持久化类实际上是一个接口,这也是完全可以接受的。之后你可以用元素 " -"<subclass> 来指定该接口的实际实现类。你可以持久化任" -"何 static(静态的)内部类。你应该使用标准的类名格式来指" -"定类名,比如:Foo$Bar。" +msgid "It is acceptable for the named persistent class to be an interface. You can declare implementing classes of that interface using the <subclass> element. You can persist any static inner class. Specify the class name using the standard form i.e. e.g.Foo$Bar." +msgstr "若指明的持久化类实际上是一个接口,这也是完全可以接受的。之后你可以用元素 <subclass> 来指定该接口的实际实现类。你可以持久化任何 static(静态的)内部类。你应该使用标准的类名格式来指定类名,比如:Foo$Bar。" #. Tag: para #, no-c-format -msgid "" -"Immutable classes, mutable=\"false\", cannot be updated " -"or deleted by the application. This allows Hibernate to make some minor " -"performance optimizations." -msgstr "" -"不可变类,mutable=\"false\" 不可以被应用程序更新或者删除。" -"这允许 Hibernate 实现一些小小的性能优化。" +msgid "Immutable classes, mutable=\"false\", cannot be updated or deleted by the application. This allows Hibernate to make some minor performance optimizations." +msgstr "不可变类,mutable=\"false\" 不可以被应用程序更新或者删除。这允许 Hibernate 实现一些小小的性能优化。" #. Tag: para #, no-c-format -msgid "" -"The optional proxy attribute enables lazy initialization " -"of persistent instances of the class. Hibernate will initially return CGLIB " -"proxies that implement the named interface. The persistent object will load " -"when a method of the proxy is invoked. See \"Initializing collections and " -"proxies\" below." -msgstr "" -"可选的 proxy 属性允许延迟加载类的持久化实例。Hibernate 开" -"始会返回实现了这个命名接口的 CGLIB 代理。当代理的某个方法被实际调用的时候,真" -"实的持久化对象才会被装载。参见下面的“用于延迟装载的代理”。 " +msgid "The optional proxy attribute enables lazy initialization of persistent instances of the class. Hibernate will initially return CGLIB proxies that implement the named interface. The persistent object will load when a method of the proxy is invoked. See \"Initializing collections and proxies\" below." +msgstr "可选的 proxy 属性允许延迟加载类的持久化实例。Hibernate 开始会返回实现了这个命名接口的 CGLIB 代理。当代理的某个方法被实际调用的时候,真实的持久化对象才会被装载。参见下面的“用于延迟装载的代理”。 " #. Tag: para #, no-c-format -msgid "" -"Implicit polymorphism means that instances of the class " -"will be returned by a query that names any superclass or implemented " -"interface or class, and that instances of any subclass of the class will be " -"returned by a query that names the class itself. Explicit polymorphism means that class instances will be returned only by " -"queries that explicitly name that class. Queries that name the class will " -"return only instances of subclasses mapped inside this <class>" -" declaration as a <subclass> or " -"<joined-subclass>. For most purposes, the default " -"polymorphism=\"implicit\" 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 "" -"Implicit(隐式)的多态是指,如果查询时给出的是任何超类、" -"该类实现的接口或者该类的名字,都会返回这个类的实例;如果查询中给出的是子类的" -"名字,则会返回子类的实例。Explicit(显式)的多态是指,只" -"有在查询时给出明确的该类名字时才会返回这个类的实例; 同时只有在这个 " -"<class> 的定义中作为 <subclass> 或者 <joined-subclass> 出现的子类,才会可能" -"返回。在大多数情况下,默认的 polymorphism=\"implicit\" 都" -"是合适的。显式的多态在有两个不同的类映射到同一个表的时候很有用。(允许一个“轻" -"量级”的类,只包含部分表字段)。 " +msgid "Implicit polymorphism means that instances of the class will be returned by a query that names any superclass or implemented interface or class, and that instances of any subclass of the class will be returned by a query that names the class itself. Explicit polymorphism means that class instances will be returned only by queries that explicitly name that class. Queries that name the class will return only instances of subclasses mapped inside this <class> declaration as a <subclass> or <joined-subclass>. For most purposes, the default polymorphism=\"implicit\" 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 "Implicit(隐式)的多态是指,如果查询时给出的是任何超类、该类实现的接口或者该类的名字,都会返回这个类的实例;如果查询中给出的是子类的名字,则会返回子类的实例。Explicit(显式)的多态是指,只有在查询时给出明确的该类名字时才会返回这个类的实例; 同时只有在这个 <class> 的定义中作为 <subclass> 或者 <joined-subclass> 出现的子类,才会可能返回。在大多数情况下,默认的 polymorphism=\"implicit\" 都是合适的。显式的多态在有两个不同的类映射到同一个表的时候很有用。(允许一个“轻量级”的类,只包含部分表字段)。 " #. Tag: para #, no-c-format -msgid "" -"The persister attribute lets you customize the " -"persistence strategy used for the class. You can, for example, specify your " -"own subclass of org.hibernate.persister.EntityPersister, " -"or you can even provide a completely new implementation of the interface " -"org.hibernate.persister.ClassPersister that implements, " -"for example, persistence via stored procedure calls, serialization to flat " -"files or LDAP. See org.hibernate.test.CustomPersister for " -"a simple example of \"persistence\" to a Hashtable." -msgstr "" -"persister 属性可以让你定制这个类使用的持久化策略。你可以指" -"定你自己实现 org.hibernate.persister.EntityPersister 的子" -"类,你甚至可以完全从头开始编写一个 org.hibernate.persister." -"ClassPersister 接口的实现,比如是用储存过程调用、序列化到文件或者 " -"LDAP 数据库来实现。参阅 org.hibernate.test.CustomPersister,这是持久化到 Hashtable 的一个简单例子。 " +msgid "The persister attribute lets you customize the persistence strategy used for the class. You can, for example, specify your own subclass of org.hibernate.persister.EntityPersister, or you can even provide a completely new implementation of the interface org.hibernate.persister.ClassPersister that implements, for example, persistence via stored procedure calls, serialization to flat files or LDAP. See org.hibernate.test.CustomPersister for a simple example of \"persistence\" to a Hashtable." +msgstr "persister 属性可以让你定制这个类使用的持久化策略。你可以指定你自己实现 org.hibernate.persister.EntityPersister 的子类,你甚至可以完全从头开始编写一个 org.hibernate.persister.ClassPersister 接口的实现,比如是用储存过程调用、序列化到文件或者 LDAP 数据库来实现。参阅 org.hibernate.test.CustomPersister,这是持久化到 Hashtable 的一个简单例子。 " #. Tag: para #, no-c-format -msgid "" -"The dynamic-update and dynamic-insert " -"settings are not inherited by subclasses, so they can also be specified on " -"the <subclass> or <joined-subclass> elements. Although these settings can increase performance in some " -"cases, they can actually decrease performance in others." -msgstr "" -"请注意 dynamic-updatedynamic-insert 的设置并不会继承到子类,所以在 <subclass> " -"或者 <joined-subclass> 元素中可能需要再次设置。这些" -"设置在某些情况下能够提高效率,而其他情况下则反而可能降低性能。" +msgid "The dynamic-update and dynamic-insert settings are not inherited by subclasses, so they can also be specified on the <subclass> or <joined-subclass> elements. Although these settings can increase performance in some cases, they can actually decrease performance in others." +msgstr "请注意 dynamic-updatedynamic-insert 的设置并不会继承到子类,所以在 <subclass> 或者 <joined-subclass> 元素中可能需要再次设置。这些设置在某些情况下能够提高效率,而其他情况下则反而可能降低性能。" #. Tag: para #, no-c-format -msgid "" -"Use of select-before-update will usually decrease " -"performance. It is useful to prevent a database update trigger being called " -"unnecessarily if you reattach a graph of detached instances to a " -"Session." -msgstr "" -"使用 select-before-update 通常会降低性能。如果你重新连接一" -"个脱管(detached)对象实例 到一个 Session 中时,它可以防止" -"数据库不必要的触发 update。这就很有用了。" +msgid "Use of select-before-update will usually decrease performance. It is useful to prevent a database update trigger being called unnecessarily if you reattach a graph of detached instances to a Session." +msgstr "使用 select-before-update 通常会降低性能。如果你重新连接一个脱管(detached)对象实例 到一个 Session 中时,它可以防止数据库不必要的触发 update。这就很有用了。" #. Tag: para #, no-c-format -msgid "" -"If you enable dynamic-update, you will have a choice of " -"optimistic locking strategies:" -msgstr "" -"如果你打开了dynamic-update,你可以选择几种乐观锁定的策略:" +msgid "If you enable dynamic-update, you will have a choice of optimistic locking strategies:" +msgstr "如果你打开了dynamic-update,你可以选择几种乐观锁定的策略:" #. Tag: para #, no-c-format @@ -627,11 +307,8 @@ msgstr "all(全部):检查全部字段" #. Tag: para #, no-c-format -msgid "" -"dirty: check the changed columns, allowing some " -"concurrent updates" -msgstr "" -"dirty(脏检查):只检察修改过的字段,允许某些并行更新" +msgid "dirty: check the changed columns, allowing some concurrent updates" +msgstr "dirty(脏检查):只检察修改过的字段,允许某些并行更新" #. Tag: para #, no-c-format @@ -640,42 +317,18 @@ msgstr "none(不检查):不使用乐观锁定" #. Tag: para #, no-c-format -msgid "" -"It is strongly recommended that you use version/" -"timestamp columns for optimistic locking with Hibernate. This strategy " -"optimizes performance and correctly handles modifications made to detached " -"instances (i.e. when Session.merge() is used)." -msgstr "" -"我们强烈建议你在 Hibernate 中使用 version/timestamp 字段" -"来进行乐观锁定。这个选择可以优化性能,且能够处理对脱管实例的修改(例如:在使" -"用 Session.merge() 的时候)。" +msgid "It is strongly recommended that you use version/timestamp columns for optimistic locking with Hibernate. This strategy optimizes performance and correctly handles modifications made to detached instances (i.e. when Session.merge() is used)." +msgstr "我们强烈建议你在 Hibernate 中使用 version/timestamp 字段来进行乐观锁定。这个选择可以优化性能,且能够处理对脱管实例的修改(例如:在使用 Session.merge() 的时候)。" #. Tag: para #, no-c-format -msgid "" -"There is no difference between a view and a base table for a Hibernate " -"mapping. This is transparent at the database level, although some DBMS do " -"not support views properly, especially with updates. Sometimes you want to " -"use a view, but you cannot create one in the database (i.e. 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 子查询表达式: " +msgid "There is no difference between a view and a base table for a Hibernate mapping. This is transparent at the database level, although some DBMS do not support views properly, especially with updates. Sometimes you want to use a view, but you cannot create one in the database (i.e. 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 子查询表达式: " #. Tag: para #, 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 <subselect> is available both as an " -"attribute and a nested mapping element." -msgstr "" -"定义这个实体用到的表为同步(synchronize),确保自动刷新(auto-flush)正确执" -"行,并且依赖原实体的查询不会返回过期数据。在属性元素和嵌套映射元素中都可使用 " -"<subselect>。" +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 <subselect> is available both as an attribute and a nested mapping element." +msgstr "定义这个实体用到的表为同步(synchronize),确保自动刷新(auto-flush)正确执行,并且依赖原实体的查询不会返回过期数据。在属性元素和嵌套映射元素中都可使用 <subselect>。" #. Tag: title #, no-c-format @@ -684,82 +337,48 @@ msgstr "id" #. Tag: para #, no-c-format -msgid "" -"Mapped classes must 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 <id> element defines the mapping from that property to the primary key " -"column." -msgstr "" -"被映射的类必须定义对应数据库表主键字段。大多数类有一个 " -"JavaBeans 风格的属性, 为每一个实例包含唯一的标识。<id> 元素定义了该属性到数据库表主键字段的映射。" +msgid "Mapped classes must 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 <id> element defines the mapping from that property to the primary key column." +msgstr "被映射的类必须定义对应数据库表主键字段。大多数类有一个 JavaBeans 风格的属性, 为每一个实例包含唯一的标识。<id> 元素定义了该属性到数据库表主键字段的映射。" #. Tag: para #, no-c-format -msgid "" -"name (optional): the name of the identifier property." +msgid "name (optional): the name of the identifier property." msgstr "name(可选):标识属性的名字。 " #. Tag: para #, no-c-format -msgid "" -"type (optional): a name that indicates the Hibernate type." +msgid "type (optional): a name that indicates the Hibernate type." msgstr "type(可选):一个 Hibernate 类型的名字。" #. Tag: para #, no-c-format -msgid "" -"column (optional - defaults to the property name): the " -"name of the primary key column." +msgid "column (optional - defaults to the property name): the name of the primary key column." msgstr "column(可选 — 默认为属性名):主键字段的名字。 " #. Tag: para #, no-c-format -msgid "" -"unsaved-value (optional - defaults to a \"sensible\" " -"value): an identifier property value that indicates an instance is newly " -"instantiated (unsaved), distinguishing it from detached instances that were " -"saved or loaded in a previous session." -msgstr "" -"unsaved-value(可选 — 默认为一个切合实际(sensible)的" -"值):一个特定的标识属性值,用来标志该实例是刚刚创建的,尚未保存。这可以把这" -"种实例和从以前的 session 中装载过(可能又做过修改--译者注)但未再次持久化的实" -"例区分开来。 " +msgid "unsaved-value (optional - defaults to a \"sensible\" value): an identifier property value that indicates an instance is newly instantiated (unsaved), distinguishing it from detached instances that were saved or loaded in a previous session." +msgstr "unsaved-value(可选 — 默认为一个切合实际(sensible)的值):一个特定的标识属性值,用来标志该实例是刚刚创建的,尚未保存。这可以把这种实例和从以前的 session 中装载过(可能又做过修改--译者注)但未再次持久化的实例区分开来。 " #. Tag: para #, no-c-format -msgid "" -"access (optional - defaults to property): the strategy Hibernate should use for accessing the property " -"value." -msgstr "" -"access(可选 — 默认为 property):" -"Hibernate 用来访问属性值的策略。 " +msgid "access (optional - defaults to property): the strategy Hibernate should use for accessing the property value." +msgstr "access(可选 — 默认为 property):Hibernate 用来访问属性值的策略。 " #. Tag: para #, no-c-format -msgid "" -"If the name attribute is missing, it is assumed that the " -"class has no identifier property." +msgid "If the name attribute is missing, it is assumed that the class has no identifier property." msgstr "如果 name 属性不存在,会认为这个类没有标识属性。" #. Tag: para #, no-c-format -msgid "" -"The unsaved-value attribute is almost never needed in " -"Hibernate3." +msgid "The unsaved-value attribute is almost never needed in Hibernate3." msgstr "unsaved-value 属性在 Hibernate3 中几乎不再需要。" #. Tag: para #, no-c-format -msgid "" -"There is an alternative <composite-id> declaration " -"that allows access to legacy data with composite keys. Its use is strongly " -"discouraged for anything else." -msgstr "" -"还有一个另外的 <composite-id> 定义可以访问旧式的多主" -"键数据。我们非常不鼓励使用这种方式。" +msgid "There is an alternative <composite-id> declaration that allows access to legacy data with composite keys. Its use is strongly discouraged for anything else." +msgstr "还有一个另外的 <composite-id> 定义可以访问旧式的多主键数据。我们非常不鼓励使用这种方式。" #. Tag: title #, no-c-format @@ -768,29 +387,13 @@ msgstr "Generator" #. Tag: para #, no-c-format -msgid "" -"The optional <generator> 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 <param> element." -msgstr "" -"可选的 <generator> 子元素是一个 Java 类的名字,用来" -"为该持久化类的实例生成唯一的标识。如果这个生成器实例需要某些配置值或者初始化" -"参数,用 <param> 元素来传递。" +msgid "The optional <generator> 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 <param> element." +msgstr "可选的 <generator> 子元素是一个 Java 类的名字,用来为该持久化类的实例生成唯一的标识。如果这个生成器实例需要某些配置值或者初始化参数,用 <param> 元素来传递。" #. Tag: para #, no-c-format -msgid "" -"All generators implement the interface org.hibernate.id." -"IdentifierGenerator. This is a very simple interface. Some " -"applications can choose to provide their own specialized implementations, " -"however, Hibernate provides a range of built-in implementations. The " -"shortcut names for the built-in generators are as follows:" -msgstr "" -"所有的生成器都实现 org.hibernate.id.IdentifierGenerator 接" -"口。这是一个非常简单的接口;某些应用程序可以选择提供他们自己特定的实现。当" -"然,Hibernate 提供了很多内置的实现。下面是一些内置生成器的快捷名字: " +msgid "All generators implement the interface org.hibernate.id.IdentifierGenerator. This is a very simple interface. Some applications can choose to provide their own specialized implementations, however, Hibernate provides a range of built-in implementations. The shortcut names for the built-in generators are as follows:" +msgstr "所有的生成器都实现 org.hibernate.id.IdentifierGenerator 接口。这是一个非常简单的接口;某些应用程序可以选择提供他们自己特定的实现。当然,Hibernate 提供了很多内置的实现。下面是一些内置生成器的快捷名字: " #. Tag: term #, no-c-format @@ -799,15 +402,8 @@ msgstr "increment" #. Tag: para #, no-c-format -msgid "" -"generates identifiers of type long, short or int that are unique only when no other " -"process is inserting data into the same table. Do not use in a " -"cluster." -msgstr "" -"用于为 long, short 或者 int 类型生成 唯一标识。只有在没有其他进程往同一张表中插入数据时才能使" -"用。在集群下不要使用。" +msgid "generates identifiers of type long, short or int that are unique only when no other process is inserting data into the same table. Do not use in a cluster." +msgstr "用于为 long, short 或者 int 类型生成 唯一标识。只有在没有其他进程往同一张表中插入数据时才能使用。在集群下不要使用。" #. Tag: term #, no-c-format @@ -816,14 +412,8 @@ msgstr "identity" #. Tag: para #, no-c-format -msgid "" -"supports identity columns in DB2, MySQL, MS SQL Server, Sybase and " -"HypersonicSQL. The returned identifier is of type long, " -"short or int." -msgstr "" -"对 DB2,MySQL,MS SQL Server,Sybase 和 HypersonicSQL 的内置标识字段提供支" -"持。返回的标识符是 longshort 或者 " -"int 类型的。" +msgid "supports identity columns in DB2, MySQL, MS SQL Server, Sybase and HypersonicSQL. The returned identifier is of type long, short or int." +msgstr "对 DB2,MySQL,MS SQL Server,Sybase 和 HypersonicSQL 的内置标识字段提供支持。返回的标识符是 longshort 或者 int 类型的。" #. Tag: term #, no-c-format @@ -832,14 +422,8 @@ msgstr "sequence" #. Tag: para #, 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 long, " -"short or int" -msgstr "" -"在 DB2,PostgreSQL,Oracle,SAP DB,McKoi 中使用序列(sequence), 而在 " -"Interbase 中使用生成器(generator)。返回的标识符是 long," -"short 或者 int 类型的。" +msgid "uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in Interbase. The returned identifier is of type long, short or int" +msgstr "在 DB2,PostgreSQL,Oracle,SAP DB,McKoi 中使用序列(sequence), 而在 Interbase 中使用生成器(generator)。返回的标识符是 longshort 或者 int 类型的。" #. Tag: term #, no-c-format @@ -848,18 +432,8 @@ msgstr "hilo" #. Tag: para #, no-c-format -msgid "" -"uses a hi/lo algorithm to efficiently generate identifiers of type " -"long, short or int, " -"given a table and column (by default hibernate_unique_key " -"and next_hi respectively) as a source of hi values. The " -"hi/lo algorithm generates identifiers that are unique only for a particular " -"database." -msgstr "" -"使用一个高/低位算法高效的生成 longshort 或者 int 类型的标识符。给定一个表和字段(默认分别" -"是 hibernate_unique_keynext_hi)作" -"为高位值的来源。高/低位算法生成的标识符只在一个特定的数据库中是唯一的。" +msgid "uses a hi/lo algorithm to efficiently generate identifiers of type long, short or int, given a table and column (by default hibernate_unique_key and next_hi respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database." +msgstr "使用一个高/低位算法高效的生成 longshort 或者 int 类型的标识符。给定一个表和字段(默认分别是 hibernate_unique_keynext_hi)作为高位值的来源。高/低位算法生成的标识符只在一个特定的数据库中是唯一的。" #. Tag: term #, no-c-format @@ -868,14 +442,8 @@ msgstr "seqhilo" #. Tag: para #, no-c-format -msgid "" -"uses a hi/lo algorithm to efficiently generate identifiers of type " -"long, short or int, " -"given a named database sequence." -msgstr "" -"使用一个高/低位算法来高效的生成 longshort 或者 int 类型的标识符,给定一个数据库序列" -"(sequence)的名字。" +msgid "uses a hi/lo algorithm to efficiently generate identifiers of type long, short or int, given a named database sequence." +msgstr "使用一个高/低位算法来高效的生成 longshort 或者 int 类型的标识符,给定一个数据库序列(sequence)的名字。" #. Tag: term #, no-c-format @@ -884,13 +452,8 @@ msgstr "uuid" #. Tag: para #, no-c-format -msgid "" -"uses a 128-bit UUID algorithm to generate identifiers of type string that " -"are unique within a network (the IP address is used). The UUID is encoded as " -"a string of 32 hexadecimal digits in length." -msgstr "" -"用一个 128-bit 的 UUID 算法生成字符串类型的标识符,这在一个网络中是唯一的(使" -"用了 IP 地址)。UUID 被编码为一个 32 位 16 进制数字的字符串。 " +msgid "uses a 128-bit UUID algorithm to generate identifiers of type string that are unique within a network (the IP address is used). The UUID is encoded as a string of 32 hexadecimal digits in length." +msgstr "用一个 128-bit 的 UUID 算法生成字符串类型的标识符,这在一个网络中是唯一的(使用了 IP 地址)。UUID 被编码为一个 32 位 16 进制数字的字符串。 " #. Tag: term #, no-c-format @@ -909,13 +472,8 @@ msgstr "native" #. Tag: para #, no-c-format -msgid "" -"selects identity, sequence or " -"hilo depending upon the capabilities of the underlying " -"database." -msgstr "" -"根据底层数据库的能力选择 identitysequence 或者 hilo 中的一个。" +msgid "selects identity, sequence or hilo depending upon the capabilities of the underlying database." +msgstr "根据底层数据库的能力选择 identitysequence 或者 hilo 中的一个。" #. Tag: term #, no-c-format @@ -924,13 +482,8 @@ msgstr "assigned" #. Tag: para #, no-c-format -msgid "" -"lets the application assign an identifier to the object before save" -"() is called. This is the default strategy if no <" -"generator> element is specified." -msgstr "" -"让应用程序在调用 save() 之前为对象分配一个标识符。这是 " -"<generator> 元素没有指定时的默认生成策略。" +msgid "lets the application assign an identifier to the object before save() is called. This is the default strategy if no <generator> element is specified." +msgstr "让应用程序在调用 save() 之前为对象分配一个标识符。这是 <generator> 元素没有指定时的默认生成策略。" #. Tag: term #, no-c-format @@ -939,9 +492,7 @@ msgstr "select" #. Tag: para #, 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." +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: term @@ -951,13 +502,8 @@ msgstr "foreign" #. Tag: para #, no-c-format -msgid "" -"uses the identifier of another associated object. It is usually used in " -"conjunction with a <one-to-one> primary key " -"association." -msgstr "" -"使用另外一个相关联的对象的标识符。它通常和 <one-to-one> 联合起来使用。" +msgid "uses the identifier of another associated object. It is usually used in conjunction with a <one-to-one> primary key association." +msgstr "使用另外一个相关联的对象的标识符。它通常和 <one-to-one> 联合起来使用。" #. Tag: term #, no-c-format @@ -966,18 +512,8 @@ msgstr "sequence-identity" #. Tag: para #, no-c-format -msgid "" -"a specialized sequence generation strategy that utilizes a database sequence " -"for the actual value generation, but combines this with JDBC3 " -"getGeneratedKeys to return the generated identifier value as part of the " -"insert statement execution. This strategy is only supported on Oracle 10g " -"drivers targeted for JDK 1.4. 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,这些插入语句的注释被关闭了。" +msgid "a specialized sequence generation strategy that utilizes a database sequence for the actual value generation, but combines this with JDBC3 getGeneratedKeys to return the generated identifier value as part of the insert statement execution. This strategy is only supported on Oracle 10g drivers targeted for JDK 1.4. 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,这些插入语句的注释被关闭了。" #. Tag: title #, no-c-format @@ -986,31 +522,13 @@ msgstr "高/低位算法(Hi/Lo Algorithm)" #. Tag: para #, no-c-format -msgid "" -"The hilo and seqhilo generators " -"provide two alternate implementations of the hi/lo algorithm. The first " -"implementation requires a \"special\" database table to hold the next " -"available \"hi\" value. Where supported, the second uses an Oracle-style " -"sequence." -msgstr "" -"hiloseqhilo 生成器给出了两种 hi/lo " -"算法的实现, 这是一种很令人满意的标识符生成算法。第一种实现需要一个“特殊”的数" -"据库表来保存下一个可用的“hi”值。 第二种实现使用一个 Oracle 风格的序列(在被支" -"持的情况下)。 " +msgid "The hilo and seqhilo generators provide two alternate implementations of the hi/lo algorithm. The first implementation requires a \"special\" database table to hold the next available \"hi\" value. Where supported, the second uses an Oracle-style sequence." +msgstr "hiloseqhilo 生成器给出了两种 hi/lo 算法的实现, 这是一种很令人满意的标识符生成算法。第一种实现需要一个“特殊”的数据库表来保存下一个可用的“hi”值。 第二种实现使用一个 Oracle 风格的序列(在被支持的情况下)。 " #. Tag: para #, no-c-format -msgid "" -"Unfortunately, you cannot use hilo when supplying your " -"own Connection to Hibernate. When Hibernate uses an " -"application server datasource to obtain connections enlisted with JTA, you " -"must configure the hibernate.transaction.manager_lookup_class." -msgstr "" -"可惜的是,你在为 Hibernate 自行提供 Connection 时无法使用 " -"hilo。 当 Hibernate 使用 JTA 获取应用服务器的数据源连接" -"时,你必须正确地配置 hibernate.transaction.manager_lookup_class。" +msgid "Unfortunately, you cannot use hilo when supplying your own Connection to Hibernate. When Hibernate uses an application server datasource to obtain connections enlisted with JTA, you must configure the hibernate.transaction.manager_lookup_class." +msgstr "可惜的是,你在为 Hibernate 自行提供 Connection 时无法使用 hilo。 当 Hibernate 使用 JTA 获取应用服务器的数据源连接时,你必须正确地配置 hibernate.transaction.manager_lookup_class。" #. Tag: title #, no-c-format @@ -1019,15 +537,8 @@ msgstr "UUID 算法(UUID Algorithm )" #. Tag: para #, no-c-format -msgid "" -"The UUID contains: IP address, startup time of the JVM that is accurate to a " -"quarter second, system time and a counter value that is unique within the " -"JVM. It is not possible to obtain a MAC address or memory address from Java " -"code, so this is the best option without using JNI." -msgstr "" -"UUID 包含:IP 地址、JVM 的启动时间(精确到 1/4 秒)、系统时间和一个计数器值" -"(在 JVM 中唯一)。 在 Java 代码中不可能获得 MAC 地址或者内存地址,所以这已经" -"是我们在不使用 JNI 的前提下的能做的最好实现了。" +msgid "The UUID contains: IP address, startup time of the JVM that is accurate to a quarter second, system time and a counter value that is unique within the JVM. It is not possible to obtain a MAC address or memory address from Java code, so this is the best option without using JNI." +msgstr "UUID 包含:IP 地址、JVM 的启动时间(精确到 1/4 秒)、系统时间和一个计数器值(在 JVM 中唯一)。 在 Java 代码中不可能获得 MAC 地址或者内存地址,所以这已经是我们在不使用 JNI 的前提下的能做的最好实现了。" #. Tag: title #, no-c-format @@ -1036,30 +547,13 @@ msgstr "标识字段和序列(Identity columns and Sequences)" #. Tag: para #, no-c-format -msgid "" -"For databases that support identity columns (DB2, MySQL, Sybase, MS SQL), " -"you can use identity key generation. For databases that " -"support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you " -"can use sequence style key generation. Both of these " -"strategies require two SQL queries to insert a new object. For example:" -msgstr "" -"对于内部支持标识字段的数据库(DB2、MySQL、Sybase 和 MS SQL),你可以使用 " -"identity 关键字生成。对于内部支持序列的数据库(DB2、" -"Oracle、PostgreSQL、Interbase、McKoi 和 SAP DB),你可以使用 " -"sequence 风格的关键字生成。这两种方式对于插入一个新的对象" -"都需要两次 SQL 查询。例如:" +msgid "For databases that support identity columns (DB2, MySQL, Sybase, MS SQL), you can use identity key generation. For databases that support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you can use sequence style key generation. Both of these strategies require two SQL queries to insert a new object. For example:" +msgstr "对于内部支持标识字段的数据库(DB2、MySQL、Sybase 和 MS SQL),你可以使用 identity 关键字生成。对于内部支持序列的数据库(DB2、Oracle、PostgreSQL、Interbase、McKoi 和 SAP DB),你可以使用 sequence 风格的关键字生成。这两种方式对于插入一个新的对象都需要两次 SQL 查询。例如:" #. Tag: para #, no-c-format -msgid "" -"For cross-platform development, the native strategy will, " -"depending on the capabilities of the underlying database, choose from the " -"identity, sequence and hilo strategies." -msgstr "" -"对于跨平台开发,native 策略会从 identitysequencehilo 中进行选择," -"选择哪一个,这取决于底层数据库的支持能力。" +msgid "For cross-platform development, the native strategy will, depending on the capabilities of the underlying database, choose from the identity, sequence and hilo strategies." +msgstr "对于跨平台开发,native 策略会从 identitysequencehilo 中进行选择,选择哪一个,这取决于底层数据库的支持能力。" #. Tag: title #, no-c-format @@ -1068,35 +562,13 @@ msgstr "程序分配的标识符(Assigned Identifiers)" #. Tag: para #, no-c-format -msgid "" -"If you want the application to assign identifiers, as opposed to having " -"Hibernate generate them, you can use the assigned " -"generator. This special generator uses the identifier value already assigned " -"to the object's identifier property. The generator is used when the primary " -"key is a natural key instead of a surrogate key. This is the default " -"behavior if you do not specify a <generator> " -"element." -msgstr "" -"如果你需要应用程序分配一个标示符(而非 Hibernate 来生成),你可以使用 " -"assigned 生成器。这种特殊的生成器会使用已经分配给对象的标" -"识符属性的标识符值。 这个生成器使用一个自然键(natural key,有商业意义的列-" -"译注)作为主键,而不是使用一个代理键( surrogate key,没有商业意义的列-译" -"注)。这是没有指定 <generator> 元素时的默认行为。" +msgid "If you want the application to assign identifiers, as opposed to having Hibernate generate them, you can use the assigned generator. This special generator uses the identifier value already assigned to the object's identifier property. The generator is used when the primary key is a natural key instead of a surrogate key. This is the default behavior if you do not specify a <generator> element." +msgstr "如果你需要应用程序分配一个标示符(而非 Hibernate 来生成),你可以使用 assigned 生成器。这种特殊的生成器会使用已经分配给对象的标识符属性的标识符值。 这个生成器使用一个自然键(natural key,有商业意义的列-译注)作为主键,而不是使用一个代理键( surrogate key,没有商业意义的列-译注)。这是没有指定 <generator> 元素时的默认行为。" #. Tag: para #, no-c-format -msgid "" -"The assigned generator makes Hibernate use " -"unsaved-value=\"undefined\". This forces 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 Interceptor." -"isUnsaved()." -msgstr "" -"当选择 assigned 生成器时,除非有一个 version 或 timestamp " -"属性,或者你定义了 Interceptor.isUnsaved(),否则需要让 " -"Hiberante 使用 unsaved-value=\"undefined\",强制 " -"Hibernatet 查询数据库来确定一个实例是瞬时的(transient) 还是脱管的" -"(detached)。" +msgid "The assigned generator makes Hibernate use unsaved-value=\"undefined\". This forces 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 Interceptor.isUnsaved()." +msgstr "当选择 assigned 生成器时,除非有一个 version 或 timestamp 属性,或者你定义了 Interceptor.isUnsaved(),否则需要让 Hiberante 使用 unsaved-value=\"undefined\",强制 Hibernatet 查询数据库来确定一个实例是瞬时的(transient) 还是脱管的(detached)。" #. Tag: title #, no-c-format @@ -1105,21 +577,13 @@ msgstr "触发器实现的主键生成器(Primary keys assigned by triggers) #. Tag: para #, no-c-format -msgid "" -"Hibernate does not generate DDL with triggers. It is for legacy schemas only." +msgid "Hibernate does not generate DDL with triggers. It is for legacy schemas only." msgstr "仅仅用于遗留的 schema 中(Hibernate 不能用触发器生成 DDL)。" #. Tag: para #, no-c-format -msgid "" -"In the above example, there is a unique valued property named " -"socialSecurityNumber. It is defined by the class, as a " -"natural key and a surrogate key named person_id, whose " -"value is generated by a trigger." -msgstr "" -"在上面的例子中,类定义了一个命名为 socialSecurityNumber 的" -"具有唯一值的属性,它是一个自然键(natural key),命名为 person_id 的代理键(surrogate key)的值由触发器生成。" +msgid "In the above example, there is a unique valued property named socialSecurityNumber. It is defined by the class, as a natural key and a surrogate key named person_id, whose value is generated by a trigger." +msgstr "在上面的例子中,类定义了一个命名为 socialSecurityNumber 的具有唯一值的属性,它是一个自然键(natural key),命名为 person_id 的代理键(surrogate key)的值由触发器生成。" #. Tag: title #, no-c-format @@ -1128,212 +592,88 @@ msgstr "增强的标识符生成器" #. Tag: para #, 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 Optimization means that " -"you do not have 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 "" -"从 3.2.3 版本开始,有两个代表不同标识符生成概念的新的生成器。第一个概念是数据" -"库移植性;第二个是优化。优化表示你不需对每个新标识符的请求都查询数据库。从 " -"3.3.x 开始,这两个新的生成器都是用来取代上面所述的生成器的。然而,它们也包括" -"在当前版本里且可以由 FQN 进行引用。" +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 Optimization means that you do not have 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 "从 3.2.3 版本开始,有两个代表不同标识符生成概念的新的生成器。第一个概念是数据库移植性;第二个是优化。优化表示你不需对每个新标识符的请求都查询数据库。从 3.3.x 开始,这两个新的生成器都是用来取代上面所述的生成器的。然而,它们也包括在当前版本里且可以由 FQN 进行引用。" #. Tag: para #, no-c-format -msgid "" -"The first of these new generators is org.hibernate.id.enhanced." -"SequenceStyleGenerator which is intended, firstly, as a " -"replacement for the sequence generator and, secondly, as " -"a better portability generator than native. This is " -"because native generally chooses between " -"identity and sequence which have " -"largely different semantics that can cause subtle issues in applications " -"eyeing portability. org.hibernate.id.enhanced." -"SequenceStyleGenerator, however, achieves portability in a " -"different manner. It chooses between 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 native is that table-based and sequence-based storage have the same exact " -"semantic. In fact, sequences are exactly what Hibernate tries to emulate " -"with its table-based generators. This generator has a number of " -"configuration parameters:" -msgstr "" -"这些生成器的第一个是 org.hibernate.id.enhanced." -"SequenceStyleGenerator,首先,它是作为 sequence " -"生成器的替代物,其次,它是比 native 具有更好移植性的生成" -"器。这是因为 native 通常在 identity 和 " -"sequence 之间选择,它有差别很大的 semantic,在移植时会导致" -"潜在的问题。然而,org.hibernate.id.enhanced.SequenceStyleGenerator 以不同的方式实现移植性。它根据所使用的方言的能力,在数据库表或序列之" -"间选择以存储其增量。这和 native 的区别是基于表或序列的存储" -"具有恰好相同的 semantic。实际上,序列就是 Hibernate 试图用基于表的生成器来模" -"拟的。这个生成器有如下的配置参数:" +msgid "The first of these new generators is org.hibernate.id.enhanced.SequenceStyleGenerator which is intended, firstly, as a replacement for the sequence generator and, secondly, as a better portability generator than native. This is because native generally chooses between identity and sequence which have largely different semantics that can cause subtle issues in applications eyeing portability. org.hibernate.id.enhanced.SequenceStyleGenerator, however, achieves portability in a different manner. It chooses between 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 native is that table-based and sequence-based storage have the same exact semantic. In fact, sequences are exactly what Hibernate tries to emulate with its table-based generators. This generator has a number of configuration parameters:" +msgstr "这些生成器的第一个是 org.hibernate.id.enhanced.SequenceStyleGenerator,首先,它是作为 sequence 生成器的替代物,其次,它是比 native 具有更好移植性的生成器。这是因为 native 通常在 identitysequence 之间选择,它有差别很大的 semantic,在移植时会导致潜在的问题。然而,org.hibernate.id.enhanced.SequenceStyleGenerator 以不同的方式实现移植性。它根据所使用的方言的能力,在数据库表或序列之间选择以存储其增量。这和 native 的区别是基于表或序列的存储具有恰好相同的 semantic。实际上,序列就是 Hibernate 试图用基于表的生成器来模拟的。这个生成器有如下的配置参数:" #. Tag: para #, no-c-format -msgid "" -"sequence_name (optional, defaults to " -"hibernate_sequence): the name of the sequence or table to " -"be used." -msgstr "" -"sequence_name(可选 — 默认为 hibernate_sequence):序列或表的名字" +msgid "sequence_name (optional, defaults to hibernate_sequence): the name of the sequence or table to be used." +msgstr "sequence_name(可选 — 默认为 hibernate_sequence):序列或表的名字" #. Tag: para #, no-c-format -msgid "" -"initial_value (optional, defaults to 1): the initial value to be retrieved from the sequence/table. In " -"sequence creation terms, this is analogous to the clause typically named " -"\"STARTS WITH\"." -msgstr "" -"initial_value(可选,默认为 1):从序" -"列/表里获取的初始值。按照序列创建的术语,这等同于子句 \"STARTS WITH\"。" +msgid "initial_value (optional, defaults to 1): the initial value to be retrieved from the sequence/table. In sequence creation terms, this is analogous to the clause typically named \"STARTS WITH\"." +msgstr "initial_value(可选,默认为 1):从序列/表里获取的初始值。按照序列创建的术语,这等同于子句 \"STARTS WITH\"。" #. Tag: para #, no-c-format -msgid "" -"increment_size (optional - defaults to 1): the value by which subsequent calls to the sequence/table should " -"differ. In sequence creation terms, this is analogous to the clause " -"typically named \"INCREMENT BY\"." -msgstr "" -"increment_size(可选 - 缺省为 1):对序" -"列/表的调用应该区分的值。按照序列创建的术语,这等同于子句 \"INCREMENT BY\"。" +msgid "increment_size (optional - defaults to 1): the value by which subsequent calls to the sequence/table should differ. In sequence creation terms, this is analogous to the clause typically named \"INCREMENT BY\"." +msgstr "increment_size(可选 - 缺省为 1):对序列/表的调用应该区分的值。按照序列创建的术语,这等同于子句 \"INCREMENT BY\"。" #. Tag: para #, no-c-format -msgid "" -"force_table_use (optional - defaults to false): should we force the use of a table as the backing structure even " -"though the dialect might support sequence?" -msgstr "" -"force_table_use(可选 - 缺省为 false):即使方言可能支持序列,是否也应该强制把表用作后台结构。" +msgid "force_table_use (optional - defaults to false): should we force the use of a table as the backing structure even though the dialect might support sequence?" +msgstr "force_table_use(可选 - 缺省为 false):即使方言可能支持序列,是否也应该强制把表用作后台结构。" #. Tag: para #, no-c-format -msgid "" -"value_column (optional - defaults to next_val): only relevant for table structures, it is the name of the column " -"on the table which is used to hold the value." -msgstr "" -"value_column(可选 - 缺省为 next_val):只和表结构相关,它是用于保存值的字段的名称。" +msgid "value_column (optional - defaults to next_val): only relevant for table structures, it is the name of the column on the table which is used to hold the value." +msgstr "value_column(可选 - 缺省为 next_val):只和表结构相关,它是用于保存值的字段的名称。" #. Tag: para #, no-c-format -msgid "" -"optimizer (optional - defaults to none): See " -msgstr "" -"optimizer(可选 — 默认是none):请参考 " -"。" +msgid "optimizer (optional - defaults to none): See " +msgstr "optimizer(可选 — 默认是none):请参考 。" #. Tag: para #, no-c-format -msgid "" -"The second of these new generators is org.hibernate.id.enhanced." -"TableGenerator, which is intended, firstly, as a replacement for " -"the table generator, even though it actually functions " -"much more like org.hibernate.id.MultipleHiLoPerTableGenerator, and secondly, as a re-implementation of org.hibernate.id." -"MultipleHiLoPerTableGenerator that utilizes the notion of " -"pluggable optimizers. 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 "" -"新生成器的第二个是 org.hibernate.id.enhanced.TableGenerator,它的目的首先是替代 table 生成器,即使它实际上比 " -"org.hibernate.id.MultipleHiLoPerTableGenerator 功能要强得" -"多;其次,作为利用可插拔 optimizer 的 org.hibernate.id." -"MultipleHiLoPerTableGenerator 的替代品。基本上这个生成器定义了一个" -"可以利用多个不同的键值记录存储大量不同增量值的表。这个生成器有如下的配置参" -"数:" +msgid "The second of these new generators is org.hibernate.id.enhanced.TableGenerator, which is intended, firstly, as a replacement for the table generator, even though it actually functions much more like org.hibernate.id.MultipleHiLoPerTableGenerator, and secondly, as a re-implementation of org.hibernate.id.MultipleHiLoPerTableGenerator that utilizes the notion of pluggable optimizers. 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 "新生成器的第二个是 org.hibernate.id.enhanced.TableGenerator,它的目的首先是替代 table 生成器,即使它实际上比 org.hibernate.id.MultipleHiLoPerTableGenerator 功能要强得多;其次,作为利用可插拔 optimizer 的 org.hibernate.id.MultipleHiLoPerTableGenerator 的替代品。基本上这个生成器定义了一个可以利用多个不同的键值记录存储大量不同增量值的表。这个生成器有如下的配置参数:" #. Tag: para #, no-c-format -msgid "" -"table_name (optional - defaults to " -"hibernate_sequences): the name of the table to be used." -msgstr "" -"table_name(可选 — 默认是 hibernate_sequences):所用的表的名称。" +msgid "table_name (optional - defaults to hibernate_sequences): the name of the table to be used." +msgstr "table_name(可选 — 默认是 hibernate_sequences):所用的表的名称。" #. Tag: para #, no-c-format -msgid "" -"value_column_name (optional - defaults to " -"next_val): the name of the column on the table that is " -"used to hold the value." -msgstr "" -"value_column_name(可选 — 默认为 next_val):用于存储这些值的表的字段的名字。" +msgid "value_column_name (optional - defaults to next_val): the name of the column on the table that is used to hold the value." +msgstr "value_column_name(可选 — 默认为 next_val):用于存储这些值的表的字段的名字。" #. Tag: para #, no-c-format -msgid "" -"segment_column_name (optional - defaults to " -"sequence_name): the name of the column on the table that " -"is used to hold the \"segment key\". This is the value which identifies " -"which increment value to use." -msgstr "" -"segment_column_name(可选,默认为 sequence_name):用于保存 \"segment key\" 的字段的名称。这是标识使用哪个增量值的" -"值。" +msgid "segment_column_name (optional - defaults to sequence_name): the name of the column on the table that is used to hold the \"segment key\". This is the value which identifies which increment value to use." +msgstr "segment_column_name(可选,默认为 sequence_name):用于保存 \"segment key\" 的字段的名称。这是标识使用哪个增量值的值。" #. Tag: para #, no-c-format -msgid "" -"segment_value (optional - defaults to default): The \"segment key\" value for the segment from which we want to " -"pull increment values for this generator." -msgstr "" -"segment_value(可选,默认为 default):" -"我们为这个生成器获取增量值的 segment 的 \"segment key\"。" +msgid "segment_value (optional - defaults to default): The \"segment key\" value for the segment from which we want to pull increment values for this generator." +msgstr "segment_value(可选,默认为 default):我们为这个生成器获取增量值的 segment 的 \"segment key\"。" #. Tag: para #, no-c-format -msgid "" -"segment_value_length (optional - defaults to " -"255): Used for schema generation; the column size to " -"create this segment key column." -msgstr "" -"segment_value_length(可选 — 默认为 255):用于 schema 生成;创建 Segment Key 字段的字段大小。" +msgid "segment_value_length (optional - defaults to 255): Used for schema generation; the column size to create this segment key column." +msgstr "segment_value_length(可选 — 默认为 255):用于 schema 生成;创建 Segment Key 字段的字段大小。" #. Tag: para #, no-c-format -msgid "" -"initial_value (optional - defaults to 1): The initial value to be retrieved from the table." -msgstr "" -"initial_value(可选 — 默认是 1):从表" -"里获取的初始值。" +msgid "initial_value (optional - defaults to 1): The initial value to be retrieved from the table." +msgstr "initial_value(可选 — 默认是 1):从表里获取的初始值。" #. Tag: para #, no-c-format -msgid "" -"increment_size (optional - defaults to 1): The value by which subsequent calls to the table should differ." -msgstr "" -"increment_size(可选 — 默认是 1):对表" -"随后的调用应该区分的值。" +msgid "increment_size (optional - defaults to 1): The value by which subsequent calls to the table should differ." +msgstr "increment_size(可选 — 默认是 1):对表随后的调用应该区分的值。" #. Tag: para #, no-c-format -msgid "" -"optimizer (optional - defaults to ): " -"See " -msgstr "" -"optimizer(可选 — 默认是 ):请参考 " -"。" +msgid "optimizer (optional - defaults to ): See " +msgstr "optimizer(可选 — 默认是 ):请参考 。" #. Tag: title #, no-c-format @@ -1342,58 +682,23 @@ msgstr "标识符生成器的优化" #. Tag: para #, no-c-format -msgid "" -"For identifier generators that 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 can 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 ( " -"support this operation." -msgstr "" -"对于在数据库里存储值的标识符生成器,生成新标识符时的每次调用都访问数据库是低" -"效的。因此,你可以把它们在内存里分组并只有在快用光内存时才访问数据库。这是可" -"插拔 optimizer 的任务。目前只有两个增强型的生成器支持这个操作()。 " +msgid "For identifier generators that 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 can 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 ( support this operation." +msgstr "对于在数据库里存储值的标识符生成器,生成新标识符时的每次调用都访问数据库是低效的。因此,你可以把它们在内存里分组并只有在快用光内存时才访问数据库。这是可插拔 optimizer 的任务。目前只有两个增强型的生成器支持这个操作()。 " #. Tag: para #, no-c-format -msgid "" -"none (generally this is the default if no optimizer was " -"specified): this will not perform any optimizations and hit the database for " -"each and every request." -msgstr "" -"none(如果没有指定 optimizer,通常这是缺省配置):这不会执" -"行任何优化,在每次请求时都访问数据库。" +msgid "none (generally this is the default if no optimizer was specified): this will not perform any optimizations and hit the database for each and every request." +msgstr "none(如果没有指定 optimizer,通常这是缺省配置):这不会执行任何优化,在每次请求时都访问数据库。" #. Tag: para #, no-c-format -msgid "" -"hilo: 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 " -"increment_size is multiplied by that value in memory to " -"define a group \"hi value\"." -msgstr "" -"hilo:对从数据库获取的值应用 hi/lo 算法。用于这个 " -"optimizer 的从数据库获取的值应该是有序的。它们表明“组编号”。" -"increment_size 将乘以内存里的值来定义组的“hi 值”。" +msgid "hilo: 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 increment_size is multiplied by that value in memory to define a group \"hi value\"." +msgstr "hilo:对从数据库获取的值应用 hi/lo 算法。用于这个 optimizer 的从数据库获取的值应该是有序的。它们表明“组编号”。increment_size 将乘以内存里的值来定义组的“hi 值”。" #. Tag: para #, no-c-format -msgid "" -"pooled: as with the case of hilo, this " -"optimizer 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. Here, increment_size refers to " -"the values coming from the database." -msgstr "" -"pooled:和 hilo 一样,这个 optimizer 试" -"图最小化对数据库的访问。然而,我们只是简单地把“下一组”的起始值而不是把序列值" -"和分组算法的组合存入到数据库结构里。在这里,increment_size 表示数据库里的值。" +msgid "pooled: as with the case of hilo, this optimizer 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. Here, increment_size refers to the values coming from the database." +msgstr "pooled:和 hilo 一样,这个 optimizer 试图最小化对数据库的访问。然而,我们只是简单地把“下一组”的起始值而不是把序列值和分组算法的组合存入到数据库结构里。在这里,increment_size 表示数据库里的值。" #. Tag: title #, no-c-format @@ -1402,147 +707,68 @@ msgstr "composite-id" #. Tag: para #, no-c-format -msgid "" -"A table with a composite key can be mapped with multiple properties of the " -"class as identifier properties. The <composite-id> " -"element accepts <key-property> property mappings " -"and <key-many-to-one> mappings as child elements." -msgstr "" -"如果表使用联合主键,你可以映射类的多个属性为标识符属性。<" -"composite-id> 元素接受 <key-property> " -"属性映射和 <key-many-to-one> 属性映射作为子元素。 " +msgid "A table with a composite key can be mapped with multiple properties of the class as identifier properties. The <composite-id> element accepts <key-property> property mappings and <key-many-to-one> mappings as child elements." +msgstr "如果表使用联合主键,你可以映射类的多个属性为标识符属性。<composite-id> 元素接受 <key-property> 属性映射和 <key-many-to-one> 属性映射作为子元素。 " #. Tag: para #, no-c-format -msgid "" -"The persistent class must override equals() and hashCode() to implement composite identifier " -"equality. It must also implement Serializable." -msgstr "" -"你的持久化类必须覆盖 equals() 和 " -"hashCode() 方法,来实现组合的标识符的相等判断。实现 " -"Serializable 接口也是必须的。" +msgid "The persistent class must override equals() and hashCode() to implement composite identifier equality. It must also implement Serializable." +msgstr "你的持久化类必须覆盖 equals()hashCode() 方法,来实现组合的标识符的相等判断。实现 Serializable 接口也是必须的。" #. Tag: para #, no-c-format -msgid "" -"Unfortunately, this approach 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 load() the " -"persistent state associated with a composite key. We call this approach an " -"embedded composite identifier, and discourage it for " -"serious applications." -msgstr "" -"不幸的是,这种组合关键字的方法意味着一个持久化类是它自己的标识。除了对象自己" -"之外,没有什么方便的“把手”可用。你必须初始化持久化类的实例,填充它的标识符属" -"性,再 load() 组合关键字关联的持久状态。我们把这种方法称" -"为 embedded(嵌入式)的组合标识符,在重要的应用中不鼓励" -"使用这种用法。 " +msgid "Unfortunately, this approach 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 load() the persistent state associated with a composite key. We call this approach an embedded composite identifier, and discourage it for serious applications." +msgstr "不幸的是,这种组合关键字的方法意味着一个持久化类是它自己的标识。除了对象自己之外,没有什么方便的“把手”可用。你必须初始化持久化类的实例,填充它的标识符属性,再 load() 组合关键字关联的持久状态。我们把这种方法称为 embedded(嵌入式)的组合标识符,在重要的应用中不鼓励使用这种用法。 " #. Tag: para #, no-c-format -msgid "" -"A second approach is what we call a mapped composite " -"identifier, where the identifier properties named inside the <" -"composite-id> element are duplicated on both the persistent " -"class and a separate identifier class." -msgstr "" -"第二种方法我们称为 mapped(映射式)组合标识符(mapped " -"composite identifier),<composite-id> 元素中列出的" -"标识属性不但在持久化类出现,还形成一个独立的标识符类。" +msgid "A second approach is what we call a mapped composite identifier, where the identifier properties named inside the <composite-id> element are duplicated on both the persistent class and a separate identifier class." +msgstr "第二种方法我们称为 mapped(映射式)组合标识符(mapped composite identifier),<composite-id> 元素中列出的标识属性不但在持久化类出现,还形成一个独立的标识符类。" #. Tag: para #, no-c-format -msgid "" -"In this example, both the composite identifier class, MedicareId, and the entity class itself have properties named " -"medicareNumber and dependent. The " -"identifier class must override equals() and " -"hashCode() and implement Serializable. " -"The main disadvantage of this approach is code duplication." -msgstr "" -"在这个例子中,组合标识符类 MedicareId 和实体类都含有 " -"medicareNumberdependent 属性。标识" -"符类必须重载 equals()hashCode() 并" -"且实现 Serializable 接口。这种方法的缺点是出现了明显的代码" -"重复。" +msgid "In this example, both the composite identifier class, MedicareId, and the entity class itself have properties named medicareNumber and dependent. The identifier class must override equals() and hashCode() and implement Serializable. The main disadvantage of this approach is code duplication." +msgstr "在这个例子中,组合标识符类 MedicareId 和实体类都含有 medicareNumberdependent 属性。标识符类必须重载 equals()hashCode() 并且实现 Serializable 接口。这种方法的缺点是出现了明显的代码重复。" #. Tag: para #, no-c-format -msgid "" -"The following attributes are used to specify a mapped composite identifier:" +msgid "The following attributes are used to specify a mapped composite identifier:" msgstr "下面列出的属性是用来指定一个映射式组合标识符的:" #. Tag: para #, no-c-format -msgid "" -"mapped (optional - defaults to false): " -"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 "" -"mapped(可选,默认为 false):指明使用" -"一个映射式组合标识符,其包含的属性映射同时在实体类和组合标识符类中出现。 " +msgid "mapped (optional - defaults to false): 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 "mapped(可选,默认为 false):指明使用一个映射式组合标识符,其包含的属性映射同时在实体类和组合标识符类中出现。 " #. Tag: para #, no-c-format -msgid "" -"class (optional - but required for a mapped composite " -"identifier): the class used as a composite identifier." -msgstr "" -"class(可选,但对映射式组合标识符必须指定):作为组合标识符" -"类使用的类名。" +msgid "class (optional - but required for a mapped composite identifier): the class used as a composite identifier." +msgstr "class(可选,但对映射式组合标识符必须指定):作为组合标识符类使用的类名。" #. Tag: para #, no-c-format -msgid "" -"We will describe a third, even more convenient approach, where the composite " -"identifier is implemented as a component class in . The attributes described below apply only to this " -"alternative approach:" -msgstr "" -"在 一节中,我们会描述第三种方式,那" -"就是把组合标识符实现为一个组件(component)类,这是更方便的方法。下面的属性仅" -"对第三种方法有效: " +msgid "We will describe a third, even more convenient approach, where the composite identifier is implemented as a component class in . The attributes described below apply only to this alternative approach:" +msgstr "在 一节中,我们会描述第三种方式,那就是把组合标识符实现为一个组件(component)类,这是更方便的方法。下面的属性仅对第三种方法有效: " #. Tag: para #, no-c-format -msgid "" -"name (optional - required for this approach): a property " -"of component type that holds the composite identifier. Please see chapter 9 " -"for more information." -msgstr "" -"name(可选,但对这种方法而言必须):包含此组件标识符的组件" -"类型的名字(参阅第 9 章)。" +msgid "name (optional - required for this approach): a property of component type that holds the composite identifier. Please see chapter 9 for more information." +msgstr "name(可选,但对这种方法而言必须):包含此组件标识符的组件类型的名字(参阅第 9 章)。" #. Tag: para #, no-c-format -msgid "" -"access (optional - defaults to property): the strategy Hibernate uses for accessing the property value." -msgstr "" -"access(可选 — 默认为 property):" -"Hibernate 用来访问属性值的策略。 " +msgid "access (optional - defaults to property): the strategy Hibernate uses for accessing the property value." +msgstr "access(可选 — 默认为 property):Hibernate 用来访问属性值的策略。 " #. Tag: para #, no-c-format -msgid "" -"class (optional - defaults to the property type " -"determined by reflection): the component class used as a composite " -"identifier. Please see the next section for more information." -msgstr "" -"class(可选 — 默认会用反射来自动判定属性类型 ):用来作为" -"组合标识符的组件类的类名(参阅下一节)。 " +msgid "class (optional - defaults to the property type determined by reflection): the component class used as a composite identifier. Please see the next section for more information." +msgstr "class(可选 — 默认会用反射来自动判定属性类型 ):用来作为组合标识符的组件类的类名(参阅下一节)。 " #. Tag: para #, no-c-format -msgid "" -"The third approach, an identifier component, is " -"recommended for almost all applications." -msgstr "" -"第三种方式,被称为 identifier component(标识符组件)是" -"我们对几乎所有应用都推荐使用的方式。 " +msgid "The third approach, an identifier component, is recommended for almost all applications." +msgstr "第三种方式,被称为 identifier component(标识符组件)是我们对几乎所有应用都推荐使用的方式。 " #. Tag: title #, no-c-format @@ -1551,105 +777,48 @@ msgstr "鉴别器(discriminator) " #. Tag: para #, no-c-format -msgid "" -"The <discriminator> element is required for " -"polymorphic persistence using the table-per-class-hierarchy mapping " -"strategy. It 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 can be used: " -"string, character, integer, byte, short, " -"boolean, yes_no, true_false." -msgstr "" -"在\"一棵对象继承树对应一个表\"的策略中,<discriminator> 元素是必需的,它定义了表的鉴别器字段。鉴别器字段包含标志值,用于告知" -"持久化层应该为某个特定的行创建哪一个子类的实例。如下这些受到限制的类型可以使" -"用:stringcharacter、" -"integerbyteshortbooleanyes_no、" -"true_false。" +msgid "The <discriminator> element is required for polymorphic persistence using the table-per-class-hierarchy mapping strategy. It 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 can be used: string, character, integer, byte, short, boolean, yes_no, true_false." +msgstr "在\"一棵对象继承树对应一个表\"的策略中,<discriminator> 元素是必需的,它定义了表的鉴别器字段。鉴别器字段包含标志值,用于告知持久化层应该为某个特定的行创建哪一个子类的实例。如下这些受到限制的类型可以使用:stringcharacterintegerbyteshortbooleanyes_notrue_false。" #. Tag: para #, no-c-format -msgid "" -"column (optional - defaults to class): " -"the name of the discriminator column." -msgstr "" -"column(可选 — 默认为 class)" -"discriminator 器字段的名字。" +msgid "column (optional - defaults to class): the name of the discriminator column." +msgstr "column(可选 — 默认为 class)discriminator 器字段的名字。" #. Tag: para #, no-c-format -msgid "" -"type (optional - defaults to string): " -"a name that indicates the Hibernate type" -msgstr "" -"type(可选 — 默认为 string)一个 " -"Hibernate 字段类型的名字 " +msgid "type (optional - defaults to string): a name that indicates the Hibernate type" +msgstr "type(可选 — 默认为 string)一个 Hibernate 字段类型的名字 " #. Tag: para #, no-c-format -msgid "" -"force (optional - defaults to false): " -"\"forces\" Hibernate to specify the allowed discriminator values, even when " -"retrieving all instances of the root class." -msgstr "" -"force(强制)(可选 — 默认为 false)\"强" -"制\" Hibernate 指定允许的鉴别器值,即使当取得的所有实例都是根类的。 " +msgid "force (optional - defaults to false): \"forces\" Hibernate to specify the allowed discriminator values, even when retrieving all instances of the root class." +msgstr "force(强制)(可选 — 默认为 false)\"强制\" Hibernate 指定允许的鉴别器值,即使当取得的所有实例都是根类的。 " #. Tag: para #, no-c-format -msgid "" -"insert (optional - defaults to true): " -"set this to false if your discriminator column is also " -"part of a mapped composite identifier. It tells Hibernate not to include the " -"column in SQL INSERTs." -msgstr "" -"insert(可选 - 默认为true)如果你的鉴别" -"器字段也是映射为复合标识(composite identifier)的一部分,则需将这个值设为 " -"false。(告诉 Hibernate 在做 SQL INSERT 时不包含该列) " +msgid "insert (optional - defaults to true): set this to false if your discriminator column is also part of a mapped composite identifier. It tells Hibernate not to include the column in SQL INSERTs." +msgstr "insert(可选 - 默认为true)如果你的鉴别器字段也是映射为复合标识(composite identifier)的一部分,则需将这个值设为 false。(告诉 Hibernate 在做 SQL INSERT 时不包含该列) " #. Tag: para #, no-c-format -msgid "" -"formula (optional): an arbitrary SQL expression that is " -"executed when a type has to be evaluated. It allows content-based " -"discrimination." -msgstr "" -"formula(可选)一个 SQL 表达式,在类型判断(判断是父类还是" -"具体子类 — 译注)时执行。可用于基于内容的鉴别器。 " +msgid "formula (optional): an arbitrary SQL expression that is executed when a type has to be evaluated. It allows content-based discrimination." +msgstr "formula(可选)一个 SQL 表达式,在类型判断(判断是父类还是具体子类 — 译注)时执行。可用于基于内容的鉴别器。 " #. Tag: para #, no-c-format -msgid "" -"Actual values of the discriminator column are specified by the " -"discriminator-value attribute of the <" -"class> and <subclass> elements." -msgstr "" -"鉴别器字段的实际值是根据 <class><" -"subclass> 元素中的 discriminator-value 属性得" -"来的。" +msgid "Actual values of the discriminator column are specified by the discriminator-value attribute of the <class> and <subclass> elements." +msgstr "鉴别器字段的实际值是根据 <class><subclass> 元素中的 discriminator-value 属性得来的。" #. Tag: para #, no-c-format -msgid "" -"The force 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 "" -"force 属性仅仅在这种情况下有用的:表中包含没有被映射到持久" -"化类的附加辨别器值。这种情况不会经常遇到。 " +msgid "The force 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 "force 属性仅仅在这种情况下有用的:表中包含没有被映射到持久化类的附加辨别器值。这种情况不会经常遇到。 " #. Tag: para #, no-c-format -msgid "" -"The formula attribute allows you to declare an arbitrary " -"SQL expression that will be used to evaluate the type of a row. For example:" -msgstr "" -"使用 formula 属性你可以定义一个 SQL 表达式,用来判断一行数" -"据的类型。" +msgid "The formula attribute allows you to declare an arbitrary SQL expression that will be used to evaluate the type of a row. For example:" +msgstr "使用 formula 属性你可以定义一个 SQL 表达式,用来判断一行数据的类型。" #. Tag: title #, no-c-format @@ -1658,114 +827,53 @@ msgstr "版本(version)(可选) " #. Tag: para #, no-c-format -msgid "" -"The <version> element is optional and indicates " -"that the table contains versioned data. This is particularly useful if you " -"plan to use long transactions. See below for more " -"information:" -msgstr "" -"<version> 元素是可选的,表明表中包含附带版本信息的数" -"据。这在你准备使用 长事务(long transactions)的时候特别" -"有用。下面是更多信息:" +msgid "The <version> element is optional and indicates that the table contains versioned data. This is particularly useful if you plan to use long transactions. See below for more information:" +msgstr "<version> 元素是可选的,表明表中包含附带版本信息的数据。这在你准备使用 长事务(long transactions)的时候特别有用。下面是更多信息:" #. Tag: para #, no-c-format -msgid "" -"column (optional - defaults to the property name): the " -"name of the column holding the version number." -msgstr "" -"column(可选 — 默认为属性名):指定持有版本号的字段名。 " +msgid "column (optional - defaults to the property name): the name of the column holding the version number." +msgstr "column(可选 — 默认为属性名):指定持有版本号的字段名。 " #. Tag: para #, no-c-format -msgid "" -"name: the name of a property of the persistent class." +msgid "name: the name of a property of the persistent class." msgstr "name:持久化类的属性名。 " #. Tag: para #, no-c-format -msgid "" -"type (optional - defaults to integer): " -"the type of the version number." -msgstr "" -"type(可选 — 默认是 integer):版本号的" -"类型。 " +msgid "type (optional - defaults to integer): the type of the version number." +msgstr "type(可选 — 默认是 integer):版本号的类型。 " #. Tag: para #, no-c-format -msgid "" -"access (optional - defaults to property): the strategy Hibernate uses to access the property value." -msgstr "" -"access(可选 — 默认为 property):" -"Hibernate 用来访问属性值的策略。 " +msgid "access (optional - defaults to property): the strategy Hibernate uses to access the property value." +msgstr "access(可选 — 默认为 property):Hibernate 用来访问属性值的策略。 " #. Tag: para #, no-c-format -msgid "" -"unsaved-value (optional - defaults to undefined): 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. Undefined " -"specifies that the identifier property value should be used." -msgstr "" -"unsaved-value(可选 — 默认是 undefined):用于标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个" -"值就可以把这种情况 和已经在先前的 session 中保存或装载的脱管(detached)实例" -"区分开来。(undefined 指明应被使用的标识属性值。) " - -#. Tag: para -#, fuzzy, no-c-format -msgid "" -"generated (optional - defaults to never): specifies that this version property value is generated by the " -"database. See the discussion of generated properties for more information." -msgstr "" -"generated(可选 — 默认是 never):表明" -"此版本属性值是否实际上是由数据库生成的。请参阅 部分的讨论。 " +msgid "unsaved-value (optional - defaults to undefined): 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. Undefined specifies that the identifier property value should be used." +msgstr "unsaved-value(可选 — 默认是 undefined):用于标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值就可以把这种情况 和已经在先前的 session 中保存或装载的脱管(detached)实例区分开来。(undefined 指明应被使用的标识属性值。) " #. Tag: para #, no-c-format -msgid "" -"insert (optional - defaults to true): " -"specifies whether the version column should be included in SQL insert " -"statements. It can be set to false if the database column " -"is defined with a default value of 0." -msgstr "" -"insert(可选 — 默认是 true):表明此版" -"本列应该包含在 SQL 插入语句中。只有当数据库字段有默认值 0 " -"的时候,才可以设置为 false。 " +msgid "generated (optional - defaults to never): specifies that this version property value is generated by the database. See the discussion of generated properties for more information." +msgstr "generated(可选 — 默认是 never):表明此版本属性值是否实际上是由数据库生成的。请参阅 generated properties 部分的讨论。 " #. Tag: para #, no-c-format -msgid "" -"Version numbers can be of Hibernate type long, " -"integer, short, timestamp or calendar." -msgstr "" -"版本号必须是以下类型:longinteger、" -"shorttimestamp 或者 " -"calendar。" +msgid "insert (optional - defaults to true): specifies whether the version column should be included in SQL insert statements. It can be set to false if the database column is defined with a default value of 0." +msgstr "insert(可选 — 默认是 true):表明此版本列应该包含在 SQL 插入语句中。只有当数据库字段有默认值 0 的时候,才可以设置为 false。 " #. Tag: para #, no-c-format -msgid "" -"A version or timestamp property should never be null for a detached " -"instance. Hibernate will detect any instance with a null version or " -"timestamp as transient, irrespective of what other unsaved-value strategies are specified. Declaring a nullable version or " -"timestamp property is an easy way to avoid problems with transitive " -"reattachment in Hibernate. It is especially useful for people using assigned " -"identifiers or composite keys." -msgstr "" -"一个脱管(detached)实例的 version 或 timestamp 属性不能为空(null),因为 " -"Hibernate 不管 unsaved-value 被指定为何种策略,它将任何属" -"性为空的 version 或 timestamp 实例看作为瞬时(transient)实例。 避" -"免 Hibernate 中的传递重附(transitive reattachment)问题的一个简单方法是 定义" -"一个不能为空的 version 或 timestamp 属性,特别是在人们使用程序分配的标识符" -"(assigned identifiers) 或复合主键时非常有用。" +msgid "Version numbers can be of Hibernate type long, integer, short, timestamp or calendar." +msgstr "版本号必须是以下类型:longintegershorttimestamp 或者 calendar。" + +#. Tag: para +#, no-c-format +msgid "A version or timestamp property should never be null for a detached instance. Hibernate will detect any instance with a null version or timestamp as transient, irrespective of what other unsaved-value strategies are specified. Declaring a nullable version or timestamp property is an easy way to avoid problems with transitive reattachment in Hibernate. It is especially useful for people using assigned identifiers or composite keys." +msgstr "一个脱管(detached)实例的 version 或 timestamp 属性不能为空(null),因为 Hibernate 不管 unsaved-value 被指定为何种策略,它将任何属性为空的 version 或 timestamp 实例看作为瞬时(transient)实例。 避免 Hibernate 中的传递重附(transitive reattachment)问题的一个简单方法是 定义一个不能为空的 version 或 timestamp 属性,特别是在人们使用程序分配的标识符(assigned identifiers) 或复合主键时非常有用。" #. Tag: title #, no-c-format @@ -1774,78 +882,33 @@ msgstr "timestamp(可选) " #. Tag: para #, no-c-format -msgid "" -"The optional <timestamp> element indicates that the " -"table contains timestamped data. This provides an alternative to versioning. " -"Timestamps are a less safe implementation of optimistic locking. However, " -"sometimes the application might use the timestamps in other ways." -msgstr "" -"可选的 <timestamp> 元素指明了表中包含时间戳数据。这" -"用来作为版本的替代。时间戳本质上是一种对乐观锁定的一种不是特别安全的实现。当" -"然,有时候应用程序可能在其他方面使用时间戳。 " +msgid "The optional <timestamp> element indicates that the table contains timestamped data. This provides an alternative to versioning. Timestamps are a less safe implementation of optimistic locking. However, sometimes the application might use the timestamps in other ways." +msgstr "可选的 <timestamp> 元素指明了表中包含时间戳数据。这用来作为版本的替代。时间戳本质上是一种对乐观锁定的一种不是特别安全的实现。当然,有时候应用程序可能在其他方面使用时间戳。 " #. Tag: para #, no-c-format -msgid "" -"column (optional - defaults to the property name): the " -"name of a column holding the timestamp." -msgstr "" -"column(可选 — 默认为属性名):存有时间戳的字段名。 " +msgid "column (optional - defaults to the property name): the name of a column holding the timestamp." +msgstr "column(可选 — 默认为属性名):存有时间戳的字段名。 " #. Tag: para #, no-c-format -msgid "" -"name: the name of a JavaBeans style property of Java type " -"Date or Timestamp of the persistent " -"class." -msgstr "" -"name:在持久化类中的 JavaBeans 风格的属性名,其 Java 类型" -"是 Date 或者 Timestamp 的。 " +msgid "name: the name of a JavaBeans style property of Java type Date or Timestamp of the persistent class." +msgstr "name:在持久化类中的 JavaBeans 风格的属性名,其 Java 类型是 Date 或者 Timestamp 的。 " #. Tag: para #, no-c-format -msgid "" -"unsaved-value (optional - defaults to null): 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. Undefined " -"specifies that the identifier property value should be used." -msgstr "" -"unsaved-value(可选 — 默认是 null):用" -"于标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值就可以把这种" -"情况和已经在先前的 session 中保存或装载的脱管(detached)实例区分开来。" -"(undefined 指明使用标识属性值进行这种判断。) " +msgid "unsaved-value (optional - defaults to null): 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. Undefined specifies that the identifier property value should be used." +msgstr "unsaved-value(可选 — 默认是 null):用于标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值就可以把这种情况和已经在先前的 session 中保存或装载的脱管(detached)实例区分开来。(undefined 指明使用标识属性值进行这种判断。) " #. Tag: para #, no-c-format -msgid "" -"source (optional - defaults to vm): " -"Where should Hibernate retrieve the timestamp value from? 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\". It " -"is safer to use in clustered environments. Not all Dialects are known to support the retrieval of the database's current " -"timestamp. Others may also be unsafe for usage in locking due to lack of " -"precision (Oracle 8, for example)." -msgstr "" -"source(可选 — 默认是 vm):Hibernate " -"如何才能获取到时间戳的值呢?从数据库,还是当前 JVM?从数据库获取会带来一些负" -"担,因为 Hibernate 必须访问数据库来获得“下一个值”,但是在集群环境中会更安全" -"些。还要注意,并不是所有的 Dialect(方言)都支持获得数据库" -"的当前时间戳的,而支持的数据库中又有一部分因为精度不足,用于锁定是不安全的" -"(例如 Oracle 8)。 " +msgid "source (optional - defaults to vm): Where should Hibernate retrieve the timestamp value from? 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\". It is safer to use in clustered environments. Not all Dialects are known to support the retrieval of the database's current timestamp. Others may also be unsafe for usage in locking due to lack of precision (Oracle 8, for example)." +msgstr "source(可选 — 默认是 vm):Hibernate 如何才能获取到时间戳的值呢?从数据库,还是当前 JVM?从数据库获取会带来一些负担,因为 Hibernate 必须访问数据库来获得“下一个值”,但是在集群环境中会更安全些。还要注意,并不是所有的 Dialect(方言)都支持获得数据库的当前时间戳的,而支持的数据库中又有一部分因为精度不足,用于锁定是不安全的(例如 Oracle 8)。 " #. Tag: para -#, fuzzy, no-c-format -msgid "" -"generated (optional - defaults to never): specifies that this timestamp property value is actually " -"generated by the database. See the discussion of generated properties for more information." -msgstr "" -"generated(可选 - 默认是 never):指出" -"时间戳值是否实际上是由数据库生成的。请参阅 的讨论。 " +#, no-c-format +msgid "generated (optional - defaults to never): specifies that this timestamp property value is actually generated by the database. See the discussion of generated properties for more information." +msgstr "generated(可选 - 默认是 never):指出时间戳值是否实际上是由数据库生成的。请参阅 generated properties 的讨论。 " #. Tag: title #, no-c-format @@ -1854,16 +917,8 @@ msgstr "注意" #. Tag: para #, no-c-format -msgid "" -"<Timestamp> is equivalent to <version " -"type=\"timestamp\">. And <timestamp source=\"db" -"\"> is equivalent to <version type=\"dbtimestamp" -"\">" -msgstr "" -"注意,<timestamp><version type=" -"\"timestamp\"> 是等价的。并且 <timestamp source=\"db" -"\"><version type=\"dbtimestamp\"> " -"是等价的。 " +msgid "<Timestamp> is equivalent to <version type=\"timestamp\">. And <timestamp source=\"db\"> is equivalent to <version type=\"dbtimestamp\">" +msgstr "注意,<timestamp><version type=\"timestamp\"> 是等价的。并且 <timestamp source=\"db\"><version type=\"dbtimestamp\"> 是等价的。 " #. Tag: title #, no-c-format @@ -1872,109 +927,53 @@ msgstr "Property" #. Tag: para #, no-c-format -msgid "" -"The <property> element declares a persistent " -"JavaBean style property of the class." -msgstr "" -"<property> 元素为类定义了一个持久化的、JavaBean 风格" -"的属性。 " +msgid "The <property> element declares a persistent JavaBean style property of the class." +msgstr "<property> 元素为类定义了一个持久化的、JavaBean 风格的属性。 " #. Tag: para #, no-c-format -msgid "" -"name: the name of the property, with an initial lowercase " -"letter." +msgid "name: the name of the property, with an initial lowercase letter." msgstr "name:属性的名字,以小写字母开头。" #. Tag: para #, no-c-format -msgid "" -"column (optional - defaults to the property name): the " -"name of the mapped database table column. This can also be specified by " -"nested <column> element(s)." -msgstr "" -"column(可选 — 默认为属性名字):对应的数据库字段名。 也可" -"以通过嵌套的 <column> 元素指定。 " +msgid "column (optional - defaults to the property name): the name of the mapped database table column. This can also be specified by nested <column> element(s)." +msgstr "column(可选 — 默认为属性名字):对应的数据库字段名。 也可以通过嵌套的 <column> 元素指定。 " #. Tag: para #, no-c-format -msgid "" -"update, insert (optional - defaults to true): specifies that the mapped columns should be included in SQL " -"UPDATE and/or INSERT statements. " -"Setting both to false allows a pure \"derived\" property " -"whose value is initialized from some other property that maps to the same " -"column(s), or by a trigger or other application." -msgstr "" -"update, insert(可选 — 默认为 true): " -"表明用于 UPDATE 和/或 INSERT 的 SQL 语" -"句中是否包含这个被映射了的字段。这二者如果都设置为 false " -"则表明这是一个“外源性(derived)”的属性,它的值来源于映射到同一个(或多个) " -"字段的某些其他属性,或者通过一个 trigger(触发器)或其他程序生成。 " +msgid "update, insert (optional - defaults to true): specifies that the mapped columns should be included in SQL UPDATE and/or INSERT statements. Setting both to false allows a pure \"derived\" property whose value is initialized from some other property that maps to the same column(s), or by a trigger or other application." +msgstr "update, insert(可选 — 默认为 true): 表明用于 UPDATE 和/或 INSERT 的 SQL 语句中是否包含这个被映射了的字段。这二者如果都设置为 false 则表明这是一个“外源性(derived)”的属性,它的值来源于映射到同一个(或多个) 字段的某些其他属性,或者通过一个 trigger(触发器)或其他程序生成。 " #. Tag: para #, no-c-format -msgid "" -"formula (optional): an SQL expression that defines the " -"value for a computed property. Computed properties do " -"not have a column mapping of their own." -msgstr "" -"formula(可选):一个 SQL 表达式,定义了这个计" -"算 (computed) 属性的值。计算属性没有和它对应的数据库字段。" +msgid "formula (optional): an SQL expression that defines the value for a computed property. Computed properties do not have a column mapping of their own." +msgstr "formula(可选):一个 SQL 表达式,定义了这个计算 (computed) 属性的值。计算属性没有和它对应的数据库字段。" #. Tag: para #, no-c-format -msgid "" -"lazy (optional - defaults to false): " -"specifies that this property should be fetched lazily when the instance " -"variable is first accessed. It requires build-time bytecode instrumentation." -msgstr "" -"lazy(可选 — 默认为 false):指定 指定" -"实例变量第一次被访问时,这个属性是否延迟抓取(fetched lazily)( 需要运行时字" -"节码增强)。 " +msgid "lazy (optional - defaults to false): specifies that this property should be fetched lazily when the instance variable is first accessed. It requires build-time bytecode instrumentation." +msgstr "lazy(可选 — 默认为 false):指定 指定实例变量第一次被访问时,这个属性是否延迟抓取(fetched lazily)( 需要运行时字节码增强)。 " #. Tag: para #, no-c-format -msgid "" -"unique (optional): enables the DDL generation of a unique " -"constraint for the columns. Also, allow this to be the target of a " -"property-ref." -msgstr "" -"unique(可选):使用 DDL 为该字段添加唯一的约束。同样,允" -"许它作为 property-ref 引用的目标。 " +msgid "unique (optional): enables the DDL generation of a unique constraint for the columns. Also, allow this to be the target of a property-ref." +msgstr "unique(可选):使用 DDL 为该字段添加唯一的约束。同样,允许它作为 property-ref 引用的目标。 " #. Tag: para #, no-c-format -msgid "" -"not-null (optional): enables the DDL generation of a " -"nullability constraint for the columns." -msgstr "" -"not-null(可选):使用 DDL 为该字段添加可否为空" -"(nullability)的约束。 " +msgid "not-null (optional): enables the DDL generation of a nullability constraint for the columns." +msgstr "not-null(可选):使用 DDL 为该字段添加可否为空(nullability)的约束。 " #. Tag: para #, no-c-format -msgid "" -"optimistic-lock (optional - defaults to true): specifies that updates to this property do or do not require " -"acquisition of the optimistic lock. In other words, it determines if a " -"version increment should occur when this property is dirty." -msgstr "" -"optimistic-lock(可选 — 默认为 true):" -"指定这个属性在做更新时是否需要获得乐观锁定(optimistic lock)。换句话说,它决" -"定这个属性发生脏数据时版本(version)的值是否增长。 " +msgid "optimistic-lock (optional - defaults to true): specifies that updates to this property do or do not require acquisition of the optimistic lock. In other words, it determines if a version increment should occur when this property is dirty." +msgstr "optimistic-lock(可选 — 默认为 true):指定这个属性在做更新时是否需要获得乐观锁定(optimistic lock)。换句话说,它决定这个属性发生脏数据时版本(version)的值是否增长。 " #. Tag: para -#, fuzzy, no-c-format -msgid "" -"generated (optional - defaults to never): specifies that this property value is actually generated by the " -"database. See the discussion of generated properties for more information." -msgstr "" -"generated(可选 — 默认为 never):表明" -"此属性值是否实际上是由数据库生成的。请参阅 的讨论。 " +#, no-c-format +msgid "generated (optional - defaults to never): specifies that this property value is actually generated by the database. See the discussion of generated properties for more information." +msgstr "generated(可选 — 默认为 never):表明此属性值是否实际上是由数据库生成的。请参阅 generated properties 的讨论。 " #. Tag: para #, no-c-format @@ -1983,23 +982,13 @@ msgstr "typename 可以是如下几种:" #. Tag: para #, no-c-format -msgid "" -"The name of a Hibernate basic type: integer, string, character, " -"date, timestamp, float, binary, serializable, object, blob etc." -msgstr "" -"Hibernate 基本类型名(比如:integer, string, character,date, " -"timestamp, float, binary, serializable, object, blob)。 " +msgid "The name of a Hibernate basic type: integer, string, character, date, timestamp, float, binary, serializable, object, blob etc." +msgstr "Hibernate 基本类型名(比如:integer, string, character,date, timestamp, float, binary, serializable, object, blob)。 " #. Tag: para #, no-c-format -msgid "" -"The name of a Java class with a default basic type: int, float, " -"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob etc." -msgstr "" -"一个 Java 类的名字,这个类属于一种默认基础类型(比如:int, float," -"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)。 " +msgid "The name of a Java class with a default basic type: int, float, char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob etc." +msgstr "一个 Java 类的名字,这个类属于一种默认基础类型(比如:int, float,char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)。 " #. Tag: para #, no-c-format @@ -2008,71 +997,28 @@ msgstr "一个可以序列化的 Java 类的名字。" #. Tag: para #, no-c-format -msgid "" -"The class name of a custom type: com.illflow.type.MyCustomType etc." -msgstr "" -"一个自定义类型的类的名字。(比如:com.illflow.type.MyCustomType)。 " +msgid "The class name of a custom type: com.illflow.type.MyCustomType etc." +msgstr "一个自定义类型的类的名字。(比如:com.illflow.type.MyCustomType)。 " #. Tag: para #, no-c-format -msgid "" -"If you do not specify a type, Hibernate will use reflection upon the named " -"property and guess the correct Hibernate type. Hibernate will attempt to " -"interpret the name of the return class of the property getter using, in " -"order, rules 2, 3, and 4. In certain cases you will need the type attribute. For example, to distinguish between Hibernate." -"DATE and Hibernate.TIMESTAMP, or to specify a " -"custom type." -msgstr "" -"如果你没有指定类型,Hibernarte 会使用反射来得到这个名字的属性,以此来猜测正确" -"的 Hibernate 类型。Hibernate 会按照规则 2,3,4 的顺序对属性读取器(getter方" -"法)的返回类进行解释。然而,这还不够。 在某些情况下你仍然需要 type 属性。(比如,为了区别Hibernate.DATE 和" -"Hibernate.TIMESTAMP,或者为了指定一个自定义类型。) " +msgid "If you do not specify a type, Hibernate will use reflection upon the named property and guess the correct Hibernate type. Hibernate will attempt to interpret the name of the return class of the property getter using, in order, rules 2, 3, and 4. In certain cases you will need the type attribute. For example, to distinguish between Hibernate.DATE and Hibernate.TIMESTAMP, or to specify a custom type." +msgstr "如果你没有指定类型,Hibernarte 会使用反射来得到这个名字的属性,以此来猜测正确的 Hibernate 类型。Hibernate 会按照规则 2,3,4 的顺序对属性读取器(getter方法)的返回类进行解释。然而,这还不够。 在某些情况下你仍然需要 type 属性。(比如,为了区别Hibernate.DATEHibernate.TIMESTAMP,或者为了指定一个自定义类型。) " #. Tag: para #, no-c-format -msgid "" -"The access attribute allows you to control how Hibernate " -"accesses the property at runtime. By default, Hibernate will call the " -"property get/set pair. If you specify access=\"field\", " -"Hibernate will bypass the get/set pair and access the field directly using " -"reflection. You can specify your own strategy for property access by naming " -"a class that implements the interface org.hibernate.property." -"PropertyAccessor." -msgstr "" -"access 属性用来让你控制 Hibernate 如何在运行时访问属性。在" -"默认情况下,Hibernate 会使用属性的 get/set 方法对(pair)。如果你指明 " -"access=\"field\",Hibernate 会忽略 get/set 方法对,直接使" -"用反射来访问成员变量。你也可以指定你自己的策略,这就需要你自己实现 " -"org.hibernate.property.PropertyAccessor 接口,再在 access " -"中设置你自定义策略类的名字。 " +msgid "The access attribute allows you to control how Hibernate accesses the property at runtime. By default, Hibernate will call the property get/set pair. If you specify access=\"field\", Hibernate will bypass the get/set pair and access the field directly using reflection. You can specify your own strategy for property access by naming a class that implements the interface org.hibernate.property.PropertyAccessor." +msgstr "access 属性用来让你控制 Hibernate 如何在运行时访问属性。在默认情况下,Hibernate 会使用属性的 get/set 方法对(pair)。如果你指明 access=\"field\",Hibernate 会忽略 get/set 方法对,直接使用反射来访问成员变量。你也可以指定你自己的策略,这就需要你自己实现 org.hibernate.property.PropertyAccessor 接口,再在 access 中设置你自定义策略类的名字。 " #. Tag: para #, no-c-format -msgid "" -"A powerful feature is derived properties. These properties are by definition " -"read-only. The property value is computed at load time. You declare the " -"computation as an SQL expression. This then translates to a SELECT clause subquery in the SQL query that loads an instance:" -msgstr "" -"衍生属性(derive propertie)是一个特别强大的特征。这些属性应该定义为只读,属" -"性值在装载时计算生成。 你用一个 SQL 表达式生成计算的结果,它会在这个实例转载" -"时翻译成一个 SQL 查询的 SELECT 子查询语句。 " +msgid "A powerful feature is derived properties. These properties are by definition read-only. The property value is computed at load time. You declare the computation as an SQL expression. This then translates to a SELECT clause subquery in the SQL query that loads an instance:" +msgstr "衍生属性(derive propertie)是一个特别强大的特征。这些属性应该定义为只读,属性值在装载时计算生成。 你用一个 SQL 表达式生成计算的结果,它会在这个实例转载时翻译成一个 SQL 查询的 SELECT 子查询语句。 " #. Tag: para #, no-c-format -msgid "" -"You can reference the entity table by not declaring an alias on a particular " -"column. This would be customerId in the given example. " -"You can also use the nested <formula> mapping " -"element if you do not want to use the attribute." -msgstr "" -"注意,你可以使用实体自己的表,而不用为这个特别的列定义别名(上面例子中的 " -"customerId)。同时注意,如果你不喜欢使用属性, 你可以使用" -"嵌套的 <formula> 映射元素。 " +msgid "You can reference the entity table by not declaring an alias on a particular column. This would be customerId in the given example. You can also use the nested <formula> mapping element if you do not want to use the attribute." +msgstr "注意,你可以使用实体自己的表,而不用为这个特别的列定义别名(上面例子中的 customerId)。同时注意,如果你不喜欢使用属性, 你可以使用嵌套的 <formula> 映射元素。 " #. Tag: title #, no-c-format @@ -2081,15 +1027,8 @@ msgstr "多对一(many-to-one) " #. Tag: para #, no-c-format -msgid "" -"An ordinary association to another persistent class is declared using a " -"many-to-one 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 "" -"通过 many-to-one 元素,可以定义一种常见的与另一个持久化类的" -"关联。这种关系模型是多对一关联(实际上是一个对象引用-译注):这个表的一个外" -"键引用目标表的主键字段。 " +msgid "An ordinary association to another persistent class is declared using a many-to-one 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 "通过 many-to-one 元素,可以定义一种常见的与另一个持久化类的关联。这种关系模型是多对一关联(实际上是一个对象引用-译注):这个表的一个外键引用目标表的主键字段。 " #. Tag: para #, no-c-format @@ -2098,178 +1037,78 @@ msgstr "name:属性名。" #. Tag: para #, no-c-format -msgid "" -"column (optional): the name of the foreign key column. " -"This can also be specified by nested <column> " -"element(s)." -msgstr "" -"column(可选):外键字段的名称。也可以通过嵌套的 " -"<column> 指定。 " +msgid "column (optional): the name of the foreign key column. This can also be specified by nested <column> element(s)." +msgstr "column(可选):外键字段的名称。也可以通过嵌套的 <column> 指定。 " #. Tag: para #, no-c-format -msgid "" -"class (optional - defaults to the property type " -"determined by reflection): the name of the associated class." -msgstr "" -"class(可选 — 默认是通过反射得到的属性类型):被关联的类的" -"名字。 " +msgid "class (optional - defaults to the property type determined by reflection): the name of the associated class." +msgstr "class(可选 — 默认是通过反射得到的属性类型):被关联的类的名字。 " #. Tag: para #, no-c-format -msgid "" -"cascade (optional): specifies which operations should be " -"cascaded from the parent object to the associated object." -msgstr "" -"cascade(级联)(可选)表明操作是否从父对象级联到被关联的" -"对象。 " +msgid "cascade (optional): specifies which operations should be cascaded from the parent object to the associated object." +msgstr "cascade(级联)(可选)表明操作是否从父对象级联到被关联的对象。 " #. Tag: para #, no-c-format -msgid "" -"fetch (optional - defaults to select): " -"chooses between outer-join fetching or sequential select fetching." -msgstr "" -"fetch(可选 — 默认为 select):在外连接" -"抓取(outer-join fetching)和序列选择抓取(sequential select fetching)两者中" -"选择其一。 " +msgid "fetch (optional - defaults to select): chooses between outer-join fetching or sequential select fetching." +msgstr "fetch(可选 — 默认为 select):在外连接抓取(outer-join fetching)和序列选择抓取(sequential select fetching)两者中选择其一。 " #. Tag: para #, no-c-format -msgid "" -"update, insert (optional - defaults to true): specifies that the mapped columns should be included in SQL " -"UPDATE and/or INSERT statements. " -"Setting both to false allows a pure \"derived\" " -"association whose value is initialized from another property that maps to " -"the same column(s), or by a trigger or other application." -msgstr "" -"update, insert(可选 — 默认为 true)指" -"定对应的字段是否包含在用于 UPDATE 和/或 INSERT 的 SQL 语句中。如果二者都是false,则这是一个纯粹" -"的 “外源性(derived)”关联,它的值是通过映射到同一个(或多个)字段的某些其他" -"属性得到 或者通过 trigger(触发器)、或其他程序生成。 " +msgid "update, insert (optional - defaults to true): specifies that the mapped columns should be included in SQL UPDATE and/or INSERT statements. Setting both to false allows a pure \"derived\" association whose value is initialized from another property that maps to the same column(s), or by a trigger or other application." +msgstr "update, insert(可选 — 默认为 true)指定对应的字段是否包含在用于 UPDATE 和/或 INSERT 的 SQL 语句中。如果二者都是false,则这是一个纯粹的 “外源性(derived)”关联,它的值是通过映射到同一个(或多个)字段的某些其他属性得到 或者通过 trigger(触发器)、或其他程序生成。 " #. Tag: para #, no-c-format -msgid "" -"property-ref (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 "" -"property-ref:(可选)被关联到此外键的类中的对应属性的名" -"字。如果没有指定,被关联类的主键将被使用。 " +msgid "property-ref (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 "property-ref:(可选)被关联到此外键的类中的对应属性的名字。如果没有指定,被关联类的主键将被使用。 " #. Tag: para #, no-c-format -msgid "" -"unique (optional): enables the DDL generation of a unique " -"constraint for the foreign-key column. By allowing this to be the target of " -"a property-ref, you can make the association multiplicity " -"one-to-one." -msgstr "" -"unique(可选):使用 DDL 为外键字段生成一个唯一约束。此" -"外, 这也可以用作 property-ref 的目标属性。这使关联同时具" -"有一对一的效果。 " +msgid "unique (optional): enables the DDL generation of a unique constraint for the foreign-key column. By allowing this to be the target of a property-ref, you can make the association multiplicity one-to-one." +msgstr "unique(可选):使用 DDL 为外键字段生成一个唯一约束。此外, 这也可以用作 property-ref 的目标属性。这使关联同时具有一对一的效果。 " #. Tag: para #, no-c-format -msgid "" -"not-null (optional): enables the DDL generation of a " -"nullability constraint for the foreign key columns." -msgstr "" -"not-null(可选):使用 DDL 为外键字段生成一个非空约束。 " +msgid "not-null (optional): enables the DDL generation of a nullability constraint for the foreign key columns." +msgstr "not-null(可选):使用 DDL 为外键字段生成一个非空约束。 " #. Tag: para #, no-c-format -msgid "" -"lazy (optional - defaults to proxy): " -"by default, single point associations are proxied. lazy=\"no-proxy" -"\" specifies that the property should be fetched lazily when the " -"instance variable is first accessed. This requires build-time bytecode " -"instrumentation. lazy=\"false\" specifies that the " -"association will always be eagerly fetched." -msgstr "" -"lazy(可选 — 默认为 proxy):默认情况" -"下,单点关联是经过代理的。lazy=\"no-proxy\" 指定此属性应该" -"在实例变量第一次被访问时应该延迟抓取(fetche lazily)(需要运行时字节码的增" -"强)。lazy=\"false\" 指定此关联总是被预先抓取。 " +msgid "lazy (optional - defaults to proxy): by default, single point associations are proxied. lazy=\"no-proxy\" specifies that the property should be fetched lazily when the instance variable is first accessed. This requires build-time bytecode instrumentation. lazy=\"false\" specifies that the association will always be eagerly fetched." +msgstr "lazy(可选 — 默认为 proxy):默认情况下,单点关联是经过代理的。lazy=\"no-proxy\" 指定此属性应该在实例变量第一次被访问时应该延迟抓取(fetche lazily)(需要运行时字节码的增强)。lazy=\"false\" 指定此关联总是被预先抓取。 " #. Tag: para #, no-c-format -msgid "" -"not-found (optional - defaults to exception): specifies how foreign keys that reference missing rows will be " -"handled. ignore will treat a missing row as a null " -"association." -msgstr "" -"not-found(可选 - 默认为exception):指" -"定如何处理引用缺失行的外键:ignore 会把缺失的行作为一个空" -"关联处理。 " +msgid "not-found (optional - defaults to exception): specifies how foreign keys that reference missing rows will be handled. ignore will treat a missing row as a null association." +msgstr "not-found(可选 - 默认为exception):指定如何处理引用缺失行的外键:ignore 会把缺失的行作为一个空关联处理。 " #. Tag: para #, no-c-format -msgid "" -"entity-name (optional): the entity name of the associated " -"class." +msgid "entity-name (optional): the entity name of the associated class." msgstr "entity-name(可选):被关联的类的实体名。 " #. Tag: para #, no-c-format -msgid "" -"formula (optional): an SQL expression that defines the " -"value for a computed foreign key." -msgstr "" -"formula(可选):SQL 表达式,用于定义 computed" -"(计算出的)外键值。" +msgid "formula (optional): an SQL expression that defines the value for a computed foreign key." +msgstr "formula(可选):SQL 表达式,用于定义 computed(计算出的)外键值。" #. Tag: para #, no-c-format -msgid "" -"Setting a value of the cascade attribute to any " -"meaningful value other than none will propagate certain " -"operations to the associated object. The meaningful values are divided into " -"three categories. First, basic operations, which include: persist, " -"merge, delete, save-update, evict, replicate, lock and refresh; " -"second, special values: delete-orphan; and third," -"all comma-separated combinations of operation names: " -"cascade=\"persist,merge,evict\" or cascade=\"all," -"delete-orphan\". See " -"for a full explanation. Note that single valued, many-to-one and one-to-one, " -"associations do not support orphan delete." -msgstr "" -"cascade 属性设置为除了none 以外任何有意" -"义的值,它将把特定的操作传递到关联对象中。这个值就代表着 Hibernate 基本操作的" -"名称,persist, merge, delete, save-update, evict, replicate, lock, " -"refresh,以及特别的值 delete-orphan 和 " -"all,并且可以用逗号分隔符来组合这些操作,例如," -"cascade=\"persist,merge,evict\"cascade=" -"\"all,delete-orphan\"。更全面的解释请参考 。注意,单值关联(many-to-one 和 one-to-one 关" -"联)不支持删除孤儿(orphan delete,删除不再被引用的值)。 " +msgid "Setting a value of the cascade attribute to any meaningful value other than none will propagate certain operations to the associated object. The meaningful values are divided into three categories. First, basic operations, which include: persist, merge, delete, save-update, evict, replicate, lock and refresh; second, special values: delete-orphan; and third,all comma-separated combinations of operation names: cascade=\"persist,merge,evict\" or cascade=\"all,delete-orphan\". See for a full explanation. Note that single valued, many-to-one and one-to-one, associations do not support orphan delete." +msgstr "cascade 属性设置为除了none 以外任何有意义的值,它将把特定的操作传递到关联对象中。这个值就代表着 Hibernate 基本操作的名称,persist, merge, delete, save-update, evict, replicate, lock, refresh,以及特别的值 delete-orphanall,并且可以用逗号分隔符来组合这些操作,例如,cascade=\"persist,merge,evict\"cascade=\"all,delete-orphan\"。更全面的解释请参考 。注意,单值关联(many-to-one 和 one-to-one 关联)不支持删除孤儿(orphan delete,删除不再被引用的值)。 " #. Tag: para #, no-c-format -msgid "" -"Here is an example of a typical many-to-one declaration:" +msgid "Here is an example of a typical many-to-one declaration:" msgstr "一个典型的简单 many-to-one 定义例子: " #. Tag: para #, no-c-format -msgid "" -"The property-ref 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 a complicated and " -"confusing relational model. For example, if the Product " -"class had a unique serial number that is not the primary key. The " -"unique attribute controls Hibernate's DDL generation with " -"the SchemaExport tool." -msgstr "" -"property-ref 属性只应该用来对付遗留下来的数据库系统,可能" -"有外键指向对方关联表的是个非主键字段(但是应该是一个惟一关键字)的情况下。这" -"是一种十分丑陋的关系模型。比如说,假设 Product 类有一个惟" -"一的序列号,它并不是主键。(unique 属性控制 Hibernate 通" -"过 SchemaExport 工具进行的 DDL 生成。) " +msgid "The property-ref 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 a complicated and confusing relational model. For example, if the Product class had a unique serial number that is not the primary key. The unique attribute controls Hibernate's DDL generation with the SchemaExport tool." +msgstr "property-ref 属性只应该用来对付遗留下来的数据库系统,可能有外键指向对方关联表的是个非主键字段(但是应该是一个惟一关键字)的情况下。这是一种十分丑陋的关系模型。比如说,假设 Product 类有一个惟一的序列号,它并不是主键。(unique 属性控制 Hibernate 通过 SchemaExport 工具进行的 DDL 生成。) " #. Tag: para #, no-c-format @@ -2283,19 +1122,12 @@ msgstr "当然,我们决不鼓励这种用法。 " #. Tag: para #, 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 <" -"properties> element." -msgstr "" -"如果被引用的唯一主键由关联实体的多个属性组成,你应该在名称为 <" -"properties> 的元素 里面映射所有关联的属性。" +msgid "If the referenced unique key comprises multiple properties of the associated entity, you should map the referenced properties inside a named <properties> element." +msgstr "如果被引用的唯一主键由关联实体的多个属性组成,你应该在名称为 <properties> 的元素 里面映射所有关联的属性。" #. Tag: para #, no-c-format -msgid "" -"If the referenced unique key is the property of a component, you can specify " -"a property path:" +msgid "If the referenced unique key is the property of a component, you can specify a property path:" msgstr "假若被引用的唯一主键是组件的属性,你可以指定属性路径: " #. Tag: title @@ -2305,70 +1137,28 @@ msgstr "一对一 " #. Tag: para #, no-c-format -msgid "" -"A one-to-one association to another persistent class is declared using a " -"one-to-one element." -msgstr "" -"持久化对象之间一对一的关联关系是通过 one-to-one 元素定义" -"的。" +msgid "A one-to-one association to another persistent class is declared using a one-to-one element." +msgstr "持久化对象之间一对一的关联关系是通过 one-to-one 元素定义的。" #. Tag: para #, no-c-format -msgid "" -"constrained (optional): specifies that a foreign key " -"constraint on the primary key of the mapped table and references the table " -"of the associated class. This option affects the order in which save" -"() and delete() are cascaded, and determines " -"whether the association can be proxied. It is also used by the schema export " -"tool." -msgstr "" -"constrained(约束)(可选)表明该类对应的表对应的数据库" -"表,和被关联的对象所对应的数据库表之间,通过一个外键引用对主键进行约束。这个" -"选项影响 save()delete() 在级联执行" -"时的先后顺序以及决定该关联能否被委托(也在 schema export tool 中被使用)。 " +msgid "constrained (optional): specifies that a foreign key constraint on the primary key of the mapped table and references the table of the associated class. This option affects the order in which save() and delete() are cascaded, and determines whether the association can be proxied. It is also used by the schema export tool." +msgstr "constrained(约束)(可选)表明该类对应的表对应的数据库表,和被关联的对象所对应的数据库表之间,通过一个外键引用对主键进行约束。这个选项影响 save()delete() 在级联执行时的先后顺序以及决定该关联能否被委托(也在 schema export tool 中被使用)。 " #. Tag: para #, no-c-format -msgid "" -"property-ref (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 "" -"property-ref:(可选)指定关联类的属性名,这个属性将会和本" -"类的主键相对应。如果没有指定,会使用对方关联类的主键。 " +msgid "property-ref (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 "property-ref:(可选)指定关联类的属性名,这个属性将会和本类的主键相对应。如果没有指定,会使用对方关联类的主键。 " #. Tag: para #, no-c-format -msgid "" -"formula (optional): almost all one-to-one associations " -"map to the primary key of the owning entity. If this is not the case, you " -"can specify another column, columns or expression to join on using an SQL " -"formula. See org.hibernate.test.onetooneformula for an " -"example." -msgstr "" -"formula (可选):绝大多数一对一的关联都指向其实体的主键。" -"在一些少见的情况中,你可能会指向其他的一个或多个字段,或者是一个表达式,这些" -"情况下,你可以用一个 SQL 公式来表示。(可以在 org.hibernate.test." -"onetooneformula 找到例子) " +msgid "formula (optional): almost all one-to-one associations map to the primary key of the owning entity. If this is not the case, you can specify another column, columns or expression to join on using an SQL formula. See org.hibernate.test.onetooneformula for an example." +msgstr "formula (可选):绝大多数一对一的关联都指向其实体的主键。在一些少见的情况中,你可能会指向其他的一个或多个字段,或者是一个表达式,这些情况下,你可以用一个 SQL 公式来表示。(可以在 org.hibernate.test.onetooneformula 找到例子) " #. Tag: para #, no-c-format -msgid "" -"lazy (optional - defaults to proxy): " -"by default, single point associations are proxied. lazy=\"no-proxy" -"\" specifies that the property should be fetched lazily when the " -"instance variable is first accessed. It requires build-time bytecode " -"instrumentation. lazy=\"false\" specifies that the " -"association will always be eagerly fetched. Note that if " -"constrained=\"false\", proxying is impossible and " -"Hibernate will eagerly fetch the association." -msgstr "" -"lazy(可选 — 默认为 proxy):默认情况" -"下,单点关联是经过代理的。lazy=\"no-proxy\"指定此属性应该" -"在实例变量第一次被访问时应该延迟抓取(fetche lazily)(需要运行时字节码的增" -"强)。 lazy=\"false\"指定此关联总是被预先抓取。" -"注意,如果constrained=\"false\", 不可能使用代理,Hibernate" -"会采取预先抓取。" +msgid "lazy (optional - defaults to proxy): by default, single point associations are proxied. lazy=\"no-proxy\" specifies that the property should be fetched lazily when the instance variable is first accessed. It requires build-time bytecode instrumentation. lazy=\"false\" specifies that the association will always be eagerly fetched. Note that if constrained=\"false\", proxying is impossible and Hibernate will eagerly fetch the association." +msgstr "lazy(可选 — 默认为 proxy):默认情况下,单点关联是经过代理的。lazy=\"no-proxy\"指定此属性应该在实例变量第一次被访问时应该延迟抓取(fetche lazily)(需要运行时字节码的增强)。 lazy=\"false\"指定此关联总是被预先抓取。注意,如果constrained=\"false\", 不可能使用代理,Hibernate会采取预先抓取。" #. Tag: para #, no-c-format @@ -2387,63 +1177,33 @@ msgstr "惟一外键关联" #. Tag: para #, no-c-format -msgid "" -"Primary key associations do not need an extra table column. If two rows are " -"related by the association, then the two table rows share the same primary " -"key value. To relate two objects by a primary key association, ensure that " -"they are assigned the same identifier value." -msgstr "" -"主键关联不需要额外的表字段;如果两行是通过这种一对一关系相关联的,那么这两行" -"就共享同样的主关键字值。所以如果你希望两个对象通过主键一对一关联,你必须确认" -"它们被赋予同样的标识值。" +msgid "Primary key associations do not need an extra table column. If two rows are related by the association, then the two table rows share the same primary key value. To relate two objects by a primary key association, ensure that they are assigned the same identifier value." +msgstr "主键关联不需要额外的表字段;如果两行是通过这种一对一关系相关联的,那么这两行就共享同样的主关键字值。所以如果你希望两个对象通过主键一对一关联,你必须确认它们被赋予同样的标识值。" #. Tag: para #, no-c-format -msgid "" -"For a primary key association, add the following mappings to " -"Employee and Person respectively:" -msgstr "" -"比如说,对下面的 EmployeePerson 进" -"行主键一对一关联:" +msgid "For a primary key association, add the following mappings to Employee and Person respectively:" +msgstr "比如说,对下面的 EmployeePerson 进行主键一对一关联:" #. Tag: para #, no-c-format -msgid "" -"Ensure that the primary keys of the related rows in the PERSON and EMPLOYEE " -"tables are equal. You use a special Hibernate identifier generation strategy " -"called foreign:" -msgstr "" -"现在我们必须确保 PERSON 和 EMPLOYEE 中相关的字段是相等的。我们使用一个被成为 " -"foreign 的特殊的 hibernate 标识符生成策略: " +msgid "Ensure that the primary keys of the related rows in the PERSON and EMPLOYEE tables are equal. You use a special Hibernate identifier generation strategy called foreign:" +msgstr "现在我们必须确保 PERSON 和 EMPLOYEE 中相关的字段是相等的。我们使用一个被成为 foreign 的特殊的 hibernate 标识符生成策略: " #. Tag: para #, no-c-format -msgid "" -"A newly saved instance of Person is assigned the same " -"primary key value as the Employee instance referred with " -"the employee property of that Person." -msgstr "" -"一个刚刚保存的 Person 实例被赋予和该 Personemployee 属性所指向的 Employee 实例同样的关键字值。 " +msgid "A newly saved instance of Person is assigned the same primary key value as the Employee instance referred with the employee property of that Person." +msgstr "一个刚刚保存的 Person 实例被赋予和该 Personemployee 属性所指向的 Employee 实例同样的关键字值。 " #. Tag: para #, no-c-format -msgid "" -"Alternatively, a foreign key with a unique constraint, from " -"Employee to Person, can be expressed " -"as:" -msgstr "" -"另一种方式是一个外键和一个惟一关键字对应,上面的 Employee " -"和 Person 的例子,如果使用这种关联方式,可以表达成: " +msgid "Alternatively, a foreign key with a unique constraint, from Employee to Person, can be expressed as:" +msgstr "另一种方式是一个外键和一个惟一关键字对应,上面的 EmployeePerson 的例子,如果使用这种关联方式,可以表达成: " #. Tag: para #, no-c-format -msgid "" -"This association can be made bidirectional by adding the following to the " -"Person mapping:" -msgstr "" -"如果在 Person 的映射加入下面几句,这种关联就是双向的: " +msgid "This association can be made bidirectional by adding the following to the Person mapping:" +msgstr "如果在 Person 的映射加入下面几句,这种关联就是双向的: " #. Tag: title #, no-c-format @@ -2452,48 +1212,23 @@ msgstr "自然 ID(natural-id) " #. Tag: para #, no-c-format -msgid "" -"Although we recommend the use of surrogate keys as primary keys, you should " -"try to identify natural keys for all entities. A natural key is a property " -"or combination of properties that is unique and non-null. It is also " -"immutable. Map the properties of the natural key inside the <" -"natural-id> element. Hibernate will generate the necessary " -"unique key and nullability constraints and, as a result, your mapping will " -"be more self-documenting." -msgstr "" -"我们建议使用代用键(键值不具备实际意义)作为主键,我们仍然应该尝试为所有的实" -"体采用自然的键值作为(附加——译者注)标示。自然键(natural key)是单个或组合属" -"性,他们必须唯一且非空。如果它还是不可变的那就更理想了。在 <" -"natural-id> 元素中列出自然键的属性。Hibernate 会帮你生成必须的唯" -"一键值和非空约束,你的映射会更加的明显易懂(原文是 self-documenting,自我注" -"解)。 " +msgid "Although we recommend the use of surrogate keys as primary keys, you should try to identify natural keys for all entities. A natural key is a property or combination of properties that is unique and non-null. It is also immutable. Map the properties of the natural key inside the <natural-id> element. Hibernate will generate the necessary unique key and nullability constraints and, as a result, your mapping will be more self-documenting." +msgstr "我们建议使用代用键(键值不具备实际意义)作为主键,我们仍然应该尝试为所有的实体采用自然的键值作为(附加——译者注)标示。自然键(natural key)是单个或组合属性,他们必须唯一且非空。如果它还是不可变的那就更理想了。在 <natural-id> 元素中列出自然键的属性。Hibernate 会帮你生成必须的唯一键值和非空约束,你的映射会更加的明显易懂(原文是 self-documenting,自我注解)。 " #. Tag: para #, no-c-format -msgid "" -"It is recommended that you implement equals() and " -"hashCode() to compare the natural key properties of the " -"entity." -msgstr "" -"我们强烈建议你实现 equals()hashCode() 方法,来比较实体的自然键属性。 " +msgid "It is recommended that you implement equals() and hashCode() to compare the natural key properties of the entity." +msgstr "我们强烈建议你实现 equals()hashCode() 方法,来比较实体的自然键属性。 " #. Tag: para #, no-c-format -msgid "" -"This mapping is not intended for use with entities that have natural primary " -"keys." +msgid "This mapping is not intended for use with entities that have natural primary keys." msgstr "这一映射不是为了把自然键作为主键而准备的。 " #. Tag: para #, no-c-format -msgid "" -"mutable (optional - defaults to false): by default, natural identifier properties are assumed to be " -"immutable (constant)." -msgstr "" -"mutable(可选,默认为 false):默认情况" -"下,自然标识属性被假定为不可变的(常量)。 " +msgid "mutable (optional - defaults to false): by default, natural identifier properties are assumed to be immutable (constant)." +msgstr "mutable(可选,默认为 false):默认情况下,自然标识属性被假定为不可变的(常量)。 " #. Tag: title #, no-c-format @@ -2502,105 +1237,53 @@ msgstr "组件(component)和动态组件(dynamic-component) " #. Tag: para #, no-c-format -msgid "" -"The <component> element maps properties of a child " -"object to columns of the table of a parent class. Components can, in turn, " -"declare their own properties, components or collections. See the \"Component" -"\" examples below:" -msgstr "" -"<component> 元素把子对象的一些元素与父类对应的表的一" -"些字段映射起来。然后组件可以定义它们自己的属性、组件或者集合。参见后面" -"的“Components”一章。 " +msgid "The <component> element maps properties of a child object to columns of the table of a parent class. Components can, in turn, declare their own properties, components or collections. See the \"Component\" examples below:" +msgstr "<component> 元素把子对象的一些元素与父类对应的表的一些字段映射起来。然后组件可以定义它们自己的属性、组件或者集合。参见后面的“Components”一章。 " #. Tag: para #, no-c-format -msgid "" -"class (optional - defaults to the property type " -"determined by reflection): the name of the component (child) class." -msgstr "" -"class(可选 — 默认为通过反射得到的属性类型):组件(子)类" -"的名字。 " +msgid "class (optional - defaults to the property type determined by reflection): the name of the component (child) class." +msgstr "class(可选 — 默认为通过反射得到的属性类型):组件(子)类的名字。 " #. Tag: para #, no-c-format -msgid "" -"insert: do the mapped columns appear in SQL " -"INSERTs?" -msgstr "" -"insert:被映射的字段是否出现在 SQL 的 INSERT 语句中? " +msgid "insert: do the mapped columns appear in SQL INSERTs?" +msgstr "insert:被映射的字段是否出现在 SQL 的 INSERT 语句中? " #. Tag: para #, no-c-format -msgid "" -"update: do the mapped columns appear in SQL " -"UPDATEs?" -msgstr "" -"update:被映射的字段是否出现在 SQL 的 UPDATE 语句中? " +msgid "update: do the mapped columns appear in SQL UPDATEs?" +msgstr "update:被映射的字段是否出现在 SQL 的 UPDATE 语句中? " #. Tag: para #, no-c-format -msgid "" -"lazy (optional - defaults to false): " -"specifies that this component should be fetched lazily when the instance " -"variable is first accessed. It requires build-time bytecode instrumentation." -msgstr "" -"lazy(可选 — 默认是 false):表明此组件" -"应在实例变量第一次被访问的时候延迟加载(需要编译时字节码装置器)。" +msgid "lazy (optional - defaults to false): specifies that this component should be fetched lazily when the instance variable is first accessed. It requires build-time bytecode instrumentation." +msgstr "lazy(可选 — 默认是 false):表明此组件应在实例变量第一次被访问的时候延迟加载(需要编译时字节码装置器)。" #. Tag: para #, no-c-format -msgid "" -"optimistic-lock (optional - defaults to true): specifies that updates to this component either do or do not " -"require acquisition of the optimistic lock. It determines if a version " -"increment should occur when this property is dirty." -msgstr "" -"optimistic-lock(可选 — 默认是 true):" -"表明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号" -"(Version)。" +msgid "optimistic-lock (optional - defaults to true): specifies that updates to this component either do or do not require acquisition of the optimistic lock. It determines if a version increment should occur when this property is dirty." +msgstr "optimistic-lock(可选 — 默认是 true):表明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号(Version)。" #. Tag: para #, no-c-format -msgid "" -"unique (optional - defaults to false): " -"specifies that a unique constraint exists upon all mapped columns of the " -"component." -msgstr "" -"unique(可选 — 默认是 false):表明组件" -"映射的所有字段上都有唯一性约束。" +msgid "unique (optional - defaults to false): specifies that a unique constraint exists upon all mapped columns of the component." +msgstr "unique(可选 — 默认是 false):表明组件映射的所有字段上都有唯一性约束。" #. Tag: para #, no-c-format -msgid "" -"The child <property> tags map properties of the " -"child class to table columns." -msgstr "" -"其 <property> 子标签为子类的一些属性与表字段之间建立" -"映射。" +msgid "The child <property> tags map properties of the child class to table columns." +msgstr "其 <property> 子标签为子类的一些属性与表字段之间建立映射。" #. Tag: para #, no-c-format -msgid "" -"The <component> element allows a <" -"parent> subelement that maps a property of the component class " -"as a reference back to the containing entity." -msgstr "" -"<component> 元素允许加入一个 <parent>" -" 子元素,在组件类内部就可以有一个指向其容器的实体的反向引用。" +msgid "The <component> element allows a <parent> subelement that maps a property of the component class as a reference back to the containing entity." +msgstr "<component> 元素允许加入一个 <parent> 子元素,在组件类内部就可以有一个指向其容器的实体的反向引用。" #. Tag: para #, no-c-format -msgid "" -"The <dynamic-component> element allows a " -"Map to be mapped as a component, where the property names " -"refer to keys of the map. See for " -"more information." -msgstr "" -"<dynamic-component> 元素允许把一个 Map 映射为组件,其属性名对应 map 的键值。参见 。 " +msgid "The <dynamic-component> element allows a Map to be mapped as a component, where the property names refer to keys of the map. See for more information." +msgstr "<dynamic-component> 元素允许把一个 Map 映射为组件,其属性名对应 map 的键值。参见 。 " #. Tag: title #, no-c-format @@ -2609,60 +1292,32 @@ msgstr "属性(Properties)" #. Tag: para #, no-c-format -msgid "" -"The <properties> element allows the definition of a " -"named, logical grouping of the 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 property-ref. It is also a convenient way to " -"define a multi-column unique constraint. For example:" -msgstr "" -"<properties> 元素允许定义一个命名的逻辑分组" -"(grouping)包含一个类中的多个属性。这个元素最重要的用处是允许多个属性的组合" -"作为 property-ref 的目标(target)。这也是定义多字段唯一约" -"束的一种方便途径。例如:" +msgid "The <properties> element allows the definition of a named, logical grouping of the 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 property-ref. It is also a convenient way to define a multi-column unique constraint. For example:" +msgstr "<properties> 元素允许定义一个命名的逻辑分组(grouping)包含一个类中的多个属性。这个元素最重要的用处是允许多个属性的组合作为 property-ref 的目标(target)。这也是定义多字段唯一约束的一种方便途径。例如:" #. Tag: para #, no-c-format -msgid "" -"name: the logical name of the grouping. It is " -"not an actual property name." -msgstr "" -"name:分组的逻辑名称 — 不是 实际属性" -"的名称。 " +msgid "name: the logical name of the grouping. It is not an actual property name." +msgstr "name:分组的逻辑名称 — 不是 实际属性的名称。 " #. Tag: para #, no-c-format -msgid "" -"optimistic-lock (optional - defaults to true): specifies that updates to these properties either do or do not " -"require acquisition of the optimistic lock. It determines if a version " -"increment should occur when these properties are dirty." -msgstr "" -"optimistic-lock(可选 — 默认是 true):" -"表明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号" -"(Version)。" +msgid "optimistic-lock (optional - defaults to true): specifies that updates to these properties either do or do not require acquisition of the optimistic lock. It determines if a version increment should occur when these properties are dirty." +msgstr "optimistic-lock(可选 — 默认是 true):表明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号(Version)。" #. Tag: para #, no-c-format -msgid "" -"For example, if we have the following <properties> " -"mapping:" +msgid "For example, if we have the following <properties> mapping:" msgstr "例如,如果我们有如下的 <properties> 映射:" #. Tag: para #, no-c-format -msgid "" -"You might have some legacy data association that refers to this unique key " -"of the Person table, instead of to the primary key:" -msgstr "" -"然后,我们可能有一些遗留的数据关联,引用 Person 表的这个唯" -"一键,而不是主键:" +msgid "You might have some legacy data association that refers to this unique key of the Person table, instead of to the primary key:" +msgstr "然后,我们可能有一些遗留的数据关联,引用 Person 表的这个唯一键,而不是主键:" #. Tag: para #, no-c-format -msgid "" -"The use of this outside the context of mapping legacy data is not " -"recommended." +msgid "The use of this outside the context of mapping legacy data is not recommended." msgstr "我们并不推荐这样使用,除非在映射遗留数据的情况下。 " #. Tag: title @@ -2672,66 +1327,37 @@ msgstr "子类(subclass) " #. Tag: para #, no-c-format -msgid "" -"Polymorphic persistence requires the declaration of each subclass of the " -"root persistent class. For the table-per-class-hierarchy mapping strategy, " -"the <subclass> declaration is used. For example:" -msgstr "" -"最后,多态持久化需要为父类的每个子类都进行定义。对于“每一棵类继承树对应一个" -"表”的策略来说,就需要使用 <subclass> 定义。 " +msgid "Polymorphic persistence requires the declaration of each subclass of the root persistent class. For the table-per-class-hierarchy mapping strategy, the <subclass> declaration is used. For example:" +msgstr "最后,多态持久化需要为父类的每个子类都进行定义。对于“每一棵类继承树对应一个表”的策略来说,就需要使用 <subclass> 定义。 " #. Tag: para #, no-c-format -msgid "" -"name: the fully qualified class name of the subclass." +msgid "name: the fully qualified class name of the subclass." msgstr "name:子类的全限定名。 " #. Tag: para #, no-c-format -msgid "" -"discriminator-value (optional - defaults to the class " -"name): a value that distinguishes individual subclasses." -msgstr "" -"discriminator-value(辨别标志)(可选 — 默认为类名):一个" -"用于区分每个独立的子类的值。 " +msgid "discriminator-value (optional - defaults to the class name): a value that distinguishes individual subclasses." +msgstr "discriminator-value(辨别标志)(可选 — 默认为类名):一个用于区分每个独立的子类的值。 " #. Tag: para #, no-c-format -msgid "" -"proxy (optional): specifies a class or interface used for " -"lazy initializing proxies." -msgstr "" -"proxy(可选):指定一个类或者接口,在延迟装载时作为代理使" -"用。 " +msgid "proxy (optional): specifies a class or interface used for lazy initializing proxies." +msgstr "proxy(可选):指定一个类或者接口,在延迟装载时作为代理使用。 " #. Tag: para #, no-c-format -msgid "" -"lazy (optional - defaults to true): " -"setting lazy=\"false\" disables the use of lazy fetching." -msgstr "" -"lazy(可选,默认是 true):设置为 " -"lazy=\"false\" 禁止使用延迟装载。 " +msgid "lazy (optional - defaults to true): setting lazy=\"false\" disables the use of lazy fetching." +msgstr "lazy(可选,默认是 true):设置为 lazy=\"false\" 禁止使用延迟装载。 " #. Tag: para #, no-c-format -msgid "" -"Each subclass declares its own persistent properties and subclasses. " -"<version> and <id> " -"properties are assumed to be inherited from the root class. Each subclass in " -"a hierarchy must define a unique discriminator-value. If " -"this is not specified, the fully qualified Java class name is used." -msgstr "" -"每个子类都应该定义它自己的持久化属性和子类。<version><id> 属性可以从根父类继承下来。在一棵继" -"承树上的每个子类都必须定义一个唯一的 discriminator-value。" -"如果没有指定,就会使用 Java 类的全限定名。 " +msgid "Each subclass declares its own persistent properties and subclasses. <version> and <id> properties are assumed to be inherited from the root class. Each subclass in a hierarchy must define a unique discriminator-value. If this is not specified, the fully qualified Java class name is used." +msgstr "每个子类都应该定义它自己的持久化属性和子类。<version><id> 属性可以从根父类继承下来。在一棵继承树上的每个子类都必须定义一个唯一的 discriminator-value。如果没有指定,就会使用 Java 类的全限定名。 " #. Tag: para #, no-c-format -msgid "" -"For information about inheritance mappings see ." +msgid "For information about inheritance mappings see ." msgstr "更多关于继承映射的信息,参考 。 " #. Tag: title @@ -2741,15 +1367,8 @@ msgstr "连接的子类(joined-subclass) " #. Tag: para #, no-c-format -msgid "" -"Each subclass can also be mapped to its own table. This is called the table-" -"per-subclass mapping strategy. An inherited state is retrieved by joining " -"with the table of the superclass. To do this you use the <joined-" -"subclass> element. For example:" -msgstr "" -"此外,每个子类可能被映射到他自己的表中(每个子类一个表的策略)。被继承的状态" -"通过和超类的表关联得到。我们使用 <joined-subclass> " -"元素。 " +msgid "Each subclass can also be mapped to its own table. This is called the table-per-subclass mapping strategy. An inherited state is retrieved by joining with the table of the superclass. To do this you use the <joined-subclass> element. For example:" +msgstr "此外,每个子类可能被映射到他自己的表中(每个子类一个表的策略)。被继承的状态通过和超类的表关联得到。我们使用 <joined-subclass> 元素。 " #. Tag: para #, no-c-format @@ -2758,33 +1377,18 @@ msgstr "table:子类的表名。" #. Tag: para #, no-c-format -msgid "" -"proxy (optional): specifies a class or interface to use " -"for lazy initializing proxies." -msgstr "" -"proxy(可选):指定一个类或者接口,在延迟装载时作为代理使" -"用。 " +msgid "proxy (optional): specifies a class or interface to use for lazy initializing proxies." +msgstr "proxy(可选):指定一个类或者接口,在延迟装载时作为代理使用。 " #. Tag: para #, no-c-format -msgid "" -"lazy (optional, defaults to true): " -"setting lazy=\"false\" disables the use of lazy fetching." -msgstr "" -"lazy(可选,默认是 true):设置为 " -"lazy=\"false\" 禁止使用延迟装载。 " +msgid "lazy (optional, defaults to true): setting lazy=\"false\" disables the use of lazy fetching." +msgstr "lazy(可选,默认是 true):设置为 lazy=\"false\" 禁止使用延迟装载。 " #. Tag: para #, no-c-format -msgid "" -"A discriminator column is not required for this mapping strategy. Each " -"subclass must, however, declare a table column holding the object identifier " -"using the <key> element. The mapping at the start " -"of the chapter would then be re-written as:" -msgstr "" -"这种映射策略不需要指定辨别标志(discriminator)字段。但是,每一个子类都必须使" -"用 <key> 元素指定一个表字段来持有对象的标识符。本章" -"开始的映射可以被用如下方式重写: " +msgid "A discriminator column is not required for this mapping strategy. Each subclass must, however, declare a table column holding the object identifier using the <key> element. The mapping at the start of the chapter would then be re-written as:" +msgstr "这种映射策略不需要指定辨别标志(discriminator)字段。但是,每一个子类都必须使用 <key> 元素指定一个表字段来持有对象的标识符。本章开始的映射可以被用如下方式重写: " #. Tag: title #, no-c-format @@ -2793,27 +1397,12 @@ msgstr "联合子类(union-subclass) " #. Tag: para #, no-c-format -msgid "" -"A third option is to map only the concrete classes of an inheritance " -"hierarchy to tables. This is called the table-per-concrete-class strategy. " -"Each table defines all persistent states of the class, including the " -"inherited state. In Hibernate, it is not necessary to explicitly map such " -"inheritance hierarchies. You can map each class with a separate <" -"class> declaration. However, if you wish use polymorphic " -"associations (e.g. an association to the superclass of your hierarchy), you " -"need to use the <union-subclass> mapping. For " -"example:" -msgstr "" -"第三种选择是仅仅映射类继承树中具体类部分到表中(每个具体类一张表的策略)。其" -"中,每张表定义了类的所有持久化状态,包括继承的状态。在 Hibernate 中,并不需要" -"完全显式地映射这样的继承树。你可以简单地使用单独的 <class> 定义映射每个类。然而,如果你想使用多态关联(例如,一个对类继承树中超" -"类的关联),你需要使用 <union-subclass> 映射。 " +msgid "A third option is to map only the concrete classes of an inheritance hierarchy to tables. This is called the table-per-concrete-class strategy. Each table defines all persistent states of the class, including the inherited state. In Hibernate, it is not necessary to explicitly map such inheritance hierarchies. You can map each class with a separate <class> declaration. However, if you wish use polymorphic associations (e.g. an association to the superclass of your hierarchy), you need to use the <union-subclass> mapping. For example:" +msgstr "第三种选择是仅仅映射类继承树中具体类部分到表中(每个具体类一张表的策略)。其中,每张表定义了类的所有持久化状态,包括继承的状态。在 Hibernate 中,并不需要完全显式地映射这样的继承树。你可以简单地使用单独的 <class> 定义映射每个类。然而,如果你想使用多态关联(例如,一个对类继承树中超类的关联),你需要使用 <union-subclass> 映射。 " #. Tag: para #, no-c-format -msgid "" -"No discriminator column or key column is required for this mapping strategy." +msgid "No discriminator column or key column is required for this mapping strategy." msgstr "这种映射策略不需要指定辨别标志(discriminator)字段。" #. Tag: title @@ -2823,13 +1412,8 @@ msgstr "连接(join) " #. Tag: para #, no-c-format -msgid "" -"Using the <join> element, it is possible to map " -"properties of one class to several tables that have a one-to-one " -"relationship. For example:" -msgstr "" -"使用 <join> 元素,假若在表之间存在一对一关联,可以将" -"一个类的属性映射到多张表中。 " +msgid "Using the <join> element, it is possible to map properties of one class to several tables that have a one-to-one relationship. For example:" +msgstr "使用 <join> 元素,假若在表之间存在一对一关联,可以将一个类的属性映射到多张表中。 " #. Tag: para #, no-c-format @@ -2838,66 +1422,28 @@ msgstr "table:被连接表的名称。 " #. Tag: para #, no-c-format -msgid "" -"fetch (optional - defaults to join): " -"if set to join, the default, Hibernate will use an inner " -"join to retrieve a <join> defined by a class or its " -"superclasses. It will use an outer join for a <join> defined by a subclass. If set to select then " -"Hibernate will use a sequential select for a <join> " -"defined on a subclass. This will be issued only if a row represents an " -"instance of the subclass. Inner joins will still be used to retrieve a " -"<join> defined by the class and its superclasses." -msgstr "" -"fetch(可选 — 默认是 join):如果设置为" -"默认值 join,Hibernate 将使用一个内连接来得到这个类或其超" -"类定义的 <join>,而使用一个外连接来得到其子类定义的 " -"<join>。如果设置为 select,则 " -"Hibernate 将为子类定义的 <join> 使用顺序选择。这仅在" -"一行数据表示一个子类的对象的时候才会发生。对这个类和其超类定义的 " -"<join>,依然会使用内连接得到。 " +msgid "fetch (optional - defaults to join): if set to join, the default, Hibernate will use an inner join to retrieve a <join> defined by a class or its superclasses. It will use an outer join for a <join> defined by a subclass. If set to select then Hibernate will use a sequential select for a <join> defined on a subclass. This will be issued only if a row represents an instance of the subclass. Inner joins will still be used to retrieve a <join> defined by the class and its superclasses." +msgstr "fetch(可选 — 默认是 join):如果设置为默认值 join,Hibernate 将使用一个内连接来得到这个类或其超类定义的 <join>,而使用一个外连接来得到其子类定义的 <join>。如果设置为 select,则 Hibernate 将为子类定义的 <join> 使用顺序选择。这仅在一行数据表示一个子类的对象的时候才会发生。对这个类和其超类定义的 <join>,依然会使用内连接得到。 " #. Tag: para #, no-c-format -msgid "" -"inverse (optional - defaults to false): if enabled, Hibernate will not insert or update the properties " -"defined by this join." -msgstr "" -"inverse(可选 — 默认是 false):如果打" -"开,Hibernate 不会插入或者更新此连接定义的属性。 " +msgid "inverse (optional - defaults to false): if enabled, Hibernate will not insert or update the properties defined by this join." +msgstr "inverse(可选 — 默认是 false):如果打开,Hibernate 不会插入或者更新此连接定义的属性。 " #. Tag: para #, no-c-format -msgid "" -"optional (optional - defaults to false): if enabled, Hibernate will insert a row only if the properties " -"defined by this join are non-null. It will always use an outer join to " -"retrieve the properties." -msgstr "" -"optional(可选 — 默认是 false):如果打" -"开,Hibernate 只会在此连接定义的属性非空时插入一行数据,并且总是使用一个外连" -"接来得到这些属性。 " +msgid "optional (optional - defaults to false): if enabled, Hibernate will insert a row only if the properties defined by this join are non-null. It will always use an outer join to retrieve the properties." +msgstr "optional(可选 — 默认是 false):如果打开,Hibernate 只会在此连接定义的属性非空时插入一行数据,并且总是使用一个外连接来得到这些属性。 " #. Tag: para #, no-c-format -msgid "" -"For example, address information for a person can be mapped to a separate " -"table while preserving value type semantics for all properties:" -msgstr "" -"例如,一个人(person)的地址(address)信息可以被映射到单独的表中(并保留所有" -"属性的值类型语义): " +msgid "For example, address information for a person can be mapped to a separate table while preserving value type semantics for all properties:" +msgstr "例如,一个人(person)的地址(address)信息可以被映射到单独的表中(并保留所有属性的值类型语义): " #. Tag: para #, 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 "" -"此特性常常对遗留数据模型有用,我们推荐表个数比类个数少,以及细粒度的领域模" -"型。然而,在单独的继承树上切换继承映射策略是有用的,后面会解释这点。 " +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 "此特性常常对遗留数据模型有用,我们推荐表个数比类个数少,以及细粒度的领域模型。然而,在单独的继承树上切换继承映射策略是有用的,后面会解释这点。 " #. Tag: title #, no-c-format @@ -2906,94 +1452,43 @@ msgstr "Key" #. Tag: para #, no-c-format -msgid "" -"The <key> element has featured a few times within " -"this guide. It appears anywhere the parent mapping element defines a join to " -"a new table that references the primary key of the original table. It also " -"defines the foreign key in the joined table:" -msgstr "" -"我们目前已经见到过 <key> 元素多次了。这个元素在父映" -"射元素定义了对新表的连接,并且在被连接表中定义了一个外键引用原表的主键的情况" -"下经常使用。 " +msgid "The <key> element has featured a few times within this guide. It appears anywhere the parent mapping element defines a join to a new table that references the primary key of the original table. It also defines the foreign key in the joined table:" +msgstr "我们目前已经见到过 <key> 元素多次了。这个元素在父映射元素定义了对新表的连接,并且在被连接表中定义了一个外键引用原表的主键的情况下经常使用。 " #. Tag: para #, no-c-format -msgid "" -"on-delete (optional - defaults to noaction): specifies whether the foreign key constraint has database-level " -"cascade delete enabled." -msgstr "" -"on-delete(可选,默认是 noaction):表" -"明外键关联是否打开数据库级别的级联删除。 " +msgid "on-delete (optional - defaults to noaction): specifies whether the foreign key constraint has database-level cascade delete enabled." +msgstr "on-delete(可选,默认是 noaction):表明外键关联是否打开数据库级别的级联删除。 " #. Tag: para #, no-c-format -msgid "" -"property-ref (optional): specifies that the foreign key " -"refers to columns that are not the primary key of the original table. It is " -"provided for legacy data." -msgstr "" -"property-ref(可选):表明外键引用的字段不是原表的主键(提" -"供给遗留数据)。 " +msgid "property-ref (optional): specifies that the foreign key refers to columns that are not the primary key of the original table. It is provided for legacy data." +msgstr "property-ref(可选):表明外键引用的字段不是原表的主键(提供给遗留数据)。 " #. Tag: para #, no-c-format -msgid "" -"not-null (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 "" -"not-null(可选):表明外键的字段不可为空(这意味着无论何时" -"外键都是主键的一部分)。 " +msgid "not-null (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 "not-null(可选):表明外键的字段不可为空(这意味着无论何时外键都是主键的一部分)。 " #. Tag: para #, no-c-format -msgid "" -"update (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 "" -"update(可选):表明外键决不应该被更新(这意味着无论何时外" -"键都是主键的一部分)。 " +msgid "update (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 "update(可选):表明外键决不应该被更新(这意味着无论何时外键都是主键的一部分)。 " #. Tag: para #, no-c-format -msgid "" -"unique (optional): specifies that the foreign key should " -"have a unique constraint. This is implied whenever the foreign key is also " -"the primary key." -msgstr "" -"unique(可选):表明外键应有唯一性约束(这意味着无论何时外" -"键都是主键的一部分)。 " +msgid "unique (optional): specifies that the foreign key should have a unique constraint. This is implied whenever the foreign key is also the primary key." +msgstr "unique(可选):表明外键应有唯一性约束(这意味着无论何时外键都是主键的一部分)。 " #. Tag: para #, no-c-format -msgid "" -"For systems where delete performance is important, we recommend that all " -"keys should be defined on-delete=\"cascade\". Hibernate " -"uses a database-level ON CASCADE DELETE constraint, " -"instead of many individual DELETE statements. Be aware " -"that this feature bypasses Hibernate's usual optimistic locking strategy for " -"versioned data." -msgstr "" -"对那些看重删除性能的系统,我们推荐所有的键都应该定义为 on-delete=" -"\"cascade\",这样 Hibernate 将使用数据库级的 ON CASCADE " -"DELETE 约束,而不是多个 DELETE 语句。注意,这个" -"特性会绕过 Hibernate 通常对版本数据(versioned data)采用的乐观锁策略。 " +msgid "For systems where delete performance is important, we recommend that all keys should be defined on-delete=\"cascade\". Hibernate uses a database-level ON CASCADE DELETE constraint, instead of many individual DELETE statements. Be aware that this feature bypasses Hibernate's usual optimistic locking strategy for versioned data." +msgstr "对那些看重删除性能的系统,我们推荐所有的键都应该定义为 on-delete=\"cascade\",这样 Hibernate 将使用数据库级的 ON CASCADE DELETE 约束,而不是多个 DELETE 语句。注意,这个特性会绕过 Hibernate 通常对版本数据(versioned data)采用的乐观锁策略。 " #. Tag: para #, no-c-format -msgid "" -"The not-null and update attributes are " -"useful when mapping a unidirectional one-to-many association. If you map a " -"unidirectional one-to-many association to a non-nullable foreign key, you " -"must declare the key column using <key not-" -"null=\"true\">." -msgstr "" -"not-nullupdate 属性在映射单向一对多" -"关联的时候有用。如果你映射一个单向一对多关联到非空的(non-nullable)外键,你" -"必须<key not-null=\"true\"> 定义此键字段。 " +msgid "The not-null and update attributes are useful when mapping a unidirectional one-to-many association. If you map a unidirectional one-to-many association to a non-nullable foreign key, you must declare the key column using <key not-null=\"true\">." +msgstr "not-nullupdate 属性在映射单向一对多关联的时候有用。如果你映射一个单向一对多关联到非空的(non-nullable)外键,你必须<key not-null=\"true\"> 定义此键字段。 " #. Tag: title #, no-c-format @@ -3002,36 +1497,18 @@ msgstr "字段和规则元素(column and formula elements) " #. Tag: para #, no-c-format -msgid "" -"Mapping elements which accept a column attribute will " -"alternatively accept a <column> subelement. " -"Likewise, <formula> is an alternative to the " -"formula attribute. For example:" -msgstr "" -"任何接受 column 属性的映射元素都可以选择接受 <" -"column> 子元素。同样的,formula 子元素也可以" -"替换 <formula> 属性。 " +msgid "Mapping elements which accept a column attribute will alternatively accept a <column> subelement. Likewise, <formula> is an alternative to the formula attribute. For example:" +msgstr "任何接受 column 属性的映射元素都可以选择接受 <column> 子元素。同样的,formula 子元素也可以替换 <formula> 属性。 " #. Tag: para #, no-c-format -msgid "" -"Most of the attributes on column provide a means of " -"tailoring the DDL during automatic schema generation. The read and write attributes allow you to specify custom " -"SQL that Hibernate will use to access the column's value. For more on this, " -"see the discussion of column " -"read and write expressions." -msgstr "" +msgid "Most of the attributes on column provide a means of tailoring the DDL during automatic schema generation. The read and write attributes allow you to specify custom SQL that Hibernate will use to access the column's value. For more on this, see the discussion of column read and write expressions." +msgstr "column 上的大多数属性都提供了在自动模式生成过程中对 DDL 进行裁剪的方法。readwrite 属性允许你指定 Hibernate 用于访问字段值的自定义的 SQL。关于更多的内容,请参考 column read and write expressions。" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"The column and formula elements can " -"even be combined within the same property or association mapping to express, " -"for example, exotic join conditions." -msgstr "" -"columnformula 属性甚至可以在同一个" -"属性或关联映射中被合并来表达,例如,一些奇异的连接条件。 " +#, no-c-format +msgid "The column and formula elements can even be combined within the same property or association mapping to express, for example, exotic join conditions." +msgstr "columnformula 属性甚至可以在同一个属性或关联映射中被合并来表达,例如,一些奇异的连接条件。" #. Tag: title #, no-c-format @@ -3040,31 +1517,18 @@ msgstr "引用(import) " #. Tag: para #, no-c-format -msgid "" -"If your application has two persistent classes with the same name, and you " -"do not want to specify the fully qualified package name in Hibernate " -"queries, classes can be \"imported\" explicitly, rather than relying upon " -"auto-import=\"true\". You can also import classes and " -"interfaces that are not explicitly mapped:" -msgstr "" -"假设你的应用程序有两个同样名字的持久化类,但是你不想在 Hibernate 查询中使用他" -"们的全限定名。除了依赖 auto-import=\"true\" 以外,类也可以" -"被显式地“import(引用)”。你甚至可以引用没有被明确映射的类和接口。 " +msgid "If your application has two persistent classes with the same name, and you do not want to specify the fully qualified package name in Hibernate queries, classes can be \"imported\" explicitly, rather than relying upon auto-import=\"true\". You can also import classes and interfaces that are not explicitly mapped:" +msgstr "假设你的应用程序有两个同样名字的持久化类,但是你不想在 Hibernate 查询中使用他们的全限定名。除了依赖 auto-import=\"true\" 以外,类也可以被显式地“import(引用)”。你甚至可以引用没有被明确映射的类和接口。 " #. Tag: para #, no-c-format -msgid "" -"class: the fully qualified class name of any Java class." +msgid "class: the fully qualified class name of any Java class." msgstr "class:任何 Java 类的全限定名。 " #. Tag: para #, no-c-format -msgid "" -"rename (optional - defaults to the unqualified class " -"name): a name that can be used in the query language." -msgstr "" -"rename(可选 — 默认为类的全限定名):在查询语句中可以使用" -"的名字。 " +msgid "rename (optional - defaults to the unqualified class name): a name that can be used in the query language." +msgstr "rename(可选 — 默认为类的全限定名):在查询语句中可以使用的名字。 " #. Tag: title #, no-c-format @@ -3073,34 +1537,13 @@ msgstr "Any" #. Tag: para #, no-c-format -msgid "" -"There is one more type of property mapping. The <any> mapping element defines a polymorphic association to classes from " -"multiple tables. This type of mapping requires more than one column. The " -"first column contains the type of the associated entity. The remaining " -"columns contain the identifier. It is impossible to specify a foreign key " -"constraint for this kind of association. This is not the usual way of " -"mapping polymorphic associations and you should use this only in special " -"cases. For example, for audit logs, user session data, etc." -msgstr "" -"这是属性映射的又一种类型。<any> 映射元素定义了一种从" -"多个表到类的多态关联。这种类型的映射常常需要多于一个字段。第一个字段持有被关" -"联实体的类型,其他的字段持有标识符。对这种类型的关联来说,不可能指定一个外键" -"约束,所以这当然不是映射(多态)关联的通常的方式。你只应该在非常特殊的情况下" -"使用它(比如,审计 log,用户会话数据等等)。 " +msgid "There is one more type of property mapping. The <any> mapping element defines a polymorphic association to classes from multiple tables. This type of mapping requires more than one column. The first column contains the type of the associated entity. The remaining columns contain the identifier. It is impossible to specify a foreign key constraint for this kind of association. This is not the usual way of mapping polymorphic associations and you should use this only in special cases. For example, for audit logs, user session data, etc." +msgstr "这是属性映射的又一种类型。<any> 映射元素定义了一种从多个表到类的多态关联。这种类型的映射常常需要多于一个字段。第一个字段持有被关联实体的类型,其他的字段持有标识符。对这种类型的关联来说,不可能指定一个外键约束,所以这当然不是映射(多态)关联的通常的方式。你只应该在非常特殊的情况下使用它(比如,审计 log,用户会话数据等等)。 " #. Tag: para #, no-c-format -msgid "" -"The meta-type attribute allows the application to specify " -"a custom type that maps database column values to persistent classes that " -"have identifier properties of the type specified by id-type. You must specify the mapping from values of the meta-type to class " -"names." -msgstr "" -"meta-type 属性使得应用程序能指定一个将数据库字段的值映射到" -"持久化类的自定义类型。这个持久化类包含有用 id-type 指定的" -"标识符属性。你必须指定从 meta-type 的值到类名的映射。 " +msgid "The meta-type attribute allows the application to specify a custom type that maps database column values to persistent classes that have identifier properties of the type specified by id-type. You must specify the mapping from values of the meta-type to class names." +msgstr "meta-type 属性使得应用程序能指定一个将数据库字段的值映射到持久化类的自定义类型。这个持久化类包含有用 id-type 指定的标识符属性。你必须指定从 meta-type 的值到类名的映射。 " #. Tag: para #, no-c-format @@ -3114,33 +1557,18 @@ msgstr "id-type:标识符类型" #. Tag: para #, no-c-format -msgid "" -"meta-type (optional - defaults to string): any type that is allowed for a discriminator mapping." -msgstr "" -"meta-type(可选 -默认是 string):允许" -"辨别标志(discriminator)映射的任何类型。 " +msgid "meta-type (optional - defaults to string): any type that is allowed for a discriminator mapping." +msgstr "meta-type(可选 -默认是 string):允许辨别标志(discriminator)映射的任何类型。 " #. Tag: para #, no-c-format -msgid "" -"cascade (optional- defaults to none): " -"the cascade style." -msgstr "" -"cascade(可选 — 默认是none):级联的类" -"型。" +msgid "cascade (optional- defaults to none): the cascade style." +msgstr "cascade(可选 — 默认是none):级联的类型。" #. Tag: para #, no-c-format -msgid "" -"optimistic-lock (optional - defaults to true): specifies that updates to this property either do or do not " -"require acquisition of the optimistic lock. It defines whether a version " -"increment should occur if this property is dirty." -msgstr "" -"optimistic-lock(可选 — 默认是 true):" -"表明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号" -"(Version)。" +msgid "optimistic-lock (optional - defaults to true): specifies that updates to this property either do or do not require acquisition of the optimistic lock. It defines whether a version increment should occur if this property is dirty." +msgstr "optimistic-lock(可选 — 默认是 true):表明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号(Version)。" #. Tag: title #, no-c-format @@ -3154,72 +1582,23 @@ msgstr "实体(Entities)和值(values)" #. Tag: para #, no-c-format -msgid "" -"In relation to the persistence service, Java language-level objects are " -"classified into two groups:" +msgid "In relation to the persistence service, Java language-level objects are classified into two groups:" msgstr "和持久化服务相比,Java 级别的对象分为两个组别:" #. Tag: para #, no-c-format -msgid "" -"An entity 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. Saves and deletions, however, can be " -"cascaded from a parent entity to its children. This is " -"different from the ODMG model of object persistence by reachability and " -"corresponds more closely to how application objects are usually used in " -"large systems. Entities support circular and shared references. They can " -"also be versioned." -msgstr "" -"实体entity 独立于任何持有实体引用的对象。与通常的 Java " -"模型相比,不再被引用的对象会被当作垃圾收集掉。实体必须被显式的保存和删除(除" -"非保存和删除是从父实体向子实体引发的级联)。这和 ODMG 模" -"型中关于对象通过可触及保持持久性有一些不同 — 比较起来更加接近应用程序对象通常" -"在一个大系统中的使用方法。实体支持循环引用和交叉引用,它们也可以加上版本信" -"息。 " +msgid "An entity 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. Saves and deletions, however, can be cascaded from a parent entity to its children. This is different from the ODMG model of object persistence by reachability and corresponds more closely to how application objects are usually used in large systems. Entities support circular and shared references. They can also be versioned." +msgstr "实体entity 独立于任何持有实体引用的对象。与通常的 Java 模型相比,不再被引用的对象会被当作垃圾收集掉。实体必须被显式的保存和删除(除非保存和删除是从父实体向子实体引发的级联)。这和 ODMG 模型中关于对象通过可触及保持持久性有一些不同 — 比较起来更加接近应用程序对象通常在一个大系统中的使用方法。实体支持循环引用和交叉引用,它们也可以加上版本信息。 " #. Tag: para #, no-c-format -msgid "" -"An entity's persistent state consists of references to other entities and " -"instances of value types. Values are primitives: " -"collections (not what is inside a collection), components and certain " -"immutable objects. Unlike entities, values in particular collections and " -"components, are persisted and deleted by reachability. " -"Since value objects and primitives are persisted and deleted along with " -"their containing entity, they cannot be independently versioned. Values have " -"no independent identity, so they cannot be shared by two entities or " -"collections." -msgstr "" -"一个实体的持久状态包含指向其他实体和类型实例的引用。值" -"可以是原始类型,集合(不是集合中的对象),组件或者特定的不可变对象。与实体不" -"同,值(特别是集合和组件)是通过可触及性来进行持久化和删除的。因为值对象(和" -"原始类型数据)是随着包含他们的实体而被持久化和删除的,他们不能被独立的加上版" -"本信息。值没有独立的标识,所以他们不能被两个实体或者集合共享。 " +msgid "An entity's persistent state consists of references to other entities and instances of value types. Values are primitives: collections (not what is inside a collection), components and certain immutable objects. Unlike entities, values in particular collections and components, are persisted and deleted by reachability. Since value objects and primitives are persisted and deleted along with their containing entity, they cannot be independently versioned. Values have no independent identity, so they cannot be shared by two entities or collections." +msgstr "一个实体的持久状态包含指向其他实体和类型实例的引用。值可以是原始类型,集合(不是集合中的对象),组件或者特定的不可变对象。与实体不同,值(特别是集合和组件)是通过可触及性来进行持久化和删除的。因为值对象(和原始类型数据)是随着包含他们的实体而被持久化和删除的,他们不能被独立的加上版本信息。值没有独立的标识,所以他们不能被两个实体或者集合共享。 " #. Tag: para #, no-c-format -msgid "" -"Until now, we have been using the term \"persistent class\" to refer to " -"entities. We will continue to do that. Not all user-defined classes with a " -"persistent state, however, are entities. A component is " -"a user-defined class with value semantics. A Java property of type " -"java.lang.String also has value semantics. Given this " -"definition, all types (classes) provided by the JDK have value type " -"semantics in Java, while user-defined types can be mapped with entity or " -"value type semantics. This decision is up to the application developer. An " -"entity class in a domain model will normally have shared references to a " -"single instance of that class, while composition or aggregation usually " -"translates to a value type." -msgstr "" -"直到现在,我们都一直使用术语“持久类”(persistent class)来代表实体。我们仍然" -"会这么做。然而严格说来,不是所有的用户自定义的,带有持久化状态的类都是实体。" -"组件就是用户自定义类,却是值语义的。java.lang." -"String 类型的 java 属性也是值语义的。给了这个定义以后,我们可以说所" -"有 JDK 提供的类型(类)都是值类型的语义,而用于自定义类型可能被映射为实体类型" -"或值类型语义。采用哪种类型的语义取决于开发人员。在领域模型中,寻找实体类的一" -"个好线索是共享引用指向这个类的单一实例,而组合或聚合通常被转化为值类型。 " +msgid "Until now, we have been using the term \"persistent class\" to refer to entities. We will continue to do that. Not all user-defined classes with a persistent state, however, are entities. A component is a user-defined class with value semantics. A Java property of type java.lang.String also has value semantics. Given this definition, all types (classes) provided by the JDK have value type semantics in Java, while user-defined types can be mapped with entity or value type semantics. This decision is up to the application developer. An entity class in a domain model will normally have shared references to a single instance of that class, while composition or aggregation usually translates to a value type." +msgstr "直到现在,我们都一直使用术语“持久类”(persistent class)来代表实体。我们仍然会这么做。然而严格说来,不是所有的用户自定义的,带有持久化状态的类都是实体。组件就是用户自定义类,却是值语义的。java.lang.String 类型的 java 属性也是值语义的。给了这个定义以后,我们可以说所有 JDK 提供的类型(类)都是值类型的语义,而用于自定义类型可能被映射为实体类型或值类型语义。采用哪种类型的语义取决于开发人员。在领域模型中,寻找实体类的一个好线索是共享引用指向这个类的单一实例,而组合或聚合通常被转化为值类型。 " #. Tag: para #, no-c-format @@ -3228,34 +1607,13 @@ msgstr "我们会在本文档中重复碰到这两个概念。 " #. Tag: para #, 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, <" -"class>, <subclass> and so on are used. " -"For value types we use <property>, <" -"component>etc., that usually have a type " -"attribute. The value of this attribute is the name of a Hibernate " -"mapping type. Hibernate provides a range of mappings " -"for standard JDK value types out of the box. You can write your own mapping " -"types and implement your own custom conversion strategies." -msgstr "" -"挑战在于将 java 类型系统(和开发者定义的实体和值类型)映射到 SQL/数据库类型系" -"统。Hibernate 提供了连接两个系统之间的桥梁:对于实体类型,我们使用 " -"<class><subclass> 等等。" -"对于值类型,我们使用 <property><" -"component> 及其他,通常跟随着 type 属性。这个" -"属性的值是Hibernate 的映射类型的名字。Hibernate 提供了许" -"多现成的映射(标准的 JDK 值类型)。你也可以编写自己的映射类型并实现自定义的变" -"换策略,随后我们会看到这点。 " +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, <class>, <subclass> and so on are used. For value types we use <property>, <component>etc., that usually have a type attribute. The value of this attribute is the name of a Hibernate mapping type. Hibernate provides a range of mappings for standard JDK value types out of the box. You can write your own mapping types and implement your own custom conversion strategies." +msgstr "挑战在于将 java 类型系统(和开发者定义的实体和值类型)映射到 SQL/数据库类型系统。Hibernate 提供了连接两个系统之间的桥梁:对于实体类型,我们使用 <class><subclass> 等等。对于值类型,我们使用 <property><component> 及其他,通常跟随着 type 属性。这个属性的值是Hibernate 的映射类型的名字。Hibernate 提供了许多现成的映射(标准的 JDK 值类型)。你也可以编写自己的映射类型并实现自定义的变换策略,随后我们会看到这点。 " #. Tag: para #, no-c-format -msgid "" -"With the exception of collections, all built-in Hibernate types support null " -"semantics." -msgstr "" -"所有的 Hibernate 内建类型,除了 collections 以外,都支持空(null)语义。 " +msgid "With the exception of collections, all built-in Hibernate types support null semantics." +msgstr "所有的 Hibernate 内建类型,除了 collections 以外,都支持空(null)语义。 " #. Tag: title #, no-c-format @@ -3264,32 +1622,18 @@ msgstr "基本值类型" #. Tag: para #, no-c-format -msgid "" -"The built-in basic mapping types can be roughly " -"categorized into the following:" +msgid "The built-in basic mapping types can be roughly categorized into the following:" msgstr "内置的 basic mapping types 可以大致地分类为:" #. Tag: term #, 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" +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" #. Tag: para #, no-c-format -msgid "" -"Type mappings from Java primitives or wrapper classes to appropriate (vendor-" -"specific) SQL column types. boolean, yes_no and " -"true_false are all alternative encodings for a Java " -"boolean or java.lang.Boolean." -msgstr "" -"这些类型都对应 Java 的原始类型或者其封装类,来符合(特定厂商的)SQL 字段类" -"型。boolean, yes_notrue_false 都是 " -"Java 中 boolean 或者 java.lang.Boolean " -"的另外说法。" +msgid "Type mappings from Java primitives or wrapper classes to appropriate (vendor-specific) SQL column types. boolean, yes_no and true_false are all alternative encodings for a Java boolean or java.lang.Boolean." +msgstr "这些类型都对应 Java 的原始类型或者其封装类,来符合(特定厂商的)SQL 字段类型。boolean, yes_notrue_false 都是 Java 中 boolean 或者 java.lang.Boolean 的另外说法。" #. Tag: term #, no-c-format @@ -3298,12 +1642,8 @@ msgstr "string" #. Tag: para #, no-c-format -msgid "" -"A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." -msgstr "" -"从 java.lang.StringVARCHAR(或者 " -"Oracle 的 VARCHAR2)的映射。" +msgid "A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." +msgstr "从 java.lang.StringVARCHAR(或者 Oracle 的 VARCHAR2)的映射。" #. Tag: term #, no-c-format @@ -3312,14 +1652,8 @@ msgstr "date, time, timestamp" #. Tag: para #, no-c-format -msgid "" -"Type mappings from java.util.Date and its subclasses to " -"SQL types DATE, TIME and " -"TIMESTAMP (or equivalent)." -msgstr "" -"从 java.util.Date 和其子类到 SQL 类型 DATETIMETIMESTAMP(或等价类" -"型)的映射。" +msgid "Type mappings from java.util.Date and its subclasses to SQL types DATE, TIME and TIMESTAMP (or equivalent)." +msgstr "从 java.util.Date 和其子类到 SQL 类型 DATETIMETIMESTAMP(或等价类型)的映射。" #. Tag: term #, no-c-format @@ -3328,12 +1662,8 @@ msgstr "calendar, calendar_date" #. Tag: para #, no-c-format -msgid "" -"Type mappings from java.util.Calendar to SQL types " -"TIMESTAMP and DATE (or equivalent)." -msgstr "" -"从 java.util.Calendar 到 SQL 类型 TIMESTAMPDATE(或等价类型)的映射。" +msgid "Type mappings from java.util.Calendar to SQL types TIMESTAMP and DATE (or equivalent)." +msgstr "从 java.util.Calendar 到 SQL 类型 TIMESTAMPDATE(或等价类型)的映射。" #. Tag: term #, no-c-format @@ -3342,14 +1672,8 @@ msgstr "big_decimal, big_integer" #. Tag: para #, no-c-format -msgid "" -"Type mappings from java.math.BigDecimal and java." -"math.BigInteger to NUMERIC (or Oracle " -"NUMBER)." -msgstr "" -"从 java.math.BigDecimaljava.math.BigIntegerNUMERIC(或者 Oracle 的 NUMBER类型)的映射。" +msgid "Type mappings from java.math.BigDecimal and java.math.BigInteger to NUMERIC (or Oracle NUMBER)." +msgstr "从 java.math.BigDecimaljava.math.BigIntegerNUMERIC(或者 Oracle 的 NUMBER类型)的映射。" #. Tag: term #, no-c-format @@ -3358,20 +1682,8 @@ msgstr "locale, timezone, currency" #. Tag: para #, no-c-format -msgid "" -"Type mappings from java.util.Locale, java.util." -"TimeZone and java.util.Currency to " -"VARCHAR (or Oracle VARCHAR2). " -"Instances of Locale and Currency are " -"mapped to their ISO codes. Instances of TimeZone are " -"mapped to their ID." -msgstr "" -"从 java.util.Localejava.util.TimeZonejava.util.CurrencyVARCHAR(或者 Oracle 的 VARCHAR2 类型)的映射。" -"LocaleCurrency 的实例被映射为它们" -"的 ISO 代码。TimeZone 的实例被影射为它的 ID。" +msgid "Type mappings from java.util.Locale, java.util.TimeZone and java.util.Currency to VARCHAR (or Oracle VARCHAR2). Instances of Locale and Currency are mapped to their ISO codes. Instances of TimeZone are mapped to their ID." +msgstr "从 java.util.Localejava.util.TimeZonejava.util.CurrencyVARCHAR(或者 Oracle 的 VARCHAR2 类型)的映射。LocaleCurrency 的实例被映射为它们的 ISO 代码。TimeZone 的实例被影射为它的 ID。" #. Tag: term #, no-c-format @@ -3380,14 +1692,8 @@ msgstr "class" #. Tag: para #, no-c-format -msgid "" -"A type mapping from java.lang.Class to VARCHAR (or Oracle VARCHAR2). A Class " -"is mapped to its fully qualified name." -msgstr "" -"从 java.lang.ClassVARCHAR(或者 " -"Oracle 的 VARCHAR2 类型)的映射。Class " -"被映射为它的全限定名。" +msgid "A type mapping from java.lang.Class to VARCHAR (or Oracle VARCHAR2). A Class is mapped to its fully qualified name." +msgstr "从 java.lang.ClassVARCHAR(或者 Oracle 的 VARCHAR2 类型)的映射。Class 被映射为它的全限定名。" #. Tag: term #, no-c-format @@ -3406,12 +1712,8 @@ msgstr "text" #. Tag: para #, no-c-format -msgid "" -"Maps long Java strings to a SQL CLOB or TEXT type." -msgstr "" -"把长 Java 字符串映射为 SQL 的 CLOB 或者 TEXT 类型。" +msgid "Maps long Java strings to a SQL CLOB or TEXT type." +msgstr "把长 Java 字符串映射为 SQL 的 CLOB 或者 TEXT 类型。" #. Tag: term #, no-c-format @@ -3420,14 +1722,8 @@ msgstr "serializable" #. Tag: para #, no-c-format -msgid "" -"Maps serializable Java types to an appropriate SQL binary type. You can also " -"indicate the Hibernate type serializable with the name of " -"a serializable Java class or interface that does not default to a basic type." -msgstr "" -"把可序列化的 Java 类型映射到对应的 SQL 二进制类型。你也可以为一个并非默认为基" -"本类型的可序列化 Java 类或者接口指定 Hibernate 类型 serializable。 " +msgid "Maps serializable Java types to an appropriate SQL binary type. You can also indicate the Hibernate type serializable with the name of a serializable Java class or interface that does not default to a basic type." +msgstr "把可序列化的 Java 类型映射到对应的 SQL 二进制类型。你也可以为一个并非默认为基本类型的可序列化 Java 类或者接口指定 Hibernate 类型 serializable。 " #. Tag: term #, no-c-format @@ -3436,65 +1732,28 @@ msgstr "clob, blob" #. Tag: para #, no-c-format -msgid "" -"Type mappings for the JDBC classes java.sql.Clob and " -"java.sql.Blob. These types can be inconvenient for some " -"applications, since the blob or clob object cannot be reused outside of a " -"transaction. Driver support is patchy and inconsistent." -msgstr "" -"JDBC 类 java.sql.Clobjava.sql.Blob" -"的映射。某些程序可能不适合使用这个类型,因为 blob 和 clob 对象可能在一个事务" -"之外是无法重用的。(而且, 驱动程序对这种类型的支持充满着补丁和前后矛盾。) " +msgid "Type mappings for the JDBC classes java.sql.Clob and java.sql.Blob. These types can be inconvenient for some applications, since the blob or clob object cannot be reused outside of a transaction. Driver support is patchy and inconsistent." +msgstr "JDBC 类 java.sql.Clobjava.sql.Blob的映射。某些程序可能不适合使用这个类型,因为 blob 和 clob 对象可能在一个事务之外是无法重用的。(而且, 驱动程序对这种类型的支持充满着补丁和前后矛盾。) " #. Tag: term #, 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" +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" #. Tag: para #, no-c-format -msgid "" -"Type mappings for what are considered mutable Java types. This is 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 Date.setTime() for an instance mapped as " -"imm_timestamp. 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 会采取特定的优化措施,应用程序会把这些对象作为不可变对象处理。比" -"如,你不应该对作为 imm_timestamp 映射的 Date 执行 " -"Date.setTime()。要改变属性的值,并且保存这一改变,应用程序" -"必须对这一属性重新设置一个新的(不一样的)对象。 " +msgid "Type mappings for what are considered mutable Java types. This is 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 Date.setTime() for an instance mapped as imm_timestamp. 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 会采取特定的优化措施,应用程序会把这些对象作为不可变对象处理。比如,你不应该对作为 imm_timestamp 映射的 Date 执行 Date.setTime()。要改变属性的值,并且保存这一改变,应用程序必须对这一属性重新设置一个新的(不一样的)对象。 " #. Tag: para #, no-c-format -msgid "" -"Unique identifiers of entities and collections can be of any basic type " -"except binary, blob and clob. Composite identifiers are also allowed. See below for more " -"information." -msgstr "" -"实体及其集合的唯一标识可以是除了 binaryblobclob 之外的任何基础类型。(联合标识也是允许" -"的,后面会说到。)" +msgid "Unique identifiers of entities and collections can be of any basic type except binary, blob and clob. Composite identifiers are also allowed. See below for more information." +msgstr "实体及其集合的唯一标识可以是除了 binaryblobclob 之外的任何基础类型。(联合标识也是允许的,后面会说到。)" #. Tag: para #, no-c-format -msgid "" -"The basic value types have corresponding Type constants " -"defined on org.hibernate.Hibernate. For example, " -"Hibernate.STRING represents the string " -"type." -msgstr "" -"在 org.hibernate.Hibernate 中,定义了基础类型对应的 " -"Type 常量。比如,Hibernate.STRING 代表 " -"string 类型。" +msgid "The basic value types have corresponding Type constants defined on org.hibernate.Hibernate. For example, Hibernate.STRING represents the string type." +msgstr "在 org.hibernate.Hibernate 中,定义了基础类型对应的 Type 常量。比如,Hibernate.STRING 代表 string 类型。" #. Tag: title #, no-c-format @@ -3503,125 +1762,48 @@ msgstr "自定义值类型" #. Tag: para #, 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 java.lang." -"BigInteger to VARCHAR columns. Hibernate does " -"not provide a built-in type for this. 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 getName()/" -"setName() of type java.lang.String " -"that is persisted to the columns FIRST_NAME, " -"INITIAL, SURNAME." -msgstr "" -"开发者创建属于他们自己的值类型也是很容易的。比如说,你可能希望持久化 " -"java.lang.BigInteger 类型的属性,持久化成为 " -"VARCHAR 字段。Hibernate没有内置这样一种类型。自定义类型能" -"够映射一个属性(或集合元素)到不止一个数据库表字段。比如说,你可能有这样的 " -"Java 属性:getName()/setName(),这是 " -"java.lang.String 类型的,对应的持久化到三个字段:" -"FIRST_NAMEINITIALSURNAME。 " +msgid "It is relatively easy for developers to create their own value types. For example, you might want to persist properties of type java.lang.BigInteger to VARCHAR columns. Hibernate does not provide a built-in type for this. 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 getName()/setName() of type java.lang.String that is persisted to the columns FIRST_NAME, INITIAL, SURNAME." +msgstr "开发者创建属于他们自己的值类型也是很容易的。比如说,你可能希望持久化 java.lang.BigInteger 类型的属性,持久化成为 VARCHAR 字段。Hibernate没有内置这样一种类型。自定义类型能够映射一个属性(或集合元素)到不止一个数据库表字段。比如说,你可能有这样的 Java 属性:getName()/setName(),这是 java.lang.String 类型的,对应的持久化到三个字段:FIRST_NAMEINITIALSURNAME。 " #. Tag: para #, no-c-format -msgid "" -"To implement a custom type, implement either org.hibernate." -"UserType or org.hibernate.CompositeUserType and " -"declare properties using the fully qualified classname of the type. View " -"org.hibernate.test.DoubleStringType to see the kind of " -"things that are possible." -msgstr "" -"要实现一个自定义类型,可以实现 org.hibernate.UserType 或 " -"org.hibernate.CompositeUserType 中的任一个,并且使用类型" -"的 Java 全限定类名来定义属性。请查看 org.hibernate.test." -"DoubleStringType 这个例子,看看它是怎么做的。 " +msgid "To implement a custom type, implement either org.hibernate.UserType or org.hibernate.CompositeUserType and declare properties using the fully qualified classname of the type. View org.hibernate.test.DoubleStringType to see the kind of things that are possible." +msgstr "要实现一个自定义类型,可以实现 org.hibernate.UserTypeorg.hibernate.CompositeUserType 中的任一个,并且使用类型的 Java 全限定类名来定义属性。请查看 org.hibernate.test.DoubleStringType 这个例子,看看它是怎么做的。 " #. Tag: para #, no-c-format -msgid "" -"Notice the use of <column> tags to map a property " -"to multiple columns." -msgstr "" -"注意使用 <column> 标签来把一个属性映射到多个字段的做" -"法。" +msgid "Notice the use of <column> tags to map a property to multiple columns." +msgstr "注意使用 <column> 标签来把一个属性映射到多个字段的做法。" #. Tag: para #, no-c-format -msgid "" -"The CompositeUserType, EnhancedUserType, UserCollectionType, and " -"UserVersionType interfaces provide support for more " -"specialized uses." -msgstr "" -"CompositeUserTypeEnhancedUserType," -"UserCollectionTypeUserVersionType " -"接口为更特殊的使用方式提供支持。" +msgid "The CompositeUserType, EnhancedUserType, UserCollectionType, and UserVersionType interfaces provide support for more specialized uses." +msgstr "CompositeUserTypeEnhancedUserTypeUserCollectionTypeUserVersionType 接口为更特殊的使用方式提供支持。" #. Tag: para #, no-c-format -msgid "" -"You can even supply parameters to a UserType in the " -"mapping file. To do this, your UserType must implement " -"the org.hibernate.usertype.ParameterizedType interface. " -"To supply parameters to your custom type, you can use the <" -"type> element in your mapping files." -msgstr "" -"你甚至可以在一个映射文件中提供参数给一个 UserType。 为了这" -"样做,你的 UserType 必须实现 org.hibernate." -"usertype.ParameterizedType 接口。为了给自定义类型提供参数,你可以在" -"映射文件中使用 <type> 元素。 " +msgid "You can even supply parameters to a UserType in the mapping file. To do this, your UserType must implement the org.hibernate.usertype.ParameterizedType interface. To supply parameters to your custom type, you can use the <type> element in your mapping files." +msgstr "你甚至可以在一个映射文件中提供参数给一个 UserType。 为了这样做,你的 UserType 必须实现 org.hibernate.usertype.ParameterizedType 接口。为了给自定义类型提供参数,你可以在映射文件中使用 <type> 元素。 " #. Tag: para #, no-c-format -msgid "" -"The UserType can now retrieve the value for the parameter " -"named default from the Properties " -"object passed to it." -msgstr "" -"现在,UserType 可以从传入的 Properties " -"对象中得到 default 参数的值。" +msgid "The UserType can now retrieve the value for the parameter named default from the Properties object passed to it." +msgstr "现在,UserType 可以从传入的 Properties 对象中得到 default 参数的值。" #. Tag: para #, no-c-format -msgid "" -"If you regularly use a certain UserType, it is useful to " -"define a shorter name for it. You can do this using the <" -"typedef> element. Typedefs assign a name to a custom type, and " -"can also contain a list of default parameter values if the type is " -"parameterized." -msgstr "" -"如果你非常频繁地使用某一 UserType,可以为他定义一个简称。" -"这可以通过使用 <typedef> 元素来实现。Typedefs 为一自" -"定义类型赋予一个名称,并且如果此类型是参数化的,还可以包含一系列默认的参数" -"值。 " +msgid "If you regularly use a certain UserType, it is useful to define a shorter name for it. You can do this using the <typedef> element. Typedefs assign a name to a custom type, and can also contain a list of default parameter values if the type is parameterized." +msgstr "如果你非常频繁地使用某一 UserType,可以为他定义一个简称。这可以通过使用 <typedef> 元素来实现。Typedefs 为一自定义类型赋予一个名称,并且如果此类型是参数化的,还可以包含一系列默认的参数值。 " #. Tag: para #, 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 中提供的参数。" +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 中提供的参数。" #. Tag: para #, no-c-format -msgid "" -"Even though Hibernate's rich range of built-in types and support for " -"components means you will rarely need to use a custom type, it is considered " -"good practice to use custom types for non-entity classes that occur " -"frequently in your application. For example, a MonetaryAmount class is a good candidate for a CompositeUserType, even though it could be mapped as a component. One reason for this " -"is abstraction. With a custom type, your mapping documents would be " -"protected against changes to the way monetary values are represented." -msgstr "" -"尽管 Hibernate 内建的丰富的类型和对组件的支持意味着你可能很少 需要" -"使用自定义类型。不过,为那些在你的应用中经常出现的(非实体)类使用自" -"定义类型也是一个好方法。例如,一个 MonetaryAmount 类使用 " -"CompositeUserType 来映射是不错的选择,虽然他可以很容易地被" -"映射成组件。这样做的动机之一是抽象。使用自定义类型,以后假若你改变表示金额的" -"方法时,它可以保证映射文件不需要修改。 " +msgid "Even though Hibernate's rich range of built-in types and support for components means you will rarely need to use a custom type, it is considered good practice to use custom types for non-entity classes that occur frequently in your application. For example, a MonetaryAmount class is a good candidate for a CompositeUserType, even though it could be mapped as a component. One reason for this is abstraction. With a custom type, your mapping documents would be protected against changes to the way monetary values are represented." +msgstr "尽管 Hibernate 内建的丰富的类型和对组件的支持意味着你可能很少 需要使用自定义类型。不过,为那些在你的应用中经常出现的(非实体)类使用自定义类型也是一个好方法。例如,一个 MonetaryAmount 类使用 CompositeUserType 来映射是不错的选择,虽然他可以很容易地被映射成组件。这样做的动机之一是抽象。使用自定义类型,以后假若你改变表示金额的方法时,它可以保证映射文件不需要修改。 " #. Tag: title #, no-c-format @@ -3630,27 +1812,13 @@ msgstr "多次映射同一个类" #. Tag: para #, 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 entity name to " -"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 "" -"对特定的持久化类,映射多次是允许的。这种情形下,你必须指定 entity " -"name 来区别不同映射实体的对象实例。(默认情况下,实体名字和类名是" -"相同的。) Hibernate 在操作持久化对象、编写查询条件,或者把关联映射到指定实体" -"时,允许你指定这个 entity name(实体名字)。 " +msgid "It is possible to provide more than one mapping for a particular persistent class. In this case, you must specify an entity name to 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 "对特定的持久化类,映射多次是允许的。这种情形下,你必须指定 entity name 来区别不同映射实体的对象实例。(默认情况下,实体名字和类名是相同的。) Hibernate 在操作持久化对象、编写查询条件,或者把关联映射到指定实体时,允许你指定这个 entity name(实体名字)。 " #. Tag: para #, no-c-format -msgid "" -"Associations are now specified using entity-name instead " -"of class." -msgstr "" -"注意这里关联是如何用 entity-name 来代替 class 的。 " +msgid "Associations are now specified using entity-name instead of class." +msgstr "注意这里关联是如何用 entity-name 来代替 class 的。 " #. Tag: title #, no-c-format @@ -3659,17 +1827,8 @@ msgstr "SQL 中引号包围的标识符" #. Tag: para #, no-c-format -msgid "" -"You can 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 Dialect. This is usually double quotes, but the SQL Server uses brackets " -"and MySQL uses backticks." -msgstr "" -"你可通过在映射文档中使用反向引号(`)把表名或者字段名包围起来,以强制 " -"Hibernate 在生成的 SQL 中把标识符用引号包围起来。Hibernate 会使用相应的 " -"SQLDialect(方言)来使用正确的引号风格(通常是双引号,但是" -"在 SQL Server 中是括号,MySQL 中是反向引号)。 " +msgid "You can 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 Dialect. This is usually double quotes, but the SQL Server uses brackets and MySQL uses backticks." +msgstr "你可通过在映射文档中使用反向引号(`)把表名或者字段名包围起来,以强制 Hibernate 在生成的 SQL 中把标识符用引号包围起来。Hibernate 会使用相应的 SQLDialect(方言)来使用正确的引号风格(通常是双引号,但是在 SQL Server 中是括号,MySQL 中是反向引号)。 " #. Tag: title #, no-c-format @@ -3678,12 +1837,8 @@ msgstr "其他元数据(Metadata)" #. Tag: para #, no-c-format -msgid "" -"XML does not suit all users so there are some alternative ways to define O/R " -"mapping metadata in Hibernate." -msgstr "" -"XML 并不适用于所有人, 因此有其他定义 Hibernate O/R 映射元数据(metadata)的方" -"法。 " +msgid "XML does not suit all users so there are some alternative ways to define O/R mapping metadata in Hibernate." +msgstr "XML 并不适用于所有人, 因此有其他定义 Hibernate O/R 映射元数据(metadata)的方法。 " #. Tag: title #, no-c-format @@ -3692,17 +1847,8 @@ msgstr "使用 XDoclet 标记" #. Tag: para #, no-c-format -msgid "" -"Many Hibernate users prefer to embed mapping information directly in " -"sourcecode using XDoclet @hibernate.tags. We do not cover " -"this approach in this reference guide since it is considered part of " -"XDoclet. However, we include the following example of the Cat class with XDoclet mappings:" -msgstr "" -"很多 Hibernate 使用者更喜欢使用 XDoclet@hibernate.tags 将" -"映射信息直接嵌入到源代码中。我们不会在本文档中涉及这个方法,因为严格说来,这" -"属于 XDoclet 的一部分。然而,我们包含了如下使用 XDoclet 映射的 Cat 类的例子。 " +msgid "Many Hibernate users prefer to embed mapping information directly in sourcecode using XDoclet @hibernate.tags. We do not cover this approach in this reference guide since it is considered part of XDoclet. However, we include the following example of the Cat class with XDoclet mappings:" +msgstr "很多 Hibernate 使用者更喜欢使用 XDoclet@hibernate.tags 将映射信息直接嵌入到源代码中。我们不会在本文档中涉及这个方法,因为严格说来,这属于 XDoclet 的一部分。然而,我们包含了如下使用 XDoclet 映射的 Cat 类的例子。 " #. Tag: para #, no-c-format @@ -3716,25 +1862,8 @@ msgstr "使用 JDK 5.0 的注解(Annotation)" #. Tag: para #, no-c-format -msgid "" -"JDK 5.0 introduced XDoclet-style annotations at the language level that are " -"type-safe and checked at compile time. This mechanism 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 EntityManager of JSR-220 (the " -"persistence API). Support for mapping metadata is available via the " -"Hibernate Annotations 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) 的 EntityManager,支持通过 Hibernate Annotations 包定义映射元数" -"据。这个包作为单独的部分下载,支持 EJB3(JSR-220) 和 Hibernate3 的元数据。 " +msgid "JDK 5.0 introduced XDoclet-style annotations at the language level that are type-safe and checked at compile time. This mechanism 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 EntityManager of JSR-220 (the persistence API). Support for mapping metadata is available via the Hibernate Annotations 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) 的 EntityManager,支持通过 Hibernate Annotations 包定义映射元数据。这个包作为单独的部分下载,支持 EJB3(JSR-220) 和 Hibernate3 的元数据。 " #. Tag: para #, no-c-format @@ -3743,13 +1872,8 @@ msgstr "这是一个被注解为 EJB entity bean 的 POJO 类的例子" #. Tag: para #, no-c-format -msgid "" -"Support for JDK 5.0 Annotations (and JSR-220) is currently under " -"development. Please refer to the Hibernate Annotations module for more " -"details." -msgstr "" -"注意:对 JDK 5.0 注解(和 JSR-220)支持的工作仍然在进行中,并未完成。更多细节请" -"参阅 Hibernate Annotations 模块。 " +msgid "Support for JDK 5.0 Annotations (and JSR-220) is currently under development. Please refer to the Hibernate Annotations module for more details." +msgstr "注意:对 JDK 5.0 注解(和 JSR-220)支持的工作仍然在进行中,并未完成。更多细节请参阅 Hibernate Annotations 模块。 " #. Tag: title #, no-c-format @@ -3758,110 +1882,58 @@ msgstr "数据库生成属性(Generated Properties) " #. Tag: para #, no-c-format -msgid "" -"Generated properties are properties that have their values generated by the " -"database. Typically, Hibernate applications needed to refresh objects that contain any properties for which the database was " -"generating values. Marking properties as generated, however, lets the " -"application delegate this responsibility to Hibernate. When Hibernate issues " -"an SQL INSERT or UPDATE for an entity that has defined generated properties, " -"it immediately issues a select afterwards to retrieve the generated values." -msgstr "" -"Generated properties 指的是其值由数据库生成的属性。一般来说,如果对象有任何属" -"性由数据库生成值,Hibernate 应用程序需要进行刷新(refresh)。但如果把属性标明为 generated,就可以转由 Hibernate 来负责这个动作。" -"实际上。对定义了 generated properties 的实体,每当 Hibernate 执行一条 SQL " -"INSERT 或者 UPDATE 语句,会立刻执行一条 select 来获得生成的值。 " - -#. Tag: para -#, fuzzy, no-c-format -msgid "" -"Properties marked as generated must additionally be non-insertable and non-" -"updateable. Only versions, timestamps, " -"and simple properties, " -"can be marked as generated." -msgstr "" -"被标明为 generated 的属性还必须是 non-insertable 和 non-updateable 的。只有 " -" versions、 timestamp 和 简单属性(simple properties)可以被标明为 " -"generated。 " +msgid "Generated properties are properties that have their values generated by the database. Typically, Hibernate applications needed to refresh objects that contain any properties for which the database was generating values. Marking properties as generated, however, lets the application delegate this responsibility to Hibernate. When Hibernate issues an SQL INSERT or UPDATE for an entity that has defined generated properties, it immediately issues a select afterwards to retrieve the generated values." +msgstr "Generated properties 指的是其值由数据库生成的属性。一般来说,如果对象有任何属性由数据库生成值,Hibernate 应用程序需要进行刷新(refresh)。但如果把属性标明为 generated,就可以转由 Hibernate 来负责这个动作。实际上。对定义了 generated properties 的实体,每当 Hibernate 执行一条 SQL INSERT 或者 UPDATE 语句,会立刻执行一条 select 来获得生成的值。 " #. Tag: para #, no-c-format -msgid "" -"never (the default): the given property value is not " -"generated within the database." +msgid "Properties marked as generated must additionally be non-insertable and non-updateable. Only versions, timestamps, and simple properties, can be marked as generated." +msgstr "被标明为 generated 的属性还必须是 non-insertable 和 non-updateable 的。只有 versions、timestamps 和 simple properties 可以被标明为 generated。 " + +#. Tag: para +#, no-c-format +msgid "never (the default): the given property value is not generated within the database." msgstr "never(默认)标明此属性值不是从数据库中生成。 " #. Tag: para -#, fuzzy, no-c-format -msgid "" -"insert: the given property value is generated on insert, " -"but is not regenerated on subsequent updates. Properties like created-date " -"fall into this category. Even though version and timestamp properties can be marked as generated, this option is " -"not available." -msgstr "" -"insert — 标明此属性值在 insert 的时候生成,但是不会在随后" -"的 update 时重新生成。比如说创建日期就归属于这类。注意虽然 version 和 timestamp 属性可以被标注为 generated,但是不适用这" -"个选项... " +#, no-c-format +msgid "insert: the given property value is generated on insert, but is not regenerated on subsequent updates. Properties like created-date fall into this category. Even though version and timestamp properties can be marked as generated, this option is not available." +msgstr "insert — 标明此属性值在 insert 的时候生成,但是不会在随后的 update 时重新生成。比如说创建日期就归属于这类。注意虽然 version 和 timestamp 属性可以被标注为 generated,但是不适用这个选项。" #. Tag: para #, no-c-format -msgid "" -"always: the property value is generated both on insert " -"and on update." -msgstr "" -"always — 标明此属性值在 insert 和 update 时都会被生成。 " +msgid "always: the property value is generated both on insert and on update." +msgstr "always — 标明此属性值在 insert 和 update 时都会被生成。 " #. Tag: title #, no-c-format msgid "Column read and write expressions" -msgstr "" +msgstr "字段的读写表达式" #. Tag: para #, no-c-format -msgid "" -"Hibernate allows you to customize the SQL it uses to read and write the " -"values of columns mapped to simple properties. For example, if your database provides a set of " -"data encryption functions, you can invoke them for individual columns like " -"this: <property name=\"creditCardNumber" -"\"> <column name=\"credit_card_num\" read=\"decrypt(credit_card_num)\" " -"write=\"encrypt(?)\"/> </property>" -msgstr "" +msgid "Hibernate allows you to customize the SQL it uses to read and write the values of columns mapped to simple properties. For example, if your database provides a set of data encryption functions, you can invoke them for individual columns like this: <property name=\"creditCardNumber\"> <column name=\"credit_card_num\" read=\"decrypt(credit_card_num)\" write=\"encrypt(?)\"/> </property>" +msgstr "Hibernate 允许你自定义 SQL 以读写映射简单属性的字段值。例如,如果你的数据库提供了一套数据加密方法,你可以在单个字段上调用它们:<property name=\"creditCardNumber\"> <column name=\"credit_card_num\" read=\"decrypt(credit_card_num)\" write=\"encrypt(?)\"/> </property>" #. Tag: para #, no-c-format -msgid "" -"Hibernate applies the custom expressions automatically whenever the property " -"is referenced in a query. This functionality is similar to a derived-" -"property formula with two differences:" -msgstr "" +msgid "Hibernate applies the custom expressions automatically whenever the property is referenced in a query. This functionality is similar to a derived-property formula with two differences:" +msgstr "每当属性在查询里被引用时,Hibernate 都自动应用自定义的表达式。这种功能和 derived-property formula 相似,但有两个不同的地方:" #. Tag: para #, no-c-format -msgid "" -"The property is backed by one or more columns that are exported as part of " -"automatic schema generation." -msgstr "" +msgid "The property is backed by one or more columns that are exported as part of automatic schema generation." +msgstr "属性由一个或多个属性组成,它作为自动模式生成的一部分导出。" #. Tag: para #, no-c-format msgid "The property is read-write, not read-only." -msgstr "" +msgstr "属性是可读写的,非只读的。" #. Tag: para #, no-c-format -msgid "" -"The write expression, if specified, must contain exactly " -"one '?' placeholder for the value." -msgstr "" +msgid "The write expression, if specified, must contain exactly one '?' placeholder for the value." +msgstr "如果指定了 write 表达式,它必须只包含一个“?”占位符。" #. Tag: title #, no-c-format @@ -3870,46 +1942,22 @@ msgstr "辅助数据库对象(Auxiliary Database Objects) " #. Tag: para #, no-c-format -msgid "" -"Auxiliary database objects allow for the CREATE and DROP of arbitrary " -"database objects. In conjunction with Hibernate's schema evolution tools, " -"they have 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, any SQL command that can be run " -"via a java.sql.Statement.execute() method is valid (for " -"example, ALTERs, INSERTS, etc.). There are essentially two modes for " -"defining auxiliary database objects:" -msgstr "" -"允许 CREATE 和 DROP 任意数据库对象,与 Hibernate 的 schema 交互工具组合起来," -"可以提供在 Hibernate 映射文件中完全定义用户 schema 的能力。虽然这是为创建和销" -"毁 trigger(触发器)或stored procedure(存储过程)等特别设计的,实际上任何可" -"以在 java.sql.Statement.execute() 方法中执行的 SQL 命令都" -"可以在此使用(比如ALTER, INSERT,等等)。本质上有两种模式来定义辅助数据库对" -"象... " +msgid "Auxiliary database objects allow for the CREATE and DROP of arbitrary database objects. In conjunction with Hibernate's schema evolution tools, they have 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, any SQL command that can be run via a java.sql.Statement.execute() method is valid (for example, ALTERs, INSERTS, etc.). There are essentially two modes for defining auxiliary database objects:" +msgstr "允许 CREATE 和 DROP 任意数据库对象,与 Hibernate 的 schema 交互工具组合起来,可以提供在 Hibernate 映射文件中完全定义用户 schema 的能力。虽然这是为创建和销毁 trigger(触发器)或stored procedure(存储过程)等特别设计的,实际上任何可以在 java.sql.Statement.execute() 方法中执行的 SQL 命令都可以在此使用(比如ALTER, INSERT,等等)。本质上有两种模式来定义辅助数据库对象... " #. Tag: para #, no-c-format -msgid "" -"The first mode is to explicitly list the CREATE and DROP commands in the " -"mapping file:" +msgid "The first mode is to explicitly list the CREATE and DROP commands in the mapping file:" msgstr "第一种模式是在映射文件中显式声明 CREATE 和 DROP 命令: " #. Tag: para #, no-c-format -msgid "" -"The second mode is to supply a custom class that constructs the CREATE and " -"DROP commands. This custom class must implement the org.hibernate." -"mapping.AuxiliaryDatabaseObject interface." -msgstr "" -"第二种模式是提供一个类,这个类知道如何组织 CREATE 和 DROP 命令。这个特别类必" -"须实现 org.hibernate.mapping.AuxiliaryDatabaseObject 接" -"口。 " +msgid "The second mode is to supply a custom class that constructs the CREATE and DROP commands. This custom class must implement the org.hibernate.mapping.AuxiliaryDatabaseObject interface." +msgstr "第二种模式是提供一个类,这个类知道如何组织 CREATE 和 DROP 命令。这个特别类必须实现 org.hibernate.mapping.AuxiliaryDatabaseObject 接口。 " #. Tag: para #, no-c-format -msgid "" -"Additionally, these database objects can be optionally scoped so that they " -"only apply when certain dialects are used." +msgid "Additionally, these database objects can be optionally scoped so that they only apply when certain dialects are used." msgstr "还有,这些数据库对象可以特别指定为仅在特定的方言中才使用。 " #~ msgid "" diff --git a/documentation/manual/src/main/docbook/zh-CN/content/batch.po b/documentation/manual/src/main/docbook/zh-CN/content/batch.po index 883c677096..7f54b2560b 100644 --- a/documentation/manual/src/main/docbook/zh-CN/content/batch.po +++ b/documentation/manual/src/main/docbook/zh-CN/content/batch.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Collection_Mapping\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-02-11T05:38:15\n" -"PO-Revision-Date: 2010-01-11 10:33+1000\n" +"PO-Revision-Date: 2010-03-15 08:58+1000\n" "Last-Translator: Xi HUANG \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -21,62 +21,33 @@ msgstr "批量处理(Batch processing)" #. Tag: para #, 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 条记录插入到数据库的一个很天真的做法可能是这样的:" +msgid "A naive approach to inserting 100,000 rows in the database using Hibernate might look like this:" +msgstr "使用 Hibernate 将 100,000 条记录插入到数据库的一个很天真的做法可能是这样的:" #. Tag: para #, no-c-format -msgid "" -"This would fall over with an OutOfMemoryException " -"somewhere around the 50,000th row. That is because Hibernate caches all the " -"newly inserted Customer instances in the session-level " -"cache. In this chapter we will show you how to avoid this problem." -msgstr "" -"这段程序大概运行到 50,000 条记录左右会失败并抛出内存溢出异常" -"(OutOfMemoryException) 。这是因为 Hibernate 把所有新插入的" -"客户(Customer)实例在 session 级别的缓存区进行了缓存的缘" -"故。 " +msgid "This would fall over with an OutOfMemoryException somewhere around the 50,000th row. That is because Hibernate caches all the newly inserted Customer instances in the session-level cache. In this chapter we will show you how to avoid this problem." +msgstr "这段程序大概运行到 50,000 条记录左右会失败并抛出内存溢出异常(OutOfMemoryException) 。这是因为 Hibernate 把所有新插入的客户(Customer)实例在 session 级别的缓存区进行了缓存的缘故。 " #. Tag: para #, no-c-format -msgid "" -"If you are undertaking batch processing you will need to enable the use of " -"JDBC batching. This is absolutely essential if you want to achieve optimal " -"performance. Set the JDBC batch size to a reasonable number (10-50, for " -"example):" -msgstr "" -"我们会在本章告诉你如何避免此类问题。首先,如果你要执行批量处理并且想要达到一" -"个理想的性能,那么使用 JDBC 的批量(batching)功能是至关重要。将 JDBC 的批量" -"抓取数量(batch size)参数设置到一个合适值(比如,10 - 50 之间):" +msgid "If you are undertaking batch processing you will need to enable the use of JDBC batching. This is absolutely essential if you want to achieve optimal performance. Set the JDBC batch size to a reasonable number (10-50, for example):" +msgstr "我们会在本章告诉你如何避免此类问题。首先,如果你要执行批量处理并且想要达到一个理想的性能,那么使用 JDBC 的批量(batching)功能是至关重要。将 JDBC 的批量抓取数量(batch size)参数设置到一个合适值(比如,10 - 50 之间):" #. Tag: para #, no-c-format -msgid "" -"Hibernate disables insert batching at the JDBC level transparently if you " -"use an identity identifier generator." -msgstr "" -"注意,假若你使用了 identiy 标识符生成器,Hibernate 在 " -"JDBC 级别透明的关闭插入语句的批量执行。 " +msgid "Hibernate disables insert batching at the JDBC level transparently if you use an identity identifier generator." +msgstr "注意,假若你使用了 identiy 标识符生成器,Hibernate 在 JDBC 级别透明的关闭插入语句的批量执行。 " #. Tag: para #, no-c-format -msgid "" -"You can also do this kind of work in a process where interaction with the " -"second-level cache is completely disabled:" +msgid "You can also do this kind of work in a process where interaction with the second-level cache is completely disabled:" msgstr "你也可能想在执行批量处理时完全关闭二级缓存:" #. Tag: para #, no-c-format -msgid "" -"However, this is not absolutely necessary, since we can explicitly set the " -"CacheMode to disable interaction with the second-level " -"cache." -msgstr "" -"但是,这不是绝对必须的,因为我们可以显式设置 CacheMode 来" -"关闭与二级缓存的交互。" +msgid "However, this is not absolutely necessary, since we can explicitly set the CacheMode to disable interaction with the second-level cache." +msgstr "但是,这不是绝对必须的,因为我们可以显式设置 CacheMode 来关闭与二级缓存的交互。" #. Tag: title #, no-c-format @@ -85,13 +56,8 @@ msgstr "批量插入(Batch inserts)" #. Tag: para #, no-c-format -msgid "" -"When making new objects persistent flush() and then " -"clear() the session regularly in order to control the " -"size of the first-level cache." -msgstr "" -"如果要将很多对象持久化,你必须通过经常的调用 flush() 以及" -"稍后调用 clear() 来控制第一级缓存的大小。 " +msgid "When making new objects persistent flush() and then clear() the session regularly in order to control the size of the first-level cache." +msgstr "如果要将很多对象持久化,你必须通过经常的调用 flush() 以及稍后调用 clear() 来控制第一级缓存的大小。 " #. Tag: title #, no-c-format @@ -100,13 +66,8 @@ msgstr "批量更新(Batch updates)" #. Tag: para #, no-c-format -msgid "" -"For retrieving and updating data, the same ideas apply. In addition, you " -"need to use scroll() to take advantage of server-side " -"cursors for queries that return many rows of data." -msgstr "" -"此方法同样适用于检索和更新数据。此外,在进行会返回很多行数据的查询时,你需要" -"使用 scroll() 方法以便充分利用服务器端游标所带来的好处。 " +msgid "For retrieving and updating data, the same ideas apply. In addition, you need to use scroll() to take advantage of server-side cursors for queries that return many rows of data." +msgstr "此方法同样适用于检索和更新数据。此外,在进行会返回很多行数据的查询时,你需要使用 scroll() 方法以便充分利用服务器端游标所带来的好处。 " #. Tag: title #, no-c-format @@ -115,57 +76,18 @@ msgstr "StatelessSession(无状态 session)接口" #. Tag: para #, no-c-format -msgid "" -"Alternatively, Hibernate provides a command-oriented API that can be used " -"for streaming data to and from the database in the form of detached objects. " -"A StatelessSession 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 never cascade to associated instances. Collections " -"are ignored by a stateless session. Operations performed via a stateless " -"session bypass Hibernate's event model and interceptors. Due to the lack of " -"a first-level cache, Stateless sessions are vulnerable to data aliasing " -"effects. A stateless session is a lower-level abstraction that is much " -"closer to the underlying JDBC." -msgstr "" -"作为选择,Hibernate 提供了基于命令的 API,可以用 detached object 的形式把数据" -"以流的方法加入到数据库,或从数据库输出。StatelessSession " -"没有持久化上下文,也不提供多少高层的生命周期语义。特别是,无状态 session 不实" -"现第一级 cache,也不和第二级缓存,或者查询缓存交互。它不实现事务化写,也不实" -"现脏数据检查。用 stateless session 进行的操作甚至不级联到关联实例。stateless " -"session 忽略集合类(Collections)。通过 stateless session 进行的操作不触发 " -"Hibernate 的事件模型和拦截器。无状态 session 对数据的混淆现象免疫,因为它没有" -"第一级缓存。无状态 session 是低层的抽象,和低层 JDBC 相当接近。 " +msgid "Alternatively, Hibernate provides a command-oriented API that can be used for streaming data to and from the database in the form of detached objects. A StatelessSession 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 never cascade to associated instances. Collections are ignored by a stateless session. Operations performed via a stateless session bypass Hibernate's event model and interceptors. Due to the lack of a first-level cache, Stateless sessions are vulnerable to data aliasing effects. A stateless session is a lower-level abstraction that is much closer to the underlying JDBC." +msgstr "作为选择,Hibernate 提供了基于命令的 API,可以用 detached object 的形式把数据以流的方法加入到数据库,或从数据库输出。StatelessSession 没有持久化上下文,也不提供多少高层的生命周期语义。特别是,无状态 session 不实现第一级 cache,也不和第二级缓存,或者查询缓存交互。它不实现事务化写,也不实现脏数据检查。用 stateless session 进行的操作甚至不级联到关联实例。stateless session 忽略集合类(Collections)。通过 stateless session 进行的操作不触发 Hibernate 的事件模型和拦截器。无状态 session 对数据的混淆现象免疫,因为它没有第一级缓存。无状态 session 是低层的抽象,和低层 JDBC 相当接近。 " #. Tag: para #, no-c-format -msgid "" -"In this code example, the Customer instances returned by " -"the query are immediately detached. They are never associated with any " -"persistence context." -msgstr "" -"注意在上面的例子中,查询返回的 Customer 实例立即被脱管" -"(detach)。它们与任何持久化上下文都没有关系。 " +msgid "In this code example, the Customer instances returned by the query are immediately detached. They are never associated with any persistence context." +msgstr "注意在上面的例子中,查询返回的 Customer 实例立即被脱管(detach)。它们与任何持久化上下文都没有关系。 " #. Tag: para #, no-c-format -msgid "" -"The insert(), update() and delete() " -"operations defined by the StatelessSession interface are " -"considered to be direct database row-level operations. They result in the " -"immediate execution of a SQL INSERT, UPDATE or " -"DELETE respectively. They have different semantics to the " -"save(), saveOrUpdate() and delete() " -"operations defined by the Session interface." -msgstr "" -"StatelessSession 接口定义的 insert(), update()delete() 操作是直接的数据库行级别操作,其结果" -"是立刻执行一条 INSERT, UPDATEDELETE 语句。因此,它们的语义和 Session 接口定义的 " -"save(), saveOrUpdate()delete() 操作" -"有很大的不同。 " +msgid "The insert(), update() and delete() operations defined by the StatelessSession interface are considered to be direct database row-level operations. They result in the immediate execution of a SQL INSERT, UPDATE or DELETE respectively. They have different semantics to the save(), saveOrUpdate() and delete() operations defined by the Session interface." +msgstr "StatelessSession 接口定义的 insert(), update()delete() 操作是直接的数据库行级别操作,其结果是立刻执行一条 INSERT, UPDATEDELETE 语句。因此,它们的语义和 Session 接口定义的 save(), saveOrUpdate()delete() 操作有很大的不同。 " #. Tag: title #, no-c-format @@ -173,36 +95,14 @@ msgid "DML-style operations" msgstr "DML(数据操作语言)风格的操作(DML-style operations)" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"As already discussed, automatic and transparent object/relational mapping is " -"concerned with the management of the object state. The object state is " -"available in memory. This means that manipulating data directly in the " -"database (using the SQL Data Manipulation Language (DML) " -"the statements: INSERT, UPDATE, " -"DELETE) will not affect in-memory state. However, " -"Hibernate provides methods for bulk SQL-style DML statement execution that " -"is performed through the Hibernate Query Language (HQL)." -msgstr "" -"就像已经讨论的那样,自动和透明的对象/关系映射(object/relational mapping)关" -"注于管理对象的状态。这就意味着对象的状态存在于内存,因此直接操作(使用 SQL " -"Data Manipulation Language(DML,数据操作语言)语句 :" -"INSERT ,UPDATEDELETE) 数据库中的数据将不会影响内存中的对象状态和对象数据。不过," -"Hibernate 提供通过 Hibernate 查询语言()来执行大" -"批量 SQL 风格的 DML 语句的方法。 " +#, no-c-format +msgid "As already discussed, automatic and transparent object/relational mapping is concerned with the management of the object state. The object state is available in memory. This means that manipulating data directly in the database (using the SQL Data Manipulation Language (DML) the statements: INSERT, UPDATE, DELETE) will not affect in-memory state. However, Hibernate provides methods for bulk SQL-style DML statement execution that is performed through the Hibernate Query Language (HQL)." +msgstr "就像已经讨论的那样,自动和透明的对象/关系映射(object/relational mapping)关注于管理对象的状态。这就意味着对象的状态存在于内存,因此直接操作(使用 SQL Data Manipulation Language(DML,数据操作语言)语句 :INSERT ,UPDATEDELETE) 数据库中的数据将不会影响内存中的对象状态和对象数据。不过,Hibernate 提供通过 Hibernate 查询语言(HQL)来执行大批量 SQL 风格的 DML 语句的方法。 " #. Tag: para #, no-c-format -msgid "" -"The pseudo-syntax for UPDATE and DELETE statements is: ( UPDATE | DELETE ) FROM? EntityName (WHERE " -"where_conditions)?." -msgstr "" -"UPDATEDELETE 语句的伪语法为:" -"( UPDATE | DELETE ) FROM? EntityName (WHERE where_conditions)?。" +msgid "The pseudo-syntax for UPDATE and DELETE statements is: ( UPDATE | DELETE ) FROM? EntityName (WHERE where_conditions)?." +msgstr "UPDATEDELETE 语句的伪语法为:( UPDATE | DELETE ) FROM? EntityName (WHERE where_conditions)?。" #. Tag: para #, no-c-format @@ -216,26 +116,13 @@ msgstr "在 FROM 子句(from-clause)中,FROM 关键字是可选的" #. Tag: para #, no-c-format -msgid "" -"There can only be a single entity named in the from-clause. It can, however, " -"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)中只能有一个实体名,它可以是别名。如果实体名是别" -"名,那么任何被引用的属性都必须加上此别名的前缀;如果不是别名,那么任何有前缀" -"的属性引用都是非法的。 " +msgid "There can only be a single entity named in the from-clause. It can, however, 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)中只能有一个实体名,它可以是别名。如果实体名是别名,那么任何被引用的属性都必须加上此别名的前缀;如果不是别名,那么任何有前缀的属性引用都是非法的。 " #. Tag: para -#, fuzzy, no-c-format -msgid "" -"No joins, either implicit or " -"explicit, can be specified in a bulk HQL query. Sub-queries can be used in " -"the where-clause, where the subqueries themselves may contain joins." -msgstr "" -"不能在大批量 HQL 语句中使用 连接(显" -"式或者隐式的都不行)。不过在 WHERE 子句中可以使用子查询。可以在 where 子句中" -"使用子查询,子查询本身可以包含 join。 " +#, no-c-format +msgid "No joins, either implicit or explicit, can be specified in a bulk HQL query. Sub-queries can be used in the where-clause, where the subqueries themselves may contain joins." +msgstr "不能在大批量 HQL 语句中使用 joins 连接(显式或者隐式的都不行)。不过在 WHERE 子句中可以使用子查询。可以在 where 子句中使用子查询,子查询本身可以包含 join。 " #. Tag: para #, no-c-format @@ -244,182 +131,62 @@ msgstr "整个 WHERE 子句是可选的。" #. Tag: para #, no-c-format -msgid "" -"As an example, to execute an HQL UPDATE, use the " -"Query.executeUpdate() method. The method is named for " -"those familiar with JDBC's PreparedStatement.executeUpdate():" -msgstr "" -"举个例子,使用 Query.executeUpdate() 方法执行一个 HQL " -"UPDATE语句(方法命名是来源于 JDBC 的 " -"PreparedStatement.executeUpdate()): " - -#. Tag: para -#, fuzzy, no-c-format -msgid "" -"In keeping with the EJB3 specification, HQL UPDATE " -"statements, by default, do not effect the version or the timestamp property values for the affected " -"entities. However, you can force Hibernate to reset the version or timestamp property values through the use of " -"a versioned update. This is achieved by adding the " -"VERSIONED keyword after the UPDATE " -"keyword." -msgstr "" -"HQL UPDATE 语句,默认不会影响更新实体的 或者 属性值。这和 EJB3 规范是一致的。但是,通过使用 " -"versioned update,你可以强制 Hibernate 正确的重置" -"version 或者 timestamp 属性值。这通过" -"在 UPDATE 关键字后面增加 VERSIONED 关键" -"字来实现的。 " +msgid "As an example, to execute an HQL UPDATE, use the Query.executeUpdate() method. The method is named for those familiar with JDBC's PreparedStatement.executeUpdate():" +msgstr "举个例子,使用 Query.executeUpdate() 方法执行一个 HQL UPDATE语句(方法命名是来源于 JDBC 的 PreparedStatement.executeUpdate()): " #. Tag: para #, no-c-format -msgid "" -"Custom version types, org.hibernate.usertype.UserVersionType, are not allowed in conjunction with a update versioned statement." -msgstr "" -"注意,自定义的版本类型(org.hibernate.usertype.UserVersionType)不允许和 update versioned 语句联用。 " +msgid "In keeping with the EJB3 specification, HQL UPDATE statements, by default, do not effect the version or the timestamp property values for the affected entities. However, you can force Hibernate to reset the version or timestamp property values through the use of a versioned update. This is achieved by adding the VERSIONED keyword after the UPDATE keyword." +msgstr "HQL UPDATE 语句,默认不会影响更新实体的 version 或 the timestamp 属性值。这和 EJB3 规范是一致的。但是,通过使用 versioned update,你可以强制 Hibernate 正确的重置version 或者 timestamp 属性值。这通过在 UPDATE 关键字后面增加 VERSIONED 关键字来实现的。 " #. Tag: para #, no-c-format -msgid "" -"To execute an HQL DELETE, use the same Query." -"executeUpdate() method:" -msgstr "" -"执行一个 HQL DELETE,同样使用 Query.executeUpdate" -"() 方法:" +msgid "Custom version types, org.hibernate.usertype.UserVersionType, are not allowed in conjunction with a update versioned statement." +msgstr "注意,自定义的版本类型(org.hibernate.usertype.UserVersionType)不允许和 update versioned 语句联用。 " #. Tag: para #, no-c-format -msgid "" -"The int value returned by the Query.executeUpdate" -"() method indicates the number of entities effected by the " -"operation. 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 inheritance hierarchy." -msgstr "" -"由 Query.executeUpdate() 方法返回的整型" -"值表明了受此操作影响的记录数量。注意这个数值可能与数据库中被(最后一条 SQL 语" -"句)影响了的“行”数有关,也可能没有。一个大批量 HQL 操作可能导致多条实际的SQL" -"语句被执行,举个例子,对 joined-subclass 映射方式的类进行的此类操作。这个返回" -"值代表了实际被语句影响了的记录数量。在那个 joined-subclass 的例子中, 对一个" -"子类的删除实际上可能不仅仅会删除子类映射到的表而且会影响“根”表,还有可能影响" -"与之有继承关系的 joined-subclass 映射方式的子类的表。 " +msgid "To execute an HQL DELETE, use the same Query.executeUpdate() method:" +msgstr "执行一个 HQL DELETE,同样使用 Query.executeUpdate() 方法:" #. Tag: para #, no-c-format -msgid "" -"The pseudo-syntax for INSERT statements is: " -"INSERT INTO EntityName properties_list select_statement. " -"Some points to note:" -msgstr "" -"INSERT 语句的伪码是:INSERT INTO EntityName " -"properties_list select_statement。要注意的是:" +msgid "The int value returned by the Query.executeUpdate() method indicates the number of entities effected by the operation. 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 inheritance hierarchy." +msgstr "由 Query.executeUpdate() 方法返回的整型值表明了受此操作影响的记录数量。注意这个数值可能与数据库中被(最后一条 SQL 语句)影响了的“行”数有关,也可能没有。一个大批量 HQL 操作可能导致多条实际的SQL语句被执行,举个例子,对 joined-subclass 映射方式的类进行的此类操作。这个返回值代表了实际被语句影响了的记录数量。在那个 joined-subclass 的例子中, 对一个子类的删除实际上可能不仅仅会删除子类映射到的表而且会影响“根”表,还有可能影响与之有继承关系的 joined-subclass 映射方式的子类的表。 " #. Tag: para #, 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 ... 形" -"式。" +msgid "The pseudo-syntax for INSERT statements is: INSERT INTO EntityName properties_list select_statement. Some points to note:" +msgstr "INSERT 语句的伪码是:INSERT INTO EntityName properties_list select_statement。要注意的是:" #. Tag: para #, no-c-format -msgid "" -"The properties_list is analogous to the column specification in the SQL INSERT statement. For entities " -"involved in mapped inheritance, 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, " -"INSERT statements are inherently non-polymorphic." -msgstr "" -"properties_list 和 SQL INSERT 语句中的字段定义" -"(column speficiation)类似。对参与继承树映射的实体而言,只有直接定" -"义在给定的类级别的属性才能直接在 properties_list 中使用。超类的属性不被支持;" -"子类的属性无意义。换句话说,INSERT 天生不支持多态性。" +msgid "Only the INSERT INTO ... SELECT ... form is supported; not the INSERT INTO ... VALUES ... form." +msgstr "只支持 INSERT INTO ... SELECT ... 形式,不支持 INSERT INTO ... VALUES ... 形式。" #. Tag: para #, 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. This might, however, cause problems between Hibernate " -"Types which are equivalent as " -"opposed to equal. This might cause issues with " -"mismatches between a property defined as a org.hibernate.type." -"DateType and a property defined as a org.hibernate.type." -"TimestampType, even though the database might not make a " -"distinction or might be able to handle the conversion." -msgstr "" -"select_statement 可以是任何合法的 HQL 选择查询,不过要保证返回类型必须和要插" -"入的类型完全匹配。目前,这一检查是在查询编译的时候进行的,而不是把它交给数据" -"库。注意,在HibernateType 间如果只是等价" -"(equivalent)而非相等(equal),会导致问题。" -"定义为 org.hibernate.type.DateTypeorg." -"hibernate.type.TimestampType 的两个属性可能会产生类型不匹配错误,虽" -"然数据库级可能不加区分或者可以处理这种转换。 " +msgid "The properties_list is analogous to the column specification in the SQL INSERT statement. For entities involved in mapped inheritance, 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, INSERT statements are inherently non-polymorphic." +msgstr "properties_list 和 SQL INSERT 语句中的字段定义(column speficiation)类似。对参与继承树映射的实体而言,只有直接定义在给定的类级别的属性才能直接在 properties_list 中使用。超类的属性不被支持;子类的属性无意义。换句话说,INSERT 天生不支持多态性。" #. Tag: para #, 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 " -"latter 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. For the purposes of this " -"discussion, in-database generators are considered to be org." -"hibernate.id.SequenceGenerator (and its subclasses) and any " -"implementers of org.hibernate.id.PostInsertIdentifierGenerator. The most notable exception here is org.hibernate.id." -"TableHiLoGenerator, 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 产生器时才能使用;如果是“内存”中计算的类型生成器,在解析时会抛出一" -"个异常。注意,为了说明这一问题,数据库产生值的生成器是 org." -"hibernate.id.SequenceGenerator(和它的子类),以及任何 " -"org.hibernate.id.PostInsertIdentifierGenerator 接口的实" -"现。这儿最值得注意的意外是 org.hibernate.id.TableHiLoGenerator,它不能在此使用,因为它没有得到其值的途径。 " +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. This might, however, cause problems between Hibernate Types which are equivalent as opposed to equal. This might cause issues with mismatches between a property defined as a org.hibernate.type.DateType and a property defined as a org.hibernate.type.TimestampType, even though the database might not make a distinction or might be able to handle the conversion." +msgstr "select_statement 可以是任何合法的 HQL 选择查询,不过要保证返回类型必须和要插入的类型完全匹配。目前,这一检查是在查询编译的时候进行的,而不是把它交给数据库。注意,在HibernateType 间如果只是等价(equivalent)而非相等(equal),会导致问题。定义为 org.hibernate.type.DateTypeorg.hibernate.type.TimestampType 的两个属性可能会产生类型不匹配错误,虽然数据库级可能不加区分或者可以处理这种转换。 " #. Tag: para #, no-c-format -msgid "" -"For properties mapped as either version or " -"timestamp, 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 seed value " -"defined by the org.hibernate.type.VersionType is used." -msgstr "" -"对映射为 versiontimestamp 的属性来" -"说,insert 语句也给你两个选择,你可以在 properties_list 表中指定(此时其值从" -"对应的 select 表达式中获得),或者在 properties_list 中省略它(此时,使用在 " -"org.hibernate.type.VersionType 中定义的 seed " -"value(种子值))。" +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 latter 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. For the purposes of this discussion, in-database generators are considered to be org.hibernate.id.SequenceGenerator (and its subclasses) and any implementers of org.hibernate.id.PostInsertIdentifierGenerator. The most notable exception here is org.hibernate.id.TableHiLoGenerator, 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 产生器时才能使用;如果是“内存”中计算的类型生成器,在解析时会抛出一个异常。注意,为了说明这一问题,数据库产生值的生成器是 org.hibernate.id.SequenceGenerator(和它的子类),以及任何 org.hibernate.id.PostInsertIdentifierGenerator 接口的实现。这儿最值得注意的意外是 org.hibernate.id.TableHiLoGenerator,它不能在此使用,因为它没有得到其值的途径。 " #. Tag: para #, no-c-format -msgid "" -"The following is an example of an HQL INSERT statement " -"execution:" +msgid "For properties mapped as either version or timestamp, 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 seed value defined by the org.hibernate.type.VersionType is used." +msgstr "对映射为 versiontimestamp 的属性来说,insert 语句也给你两个选择,你可以在 properties_list 表中指定(此时其值从对应的 select 表达式中获得),或者在 properties_list 中省略它(此时,使用在 org.hibernate.type.VersionType 中定义的 seed value(种子值))。" + +#. Tag: para +#, no-c-format +msgid "The following is an example of an HQL INSERT statement execution:" msgstr "下面是一个执行 HQL INSERT 语句的例子:" #~ msgid "" diff --git a/documentation/manual/src/main/docbook/zh-CN/content/bibliography.po b/documentation/manual/src/main/docbook/zh-CN/content/bibliography.po index 78f6d2b6dd..34f9bbe9f7 100644 --- a/documentation/manual/src/main/docbook/zh-CN/content/bibliography.po +++ b/documentation/manual/src/main/docbook/zh-CN/content/bibliography.po @@ -6,8 +6,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-02-04T04:51:21\n" -"PO-Revision-Date: 2009-07-14 19:55+0000\n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2010-03-15 08:58+1000\n" +"Last-Translator: Xi HUANG \n" "Language-Team: none\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -16,34 +16,35 @@ msgstr "" #. Tag: title #, no-c-format msgid "References" -msgstr "" +msgstr "参考资料" #. Tag: title #, no-c-format msgid "Patterns of Enterprise Application Architecture" -msgstr "" +msgstr "Patterns of Enterprise Application Architecture" #. Tag: firstname #, no-c-format msgid "Martin" -msgstr "" +msgstr "Martin" #. Tag: title #, no-c-format msgid "Java Persistence with Hibernate" -msgstr "" +msgstr "Java Persistence with Hibernate" #. Tag: subtitle #, no-c-format msgid "Second Edition of Hibernate in Action" -msgstr "" +msgstr "Second Edition of Hibernate in Action" #. Tag: firstname #, no-c-format msgid "Christian" -msgstr "" +msgstr "Christian" #. Tag: firstname #, no-c-format msgid "Gavin" -msgstr "" +msgstr "Gavin" + diff --git a/documentation/manual/src/main/docbook/zh-CN/content/collection_mapping.po b/documentation/manual/src/main/docbook/zh-CN/content/collection_mapping.po index c72034f003..bfb0305497 100644 --- a/documentation/manual/src/main/docbook/zh-CN/content/collection_mapping.po +++ b/documentation/manual/src/main/docbook/zh-CN/content/collection_mapping.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Collection_Mapping\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-02-10T07:25:34\n" -"PO-Revision-Date: 2009-12-09 12:11+1000\n" +"PO-Revision-Date: 2010-03-15 08:59+1000\n" "Last-Translator: Xi HUANG \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -26,94 +26,33 @@ msgstr "持久化集合类(Persistent collections)" #. Tag: para #, no-c-format -msgid "" -"Hibernate requires that persistent collection-valued fields be declared as " -"an interface type. For example:" -msgstr "" -"(译者注:在阅读本章的时候,以后整个手册的阅读过程中,我们都会面临一个名词方" -"面的问题,那就是“集合”。\"Collections\" 和 \"Set\" 在中文里对应都被翻译为“集" -"合”,但是他们的含义很不一样。Collections 是一个超集,Set 是其中的一种。大部分" -"情况下,本译稿中泛指的未加英文注明的“集合”,都应当理解为“Collections”。在有些" -"二者同时出现,可能造成混淆的地方,我们用“集合类”来特指“Collecions”,“集合" -"(Set)”来指 \"Set\",一般都会在后面的括号中给出英文。希望大家在阅读时联系上" -"下文理解,不要造成误解。 与此同时,“元素”一词对应的英文“element”,也有两个不" -"同的含义。其一为集合的元素,是内存中的一个变量;另一含义则是 XML 文档中的一个" -"标签所代表的元素。也请注意区别。本章中,特别是后半部分是需要反复阅读才能理解" -"清楚的。如果遇到任何疑问,请记住,英文版本的 reference 是惟一标准的参考资" -"料。) Hibernate 要求持久化集合值字段必须声明为接口,例如:" +msgid "Hibernate requires that persistent collection-valued fields be declared as an interface type. For example:" +msgstr "(译者注:在阅读本章的时候,以后整个手册的阅读过程中,我们都会面临一个名词方面的问题,那就是“集合”。\"Collections\" 和 \"Set\" 在中文里对应都被翻译为“集合”,但是他们的含义很不一样。Collections 是一个超集,Set 是其中的一种。大部分情况下,本译稿中泛指的未加英文注明的“集合”,都应当理解为“Collections”。在有些二者同时出现,可能造成混淆的地方,我们用“集合类”来特指“Collecions”,“集合(Set)”来指 \"Set\",一般都会在后面的括号中给出英文。希望大家在阅读时联系上下文理解,不要造成误解。 与此同时,“元素”一词对应的英文“element”,也有两个不同的含义。其一为集合的元素,是内存中的一个变量;另一含义则是 XML 文档中的一个标签所代表的元素。也请注意区别。本章中,特别是后半部分是需要反复阅读才能理解清楚的。如果遇到任何疑问,请记住,英文版本的 reference 是惟一标准的参考资料。) Hibernate 要求持久化集合值字段必须声明为接口,例如:" #. Tag: para #, no-c-format -msgid "" -"The actual interface might be java.util.Set, " -"java.util.Collection, java.util.List, " -"java.util.Map, java.util.SortedSet, " -"java.util.SortedMap or anything you like (\"anything you " -"like\" means you will have to write an implementation of org." -"hibernate.usertype.UserCollectionType.)" -msgstr "" -"实际的接口可能是 java.util.Setjava.util." -"Collectionjava.util.Listjava.util." -"Mapjava.util.SortedSetjava.util." -"SortedMap 或者任何你喜欢的类型(\"任何你喜欢的类型\" 代表你需要编" -"写 org.hibernate.usertype.UserCollectionType 的实现)。" +msgid "The actual interface might be java.util.Set, java.util.Collection, java.util.List, java.util.Map, java.util.SortedSet, java.util.SortedMap or anything you like (\"anything you like\" means you will have to write an implementation of org.hibernate.usertype.UserCollectionType.)" +msgstr "实际的接口可能是 java.util.Setjava.util.Collectionjava.util.Listjava.util.Mapjava.util.SortedSetjava.util.SortedMap 或者任何你喜欢的类型(\"任何你喜欢的类型\" 代表你需要编写 org.hibernate.usertype.UserCollectionType 的实现)。" #. Tag: para #, no-c-format -msgid "" -"Notice how the instance variable was initialized with an instance of " -"HashSet. This is the best way to initialize collection " -"valued properties of newly instantiated (non-persistent) instances. When you " -"make the instance persistent, by calling persist() for " -"example, Hibernate will actually replace the HashSet with " -"an instance of Hibernate's own implementation of Set. Be " -"aware of the following errors:" -msgstr "" -"注意我们是如何用一个 HashSet 实例来初始化实例变量的。这是" -"用于初始化新创建(尚未持久化)的类实例中集合值属性的最佳方法。当你持久化这个" -"实例时 — 比如通过调用 persist() — Hibernate 会自动把 " -"HashSet 替换为 Hibernate 自己的 Set 实" -"现。注意下面的错误:" +msgid "Notice how the instance variable was initialized with an instance of HashSet. This is the best way to initialize collection valued properties of newly instantiated (non-persistent) instances. When you make the instance persistent, by calling persist() for example, Hibernate will actually replace the HashSet with an instance of Hibernate's own implementation of Set. Be aware of the following errors:" +msgstr "注意我们是如何用一个 HashSet 实例来初始化实例变量的。这是用于初始化新创建(尚未持久化)的类实例中集合值属性的最佳方法。当你持久化这个实例时 — 比如通过调用 persist() — Hibernate 会自动把 HashSet 替换为 Hibernate 自己的 Set 实现。注意下面的错误:" #. Tag: para #, no-c-format -msgid "" -"The persistent collections injected by Hibernate behave like " -"HashMap, HashSet, TreeMap, TreeSet or ArrayList, " -"depending on the interface type." -msgstr "" -"根据不同的接口类型,被 Hibernate 注射的持久化集合类的表现类似 " -"HashMapHashSetTreeMapTreeSetArrayList。" +msgid "The persistent collections injected by Hibernate behave like HashMap, HashSet, TreeMap, TreeSet or ArrayList, depending on the interface type." +msgstr "根据不同的接口类型,被 Hibernate 注射的持久化集合类的表现类似 HashMapHashSetTreeMapTreeSetArrayList。" #. Tag: para #, no-c-format -msgid "" -"Collections instances have the usual behavior of value types. They are " -"automatically persisted when referenced by a persistent object and are " -"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 cannot 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 对空的集合引用和空" -"集合不加区别。 " +msgid "Collections instances have the usual behavior of value types. They are automatically persisted when referenced by a persistent object and are 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 cannot 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 对空的集合引用和空集合不加区别。 " #. Tag: para #, no-c-format -msgid "" -"Use persistent collections the same way you use ordinary Java collections. " -"However, please ensure you understand the semantics of bidirectional " -"associations (these are discussed later)." -msgstr "" -"你不需要过多的为此担心。就如同你平时使用普通的 Java 集合类一样来使用持久化集" -"合类。只是要确认你理解了双向关联的语义(后文将进行讨论)。" +msgid "Use persistent collections the same way you use ordinary Java collections. However, please ensure you understand the semantics of bidirectional associations (these are discussed later)." +msgstr "你不需要过多的为此担心。就如同你平时使用普通的 Java 集合类一样来使用持久化集合类。只是要确认你理解了双向关联的语义(后文将进行讨论)。" #. Tag: title #, no-c-format @@ -122,38 +61,18 @@ msgstr "集合映射( Collection mappings )" #. Tag: para #, no-c-format -msgid "" -"There are quite a range of mappings that can be generated for collections " -"that cover many common relational models. We suggest you experiment with the " -"schema generation tool so that you understand how various mapping " -"declarations translate to database tables." -msgstr "" -"从集合类可以产生很大一部分映射,覆盖了很多常见的关系模型。我们建议你试验 " -"schema 生成工具,来体会一下不同的映射声明是如何被翻译为数据库表的。 " +msgid "There are quite a range of mappings that can be generated for collections that cover many common relational models. We suggest you experiment with the schema generation tool so that you understand how various mapping declarations translate to database tables." +msgstr "从集合类可以产生很大一部分映射,覆盖了很多常见的关系模型。我们建议你试验 schema 生成工具,来体会一下不同的映射声明是如何被翻译为数据库表的。 " #. Tag: para #, no-c-format -msgid "" -"The Hibernate mapping element used for mapping a collection depends upon the " -"type of interface. For example, a <set> element is " -"used for mapping properties of type Set." -msgstr "" -"用于映射集合类的 Hibernate 映射元素取决于接口的类型。比如,<" -"set> 元素用来映射 Set 类型的属性。 " +msgid "The Hibernate mapping element used for mapping a collection depends upon the type of interface. For example, a <set> element is used for mapping properties of type Set." +msgstr "用于映射集合类的 Hibernate 映射元素取决于接口的类型。比如,<set> 元素用来映射 Set 类型的属性。 " #. Tag: para #, no-c-format -msgid "" -"Apart from <set>, there is also <" -"list>, <map>, <bag>, <array> and <primitive-" -"array> mapping elements. The <map> " -"element is representative:" -msgstr "" -"除了 <set>,还有<list>," -"<map><bag><" -"array><primitive-array> 映射元素。" -"<map> 具有代表性:" +msgid "Apart from <set>, there is also <list>, <map>, <bag>, <array> and <primitive-array> mapping elements. The <map> element is representative:" +msgstr "除了 <set>,还有<list><map><bag><array><primitive-array> 映射元素。<map> 具有代表性:" #. Tag: para #, no-c-format @@ -162,138 +81,68 @@ msgstr "name:集合属性的名称" #. Tag: para #, no-c-format -msgid "" -"table (optional - defaults to property name): the name of " -"the collection table. It is not used for one-to-many associations." -msgstr "" -"table(可选——默认为属性的名称)这个集合表的名称(不能在一" -"对多的关联关系中使用)。" +msgid "table (optional - defaults to property name): the name of the collection table. It is not used for one-to-many associations." +msgstr "table(可选——默认为属性的名称)这个集合表的名称(不能在一对多的关联关系中使用)。" #. Tag: para #, no-c-format -msgid "" -"schema (optional): the name of a table schema to override " -"the schema declared on the root element" -msgstr "" -"schema(可选):表的 schema 的名称,他将覆盖在根元素中定义" -"的 schema" +msgid "schema (optional): the name of a table schema to override the schema declared on the root element" +msgstr "schema(可选):表的 schema 的名称,他将覆盖在根元素中定义的 schema" #. Tag: para #, no-c-format -msgid "" -"lazy (optional - defaults to true): " -"disables lazy fetching and specifies that the association is always eagerly " -"fetched. It can also be used to enable \"extra-lazy\" fetching where most " -"operations do not initialize the collection. This is suitable for large " -"collections." -msgstr "" -"lazy(可选--默认为 true)可以用来关闭延迟加载(false):指" -"定一直使用预先抓取,或者打开 \"extra-lazy\" 抓取,此时大多数操作不会初始化集" -"合类(适用于非常大的集合)。" +msgid "lazy (optional - defaults to true): disables lazy fetching and specifies that the association is always eagerly fetched. It can also be used to enable \"extra-lazy\" fetching where most operations do not initialize the collection. This is suitable for large collections." +msgstr "lazy(可选--默认为 true)可以用来关闭延迟加载(false):指定一直使用预先抓取,或者打开 \"extra-lazy\" 抓取,此时大多数操作不会初始化集合类(适用于非常大的集合)。" #. Tag: para #, no-c-format -msgid "" -"inverse (optional - defaults to false): marks this collection as the \"inverse\" end of a bidirectional " -"association." -msgstr "" -"inverse(可选 — 默认为 false)标记这个" -"集合作为双向关联关系中的方向一端。 " +msgid "inverse (optional - defaults to false): marks this collection as the \"inverse\" end of a bidirectional association." +msgstr "inverse(可选 — 默认为 false)标记这个集合作为双向关联关系中的方向一端。 " #. Tag: para #, no-c-format -msgid "" -"cascade (optional - defaults to none): " -"enables operations to cascade to child entities." -msgstr "" -"cascade(可选 — 默认为 none)让操作级联" -"到子实体。" +msgid "cascade (optional - defaults to none): enables operations to cascade to child entities." +msgstr "cascade(可选 — 默认为 none)让操作级联到子实体。" #. Tag: para #, no-c-format -msgid "" -"sort (optional): specifies a sorted collection with " -"natural sort order or a given comparator class." -msgstr "" -"sort(可选)指定集合的排序顺序,其可以为自然的" -"(natural)或者给定一个用来比较的类。 " +msgid "sort (optional): specifies a sorted collection with natural sort order or a given comparator class." +msgstr "sort(可选)指定集合的排序顺序,其可以为自然的(natural)或者给定一个用来比较的类。 " #. Tag: para #, no-c-format -msgid "" -"order-by (optional, JDK1.4 only): specifies a table " -"column or columns that define the iteration order of the Map, Set or bag, together with an optional " -"asc or desc." -msgstr "" -"order-by(可选,仅用于 jdk1.4):指定表的字段(一个或几" -"个)再加上 asc 或者 desc(可选),定义 Map、Set 和 Bag 的迭代顺序。" +msgid "order-by (optional, JDK1.4 only): specifies a table column or columns that define the iteration order of the Map, Set or bag, together with an optional asc or desc." +msgstr "order-by(可选,仅用于 jdk1.4):指定表的字段(一个或几个)再加上 asc 或者 desc(可选),定义 Map、Set 和 Bag 的迭代顺序。" #. Tag: para #, no-c-format -msgid "" -"where (optional): specifies an arbitrary SQL " -"WHERE condition that is used when retrieving or removing " -"the collection. This is useful if the collection needs to contain only a " -"subset of the available data." -msgstr "" -"where(可选):指定任意的 SQL where 条件,该条件将在重新载" -"入或者删除这个集合时使用(当集合中的数据仅仅是所有可用数据的一个子集时这个条" -"件非常有用)。" +msgid "where (optional): specifies an arbitrary SQL WHERE condition that is used when retrieving or removing the collection. This is useful if the collection needs to contain only a subset of the available data." +msgstr "where(可选):指定任意的 SQL where 条件,该条件将在重新载入或者删除这个集合时使用(当集合中的数据仅仅是所有可用数据的一个子集时这个条件非常有用)。" #. Tag: para #, no-c-format -msgid "" -"fetch (optional, defaults to select): " -"chooses between outer-join fetching, fetching by sequential select, and " -"fetching by sequential subselect." -msgstr "" -"fetch(可选,默认为 select):用于在外" -"连接抓取、通过后续 select 抓取和通过后续 subselect 抓取之间选择。" +msgid "fetch (optional, defaults to select): chooses between outer-join fetching, fetching by sequential select, and fetching by sequential subselect." +msgstr "fetch(可选,默认为 select):用于在外连接抓取、通过后续 select 抓取和通过后续 subselect 抓取之间选择。" #. Tag: para #, no-c-format -msgid "" -"batch-size (optional, defaults to 1): " -"specifies a \"batch size\" for lazily fetching instances of this collection." -msgstr "" -"batch-size(可选,默认为 1):指定通过" -"延迟加载取得集合实例的批处理块大小(\"batch size\")。" +msgid "batch-size (optional, defaults to 1): specifies a \"batch size\" for lazily fetching instances of this collection." +msgstr "batch-size(可选,默认为 1):指定通过延迟加载取得集合实例的批处理块大小(\"batch size\")。" #. Tag: para #, no-c-format -msgid "" -"access (optional - defaults to property): the strategy Hibernate uses for accessing the collection property " -"value." -msgstr "" -"access(可选-默认为属性 property):Hibernate 取得集合属性" -"值时使用的策略。" +msgid "access (optional - defaults to property): the strategy Hibernate uses for accessing the collection property value." +msgstr "access(可选-默认为属性 property):Hibernate 取得集合属性值时使用的策略。" #. Tag: para #, no-c-format -msgid "" -"optimistic-lock (optional - defaults to true): specifies that changes to the state of the collection results in " -"increments of the owning entity's version. For one-to-many associations you " -"may want to disable this setting." -msgstr "" -"乐观锁(可选 - 默认为 true):对集合的" -"状态的改变会是否导致其所属的实体的版本增长(对一对多关联来说,关闭这个属性常" -"常是有理的)。" +msgid "optimistic-lock (optional - defaults to true): specifies that changes to the state of the collection results in increments of the owning entity's version. For one-to-many associations you may want to disable this setting." +msgstr "乐观锁(可选 - 默认为 true):对集合的状态的改变会是否导致其所属的实体的版本增长(对一对多关联来说,关闭这个属性常常是有理的)。" #. Tag: para #, no-c-format -msgid "" -"mutable (optional - defaults to true): " -"a value of false specifies that the elements of the " -"collection never change. This allows for minor performance optimization in " -"some cases." -msgstr "" -"mutable(可变)(可选 — 默认为 true):" -"若值为 false,表明集合中的元素不会改变(在某些情况下可以进" -"行一些小的性能优化)。 " +msgid "mutable (optional - defaults to true): a value of false specifies that the elements of the collection never change. This allows for minor performance optimization in some cases." +msgstr "mutable(可变)(可选 — 默认为 true):若值为 false,表明集合中的元素不会改变(在某些情况下可以进行一些小的性能优化)。 " #. Tag: title #, no-c-format @@ -302,40 +151,22 @@ msgstr "集合外键(Collection foreign keys)" #. Tag: para #, 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 " -"collection key column, or columns, of the collection " -"table. The collection key column is mapped by the <key> element." -msgstr "" -"集合实例在数据库中依靠持有集合的实体的外键加以辨别。此外键作为集合" -"关键字段(collection key column)(或多个字段)加以引用。集合关键" -"字段通过 <key> 元素映射。 " +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 collection key column, or columns, of the collection table. The collection key column is mapped by the <key> element." +msgstr "集合实例在数据库中依靠持有集合的实体的外键加以辨别。此外键作为集合关键字段(collection key column)(或多个字段)加以引用。集合关键字段通过 <key> 元素映射。 " #. Tag: para #, no-c-format -msgid "" -"There can 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 may need to specify " -"not-null=\"true\"." -msgstr "" -"在外键字段上可能具有非空约束。对于大多数集合来说,这是隐含的。对单向一对多关" -"联来说,外键字段默认是可以为空的,因此你可能需要指明 not-null=\"true" -"\"。 " +msgid "There can 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 may need to specify not-null=\"true\"." +msgstr "在外键字段上可能具有非空约束。对于大多数集合来说,这是隐含的。对单向一对多关联来说,外键字段默认是可以为空的,因此你可能需要指明 not-null=\"true\"。 " #. Tag: para #, no-c-format -msgid "" -"The foreign key constraint can use ON DELETE CASCADE." +msgid "The foreign key constraint can use ON DELETE CASCADE." msgstr "外键约束可以使用 ON DELETE CASCADE。 " #. Tag: para #, no-c-format -msgid "" -"See the previous chapter for a full definition of the <key> element." +msgid "See the previous chapter for a full definition of the <key> element." msgstr "对 <key> 元素的完整定义,请参阅前面的章节。" #. Tag: title @@ -345,36 +176,13 @@ msgstr "集合元素(Collection elements)" #. Tag: para #, no-c-format -msgid "" -"Collections can contain almost any other Hibernate type, including: basic " -"types, custom types, components and 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 a " -"state held by the collection." -msgstr "" -"集合几乎可以包含任何其他的 Hibernate 类型,包括所有的基本类型、自定义类型、组" -"件,当然还有对其他实体的引用。存在一个重要的区别:位于集合中的对象可能是根" -"据“值”语义来操作(其声明周期完全依赖于集合持有者),或者它可能是指向另一个实" -"体的引用,具有其自己的生命周期。在后者的情况下,被作为集合持有的状态考虑的," -"只有两个对象之间的“连接”。 " +msgid "Collections can contain almost any other Hibernate type, including: basic types, custom types, components and 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 a state held by the collection." +msgstr "集合几乎可以包含任何其他的 Hibernate 类型,包括所有的基本类型、自定义类型、组件,当然还有对其他实体的引用。存在一个重要的区别:位于集合中的对象可能是根据“值”语义来操作(其声明周期完全依赖于集合持有者),或者它可能是指向另一个实体的引用,具有其自己的生命周期。在后者的情况下,被作为集合持有的状态考虑的,只有两个对象之间的“连接”。 " #. Tag: para #, no-c-format -msgid "" -"The contained type is referred to as the collection element type. Collection elements are mapped by <element> or <composite-element>, or in the case of " -"entity references, with <one-to-many> or " -"<many-to-many>. The first two map elements with " -"value semantics, the next two are used to map entity associations." -msgstr "" -"被包容的类型被称为集合元素类型(collection element type)。集合元素通过 <element><" -"composite-element> 映射,或在其是实体引用的时候,通过 " -"<one-to-many><many-to-many> 映射。前两种用于使用值语义映射元素,后两种用于映射实体关联。" +msgid "The contained type is referred to as the collection element type. Collection elements are mapped by <element> or <composite-element>, or in the case of entity references, with <one-to-many> or <many-to-many>. The first two map elements with value semantics, the next two are used to map entity associations." +msgstr "被包容的类型被称为集合元素类型(collection element type)。集合元素通过 <element><composite-element> 映射,或在其是实体引用的时候,通过 <one-to-many><many-to-many> 映射。前两种用于使用值语义映射元素,后两种用于映射实体关联。" #. Tag: title #, no-c-format @@ -383,58 +191,27 @@ msgstr "索引集合类(Indexed collections)" #. Tag: para #, no-c-format -msgid "" -"All collection mappings, except those with set and bag semantics, need an " -"index column in the collection table. An index column " -"is a column that maps to an array index, or List index, " -"or Map key. The index of a Map may be " -"of any basic type, mapped with <map-key>. It can be " -"an entity reference mapped with <map-key-many-to-many>, or it can be a composite type mapped with <composite-" -"map-key>. The index of an array or list is always of type " -"integer and is mapped using the <list-" -"index> element. The mapped column contains sequential integers " -"that are numbered from zero by default." -msgstr "" -"所有的集合映射,除了 set 和 bag 语义的以外,都需要指定一个集合表的" -"索引字段(index column) — 用于对应到数组索引,或者 " -"List 的索引,或者 Map 的关键字。通过 " -"<map-key>Map 的索引可以是任何基" -"础类型;若通过 <map-key-many-to-many>,它也可以是一" -"个实体引用;若通过 <composite-map-key>,它还可以是一" -"个组合类型。数组或列表的索引必须是 integer 类型,并且使用 " -"<list-index> 元素定义映射。被映射的字段包含有顺序排" -"列的整数(默认从 0 开始)。 " +msgid "All collection mappings, except those with set and bag semantics, need an index column in the collection table. An index column is a column that maps to an array index, or List index, or Map key. The index of a Map may be of any basic type, mapped with <map-key>. It can be an entity reference mapped with <map-key-many-to-many>, or it can be a composite type mapped with <composite-map-key>. The index of an array or list is always of type integer and is mapped using the <list-index> element. The mapped column contains sequential integers that are numbered from zero by default." +msgstr "所有的集合映射,除了 set 和 bag 语义的以外,都需要指定一个集合表的索引字段(index column) — 用于对应到数组索引,或者 List 的索引,或者 Map 的关键字。通过 <map-key>Map 的索引可以是任何基础类型;若通过 <map-key-many-to-many>,它也可以是一个实体引用;若通过 <composite-map-key>,它还可以是一个组合类型。数组或列表的索引必须是 integer 类型,并且使用 <list-index> 元素定义映射。被映射的字段包含有顺序排列的整数(默认从 0 开始)。 " #. Tag: para #, no-c-format -msgid "" -"column_name (required): the name of the column holding " -"the collection index values." +msgid "column_name (required): the name of the column holding the collection index values." msgstr "column_name(必需):持有集合索引值的字段的名称。 " #. Tag: para #, no-c-format -msgid "" -"base (optional - defaults to 0): the " -"value of the index column that corresponds to the first element of the list " -"or array." -msgstr "" -"base(可选 — 默认为 0)对应列表或队列的" -"第一个元素的索引字段的值。" +msgid "base (optional - defaults to 0): the value of the index column that corresponds to the first element of the list or array." +msgstr "base(可选 — 默认为 0)对应列表或队列的第一个元素的索引字段的值。" #. Tag: para #, no-c-format -msgid "" -"column (optional): the name of the column holding the " -"collection index values." +msgid "column (optional): the name of the column holding the collection index values." msgstr "column(可选):持有集合索引值的字段的名称。" #. Tag: para #, no-c-format -msgid "" -"formula (optional): a SQL formula used to evaluate the " -"key of the map." +msgid "formula (optional): a SQL formula used to evaluate the key of the map." msgstr "formula(可选):用于对表键求值的 SQL 公式。" #. Tag: para @@ -444,76 +221,47 @@ msgstr "type(必需):映射键的类型。 " #. Tag: para #, no-c-format -msgid "" -"column (optional): the name of the foreign key column for " -"the collection index values." +msgid "column (optional): the name of the foreign key column for the collection index values." msgstr "column(可选):用于集合索引值的外键字段的名称。" #. Tag: para #, no-c-format -msgid "" -"formula (optional): a SQ formula used to evaluate the " -"foreign key of the map key." -msgstr "" -"formula(可选):用于对映射键的外键求值的 SQL 公式。" +msgid "formula (optional): a SQ formula used to evaluate the foreign key of the map key." +msgstr "formula(可选):用于对映射键的外键求值的 SQL 公式。" #. Tag: para #, no-c-format -msgid "" -"class (required): the entity class used as the map key." +msgid "class (required): the entity class used as the map key." msgstr "class(必需):用作映射键的实体类的名称。 " #. Tag: para #, no-c-format -msgid "" -"If your table does not have an index column, and you still wish to use " -"List as the property type, you can map the property as a " -"Hibernate <bag>. A bag does not retain its order " -"when it is retrieved from the database, but it can be optionally sorted or " -"ordered." -msgstr "" -"假若你的表没有一个索引字段,当你仍然希望使用 List 作为属性" -"类型,你应该把此属性映射为 Hibernate <bag>。从数据" -"库中获取的时候,bag 不维护其顺序,但也可选择性的进行排序。 " +msgid "If your table does not have an index column, and you still wish to use List as the property type, you can map the property as a Hibernate <bag>. A bag does not retain its order when it is retrieved from the database, but it can be optionally sorted or ordered." +msgstr "假若你的表没有一个索引字段,当你仍然希望使用 List 作为属性类型,你应该把此属性映射为 Hibernate <bag>。从数据库中获取的时候,bag 不维护其顺序,但也可选择性的进行排序。 " #. Tag: title #, no-c-format msgid "Collections of values and many-to-many associations" -msgstr "" -"值集合于多对多关联(Collections of values and many-to-many associations)" +msgstr "值集合于多对多关联(Collections of values and many-to-many associations)" #. Tag: para #, no-c-format -msgid "" -"Any collection of values or many-to-many associations requires a dedicated " -"collection table with a foreign key column or columns, " -"collection element column or columns, and possibly an " -"index column or columns." -msgstr "" -"任何值集合或者多对多关联需要专用的具有一个或多个外键字段的 " -"collection table、一个或多个 collection " -"element column,以及还可能有一个或多个索引字段。 " +msgid "Any collection of values or many-to-many associations requires a dedicated collection table with a foreign key column or columns, collection element column or columns, and possibly an index column or columns." +msgstr "任何值集合或者多对多关联需要专用的具有一个或多个外键字段的 collection table、一个或多个 collection element column,以及还可能有一个或多个索引字段。 " #. Tag: para #, no-c-format -msgid "" -"For a collection of values use the <element> tag. " -"For example:" -msgstr "" -"对于一个值集合,我们使用 <element> 标签。例如:" +msgid "For a collection of values use the <element> tag. For example:" +msgstr "对于一个值集合,我们使用 <element> 标签。例如:" #. Tag: para #, no-c-format -msgid "" -"column (optional): the name of the column holding the " -"collection element values." +msgid "column (optional): the name of the column holding the collection element values." msgstr "column(可选):持有集合元素值的字段的名称。" #. Tag: para #, no-c-format -msgid "" -"formula (optional): an SQL formula used to evaluate the " -"element." +msgid "formula (optional): an SQL formula used to evaluate the element." msgstr "formula(可选):用于对元素求值的 SQL 公式。" #. Tag: para @@ -523,25 +271,17 @@ msgstr "type(必需):集合元素的类型。 " #. Tag: para #, no-c-format -msgid "" -"A many-to-many association is specified using the " -"<many-to-many> element." -msgstr "" -"用 <many-to-many> 元素指定 many-to-many " -"association。" +msgid "A many-to-many association is specified using the <many-to-many> element." +msgstr "用 <many-to-many> 元素指定 many-to-many association。" #. Tag: para #, no-c-format -msgid "" -"column (optional): the name of the element foreign key " -"column." +msgid "column (optional): the name of the element foreign key column." msgstr "column(必需):元素外键字段的名称。 " #. Tag: para #, no-c-format -msgid "" -"formula (optional): an SQL formula used to evaluate the " -"element foreign key value." +msgid "formula (optional): an SQL formula used to evaluate the element foreign key value." msgstr "formula(可选):用于对元素外键值求值的 SQL 公式。" #. Tag: para @@ -551,61 +291,28 @@ msgstr "class(必需):被关联类的名称。 " #. Tag: para #, no-c-format -msgid "" -"fetch (optional - defaults to join): " -"enables outer-join or sequential select fetching for this association. This " -"is a special case; for full eager fetching in a single SELECT of an entity and its many-to-many relationships to other entities, " -"you would enable join fetching,not only of the collection " -"itself, but also with this attribute on the <many-to-many> nested element." -msgstr "" -"fetch(可选 - 缺省为 join): 为这个关" -"联启用外连接或序列性选择抓取。这是一个特例。对于在单个 SELECT 里进行完全的 eager fetching 以及使 <many-to-many> n用多对多关联,你可以启用 join fetching,这不仅是" -"对于集合本身,也对 <many-to-many> 嵌套元素的属性。" +msgid "fetch (optional - defaults to join): enables outer-join or sequential select fetching for this association. This is a special case; for full eager fetching in a single SELECT of an entity and its many-to-many relationships to other entities, you would enable join fetching,not only of the collection itself, but also with this attribute on the <many-to-many> nested element." +msgstr "fetch(可选 - 缺省为 join): 为这个关联启用外连接或序列性选择抓取。这是一个特例。对于在单个 SELECT 里进行完全的 eager fetching 以及使 <many-to-many> n用多对多关联,你可以启用 join fetching,这不仅是对于集合本身,也对 <many-to-many> 嵌套元素的属性。" #. Tag: para #, no-c-format -msgid "" -"unique (optional): enables the DDL generation of a unique " -"constraint for the foreign-key column. This makes the association " -"multiplicity effectively one-to-many." -msgstr "" -"unique(可选):未外键字段启用唯一约束的 DDL 生成。这使得" -"关联一对多的多样性更为有效。" +msgid "unique (optional): enables the DDL generation of a unique constraint for the foreign-key column. This makes the association multiplicity effectively one-to-many." +msgstr "unique(可选):未外键字段启用唯一约束的 DDL 生成。这使得关联一对多的多样性更为有效。" #. Tag: para #, no-c-format -msgid "" -"not-found (optional - defaults to exception): specifies how foreign keys that reference missing rows will be " -"handled: ignore will treat a missing row as a null " -"association." -msgstr "" -"not-found(可选 - 默认为 exception):" -"指明若缓存的标示值关联的行缺失,该如何处理:ignore 会把缺" -"失的行作为一个空关联处理。 " +msgid "not-found (optional - defaults to exception): specifies how foreign keys that reference missing rows will be handled: ignore will treat a missing row as a null association." +msgstr "not-found(可选 - 默认为 exception):指明若缓存的标示值关联的行缺失,该如何处理:ignore 会把缺失的行作为一个空关联处理。 " #. Tag: para #, no-c-format -msgid "" -"entity-name (optional): the entity name of the associated " -"class, as an alternative to class." -msgstr "" -"entity-name(可选):被关联的类的实体名,作为 " -"class 的替代。 " +msgid "entity-name (optional): the entity name of the associated class, as an alternative to class." +msgstr "entity-name(可选):被关联的类的实体名,作为 class 的替代。 " #. Tag: para #, no-c-format -msgid "" -"property-ref (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 "" -"property-ref(可选):连接至这个外键的关联类的属性名称。如" -"果未指定,关联类的主键将被使用。" +msgid "property-ref (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 "property-ref(可选):连接至这个外键的关联类的属性名称。如果未指定,关联类的主键将被使用。" #. Tag: para #, no-c-format @@ -619,19 +326,13 @@ msgstr "一系列字符串:" #. Tag: para #, no-c-format -msgid "" -"A bag containing integers with an iteration order determined by the " -"order-by attribute:" -msgstr "" -"包含一组整数的 bag(还设置了 order-by 参数指定了迭代的顺" -"序): " +msgid "A bag containing integers with an iteration order determined by the order-by attribute:" +msgstr "包含一组整数的 bag(还设置了 order-by 参数指定了迭代的顺序): " #. Tag: para #, no-c-format msgid "An array of entities, in this case, a many-to-many association:" -msgstr "" -"一个实体数组,在这个案例中是一个多对多的关联(注意这里的实体是自动管理生命周" -"期的对象(lifecycle objects),cascade=\"all\"): " +msgstr "一个实体数组,在这个案例中是一个多对多的关联(注意这里的实体是自动管理生命周期的对象(lifecycle objects),cascade=\"all\"): " #. Tag: para #, no-c-format @@ -650,88 +351,43 @@ msgstr "一对多关联(One-to-many Associations)" #. Tag: para #, no-c-format -msgid "" -"A one-to-many association 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 "" -"一对多关联通过外键连接两个类对应的" -"表,而没有中间集合表。 这个关系模型失去了一些 Java 集合的语义:" +msgid "A one-to-many association 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 "一对多关联通过外键连接两个类对应的表,而没有中间集合表。 这个关系模型失去了一些 Java 集合的语义:" #. Tag: para #, no-c-format -msgid "" -"An instance of the contained entity class cannot belong to more than one " -"instance of the collection." +msgid "An instance of the contained entity class cannot belong to more than one instance of the collection." msgstr "一个被包含的实体的实例只能被包含在一个集合的实例中。" #. Tag: para #, no-c-format -msgid "" -"An instance of the contained entity class cannot appear at more than one " -"value of the collection index." +msgid "An instance of the contained entity class cannot appear at more than one value of the collection index." msgstr "一个被包含的实体的实例只能对应于集合索引的一个值中。" #. Tag: para #, no-c-format -msgid "" -"An association from Product to Part " -"requires the existence of a foreign key column and possibly an index column " -"to the Part table. A <one-to-many> tag indicates that this is a one-to-many association." -msgstr "" -"一个从 ProductPart 的关联需要关键字" -"字段,可能还有一个索引字段指向 Part 所对应的表。" -"<one-to-many> 标记指明了一个一对多的关联。 " +msgid "An association from Product to Part requires the existence of a foreign key column and possibly an index column to the Part table. A <one-to-many> tag indicates that this is a one-to-many association." +msgstr "一个从 ProductPart 的关联需要关键字字段,可能还有一个索引字段指向 Part 所对应的表。<one-to-many> 标记指明了一个一对多的关联。 " #. Tag: para #, no-c-format -msgid "" -"not-found (optional - defaults to exception): specifies how cached identifiers that reference missing rows will " -"be handled. ignore will treat a missing row as a null " -"association." -msgstr "" -"not-found(可选 - 默认为exception):指" -"明若缓存的标示值关联的行缺失,该如何处理:ignore 会把缺失" -"的行作为一个空关联处理。 " +msgid "not-found (optional - defaults to exception): specifies how cached identifiers that reference missing rows will be handled. ignore will treat a missing row as a null association." +msgstr "not-found(可选 - 默认为exception):指明若缓存的标示值关联的行缺失,该如何处理:ignore 会把缺失的行作为一个空关联处理。 " #. Tag: para #, no-c-format -msgid "" -"The <one-to-many> element does not need to declare " -"any columns. Nor is it necessary to specify the table " -"name anywhere." -msgstr "" -"注意:<one-to-many> 元素不需要定义任何字段。也不需要" -"指定表名。 " +msgid "The <one-to-many> element does not need to declare any columns. Nor is it necessary to specify the table name anywhere." +msgstr "注意:<one-to-many> 元素不需要定义任何字段。也不需要指定表名。 " #. Tag: para #, no-c-format -msgid "" -"If the foreign key column of a <one-to-many> " -"association is declared NOT NULL, you must declare the " -"<key> mapping not-null=\"true\" " -"or use a bidirectional association with the collection " -"mapping marked inverse=\"true\". See the discussion of " -"bidirectional associations later in this chapter for more information." -msgstr "" -"重要提示:如果一对多关联中的外键字段" -"定义成 NOT NULL,你必须把 <key> " -"映射声明为 not-null=\"true\",或者使用双向关联,并且标明 inverse=\"true\"。参阅本章后面关于双向" -"关联的讨论。 " +msgid "If the foreign key column of a <one-to-many> association is declared NOT NULL, you must declare the <key> mapping not-null=\"true\" or use a bidirectional association with the collection mapping marked inverse=\"true\". See the discussion of bidirectional associations later in this chapter for more information." +msgstr "重要提示:如果一对多关联中的外键字段定义成 NOT NULL,你必须把 <key> 映射声明为 not-null=\"true\",或者使用双向关联,并且标明 inverse=\"true\"。参阅本章后面关于双向关联的讨论。 " #. Tag: para #, no-c-format -msgid "" -"The following example shows a map of Part entities by " -"name, where partName is a persistent property of " -"Part. Notice the use of a formula-based index:" -msgstr "" -"下面的例子展示一个 Part 实体的 map,把 name 作为关键字。" -"( partNamePart 的持久化属性)。注" -"意其中的基于公式的索引的用法。 " +msgid "The following example shows a map of Part entities by name, where partName is a persistent property of Part. Notice the use of a formula-based index:" +msgstr "下面的例子展示一个 Part 实体的 map,把 name 作为关键字。( partNamePart 的持久化属性)。注意其中的基于公式的索引的用法。 " #. Tag: title #, no-c-format @@ -745,49 +401,23 @@ msgstr "有序集合(Sorted collections)" #. Tag: para #, no-c-format -msgid "" -"Hibernate supports collections implementing java.util.SortedMap and java.util.SortedSet. You must specify a " -"comparator in the mapping file:" -msgstr "" -"Hibernate 支持实现 java.util.SortedMapjava." -"util.SortedSet 的集合。你必须在映射文件中指定一个比较器:" +msgid "Hibernate supports collections implementing java.util.SortedMap and java.util.SortedSet. You must specify a comparator in the mapping file:" +msgstr "Hibernate 支持实现 java.util.SortedMapjava.util.SortedSet 的集合。你必须在映射文件中指定一个比较器:" #. Tag: para #, no-c-format -msgid "" -"Allowed values of the sort attribute are " -"unsorted, natural and the name of a " -"class implementing java.util.Comparator." -msgstr "" -"sort 属性中允许的值包括 unsorted," -"natural 和某个实现了 java.util.Comparator 的类的名称。" +msgid "Allowed values of the sort attribute are unsorted, natural and the name of a class implementing java.util.Comparator." +msgstr "sort 属性中允许的值包括 unsortednatural 和某个实现了 java.util.Comparator 的类的名称。" #. Tag: para #, no-c-format -msgid "" -"Sorted collections actually behave like java.util.TreeSet " -"or java.util.TreeMap." -msgstr "" -"分类集合的行为事实上象 java.util.TreeSet 或者 " -"java.util.TreeMap。" +msgid "Sorted collections actually behave like java.util.TreeSet or java.util.TreeMap." +msgstr "分类集合的行为事实上象 java.util.TreeSet 或者 java.util.TreeMap。" #. Tag: para #, no-c-format -msgid "" -"If you want the database itself to order the collection elements, use the " -"order-by attribute of set, " -"bag or map mappings. This solution is " -"only available under JDK 1.4 or higher and is implemented using " -"LinkedHashSet or LinkedHashMap. This " -"performs the ordering in the SQL query and not in the memory." -msgstr "" -"如果你希望数据库自己对集合元素排序,可以利用 set," -"bag 或者 map 映射中的 order-" -"by 属性。这个解决方案只能在 jdk1.4 或者更高的 jdk 版本中才可以实现" -"(通过 LinkedHashSet 或者 LinkedHashMap 实现)。它是在 SQL 查询中完成排序,而" -"不是在内存中。 " +msgid "If you want the database itself to order the collection elements, use the order-by attribute of set, bag or map mappings. This solution is only available under JDK 1.4 or higher and is implemented using LinkedHashSet or LinkedHashMap. This performs the ordering in the SQL query and not in the memory." +msgstr "如果你希望数据库自己对集合元素排序,可以利用 setbag 或者 map 映射中的 order-by 属性。这个解决方案只能在 jdk1.4 或者更高的 jdk 版本中才可以实现(通过 LinkedHashSet 或者 LinkedHashMap 实现)。它是在 SQL 查询中完成排序,而不是在内存中。 " #. Tag: title #, no-c-format @@ -796,20 +426,13 @@ msgstr "注意" #. Tag: para #, no-c-format -msgid "" -"The value of the order-by attribute is an SQL ordering, " -"not an HQL ordering." -msgstr "" -"注意:这个 order-by 属性的值是一个 SQL 排序子句而不是 HQL " -"的。" +msgid "The value of the order-by attribute is an SQL ordering, not an HQL ordering." +msgstr "注意:这个 order-by 属性的值是一个 SQL 排序子句而不是 HQL 的。" #. Tag: para #, no-c-format -msgid "" -"Associations can even be sorted by arbitrary criteria at runtime using a " -"collection filter():" -msgstr "" -"关联还可以在运行时使用集合 filter() 根据任意的条件来排序:" +msgid "Associations can even be sorted by arbitrary criteria at runtime using a collection filter():" +msgstr "关联还可以在运行时使用集合 filter() 根据任意的条件来排序:" #. Tag: title #, no-c-format @@ -818,13 +441,8 @@ msgstr "双向关联(Bidirectional associations)" #. Tag: para #, no-c-format -msgid "" -"A bidirectional association allows navigation from both " -"\"ends\" of the association. Two kinds of bidirectional association are " -"supported:" -msgstr "" -"双向关联允许通过关联的任一端访问另外一端。在 Hibernate " -"中,支持两种类型的双向关联: " +msgid "A bidirectional association allows navigation from both \"ends\" of the association. Two kinds of bidirectional association are supported:" +msgstr "双向关联允许通过关联的任一端访问另外一端。在 Hibernate 中,支持两种类型的双向关联: " #. Tag: term #, no-c-format @@ -848,65 +466,33 @@ msgstr "两端都是 set 或 bag 值" #. Tag: para #, no-c-format -msgid "" -"You can specify a bidirectional many-to-many association by mapping two many-" -"to-many associations to the same database table and declaring one end as " -"inverse. You cannot select an indexed collection." -msgstr "" -"要建立一个双向的多对多关联,只需要映射两个 many-to-many 关联到同一个数据库表" -"中,并再定义其中的一端为 inverse(使用哪一端要根据你的选" -"择,但它不能是一个索引集合)。 " +msgid "You can specify a bidirectional many-to-many association by mapping two many-to-many associations to the same database table and declaring one end as inverse. You cannot select an indexed collection." +msgstr "要建立一个双向的多对多关联,只需要映射两个 many-to-many 关联到同一个数据库表中,并再定义其中的一端为 inverse(使用哪一端要根据你的选择,但它不能是一个索引集合)。 " #. Tag: para #, no-c-format -msgid "" -"Here is an example of a bidirectional many-to-many association that " -"illustrates how each category can have many items and each item can be in " -"many categories:" -msgstr "" -"这里有一个 many-to-many 的双向关联的例子;每一个 category 都可以有很多 items," -"每一个 items 可以属于很多 categories: " +msgid "Here is an example of a bidirectional many-to-many association that illustrates how each category can have many items and each item can be in many categories:" +msgstr "这里有一个 many-to-many 的双向关联的例子;每一个 category 都可以有很多 items,每一个 items 可以属于很多 categories: " #. Tag: para #, no-c-format -msgid "" -"Changes made only to the inverse end of the association are not 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 a many-to-many relationship in Javais created:" -msgstr "" -"如果只对关联的反向端进行了改变,这个改变不会被持久化。 " -"这表示 Hibernate 为每个双向关联在内存中存在两次表现,一个从 A 连接到 B,另一" -"个从 B 连接到 A。如果你回想一下 Java 对象模型,我们是如何在 Java 中创建多对多" -"关系的,这可以让你更容易理解: " +msgid "Changes made only to the inverse end of the association are not 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 a many-to-many relationship in Javais created:" +msgstr "如果只对关联的反向端进行了改变,这个改变不会被持久化。 这表示 Hibernate 为每个双向关联在内存中存在两次表现,一个从 A 连接到 B,另一个从 B 连接到 A。如果你回想一下 Java 对象模型,我们是如何在 Java 中创建多对多关系的,这可以让你更容易理解: " #. Tag: para #, no-c-format -msgid "" -"The non-inverse side is used to save the in-memory representation to the " -"database." +msgid "The non-inverse side is used to save the in-memory representation to the database." msgstr "非反向端用于把内存中的表示保存到数据库中。" #. Tag: para #, no-c-format -msgid "" -"You can 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 inverse=\"true\"." -msgstr "" -"要建立一个一对多的双向关联,你可以通过把一个一对多关联,作为一个多对一关联映" -"射到到同一张表的字段上,并且在\"多\"的那一端定义 inverse=\"true\"。 " +msgid "You can 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 inverse=\"true\"." +msgstr "要建立一个一对多的双向关联,你可以通过把一个一对多关联,作为一个多对一关联映射到到同一张表的字段上,并且在\"多\"的那一端定义 inverse=\"true\"。 " #. Tag: para #, no-c-format -msgid "" -"Mapping one end of an association with inverse=\"true\" " -"does not affect the operation of cascades as these are orthogonal concepts." -msgstr "" -"在“一”这一端定义 inverse=\"true\" 不会影响级联操作,二者是" -"正交的概念。" +msgid "Mapping one end of an association with inverse=\"true\" does not affect the operation of cascades as these are orthogonal concepts." +msgstr "在“一”这一端定义 inverse=\"true\" 不会影响级联操作,二者是正交的概念。" #. Tag: title #, no-c-format @@ -915,36 +501,18 @@ msgstr "双向关联,涉及有序集合类" #. Tag: para #, no-c-format -msgid "" -"A bidirectional association where one end is represented as a <" -"list> or <map>, requires special " -"consideration. If there is a property of the child class that maps to the " -"index column you can use inverse=\"true\" on the " -"collection mapping:" -msgstr "" -"对于有一端是 <list> 或者 <map> 的双向关联,需要加以特别考虑。假若子类中的一个属性映射到索引字段,没" -"问题,我们仍然可以在集合类映射上使用 inverse=\"true\": " +msgid "A bidirectional association where one end is represented as a <list> or <map>, requires special consideration. If there is a property of the child class that maps to the index column you can use inverse=\"true\" on the collection mapping:" +msgstr "对于有一端是 <list> 或者 <map> 的双向关联,需要加以特别考虑。假若子类中的一个属性映射到索引字段,没问题,我们仍然可以在集合类映射上使用 inverse=\"true\": " #. Tag: para #, no-c-format -msgid "" -"If there is no such property on the child class, the association cannot be " -"considered truly bidirectional. That is, there is information available at " -"one end of the association that is not available at the other end. In this " -"case, you cannot map the collection inverse=\"true\". " -"Instead, you could use the following mapping:" -msgstr "" -"但是,假若子类中没有这样的属性存在,我们不能认为这个关联是真正的双向关联(信" -"息不对称,在关联的一端有一些另外一端没有的信息)。在这种情况下,我们不能使用 " -"inverse=\"true\"。我们需要这样用: " +msgid "If there is no such property on the child class, the association cannot be considered truly bidirectional. That is, there is information available at one end of the association that is not available at the other end. In this case, you cannot map the collection inverse=\"true\". Instead, you could use the following mapping:" +msgstr "但是,假若子类中没有这样的属性存在,我们不能认为这个关联是真正的双向关联(信息不对称,在关联的一端有一些另外一端没有的信息)。在这种情况下,我们不能使用 inverse=\"true\"。我们需要这样用: " #. Tag: para -#, fuzzy, no-c-format -msgid "" -"Note that in this mapping, the collection-valued end of the association is " -"responsible for updates to the foreign key." -msgstr "注意在这个映射中,关联中集合类\"值\"一端负责来更新外键。 " +#, no-c-format +msgid "Note that in this mapping, the collection-valued end of the association is responsible for updates to the foreign key." +msgstr "注意在这个映射中,关联中集合类\"值\"一端负责来更新外键。" #. Tag: title #, no-c-format @@ -953,95 +521,48 @@ msgstr "三重关联(Ternary associations)" #. Tag: para #, no-c-format -msgid "" -"There are three possible approaches to mapping a ternary association. One " -"approach is to use a Map with an association as its index:" -msgstr "" -"有三种可能的途径来映射一个三重关联。第一种是使用一个 Map," -"把一个关联作为其索引: " +msgid "There are three possible approaches to mapping a ternary association. One approach is to use a Map with an association as its index:" +msgstr "有三种可能的途径来映射一个三重关联。第一种是使用一个 Map,把一个关联作为其索引: " #. Tag: para #, no-c-format -msgid "" -"A second approach is to remodel the association as an entity class. This is " -"the most common approach." -msgstr "" -"第二种方法是简单的把关联重新建模为一个实体类。这使我们最经常使用的方法。 " +msgid "A second approach is to remodel the association as an entity class. This is the most common approach." +msgstr "第二种方法是简单的把关联重新建模为一个实体类。这使我们最经常使用的方法。 " #. Tag: para #, no-c-format -msgid "" -"A final alternative is to use composite elements, which will be discussed " -"later." +msgid "A final alternative is to use composite elements, which will be discussed later." msgstr "最后一种选择是使用复合元素,我们会在后面讨论。" #. Tag: title -#, fuzzy, no-c-format +#, no-c-format msgid "Using an <idbag>" -msgstr "使用 an <idbag>" +msgstr "使用 an <idbag> " #. Tag: para #, no-c-format -msgid "" -"The majority of the many-to-many associations and collections of values " -"shown previously all map to tables with composite keys, even though it has " -"been have suggested that entities should have synthetic identifiers " -"(surrogate keys). A pure association table does not seem to benefit much " -"from a surrogate key, although a collection of composite values " -"might. It is for this reason that 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)”的观点,也许你会感到有一些奇" -"怪,我们目前为止展示的多对多关联和值集合都是映射成为带有联合主键的表的!现" -"在,这一点非常值得争辩;看上去一个单纯的关联表并不能从代用标识符中获得什么好" -"处(虽然使用组合值的集合可能会获得一点好处)。不过," -"Hibernate 提供了一个(一点点试验性质的)功能,让你把多对多关联和值集合应得到" -"一个使用代用标识符的表去。 " +msgid "The majority of the many-to-many associations and collections of values shown previously all map to tables with composite keys, even though it has been have suggested that entities should have synthetic identifiers (surrogate keys). A pure association table does not seem to benefit much from a surrogate key, although a collection of composite values might. It is for this reason that 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)”的观点,也许你会感到有一些奇怪,我们目前为止展示的多对多关联和值集合都是映射成为带有联合主键的表的!现在,这一点非常值得争辩;看上去一个单纯的关联表并不能从代用标识符中获得什么好处(虽然使用组合值的集合可能会获得一点好处)。不过,Hibernate 提供了一个(一点点试验性质的)功能,让你把多对多关联和值集合应得到一个使用代用标识符的表去。 " #. Tag: para #, no-c-format -msgid "" -"The <idbag> element lets you map a List (or Collection) with bag semantics. For example:" -msgstr "" -"<idbag> 属性让你使用 bag 语义来映射一个 " -"List (或 Collection)。 " +msgid "The <idbag> element lets you map a List (or Collection) with bag semantics. For example:" +msgstr "<idbag> 属性让你使用 bag 语义来映射一个 List (或 Collection)。 " #. Tag: para #, no-c-format -msgid "" -"An <idbag> has a synthetic id generator, just like " -"an entity class. A different surrogate key is assigned to each collection " -"row. Hibernate does not, however, provide any mechanism for discovering the " -"surrogate key value of a particular row." -msgstr "" -"你可以理解,<idbag> 人工的 id 生成器,就好像是实体类" -"一样!集合的每一行都有一个不同的人造关键字。但是,Hibernate 没有提供任何机制" -"来让你取得某个特定行的人造关键字。 " +msgid "An <idbag> has a synthetic id generator, just like an entity class. A different surrogate key is assigned to each collection row. Hibernate does not, however, provide any mechanism for discovering the surrogate key value of a particular row." +msgstr "你可以理解,<idbag> 人工的 id 生成器,就好像是实体类一样!集合的每一行都有一个不同的人造关键字。但是,Hibernate 没有提供任何机制来让你取得某个特定行的人造关键字。 " #. Tag: para #, no-c-format -msgid "" -"The update performance of an <idbag> supersedes a " -"regular <bag>. Hibernate can locate individual rows " -"efficiently and update or delete them individually, similar to a list, map " -"or set." -msgstr "" -"注意 <idbag> 的更新性能要比普通的 <" -"bag> 高得多!Hibernate 可以有效的定位到不同的行,分别进行更新或" -"删除工作,就如同处理一个 list,map 或者 set 一样。 " +msgid "The update performance of an <idbag> supersedes a regular <bag>. Hibernate can locate individual rows efficiently and update or delete them individually, similar to a list, map or set." +msgstr "注意 <idbag> 的更新性能要比普通的 <bag> 高得多!Hibernate 可以有效的定位到不同的行,分别进行更新或删除工作,就如同处理一个 list,map 或者 set 一样。 " #. Tag: para #, no-c-format -msgid "" -"In the current implementation, the native identifier " -"generation strategy is not supported for <idbag> " -"collection identifiers." -msgstr "" -"在目前的实现中,还不支持使用 identity 标识符生成器策略来生" -"成 <idbag> 集合的标识符。" +msgid "In the current implementation, the native identifier generation strategy is not supported for <idbag> collection identifiers." +msgstr "在目前的实现中,还不支持使用 identity 标识符生成器策略来生成 <idbag> 集合的标识符。" #. Tag: title #, no-c-format @@ -1055,18 +576,13 @@ msgstr "集合例子(Collection example)。" #. Tag: para #, no-c-format -msgid "" -"The following class has a collection of Child instances:" +msgid "The following class has a collection of Child instances:" msgstr "下面的代码是用来添加一个新的 Child:" #. Tag: para #, no-c-format -msgid "" -"If each child has, at most, one parent, the most natural mapping is a one-to-" -"many association:" -msgstr "" -"这个类有一个 Child 的实例集合。如果每一个子实例至多有一个" -"父实例,那么最自然的映射是一个 one-to-many 的关联关系: " +msgid "If each child has, at most, one parent, the most natural mapping is a one-to-many association:" +msgstr "这个类有一个 Child 的实例集合。如果每一个子实例至多有一个父实例,那么最自然的映射是一个 one-to-many 的关联关系: " #. Tag: para #, no-c-format @@ -1075,12 +591,8 @@ msgstr "在以下的表定义中反应了这个映射关系:" #. Tag: para #, no-c-format -msgid "" -"If the parent is required, use a bidirectional one-to-" -"many association:" -msgstr "" -"如果父亲是必须的,那么就可以使用双向 one-to-many 的关联" -"了:" +msgid "If the parent is required, use a bidirectional one-to-many association:" +msgstr "如果父亲是必须的,那么就可以使用双向 one-to-many 的关联了:" #. Tag: para #, no-c-format @@ -1089,22 +601,13 @@ msgstr "请注意 NOT NULL 的约束:" #. Tag: para #, no-c-format -msgid "" -"Alternatively, if this association must be unidirectional you can declare " -"the NOT NULL constraint on the <key> mapping:" -msgstr "" -"另外,如果你绝对坚持这个关联应该是单向的,你可以对 <key> 映射声明 NOT NULL 约束: " +msgid "Alternatively, if this association must be unidirectional you can declare the NOT NULL constraint on the <key> mapping:" +msgstr "另外,如果你绝对坚持这个关联应该是单向的,你可以对 <key> 映射声明 NOT NULL 约束: " #. Tag: para #, no-c-format -msgid "" -"On the other hand, if a child has multiple parents, a many-to-many " -"association is appropriate:" -msgstr "" -"另外一方面,如果一个子实例可能有多个父实例,那么就应该使用 many-to-many 关" -"联: " +msgid "On the other hand, if a child has multiple parents, a many-to-many association is appropriate:" +msgstr "另外一方面,如果一个子实例可能有多个父实例,那么就应该使用 many-to-many 关联: " #. Tag: para #, no-c-format @@ -1112,13 +615,9 @@ msgid "Table definitions:" msgstr "表定义:" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"For more examples and a complete explanation of a parent/child relationship " -"mapping, see for more information." -msgstr "" -"更多的例子,以及一个完整的父/子关系映射的排练,请参阅 。 " +#, no-c-format +msgid "For more examples and a complete explanation of a parent/child relationship mapping, see for more information." +msgstr "更多的例子,以及一个完整的父/子关系映射的排练,请参阅 。 " #. Tag: para #, no-c-format diff --git a/documentation/manual/src/main/docbook/zh-CN/content/component_mapping.po b/documentation/manual/src/main/docbook/zh-CN/content/component_mapping.po index 1e5d483468..05a5ff39af 100644 --- a/documentation/manual/src/main/docbook/zh-CN/content/component_mapping.po +++ b/documentation/manual/src/main/docbook/zh-CN/content/component_mapping.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Collection_Mapping\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-02-11T05:38:15\n" -"PO-Revision-Date: 2010-01-11 10:36+1000\n" +"PO-Revision-Date: 2010-03-15 09:01+1000\n" "Last-Translator: Xi HUANG \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -21,12 +21,8 @@ msgstr "组件(Component)映射" #. Tag: para #, no-c-format -msgid "" -"The notion of a component is re-used in several " -"different contexts and purposes throughout Hibernate." -msgstr "" -"组件(Component)这个概念在 Hibernate 中几处不同的地方为" -"了不同的目的被重复使用。" +msgid "The notion of a component is re-used in several different contexts and purposes throughout Hibernate." +msgstr "组件(Component)这个概念在 Hibernate 中几处不同的地方为了不同的目的被重复使用。" #. Tag: title #, no-c-format @@ -35,29 +31,13 @@ msgstr "依赖对象(Dependent objects)" #. Tag: para #, no-c-format -msgid "" -"A component is a contained object that is persisted as a value type and not " -"an entity reference. The term \"component\" refers to the object-oriented " -"notion of composition and not to architecture-level components. For example, " -"you can model a person like this:" -msgstr "" -"组件(Component)是一个被包含的对象,在持久化的过程中,它被当作值类型,而并非" -"一个实体的引用。在这篇文档中,组件这一术语指的是面向对象的合成概念(而并不是" -"系统构架层次上的组件的概念)。举个例子,你对人(Person)这个概念可以像下面这" -"样来建模: " +msgid "A component is a contained object that is persisted as a value type and not an entity reference. The term \"component\" refers to the object-oriented notion of composition and not to architecture-level components. For example, you can model a person like this:" +msgstr "组件(Component)是一个被包含的对象,在持久化的过程中,它被当作值类型,而并非一个实体的引用。在这篇文档中,组件这一术语指的是面向对象的合成概念(而并不是系统构架层次上的组件的概念)。举个例子,你对人(Person)这个概念可以像下面这样来建模: " #. Tag: para #, no-c-format -msgid "" -"Now Name can be persisted as a component of " -"Person. Name defines getter and setter " -"methods for its persistent properties, but it does not need to declare any " -"interfaces or identifier properties." -msgstr "" -"在持久化的过程中,姓名(Name)可以作为人" -"(Person)的一个组件。需要注意的是:你应该为姓名" -"的持久化属性定义 getter 和 setter 方法,但是你不需要实现任何的接口或申明标识" -"符字段。 " +msgid "Now Name can be persisted as a component of Person. Name defines getter and setter methods for its persistent properties, but it does not need to declare any interfaces or identifier properties." +msgstr "在持久化的过程中,姓名(Name)可以作为人(Person)的一个组件。需要注意的是:你应该为姓名的持久化属性定义 getter 和 setter 方法,但是你不需要实现任何的接口或申明标识符字段。 " #. Tag: para #, no-c-format @@ -66,54 +46,23 @@ msgstr "以下是这个例子的 Hibernate 映射文件: " #. Tag: para #, no-c-format -msgid "" -"The person table would have the columns pid, " -"birthday, initial, first and last." -msgstr "" -"人员(Person)表中将包括 pidbirthdayinitialfirst和 " -"last 等字段。" +msgid "The person table would have the columns pid, birthday, initial, first and last." +msgstr "人员(Person)表中将包括 pidbirthdayinitialfirstlast 等字段。" #. Tag: para #, no-c-format -msgid "" -"Like 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 objects that were only \"the same\" by " -"value. The null value semantics of a component are ad hoc. When reloading the containing object, Hibernate will assume that " -"if all component columns are null, then the entire component is null. This " -"is suitable for most purposes." -msgstr "" -"就像所有的值类型一样,组件不支持共享引用。换句话说,两个人可能重名,但是两个 " -"Person 对象应该包含两个独立的 Name 对象,只不过这两个 Name 对象具有“同样”的" -"值。组件的值可以为空,其定义如下。 每当 Hibernate 重新加载一个包含组件的对" -"象,如果该组件的所有字段为空,Hibernate 将假定整个组件为空。在大多数情况下," -"这样假定应该是没有问题的。" +msgid "Like 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 objects that were only \"the same\" by value. The null value semantics of a component are ad hoc. When reloading the containing object, Hibernate will assume that if all component columns are null, then the entire component is null. This is suitable for most purposes." +msgstr "就像所有的值类型一样,组件不支持共享引用。换句话说,两个人可能重名,但是两个 Person 对象应该包含两个独立的 Name 对象,只不过这两个 Name 对象具有“同样”的值。组件的值可以为空,其定义如下。 每当 Hibernate 重新加载一个包含组件的对象,如果该组件的所有字段为空,Hibernate 将假定整个组件为空。在大多数情况下,这样假定应该是没有问题的。" #. Tag: para #, no-c-format -msgid "" -"The properties of a component can be of any Hibernate type (collections, " -"many-to-one associations, other components, etc). Nested components should " -"not be considered an exotic usage. Hibernate is " -"intended to support a fine-grained object model." -msgstr "" -"组件的属性可以是任意一种 Hibernate 类型(包括集合,多对多关联,以及其它组件等" -"等)。嵌套组件不应该被当作一种特殊的应用(Nested components should not be " -"considered an exotic usage)。Hibernate 倾向于支持细颗粒度的(fine-grained)" -"对象模型。" +msgid "The properties of a component can be of any Hibernate type (collections, many-to-one associations, other components, etc). Nested components should not be considered an exotic usage. Hibernate is intended to support a fine-grained object model." +msgstr "组件的属性可以是任意一种 Hibernate 类型(包括集合,多对多关联,以及其它组件等等)。嵌套组件不应该被当作一种特殊的应用(Nested components should not be considered an exotic usage)。Hibernate 倾向于支持细颗粒度的(fine-grained)对象模型。" #. Tag: para #, no-c-format -msgid "" -"The <component> element allows a <" -"parent> subelement that maps a property of the component class " -"as a reference back to the containing entity." -msgstr "" -"<component> 元素允许加入一个 <parent>" -" 子元素,在组件类内部就可以有一个指向其容器的实体的反向引用。" +msgid "The <component> element allows a <parent> subelement that maps a property of the component class as a reference back to the containing entity." +msgstr "<component> 元素允许加入一个 <parent> 子元素,在组件类内部就可以有一个指向其容器的实体的反向引用。" #. Tag: title #, no-c-format @@ -121,94 +70,34 @@ msgid "Collections of dependent objects" msgstr "在集合中出现的依赖对象(Collections of dependent objects)" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"Collections of components are supported (e.g. an array of type " -"Name). Declare your component collection by replacing the " -"<element> tag with a <composite-" -"element> tag:" -msgstr "" -"Hibernate 支持组件的集合(例如:一个元素是姓名(Name)这种类型的数组)。你可" -"以使用 <composite-element> 标签替代 <" -"element> 标签来定义你的组件集合。" +#, no-c-format +msgid "Collections of components are supported (e.g. an array of type Name). Declare your component collection by replacing the <element> tag with a <composite-element> tag:" +msgstr "Hibernate 支持组件的集合(例如:一个元素是姓名 Name 这种类型的数组)。你可以使用 <composite-element> 标签替代 <element> 标签来定义你的组件集合。" #. Tag: para #, no-c-format -msgid "" -"If you define a Set of composite elements, it is " -"important to implement equals() and hashCode() correctly." -msgstr "" -"注意,如果你定义的 Set 包含组合元素(composite-element),正确地实现 " -"equals()hashCode() 是非常重要的。 " +msgid "If you define a Set of composite elements, it is important to implement equals() and hashCode() correctly." +msgstr "注意,如果你定义的 Set 包含组合元素(composite-element),正确地实现 equals()hashCode() 是非常重要的。 " #. Tag: para #, no-c-format -msgid "" -"Composite elements can contain components but not collections. If your " -"composite element contains components, use the <nested-composite-" -"element> tag. This case is a collection of components which " -"themselves have components. You may want to consider if a one-to-many " -"association is more appropriate. Remodel the composite element as an entity, " -"but be aware that even though the Java model is the same, the relational " -"model and persistence semantics are still slightly different." -msgstr "" -"组合元素可以包含组件,但是不能包含集合。如果你的组合元素自身包含组件,你必须" -"使用 <nested-composite-element> 标签。这是一个相当特" -"殊的案例 — 在一个组件的集合里,那些组件本身又可以包含其他的组件。这个时候你就" -"应该考虑一下使用 one-to-many 关联是否会更恰当。尝试对这个组合元素重新建模为一" -"个实体 — 但是需要注意的是,虽然 Java 模型和重新建模前是一样的,关系模型和持久" -"性语义会有细微的变化。 " +msgid "Composite elements can contain components but not collections. If your composite element contains components, use the <nested-composite-element> tag. This case is a collection of components which themselves have components. You may want to consider if a one-to-many association is more appropriate. Remodel the composite element as an entity, but be aware that even though the Java model is the same, the relational model and persistence semantics are still slightly different." +msgstr "组合元素可以包含组件,但是不能包含集合。如果你的组合元素自身包含组件,你必须使用 <nested-composite-element> 标签。这是一个相当特殊的案例 — 在一个组件的集合里,那些组件本身又可以包含其他的组件。这个时候你就应该考虑一下使用 one-to-many 关联是否会更恰当。尝试对这个组合元素重新建模为一个实体 — 但是需要注意的是,虽然 Java 模型和重新建模前是一样的,关系模型和持久性语义会有细微的变化。 " #. Tag: para #, no-c-format -msgid "" -"A composite element mapping does not support null-able properties if you are " -"using a <set>. There is no separate primary key " -"column in the composite element table. Hibernate uses each column's value to " -"identify a record when deleting objects, which is not possible with null " -"values. You have to either use only not-null properties in a composite-" -"element or choose a <list>, <map>, <bag> or <idbag>." -msgstr "" -"请注意如果你使用 <set> 标签,一个组合元素的映射不支" -"持可能为空的属性. 当删除对象时,Hibernate 必须使用每一个字段的值来确定一条记" -"录(在组合元素表中,没有单独的关键字段),如果有为 null 的字段,这样做就不可" -"能了。你必须作出一个选择,要么在组合元素中使用不能为空的属性,要么选择使用 " -"<list><map>," -"<bag> 或者 <idbag> 而不是 " -"<set>。 " +msgid "A composite element mapping does not support null-able properties if you are using a <set>. There is no separate primary key column in the composite element table. Hibernate uses each column's value to identify a record when deleting objects, which is not possible with null values. You have to either use only not-null properties in a composite-element or choose a <list>, <map>, <bag> or <idbag>." +msgstr "请注意如果你使用 <set> 标签,一个组合元素的映射不支持可能为空的属性. 当删除对象时,Hibernate 必须使用每一个字段的值来确定一条记录(在组合元素表中,没有单独的关键字段),如果有为 null 的字段,这样做就不可能了。你必须作出一个选择,要么在组合元素中使用不能为空的属性,要么选择使用 <list><map><bag> 或者 <idbag> 而不是 <set>。 " #. Tag: para #, no-c-format -msgid "" -"A special case of a composite element is a composite element with a nested " -"<many-to-one> element. This mapping 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 " -"Order to Item, where " -"purchaseDate, price and " -"quantity are properties of the association:" -msgstr "" -"组合元素有个特别的用法是它可以包含一个<many-to-one>" -"元素。类似这样的映射允许你将一个 many-to-many 关联表的额外字段映射为组合元素" -"类。接下来的的例子是从 OrderItem 的" -"一个多对多的关联关系,关联属性是 purchaseDate," -"pricequantity 。 " +msgid "A special case of a composite element is a composite element with a nested <many-to-one> element. This mapping 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 Order to Item, where purchaseDate, price and quantity are properties of the association:" +msgstr "组合元素有个特别的用法是它可以包含一个<many-to-one>元素。类似这样的映射允许你将一个 many-to-many 关联表的额外字段映射为组合元素类。接下来的的例子是从 OrderItem 的一个多对多的关联关系,关联属性是 purchaseDatepricequantity 。 " #. Tag: para #, no-c-format -msgid "" -"There cannot be a reference to the purchase on the other side for " -"bidirectional association navigation. Components are value types and do not " -"allow shared references. A single Purchase can be in the " -"set of an Order, but it cannot be referenced by the " -"Item at the same time." -msgstr "" -"当然,当你定义 Item 时,你无法引用这些 purchase,因此你无法实现双向关联查询。" -"记住组件是值类型,并且不允许共享引用。某一个特定的 Purchase 可以放在 Order 的集合中,但它不能同时被 " -"Item 所引用。 " +msgid "There cannot be a reference to the purchase on the other side for bidirectional association navigation. Components are value types and do not allow shared references. A single Purchase can be in the set of an Order, but it cannot be referenced by the Item at the same time." +msgstr "当然,当你定义 Item 时,你无法引用这些 purchase,因此你无法实现双向关联查询。记住组件是值类型,并且不允许共享引用。某一个特定的 Purchase 可以放在 Order 的集合中,但它不能同时被 Item 所引用。 " #. Tag: para #, no-c-format @@ -217,9 +106,7 @@ msgstr "其实组合元素的这个用法可以扩展到三重或多重关联:" #. Tag: para #, no-c-format -msgid "" -"Composite elements can appear in queries using the same syntax as " -"associations to other entities." +msgid "Composite elements can appear in queries using the same syntax as associations to other entities." msgstr "在查询中,表达组合元素的语法和关联到其他实体的语法是一样的。 " #. Tag: title @@ -229,15 +116,8 @@ msgstr "组件作为 Map 的索引(Components as Map indices )" #. Tag: para #, no-c-format -msgid "" -"The <composite-map-key> element allows you to map a " -"component class as the key of a Map. Ensure that you " -"override hashCode() and equals() " -"correctly on the component class." -msgstr "" -"<composite-map-key> 元素允许你映射一个组件类作为一" -"个 Map 的 key,前提是你必须正确的在这个类中重写了 " -"hashCode()equals() 方法。 " +msgid "The <composite-map-key> element allows you to map a component class as the key of a Map. Ensure that you override hashCode() and equals() correctly on the component class." +msgstr "<composite-map-key> 元素允许你映射一个组件类作为一个 Map 的 key,前提是你必须正确的在这个类中重写了 hashCode()equals() 方法。 " #. Tag: title #, no-c-format @@ -246,11 +126,8 @@ msgstr "组件作为联合标识符(Components as composite identifiers)" #. Tag: para #, no-c-format -msgid "" -"You can use a component as an identifier of an entity class. Your component " -"class must satisfy certain requirements:" -msgstr "" -"你可以使用一个组件作为一个实体类的标识符。你的组件类必须满足以下要求: " +msgid "You can use a component as an identifier of an entity class. Your component class must satisfy certain requirements:" +msgstr "你可以使用一个组件作为一个实体类的标识符。你的组件类必须满足以下要求: " #. Tag: para #, no-c-format @@ -259,12 +136,8 @@ msgstr "它必须实现 java.io.Serializable 接口" #. Tag: para #, no-c-format -msgid "" -"It must re-implement equals() and hashCode() consistently with the database's notion of composite key equality." -msgstr "" -"它必须重新实现 equals()hashCode() " -"方法,始终和组合关键字在数据库中的概念保持一致 " +msgid "It must re-implement equals() and hashCode() consistently with the database's notion of composite key equality." +msgstr "它必须重新实现 equals()hashCode() 方法,始终和组合关键字在数据库中的概念保持一致 " #. Tag: title #, no-c-format @@ -273,75 +146,38 @@ msgstr "注意" #. Tag: para #, no-c-format -msgid "" -"In Hibernate3, although the second requirement is not an absolutely hard " -"requirement of Hibernate, it is recommended." -msgstr "" -"注意:在 Hibernate3 中,第二个要求并非是 Hibernate 强制必须的。但最好这样" -"做。 " +msgid "In Hibernate3, although the second requirement is not an absolutely hard requirement of Hibernate, it is recommended." +msgstr "注意:在 Hibernate3 中,第二个要求并非是 Hibernate 强制必须的。但最好这样做。 " #. Tag: para #, no-c-format -msgid "" -"You cannot use an IdentifierGenerator to generate " -"composite keys. Instead the application must assign its own identifiers." -msgstr "" -"你不能使用一个 IdentifierGenerator 产生组合关键字。一个应" -"用程序必须分配它自己的标识符。 " +msgid "You cannot use an IdentifierGenerator to generate composite keys. Instead the application must assign its own identifiers." +msgstr "你不能使用一个 IdentifierGenerator 产生组合关键字。一个应用程序必须分配它自己的标识符。 " #. Tag: para #, no-c-format -msgid "" -"Use the <composite-id> tag, with nested " -"<key-property> elements, in place of the usual " -"<id> declaration. For example, the " -"OrderLine class has a primary key that depends upon the " -"(composite) primary key of Order." -msgstr "" -"使用 <composite-id> 标签(并且内嵌 <key-" -"property> 元素)代替通常的 <id> 标签。" -"比如,OrderLine 类具有一个主键,这个主键依赖于 " -"Order 的(联合)主键。 " +msgid "Use the <composite-id> tag, with nested <key-property> elements, in place of the usual <id> declaration. For example, the OrderLine class has a primary key that depends upon the (composite) primary key of Order." +msgstr "使用 <composite-id> 标签(并且内嵌 <key-property> 元素)代替通常的 <id> 标签。比如,OrderLine 类具有一个主键,这个主键依赖于 Order 的(联合)主键。 " #. Tag: para #, no-c-format -msgid "" -"Any foreign keys referencing the OrderLine table are now " -"composite. Declare this in your mappings for other classes. An association " -"to OrderLine is mapped like this:" -msgstr "" -"现在,任何指向 OrderLine 的外键都是复合的。在你的映射文件" -"中,必须为其他类也这样声明。例如,一个指向 OrderLine 的关" -"联可能被这样映射: " - -#. Tag: para -#, fuzzy, no-c-format -msgid "" -"The column element is an alternative to the " -"column attribute everywhere. Using the column element just gives more declaration options, which are mostly " -"useful when utilizing hbm2ddl" -msgstr "" -"(注意在各个地方 <column> 标签都是 column 属性的替代写法。) " +msgid "Any foreign keys referencing the OrderLine table are now composite. Declare this in your mappings for other classes. An association to OrderLine is mapped like this:" +msgstr "现在,任何指向 OrderLine 的外键都是复合的。在你的映射文件中,必须为其他类也这样声明。例如,一个指向 OrderLine 的关联可能被这样映射: " #. Tag: para #, no-c-format -msgid "" -"A many-to-many association to OrderLine also uses the composite foreign key:" -msgstr "" -"指向 OrderLine多对多关联也使用联合外" -"键:" +msgid "The column element is an alternative to the column attribute everywhere. Using the column element just gives more declaration options, which are mostly useful when utilizing hbm2ddl" +msgstr "注意在各个地方 column 标签都是 column 属性的替代写法。使用 column 元素只是给出一个更详细的选项,在使用 hbm2ddl 时会更有用。" #. Tag: para #, no-c-format -msgid "" -"The collection of OrderLines in Order " -"would use:" -msgstr "" -"在 Order 中,OrderLine 的集合则是这" -"样: " +msgid "A many-to-many association to OrderLine also uses the composite foreign key:" +msgstr "指向 OrderLine多对多关联也使用联合外键:" + +#. Tag: para +#, no-c-format +msgid "The collection of OrderLines in Order would use:" +msgstr "在 Order 中,OrderLine 的集合则是这样: " #. Tag: para #, no-c-format @@ -350,9 +186,7 @@ msgstr "与通常一样,<one-to-many> 元素不声明 #. Tag: para #, no-c-format -msgid "" -"If OrderLine itself owns a collection, it also has a " -"composite foreign key." +msgid "If OrderLine itself owns a collection, it also has a composite foreign key." msgstr "假若 OrderLine 本身拥有一个集合,它也具有组合外键。" #. Tag: title @@ -367,20 +201,8 @@ msgstr "你甚至可以映射 Map 类型的属性: " #. Tag: para #, no-c-format -msgid "" -"The semantics of a <dynamic-component> mapping are " -"identical to <component>. 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. " -"You can also access, and change, Hibernate's configuration-time metamodel " -"via the Configuration object." -msgstr "" -"从 <dynamic-component> 映射的语义上来讲,它和 " -"<component> 是相同的。这种映射类型的优点在于通过修改" -"映射文件,就可以具有在部署时检测真实属性的能力。利用一个 DOM 解析器,也可以在" -"程序运行时操作映射文件。更好的是,你可以通过 Configuration 对象来访问(或者修改)Hibernate 的运行时元模型。 " +msgid "The semantics of a <dynamic-component> mapping are identical to <component>. 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. You can also access, and change, Hibernate's configuration-time metamodel via the Configuration object." +msgstr "从 <dynamic-component> 映射的语义上来讲,它和 <component> 是相同的。这种映射类型的优点在于通过修改映射文件,就可以具有在部署时检测真实属性的能力。利用一个 DOM 解析器,也可以在程序运行时操作映射文件。更好的是,你可以通过 Configuration 对象来访问(或者修改)Hibernate 的运行时元模型。 " #~ msgid "" #~ "\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -21,19 +21,8 @@ msgstr "配置" #. Tag: para #, no-c-format -msgid "" -"Hibernate is designed to operate in many different environments and, as " -"such, there is a broad range of configuration parameters. Fortunately, most " -"have sensible default values and Hibernate is distributed with an example " -"hibernate.properties file in etc/ that " -"displays the various options. Simply put the example file in your classpath " -"and customize it to suit your needs." -msgstr "" -"由于 Hibernate 是为了能在各种不同环境下工作而设计的,因此存在着大量的配置参" -"数。幸运的是多数配置参数都有比较直观的默认值,并有随 Hibernate 一同分发的配置" -"样例 hibernate.properties(位于 etc/)" -"来展示各种配置选项。所需做的仅仅是将这个样例文件复制到类路径(classpath)下并" -"进行定制。" +msgid "Hibernate is designed to operate in many different environments and, as such, there is a broad range of configuration parameters. Fortunately, most have sensible default values and Hibernate is distributed with an example hibernate.properties file in etc/ that displays the various options. Simply put the example file in your classpath and customize it to suit your needs." +msgstr "由于 Hibernate 是为了能在各种不同环境下工作而设计的,因此存在着大量的配置参数。幸运的是多数配置参数都有比较直观的默认值,并有随 Hibernate 一同分发的配置样例 hibernate.properties(位于 etc/)来展示各种配置选项。所需做的仅仅是将这个样例文件复制到类路径(classpath)下并进行定制。" #. Tag: title #, no-c-format @@ -42,124 +31,63 @@ msgstr "可编程的配置方式" #. Tag: para #, no-c-format -msgid "" -"An instance of org.hibernate.cfg.Configuration " -"represents an entire set of mappings of an application's Java types to an " -"SQL database. The org.hibernate.cfg.Configuration is " -"used to build an immutable org.hibernate.SessionFactory. The mappings are compiled from various XML mapping files." -msgstr "" -"org.hibernate.cfg.Configuration 实例代表了一个应用程序中 " -"Java 类型到SQL数据库映射的完整集合。org.hibernate.cfg." -"Configuration 被用来构建一个(不可变的(immutable))" -"org.hibernate.SessionFactory。映射定义则由不同" -"的 XML 映射定义文件编译而来。" +msgid "An instance of org.hibernate.cfg.Configuration represents an entire set of mappings of an application's Java types to an SQL database. The org.hibernate.cfg.Configuration is used to build an immutable org.hibernate.SessionFactory. The mappings are compiled from various XML mapping files." +msgstr "org.hibernate.cfg.Configuration 实例代表了一个应用程序中 Java 类型到SQL数据库映射的完整集合。org.hibernate.cfg.Configuration 被用来构建一个(不可变的(immutable))org.hibernate.SessionFactory。映射定义则由不同的 XML 映射定义文件编译而来。" #. Tag: para #, no-c-format -msgid "" -"You can obtain a org.hibernate.cfg.Configuration " -"instance by instantiating it directly and specifying XML mapping documents. " -"If the mapping files are in the classpath, use addResource(). For example:" -msgstr "" -"你可以直接实例化 org.hibernate.cfg.Configuration 来获" -"取一个实例,并为它指定 XML 映射定义文件。如果映射定义文件在类路径" -"(classpath)中,请使用 addResource()。例如:" +msgid "You can obtain a org.hibernate.cfg.Configuration instance by instantiating it directly and specifying XML mapping documents. If the mapping files are in the classpath, use addResource(). For example:" +msgstr "你可以直接实例化 org.hibernate.cfg.Configuration 来获取一个实例,并为它指定 XML 映射定义文件。如果映射定义文件在类路径(classpath)中,请使用 addResource()。例如:" #. Tag: para #, no-c-format -msgid "" -"An alternative way is to specify the mapped class and allow Hibernate to " -"find the mapping document for you:" -msgstr "" -"一个替代方法(有时是更好的选择)是,指定被映射的类,让 Hibernate 帮你寻找映射" -"定义文件: " +msgid "An alternative way is to specify the mapped class and allow Hibernate to find the mapping document for you:" +msgstr "一个替代方法(有时是更好的选择)是,指定被映射的类,让 Hibernate 帮你寻找映射定义文件: " #. Tag: para #, no-c-format -msgid "" -"Hibernate will then search for mapping files named /org/hibernate/" -"auction/Item.hbm.xml and /org/hibernate/auction/Bid.hbm." -"xml in the classpath. This approach eliminates any hardcoded " -"filenames." -msgstr "" -"Hibernate 将会在类路径(classpath)中寻找名字为 /org/hibernate/" -"auction/Item.hbm.xml/org/hibernate/auction/Bid.hbm." -"xml 映射定义文件。这种方式消除了任何对文件名的硬编码" -"(hardcoded)。" +msgid "Hibernate will then search for mapping files named /org/hibernate/auction/Item.hbm.xml and /org/hibernate/auction/Bid.hbm.xml in the classpath. This approach eliminates any hardcoded filenames." +msgstr "Hibernate 将会在类路径(classpath)中寻找名字为 /org/hibernate/auction/Item.hbm.xml/org/hibernate/auction/Bid.hbm.xml 映射定义文件。这种方式消除了任何对文件名的硬编码(hardcoded)。" #. Tag: para #, no-c-format -msgid "" -"A org.hibernate.cfg.Configuration also allows you to " -"specify configuration properties. For example:" -msgstr "" -"org.hibernate.cfg.Configuration> 也允许你指定配置属" -"性。例如:" +msgid "A org.hibernate.cfg.Configuration also allows you to specify configuration properties. For example:" +msgstr "org.hibernate.cfg.Configuration> 也允许你指定配置属性。例如:" #. Tag: para #, no-c-format -msgid "" -"This is not the only way to pass configuration properties to Hibernate. Some " -"alternative options include:" +msgid "This is not the only way to pass configuration properties to Hibernate. Some alternative options include:" msgstr "当然这不是唯一的传递 Hibernate 配置属性的方式,其他可选方式还包括: " #. Tag: para #, no-c-format -msgid "" -"Pass an instance of java.util.Properties to " -"Configuration.setProperties()." -msgstr "" -"传一个 java.util.Properties 实例给 " -"Configuration.setProperties()。" +msgid "Pass an instance of java.util.Properties to Configuration.setProperties()." +msgstr "传一个 java.util.Properties 实例给 Configuration.setProperties()。" #. Tag: para #, no-c-format -msgid "" -"Place a file named hibernate.properties in a root " -"directory of the classpath." -msgstr "" -"将 hibernate.properties 放置在类路径(classpath)的根目" -"录下(root directory)。" +msgid "Place a file named hibernate.properties in a root directory of the classpath." +msgstr "将 hibernate.properties 放置在类路径(classpath)的根目录下(root directory)。" #. Tag: para #, no-c-format -msgid "" -"Set System properties using java -" -"Dproperty=value." -msgstr "" -"通过 java -Dproperty=value 来设置系统(System)属性。" +msgid "Set System properties using java -Dproperty=value." +msgstr "通过 java -Dproperty=value 来设置系统(System)属性。" #. Tag: para #, no-c-format -msgid "" -"Include <property> elements in hibernate." -"cfg.xml (this is discussed later)." -msgstr "" -"在 hibernate.cfg.xml 中加入元素 <property>" -"(稍后讨论)。 " +msgid "Include <property> elements in hibernate.cfg.xml (this is discussed later)." +msgstr "在 hibernate.cfg.xml 中加入元素 <property>(稍后讨论)。 " #. Tag: para #, no-c-format -msgid "" -"If you want to get started quicklyhibernate.properties " -"is the easiest approach." -msgstr "" -"如果你想快速上路,hibernate.properties 就是最容易的途" -"径。" +msgid "If you want to get started quicklyhibernate.properties is the easiest approach." +msgstr "如果你想快速上路,hibernate.properties 就是最容易的途径。" #. Tag: para #, no-c-format -msgid "" -"The org.hibernate.cfg.Configuration is intended as a " -"startup-time object that will be discarded once a SessionFactory is created." -msgstr "" -"org.hibernate.cfg.Configuration 实例被设计成启动期间" -"(startup-time)对象,一旦 SessionFactory 创建完成它就被丢" -"弃了。" +msgid "The org.hibernate.cfg.Configuration is intended as a startup-time object that will be discarded once a SessionFactory is created." +msgstr "org.hibernate.cfg.Configuration 实例被设计成启动期间(startup-time)对象,一旦 SessionFactory 创建完成它就被丢弃了。" #. Tag: title #, no-c-format @@ -167,26 +95,14 @@ msgid "Obtaining a SessionFactory" msgstr "获得 SessionFactory" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"When all mappings have been parsed by the org.hibernate.cfg." -"Configuration, the application must obtain a factory for " -"org.hibernate.Session instances. This factory " -"is intended to be shared by all application threads:" -msgstr "" -"当所有映射定义被 org.hibernate.cfg.Configuration 解析" -"后,应用程序必须获得一个用于构造 org.hibernate.Session 实例的工厂。这个工厂将被应用程序的所有线程共享: " +#, no-c-format +msgid "When all mappings have been parsed by the org.hibernate.cfg.Configuration, the application must obtain a factory for org.hibernate.Session instances. This factory is intended to be shared by all application threads:" +msgstr "当所有映射定义被 org.hibernate.cfg.Configuration 解析后,应用程序必须获得一个用于构造 org.hibernate.Session 实例的工厂。这个工厂将被应用程序的所有线程共享:" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"Hibernate does allow your application to instantiate more than one " -"org.hibernate.SessionFactory. This is useful " -"if you are using more than one database." -msgstr "" -"Hibernate 允许你的应用程序创建多个 org.hibernate." -"SessionFactory 实例。这对 使用多个数据库的应用来说很有用。 " +#, no-c-format +msgid "Hibernate does allow your application to instantiate more than one org.hibernate.SessionFactory. This is useful if you are using more than one database." +msgstr "Hibernate 允许你的应用程序创建多个 org.hibernate.SessionFactory 实例。这对 使用多个数据库的应用来说很有用。" #. Tag: title #, no-c-format @@ -195,46 +111,23 @@ msgstr "JDBC 连接" #. Tag: para #, no-c-format -msgid "" -"It is advisable to have the org.hibernate.SessionFactory create and pool JDBC connections for you. If you take this " -"approach, opening a org.hibernate.Session is " -"as simple as:" -msgstr "" -"通常你希望 org.hibernate.SessionFactory 来为" -"你创建和缓存(pool)JDBC 连接。如果你采用这种方式,只需要如下例所示那样,打开" -"一个 org.hibernate.Session:" +msgid "It is advisable to have the org.hibernate.SessionFactory create and pool JDBC connections for you. If you take this approach, opening a org.hibernate.Session is as simple as:" +msgstr "通常你希望 org.hibernate.SessionFactory 来为你创建和缓存(pool)JDBC 连接。如果你采用这种方式,只需要如下例所示那样,打开一个 org.hibernate.Session:" #. Tag: para #, no-c-format -msgid "" -"Once you start a task that requires access to the database, a JDBC " -"connection will be obtained from the pool." -msgstr "" -"一旦你需要进行数据访问时,就会从连接池(connection pool)获得一个 JDBC 连" -"接。 " +msgid "Once you start a task that requires access to the database, a JDBC connection will be obtained from the pool." +msgstr "一旦你需要进行数据访问时,就会从连接池(connection pool)获得一个 JDBC 连接。 " #. Tag: para #, no-c-format -msgid "" -"Before you can do this, you first need to pass some JDBC connection " -"properties to Hibernate. All Hibernate property names and semantics are " -"defined on the class org.hibernate.cfg.Environment. " -"The most important settings for JDBC connection configuration are outlined " -"below." -msgstr "" -"为了使这种方式工作起来,我们需要向 Hibernate 传递一些 JDBC 连接的属性。所有 " -"Hibernate 属性的名字和语义都在 org.hibernate.cfg.Environment 中定义。我们现在将描述 JDBC 连接配置中最重要的设置。" +msgid "Before you can do this, you first need to pass some JDBC connection properties to Hibernate. All Hibernate property names and semantics are defined on the class org.hibernate.cfg.Environment. The most important settings for JDBC connection configuration are outlined below." +msgstr "为了使这种方式工作起来,我们需要向 Hibernate 传递一些 JDBC 连接的属性。所有 Hibernate 属性的名字和语义都在 org.hibernate.cfg.Environment 中定义。我们现在将描述 JDBC 连接配置中最重要的设置。" #. Tag: para #, no-c-format -msgid "" -"Hibernate will obtain and pool connections using java.sql." -"DriverManager if you set the following properties:" -msgstr "" -"如果你设置如下属性,Hibernate 将使用 java.sql.DriverManager 来获得(和缓存)JDBC 连接:" +msgid "Hibernate will obtain and pool connections using java.sql.DriverManager if you set the following properties:" +msgstr "如果你设置如下属性,Hibernate 将使用 java.sql.DriverManager 来获得(和缓存)JDBC 连接:" #. Tag: title #, no-c-format @@ -303,57 +196,23 @@ msgstr "连接池容量上限数目" #. Tag: para #, no-c-format -msgid "" -"Hibernate's own connection pooling algorithm is, however, quite rudimentary. " -"It is intended to help you get started and is not intended for use " -"in a production system, or even for performance testing. You " -"should use a third party pool for best performance and stability. Just " -"replace the hibernate.connection.pool_size property " -"with connection pool specific settings. This will turn off Hibernate's " -"internal pool. For example, you might like to use c3p0." -msgstr "" -"但 Hibernate 自带的连接池算法相当不成熟。它只是为了让你快些上手,并" -"不适合用于产品系统或性能测试中。 出于最佳性能和稳定性考虑你应该使" -"用第三方的连接池。只需要用特定连接池的设置替换 hibernate.connection." -"pool_size 即可。这将关闭 Hibernate 自带的连接池。例如,你可能会想" -"用 C3P0。 " +msgid "Hibernate's own connection pooling algorithm is, however, quite rudimentary. It is intended to help you get started and is not intended for use in a production system, or even for performance testing. You should use a third party pool for best performance and stability. Just replace the hibernate.connection.pool_size property with connection pool specific settings. This will turn off Hibernate's internal pool. For example, you might like to use c3p0." +msgstr "但 Hibernate 自带的连接池算法相当不成熟。它只是为了让你快些上手,并不适合用于产品系统或性能测试中。 出于最佳性能和稳定性考虑你应该使用第三方的连接池。只需要用特定连接池的设置替换 hibernate.connection.pool_size 即可。这将关闭 Hibernate 自带的连接池。例如,你可能会想用 C3P0。 " #. Tag: para #, no-c-format -msgid "" -"C3P0 is an open source JDBC connection pool distributed along with Hibernate " -"in the lib directory. Hibernate will use its " -"org.hibernate.connection.C3P0ConnectionProvider for " -"connection pooling if you set hibernate.c3p0.* " -"properties. If you would like to use Proxool, refer to the packaged " -"hibernate.properties and the Hibernate web site for " -"more information." -msgstr "" -"C3P0 是一个随 Hibernate 一同分发的开源的 JDBC 连接池,它位于 lib目录下。 如果你设置了 hibernate.c3p0.* 相关的属" -"性,Hibernate将使用 C3P0ConnectionProvider 来缓存 JDBC 连" -"接。如果你更原意使用 Proxool,请参考发行包中的 hibernate." -"properties 并到 Hibernate 网站获取更多的信息。 " +msgid "C3P0 is an open source JDBC connection pool distributed along with Hibernate in the lib directory. Hibernate will use its org.hibernate.connection.C3P0ConnectionProvider for connection pooling if you set hibernate.c3p0.* properties. If you would like to use Proxool, refer to the packaged hibernate.properties and the Hibernate web site for more information." +msgstr "C3P0 是一个随 Hibernate 一同分发的开源的 JDBC 连接池,它位于 lib目录下。 如果你设置了 hibernate.c3p0.* 相关的属性,Hibernate将使用 C3P0ConnectionProvider 来缓存 JDBC 连接。如果你更原意使用 Proxool,请参考发行包中的 hibernate.properties 并到 Hibernate 网站获取更多的信息。 " #. Tag: para #, no-c-format -msgid "" -"The following is an example hibernate.properties file " -"for c3p0:" -msgstr "" -"这是一个使用 C3P0 的 hibernate.properties 样例文件: " +msgid "The following is an example hibernate.properties file for c3p0:" +msgstr "这是一个使用 C3P0 的 hibernate.properties 样例文件: " #. Tag: para #, no-c-format -msgid "" -"For use inside an application server, you should almost always configure " -"Hibernate to obtain connections from an application server " -"javax.sql.Datasource registered in JNDI. You " -"will need to set at least one of the following properties:" -msgstr "" -"为了能在应用程序服务器(application server)中使用 Hibernate,应当总是将 " -"Hibernate 配置成从注册在 JNDI 中的 Datasource 处获得连接," -"你至少需要设置下列属性中的一个: " +msgid "For use inside an application server, you should almost always configure Hibernate to obtain connections from an application server javax.sql.Datasource registered in JNDI. You will need to set at least one of the following properties:" +msgstr "为了能在应用程序服务器(application server)中使用 Hibernate,应当总是将 Hibernate 配置成从注册在 JNDI 中的 Datasource 处获得连接,你至少需要设置下列属性中的一个: " #. Tag: title #, no-c-format @@ -387,11 +246,8 @@ msgstr "hibernate.jndi.class" #. Tag: entry #, no-c-format -msgid "" -"class of the JNDI InitialContextFactory (optional)" -msgstr "" -"JNDI InitialContextFactory(可选)" +msgid "class of the JNDI InitialContextFactory (optional)" +msgstr "JNDI InitialContextFactory(可选)" #. Tag: entry #, no-c-format @@ -405,46 +261,23 @@ msgstr "数据库密码(可选)" #. Tag: para #, no-c-format -msgid "" -"Here is an example hibernate.properties file for an " -"application server provided JNDI datasource:" -msgstr "" -"这是一个使用应用程序服务器提供的 JNDI 数据源的 hibernate." -"properties 样例文件: " +msgid "Here is an example hibernate.properties file for an application server provided JNDI datasource:" +msgstr "这是一个使用应用程序服务器提供的 JNDI 数据源的 hibernate.properties 样例文件: " #. Tag: para #, 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)中去。" +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)中去。" #. Tag: para #, no-c-format -msgid "" -"Arbitrary connection properties can be given by prepending " -"\"hibernate.connection\" to the connection property name. " -"For example, you can specify a charSet connection " -"property using hibernate.connection.charSet." -msgstr "" -"任何连接(connection)属性的属性名都要以 \"hibernate.connnection\" 开头。例如,你可能会使用 hibernate.connection.charSet 来指定 charSet 连接属性。 " +msgid "Arbitrary connection properties can be given by prepending \"hibernate.connection\" to the connection property name. For example, you can specify a charSet connection property using hibernate.connection.charSet." +msgstr "任何连接(connection)属性的属性名都要以 \"hibernate.connnection\" 开头。例如,你可能会使用 hibernate.connection.charSet 来指定 charSet 连接属性。 " #. Tag: para #, no-c-format -msgid "" -"You can define your own plugin strategy for obtaining JDBC connections by " -"implementing the interface org.hibernate.connection." -"ConnectionProvider, and specifying your custom " -"implementation via the hibernate.connection.provider_class property." -msgstr "" -"通过实现 org.hibernate.connection.ConnectionProvider 接" -"口,你可以定义属于你自己的获得JDBC连接的插件策略。通过设置hibernate." -"connection.provider_class,你可以选择一个自定义的实现。 " +msgid "You can define your own plugin strategy for obtaining JDBC connections by implementing the interface org.hibernate.connection.ConnectionProvider, and specifying your custom implementation via the hibernate.connection.provider_class property." +msgstr "通过实现 org.hibernate.connection.ConnectionProvider 接口,你可以定义属于你自己的获得JDBC连接的插件策略。通过设置hibernate.connection.provider_class,你可以选择一个自定义的实现。 " #. Tag: title #, no-c-format @@ -453,24 +286,13 @@ msgstr "可选的配置属性" #. Tag: para #, no-c-format -msgid "" -"There are a number of other properties that control the behavior of " -"Hibernate at runtime. All are optional and have reasonable default values." -msgstr "" -"有大量属性能用来控制 Hibernate 在运行期的行为。它们都是可选的,并拥有适当的默" -"认值。 " +msgid "There are a number of other properties that control the behavior of Hibernate at runtime. All are optional and have reasonable default values." +msgstr "有大量属性能用来控制 Hibernate 在运行期的行为。它们都是可选的,并拥有适当的默认值。 " #. Tag: para -#, fuzzy, no-c-format -msgid "" -"Some of these properties are \"system-level\" only. " -"System-level properties can be set only via java -Dproperty=value or hibernate.properties. They " -"cannot be set by the other techniques described above." -msgstr "" -"警告: 其中一些属性是\"系统级(system-level)的\"。系统级属性只能通过" -"java -Dproperty=valuehibernate.properties 来设置,而不能用上面描述的其他方法来设置。 " +#, no-c-format +msgid "Some of these properties are \"system-level\" only. System-level properties can be set only via java -Dproperty=value or hibernate.properties. They cannot be set by the other techniques described above." +msgstr "其中一些属性是\"系统级(system-level)的\"。系统级属性只能通过java -Dproperty=valuehibernate.properties 来设置,而不能用上面描述的其他方法来设置。" #. Tag: title #, no-c-format @@ -484,33 +306,18 @@ msgstr "hibernate.dialect" #. Tag: entry #, no-c-format -msgid "" -"The classname of a Hibernate org.hibernate.dialect.Dialect which allows Hibernate to generate SQL optimized for a particular " -"relational database." -msgstr "" -"允许 Hibernate 针对特定的关系数据库生成优化的 SQL 的 org." -"hibernate.dialect.Dialect 的类名。" +msgid "The classname of a Hibernate org.hibernate.dialect.Dialect which allows Hibernate to generate SQL optimized for a particular relational database." +msgstr "允许 Hibernate 针对特定的关系数据库生成优化的 SQL 的 org.hibernate.dialect.Dialect 的类名。" #. Tag: para #, no-c-format -msgid "" -"e.g. full.classname.of." -"Dialect" -msgstr "" -"例如:full.classname.of." -"Dialect " +msgid "e.g. full.classname.of.Dialect" +msgstr "例如:full.classname.of.Dialect " #. Tag: para #, no-c-format -msgid "" -"In most cases Hibernate will actually be able to choose the correct " -"org.hibernate.dialect.Dialect implementation based on " -"the JDBC metadata returned by the JDBC driver." -msgstr "" -"在大多数情况下,Hibernate 可以根据 JDBC 驱动返回的 JDBC metadata 选择正确的 org.hibernate.dialect.Dialect 实" -"现。" +msgid "In most cases Hibernate will actually be able to choose the correct org.hibernate.dialect.Dialect implementation based on the JDBC metadata returned by the JDBC driver." +msgstr "在大多数情况下,Hibernate 可以根据 JDBC 驱动返回的 JDBC metadata 选择正确的 org.hibernate.dialect.Dialect 实现。" #. Tag: entry #, no-c-format @@ -519,22 +326,13 @@ msgstr "hibernate.show_sql" #. Tag: entry #, no-c-format -msgid "" -"Write all SQL statements to console. This is an alternative to setting the " -"log category org.hibernate.SQL to debug." -msgstr "" -"输出所有 SQL 语句到控制台。有一个另外的选择是把 org.hibernate.SQL 这个 log category设为 debug。" +msgid "Write all SQL statements to console. This is an alternative to setting the log category org.hibernate.SQL to debug." +msgstr "输出所有 SQL 语句到控制台。有一个另外的选择是把 org.hibernate.SQL 这个 log category设为 debug。" #. Tag: para #, no-c-format -msgid "" -"e.g. true | " -"false" -msgstr "" -"例如:true | " -"false " +msgid "e.g. true | false" +msgstr "例如:true | false " #. Tag: entry #, no-c-format @@ -553,18 +351,13 @@ msgstr "hibernate.default_schema" #. Tag: entry #, no-c-format -msgid "" -"Qualify unqualified table names with the given schema/tablespace in " -"generated SQL." -msgstr "" -"在生成的 SQL 中,将给定的 schema/tablespace 附加于非全限定名的表名上。 " +msgid "Qualify unqualified table names with the given schema/tablespace in generated SQL." +msgstr "在生成的 SQL 中,将给定的 schema/tablespace 附加于非全限定名的表名上。 " #. Tag: para #, no-c-format -msgid "" -"e.g. SCHEMA_NAME" -msgstr "" -"例如:SCHEMA_NAME " +msgid "e.g. SCHEMA_NAME" +msgstr "例如:SCHEMA_NAME " #. Tag: entry #, no-c-format @@ -573,16 +366,13 @@ msgstr "hibernate.default_catalog" #. Tag: entry #, no-c-format -msgid "" -"Qualifies unqualified table names with the given catalog in generated SQL." +msgid "Qualifies unqualified table names with the given catalog in generated SQL." msgstr "在生成的 SQL 中,将给定的 catalog 附加于非全限定名的表名上。 " #. Tag: para #, no-c-format -msgid "" -"e.g. CATALOG_NAME" -msgstr "" -"例如:CATALOG_NAME " +msgid "e.g. CATALOG_NAME" +msgstr "例如:CATALOG_NAME " #. Tag: entry #, no-c-format @@ -591,21 +381,13 @@ msgstr "hibernate.session_factory_name" #. Tag: entry #, no-c-format -msgid "" -"The org.hibernate.SessionFactory will be " -"automatically bound to this name in JNDI after it has been created." -msgstr "" -"org.hibernate.SessionFactory 创建后,将自动使" -"用这个名字绑定到 JNDI 中。" +msgid "The org.hibernate.SessionFactory will be automatically bound to this name in JNDI after it has been created." +msgstr "org.hibernate.SessionFactory 创建后,将自动使用这个名字绑定到 JNDI 中。" #. Tag: para #, no-c-format -msgid "" -"e.g. jndi/composite/name" -msgstr "" -"例如:jndi/composite/name " +msgid "e.g. jndi/composite/name" +msgstr "例如:jndi/composite/name " #. Tag: entry #, no-c-format @@ -614,22 +396,13 @@ msgstr "hibernate.max_fetch_depth" #. Tag: entry #, no-c-format -msgid "" -"Sets a maximum \"depth\" for the outer join fetch tree for single-ended " -"associations (one-to-one, many-to-one). A 0 disables " -"default outer join fetching." -msgstr "" -"为单向关联(一对一,多对一)的外连接抓取(outer join fetch)树设置最大深度。" -"值为 0 意味着将关闭默认的外连接抓取。 " +msgid "Sets a maximum \"depth\" for the outer join fetch tree for single-ended associations (one-to-one, many-to-one). A 0 disables default outer join fetching." +msgstr "为单向关联(一对一,多对一)的外连接抓取(outer join fetch)树设置最大深度。值为 0 意味着将关闭默认的外连接抓取。 " #. Tag: para #, no-c-format -msgid "" -"e.g. recommended values between " -"0 and 3" -msgstr "" -"例如: 建议在 0 到 " -"3 之间取值 " +msgid "e.g. recommended values between 0 and 3" +msgstr "例如: 建议在 03 之间取值 " #. Tag: entry #, no-c-format @@ -643,12 +416,8 @@ msgstr "为 Hibernate 关联的批量抓取设置默认数量。 " #. Tag: para #, no-c-format -msgid "" -"e.g. recommended values 4, 8, 16" -msgstr "" -"例如:建议的取值为 48,和 16 " +msgid "e.g. recommended values 4, 8, 16" +msgstr "例如:建议的取值为 48,和 16 " #. Tag: entry #, no-c-format @@ -656,22 +425,14 @@ msgid "hibernate.default_entity_mode" msgstr "hibernate.default_entity_mode" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"Sets a default mode for entity representation for all sessions opened from " -"this SessionFactory" -msgstr "" -"为由这个 SessionFactory 打开的所有 Session 指定默认的实体" -"表现模式。 " +#, no-c-format +msgid "Sets a default mode for entity representation for all sessions opened from this SessionFactory" +msgstr "为由这个 SessionFactory 打开的所有 Session 指定默认的实体表现模式。 " #. Tag: para #, no-c-format -msgid "" -"dynamic-map, dom4j, pojo" -msgstr "" -"取值dynamic-map," -"dom4jpojo" +msgid "dynamic-map, dom4j, pojo" +msgstr "取值dynamic-mapdom4jpojo" #. Tag: entry #, no-c-format @@ -680,13 +441,8 @@ msgstr "hibernate.order_updates" #. Tag: entry #, no-c-format -msgid "" -"Forces 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 更新排序。这么做将减少在高并发系" -"统中事务的死锁。" +msgid "Forces 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 更新排序。这么做将减少在高并发系统中事务的死锁。" #. Tag: entry #, no-c-format @@ -695,8 +451,7 @@ msgstr "hibernate.generate_statistics" #. Tag: entry #, no-c-format -msgid "" -"If enabled, Hibernate will collect statistics useful for performance tuning." +msgid "If enabled, Hibernate will collect statistics useful for performance tuning." msgstr "如果开启,Hibernate 将收集有助于性能调节的统计数据。" #. Tag: entry @@ -706,9 +461,7 @@ msgstr "hibernate.use_identifier_rollback" #. Tag: entry #, no-c-format -msgid "" -"If enabled, generated identifier properties will be reset to default values " -"when objects are deleted." +msgid "If enabled, generated identifier properties will be reset to default values when objects are deleted." msgstr "如果开启,在对象被删除时生成的标识属性将被重设为默认值。" #. Tag: entry @@ -718,12 +471,8 @@ msgstr "hibernate.use_sql_comments" #. Tag: entry #, no-c-format -msgid "" -"If turned on, Hibernate will generate comments inside the SQL, for easier " -"debugging, defaults to false." -msgstr "" -"如果开启,Hibernate 将在 SQL 中生成有助于调试的注释信息,默认值为 " -"false。" +msgid "If turned on, Hibernate will generate comments inside the SQL, for easier debugging, defaults to false." +msgstr "如果开启,Hibernate 将在 SQL 中生成有助于调试的注释信息,默认值为 false。" #. Tag: title #, no-c-format @@ -737,12 +486,8 @@ msgstr "hibernate.jdbc.fetch_size" #. Tag: entry #, no-c-format -msgid "" -"A non-zero value determines the JDBC fetch size (calls Statement." -"setFetchSize())." -msgstr "" -"非零值,指定 JDBC 抓取数量的大小(调用 Statement.setFetchSize())。" +msgid "A non-zero value determines the JDBC fetch size (calls Statement.setFetchSize())." +msgstr "非零值,指定 JDBC 抓取数量的大小(调用 Statement.setFetchSize())。" #. Tag: entry #, no-c-format @@ -756,12 +501,8 @@ msgstr "非零值,允许 Hibernate 使用 JDBC2 的批量更新。" #. Tag: para #, no-c-format -msgid "" -"e.g. recommended values between " -"5 and 30" -msgstr "" -"例如:建议取 5 到 " -"30 之间的值 " +msgid "e.g. recommended values between 5 and 30" +msgstr "例如:建议取 530 之间的值 " #. Tag: entry #, no-c-format @@ -770,16 +511,8 @@ msgstr "hibernate.jdbc.batch_versioned_data" #. Tag: entry #, no-c-format -msgid "" -"Set this property to true if your JDBC driver returns " -"correct row counts from executeBatch(). Iit is usually " -"safe to turn this option on. Hibernate will then use batched DML for " -"automatically versioned data. Defaults to false." -msgstr "" -"如果你想让你的 JDBC 驱动从 true 返回正确的行计数 ,那么将" -"此属性设为 executeBatch()(开启这个选项通常是安全的)。同" -"时,Hibernate 将为自动版本化的数据使用批量 DML。默认值为 false。 " +msgid "Set this property to true if your JDBC driver returns correct row counts from executeBatch(). Iit is usually safe to turn this option on. Hibernate will then use batched DML for automatically versioned data. Defaults to false." +msgstr "如果你想让你的 JDBC 驱动从 true 返回正确的行计数 ,那么将此属性设为 executeBatch()(开启这个选项通常是安全的)。同时,Hibernate 将为自动版本化的数据使用批量 DML。默认值为 false。 " #. Tag: entry #, no-c-format @@ -788,21 +521,13 @@ msgstr "hibernate.jdbc.factory_class" #. Tag: entry #, no-c-format -msgid "" -"Select a custom org.hibernate.jdbc.Batcher. " -"Most applications will not need this configuration property." -msgstr "" -"选择一个自定义的 Batcher。多数应用程序不需要这个配置属" -"性。 " +msgid "Select a custom org.hibernate.jdbc.Batcher. Most applications will not need this configuration property." +msgstr "选择一个自定义的 Batcher。多数应用程序不需要这个配置属性。 " #. Tag: para #, no-c-format -msgid "" -"e.g. classname.of." -"BatcherFactory" -msgstr "" -"例如:classname.of.Batcher " +msgid "e.g. classname.of.BatcherFactory" +msgstr "例如:classname.of.Batcher " #. Tag: entry #, no-c-format @@ -811,13 +536,8 @@ msgstr "hibernate.jdbc.use_scrollable_resultset" #. Tag: entry #, 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 会使用连接的元数据。 " +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 会使用连接的元数据。 " #. Tag: entry #, no-c-format @@ -826,13 +546,8 @@ msgstr "hibernate.jdbc.use_streams_for_binary" #. Tag: entry #, no-c-format -msgid "" -"Use streams when writing/reading binary or " -"serializable types to/from JDBC. *system-level " -"property*" -msgstr "" -"在 JDBC 读写 binaryserializable 的" -"类型时使用流(stream)(系统级属性)。 " +msgid "Use streams when writing/reading binary or serializable types to/from JDBC. *system-level property*" +msgstr "在 JDBC 读写 binaryserializable 的类型时使用流(stream)(系统级属性)。 " #. Tag: entry #, no-c-format @@ -841,23 +556,13 @@ msgstr "hibernate.jdbc.use_get_generated_keys" #. Tag: entry #, no-c-format -msgid "" -"Enables use of JDBC3 PreparedStatement.getGeneratedKeys() " -"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, it tries to determine the driver " -"capabilities using connection metadata." -msgstr "" -"在数据插入数据库之后,允许使用 JDBC3 PreparedStatement." -"getGeneratedKeys() 来获取数据库生成的 key(键)。需要 JDBC3+ 驱动" -"和 JRE1.4+,如果你的数据库驱动在使用 Hibernate 的标识生成器时遇到问题,请将此" -"值设为 false。默认情况下将使用连接的元数据来判定驱动的能力。 " +msgid "Enables use of JDBC3 PreparedStatement.getGeneratedKeys() 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, it tries to determine the driver capabilities using connection metadata." +msgstr "在数据插入数据库之后,允许使用 JDBC3 PreparedStatement.getGeneratedKeys() 来获取数据库生成的 key(键)。需要 JDBC3+ 驱动和 JRE1.4+,如果你的数据库驱动在使用 Hibernate 的标识生成器时遇到问题,请将此值设为 false。默认情况下将使用连接的元数据来判定驱动的能力。 " #. Tag: para #, no-c-format msgid "e.g. true|false" -msgstr "" -"例如:true | false " +msgstr "例如:true | false " #. Tag: entry #, no-c-format @@ -866,22 +571,13 @@ msgstr "hibernate.connection.provider_class" #. Tag: entry #, no-c-format -msgid "" -"The classname of a custom org.hibernate.connection." -"ConnectionProvider which provides JDBC connections to " -"Hibernate." -msgstr "" -"自定义 ConnectionProvider 的类名,此类用来向 Hibernate 提" -"供 JDBC 连接。 " +msgid "The classname of a custom org.hibernate.connection.ConnectionProvider which provides JDBC connections to Hibernate." +msgstr "自定义 ConnectionProvider 的类名,此类用来向 Hibernate 提供 JDBC 连接。 " #. Tag: para #, no-c-format -msgid "" -"e.g. classname.of." -"ConnectionProvider" -msgstr "" -"例如:classname.of." -"ConnectionProvider " +msgid "e.g. classname.of.ConnectionProvider" +msgstr "例如:classname.of.ConnectionProvider " #. Tag: entry #, no-c-format @@ -890,20 +586,13 @@ msgstr "hibernate.connection.isolation" #. Tag: entry #, no-c-format -msgid "" -"Sets the JDBC transaction isolation level. Check java.sql." -"Connection for meaningful values, but note that most " -"databases do not support all isolation levels and some define additional, " -"non-standard isolations." -msgstr "" -"设置 JDBC 事务隔离级别。查看 java.sql.Connection 来了解各" -"个值的具体意义,但请注意多数数据库都不支持所有的隔离级别。 " +msgid "Sets the JDBC transaction isolation level. Check java.sql.Connection for meaningful values, but note that most databases do not support all isolation levels and some define additional, non-standard isolations." +msgstr "设置 JDBC 事务隔离级别。查看 java.sql.Connection 来了解各个值的具体意义,但请注意多数数据库都不支持所有的隔离级别。 " #. Tag: para #, no-c-format msgid "e.g. 1, 2, 4, 8" -msgstr "" -"例如:1, 2, 4, 8 " +msgstr "例如:1, 2, 4, 8 " #. Tag: entry #, no-c-format @@ -922,87 +611,38 @@ msgstr "hibernate.connection.release_mode" #. Tag: entry #, no-c-format -msgid "" -"Specifies 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, use after_statement 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 after_transaction. " -"auto will choose after_statement for " -"the JTA and CMT transaction strategies and after_transaction for the JDBC transaction strategy." -msgstr "" -"指定 Hibernate 在何时释放 JDBC 连接。默认情况下,直到 Session 被显式关闭或被断" -"开连接时,才会释放 JDBC 连接。对于应用程序服务器的 JTA 数据源,你应当使用 " -"after_statement,这样在每次 JDBC 调用后,都会主动的释放连" -"接。对于非 JTA 的连接,使用 after_transaction 在每个事务结" -"束时释放连接是合理的。auto 将为 JTA 和 CMT 事务策略选择 " -"after_statement,为JDBC事务策略选择 " -"after_transaction。" +msgid "Specifies 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, use after_statement 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 after_transaction. auto will choose after_statement for the JTA and CMT transaction strategies and after_transaction for the JDBC transaction strategy." +msgstr "指定 Hibernate 在何时释放 JDBC 连接。默认情况下,直到 Session 被显式关闭或被断开连接时,才会释放 JDBC 连接。对于应用程序服务器的 JTA 数据源,你应当使用 after_statement,这样在每次 JDBC 调用后,都会主动的释放连接。对于非 JTA 的连接,使用 after_transaction 在每个事务结束时释放连接是合理的。auto 将为 JTA 和 CMT 事务策略选择 after_statement,为JDBC事务策略选择 after_transaction。" #. Tag: para #, no-c-format -msgid "" -"e.g. auto (default) " -"| on_close | after_transaction | " -"after_statement" -msgstr "" -"例如:auto (默认) | " -"on_close | after_transaction | " -"after_statement " +msgid "e.g. auto (default) | on_close | after_transaction | after_statement" +msgstr "例如:auto (默认) | on_close | after_transaction | after_statement " #. Tag: para #, no-c-format -msgid "" -"This setting only affects Sessions returned from " -"SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation " -"configured for use controls the connection release mode for those " -"Sessions. See " -msgstr "" -"注意,这些设置仅对通过 SessionFactory.openSession 得到的 " -"Session 起作用。对于通过 SessionFactory." -"getCurrentSession 得到的 Session,所配置的 " -"CurrentSessionContext 实现控制这些 Session 的连接释放模式。请参阅 。" +msgid "This setting only affects Sessions returned from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation configured for use controls the connection release mode for those Sessions. See " +msgstr "注意,这些设置仅对通过 SessionFactory.openSession 得到的 Session 起作用。对于通过 SessionFactory.getCurrentSession 得到的 Session,所配置的 CurrentSessionContext 实现控制这些 Session 的连接释放模式。请参阅 。" #. Tag: entry #, no-c-format -msgid "" -"hibernate.connection.<propertyName>" -msgstr "" -"hibernate.connection.<propertyName>" +msgid "hibernate.connection.<propertyName>" +msgstr "hibernate.connection.<propertyName>" #. Tag: entry #, no-c-format -msgid "" -"Pass the JDBC property <propertyName> to " -"DriverManager.getConnection()." -msgstr "" -"把 JDBC 属性 <propertyName> 传递给 " -"DriverManager.getConnection()。" +msgid "Pass the JDBC property <propertyName> to DriverManager.getConnection()." +msgstr "把 JDBC 属性 <propertyName> 传递给 DriverManager.getConnection()。" #. Tag: entry #, no-c-format -msgid "" -"hibernate.jndi.<propertyName>" -msgstr "" -"hibernate.jndi.<propertyName>" +msgid "hibernate.jndi.<propertyName>" +msgstr "hibernate.jndi.<propertyName>" #. Tag: entry #, no-c-format -msgid "" -"Pass the property <propertyName> to the JNDI " -"InitialContextFactory." -msgstr "" -"把 <propertyName> 属性传递给 JNDI " -"InitialContextFactory。" +msgid "Pass the property <propertyName> to the JNDI InitialContextFactory." +msgstr "把 <propertyName> 属性传递给 JNDI InitialContextFactory。" #. Tag: title #, no-c-format @@ -1021,12 +661,8 @@ msgstr "自定义的 CacheProvider 的类名。" #. Tag: para #, no-c-format -msgid "" -"e.g. classname.of." -"CacheProvider" -msgstr "" -"例如:classname.of." -"CacheProvider " +msgid "e.g. classname.of.CacheProvider" +msgstr "例如:classname.of.CacheProvider " #. Tag: entry #, no-c-format @@ -1035,13 +671,8 @@ msgstr "hibernate.cache.use_minimal_puts" #. Tag: entry #, no-c-format -msgid "" -"Optimizes 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 中,这个设置" -"对的集群缓存非常有用,对集群缓存的实现而言,默认是开启的。 " +msgid "Optimizes 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 中,这个设置对的集群缓存非常有用,对集群缓存的实现而言,默认是开启的。 " #. Tag: entry #, no-c-format @@ -1050,8 +681,7 @@ msgstr "hibernate.cache.use_query_cache" #. Tag: entry #, no-c-format -msgid "" -"Enables the query cache. Individual queries still have to be set cachable." +msgid "Enables the query cache. Individual queries still have to be set cachable." msgstr "允许查询缓存,个别查询仍然需要被设置为可缓存的。 " #. Tag: entry @@ -1061,13 +691,8 @@ msgstr "hibernate.cache.use_second_level_cache" #. Tag: entry #, no-c-format -msgid "" -"Can be used to completely disable the second level cache, which is enabled " -"by default for classes which specify a <cache> " -"mapping." -msgstr "" -"能用来完全禁止使用二级缓存。对那些在类的映射定义中指定 <cache>" -" 的类,会默认开启二级缓存。 " +msgid "Can be used to completely disable the second level cache, which is enabled by default for classes which specify a <cache> mapping." +msgstr "能用来完全禁止使用二级缓存。对那些在类的映射定义中指定 <cache> 的类,会默认开启二级缓存。 " #. Tag: entry #, no-c-format @@ -1076,21 +701,13 @@ msgstr "hibernate.cache.query_cache_factory" #. Tag: entry #, no-c-format -msgid "" -"The classname of a custom QueryCache interface, defaults " -"to the built-in StandardQueryCache." -msgstr "" -"自定义实现 QueryCache 接口的类名,默认为内建的 " -"StandardQueryCache。" +msgid "The classname of a custom QueryCache interface, defaults to the built-in StandardQueryCache." +msgstr "自定义实现 QueryCache 接口的类名,默认为内建的 StandardQueryCache。" #. Tag: para #, no-c-format -msgid "" -"e.g. classname.of.QueryCache" -msgstr "" -"例如:classname.of.QueryCache " +msgid "e.g. classname.of.QueryCache" +msgstr "例如:classname.of.QueryCache " #. Tag: entry #, no-c-format @@ -1114,9 +731,7 @@ msgstr "hibernate.cache.use_structured_entries" #. Tag: entry #, no-c-format -msgid "" -"Forces Hibernate to store data in the second-level cache in a more human-" -"friendly format." +msgid "Forces Hibernate to store data in the second-level cache in a more human-friendly format." msgstr "强制 Hibernate 以更人性化的格式将数据存入二级缓存。" #. Tag: title @@ -1131,23 +746,13 @@ msgstr "hibernate.transaction.factory_class" #. Tag: entry #, no-c-format -msgid "" -"The classname of a TransactionFactory to use with " -"Hibernate Transaction API (defaults to " -"JDBCTransactionFactory)." -msgstr "" -"一个 TransactionFactory 的类名,用于 Hibernate " -"Transaction API(默认为 JDBCTransactionFactory)。" +msgid "The classname of a TransactionFactory to use with Hibernate Transaction API (defaults to JDBCTransactionFactory)." +msgstr "一个 TransactionFactory 的类名,用于 Hibernate Transaction API(默认为 JDBCTransactionFactory)。" #. Tag: para #, no-c-format -msgid "" -"e.g. classname.of." -"TransactionFactory" -msgstr "" -"例如:classname.of." -"TransactionFactory " +msgid "e.g. classname.of.TransactionFactory" +msgstr "例如:classname.of.TransactionFactory " #. Tag: entry #, no-c-format @@ -1156,70 +761,43 @@ msgstr "jta.UserTransaction" #. Tag: entry #, no-c-format -msgid "" -"A JNDI name used by JTATransactionFactory to obtain the " -"JTA UserTransaction from the application server." -msgstr "" -"一个 JNDI 名字,被 JTATransactionFactory 用来从应用服务器" -"获取 JTA UserTransaction。" - -#. Tag: entry -#, fuzzy, no-c-format -msgid "hibernate.transaction.manager_lookup_class" -msgstr "hibernate.transaction. manager_lookup_class" +msgid "A JNDI name used by JTATransactionFactory to obtain the JTA UserTransaction from the application server." +msgstr "一个 JNDI 名字,被 JTATransactionFactory 用来从应用服务器获取 JTA UserTransaction。" #. Tag: entry #, no-c-format -msgid "" -"The classname of a TransactionManagerLookup. It is " -"required when JVM-level caching is enabled or when using hilo generator in a " -"JTA environment." -msgstr "" -"一个 TransactionManagerLookup 的类名 — 当使用 JVM 级缓存," -"或在 JTA 环境中使用 hilo 生成器的时候需要该类。 " +msgid "hibernate.transaction.manager_lookup_class" +msgstr "hibernate.transaction.manager_lookup_class" + +#. Tag: entry +#, no-c-format +msgid "The classname of a TransactionManagerLookup. It is required when JVM-level caching is enabled or when using hilo generator in a JTA environment." +msgstr "一个 TransactionManagerLookup 的类名 — 当使用 JVM 级缓存,或在 JTA 环境中使用 hilo 生成器的时候需要该类。 " #. Tag: para #, no-c-format -msgid "" -"e.g. classname.of." -"TransactionManagerLookup" -msgstr "" -"例如:classname.of." -"TransactionManagerLookup " +msgid "e.g. classname.of.TransactionManagerLookup" +msgstr "例如:classname.of.TransactionManagerLookup " #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "hibernate.transaction.flush_before_completion" -msgstr "hibernate.transaction. flush_before_completion" +msgstr "hibernate.transaction.flush_before_completion" #. Tag: entry #, 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 ." -msgstr "" -"如果开启,session 在事务完成后将被自动清洗(flush)。现在更好的方法是使用自" -"动 session 上下文管理。请参见 。 " +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 ." +msgstr "如果开启,session 在事务完成后将被自动清洗(flush)。现在更好的方法是使用自动 session 上下文管理。请参见 。 " #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "hibernate.transaction.auto_close_session" -msgstr "hibernate.transaction. auto_close_session" +msgstr "hibernate.transaction.auto_close_session" #. Tag: entry #, no-c-format -msgid "" -"If enabled, the session will be automatically closed during the after " -"completion phase of the transaction. Built-in and automatic session context " -"management is preferred, see ." -msgstr "" -"如果开启,session 在事务完成后将被自动关闭。 现在更好的方法是使用自动 " -"session 上下文管理。请参见 。 " +msgid "If enabled, the session will be automatically closed during the after completion phase of the transaction. Built-in and automatic session context management is preferred, see ." +msgstr "如果开启,session 在事务完成后将被自动关闭。 现在更好的方法是使用自动 session 上下文管理。请参见 。 " #. Tag: title #, no-c-format @@ -1227,30 +805,19 @@ msgid "Miscellaneous Properties" msgstr "其他属性" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "hibernate.current_session_context_class" -msgstr "hibernate. current_session_context_class" +msgstr "hibernate.current_session_context_class" #. Tag: entry #, no-c-format -msgid "" -"Supply a custom strategy for the scoping of the \"current\" " -"Session. See for more information about the built-in strategies." -msgstr "" -"为\"当前\" Session 指定一个(自定义的)策略。关于内置策略" -"的详情,请参见 。 " +msgid "Supply a custom strategy for the scoping of the \"current\" Session. See for more information about the built-in strategies." +msgstr "为\"当前\" Session 指定一个(自定义的)策略。关于内置策略的详情,请参见 。 " #. Tag: para #, no-c-format -msgid "" -"e.g. jta | " -"thread | managed | custom." -"Class" -msgstr "" -"例如:jta | " -"thread | managed | custom." -"Class " +msgid "e.g. jta | thread | managed | custom.Class" +msgstr "例如:jta | thread | managed | custom.Class " #. Tag: entry #, no-c-format @@ -1264,14 +831,8 @@ msgstr "选择 HQL 解析器的实现。" #. Tag: para #, no-c-format -msgid "" -"e.g. org.hibernate.hql.ast." -"ASTQueryTranslatorFactory or org.hibernate.hql.classic." -"ClassicQueryTranslatorFactory" -msgstr "" -"例如:org.hibernate.hql.ast." -"ASTQueryTranslatorFactoryorg.hibernate.hql.classic." -"ClassicQueryTranslatorFactory " +msgid "e.g. org.hibernate.hql.ast.ASTQueryTranslatorFactory or org.hibernate.hql.classic.ClassicQueryTranslatorFactory" +msgstr "例如:org.hibernate.hql.ast.ASTQueryTranslatorFactoryorg.hibernate.hql.classic.ClassicQueryTranslatorFactory " #. Tag: entry #, no-c-format @@ -1280,21 +841,13 @@ msgstr "hibernate.query.substitutions" #. Tag: entry #, no-c-format -msgid "" -"Is used to map from tokens in Hibernate queries to SQL tokens (tokens might " -"be function or literal names, for example)." -msgstr "" -"将 Hibernate 查询中的符号映射到 SQL 查询中的符号(符号可能是函数名或常量名" -"字)。 " +msgid "Is used to map from tokens in Hibernate queries to SQL tokens (tokens might be function or literal names, for example)." +msgstr "将 Hibernate 查询中的符号映射到 SQL 查询中的符号(符号可能是函数名或常量名字)。 " #. Tag: para #, no-c-format -msgid "" -"e.g. hqlLiteral=SQL_LITERAL, " -"hqlFunction=SQLFUNC" -msgstr "" -"例如:hqlLiteral=SQL_LITERAL, " -"hqlFunction=SQLFUNC " +msgid "e.g. hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" +msgstr "例如:hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC " #. Tag: entry #, no-c-format @@ -1303,43 +856,23 @@ msgstr "hibernate.hbm2ddl.auto" #. Tag: entry #, no-c-format -msgid "" -"Automatically validates or exports schema DDL to the database when the " -"SessionFactory is created. With create-drop, the database schema will be dropped when the " -"SessionFactory is closed explicitly." -msgstr "" -"在 SessionFactory 创建时,自动检查数据库结构,或者将数据" -"库 schema 的 DDL 导出到数据库。使用 create-drop 时,在显式" -"关闭 SessionFactory 时,将删除掉数据库 schema。 " +msgid "Automatically validates or exports schema DDL to the database when the SessionFactory is created. With create-drop, the database schema will be dropped when the SessionFactory is closed explicitly." +msgstr "在 SessionFactory 创建时,自动检查数据库结构,或者将数据库 schema 的 DDL 导出到数据库。使用 create-drop 时,在显式关闭 SessionFactory 时,将删除掉数据库 schema。 " #. Tag: para #, no-c-format -msgid "" -"e.g. validate | " -"update | create | create-" -"drop" -msgstr "" -"例如:validate | " -"update | create | create-" -"drop " - -#. Tag: entry -#, fuzzy, no-c-format -msgid "hibernate.cglib.use_reflection_optimizer" -msgstr "hibernate.cglib. use_reflection_optimizer" +msgid "e.g. validate | update | create | create-drop" +msgstr "例如:validate | update | create | create-drop " #. Tag: entry #, no-c-format -msgid "" -"Enables the use of CGLIB instead of runtime reflection (System-level " -"property). Reflection can sometimes be useful when troubleshooting. " -"Hibernate always requires CGLIB even if you turn off the optimizer. You " -"cannot set this property in hibernate.cfg.xml." -msgstr "" -"开启 CGLIB 来替代运行时反射机制(系统级属性)。反射机制有时在除错时比较有用。" -"注意即使关闭这个优化,Hibernate 还是需要 CGLIB。你不能在 hibernate." -"cfg.xml 中设置此属性。 " +msgid "hibernate.cglib.use_reflection_optimizer" +msgstr "hibernate.cglib.use_reflection_optimizer" + +#. Tag: entry +#, no-c-format +msgid "Enables the use of CGLIB instead of runtime reflection (System-level property). Reflection can sometimes be useful when troubleshooting. Hibernate always requires CGLIB even if you turn off the optimizer. You cannot set this property in hibernate.cfg.xml." +msgstr "开启 CGLIB 来替代运行时反射机制(系统级属性)。反射机制有时在除错时比较有用。注意即使关闭这个优化,Hibernate 还是需要 CGLIB。你不能在 hibernate.cfg.xml 中设置此属性。 " #. Tag: title #, no-c-format @@ -1348,17 +881,8 @@ msgstr "SQL 方言" #. Tag: para #, no-c-format -msgid "" -"Always set the hibernate.dialect property to the correct " -"org.hibernate.dialect.Dialect subclass for your database. " -"If you specify a dialect, Hibernate will use sensible defaults for some of " -"the other properties listed above. This means that you will not have to " -"specify them manually." -msgstr "" -"你应当总是为你的数据库将 hibernate.dialect 属性设置成正确" -"的 org.hibernate.dialect.Dialect 子类。如果你指定一种方" -"言,Hibernate 将为上面列出的一些属性使用合理的默认值,这样你就不用手工指定它" -"们。" +msgid "Always set the hibernate.dialect property to the correct org.hibernate.dialect.Dialect subclass for your database. If you specify a dialect, Hibernate will use sensible defaults for some of the other properties listed above. This means that you will not have to specify them manually." +msgstr "你应当总是为你的数据库将 hibernate.dialect 属性设置成正确的 org.hibernate.dialect.Dialect 子类。如果你指定一种方言,Hibernate 将为上面列出的一些属性使用合理的默认值,这样你就不用手工指定它们。" #. Tag: title #, no-c-format @@ -1612,34 +1136,13 @@ msgstr "外连接抓取(Outer Join Fetching)" #. Tag: para #, no-c-format -msgid "" -"If your database supports ANSI, Oracle or Sybase style outer joins, " -"outer join fetching will often increase performance by " -"limiting the number of round trips to and from the database. This is, " -"however, 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 SELECT." -msgstr "" -"如果你的数据库支持 ANSI、Oracle 或 Sybase 风格的外连接,外连接抓取" -"通常能通过限制往返数据库次数(更多的工作交由数据库自己来完成)来提" -"高效率。外连接抓取允许在单个 SELECT SQL 语句中, 通过 " -"many-to-one、one-to-many、many-to-many 和 one-to-one 关联获取连接对象的整个对" -"象图。" +msgid "If your database supports ANSI, Oracle or Sybase style outer joins, outer join fetching will often increase performance by limiting the number of round trips to and from the database. This is, however, 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 SELECT." +msgstr "如果你的数据库支持 ANSI、Oracle 或 Sybase 风格的外连接,外连接抓取通常能通过限制往返数据库次数(更多的工作交由数据库自己来完成)来提高效率。外连接抓取允许在单个 SELECT SQL 语句中, 通过 many-to-one、one-to-many、many-to-many 和 one-to-one 关联获取连接对象的整个对象图。" #. Tag: para #, no-c-format -msgid "" -"Outer join fetching can be disabled globally by setting " -"the property hibernate.max_fetch_depth to 0. A setting of 1 or higher enables outer join " -"fetching for one-to-one and many-to-one associations that have been mapped " -"with fetch=\"join\"." -msgstr "" -"将 hibernate.max_fetch_depth 设为 0 能" -"在全局 范围内禁止外连接抓取。设为 1 " -"或更高值能启用 one-to-one 和 many-to-oneouter 关联的外连接抓取,它们通过 " -"fetch=\"join\" 来映射。 " +msgid "Outer join fetching can be disabled globally by setting the property hibernate.max_fetch_depth to 0. A setting of 1 or higher enables outer join fetching for one-to-one and many-to-one associations that have been mapped with fetch=\"join\"." +msgstr "将 hibernate.max_fetch_depth 设为 0 能在全局 范围内禁止外连接抓取。设为 1 或更高值能启用 one-to-one 和 many-to-oneouter 关联的外连接抓取,它们通过 fetch=\"join\" 来映射。 " #. Tag: para #, no-c-format @@ -1653,17 +1156,8 @@ msgstr "二进制流(Binary Streams)" #. Tag: para #, no-c-format -msgid "" -"Oracle limits the size of byte arrays that can be passed " -"to and/or from its JDBC driver. If you wish to use large instances of " -"binary or serializable type, you " -"should enable hibernate.jdbc.use_streams_for_binary. " -"This is a system-level setting only." -msgstr "" -"Oracle 限制那些通过 JDBC 驱动传输的字节数组的数目。如果你" -"希望使用二进值(binary)可序列化的" -"(serializable)类型的大对象,你应该开启 hibernate.jdbc." -"use_streams_for_binary 属性。这是系统级属性。 " +msgid "Oracle limits the size of byte arrays that can be passed to and/or from its JDBC driver. If you wish to use large instances of binary or serializable type, you should enable hibernate.jdbc.use_streams_for_binary. This is a system-level setting only." +msgstr "Oracle 限制那些通过 JDBC 驱动传输的字节数组的数目。如果你希望使用二进值(binary)可序列化的(serializable)类型的大对象,你应该开启 hibernate.jdbc.use_streams_for_binary 属性。这是系统级属性。 " #. Tag: title #, no-c-format @@ -1672,14 +1166,8 @@ msgstr "二级缓存与查询缓存" #. Tag: para #, no-c-format -msgid "" -"The properties prefixed by hibernate.cache allow you to " -"use a process or cluster scoped second-level cache system with Hibernate. " -"See the for more information." -msgstr "" -"以 hibernate.cache 为前缀的属性允许你在 Hibernate 中,使用" -"进程或群集范围内的二级缓存系统。参见 获" -"取更多的详情。" +msgid "The properties prefixed by hibernate.cache allow you to use a process or cluster scoped second-level cache system with Hibernate. See the for more information." +msgstr "以 hibernate.cache 为前缀的属性允许你在 Hibernate 中,使用进程或群集范围内的二级缓存系统。参见 获取更多的详情。" #. Tag: title #, no-c-format @@ -1688,26 +1176,17 @@ msgstr "查询语言中的替换" #. Tag: para #, no-c-format -msgid "" -"You can define new Hibernate query tokens using hibernate.query." -"substitutions. For example:" -msgstr "" -"你可以使用 hibernate.query.substitutions 在 Hibernate 中定" -"义新的查询符号。例如: " +msgid "You can define new Hibernate query tokens using hibernate.query.substitutions. For example:" +msgstr "你可以使用 hibernate.query.substitutions 在 Hibernate 中定义新的查询符号。例如: " #. Tag: para #, no-c-format -msgid "" -"This would cause the tokens true and false to be translated to integer literals in the generated SQL." -msgstr "" -"将导致符号 truefalse 在生成的 SQL " -"中被翻译成整数常量。" +msgid "This would cause the tokens true and false to be translated to integer literals in the generated SQL." +msgstr "将导致符号 truefalse 在生成的 SQL 中被翻译成整数常量。" #. Tag: para #, no-c-format -msgid "" -"This would allow you to rename the SQL LOWER function." +msgid "This would allow you to rename the SQL LOWER function." msgstr "将允许你重命名 SQL 中的 LOWER 函数。" #. Tag: title @@ -1717,18 +1196,8 @@ msgstr "Hibernate 的统计(statistics)机制" #. Tag: para #, no-c-format -msgid "" -"If you enable hibernate.generate_statistics, Hibernate " -"exposes a number of metrics that are useful when tuning a running system via " -"SessionFactory.getStatistics(). Hibernate can even be " -"configured to expose these statistics via JMX. Read the Javadoc of the " -"interfaces in org.hibernate.stats for more information." -msgstr "" -"如果你开启 hibernate.generate_statistics,那么当你通过 " -"SessionFactory.getStatistics() 调整正在运行的系统时," -"Hibernate 将导出大量有用的数据。Hibernate 甚至能被配置成通过 JMX 导出这些统计" -"信息。参考 org.hibernate.stats 中接口的 Javadoc,以获得更" -"多信息。 " +msgid "If you enable hibernate.generate_statistics, Hibernate exposes a number of metrics that are useful when tuning a running system via SessionFactory.getStatistics(). Hibernate can even be configured to expose these statistics via JMX. Read the Javadoc of the interfaces in org.hibernate.stats for more information." +msgstr "如果你开启 hibernate.generate_statistics,那么当你通过 SessionFactory.getStatistics() 调整正在运行的系统时,Hibernate 将导出大量有用的数据。Hibernate 甚至能被配置成通过 JMX 导出这些统计信息。参考 org.hibernate.stats 中接口的 Javadoc,以获得更多信息。 " #. Tag: title #, no-c-format @@ -1737,42 +1206,13 @@ msgstr "日志" #. Tag: para #, no-c-format -msgid "" -"Hibernate utilizes Simple Logging " -"Facade for Java (SLF4J) in order to log various system events. SLF4J " -"can direct your logging output to several logging frameworks (NOP, Simple, " -"log4j version 1.2, JDK 1.4 logging, JCL or logback) depending on your chosen " -"binding. In order to setup logging you will need slf4j-api.jar in your classpath together with the jar file for your preferred " -"binding - slf4j-log4j12.jar in the case of Log4J. See " -"the SLF4J documentation for more detail. To use Log4j you will also need to place a " -"log4j.properties file in your classpath. An example " -"properties file is distributed with Hibernate in the src/ " -"directory." -msgstr "" -"Hibernate 利用 Simple Logging Facade " -"for Java (SLF4J) 来记录不同系统事件的日志。SLF4J 可以根据你选择的绑定" -"把日志输出到几个日志框架(NOP、Simple、log4j version 1.2、JDK 1.4 logging、" -"JCL 或 logback)上。为了设置日志,你需要在 classpath 里加入 slf4j-" -"api.jar 和你选择的绑定的 JAR 文件(使用 Log4J 时加入 " -"slf4j-log4j12.jar)。更多的细节请参考 SLF4J 文档。要使用 Log4j,你也需要在 " -"classpath 里加入 log4j.properties 文件。Hibernate 里的 " -"src/ 目录里带有一个属性文件的例子。" +msgid "Hibernate utilizes Simple Logging Facade for Java (SLF4J) in order to log various system events. SLF4J can direct your logging output to several logging frameworks (NOP, Simple, log4j version 1.2, JDK 1.4 logging, JCL or logback) depending on your chosen binding. In order to setup logging you will need slf4j-api.jar in your classpath together with the jar file for your preferred binding - slf4j-log4j12.jar in the case of Log4J. See the SLF4J documentation for more detail. To use Log4j you will also need to place a log4j.properties file in your classpath. An example properties file is distributed with Hibernate in the src/ directory." +msgstr "Hibernate 利用 Simple Logging Facade for Java (SLF4J) 来记录不同系统事件的日志。SLF4J 可以根据你选择的绑定把日志输出到几个日志框架(NOP、Simple、log4j version 1.2、JDK 1.4 logging、JCL 或 logback)上。为了设置日志,你需要在 classpath 里加入 slf4j-api.jar 和你选择的绑定的 JAR 文件(使用 Log4J 时加入 slf4j-log4j12.jar)。更多的细节请参考 SLF4J 文档。要使用 Log4j,你也需要在 classpath 里加入 log4j.properties 文件。Hibernate 里的 src/ 目录里带有一个属性文件的例子。" #. Tag: para #, no-c-format -msgid "" -"It is recommended 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 的日志可能地详细。这是必要的查错利器。最令人感兴趣的日志" -"分类有如下这些:" +msgid "It is recommended 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 的日志可能地详细。这是必要的查错利器。最令人感兴趣的日志分类有如下这些:" #. Tag: title #, no-c-format @@ -1810,9 +1250,9 @@ msgid "Log all JDBC parameters" msgstr "为所有 JDBC 参数记录日志" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "org.hibernate.tool.hbm2ddl" -msgstr "org.hibernate.tool. hbm2ddl" +msgstr "org.hibernate.tool.hbm2ddl" #. Tag: entry #, no-c-format @@ -1826,11 +1266,8 @@ msgstr "org.hibernate.pretty" #. Tag: entry #, no-c-format -msgid "" -"Log the state of all entities (max 20 entities) associated with the session " -"at flush time" -msgstr "" -"在 session 清洗(flush)时,为所有与其关联的实体(最多 20 个)的状态记录日志" +msgid "Log the state of all entities (max 20 entities) associated with the session at flush time" +msgstr "在 session 清洗(flush)时,为所有与其关联的实体(最多 20 个)的状态记录日志" #. Tag: entry #, no-c-format @@ -1843,9 +1280,9 @@ msgid "Log all second-level cache activity" msgstr "为所有二级缓存的活动记录日志" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "org.hibernate.transaction" -msgstr "org.hibernate. transaction" +msgstr "org.hibernate.transaction" #. Tag: entry #, no-c-format @@ -1863,9 +1300,9 @@ msgid "Log all JDBC resource acquisition" msgstr "为所有 JDBC 资源的获取记录日志" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "org.hibernate.hql.ast.AST" -msgstr "org.hibernate.hql. ast.AST" +msgstr "org.hibernate.hql.ast.AST" #. Tag: entry #, no-c-format @@ -1889,22 +1326,13 @@ msgstr "org.hibernate" #. Tag: entry #, no-c-format -msgid "" -"Log everything. This is a lot of information but it is useful for " -"troubleshooting" +msgid "Log everything. This is a lot of information but it is useful for troubleshooting" msgstr "为任何 Hibernate 相关信息记录日志(信息量较大,但对查错非常有帮助)" #. Tag: para #, no-c-format -msgid "" -"When developing applications with Hibernate, you should almost always work " -"with debug enabled for the category org." -"hibernate.SQL, or, alternatively, the property hibernate." -"show_sql enabled." -msgstr "" -"在使用 Hibernate 开发应用程序时,你应当总是为 org.hibernate.SQL 开启 debug 级别的日志记录,或者开启 " -"hibernate.show_sql 属性。" +msgid "When developing applications with Hibernate, you should almost always work with debug enabled for the category org.hibernate.SQL, or, alternatively, the property hibernate.show_sql enabled." +msgstr "在使用 Hibernate 开发应用程序时,你应当总是为 org.hibernate.SQL 开启 debug 级别的日志记录,或者开启 hibernate.show_sql 属性。" #. Tag: title #, no-c-format @@ -1913,44 +1341,23 @@ msgstr "实现 NamingStrategy" #. Tag: para #, no-c-format -msgid "" -"The interface org.hibernate.cfg.NamingStrategy allows you " -"to specify a \"naming standard\" for database objects and schema elements." -msgstr "" -"org.hibernate.cfg.NamingStrategy 接口允许你为数据库中的对" -"象和 schema 元素指定一个“命名标准”。" +msgid "The interface org.hibernate.cfg.NamingStrategy allows you to specify a \"naming standard\" for database objects and schema elements." +msgstr "org.hibernate.cfg.NamingStrategy 接口允许你为数据库中的对象和 schema 元素指定一个“命名标准”。" #. Tag: para #, no-c-format -msgid "" -"You can 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 (TBL_ prefixes, for example). The default strategy " -"used by Hibernate is quite minimal." -msgstr "" -"你可能会提供一些通过 Java 标识生成数据库标识或将映射定义文件中\"逻辑\"表/列名" -"处理成\"物理\"表/列名的规则。这个特性有助于减少冗长的映射定义文件,消除重复内" -"容(如 TBL_ 前缀)。Hibernate 使用的缺省策略是相当精简的。" +msgid "You can 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 (TBL_ prefixes, for example). The default strategy used by Hibernate is quite minimal." +msgstr "你可能会提供一些通过 Java 标识生成数据库标识或将映射定义文件中\"逻辑\"表/列名处理成\"物理\"表/列名的规则。这个特性有助于减少冗长的映射定义文件,消除重复内容(如 TBL_ 前缀)。Hibernate 使用的缺省策略是相当精简的。" #. Tag: para #, no-c-format -msgid "" -"You can specify a different strategy by calling Configuration." -"setNamingStrategy() before adding mappings:" -msgstr "" -"在加入映射定义前,你可以调用 Configuration.setNamingStrategy() 指定一个不同的命名策略: " +msgid "You can specify a different strategy by calling Configuration.setNamingStrategy() before adding mappings:" +msgstr "在加入映射定义前,你可以调用 Configuration.setNamingStrategy() 指定一个不同的命名策略: " #. Tag: para #, no-c-format -msgid "" -"org.hibernate.cfg.ImprovedNamingStrategy is a built-in " -"strategy that might be a useful starting point for some applications." -msgstr "" -"org.hibernate.cfg.ImprovedNamingStrategy 是一个内建的命名" -"策略,对一些应用程序而言,可能是非常有用的起点。" +msgid "org.hibernate.cfg.ImprovedNamingStrategy is a built-in strategy that might be a useful starting point for some applications." +msgstr "org.hibernate.cfg.ImprovedNamingStrategy 是一个内建的命名策略,对一些应用程序而言,可能是非常有用的起点。" #. Tag: title #, no-c-format @@ -1959,40 +1366,18 @@ msgstr "XML 配置文件" #. Tag: para #, no-c-format -msgid "" -"An alternative approach to configuration is to specify a full configuration " -"in a file named hibernate.cfg.xml. This file can be used " -"as a replacement for the hibernate.properties file or, if " -"both are present, to override properties." -msgstr "" -"另一个配置方法是在 hibernate.cfg.xml 文件中指定一套完整的" -"配置。这个文件可以当成 hibernate.properties 的替代。若两个" -"文件同时存在,它将覆盖前者的属性。" +msgid "An alternative approach to configuration is to specify a full configuration in a file named hibernate.cfg.xml. This file can be used as a replacement for the hibernate.properties file or, if both are present, to override properties." +msgstr "另一个配置方法是在 hibernate.cfg.xml 文件中指定一套完整的配置。这个文件可以当成 hibernate.properties 的替代。若两个文件同时存在,它将覆盖前者的属性。" #. Tag: para #, no-c-format -msgid "" -"The XML configuration file is by default expected to be in the root of your " -"CLASSPATH. Here is an example:" -msgstr "" -"XML 配置文件被默认是放在 CLASSPATH 的根目录下。下面是一个" -"例子: " +msgid "The XML configuration file is by default expected to be in the root of your CLASSPATH. Here is an example:" +msgstr "XML 配置文件被默认是放在 CLASSPATH 的根目录下。下面是一个例子: " #. Tag: para #, no-c-format -msgid "" -"The advantage of this approach is the externalization of the mapping file " -"names to configuration. The hibernate.cfg.xml is also " -"more convenient once you have to tune the Hibernate cache. It is your choice " -"to use either hibernate.properties or hibernate." -"cfg.xml. Both are equivalent, except for the above mentioned " -"benefits of using the XML syntax." -msgstr "" -"如你所见,这个方法优势在于,在配置文件中指出了映射定义文件的名字。一旦你需要" -"调整 Hibernate 的缓存,hibernate.cfg.xml 也是更方便。注" -"意,使用 hibernate.properties 还是 hibernate.cfg." -"xml 完全是由你来决定,除了上面提到的 XML 语法的优势之外,两者是等价" -"的。 " +msgid "The advantage of this approach is the externalization of the mapping file names to configuration. The hibernate.cfg.xml is also more convenient once you have to tune the Hibernate cache. It is your choice to use either hibernate.properties or hibernate.cfg.xml. Both are equivalent, except for the above mentioned benefits of using the XML syntax." +msgstr "如你所见,这个方法优势在于,在配置文件中指出了映射定义文件的名字。一旦你需要调整 Hibernate 的缓存,hibernate.cfg.xml 也是更方便。注意,使用 hibernate.properties 还是 hibernate.cfg.xml 完全是由你来决定,除了上面提到的 XML 语法的优势之外,两者是等价的。 " #. Tag: para #, no-c-format @@ -2016,78 +1401,28 @@ msgstr "针对 J2EE 体系,Hibernate 有如下几个集成的方面:" #. Tag: para #, no-c-format -msgid "" -"Container-managed datasources: Hibernate can use JDBC " -"connections managed by the container and provided through JNDI. Usually, a " -"JTA compatible TransactionManager and a " -"ResourceManager take care of transaction management " -"(CMT), especially distributed transaction handling across several " -"datasources. You can also demarcate transaction boundaries programmatically " -"(BMT), or you might want to use the optional Hibernate Transaction API for this to keep your code portable." -msgstr "" -"容器管理的数据源(Container-managed datasources): " -"Hibernate 能使用通过容器管理,并由 JNDI 提供的 JDBC 连接。通常,特别是当处理" -"多个数据源的分布式事务的时候,由一个 JTA 兼容的 TransactionManager 和一个 ResourceManager 来处理事务管理(CMT,容器" -"管理的事务)。当然你可以通过 编程方式来划分事务边界(BMT,Bean 管理的事务)。" -"或者为了代码的可移植性,你也也许会想使用可选的 Hibernate " -"Transaction API。 " +msgid "Container-managed datasources: Hibernate can use JDBC connections managed by the container and provided through JNDI. Usually, a JTA compatible TransactionManager and a ResourceManager take care of transaction management (CMT), especially distributed transaction handling across several datasources. You can also demarcate transaction boundaries programmatically (BMT), or you might want to use the optional Hibernate Transaction API for this to keep your code portable." +msgstr "容器管理的数据源(Container-managed datasources): Hibernate 能使用通过容器管理,并由 JNDI 提供的 JDBC 连接。通常,特别是当处理多个数据源的分布式事务的时候,由一个 JTA 兼容的 TransactionManager 和一个 ResourceManager 来处理事务管理(CMT,容器管理的事务)。当然你可以通过 编程方式来划分事务边界(BMT,Bean 管理的事务)。或者为了代码的可移植性,你也也许会想使用可选的 Hibernate Transaction API。 " #. Tag: para #, no-c-format -msgid "" -"Automatic JNDI binding: Hibernate can bind its " -"SessionFactory to JNDI after startup." -msgstr "" -"自动 JNDI 绑定:Hibernate 可以在启动后将 " -"SessionFactory 绑定到 JNDI。" +msgid "Automatic JNDI binding: Hibernate can bind its SessionFactory to JNDI after startup." +msgstr "自动 JNDI 绑定:Hibernate 可以在启动后将 SessionFactory 绑定到 JNDI。" #. Tag: para #, no-c-format -msgid "" -"JTA Session binding: the Hibernate Session can be automatically bound to the scope of JTA transactions. Simply " -"lookup the SessionFactory from JNDI and get the current " -"Session. Let Hibernate manage flushing and closing the " -"Session when your JTA transaction completes. Transaction " -"demarcation is either declarative (CMT) or programmatic (BMT/" -"UserTransaction)." -msgstr "" -"JTA Session 绑定: Hibernate Session " -"可以自动绑定到 JTA 事务作用的范围。只需简单地从 JNDI 查找 " -"SessionFactory 并获得当前的 Session。" -"当 JTA 事务完成时,让 Hibernate来处理 Session 的清洗" -"(flush)与关闭。事务的划分可以是声明式的(CMT),也可以是编程式的(BMT/" -"UserTransaction)。 " +msgid "JTA Session binding: the Hibernate Session can be automatically bound to the scope of JTA transactions. Simply lookup the SessionFactory from JNDI and get the current Session. Let Hibernate manage flushing and closing the Session when your JTA transaction completes. Transaction demarcation is either declarative (CMT) or programmatic (BMT/UserTransaction)." +msgstr "JTA Session 绑定: Hibernate Session 可以自动绑定到 JTA 事务作用的范围。只需简单地从 JNDI 查找 SessionFactory 并获得当前的 Session。当 JTA 事务完成时,让 Hibernate来处理 Session 的清洗(flush)与关闭。事务的划分可以是声明式的(CMT),也可以是编程式的(BMT/UserTransaction)。 " #. Tag: para #, no-c-format -msgid "" -"JMX deployment: if you have a JMX capable application " -"server (e.g. JBoss AS), you can choose to deploy Hibernate as a managed " -"MBean. This saves you the one line startup code to build your " -"SessionFactory from a Configuration. " -"The container will startup your HibernateService and also " -"take care of service dependencies (datasource has to be available before " -"Hibernate starts, etc)." -msgstr "" -"JMX 部署: 如果你使用支持 JMX 应用程序服务器(如,JBoss " -"AS),那么你可以选择将 Hibernate 部署成托管 MBean。这将为你省去一行从" -"Configuration 构建 SessionFactory 的启" -"动代码。容器将启动你的 HibernateService,并完美地处理好服" -"务间的依赖关系(在 Hibernate 启动前,数据源必须是可用的,等等)。 " +msgid "JMX deployment: if you have a JMX capable application server (e.g. JBoss AS), you can choose to deploy Hibernate as a managed MBean. This saves you the one line startup code to build your SessionFactory from a Configuration. The container will startup your HibernateService and also take care of service dependencies (datasource has to be available before Hibernate starts, etc)." +msgstr "JMX 部署: 如果你使用支持 JMX 应用程序服务器(如,JBoss AS),那么你可以选择将 Hibernate 部署成托管 MBean。这将为你省去一行从Configuration 构建 SessionFactory 的启动代码。容器将启动你的 HibernateService,并完美地处理好服务间的依赖关系(在 Hibernate 启动前,数据源必须是可用的,等等)。 " #. Tag: para #, no-c-format -msgid "" -"Depending on your environment, you might have to set the configuration " -"option hibernate.connection.aggressive_release to true if " -"your application server shows \"connection containment\" exceptions." -msgstr "" -"如果应用程序服务器抛出 \"connection containment\" 异常,根据你的环境,也许该" -"将配置属性 hibernate.connection.release_mode 设为 " -"after_statement。" +msgid "Depending on your environment, you might have to set the configuration option hibernate.connection.aggressive_release to true if your application server shows \"connection containment\" exceptions." +msgstr "如果应用程序服务器抛出 \"connection containment\" 异常,根据你的环境,也许该将配置属性 hibernate.connection.release_mode 设为 after_statement。" #. Tag: title #, no-c-format @@ -2096,33 +1431,13 @@ msgstr "事务策略配置" #. Tag: para #, no-c-format -msgid "" -"The Hibernate Session API is independent of any " -"transaction demarcation system in your architecture. If you let Hibernate " -"use JDBC directly through a connection pool, you can 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 UserTransaction when needed." -msgstr "" -"在你的架构中,Hibernate 的 Session API 是独立于任何事务分" -"界系统的。如果你让 Hibernate 通过连接池直接使用 JDBC,你需要调用 JDBC API 来" -"打开和关闭你的事务。如果你运行在 J2EE 应用程序服务器中,你也许想用 Bean 管理" -"的事务并在需要的时候调用 JTA API 和 UserTransaction。 " +msgid "The Hibernate Session API is independent of any transaction demarcation system in your architecture. If you let Hibernate use JDBC directly through a connection pool, you can 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 UserTransaction when needed." +msgstr "在你的架构中,Hibernate 的 Session API 是独立于任何事务分界系统的。如果你让 Hibernate 通过连接池直接使用 JDBC,你需要调用 JDBC API 来打开和关闭你的事务。如果你运行在 J2EE 应用程序服务器中,你也许想用 Bean 管理的事务并在需要的时候调用 JTA API 和 UserTransaction。 " #. Tag: para #, no-c-format -msgid "" -"To keep your code portable between these two (and other) environments we " -"recommend the optional Hibernate Transaction API, which " -"wraps and hides the underlying system. You have to specify a factory class " -"for Transaction instances by setting the Hibernate " -"configuration property hibernate.transaction.factory_class." -msgstr "" -"为了让你的代码在两种(或其他)环境中可以移植,我们建议使用可选的 Hibernate " -"Transaction API,它包装并隐藏了底层系统。你必须通过设置 " -"Hibernate 配置属性 hibernate.transaction.factory_class 来" -"指定一个 Transaction 实例的工厂类。" +msgid "To keep your code portable between these two (and other) environments we recommend the optional Hibernate Transaction API, which wraps and hides the underlying system. You have to specify a factory class for Transaction instances by setting the Hibernate configuration property hibernate.transaction.factory_class." +msgstr "为了让你的代码在两种(或其他)环境中可以移植,我们建议使用可选的 Hibernate Transaction API,它包装并隐藏了底层系统。你必须通过设置 Hibernate 配置属性 hibernate.transaction.factory_class 来指定一个 Transaction 实例的工厂类。" #. Tag: para #, no-c-format @@ -2146,13 +1461,8 @@ msgstr "org.hibernate.transaction.JTATransactionFactory" #. Tag: para #, no-c-format -msgid "" -"delegates to container-managed transactions if an existing transaction is " -"underway in this context (for example, EJB session bean method). Otherwise, " -"a new transaction is started and bean-managed transactions are used." -msgstr "" -"如果在上下文环境中存在运行着的事务(如,EJB 会话 Bean 的方法),则委托给容器" -"管理的事务。否则,将启动一个新的事务,并使用 Bean 管理的事务。" +msgid "delegates to container-managed transactions if an existing transaction is underway in this context (for example, EJB session bean method). Otherwise, a new transaction is started and bean-managed transactions are used." +msgstr "如果在上下文环境中存在运行着的事务(如,EJB 会话 Bean 的方法),则委托给容器管理的事务。否则,将启动一个新的事务,并使用 Bean 管理的事务。" #. Tag: term #, no-c-format @@ -2166,25 +1476,13 @@ msgstr "委托给容器管理的 JTA 事务" #. Tag: para #, no-c-format -msgid "" -"You can also define your own transaction strategies (for a CORBA transaction " -"service, for example)." +msgid "You can also define your own transaction strategies (for a CORBA transaction service, for example)." msgstr "你也可以定义属于你自己的事务策略(如,针对 CORBA 的事务服务)。" #. Tag: para #, no-c-format -msgid "" -"Some features in Hibernate (i.e., the second level cache, Contextual " -"Sessions with JTA, etc.) require access to the JTA " -"TransactionManager in a managed environment. In an " -"application server, since J2EE does not standardize a single mechanism, you " -"have to specify how Hibernate should obtain a reference to the " -"TransactionManager:" -msgstr "" -"Hibernate 的一些特性(比如二级缓存,Contextual Sessions with JTA 等等)需要访" -"问在托管环境中的 JTA TransactionManager。由于 J2EE 没有标" -"准化一个单一的机制,Hibernate 在应用程序服务器中,你必须指定 Hibernate 如何获" -"得 TransactionManager 的引用: " +msgid "Some features in Hibernate (i.e., the second level cache, Contextual Sessions with JTA, etc.) require access to the JTA TransactionManager in a managed environment. In an application server, since J2EE does not standardize a single mechanism, you have to specify how Hibernate should obtain a reference to the TransactionManager:" +msgstr "Hibernate 的一些特性(比如二级缓存,Contextual Sessions with JTA 等等)需要访问在托管环境中的 JTA TransactionManager。由于 J2EE 没有标准化一个单一的机制,Hibernate 在应用程序服务器中,你必须指定 Hibernate 如何获得 TransactionManager 的引用: " #. Tag: title #, no-c-format @@ -2202,11 +1500,9 @@ msgid "Application Server" msgstr "应用程序服务器" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"org.hibernate.transaction.JBossTransactionManagerLookup" -msgstr "" -"org.hibernate.transaction. JBossTransactionManagerLookup" +#, no-c-format +msgid "org.hibernate.transaction.JBossTransactionManagerLookup" +msgstr "org.hibernate.transaction.JBossTransactionManagerLookup" #. Tag: entry #, no-c-format @@ -2214,12 +1510,9 @@ msgid "JBoss" msgstr "JBoss" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"org.hibernate.transaction.WeblogicTransactionManagerLookup" -msgstr "" -"org.hibernate.transaction. WeblogicTransactionManagerLookup" +#, no-c-format +msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup" +msgstr "org.hibernate.transaction.WeblogicTransactionManagerLookup" #. Tag: entry #, no-c-format @@ -2227,13 +1520,9 @@ msgid "Weblogic" msgstr "Weblogic" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"org.hibernate.transaction.WebSphereTransactionManagerLookup" -msgstr "" -"org.hibernate.transaction. WebSphereTransactionManagerLookup" +#, no-c-format +msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup" +msgstr "org.hibernate.transaction.WebSphereTransactionManagerLookup" #. Tag: entry #, no-c-format @@ -2241,13 +1530,9 @@ msgid "WebSphere" msgstr "WebSphere" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" -msgstr "" -"org.hibernate.transaction. WebSphereExtendedJTATransactionLookup" +#, no-c-format +msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" +msgstr "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" #. Tag: entry #, no-c-format @@ -2255,11 +1540,9 @@ msgid "WebSphere 6" msgstr "WebSphere 6" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"org.hibernate.transaction.OrionTransactionManagerLookup" -msgstr "" -"org.hibernate.transaction. OrionTransactionManagerLookup" +#, no-c-format +msgid "org.hibernate.transaction.OrionTransactionManagerLookup" +msgstr "org.hibernate.transaction.OrionTransactionManagerLookup" #. Tag: entry #, no-c-format @@ -2267,11 +1550,9 @@ msgid "Orion" msgstr "Orion" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"org.hibernate.transaction.ResinTransactionManagerLookup" -msgstr "" -"org.hibernate.transaction. ResinTransactionManagerLookup" +#, no-c-format +msgid "org.hibernate.transaction.ResinTransactionManagerLookup" +msgstr "org.hibernate.transaction.ResinTransactionManagerLookup" #. Tag: entry #, no-c-format @@ -2279,11 +1560,9 @@ msgid "Resin" msgstr "Resin" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"org.hibernate.transaction.JOTMTransactionManagerLookup" -msgstr "" -"org.hibernate.transaction. JOTMTransactionManagerLookup" +#, no-c-format +msgid "org.hibernate.transaction.JOTMTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOTMTransactionManagerLookup" #. Tag: entry #, no-c-format @@ -2291,11 +1570,9 @@ msgid "JOTM" msgstr "JOTM" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"org.hibernate.transaction.JOnASTransactionManagerLookup" -msgstr "" -"org.hibernate.transaction. JOnASTransactionManagerLookup" +#, no-c-format +msgid "org.hibernate.transaction.JOnASTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOnASTransactionManagerLookup" #. Tag: entry #, no-c-format @@ -2303,11 +1580,9 @@ msgid "JOnAS" msgstr "JOnAS" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"org.hibernate.transaction.JRun4TransactionManagerLookup" -msgstr "" -"org.hibernate.transaction. JRun4TransactionManagerLookup" +#, no-c-format +msgid "org.hibernate.transaction.JRun4TransactionManagerLookup" +msgstr "org.hibernate.transaction.JRun4TransactionManagerLookup" #. Tag: entry #, no-c-format @@ -2315,11 +1590,9 @@ msgid "JRun4" msgstr "JRun4" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"org.hibernate.transaction.BESTransactionManagerLookup" -msgstr "" -"org.hibernate.transaction. BESTransactionManagerLookup" +#, no-c-format +msgid "org.hibernate.transaction.BESTransactionManagerLookup" +msgstr "org.hibernate.transaction.BESTransactionManagerLookup" #. Tag: entry #, no-c-format @@ -2333,87 +1606,33 @@ msgstr "JNDI 绑定的 SessionFactory" #. Tag: para #, no-c-format -msgid "" -"A JNDI-bound Hibernate SessionFactory can simplify the " -"lookup function of the factory and create new Sessions. " -"This is not, however, related to a JNDI bound Datasource; " -"both simply use the same registry." -msgstr "" -"与 JNDI 绑定的 Hibernate 的 SessionFactory 能简化工厂的查" -"询,简化创建新的 Session。需要注意的是这与 JNDI 绑定 " -"Datasource 没有关系,它们只是恰巧用了相同的注册表。" +msgid "A JNDI-bound Hibernate SessionFactory can simplify the lookup function of the factory and create new Sessions. This is not, however, related to a JNDI bound Datasource; both simply use the same registry." +msgstr "与 JNDI 绑定的 Hibernate 的 SessionFactory 能简化工厂的查询,简化创建新的 Session。需要注意的是这与 JNDI 绑定 Datasource 没有关系,它们只是恰巧用了相同的注册表。" #. Tag: para #, no-c-format -msgid "" -"If you wish to have the SessionFactory bound to a JNDI " -"namespace, specify a name (e.g. java:hibernate/SessionFactory) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory " -"will not be bound to JNDI. This is especially useful in environments with a " -"read-only JNDI default implementation (in Tomcat, for example)." -msgstr "" -"如果你希望将 SessionFactory 绑定到一个 JNDI 的名字空间,用" -"属性 hibernate.session_factory_name 指定一个名字(如," -"java:hibernate/SessionFactory)。如果不设置这个属性," -"SessionFactory 将不会被绑定到 JNDI 中(在以只读 JNDI 为默" -"认实现的环境中,这个设置尤其有用,如 Tomcat)。" +msgid "If you wish to have the SessionFactory bound to a JNDI namespace, specify a name (e.g. java:hibernate/SessionFactory) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory will not be bound to JNDI. This is especially useful in environments with a read-only JNDI default implementation (in Tomcat, for example)." +msgstr "如果你希望将 SessionFactory 绑定到一个 JNDI 的名字空间,用属性 hibernate.session_factory_name 指定一个名字(如,java:hibernate/SessionFactory)。如果不设置这个属性,SessionFactory 将不会被绑定到 JNDI 中(在以只读 JNDI 为默认实现的环境中,这个设置尤其有用,如 Tomcat)。" #. Tag: para #, no-c-format -msgid "" -"When binding the SessionFactory to JNDI, Hibernate will " -"use the values of hibernate.jndi.url, hibernate." -"jndi.class to instantiate an initial context. If they are not " -"specified, the default InitialContext will be used." -msgstr "" -"在将 SessionFactory 绑定至 JNDI 时,Hibernate 将使用 " -"hibernate.jndi.url,和 hibernate.jndi.class 的值来实例化初始环境(initial context)。如果它们没有被指定,将使用" -"默认的 InitialContext。" +msgid "When binding the SessionFactory to JNDI, Hibernate will use the values of hibernate.jndi.url, hibernate.jndi.class to instantiate an initial context. If they are not specified, the default InitialContext will be used." +msgstr "在将 SessionFactory 绑定至 JNDI 时,Hibernate 将使用 hibernate.jndi.url,和 hibernate.jndi.class 的值来实例化初始环境(initial context)。如果它们没有被指定,将使用默认的 InitialContext。" #. Tag: para #, no-c-format -msgid "" -"Hibernate will automatically place the SessionFactory in " -"JNDI after you call cfg.buildSessionFactory(). This means " -"you will have this call in some startup code, or utility class in your " -"application, unless you use JMX deployment with the " -"HibernateService (this is discussed later in greater " -"detail)." -msgstr "" -"在你调用 cfg.buildSessionFactory()后,Hibernate 会自动将 " -"SessionFactory 注册到 JNDI。这意味这你至少需要在你应用程序" -"的启动代码(或工具类)中完成这个调用,除非你使用 HibernateService 来做 JMX 部署(见后面讨论)。" +msgid "Hibernate will automatically place the SessionFactory in JNDI after you call cfg.buildSessionFactory(). This means you will have this call in some startup code, or utility class in your application, unless you use JMX deployment with the HibernateService (this is discussed later in greater detail)." +msgstr "在你调用 cfg.buildSessionFactory()后,Hibernate 会自动将 SessionFactory 注册到 JNDI。这意味这你至少需要在你应用程序的启动代码(或工具类)中完成这个调用,除非你使用 HibernateService 来做 JMX 部署(见后面讨论)。" #. Tag: para #, no-c-format -msgid "" -"If you use a JNDI SessionFactory, an EJB or any other " -"class, you can obtain the SessionFactory using a JNDI " -"lookup." -msgstr "" -"假若你使用 JNDI SessionFactory,EJB 或者任何其它类都可以" -"从 JNDI 中找到此 SessionFactory。 " +msgid "If you use a JNDI SessionFactory, an EJB or any other class, you can obtain the SessionFactory using a JNDI lookup." +msgstr "假若你使用 JNDI SessionFactory,EJB 或者任何其它类都可以从 JNDI 中找到此 SessionFactory。 " #. Tag: para #, no-c-format -msgid "" -"It is recommended that you bind the SessionFactory to " -"JNDI in a managed environment and use a static singleton " -"otherwise. To shield your application code from these details, we also " -"recommend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory" -"(). Note that such a class is also a convenient way to startup " -"Hibernate—see chapter 1." -msgstr "" -"我们建议,在受管理的环境中,把 SessionFactory 绑定到 " -"JNDI,在其它情况下,使用一个 static(静态的)singleton。为" -"了在你的应用程序代码中隐藏这些细节,我们还建议你用一个 helper 类把实际查找 " -"SessionFactory 的代码隐藏起来,比如 " -"HibernateUtil.getSessionFactory()。注意,这个类也就可以方" -"便地启动 Hibernate,参见第一章。 " +msgid "It is recommended that you bind the SessionFactory to JNDI in a managed environment and use a static singleton otherwise. To shield your application code from these details, we also recommend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory(). Note that such a class is also a convenient way to startup Hibernate—see chapter 1." +msgstr "我们建议,在受管理的环境中,把 SessionFactory 绑定到 JNDI,在其它情况下,使用一个 static(静态的)singleton。为了在你的应用程序代码中隐藏这些细节,我们还建议你用一个 helper 类把实际查找 SessionFactory 的代码隐藏起来,比如 HibernateUtil.getSessionFactory()。注意,这个类也就可以方便地启动 Hibernate,参见第一章。 " #. Tag: title #, no-c-format @@ -2422,42 +1641,8 @@ msgstr "在 JTA 环境下使用 Current Session context(当前 session 上下 #. Tag: para #, no-c-format -msgid "" -"The easiest way to handle Sessions and transactions is " -"Hibernate's automatic \"current\" Session management. For " -"a discussion of contextual sessions see . Using the \"jta\" session context, if there " -"is no Hibernate Session associated with the current JTA " -"transaction, one will be started and associated with that JTA transaction " -"the first time you call sessionFactory.getCurrentSession(). The Sessions retrieved via " -"getCurrentSession() in the\"jta\" " -"context are set to automatically flush before the transaction completes, " -"close after the transaction completes, and aggressively release JDBC " -"connections after each statement. This allows the Sessions 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 UserTransaction, or (recommended for portable code) use the Hibernate " -"Transaction API to set transaction boundaries. If you run " -"in an EJB container, declarative transaction demarcation with CMT is " -"preferred." -msgstr "" -"在 Hibernate 中,管理 Session 和 transaction 最好的方法是" -"自动的\"当前\"Session 管理。请参见 一节的讨论。使用 \"jta\" session 上下文,假若在当前 JTA 事务中还没有 " -"HibernateSession 关联,第一次 sessionFactory." -"getCurrentSession() 调用会启动一个 Session,并关联到当前的 JTA 事" -"务。在 \"jta\" 上下文中调用 getCurrentSession() 获得的 Session,会被设置为在 transaction 关闭的时" -"候自动 flush(清洗)、在 transaction 关闭之后自动关闭,每句语句之后主动释放 " -"JDBC 连接。这就可以根据 JTA 事务的生命周期来管理与之关联的 Session,用户代码中就可以不再考虑这些管理。你的代码也可以通过 " -"UserTransaction用编程方式使用 JTA,或者(我们建议,为了便" -"于移植代码)使用 Hibernate 的 Transaction API 来设置 " -"transaction 边界。如果你的代码运行在 EJB 容器中,我们建议对 CMT 使用声明式事" -"务声明。 " +msgid "The easiest way to handle Sessions and transactions is Hibernate's automatic \"current\" Session management. For a discussion of contextual sessions see . Using the \"jta\" session context, if there is no Hibernate Session associated with the current JTA transaction, one will be started and associated with that JTA transaction the first time you call sessionFactory.getCurrentSession(). The Sessions retrieved via getCurrentSession() in the\"jta\" context are set to automatically flush before the transaction completes, close after the transaction completes, and aggressively release JDBC connections after each statement. This allows the Sessions 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 UserTransaction, or (recommended for portable code) use the Hibernate Transaction API to set transaction boundaries. If you run in an EJB container, declarative transaction demarcation with CMT is preferred." +msgstr "在 Hibernate 中,管理 Session 和 transaction 最好的方法是自动的\"当前\"Session 管理。请参见 一节的讨论。使用 \"jta\" session 上下文,假若在当前 JTA 事务中还没有 HibernateSession 关联,第一次 sessionFactory.getCurrentSession() 调用会启动一个 Session,并关联到当前的 JTA 事务。在 \"jta\" 上下文中调用 getCurrentSession() 获得的 Session,会被设置为在 transaction 关闭的时候自动 flush(清洗)、在 transaction 关闭之后自动关闭,每句语句之后主动释放 JDBC 连接。这就可以根据 JTA 事务的生命周期来管理与之关联的 Session,用户代码中就可以不再考虑这些管理。你的代码也可以通过 UserTransaction用编程方式使用 JTA,或者(我们建议,为了便于移植代码)使用 Hibernate 的 Transaction API 来设置 transaction 边界。如果你的代码运行在 EJB 容器中,我们建议对 CMT 使用声明式事务声明。 " #. Tag: title #, no-c-format @@ -2466,50 +1651,18 @@ msgstr "JMX 部署" #. Tag: para #, no-c-format -msgid "" -"The line cfg.buildSessionFactory() still has to be " -"executed somewhere to get a SessionFactory into JNDI. You " -"can do this either in a static initializer block, like " -"the one in HibernateUtil, or you can deploy Hibernate as " -"a managed service." -msgstr "" -"为了将 SessionFactory 注册到 JNDI 中,cfg." -"buildSessionFactory() 这行代码仍需在某处被执行。你可在一个 " -"static 初始化块(像 HibernateUtil 中的" -"那样)中执行它或将 Hibernate 部署为一个托管的服务。 " +msgid "The line cfg.buildSessionFactory() still has to be executed somewhere to get a SessionFactory into JNDI. You can do this either in a static initializer block, like the one in HibernateUtil, or you can deploy Hibernate as a managed service." +msgstr "为了将 SessionFactory 注册到 JNDI 中,cfg.buildSessionFactory() 这行代码仍需在某处被执行。你可在一个 static 初始化块(像 HibernateUtil 中的那样)中执行它或将 Hibernate 部署为一个托管的服务。 " #. Tag: para #, no-c-format -msgid "" -"Hibernate is distributed with org.hibernate.jmx.HibernateService 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 jboss-service.xml for JBoss 4.0.x:" -msgstr "" -"为了部署在一个支持 JMX 的应用程序服务器上,Hibernate 和 org." -"hibernate.jmx.HibernateService 一同分发,如 Jboss AS。 实际的部署和" -"配置是由应用程序服务器提供者指定的。这里是 JBoss 4.0.x 的 jboss-" -"service.xml 样例: " +msgid "Hibernate is distributed with org.hibernate.jmx.HibernateService 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 jboss-service.xml for JBoss 4.0.x:" +msgstr "为了部署在一个支持 JMX 的应用程序服务器上,Hibernate 和 org.hibernate.jmx.HibernateService 一同分发,如 Jboss AS。 实际的部署和配置是由应用程序服务器提供者指定的。这里是 JBoss 4.0.x 的 jboss-service.xml 样例: " #. Tag: para #, no-c-format -msgid "" -"This file is deployed in a directory called META-INF and " -"packaged in a JAR file with the extension .sar (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) can be " -"kept in their own JAR file, but you can 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 "" -"这个文件是部署在 META-INF 目录下的,并会被打包到以 " -".sar(service archive)为扩展名的 JAR 文件中。同时,你需要" -"将 Hibernate、它所需要的第三方库、你编译好的持久化类以及你的映射定义文件打包" -"进同一个文档。你的企业 Bean(一般为会话 Bean)可能会被打包成它们自己的 JAR 文" -"件,但你也许会将 EJB JAR 文件一同包含进能独立(热)部署的主服务文档。参考 " -"JBoss AS 文档以了解更多的 JMX服务与 EJB 部署的信息。 " +msgid "This file is deployed in a directory called META-INF and packaged in a JAR file with the extension .sar (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) can be kept in their own JAR file, but you can 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 "这个文件是部署在 META-INF 目录下的,并会被打包到以 .sar(service archive)为扩展名的 JAR 文件中。同时,你需要将 Hibernate、它所需要的第三方库、你编译好的持久化类以及你的映射定义文件打包进同一个文档。你的企业 Bean(一般为会话 Bean)可能会被打包成它们自己的 JAR 文件,但你也许会将 EJB JAR 文件一同包含进能独立(热)部署的主服务文档。参考 JBoss AS 文档以了解更多的 JMX服务与 EJB 部署的信息。 " #~ msgid "" #~ "\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -46,9 +46,7 @@ msgstr "每个具体类一张表(table per concrete class)" #. Tag: para #, no-c-format -msgid "" -"In addition, Hibernate supports a fourth, slightly different kind of " -"polymorphism:" +msgid "In addition, Hibernate supports a fourth, slightly different kind of polymorphism:" msgstr "此外,Hibernate 还支持第四种稍有不同的多态映射策略:" #. Tag: para @@ -58,48 +56,13 @@ msgstr "隐式多态(implicit polymorphism)" #. Tag: para #, no-c-format -msgid "" -"It is possible to use different mapping strategies for different branches of " -"the same inheritance hierarchy. You can then make use of implicit " -"polymorphism to achieve polymorphism across the whole hierarchy. However, " -"Hibernate does not support mixing <subclass>, " -"<joined-subclass> and <union-" -"subclass> mappings under the same root <class> element. It is possible to mix together the table per hierarchy and " -"table per subclass strategies under the the same <class> element, by combining the <subclass> and " -"<join> elements (see below for an example)." -msgstr "" -"对于同一个继承层次内的不同分支,可以采用不同的映射策略,然后用隐式多 态来完成" -"跨越整个层次的多态。但是在同一个 <class> 根元素下," -"Hibernate 不支持混合了元素 <subclass><" -"joined-subclass><union-subclass> 的" -"映射。在同一个 <class> 元素下,可以混合使用“每个类分" -"层结构一张表”(table per hierarchy)和“每个子类一张表”(table per subclass) " -"这两种映射策略,这是通过结合元素 <subclass> 和 " -"<join> 来实现的(见后)。 " +msgid "It is possible to use different mapping strategies for different branches of the same inheritance hierarchy. You can then make use of implicit polymorphism to achieve polymorphism across the whole hierarchy. However, Hibernate does not support mixing <subclass>, <joined-subclass> and <union-subclass> mappings under the same root <class> element. It is possible to mix together the table per hierarchy and table per subclass strategies under the the same <class> element, by combining the <subclass> and <join> elements (see below for an example)." +msgstr "对于同一个继承层次内的不同分支,可以采用不同的映射策略,然后用隐式多 态来完成跨越整个层次的多态。但是在同一个 <class> 根元素下,Hibernate 不支持混合了元素 <subclass><joined-subclass><union-subclass> 的映射。在同一个 <class> 元素下,可以混合使用“每个类分层结构一张表”(table per hierarchy)和“每个子类一张表”(table per subclass) 这两种映射策略,这是通过结合元素 <subclass><join> 来实现的(见后)。 " #. Tag: para #, no-c-format -msgid "" -"It is possible to define subclass, union-" -"subclass, and joined-subclass mappings in " -"separate mapping documents directly beneath hibernate-mapping. This allows you to extend a class hierarchy by adding a new " -"mapping file. You must specify an extends attribute in " -"the subclass mapping, naming a previously mapped superclass. Previously this " -"feature made the ordering of the mapping documents important. Since " -"Hibernate3, the ordering of mapping files is irrelevant when using the " -"extends keyword. The ordering inside a single mapping file still needs to be " -"defined as superclasses before subclasses." -msgstr "" -"在多个映射文件中,可以直接在 hibernate-mapping 根下定义 " -"subclassunion-subclass 和 " -"joined-subclass。也就是说,你可以仅加入一个新的映射文件来" -"扩展类层次。你必须在 subclass 的映射中指明 extends 属性," -"给出一个之前定义的超类的名字。注意,在以前,这一功能对映射文件的顺序有严格的" -"要求,从 Hibernate 3 开始,使用 extends 关键字的时侯,对映射文件的顺序不再有" -"要求;但在每个映射文件里,超类必须在子类之前定义。 " +msgid "It is possible to define subclass, union-subclass, and joined-subclass mappings in separate mapping documents directly beneath hibernate-mapping. This allows you to extend a class hierarchy by adding a new mapping file. You must specify an extends attribute in the subclass mapping, naming a previously mapped superclass. Previously this feature made the ordering of the mapping documents important. Since Hibernate3, the ordering of mapping files is irrelevant when using the extends keyword. The ordering inside a single mapping file still needs to be defined as superclasses before subclasses." +msgstr "在多个映射文件中,可以直接在 hibernate-mapping 根下定义 subclassunion-subclassjoined-subclass。也就是说,你可以仅加入一个新的映射文件来扩展类层次。你必须在 subclass 的映射中指明 extends 属性,给出一个之前定义的超类的名字。注意,在以前,这一功能对映射文件的顺序有严格的要求,从 Hibernate 3 开始,使用 extends 关键字的时侯,对映射文件的顺序不再有要求;但在每个映射文件里,超类必须在子类之前定义。 " #. Tag: title #, no-c-format @@ -108,27 +71,13 @@ msgstr "每个类分层结构一张表(Table per class hierarchy)" #. Tag: para #, no-c-format -msgid "" -"Suppose we have an interface Payment with the " -"implementors CreditCardPayment, CashPayment, and ChequePayment. The table per hierarchy " -"mapping would display in the following way:" -msgstr "" -"假设我们有接口Payment和它的几个实现类: " -"CreditCardPayment, CashPayment 和" -"ChequePayment。则“每个类分层结构一张表”(Table per class " -"hierarchy)的映射代码如下所示: " +msgid "Suppose we have an interface Payment with the implementors CreditCardPayment, CashPayment, and ChequePayment. The table per hierarchy mapping would display in the following way:" +msgstr "假设我们有接口Payment和它的几个实现类: CreditCardPayment, CashPaymentChequePayment。则“每个类分层结构一张表”(Table per class hierarchy)的映射代码如下所示: " #. Tag: para #, no-c-format -msgid "" -"Exactly one table is required. There is a limitation of this mapping " -"strategy: columns declared by the subclasses, such as CCTYPE, cannot have NOT NULL constraints." -msgstr "" -"采用这种策略只需要一张表即可。它有一个很大的限制:要求那些由子类定义的字段, " -"如 CCTYPE,不能有非空(NOT NULL)约" -"束。 " +msgid "Exactly one table is required. There is a limitation of this mapping strategy: columns declared by the subclasses, such as CCTYPE, cannot have NOT NULL constraints." +msgstr "采用这种策略只需要一张表即可。它有一个很大的限制:要求那些由子类定义的字段, 如 CCTYPE,不能有非空(NOT NULL)约束。 " #. Tag: title #, no-c-format @@ -138,18 +87,12 @@ msgstr "每个子类一张表(Table per subclass)" #. Tag: para #, no-c-format msgid "A table per subclass mapping looks like this:" -msgstr "" -" 对于上例中的几个类而言,采用“每个子类一张表”的映射策略,代码如下所示:" +msgstr " 对于上例中的几个类而言,采用“每个子类一张表”的映射策略,代码如下所示:" #. Tag: para #, 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 "" -"需要四张表。三个子类表通过主键关联到超类表(因而关系模型实际上是一对一关" -"联)。 " +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 "需要四张表。三个子类表通过主键关联到超类表(因而关系模型实际上是一对一关联)。 " #. Tag: title #, no-c-format @@ -158,33 +101,13 @@ msgstr "每个子类一张表(Table per subclass),使用辨别标志(Dis #. Tag: para #, no-c-format -msgid "" -"Hibernate's implementation of table per subclass does not require a " -"discriminator column. Other object/relational mappers use a different " -"implementation of table per subclass that 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 want to use a discriminator column with the table per subclass " -"strategy, you can combine the use of <subclass> and " -"<join>, as follows:" -msgstr "" -"注意,对“每个子类一张表”的映射策略,Hibernate 的实现不需要辨别字段,而其他的" -"对象/关系映射工具使用了一种不同于Hibernate的实现方法,该方法要求在超类表中有" -"一个类型辨别字段(type discriminator column)。Hibernate 采用的方法更难实现," -"但从关系(数据库)的角度来看,按理说它更正确。若你愿意使用带有辨别字段的“每个" -"子类一张表”的策略,你可以结合使用 <subclass> 与" -"<join>,如下所示: " +msgid "Hibernate's implementation of table per subclass does not require a discriminator column. Other object/relational mappers use a different implementation of table per subclass that 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 want to use a discriminator column with the table per subclass strategy, you can combine the use of <subclass> and <join>, as follows:" +msgstr "注意,对“每个子类一张表”的映射策略,Hibernate 的实现不需要辨别字段,而其他的对象/关系映射工具使用了一种不同于Hibernate的实现方法,该方法要求在超类表中有一个类型辨别字段(type discriminator column)。Hibernate 采用的方法更难实现,但从关系(数据库)的角度来看,按理说它更正确。若你愿意使用带有辨别字段的“每个子类一张表”的策略,你可以结合使用 <subclass><join>,如下所示: " #. Tag: para #, no-c-format -msgid "" -"The optional fetch=\"select\" declaration tells Hibernate " -"not to fetch the ChequePayment subclass data using an " -"outer join when querying the superclass." -msgstr "" -"可选的声明 fetch=\"select\",是用来告诉 Hibernate,在查询" -"超类时,不要使用外部连接(outer join)来抓取子类 ChequePayment 的数据。" +msgid "The optional fetch=\"select\" declaration tells Hibernate not to fetch the ChequePayment subclass data using an outer join when querying the superclass." +msgstr "可选的声明 fetch=\"select\",是用来告诉 Hibernate,在查询超类时,不要使用外部连接(outer join)来抓取子类 ChequePayment 的数据。" #. Tag: title #, no-c-format @@ -193,22 +116,13 @@ msgstr "混合使用“每个类分层结构一张表”和“每个子类一张 #. Tag: para #, no-c-format -msgid "" -"You can even mix the table per hierarchy and table per subclass strategies " -"using the following approach:" -msgstr "" -"你甚至可以采取如下方法混和使用“每个类分层结构一张表”和“每个子类一张表”这两种" -"策略: " +msgid "You can even mix the table per hierarchy and table per subclass strategies using the following approach:" +msgstr "你甚至可以采取如下方法混和使用“每个类分层结构一张表”和“每个子类一张表”这两种策略: " #. Tag: para #, no-c-format -msgid "" -"For any of these mapping strategies, a polymorphic association to the root " -"Payment class is mapped using <many-to-one>" -"." -msgstr "" -"对上述任何一种映射策略而言,指向根类 Payment 的关联是使用 " -"<many-to-one> 进行映射的。" +msgid "For any of these mapping strategies, a polymorphic association to the root Payment class is mapped using <many-to-one>." +msgstr "对上述任何一种映射策略而言,指向根类 Payment 的关联是使用 <many-to-one> 进行映射的。" #. Tag: title #, no-c-format @@ -217,48 +131,23 @@ msgstr "每个具体类一张表(Table per concrete class)" #. Tag: para #, no-c-format -msgid "" -"There are two ways we can map the table per concrete class strategy. First, " -"you can use <union-subclass>." -msgstr "" -"对于“每个具体类一张表”的映射策略,可以采用两种方法。第一种方法是使用 " -"<union-subclass>。 " +msgid "There are two ways we can map the table per concrete class strategy. First, you can use <union-subclass>." +msgstr "对于“每个具体类一张表”的映射策略,可以采用两种方法。第一种方法是使用 <union-subclass>。 " #. Tag: para #, 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 "" -"这里涉及三张与子类相关的表。每张表为对应类的所有属性(包括从超类继承的属性)" -"定义相应字段。" +msgid "Three tables are involved for the subclasses. Each table defines columns for all properties of the class, including inherited properties." +msgstr "这里涉及三张与子类相关的表。每张表为对应类的所有属性(包括从超类继承的属性)定义相应字段。" #. Tag: para #, 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. The " -"identity generator strategy is not allowed in union subclass inheritance. " -"The primary key seed has to be shared across all unioned subclasses of a " -"hierarchy." -msgstr "" -"这种方式的局限在于,如果一个属性在超类中做了映射,其字段名必须与所有子类表中" -"定义的相同。(我们可能会在 Hibernate 的后续发布版本中放宽此限制。)不允许在联" -"合子类(union subclass)的继承层次中使用标识生成器策略(identity generator " -"strategy),实际上,主键的种子(primary key seed)不得不为同一继承层次中的全" -"部被联合子类所共用。 " +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. The identity generator strategy is not allowed in union subclass inheritance. The primary key seed has to be shared across all unioned subclasses of a hierarchy." +msgstr "这种方式的局限在于,如果一个属性在超类中做了映射,其字段名必须与所有子类表中定义的相同。(我们可能会在 Hibernate 的后续发布版本中放宽此限制。)不允许在联合子类(union subclass)的继承层次中使用标识生成器策略(identity generator strategy),实际上,主键的种子(primary key seed)不得不为同一继承层次中的全部被联合子类所共用。 " #. Tag: para #, no-c-format -msgid "" -"If your superclass is abstract, map it with abstract=\"true\". If it is not abstract, an additional table (it defaults to " -"PAYMENT in the example above), is needed to hold " -"instances of the superclass." -msgstr "" -"假若超类是抽象类,请使用 abstract=\"true\"。当然,假若它不" -"是抽象的,需要一个额外的表(上面的例子中,默认是 PAYMENT),来保存超类的实例。 " +msgid "If your superclass is abstract, map it with abstract=\"true\". If it is not abstract, an additional table (it defaults to PAYMENT in the example above), is needed to hold instances of the superclass." +msgstr "假若超类是抽象类,请使用 abstract=\"true\"。当然,假若它不是抽象的,需要一个额外的表(上面的例子中,默认是 PAYMENT),来保存超类的实例。 " #. Tag: title #, no-c-format @@ -271,38 +160,19 @@ msgid "An alternative approach is to make use of implicit polymorphism:" msgstr "另一种可供选择的方法是采用隐式多态:" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"Notice that the Payment interface is not mentioned " -"explicitly. Also notice that properties of Payment are " -"mapped in each of the subclasses. If you want to avoid duplication, consider " -"using XML entities (for example, [ <!ENTITY allproperties SYSTEM " -"\"allproperties.xml\"> ] in the DOCTYPE " -"declaration and &allproperties; in the mapping)." -msgstr "" -"请注意这里没有显性地提及 Payment 接口。Payment 的属性映射到每个子类。如果你想避免重复,请考虑使用 XML 实体(如:" -"DOCTYPE 声明里的 [ <!ENTITY allproperties " -"SYSTEM \"allproperties.xml\"> ] 和映射里的 &" -"allproperties;)。" +#, no-c-format +msgid "Notice that the Payment interface is not mentioned explicitly. Also notice that properties of Payment are mapped in each of the subclasses. If you want to avoid duplication, consider using XML entities (for example, [ <!ENTITY allproperties SYSTEM \"allproperties.xml\"> ] in the DOCTYPE declaration and &allproperties; in the mapping)." +msgstr "请注意,这里没有显性地提及 Payment 接口。Payment 的属性映射到每个子类。如果你想避免重复,请考虑使用 XML 实体(如:DOCTYPE 声明里的 [ <!ENTITY allproperties SYSTEM \"allproperties.xml\"> ] 和映射里的 &allproperties;)。 " #. Tag: para #, no-c-format -msgid "" -"The disadvantage of this approach is that Hibernate does not generate SQL " -"UNIONs when performing polymorphic queries." -msgstr "" -"这种方法的缺陷在于,在 Hibernate 执行多态查询时(polymorphic queries)无法生" -"成带 UNION 的 SQL 语句。 " +msgid "The disadvantage of this approach is that Hibernate does not generate SQL UNIONs when performing polymorphic queries." +msgstr "这种方法的缺陷在于,在 Hibernate 执行多态查询时(polymorphic queries)无法生成带 UNION 的 SQL 语句。 " #. Tag: para #, no-c-format -msgid "" -"For this mapping strategy, a polymorphic association to Payment is usually mapped using <any>." -msgstr "" -"对于这种映射策略而言,通常用 <any> 来实现到 " -"Payment 的多态关联映射。" +msgid "For this mapping strategy, a polymorphic association to Payment is usually mapped using <any>." +msgstr "对于这种映射策略而言,通常用 <any> 来实现到 Payment 的多态关联映射。" #. Tag: title #, no-c-format @@ -311,35 +181,13 @@ msgstr "隐式多态和其他继承映射混合使用" #. Tag: para #, no-c-format -msgid "" -"Since the subclasses are each mapped in their own <class> element, and since Payment is just an " -"interface), each of the subclasses could easily be part of another " -"inheritance hierarchy. You can still use polymorphic queries against the " -"Payment interface." -msgstr "" -"对这一映射还有一点需要注意。因为每个子类都在各自独立的元素 <" -"class> 中映射(并且 Payment 只是一个接口)," -"每个子类可以很容易的成为另一个继承体系中的一部分!(你仍然可以对接口 " -"Payment 使用多态查询。) " +msgid "Since the subclasses are each mapped in their own <class> element, and since Payment is just an interface), each of the subclasses could easily be part of another inheritance hierarchy. You can still use polymorphic queries against the Payment interface." +msgstr "对这一映射还有一点需要注意。因为每个子类都在各自独立的元素 <class> 中映射(并且 Payment 只是一个接口),每个子类可以很容易的成为另一个继承体系中的一部分!(你仍然可以对接口 Payment 使用多态查询。) " #. Tag: para #, no-c-format -msgid "" -"Once again, Payment is not mentioned explicitly. If we " -"execute a query against the Payment interface, for " -"example from Payment, Hibernate automatically returns " -"instances of CreditCardPayment (and its subclasses, since " -"they also implement Payment), CashPayment and ChequePayment, but not instances of " -"NonelectronicTransaction." -msgstr "" -"我们还是没有明确的提到 Payment。如果我们针对接口 " -"Payment 执行查询 — 如 from Payment — " -"Hibernate 自动返回 CreditCardPayment(和它的子类,因为 它" -"们也实现了接口 Payment)、CashPayment " -"和 Chequepayment 的实例,但不返回 " -"NonelectronicTransaction 的实例。 " +msgid "Once again, Payment is not mentioned explicitly. If we execute a query against the Payment interface, for example from Payment, Hibernate automatically returns instances of CreditCardPayment (and its subclasses, since they also implement Payment), CashPayment and ChequePayment, but not instances of NonelectronicTransaction." +msgstr "我们还是没有明确的提到 Payment。如果我们针对接口 Payment 执行查询 — 如 from Payment — Hibernate 自动返回 CreditCardPayment(和它的子类,因为 它们也实现了接口 Payment)、CashPaymentChequepayment 的实例,但不返回 NonelectronicTransaction 的实例。 " #. Tag: title #, no-c-format @@ -348,22 +196,13 @@ msgstr "限制" #. Tag: para #, no-c-format -msgid "" -"There are limitations to the \"implicit polymorphism\" approach to the table " -"per concrete-class mapping strategy. There are somewhat less restrictive " -"limitations to <union-subclass> mappings." -msgstr "" -"对“每个具体类映射一张表”(table per concrete-class)的映射策略而言,隐式多态" -"的方式有一定的限制。而 <union-subclass> 映射的限制则" -"没有那么严格。 " +msgid "There are limitations to the \"implicit polymorphism\" approach to the table per concrete-class mapping strategy. There are somewhat less restrictive limitations to <union-subclass> mappings." +msgstr "对“每个具体类映射一张表”(table per concrete-class)的映射策略而言,隐式多态的方式有一定的限制。而 <union-subclass> 映射的限制则没有那么严格。 " #. Tag: para -#, fuzzy, no-c-format -msgid "" -"The following table shows the limitations of table per concrete-class " -"mappings, and of implicit polymorphism, in Hibernate." -msgstr "" -"下面表格中列出了在 Hibernte 中“每个具体类一张表”的策略和隐式多态的限制。 " +#, no-c-format +msgid "The following table shows the limitations of table per concrete-class mappings, and of implicit polymorphism, in Hibernate." +msgstr "下面表格中列出了在 Hibernte 中“每个具体类一张表”的策略和隐式多态的限制。" #. Tag: title #, no-c-format @@ -376,9 +215,9 @@ msgid "Inheritance strategy" msgstr "继承策略(Inheritance strategy)" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "Polymorphic many-to-one" -msgstr "多态多对多" +msgstr "多态多对多 " #. Tag: entry #, no-c-format @@ -411,54 +250,54 @@ msgid "Polymorphic joins" msgstr "多态连接(join)" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "Outer join fetching" -msgstr "支持外连接(Outer join)读取。" +msgstr "支持外连接(Outer join)读取。 " #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "table per class-hierarchy" -msgstr "每个类分层结构一张表(table per class hierarchy)" +msgstr "每个类分层结构一张表(table per class hierarchy) " #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "<many-to-one>" -msgstr "<many-to-one>" +msgstr "<many-to-one>" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "<one-to-one>" -msgstr "<one-to-one>" +msgstr "<one-to-one>" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "<one-to-many>" -msgstr "<one-to-many>" +msgstr "<one-to-many>" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "<many-to-many>" -msgstr "<many-to-many>" +msgstr "<many-to-many>" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "s.get(Payment.class, id)" -msgstr "s.get(Payment.class, id)" +msgstr "s.get(Payment.class, id)" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "from Payment p" -msgstr "Polymorphic load()/get()" +msgstr "from Payment p" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "from Order o join o.payment p" -msgstr "多态性 join:from Order o join o.payment p" +msgstr "from Order o join o.payment p" #. Tag: entry #, no-c-format msgid "supported" -msgstr "" +msgstr "所支持的" #. Tag: entry #, no-c-format @@ -466,43 +305,34 @@ msgid "table per concrete-class (union-subclass)" msgstr "每个具体类一张表(union-subclass)" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"<one-to-many> (for inverse=\"true\" only)" -msgstr "" -"多态性一对多:<one-to-many> (仅适用于 " -"inverse=\"true\")" +#, no-c-format +msgid "<one-to-many> (for inverse=\"true\" only)" +msgstr "<one-to-many> (仅适用于 inverse=\"true\")" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "table per concrete class (implicit polymorphism)" -msgstr "每个具体类一张表(隐式多态) " +msgstr "每个具体类一张表(隐式多态) " #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "<any>" -msgstr "Polymorphic load()/get()" +msgstr "<any>" #. Tag: entry #, no-c-format msgid "not supported" -msgstr "" +msgstr "不支持的" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "<many-to-any>" -msgstr "<many-to-any>" +msgstr "<many-to-any>" #. Tag: entry -#, fuzzy, no-c-format -msgid "" -"s.createCriteria(Payment.class).add( Restrictions.idEq(id) )." -"uniqueResult()" -msgstr "" -"多态性 load()get()s." -"createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" +#, no-c-format +msgid "s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" +msgstr "s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" #~ msgid "table per class-heirarchy" #~ msgstr "每个类分层结构一张表 " diff --git a/documentation/manual/src/main/docbook/zh-CN/content/performance.po b/documentation/manual/src/main/docbook/zh-CN/content/performance.po index f658c13a4b..b97d825312 100644 --- a/documentation/manual/src/main/docbook/zh-CN/content/performance.po +++ b/documentation/manual/src/main/docbook/zh-CN/content/performance.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: performance\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-03-12T00:03:47\n" -"PO-Revision-Date: 2009-12-07 09:35+1000\n" +"PO-Revision-Date: 2010-03-15 15:27+1000\n" "Last-Translator: Xi HUANG \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -27,16 +27,8 @@ msgstr "抓取策略(Fetching strategies)" #. Tag: para #, no-c-format -msgid "" -"Hibernate uses a fetching strategy to retrieve " -"associated objects if the application needs to navigate the association. " -"Fetch strategies can be declared in the O/R mapping metadata, or over-ridden " -"by a particular HQL or Criteria query." -msgstr "" -"当应用程序需要在(Hibernate实体对象图的)关联关系间进行导航的时候,Hibernate " -"使用 抓取策略(fetching strategy) 获取关联对象。抓取策" -"略可以在 O/R 映射的元数据中声明,也可以在特定的 HQL 或条件查询" -"(Criteria Query)中重载声明。" +msgid "Hibernate uses a fetching strategy to retrieve associated objects if the application needs to navigate the association. Fetch strategies can be declared in the O/R mapping metadata, or over-ridden by a particular HQL or Criteria query." +msgstr "当应用程序需要在(Hibernate实体对象图的)关联关系间进行导航的时候,Hibernate 使用 抓取策略(fetching strategy) 获取关联对象。抓取策略可以在 O/R 映射的元数据中声明,也可以在特定的 HQL 或条件查询(Criteria Query)中重载声明。" #. Tag: para #, no-c-format @@ -45,54 +37,23 @@ msgstr "Hibernate3 定义了如下几种抓取策略:" #. Tag: para #, no-c-format -msgid "" -"Join fetching: Hibernate retrieves the associated " -"instance or collection in the same SELECT, using an " -"OUTER JOIN." -msgstr "" -"连接抓取(Join fetching):Hibernate 通过在 " -"SELECT 语句使用 OUTER JOIN(外连接)来" -"获得对象的关联实例或者关联集合。 " +msgid "Join fetching: Hibernate retrieves the associated instance or collection in the same SELECT, using an OUTER JOIN." +msgstr "连接抓取(Join fetching):Hibernate 通过在 SELECT 语句使用 OUTER JOIN(外连接)来获得对象的关联实例或者关联集合。 " #. Tag: para #, no-c-format -msgid "" -"Select fetching: a second SELECT is " -"used to retrieve the associated entity or collection. Unless you explicitly " -"disable lazy fetching by specifying lazy=\"false\", this " -"second select will only be executed when you access the association." -msgstr "" -"查询抓取(Select fetching):另外发送一条 " -"SELECT 语句抓取当前对象的关联实体或集合。除非你显式的指定 " -"lazy=\"false\" 禁止 延迟抓取(lazy fetching),否则只有当" -"你真正访问关联关系的时候,才会执行第二条 select 语句。" +msgid "Select fetching: a second SELECT is used to retrieve the associated entity or collection. Unless you explicitly disable lazy fetching by specifying lazy=\"false\", this second select will only be executed when you access the association." +msgstr "查询抓取(Select fetching):另外发送一条 SELECT 语句抓取当前对象的关联实体或集合。除非你显式的指定 lazy=\"false\" 禁止 延迟抓取(lazy fetching),否则只有当你真正访问关联关系的时候,才会执行第二条 select 语句。" #. Tag: para #, no-c-format -msgid "" -"Subselect fetching: a second SELECT " -"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 lazy=\"false\", this second select will only " -"be executed when you access the association." -msgstr "" -"子查询抓取(Subselect fetching):另外发送一条 " -"SELECT 语句抓取在前面查询到(或者抓取到)的所有实体对象的" -"关联集合。除非你显式的指定 lazy=\"false\" 禁止延迟抓取" -"(lazy fetching),否则只有当你真正访问关联关系的时候,才会执行第二条 select " -"语句。" +msgid "Subselect fetching: a second SELECT 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 lazy=\"false\", this second select will only be executed when you access the association." +msgstr "子查询抓取(Subselect fetching):另外发送一条 SELECT 语句抓取在前面查询到(或者抓取到)的所有实体对象的关联集合。除非你显式的指定 lazy=\"false\" 禁止延迟抓取(lazy fetching),否则只有当你真正访问关联关系的时候,才会执行第二条 select 语句。" #. Tag: para #, no-c-format -msgid "" -"Batch fetching: an optimization strategy for select " -"fetching. Hibernate retrieves a batch of entity instances or collections in " -"a single SELECT by specifying a list of primary or " -"foreign keys." -msgstr "" -"批量抓取(Batch fetching):对查询抓取的优化方案,通过指" -"定一个主键或外键列表,Hibernate 使用单条 SELECT 语句获取一" -"批对象实例或集合。" +msgid "Batch fetching: an optimization strategy for select fetching. Hibernate retrieves a batch of entity instances or collections in a single SELECT by specifying a list of primary or foreign keys." +msgstr "批量抓取(Batch fetching):对查询抓取的优化方案,通过指定一个主键或外键列表,Hibernate 使用单条 SELECT 语句获取一批对象实例或集合。" #. Tag: para #, no-c-format @@ -101,86 +62,38 @@ msgstr "Hibernate 会区分下列各种情况:" #. Tag: para #, no-c-format -msgid "" -"Immediate fetching: an association, collection or " -"attribute is fetched immediately when the owner is loaded." -msgstr "" -"Immediate fetching,立即抓取:当宿主被加载时,关联、集合" -"或属性被立即抓取。" +msgid "Immediate fetching: an association, collection or attribute is fetched immediately when the owner is loaded." +msgstr "Immediate fetching,立即抓取:当宿主被加载时,关联、集合或属性被立即抓取。" #. Tag: para #, no-c-format -msgid "" -"Lazy collection fetching: a collection is fetched when " -"the application invokes an operation upon that collection. This is the " -"default for collections." -msgstr "" -"Lazy collection fetching,延迟集合抓取:直到应用程序对集" -"合进行了一次操作时,集合才被抓取(对集合而言这是默认行为)。" +msgid "Lazy collection fetching: a collection is fetched when the application invokes an operation upon that collection. This is the default for collections." +msgstr "Lazy collection fetching,延迟集合抓取:直到应用程序对集合进行了一次操作时,集合才被抓取(对集合而言这是默认行为)。" #. Tag: para #, no-c-format -msgid "" -"\"Extra-lazy\" collection fetching: 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. It " -"is suitable for large collections." -msgstr "" -"\"Extra-lazy\" collection fetching,\"Extra-lazy\" 集合抓取:对集合类中的每个元素而言,都是直到需要时才去访问数据库。除非绝对必" -"要,Hibernate 不会试图去把整个集合都抓取到内存里来(适用于非常大的集合)。" +msgid "\"Extra-lazy\" collection fetching: 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. It is suitable for large collections." +msgstr "\"Extra-lazy\" collection fetching,\"Extra-lazy\" 集合抓取:对集合类中的每个元素而言,都是直到需要时才去访问数据库。除非绝对必要,Hibernate 不会试图去把整个集合都抓取到内存里来(适用于非常大的集合)。" #. Tag: para #, no-c-format -msgid "" -"Proxy fetching: a single-valued association is fetched " -"when a method other than the identifier getter is invoked upon the " -"associated object." -msgstr "" -"Proxy fetching,代理抓取:对返回单值的关联而言,当其某个" -"方法被调用,而非对其关键字进行 get 操作时才抓取。" +msgid "Proxy fetching: a single-valued association is fetched when a method other than the identifier getter is invoked upon the associated object." +msgstr "Proxy fetching,代理抓取:对返回单值的关联而言,当其某个方法被调用,而非对其关键字进行 get 操作时才抓取。" #. Tag: para #, no-c-format -msgid "" -"\"No-proxy\" fetching: 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. It is also more transparent, since no proxy is " -"visible to the application. This approach requires buildtime bytecode " -"instrumentation and is rarely necessary." -msgstr "" -"\"No-proxy\" fetching,非代理抓取:对返回单值的关联而" -"言,当实例变量被访问的时候进行抓取。与上面的代理抓取相比,这种方法没有那么“延" -"迟”得厉害(就算只访问标识符,也会导致关联抓取)但是更加透明,因为对应用程序来" -"说,不再看到 proxy。这种方法需要在编译期间进行字节码增强操作,因此很少需要用" -"到。" +msgid "\"No-proxy\" fetching: 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. It is also more transparent, since no proxy is visible to the application. This approach requires buildtime bytecode instrumentation and is rarely necessary." +msgstr "\"No-proxy\" fetching,非代理抓取:对返回单值的关联而言,当实例变量被访问的时候进行抓取。与上面的代理抓取相比,这种方法没有那么“延迟”得厉害(就算只访问标识符,也会导致关联抓取)但是更加透明,因为对应用程序来说,不再看到 proxy。这种方法需要在编译期间进行字节码增强操作,因此很少需要用到。" #. Tag: para #, no-c-format -msgid "" -"Lazy attribute fetching: 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 "" -"Lazy attribute fetching,属性延迟加载:对属性或返回单值" -"的关联而言,当其实例变量被访问的时候进行抓取。需要编译期字节码强化,因此这一" -"方法很少是必要的。" +msgid "Lazy attribute fetching: 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 "Lazy attribute fetching,属性延迟加载:对属性或返回单值的关联而言,当其实例变量被访问的时候进行抓取。需要编译期字节码强化,因此这一方法很少是必要的。" #. Tag: para #, no-c-format -msgid "" -"We have two orthogonal notions here: when is the " -"association fetched and how is it fetched. It is " -"important that you do not confuse them. We use fetch to " -"tune performance. We can use lazy to define a contract " -"for what data is always available in any detached instance of a particular " -"class." -msgstr "" -"这里有两个正交的概念:关联何时被抓取,以及被如" -"何抓取(会采用什么样的 SQL 语句)。注意不要混淆它们。我们使用" -"抓取来改善性能。我们使用延迟来定义一些" -"契约,对某特定类的某个脱管的实例,知道有哪些数据是可以使用的。" +msgid "We have two orthogonal notions here: when is the association fetched and how is it fetched. It is important that you do not confuse them. We use fetch to tune performance. We can use lazy to define a contract for what data is always available in any detached instance of a particular class." +msgstr "这里有两个正交的概念:关联何时被抓取,以及被如何抓取(会采用什么样的 SQL 语句)。注意不要混淆它们。我们使用抓取来改善性能。我们使用延迟来定义一些契约,对某特定类的某个脱管的实例,知道有哪些数据是可以使用的。" #. Tag: title #, no-c-format @@ -189,75 +102,33 @@ msgstr "操作延迟加载的关联" #. Tag: para #, 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 " -"most associations in the majority of applications." -msgstr "" -"默认情况下,Hibernate 3 对集合使用延迟 select 抓取,对返回单值的关联使用延迟" -"代理抓取。对几乎是所有的应用而言,其绝大多数的关联,这种策略都是有效的。" +msgid "By default, Hibernate3 uses lazy select fetching for collections and lazy proxy fetching for single-valued associations. These defaults make sense for most associations in the majority of applications." +msgstr "默认情况下,Hibernate 3 对集合使用延迟 select 抓取,对返回单值的关联使用延迟代理抓取。对几乎是所有的应用而言,其绝大多数的关联,这种策略都是有效的。" #. Tag: para #, no-c-format -msgid "" -"If you set hibernate.default_batch_fetch_size, Hibernate " -"will use the batch fetch optimization for lazy fetching. This optimization " -"can also be enabled at a more granular level." -msgstr "" -"假若你设置了 hibernate.default_batch_fetch_size," -"Hibernate 会对延迟加载采取批量抓取优化措施(这种优化也可能会在更细化的级别打" -"开)。" +msgid "If you set hibernate.default_batch_fetch_size, Hibernate will use the batch fetch optimization for lazy fetching. This optimization can also be enabled at a more granular level." +msgstr "假若你设置了 hibernate.default_batch_fetch_size,Hibernate 会对延迟加载采取批量抓取优化措施(这种优化也可能会在更细化的级别打开)。" #. Tag: para #, no-c-format -msgid "" -"Please be aware that access to a lazy association outside of the context of " -"an open Hibernate session will result in an exception. For example:" -msgstr "" -"然而,你必须了解延迟抓取带来的一个问题。在一个打开的 Hibernate session 上下文" -"之外调用延迟集合会导致一次意外。比如: " +msgid "Please be aware that access to a lazy association outside of the context of an open Hibernate session will result in an exception. For example:" +msgstr "然而,你必须了解延迟抓取带来的一个问题。在一个打开的 Hibernate session 上下文之外调用延迟集合会导致一次意外。比如: " #. Tag: para #, no-c-format -msgid "" -"Since the permissions collection was not initialized when the " -"Session was closed, the collection will not be able to " -"load its state. Hibernate does not support lazy initialization for " -"detached objects. This can be fixed by moving the code that reads " -"from the collection to just before the transaction is committed." -msgstr "" -"在 Session 关闭后,permessions 集合将是未实例化的、不再可" -"用,因此无法正常载入其状态。 Hibernate 对脱管对象不支持延迟实例化。这里的修改方法是将 permissions 读取数据的代码移到事务提交之前。" +msgid "Since the permissions collection was not initialized when the Session was closed, the collection will not be able to load its state. Hibernate does not support lazy initialization for detached objects. This can be fixed by moving the code that reads from the collection to just before the transaction is committed." +msgstr "在 Session 关闭后,permessions 集合将是未实例化的、不再可用,因此无法正常载入其状态。 Hibernate 对脱管对象不支持延迟实例化。这里的修改方法是将 permissions 读取数据的代码移到事务提交之前。" #. Tag: para #, no-c-format -msgid "" -"Alternatively, you can use a non-lazy collection or association, by " -"specifying lazy=\"false\" 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 fetch the entire database into memory " -"in every transaction." -msgstr "" -"除此之外,通过对关联映射指定 lazy=\"false\",我们也可以使" -"用非延迟的集合或关联。但是,对绝大部分集合来说,更推荐使用延迟方式抓取数据。" -"如果在你的对象模型中定义了太多的非延迟关联,Hibernate 最终几乎需要在每个事务" -"中载入整个数据库到内存中。" +msgid "Alternatively, you can use a non-lazy collection or association, by specifying lazy=\"false\" 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 fetch the entire database into memory in every transaction." +msgstr "除此之外,通过对关联映射指定 lazy=\"false\",我们也可以使用非延迟的集合或关联。但是,对绝大部分集合来说,更推荐使用延迟方式抓取数据。如果在你的对象模型中定义了太多的非延迟关联,Hibernate 最终几乎需要在每个事务中载入整个数据库到内存中。" #. Tag: para #, no-c-format -msgid "" -"On the other hand, you can use join fetching, which is non-lazy by nature, " -"instead of select fetching in a particular transaction. We will now explain " -"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 中,具体选择哪种抓取策略的机制是和选择 单值关联或" -"集合关联相一致的。 " +msgid "On the other hand, you can use join fetching, which is non-lazy by nature, instead of select fetching in a particular transaction. We will now explain 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 中,具体选择哪种抓取策略的机制是和选择 单值关联或集合关联相一致的。 " #. Tag: title #, no-c-format @@ -266,26 +137,18 @@ msgstr "调整抓取策略(Tuning fetch strategies)" #. Tag: para #, 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 查询的情况下是极其脆弱的,因此我们可能会要求在映射文" -"档中定义使用连接抓取:" +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 查询的情况下是极其脆弱的,因此我们可能会要求在映射文档中定义使用连接抓取:" #. Tag: para #, no-c-format -msgid "" -"The fetch strategy defined in the mapping document " -"affects:" -msgstr "" -"在映射文档中定义的抓取策略将会对以下列表条目产生影响:" +msgid "The fetch strategy defined in the mapping document affects:" +msgstr "在映射文档中定义的抓取策略将会对以下列表条目产生影响:" #. Tag: para #, no-c-format msgid "retrieval via get() or load()" -msgstr "" -"通过 get()load() 方法取得数据。" +msgstr "通过 get()load() 方法取得数据。" #. Tag: para #, no-c-format @@ -304,53 +167,27 @@ msgstr "使用了 subselect 抓取的 HQL 查询" #. Tag: para #, no-c-format -msgid "" -"Irrespective of the fetching strategy you use, the defined non-lazy graph is " -"guaranteed to be loaded into memory. This might, however, result in several " -"immediate selects being used to execute a particular HQL query." -msgstr "" -"不管你使用哪种抓取策略,定义为非延迟的类图会被保证一定装载入内存。注意这可能" -"意味着在一条 HQL 查询后紧跟着一系列的查询。 " +msgid "Irrespective of the fetching strategy you use, the defined non-lazy graph is guaranteed to be loaded into memory. This might, however, result in several immediate selects being used to execute a particular HQL query." +msgstr "不管你使用哪种抓取策略,定义为非延迟的类图会被保证一定装载入内存。注意这可能意味着在一条 HQL 查询后紧跟着一系列的查询。 " #. Tag: para #, no-c-format -msgid "" -"Usually, the mapping document is not used to customize fetching. Instead, we " -"keep the default behavior, and override it for a particular transaction, " -"using left join fetch in HQL. This tells Hibernate to " -"fetch the association eagerly in the first select, using an outer join. In " -"the Criteria query API, you would use " -"setFetchMode(FetchMode.JOIN)." -msgstr "" -"通常情况下,我们并不使用映射文档进行抓取策略的定制。更多的是,保持其默认值," -"然后在特定的事务中, 使用 HQL 的左连接抓取(left join fetch) 对其进行重载。这将通知 Hibernate在第一次查询中使用外部关联(outer " -"join),直接得到其关联数据。在条件查询 API 中,应该调用 " -"setFetchMode(FetchMode.JOIN)语句。 " +msgid "Usually, the mapping document is not used to customize fetching. Instead, we keep the default behavior, and override it for a particular transaction, using left join fetch in HQL. This tells Hibernate to fetch the association eagerly in the first select, using an outer join. In the Criteria query API, you would use setFetchMode(FetchMode.JOIN)." +msgstr "通常情况下,我们并不使用映射文档进行抓取策略的定制。更多的是,保持其默认值,然后在特定的事务中, 使用 HQL 的左连接抓取(left join fetch) 对其进行重载。这将通知 Hibernate在第一次查询中使用外部关联(outer join),直接得到其关联数据。在条件查询 API 中,应该调用 setFetchMode(FetchMode.JOIN)语句。 " #. Tag: para #, no-c-format -msgid "" -"If you want to change the fetching strategy used by get() " -"or load(), you can use a Criteria " -"query. For example:" -msgstr "" -"也许你喜欢仅仅通过条件查询,就可以改变 get() 或 " -"load() 语句中的数据抓取策略。例如: " +msgid "If you want to change the fetching strategy used by get() or load(), you can use a Criteria query. For example:" +msgstr "也许你喜欢仅仅通过条件查询,就可以改变 get()load() 语句中的数据抓取策略。例如: " #. Tag: para #, no-c-format -msgid "" -"This is Hibernate's equivalent of what some ORM solutions call a \"fetch plan" -"\"." -msgstr "" -"这就是其他 ORM 解决方案的“抓取计划(fetch plan)”在 Hibernate 中的等价物。" +msgid "This is Hibernate's equivalent of what some ORM solutions call a \"fetch plan\"." +msgstr "这就是其他 ORM 解决方案的“抓取计划(fetch plan)”在 Hibernate 中的等价物。" #. Tag: para #, no-c-format -msgid "" -"A completely different approach to problems with N+1 selects is to use the " -"second-level cache." +msgid "A completely different approach to problems with N+1 selects is to use the second-level cache." msgstr "截然不同的一种避免 N+1 次查询的方法是,使用二级缓存。 " #. Tag: title @@ -360,61 +197,28 @@ msgstr "单端关联代理(Single-ended association proxies)" #. Tag: para #, 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 which is " -"accessed via the CGLIB library." -msgstr "" -"在 Hinerbate 中,对集合的延迟抓取的采用了自己的实现方法。但是,对于单端关联的" -"延迟抓取,则需要采用 其他不同的机制。单端关联的目标实体必须使用代理," -"Hihernate 在运行期二进制级(通过优异的 CGLIB 库), 为持久对象实现了延迟载入" -"代理。 " +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 which is accessed via the CGLIB library." +msgstr "在 Hinerbate 中,对集合的延迟抓取的采用了自己的实现方法。但是,对于单端关联的延迟抓取,则需要采用 其他不同的机制。单端关联的目标实体必须使用代理,Hihernate 在运行期二进制级(通过优异的 CGLIB 库), 为持久对象实现了延迟载入代理。 " #. Tag: para #, no-c-format -msgid "" -"At startup, Hibernate3 generates proxies by default for all persistent " -"classes and uses them to enable lazy fetching of many-to-one and one-to-one associations." -msgstr "" -"默认的,Hibernate3 将会为所有的持久对象产生代理(在启动阶段),然后使用他们实" -"现 多对一(many-to-one)关联和一对一(one-to-" -"one) 关联的延迟抓取。 " +msgid "At startup, Hibernate3 generates proxies by default for all persistent classes and uses them to enable lazy fetching of many-to-one and one-to-one associations." +msgstr "默认的,Hibernate3 将会为所有的持久对象产生代理(在启动阶段),然后使用他们实现 多对一(many-to-one)关联和一对一(one-to-one) 关联的延迟抓取。 " #. Tag: para #, no-c-format -msgid "" -"The mapping file may declare an interface to use as the proxy interface for " -"that class, with the proxy attribute. By default, " -"Hibernate uses a subclass of the class. The proxied class must " -"implement a default constructor with at least package visibility. This " -"constructor is recommended for all persistent classes." -msgstr "" -"在映射文件中,可以通过设置 proxy 属性为目标 class 声明一个" -"接口供代理接口使用。 默认的,Hibernate 将会使用该类的一个子类。注" -"意:被代理的类必须实现一个至少包可见的默认构造函数,我们建议所有的持久类都应" -"拥有这样的构造函数。" +msgid "The mapping file may declare an interface to use as the proxy interface for that class, with the proxy attribute. By default, Hibernate uses a subclass of the class. The proxied class must implement a default constructor with at least package visibility. This constructor is recommended for all persistent classes." +msgstr "在映射文件中,可以通过设置 proxy 属性为目标 class 声明一个接口供代理接口使用。 默认的,Hibernate 将会使用该类的一个子类。注意:被代理的类必须实现一个至少包可见的默认构造函数,我们建议所有的持久类都应拥有这样的构造函数。" #. Tag: para #, no-c-format -msgid "" -"There are potential problems to note when extending this approach to " -"polymorphic classes.For example:" +msgid "There are potential problems to note when extending this approach to polymorphic classes.For example:" msgstr "在如此方式定义一个多态类的时候,有许多值得注意的常见性的问题,例如: " #. Tag: para #, no-c-format -msgid "" -"Firstly, instances of Cat will never be castable to " -"DomesticCat, even if the underlying instance is an " -"instance of DomesticCat:" -msgstr "" -"首先,Cat 实例永远不可以被强制转换为 " -"DomesticCat,即使它本身就是 DomesticCat 实例。" +msgid "Firstly, instances of Cat will never be castable to DomesticCat, even if the underlying instance is an instance of DomesticCat:" +msgstr "首先,Cat 实例永远不可以被强制转换为 DomesticCat,即使它本身就是 DomesticCat 实例。" #. Tag: para #, no-c-format @@ -423,61 +227,28 @@ msgstr "其次,代理的“==”可能不再成立。 " #. Tag: para #, 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 "" -"虽然如此,但实际情况并没有看上去那么糟糕。虽然我们现在有两个不同的引用,分别" -"指向这两个不同的代理对象,但实际上,其底层应该是同一个实例对象:" +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 "虽然如此,但实际情况并没有看上去那么糟糕。虽然我们现在有两个不同的引用,分别指向这两个不同的代理对象,但实际上,其底层应该是同一个实例对象:" #. Tag: para #, no-c-format -msgid "" -"Third, you cannot use a CGLIB proxy for a final class or " -"a class with any final methods." -msgstr "" -"第三,你不能对 final 类或具有 final 方" -"法的类使用 CGLIB 代理。" +msgid "Third, you cannot use a CGLIB proxy for a final class or a class with any final methods." +msgstr "第三,你不能对 final 类或具有 final 方法的类使用 CGLIB 代理。" #. Tag: para #, no-c-format -msgid "" -"Finally, if your persistent object acquires any resources upon instantiation " -"(e.g. 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 "" -"最后,如果你的持久化对象在实例化时需要某些资源(例如,在实例化方法、默认构造" -"方法中),那么代理对象也同样需要使用这些资源。实际上,代理类是持久化类的子" -"类。" +msgid "Finally, if your persistent object acquires any resources upon instantiation (e.g. 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 "最后,如果你的持久化对象在实例化时需要某些资源(例如,在实例化方法、默认构造方法中),那么代理对象也同样需要使用这些资源。实际上,代理类是持久化类的子类。" #. Tag: para #, no-c-format -msgid "" -"These problems are all due to fundamental limitations in Java's single " -"inheritance model. 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 where CatImpl implements the interface Cat and " -"DomesticCatImpl implements the interface " -"DomesticCat. For example:" -msgstr "" -"这些问题都源于 Java 的单根继承模型的天生限制。如果你希望避免这些问题,那么你" -"的每个持久化类必须实现一个接口, 在此接口中已经声明了其业务方法。然后,你需要" -"在映射文档中再指定这些接口,如 CatImpl 实现 CatDomesticCatImpl 实现 DomesticCat 接口。例如:" +msgid "These problems are all due to fundamental limitations in Java's single inheritance model. 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 where CatImpl implements the interface Cat and DomesticCatImpl implements the interface DomesticCat. For example:" +msgstr "这些问题都源于 Java 的单根继承模型的天生限制。如果你希望避免这些问题,那么你的每个持久化类必须实现一个接口, 在此接口中已经声明了其业务方法。然后,你需要在映射文档中再指定这些接口,如 CatImpl 实现 CatDomesticCatImpl 实现 DomesticCat 接口。例如:" #. Tag: para #, no-c-format -msgid "" -"Then proxies for instances of Cat and " -"DomesticCat can be returned by load() " -"or iterate()." -msgstr "" -"然后,load()iterate() 永远也不会返" -"回 CatDomesticCat 实例的代理。" +msgid "Then proxies for instances of Cat and DomesticCat can be returned by load() or iterate()." +msgstr "然后,load()iterate() 永远也不会返回 CatDomesticCat 实例的代理。" #. Tag: title #, no-c-format @@ -491,37 +262,23 @@ msgstr "list() 通常不返回代理。" #. Tag: para #, no-c-format -msgid "" -"Relationships are also lazily initialized. This means you must declare any " -"properties to be of type Cat, not CatImpl." -msgstr "" -"这里,对象之间的关系也将被延迟载入。这就意味着,你应该将属性声明为 " -"Cat,而不是 CatImpl。" +msgid "Relationships are also lazily initialized. This means you must declare any properties to be of type Cat, not CatImpl." +msgstr "这里,对象之间的关系也将被延迟载入。这就意味着,你应该将属性声明为 Cat,而不是 CatImpl。" #. Tag: para #, no-c-format -msgid "" -"Certain operations do not require proxy initialization:" +msgid "Certain operations do not require proxy initialization:" msgstr "有些方法中是需要代理初始化的:" #. Tag: para #, no-c-format -msgid "" -"equals(): if the persistent class does not override " -"equals()" -msgstr "" -"equals() 方法,如果持久类没有重载 equals() 方法。" +msgid "equals(): if the persistent class does not override equals()" +msgstr "equals() 方法,如果持久类没有重载 equals() 方法。" #. Tag: para #, no-c-format -msgid "" -"hashCode(): if the persistent class does not override " -"hashCode()" -msgstr "" -"hashCode():如果持久类没有重载 hashCode() 方法。" +msgid "hashCode(): if the persistent class does not override hashCode()" +msgstr "hashCode():如果持久类没有重载 hashCode() 方法。" #. Tag: para #, no-c-format @@ -530,24 +287,13 @@ msgstr "标志符的 getter 方法。" #. Tag: para #, no-c-format -msgid "" -"Hibernate will detect persistent classes that override equals() or hashCode()." -msgstr "" -"Hibernate 将会识别出那些重载了 equals()、或 " -"hashCode() 方法的持久化类。" +msgid "Hibernate will detect persistent classes that override equals() or hashCode()." +msgstr "Hibernate 将会识别出那些重载了 equals()、或 hashCode() 方法的持久化类。" #. Tag: para #, no-c-format -msgid "" -"By choosing lazy=\"no-proxy\" instead of the default " -"lazy=\"proxy\", you can avoid problems associated with " -"typecasting. However, buildtime bytecode instrumentation is required, and " -"all operations will result in immediate proxy initialization." -msgstr "" -"若选择 lazy=\"no-proxy\" 而非默认的 lazy=\"proxy" -"\",我们可以避免类型转换带来的问题。然而,这样我们就需要编译期字节" -"码增强,并且所有的操作都会导致立刻进行代理初始化。 " +msgid "By choosing lazy=\"no-proxy\" instead of the default lazy=\"proxy\", you can avoid problems associated with typecasting. However, buildtime bytecode instrumentation is required, and all operations will result in immediate proxy initialization." +msgstr "若选择 lazy=\"no-proxy\" 而非默认的 lazy=\"proxy\",我们可以避免类型转换带来的问题。然而,这样我们就需要编译期字节码增强,并且所有的操作都会导致立刻进行代理初始化。 " #. Tag: title #, no-c-format @@ -556,149 +302,53 @@ msgstr "实例化集合和代理(Initializing collections and proxies)" #. Tag: para #, no-c-format -msgid "" -"A LazyInitializationException will be thrown by Hibernate " -"if an uninitialized collection or proxy is accessed outside of the scope of " -"the Session, i.e., when the entity owning the collection " -"or having the reference to the proxy is in the detached state." -msgstr "" -"在 Session 范围之外访问未初始化的集合或代理,Hibernate 将" -"会抛出 LazyInitializationException 异常。也就是说,在分离" -"状态下,访问一个实体所拥有的集合,或者访问其指向代理的属性时,会引发此异常。 " +msgid "A LazyInitializationException will be thrown by Hibernate if an uninitialized collection or proxy is accessed outside of the scope of the Session, i.e., when the entity owning the collection or having the reference to the proxy is in the detached state." +msgstr "在 Session 范围之外访问未初始化的集合或代理,Hibernate 将会抛出 LazyInitializationException 异常。也就是说,在分离状态下,访问一个实体所拥有的集合,或者访问其指向代理的属性时,会引发此异常。 " #. Tag: para #, no-c-format -msgid "" -"Sometimes a proxy or collection needs to be initialized before closing the " -"Session. You can force initialization by calling " -"cat.getSex() or cat.getKittens().size(), for example. However, this can be confusing to readers of the code " -"and it is not convenient for generic code." -msgstr "" -"有时候我们需要保证某个代理或者集合在 Session 关闭前就已经被初始化了。当然,我" -"们可以通过强行调用 cat.getSex() 或者 cat." -"getKittens().size() 之类的方法来确保这一点。 但是这样的程序会造成读" -"者的疑惑,也不符合通常的代码规范。 " +msgid "Sometimes a proxy or collection needs to be initialized before closing the Session. You can force initialization by calling cat.getSex() or cat.getKittens().size(), for example. However, this can be confusing to readers of the code and it is not convenient for generic code." +msgstr "有时候我们需要保证某个代理或者集合在 Session 关闭前就已经被初始化了。当然,我们可以通过强行调用 cat.getSex() 或者 cat.getKittens().size() 之类的方法来确保这一点。 但是这样的程序会造成读者的疑惑,也不符合通常的代码规范。 " #. Tag: para #, no-c-format -msgid "" -"The static methods Hibernate.initialize() and " -"Hibernate.isInitialized(), provide the application with a " -"convenient way of working with lazily initialized collections or proxies. " -"Hibernate.initialize(cat) will force the initialization " -"of a proxy, cat, as long as its Session is still open. Hibernate.initialize( cat.getKittens() ) has a similar effect for the collection of kittens." -msgstr "" -"静态方法 Hibernate.initialized() 为你的应用程序提供了一个" -"便捷的途径来延迟加载集合或代理。 只要它的 Session 处于 open 状态," -"Hibernate.initialize(cat) 将会为 cat 强制对代理实例化。同" -"样,Hibernate.initialize(cat.getKittens()) 对 kittens 的集" -"合具有同样的功能。 " +msgid "The static methods Hibernate.initialize() and Hibernate.isInitialized(), provide the application with a convenient way of working with lazily initialized collections or proxies. Hibernate.initialize(cat) will force the initialization of a proxy, cat, as long as its Session is still open. Hibernate.initialize( cat.getKittens() ) has a similar effect for the collection of kittens." +msgstr "静态方法 Hibernate.initialized() 为你的应用程序提供了一个便捷的途径来延迟加载集合或代理。 只要它的 Session 处于 open 状态,Hibernate.initialize(cat) 将会为 cat 强制对代理实例化。同样,Hibernate.initialize(cat.getKittens()) 对 kittens 的集合具有同样的功能。 " #. Tag: para #, no-c-format -msgid "" -"Another option is to keep the Session open until all " -"required 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 " -"Session is open when a collection is initialized. There " -"are two basic ways to deal with this issue:" -msgstr "" -"还有另外一种选择,就是保持 Session 一直处于 open 状态,直" -"到所有需要的集合或代理都被载入。 在某些应用架构中,特别是对于那些使用 " -"Hibernate 进行数据访问的代码,以及那些在不同应用层和不同物理进程中使用 " -"Hibernate 的代码。 在集合实例化时,如何保证 Session 处于 " -"open 状态经常会是一个问题。有两种方法可以解决此问题: " +msgid "Another option is to keep the Session open until all required 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 Session is open when a collection is initialized. There are two basic ways to deal with this issue:" +msgstr "还有另外一种选择,就是保持 Session 一直处于 open 状态,直到所有需要的集合或代理都被载入。 在某些应用架构中,特别是对于那些使用 Hibernate 进行数据访问的代码,以及那些在不同应用层和不同物理进程中使用 Hibernate 的代码。 在集合实例化时,如何保证 Session 处于 open 状态经常会是一个问题。有两种方法可以解决此问题: " #. Tag: para #, no-c-format -msgid "" -"In a web-based application, a servlet filter can be used to close the " -"Session only at the end of a user request, once the " -"rendering of the view is complete (the Open Session in View pattern). Of course, this places heavy demands on the correctness " -"of the exception handling of your application infrastructure. It is vitally " -"important that the Session 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)结束、页面生成 结束时关闭 Session(这里使用了" -"在展示层保持打开 Session 模式(Open Session in View)),当然,这将依赖于应用框架中异常需要被正确的处理。在返回界面给用户" -"之前,乃至在生成界面过程中发生异常的情况下,正确关闭 Session 和结束事务将是非常重要的, 请参见 Hibernate wiki 上的 \"Open " -"Session in View\" 模式,你可以找到示例。 " +msgid "In a web-based application, a servlet filter can be used to close the Session only at the end of a user request, once the rendering of the view is complete (the Open Session in View pattern). Of course, this places heavy demands on the correctness of the exception handling of your application infrastructure. It is vitally important that the Session 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)结束、页面生成 结束时关闭 Session(这里使用了在展示层保持打开 Session 模式(Open Session in View)),当然,这将依赖于应用框架中异常需要被正确的处理。在返回界面给用户之前,乃至在生成界面过程中发生异常的情况下,正确关闭 Session 和结束事务将是非常重要的, 请参见 Hibernate wiki 上的 \"Open Session in View\" 模式,你可以找到示例。 " #. Tag: para #, no-c-format -msgid "" -"In an application with a separate business tier, the business logic must " -"\"prepare\" all collections that the web tier needs 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 Hibernate." -"initialize() 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 FETCH " -"clause or a FetchMode.JOIN in Criteria. This is usually easier if you adopt the Command pattern instead of a Session Facade." -msgstr "" -"在一个拥有单独业务层的应用中,业务层必须在返回之前,为 web 层“准备”好其所需的" -"数据集合。这就意味着 业务层应该载入所有表现层/web 层所需的数据,并将这些已实" -"例化完毕的数据返回。通常,应用程序应该为 web 层所需的每个集合调用 " -"Hibernate.initialize()(这个调用必须发生咱 session 关闭之" -"前);或者使用带有 FETCH 从句,或 FetchMode." -"JOIN 的 Hibernate 查询,事先取得所有的数据集合。如果你在应用中使用" -"了 Command 模式,代替 Session Facade,那么这项任务将会变得简单的多。 " +msgid "In an application with a separate business tier, the business logic must \"prepare\" all collections that the web tier needs 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 Hibernate.initialize() 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 FETCH clause or a FetchMode.JOIN in Criteria. This is usually easier if you adopt the Command pattern instead of a Session Facade." +msgstr "在一个拥有单独业务层的应用中,业务层必须在返回之前,为 web 层“准备”好其所需的数据集合。这就意味着 业务层应该载入所有表现层/web 层所需的数据,并将这些已实例化完毕的数据返回。通常,应用程序应该为 web 层所需的每个集合调用 Hibernate.initialize()(这个调用必须发生咱 session 关闭之前);或者使用带有 FETCH 从句,或 FetchMode.JOIN 的 Hibernate 查询,事先取得所有的数据集合。如果你在应用中使用了 Command 模式,代替 Session Facade,那么这项任务将会变得简单的多。 " #. Tag: para #, no-c-format -msgid "" -"You can also attach a previously loaded object to a new Session with merge() or lock() before " -"accessing uninitialized collections or other proxies. Hibernate does not, " -"and certainly should not, do this automatically since " -"it would introduce impromptu transaction semantics." -msgstr "" -"你也可以通过 merge()lock() 方法,在" -"访问未实例化的集合(或代理)之前,为先前载入的对象绑定一个新的 " -"Session。显然,Hibernate 将不会,也不应该自动完成这些任务,因为这将引入一个特殊的事务语义。 " +msgid "You can also attach a previously loaded object to a new Session with merge() or lock() before accessing uninitialized collections or other proxies. Hibernate does not, and certainly should not, do this automatically since it would introduce impromptu transaction semantics." +msgstr "你也可以通过 merge()lock() 方法,在访问未实例化的集合(或代理)之前,为先前载入的对象绑定一个新的 Session。显然,Hibernate 将不会,也不应该自动完成这些任务,因为这将引入一个特殊的事务语义。 " #. Tag: para #, no-c-format -msgid "" -"Sometimes you do not want to initialize a large collection, but still need " -"some information about it, like its size, for example, or a subset of the " -"data." -msgstr "" -"有时候,你并不需要完全实例化整个大的集合,仅需要了解它的部分信息(例如其大" -"小)、或者集合的部分内容。 " +msgid "Sometimes you do not want to initialize a large collection, but still need some information about it, like its size, for example, or a subset of the data." +msgstr "有时候,你并不需要完全实例化整个大的集合,仅需要了解它的部分信息(例如其大小)、或者集合的部分内容。 " #. Tag: para #, no-c-format -msgid "" -"You can use a collection filter to get the size of a collection without " -"initializing it:" +msgid "You can use a collection filter to get the size of a collection without initializing it:" msgstr "你可以使用集合过滤器得到其集合的大小,而不必实例化整个集合:" #. Tag: para #, no-c-format -msgid "" -"The createFilter() method is also used to efficiently " -"retrieve subsets of a collection without needing to initialize the whole " -"collection:" -msgstr "" -"这里的 createFilter() 方法也可以被用来有效的抓取集合的部分" -"内容,而无需实例化整个集合:" +msgid "The createFilter() method is also used to efficiently retrieve subsets of a collection without needing to initialize the whole collection:" +msgstr "这里的 createFilter() 方法也可以被用来有效的抓取集合的部分内容,而无需实例化整个集合:" #. Tag: title #, no-c-format @@ -707,90 +357,33 @@ msgstr "使用批量抓取(Using batch fetching)" #. Tag: para #, no-c-format -msgid "" -"Using batch fetching, Hibernate can load several uninitialized proxies if " -"one proxy is accessed. Batch fetching is an optimization of the lazy select " -"fetching strategy. There are two ways you can configure batch fetching: on " -"the class level and the collection level." -msgstr "" -"Hibernate 可以充分有效的使用批量抓取,也就是说,如果仅一个访问代理(或集" -"合),那么 Hibernate 将不载入其他未实例化的代理。批量抓取是延迟查询抓取的优化" -"方案,你可以在两种批量抓取方案之间进行选择:在类级别和集合级别。 " +msgid "Using batch fetching, Hibernate can load several uninitialized proxies if one proxy is accessed. Batch fetching is an optimization of the lazy select fetching strategy. There are two ways you can configure batch fetching: on the class level and the collection level." +msgstr "Hibernate 可以充分有效的使用批量抓取,也就是说,如果仅一个访问代理(或集合),那么 Hibernate 将不载入其他未实例化的代理。批量抓取是延迟查询抓取的优化方案,你可以在两种批量抓取方案之间进行选择:在类级别和集合级别。 " #. Tag: para #, no-c-format -msgid "" -"Batch fetching for classes/entities is easier to understand. Consider the " -"following example: at runtime you have 25 Cat instances " -"loaded in a Session, and each Cat has " -"a reference to its owner, a Person. " -"The Person class is mapped with a proxy, lazy=" -"\"true\". If you now iterate through all cats and call " -"getOwner() on each, Hibernate will, by default, execute " -"25 SELECT statements to retrieve the proxied owners. You " -"can tune this behavior by specifying a batch-size in the " -"mapping of Person:" -msgstr "" -"类/实体级别的批量抓取很容易理解。假设你在运行时将需要面对下面的问题:你在一" -"个 Session 中载入了 25 个 Cat 实例,每" -"个 Cat 实例都拥有一个引用成员 owner,其" -"指向 Person,而 Person 类是代理,同时 " -"lazy=\"true\"。如果你必须遍历整个 cats 集合,对每个元素调" -"用 getOwner() 方法,Hibernate 将会默认的执行 25 次 " -"SELECT 查询, 得到其 owner 的代理对象。这时,你可以通过在" -"映射文件的 Person 属性,显式声明 batch-size,改变其行为: " +msgid "Batch fetching for classes/entities is easier to understand. Consider the following example: at runtime you have 25 Cat instances loaded in a Session, and each Cat has a reference to its owner, a Person. The Person class is mapped with a proxy, lazy=\"true\". If you now iterate through all cats and call getOwner() on each, Hibernate will, by default, execute 25 SELECT statements to retrieve the proxied owners. You can tune this behavior by specifying a batch-size in the mapping of Person:" +msgstr "类/实体级别的批量抓取很容易理解。假设你在运行时将需要面对下面的问题:你在一个 Session 中载入了 25 个 Cat 实例,每个 Cat 实例都拥有一个引用成员 owner,其指向 Person,而 Person 类是代理,同时 lazy=\"true\"。如果你必须遍历整个 cats 集合,对每个元素调用 getOwner() 方法,Hibernate 将会默认的执行 25 次 SELECT 查询, 得到其 owner 的代理对象。这时,你可以通过在映射文件的 Person 属性,显式声明 batch-size,改变其行为: " #. Tag: para #, no-c-format -msgid "" -"Hibernate will now execute only three queries: the pattern is 10, 10, 5." +msgid "Hibernate will now execute only three queries: the pattern is 10, 10, 5." msgstr "随之,Hibernate 将只需要执行三次查询,分别为 10、10、 5。 " #. Tag: para #, no-c-format -msgid "" -"You can also enable batch fetching of collections. For example, if each " -"Person has a lazy collection of Cats, " -"and 10 persons are currently loaded in the Session, " -"iterating through all persons will generate 10 SELECTs, " -"one for every call to getCats(). If you enable batch " -"fetching for the cats collection in the mapping of " -"Person, Hibernate can pre-fetch collections:" -msgstr "" -"你也可以在集合级别定义批量抓取。例如,如果每个 Person 都拥" -"有一个延迟载入的 Cats 集合, 现在,Sesssion 中载入了 10 个 person 对象,遍历 person 集合将会引起 10 次 " -"SELECT 查询,每次查询都会调用 getCats() 方法。如果你在 Person 的映射定义部分,允许对 " -"cats 批量抓取,那么,Hibernate 将可以预先抓取整个集合。请" -"看例子: " +msgid "You can also enable batch fetching of collections. For example, if each Person has a lazy collection of Cats, and 10 persons are currently loaded in the Session, iterating through all persons will generate 10 SELECTs, one for every call to getCats(). If you enable batch fetching for the cats collection in the mapping of Person, Hibernate can pre-fetch collections:" +msgstr "你也可以在集合级别定义批量抓取。例如,如果每个 Person 都拥有一个延迟载入的 Cats 集合, 现在,Sesssion 中载入了 10 个 person 对象,遍历 person 集合将会引起 10 次 SELECT 查询,每次查询都会调用 getCats() 方法。如果你在 Person 的映射定义部分,允许对 cats 批量抓取,那么,Hibernate 将可以预先抓取整个集合。请看例子: " #. Tag: para #, no-c-format -msgid "" -"With a batch-size of 3, Hibernate will load 3, 3, 3, 1 " -"collections in four SELECTs. Again, the value of the " -"attribute depends on the expected number of uninitialized collections in a " -"particular Session." -msgstr "" -"如果整个的 batch-size 是 3,那么 Hibernate 将会分四次执行 " -"SELECT 查询, 按照 3、3、3、1 的大小分别载入数据。这里的每" -"次载入的数据量还具体依赖于当前 Session 中未实例化集合的个" -"数。 " +msgid "With a batch-size of 3, Hibernate will load 3, 3, 3, 1 collections in four SELECTs. Again, the value of the attribute depends on the expected number of uninitialized collections in a particular Session." +msgstr "如果整个的 batch-size 是 3,那么 Hibernate 将会分四次执行 SELECT 查询, 按照 3、3、3、1 的大小分别载入数据。这里的每次载入的数据量还具体依赖于当前 Session 中未实例化集合的个数。 " #. Tag: para #, no-c-format -msgid "" -"Batch fetching of collections is particularly useful if you have a nested " -"tree of items, i.e. the typical bill-of-materials pattern. However, a " -"nested set or a materialized path " -"might be a better option for read-mostly trees." -msgstr "" -"如果你的模型中有嵌套的树状结构,例如典型的帐单-原料结构(bill-of-materials " -"pattern),集合的批量抓取是非常有用的。(尽管在更多情况下对树进行读取时," -"嵌套集合(nested set)原料路径" -"(materialized path)可能是更好的解决方法。)" +msgid "Batch fetching of collections is particularly useful if you have a nested tree of items, i.e. the typical bill-of-materials pattern. However, a nested set or a materialized path might be a better option for read-mostly trees." +msgstr "如果你的模型中有嵌套的树状结构,例如典型的帐单-原料结构(bill-of-materials pattern),集合的批量抓取是非常有用的。(尽管在更多情况下对树进行读取时,嵌套集合(nested set)原料路径(materialized path)可能是更好的解决方法。)" #. Tag: title #, no-c-format @@ -799,72 +392,43 @@ msgstr "使用子查询抓取(Using subselect fetching)" #. Tag: para #, no-c-format -msgid "" -"If one lazy collection or single-valued proxy has to be fetched, Hibernate " -"will load all of them, re-running the original query in a subselect. This " -"works in the same way as batch-fetching but without the piecemeal loading." -msgstr "" -"假若一个延迟集合或单值代理需要抓取,Hibernate 会使用一个 subselect 重新运行原" -"来的查询,一次性读入所有的实例。这和批量抓取的实现方法是一样的,不会有破碎的" -"加载。 " +msgid "If one lazy collection or single-valued proxy has to be fetched, Hibernate will load all of them, re-running the original query in a subselect. This works in the same way as batch-fetching but without the piecemeal loading." +msgstr "假若一个延迟集合或单值代理需要抓取,Hibernate 会使用一个 subselect 重新运行原来的查询,一次性读入所有的实例。这和批量抓取的实现方法是一样的,不会有破碎的加载。 " #. Tag: title -#, fuzzy, no-c-format +#, no-c-format msgid "Fetch profiles" -msgstr "抓取策略(Fetching strategies)" +msgstr "Fetch profile(抓取策略)" #. Tag: para #, no-c-format -msgid "" -"Another way to affect the fetching strategy for loading associated objects " -"is through something called a fetch profile, which is a named configuration " -"associated with the org.hibernate.SessionFactory but enabled, by name, on the org.hibernate." -"Session. Once enabled on a org.hibernate." -"Session, the fetch profile wull be in affect for that " -"org.hibernate.Session until it is explicitly " -"disabled." -msgstr "" +msgid "Another way to affect the fetching strategy for loading associated objects is through something called a fetch profile, which is a named configuration associated with the org.hibernate.SessionFactory but enabled, by name, on the org.hibernate.Session. Once enabled on a org.hibernate.Session, the fetch profile wull be in affect for that org.hibernate.Session until it is explicitly disabled." +msgstr "影响抓取加载相关对象的策略的另外一个方法是通过抓取配置(fetch profile),它是和 org.hibernate.SessionFactory 相关的配置但对 org.hibernate.Session 启用。一旦在 org.hibernate.Session 上启用,抓取配置将对这个 org.hibernate.Session 生效直至它被显性地禁用。" #. Tag: para #, no-c-format -msgid "" -"So what does that mean? Well lets explain that by way of an example. Say we " -"have the following mappings:" -msgstr "" +msgid "So what does that mean? Well lets explain that by way of an example. Say we have the following mappings:" +msgstr "这是什么意思呢?让我们通过一个例子进行解释。假设我们有下列映射:" #. Tag: para #, no-c-format -msgid "" -"Now normally when you get a reference to a particular customer, that " -"customer's set of orders will be lazy meaning we will not yet have loaded " -"those orders from the database. Normally this is a good thing. Now lets say " -"that you have a certain use case where it is more efficient to load the " -"customer and their orders together. One way certainly is to use \"dynamic " -"fetching\" strategies via an HQL or criteria queries. But another option is " -"to use a fetch profile to achieve that. Just add the following to your " -"mapping:" -msgstr "" +msgid "Now normally when you get a reference to a particular customer, that customer's set of orders will be lazy meaning we will not yet have loaded those orders from the database. Normally this is a good thing. Now lets say that you have a certain use case where it is more efficient to load the customer and their orders together. One way certainly is to use \"dynamic fetching\" strategies via an HQL or criteria queries. But another option is to use a fetch profile to achieve that. Just add the following to your mapping:" +msgstr "现在,当你获得某个特定客户的引用时,这个客户的订单将处于 lazy 状态,表示我们暂不会从数据库里加载这些订单。这样通常没有问题。假设在某种情况下,加载客户及其订单会更高效。其中一个办法当然是使用通过 HQL 或 Criteria 查询“动态抓取”的策略。另外一个方法就是使用抓取配置(Fetch Profile)。你可以在映射里加入下面的内容:" #. Tag: para #, no-c-format msgid "or even:" -msgstr "" +msgstr "甚至:" #. Tag: para #, no-c-format -msgid "" -"Now the following code will actually load both the customer and " -"their orders:" -msgstr "" +msgid "Now the following code will actually load both the customer and their orders:" +msgstr "下面的代码将实际上加载客户以及订单:" #. Tag: para #, no-c-format -msgid "" -"Currently only join style fetch profiles are supported, but they plan is to " -"support additional styles. See HHH-3414 for details." -msgstr "" +msgid "Currently only join style fetch profiles are supported, but they plan is to support additional styles. See HHH-3414 for details." +msgstr "目前只有 join 风格的抓取策略被支持,但其他风格也将被支持。更多细节请参考 HHH-3414。" #. Tag: title #, no-c-format @@ -873,39 +437,18 @@ msgstr "使用延迟属性抓取(Using lazy property fetching)" #. Tag: para #, no-c-format -msgid "" -"Hibernate3 supports the lazy fetching of individual properties. This " -"optimization technique is also known as fetch groups. " -"Please note that this is mostly a marketing feature; optimizing row reads is " -"much more important than optimization of column reads. However, only loading " -"some properties of a class could be useful in extreme cases. For example, " -"when legacy tables have hundreds of columns and the data model cannot be " -"improved." -msgstr "" -"Hibernate3 对单独的属性支持延迟抓取,这项优化技术也被称为组抓取" -"(fetch groups)。 请注意,该技术更多的属于市场特性。在实际应用" -"中,优化行读取比优化列读取更重要。但是,仅载入类的部分属性在某些特定情况下会" -"有用,例如在原有表中拥有几百列数据、数据模型无法改动的情况下。 " +msgid "Hibernate3 supports the lazy fetching of individual properties. This optimization technique is also known as fetch groups. Please note that this is mostly a marketing feature; optimizing row reads is much more important than optimization of column reads. However, only loading some properties of a class could be useful in extreme cases. For example, when legacy tables have hundreds of columns and the data model cannot be improved." +msgstr "Hibernate3 对单独的属性支持延迟抓取,这项优化技术也被称为组抓取(fetch groups)。 请注意,该技术更多的属于市场特性。在实际应用中,优化行读取比优化列读取更重要。但是,仅载入类的部分属性在某些特定情况下会有用,例如在原有表中拥有几百列数据、数据模型无法改动的情况下。 " #. Tag: para #, no-c-format -msgid "" -"To enable lazy property loading, set the lazy attribute " -"on your particular property mappings:" -msgstr "" -"可以在映射文件中对特定的属性设置 lazy,定义该属性为延迟载" -"入。" +msgid "To enable lazy property loading, set the lazy attribute on your particular property mappings:" +msgstr "可以在映射文件中对特定的属性设置 lazy,定义该属性为延迟载入。" #. Tag: para #, no-c-format -msgid "" -"Lazy property loading requires buildtime bytecode instrumentation. If your " -"persistent classes are not enhanced, Hibernate will ignore lazy property " -"settings and return to immediate fetching." -msgstr "" -"属性的延迟载入要求在其代码构建时加入二进制指示指令(bytecode " -"instrumentation),如果你的持久类代码中未含有这些指令, Hibernate 将会忽略这" -"些属性的延迟设置,仍然将其直接载入。 " +msgid "Lazy property loading requires buildtime bytecode instrumentation. If your persistent classes are not enhanced, Hibernate will ignore lazy property settings and return to immediate fetching." +msgstr "属性的延迟载入要求在其代码构建时加入二进制指示指令(bytecode instrumentation),如果你的持久类代码中未含有这些指令, Hibernate 将会忽略这些属性的延迟设置,仍然将其直接载入。 " #. Tag: para #, no-c-format @@ -914,23 +457,13 @@ msgstr "你可以在 Ant 的 Task 中,进行如下定义,对持久类代码 #. Tag: para #, no-c-format -msgid "" -"A different way of avoiding 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 " -"preferred solution." -msgstr "" -"还有一种可以优化的方法,它使用 HQL 或条件查询的投影(projection)特性,可以避" -"免读取非必要的列, 这一点至少对只读事务是非常有用的。它无需在代码构建时“二进" -"制指令”处理,因此是一个更加值得选择的解决方法。 " +msgid "A different way of avoiding 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 preferred solution." +msgstr "还有一种可以优化的方法,它使用 HQL 或条件查询的投影(projection)特性,可以避免读取非必要的列, 这一点至少对只读事务是非常有用的。它无需在代码构建时“二进制指令”处理,因此是一个更加值得选择的解决方法。 " #. Tag: para #, no-c-format -msgid "" -"You can force the usual eager fetching of properties using fetch " -"all properties in HQL." -msgstr "" -"有时你需要在 HQL 中通过抓取所有属性,强行抓取所有内容。 " +msgid "You can force the usual eager fetching of properties using fetch all properties in HQL." +msgstr "有时你需要在 HQL 中通过抓取所有属性,强行抓取所有内容。 " #. Tag: title #, no-c-format @@ -939,38 +472,13 @@ msgstr "二级缓存(The Second Level Cache)" #. Tag: para #, no-c-format -msgid "" -"A Hibernate Session is a transaction-level cache of " -"persistent data. It is possible to configure a cluster or JVM-level " -"(SessionFactory-level) cache on a class-by-class and " -"collection-by-collection basis. You can even plug in a clustered cache. Be " -"aware that caches are not aware of changes made to the persistent store by " -"another application. They can, however, be configured to regularly expire " -"cached data." -msgstr "" -"Hibernate 的 Session 在事务级别进行持久化数据的缓存操作。 " -"当然,也有可能分别为每个类(或集合),配置集群、或 JVM 级别" -"(SessionFactory 级别)的缓存。你甚至可以为之插入一个集群" -"的缓存。注意,缓存永远不知道其他应用程序对持久化仓库(数据库)可能进行的修改 " -"(即使可以将缓存数据设定为定期失效)。 " +msgid "A Hibernate Session is a transaction-level cache of persistent data. It is possible to configure a cluster or JVM-level (SessionFactory-level) cache on a class-by-class and collection-by-collection basis. You can even plug in a clustered cache. Be aware that caches are not aware of changes made to the persistent store by another application. They can, however, be configured to regularly expire cached data." +msgstr "Hibernate 的 Session 在事务级别进行持久化数据的缓存操作。 当然,也有可能分别为每个类(或集合),配置集群、或 JVM 级别(SessionFactory 级别)的缓存。你甚至可以为之插入一个集群的缓存。注意,缓存永远不知道其他应用程序对持久化仓库(数据库)可能进行的修改 (即使可以将缓存数据设定为定期失效)。 " #. Tag: para #, 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 org.hibernate.cache." -"CacheProvider using the property hibernate.cache." -"provider_class. Hibernate is bundled with a number of built-in " -"integrations with the open-source cache providers that are listed below. You " -"can also implement your own and plug it in as outlined above. Note that " -"versions prior to 3.2 use EhCache as the default cache provider." -msgstr "" -"通过在 hibernate.cache.provider_class 属性中指定 " -"org.hibernate.cache.CacheProvider 的某个实现的类名,你可以" -"选择让 Hibernate 使用哪个缓存实现。Hibernate 打包一些开源缓存实现,提供对它们" -"的内置支持(见下表)。除此之外,你也可以实现你自己的实现,将它们插入到系统" -"中。注意,在 3.2 版本之前,默认使用 EhCache 作为缓存实现,但从 3.2 起就不再这" -"样了。 " +msgid "You have the option to tell Hibernate which caching implementation to use by specifying the name of a class that implements org.hibernate.cache.CacheProvider using the property hibernate.cache.provider_class. Hibernate is bundled with a number of built-in integrations with the open-source cache providers that are listed below. You can also implement your own and plug it in as outlined above. Note that versions prior to 3.2 use EhCache as the default cache provider." +msgstr "通过在 hibernate.cache.provider_class 属性中指定 org.hibernate.cache.CacheProvider 的某个实现的类名,你可以选择让 Hibernate 使用哪个缓存实现。Hibernate 打包一些开源缓存实现,提供对它们的内置支持(见下表)。除此之外,你也可以实现你自己的实现,将它们插入到系统中。注意,在 3.2 版本之前,默认使用 EhCache 作为缓存实现,但从 3.2 起就不再这样了。 " #. Tag: title #, no-c-format @@ -1008,9 +516,9 @@ msgid "Hashtable (not intended for production use)" msgstr "Hashtable (not intended for production use)" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "org.hibernate.cache.HashtableCacheProvider" -msgstr "org.hibernate.cache.HashtableCacheProvider" +msgstr "org.hibernate.cache.HashtableCacheProvider " #. Tag: entry #, no-c-format @@ -1028,9 +536,9 @@ msgid "EHCache" msgstr "EHCache" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "org.hibernate.cache.EhCacheProvider" -msgstr "org.hibernate.cache.EhCacheProvider" +msgstr "org.hibernate.cache.EhCacheProvider " #. Tag: entry #, no-c-format @@ -1043,9 +551,9 @@ msgid "OSCache" msgstr "OSCache" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "org.hibernate.cache.OSCacheProvider" -msgstr "org.hibernate.cache.OSCacheProvider" +msgstr "org.hibernate.cache.OSCacheProvider " #. Tag: entry #, no-c-format @@ -1053,7 +561,7 @@ msgid "SwarmCache" msgstr "SwarmCache" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "org.hibernate.cache.SwarmCacheProvider" msgstr "org.hibernate.cache.SwarmCacheProvider" @@ -1073,9 +581,9 @@ msgid "JBoss Cache 1.x" msgstr "JBoss Cache 1.x" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "org.hibernate.cache.TreeCacheProvider" -msgstr "org.hibernate.cache.TreeCacheProvider" +msgstr "org.hibernate.cache.TreeCacheProvider " #. Tag: entry #, no-c-format @@ -1098,9 +606,9 @@ msgid "JBoss Cache 2" msgstr "JBoss Cache 2" #. Tag: entry -#, fuzzy, no-c-format +#, no-c-format msgid "org.hibernate.cache.jbc.JBossCacheRegionFactory" -msgstr "org.hibernate.cache.jbc2.JBossCacheRegionFactory" +msgstr "org.hibernate.cache.jbc.JBossCacheRegionFactory" #. Tag: entry #, no-c-format @@ -1114,64 +622,33 @@ msgstr "缓存映射(Cache mappings)" #. Tag: para #, no-c-format -msgid "" -"The <cache> element of a class or collection " -"mapping has the following form:" -msgstr "" -"类或者集合映射的“<cache> 元素”可以有下列形式:" +msgid "The <cache> element of a class or collection mapping has the following form:" +msgstr "类或者集合映射的“<cache> 元素”可以有下列形式:" #. Tag: para #, no-c-format -msgid "" -"usage (required) specifies the caching strategy: " -"transactional, read-write, " -"nonstrict-read-write or read-only" -msgstr "" -"usage(必须)说明了缓存的策略:transactionalread-writenonstrict-read-writeread-only。" +msgid "usage (required) specifies the caching strategy: transactional, read-write, nonstrict-read-write or read-only" +msgstr "usage(必须)说明了缓存的策略:transactionalread-writenonstrict-read-writeread-only。" #. Tag: para #, no-c-format -msgid "" -"region (optional: defaults to the class or collection " -"role name): specifies the name of the second level cache region" -msgstr "" -"region (可选,默认为类或者集合的名字(class or " -"collection role name)) 指定第二级缓存的区域名(name of the second level " -"cache region) " +msgid "region (optional: defaults to the class or collection role name): specifies the name of the second level cache region" +msgstr "region (可选,默认为类或者集合的名字(class or collection role name)) 指定第二级缓存的区域名(name of the second level cache region) " #. Tag: para #, no-c-format -msgid "" -"include (optional: defaults to all) " -"non-lazy: specifies that properties of the entity mapped " -"with lazy=\"true\" cannot be cached when attribute-level " -"lazy fetching is enabled" -msgstr "" -"include(可选,默认为 all) " -"non-lazy 当属性级延迟抓取打开时,标记为 lazy=" -"\"true\" 的实体的属性可能无法被缓存 " +msgid "include (optional: defaults to all) non-lazy: specifies that properties of the entity mapped with lazy=\"true\" cannot be cached when attribute-level lazy fetching is enabled" +msgstr "include(可选,默认为 allnon-lazy 当属性级延迟抓取打开时,标记为 lazy=\"true\" 的实体的属性可能无法被缓存 " #. Tag: para #, no-c-format -msgid "" -"Alternatively, you can specify <class-cache> and " -"<collection-cache> elements in hibernate." -"cfg.xml." -msgstr "" -"另外(首选?),你可以在hibernate.cfg.xml 中指定 " -"<class-cache><collection-cache> 元素。" +msgid "Alternatively, you can specify <class-cache> and <collection-cache> elements in hibernate.cfg.xml." +msgstr "另外(首选?),你可以在hibernate.cfg.xml 中指定 <class-cache><collection-cache> 元素。" #. Tag: para #, no-c-format -msgid "" -"The usage attribute specifies a cache " -"concurrency strategy." -msgstr "" -"这里的 usage 属性指明了缓存并发策略(cache " -"concurrency strategy)。" +msgid "The usage attribute specifies a cache concurrency strategy." +msgstr "这里的 usage 属性指明了缓存并发策略(cache concurrency strategy)。" #. Tag: title #, no-c-format @@ -1180,15 +657,8 @@ msgstr "策略:只读缓存(Strategy:read only)" #. Tag: para #, no-c-format -msgid "" -"If your application needs to read, but not modify, instances of a persistent " -"class, a read-only cache can be used. This is the " -"simplest and optimal performing strategy. It is even safe for use in a " -"cluster." -msgstr "" -"如果你的应用程序只需读取一个持久化类的实例,而无需对其修改, 那么就可以对其进" -"行只读 缓存。这是最简单,也是实用性最好的方法。甚至在集群" -"中,它也能完美地运作。 " +msgid "If your application needs to read, but not modify, instances of a persistent class, a read-only cache can be used. This is the simplest and optimal performing strategy. It is even safe for use in a cluster." +msgstr "如果你的应用程序只需读取一个持久化类的实例,而无需对其修改, 那么就可以对其进行只读 缓存。这是最简单,也是实用性最好的方法。甚至在集群中,它也能完美地运作。 " #. Tag: title #, no-c-format @@ -1197,28 +667,8 @@ msgstr "策略:读写/缓存(Strategy:read/write)" #. Tag: para #, no-c-format -msgid "" -"If the application needs to update data, a read-write " -"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 hibernate." -"transaction.manager_lookup_class and naming a strategy for " -"obtaining the JTA TransactionManager. In other " -"environments, you should ensure that the transaction is completed when " -"Session.close() or Session.disconnect() is called. If you want to use this strategy in a cluster, you " -"should ensure that the underlying cache implementation supports locking. The " -"built-in cache providers do not support locking." -msgstr "" -"如果应用程序需要更新数据,那么使用读/写缓存 比较合适。 如" -"果应用程序要求“序列化事务”的隔离级别(serializable transaction isolation " -"level),那么就决不能使用这种缓存策略。 如果在 JTA 环境中使用缓存,你必须指" -"定 hibernate.transaction.manager_lookup_class 属性的值, " -"通过它,Hibernate 才能知道该应用程序中 JTA 的TransactionManager的具体策略。 在其它环境中,你必须保证在 Session.close()、或 Session.disconnect() 调用前, 整个事务已经结" -"束。 如果你想在集群环境中使用此策略,你必须保证底层的缓存实现支持锁定" -"(locking)。Hibernate 内置的缓存策略并不支持锁定功能。 " +msgid "If the application needs to update data, a read-write 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 hibernate.transaction.manager_lookup_class and naming a strategy for obtaining the JTA TransactionManager. In other environments, you should ensure that the transaction is completed when Session.close() or Session.disconnect() is called. If you want to use this strategy in a cluster, you should ensure that the underlying cache implementation supports locking. The built-in cache providers do not support locking." +msgstr "如果应用程序需要更新数据,那么使用读/写缓存 比较合适。 如果应用程序要求“序列化事务”的隔离级别(serializable transaction isolation level),那么就决不能使用这种缓存策略。 如果在 JTA 环境中使用缓存,你必须指定 hibernate.transaction.manager_lookup_class 属性的值, 通过它,Hibernate 才能知道该应用程序中 JTA 的TransactionManager的具体策略。 在其它环境中,你必须保证在 Session.close()、或 Session.disconnect() 调用前, 整个事务已经结束。 如果你想在集群环境中使用此策略,你必须保证底层的缓存实现支持锁定(locking)。Hibernate 内置的缓存策略并不支持锁定功能。 " #. Tag: title #, no-c-format @@ -1227,22 +677,8 @@ msgstr "策略:非严格读/写缓存(Strategy:nonstrict read/write)" #. Tag: para #, no-c-format -msgid "" -"If the application only occasionally needs to update data (i.e. if it is " -"extremely unlikely that two transactions would try to update the same item " -"simultaneously), and strict transaction isolation is not required, a " -"nonstrict-read-write cache might be appropriate. If the " -"cache is used in a JTA environment, you must specify hibernate." -"transaction.manager_lookup_class. In other environments, you " -"should ensure that the transaction is completed when Session.close()" -" or Session.disconnect() is called." -msgstr "" -"如果应用程序只偶尔需要更新数据(也就是说,两个事务同时更新同一记录的情况很不" -"常见),也不需要十分严格的事务隔离,那么比较适合使用非严格读/写缓存" -"策略。如果在 JTA 环境中使用该策略,你必须为其指定 " -"hibernate.transaction.manager_lookup_class 属性的值,在其" -"它环境中,你必须保证在Session.close()、或 " -"Session.disconnect() 调用前,整个事务已经结束。 " +msgid "If the application only occasionally needs to update data (i.e. if it is extremely unlikely that two transactions would try to update the same item simultaneously), and strict transaction isolation is not required, a nonstrict-read-write cache might be appropriate. If the cache is used in a JTA environment, you must specify hibernate.transaction.manager_lookup_class. In other environments, you should ensure that the transaction is completed when Session.close() or Session.disconnect() is called." +msgstr "如果应用程序只偶尔需要更新数据(也就是说,两个事务同时更新同一记录的情况很不常见),也不需要十分严格的事务隔离,那么比较适合使用非严格读/写缓存策略。如果在 JTA 环境中使用该策略,你必须为其指定 hibernate.transaction.manager_lookup_class 属性的值,在其它环境中,你必须保证在Session.close()、或 Session.disconnect() 调用前,整个事务已经结束。 " #. Tag: title #, no-c-format @@ -1251,15 +687,8 @@ msgstr "策略:事务缓存(transactional)" #. Tag: para #, no-c-format -msgid "" -"The transactional cache strategy provides support for " -"fully transactional cache providers such as JBoss TreeCache. Such a cache " -"can only be used in a JTA environment and you must specify " -"hibernate.transaction.manager_lookup_class." -msgstr "" -"Hibernate 的事务缓存策略提供了全事务的缓存支持,例如对 " -"JBoss TreeCache 的支持。这样的缓存只能用于 JTA 环境中,你必须指定为其 " -"hibernate.transaction.manager_lookup_class 属性。 " +msgid "The transactional cache strategy provides support for fully transactional cache providers such as JBoss TreeCache. Such a cache can only be used in a JTA environment and you must specify hibernate.transaction.manager_lookup_class." +msgstr "Hibernate 的事务缓存策略提供了全事务的缓存支持,例如对 JBoss TreeCache 的支持。这样的缓存只能用于 JTA 环境中,你必须指定为其 hibernate.transaction.manager_lookup_class 属性。 " #. Tag: title #, no-c-format @@ -1268,26 +697,18 @@ msgstr "各种缓存提供商/缓存并发策略的兼容性" #. Tag: para #, no-c-format -msgid "" -"None of the cache providers support all of the cache concurrency strategies." -msgstr "" -"没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及" -"其各自适用的并发策略。 " +msgid "None of the cache providers support all of the cache concurrency strategies." +msgstr "没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及其各自适用的并发策略。 " #. Tag: para #, no-c-format -msgid "" -"The following table shows which providers are compatible with which " -"concurrency strategies." -msgstr "" -"没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及" -"其各自适用的并发策略。 " +msgid "The following table shows which providers are compatible with which concurrency strategies." +msgstr "没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及其各自适用的并发策略。 " #. Tag: title #, no-c-format msgid "Cache Concurrency Strategy Support" -msgstr "" -"各种缓存提供商对缓存并发策略的支持情况(Cache Concurrency Strategy Support)" +msgstr "各种缓存提供商对缓存并发策略的支持情况(Cache Concurrency Strategy Support)" #. Tag: entry #, no-c-format @@ -1316,125 +737,63 @@ msgstr "管理缓存(Managing the caches)" #. Tag: para #, no-c-format -msgid "" -"Whenever you pass an object to save(), update() or saveOrUpdate(), and whenever you retrieve an " -"object using load(), get(), " -"list(), iterate() or scroll()" -", that object is added to the internal cache of the " -"Session." -msgstr "" -"无论何时,当你给 save()update() 或 " -"saveOrUpdate() 方法传递一个对象时,或使用 load()" -"get()list()、" -"iterate()scroll() 方法获得一个对象" -"时,该对象都将被加入到 Session 的内部缓存中。 " +msgid "Whenever you pass an object to save(), update() or saveOrUpdate(), and whenever you retrieve an object using load(), get(), list(), iterate() or scroll(), that object is added to the internal cache of the Session." +msgstr "无论何时,当你给 save()update()saveOrUpdate() 方法传递一个对象时,或使用 load()get()list()iterate()scroll() 方法获得一个对象时,该对象都将被加入到 Session 的内部缓存中。 " #. Tag: para #, no-c-format -msgid "" -"When flush() 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 evict() method " -"can be used to remove the object and its collections from the first-level " -"cache." -msgstr "" -"当随后 flush() 方法被调用时,对象的状态会和数据库取得同步。如果你不希望此同步" -"操作发生,或者你正处理大量对象、需要对有效管理内存时,你可以调用 " -"evict() 方法,从一级缓存中去掉这些对象及其集合。 " +msgid "When flush() 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 evict() method can be used to remove the object and its collections from the first-level cache." +msgstr "当随后 flush() 方法被调用时,对象的状态会和数据库取得同步。如果你不希望此同步操作发生,或者你正处理大量对象、需要对有效管理内存时,你可以调用 evict() 方法,从一级缓存中去掉这些对象及其集合。 " #. Tag: para #, no-c-format -msgid "" -"The Session also provides a contains() " -"method to determine if an instance belongs to the session cache." -msgstr "" -"Session 还提供了一个 contains() 方法,用来判断某个实例是否" -"处于当前 session 的缓存中。" +msgid "The Session also provides a contains() method to determine if an instance belongs to the session cache." +msgstr "Session 还提供了一个 contains() 方法,用来判断某个实例是否处于当前 session 的缓存中。" #. Tag: para #, no-c-format -msgid "" -"To evict all objects from the session cache, call Session.clear()" -msgstr "" -"如若要把所有的对象从 session 缓存中彻底清除,则需要调用 Session." -"clear()。 " +msgid "To evict all objects from the session cache, call Session.clear()" +msgstr "如若要把所有的对象从 session 缓存中彻底清除,则需要调用 Session.clear()。 " #. Tag: para #, no-c-format -msgid "" -"For the second-level cache, there are methods defined on " -"SessionFactory for evicting the cached state of an " -"instance, entire class, collection instance or entire collection role." -msgstr "" -"对于二级缓存来说,在 SessionFactory 中定义了许多方法,清除" -"缓存中实例、整个类、集合实例或者整个集合。" +msgid "For the second-level cache, there are methods defined on SessionFactory for evicting the cached state of an instance, entire class, collection instance or entire collection role." +msgstr "对于二级缓存来说,在 SessionFactory 中定义了许多方法,清除缓存中实例、整个类、集合实例或者整个集合。" #. Tag: para #, no-c-format -msgid "" -"The CacheMode controls how a particular session interacts " -"with the second-level cache:" -msgstr "" -"CacheMode 参数用于控制具体的 Session 如何与二级缓存进行交" -"互。 " +msgid "The CacheMode controls how a particular session interacts with the second-level cache:" +msgstr "CacheMode 参数用于控制具体的 Session 如何与二级缓存进行交互。 " #. Tag: para #, no-c-format -msgid "" -"CacheMode.NORMAL: will read items from and write items to " -"the second-level cache" +msgid "CacheMode.NORMAL: will read items from and write items to the second-level cache" msgstr "CacheMode.NORMAL:从二级缓存中读、写数据。" #. Tag: para #, no-c-format -msgid "" -"CacheMode.GET: will read items from the second-level " -"cache. Do not write to the second-level cache except when updating data" -msgstr "" -"CacheMode.GET:从二级缓存中读取数据,仅在数据更新时对二级" -"缓存写数据。" +msgid "CacheMode.GET: will read items from the second-level cache. Do not write to the second-level cache except when updating data" +msgstr "CacheMode.GET:从二级缓存中读取数据,仅在数据更新时对二级缓存写数据。" #. Tag: para #, no-c-format -msgid "" -"CacheMode.PUT: will write items to the second-level " -"cache. Do not read from the second-level cache" -msgstr "" -"CacheMode.PUT:仅向二级缓存写数据,但不从二级缓存中读数" -"据。" +msgid "CacheMode.PUT: will write items to the second-level cache. Do not read from the second-level cache" +msgstr "CacheMode.PUT:仅向二级缓存写数据,但不从二级缓存中读数据。" #. Tag: para #, no-c-format -msgid "" -"CacheMode.REFRESH: will write items to the second-level " -"cache. Do not read from the second-level cache. Bypass the effect of " -"hibernate.cache.use_minimal_puts forcing a refresh of the " -"second-level cache for all items read from the database" -msgstr "" -"CacheMode.REFRESH:仅向二级缓存写数据,但不从二级缓存中读" -"数据。通过 hibernate.cache.use_minimal_puts 的设置,强制二" -"级缓存从数据库中读取数据,刷新缓存内容。" +msgid "CacheMode.REFRESH: will write items to the second-level cache. Do not read from the second-level cache. Bypass the effect of hibernate.cache.use_minimal_puts forcing a refresh of the second-level cache for all items read from the database" +msgstr "CacheMode.REFRESH:仅向二级缓存写数据,但不从二级缓存中读数据。通过 hibernate.cache.use_minimal_puts 的设置,强制二级缓存从数据库中读取数据,刷新缓存内容。" #. Tag: para #, no-c-format -msgid "" -"To browse the contents of a second-level or query cache region, use the " -"Statistics API:" -msgstr "" -"如若需要查看二级缓存或查询缓存区域的内容,你可以使用统计" -"(Statistics) API。" +msgid "To browse the contents of a second-level or query cache region, use the Statistics API:" +msgstr "如若需要查看二级缓存或查询缓存区域的内容,你可以使用统计(Statistics) API。" #. Tag: para #, no-c-format -msgid "" -"You will need to enable statistics and, optionally, force Hibernate to keep " -"the cache entries in a more readable format:" -msgstr "" -"此时,你必须手工打开统计选项。可选的,你可以让 Hibernate 更人工可读的方式维护" -"缓存内容。 " +msgid "You will need to enable statistics and, optionally, force Hibernate to keep the cache entries in a more readable format:" +msgstr "此时,你必须手工打开统计选项。可选的,你可以让 Hibernate 更人工可读的方式维护缓存内容。 " #. Tag: title #, no-c-format @@ -1442,121 +801,64 @@ msgid "The Query Cache" msgstr "查询缓存(The Query Cache)" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"Query result sets can also be cached. This is only useful for queries that " -"are run frequently with the same parameters." -msgstr "" -"查询的结果集也可以被缓存。只有当经常使用同样的参数进行查询时,这才会有些用" -"处。要使用查询缓存,首先你必须打开它: " +#, no-c-format +msgid "Query result sets can also be cached. This is only useful for queries that are run frequently with the same parameters." +msgstr "查询的结果集也可以被缓存。只有当经常使用同样的参数进行查询时,这才会有些用处。" #. Tag: title #, no-c-format msgid "Enabling query caching" -msgstr "" +msgstr "启用查询缓存" #. Tag: para #, no-c-format -msgid "" -"Caching of query results introduces some overhead in terms of your " -"applications normal transactional processing. For example, if you cache " -"results of a query against Person Hibernate will need to keep track of when " -"those results should be invalidated because changes have been committed " -"against Person. That, coupled with the fact that most applications simply " -"gain no benefit from caching query results, leads Hibernate to disable " -"caching of query results by default. To use query caching, you will first " -"need to enable the query cache:" -msgstr "" +msgid "Caching of query results introduces some overhead in terms of your applications normal transactional processing. For example, if you cache results of a query against Person Hibernate will need to keep track of when those results should be invalidated because changes have been committed against Person. That, coupled with the fact that most applications simply gain no benefit from caching query results, leads Hibernate to disable caching of query results by default. To use query caching, you will first need to enable the query cache:" +msgstr "按照应用程序的事务性处理过程,查询结果的缓存将产生一些负荷。例如,如果缓存针对 Person 的查询结果,在 Person 发生了修改时,Hibernate 将需要跟踪这些结果什么时候失效。因为大多数应用程序不会从缓存查询结果中受益,所以 Hibernate 在缺省情况下将禁用缓存。要使用查询缓存,你首先需要启用查询缓存:" #. Tag: para #, no-c-format msgid "This setting creates two new cache regions:" -msgstr "" +msgstr "这个设置创建了两个新的缓存 region:" #. Tag: para #, no-c-format -msgid "" -"org.hibernate.cache.StandardQueryCache, holding the " -"cached query results" -msgstr "" +msgid "org.hibernate.cache.StandardQueryCache, holding the cached query results" +msgstr "org.hibernate.cache.StandardQueryCache,保存缓存的查询结果" #. Tag: para #, no-c-format -msgid "" -"org.hibernate.cache.UpdateTimestampsCache, holding " -"timestamps of the most recent updates to queryable tables. These are used to " -"validate the results as they are served from the query cache." -msgstr "" +msgid "org.hibernate.cache.UpdateTimestampsCache, holding timestamps of the most recent updates to queryable tables. These are used to validate the results as they are served from the query cache." +msgstr "org.hibernate.cache.UpdateTimestampsCache,保存对可查询表的最近更新的时间戳。它们用于检验查询结果。" #. Tag: para #, no-c-format -msgid "" -"If you configure your underlying cache implementation to use expiry or " -"timeouts is very important that the cache timeout of the underlying cache " -"region for the UpdateTimestampsCache be set to a higher value than the " -"timeouts of any of the query caches. In fact, we recommend that the the " -"UpdateTimestampsCache region not be configured for expiry at all. Note, in " -"particular, that an LRU cache expiry policy is never appropriate." -msgstr "" - -#. Tag: para -#, fuzzy, no-c-format -msgid "" -"As mentioned above, most queries do not benefit from caching or their " -"results. So by default, individual queries are not cached even after " -"enabling query caching. To enable results caching for a particular query, " -"call org.hibernate.Query.setCacheable(true). This call " -"allows the query to look for existing cache results or add its results to " -"the cache when it is executed." -msgstr "" -"绝大多数的查询并不能从查询缓存中受益,所以 Hibernate 默认是不进行查询缓存的。" -"如若需要进行缓存,请调用 Query.setCacheable(true)方法。" -"这个调用会让查询在执行过程中时先从缓存中查找结果,并将自己的结果集放到缓存中" -"去。 " +msgid "If you configure your underlying cache implementation to use expiry or timeouts is very important that the cache timeout of the underlying cache region for the UpdateTimestampsCache be set to a higher value than the timeouts of any of the query caches. In fact, we recommend that the the UpdateTimestampsCache region not be configured for expiry at all. Note, in particular, that an LRU cache expiry policy is never appropriate." +msgstr "如果你配置底层缓存实现来使用过期(expiry)或超时(timeout),把用于 UpdateTimestampsCache 的底层缓存 region 的缓存超时时间设置为比任何查询缓存的超时时间更长的值是非常重要的。事实上,我们推荐根本不把 UpdateTimestampsCache region 用于 expiry。请注意,特别是 LRU 缓存 expiry 策略总是不合适的。" #. Tag: para #, no-c-format -msgid "" -"The query cache does not cache the state of the actual entities in the " -"cache; it caches only identifier values and results of value type. For this " -"reaso, the query cache should always be used in conjunction with the second-" -"level cache for those entities expected to be cached as part of a query " -"result cache (just as with collection caching)." -msgstr "" +msgid "As mentioned above, most queries do not benefit from caching or their results. So by default, individual queries are not cached even after enabling query caching. To enable results caching for a particular query, call org.hibernate.Query.setCacheable(true). This call allows the query to look for existing cache results or add its results to the cache when it is executed." +msgstr "如上面所提及的,绝大多数的查询并不能从查询缓存中受益,所以 Hibernate 默认是不进行查询缓存的。如若需要进行缓存,请调用 org.hibernate.Query.setCacheable(true)方法。这个调用会让查询在执行过程中时先从缓存中查找结果,并将自己的结果集放到缓存中去。 " + +#. Tag: para +#, no-c-format +msgid "The query cache does not cache the state of the actual entities in the cache; it caches only identifier values and results of value type. For this reaso, the query cache should always be used in conjunction with the second-level cache for those entities expected to be cached as part of a query result cache (just as with collection caching)." +msgstr "查询缓存不会缓存缓存中实际实体的状态;它只缓存标识符值和值类型的结果。出于这个原因,对于那些作为查询结果缓存的一部分(和集合缓存一样)进行缓存的实体,查询缓存应该和二级缓存一起使用。" #. Tag: title -#, fuzzy, no-c-format +#, no-c-format msgid "Query cache regions" -msgstr "Query Cache Supported" +msgstr "查询缓存区" #. Tag: para #, no-c-format -msgid "" -"If you require fine-grained control over query cache expiration policies, " -"you can specify a named cache region for a particular query by calling " -"Query.setCacheRegion()." -msgstr "" -"如果你要对查询缓存的失效政策进行精确的控制,你必须调用 Query." -"setCacheRegion() 方法,为每个查询指定其命名的缓存区域。 " +msgid "If you require fine-grained control over query cache expiration policies, you can specify a named cache region for a particular query by calling Query.setCacheRegion()." +msgstr "如果你要对查询缓存的失效政策进行精确的控制,你必须调用 Query.setCacheRegion() 方法,为每个查询指定其命名的缓存区域。 " #. Tag: para -#, fuzzy, no-c-format -msgid "" -"If you want to force the query cache to refresh one of its regions " -"(disregard any cached results it finds there) you can use org." -"hibernate.Query.setCacheMode(CacheMode.REFRESH). In conjunction " -"with the region you have defined for the given query, Hibernate will " -"selectively force the results cached in that particular region to be " -"refreshed. This is particularly useful in cases where underlying data may " -"have been updated via a separate process and is a far more efficient " -"alternative to bulk eviction of the region via org.hibernate." -"SessionFactory.evictQueries()." -msgstr "" -"如果查询需要强行刷新其查询缓存区域,那么你应该调用 Query." -"setCacheMode(CacheMode.REFRESH)方法。 这对在其他进程中修改底层数" -"据(例如,不通过Hibernate修改数据),或对那些需要选择性更新特定查询结果集的情" -"况特别有用。 这是对 SessionFactory.evictQueries() 的更为有" -"效的替代方案,同样可以清除查询缓存区域。" +#, no-c-format +msgid "If you want to force the query cache to refresh one of its regions (disregard any cached results it finds there) you can use org.hibernate.Query.setCacheMode(CacheMode.REFRESH). In conjunction with the region you have defined for the given query, Hibernate will selectively force the results cached in that particular region to be refreshed. This is particularly useful in cases where underlying data may have been updated via a separate process and is a far more efficient alternative to bulk eviction of the region via org.hibernate.SessionFactory.evictQueries()." +msgstr "如果查询需要强行刷新其查询缓存区域,那么你应该调用 org.hibernate.Query.setCacheMode(CacheMode.REFRESH)方法。 这对在其他进程中修改底层数据(例如,不通过Hibernate修改数据),或对那些需要选择性更新特定查询结果集的情况特别有用。这是对 org.hibernate.SessionFactory.evictQueries() 的更为有效的替代方案,同样可以清除查询缓存区域。" #. Tag: title #, no-c-format @@ -1565,13 +867,8 @@ msgstr "理解集合性能(Understanding Collection performance)" #. Tag: para #, no-c-format -msgid "" -"In the previous sections we have covered collections and their applications. " -"In this section we explore some more issues in relation to collections at " -"runtime." -msgstr "" -"在前面的章节里我们已经讨论了集合和相关应用程序。在本节我么将探索运行时集合的" -"更多问题。" +msgid "In the previous sections we have covered collections and their applications. In this section we explore some more issues in relation to collections at runtime." +msgstr "在前面的章节里我们已经讨论了集合和相关应用程序。在本节我么将探索运行时集合的更多问题。" #. Tag: title #, no-c-format @@ -1600,17 +897,8 @@ msgstr "多对多关联 " #. Tag: para #, 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 更新" -"或删除集合行数据的主键的结构”。因此得到了如下的分类:" +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 更新或删除集合行数据的主键的结构”。因此得到了如下的分类:" #. Tag: para #, no-c-format @@ -1629,131 +917,53 @@ msgstr "包(bags)" #. Tag: para #, no-c-format -msgid "" -"All indexed collections (maps, lists, and arrays) have a primary key " -"consisting of the <key> and <index> columns. In this case, collection updates are extremely efficient. " -"The primary key can be efficiently indexed and a particular row can be " -"efficiently located when Hibernate tries to update or delete it." -msgstr "" -"所有的有序集合类(maps,lists,arrays)都拥有一个由 <key><index> 组成的主键。这种情况下集合类的更" -"新是非常高效的 — 主键已经被有效的索引,因此当 Hibernate 试图更新或删除一行" -"时,可以迅速找到该行数据。 " +msgid "All indexed collections (maps, lists, and arrays) have a primary key consisting of the <key> and <index> columns. In this case, collection updates are extremely efficient. The primary key can be efficiently indexed and a particular row can be efficiently located when Hibernate tries to update or delete it." +msgstr "所有的有序集合类(maps,lists,arrays)都拥有一个由 <key><index> 组成的主键。这种情况下集合类的更新是非常高效的 — 主键已经被有效的索引,因此当 Hibernate 试图更新或删除一行时,可以迅速找到该行数据。 " #. Tag: para #, no-c-format -msgid "" -"Sets have a primary key consisting of <key> and " -"element columns. This can be less efficient for some types of collection " -"element, particularly composite elements or large text or binary fields, as " -"the database may not be able to index a complex primary key as efficiently. " -"However, for one-to-many or many-to-many associations, particularly in the " -"case of synthetic identifiers, it is likely to be just as efficient. If you " -"want SchemaExport to actually create the primary key of a " -"<set>, you must declare all columns as not-" -"null=\"true\"." -msgstr "" -"集合(sets)的主键由 <key> 和其他元素字段构成。对于" -"有些元素类型来说,这很低效,特别是组合元素或者大文本、大二进制字段;数据库可" -"能无法有效的对复杂的主键进行索引。另一方面,对于一对多、多对多关联,特别是合" -"成的标识符来说,集合也可以达到同样的高效性能。( 附注:如果你希望 " -"SchemaExport 为你的 <set> 创建主" -"键,你必须把所有的字段都声明为 not-null=\"true\"。) " +msgid "Sets have a primary key consisting of <key> and element columns. This can be less efficient for some types of collection element, particularly composite elements or large text or binary fields, as the database may not be able to index a complex primary key as efficiently. However, for one-to-many or many-to-many associations, particularly in the case of synthetic identifiers, it is likely to be just as efficient. If you want SchemaExport to actually create the primary key of a <set>, you must declare all columns as not-null=\"true\"." +msgstr "集合(sets)的主键由 <key> 和其他元素字段构成。对于有些元素类型来说,这很低效,特别是组合元素或者大文本、大二进制字段;数据库可能无法有效的对复杂的主键进行索引。另一方面,对于一对多、多对多关联,特别是合成的标识符来说,集合也可以达到同样的高效性能。( 附注:如果你希望 SchemaExport 为你的 <set> 创建主键,你必须把所有的字段都声明为 not-null=\"true\"。) " #. Tag: para #, no-c-format -msgid "" -"<idbag> mappings define a surrogate key, so they " -"are efficient to update. In fact, they are the best case." -msgstr "" -"<idbag> 映射定义了代理键,因此它总是可以很高效的被更" -"新。事实上,<idbag> 拥有着最好的性能表现。 " +msgid "<idbag> mappings define a surrogate key, so they are efficient to update. In fact, they are the best case." +msgstr "<idbag> 映射定义了代理键,因此它总是可以很高效的被更新。事实上,<idbag> 拥有着最好的性能表现。 " #. Tag: para #, no-c-format -msgid "" -"Bags are the worst case since they permit duplicate element values and, as " -"they have no index column, no primary key can be defined. Hibernate has no " -"way of distinguishing between duplicate rows. Hibernate resolves this " -"problem by completely removing in a single DELETE and " -"recreating the collection whenever it changes. This can be inefficient." -msgstr "" -"Bag 是最差的。因为 bag 允许重复的元素值,也没有索引字段,因此不可能定义主" -"键。 Hibernate 无法判断出重复的行。当这种集合被更改时,Hibernate 将会先完整地" -"移除 (通过一个(in a single DELETE))整个集合,然后再重" -"新创建整个集合。因此 Bag 是非常低效的。 " +msgid "Bags are the worst case since they permit duplicate element values and, as they have no index column, no primary key can be defined. Hibernate has no way of distinguishing between duplicate rows. Hibernate resolves this problem by completely removing in a single DELETE and recreating the collection whenever it changes. This can be inefficient." +msgstr "Bag 是最差的。因为 bag 允许重复的元素值,也没有索引字段,因此不可能定义主键。 Hibernate 无法判断出重复的行。当这种集合被更改时,Hibernate 将会先完整地移除 (通过一个(in a single DELETE))整个集合,然后再重新创建整个集合。因此 Bag 是非常低效的。 " #. Tag: para #, no-c-format -msgid "" -"For a one-to-many association, the \"primary key\" may not be the physical " -"primary key of the database table. Even in this case, the above " -"classification is still useful. It reflects how Hibernate \"locates\" " -"individual rows of the collection." -msgstr "" -"请注意:对于一对多关联来说,“主键”很可能并不是数据库表的物理主键。但就算在此" -"情况下,上面的分类仍然是有用的。(它仍然反映了 Hibernate 在集合的各数据行中是" -"如何进行“定位”的。) " +msgid "For a one-to-many association, the \"primary key\" may not be the physical primary key of the database table. Even in this case, the above classification is still useful. It reflects how Hibernate \"locates\" individual rows of the collection." +msgstr "请注意:对于一对多关联来说,“主键”很可能并不是数据库表的物理主键。但就算在此情况下,上面的分类仍然是有用的。(它仍然反映了 Hibernate 在集合的各数据行中是如何进行“定位”的。) " #. Tag: title #, no-c-format -msgid "" -"Lists, maps, idbags and sets are the most efficient collections to update" +msgid "Lists, maps, idbags and sets are the most efficient collections to update" msgstr "Lists,maps 和 sets 用于更新效率最高" #. Tag: para #, no-c-format -msgid "" -"From the discussion above, it should be clear that indexed collections and " -"sets allow the most efficient operation in terms of adding, removing and " -"updating elements." -msgstr "" -"根据我们上面的讨论,显然有序集合类型和大多数 set 都可以在增加、删除、修改元素" -"中拥有最好的性能。 " +msgid "From the discussion above, it should be clear that indexed collections and sets allow the most efficient operation in terms of adding, removing and updating elements." +msgstr "根据我们上面的讨论,显然有序集合类型和大多数 set 都可以在增加、删除、修改元素中拥有最好的性能。 " #. Tag: para #, 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 Set, Hibernate does not UPDATE a row when an element is \"changed\". Changes to a Set always work via INSERT and DELETE of individual rows. Once again, this consideration does not apply " -"to one-to-many associations." -msgstr "" -"可论证的是对于多对多关联、值数据集合而言,有序集合类比集合(set)有一个好处。" -"因为 Set 的内在结构, 如果“改变”了一个元素,Hibernate 并不" -"会更新(UPDATE)这一行。对于 Set 来说," -"只有在插入(INSERT)删除(DELETE) 操" -"作时“改变”才有效。再次强调:这段讨论对“一对多关联”并不适用。 " +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 Set, Hibernate does not UPDATE a row when an element is \"changed\". Changes to a Set always work via INSERT and DELETE of individual rows. Once again, this consideration does not apply to one-to-many associations." +msgstr "可论证的是对于多对多关联、值数据集合而言,有序集合类比集合(set)有一个好处。因为 Set 的内在结构, 如果“改变”了一个元素,Hibernate 并不会更新(UPDATE)这一行。对于 Set 来说,只有在插入(INSERT)删除(DELETE) 操作时“改变”才有效。再次强调:这段讨论对“一对多关联”并不适用。 " #. Tag: para #, no-c-format -msgid "" -"After observing that arrays cannot be lazy, you can conclude that lists, " -"maps and idbags are the most performant (non-inverse) collection types, with " -"sets not far behind. You can expect sets 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”的语义在关系模型中是最自然的。 " +msgid "After observing that arrays cannot be lazy, you can conclude that lists, maps and idbags are the most performant (non-inverse) collection types, with sets not far behind. You can expect sets 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”的语义在关系模型中是最自然的。 " #. Tag: para #, no-c-format -msgid "" -"However, in well-designed Hibernate domain models, most collections are in " -"fact one-to-many associations with inverse=\"true\". 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 领域模型中,我们通常可以看到更多的集合事实上是带" -"有 inverse=\"true\" 的一对多的关联。对于这些关联,更新操" -"作将会在多对一的这一端进行处理。因此对于此类情况,无需考虑其集合的更新性能。 " +msgid "However, in well-designed Hibernate domain models, most collections are in fact one-to-many associations with inverse=\"true\". 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 领域模型中,我们通常可以看到更多的集合事实上是带有 inverse=\"true\" 的一对多的关联。对于这些关联,更新操作将会在多对一的这一端进行处理。因此对于此类情况,无需考虑其集合的更新性能。 " #. Tag: title #, no-c-format @@ -1762,22 +972,8 @@ msgstr "Bag 和 list 是反向集合类中效率最高的" #. Tag: para #, no-c-format -msgid "" -"There is a particular case, however, in which bags, and also lists, are much " -"more performant than sets. For a collection with inverse=\"true\", 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, unlike a set, " -"Collection.add() or Collection.addAll() must always return true for a bag or List. This " -"can make the following common code much faster:" -msgstr "" -"在把 bag 扔进水沟之前,你必须了解,在一种情况下,bag 的性能(包括list)要比 " -"set 高得多:对于指明了 inverse=\"true\" 的集合类(比如说," -"标准的双向的一对多关联),我们可以在未初始化(fetch)包元素的情况下直接向 " -"bag 或 list 添加新元素! 这是因为 Collection.add())或者 " -"Collection.addAll() 方法对 bag 或者 List 总是返回 true(这" -"点与与 Set 不同)。因此对于下面的相同代码来说,速度会快得多。 " +msgid "There is a particular case, however, in which bags, and also lists, are much more performant than sets. For a collection with inverse=\"true\", 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, unlike a set, Collection.add() or Collection.addAll() must always return true for a bag or List. This can make the following common code much faster:" +msgstr "在把 bag 扔进水沟之前,你必须了解,在一种情况下,bag 的性能(包括list)要比 set 高得多:对于指明了 inverse=\"true\" 的集合类(比如说,标准的双向的一对多关联),我们可以在未初始化(fetch)包元素的情况下直接向 bag 或 list 添加新元素! 这是因为 Collection.add())或者 Collection.addAll() 方法对 bag 或者 List 总是返回 true(这点与与 Set 不同)。因此对于下面的相同代码来说,速度会快得多。 " #. Tag: title #, no-c-format @@ -1786,36 +982,18 @@ msgstr "一次性删除(One shot delete)" #. Tag: para #, no-c-format -msgid "" -"Deleting collection elements one by one can sometimes be extremely " -"inefficient. Hibernate knows not to do that in the case of an newly-empty " -"collection (if you called list.clear(), for example). In " -"this case, Hibernate will issue a single DELETE." -msgstr "" -"偶尔的,逐个删除集合类中的元素是相当低效的。Hibernate 并没那么笨,如果你想要" -"把整个集合都删除(比如说调用 list.clear()),Hibernate 只需要一个 DELETE 就搞" -"定了。 " +msgid "Deleting collection elements one by one can sometimes be extremely inefficient. Hibernate knows not to do that in the case of an newly-empty collection (if you called list.clear(), for example). In this case, Hibernate will issue a single DELETE." +msgstr "偶尔的,逐个删除集合类中的元素是相当低效的。Hibernate 并没那么笨,如果你想要把整个集合都删除(比如说调用 list.clear()),Hibernate 只需要一个 DELETE 就搞定了。 " #. Tag: para #, no-c-format -msgid "" -"Suppose you added a single element to a collection of size twenty and then " -"remove two elements. Hibernate will issue one INSERT " -"statement and two DELETE statements, unless the " -"collection is a bag. This is certainly desirable." -msgstr "" -"假设我们在一个长度为20的集合类中新增加了一个元素,然后再删除两个。Hibernate " -"会安排一条 INSERT 语句和两条 DELETE 语" -"句(除非集合类是一个 bag)。这当然是令人满意的。 " +msgid "Suppose you added a single element to a collection of size twenty and then remove two elements. Hibernate will issue one INSERT statement and two DELETE statements, unless the collection is a bag. This is certainly desirable." +msgstr "假设我们在一个长度为20的集合类中新增加了一个元素,然后再删除两个。Hibernate 会安排一条 INSERT 语句和两条 DELETE 语句(除非集合类是一个 bag)。这当然是令人满意的。 " #. Tag: para #, 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 个。则有两种处理方" -"式:" +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 个。则有两种处理方式:" #. Tag: para #, no-c-format @@ -1824,40 +1002,23 @@ msgstr "逐一的删除这 18 个数据,再新增三个;" #. Tag: para #, no-c-format -msgid "" -"remove the whole collection in one SQL DELETE and insert " -"all five current elements one by one" +msgid "remove the whole collection in one SQL DELETE and insert all five current elements one by one" msgstr "删除整个集合类(只用一句 DELETE 语句),然后逐一添加 5 个数据。" #. Tag: para #, no-c-format -msgid "" -"Hibernate cannot know that the second option is probably quicker. It would " -"probably be undesirable for Hibernate to be that intuitive as such behavior " -"might confuse database triggers, etc." -msgstr "" -"Hibernate 还没那么聪明,知道第二种选择可能会比较快。(也许让 Hibernate 不这么" -"聪明也是好事,否则可能会引发意外的“数据库触发器”之类的问题。)" +msgid "Hibernate cannot know that the second option is probably quicker. It would probably be undesirable for Hibernate to be that intuitive as such behavior might confuse database triggers, etc." +msgstr "Hibernate 还没那么聪明,知道第二种选择可能会比较快。(也许让 Hibernate 不这么聪明也是好事,否则可能会引发意外的“数据库触发器”之类的问题。)" #. Tag: para #, no-c-format -msgid "" -"Fortunately, you can force this behavior (i.e. the second strategy) at any " -"time by discarding (i.e. dereferencing) the original collection and " -"returning a newly instantiated collection with all the current elements." -msgstr "" -"幸运的是,你可以强制使用第二种策略。你需要取消原来的整个集合类(解除其引" -"用),然后再返回一个新的实例化的集合类,只包含需要的元素。有些时候这是非常有" -"用的。 " +msgid "Fortunately, you can force this behavior (i.e. the second strategy) at any time by discarding (i.e. dereferencing) the original collection and returning a newly instantiated collection with all the current elements." +msgstr "幸运的是,你可以强制使用第二种策略。你需要取消原来的整个集合类(解除其引用),然后再返回一个新的实例化的集合类,只包含需要的元素。有些时候这是非常有用的。 " #. Tag: para #, no-c-format -msgid "" -"One-shot-delete does not apply to collections mapped inverse=\"true" -"\"." -msgstr "" -"显然,一次性删除并不适用于被映射为 inverse=\"true\" 的集" -"合。 " +msgid "One-shot-delete does not apply to collections mapped inverse=\"true\"." +msgstr "显然,一次性删除并不适用于被映射为 inverse=\"true\" 的集合。 " #. Tag: title #, no-c-format @@ -1866,14 +1027,8 @@ msgstr "监测性能(Monitoring performance)" #. Tag: para #, 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 " -"SessionFactory." -msgstr "" -"没有监测和性能参数而进行优化是毫无意义的。Hibernate 为其内部操作提供了一系列" -"的示意图,因此可以从 每个 SessionFactory 抓取其统计数据。" +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 SessionFactory." +msgstr "没有监测和性能参数而进行优化是毫无意义的。Hibernate 为其内部操作提供了一系列的示意图,因此可以从 每个 SessionFactory 抓取其统计数据。" #. Tag: title #, no-c-format @@ -1882,64 +1037,33 @@ msgstr "监测 SessionFactory" #. Tag: para #, no-c-format -msgid "" -"You can access SessionFactory metrics in two ways. Your " -"first option is to call sessionFactory.getStatistics() " -"and read or display the Statistics yourself." -msgstr "" -"你可以有两种方式访问 SessionFactory 的数据记录,第一种就是" -"自己直接调用 sessionFactory.getStatistics() 方法读取、显示" -"统计数据。" +msgid "You can access SessionFactory metrics in two ways. Your first option is to call sessionFactory.getStatistics() and read or display the Statistics yourself." +msgstr "你可以有两种方式访问 SessionFactory 的数据记录,第一种就是自己直接调用 sessionFactory.getStatistics() 方法读取、显示统计数据。" #. Tag: para #, no-c-format -msgid "" -"Hibernate can also use JMX to publish metrics if you enable the " -"StatisticsService MBean. You can enable a single MBean " -"for all your SessionFactory or one per factory. See the " -"following code for minimalistic configuration examples:" -msgstr "" -"此外,如果你打开 StatisticsService MBean 选项,那么 " -"Hibernate 则可以使用 JMX 技术 发布其数据记录。你可以让应用中所有的 " -"SessionFactory 同时共享一个 MBean,也可以每个 " -"SessionFactory 分配一个 MBean。下面的代码即是其演示代码: " +msgid "Hibernate can also use JMX to publish metrics if you enable the StatisticsService MBean. You can enable a single MBean for all your SessionFactory or one per factory. See the following code for minimalistic configuration examples:" +msgstr "此外,如果你打开 StatisticsService MBean 选项,那么 Hibernate 则可以使用 JMX 技术 发布其数据记录。你可以让应用中所有的 SessionFactory 同时共享一个 MBean,也可以每个 SessionFactory 分配一个 MBean。下面的代码即是其演示代码: " #. Tag: para #, no-c-format -msgid "" -"You can activate and deactivate the monitoring for a " -"SessionFactory:" -msgstr "" -"你可以通过以下方法打开或关闭 SessionFactory 的监测功能: " +msgid "You can activate and deactivate the monitoring for a SessionFactory:" +msgstr "你可以通过以下方法打开或关闭 SessionFactory 的监测功能: " #. Tag: para #, no-c-format -msgid "" -"at configuration time, set hibernate.generate_statistics " -"to false" -msgstr "" -"在配置期间,将 hibernate.generate_statistics 设置为 " -"truefalse;" +msgid "at configuration time, set hibernate.generate_statistics to false" +msgstr "在配置期间,将 hibernate.generate_statistics 设置为 truefalse;" #. Tag: para #, no-c-format -msgid "" -"at runtime: sf.getStatistics().setStatisticsEnabled(true) " -"or hibernateStatsBean.setStatisticsEnabled(true)" -msgstr "" -"在运行期间,则可以可以通过 sf.getStatistics().setStatisticsEnabled" -"(true)hibernateStatsBean.setStatisticsEnabled(true)" +msgid "at runtime: sf.getStatistics().setStatisticsEnabled(true) or hibernateStatsBean.setStatisticsEnabled(true)" +msgstr "在运行期间,则可以可以通过 sf.getStatistics().setStatisticsEnabled(true)hibernateStatsBean.setStatisticsEnabled(true)" #. Tag: para #, no-c-format -msgid "" -"Statistics can be reset programmatically using the clear() method. A summary can be sent to a logger (info level) using the " -"logSummary() method." -msgstr "" -"你也可以在程序中调用 clear() 方法重置统计数据,调用 " -"logSummary() 在日志中记录(info 级别)其总结。 " +msgid "Statistics can be reset programmatically using the clear() method. A summary can be sent to a logger (info level) using the logSummary() method." +msgstr "你也可以在程序中调用 clear() 方法重置统计数据,调用 logSummary() 在日志中记录(info 级别)其总结。 " #. Tag: title #, no-c-format @@ -1948,85 +1072,38 @@ msgstr "数据记录(Metrics)" #. Tag: para #, no-c-format -msgid "" -"Hibernate provides a number of metrics, from basic information to more " -"specialized information that is only relevant in certain scenarios. All " -"available counters are described in the Statistics " -"interface API, in three categories:" -msgstr "" -"Hibernate 提供了一系列数据记录,其记录的内容包括从最基本的信息到与具体场景的" -"特殊信息。所有的测量值都可以由 Statistics 接口 API 进行访" -"问,主要分为三类:" +msgid "Hibernate provides a number of metrics, from basic information to more specialized information that is only relevant in certain scenarios. All available counters are described in the Statistics interface API, in three categories:" +msgstr "Hibernate 提供了一系列数据记录,其记录的内容包括从最基本的信息到与具体场景的特殊信息。所有的测量值都可以由 Statistics 接口 API 进行访问,主要分为三类:" #. Tag: para #, no-c-format -msgid "" -"Metrics related to the general Session usage, such as " -"number of open sessions, retrieved JDBC connections, etc." -msgstr "" -"使用 Session 的普通数据记录,例如打开的 Session 的个数、取" -"得的 JDBC 的连接数等;" +msgid "Metrics related to the general Session usage, such as number of open sessions, retrieved JDBC connections, etc." +msgstr "使用 Session 的普通数据记录,例如打开的 Session 的个数、取得的 JDBC 的连接数等;" #. Tag: para #, no-c-format -msgid "" -"Metrics related to the entities, collections, queries, and caches as a whole " -"(aka global metrics)." +msgid "Metrics related to the entities, collections, queries, and caches as a whole (aka global metrics)." msgstr "实体、集合、查询、缓存等内容的统一数据记录。" #. Tag: para #, no-c-format -msgid "" -"Detailed metrics related to a particular entity, collection, query or cache " -"region." +msgid "Detailed metrics related to a particular entity, collection, query or cache region." msgstr "和具体实体、集合、查询、缓存相关的详细数据记录" #. Tag: para #, no-c-format -msgid "" -"For example, you can check the cache hit, miss, and put ratio of entities, " -"collections and queries, and the average time a query needs. Be aware that " -"the number of milliseconds is subject to approximation in Java. Hibernate is " -"tied to the JVM precision and on some platforms this might only be accurate " -"to 10 seconds." -msgstr "" -"例如:你可以检查缓存的命中成功次数,缓存的命中失败次数,实体、集合和查询的使" -"用概率,查询的平均时间等。请注意 Java 中时间的近似精度是毫秒。Hibernate 的数" -"据精度和具体的 JVM 有关,在有些平台上其精度甚至只能精确到 10 秒。 " +msgid "For example, you can check the cache hit, miss, and put ratio of entities, collections and queries, and the average time a query needs. Be aware that the number of milliseconds is subject to approximation in Java. Hibernate is tied to the JVM precision and on some platforms this might only be accurate to 10 seconds." +msgstr "例如:你可以检查缓存的命中成功次数,缓存的命中失败次数,实体、集合和查询的使用概率,查询的平均时间等。请注意 Java 中时间的近似精度是毫秒。Hibernate 的数据精度和具体的 JVM 有关,在有些平台上其精度甚至只能精确到 10 秒。 " #. Tag: para #, 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 " -"Statistics, EntityStatistics, " -"CollectionStatistics, " -"SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more information. The following code is a simple " -"example:" -msgstr "" -"你可以直接使用 getter 方法得到全局数据记录(例如,和具体的实体、集合、缓存区" -"无关的数据),你也可以在具体查询中通过标记实体名、 或 HQL、SQL 语句得到某实体" -"的数据记录。请参考 StatisticsEntityStatisticsCollectionStatistics、" -"SecondLevelCacheStatisticsQueryStatistics 的 API 文档以抓取更多信息。下面的代码则是个简单的例子: " +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 Statistics, EntityStatistics, CollectionStatistics, SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more information. The following code is a simple example:" +msgstr "你可以直接使用 getter 方法得到全局数据记录(例如,和具体的实体、集合、缓存区无关的数据),你也可以在具体查询中通过标记实体名、 或 HQL、SQL 语句得到某实体的数据记录。请参考 StatisticsEntityStatisticsCollectionStatisticsSecondLevelCacheStatisticsQueryStatistics 的 API 文档以抓取更多信息。下面的代码则是个简单的例子: " #. Tag: para #, no-c-format -msgid "" -"You can work on all entities, collections, queries and region caches, by " -"retrieving the list of names of entities, collections, queries and region " -"caches using the following methods: getQueries(), " -"getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." -msgstr "" -"如果你想得到所有实体、集合、查询和缓存区的数据,你可以通过以下方法获得实体、" -"集合、查询和缓存区列表:getQueries()、" -"getEntityNames()getCollectionRoleNames()getSecondLevelCacheRegionNames()。" +msgid "You can work on all entities, collections, queries and region caches, by retrieving the list of names of entities, collections, queries and region caches using the following methods: getQueries(), getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." +msgstr "如果你想得到所有实体、集合、查询和缓存区的数据,你可以通过以下方法获得实体、集合、查询和缓存区列表:getQueries()getEntityNames()getCollectionRoleNames()getSecondLevelCacheRegionNames()。" #~ msgid "" #~ "This setting creates two new cache regions: one holding cached query " diff --git a/documentation/manual/src/main/docbook/zh-CN/legal_notice.po b/documentation/manual/src/main/docbook/zh-CN/legal_notice.po index 80e50e7810..4baf74dab1 100644 --- a/documentation/manual/src/main/docbook/zh-CN/legal_notice.po +++ b/documentation/manual/src/main/docbook/zh-CN/legal_notice.po @@ -1,11 +1,14 @@ -#, fuzzy msgid "" msgstr "" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-02-04T04:51:23\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2010-03-15 08:45+1000\n" +"Last-Translator: Xi HUANG \n" "Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" #. Tag: title #, no-c-format @@ -13,53 +16,24 @@ msgid "Legal Notice" msgstr "Legal Notice" #. Tag: para -#, fuzzy, no-c-format -msgid "" -"
1801 Varsity Drive Raleigh, " -"NC27606-2072USA " -"Phone: +1 919 754 3700 Phone: 888 733 4281 " -"Fax: +1 919 754 3701 PO Box 13588Research " -"Triangle Park, NC27709USA
" -msgstr "" -"
1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 " -"919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 " -"3701 PO Box 13588Research Triangle Park, " -"NC27709USA
" - -#. Tag: para -#, fuzzy, no-c-format -msgid "" -"Copyright 2007 by Red Hat, Inc. " -"This copyrighted material is made available to anyone wishing to use, " -"modify, copy, or redistribute it subject to the terms and conditions of the " -"GNU Lesser General " -"Public License, as published by the Free Software Foundation." -msgstr "" -"Copyright 2007 by Red Hat, Inc. " -"This copyrighted material is made available to anyone wishing to use, " -"modify, copy, or redistribute it subject to the terms and conditions of the " -"GNU Lesser General " -"Public License, as published by the Free Software Foundation." +#, no-c-format +msgid "
1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA
" +msgstr "
1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA
" #. Tag: para #, no-c-format -msgid "" -"Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red " -"Hat, Inc. in the United States and other countries." -msgstr "" -"Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red " -"Hat, Inc. in the United States and other countries." +msgid "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." +msgstr "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." #. Tag: para #, no-c-format -msgid "" -"All other trademarks referenced herein are the property of their respective " -"owners." -msgstr "" -"All other trademarks referenced herein are the property of their respective " -"owners." +msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." +msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." + +#. Tag: para +#, no-c-format +msgid "All other trademarks referenced herein are the property of their respective owners." +msgstr "All other trademarks referenced herein are the property of their respective owners." #. Tag: para #, no-c-format