Author: stliu
Date: 2010-02-08 01:30:52 -0500 (Mon, 08 Feb 2010)
New Revision: 18725
Added:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Author_Group.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Book_Info.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Feedback.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Hibernate_Core_Reference_Guide.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Revision_History.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/Preface.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Conventions.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Feedback.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Legal_Notice.po
Removed:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Hibernate_Reference.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/author_group.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/bibliography.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/preface.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/quickstart.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/legal_notice.po
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/architecture.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/association_mapping.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/basic_mapping.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/batch.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/best_practices.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/collection_mapping.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/component_mapping.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/configuration.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/events.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_mappings.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_parentchild.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_weblog.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/filters.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/inheritance_mapping.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/performance.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/persistent_classes.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/portability.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_criteria.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_hql.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_sql.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/session_api.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/toolset_guide.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/transactions.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/tutorial.po
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/xml.po
Log:
HHH-4729 Import work done by Red Hat translation team
Copied:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Author_Group.po (from
rev 18713,
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/author_group.po)
===================================================================
--- core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Author_Group.po
(rev 0)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Author_Group.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -0,0 +1,15 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: Collection_Mapping\n"
+"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-12-03T00:15:25\n"
+"PO-Revision-Date: 2007-02-26 10:59+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
Added: core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Book_Info.po
===================================================================
--- core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Book_Info.po
(rev 0)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Book_Info.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -0,0 +1,40 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: Collection_Mapping\n"
+"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-12-11T05:07:38\n"
+"PO-Revision-Date: 2010-01-11 10:10+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Tag: title
+#, no-c-format
+msgid "Hibernate Core Reference Guide"
+msgstr "Hibernate Core 参考指南"
+
+#. Tag: subtitle
+#, no-c-format
+msgid "by Gavin King, Christian Bauer, Max Rydahl Andersen, Emmanuel Bernard, and
Steve Ebersole and thanks to James Cobb (Graphic Design) and Cheyenne Weaver (Graphic
Design)"
+msgstr "by Gavin King, Christian Bauer, Max Rydahl Andersen, Emmanuel Bernard, and
Steve Ebersole and thanks to James Cobb (Graphic Design) and Cheyenne Weaver (Graphic
Design)"
+
+#. Tag: para
+#, fuzzy, no-c-format
+msgid "The JBoss Hibernate Core 3.3.2.GA Reference Guide"
+msgstr "Hibernate Core 参考指南"
+
+#~ msgid "for Use with JBoss Enterprise Application Platform 5.0"
+#~ msgstr "适用于 JBoss 企业级应用程序平台 5.0"
+#~ msgid ""
+#~ "The JBoss Enterprise Application Platform Edition of the Hibernate Core "
+#~ "Reference Guide"
+#~ msgstr "面向 JBoss 企业级应用程序平台的 Hibernate Core 参考指南版本"
+#~ msgid "&HOLDER;"
+#~ msgstr "&HOLDER;"
+
Added: core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Feedback.po
===================================================================
--- core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Feedback.po
(rev 0)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Feedback.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -0,0 +1,26 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: Collection_Mapping\n"
+"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-12-03T00:15:25\n"
+"PO-Revision-Date: 2010-01-11 10:11+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Tag: title
+#, no-c-format
+msgid "Feedback"
+msgstr "反馈"
+
+#. Tag: para
+#, no-c-format
+msgid "If you spot a typo in this guide, or if you have thought of a way to make
this manual better, we would love to hear from you! Submit a report in <ulink
url=\"http://jira.jboss.com/jira/browse/JBPAPP\">JIRA</ul... against
the Product: JBoss Enterprise Application Platform, Version:
<replaceable><version></replaceable>, Component:
<emphasis>Doc</emphasis>. If you have a suggestion for improving the
documentation, try to be as specific as possible. If you have found an error, include the
section number and some of the surrounding text so we can find it easily."
+msgstr "如果你在本指南里发现了印刷错误,或者你有改进该手册的建议,我们希望听到你的声音!请提交报告到 <ulink
url=\"http://jira.jboss.com/jira/browse/JBPAPP\">JIRA</ul...
并指明:产品:JBoss 企业级应用程序平台,
版本:<replaceable><version></replaceable>,组件:<emphasis>Doc</emphasis>。如果是改进本文档的建议,请尽量具体化;如果是其他错误,请指出章节号以及具体的内容,这样我们就可以尽快改正。"
+
Copied:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Hibernate_Core_Reference_Guide.po
(from rev 18713,
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Hibernate_Reference.po)
===================================================================
Deleted:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Hibernate_Reference.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Hibernate_Reference.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Hibernate_Reference.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,32 +0,0 @@
-#, fuzzy
-msgid ""
-msgstr ""
-"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-23 18:41+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-
-#. Tag: title
-#: Hibernate_Reference.xml:35
-#, no-c-format
-msgid "HIBERNATE - Relational Persistence for Idiomatic Java"
-msgstr "HIBERNATE - 符合Java习惯的关系数据库持久化"
-
-#. Tag: subtitle
-#: Hibernate_Reference.xml:36
-#, no-c-format
-msgid "Hibernate Reference Documentation"
-msgstr "Hibernate参考文档"
-
-#. Tag: holder
-#: Hibernate_Reference.xml:51
-#, no-c-format
-msgid "©rightHolder;"
-msgstr "©rightHolder;"
-
-#~ msgid "ROLES_OF_TRANSLATORS"
-#~ msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-#~ msgid "CREDIT_FOR_TRANSLATORS"
-#~ msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
Added:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Revision_History.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Revision_History.po
(rev 0)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/Revision_History.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -0,0 +1,26 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: Collection_Mapping\n"
+"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-12-11T05:07:38\n"
+"PO-Revision-Date: 2010-01-11 10:09+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Tag: title
+#, no-c-format
+msgid "Revision History"
+msgstr "修订历史记录"
+
+#. Tag: member
+#, no-c-format
+msgid "Merged with EAP5 and translations added"
+msgstr "和 EAP5 版本进行合并且添加了相关翻译"
+
Deleted:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/author_group.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/author_group.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/author_group.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,221 +0,0 @@
-# Language zh-CN translations for Branch package.
-# Automatically generated, 2009.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Branch 3_3\n"
-"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-16 18:47+0000\n"
-"PO-Revision-Date: 2009-06-16 18:47+0000\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Tag: author
-#: author_group.xml:27
-#, no-c-format
-msgid "<firstname>Gavin</firstname>
<surname>King</surname>"
-msgstr ""
-
-#. Tag: author
-#: author_group.xml:31
-#, no-c-format
-msgid "<firstname>Christian</firstname>
<surname>Bauer</surname>"
-msgstr ""
-
-#. Tag: author
-#: author_group.xml:35
-#, no-c-format
-msgid ""
-"<firstname>Max</firstname> <othername>Rydahl</othername>
<surname>Andersen</"
-"surname>"
-msgstr ""
-
-#. Tag: author
-#: author_group.xml:40
-#, no-c-format
-msgid ""
-"<author><firstname>Emmanuel</firstname>
<surname>Bernard</surname></author>"
-msgstr ""
-
-#. Tag: author
-#: author_group.xml:44
-#, no-c-format
-msgid "<firstname>Steve</firstname>
<surname>Ebersole</surname>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:49
-#, no-c-format
-msgid "<firstname>James</firstname>
<surname>Cobb</surname>"
-msgstr ""
-
-#. Tag: shortaffil
-#: author_group.xml:53 author_group.xml:60
-#, no-c-format
-msgid "Graphic Design"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:56
-#, no-c-format
-msgid "<firstname>Cheyenne</firstname>
<surname>Weaver</surname>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:69
-#, no-c-format
-msgid ""
-"<othername><![CDATA[Bernardo Antonio Buffa
Colomé]]></othername> "
-"<email>kreimer(a)bbs.frc.utn.edu.ar</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:79
-#, no-c-format
-msgid "<firstname>Vincent</firstname>
<surname>Ricard</surname>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:83
-#, no-c-format
-msgid "<firstname>Sebastien</firstname>
<surname>Cesbron</surname>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:87
-#, no-c-format
-msgid "<firstname>Michael</firstname>
<surname>Courcy</surname>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:91
-#, no-c-format
-msgid "<firstname>Vincent</firstname>
<surname>Giguère</surname>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:95
-#, no-c-format
-msgid "<firstname>Baptiste</firstname>
<surname>Mathus</surname>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:99
-#, no-c-format
-msgid ""
-"<othercredit><firstname>Emmanuel</firstname>
<surname>Bernard</surname></"
-"othercredit>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:103
-#, no-c-format
-msgid "<firstname>Anthony</firstname>
<surname>Patricio</surname>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:113
-#, no-c-format
-msgid ""
-"<firstname>Alvaro</firstname> <surname>Netto</surname>
"
-"<email>alvaronetto(a)cetip.com.br</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:118
-#, no-c-format
-msgid ""
-"<firstname>Anderson</firstname> <surname>Braulio</surname>
"
-"<email>andersonbraulio(a)gmail.com</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:123
-#, no-c-format
-msgid ""
-"<firstname>Daniel Vieira</firstname>
<surname>Costa</surname> "
-"<email>danielvc(a)gmail.com</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:128
-#, no-c-format
-msgid ""
-"<firstname>Francisco</firstname> <surname>gamarra</surname>
<email>francisco."
-"gamarra(a)gmail.com</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:133
-#, no-c-format
-msgid ""
-"<firstname>Gamarra</firstname>
<email>mauricio.gamarra(a)gmail.com</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:137
-#, no-c-format
-msgid ""
-"<firstname>Luiz Carlos</firstname>
<surname>Rodrigues</surname> "
-"<email>luizcarlos_rodrigues(a)yahoo.com.br</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:142
-#, no-c-format
-msgid ""
-"<firstname>Marcel</firstname> <surname>Castelo</surname>
<email>marcel."
-"castelo(a)gmail.com</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:147
-#, no-c-format
-msgid ""
-"<firstname>Paulo</firstname> <surname>César</surname>
<email>paulocol(a)gmail."
-"com</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:152
-#, no-c-format
-msgid ""
-"<firstname>Pablo L.</firstname> <surname>de
Miranda</surname> "
-"<email>pablolmiranda(a)gmail.com</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:157
-#, no-c-format
-msgid ""
-"<firstname>Renato</firstname> <surname>Deggau</surname>
<email>rdeggau(a)gmail."
-"com</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:162
-#, no-c-format
-msgid ""
-"<firstname>Rogério</firstname> <surname>Araújo</surname>
"
-"<email>rgildoaraujo(a)yahoo.com.br</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:167
-#, no-c-format
-msgid ""
-"<firstname>Wanderson</firstname>
<surname>Siqueira</surname> "
-"<email>wandersonxs(a)gmail.com</email>"
-msgstr ""
-
-#. Tag: othercredit
-#: author_group.xml:178
-#, no-c-format
-msgid ""
-"<firstname>Cao</firstname> <surname>Xiaogang</surname>
<affiliation> "
-"<orgname>RedSaga</orgname> </affiliation>
<contrib>Translation Lead</"
-"contrib> <email>caoxg(a)yahoo.com</email>"
-msgstr ""
Copied:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/Preface.po
(from rev 18713,
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/preface.po)
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/Preface.po
(rev 0)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/Preface.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -0,0 +1,96 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: Collection_Mapping\n"
+"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
+"POT-Creation-Date: 2010-01-08T04:07:17\n"
+"PO-Revision-Date: 2010-01-11 10:44+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Tag: title
+#, no-c-format
+msgid "Preface"
+msgstr "前言"
+
+#. Tag: para
+#, no-c-format
+msgid "Working with object-oriented software and a relational database can be
cumbersome and time consuming in today's enterprise environments. Hibernate is an
object/relational mapping tool for Java environments. The term object/relational mapping
(ORM) refers to the technique of mapping a data representation from an object model to a
relational data model with a SQL-based schema."
+msgstr "在今日的企业环境中,把面向对象的软件和关系型数据库一起使用可能是相当麻烦和浪费时间的。Hibernate 是一个面向 Java
环境的对象/关系型数据库映射工具。对象/关系型数据库映射(object/relational mapping,ORM)这个术语表示一种技术,用来把对象模型表示的对象映射到基于
SQL 的关系模型数据结构中去。"
+
+#. Tag: para
+#, no-c-format
+msgid "Hibernate not only takes care of the mapping from Java classes to database
tables (and from Java data types to SQL data types), but also provides data query and
retrieval facilities. It can also significantly reduce development time otherwise spent
with manual data handling in SQL and JDBC."
+msgstr "Hibernate 不仅管理 Java 类到数据库表的映射(包括 Java 数据类型到 SQL
数据类型的映射),还提供数据查询和获取数据的方法,可以大幅度减少开发时对人工使用 SQL 和 JDBC 处理数据的时间。 "
+
+#. Tag: para
+#, no-c-format
+msgid "Hibernate's goal is to relieve the developer from 95 percent of common
data persistence related programming tasks. Hibernate may not be the best solution for
data-centric applications that only use stored-procedures to implement the business logic
in the database, it is most useful with object-oriented domain models and business logic
in the Java-based middle-tier. However, Hibernate can certainly help you to remove or
encapsulate vendor-specific SQL code and will help with the common task of result set
translation from a tabular representation to a graph of objects."
+msgstr "Hibernate 的目标是对于开发者通常的数据持久化相关的编程任务,解放其中的
95%。对于以数据为中心的程序来说,它们往往只在数据库中使用存储过程来实现商业逻辑,Hibernate 可能不是最好的解决方案;对于那些在基于 Java
的中间层应用中,它们实现面向对象的业务模型和商业逻辑的应用,Hibernate 是最有用的。不管怎样,Hibernate 一定可以帮助你消除或者包装那些针对特定厂商的 SQL
代码,而且帮助你结果集从表格式的表示形式转换到一系列的对象中去。 "
+
+#. Tag: para
+#, no-c-format
+msgid "If you are new to Hibernate and Object/Relational Mapping or even Java,
please follow these steps:"
+msgstr "如果你对 Hibernate 和对象/关系型数据库映射还是个新手,甚至对 Java 也不熟悉,请按照下面的步骤来学习。"
+
+#. Tag: para
+#, no-c-format
+msgid "Read <xref linkend=\"tutorial\" /> for a tutorial with
step-by-step instructions. The source code for the tutorial is included in the
distribution in the <literal>doc/reference/tutorial/</literal>
directory."
+msgstr "阅读 <xref
linkend=\"tutorial\"/>,这是一篇包含详细的逐步知道的指南。本指南的源代码包含在发行包里,你可以在
<literal>doc/reference/tutorial/</literal> 目录下找到。 "
+
+#. Tag: para
+#, no-c-format
+msgid "Read <xref linkend=\"architecture\" /> to understand the
environments where Hibernate can be used."
+msgstr "阅读 <xref linkend=\"architecture\"/> 来理解 Hibernate 可以使用的环境。
"
+
+#. Tag: para
+#, no-c-format
+msgid "View the <literal>eg/</literal> directory in the Hibernate
distribution. It contains a simple standalone application. Copy your JDBC driver to the
<literal>lib/</literal> directory and edit
<literal>etc/hibernate.properties</literal>, specifying correct values for
your database. From a command prompt in the distribution directory, type
<literal>ant eg</literal> (using Ant), or under Windows, type
<literal>build eg</literal>."
+msgstr "查看 Hibernate 发行包中的 <literal>eg/</literal> 目录,里面有个一简单的独立运行的程序。把你的
JDBC 驱动复制到 <literal>lib/</literal> 目录并修改一下
<literal>etc/hibernate.properties</literal>,指定数据库的信息。然后进入命令行,切换到发行包的目录,输入
<literal>ant eg</literal>(使用 Ant),或者在 Windows 系统下使用 <literal>build
eg</literal>。 "
+
+#. Tag: para
+#, no-c-format
+msgid "Use this reference documentation as your primary source of information.
Consider reading <emphasis>Java Persistence with Hibernate</emphasis>
(
http://www.manning.com/bauer2) if you need more help with application design, or if you
prefer a step-by-step tutorial. Also visit
http://caveatemptor.hibernate.org and download
the example application for Java Persistence with Hibernate."
+msgstr "把这份文档作为你学习的主要信息来源。如果你需要应用程序设计方面的帮助或者你希望有一个按部就班的指南,你可以考虑阅读
<emphasis>Hibernate in
Action</emphasis>(http://www.manning.com/bauer)。你也可以访问http://caveat...
并下载 Hibernate 的示例程序。 "
+
+#. Tag: para
+#, no-c-format
+msgid "FAQs are answered on the Hibernate website."
+msgstr "在 Hibernate 网站上可以找到问题和解答(FAQ)。"
+
+#. Tag: para
+#, no-c-format
+msgid "Third party demos, examples, and tutorials are linked on the Hibernate
website."
+msgstr "在 Hibernate 网站上还有第三方的演示、示例和教程的链接。"
+
+#. Tag: para
+#, no-c-format
+msgid "The Community Area on the Hibernate website is a good resource for design
patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, etc.)."
+msgstr "Hibernate 网站的社区是讨论关于设计模式以及很多整合方案(Tomcat、JBoss AS、Struts、EJB 等)的好地方。"
+
+#. Tag: para
+#, no-c-format
+msgid "If you have questions, use the user forum linked on the Hibernate website. We
also provide a JIRA issue tracking system for bug reports and feature requests. If you are
interested in the development of Hibernate, join the developer mailing list. If you are
interested in translating this documentation into your language, contact us on the
developer mailing list."
+msgstr "如果你有任何问题,请使用 Hibernate 网站上链接的用户论坛。我们也提供一个 JIRA 问题追踪系统,来搜集 bug
报告和新的功能请求。如果对开发 Hibernate 有兴趣,请加入开发者的邮件列表。如果你对翻译本文档感兴趣,请通过开发者的邮件列表来联系我们。 "
+
+#. Tag: para
+#, no-c-format
+msgid "Commercial development support, production support, and training for
Hibernate is available through JBoss Inc. (see
http://www.hibernate.org/SupportTraining/).
Hibernate is a Professional Open Source project and a critical component of the JBoss
Enterprise Middleware System (JEMS) suite of products."
+msgstr "商业开发、产品支持和 Hibernate 培训可以通过 JBoss Inc. 获得(请查阅:
http://www.hibernate.org/SupportTraining/)。Hibernate 是一个专业的开源项目,也是 JBoss 企业级中间件系统(JBoss
Enterprise Middleware System,JEMS)里的一个核心组件。 "
+
+#. Tag: title
+#, no-c-format
+msgid "Feedback"
+msgstr "反馈"
+
+#. Tag: para
+#, no-c-format
+msgid "Use <ulink
url=\"http://opensource.atlassian.com/projects/hibernate\">H...
JIRA</ulink> to report errors or request enhacements to this documentation."
+msgstr "用 <ulink
url=\"http://opensource.atlassian.com/projects/hibernate\">H...
JIRA</ulink> 来报告错误或改进本文档。"
+
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/architecture.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/architecture.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/architecture.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,611 +1,276 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:25\n"
+"PO-Revision-Date: 2010-01-11 10:12+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: architecture.xml:30
#, no-c-format
msgid "Architecture"
-msgstr "体系结构(Architecture)"
+msgstr "体系结构(Architecture)"
#. Tag: title
-#: architecture.xml:33
#, no-c-format
msgid "Overview"
-msgstr "概况(Overview)"
+msgstr "概况(Overview)"
#. Tag: para
-#: architecture.xml:35
-#, fuzzy, no-c-format
-msgid ""
-"The diagram below provides a high-level view of the Hibernate architecture:"
-msgstr "一个非常简要的Hibernate体系结构的概要图:"
+#, no-c-format
+msgid "The diagram below provides a high-level view of the Hibernate
architecture:"
+msgstr "下面的图表提供了 Hibernate 体系结构的高层视图:"
#. Tag: para
-#: architecture.xml:50
-#, fuzzy, 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非常灵活,且支持多"
-"种应用方案, 所以我们这只描述一下两种极端的情况。“轻型”的体系结构方案,要求应"
-"用程序提供自己的JDBC 连接并管理自己的事务。这种方案使用了Hibernate API的最小"
-"子集:"
+#, 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 非常灵活,且支持多种应用方案,
所以我们这只描述一下两种极端的情况:“最小”和“全面解决”的体系结构方案。"
#. Tag: para
-#: architecture.xml:56
-#, fuzzy, 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使用数据库和配置信息来为应用程序提供持久化服务(以"
-"及持久的对象)。"
+#, 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 如何使用数据库和配置信息来为应用程序提供持久化服务(以及持久的对象)。"
#. Tag: para
-#: architecture.xml:61
-#, fuzzy, 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 ""
-"我们来更详细地看一下Hibernate运行时体系结构。由于Hibernate非常灵活,且支持多"
-"种应用方案, 所以我们这只描述一下两种极端的情况。“轻型”的体系结构方案,要求应"
-"用程序提供自己的JDBC 连接并管理自己的事务。这种方案使用了Hibernate API的最小"
-"子集:"
+#, 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 的最小子集:"
#. Tag: para
-#: architecture.xml:78
-#, fuzzy, 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来处理这些细节。"
+#, 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 来处理这些细节。"
#. Tag: para
-#: architecture.xml:92
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Here are some definitions of the objects depicted in the diagrams:"
-msgstr "图中各个对象的定义如下: <placeholder-1/>"
+msgstr "图中各个对象的定义如下: "
#. Tag: term
-#: architecture.xml:97
#, no-c-format
msgid "SessionFactory
(<literal>org.hibernate.SessionFactory</literal>)"
msgstr "SessionFactory
(<literal>org.hibernate.SessionFactory</literal>)"
#. Tag: para
-#: architecture.xml:99
-#, fuzzy, no-c-format
-msgid ""
-"A threadsafe, immutable cache of compiled mappings for a single database. A "
-"factory for <literal>Session</literal> and a client of "
-"<literal>ConnectionProvider</literal>,
<literal>SessionFactory</literal> can "
-"hold an optional (second-level) cache of data that is reusable between "
-"transactions at a process, or cluster, level."
-msgstr ""
-"针对单个数据库映射关系经过编译后的内存镜像,是线程安全的(不可变)。 它是生成"
-"<literal>Session</literal>的工厂,本身要用到<literal>ConnectionProvider</"
-"literal>。 该对象可以在进程或集群的级别上,为那些事务之间可以重用的数据提供可"
-"选的二级缓存。"
+#, no-c-format
+msgid "A threadsafe, immutable cache of compiled mappings for a single database. A
factory for <literal>Session</literal> and a client of
<literal>ConnectionProvider</literal>,
<literal>SessionFactory</literal> can hold an optional (second-level) cache of
data that is reusable between transactions at a process, or cluster, level."
+msgstr "针对单个数据库映射关系经过编译后的内存镜像,是线程安全的(不可变)。 作为 <literal>Session</literal>
的工厂和 <literal>ConnectionProvider</literal>
的客户。<literal>SessionFactory</literal>
可以在进程或集群的级别上,为那些事务之间可以重用的数据提供可选的二级缓存。"
#. Tag: term
-#: architecture.xml:109
#, no-c-format
msgid "Session (<literal>org.hibernate.Session</literal>)"
msgstr "Session (<literal>org.hibernate.Session</literal>)"
#. Tag: para
-#: architecture.xml:111
-#, fuzzy, 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 <literal>Transaction</literal>.
<literal>Session</literal> "
-"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连接,也是<literal>Transaction</literal>的工厂。 其会持有一个针对持久"
-"化对象的必选(第一级)缓存,在遍历对象图或者根据持久化标识查找对象时会用到。"
+#, 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
<literal>Transaction</literal>. <literal>Session</literal> 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 连接,也是
<literal>Transaction</literal>
的工厂。它会持有一个针对持久化对象的必选(第一级)缓存,在遍历对象图或者根据持久化标识查找对象时会用到。"
#. Tag: term
-#: architecture.xml:121
#, no-c-format
msgid "Persistent objects and collections"
msgstr "持久的对象及其集合"
#. Tag: para
-#: architecture.xml:123
-#, fuzzy, 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 <literal>Session</literal>. Once the
"
-"<literal>Session</literal> 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,唯一特殊的是他们正与(仅仅一个)<literal>Session</"
-"literal>相关联。 一旦这个<literal>Session</literal>被关闭,这些对象就会脱离持"
-"久化状态,这样就可被应用程序的任何层自由使用。 (例如,用作跟表示层打交道的数"
-"据传输对象。)"
+#, 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
<literal>Session</literal>. Once the <literal>Session</literal> 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,唯一特殊的是他们正与(仅仅一个)<literal>Session</literal>
相关联。一旦这个 <literal>Session</literal>
被关闭,这些对象就会脱离持久化状态,这样就可被应用程序的任何层自由使用(例如,用作跟表示层打交道的数据传输对象)。"
#. Tag: term
-#: architecture.xml:133
#, no-c-format
msgid "Transient and detached objects and collections"
-msgstr "瞬态(transient)和脱管(detached)的对象及其集合"
+msgstr "瞬态(transient)和脱管(detached)的对象及其集合"
#. Tag: para
-#: architecture.xml:135
-#, fuzzy, no-c-format
-msgid ""
-"Instances of persistent classes that are not currently associated with a "
-"<literal>Session</literal>. They may have been instantiated by the
"
-"application and not yet persisted, or they may have been instantiated by a "
-"closed <literal>Session</literal>."
-msgstr ""
-"那些目前没有与session关联的持久化类实例。 他们可能是在被应用程序实例化后,尚"
-"未进行持久化的对象。 也可能是因为实例化他们的<literal>Session</literal>已经被"
-"关闭而脱离持久化的对象。"
+#, no-c-format
+msgid "Instances of persistent classes that are not currently associated with a
<literal>Session</literal>. They may have been instantiated by the application
and not yet persisted, or they may have been instantiated by a closed
<literal>Session</literal>."
+msgstr "那些目前没有与
<literal>Session</literal>关联的持久化类实例。他们可能是在被应用程序实例化后,尚未进行持久化的对象。也可能是因为实例化他们的
<literal>Session</literal> 已经被关闭而脱离持久化的对象。"
#. Tag: term
-#: architecture.xml:144
#, no-c-format
msgid "Transaction (<literal>org.hibernate.Transaction</literal>)"
-msgstr "事务Transaction
(<literal>org.hibernate.Transaction</literal>)"
+msgstr "事务 Transaction
(<literal>org.hibernate.Transaction</literal>)"
#. Tag: para
-#: architecture.xml:146
-#, fuzzy, 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 <literal>Session</literal>
"
-"might span several <literal>Transaction</literal>s in some cases.
However, "
-"transaction demarcation, either using the underlying API or "
-"<literal>Transaction</literal>, is never optional."
-msgstr ""
-"(可选的)应用程序用来指定原子操作单元范围的对象,它是单线程的,生命周期很"
-"短。 它通过抽象将应用从底层具体的JDBC、JTA以及CORBA事务隔离开。 某些情况下,"
-"一个<literal>Session</literal>之内可能包含多个<literal>Transaction</literal>"
-"对象。 尽管是否使用该对象是可选的,但无论是使用底层的API还是使用"
-"<literal>Transaction</literal>对象,事务边界的开启与关闭是必不可少的。"
+#, 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 <literal>Session</literal> might span several
<literal>Transaction</literal>s in some cases. However, transaction
demarcation, either using the underlying API or
<literal>Transaction</literal>, is never optional."
+msgstr "(可选的)应用程序用来指定原子操作单元范围的对象,它是单线程的,生命周期很短。它通过抽象将应用从底层具体的 JDBC、JTA 以及 CORBA
事务隔离开。某些情况下,一个 <literal>Session</literal> 之内可能包含多个
<literal>Transaction</literal> 对象。尽管是否使用该对象是可选的,但无论是使用底层的 API 还是使用
<literal>Transaction</literal> 对象,事务边界的开启与关闭是必需的。 "
#. Tag: term
-#: architecture.xml:157
#, no-c-format
-msgid ""
-"ConnectionProvider
(<literal>org.hibernate.connection.ConnectionProvider</"
-"literal>)"
-msgstr ""
-"ConnectionProvider
(<literal>org.hibernate.connection.ConnectionProvider</"
-"literal>)"
+msgid "ConnectionProvider
(<literal>org.hibernate.connection.ConnectionProvider</literal>)"
+msgstr "ConnectionProvider
(<literal>org.hibernate.connection.ConnectionProvider</literal>)"
#. Tag: para
-#: architecture.xml:159
-#, fuzzy, no-c-format
-msgid ""
-"(Optional) A factory for, and pool of, JDBC connections. It abstracts the "
-"application from underlying <literal>Datasource</literal> or "
-"<literal>DriverManager</literal>. It is not exposed to application, but
it "
-"can be extended and/or implemented by the developer."
-msgstr ""
-"(可选的)生成JDBC连接的工厂(同时也起到连接池的作用)。 它通过抽象将应用从底"
-"层的<literal>Datasource</literal>或<literal>DriverManager</literal>隔离开。
"
-"仅供开发者扩展/实现用,并不暴露给应用程序使用。"
+#, no-c-format
+msgid "(Optional) A factory for, and pool of, JDBC connections. It abstracts the
application from underlying <literal>Datasource</literal> or
<literal>DriverManager</literal>. It is not exposed to application, but it can
be extended and/or implemented by the developer."
+msgstr "(可选的)生成 JDBC 连接的工厂(同时也起到连接池的作用)。它通过抽象将应用从底层的
<literal>Datasource</literal> 或 <literal>DriverManager</literal>
隔离开。仅供开发者扩展/实现用,并不开放给应用程序使用。"
#. Tag: term
-#: architecture.xml:167
#, no-c-format
-msgid ""
-"TransactionFactory
(<literal>org.hibernate.TransactionFactory</literal>)"
-msgstr ""
-"TransactionFactory
(<literal>org.hibernate.TransactionFactory</literal>)"
+msgid "TransactionFactory
(<literal>org.hibernate.TransactionFactory</literal>)"
+msgstr "TransactionFactory
(<literal>org.hibernate.TransactionFactory</literal>)"
#. Tag: para
-#: architecture.xml:169
-#, fuzzy, no-c-format
-msgid ""
-"(Optional) A factory for <literal>Transaction</literal> instances. It
is not "
-"exposed to the application, but it can be extended and/or implemented by the
"
-"developer."
-msgstr ""
-"(可选的)生成<literal>Transaction</literal>对象实例的工厂。 仅供开发者扩展/"
-"实现用,并不暴露给应用程序使用。"
+#, no-c-format
+msgid "(Optional) A factory for <literal>Transaction</literal>
instances. It is not exposed to the application, but it can be extended and/or implemented
by the developer."
+msgstr "(可选的)生成 <literal>Transaction</literal>
对象实例的工厂。仅供开发者扩展/实现用,并不开发能够给应用程序使用。"
-#. Tag: emphasis
-#: architecture.xml:176
+#. Tag: term
#, no-c-format
-msgid "Extension Interfaces"
-msgstr "扩展接口"
+msgid "<emphasis>Extension Interfaces</emphasis>"
+msgstr "<emphasis>扩展接口</emphasis>"
#. Tag: para
-#: architecture.xml:178
-#, fuzzy, 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文档。"
+#, 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 文档。"
#. Tag: para
-#: architecture.xml:187
-#, fuzzy, no-c-format
-msgid ""
-"Given a \"minimal\" architecture, the application bypasses the "
-"<literal>Transaction</literal>/<literal>TransactionFactory</literal>
and/or "
-"<literal>ConnectionProvider</literal> APIs to communicate with JTA or
JDBC "
-"directly."
-msgstr ""
-"在特定“轻型”的体系结构中,应用程序可能绕过 <literal>Transaction</literal>/"
-"<literal>TransactionFactory</literal> 以及
<literal>ConnectionProvider</"
-"literal> 等API直接跟JTA或JDBC打交道。"
+#, no-c-format
+msgid "Given a \"minimal\" architecture, the application bypasses the
<literal>Transaction</literal>/<literal>TransactionFactory</literal>
and/or <literal>ConnectionProvider</literal> APIs to communicate with JTA or
JDBC directly."
+msgstr "在特定“最小”的体系结构中,应用程序可能绕过
<literal>Transaction</literal>/<literal>TransactionFactory</literal>
以及 <literal>ConnectionProvider</literal> 等 API 直接跟 JTA 或 JDBC 打交道。"
#. Tag: title
-#: architecture.xml:195
#, no-c-format
msgid "Instance states"
msgstr "实例状态"
#. Tag: para
-#: architecture.xml:196
-#, fuzzy, 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 <emphasis>persistence
context</"
-"emphasis>. The Hibernate <literal>Session</literal> object is the
"
-"persistence context. The three different states are as follows:"
-msgstr ""
-"一个持久化类的实例可能处于三种不同状态中的某一种。 这三种状态的定义则与所谓的"
-"<emphasis>持久化上下文(persistence context)</emphasis>有关。 Hibernate的"
-"<literal>Session</literal>对象就是这个所谓的持久化上下文:"
+#, 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 <emphasis>persistence
context</emphasis>. The Hibernate <literal>Session</literal> object is
the persistence context. The three different states are as follows:"
+msgstr "一个持久化类的实例可能处于三种不同状态中的某一种。这三种状态的定义则与所谓的<emphasis>持久化上下文(persistence
context)</emphasis>有关。Hibernate 的 <literal>Session</literal>
对象就是这个所谓的持久化上下文。这三种不同的状态如下:"
#. Tag: term
-#: architecture.xml:204
#, no-c-format
msgid "transient"
msgstr "瞬态(transient)"
#. Tag: para
-#: architecture.xml:206
-#, fuzzy, no-c-format
-msgid ""
-"The instance is not associated with any persistence context. It has no "
-"persistent identity or primary key value."
-msgstr "该实例从未与任何持久化上下文关联过。它没有持久化标识(相当于主键值)。"
+#, no-c-format
+msgid "The instance is not associated with any persistence context. It has no
persistent identity or primary key value."
+msgstr "该实例从未与任何持久化上下文关联过。它没有持久化标识(相当于主键值)。 "
#. Tag: term
-#: architecture.xml:214
#, no-c-format
msgid "persistent"
-msgstr "持久化(persistent)"
+msgstr "持久化(persistent)"
#. Tag: para
-#: architecture.xml:216
-#, fuzzy, 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 "
-"<emphasis>guarantees</emphasis> that persistent identity is equivalent
to "
-"Java identity in relation to the in-memory location of the object."
-msgstr ""
-"实例目前与某个持久化上下文有关联。 它拥有持久化标识(相当于主键值),并且可能"
-"在数据库中有一个对应的行。 对于某一个特定的持久化上下文,Hibernate<emphasis>"
-"保证</emphasis>持久化标识与Java标识(其值代表对象在内存中的位置)等价。"
+#, 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
<emphasis>guarantees</emphasis> that persistent identity is equivalent to Java
identity in relation to the in-memory location of the object."
+msgstr "实例目前与某个持久化上下文有关联。它拥有持久化标识(相当于主键值),并且可能在数据库中有一个对应的行。对于某一个特定的持久化上下文,Hibernate
<emphasis>保证</emphasis> 持久化标识与 Java 标识(其值代表对象在内存中的位置)等价。 "
#. Tag: term
-#: architecture.xml:228
#, no-c-format
msgid "detached"
-msgstr "脱管(detached)"
+msgstr "脱管(detached)"
#. Tag: para
-#: architecture.xml:230
-#, fuzzy, 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标识的关"
-"系。"
+#, 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 标识的关系。 "
#. Tag: title
-#: architecture.xml:245
#, no-c-format
msgid "JMX Integration"
-msgstr "JMX整合"
+msgstr "JMX 整合"
#. Tag: para
-#: architecture.xml:247
-#, fuzzy, 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:
<literal>org.hibernate.jmx.HibernateService</"
-"literal>."
-msgstr ""
-"JMX是管理Java组件(Java components)的J2EE标准。 Hibernate 可以通过一个JMX标准"
-"服务来管理。 在这个发行版本中,我们提供了一个MBean接口的实现,即 <literal>org."
-"hibernate.jmx.HibernateService</literal>。"
+#, 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: <literal>org.hibernate.jmx.HibernateService</literal>."
+msgstr "JMX 是管理 Java 组件的 J2EE 标准。Hibernate 可以通过一个 JMX 标准服务来管理。在这个发行版本中,我们提供了一个 MBean
接口的实现,即 <literal>org.hibernate.jmx.HibernateService</literal>。 "
#. Tag: para
-#: architecture.xml:253
-#, fuzzy, 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用户指南。 我们现在说一下在Jboss应用服务器上,使用JMX来部署Hibernate的好"
-"处:"
+#, 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 也提供如下好处:"
#. Tag: para
-#: architecture.xml:261
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Session Management</emphasis>: the Hibernate
<literal>Session</"
-"literal>'s life cycle can be automatically bound to the scope of a JTA
"
-"transaction. This means that you no longer have to manually open and close "
-"the <literal>Session</literal>; 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 <literal>Transaction</literal> API for this). You
call "
-"the <literal>HibernateContext</literal> to access a
<literal>Session</"
-"literal>."
-msgstr ""
-"<emphasis>Session管理:</emphasis>
Hibernate的<literal>Session</literal>对象"
-"的生命周期可以 自动跟一个JTA事务边界绑定。这意味着你无需手工开关"
-"<literal>Session</literal>了, 这项 工作会由JBoss EJB 拦截器来完成。你再也不用"
-"担心你的代码中的事务边界了(除非你想利用Hibernate提供可选 的"
-"<literal>Transaction</literal> API来自己写一个便于移植的的持久层)。 你通过调"
-"用<literal>HibernateContext</literal>来访问<literal>Session</literal>。"
+#, no-c-format
+msgid "<emphasis>Session Management</emphasis>: the Hibernate
<literal>Session</literal>'s life cycle can be automatically bound to the
scope of a JTA transaction. This means that you no longer have to manually open and close
the <literal>Session</literal>; 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
<literal>Transaction</literal> API for this). You call the
<literal>HibernateContext</literal> to access a
<literal>Session</literal>."
+msgstr "<emphasis>会话管理:</emphasis> Hibernate 的
<literal>Session</literal> 对象的生命周期可以 自动跟一个 JTA 事务边界绑定。这意味着你无需手工开关
<literal>Session</literal> 了, 这项工作会由 JBoss EJB
拦截器来完成。你再也不用担心你的代码中的事务边界了(除非你想利用 Hibernate 提供可选的
<literal>Transaction</literal> API 来自己写一个便于移植的的持久层)。你通过调用
<literal>HibernateContext</literal> 来访问
<literal>Session</literal>。"
#. Tag: para
-#: architecture.xml:273
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>HAR deployment</emphasis>: 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 "
-"<literal>SessionFactory</literal>. 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 ""
-"<emphasis>HAR 部署:</emphasis> 通常情况下,你会使用JBoss的服务部署描述符(在"
-"EAR或/和SAR文件中)来部署Hibernate JMX服务。 这种部署方式支持所有常见的"
-"Hibernate <literal>SessionFactory</literal>的配置选项。 不过,你仍需在部署描"
-"述符中,列出你所有的映射文件的名字。如果你使用HAR部署方式, JBoss 会自动探测出"
-"你的HAR文件中所有的映射文件。"
+#, no-c-format
+msgid "<emphasis>HAR deployment</emphasis>: 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
<literal>SessionFactory</literal>. 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 "<emphasis>HAR 部署:</emphasis> 通常情况下,你会使用 JBoss 的服务部署描述符(在 EAR 或/和
SAR 文件中)来部署 Hibernate JMX 服务。这种部署方式支持所有常见的 Hibernate
<literal>SessionFactory</literal> 的配置选项。不过,你仍需在部署描述符中,列出你所有的映射文的名字。如果你使用 HAR
部署方式, JBoss 会自动探测出你的 HAR 文件中所有的映射文件。"
#. Tag: para
-#: architecture.xml:284
#, no-c-format
-msgid ""
-"Consult the JBoss AS user guide for more information about these options."
-msgstr "这些选项更多的描述,请参考JBoss 应用程序用户指南。"
+msgid "Consult the JBoss AS user guide for more information about these
options."
+msgstr "这些选项更多的描述,请参考 JBoss 应用程序用户指南。"
#. Tag: para
-#: architecture.xml:288
-#, fuzzy, no-c-format
-msgid ""
-"Another feature available as a JMX service is runtime Hibernate statistics. "
-"See <xref linkend=\"configuration-optional-statistics\"/> for more
"
-"information."
-msgstr ""
-"将Hibernate以部署为JMX服务的另一个好处,是可以查看Hibernate的运行时统计信息。"
-"参看 <xref linkend=\"configuration-optional-statistics\"/>."
+#, no-c-format
+msgid "Another feature available as a JMX service is runtime Hibernate statistics.
See <xref linkend=\"configuration-optional-statistics\" /> for more
information."
+msgstr "将 Hibernate 以部署为 JMX 服务的另一个好处是可以查看 Hibernate 的运行时统计信息。参看 <xref
linkend=\"configuration-optional-statistics\"/>。"
#. Tag: title
-#: architecture.xml:295
#, no-c-format
msgid "JCA Support"
-msgstr "对JCA的支持"
+msgstr "对 JCA 的支持"
#. Tag: para
-#: architecture.xml:296
-#, fuzzy, 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的支持,仍处于实验性阶段。"
+#, 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
的支持,仍处于实验性阶段。"
#. Tag: title
-#: architecture.xml:303
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Contextual sessions"
-msgstr "上下文相关的(Contextual)Session"
+msgstr "上下文相关的会话(Contextual Session)"
#. Tag: para
-#: architecture.xml:304
-#, fuzzy, 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 <literal>ThreadLocal</literal>-based
contextual "
-"sessions, helper classes such as <literal>HibernateUtil</literal>, or
"
-"utilized third-party frameworks, such as Spring or Pico, which provided "
-"proxy/interception-based contextual sessions."
-msgstr ""
-"使用Hibernate的大多数应用程序需要某种形式的“上下文相关的” session,特定的"
-"session在整个特定的上下文范围内始终有效。然而,对不同类型的应用程序而言,要为"
-"什么是组成这种“上下文”下一个定义通常是困难的;不同的上下文对“当前”这个概念定"
-"义了不同的范围。在3.0版本之前,使用Hibernate的程序要么采用自行编写的基于"
-"<literal>ThreadLocal</literal>的上下文session,要么采用"
-"<literal>HibernateUtil</literal>这样的辅助类,要么采用第三方框架(比如Spring"
-"或Pico),它们提供了基于代理(proxy)或者基于拦截器(interception)的上下文相关"
-"session。"
+#, 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
<literal>ThreadLocal</literal>-based contextual sessions, helper classes such
as <literal>HibernateUtil</literal>, or utilized third-party frameworks, such
as Spring or Pico, which provided proxy/interception-based contextual sessions."
+msgstr "使用 Hibernate
的大多数应用程序需要某种形式的“上下文相关的”会话,特定的会话在整个特定的上下文范围内始终有效。然而,对不同类型的应用程序而言,要为什么是组成这种“上下文”下一个定义通常是困难的;不同的上下文对“当前”这个概念定义了不同的范围。在
3.0 版本之前,使用 Hibernate 的程序要么采用自行编写的基于 <literal>ThreadLocal</literal>
的上下文会话,要么采用 <literal>HibernateUtil</literal> 这样的辅助类,要么采用第三方框架(比如 Spring 或
Pico),它们提供了基于代理(proxy)或者基于拦截器(interception)的上下文相关的会话。"
#. Tag: para
-#: architecture.xml:313
-#, fuzzy, no-c-format
-msgid ""
-"Starting with version 3.0.1, Hibernate added the
<literal>SessionFactory."
-"getCurrentSession()</literal> method. Initially, this assumed usage of
"
-"<literal>JTA</literal> transactions, where the
<literal>JTA</literal> "
-"transaction defined both the scope and context of a current session. Given "
-"the maturity of the numerous stand-alone <literal>JTA
TransactionManager</"
-"literal> implementations, most, if not all, applications should be using "
-"<literal>JTA</literal> transaction management, whether or not they are
"
-"deployed into a <literal>J2EE</literal> container. Based on that, the
"
-"<literal>JTA</literal>-based contextual sessions are all you need to
use."
-msgstr ""
-"从3.0.1版本开始,Hibernate增加了<literal>SessionFactory.getCurrentSession()</"
-"literal>方法。一开始,它假定了采用<literal>JTA</literal>事务,<literal>JTA</"
-"literal>事务定义了当前session的范围和上下文(scope and context)。Hibernate开发"
-"团队坚信,因为有好几个独立的<literal>JTA TransactionManager</literal>实现稳定"
-"可用,不论是否被部署到一个<literal>J2EE</literal>容器中,大多数(假若不是所有"
-"的)应用程序都应该采用<literal>JTA</literal>事务管理。基于这一点,采用"
-"<literal>JTA</literal>的上下文相关session可以满足你一切需要。"
+#, no-c-format
+msgid "Starting with version 3.0.1, Hibernate added the
<literal>SessionFactory.getCurrentSession()</literal> method. Initially, this
assumed usage of <literal>JTA</literal> transactions, where the
<literal>JTA</literal> transaction defined both the scope and context of a
current session. Given the maturity of the numerous stand-alone <literal>JTA
TransactionManager</literal> implementations, most, if not all, applications should
be using <literal>JTA</literal> transaction management, whether or not they
are deployed into a <literal>J2EE</literal> container. Based on that, the
<literal>JTA</literal>-based contextual sessions are all you need to
use."
+msgstr "从 3.0.1 版本开始,Hibernate 增加了
<literal>SessionFactory.getCurrentSession()</literal> 方法。一开始,它假定了采用
<literal>JTA</literal> 事务,<literal>JTA</literal> 事务定义了当前 session
的范围和上下文(scope 和 context)。因为有好几个独立的 <literal>JTA TransactionManager</literal>
实现稳定可用,不论是否被部署到一个 <literal>J2EE</literal> 容器中,大多数(假若不是所有的)应用程序都应该采用
<literal>JTA</literal> 事务管理。基于这一点,采用 <literal>JTA</literal>
的上下文相关的会话可以满足你一切需要。"
#. Tag: para
-#: architecture.xml:323
-#, fuzzy, no-c-format
-msgid ""
-"However, as of version 3.1, the processing behind
<literal>SessionFactory."
-"getCurrentSession()</literal> is now pluggable. To that end, a new extension
"
-"interface,
<literal>org.hibernate.context.CurrentSessionContext</literal>, "
-"and a new configuration parameter, <literal>hibernate."
-"current_session_context_class</literal>, have been added to allow "
-"pluggability of the scope and context of defining current sessions."
-msgstr ""
-"更好的是,从3.1开始,<literal>SessionFactory.getCurrentSession()</literal>的"
-"后台实现是可拔插的。因此,我们引入了新的扩展接口(<literal>org.hibernate."
-"context.CurrentSessionContext</literal>)和新的配置参数(<literal>hibernate."
-"current_session_context_class</literal>),以便对什么是“当前session”的范围和上"
-"下文(scope and context)的定义进行拔插。"
+#, no-c-format
+msgid "However, as of version 3.1, the processing behind
<literal>SessionFactory.getCurrentSession()</literal> is now pluggable. To
that end, a new extension interface,
<literal>org.hibernate.context.CurrentSessionContext</literal>, and a new
configuration parameter,
<literal>hibernate.current_session_context_class</literal>, have been added to
allow pluggability of the scope and context of defining current sessions."
+msgstr "更好的是,从 3.1
开始,<literal>SessionFactory.getCurrentSession()</literal>
的后台实现是可拔插的。因此,我们引入了新的扩展接口(<literal>org.hibernate.context.CurrentSessionContext</literal>)和新的配置参数(<literal>hibernate.current_session_context_class</literal>),以便对什么是当前会话的范围(scope)和上下文(context)的定义进行拔插。"
#. Tag: para
-#: architecture.xml:330
-#, fuzzy, no-c-format
-msgid ""
-"See the Javadocs for the <literal>org.hibernate.context."
-"CurrentSessionContext</literal> interface for a detailed discussion of its
"
-"contract. It defines a single method,
<literal>currentSession()</literal>, "
-"by which the implementation is responsible for tracking the current "
-"contextual session. Out-of-the-box, Hibernate comes with three "
-"implementations of this interface:"
-msgstr ""
-"请参阅<literal>org.hibernate.context.CurrentSessionContext</literal>接口的"
-"Javadoc,那里有关于它的契约的详细讨论。它定义了单一的方法,"
-"<literal>currentSession()</literal>,特定的实现用它来负责跟踪当前的上下文"
-"session。Hibernate内置了此接口的三种实现。"
+#, no-c-format
+msgid "See the Javadocs for the
<literal>org.hibernate.context.CurrentSessionContext</literal> interface for a
detailed discussion of its contract. It defines a single method,
<literal>currentSession()</literal>, by which the implementation is
responsible for tracking the current contextual session. Out-of-the-box, Hibernate comes
with three implementations of this interface:"
+msgstr "请参阅
<literal>org.hibernate.context.CurrentSessionContext</literal> 接口的
Javadoc,那里有关于它的契约的详细讨论。它定义了单一的方法,<literal>currentSession()</literal>,特定的实现用它来负责跟踪当前的上下文相关的会话。Hibernate
内置了此接口的三种实现:"
#. Tag: para
-#: architecture.xml:340
-#, fuzzy, no-c-format
-msgid ""
-"<literal>org.hibernate.context.JTASessionContext</literal>: current
sessions "
-"are tracked and scoped by a <literal>JTA</literal> transaction. The
"
-"processing here is exactly the same as in the older JTA-only approach. See "
-"the Javadocs for details."
-msgstr ""
-"<literal>org.hibernate.context.JTASessionContext</literal> -
当前session根据"
-"<literal>JTA</literal>来跟踪和界定。这和以前的仅支持JTA的方法是完全一样的。详"
-"情请参阅Javadoc。"
+#, no-c-format
+msgid "<literal>org.hibernate.context.JTASessionContext</literal>:
current sessions are tracked and scoped by a <literal>JTA</literal>
transaction. The processing here is exactly the same as in the older JTA-only approach.
See the Javadocs for details."
+msgstr
"<literal>org.hibernate.context.JTASessionContext</literal>:当前会话根据
<literal>JTA</literal> 来跟踪和界定。这和以前的仅支持 JTA 的方法是完全一样的。详情请参阅 Javadoc。"
#. Tag: para
-#: architecture.xml:348
-#, fuzzy, no-c-format
-msgid ""
-"<literal>org.hibernate.context.ThreadLocalSessionContext</literal>:current
"
-"sessions are tracked by thread of execution. See the Javadocs for details."
-msgstr ""
-"<literal>org.hibernate.context.ThreadLocalSessionContext</literal> -
当前"
-"session通过当前执行的线程来跟踪和界定。详情也请参阅Javadoc。"
+#, no-c-format
+msgid
"<literal>org.hibernate.context.ThreadLocalSessionContext</literal>:current
sessions are tracked by thread of execution. See the Javadocs for details."
+msgstr
"<literal>org.hibernate.context.ThreadLocalSessionContext</literal>:当前会话通过当前执行的线程来跟踪和界定。详情也请参阅
Javadoc。"
#. Tag: para
-#: architecture.xml:354
-#, fuzzy, no-c-format
-msgid ""
-"<literal>org.hibernate.context.ManagedSessionContext</literal>: current
"
-"sessions are tracked by thread of execution. However, you are responsible to
"
-"bind and unbind a <literal>Session</literal> instance with static
methods on "
-"this class: it does not open, flush, or close a
<literal>Session</literal>."
-msgstr ""
-"<literal>org.hibernate.context.ManagedSessionContext</literal> -
当前session"
-"通过当前执行的线程来跟踪和界定。但是,你需要负责使用这个类的静态方法将"
-"<literal>Session</literal>实例绑定、或者取消绑定,它并不会打开(open)、flush或"
-"者关闭(close)任何<literal>Session</literal>。"
+#, no-c-format
+msgid "<literal>org.hibernate.context.ManagedSessionContext</literal>:
current sessions are tracked by thread of execution. However, you are responsible to bind
and unbind a <literal>Session</literal> instance with static methods on this
class: it does not open, flush, or close a <literal>Session</literal>."
+msgstr
"<literal>org.hibernate.context.ManagedSessionContext</literal>:当前会话通过当前执行的线程来跟踪和界定。但是,你需要负责使用这个类的静态方法将
<literal>Session</literal> 实例绑定、或者取消绑定,它并不会打开(open)、flush 或者关闭(close)任何
<literal>Session</literal>。"
#. Tag: para
-#: architecture.xml:363
-#, fuzzy, no-c-format
-msgid ""
-"The first two implementations provide a \"one session - one database "
-"transaction\" programming model. This is also also known and used as "
-"<emphasis>session-per-request</emphasis>. The beginning and end of a
"
-"Hibernate session is defined by the duration of a database transaction. If "
-"you use programmatic transaction demarcation in plain JSE without JTA, you "
-"are advised to use the Hibernate <literal>Transaction</literal> 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 <xref linkend=\"transactions\"/>
for more "
-"information and code examples."
-msgstr ""
-"前两种实现都提供了“每数据库事务对应一个session”的编程模型,也称作<emphasis>每"
-"次请求一个session</emphasis>。Hibernate session的起始和终结由数据库事务的生存"
-"来控制。假若你在纯粹的 Java SE之上采用自行编写代码来管理事务,而不使用JTA,建"
-"议你使用Hibernate <literal>Transaction</literal> API来把底层事务实现从你的代"
-"码中隐藏掉。如果你使用JTA,请使用JTA借口来管理Transaction。如果你在支持CMT的"
-"EJB容器中执行代码,事务边界是声明式定义的,你不需要在代码中进行任何事务或"
-"session管理操作。请参阅<xref linkend=\"transactions\"/>一节来阅读更多的内容和"
-"示例代码。"
+#, no-c-format
+msgid "The first two implementations provide a \"one session - one database
transaction\" programming model. This is also also known and used as
<emphasis>session-per-request</emphasis>. The beginning and end of a Hibernate
session is defined by the duration of a database transaction. If you use programmatic
transaction demarcation in plain JSE without JTA, you are advised to use the Hibernate
<literal>Transaction</literal> 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 <xref linkend=\"transactions\" /> for
more information and code examples."
+msgstr "前两种实现都提供了“one session - one database transaction”的编程模型,也称作
<emphasis>session-per-request</emphasis>。Hibernate session
的起始和终结由数据库事务的生存来控制。假若你在纯粹的 Java SE 之上采用自行编写代码来管理事务,而不使用 JTA,建议你使用 Hibernate
<literal>Transaction</literal> API 来把底层事务实现从你的代码中隐藏掉。如果你使用 JTA,请使用 JTA
接口来对事务限界。如果你在支持 CMT 的 EJB 容器中执行代码,事务边界是声明式定义的,你不需要在代码中进行任何事务或会话管理操作。请参阅 <xref
linkend=\"transactions\"/> 一节来阅读更多的内容和示例代码。"
#. Tag: para
-#: architecture.xml:375
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>hibernate.current_session_context_class</literal>
configuration "
-"parameter defines which <literal>org.hibernate.context."
-"CurrentSessionContext</literal> implementation should be used. For backwards
"
-"compatibility, if this configuration parameter is not set but a
<literal>org."
-"hibernate.transaction.TransactionManagerLookup</literal> is configured,
"
-"Hibernate will use the
<literal>org.hibernate.context.JTASessionContext</"
-"literal>. Typically, the value of this parameter would just name the "
-"implementation class to use. For the three out-of-the-box implementations, "
-"however, there are three corresponding short names: \"jta\",
\"thread\", and "
-"\"managed\"."
-msgstr ""
-"<literal>hibernate.current_session_context_class</literal>配置参数定义了应该"
-"采用哪个<literal>org.hibernate.context.CurrentSessionContext</literal>实现。"
-"注意,为了向下兼容,如果未配置此参数,但是存在<literal>org.hibernate."
-"transaction.TransactionManagerLookup</literal>的配置,Hibernate会采用"
-"<literal>org.hibernate.context.JTASessionContext</literal>。一般而言,此参数"
-"的值指明了要使用的实现类的全名,但那三种内置的实现可以使用简写,即\"jta\"、"
-"\"thread\"和\"managed\"。"
+#, no-c-format
+msgid "The <literal>hibernate.current_session_context_class</literal>
configuration parameter defines which
<literal>org.hibernate.context.CurrentSessionContext</literal> implementation
should be used. For backwards compatibility, if this configuration parameter is not set
but a <literal>org.hibernate.transaction.TransactionManagerLookup</literal> is
configured, Hibernate will use the
<literal>org.hibernate.context.JTASessionContext</literal>. Typically, the
value of this parameter would just name the implementation class to use. For the three
out-of-the-box implementations, however, there are three corresponding short names:
\"jta\", \"thread\", and \"managed\"."
+msgstr "<literal>hibernate.current_session_context_class</literal>
配置参数定义了应该采用哪个 <literal>org.hibernate.context.CurrentSessionContext</literal>
实现。注意,为了向下兼容,如果未配置此参数,但是存在
<literal>org.hibernate.transaction.TransactionManagerLookup</literal>
的配置,Hibernate
会采用<literal>org.hibernate.context.JTASessionContext</literal>。一般而言,此参数的值指明了要使用的实现类的全名,但那三种内置的实现可以使用简写,即
\"jta\"、\"thread\" 和 \"managed\"。 "
+
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/association_mapping.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/association_mapping.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/association_mapping.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,30 +1,32 @@
+# translation of association_mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007, 2009.
+# translation of Collection_Mapping.po to
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: association_mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:25\n"
+"PO-Revision-Date: 2009-11-03 11:04+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: association_mapping.xml:30
#, no-c-format
msgid "Association Mappings"
msgstr "关联关系映射"
#. Tag: title
-#: association_mapping.xml:33
#, no-c-format
msgid "Introduction"
msgstr "介绍"
#. Tag: para
-#: association_mapping.xml:35
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Association mappings are often the most difficult thing to implement "
"correctly. In this section we examine some canonical cases one by one, "
@@ -33,94 +35,52 @@
"examples."
msgstr ""
"关联关系映射通常情况是最难配置正确的。在这个部分中,我们从单向关系映射开始,"
-"然后考虑双向关系映射,由浅至深讲述一遍典型的案例。在所有的例子中,我们都使用 "
-"<literal>Person</literal>和<literal>Address</literal>。"
+"然后考虑双向关系映射,逐步讲解典型的案例。在所有的例子中,我们都使将用 "
+"<literal>Person</literal> 和
<literal>Address</literal>。"
#. Tag: para
-#: association_mapping.xml:43
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Associations will be classified by multiplicity and whether or not they map "
"to an intervening join table."
-msgstr "我们根据映射关系是否涉及连接表以及多样性来划分关联类型。"
+msgstr ""
+"我们根据映射关系是否涉及连接表以及多样性(multiplicity)来划分关联类型。 "
#. Tag: para
-#: association_mapping.xml:48
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Nullable foreign keys are not considered to be good practice in traditional "
"data modelling, so our examples do not use nullable foreign keys. This is "
"not a requirement of Hibernate, and the mappings will work if you drop the "
"nullability constraints."
msgstr ""
-"在传统的数据建模中,允许为Null值的外键被认为是一种不好的实践,因此我们所有的"
-"例子中都使用不允许为Null的外键。这并不是Hibernate的要求,即使你删除掉不允许为"
-"Null的约束,Hibernate映射一样可以工作的很好。"
+"在传统的数据建模中,允许为 Null 值的外键被认为是一种不好的实践,因此我们所有"
+"的例子中都使用不允许为 Null 的外键。这并不是 Hibernate的 要求,即使你删除掉不"
+"允许为 Null 的约束,Hibernate 映射一样可以工作的很好。 "
#. Tag: title
-#: association_mapping.xml:58
#, no-c-format
msgid "Unidirectional associations"
msgstr "单向关联(Unidirectional associations)"
#. Tag: title
-#: association_mapping.xml:61 association_mapping.xml:132
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Many-to-one"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"多对一(many to one)\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"多对一(many to one)"
+msgstr "多对一(many-to-one) "
#. Tag: para
-#: association_mapping.xml:63
#, no-c-format
msgid ""
"A <emphasis>unidirectional many-to-one association</emphasis> is the
most "
"common kind of unidirectional association."
-msgstr "<emphasis>单向many-to-one关联</emphasis>是最常见的单向关联关系。"
+msgstr "<emphasis>单向 many-to-one 关联</emphasis>是最常见的单向关联关系。"
-#. Tag: programlisting
-#: association_mapping.xml:68
+#. Tag: title
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <many-to-one name=\"address\" \n"
-" column=\"addressId\"\n"
-" not-null=\"true\"/>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: association_mapping.xml:69 association_mapping.xml:185
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"create table Person ( personId bigint not null primary key, addressId bigint
"
-"not null )\n"
-"create table Address ( addressId bigint not null primary key )\n"
-" ]]>"
-msgstr ""
-
-#. Tag: title
-#: association_mapping.xml:74 association_mapping.xml:145
-#: association_mapping.xml:210
-#, fuzzy, no-c-format
msgid "One-to-one"
-msgstr "一对一(one to one)"
+msgstr "一对一(One-to-one)"
#. Tag: para
-#: association_mapping.xml:76
#, no-c-format
msgid ""
"A <emphasis>unidirectional one-to-one association on a foreign
key</"
@@ -131,147 +91,42 @@
"emphasis>几乎是一样的。唯一的不同就是单向一对一关联中的外键字段具有唯一性约"
"束。"
-#. Tag: programlisting
-#: association_mapping.xml:81
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <many-to-one name=\"address\" \n"
-" column=\"addressId\" \n"
-" unique=\"true\"\n"
-" not-null=\"true\"/>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: association_mapping.xml:82 association_mapping.xml:218
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"create table Person ( personId bigint not null primary key, addressId bigint
"
-"not null unique )\n"
-"create table Address ( addressId bigint not null primary key )\n"
-" ]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:84
-#, fuzzy, no-c-format
-msgid ""
"A <emphasis>unidirectional one-to-one association on a primary
key</"
"emphasis> usually uses a special id generator In this example, however, we
"
"have reversed the direction of the association:"
msgstr ""
-"<emphasis>基于主键关联的单向一对一关联</emphasis>通常使用一个特定的id生成器。"
-"(请注意,在这个例子中我们掉换了关联的方向。)"
+"<emphasis>基于主键关联的单向一对一关联</emphasis>通常使用一个特定的 id 生成"
+"器,然而在这个例子中我们掉换了关联的方向:"
-#. Tag: programlisting
-#: association_mapping.xml:90
+#. Tag: title
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"foreign\">\n"
-" <param name=\"property\">person</param>\n"
-" </generator>\n"
-" </id>\n"
-" <one-to-one name=\"person\"
constrained=\"true\"/>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: association_mapping.xml:91 association_mapping.xml:226
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"create table Person ( personId bigint not null primary key )\n"
-"create table Address ( personId bigint not null primary key )\n"
-" ]]>"
-msgstr ""
-
-#. Tag: title
-#: association_mapping.xml:96 association_mapping.xml:118
-#, fuzzy, no-c-format
msgid "One-to-many"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"一对多(one to many)\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"一对多(one to many)"
+msgstr "一对多(one-to-many) "
#. Tag: para
-#: association_mapping.xml:98
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"A <emphasis>unidirectional one-to-many association on a foreign
key</"
"emphasis> is an unusual case, and is not recommended."
msgstr ""
-"<emphasis>基于外键关联的单向一对多关联</emphasis>是一种很少见的情况,并不推荐"
-"使用。"
+"<emphasis>基于外键关联的单向一对多关联</emphasis>是一种很少见的情况,我们不推"
+"荐使用它。"
-#. Tag: programlisting
-#: association_mapping.xml:103
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <set name=\"addresses\">\n"
-" <key column=\"personId\" \n"
-" not-null=\"true\"/>\n"
-" <one-to-many class=\"Address\"/>\n"
-" </set>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: association_mapping.xml:104
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"create table Person ( personId bigint not null primary key )\n"
-"create table Address ( addressId bigint not null primary key, personId "
-"bigint not null )\n"
-" ]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:106
-#, fuzzy, no-c-format
msgid "You should instead use a join table for this kind of association."
-msgstr "我们认为对于这种关联关系最好使用连接表。"
+msgstr "我们认为对于这种关联关系最好使用连接表。 "
#. Tag: title
-#: association_mapping.xml:115
#, no-c-format
msgid "Unidirectional associations with join tables"
msgstr "使用连接表的单向关联(Unidirectional associations with join tables)"
#. Tag: para
-#: association_mapping.xml:120
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"A <emphasis>unidirectional one-to-many association on a join
table</"
"emphasis> is the preferred option. Specifying
<literal>unique=\"true\"</"
@@ -281,237 +136,58 @@
"指定<literal>unique=\"true\"</literal>,我们可以把多样性从多对多改变为一对"
"多。"
-#. Tag: programlisting
-#: association_mapping.xml:126
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <set name=\"addresses\"
table=\"PersonAddress\">\n"
-" <key column=\"personId\"/>\n"
-" <many-to-many column=\"addressId\"\n"
-" unique=\"true\"\n"
-" class=\"Address\"/>\n"
-" </set>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: association_mapping.xml:127
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"create table Person ( personId bigint not null primary key )\n"
-"create table PersonAddress ( personId not null, addressId bigint not null "
-"primary key )\n"
-"create table Address ( addressId bigint not null primary key )\n"
-" ]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:134
-#, fuzzy, no-c-format
-msgid ""
"A <emphasis>unidirectional many-to-one association on a join
table</"
"emphasis> is common when the association is optional. For example:"
msgstr ""
"<emphasis>基于连接表的单向多对一关联</emphasis>在关联关系可选的情况下应用也很"
-"普遍。"
+"普遍。例如:"
-#. Tag: programlisting
-#: association_mapping.xml:139
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <join table=\"PersonAddress\" \n"
-" optional=\"true\">\n"
-" <key column=\"personId\"
unique=\"true\"/>\n"
-" <many-to-one name=\"address\"\n"
-" column=\"addressId\" \n"
-" not-null=\"true\"/>\n"
-" </join>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: association_mapping.xml:140
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"create table Person ( personId bigint not null primary key )\n"
-"create table PersonAddress ( personId bigint not null primary key, addressId
"
-"bigint not null )\n"
-"create table Address ( addressId bigint not null primary key )\n"
-" ]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:147
-#, fuzzy, no-c-format
-msgid ""
"A <emphasis>unidirectional one-to-one association on a join
table</emphasis> "
"is possible, but extremely unusual."
msgstr ""
-"<emphasis>基于连接表的单向一对一关联</emphasis>非常少见,但也是可行的。"
+"<emphasis>基于连接表的单向一对一关联</emphasis>也是可行的,但非常少见。"
-#. Tag: programlisting
-#: association_mapping.xml:152
+#. Tag: title
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <join table=\"PersonAddress\" \n"
-" optional=\"true\">\n"
-" <key column=\"personId\" \n"
-" unique=\"true\"/>\n"
-" <many-to-one name=\"address\"\n"
-" column=\"addressId\" \n"
-" not-null=\"true\"\n"
-" unique=\"true\"/>\n"
-" </join>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: association_mapping.xml:153 association_mapping.xml:258
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"create table Person ( personId bigint not null primary key )\n"
-"create table PersonAddress ( personId bigint not null primary key, addressId
"
-"bigint not null unique )\n"
-"create table Address ( addressId bigint not null primary key )\n"
-" ]]>"
-msgstr ""
-
-#. Tag: title
-#: association_mapping.xml:158 association_mapping.xml:263
-#, fuzzy, no-c-format
msgid "Many-to-many"
-msgstr "多对多(many to many)"
+msgstr "多对多(many-to-many) "
#. Tag: para
-#: association_mapping.xml:160
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Finally, here is an example of a <emphasis>unidirectional many-to-many
"
"association</emphasis>."
-msgstr "最后,还有 <emphasis>单向多对多关联</emphasis>."
+msgstr "最后,这里是一个<emphasis>单向多对多关联</emphasis>的例子。"
-#. Tag: programlisting
-#: association_mapping.xml:164
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <set name=\"addresses\"
table=\"PersonAddress\">\n"
-" <key column=\"personId\"/>\n"
-" <many-to-many column=\"addressId\"\n"
-" class=\"Address\"/>\n"
-" </set>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: association_mapping.xml:165 association_mapping.xml:271
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"create table Person ( personId bigint not null primary key )\n"
-"create table PersonAddress ( personId bigint not null, addressId bigint not "
-"null, primary key (personId, addressId) )\n"
-"create table Address ( addressId bigint not null primary key )\n"
-" ]]>"
-msgstr ""
-
#. Tag: title
-#: association_mapping.xml:172
#, no-c-format
msgid "Bidirectional associations"
msgstr "双向关联(Bidirectional associations)"
#. Tag: title
-#: association_mapping.xml:175 association_mapping.xml:236
-#, fuzzy, no-c-format
+#, no-c-format
msgid "one-to-many / many-to-one"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"一对多(one to many) / 多对一(many to one)\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"一对多(one to many) /多对一( many to one)"
+msgstr "一对多(one to many)/多对一(many to one) "
#. Tag: para
-#: association_mapping.xml:177
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"A <emphasis>bidirectional many-to-one association</emphasis> is the
most "
"common kind of association. The following example illustrates the standard "
"parent/child relationship."
msgstr ""
-"<emphasis>双向多对一关联</emphasis> 是最常见的关联关系。(这也是标准的父/子关"
-"联关系。)"
+"<emphasis>双向多对一关联</emphasis> 是最常见的关联关系。下面的例子解释了这种"
+"标准的父/子关联关系。"
-#. Tag: programlisting
-#: association_mapping.xml:183
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <many-to-one name=\"address\" \n"
-" column=\"addressId\"\n"
-" not-null=\"true\"/>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <set name=\"people\" inverse=\"true\">\n"
-" <key column=\"addressId\"/>\n"
-" <one-to-many class=\"Person\"/>\n"
-" </set>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:187
-#, fuzzy, no-c-format
-msgid ""
"If you use a <literal>List</literal>, or other indexed collection, set
the "
"<literal>key</literal> column of the foreign key to <literal>not
null</"
"literal>. Hibernate will manage the association from the collections side to
"
@@ -519,40 +195,14 @@
"by setting <literal>update=\"false\"</literal> and
<literal>insert=\"false"
"\"</literal>:"
msgstr ""
-"如果你使用<literal>List</literal>(或者其他有序集合类),你需要设置外键对应的"
-"<literal>key</literal>列为 <literal>not
null</literal>,让Hibernate来从集合端"
-"管理关联,维护每个元素的索引(通过设置<literal>update=\"false\"</literal>
"
-"and <literal>insert=\"false\"</literal>来对另一端反向操作)。"
+"如果你使用 <literal>List</literal>(或者其他有序集合类),你需要设置外键对应"
+"的 <literal>key</literal> 列为 <literal>not
null</literal>。Hibernate 将从集"
+"合端管理关联,维护每个元素的索引,并通过设置 <literal>update=\"false\"</"
+"literal> 和 <literal>insert=\"false\"</literal>
来对另一端反向操作。"
-#. Tag: programlisting
-#: association_mapping.xml:195
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\"/>\n"
-" ...\n"
-" <many-to-one name=\"address\"\n"
-" column=\"addressId\"\n"
-" not-null=\"true\"\n"
-" insert=\"false\"\n"
-" update=\"false\"/>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\"/>\n"
-" ...\n"
-" <list name=\"people\">\n"
-" <key column=\"addressId\"
not-null=\"true\"/>\n"
-" <list-index column=\"peopleIdx\"/>\n"
-" <one-to-many class=\"Person\"/>\n"
-" </list>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:197
-#, fuzzy, no-c-format
-msgid ""
"If the underlying foreign key column is <literal>NOT NULL</literal>, it
is "
"important that you define
<literal>not-null=\"true\"</literal> on the "
"<literal><key></literal> element of the collection
mapping. Do not "
@@ -560,230 +210,71 @@
"<literal><column></literal> element, but on the
<literal><key></"
"literal> element."
msgstr ""
-"假若集合映射的<literal><key></literal>元素对应的底层外键字段是"
-"<literal>NOT
NULL</literal>的,那么为这一key元素定义<literal>not-null=\"true"
-"\"</literal>是很重要的。不要仅仅为可能的嵌套<literal><column></literal>"
-"元素定义<literal>not-null=\"true\"</literal>,<literal><key></literal>"
-"元素也是需要的。"
+"假若集合映射的 <literal><key></literal> 元素对应的底层外键字段是 "
+"<literal>NOT NULL</literal> 的,那么为这一 key 元素定义
<literal>not-null="
+"\"true\"</literal> 是很重要的。不要仅仅为可能的嵌套
<literal><column></"
+"literal>元素定义
<literal>not-null=\"true\"</literal>,<literal><key></"
+"literal> 元素也是需要的。 "
#. Tag: para
-#: association_mapping.xml:212
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"A <emphasis>bidirectional one-to-one association on a foreign
key</emphasis> "
"is common:"
-msgstr "<emphasis>基于外键关联的双向一对一关联</emphasis>也很常见。"
+msgstr "<emphasis>基于外键关联的双向一对一关联</emphasis>也很常见。 "
-#. Tag: programlisting
-#: association_mapping.xml:217
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <many-to-one name=\"address\" \n"
-" column=\"addressId\" \n"
-" unique=\"true\"\n"
-" not-null=\"true\"/>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <one-to-one name=\"person\" \n"
-" property-ref=\"address\"/>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:220
-#, fuzzy, no-c-format
-msgid ""
"A <emphasis>bidirectional one-to-one association on a primary
key</emphasis> "
"uses the special id generator:"
-msgstr "<emphasis>基于主键关联的一对一关联</emphasis>需要使用特定的id生成器。"
-
-#. Tag: programlisting
-#: association_mapping.xml:225
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <one-to-one name=\"address\"/>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"foreign\">\n"
-" <param name=\"property\">person</param>\n"
-" </generator>\n"
-" </id>\n"
-" <one-to-one name=\"person\" \n"
-" constrained=\"true\"/>\n"
-"</class>]]>"
msgstr ""
+"<emphasis>基于主键关联的一对一关联</emphasis>需要使用特定的 id 生成器:"
#. Tag: title
-#: association_mapping.xml:233
#, no-c-format
msgid "Bidirectional associations with join tables"
msgstr "使用连接表的双向关联(Bidirectional associations with join tables)"
#. Tag: para
-#: association_mapping.xml:238
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The following is an example of a <emphasis>bidirectional one-to-many "
"association on a join table</emphasis>. The
<literal>inverse=\"true\"</"
"literal> can go on either end of the association, on the collection, or on
"
"the join."
msgstr ""
-"<emphasis>基于连接表的双向一对多关联</emphasis>。注意<literal>inverse=\"true"
-"\"</literal>可以出现在关联的任意一端,即collection端或者join端。"
+"下面是一个<emphasis>基于连接表的双向一对多关联</emphasis>的例子。注意 "
+"<literal>inverse=\"true\"</literal> 可以出现在关联的任意一端,即 collection
"
+"端或者 join 端。"
-#. Tag: programlisting
-#: association_mapping.xml:244
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <set name=\"addresses\" \n"
-" table=\"PersonAddress\">\n"
-" <key column=\"personId\"/>\n"
-" <many-to-many column=\"addressId\"\n"
-" unique=\"true\"\n"
-" class=\"Address\"/>\n"
-" </set>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <join table=\"PersonAddress\" \n"
-" inverse=\"true\" \n"
-" optional=\"true\">\n"
-" <key column=\"addressId\"/>\n"
-" <many-to-one name=\"person\"\n"
-" column=\"personId\"\n"
-" not-null=\"true\"/>\n"
-" </join>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: association_mapping.xml:245
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"create table Person ( personId bigint not null primary key )\n"
-"create table PersonAddress ( personId bigint not null, addressId bigint not "
-"null primary key )\n"
-"create table Address ( addressId bigint not null primary key )\n"
-" ]]>"
-msgstr ""
-
#. Tag: title
-#: association_mapping.xml:250
#, no-c-format
msgid "one to one"
msgstr "一对一(one to one)"
#. Tag: para
-#: association_mapping.xml:252
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"A <emphasis>bidirectional one-to-one association on a join
table</emphasis> "
"is possible, but extremely unusual."
msgstr ""
-"<emphasis>基于连接表的双向一对一关联</emphasis>极为罕见,但也是可行的。"
+"<emphasis>基于连接表的双向一对一关联</emphasis>也是可行的,但极为罕见。"
-#. Tag: programlisting
-#: association_mapping.xml:257
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <join table=\"PersonAddress\" \n"
-" optional=\"true\">\n"
-" <key column=\"personId\" \n"
-" unique=\"true\"/>\n"
-" <many-to-one name=\"address\"\n"
-" column=\"addressId\" \n"
-" not-null=\"true\"\n"
-" unique=\"true\"/>\n"
-" </join>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <join table=\"PersonAddress\" \n"
-" optional=\"true\"\n"
-" inverse=\"true\">\n"
-" <key column=\"addressId\" \n"
-" unique=\"true\"/>\n"
-" <many-to-one name=\"person\"\n"
-" column=\"personId\" \n"
-" not-null=\"true\"\n"
-" unique=\"true\"/>\n"
-" </join>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:265
-#, fuzzy, no-c-format
-msgid ""
"Here is an example of a <emphasis>bidirectional many-to-many
association</"
"emphasis>."
-msgstr "最后,还有 <emphasis>双向多对多关联</emphasis>."
+msgstr "下面是一个<emphasis>双向多对多关联</emphasis>的例子。"
-#. Tag: programlisting
-#: association_mapping.xml:269
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\" column=\"personId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <set name=\"addresses\"
table=\"PersonAddress\">\n"
-" <key column=\"personId\"/>\n"
-" <many-to-many column=\"addressId\"\n"
-" class=\"Address\"/>\n"
-" </set>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-" <id name=\"id\" column=\"addressId\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <set name=\"people\" inverse=\"true\"
table=\"PersonAddress\">\n"
-" <key column=\"addressId\"/>\n"
-" <many-to-many column=\"personId\"\n"
-" class=\"Person\"/>\n"
-" </set>\n"
-"</class>]]>"
-msgstr ""
-
#. Tag: title
-#: association_mapping.xml:278
#, no-c-format
msgid "More complex association mappings"
msgstr "更复杂的关联映射"
#. Tag: para
-#: association_mapping.xml:280
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"More complex association joins are <emphasis>extremely</emphasis> rare.
"
"Hibernate handles more complex situations by using SQL fragments embedded in
"
@@ -792,52 +283,23 @@
"<literal>effectiveEndDate</literal> and
<literal>effectiveStartDate</"
"literal>columns, it would be mapped as follows:"
msgstr ""
-"更复杂的关联连接<emphasis>极为</emphasis>罕见。 通过在映射文档中嵌入SQL片断,"
-"Hibernate也可以处理更为复杂的情况。比如,假若包含历史帐户数据的表定义了"
-"<literal>accountNumber</literal>,
<literal>effectiveEndDate</literal> 和"
-"<literal>effectiveStartDate</literal>字段,按照下面映射:"
+"更复杂的关联连接<emphasis>极为</emphasis>罕见。通过在映射文档中嵌入 SQL 片"
+"断,Hibernate 也可以处理更为复杂的情况。比如,假若包含历史帐户数据的表定义了 "
+"<literal>accountNumber</literal>、<literal>effectiveEndDate</literal>
和 "
+"<literal>effectiveStartDate</literal> 字段,按照下面映射:"
-#. Tag: programlisting
-#: association_mapping.xml:289
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<properties name=\"currentAccountKey\">\n"
-" <property name=\"accountNumber\" type=\"string\"
not-null=\"true\"/>\n"
-" <property name=\"currentAccount\"
type=\"boolean\">\n"
-" <formula>case when effectiveEndDate is null then 1 else 0
end</"
-"formula>\n"
-" </property>\n"
-"</properties>\n"
-"<property name=\"effectiveEndDate\"
type=\"date\"/>\n"
-"<property name=\"effectiveStateDate\" type=\"date\"
not-null=\"true\"/>]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:291
-#, fuzzy, no-c-format
-msgid ""
"You can then map an association to the <emphasis>current</emphasis>
"
"instance, the one with null <literal>effectiveEndDate</literal>, by
using:"
msgstr ""
-"那么我们可以对<emphasis>目前(current)</emphasis>实例(其"
-"<literal>effectiveEndDate</literal>为null)使用这样的关联映射:"
+"那么我们可以对<emphasis>目前(current)</emphasis>实例(其 "
+"<literal>effectiveEndDate</literal> 为 null)使用这样的关联映射: "
-#. Tag: programlisting
-#: association_mapping.xml:296
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<many-to-one name=\"currentAccountInfo\" \n"
-" property-ref=\"currentAccountKey\"\n"
-" class=\"AccountInfo\">\n"
-" <column name=\"accountNumber\"/>\n"
-" <formula>'1'</formula>\n"
-"</many-to-one>]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:298
-#, fuzzy, no-c-format
-msgid ""
"In a more complex example, imagine that the association between "
"<literal>Employee</literal> and
<literal>Organization</literal> is "
"maintained in an <literal>Employment</literal> table full of historical
"
@@ -845,34 +307,804 @@
"emphasis> employer, the one with the most recent
<literal>startDate</"
"literal>, could be mapped in the following way:"
msgstr ""
-"更复杂的例子,假想<literal>Employee</literal>和<literal>Organization</literal>"
-"之间的关联是通过一个<literal>Employment</literal>中间表维护的,而中间表中填充"
-"了很多历史雇员数据。那“雇员的<emphasis>最新</emphasis>雇主”这个关联(最新雇主"
-"就是<literal>startDate</literal>最后的那个)可以这样映射:"
+"在更复杂的例子中,假想 <literal>Employee</literal> 和
<literal>Organization</"
+"literal> 之间的关联是通过一个 <literal>Employment</literal> 中间表维护的,而"
+"中间表中填充了很多历史雇员数据。那“雇员的<emphasis>最新</emphasis>雇主”这个关"
+"联(最新雇主就是具有最新的 <literal>startDate</literal> 的那个)可以这样映"
+"射:"
-#. Tag: programlisting
-#: association_mapping.xml:306
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<join>\n"
-" <key column=\"employeeId\"/>\n"
-" <subselect>\n"
-" select employeeId, orgId \n"
-" from Employments \n"
-" group by orgId \n"
-" having startDate = max(startDate)\n"
-" </subselect>\n"
-" <many-to-one name=\"mostRecentEmployer\" \n"
-" class=\"Organization\" \n"
-" column=\"orgId\"/>\n"
-"</join>]]>"
-msgstr ""
-
-#. Tag: para
-#: association_mapping.xml:308
-#, fuzzy, no-c-format
-msgid ""
"This functionality allows a degree of creativity and flexibility, but it is "
"more practical to handle these kinds of cases using HQL or a criteria query."
msgstr ""
-"使用这一功能时可以充满创意,但通常更加实用的是用HQL或条件查询来处理这些情形。"
+"使用这一功能时可以充满创意和灵活性,但通常更加实用的是用 HQL 或条件查询来处理"
+"这些情况。"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <many-to-one name=\"address\" \n"
+#~ " column=\"addressId\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <many-to-one name=\"address\" \n"
+#~ " column=\"addressId\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key, addressId "
+#~ "bigint not null )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key, addressId "
+#~ "bigint not null )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <many-to-one name=\"address\" \n"
+#~ " column=\"addressId\" \n"
+#~ " unique=\"true\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <many-to-one name=\"address\" \n"
+#~ " column=\"addressId\" \n"
+#~ " unique=\"true\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key, addressId "
+#~ "bigint not null unique )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key, addressId "
+#~ "bigint not null unique )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"foreign\">\n"
+#~ " <param
name=\"property\">person</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " <one-to-one name=\"person\"
constrained=\"true\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"foreign\">\n"
+#~ " <param
name=\"property\">person</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " <one-to-one name=\"person\"
constrained=\"true\"/>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table Address ( personId bigint not null primary key )\n"
+#~ " ]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table Address ( personId bigint not null primary key )\n"
+#~ " ]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"addresses\">\n"
+#~ " <key column=\"personId\" \n"
+#~ " not-null=\"true\"/>\n"
+#~ " <one-to-many class=\"Address\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"addresses\">\n"
+#~ " <key column=\"personId\" \n"
+#~ " not-null=\"true\"/>\n"
+#~ " <one-to-many class=\"Address\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table Address ( addressId bigint not null primary key, personId "
+#~ "bigint not null )\n"
+#~ " ]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table Address ( addressId bigint not null primary key, personId "
+#~ "bigint not null )\n"
+#~ " ]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"addresses\"
table=\"PersonAddress\">\n"
+#~ " <key column=\"personId\"/>\n"
+#~ " <many-to-many column=\"addressId\"\n"
+#~ " unique=\"true\"\n"
+#~ " class=\"Address\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"addresses\"
table=\"PersonAddress\">\n"
+#~ " <key column=\"personId\"/>\n"
+#~ " <many-to-many column=\"addressId\"\n"
+#~ " unique=\"true\"\n"
+#~ " class=\"Address\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table PersonAddress ( personId not null, addressId bigint not null
"
+#~ "primary key )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table PersonAddress ( personId not null, addressId bigint not null
"
+#~ "primary key )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <join table=\"PersonAddress\" \n"
+#~ " optional=\"true\">\n"
+#~ " <key column=\"personId\"
unique=\"true\"/>\n"
+#~ " <many-to-one name=\"address\"\n"
+#~ " column=\"addressId\" \n"
+#~ " not-null=\"true\"/>\n"
+#~ " </join>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <join table=\"PersonAddress\" \n"
+#~ " optional=\"true\">\n"
+#~ " <key column=\"personId\"
unique=\"true\"/>\n"
+#~ " <many-to-one name=\"address\"\n"
+#~ " column=\"addressId\" \n"
+#~ " not-null=\"true\"/>\n"
+#~ " </join>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table PersonAddress ( personId bigint not null primary key, "
+#~ "addressId bigint not null )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table PersonAddress ( personId bigint not null primary key, "
+#~ "addressId bigint not null )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <join table=\"PersonAddress\" \n"
+#~ " optional=\"true\">\n"
+#~ " <key column=\"personId\" \n"
+#~ " unique=\"true\"/>\n"
+#~ " <many-to-one name=\"address\"\n"
+#~ " column=\"addressId\" \n"
+#~ " not-null=\"true\"\n"
+#~ " unique=\"true\"/>\n"
+#~ " </join>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <join table=\"PersonAddress\" \n"
+#~ " optional=\"true\">\n"
+#~ " <key column=\"personId\" \n"
+#~ " unique=\"true\"/>\n"
+#~ " <many-to-one name=\"address\"\n"
+#~ " column=\"addressId\" \n"
+#~ " not-null=\"true\"\n"
+#~ " unique=\"true\"/>\n"
+#~ " </join>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table PersonAddress ( personId bigint not null primary key, "
+#~ "addressId bigint not null unique )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table PersonAddress ( personId bigint not null primary key, "
+#~ "addressId bigint not null unique )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"addresses\"
table=\"PersonAddress\">\n"
+#~ " <key column=\"personId\"/>\n"
+#~ " <many-to-many column=\"addressId\"\n"
+#~ " class=\"Address\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"addresses\"
table=\"PersonAddress\">\n"
+#~ " <key column=\"personId\"/>\n"
+#~ " <many-to-many column=\"addressId\"\n"
+#~ " class=\"Address\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table PersonAddress ( personId bigint not null, addressId bigint "
+#~ "not null, primary key (personId, addressId) )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table PersonAddress ( personId bigint not null, addressId bigint "
+#~ "not null, primary key (personId, addressId) )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <many-to-one name=\"address\" \n"
+#~ " column=\"addressId\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"people\" inverse=\"true\">\n"
+#~ " <key column=\"addressId\"/>\n"
+#~ " <one-to-many class=\"Person\"/>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <many-to-one name=\"address\" \n"
+#~ " column=\"addressId\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"people\" inverse=\"true\">\n"
+#~ " <key column=\"addressId\"/>\n"
+#~ " <one-to-many class=\"Person\"/>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\"/>\n"
+#~ " ...\n"
+#~ " <many-to-one name=\"address\"\n"
+#~ " column=\"addressId\"\n"
+#~ " not-null=\"true\"\n"
+#~ " insert=\"false\"\n"
+#~ " update=\"false\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\"/>\n"
+#~ " ...\n"
+#~ " <list name=\"people\">\n"
+#~ " <key column=\"addressId\"
not-null=\"true\"/>\n"
+#~ " <list-index column=\"peopleIdx\"/>\n"
+#~ " <one-to-many class=\"Person\"/>\n"
+#~ " </list>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\"/>\n"
+#~ " ...\n"
+#~ " <many-to-one name=\"address\"\n"
+#~ " column=\"addressId\"\n"
+#~ " not-null=\"true\"\n"
+#~ " insert=\"false\"\n"
+#~ " update=\"false\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\"/>\n"
+#~ " ...\n"
+#~ " <list name=\"people\">\n"
+#~ " <key column=\"addressId\"
not-null=\"true\"/>\n"
+#~ " <list-index column=\"peopleIdx\"/>\n"
+#~ " <one-to-many class=\"Person\"/>\n"
+#~ " </list>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <many-to-one name=\"address\" \n"
+#~ " column=\"addressId\" \n"
+#~ " unique=\"true\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <one-to-one name=\"person\" \n"
+#~ " property-ref=\"address\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <many-to-one name=\"address\" \n"
+#~ " column=\"addressId\" \n"
+#~ " unique=\"true\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <one-to-one name=\"person\" \n"
+#~ " property-ref=\"address\"/>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <one-to-one name=\"address\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"foreign\">\n"
+#~ " <param
name=\"property\">person</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " <one-to-one name=\"person\" \n"
+#~ " constrained=\"true\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <one-to-one name=\"address\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"foreign\">\n"
+#~ " <param
name=\"property\">person</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " <one-to-one name=\"person\" \n"
+#~ " constrained=\"true\"/>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"addresses\" \n"
+#~ " table=\"PersonAddress\">\n"
+#~ " <key column=\"personId\"/>\n"
+#~ " <many-to-many column=\"addressId\"\n"
+#~ " unique=\"true\"\n"
+#~ " class=\"Address\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <join table=\"PersonAddress\" \n"
+#~ " inverse=\"true\" \n"
+#~ " optional=\"true\">\n"
+#~ " <key column=\"addressId\"/>\n"
+#~ " <many-to-one name=\"person\"\n"
+#~ " column=\"personId\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ " </join>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"addresses\" \n"
+#~ " table=\"PersonAddress\">\n"
+#~ " <key column=\"personId\"/>\n"
+#~ " <many-to-many column=\"addressId\"\n"
+#~ " unique=\"true\"\n"
+#~ " class=\"Address\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <join table=\"PersonAddress\" \n"
+#~ " inverse=\"true\" \n"
+#~ " optional=\"true\">\n"
+#~ " <key column=\"addressId\"/>\n"
+#~ " <many-to-one name=\"person\"\n"
+#~ " column=\"personId\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ " </join>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table PersonAddress ( personId bigint not null, addressId bigint "
+#~ "not null primary key )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "create table Person ( personId bigint not null primary key )\n"
+#~ "create table PersonAddress ( personId bigint not null, addressId bigint "
+#~ "not null primary key )\n"
+#~ "create table Address ( addressId bigint not null primary key )\n"
+#~ " ]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <join table=\"PersonAddress\" \n"
+#~ " optional=\"true\">\n"
+#~ " <key column=\"personId\" \n"
+#~ " unique=\"true\"/>\n"
+#~ " <many-to-one name=\"address\"\n"
+#~ " column=\"addressId\" \n"
+#~ " not-null=\"true\"\n"
+#~ " unique=\"true\"/>\n"
+#~ " </join>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <join table=\"PersonAddress\" \n"
+#~ " optional=\"true\"\n"
+#~ " inverse=\"true\">\n"
+#~ " <key column=\"addressId\" \n"
+#~ " unique=\"true\"/>\n"
+#~ " <many-to-one name=\"person\"\n"
+#~ " column=\"personId\" \n"
+#~ " not-null=\"true\"\n"
+#~ " unique=\"true\"/>\n"
+#~ " </join>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <join table=\"PersonAddress\" \n"
+#~ " optional=\"true\">\n"
+#~ " <key column=\"personId\" \n"
+#~ " unique=\"true\"/>\n"
+#~ " <many-to-one name=\"address\"\n"
+#~ " column=\"addressId\" \n"
+#~ " not-null=\"true\"\n"
+#~ " unique=\"true\"/>\n"
+#~ " </join>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <join table=\"PersonAddress\" \n"
+#~ " optional=\"true\"\n"
+#~ " inverse=\"true\">\n"
+#~ " <key column=\"addressId\" \n"
+#~ " unique=\"true\"/>\n"
+#~ " <many-to-one name=\"person\"\n"
+#~ " column=\"personId\" \n"
+#~ " not-null=\"true\"\n"
+#~ " unique=\"true\"/>\n"
+#~ " </join>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"addresses\"
table=\"PersonAddress\">\n"
+#~ " <key column=\"personId\"/>\n"
+#~ " <many-to-many column=\"addressId\"\n"
+#~ " class=\"Address\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"people\" inverse=\"true\"
table=\"PersonAddress\">\n"
+#~ " <key column=\"addressId\"/>\n"
+#~ " <many-to-many column=\"personId\"\n"
+#~ " class=\"Person\"/>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\" column=\"personId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"addresses\"
table=\"PersonAddress\">\n"
+#~ " <key column=\"personId\"/>\n"
+#~ " <many-to-many column=\"addressId\"\n"
+#~ " class=\"Address\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ " <id name=\"id\" column=\"addressId\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"people\" inverse=\"true\"
table=\"PersonAddress\">\n"
+#~ " <key column=\"addressId\"/>\n"
+#~ " <many-to-many column=\"personId\"\n"
+#~ " class=\"Person\"/>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<properties name=\"currentAccountKey\">\n"
+#~ " <property name=\"accountNumber\" type=\"string\"
not-null=\"true\"/>\n"
+#~ " <property name=\"currentAccount\"
type=\"boolean\">\n"
+#~ " <formula>case when effectiveEndDate is null then 1 else 0
end</"
+#~ "formula>\n"
+#~ " </property>\n"
+#~ "</properties>\n"
+#~ "<property name=\"effectiveEndDate\"
type=\"date\"/>\n"
+#~ "<property name=\"effectiveStateDate\" type=\"date\"
not-null=\"true\"/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<properties name=\"currentAccountKey\">\n"
+#~ " <property name=\"accountNumber\" type=\"string\"
not-null=\"true\"/>\n"
+#~ " <property name=\"currentAccount\"
type=\"boolean\">\n"
+#~ " <formula>case when effectiveEndDate is null then 1 else 0
end</"
+#~ "formula>\n"
+#~ " </property>\n"
+#~ "</properties>\n"
+#~ "<property name=\"effectiveEndDate\"
type=\"date\"/>\n"
+#~ "<property name=\"effectiveStateDate\" type=\"date\"
not-null=\"true\"/>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"currentAccountInfo\" \n"
+#~ " property-ref=\"currentAccountKey\"\n"
+#~ " class=\"AccountInfo\">\n"
+#~ " <column name=\"accountNumber\"/>\n"
+#~ " <formula>'1'</formula>\n"
+#~ "</many-to-one>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<many-to-one name=\"currentAccountInfo\" \n"
+#~ " property-ref=\"currentAccountKey\"\n"
+#~ " class=\"AccountInfo\">\n"
+#~ " <column name=\"accountNumber\"/>\n"
+#~ " <formula>'1'</formula>\n"
+#~ "</many-to-one>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<join>\n"
+#~ " <key column=\"employeeId\"/>\n"
+#~ " <subselect>\n"
+#~ " select employeeId, orgId \n"
+#~ " from Employments \n"
+#~ " group by orgId \n"
+#~ " having startDate = max(startDate)\n"
+#~ " </subselect>\n"
+#~ " <many-to-one name=\"mostRecentEmployer\" \n"
+#~ " class=\"Organization\" \n"
+#~ " column=\"orgId\"/>\n"
+#~ "</join>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<join>\n"
+#~ " <key column=\"employeeId\"/>\n"
+#~ " <subselect>\n"
+#~ " select employeeId, orgId \n"
+#~ " from Employments \n"
+#~ " group by orgId \n"
+#~ " having startDate = max(startDate)\n"
+#~ " </subselect>\n"
+#~ " <many-to-one name=\"mostRecentEmployer\" \n"
+#~ " class=\"Organization\" \n"
+#~ " column=\"orgId\"/>\n"
+#~ "</join>]]>"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/basic_mapping.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/basic_mapping.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/basic_mapping.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,5540 +1,3588 @@
+# translation of basic_mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007, 2009.
+# translation of Collection_Mapping.po to
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: basic_mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2010-01-08T04:07:18\n"
+"PO-Revision-Date: 2010-01-11 10:32+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: basic_mapping.xml:29
#, no-c-format
msgid "Basic O/R Mapping"
-msgstr "对象/关系数据库映射基础(Basic O/R Mapping)"
+msgstr "对象/关系数据库映射基础(Basic O/R Mapping)"
#. Tag: title
-#: basic_mapping.xml:32
#, no-c-format
msgid "Mapping declaration"
msgstr "映射定义(Mapping declaration)"
#. Tag: para
-#: basic_mapping.xml:34
-#, fuzzy, 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文档(XML document)来定义的。这个映射"
-"文档被设计为易读的, 并且可以手工修改。映射语言是以Java为中心,这意味着映射文"
-"档是按照持久化类的定义来创建的, 而非表的定义。"
+#, 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
为中心,这意味着映射文档是按照持久化类的定义来创建的,而非表的定义。 "
#. Tag: para
-#: basic_mapping.xml:41
-#, fuzzy, 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。"
+#, 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。"
#. Tag: para
-#: basic_mapping.xml:47
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Here is an example mapping:"
-msgstr "让我们从一个映射的例子开始:"
+msgstr "下面是一个映射的例子:"
-#. Tag: programlisting
-#: basic_mapping.xml:51
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<?xml version=\"1.0\"?>\n"
-"<!DOCTYPE hibernate-mapping PUBLIC\n"
-" \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
-"
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
-"\n"
-"<hibernate-mapping package=\"eg\">\n"
-"\n"
-" <class name=\"Cat\"\n"
-" table=\"cats\"\n"
-" discriminator-value=\"C\">\n"
-"\n"
-" <id name=\"id\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-"\n"
-" <discriminator column=\"subclass\"\n"
-" type=\"character\"/>\n"
-"\n"
-" <property name=\"weight\"/>\n"
-"\n"
-" <property name=\"birthdate\"\n"
-" type=\"date\"\n"
-" not-null=\"true\"\n"
-" update=\"false\"/>\n"
-"\n"
-" <property name=\"color\"\n"
-" type=\"eg.types.ColorUserType\"\n"
-" not-null=\"true\"\n"
-" update=\"false\"/>\n"
-"\n"
-" <property name=\"sex\"\n"
-" not-null=\"true\"\n"
-" update=\"false\"/>\n"
-"\n"
-" <property name=\"litterId\"\n"
-" column=\"litterId\"\n"
-" update=\"false\"/>\n"
-"\n"
-" <many-to-one name=\"mother\"\n"
-" column=\"mother_id\"\n"
-" update=\"false\"/>\n"
-"\n"
-" <set name=\"kittens\"\n"
-" inverse=\"true\"\n"
-" order-by=\"litter_id\">\n"
-" <key column=\"mother_id\"/>\n"
-" <one-to-many class=\"Cat\"/>\n"
-" </set>\n"
-"\n"
-" <subclass name=\"DomesticCat\"\n"
-" discriminator-value=\"D\">\n"
-"\n"
-" <property name=\"name\"\n"
-" type=\"string\"/>\n"
-"\n"
-" </subclass>\n"
-"\n"
-" </class>\n"
-"\n"
-" <class name=\"Dog\">\n"
-" <!-- mapping for Dog could go here -->\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+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
<literal> not-null</literal> attribute)."
+msgstr "我们现在开始讨论映射文档的内容。我们只描述 Hibernate 在运行时用到的文档元素和属性。映射文档还包括一些额外的可选属性和元素,它们在使用
schema 导出工具的时候会影响导出的数据库 schema 结果(比如,<literal>not-null</literal> 属性)。"
-#. Tag: para
-#: basic_mapping.xml:53
-#, fuzzy, 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 <literal> not-null</literal>
attribute)."
-msgstr ""
-"我们现在开始讨论映射文档的内容。我们只描述Hibernate在运行时用到的文档元素和属"
-"性。 映射文档还包括一些额外的可选属性和元素,它们在使用schema导出工具的时候会"
-"影响导出的数据库schema结果。 (比如,<literal> not-null</literal> 属性。)"
-
#. Tag: title
-#: basic_mapping.xml:64
#, no-c-format
msgid "Doctype"
msgstr "Doctype"
#. Tag: para
-#: basic_mapping.xml:66
-#, fuzzy, 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
<literal>hibernate-x.x.x/src/org/"
-"hibernate </literal>, or in <literal>hibernate3.jar</literal>.
Hibernate "
-"will always look for the DTD in its classpath first. If you experience "
-"lookups of the DTD using an Internet connection, check the DTD declaration "
-"against the contents of your classpath."
-msgstr ""
-"所有的XML映射都需要定义如上所示的doctype。DTD可以从上述URL中获取, 也可以从"
-"<literal>hibernate-x.x.x/src/net/sf/hibernate</literal>目录中、 或"
-"<literal>hibernate.jar</literal>文件中找到。Hibernate总是会首先在它的"
-"classptah中搜索DTD文件。 如果你发现它是通过连接Internet查找DTD文件,就对照你"
-"的classpath目录检查XML文件里的DTD声明。"
+#, 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 <literal>hibernate-x.x.x/src/org/hibernate
</literal>, or in <literal>hibernate3.jar</literal>. Hibernate will
always look for the DTD in its classpath first. If you experience lookups of the DTD using
an Internet connection, check the DTD declaration against the contents of your
classpath."
+msgstr "所有的 XML 映射都需要定义如上所示的 doctype。DTD 可以从上述 URL 中获取,也可以从
<literal>hibernate-x.x.x/src/org/hibernate </literal> 目录中、或
<literal>hibernate.jar</literal> 文件中找到。Hibernate 总是会首先在它的 classptah 中搜索 DTD
文件。如果你发现它是通过连接 Internet 查找 DTD 文件,就对照你的 classpath 目录检查 XML 文件里的 DTD 声明。"
#. Tag: title
-#: basic_mapping.xml:76
#, no-c-format
msgid "EntityResolver"
msgstr "EntityResolver"
#. Tag: para
-#: basic_mapping.xml:77
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate will first attempt to resolve DTDs in its classpath. It does this "
-"is by registering a custom
<literal>org.xml.sax.EntityResolver</literal> "
-"implementation with the SAXReader it uses to read in the xml files. This "
-"custom <literal>EntityResolver</literal> recognizes two different
systemId "
-"namespaces:"
-msgstr ""
-"As mentioned previously, Hibernate will first attempt to resolve DTDs in its
"
-"classpath. The manner in which it does this is by registering a custom "
-"<literal>org.xml.sax.EntityResolver</literal> implementation with the
"
-"SAXReader it uses to read in the xml files. This custom "
-"<literal>EntityResolver</literal> recognizes two different systemId
"
-"namespaces. 如前所述,Hibernate首先在其classpath中查找DTD。其行为是依靠在系统"
-"中注册的<literal>org.xml.sax.EntityResolver</literal>的一个具体实现,"
-"SAXReader依靠它来读取xml文件。这一 <literal>EntityResolver</literal> 实现能辨"
-"认两种不同的 systenId命名空间。"
+#, no-c-format
+msgid "Hibernate will first attempt to resolve DTDs in its classpath. It does this
is by registering a custom <literal>org.xml.sax.EntityResolver</literal>
implementation with the SAXReader it uses to read in the xml files. This custom
<literal>EntityResolver</literal> recognizes two different systemId
namespaces:"
+msgstr "Hibernate 首先试图在其 classpath 中解析 DTD。这是依靠在系统中注册的
<literal>org.xml.sax.EntityResolver</literal> 的一个具体实现,SAXReader 依靠它来读取 xml
文件。这个自定义的 <literal>EntityResolver</literal> 能辨认两种不同的 systenId 命名空间:"
#. Tag: para
-#: basic_mapping.xml:85
-#, fuzzy, no-c-format
-msgid ""
-"a <literal>hibernate namespace</literal> is recognized whenever the
resolver "
-"encounters a systemId starting with
<literal>http://hibernate.sourceforge."
-"net/</literal>. The resolver attempts to resolve these entities via the
"
-"classloader which loaded the Hibernate classes."
-msgstr ""
-"若resolver遇到了一个以<literal>http://hibernate.sourceforge.net/</literal>为"
-"开头的systemId,它会辨认出是<literal>hibernate
namespace</literal>,resolver"
-"就试图通过加载Hibernate类的classloader来查找这些实体。"
+#, no-c-format
+msgid "a <literal>hibernate namespace</literal> is recognized whenever
the resolver encounters a systemId starting with
<
literal>http://hibernate.sourceforge.net/</literal>. The resolver attempts to
resolve these entities via the classloader which loaded the Hibernate classes."
+msgstr "若 resolver 遇到了一个以
<
literal>http://hibernate.sourceforge.net/</literal> 为开头的 systemId,它会辨认出是
<literal>hibernate namespace</literal>,resolver 就试图通过加载 Hibernate 类的
classloader 来查找这些实体。 "
#. Tag: para
-#: basic_mapping.xml:94
-#, fuzzy, no-c-format
-msgid ""
-"a <literal>user namespace</literal> is recognized whenever the resolver
"
-"encounters a systemId using a <literal>classpath://</literal> URL
protocol. "
-"The resolver will attempt to resolve these entities via (1) the current "
-"thread context classloader and (2) the classloader which loaded the "
-"Hibernate classes."
-msgstr ""
-"若resolver遇到了一个使用<literal>classpath://</literal>URL协议的systemId,它"
-"会辨认出这是<literal>user namespace</literal>,resolver试图通过(1)当前线程上下"
-"文的classloader和(2)加载Hibernate class的classloader来查找这些实体。"
+#, no-c-format
+msgid "a <literal>user namespace</literal> is recognized whenever the
resolver encounters a systemId using a <literal>classpath://</literal> URL
protocol. The resolver will attempt to resolve these entities via (1) the current thread
context classloader and (2) the classloader which loaded the Hibernate classes."
+msgstr "若 resolver 遇到了一个使用 <literal>classpath://</literal> URL 协议的
systemId,它会辨认出这是 <literal>user namespace</literal>,resolver 试图通过(1) 当前线程上下文的
classloader 和(2) 加载 Hibernate class 的 classloader 来查找这些实体。"
#. Tag: para
-#: basic_mapping.xml:103
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The following is an example of utilizing user namespacing:"
-msgstr "使用user namespace(用户命名空间)的例子:"
+msgstr "下面是一个使用用户命名空间(user namespace)的例子:"
-#. Tag: programlisting
-#: basic_mapping.xml:106
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<?xml version=\"1.0\"?>\n"
-"<!DOCTYPE hibernate-mapping PUBLIC\n"
-" \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
-" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\"
[\n"
-" <!ENTITY types SYSTEM
\"classpath://your/domain/types.xml\">\n"
-"]>\n"
-"\n"
-"<hibernate-mapping package=\"your.domain\">\n"
-" <class name=\"MyEntity\">\n"
-" <id name=\"id\"
type=\"my-custom-id-type\">\n"
-" ...\n"
-" </id>\n"
-" <class>\n"
-" &types;\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "Where <literal>types.xml</literal> is a resource in the
<literal>your.domain</literal> package and contains a custom typedef (see
<xref linkend=\"mapping-types-custom\" />)."
+msgstr "这里的 <literal>types.xml</literal> 是
<literal>your.domain</literal> 包中的一个资源,它包含了一个自定义的 <xref
linkend=\"mapping-types-custom\"/>。 "
-#. Tag: para
-#: basic_mapping.xml:107
-#, fuzzy, no-c-format
-msgid ""
-"Where <literal>types.xml</literal> is a resource in the
<literal>your."
-"domain</literal> package and contains a custom <link
linkend=\"mapping-types-"
-"custom\">typedef</link>."
-msgstr ""
-"<literal>types.xml</literal>是<literal>your.domain</literal>包中的一个资源,"
-"它包含了一个定制的<xref
linkend=\"mapping-types-custom\">typedef</xref>。"
-
#. Tag: title
-#: basic_mapping.xml:115
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Hibernate-mapping"
-msgstr "hibernate-mapping"
+msgstr "Hibernate-mapping"
#. Tag: para
-#: basic_mapping.xml:117
-#, fuzzy, no-c-format
-msgid ""
-"This element has several optional attributes. The
<literal>schema</literal> "
-"and <literal>catalog</literal> attributes specify that tables referred
to in "
-"this mapping belong to the named schema and/or catalog. If they are "
-"specified, tablenames will be qualified by the given schema and catalog "
-"names. If they are missing, tablenames will be unqualified. The "
-"<literal>default-cascade</literal> attribute specifies what cascade
style "
-"should be assumed for properties and collections that do not specify a "
-"<literal>cascade</literal> attribute. By default, the
<literal>auto-import</"
-"literal> attribute allows you to use unqualified class names in the query
"
-"language."
-msgstr ""
-"这个元素包括一些可选的属性。<literal>schema</literal>和<literal>catalog</"
-"literal>属性, 指明了这个映射所连接(refer)的表所在的schema和/或catalog名"
-"称。 假若指定了这个属性,表名会加上所指定的schema和catalog的名字扩展为全限定"
-"名。假若没有指定,表名就不会使用全限定名。 <literal>default-cascade</literal>"
-"指定了未明确注明<literal>cascade</literal>属性的Java属性和 集合类Hibernate会"
-"采取什么样的默认级联风格。<literal>auto-import</literal>属性默认让我们在查询"
-"语言中可以使用 非全限定名的类名。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:138
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping\n"
-" schema=\"schemaName\"\n"
-" catalog=\"catalogName\"\n"
-" default-cascade=\"cascade_style\"\n"
-" default-access=\"field|property|ClassName\"\n"
-" default-lazy=\"true|false\"\n"
-" auto-import=\"true|false\"\n"
-" package=\"package.name\"\n"
-" />]]>"
-msgstr ""
+msgid "This element has several optional attributes. The
<literal>schema</literal> and <literal>catalog</literal>
attributes specify that tables referred to in this mapping belong to the named schema
and/or catalog. If they are specified, tablenames will be qualified by the given schema
and catalog names. If they are missing, tablenames will be unqualified. The
<literal>default-cascade</literal> attribute specifies what cascade style
should be assumed for properties and collections that do not specify a
<literal>cascade</literal> attribute. By default, the
<literal>auto-import</literal> attribute allows you to use unqualified class
names in the query language."
+msgstr "这个元素包括一些可选的属性。<literal>schema</literal> 和
<literal>catalog</literal> 属性, 指明了这个映射所连接(refer)的表所在的 schema 和/或 catalog
名称。假若指定了这个属性,表名会加上所指定的 schema 和 catalog
的名字扩展为全限定名。假若没有指定,表名就不会使用全限定名。<literal>default-cascade</literal> 指定了未明确注明
<literal>cascade</literal> 属性的 Java 属性和 集合类 Hibernate
会采取什么样的默认级联风格。<literal>auto-import</literal> 属性默认让我们在查询语言中可以使用非全限定名的类名。"
#. Tag: para
-#: basic_mapping.xml:141
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>schema</literal> (optional): the name of a database
schema."
-msgstr "<literal>schema</literal> (可选): 数据库schema的名称。"
+msgstr "<literal>schema</literal>(可选):数据库 schema 的名称。"
#. Tag: para
-#: basic_mapping.xml:146
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>catalog</literal> (optional): the name of a database
catalog."
-msgstr "<literal>catalog</literal> (可选): 数据库catalog的名称。"
+msgstr "<literal>catalog</literal>(可选):数据库 catalog 的名称。 "
#. Tag: para
-#: basic_mapping.xml:151
-#, fuzzy, no-c-format
-msgid ""
-"<literal>default-cascade</literal> (optional - defaults to
<literal>none</"
-"literal>): a default cascade style."
-msgstr ""
-"<literal>default-cascade</literal> (可选 - 默认为
<literal>none</literal>): "
-"默认的级联风格。"
+#, no-c-format
+msgid "<literal>default-cascade</literal> (optional - defaults to
<literal>none</literal>): a default cascade style."
+msgstr "<literal>default-cascade</literal>(可选 — 默认为
<literal>none</literal>):默认的级联风格。 "
#. Tag: para
-#: basic_mapping.xml:157
-#, fuzzy, no-c-format
-msgid ""
-"<literal>default-access</literal> (optional - defaults to
<literal>property</"
-"literal>): the strategy Hibernate should use for accessing all properties.
"
-"It can be a custom implementation of
<literal>PropertyAccessor</literal>."
-msgstr ""
-"<literal>default-access</literal> (可选 - 默认为
<literal>property</"
-"literal>): Hibernate用来访问所有属性的策略。可以通过实现"
-"<literal>PropertyAccessor</literal>接口 自定义。"
+#, no-c-format
+msgid "<literal>default-access</literal> (optional - defaults to
<literal>property</literal>): the strategy Hibernate should use for accessing
all properties. It can be a custom implementation of
<literal>PropertyAccessor</literal>."
+msgstr "<literal>default-access</literal>(可选 — 默认为
<literal>property</literal>):Hibernate 用来访问所有属性的策略。可以通过实现
<literal>PropertyAccessor</literal> 接口自定义。 "
#. Tag: para
-#: basic_mapping.xml:164
-#, fuzzy, no-c-format
-msgid ""
-"<literal>default-lazy</literal> (optional - defaults to
<literal>true</"
-"literal>): the default value for unspecified <literal>lazy</literal>
"
-"attributes of class and collection mappings."
-msgstr ""
-"<literal>default-lazy</literal> (可选 - 默认为
<literal>true</literal>): 指定"
-"了未明确注明<literal>lazy</literal>属性的Java属性和集合类, Hibernate会采取什"
-"么样的默认加载风格。"
+#, no-c-format
+msgid "<literal>default-lazy</literal> (optional - defaults to
<literal>true</literal>): the default value for unspecified
<literal>lazy</literal> attributes of class and collection mappings."
+msgstr "<literal>default-lazy</literal>(可选 — 默认为
<literal>true</literal>):指定了未明确注明 <literal>lazy</literal> 属性的 Java
属性和集合类,Hibernate 会采取什么样的默认加载风格。 "
#. Tag: para
-#: basic_mapping.xml:171
-#, fuzzy, no-c-format
-msgid ""
-"<literal>auto-import</literal> (optional - defaults to
<literal>true</"
-"literal>): specifies whether we can use unqualified class names of classes
"
-"in this mapping in the query language."
-msgstr ""
-"<literal>auto-import</literal> (可选 - 默认为
<literal>true</literal>): 指定"
-"我们是否可以在查询语言中使用非全限定的类名(仅限于本映射文件中的类)。"
+#, no-c-format
+msgid "<literal>auto-import</literal> (optional - defaults to
<literal>true</literal>): specifies whether we can use unqualified class names
of classes in this mapping in the query language."
+msgstr "<literal>auto-import</literal>(可选 — 默认为
<literal>true</literal>):指定我们是否可以在查询语言中使用非全限定的类名(仅限于本映射文件中的类)。 "
#. Tag: para
-#: basic_mapping.xml:178
-#, fuzzy, no-c-format
-msgid ""
-"<literal>package</literal> (optional): specifies a package prefix to
use for "
-"unqualified class names in the mapping document."
-msgstr ""
-"<literal>package</literal> (可选): 指定一个包前缀,如果在映射文档中没有指定全"
-"限定的类名, 就使用这个作为包名。"
+#, no-c-format
+msgid "<literal>package</literal> (optional): specifies a package prefix
to use for unqualified class names in the mapping document."
+msgstr
"<literal>package</literal>(可选):指定一个包前缀,如果在映射文档中没有指定全限定的类名,就使用这个作为包名。
"
#. Tag: para
-#: basic_mapping.xml:186
-#, fuzzy, no-c-format
-msgid ""
-"If you have two persistent classes with the same unqualified name, you "
-"should set <literal>auto-import=\"false\"</literal>. An
exception will "
-"result if you attempt to assign two classes to the same \"imported\"
name."
-msgstr ""
-"假若你有两个持久化类,它们的非全限定名是一样的(就是两个类的名字一样,所在的"
-"包不一样--译者注),
你应该设置<literal>auto-import=\"false\"</literal>。如果"
-"你把一个“import过”的名字同时对应两个类, Hibernate会抛出一个异常。"
+#, no-c-format
+msgid "If you have two persistent classes with the same unqualified name, you should
set <literal>auto-import=\"false\"</literal>. An exception will
result if you attempt to assign two classes to the same \"imported\"
name."
+msgstr "假若你有两个持久化类,它们的非全限定名是一样的(就是两个类的名字一样,所在的包不一样 — 译者注),你应该设置
<literal>auto-import=\"false\"</literal>。如果你把一个“导入过”的名字同时对应两个类,Hibernate
会抛出一个异常。"
#. Tag: para
-#: basic_mapping.xml:192
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>hibernate-mapping</literal> element allows you to nest
several "
-"persistent <literal><class></literal> mappings, as shown
above. It is, "
-"however, good practice (and expected by some tools) to map only a single "
-"persistent class, or a single class hierarchy, in one mapping file and name "
-"it after the persistent superclass. For example,
<literal>Cat.hbm.xml</"
-"literal>, <literal>Dog.hbm.xml</literal>, or if using inheritance,
"
-"<literal>Animal.hbm.xml</literal>."
-msgstr ""
-"注意<literal>hibernate-mapping</literal> 元素允许你嵌套多个如上所示的 "
-"<literal><class></literal>映射。但是最好的做法(也许一些工具需要的)是"
-"一个 持久化类(或一个类的继承层次)对应一个映射文件,并以持久化的超类名称命"
-"名,例如: <literal>Cat.hbm.xml</literal>,
<literal>Dog.hbm.xml</literal>,"
-"或者如果使用继承,<literal>Animal.hbm.xml</literal>。"
+#, no-c-format
+msgid "The <literal>hibernate-mapping</literal> element allows you to
nest several persistent <literal><class></literal> mappings, as
shown above. It is, however, good practice (and expected by some tools) to map only a
single persistent class, or a single class hierarchy, in one mapping file and name it
after the persistent superclass. For example, <literal>Cat.hbm.xml</literal>,
<literal>Dog.hbm.xml</literal>, or if using inheritance,
<literal>Animal.hbm.xml</literal>."
+msgstr "注意 <literal>hibernate-mapping</literal> 元素允许你嵌套多个如上所示的
<literal><class></literal>
映射。但是最好的做法(也许一些工具需要的)是一个持久化类(或一个类的继承层次)对应一个映射文件,并以持久化的超类名称命名,例如:<literal>Cat.hbm.xml</literal>、<literal>Dog.hbm.xml</literal>,或者如果使用继承,<literal>Animal.hbm.xml</literal>。"
#. Tag: title
-#: basic_mapping.xml:205
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Class"
-msgstr "class"
+msgstr "类"
#. Tag: para
-#: basic_mapping.xml:207
-#, fuzzy, no-c-format
-msgid ""
-"You can declare a persistent class using the <literal>class</literal>
"
-"element. For example:"
-msgstr "你可以使用<literal>class</literal>元素来定义一个持久化类:"
-
-#. Tag: programlisting
-#: basic_mapping.xml:235
#, no-c-format
-msgid ""
-"<![CDATA[<class\n"
-" name=\"ClassName\"\n"
-" table=\"tableName\"\n"
-" discriminator-value=\"discriminator_value\"\n"
-" mutable=\"true|false\"\n"
-" schema=\"owner\"\n"
-" catalog=\"catalog\"\n"
-" proxy=\"ProxyInterface\"\n"
-" dynamic-update=\"true|false\"\n"
-" dynamic-insert=\"true|false\"\n"
-" select-before-update=\"true|false\"\n"
-" polymorphism=\"implicit|explicit\"\n"
-" where=\"arbitrary sql where condition\"\n"
-" persister=\"PersisterClass\"\n"
-" batch-size=\"N\"\n"
-" optimistic-lock=\"none|version|dirty|all\"\n"
-" lazy=\"true|false\"\n"
-" entity-name=\"EntityName\"\n"
-" check=\"arbitrary sql check condition\"\n"
-" rowid=\"rowid\"\n"
-" subselect=\"SQL expression\"\n"
-" abstract=\"true|false\"\n"
-" node=\"element-name\"\n"
-"/>]]>"
-msgstr ""
+msgid "You can declare a persistent class using the
<literal>class</literal> element. For example:"
+msgstr "你可以使用 <literal>class</literal> 元素来定义一个持久化类。例如:"
#. Tag: para
-#: basic_mapping.xml:238
-#, fuzzy, no-c-format
-msgid ""
-"<literal>name</literal> (optional): the fully qualified Java class name
of "
-"the persistent class or interface. If this attribute is missing, it is "
-"assumed that the mapping is for a non-POJO entity."
-msgstr ""
-"<literal>name</literal> (可选): 持久化类(或者接口)的Java全限定名。 如果这个"
-"属性不存在,Hibernate将假定这是一个非POJO的实体映射。"
+#, no-c-format
+msgid "<literal>name</literal> (optional): the fully qualified Java
class name of the persistent class or interface. If this attribute is missing, it is
assumed that the mapping is for a non-POJO entity."
+msgstr "<literal>name</literal>(可选):持久化类(或者接口)的 Java 全限定名。
如果这个属性不存在,Hibernate 将假定这是一个非 POJO 的实体映射。 "
#. Tag: para
-#: basic_mapping.xml:245
-#, fuzzy, no-c-format
-msgid ""
-"<literal>table</literal> (optional - defaults to the unqualified class
"
-"name): the name of its database table."
-msgstr ""
-"<literal>table</literal> (可选 - 默认是类的非全限定名): 对应的数据库表名。"
+#, no-c-format
+msgid "<literal>table</literal> (optional - defaults to the unqualified
class name): the name of its database table."
+msgstr "<literal>table</literal>(可选 — 默认是类的非全限定名):对应的数据库表名。 "
#. Tag: para
-#: basic_mapping.xml:251
-#, fuzzy, no-c-format
-msgid ""
-"<literal>discriminator-value</literal> (optional - defaults to the
class "
-"name): a value that distinguishes individual subclasses that is used for "
-"polymorphic behavior. Acceptable values include <literal>null</literal>
and "
-"<literal>not null</literal>."
-msgstr ""
-"<literal>discriminator-value</literal> (可选 - 默认和类名一样): 一个用于区分"
-"不同的子类的值,在多态行为时使用。它可以接受的值包括 <literal>null</literal> "
-"和 <literal>not null</literal>。"
+#, no-c-format
+msgid "<literal>discriminator-value</literal> (optional - defaults to
the class name): a value that distinguishes individual subclasses that is used for
polymorphic behavior. Acceptable values include <literal>null</literal> and
<literal>not null</literal>."
+msgstr "<literal>discriminator-value</literal>(可选 —
默认和类名一样):一个用于区分不同的子类的值,在多态行为时使用。它可以接受的值包括 <literal>null</literal> 和
<literal>not null</literal>。 "
#. Tag: para
-#: basic_mapping.xml:258
-#, fuzzy, no-c-format
-msgid ""
-"<literal>mutable</literal> (optional - defaults to
<literal>true</literal>): "
-"specifies that instances of the class are (not) mutable."
-msgstr ""
-"<literal>mutable</literal>
(可选,默认值为<literal>true</literal>): 表明该类"
-"的实例是可变的或者不可变的。"
+#, no-c-format
+msgid "<literal>mutable</literal> (optional - defaults to
<literal>true</literal>): specifies that instances of the class are (not)
mutable."
+msgstr "<literal>mutable</literal>(可选,默认值为
<literal>true</literal>):表明该类的实例是可变的或者不可变的。 "
#. Tag: para
-#: basic_mapping.xml:264 basic_mapping.xml:2231
-#, fuzzy, no-c-format
-msgid ""
-"<literal>schema</literal> (optional): overrides the schema name
specified by "
-"the root <literal><hibernate-mapping></literal>
element."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>schema</literal> (可选):
覆盖在根<literal><hibernate-mapping>"
-"</literal>元素中指定的schema名字。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>schema</literal>
(可选):覆盖由根<literal><hibernate-mapping></"
-"literal>元素指定的模式名称。"
+#, no-c-format
+msgid "<literal>schema</literal> (optional): overrides the schema name
specified by the root <literal><hibernate-mapping></literal>
element."
+msgstr "<literal>schema</literal>(可选):覆盖在根
<literal><hibernate-mapping></literal> 元素中指定的 schema 名字。 "
#. Tag: para
-#: basic_mapping.xml:270 basic_mapping.xml:2237
-#, fuzzy, no-c-format
-msgid ""
-"<literal>catalog</literal> (optional): overrides the catalog name
specified "
-"by the root <literal><hibernate-mapping></literal>
element."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>catalog</literal> (可选):
覆盖在根<literal><hibernate-mapping>"
-"</literal>元素中指定的catalog名字。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>catalog</literal> (可选): 覆盖由根
<literal><hibernate-"
-"mapping></literal>元素指定的目录名称。"
+#, no-c-format
+msgid "<literal>catalog</literal> (optional): overrides the catalog name
specified by the root <literal><hibernate-mapping></literal>
element."
+msgstr "<literal>catalog</literal>(可选):覆盖在根
<literal><hibernate-mapping></literal> 元素中指定的 catalog 名字。
"
#. Tag: para
-#: basic_mapping.xml:276
-#, fuzzy, no-c-format
-msgid ""
-"<literal>proxy</literal> (optional): specifies an interface to use for
lazy "
-"initializing proxies. You can specify the name of the class itself."
-msgstr ""
-"<literal>proxy</literal> (可选): 指定一个接口,在延迟装载时作为代理使用。 你"
-"可以在这里使用该类自己的名字。"
+#, no-c-format
+msgid "<literal>proxy</literal> (optional): specifies an interface to
use for lazy initializing proxies. You can specify the name of the class itself."
+msgstr
"<literal>proxy</literal>(可选):指定一个接口,在延迟装载时作为代理使用。你可以在这里使用该类自己的名字。
"
#. Tag: para
-#: basic_mapping.xml:282
-#, fuzzy, no-c-format
-msgid ""
-"<literal>dynamic-update</literal> (optional - defaults to
<literal>false</"
-"literal>): specifies that <literal>UPDATE</literal> SQL should be
generated "
-"at runtime and can contain only those columns whose values have changed."
-msgstr ""
-"<literal>dynamic-update</literal> (可选, 默认为
<literal>false</literal>): 指"
-"定用于<literal>UPDATE</literal> 的SQL将会在运行时动态生成,并且只更新那些改变"
-"过的字段。"
+#, no-c-format
+msgid "<literal>dynamic-update</literal> (optional - defaults to
<literal>false</literal>): specifies that
<literal>UPDATE</literal> SQL should be generated at runtime and can contain
only those columns whose values have changed."
+msgstr "<literal>dynamic-update</literal>(可选,默认为
<literal>false</literal>):指定用于 <literal>UPDATE</literal> 的 SQL
将会在运行时动态生成,并且只更新那些改变过的字段。 "
#. Tag: para
-#: basic_mapping.xml:289
-#, fuzzy, no-c-format
-msgid ""
-"<literal>dynamic-insert</literal> (optional - defaults to
<literal>false</"
-"literal>): specifies that <literal>INSERT</literal> SQL should be
generated "
-"at runtime and contain only the columns whose values are not null."
-msgstr ""
-"<literal>dynamic-insert</literal> (可选, 默认为
<literal>false</literal>): 指"
-"定用于<literal>INSERT</literal>的 SQL 将会在运行时动态生成,并且只包含那些非"
-"空值字段。"
+#, no-c-format
+msgid "<literal>dynamic-insert</literal> (optional - defaults to
<literal>false</literal>): specifies that
<literal>INSERT</literal> SQL should be generated at runtime and contain only
the columns whose values are not null."
+msgstr "<literal>dynamic-insert</literal>(可选,默认为
<literal>false</literal>):指定用于 <literal>INSERT</literal> 的 SQL
将会在运行时动态生成,并且只包含那些非空值字段。 "
#. Tag: para
-#: basic_mapping.xml:296
-#, fuzzy, no-c-format
-msgid ""
-"<literal>select-before-update</literal> (optional - defaults to "
-"<literal>false</literal>): specifies that Hibernate should
<emphasis>never</"
-"emphasis> perform an SQL <literal>UPDATE</literal> unless it is
certain that "
-"an object is actually modified. Only when a transient object has been "
-"associated with a new session using <literal>update()</literal>, will
"
-"Hibernate perform an extra SQL <literal>SELECT</literal> to determine
if an "
-"<literal>UPDATE</literal> is actually required."
-msgstr ""
-"<literal>select-before-update</literal> (可选, 默认为
<literal>false</"
-"literal>): 指定Hibernate除非确定对象真正被修改了(如果该值为true-译注),否"
-"则<emphasis>不会</emphasis>执行SQL
<literal>UPDATE</literal>操作。在特定场合"
-"(实际上,它只在一个瞬时对象(transient object)关联到一个 新的session中时执"
-"行的update()中生效),这说明Hibernate会在<literal>UPDATE</literal> 之前执行一"
-"次额外的SQL <literal>SELECT</literal>操作,来决定是否应该执行 "
-"<literal>UPDATE</literal>。"
+#, no-c-format
+msgid "<literal>select-before-update</literal> (optional - defaults to
<literal>false</literal>): specifies that Hibernate should
<emphasis>never</emphasis> perform an SQL
<literal>UPDATE</literal> unless it is certain that an object is actually
modified. Only when a transient object has been associated with a new session using
<literal>update()</literal>, will Hibernate perform an extra SQL
<literal>SELECT</literal> to determine if an
<literal>UPDATE</literal> is actually required."
+msgstr "<literal>select-before-update</literal>(可选,默认为
<literal>false</literal>):指定 Hibernate 除非确定对象真正被修改了(如果该值为 true —
译注),否则<emphasis>不会</emphasis>执行 SQL <literal>UPDATE</literal>
操作。在特定场合(实际上,它只在一个瞬时对象(transient object)关联到一个新的 session 中时执行的 update() 中生效),这说明 Hibernate
会在 <literal>UPDATE</literal> 之前执行一次额外的 SQL
<literal>SELECT</literal> 操作来决定是否确实需要执行
<literal>UPDATE</literal>。"
#. Tag: para
-#: basic_mapping.xml:306
-#, fuzzy, no-c-format
-msgid ""
-"<literal>polymorphism</literal> (optional - defaults to
<literal>implicit</"
-"literal>): determines whether implicit or explicit query polymorphism is "
-"used."
-msgstr ""
-"<literal>polymorphism(多态)</literal> (可选, 默认值为 <literal>implicit
(隐"
-"式) </literal>): 界定是隐式还是显式的使用多态查询(这只在Hibernate的具体表继"
-"承策略中用到-译注)。"
+#, no-c-format
+msgid "<literal>polymorphism</literal> (optional - defaults to
<literal>implicit</literal>): determines whether implicit or explicit query
polymorphism is used."
+msgstr "<literal>polymorphism(多态)</literal>(可选,默认值为
<literal>implicit (隐式)</literal>):界定是隐式还是显式的使用多态查询(这只在 Hibernate 的具体表继承策略中用到 —
译注)。 "
#. Tag: para
-#: basic_mapping.xml:312
-#, fuzzy, no-c-format
-msgid ""
-"<literal>where</literal> (optional): specifies an arbitrary SQL "
-"<literal>WHERE</literal> condition to be used when retrieving objects
of "
-"this class."
-msgstr ""
-"<literal>where</literal> (可选)
指定一个附加的SQL<literal>WHERE</literal> 条"
-"件, 在抓取这个类的对象时会一直增加这个条件。"
+#, no-c-format
+msgid "<literal>where</literal> (optional): specifies an arbitrary SQL
<literal>WHERE</literal> condition to be used when retrieving objects of this
class."
+msgstr "<literal>where</literal>(可选)指定一个附加的 SQL
<literal>WHERE</literal> 条件,在抓取这个类的对象时会一直增加这个条件。 "
#. Tag: para
-#: basic_mapping.xml:318
-#, fuzzy, no-c-format
-msgid ""
-"<literal>persister</literal> (optional): specifies a custom "
-"<literal>ClassPersister</literal>."
-msgstr ""
-"<literal>persister</literal> (可选):
指定一个定制的<literal>ClassPersister</"
-"literal>。"
+#, no-c-format
+msgid "<literal>persister</literal> (optional): specifies a custom
<literal>ClassPersister</literal>."
+msgstr "<literal>persister</literal>(可选):指定一个定制的
<literal>ClassPersister</literal>。 "
#. Tag: para
-#: basic_mapping.xml:323
-#, fuzzy, no-c-format
-msgid ""
-"<literal>batch-size</literal> (optional - defaults to
<literal>1</literal>): "
-"specifies a \"batch size\" for fetching instances of this class by
"
-"identifier."
-msgstr ""
-"<literal>batch-size</literal> (可选,默认是<literal>1</literal>)
指定一个用于 "
-"根据标识符(identifier)抓取实例时使用的\"batch size\"(批次抓取数量)。"
+#, no-c-format
+msgid "<literal>batch-size</literal> (optional - defaults to
<literal>1</literal>): specifies a \"batch size\" for fetching
instances of this class by identifier."
+msgstr "<literal>batch-size</literal>(可选,默认是
<literal>1</literal>)指定一个用于 根据标识符(identifier)抓取实例时使用的 \"batch
size\"(批次抓取数量)。 "
#. Tag: para
-#: basic_mapping.xml:329
-#, fuzzy, no-c-format
-msgid ""
-"<literal>optimistic-lock</literal> (optional - defaults to
<literal>version</"
-"literal>): determines the optimistic locking strategy."
-msgstr ""
-"<literal>optimistic-lock(乐观锁定)</literal> (可选,默认是"
-"<literal>version</literal>): 决定乐观锁定的策略。"
+#, no-c-format
+msgid "<literal>optimistic-lock</literal> (optional - defaults to
<literal>version</literal>): determines the optimistic locking
strategy."
+msgstr "<literal>optimistic-lock(乐观锁定)</literal>(可选,默认是
<literal>version</literal>):决定乐观锁定的策略。 "
#. Tag: para
-#: basic_mapping.xml:335
-#, fuzzy, no-c-format
-msgid ""
-"<literal>lazy</literal> (optional): lazy fetching can be disabled by
setting "
-"<literal>lazy=\"false\"</literal>."
-msgstr ""
-"<literal>lazy</literal> (可选):
通过设置<literal>lazy=\"false\"</literal>, "
-"所有的延迟加载(Lazy fetching)功能将被全部禁用(disabled)。"
+#, no-c-format
+msgid "<literal>lazy</literal> (optional): lazy fetching can be disabled
by setting <literal>lazy=\"false\"</literal>."
+msgstr "<literal>lazy</literal>(可选):通过设置
<literal>lazy=\"false\"</literal>,所有的延迟加载(Lazy
fetching)功能将被全部禁用(disabled)。"
#. Tag: para
-#: basic_mapping.xml:341
-#, fuzzy, no-c-format
-msgid ""
-"<literal>entity-name</literal> (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 <xref
linkend=\"persistent-"
-"classes-dynamicmodels\"/> and <xref linkend=\"xml\"/> for
more information."
-msgstr ""
-"<literal>entity-name</literal> (可选,默认为类名): Hibernate3允许一个类进行多"
-"次映射( 前提是映射到不同的表),并且允许使用Maps或XML代替Java层次的实体映射 "
-"(也就是实现动态领域模型,不用写持久化类-译注)。 更多信息请看<xref linkend="
-"\"persistent-classes-dynamicmodels\"/> and <xref
linkend=\"xml\"/>。"
+#, no-c-format
+msgid "<literal>entity-name</literal> (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
<xref linkend=\"persistent-classes-dynamicmodels\" /> and <xref
linkend=\"xml\" /> for more information."
+msgstr "<literal>entity-name</literal>(可选,默认为类名):Hibernate3
允许一个类进行多次映射(前提是映射到不同的表),并且允许使用 Maps 或 XML 代替 Java 层次的实体映射(也就是实现动态领域模型,不用写持久化类-译注)。更多信息请看
<xref linkend=\"persistent-classes-dynamicmodels\"/> 和 <xref
linkend=\"xml\"/>。 "
#. Tag: para
-#: basic_mapping.xml:351
-#, fuzzy, no-c-format
-msgid ""
-"<literal>check</literal> (optional): an SQL expression used to generate
a "
-"multi-row <emphasis>check</emphasis> constraint for automatic schema
"
-"generation."
-msgstr ""
-"<literal>check</literal> (可选): 这是一个SQL表达式, 用于为自动生成的schema添"
-"加多行(multi-row)约束<emphasis>检查</emphasis>。"
+#, no-c-format
+msgid "<literal>check</literal> (optional): an SQL expression used to
generate a multi-row <emphasis>check</emphasis> constraint for automatic
schema generation."
+msgstr "<literal>check</literal>(可选):这是一个 SQL 表达式, 用于为自动生成的 schema
添加多行(multi-row)约束<emphasis>检查</emphasis>。 "
#. Tag: para
-#: basic_mapping.xml:357
-#, fuzzy, no-c-format
-msgid ""
-"<literal>rowid</literal> (optional): Hibernate can use ROWIDs on
databases. "
-"On Oracle, for example, Hibernate can use the <literal>rowid</literal>
extra "
-"column for fast updates once this option has been set to
<literal>rowid</"
-"literal>. A ROWID is an implementation detail and represents the physical
"
-"location of a stored tuple."
-msgstr ""
-"<literal>rowid</literal> (可选): Hibernate可以使用数据库支持的所谓的ROWIDs,"
-"例如: Oracle数据库,如果你设置这个可选的<literal>rowid</literal>, Hibernate"
-"可以使用额外的字段<literal>rowid</literal>实现快速更新。ROWID是这个功能实现的"
-"重点, 它代表了一个存储元组(tuple)的物理位置。"
+#, no-c-format
+msgid "<literal>rowid</literal> (optional): Hibernate can use ROWIDs on
databases. On Oracle, for example, Hibernate can use the
<literal>rowid</literal> extra column for fast updates once this option has
been set to <literal>rowid</literal>. A ROWID is an implementation detail and
represents the physical location of a stored tuple."
+msgstr "<literal>rowid</literal>(可选):Hibernate 可以使用数据库支持的所谓的
ROWIDs,例如:Oracle 数据库,如果你设置这个可选的 <literal>rowid</literal>,Hibernate 可以使用额外的字段
<literal>rowid</literal> 实现快速更新。ROWID 是这个功能实现的重点,它代表了一个存储元组(tuple)的物理位置。
"
#. Tag: para
-#: basic_mapping.xml:364
-#, fuzzy, no-c-format
-msgid ""
-"<literal>subselect</literal> (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 ""
-"<literal>subselect</literal> (可选): 它将一个不可变(immutable)并且只读的实"
-"体映射到一个数据库的 子查询中。当你想用视图代替一张基本表的时候,这是有用的,"
-"但最好不要这样做。更多的介绍请看下面内容。"
+#, no-c-format
+msgid "<literal>subselect</literal> (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
"<literal>subselect</literal>(可选):它将一个不可变(immutable)并且只读的实体映射到一个数据库的子查询中。当你想用视图代替一张基本表的时候,这是有用的,但最好不要这样做。更多的介绍请看下面内容。
"
#. Tag: para
-#: basic_mapping.xml:371
-#, fuzzy, no-c-format
-msgid ""
-"<literal>abstract</literal> (optional): is used to mark abstract
"
-"superclasses in <literal><union-subclass></literal>
hierarchies."
-msgstr ""
-"<literal>abstract</literal> (可选):
用于在<literal><union-subclass></"
-"literal>的继承结构 (hierarchies)中标识抽象超类。"
+#, no-c-format
+msgid "<literal>abstract</literal> (optional): is used to mark abstract
superclasses in <literal><union-subclass></literal>
hierarchies."
+msgstr "<literal>abstract</literal>(可选):用于在
<literal><union-subclass></literal>
的层次结构(hierarchies)中标识抽象超类。"
#. Tag: para
-#: basic_mapping.xml:379
-#, fuzzy, 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
<literal><"
-"subclass></literal> element. You can persist any
<emphasis>static</"
-"emphasis> inner class. Specify the class name using the standard form i.e.
"
-"<literal>e.g.Foo$Bar</literal>."
-msgstr ""
-"若指明的持久化类实际上是一个接口,这也是完全可以接受的。 之后你可以用元素"
-"<literal><subclass></literal>来指定该接口的实际实现类。 你可以持久化任"
-"何<emphasis>static</emphasis>(静态的)内部类。 你应该使用标准的类名格式来指"
-"定类名,<literal>比如:Foo$Bar</literal>。"
+#, 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
<literal><subclass></literal> element. You can persist any
<emphasis>static</emphasis> inner class. Specify the class name using the
standard form i.e. <literal>e.g.Foo$Bar</literal>."
+msgstr "若指明的持久化类实际上是一个接口,这也是完全可以接受的。之后你可以用元素
<literal><subclass></literal> 来指定该接口的实际实现类。你可以持久化任何
<emphasis>static</emphasis>(静态的)内部类。你应该使用标准的类名格式来指定类名,比如:<literal>Foo$Bar</literal>。"
#. Tag: para
-#: basic_mapping.xml:386
-#, fuzzy, no-c-format
-msgid ""
-"Immutable classes, <literal>mutable=\"false\"</literal>,
cannot be updated "
-"or deleted by the application. This allows Hibernate to make some minor "
-"performance optimizations."
-msgstr ""
-"不可变类,<literal>mutable=\"false\"</literal>不可以被应用程序更新或者删除。
"
-"这可以让Hibernate做一些小小的性能优化。"
+#, no-c-format
+msgid "Immutable classes,
<literal>mutable=\"false\"</literal>, cannot be updated or deleted
by the application. This allows Hibernate to make some minor performance
optimizations."
+msgstr "不可变类,<literal>mutable=\"false\"</literal>
不可以被应用程序更新或者删除。这允许 Hibernate 实现一些小小的性能优化。"
#. Tag: para
-#: basic_mapping.xml:391
-#, fuzzy, no-c-format
-msgid ""
-"The optional <literal>proxy</literal> attribute enables lazy
initialization "
-"of persistent instances of the class. Hibernate will initially return CGLIB "
-"proxies 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 ""
-"可选的<literal>proxy</literal>属性允许延迟加载类的持久化实例。 Hibernate开始"
-"会返回实现了这个命名接口的CGLIB代理。当代理的某个方法被实际调用的时候, 真实"
-"的持久化对象才会被装载。参见下面的“用于延迟装载的代理”。"
+#, no-c-format
+msgid "The optional <literal>proxy</literal> attribute enables lazy
initialization of persistent instances of the class. Hibernate will initially return CGLIB
proxies 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 "可选的 <literal>proxy</literal> 属性允许延迟加载类的持久化实例。Hibernate
开始会返回实现了这个命名接口的 CGLIB 代理。当代理的某个方法被实际调用的时候,真实的持久化对象才会被装载。参见下面的“用于延迟装载的代理”。 "
#. Tag: para
-#: basic_mapping.xml:398
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Implicit</emphasis> polymorphism means that instances of the
class "
-"will be returned by a query that names any superclass or implemented "
-"interface or class, and that instances of any subclass of the class will be "
-"returned by a query that names the class itself.
<emphasis>Explicit</"
-"emphasis> polymorphism means that class instances will be returned only by
"
-"queries that explicitly name that class. Queries that name the class will "
-"return only instances of subclasses mapped inside this
<literal><class>"
-"</literal> declaration as a
<literal><subclass></literal> or "
-"<literal><joined-subclass></literal>. For most purposes,
the default "
-"<literal>polymorphism=\"implicit\"</literal> is appropriate.
Explicit "
-"polymorphism is useful when two different classes are mapped to the same "
-"table This allows a \"lightweight\" class that contains a subset of the
"
-"table columns."
-msgstr ""
-"<emphasis>Implicit</emphasis> (隐式)的多态是指,如果查询时给出的是任何超类、"
-"该类实现的接口或者该类的 名字,都会返回这个类的实例;如果查询中给出的是子类的"
-"名字,则会返回子类的实例。 <emphasis>Explicit</emphasis> (显式)的多态是指,"
-"只有在查询时给出明确的该类名字时才会返回这个类的实例; 同时只有在这个"
-"<literal><class></literal>的定义中作为<literal><subclass></"
-"literal>
或者<literal><joined-subclass></literal>出现的子类,才会可能返"
-"回。
在大多数情况下,默认的<literal>polymorphism=\"implicit\"</literal>都是合"
-"适的。 显式的多态在有两个不同的类映射到同一个表的时候很有用。(允许一个“轻"
-"型”的类,只包含部分表字段)。"
+#, no-c-format
+msgid "<emphasis>Implicit</emphasis> polymorphism means that instances
of the class will be returned by a query that names any superclass or implemented
interface or class, and that instances of any subclass of the class will be returned by a
query that names the class itself. <emphasis>Explicit</emphasis> polymorphism
means that class instances will be returned only by queries that explicitly name that
class. Queries that name the class will return only instances of subclasses mapped inside
this <literal><class></literal> declaration as a
<literal><subclass></literal> or
<literal><joined-subclass></literal>. For most purposes, the
default <literal>polymorphism=\"implicit\"</literal> is appropriate.
Explicit polymorphism is useful when two different classes are mapped to the same table
This allows a \"lightweight\" class that contains a subset of the table
columns."
+msgstr
"<emphasis>Implicit</emphasis>(隐式)的多态是指,如果查询时给出的是任何超类、该类实现的接口或者该类的名字,都会返回这个类的实例;如果查询中给出的是子类的名字,则会返回子类的实例。<emphasis>Explicit</emphasis>(显式)的多态是指,只有在查询时给出明确的该类名字时才会返回这个类的实例;
同时只有在这个 <literal><class></literal> 的定义中作为
<literal><subclass></literal> 或者
<literal><joined-subclass></literal> 出现的子类,才会可能返回。在大多数情况下,默认的
<literal>polymorphism=\"implicit\"</literal>
都是合适的。显式的多态在有两个不同的类映射到同一个表的时候很有用。(允许一个“轻量级”的类,只包含部分表字段)。 "
#. Tag: para
-#: basic_mapping.xml:410
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>persister</literal> attribute lets you customize the
"
-"persistence strategy used for the class. You can, for example, specify your "
-"own subclass of
<literal>org.hibernate.persister.EntityPersister</literal>, "
-"or you can even provide a completely new implementation of the interface "
-"<literal>org.hibernate.persister.ClassPersister</literal> that
implements, "
-"for example, persistence via stored procedure calls, serialization to flat "
-"files or LDAP. See
<literal>org.hibernate.test.CustomPersister</literal> for "
-"a simple example of \"persistence\" to a
<literal>Hashtable</literal>."
-msgstr ""
-"<literal>persister</literal>属性可以让你定制这个类使用的持久化策略。 你可以指"
-"定你自己实现
<literal>org.hibernate.persister.EntityPersister</literal>的子"
-"类,你甚至可以完全从头开始编写一个 <literal>org.hibernate.persister."
-"ClassPersister</literal>接口的实现, 比如是用储存过程调用、序列化到文件或者"
-"LDAP数据库来实现。 参阅<literal>org.hibernate.test.CustomPersister</"
-"literal>,这是一个简单的例子 (“持久化”到一个<literal>Hashtable</literal>)。"
+#, no-c-format
+msgid "The <literal>persister</literal> attribute lets you customize the
persistence strategy used for the class. You can, for example, specify your own subclass
of <literal>org.hibernate.persister.EntityPersister</literal>, or you can even
provide a completely new implementation of the interface
<literal>org.hibernate.persister.ClassPersister</literal> that implements, for
example, persistence via stored procedure calls, serialization to flat files or LDAP. See
<literal>org.hibernate.test.CustomPersister</literal> for a simple example of
\"persistence\" to a <literal>Hashtable</literal>."
+msgstr "<literal>persister</literal> 属性可以让你定制这个类使用的持久化策略。你可以指定你自己实现
<literal>org.hibernate.persister.EntityPersister</literal> 的子类,你甚至可以完全从头开始编写一个
<literal>org.hibernate.persister.ClassPersister</literal>
接口的实现,比如是用储存过程调用、序列化到文件或者 LDAP 数据库来实现。参阅
<literal>org.hibernate.test.CustomPersister</literal>,这是持久化到
<literal>Hashtable</literal> 的一个简单例子。 "
#. Tag: para
-#: basic_mapping.xml:421
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>dynamic-update</literal> and
<literal>dynamic-insert</literal> "
-"settings are not inherited by subclasses, so they can also be specified on "
-"the <literal><subclass></literal> or
<literal><joined-subclass></"
-"literal> elements. Although these settings can increase performance in some
"
-"cases, they can actually decrease performance in others."
-msgstr ""
-"请注意<literal>dynamic-update</literal>和<literal>dynamic-insert</literal>的"
-"设置并不会继承到子类, 所以在<literal><subclass></literal>或者"
-"<literal><joined-subclass></literal>元素中可能
需要再次设置。这些设置是"
-"否能够提高效率要视情形而定。请用你的智慧决定是否使用。"
+#, no-c-format
+msgid "The <literal>dynamic-update</literal> and
<literal>dynamic-insert</literal> settings are not inherited by subclasses, so
they can also be specified on the <literal><subclass></literal>
or <literal><joined-subclass></literal> elements. Although these
settings can increase performance in some cases, they can actually decrease performance in
others."
+msgstr "请注意 <literal>dynamic-update</literal> 和
<literal>dynamic-insert</literal> 的设置并不会继承到子类,所以在
<literal><subclass></literal> 或者
<literal><joined-subclass></literal>
元素中可能需要再次设置。这些设置在某些情况下能够提高效率,而其他情况下则反而可能降低性能。"
#. Tag: para
-#: basic_mapping.xml:429
-#, fuzzy, no-c-format
-msgid ""
-"Use of <literal>select-before-update</literal> 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 "
-"<literal>Session</literal>."
-msgstr ""
-"使用<literal>select-before-update</literal>通常会降低性能。如果你重新连接一个"
-"脱管(detache)对象实例 到一个<literal>Session</literal>中时,它可以防止数据"
-"库不必要的触发update。 这就很有用了。"
+#, no-c-format
+msgid "Use of <literal>select-before-update</literal> 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
<literal>Session</literal>."
+msgstr "使用 <literal>select-before-update</literal>
通常会降低性能。如果你重新连接一个脱管(detached)对象实例 到一个 <literal>Session</literal>
中时,它可以防止数据库不必要的触发 update。这就很有用了。"
#. Tag: para
-#: basic_mapping.xml:435
#, no-c-format
-msgid ""
-"If you enable <literal>dynamic-update</literal>, you will have a choice
of "
-"optimistic locking strategies:"
-msgstr ""
-"如果你打开了<literal>dynamic-update</literal>,你可以选择几种乐观锁定的策略:"
+msgid "If you enable <literal>dynamic-update</literal>, you will have a
choice of optimistic locking strategies:"
+msgstr "如果你打开了<literal>dynamic-update</literal>,你可以选择几种乐观锁定的策略:"
#. Tag: para
-#: basic_mapping.xml:441
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>version</literal>: check the version/timestamp
columns"
-msgstr "<literal>version(版本检查)</literal> 检查version/timestamp字段"
+msgstr "<literal>version(版本检查)</literal>:检查 version/timestamp 字段"
#. Tag: para
-#: basic_mapping.xml:446
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>all</literal>: check all columns"
-msgstr "<literal>all(全部)</literal> 检查全部字段"
+msgstr "<literal>all(全部)</literal>:检查全部字段"
#. Tag: para
-#: basic_mapping.xml:451
-#, fuzzy, no-c-format
-msgid ""
-"<literal>dirty</literal>: check the changed columns, allowing some
"
-"concurrent updates"
-msgstr "<literal>dirty(脏检查)</literal>只检察修改过的字段"
+#, no-c-format
+msgid "<literal>dirty</literal>: check the changed columns, allowing
some concurrent updates"
+msgstr "<literal>dirty(脏检查)</literal>:只检察修改过的字段,允许某些并行更新"
#. Tag: para
-#: basic_mapping.xml:456
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>none</literal>: do not use optimistic locking"
-msgstr "<literal>none(不检查)</literal>不使用乐观锁定"
+msgstr "<literal>none(不检查)</literal>:不使用乐观锁定"
#. Tag: para
-#: basic_mapping.xml:461
-#, fuzzy, no-c-format
-msgid ""
-"It is <emphasis>strongly</emphasis> 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 <literal>Session.merge()</literal> is
used)."
-msgstr ""
-"我们<emphasis>非常</emphasis>强烈建议你在Hibernate中使用version/timestamp字段"
-"来进行乐观锁定。 对性能来说,这是最好的选择,并且这也是唯一能够处理在session"
-"外进行操作的策略(例如: 在使用<literal>Session.merge()</literal>的时候)。"
+#, no-c-format
+msgid "It is <emphasis>strongly</emphasis> 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
<literal>Session.merge()</literal> is used)."
+msgstr "我们<emphasis>强烈</emphasis>建议你在 Hibernate 中使用 version/timestamp
字段来进行乐观锁定。这个选择可以优化性能,且能够处理对脱管实例的修改(例如:在使用 <literal>Session.merge()</literal>
的时候)。"
#. Tag: para
-#: basic_mapping.xml:468
-#, fuzzy, 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子查询表达式:"
-
-#. Tag: programlisting
-#: basic_mapping.xml:476
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Summary\">\n"
-" <subselect>\n"
-" select item.name, max(bid.amount), count(*)\n"
-" from item\n"
-" join bid on bid.item_id = item.id\n"
-" group by item.name\n"
-" </subselect>\n"
-" <synchronize table=\"item\"/>\n"
-" <synchronize table=\"bid\"/>\n"
-" <id name=\"name\"/>\n"
-" ...\n"
-"</class>]]>"
-msgstr ""
+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
-#: basic_mapping.xml:478
-#, fuzzy, no-c-format
-msgid ""
-"Declare the tables to synchronize this entity with, ensuring that auto-flush
"
-"happens correctly and that queries against the derived entity do not return "
-"stale data. The <literal><subselect></literal> is
available both as an "
-"attribute and a nested mapping element."
-msgstr ""
-"定义这个实体用到的表为同步(synchronize),确保自动刷新(auto-flush)正确执"
-"行, 并且依赖原实体的查询不会返回过期数据。<literal><subselect></"
-"literal>在属性元素 和一个嵌套映射元素中都可见。"
+#, no-c-format
+msgid "Declare the tables to synchronize this entity with, ensuring that auto-flush
happens correctly and that queries against the derived entity do not return stale data.
The <literal><subselect></literal> is available both as an
attribute and a nested mapping element."
+msgstr
"定义这个实体用到的表为同步(synchronize),确保自动刷新(auto-flush)正确执行,并且依赖原实体的查询不会返回过期数据。在属性元素和嵌套映射元素中都可使用
<literal><subselect></literal>。"
#. Tag: title
-#: basic_mapping.xml:488
#, no-c-format
-msgid "<title>id</title>"
-msgstr ""
+msgid "id"
+msgstr "id"
#. Tag: para
-#: basic_mapping.xml:490
#, no-c-format
-msgid ""
-"Mapped classes <emphasis>must</emphasis> declare the primary key column
of "
-"the database table. Most classes will also have a JavaBeans-style property "
-"holding the unique identifier of an instance. The
<literal><id></"
-"literal> element defines the mapping from that property to the primary key
"
-"column."
-msgstr ""
-"被映射的类<emphasis>必须</emphasis>定义对应数据库表主键字段。大多数类有一个"
-"JavaBeans风格的属性, 为每一个实例包含唯一的标识。<literal><id></"
-"literal> 元素定义了该属性到数据库表主键字段的映射。"
+msgid "Mapped classes <emphasis>must</emphasis> declare the primary key
column of the database table. Most classes will also have a JavaBeans-style property
holding the unique identifier of an instance. The
<literal><id></literal> element defines the mapping from that
property to the primary key column."
+msgstr "被映射的类<emphasis>必须</emphasis>定义对应数据库表主键字段。大多数类有一个 JavaBeans
风格的属性, 为每一个实例包含唯一的标识。<literal><id></literal>
元素定义了该属性到数据库表主键字段的映射。"
-#. Tag: programlisting
-#: basic_mapping.xml:505
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<id\n"
-" name=\"propertyName\"\n"
-" type=\"typename\"\n"
-" column=\"column_name\"\n"
-" unsaved-value=\"null|any|none|undefined|id_value\"\n"
-" access=\"field|property|ClassName\">\n"
-"
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
-"\n"
-" <generator class=\"generatorClass\"/>\n"
-"</id>]]>"
-msgstr ""
+msgid "<literal>name</literal> (optional): the name of the identifier
property."
+msgstr "<literal>name</literal>(可选):标识属性的名字。 "
#. Tag: para
-#: basic_mapping.xml:508
-#, fuzzy, no-c-format
-msgid ""
-"<literal>name</literal> (optional): the name of the identifier
property."
-msgstr "<literal>name</literal> (可选): 标识属性的名字。"
+#, no-c-format
+msgid "<literal>type</literal> (optional): a name that indicates the
Hibernate type."
+msgstr "<literal>type</literal>(可选):一个 Hibernate 类型的名字。"
#. Tag: para
-#: basic_mapping.xml:513 basic_mapping.xml:1351
#, no-c-format
-msgid ""
-"<literal>type</literal> (optional): a name that indicates the Hibernate
type."
-msgstr "<literal>type</literal> (可选): 一个Hibernate类型的名字。"
+msgid "<literal>column</literal> (optional - defaults to the property
name): the name of the primary key column."
+msgstr "<literal>column</literal>(可选 — 默认为属性名):主键字段的名字。 "
#. Tag: para
-#: basic_mapping.xml:518
-#, fuzzy, no-c-format
-msgid ""
-"<literal>column</literal> (optional - defaults to the property name):
the "
-"name of the primary key column."
-msgstr "<literal>column</literal> (可选 - 默认为属性名): 主键字段的名字。"
+#, no-c-format
+msgid "<literal>unsaved-value</literal> (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 "<literal>unsaved-value</literal>(可选 —
默认为一个切合实际(sensible)的值):一个特定的标识属性值,用来标志该实例是刚刚创建的,尚未保存。这可以把这种实例和从以前的 session
中装载过(可能又做过修改--译者注)但未再次持久化的实例区分开来。 "
#. Tag: para
-#: basic_mapping.xml:524
-#, fuzzy, no-c-format
-msgid ""
-"<literal>unsaved-value</literal> (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 ""
-"<literal>unsaved-value</literal> (可选 - 默认为一个切合实际(sensible)的"
-"值): 一个特定的标识属性值,用来标志该实例是刚刚创建的,尚未保存。 这可以把这"
-"种实例和从以前的session中装载过(可能又做过修改--译者注) 但未再次持久化的实"
-"例区分开来。"
+#, no-c-format
+msgid "<literal>access</literal> (optional - defaults to
<literal>property</literal>): the strategy Hibernate should use for accessing
the property value."
+msgstr "<literal>access</literal>(可选 — 默认为
<literal>property</literal>):Hibernate 用来访问属性值的策略。 "
#. Tag: para
-#: basic_mapping.xml:532
-#, fuzzy, no-c-format
-msgid ""
-"<literal>access</literal> (optional - defaults to
<literal>property</"
-"literal>): the strategy Hibernate should use for accessing the property "
-"value."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 -
默认为<literal>property</literal>): "
-"Hibernate用来访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 -
默认为<literal>property</literal>): "
-"Hibernate应该使用的访问此属性值的策略\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用于访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用于访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认值为
<literal>property</literal>): "
-"Hibernate用来访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用来访问属性的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用来访问属性的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用来访问属性的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 -默认是
<literal>property</literal>): "
-"Hibernate 用来访问属性值的策略。"
+#, no-c-format
+msgid "If the <literal>name</literal> attribute is missing, it is
assumed that the class has no identifier property."
+msgstr "如果 <literal>name</literal> 属性不存在,会认为这个类没有标识属性。"
#. Tag: para
-#: basic_mapping.xml:540
#, no-c-format
-msgid ""
-"If the <literal>name</literal> attribute is missing, it is assumed that
the "
-"class has no identifier property."
-msgstr "如果 <literal>name</literal>属性不存在,会认为这个类没有标识属性。"
+msgid "The <literal>unsaved-value</literal> attribute is almost never
needed in Hibernate3."
+msgstr "<literal>unsaved-value</literal> 属性在 Hibernate3 中几乎不再需要。"
#. Tag: para
-#: basic_mapping.xml:545
#, no-c-format
-msgid ""
-"The <literal>unsaved-value</literal> attribute is almost never needed
in "
-"Hibernate3."
-msgstr "<literal>unsaved-value</literal> 属性在Hibernate3中几乎不再需要。"
+msgid "There is an alternative
<literal><composite-id></literal> declaration that allows access
to legacy data with composite keys. Its use is strongly discouraged for anything
else."
+msgstr "还有一个另外的 <literal><composite-id></literal>
定义可以访问旧式的多主键数据。我们非常不鼓励使用这种方式。"
-#. Tag: para
-#: basic_mapping.xml:549
-#, fuzzy, no-c-format
-msgid ""
-"There is an alternative <literal><composite-id></literal>
declaration "
-"that allows access to legacy data with composite keys. Its use is strongly "
-"discouraged for anything else."
-msgstr ""
-"还有一个另外的<literal><composite-id></literal>定义可以访问旧式的多主键"
-"数据。 我们强烈不建议使用这种方式。"
-
#. Tag: title
-#: basic_mapping.xml:555
#, no-c-format
msgid "Generator"
msgstr "Generator"
#. Tag: para
-#: basic_mapping.xml:557
#, no-c-format
-msgid ""
-"The optional <literal><generator></literal> child element
names a Java "
-"class used to generate unique identifiers for instances of the persistent "
-"class. If any parameters are required to configure or initialize the "
-"generator instance, they are passed using the
<literal><param></"
-"literal> element."
-msgstr ""
-"可选的<literal><generator></literal>子元素是一个Java类的名字,
用来为该"
-"持久化类的实例生成唯一的标识。如果这个生成器实例需要某些配置值或者初始化参"
-"数, 用<literal><param></literal>元素来传递。"
+msgid "The optional <literal><generator></literal> child
element names a Java class used to generate unique identifiers for instances of the
persistent class. If any parameters are required to configure or initialize the generator
instance, they are passed using the <literal><param></literal>
element."
+msgstr "可选的 <literal><generator></literal> 子元素是一个 Java
类的名字,用来为该持久化类的实例生成唯一的标识。如果这个生成器实例需要某些配置值或者初始化参数,用
<literal><param></literal> 元素来传递。"
-#. Tag: programlisting
-#: basic_mapping.xml:564
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<id name=\"id\" type=\"long\"
column=\"cat_id\">\n"
-" <generator
class=\"org.hibernate.id.TableHiLoGenerator\">\n"
-" <param
name=\"table\">uid_table</param>\n"
-" <param
name=\"column\">next_hi_value_column</param>\n"
-" </generator>\n"
-"</id>]]>"
-msgstr ""
+msgid "All generators implement the interface
<literal>org.hibernate.id.IdentifierGenerator</literal>. 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 "所有的生成器都实现
<literal>org.hibernate.id.IdentifierGenerator</literal>
接口。这是一个非常简单的接口;某些应用程序可以选择提供他们自己特定的实现。当然,Hibernate 提供了很多内置的实现。下面是一些内置生成器的快捷名字: "
-#. Tag: para
-#: basic_mapping.xml:566
-#, fuzzy, no-c-format
-msgid ""
-"All generators implement the interface <literal>org.hibernate.id."
-"IdentifierGenerator</literal>. 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 ""
-"所有的生成器都实现<literal>org.hibernate.id.IdentifierGenerator</literal>接"
-"口。 这是一个非常简单的接口;某些应用程序可以选择提供他们自己特定的实现。当"
-"然, Hibernate提供了很多内置的实现。下面是一些内置生成器的快捷名字: "
-"<placeholder-1/>"
-
-#. Tag: literal
-#: basic_mapping.xml:574
+#. Tag: term
#, no-c-format
-msgid "increment"
-msgstr "increment"
+msgid "<literal>increment</literal>"
+msgstr "<literal>increment</literal>"
#. Tag: para
-#: basic_mapping.xml:576
#, no-c-format
-msgid ""
-"generates identifiers of type <literal>long</literal>,
<literal>short</"
-"literal> or <literal>int</literal> that are unique only when no
other "
-"process is inserting data into the same table. <emphasis>Do not use in a
"
-"cluster.</emphasis>"
-msgstr ""
-"用于为<literal>long</literal>,
<literal>short</literal>或者<literal>int</"
-"literal>类型生成 唯一标识。只有在没有其他进程往同一张表中插入数据时才能使"
-"用。 <emphasis>在集群下不要使用。</emphasis>"
+msgid "generates identifiers of type <literal>long</literal>,
<literal>short</literal> or <literal>int</literal> that are unique
only when no other process is inserting data into the same table. <emphasis>Do not
use in a cluster.</emphasis>"
+msgstr "用于为 <literal>long</literal>,
<literal>short</literal> 或者 <literal>int</literal> 类型生成
唯一标识。只有在没有其他进程往同一张表中插入数据时才能使用。<emphasis>在集群下不要使用。</emphasis>"
-#. Tag: literal
-#: basic_mapping.xml:585
+#. Tag: term
#, no-c-format
-msgid "identity"
-msgstr "identity"
+msgid "<literal>identity</literal>"
+msgstr "<literal>identity</literal>"
#. Tag: para
-#: basic_mapping.xml:587
#, no-c-format
-msgid ""
-"supports identity columns in DB2, MySQL, MS SQL Server, Sybase and "
-"HypersonicSQL. The returned identifier is of type
<literal>long</literal>, "
-"<literal>short</literal> or <literal>int</literal>."
-msgstr ""
-"对DB2,MySQL, MS SQL Server, Sybase和HypersonicSQL的内置标识字段提供支持。 返"
-"回的标识符是<literal>long</literal>, <literal>short</literal>
或者"
-"<literal>int</literal>类型的。"
+msgid "supports identity columns in DB2, MySQL, MS SQL Server, Sybase and
HypersonicSQL. The returned identifier is of type <literal>long</literal>,
<literal>short</literal> or <literal>int</literal>."
+msgstr "对 DB2,MySQL,MS SQL Server,Sybase 和 HypersonicSQL 的内置标识字段提供支持。返回的标识符是
<literal>long</literal>,<literal>short</literal> 或者
<literal>int</literal> 类型的。"
-#. Tag: literal
-#: basic_mapping.xml:595
+#. Tag: term
#, no-c-format
-msgid "sequence"
-msgstr "sequence"
+msgid "<literal>sequence</literal>"
+msgstr "<literal>sequence</literal>"
#. Tag: para
-#: basic_mapping.xml:597
#, no-c-format
-msgid ""
-"uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in "
-"Interbase. The returned identifier is of type <literal>long</literal>,
"
-"<literal>short</literal> or <literal>int</literal>"
-msgstr ""
-"在DB2,PostgreSQL, Oracle, SAP DB, McKoi中使用序列(sequence), 而在Interbase"
-"中使用生成器(generator)。返回的标识符是<literal>long</literal>, "
-"<literal>short</literal>或者
<literal>int</literal>类型的。"
+msgid "uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in
Interbase. The returned identifier is of type <literal>long</literal>,
<literal>short</literal> or <literal>int</literal>"
+msgstr "在 DB2,PostgreSQL,Oracle,SAP DB,McKoi 中使用序列(sequence), 而在 Interbase
中使用生成器(generator)。返回的标识符是
<literal>long</literal>,<literal>short</literal> 或者
<literal>int</literal> 类型的。"
-#. Tag: literal
-#: basic_mapping.xml:605
+#. Tag: term
#, no-c-format
-msgid "hilo"
-msgstr "hilo"
+msgid "<literal>hilo</literal>"
+msgstr "<literal>hilo</literal>"
#. Tag: para
-#: basic_mapping.xml:607
#, no-c-format
-msgid ""
-"uses a hi/lo algorithm to efficiently generate identifiers of type "
-"<literal>long</literal>, <literal>short</literal> or
<literal>int</literal>, "
-"given a table and column (by default
<literal>hibernate_unique_key</literal> "
-"and <literal>next_hi</literal> respectively) as a source of hi values.
The "
-"hi/lo algorithm generates identifiers that are unique only for a particular "
-"database."
-msgstr ""
-"使用一个高/低位算法高效的生成<literal>long</literal>,
<literal>short</"
-"literal> 或者 <literal>int</literal>类型的标识符。给定一个表和字段(默认分别"
-"是 <literal>hibernate_unique_key</literal>
和<literal>next_hi</literal>)作为"
-"高位值的来源。 高/低位算法生成的标识符只在一个特定的数据库中是唯一的。"
+msgid "uses a hi/lo algorithm to efficiently generate identifiers of type
<literal>long</literal>, <literal>short</literal> or
<literal>int</literal>, given a table and column (by default
<literal>hibernate_unique_key</literal> and
<literal>next_hi</literal> respectively) as a source of hi values. The hi/lo
algorithm generates identifiers that are unique only for a particular database."
+msgstr "使用一个高/低位算法高效的生成
<literal>long</literal>,<literal>short</literal> 或者
<literal>int</literal> 类型的标识符。给定一个表和字段(默认分别是
<literal>hibernate_unique_key</literal> 和
<literal>next_hi</literal>)作为高位值的来源。高/低位算法生成的标识符只在一个特定的数据库中是唯一的。"
-#. Tag: literal
-#: basic_mapping.xml:617
+#. Tag: term
#, no-c-format
-msgid "seqhilo"
-msgstr "seqhilo"
+msgid "<literal>seqhilo</literal>"
+msgstr "<literal>seqhilo</literal>"
#. Tag: para
-#: basic_mapping.xml:619
#, no-c-format
-msgid ""
-"uses a hi/lo algorithm to efficiently generate identifiers of type "
-"<literal>long</literal>, <literal>short</literal> or
<literal>int</literal>, "
-"given a named database sequence."
-msgstr ""
-"使用一个高/低位算法来高效的生成<literal>long</literal>,
<literal>short</"
-"literal> 或者 <literal>int</literal>类型的标识符,给定一个数据库序列"
-"(sequence)的名字。"
+msgid "uses a hi/lo algorithm to efficiently generate identifiers of type
<literal>long</literal>, <literal>short</literal> or
<literal>int</literal>, given a named database sequence."
+msgstr "使用一个高/低位算法来高效的生成
<literal>long</literal>,<literal>short</literal> 或者
<literal>int</literal> 类型的标识符,给定一个数据库序列(sequence)的名字。"
-#. Tag: literal
-#: basic_mapping.xml:627
+#. Tag: term
#, no-c-format
-msgid "uuid"
-msgstr "uuid"
+msgid "<literal>uuid</literal>"
+msgstr "<literal>uuid</literal>"
#. Tag: para
-#: basic_mapping.xml:629
-#, fuzzy, 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进制数字的字符串。"
+#, 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
进制数字的字符串。 "
-#. Tag: literal
-#: basic_mapping.xml:637
+#. Tag: term
#, no-c-format
-msgid "guid"
-msgstr "guid"
+msgid "<literal>guid</literal>"
+msgstr "<literal>guid</literal>"
#. Tag: para
-#: basic_mapping.xml:639
#, no-c-format
msgid "uses a database-generated GUID string on MS SQL Server and MySQL."
-msgstr "在MS SQL Server 和 MySQL 中使用数据库生成的GUID字符串。"
+msgstr "在 MS SQL Server 和 MySQL 中使用数据库生成的 GUID 字符串。"
-#. Tag: literal
-#: basic_mapping.xml:645
+#. Tag: term
#, no-c-format
-msgid "native"
-msgstr "native"
+msgid "<literal>native</literal>"
+msgstr "<literal>native</literal>"
#. Tag: para
-#: basic_mapping.xml:647
-#, fuzzy, no-c-format
-msgid ""
-"selects <literal>identity</literal>,
<literal>sequence</literal> or "
-"<literal>hilo</literal> depending upon the capabilities of the
underlying "
-"database."
-msgstr ""
-"根据底层数据库的能力选择<literal>identity</literal>,
<literal>sequence</"
-"literal> 或者<literal>hilo</literal>中的一个。"
+#, no-c-format
+msgid "selects <literal>identity</literal>,
<literal>sequence</literal> or <literal>hilo</literal> depending
upon the capabilities of the underlying database."
+msgstr "根据底层数据库的能力选择
<literal>identity</literal>、<literal>sequence</literal> 或者
<literal>hilo</literal> 中的一个。"
-#. Tag: literal
-#: basic_mapping.xml:655
+#. Tag: term
#, no-c-format
-msgid "assigned"
-msgstr "assigned"
+msgid "<literal>assigned</literal>"
+msgstr "<literal>assigned</literal>"
#. Tag: para
-#: basic_mapping.xml:657
-#, fuzzy, no-c-format
-msgid ""
-"lets the application assign an identifier to the object before
<literal>save"
-"()</literal> is called. This is the default strategy if no
<literal><"
-"generator></literal> element is specified."
-msgstr ""
-"让应用程序在<literal>save()</literal>之前为对象分配一个标示符。这是 "
-"<literal><generator></literal>元素没有指定时的默认生成策略。"
+#, no-c-format
+msgid "lets the application assign an identifier to the object before
<literal>save()</literal> is called. This is the default strategy if no
<literal><generator></literal> element is specified."
+msgstr "让应用程序在调用 <literal>save()</literal> 之前为对象分配一个标识符。这是
<literal><generator></literal> 元素没有指定时的默认生成策略。"
-#. Tag: literal
-#: basic_mapping.xml:665
+#. Tag: term
#, no-c-format
-msgid "select"
-msgstr "select"
+msgid "<literal>select</literal>"
+msgstr "<literal>select</literal>"
#. Tag: para
-#: basic_mapping.xml:667
-#, fuzzy, no-c-format
-msgid ""
-"retrieves a primary key, assigned by a database trigger, by selecting the "
-"row by some unique key and retrieving the primary key value."
-msgstr "通过数据库触发器选择一些唯一主键的行并返回主键值来分配一个主键。"
+#, no-c-format
+msgid "retrieves a primary key, assigned by a database trigger, by selecting the row
by some unique key and retrieving the primary key value."
+msgstr "通过数据库触发器选择一些唯一主键的行并返回主键值来分配一个主键。 "
-#. Tag: literal
-#: basic_mapping.xml:674
+#. Tag: term
#, no-c-format
-msgid "foreign"
-msgstr "foreign"
+msgid "<literal>foreign</literal>"
+msgstr "<literal>foreign</literal>"
#. Tag: para
-#: basic_mapping.xml:676
-#, fuzzy, no-c-format
-msgid ""
-"uses the identifier of another associated object. It is usually used in "
-"conjunction with a <literal><one-to-one></literal>
primary key "
-"association."
-msgstr ""
-"使用另外一个相关联的对象的标识符。通常和<literal><one-to-one></literal>"
-"联合起来使用。"
+#, no-c-format
+msgid "uses the identifier of another associated object. It is usually used in
conjunction with a <literal><one-to-one></literal> primary key
association."
+msgstr "使用另外一个相关联的对象的标识符。它通常和
<literal><one-to-one></literal> 联合起来使用。"
-#. Tag: literal
-#: basic_mapping.xml:683
+#. Tag: term
#, no-c-format
-msgid "sequence-identity"
-msgstr "sequence-identity"
+msgid "<literal>sequence-identity</literal>"
+msgstr "<literal>sequence-identity</literal>"
#. Tag: para
-#: basic_mapping.xml:685
-#, fuzzy, 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,这些插入语句的注释被关闭了。(原文:Note comments on these insert "
-"statements are disabled due to a bug in the Oracle drivers.)"
+#, 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,这些插入语句的注释被关闭了。"
#. Tag: title
-#: basic_mapping.xml:702
#, no-c-format
msgid "Hi/lo algorithm"
msgstr "高/低位算法(Hi/Lo Algorithm)"
#. Tag: para
-#: basic_mapping.xml:703
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>hilo</literal> and <literal>seqhilo</literal>
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 ""
-"<literal>hilo</literal> 和
<literal>seqhilo</literal>生成器给出了两种hi/lo算"
-"法的实现, 这是一种很令人满意的标识符生成算法。第一种实现需要一个“特殊”的数据"
-"库表来保存下一个可用的“hi”值。 第二种实现使用一个Oracle风格的序列(在被支持的"
-"情况下)。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:710
#, no-c-format
-msgid ""
-"<![CDATA[<id name=\"id\" type=\"long\"
column=\"cat_id\">\n"
-" <generator class=\"hilo\">\n"
-" <param
name=\"table\">hi_value</param>\n"
-" <param
name=\"column\">next_value</param>\n"
-" <param name=\"max_lo\">100</param>\n"
-" </generator>\n"
-"</id>]]>"
-msgstr ""
+msgid "The <literal>hilo</literal> and
<literal>seqhilo</literal> 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 "<literal>hilo</literal> 和 <literal>seqhilo</literal>
生成器给出了两种 hi/lo 算法的实现, 这是一种很令人满意的标识符生成算法。第一种实现需要一个“特殊”的数据库表来保存下一个可用的“hi”值。 第二种实现使用一个 Oracle
风格的序列(在被支持的情况下)。 "
-#. Tag: programlisting
-#: basic_mapping.xml:712
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<id name=\"id\" type=\"long\"
column=\"cat_id\">\n"
-" <generator class=\"seqhilo\">\n"
-" <param
name=\"sequence\">hi_value</param>\n"
-" <param name=\"max_lo\">100</param>\n"
-" </generator>\n"
-"</id>]]>"
-msgstr ""
+msgid "Unfortunately, you cannot use <literal>hilo</literal> when
supplying your own <literal>Connection</literal> to Hibernate. When Hibernate
uses an application server datasource to obtain connections enlisted with JTA, you must
configure the
<literal>hibernate.transaction.manager_lookup_class</literal>."
+msgstr "可惜的是,你在为 Hibernate 自行提供 <literal>Connection</literal> 时无法使用
<literal>hilo</literal>。 当 Hibernate 使用 JTA 获取应用服务器的数据源连接时,你必须正确地配置
<literal>hibernate.transaction.manager_lookup_class</literal>。"
-#. Tag: para
-#: basic_mapping.xml:714
-#, fuzzy, no-c-format
-msgid ""
-"Unfortunately, you cannot use <literal>hilo</literal> when supplying
your "
-"own <literal>Connection</literal> to Hibernate. When Hibernate uses an
"
-"application server datasource to obtain connections enlisted with JTA, you "
-"must configure the
<literal>hibernate.transaction.manager_lookup_class</"
-"literal>."
-msgstr ""
-"很不幸,你在为Hibernate自行提供<literal>Connection</literal>时无法使用"
-"<literal>hilo</literal>。 当Hibernate使用JTA获取应用服务器的数据源连接时,你必"
-"须正确地配置
<literal>hibernate.transaction.manager_lookup_class</literal>。"
-
#. Tag: title
-#: basic_mapping.xml:723
#, no-c-format
msgid "UUID algorithm"
-msgstr "UUID算法(UUID Algorithm )"
+msgstr "UUID 算法(UUID Algorithm )"
#. Tag: para
-#: basic_mapping.xml:724
-#, fuzzy, 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的前提下的能做的最好实现了。"
+#, 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 的前提下的能做的最好实现了。"
#. Tag: title
-#: basic_mapping.xml:733
#, no-c-format
msgid "Identity columns and sequences"
msgstr "标识字段和序列(Identity columns and Sequences)"
#. Tag: para
-#: basic_mapping.xml:734
-#, fuzzy, no-c-format
-msgid ""
-"For databases that support identity columns (DB2, MySQL, Sybase, MS SQL), "
-"you can use <literal>identity</literal> key generation. For databases
that "
-"support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you "
-"can use <literal>sequence</literal> style key generation. Both of these
"
-"strategies require two SQL queries to insert a new object. For example:"
-msgstr ""
-"对于内部支持标识字段的数据库(DB2,MySQL,Sybase,MS SQL),你可以使用"
-"<literal>identity</literal>关键字生成。 对于内部支持序列的数据库(DB2,"
-"Oracle, PostgreSQL, Interbase, McKoi,SAP DB),
你可以使用<literal>sequence</"
-"literal>风格的关键字生成。 这两种方式对于插入一个新的对象都需要两次SQL查询。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:742
#, no-c-format
-msgid ""
-"<![CDATA[<id name=\"id\" type=\"long\"
column=\"person_id\">\n"
-" <generator class=\"sequence\">\n"
-" <param
name=\"sequence\">person_id_sequence</param>\n"
-" </generator>\n"
-"</id>]]>"
-msgstr ""
+msgid "For databases that support identity columns (DB2, MySQL, Sybase, MS SQL), you
can use <literal>identity</literal> key generation. For databases that support
sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you can use
<literal>sequence</literal> style key generation. Both of these strategies
require two SQL queries to insert a new object. For example:"
+msgstr "对于内部支持标识字段的数据库(DB2、MySQL、Sybase 和 MS SQL),你可以使用
<literal>identity</literal>
关键字生成。对于内部支持序列的数据库(DB2、Oracle、PostgreSQL、Interbase、McKoi 和 SAP DB),你可以使用
<literal>sequence</literal> 风格的关键字生成。这两种方式对于插入一个新的对象都需要两次 SQL 查询。例如:"
-#. Tag: programlisting
-#: basic_mapping.xml:744
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<id name=\"id\" type=\"long\"
column=\"person_id\" unsaved-value=\"0"
-"\">\n"
-" <generator class=\"identity\"/>\n"
-"</id>]]>"
-msgstr ""
+msgid "For cross-platform development, the <literal>native</literal>
strategy will, depending on the capabilities of the underlying database, choose from the
<literal>identity</literal>, <literal>sequence</literal> and
<literal>hilo</literal> strategies."
+msgstr "对于跨平台开发,<literal>native</literal> 策略会从
<literal>identity</literal>、<literal>sequence</literal> 和
<literal>hilo</literal> 中进行选择,选择哪一个,这取决于底层数据库的支持能力。"
-#. Tag: para
-#: basic_mapping.xml:746
-#, fuzzy, no-c-format
-msgid ""
-"For cross-platform development, the <literal>native</literal> strategy
will, "
-"depending on the capabilities of the underlying database, choose from the "
-"<literal>identity</literal>, <literal>sequence</literal>
and <literal>hilo</"
-"literal> strategies."
-msgstr ""
-"对于跨平台开发,<literal>native</literal>策略会从<literal>identity</"
-"literal>, <literal>sequence</literal>
和<literal>hilo</literal>中进行选择,选"
-"择哪一个,这取决于底层数据库的支持能力。"
-
#. Tag: title
-#: basic_mapping.xml:754
#, no-c-format
msgid "Assigned identifiers"
msgstr "程序分配的标识符(Assigned Identifiers)"
#. Tag: para
-#: basic_mapping.xml:755
-#, fuzzy, no-c-format
-msgid ""
-"If you want the application to assign identifiers, as opposed to having "
-"Hibernate generate them, you can use the <literal>assigned</literal>
"
-"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
<literal><generator></literal> "
-"element."
-msgstr ""
-"如果你需要应用程序分配一个标示符(而非Hibernate来生成),你可以使用"
-"<literal>assigned</literal> 生成器。这种特殊的生成器会使用已经分配给对象的标"
-"识符属性的标识符值。 这个生成器使用一个自然键(natural key,有商业意义的列-"
-"译注)作为主键,而不是使用一个代理键( surrogate key,没有商业意义的列-译"
-"注)。这是没有指定<literal><generator></literal>元素时的默认行为"
+#, no-c-format
+msgid "If you want the application to assign identifiers, as opposed to having
Hibernate generate them, you can use the <literal>assigned</literal>
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
<literal><generator></literal> element."
+msgstr "如果你需要应用程序分配一个标示符(而非 Hibernate 来生成),你可以使用
<literal>assigned</literal> 生成器。这种特殊的生成器会使用已经分配给对象的标识符属性的标识符值。
这个生成器使用一个自然键(natural key,有商业意义的列-译注)作为主键,而不是使用一个代理键( surrogate key,没有商业意义的列-译注)。这是没有指定
<literal><generator></literal> 元素时的默认行为。"
#. Tag: para
-#: basic_mapping.xml:764
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>assigned</literal> generator makes Hibernate use "
-"<literal>unsaved-value=\"undefined\"</literal>. 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
<literal>Interceptor."
-"isUnsaved()</literal>."
-msgstr ""
-"当选择<literal>assigned</literal>生成器时,除非有一个version或timestamp属性,"
-"或者你定义了 <literal>Interceptor.isUnsaved()</literal>,否则需要让Hiberante"
-"使用
<literal>unsaved-value=\"undefined\"</literal>,强制Hibernatet查询数据库"
-"来确定一个实例是瞬时的(transient) 还是脱管的(detached)。"
+#, no-c-format
+msgid "The <literal>assigned</literal> generator makes Hibernate use
<literal>unsaved-value=\"undefined\"</literal>. 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
<literal>Interceptor.isUnsaved()</literal>."
+msgstr "当选择 <literal>assigned</literal> 生成器时,除非有一个 version 或 timestamp
属性,或者你定义了 <literal>Interceptor.isUnsaved()</literal>,否则需要让 Hiberante 使用
<literal>unsaved-value=\"undefined\"</literal>,强制 Hibernatet
查询数据库来确定一个实例是瞬时的(transient) 还是脱管的(detached)。"
#. Tag: title
-#: basic_mapping.xml:774
#, no-c-format
msgid "Primary keys assigned by triggers"
msgstr "触发器实现的主键生成器(Primary keys assigned by triggers)"
#. Tag: para
-#: basic_mapping.xml:775
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate does not generate DDL with triggers. It is for legacy schemas
only."
-msgstr "仅仅用于遗留的schema中 (Hibernate不能使用触发器生成DDL)。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:779
#, no-c-format
-msgid ""
-"<![CDATA[<id name=\"id\" type=\"long\"
column=\"person_id\">\n"
-" <generator class=\"select\">\n"
-" <param
name=\"key\">socialSecurityNumber</param>\n"
-" </generator>\n"
-"</id>]]>"
-msgstr ""
+msgid "Hibernate does not generate DDL with triggers. It is for legacy schemas
only."
+msgstr "仅仅用于遗留的 schema 中(Hibernate 不能用触发器生成 DDL)。"
#. Tag: para
-#: basic_mapping.xml:781
-#, fuzzy, no-c-format
-msgid ""
-"In the above example, there is a unique valued property named "
-"<literal>socialSecurityNumber</literal>. It is defined by the class, as
a "
-"natural key and a surrogate key named <literal>person_id</literal>,
whose "
-"value is generated by a trigger."
-msgstr ""
-"在上面的例子中,类定义了一个命名为<literal>socialSecurityNumber</literal>的唯"
-"一值属性, 它是一个自然键(natural key),命名为<literal>person_id</literal>"
-"的代理键(surrogate key) 的值由触发器生成。"
+#, no-c-format
+msgid "In the above example, there is a unique valued property named
<literal>socialSecurityNumber</literal>. It is defined by the class, as a
natural key and a surrogate key named <literal>person_id</literal>, whose
value is generated by a trigger."
+msgstr "在上面的例子中,类定义了一个命名为 <literal>socialSecurityNumber</literal>
的具有唯一值的属性,它是一个自然键(natural key),命名为 <literal>person_id</literal> 的代理键(surrogate
key)的值由触发器生成。"
#. Tag: title
-#: basic_mapping.xml:793
#, no-c-format
msgid "Enhanced identifier generators"
-msgstr "Enhanced identifier generators"
+msgstr "增强的标识符生成器"
#. Tag: para
-#: basic_mapping.xml:795
-#, fuzzy, 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 ""
-"Starting with release 3.2.3, there are 2 new generators which represent a
re-"
-"thinking of 2 different aspects of identifier generation. The first aspect "
-"is database portability; the second is optimization (not having to query the
"
-"database for every request for a new identifier value). These two new "
-"generators are intended to take the place of some of the named generators "
-"described above (starting in 3.3.x); however, they are included in the "
-"current releases and can be referenced by FQN."
+#, 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 进行引用。"
#. Tag: para
-#: basic_mapping.xml:803
-#, fuzzy, no-c-format
-msgid ""
-"The first of these new generators is
<literal>org.hibernate.id.enhanced."
-"SequenceStyleGenerator</literal> which is intended, firstly, as a "
-"replacement for the <literal>sequence</literal> generator and,
secondly, as "
-"a better portability generator than <literal>native</literal>. This is
"
-"because <literal>native</literal> generally chooses between "
-"<literal>identity</literal> and <literal>sequence</literal>
which have "
-"largely different semantics that can cause subtle issues in applications "
-"eyeing portability. <literal>org.hibernate.id.enhanced."
-"SequenceStyleGenerator</literal>, 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
<literal>native</"
-"literal> is that table-based and sequence-based storage have the same exact
"
-"semantic. In fact, sequences are exactly what Hibernate tries to emulate "
-"with its table-based generators. This generator has a number of "
-"configuration parameters:"
-msgstr ""
-"The first of these new generators is
<literal>org.hibernate.id.enhanced."
-"SequenceStyleGenerator</literal> which is intended firstly as a replacement
"
-"for the <literal>sequence</literal> generator and secondly as a better
"
-"portability generator than <literal>native</literal> (because "
-"<literal>native</literal> (generally) chooses between
<literal>identity</"
-"literal> and <literal>sequence</literal> which have largely
different "
-"semantics which can cause subtle isssues in applications eyeing "
-"portability).
<literal>org.hibernate.id.enhanced.SequenceStyleGenerator</"
-"literal> however achieves portability in a different manner. It chooses "
-"between using a table or a sequence in the database to store its "
-"incrementing values depending on the capabilities of the dialect being used.
"
-"The difference between this and <literal>native</literal> is that
table-"
-"based and sequence-based storage have the same exact semantic (in fact "
-"sequences are exactly what Hibernate tries to emmulate with its table-based "
-"generators). This generator has a number of configuration parameters: "
-"<placeholder-1/>"
+#, no-c-format
+msgid "The first of these new generators is
<literal>org.hibernate.id.enhanced.SequenceStyleGenerator</literal> which is
intended, firstly, as a replacement for the <literal>sequence</literal>
generator and, secondly, as a better portability generator than
<literal>native</literal>. This is because
<literal>native</literal> generally chooses between
<literal>identity</literal> and <literal>sequence</literal> which
have largely different semantics that can cause subtle issues in applications eyeing
portability.
<literal>org.hibernate.id.enhanced.SequenceStyleGenerator</literal>, 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 <literal>native</literal>
is that table-based and sequence-based storage have the same exact semantic. In fact,
sequences are exactly what Hibernate tries to emulate with!
its table-based generators. This generator has a number of configuration
parameters:"
+msgstr "这些生成器的第一个是
<literal>org.hibernate.id.enhanced.SequenceStyleGenerator</literal>,首先,它是作为
<literal>sequence</literal> 生成器的替代物,其次,它是比
<literal>native</literal> 具有更好移植性的生成器。这是因为
<literal>native</literal> 通常在 <literal>identity</literal> 和
<literal>sequence</literal> 之间选择,它有差别很大的
semantic,在移植时会导致潜在的问题。然而,<literal>org.hibernate.id.enhanced.SequenceStyleGenerator</literal>
以不同的方式实现移植性。它根据所使用的方言的能力,在数据库表或序列之间选择以存储其增量。这和 <literal>native</literal>
的区别是基于表或序列的存储具有恰好相同的 semantic。实际上,序列就是 Hibernate 试图用基于表的生成器来模拟的。这个生成器有如下的配置参数:"
#. Tag: para
-#: basic_mapping.xml:817
-#, fuzzy, no-c-format
-msgid ""
-"<literal>sequence_name</literal> (optional, defaults to "
-"<literal>hibernate_sequence</literal>): the name of the sequence or
table to "
-"be used."
-msgstr ""
-"<literal>sequence_name</literal> (optional, defaults to "
-"<literal>hibernate_sequence</literal>): The name of the sequence (or
table) "
-"to be used."
+#, no-c-format
+msgid "<literal>sequence_name</literal> (optional, defaults to
<literal>hibernate_sequence</literal>): the name of the sequence or table to
be used."
+msgstr "<literal>sequence_name</literal>(可选 — 默认为
<literal>hibernate_sequence</literal>):序列或表的名字"
#. Tag: para
-#: basic_mapping.xml:823
-#, fuzzy, no-c-format
-msgid ""
-"<literal>initial_value</literal> (optional, defaults to
<literal>1</"
-"literal>): the initial value to be retrieved from the sequence/table. In "
-"sequence creation terms, this is analogous to the clause typically named "
-"\"STARTS WITH\"."
-msgstr ""
-"<literal>initial_value</literal> (optional, defaults to
<literal>1</"
-"literal>): The initial value to be retrieved from the sequence/table. In "
-"sequence creation terms, this is analogous to the clause typical named "
-"\"STARTS WITH\"."
+#, no-c-format
+msgid "<literal>initial_value</literal> (optional, defaults to
<literal>1</literal>): the initial value to be retrieved from the
sequence/table. In sequence creation terms, this is analogous to the clause typically
named \"STARTS WITH\"."
+msgstr "<literal>initial_value</literal>(可选,默认为
<literal>1</literal>):从序列/表里获取的初始值。按照序列创建的术语,这等同于子句 \"STARTS
WITH\"。"
#. Tag: para
-#: basic_mapping.xml:830
-#, fuzzy, no-c-format
-msgid ""
-"<literal>increment_size</literal> (optional - defaults to
<literal>1</"
-"literal>): the value by which subsequent calls to the sequence/table should
"
-"differ. In sequence creation terms, this is analogous to the clause "
-"typically named \"INCREMENT BY\"."
-msgstr ""
-"<literal>increment_size</literal> (optional, defaults to
<literal>1</"
-"literal>): The value by which subsequent calls to the sequence/table should
"
-"differ. In sequence creation terms, this is analogous to the clause typical "
-"named \"INCREMENT BY\"."
+#, no-c-format
+msgid "<literal>increment_size</literal> (optional - defaults to
<literal>1</literal>): the value by which subsequent calls to the
sequence/table should differ. In sequence creation terms, this is analogous to the clause
typically named \"INCREMENT BY\"."
+msgstr "<literal>increment_size</literal>(可选 - 缺省为
<literal>1</literal>):对序列/表的调用应该区分的值。按照序列创建的术语,这等同于子句 \"INCREMENT
BY\"。"
#. Tag: para
-#: basic_mapping.xml:837
-#, fuzzy, no-c-format
-msgid ""
-"<literal>force_table_use</literal> (optional - defaults to
<literal>false</"
-"literal>): should we force the use of a table as the backing structure even
"
-"though the dialect might support sequence?"
-msgstr ""
-"<literal>force_table_use</literal> (optional, defaults to
<literal>false</"
-"literal>): Should we force the use of a table as the backing structure even
"
-"though the dialect might support sequence?"
+#, no-c-format
+msgid "<literal>force_table_use</literal> (optional - defaults to
<literal>false</literal>): should we force the use of a table as the backing
structure even though the dialect might support sequence?"
+msgstr "<literal>force_table_use</literal>(可选 - 缺省为
<literal>false</literal>):即使方言可能支持序列,是否也应该强制把表用作后台结构。"
#. Tag: para
-#: basic_mapping.xml:844
-#, fuzzy, no-c-format
-msgid ""
-"<literal>value_column</literal> (optional - defaults to
<literal>next_val</"
-"literal>): only relevant for table structures, it is the name of the column
"
-"on the table which is used to hold the value."
-msgstr ""
-"<literal>value_column</literal> (optional, defaults to
<literal>next_val</"
-"literal>): Only relevant for table structures! The name of the column on the
"
-"table which is used to hold the value."
+#, no-c-format
+msgid "<literal>value_column</literal> (optional - defaults to
<literal>next_val</literal>): only relevant for table structures, it is the
name of the column on the table which is used to hold the value."
+msgstr "<literal>value_column</literal>(可选 - 缺省为
<literal>next_val</literal>):只和表结构相关,它是用于保存值的字段的名称。"
#. Tag: para
-#: basic_mapping.xml:851
-#, fuzzy, no-c-format
-msgid ""
-"<literal>optimizer</literal> (optional - defaults to
<literal>none</"
-"literal>): See"
-msgstr ""
-"<literal>cascade</literal> (可选
-默认是<literal>none</literal>): 级联的类型"
+#, no-c-format
+msgid "<literal>optimizer</literal> (optional - defaults to
<literal>none</literal>): See <xref
linkend=\"mapping-declaration-id-enhanced-optimizers\" />"
+msgstr "<literal>optimizer</literal>(可选 —
默认是<literal>none</literal>):请参考 <xref
linkend=\"mapping-declaration-id-enhanced-optimizers\" />。"
#. Tag: para
-#: basic_mapping.xml:858
-#, fuzzy, no-c-format
-msgid ""
-"The second of these new generators is
<literal>org.hibernate.id.enhanced."
-"TableGenerator</literal>, which is intended, firstly, as a replacement for
"
-"the <literal>table</literal> generator, even though it actually
functions "
-"much more like
<literal>org.hibernate.id.MultipleHiLoPerTableGenerator</"
-"literal>, and secondly, as a re-implementation of
<literal>org.hibernate.id."
-"MultipleHiLoPerTableGenerator</literal> 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 ""
-"The second of these new generators is
<literal>org.hibernate.id.enhanced."
-"TableGenerator</literal> which is intended firstly as a replacement for the
"
-"<literal>table</literal> generator (although it actually functions much
more "
-"like <literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal>)
and "
-"secondly as a re-implementation of <literal>org.hibernate.id."
-"MultipleHiLoPerTableGenerator</literal> utilizing the notion of pluggable
"
-"optimiziers. Essentially this generator defines a table capable of holding a
"
-"number of different increment values simultaneously by using multiple "
-"distinctly keyed rows. This generator has a number of configuration "
-"parameters: <placeholder-1/>"
+#, no-c-format
+msgid "The second of these new generators is
<literal>org.hibernate.id.enhanced.TableGenerator</literal>, which is
intended, firstly, as a replacement for the <literal>table</literal>
generator, even though it actually functions much more like
<literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal>, and
secondly, as a re-implementation of
<literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal> 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 "新生成器的第二个是
<literal>org.hibernate.id.enhanced.TableGenerator</literal>,它的目的首先是替代
<literal>table</literal> 生成器,即使它实际上比
<literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal>
功能要强得多;其次,作为利用可插拔 optimizer 的
<literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal>
的替代品。基本上这个生成器定义了一个可以利用多个不同的键值记录存储大量不同增量值的表。这个生成器有如下的配置参数:"
#. Tag: para
-#: basic_mapping.xml:868
-#, fuzzy, no-c-format
-msgid ""
-"<literal>table_name</literal> (optional - defaults to "
-"<literal>hibernate_sequences</literal>): the name of the table to be
used."
-msgstr ""
-"<literal>table_name</literal> (optional, defaults to "
-"<literal>hibernate_sequences</literal>): The name of the table to be
used."
+#, no-c-format
+msgid "<literal>table_name</literal> (optional - defaults to
<literal>hibernate_sequences</literal>): the name of the table to be
used."
+msgstr "<literal>table_name</literal>(可选 — 默认是
<literal>hibernate_sequences</literal>):所用的表的名称。"
#. Tag: para
-#: basic_mapping.xml:874
-#, fuzzy, no-c-format
-msgid ""
-"<literal>value_column_name</literal> (optional - defaults to "
-"<literal>next_val</literal>): the name of the column on the table that
is "
-"used to hold the value."
-msgstr ""
-"<literal>value_column_name</literal> (optional, defaults to "
-"<literal>next_val</literal>): The name of the column on the table which
is "
-"used to hold the value."
+#, no-c-format
+msgid "<literal>value_column_name</literal> (optional - defaults to
<literal>next_val</literal>): the name of the column on the table that is used
to hold the value."
+msgstr "<literal>value_column_name</literal>(可选 — 默认为
<literal>next_val</literal>):用于存储这些值的表的字段的名字。"
#. Tag: para
-#: basic_mapping.xml:880
-#, fuzzy, no-c-format
-msgid ""
-"<literal>segment_column_name</literal> (optional - defaults to "
-"<literal>sequence_name</literal>): 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 ""
-"<literal>segment_column_name</literal> (optional, defaults to "
-"<literal>sequence_name</literal>): The name of the column on the table
which "
-"is used to hold the \"segement key\". This is the value which distinctly
"
-"identifies which increment value to use."
+#, no-c-format
+msgid "<literal>segment_column_name</literal> (optional - defaults to
<literal>sequence_name</literal>): 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 "<literal>segment_column_name</literal>(可选,默认为
<literal>sequence_name</literal>):用于保存 \"segment key\"
的字段的名称。这是标识使用哪个增量值的值。"
#. Tag: para
-#: basic_mapping.xml:887
-#, fuzzy, no-c-format
-msgid ""
-"<literal>segment_value</literal> (optional - defaults to
<literal>default</"
-"literal>): The \"segment key\" value for the segment from which we
want to "
-"pull increment values for this generator."
-msgstr ""
-"<literal>segment_value</literal> (optional, defaults to
<literal>default</"
-"literal>): The \"segment key\" value for the segment from which we
want to "
-"pull increment values for this generator."
+#, no-c-format
+msgid "<literal>segment_value</literal> (optional - defaults to
<literal>default</literal>): The \"segment key\" value for the
segment from which we want to pull increment values for this generator."
+msgstr "<literal>segment_value</literal>(可选,默认为
<literal>default</literal>):我们为这个生成器获取增量值的 segment 的 \"segment
key\"。"
#. Tag: para
-#: basic_mapping.xml:894
-#, fuzzy, no-c-format
-msgid ""
-"<literal>segment_value_length</literal> (optional - defaults to "
-"<literal>255</literal>): Used for schema generation; the column size to
"
-"create this segment key column."
-msgstr ""
-"<literal>segment_value_length</literal> (optional, defaults to
<literal>255</"
-"literal>): Used for schema generation; the column size to create this "
-"segment key column."
+#, no-c-format
+msgid "<literal>segment_value_length</literal> (optional - defaults to
<literal>255</literal>): Used for schema generation; the column size to create
this segment key column."
+msgstr "<literal>segment_value_length</literal>(可选 — 默认为
<literal>255</literal>):用于 schema 生成;创建 Segment Key 字段的字段大小。"
#. Tag: para
-#: basic_mapping.xml:900
-#, fuzzy, no-c-format
-msgid ""
-"<literal>initial_value</literal> (optional - defaults to
<literal>1</"
-"literal>): The initial value to be retrieved from the table."
-msgstr ""
-"<literal>initial_value</literal> (optional, defaults to
<literal>1</"
-"literal>): The initial value to be retrieved from the table."
+#, no-c-format
+msgid "<literal>initial_value</literal> (optional - defaults to
<literal>1</literal>): The initial value to be retrieved from the
table."
+msgstr "<literal>initial_value</literal>(可选 — 默认是
<literal>1</literal>):从表里获取的初始值。"
#. Tag: para
-#: basic_mapping.xml:906
-#, fuzzy, no-c-format
-msgid ""
-"<literal>increment_size</literal> (optional - defaults to
<literal>1</"
-"literal>): The value by which subsequent calls to the table should
differ."
-msgstr ""
-"<literal>increment_size</literal> (optional, defaults to
<literal>1</"
-"literal>): The value by which subsequent calls to the table should
differ."
+#, no-c-format
+msgid "<literal>increment_size</literal> (optional - defaults to
<literal>1</literal>): The value by which subsequent calls to the table should
differ."
+msgstr "<literal>increment_size</literal>(可选 — 默认是
<literal>1</literal>):对表随后的调用应该区分的值。"
#. Tag: para
-#: basic_mapping.xml:912
-#, fuzzy, no-c-format
-msgid ""
-"<literal>optimizer</literal> (optional - defaults to
<literal></literal>): "
-"See"
-msgstr ""
-"<literal>cascade</literal> (可选
-默认是<literal>none</literal>): 级联的类型"
+#, no-c-format
+msgid "<literal>optimizer</literal> (optional - defaults to
<literal></literal>): See <xref
linkend=\"mapping-declaration-id-enhanced-optimizers\" />"
+msgstr "<literal>optimizer</literal>(可选 — 默认是 <literal>
</literal>):请参考 <xref
linkend=\"mapping-declaration-id-enhanced-optimizers\" />。"
#. Tag: title
-#: basic_mapping.xml:922
#, no-c-format
msgid "Identifier generator optimization"
-msgstr "Identifier generator optimization"
+msgstr "标识符生成器的优化"
#. Tag: para
-#: basic_mapping.xml:923
-#, fuzzy, 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 (<xref
linkend=\"mapping-declaration-id-enhanced\"/> "
-"support this operation."
-msgstr ""
-"For identifier generators which store values in the database, it is "
-"inefficient for them to hit the database on each and every call to generate "
-"a new identifier value. Instead, you'd ideally want to group a bunch of them
"
-"in memory and only hit the database when you have exhausted your in-memory "
-"value group. This is the role of the pluggable optimizers. Currently only "
-"the two enhanced generators (<xref
linkend=\"mapping-declaration-id-enhanced"
-"\"/> support this notion. <placeholder-1/>"
+#, 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 (<xref
linkend=\"mapping-declaration-id-enhanced\" /> support this operation."
+msgstr
"对于在数据库里存储值的标识符生成器,生成新标识符时的每次调用都访问数据库是低效的。因此,你可以把它们在内存里分组并只有在快用光内存时才访问数据库。这是可插拔
optimizer 的任务。目前只有两个增强型的生成器支持这个操作(<xref
linkend=\"mapping-declaration-id-enhanced\"/>)。 "
#. Tag: para
-#: basic_mapping.xml:931
-#, fuzzy, no-c-format
-msgid ""
-"<literal>none</literal> (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 ""
-"<literal>none</literal> (generally this is the default if no optimizer
was "
-"specified): This says to not perform any optimizations, and hit the database
"
-"each and every request."
+#, no-c-format
+msgid "<literal>none</literal> (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 "<literal>none</literal>(如果没有指定
optimizer,通常这是缺省配置):这不会执行任何优化,在每次请求时都访问数据库。"
#. Tag: para
-#: basic_mapping.xml:937
-#, fuzzy, no-c-format
-msgid ""
-"<literal>hilo</literal>: applies a hi/lo algorithm around the database
"
-"retrieved values. The values from the database for this optimizer are "
-"expected to be sequential. The values retrieved from the database structure "
-"for this optimizer indicates the \"group number\". The "
-"<literal>increment_size</literal> is multiplied by that value in memory
to "
-"define a group \"hi value\"."
-msgstr ""
-"<literal>hilo</literal>: applies a hi/lo algorithm around the database
"
-"retrieved values. The values from the database for this optimizer are "
-"expected to be sequential. The values retrieved from the database structure "
-"for this optimizer indicates the \"group number\"; the "
-"<literal>increment_size</literal> is multiplied by that value in memory
to "
-"define a group \"hi value\"."
+#, no-c-format
+msgid "<literal>hilo</literal>: applies a hi/lo algorithm around the
database retrieved values. The values from the database for this optimizer are expected to
be sequential. The values retrieved from the database structure for this optimizer
indicates the \"group number\". The
<literal>increment_size</literal> is multiplied by that value in memory to
define a group \"hi value\"."
+msgstr "<literal>hilo</literal>:对从数据库获取的值应用 hi/lo 算法。用于这个 optimizer
的从数据库获取的值应该是有序的。它们表明“组编号”。<literal>increment_size</literal> 将乘以内存里的值来定义组的“hi
值”。"
#. Tag: para
-#: basic_mapping.xml:946
-#, fuzzy, no-c-format
-msgid ""
-"<literal>pooled</literal>: as with the case of
<literal>hilo</literal>, 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, <literal>increment_size</literal>
refers to "
-"the values coming from the database."
-msgstr ""
-"<literal>pooled</literal>: like was discussed for
<literal>hilo</literal>, "
-"this optimizers attempts to minimize the number of hits to the database. "
-"Here, however, we simply store the starting value for the \"next group\"
"
-"into the database structure rather than a sequential value in combination "
-"with an in-memory grouping algorithm. <literal>increment_size</literal>
here "
-"refers to the values coming from the database."
+#, no-c-format
+msgid "<literal>pooled</literal>: as with the case of
<literal>hilo</literal>, 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,
<literal>increment_size</literal> refers to the values coming from the
database."
+msgstr "<literal>pooled</literal>:和 <literal>hilo</literal>
一样,这个 optimizer
试图最小化对数据库的访问。然而,我们只是简单地把“下一组”的起始值而不是把序列值和分组算法的组合存入到数据库结构里。在这里,<literal>increment_size</literal>
表示数据库里的值。"
#. Tag: title
-#: basic_mapping.xml:959
#, no-c-format
msgid "composite-id"
msgstr "composite-id"
-#. Tag: programlisting
-#: basic_mapping.xml:961
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<composite-id\n"
-" name=\"propertyName\"\n"
-" class=\"ClassName\"\n"
-" mapped=\"true|false\"\n"
-" access=\"field|property|ClassName\">\n"
-" node=\"element-name|.\"\n"
-"\n"
-" <key-property name=\"propertyName\"
type=\"typename\" column="
-"\"column_name\"/>\n"
-" <key-many-to-one name=\"propertyName class=\"ClassName\"
column="
-"\"column_name\"/>\n"
-" ......\n"
-"</composite-id>]]>"
-msgstr ""
+msgid "A table with a composite key can be mapped with multiple properties of the
class as identifier properties. The
<literal><composite-id></literal> element accepts
<literal><key-property></literal> property mappings and
<literal><key-many-to-one></literal> mappings as child
elements."
+msgstr
"如果表使用联合主键,你可以映射类的多个属性为标识符属性。<literal><composite-id></literal>
元素接受 <literal><key-property></literal> 属性映射和
<literal><key-many-to-one></literal> 属性映射作为子元素。 "
#. Tag: para
-#: basic_mapping.xml:963
-#, fuzzy, no-c-format
-msgid ""
-"A table with a composite key can be mapped with multiple properties of the "
-"class as identifier properties. The
<literal><composite-id></literal> "
-"element accepts <literal><key-property></literal>
property mappings "
-"and <literal><key-many-to-one></literal> mappings as
child elements."
-msgstr ""
-"如果表使用联合主键,你可以映射类的多个属性为标识符属性。 <literal><"
-"composite-id></literal>元素接受<literal><key-property></literal>
属"
-"性映射和<literal><key-many-to-one></literal>属性映射作为子元素。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:970
#, no-c-format
-msgid ""
-"<![CDATA[<composite-id>\n"
-" <key-property name=\"medicareNumber\"/>\n"
-" <key-property name=\"dependent\"/>\n"
-"</composite-id>]]>"
-msgstr ""
+msgid "The persistent class <emphasis>must</emphasis> override
<literal>equals()</literal> and <literal>hashCode()</literal> to
implement composite identifier equality. It must also implement
<literal>Serializable</literal>."
+msgstr "你的持久化类<emphasis>必须</emphasis>覆盖
<literal>equals()</literal> 和 <literal>hashCode()</literal>
方法,来实现组合的标识符的相等判断。实现 <literal>Serializable</literal> 接口也是必须的。"
#. Tag: para
-#: basic_mapping.xml:972
-#, fuzzy, no-c-format
-msgid ""
-"The persistent class <emphasis>must</emphasis> override
<literal>equals()</"
-"literal> and <literal>hashCode()</literal> to implement composite
identifier "
-"equality. It must also implement
<literal>Serializable</literal>."
-msgstr ""
-"你的持久化类<emphasis>必须</emphasis>重载<literal>equals()</literal>和
"
-"<literal>hashCode()</literal>方法,来实现组合的标识符的相等判断。 实现"
-"<literal>Serializable</literal>接口也是必须的。"
+#, 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 <literal>load()</literal> the persistent state
associated with a composite key. We call this approach an
<emphasis>embedded</emphasis> composite identifier, and discourage it for
serious applications."
+msgstr
"不幸的是,这种组合关键字的方法意味着一个持久化类是它自己的标识。除了对象自己之外,没有什么方便的“把手”可用。你必须初始化持久化类的实例,填充它的标识符属性,再
<literal>load()</literal> 组合关键字关联的持久状态。我们把这种方法称为
<emphasis>embedded(嵌入式)</emphasis>的组合标识符,在重要的应用中不鼓励使用这种用法。 "
#. Tag: para
-#: basic_mapping.xml:978
-#, fuzzy, 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 <literal>load()</literal> the
"
-"persistent state associated with a composite key. We call this approach an "
-"<emphasis>embedded</emphasis> composite identifier, and discourage it
for "
-"serious applications."
-msgstr ""
-"不幸的是,这种组合关键字的方法意味着一个持久化类是它自己的标识。除了对象自己"
-"之外, 没有什么方便的“把手”可用。你必须初始化持久化类的实例,填充它的标识符属"
-"性,再<literal>load()</literal> 组合关键字关联的持久状态。我们把这种方法称为"
-"<emphasis>embedded(嵌入式)</emphasis>的组合标识符,在重要的应用中不鼓励使用"
-"这种用法。"
+#, no-c-format
+msgid "A second approach is what we call a <emphasis>mapped</emphasis>
composite identifier, where the identifier properties named inside the
<literal><composite-id></literal> element are duplicated on both
the persistent class and a separate identifier class."
+msgstr "第二种方法我们称为 <emphasis>mapped(映射式)</emphasis>组合标识符(mapped composite
identifier),<literal><composite-id></literal>
元素中列出的标识属性不但在持久化类出现,还形成一个独立的标识符类。"
#. Tag: para
-#: basic_mapping.xml:987
#, no-c-format
-msgid ""
-"A second approach is what we call a <emphasis>mapped</emphasis>
composite "
-"identifier, where the identifier properties named inside the
<literal><"
-"composite-id></literal> element are duplicated on both the persistent
"
-"class and a separate identifier class."
-msgstr ""
-"第二种方法我们称为<emphasis>mapped(映射式)</emphasis>组合标识符 (mapped "
-"composite
identifier),<literal><composite-id></literal>元素中列出的标识"
-"属性不但在持久化类出现,还形成一个独立的标识符类。"
+msgid "In this example, both the composite identifier class,
<literal>MedicareId</literal>, and the entity class itself have properties
named <literal>medicareNumber</literal> and
<literal>dependent</literal>. The identifier class must override
<literal>equals()</literal> and <literal>hashCode()</literal> and
implement <literal>Serializable</literal>. The main disadvantage of this
approach is code duplication."
+msgstr "在这个例子中,组合标识符类 <literal>MedicareId</literal> 和实体类都含有
<literal>medicareNumber</literal> 和 <literal>dependent</literal>
属性。标识符类必须重载 <literal>equals()</literal> 和
<literal>hashCode()</literal> 并且实现 <literal>Serializable</literal>
接口。这种方法的缺点是出现了明显的代码重复。"
-#. Tag: programlisting
-#: basic_mapping.xml:993
-#, no-c-format
-msgid ""
-"<![CDATA[<composite-id class=\"MedicareId\"
mapped=\"true\">\n"
-" <key-property name=\"medicareNumber\"/>\n"
-" <key-property name=\"dependent\"/>\n"
-"</composite-id>]]>"
-msgstr ""
-
#. Tag: para
-#: basic_mapping.xml:995
-#, fuzzy, no-c-format
-msgid ""
-"In this example, both the composite identifier class,
<literal>MedicareId</"
-"literal>, and the entity class itself have properties named "
-"<literal>medicareNumber</literal> and
<literal>dependent</literal>. The "
-"identifier class must override <literal>equals()</literal> and "
-"<literal>hashCode()</literal> and implement
<literal>Serializable</literal>. "
-"The main disadvantage of this approach is code duplication."
-msgstr ""
-"在这个例子中,组合标识符类<literal>MedicareId</literal>和实体类都含有"
-"<literal>medicareNumber</literal>和<literal>dependent</literal>属性。标识符类"
-"必须重载<literal>equals()</literal>和<literal>hashCode()</literal>并且实现"
-"<literal>Serializable</literal>接口。这种方法的缺点是出现了明显的代码重复。"
-
-#. Tag: para
-#: basic_mapping.xml:1004
#, 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
-#: basic_mapping.xml:1010
-#, fuzzy, no-c-format
-msgid ""
-"<literal>mapped</literal> (optional - defaults to
<literal>false</literal>): "
-"indicates that a mapped composite identifier is used, and that the contained
"
-"property mappings refer to both the entity class and the composite "
-"identifier class."
-msgstr ""
-"<literal>mapped</literal> (可选,
默认为<literal>false</literal>): 指明使用一"
-"个映射式组合标识符,其包含的属性映射同时在实体类和组合标识符类中出现。"
+#, no-c-format
+msgid "<literal>mapped</literal> (optional - defaults to
<literal>false</literal>): indicates that a mapped composite identifier is
used, and that the contained property mappings refer to both the entity class and the
composite identifier class."
+msgstr "<literal>mapped</literal>(可选,默认为
<literal>false</literal>):指明使用一个映射式组合标识符,其包含的属性映射同时在实体类和组合标识符类中出现。 "
#. Tag: para
-#: basic_mapping.xml:1018
-#, fuzzy, no-c-format
-msgid ""
-"<literal>class</literal> (optional - but required for a mapped
composite "
-"identifier): the class used as a composite identifier."
-msgstr ""
-"<literal>class</literal> (可选,但对映射式组合标识符必须指定): 作为组合标识符"
-"类使用的类名."
+#, no-c-format
+msgid "<literal>class</literal> (optional - but required for a mapped
composite identifier): the class used as a composite identifier."
+msgstr
"<literal>class</literal>(可选,但对映射式组合标识符必须指定):作为组合标识符类使用的类名。"
#. Tag: para
-#: basic_mapping.xml:1025
-#, fuzzy, no-c-format
-msgid ""
-"We will describe a third, even more convenient approach, where the composite
"
-"identifier is implemented as a component class in <xref
linkend=\"components-"
-"compositeid\"/>. The attributes described below apply only to this "
-"alternative approach:"
-msgstr ""
-"在<xref linkend=\"components-compositeid\"/>一节中,我们会描述第三种方式,那就"
-"是把组合标识符实现为一个组件(component)类,这是更方便的方法。下面的属性仅对第"
-"三种方法有效:"
+#, no-c-format
+msgid "We will describe a third, even more convenient approach, where the composite
identifier is implemented as a component class in <xref
linkend=\"components-compositeid\" />. The attributes described below apply
only to this alternative approach:"
+msgstr "在 <xref linkend=\"components-compositeid\"/>
一节中,我们会描述第三种方式,那就是把组合标识符实现为一个组件(component)类,这是更方便的方法。下面的属性仅对第三种方法有效: "
#. Tag: para
-#: basic_mapping.xml:1033
-#, fuzzy, no-c-format
-msgid ""
-"<literal>name</literal> (optional - required for this approach): a
property "
-"of component type that holds the composite identifier. Please see chapter 9 "
-"for more information."
-msgstr ""
-"<literal>name</literal> (可选,但对这种方法而言必须): 包含此组件标识符的组件类"
-"型的名字 (参阅第9章)."
+#, no-c-format
+msgid "<literal>name</literal> (optional - required for this approach):
a property of component type that holds the composite identifier. Please see chapter 9 for
more information."
+msgstr "<literal>name</literal>(可选,但对这种方法而言必须):包含此组件标识符的组件类型的名字(参阅第 9
章)。"
#. Tag: para
-#: basic_mapping.xml:1039 basic_mapping.xml:1260 basic_mapping.xml:1372
-#: basic_mapping.xml:1561 basic_mapping.xml:1735 basic_mapping.xml:1905
-#: basic_mapping.xml:2484
-#, fuzzy, no-c-format
-msgid ""
-"<literal>access</literal> (optional - defaults to
<literal>property</"
-"literal>): the strategy Hibernate uses for accessing the property value."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 -
默认为<literal>property</literal>): "
-"Hibernate用来访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 -
默认为<literal>property</literal>): "
-"Hibernate应该使用的访问此属性值的策略\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用于访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用于访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认值为
<literal>property</literal>): "
-"Hibernate用来访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用来访问属性的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用来访问属性的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用来访问属性的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 -默认是
<literal>property</literal>): "
-"Hibernate 用来访问属性值的策略。"
+#, no-c-format
+msgid "<literal>access</literal> (optional - defaults to
<literal>property</literal>): the strategy Hibernate uses for accessing the
property value."
+msgstr "<literal>access</literal>(可选 — 默认为
<literal>property</literal>):Hibernate 用来访问属性值的策略。 "
#. Tag: para
-#: basic_mapping.xml:1045
-#, fuzzy, no-c-format
-msgid ""
-"<literal>class</literal> (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 ""
-"<literal>class</literal> (可选 - 默认会用反射来自动判定属性类型 ): 用来作为组"
-"合标识符的组件类的类名(参阅下一节)"
+#, no-c-format
+msgid "<literal>class</literal> (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 "<literal>class</literal>(可选 — 默认会用反射来自动判定属性类型
):用来作为组合标识符的组件类的类名(参阅下一节)。 "
#. Tag: para
-#: basic_mapping.xml:1052
-#, fuzzy, no-c-format
-msgid ""
-"The third approach, an <emphasis>identifier component</emphasis>, is
"
-"recommended for almost all applications."
-msgstr ""
-"第三种方式,被称为<emphasis>identifier component(标识符组件)</emphasis>是我们"
-"对几乎所有应用都推荐使用的方式。"
+#, no-c-format
+msgid "The third approach, an <emphasis>identifier component</emphasis>,
is recommended for almost all applications."
+msgstr "第三种方式,被称为 <emphasis>identifier
component(标识符组件)</emphasis>是我们对几乎所有应用都推荐使用的方式。 "
#. Tag: title
-#: basic_mapping.xml:1060
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Discriminator"
-msgstr "鉴别器(discriminator)"
+msgstr "鉴别器(discriminator) "
#. Tag: para
-#: basic_mapping.xml:1062
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><discriminator></literal> 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: "
-"<literal>string</literal>, <literal>character</literal>,
<literal>integer</"
-"literal>, <literal>byte</literal>,
<literal>short</literal>, "
-"<literal>boolean</literal>, <literal>yes_no</literal>,
<literal>true_false</"
-"literal>."
-msgstr ""
-"在\"一棵对象继承树对应一个表\"的策略中,<literal><discriminator></"
-"literal>元素是必需的, 它定义了表的鉴别器字段。鉴别器字段包含标志值,用于告知"
-"持久化层应该为某个特定的行创建哪一个子类的实例。 如下这些受到限制的类型可以使"
-"用: <literal>string</literal>, <literal>character</literal>,
"
-"<literal>integer</literal>, <literal>byte</literal>,
<literal>short</"
-"literal>, <literal>boolean</literal>,
<literal>yes_no</literal>, "
-"<literal>true_false</literal>."
-
-#. Tag: programlisting
-#: basic_mapping.xml:1080
#, no-c-format
-msgid ""
-"<![CDATA[<discriminator\n"
-" column=\"discriminator_column\"\n"
-" type=\"discriminator_type\"\n"
-" force=\"true|false\"\n"
-" insert=\"true|false\"\n"
-" formula=\"arbitrary sql expression\"\n"
-"/>]]>"
-msgstr ""
+msgid "The <literal><discriminator></literal> 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: <literal>string</literal>,
<literal>character</literal>, <literal>integer</literal>,
<literal>byte</literal>, <literal>short</literal>,
<literal>boolean</literal>, <literal>yes_no</literal>,
<literal>true_false</literal>."
+msgstr
"在\"一棵对象继承树对应一个表\"的策略中,<literal><discriminator></literal>
元素是必需的,它定义了表的鉴别器字段。鉴别器字段包含标志值,用于告知持久化层应该为某个特定的行创建哪一个子类的实例。如下这些受到限制的类型可以使用:<literal>string</literal>、<literal>character</literal>、<literal>integer</literal>、<literal>byte</literal>、<literal>short</literal>、<literal>boolean</literal>、<literal>yes_no</literal>、<literal>true_false</literal>。"
#. Tag: para
-#: basic_mapping.xml:1083
-#, fuzzy, no-c-format
-msgid ""
-"<literal>column</literal> (optional - defaults to
<literal>class</literal>): "
-"the name of the discriminator column."
-msgstr ""
-"<literal>column</literal> (可选 - 默认为
<literal>class</literal>) 鉴别器字段"
-"的名字"
+#, no-c-format
+msgid "<literal>column</literal> (optional - defaults to
<literal>class</literal>): the name of the discriminator column."
+msgstr "<literal>column</literal>(可选 — 默认为
<literal>class</literal>)discriminator 器字段的名字。"
#. Tag: para
-#: basic_mapping.xml:1089
-#, fuzzy, no-c-format
-msgid ""
-"<literal>type</literal> (optional - defaults to
<literal>string</literal>): "
-"a name that indicates the Hibernate type"
-msgstr ""
-"<literal>type</literal> (可选 - 默认为
<literal>string</literal>) 一个"
-"Hibernate字段类型的名字"
+#, no-c-format
+msgid "<literal>type</literal> (optional - defaults to
<literal>string</literal>): a name that indicates the Hibernate type"
+msgstr "<literal>type</literal>(可选 — 默认为
<literal>string</literal>)一个 Hibernate 字段类型的名字 "
#. Tag: para
-#: basic_mapping.xml:1095
-#, fuzzy, no-c-format
-msgid ""
-"<literal>force</literal> (optional - defaults to
<literal>false</literal>): "
-"\"forces\" Hibernate to specify the allowed discriminator values, even
when "
-"retrieving all instances of the root class."
-msgstr ""
-"<literal>force(强制)</literal> (可选 - 默认为
<literal>false</literal>) \"强"
-"制\"Hibernate指定允许的鉴别器值,即使当取得的所有实例都是根类的。"
+#, no-c-format
+msgid "<literal>force</literal> (optional - defaults to
<literal>false</literal>): \"forces\" Hibernate to specify the
allowed discriminator values, even when retrieving all instances of the root class."
+msgstr "<literal>force(强制)</literal>(可选 — 默认为
<literal>false</literal>)\"强制\" Hibernate 指定允许的鉴别器值,即使当取得的所有实例都是根类的。
"
#. Tag: para
-#: basic_mapping.xml:1102
-#, fuzzy, no-c-format
-msgid ""
-"<literal>insert</literal> (optional - defaults to
<literal>true</literal>): "
-"set this to <literal>false</literal> if your discriminator column is
also "
-"part of a mapped composite identifier. It tells Hibernate not to include the
"
-"column in SQL <literal>INSERTs</literal>."
-msgstr ""
-"<literal>insert</literal> (可选 - 默认为<literal>true</literal>)
如果你的鉴别"
-"器字段也是映射为复合标识(composite identifier)的一部分,则需将 这个值设为"
-"<literal>false</literal>。(告诉Hibernate在做SQL
<literal>INSERT</literal> 时"
-"不包含该列)"
+#, no-c-format
+msgid "<literal>insert</literal> (optional - defaults to
<literal>true</literal>): set this to <literal>false</literal> if
your discriminator column is also part of a mapped composite identifier. It tells
Hibernate not to include the column in SQL <literal>INSERTs</literal>."
+msgstr "<literal>insert</literal>(可选 -
默认为<literal>true</literal>)如果你的鉴别器字段也是映射为复合标识(composite
identifier)的一部分,则需将这个值设为 <literal>false</literal>。(告诉 Hibernate 在做 SQL
<literal>INSERT</literal> 时不包含该列) "
#. Tag: para
-#: basic_mapping.xml:1110
-#, fuzzy, no-c-format
-msgid ""
-"<literal>formula</literal> (optional): an arbitrary SQL expression that
is "
-"executed when a type has to be evaluated. It allows content-based "
-"discrimination."
-msgstr ""
-"<literal>formula</literal> (可选) 一个SQL表达式,在类型判断(判断是父类还是具"
-"体子类-译注)时执行。可用于基于内容的鉴别器。"
+#, no-c-format
+msgid "<literal>formula</literal> (optional): an arbitrary SQL
expression that is executed when a type has to be evaluated. It allows content-based
discrimination."
+msgstr "<literal>formula</literal>(可选)一个 SQL 表达式,在类型判断(判断是父类还是具体子类 —
译注)时执行。可用于基于内容的鉴别器。 "
#. Tag: para
-#: basic_mapping.xml:1118
#, no-c-format
-msgid ""
-"Actual values of the discriminator column are specified by the "
-"<literal>discriminator-value</literal> attribute of the
<literal><"
-"class></literal> and
<literal><subclass></literal> elements."
-msgstr ""
-"鉴别器字段的实际值是根据<literal><class></literal>和<literal><"
-"subclass></literal>元素中
的<literal>discriminator-value</literal>属性得来"
-"的。"
+msgid "Actual values of the discriminator column are specified by the
<literal>discriminator-value</literal> attribute of the
<literal><class></literal> and
<literal><subclass></literal> elements."
+msgstr "鉴别器字段的实际值是根据 <literal><class></literal> 和
<literal><subclass></literal> 元素中的
<literal>discriminator-value</literal> 属性得来的。"
#. Tag: para
-#: basic_mapping.xml:1124
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>force</literal> attribute is only useful if the table
contains "
-"rows with \"extra\" discriminator values that are not mapped to a
persistent "
-"class. This will not usually be the case."
-msgstr ""
-"<literal>force</literal>属性仅仅在这种情况下有用的:表中包含没有被映射到持久"
-"化类的附加辨别器值。 这种情况不会经常遇到。"
+#, no-c-format
+msgid "The <literal>force</literal> attribute is only useful if the
table contains rows with \"extra\" discriminator values that are not mapped to a
persistent class. This will not usually be the case."
+msgstr "<literal>force</literal>
属性仅仅在这种情况下有用的:表中包含没有被映射到持久化类的附加辨别器值。这种情况不会经常遇到。 "
#. Tag: para
-#: basic_mapping.xml:1130
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>formula</literal> attribute allows you to declare an
arbitrary "
-"SQL expression that will be used to evaluate the type of a row. For example:"
-msgstr ""
-"使用<literal>formula</literal>属性你可以定义一个SQL表达式,用来判断一个行数据"
-"的类型。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1135
#, no-c-format
-msgid ""
-"<![CDATA[<discriminator\n"
-" formula=\"case when CLASS_TYPE in ('a', 'b', 'c')
then 0 else 1 end\"\n"
-" type=\"integer\"/>]]>"
-msgstr ""
+msgid "The <literal>formula</literal> attribute allows you to declare an
arbitrary SQL expression that will be used to evaluate the type of a row. For
example:"
+msgstr "使用 <literal>formula</literal> 属性你可以定义一个 SQL
表达式,用来判断一行数据的类型。"
#. Tag: title
-#: basic_mapping.xml:1140
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Version (optional)"
-msgstr "版本(version)(可选)"
+msgstr "版本(version)(可选) "
#. Tag: para
-#: basic_mapping.xml:1142
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><version></literal> element is optional and
indicates "
-"that the table contains versioned data. This is particularly useful if you "
-"plan to use <emphasis>long transactions</emphasis>. See below for more
"
-"information:"
-msgstr ""
-"<literal><version></literal>元素是可选的,表明表中包含附带版本信息的数"
-"据。 这在你准备使用<emphasis> 长事务(long transactions)</emphasis>的时候特"
-"别有用。(见后)"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1158
#, no-c-format
-msgid ""
-"<![CDATA[<version\n"
-" column=\"version_column\"\n"
-" name=\"propertyName\"\n"
-" type=\"typename\"\n"
-" access=\"field|property|ClassName\"\n"
-" unsaved-value=\"null|negative|undefined\"\n"
-" generated=\"never|always\"\n"
-" insert=\"true|false\"\n"
-"
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
-"/>]]>"
-msgstr ""
+msgid "The <literal><version></literal> element is
optional and indicates that the table contains versioned data. This is particularly useful
if you plan to use <emphasis>long transactions</emphasis>. See below for more
information:"
+msgstr "<literal><version></literal>
元素是可选的,表明表中包含附带版本信息的数据。这在你准备使用<emphasis> 长事务(long
transactions)</emphasis>的时候特别有用。下面是更多信息:"
#. Tag: para
-#: basic_mapping.xml:1161
-#, fuzzy, no-c-format
-msgid ""
-"<literal>column</literal> (optional - defaults to the property name):
the "
-"name of the column holding the version number."
-msgstr ""
-"<literal>column</literal> (可选 - 默认为属性名): 指定持有版本号的字段名。"
+#, no-c-format
+msgid "<literal>column</literal> (optional - defaults to the property
name): the name of the column holding the version number."
+msgstr "<literal>column</literal>(可选 — 默认为属性名):指定持有版本号的字段名。 "
#. Tag: para
-#: basic_mapping.xml:1167
-#, fuzzy, no-c-format
-msgid ""
-"<literal>name</literal>: the name of a property of the persistent
class."
-msgstr "<literal>name</literal>: 持久化类的属性名。"
+#, no-c-format
+msgid "<literal>name</literal>: the name of a property of the persistent
class."
+msgstr "<literal>name</literal>:持久化类的属性名。 "
#. Tag: para
-#: basic_mapping.xml:1172
-#, fuzzy, no-c-format
-msgid ""
-"<literal>type</literal> (optional - defaults to
<literal>integer</literal>): "
-"the type of the version number."
-msgstr ""
-"<literal>type</literal> (可选 - 默认是
<literal>integer</literal>): 版本号的"
-"类型。"
+#, no-c-format
+msgid "<literal>type</literal> (optional - defaults to
<literal>integer</literal>): the type of the version number."
+msgstr "<literal>type</literal>(可选 — 默认是
<literal>integer</literal>):版本号的类型。 "
#. Tag: para
-#: basic_mapping.xml:1178
-#, fuzzy, no-c-format
-msgid ""
-"<literal>access</literal> (optional - defaults to
<literal>property</"
-"literal>): the strategy Hibernate uses to access the property value."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 -
默认为<literal>property</literal>): "
-"Hibernate用来访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 -
默认为<literal>property</literal>): "
-"Hibernate应该使用的访问此属性值的策略\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用于访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用于访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认值为
<literal>property</literal>): "
-"Hibernate用来访问属性值的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用来访问属性的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用来访问属性的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 - 默认是
<literal>property</literal>): "
-"Hibernate用来访问属性的策略。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>access</literal> (可选 -默认是
<literal>property</literal>): "
-"Hibernate 用来访问属性值的策略。"
+#, no-c-format
+msgid "<literal>access</literal> (optional - defaults to
<literal>property</literal>): the strategy Hibernate uses to access the
property value."
+msgstr "<literal>access</literal>(可选 — 默认为
<literal>property</literal>):Hibernate 用来访问属性值的策略。 "
#. Tag: para
-#: basic_mapping.xml:1184
-#, fuzzy, no-c-format
-msgid ""
-"<literal>unsaved-value</literal> (optional - defaults to
<literal>undefined</"
-"literal>): a version property value that indicates that an instance is newly
"
-"instantiated (unsaved), distinguishing it from detached instances that were "
-"saved or loaded in a previous session. <literal>Undefined</literal>
"
-"specifies that the identifier property value should be used."
-msgstr ""
-"<literal>unsaved-value</literal> (可选 -
默认是<literal>undefined</"
-"literal>): 用于标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值"
-"就可以把这种情况 和已经在先前的session中保存或装载的脱管(detached)实例区分"
-"开来。 (<literal>undefined</literal>指明应被使用的标识属性值。)"
+#, no-c-format
+msgid "<literal>unsaved-value</literal> (optional - defaults to
<literal>undefined</literal>): a version property value that indicates that an
instance is newly instantiated (unsaved), distinguishing it from detached instances that
were saved or loaded in a previous session. <literal>Undefined</literal>
specifies that the identifier property value should be used."
+msgstr "<literal>unsaved-value</literal>(可选 — 默认是
<literal>undefined</literal>):用于标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值就可以把这种情况
和已经在先前的 session 中保存或装载的脱管(detached)实例区分开来。(<literal>undefined</literal>
指明应被使用的标识属性值。) "
#. Tag: para
-#: basic_mapping.xml:1193
-#, fuzzy, no-c-format
-msgid ""
-"<literal>generated</literal> (optional - defaults to
<literal>never</"
-"literal>): specifies that this version property value is generated by the
"
-"database. See the discussion of <link linkend=\"mapping-generated"
-"\">generated properties</link> for more information."
-msgstr ""
-"<literal>generated</literal> (可选 - 默认是
<literal>never</literal>): 表明此"
-"版本属性值是否实际上是由数据库生成的。请参阅<xref linkend=\"mapping-generated"
-"\">generated properties</xref>部分的讨论。"
+#, no-c-format
+msgid "<literal>generated</literal> (optional - defaults to
<literal>never</literal>): specifies that this version property value is
generated by the database. See the discussion of generated properties for more information
(<xref linkend=\"mapping-generated\" />)."
+msgstr "<literal>generated</literal>(可选 — 默认是
<literal>never</literal>):表明此版本属性值是否实际上是由数据库生成的。请参阅 <xref
linkend=\"mapping-generated\"/> 部分的讨论。 "
#. Tag: para
-#: basic_mapping.xml:1200
-#, fuzzy, no-c-format
-msgid ""
-"<literal>insert</literal> (optional - defaults to
<literal>true</literal>): "
-"specifies whether the version column should be included in SQL insert "
-"statements. It can be set to <literal>false</literal> if the database
column "
-"is defined with a default value of <literal>0</literal>."
-msgstr ""
-"<literal>insert</literal> (可选 - 默认是
<literal>true</literal>): 表明此版本"
-"列应该包含在SQL插入语句中。只有当数据库字段有默认值<literal>0</literal>的时"
-"候,才可以设置为<literal>false</literal>。"
+#, no-c-format
+msgid "<literal>insert</literal> (optional - defaults to
<literal>true</literal>): specifies whether the version column should be
included in SQL insert statements. It can be set to <literal>false</literal>
if the database column is defined with a default value of
<literal>0</literal>."
+msgstr "<literal>insert</literal>(可选 — 默认是
<literal>true</literal>):表明此版本列应该包含在 SQL 插入语句中。只有当数据库字段有默认值
<literal>0</literal> 的时候,才可以设置为 <literal>false</literal>。 "
#. Tag: para
-#: basic_mapping.xml:1210
-#, fuzzy, no-c-format
-msgid ""
-"Version numbers can be of Hibernate type <literal>long</literal>,
"
-"<literal>integer</literal>, <literal>short</literal>,
<literal>timestamp</"
-"literal> or <literal>calendar</literal>."
-msgstr ""
-"版本号必须是以下类型:<literal>long</literal>,
<literal>integer</literal>, "
-"<literal>short</literal>,
<literal>timestamp</literal>或者<literal>calendar</"
-"literal>。"
+#, no-c-format
+msgid "Version numbers can be of Hibernate type <literal>long</literal>,
<literal>integer</literal>, <literal>short</literal>,
<literal>timestamp</literal> or
<literal>calendar</literal>."
+msgstr
"版本号必须是以下类型:<literal>long</literal>、<literal>integer</literal>、<literal>short</literal>、<literal>timestamp</literal>
或者 <literal>calendar</literal>。"
#. Tag: para
-#: basic_mapping.xml:1215
-#, fuzzy, 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
<literal>unsaved-value</"
-"literal> strategies are specified. <emphasis>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</emphasis>."
-msgstr ""
-"一个脱管(detached)实例的version或timestamp属性不能为空(null),因为"
-"Hibernate不管 <literal>unsaved-value</literal>被指定为何种策略,它将任何属性"
-"为空的version或timestamp 实例看作为瞬时(transient)实例。 <emphasis>避免"
-"Hibernate中的传递重附(transitive reattachment)问题的一个简单方法是 定义一个"
-"不能为空的version或timestamp属性,特别是在人们使用程序分配的标识符(assigned "
-"identifiers) 或复合主键时非常有用!</emphasis>"
+#, 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 <literal>unsaved-value</literal> strategies are
specified. <emphasis>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</emphasis>."
+msgstr "一个脱管(detached)实例的 version 或 timestamp 属性不能为空(null),因为 Hibernate 不管
<literal>unsaved-value</literal> 被指定为何种策略,它将任何属性为空的 version 或 timestamp
实例看作为瞬时(transient)实例。 <emphasis>避免 Hibernate 中的传递重附(transitive
reattachment)问题的一个简单方法是 定义一个不能为空的 version 或 timestamp 属性,特别是在人们使用程序分配的标识符(assigned
identifiers) 或复合主键时非常有用</emphasis>。"
#. Tag: title
-#: basic_mapping.xml:1226
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Timestamp (optional)"
-msgstr "timestamp (可选)"
+msgstr "timestamp(可选) "
#. Tag: para
-#: basic_mapping.xml:1228
-#, fuzzy, no-c-format
-msgid ""
-"The optional <literal><timestamp></literal> 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 ""
-"可选的<literal><timestamp></literal>元素指明了表中包含时间戳数据。
这用"
-"来作为版本的替代。时间戳本质上是一种对乐观锁定的一种不是特别安全的实现。当"
-"然, 有时候应用程序可能在其他方面使用时间戳。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1244
#, no-c-format
-msgid ""
-"<![CDATA[<timestamp\n"
-" column=\"timestamp_column\"\n"
-" name=\"propertyName\"\n"
-" access=\"field|property|ClassName\"\n"
-" unsaved-value=\"null|undefined\"\n"
-" source=\"vm|db\"\n"
-" generated=\"never|always\"\n"
-"
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
-"/>]]>"
-msgstr ""
+msgid "The optional <literal><timestamp></literal> 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 "可选的 <literal><timestamp></literal>
元素指明了表中包含时间戳数据。这用来作为版本的替代。时间戳本质上是一种对乐观锁定的一种不是特别安全的实现。当然,有时候应用程序可能在其他方面使用时间戳。 "
#. Tag: para
-#: basic_mapping.xml:1247
-#, fuzzy, no-c-format
-msgid ""
-"<literal>column</literal> (optional - defaults to the property name):
the "
-"name of a column holding the timestamp."
-msgstr "<literal>column</literal> (可选 - 默认为属性名): 持有时间戳的字段名。"
+#, no-c-format
+msgid "<literal>column</literal> (optional - defaults to the property
name): the name of a column holding the timestamp."
+msgstr "<literal>column</literal>(可选 — 默认为属性名):存有时间戳的字段名。 "
#. Tag: para
-#: basic_mapping.xml:1253
-#, fuzzy, no-c-format
-msgid ""
-"<literal>name</literal>: the name of a JavaBeans style property of Java
type "
-"<literal>Date</literal> or <literal>Timestamp</literal> of
the persistent "
-"class."
-msgstr ""
-"<literal>name</literal>: 在持久化类中的JavaBeans风格的属性名, 其Java类型是 "
-"<literal>Date</literal> 或者
<literal>Timestamp</literal>的。"
+#, no-c-format
+msgid "<literal>name</literal>: the name of a JavaBeans style property
of Java type <literal>Date</literal> or
<literal>Timestamp</literal> of the persistent class."
+msgstr "<literal>name</literal>:在持久化类中的 JavaBeans 风格的属性名,其 Java 类型是
<literal>Date</literal> 或者 <literal>Timestamp</literal> 的。 "
#. Tag: para
-#: basic_mapping.xml:1266
-#, fuzzy, no-c-format
-msgid ""
-"<literal>unsaved-value</literal> (optional - defaults to
<literal>null</"
-"literal>): a version property value that indicates that an instance is newly
"
-"instantiated (unsaved), distinguishing it from detached instances that were "
-"saved or loaded in a previous session. <literal>Undefined</literal>
"
-"specifies that the identifier property value should be used."
-msgstr ""
-"<literal>unsaved-value</literal> (可选 -
默认是<literal>null</literal>): 用于"
-"标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值就可以把这种情"
-"况和 已经在先前的session中保存或装载的脱管(detached)实例区分开来。"
-"(<literal>undefined</literal> 指明使用标识属性值进行这种判断。)"
+#, no-c-format
+msgid "<literal>unsaved-value</literal> (optional - defaults to
<literal>null</literal>): a version property value that indicates that an
instance is newly instantiated (unsaved), distinguishing it from detached instances that
were saved or loaded in a previous session. <literal>Undefined</literal>
specifies that the identifier property value should be used."
+msgstr "<literal>unsaved-value</literal>(可选 — 默认是
<literal>null</literal>):用于标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值就可以把这种情况和已经在先前的
session 中保存或装载的脱管(detached)实例区分开来。(<literal>undefined</literal>
指明使用标识属性值进行这种判断。) "
#. Tag: para
-#: basic_mapping.xml:1275
-#, fuzzy, no-c-format
-msgid ""
-"<literal>source</literal> (optional - defaults to
<literal>vm</literal>): "
-"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
<literal>Dialects</"
-"literal> 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 ""
-"<literal>source</literal> (可选 - 默认是 <literal>vm</literal>):
Hibernate如"
-"何才能获取到时间戳的值呢?从数据库,还是当前JVM?从数据库获取会带来一些负担,"
-"因为Hibernate必须访问数据库来获得“下一个值”,但是在集群环境中会更安全些。还要"
-"注意,并不是所有的<literal>Dialect(方言)</literal>都支持获得数据库的当前时"
-"间戳的,而支持的数据库中又有一部分因为精度不足,用于锁定是不安全的(例如"
-"Oracle 8)。"
+#, no-c-format
+msgid "<literal>source</literal> (optional - defaults to
<literal>vm</literal>): 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
<literal>Dialects</literal> 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 "<literal>source</literal>(可选 — 默认是
<literal>vm</literal>):Hibernate 如何才能获取到时间戳的值呢?从数据库,还是当前 JVM?从数据库获取会带来一些负担,因为
Hibernate 必须访问数据库来获得“下一个值”,但是在集群环境中会更安全些。还要注意,并不是所有的
<literal>Dialect(方言)</literal>都支持获得数据库的当前时间戳的,而支持的数据库中又有一部分因为精度不足,用于锁定是不安全的(例如
Oracle 8)。 "
#. Tag: para
-#: basic_mapping.xml:1287
-#, fuzzy, no-c-format
-msgid ""
-"<literal>generated</literal> (optional - defaults to
<literal>never</"
-"literal>): specifies that this timestamp property value is actually "
-"generated by the database. See the discussion of <link
linkend=\"mapping-"
-"generated\">generated properties</link> for more information."
-msgstr ""
-"<literal>generated</literal> (可选 - 默认是
<literal>never</literal>): 指出时"
-"间戳值是否实际上是由数据库生成的.请参阅<xref linkend=\"mapping-generated"
-"\">generated properties</xref>的讨论。"
+#, no-c-format
+msgid "<literal>generated</literal> (optional - defaults to
<literal>never</literal>): specifies that this timestamp property value is
actually generated by the database. See the discussion of generated properties for more
information (<xref linkend=\"mapping-generated\" />)."
+msgstr "<literal>generated</literal>(可选 - 默认是
<literal>never</literal>):指出时间戳值是否实际上是由数据库生成的。请参阅 <xref
linkend=\"mapping-generated\"/> 的讨论。 "
#. Tag: title
-#: basic_mapping.xml:1298 basic_mapping.xml:2890
#, no-c-format
msgid "Note"
-msgstr ""
+msgstr "注意"
#. Tag: para
-#: basic_mapping.xml:1299
-#, fuzzy, no-c-format
-msgid ""
-"<literal><Timestamp></literal> is equivalent to
<literal><version "
-"type=\"timestamp\"></literal>. And
<literal><timestamp source=\"db"
-"\"></literal> is equivalent to <literal><version
type=\"dbtimestamp"
-"\"></literal>"
-msgstr ""
-"注意,<literal><timestamp></literal>
和<literal><version type="
-"\"timestamp\"></literal>是等价的。并且<literal><timestamp
source=\"db"
-"\"></literal>和<literal><version
type=\"dbtimestamp\"></literal>是等"
-"价的。"
+#, no-c-format
+msgid "<literal><Timestamp></literal> is equivalent to
<literal><version type=\"timestamp\"></literal>. And
<literal><timestamp source=\"db\"></literal> is
equivalent to <literal><version
type=\"dbtimestamp\"></literal>"
+msgstr "注意,<literal><timestamp></literal> 和
<literal><version type=\"timestamp\"></literal>
是等价的。并且 <literal><timestamp source=\"db\"></literal> 和
<literal><version type=\"dbtimestamp\"></literal>
是等价的。 "
#. Tag: title
-#: basic_mapping.xml:1311
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Property"
-msgstr "property"
+msgstr "Property"
#. Tag: para
-#: basic_mapping.xml:1313
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><property></literal> element declares a
persistent "
-"JavaBean style property of the class."
-msgstr ""
-"<literal><property></literal>元素为类定义了一个持久化的,JavaBean风格的"
-"属性。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1335
#, no-c-format
-msgid ""
-"<![CDATA[<property\n"
-" name=\"propertyName\"\n"
-" column=\"column_name\"\n"
-" type=\"typename\"\n"
-" update=\"true|false\"\n"
-" insert=\"true|false\"\n"
-" formula=\"arbitrary SQL expression\"\n"
-" access=\"field|property|ClassName\"\n"
-" lazy=\"true|false\"\n"
-" unique=\"true|false\"\n"
-" not-null=\"true|false\"\n"
-" optimistic-lock=\"true|false\"\n"
-" generated=\"never|insert|always\"\n"
-"
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
-" index=\"index_name\"\n"
-" unique_key=\"unique_key_id\"\n"
-" length=\"L\"\n"
-" precision=\"P\"\n"
-" scale=\"S\"\n"
-"/>]]>"
-msgstr ""
+msgid "The <literal><property></literal> element declares
a persistent JavaBean style property of the class."
+msgstr "<literal><property></literal>
元素为类定义了一个持久化的、JavaBean 风格的属性。 "
#. Tag: para
-#: basic_mapping.xml:1338
#, no-c-format
-msgid ""
-"<literal>name</literal>: the name of the property, with an initial
lowercase "
-"letter."
-msgstr "<literal>name</literal>: 属性的名字,以小写字母开头。"
+msgid "<literal>name</literal>: the name of the property, with an
initial lowercase letter."
+msgstr "<literal>name</literal>:属性的名字,以小写字母开头。"
#. Tag: para
-#: basic_mapping.xml:1344
-#, fuzzy, no-c-format
-msgid ""
-"<literal>column</literal> (optional - defaults to the property name):
the "
-"name of the mapped database table column. This can also be specified by "
-"nested <literal><column></literal> element(s)."
-msgstr ""
-"<literal>column</literal> (可选 - 默认为属性名字): 对应的数据库字段名。 也可"
-"以通过嵌套的<literal><column></literal>元素指定。"
+#, no-c-format
+msgid "<literal>column</literal> (optional - defaults to the property
name): the name of the mapped database table column. This can also be specified by nested
<literal><column></literal> element(s)."
+msgstr "<literal>column</literal>(可选 — 默认为属性名字):对应的数据库字段名。 也可以通过嵌套的
<literal><column></literal> 元素指定。 "
#. Tag: para
-#: basic_mapping.xml:1356
-#, fuzzy, no-c-format
-msgid ""
-"<literal>update, insert</literal> (optional - defaults to
<literal>true</"
-"literal>): specifies that the mapped columns should be included in SQL "
-"<literal>UPDATE</literal> and/or <literal>INSERT</literal>
statements. "
-"Setting both to <literal>false</literal> allows a pure
\"derived\" property "
-"whose value is initialized from some other property that maps to the same "
-"column(s), or by a trigger or other application."
-msgstr ""
-"<literal>update, insert</literal> (可选 - 默认为
<literal>true</literal>) : "
-"表明用于<literal>UPDATE</literal> 和/或 <literal>INSERT</literal>
的SQL语句中"
-"是否包含这个被映射了的字段。这二者如果都设置为<literal>false</literal> 则表明"
-"这是一个“外源性(derived)”的属性,它的值来源于映射到同一个(或多个) 字段的"
-"某些其他属性,或者通过一个trigger(触发器)或其他程序生成。"
+#, no-c-format
+msgid "<literal>update, insert</literal> (optional - defaults to
<literal>true</literal>): specifies that the mapped columns should be included
in SQL <literal>UPDATE</literal> and/or <literal>INSERT</literal>
statements. Setting both to <literal>false</literal> allows a pure
\"derived\" property whose value is initialized from some other property that
maps to the same column(s), or by a trigger or other application."
+msgstr "<literal>update, insert</literal>(可选 — 默认为
<literal>true</literal>): 表明用于 <literal>UPDATE</literal> 和/或
<literal>INSERT</literal> 的 SQL 语句中是否包含这个被映射了的字段。这二者如果都设置为
<literal>false</literal> 则表明这是一个“外源性(derived)”的属性,它的值来源于映射到同一个(或多个)
字段的某些其他属性,或者通过一个 trigger(触发器)或其他程序生成。 "
#. Tag: para
-#: basic_mapping.xml:1365
#, no-c-format
-msgid ""
-"<literal>formula</literal> (optional): an SQL expression that defines
the "
-"value for a <emphasis>computed</emphasis> property. Computed properties
do "
-"not have a column mapping of their own."
-msgstr ""
-"<literal>formula</literal> (可选): 一个SQL表达式,定义了这个<emphasis>计算
"
-"(computed)</emphasis> 属性的值。计算属性没有和它对应的数据库字段。"
+msgid "<literal>formula</literal> (optional): an SQL expression that
defines the value for a <emphasis>computed</emphasis> property. Computed
properties do not have a column mapping of their own."
+msgstr "<literal>formula</literal>(可选):一个 SQL
表达式,定义了这个<emphasis>计算 (computed)</emphasis> 属性的值。计算属性没有和它对应的数据库字段。"
#. Tag: para
-#: basic_mapping.xml:1378
-#, fuzzy, no-c-format
-msgid ""
-"<literal>lazy</literal> (optional - defaults to
<literal>false</literal>): "
-"specifies that this property should be fetched lazily when the instance "
-"variable is first accessed. It requires build-time bytecode instrumentation."
-msgstr ""
-"<literal>lazy</literal> (可选 - 默认为
<literal>false</literal>): 指定 指定实"
-"例变量第一次被访问时,这个属性是否延迟抓取(fetched lazily)( 需要运行时字节"
-"码增强)。"
+#, no-c-format
+msgid "<literal>lazy</literal> (optional - defaults to
<literal>false</literal>): specifies that this property should be fetched
lazily when the instance variable is first accessed. It requires build-time bytecode
instrumentation."
+msgstr "<literal>lazy</literal>(可选 — 默认为
<literal>false</literal>):指定 指定实例变量第一次被访问时,这个属性是否延迟抓取(fetched lazily)(
需要运行时字节码增强)。 "
#. Tag: para
-#: basic_mapping.xml:1385
-#, fuzzy, no-c-format
-msgid ""
-"<literal>unique</literal> (optional): enables the DDL generation of a
unique "
-"constraint for the columns. Also, allow this to be the target of a "
-"<literal>property-ref</literal>."
-msgstr ""
-"<literal>unique</literal> (可选): 使用DDL为该字段添加唯一的约束。 同样,允许"
-"它作为<literal>property-ref</literal>引用的目标。"
+#, no-c-format
+msgid "<literal>unique</literal> (optional): enables the DDL generation
of a unique constraint for the columns. Also, allow this to be the target of a
<literal>property-ref</literal>."
+msgstr "<literal>unique</literal>(可选):使用 DDL 为该字段添加唯一的约束。同样,允许它作为
<literal>property-ref</literal> 引用的目标。 "
#. Tag: para
-#: basic_mapping.xml:1392
-#, fuzzy, no-c-format
-msgid ""
-"<literal>not-null</literal> (optional): enables the DDL generation of a
"
-"nullability constraint for the columns."
-msgstr ""
-"<literal>not-null</literal> (可选): 使用DDL为该字段添加可否为空"
-"(nullability)的约束。"
+#, no-c-format
+msgid "<literal>not-null</literal> (optional): enables the DDL
generation of a nullability constraint for the columns."
+msgstr "<literal>not-null</literal>(可选):使用 DDL
为该字段添加可否为空(nullability)的约束。 "
#. Tag: para
-#: basic_mapping.xml:1398 basic_mapping.xml:1581
-#, fuzzy, no-c-format
-msgid ""
-"<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</"
-"literal>): specifies that updates to this property do or do not require "
-"acquisition of the optimistic lock. In other words, it determines if a "
-"version increment should occur when this property is dirty."
-msgstr ""
-"<literal>optimistic-lock</literal> (可选 - 默认为
<literal>true</literal>): "
-"指定这个属性在做更新时是否需要获得乐观锁定(optimistic lock)。 换句话说,它"
-"决定这个属性发生脏数据时版本(version)的值是否增长。"
+#, no-c-format
+msgid "<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</literal>): specifies that updates to this property do or do not
require acquisition of the optimistic lock. In other words, it determines if a version
increment should occur when this property is dirty."
+msgstr "<literal>optimistic-lock</literal>(可选 — 默认为
<literal>true</literal>):指定这个属性在做更新时是否需要获得乐观锁定(optimistic
lock)。换句话说,它决定这个属性发生脏数据时版本(version)的值是否增长。 "
#. Tag: para
-#: basic_mapping.xml:1406
-#, fuzzy, no-c-format
-msgid ""
-"<literal>generated</literal> (optional - defaults to
<literal>never</"
-"literal>): specifies that this property value is actually generated by the
"
-"database. See the discussion of <link linkend=\"mapping-generated"
-"\">generated properties</link> for more information."
-msgstr ""
-"<literal>generated</literal> (可选 - 默认为
<literal>never</literal>): 表明此"
-"属性值是否实际上是由数据库生成的。请参阅<xref linkend=\"mapping-generated"
-"\">generated properties</xref>的讨论。"
+#, no-c-format
+msgid "<literal>generated</literal> (optional - defaults to
<literal>never</literal>): specifies that this property value is actually
generated by the database. See the discussion of generated properties for more information
(<xref linkend=\"mapping-generated\" />)."
+msgstr "<literal>generated</literal>(可选 — 默认为
<literal>never</literal>):表明此属性值是否实际上是由数据库生成的。请参阅 <xref
linkend=\"mapping-generated\"/> 的讨论。 "
#. Tag: para
-#: basic_mapping.xml:1415
#, no-c-format
msgid "<emphasis>typename</emphasis> could be:"
-msgstr "<emphasis>typename</emphasis>可以是如下几种:"
+msgstr "<emphasis>typename</emphasis> 可以是如下几种:"
#. Tag: para
-#: basic_mapping.xml:1421
-#, fuzzy, no-c-format
-msgid ""
-"The name of a Hibernate basic type: <literal>integer, string, character,
"
-"date, timestamp, float, binary, serializable, object, blob</literal>
etc."
-msgstr ""
-"Hibernate基本类型名(比如:<literal>integer, string, character,date, "
-"timestamp, float, binary, serializable, object, blob</literal>)。"
+#, no-c-format
+msgid "The name of a Hibernate basic type: <literal>integer, string,
character, date, timestamp, float, binary, serializable, object, blob</literal>
etc."
+msgstr "Hibernate 基本类型名(比如:<literal>integer, string, character,date,
timestamp, float, binary, serializable, object, blob</literal>)。 "
#. Tag: para
-#: basic_mapping.xml:1427
-#, fuzzy, no-c-format
-msgid ""
-"The name of a Java class with a default basic type: <literal>int, float,
"
-"char, java.lang.String, java.util.Date, java.lang.Integer,
java.sql.Clob</"
-"literal> etc."
-msgstr ""
-"一个Java类的名字,这个类属于一种默认基础类型 (比如: <literal>int, float,"
-"char, java.lang.String, java.util.Date, java.lang.Integer,
java.sql.Clob</"
-"literal>)。"
+#, no-c-format
+msgid "The name of a Java class with a default basic type: <literal>int,
float, char, java.lang.String, java.util.Date, java.lang.Integer,
java.sql.Clob</literal> etc."
+msgstr "一个 Java 类的名字,这个类属于一种默认基础类型(比如:<literal>int, float,char,
java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob</literal>)。
"
#. Tag: para
-#: basic_mapping.xml:1433
#, no-c-format
msgid "The name of a serializable Java class."
-msgstr "一个可以序列化的Java类的名字。"
+msgstr "一个可以序列化的 Java 类的名字。"
#. Tag: para
-#: basic_mapping.xml:1438
-#, fuzzy, no-c-format
-msgid ""
-"The class name of a custom type:
<literal>com.illflow.type.MyCustomType</"
-"literal> etc."
-msgstr ""
-"一个自定义类型的类的名字。(比如: <literal>com.illflow.type.MyCustomType</"
-"literal>)。"
+#, no-c-format
+msgid "The class name of a custom type:
<literal>com.illflow.type.MyCustomType</literal> etc."
+msgstr
"一个自定义类型的类的名字。(比如:<literal>com.illflow.type.MyCustomType</literal>)。
"
#. Tag: para
-#: basic_mapping.xml:1444
-#, fuzzy, 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
<literal>type</"
-"literal> attribute. For example, to distinguish between
<literal>Hibernate."
-"DATE</literal> and <literal>Hibernate.TIMESTAMP</literal>, or to
specify a "
-"custom type."
-msgstr ""
-"如果你没有指定类型,Hibernarte会使用反射来得到这个名字的属性,以此来猜测正确"
-"的Hibernate类型。 Hibernate会按照规则2,3,4的顺序对属性读取器(getter方法)的返"
-"回类进行解释。然而,这还不够。 在某些情况下你仍然需要<literal>type</literal>"
-"属性。(比如,为了区别<literal>Hibernate.DATE</literal>
和<literal>Hibernate."
-"TIMESTAMP</literal>,或者为了指定一个自定义类型。)"
+#, 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 <literal>type</literal> attribute. For
example, to distinguish between <literal>Hibernate.DATE</literal> and
<literal>Hibernate.TIMESTAMP</literal>, or to specify a custom type."
+msgstr "如果你没有指定类型,Hibernarte 会使用反射来得到这个名字的属性,以此来猜测正确的 Hibernate 类型。Hibernate 会按照规则
2,3,4 的顺序对属性读取器(getter方法)的返回类进行解释。然而,这还不够。 在某些情况下你仍然需要 <literal>type</literal>
属性。(比如,为了区别<literal>Hibernate.DATE</literal>
和<literal>Hibernate.TIMESTAMP</literal>,或者为了指定一个自定义类型。) "
#. Tag: para
-#: basic_mapping.xml:1454
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>access</literal> 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
<literal>access=\"field\"</literal>, "
-"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 <literal>org.hibernate.property."
-"PropertyAccessor</literal>."
-msgstr ""
-"<literal>access</literal>属性用来让你控制Hibernate如何在运行时访问属性。在默"
-"认情况下, Hibernate会使用属性的get/set方法对(pair)。如果你指明"
-"<literal>access=\"field\"</literal>,
Hibernate会忽略get/set方法对,直接使用反"
-"射来访问成员变量。你也可以指定你自己的策略, 这就需要你自己实现<literal>org."
-"hibernate.property.PropertyAccessor</literal>接口, 再在access中设置你自定义"
-"策略类的名字。"
+#, no-c-format
+msgid "The <literal>access</literal> 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 <literal>access=\"field\"</literal>,
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 <literal>org.hibernate.property.PropertyAccessor</literal>."
+msgstr "<literal>access</literal> 属性用来让你控制 Hibernate
如何在运行时访问属性。在默认情况下,Hibernate 会使用属性的 get/set 方法对(pair)。如果你指明
<literal>access=\"field\"</literal>,Hibernate 会忽略 get/set
方法对,直接使用反射来访问成员变量。你也可以指定你自己的策略,这就需要你自己实现
<literal>org.hibernate.property.PropertyAccessor</literal> 接口,再在 access
中设置你自定义策略类的名字。 "
#. Tag: para
-#: basic_mapping.xml:1463
-#, fuzzy, 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
<literal>SELECT</"
-"literal> clause subquery in the SQL query that loads an instance:"
-msgstr ""
-"衍生属性(derive propertie)是一个特别强大的特征。这些属性应该定义为只读,属"
-"性值在装载时计算生成。 你用一个SQL表达式生成计算的结果,它会在这个实例转载时"
-"翻译成一个SQL查询的<literal>SELECT</literal> 子查询语句。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1470
#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"<property name=\"totalPrice\"\n"
-" formula=\"( SELECT SUM (li.quantity*p.price) FROM LineItem li, Product
"
-"p\n"
-" WHERE li.productId = p.productId\n"
-" AND li.customerId = customerId\n"
-" AND li.orderNumber = orderNumber )\"/>]]>"
-msgstr ""
+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 <literal>SELECT</literal> clause
subquery in the SQL query that loads an instance:"
+msgstr "衍生属性(derive propertie)是一个特别强大的特征。这些属性应该定义为只读,属性值在装载时计算生成。 你用一个 SQL
表达式生成计算的结果,它会在这个实例转载时翻译成一个 SQL 查询的 <literal>SELECT</literal> 子查询语句。 "
#. Tag: para
-#: basic_mapping.xml:1472
-#, fuzzy, no-c-format
-msgid ""
-"You can reference the entity table by not declaring an alias on a particular
"
-"column. This would be <literal>customerId</literal> in the given
example. "
-"You can also use the nested <literal><formula></literal>
mapping "
-"element if you do not want to use the attribute."
-msgstr ""
-"注意,你可以使用实体自己的表,而不用为这个特别的列定义别名( 上面例子中的"
-"<literal>customerId</literal>)。同时注意,如果你不喜欢使用属性, 你可以使用"
-"嵌套的<literal><formula></literal>映射元素。"
+#, no-c-format
+msgid "You can reference the entity table by not declaring an alias on a particular
column. This would be <literal>customerId</literal> in the given example. You
can also use the nested <literal><formula></literal> mapping
element if you do not want to use the attribute."
+msgstr "注意,你可以使用实体自己的表,而不用为这个特别的列定义别名(上面例子中的
<literal>customerId</literal>)。同时注意,如果你不喜欢使用属性, 你可以使用嵌套的
<literal><formula></literal> 映射元素。 "
#. Tag: title
-#: basic_mapping.xml:1482
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Many-to-one"
-msgstr "多对一(many-to-one)"
+msgstr "多对一(many-to-one) "
#. Tag: para
-#: basic_mapping.xml:1484
-#, fuzzy, no-c-format
-msgid ""
-"An ordinary association to another persistent class is declared using a "
-"<literal>many-to-one</literal> element. The relational model is a
many-to-"
-"one association; a foreign key in one table is referencing the primary key "
-"column(s) of the target table."
-msgstr ""
-"通过<literal>many-to-one</literal>元素,可以定义一种常见的与另一个持久化类的关"
-"联。 这种关系模型是多对一关联(实际上是一个对象引用-译注):这个表的一个外键"
-"引用目标表的 主键字段。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1512
#, no-c-format
-msgid ""
-"<![CDATA[<many-to-one\n"
-" name=\"propertyName\"\n"
-" column=\"column_name\"\n"
-" class=\"ClassName\"\n"
-" cascade=\"cascade_style\"\n"
-" fetch=\"join|select\"\n"
-" update=\"true|false\"\n"
-" insert=\"true|false\"\n"
-" property-ref=\"propertyNameFromAssociatedClass\"\n"
-" access=\"field|property|ClassName\"\n"
-" unique=\"true|false\"\n"
-" not-null=\"true|false\"\n"
-" optimistic-lock=\"true|false\"\n"
-" lazy=\"proxy|no-proxy|false\"\n"
-" not-found=\"ignore|exception\"\n"
-" entity-name=\"EntityName\"\n"
-" formula=\"arbitrary SQL expression\"\n"
-"
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
-" embed-xml=\"true|false\"\n"
-" index=\"index_name\"\n"
-" unique_key=\"unique_key_id\"\n"
-" foreign-key=\"foreign_key_name\"\n"
-"/>]]>"
-msgstr ""
+msgid "An ordinary association to another persistent class is declared using a
<literal>many-to-one</literal> element. The relational model is a many-to-one
association; a foreign key in one table is referencing the primary key column(s) of the
target table."
+msgstr "通过 <literal>many-to-one</literal>
元素,可以定义一种常见的与另一个持久化类的关联。这种关系模型是多对一关联(实际上是一个对象引用-译注):这个表的一个外键引用目标表的主键字段。 "
#. Tag: para
-#: basic_mapping.xml:1515 basic_mapping.xml:1696 basic_mapping.xml:1882
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>name</literal>: the name of the property."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>name</literal>: 属性名。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>name</literal>: 属性的名字。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>name</literal>: 属性名"
+msgstr "<literal>name</literal>:属性名。"
#. Tag: para
-#: basic_mapping.xml:1520 basic_mapping.xml:2311
-#, fuzzy, no-c-format
-msgid ""
-"<literal>column</literal> (optional): the name of the foreign key
column. "
-"This can also be specified by nested
<literal><column></literal> "
-"element(s)."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>column</literal> (可选): 外间字段名。它也可以通过嵌套的 "
-"<literal><column></literal>元素指定。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>column</literal> (可选): 外键字段的名称。也可以通过嵌套的 "
-"<literal><column></literal>指定。"
+#, no-c-format
+msgid "<literal>column</literal> (optional): the name of the foreign key
column. This can also be specified by nested
<literal><column></literal> element(s)."
+msgstr "<literal>column</literal>(可选):外键字段的名称。也可以通过嵌套的
<literal><column></literal> 指定。 "
#. Tag: para
-#: basic_mapping.xml:1527 basic_mapping.xml:1701
-#, fuzzy, no-c-format
-msgid ""
-"<literal>class</literal> (optional - defaults to the property type
"
-"determined by reflection): the name of the associated class."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>class</literal> (可选 - 默认是通过反射得到属性类型): 关联的类的名"
-"字。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>class</literal> (可选 - 默认是通过反射得到的属性类型):被关联的类的"
-"名字。"
+#, no-c-format
+msgid "<literal>class</literal> (optional - defaults to the property
type determined by reflection): the name of the associated class."
+msgstr "<literal>class</literal>(可选 — 默认是通过反射得到的属性类型):被关联的类的名字。 "
#. Tag: para
-#: basic_mapping.xml:1533 basic_mapping.xml:1707
-#, fuzzy, no-c-format
-msgid ""
-"<literal>cascade</literal> (optional): specifies which operations
should be "
-"cascaded from the parent object to the associated object."
-msgstr ""
-"<literal>cascade(级联)</literal> (可选) 表明操作是否从父对象级联到被关联的对"
-"象。"
+#, no-c-format
+msgid "<literal>cascade</literal> (optional): specifies which operations
should be cascaded from the parent object to the associated object."
+msgstr "<literal>cascade(级联)</literal>(可选)表明操作是否从父对象级联到被关联的对象。 "
#. Tag: para
-#: basic_mapping.xml:1539 basic_mapping.xml:1722
-#, fuzzy, no-c-format
-msgid ""
-"<literal>fetch</literal> (optional - defaults to
<literal>select</literal>): "
-"chooses between outer-join fetching or sequential select fetching."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>fetch</literal> (可选 - 默认为
<literal>select</literal>): 在外连接"
-"抓取(outer-join fetching)和序列选择抓取(sequential select fetching)两者中"
-"选择其一。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>fetch</literal> (可选 - 默认设置为<literal>选择</literal>):
在外连接"
-"抓取或者序列选择抓取选择其一."
+#, no-c-format
+msgid "<literal>fetch</literal> (optional - defaults to
<literal>select</literal>): chooses between outer-join fetching or sequential
select fetching."
+msgstr "<literal>fetch</literal>(可选 — 默认为
<literal>select</literal>):在外连接抓取(outer-join fetching)和序列选择抓取(sequential
select fetching)两者中选择其一。 "
#. Tag: para
-#: basic_mapping.xml:1545
-#, fuzzy, no-c-format
-msgid ""
-"<literal>update, insert</literal> (optional - defaults to
<literal>true</"
-"literal>): specifies that the mapped columns should be included in SQL "
-"<literal>UPDATE</literal> and/or <literal>INSERT</literal>
statements. "
-"Setting both to <literal>false</literal> allows a pure
\"derived\" "
-"association whose value is initialized from another property that maps to "
-"the same column(s), or by a trigger or other application."
-msgstr ""
-"<literal>update, insert</literal> (可选 - 默认为
<literal>true</literal>) 指"
-"定对应的字段是否包含在用于<literal>UPDATE</literal> 和/或
<literal>INSERT</"
-"literal> 的SQL语句中。如果二者都是<literal>false</literal>,则这是一个纯粹的 "
-"“外源性(derived)”关联,它的值是通过映射到同一个(或多个)字段的某些其他属性"
-"得到 或者通过trigger(触发器)、或其他程序生成。"
+#, no-c-format
+msgid "<literal>update, insert</literal> (optional - defaults to
<literal>true</literal>): specifies that the mapped columns should be included
in SQL <literal>UPDATE</literal> and/or <literal>INSERT</literal>
statements. Setting both to <literal>false</literal> allows a pure
\"derived\" association whose value is initialized from another property that
maps to the same column(s), or by a trigger or other application."
+msgstr "<literal>update, insert</literal>(可选 — 默认为
<literal>true</literal>)指定对应的字段是否包含在用于 <literal>UPDATE</literal>
和/或 <literal>INSERT</literal> 的 SQL
语句中。如果二者都是<literal>false</literal>,则这是一个纯粹的
“外源性(derived)”关联,它的值是通过映射到同一个(或多个)字段的某些其他属性得到 或者通过 trigger(触发器)、或其他程序生成。 "
#. Tag: para
-#: basic_mapping.xml:1554
-#, fuzzy, no-c-format
-msgid ""
-"<literal>property-ref</literal> (optional): the name of a property of
the "
-"associated class that is joined to this foreign key. If not specified, the "
-"primary key of the associated class is used."
-msgstr ""
-"<literal>property-ref</literal>: (可选) 指定关联类的一个属性,这个属性将会和"
-"本外键相对应。 如果没有指定,会使用对方关联类的主键。"
+#, no-c-format
+msgid "<literal>property-ref</literal> (optional): the name of a
property of the associated class that is joined to this foreign key. If not specified, the
primary key of the associated class is used."
+msgstr
"<literal>property-ref</literal>:(可选)被关联到此外键的类中的对应属性的名字。如果没有指定,被关联类的主键将被使用。
"
#. Tag: para
-#: basic_mapping.xml:1567
-#, fuzzy, no-c-format
-msgid ""
-"<literal>unique</literal> (optional): enables the DDL generation of a
unique "
-"constraint for the foreign-key column. By allowing this to be the target of "
-"a <literal>property-ref</literal>, you can make the association
multiplicity "
-"one-to-one."
-msgstr ""
-"<literal>unique</literal> (可选): 使用DDL为外键字段生成一个唯一约束。此外, "
-"这也可以用作<literal>property-ref</literal>的目标属性。这使关联同时具有 一对"
-"一的效果。"
+#, no-c-format
+msgid "<literal>unique</literal> (optional): enables the DDL generation
of a unique constraint for the foreign-key column. By allowing this to be the target of a
<literal>property-ref</literal>, you can make the association multiplicity
one-to-one."
+msgstr "<literal>unique</literal>(可选):使用 DDL 为外键字段生成一个唯一约束。此外, 这也可以用作
<literal>property-ref</literal> 的目标属性。这使关联同时具有一对一的效果。 "
#. Tag: para
-#: basic_mapping.xml:1575
-#, fuzzy, no-c-format
-msgid ""
-"<literal>not-null</literal> (optional): enables the DDL generation of a
"
-"nullability constraint for the foreign key columns."
-msgstr ""
-"<literal>not-null</literal> (可选): 使用DDL为外键字段生成一个非空约束。"
+#, no-c-format
+msgid "<literal>not-null</literal> (optional): enables the DDL
generation of a nullability constraint for the foreign key columns."
+msgstr "<literal>not-null</literal>(可选):使用 DDL 为外键字段生成一个非空约束。 "
#. Tag: para
-#: basic_mapping.xml:1589
-#, fuzzy, no-c-format
-msgid ""
-"<literal>lazy</literal> (optional - defaults to
<literal>proxy</literal>): "
-"by default, single point associations are proxied.
<literal>lazy=\"no-proxy"
-"\"</literal> specifies that the property should be fetched lazily when
the "
-"instance variable is first accessed. This requires build-time bytecode "
-"instrumentation. <literal>lazy=\"false\"</literal> specifies
that the "
-"association will always be eagerly fetched."
-msgstr ""
-"<literal>lazy</literal> (可选 - 默认为
<literal>proxy</literal>): 默认情况"
-"下,单点关联是经过代理的。<literal>lazy=\"no-proxy\"</literal>指定此属性应该"
-"在实例变量第一次被访问时应该延迟抓取(fetche lazily)(需要运行时字节码的增"
-"强)。 <literal>lazy=\"false\"</literal>指定此关联总是被预先抓取。"
+#, no-c-format
+msgid "<literal>lazy</literal> (optional - defaults to
<literal>proxy</literal>): by default, single point associations are proxied.
<literal>lazy=\"no-proxy\"</literal> specifies that the property
should be fetched lazily when the instance variable is first accessed. This requires
build-time bytecode instrumentation.
<literal>lazy=\"false\"</literal> specifies that the association
will always be eagerly fetched."
+msgstr "<literal>lazy</literal>(可选 — 默认为
<literal>proxy</literal>):默认情况下,单点关联是经过代理的。<literal>lazy=\"no-proxy\"</literal>
指定此属性应该在实例变量第一次被访问时应该延迟抓取(fetche
lazily)(需要运行时字节码的增强)。<literal>lazy=\"false\"</literal> 指定此关联总是被预先抓取。
"
#. Tag: para
-#: basic_mapping.xml:1599
-#, fuzzy, no-c-format
-msgid ""
-"<literal>not-found</literal> (optional - defaults to
<literal>exception</"
-"literal>): specifies how foreign keys that reference missing rows will be
"
-"handled. <literal>ignore</literal> will treat a missing row as a null
"
-"association."
-msgstr ""
-"<literal>not-found</literal> (可选 - 默认为
<literal>exception</literal>): 指"
-"定外键引用的数据不存在时如何处理: <literal>ignore</literal>会将行数据不存在"
-"视为一个空(null)关联。"
+#, no-c-format
+msgid "<literal>not-found</literal> (optional - defaults to
<literal>exception</literal>): specifies how foreign keys that reference
missing rows will be handled. <literal>ignore</literal> will treat a missing
row as a null association."
+msgstr "<literal>not-found</literal>(可选 -
默认为<literal>exception</literal>):指定如何处理引用缺失行的外键:<literal>ignore</literal>
会把缺失的行作为一个空关联处理。 "
#. Tag: para
-#: basic_mapping.xml:1606 basic_mapping.xml:1760
-#, fuzzy, no-c-format
-msgid ""
-"<literal>entity-name</literal> (optional): the entity name of the
associated "
-"class."
-msgstr "<literal>entity-name</literal> (可选): 被关联的类的实体名。"
+#, no-c-format
+msgid "<literal>entity-name</literal> (optional): the entity name of the
associated class."
+msgstr "<literal>entity-name</literal>(可选):被关联的类的实体名。 "
#. Tag: para
-#: basic_mapping.xml:1611
#, no-c-format
-msgid ""
-"<literal>formula</literal> (optional): an SQL expression that defines
the "
-"value for a <emphasis>computed</emphasis> foreign key."
-msgstr ""
-"<literal>formula</literal> (可选):
SQL表达式,用于定义<emphasis>computed(计"
-"算出的)</emphasis>外键值。"
+msgid "<literal>formula</literal> (optional): an SQL expression that
defines the value for a <emphasis>computed</emphasis> foreign key."
+msgstr "<literal>formula</literal>(可选):SQL 表达式,用于定义
<emphasis>computed(计算出的)</emphasis>外键值。"
#. Tag: para
-#: basic_mapping.xml:1619
-#, fuzzy, no-c-format
-msgid ""
-"Setting a value of the <literal>cascade</literal> attribute to any
"
-"meaningful value other than <literal>none</literal> will propagate
certain "
-"operations to the associated object. The meaningful values are divided into "
-"three categories. First, basic operations, which include: <literal>persist,
"
-"merge, delete, save-update, evict, replicate, lock and refresh</literal>;
"
-"second, special values: <literal>delete-orphan</literal>; and
third,"
-"<literal>all</literal> comma-separated combinations of operation names:
"
-"<literal>cascade=\"persist,merge,evict\"</literal> or
<literal>cascade=\"all,"
-"delete-orphan\"</literal>. See <xref
linkend=\"objectstate-transitive\"/> "
-"for a full explanation. Note that single valued, many-to-one and one-to-one,
"
-"associations do not support orphan delete."
-msgstr ""
-"<literal>cascade</literal>属性设置为除了<literal>none</literal>以外任何有意义"
-"的值, 它将把特定的操作传递到关联对象中。这个值就代表着Hibernate基本操作的名"
-"称, <literal>persist, merge, delete, save-update, evict, replicate, lock,
"
-"refresh</literal>, 以及特别的值<literal>delete-orphan</literal>和"
-"<literal>all</literal>,并且可以用逗号分隔符 来组合这些操作,例如,"
-"<literal>cascade=\"persist,merge,evict\"</literal>或
<literal>cascade=\"all,"
-"delete-orphan\"</literal>。更全面的解释请参考<xref
linkend=\"objectstate-"
-"transitive\"/>. 注意,单值关联 (many-to-one 和 one-to-one 关联) 不支持删除孤"
-"儿(orphan delete,删除不再被引用的值)."
+#, no-c-format
+msgid "Setting a value of the <literal>cascade</literal> attribute to
any meaningful value other than <literal>none</literal> will propagate certain
operations to the associated object. The meaningful values are divided into three
categories. First, basic operations, which include: <literal>persist, merge, delete,
save-update, evict, replicate, lock and refresh</literal>; second, special values:
<literal>delete-orphan</literal>; and third,<literal>all</literal>
comma-separated combinations of operation names:
<literal>cascade=\"persist,merge,evict\"</literal> or
<literal>cascade=\"all,delete-orphan\"</literal>. See <xref
linkend=\"objectstate-transitive\" /> for a full explanation. Note that
single valued, many-to-one and one-to-one, associations do not support orphan
delete."
+msgstr "<literal>cascade</literal>
属性设置为除了<literal>none</literal> 以外任何有意义的值,它将把特定的操作传递到关联对象中。这个值就代表着 Hibernate
基本操作的名称,<literal>persist, merge, delete, save-update, evict, replicate, lock,
refresh</literal>,以及特别的值 <literal>delete-orphan</literal> 和
<literal>all</literal>,并且可以用逗号分隔符来组合这些操作,例如,<literal>cascade=\"persist,merge,evict\"</literal>
或 <literal>cascade=\"all,delete-orphan\"</literal>。更全面的解释请参考
<xref linkend=\"objectstate-transitive\"/>。注意,单值关联(many-to-one 和
one-to-one 关联)不支持删除孤儿(orphan delete,删除不再被引用的值)。 "
#. Tag: para
-#: basic_mapping.xml:1632
-#, fuzzy, no-c-format
-msgid ""
-"Here is an example of a typical <literal>many-to-one</literal>
declaration:"
-msgstr "一个典型的简单<literal>many-to-one</literal>定义例子:"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1636
#, no-c-format
-msgid ""
-"<![CDATA[<many-to-one name=\"product\" class=\"Product\"
column=\"PRODUCT_ID"
-"\"/>]]>"
-msgstr ""
+msgid "Here is an example of a typical <literal>many-to-one</literal>
declaration:"
+msgstr "一个典型的简单 <literal>many-to-one</literal> 定义例子: "
#. Tag: para
-#: basic_mapping.xml:1638
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>property-ref</literal> attribute should only be used for
"
-"mapping legacy data where a foreign key refers to a unique key of the "
-"associated table other than the primary key. This is a complicated and "
-"confusing relational model. For example, if the
<literal>Product</literal> "
-"class had a unique serial number that is not the primary key. The "
-"<literal>unique</literal> attribute controls Hibernate's DDL
generation with "
-"the SchemaExport tool."
-msgstr ""
-"<literal>property-ref</literal>属性只应该用来对付遗留下来的数据库系统, 可能"
-"有外键指向对方关联表的是个非主键字段(但是应该是一个惟一关键字)的情况下。 这"
-"是一种十分丑陋的关系模型。比如说,假设<literal>Product</literal>类有一个惟一"
-"的序列号, 它并不是主键。(<literal>unique</literal>属性控制Hibernate通过"
-"SchemaExport工具进行的DDL生成。)"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1647
#, no-c-format
-msgid ""
-"<![CDATA[<property name=\"serialNumber\" unique=\"true\"
type=\"string\" "
-"column=\"SERIAL_NUMBER\"/>]]>"
-msgstr ""
+msgid "The <literal>property-ref</literal> attribute should only be used
for mapping legacy data where a foreign key refers to a unique key of the associated table
other than the primary key. This is a complicated and confusing relational model. For
example, if the <literal>Product</literal> class had a unique serial number
that is not the primary key. The <literal>unique</literal> attribute controls
Hibernate's DDL generation with the SchemaExport tool."
+msgstr "<literal>property-ref</literal>
属性只应该用来对付遗留下来的数据库系统,可能有外键指向对方关联表的是个非主键字段(但是应该是一个惟一关键字)的情况下。这是一种十分丑陋的关系模型。比如说,假设
<literal>Product</literal>
类有一个惟一的序列号,它并不是主键。(<literal>unique</literal> 属性控制 Hibernate 通过 SchemaExport
工具进行的 DDL 生成。) "
#. Tag: para
-#: basic_mapping.xml:1649
#, no-c-format
msgid "Then the mapping for <literal>OrderItem</literal> might
use:"
-msgstr "那么关于<literal>OrderItem</literal> 的映射可能是:"
+msgstr "那么关于 <literal>OrderItem</literal> 的映射可能是:"
-#. Tag: programlisting
-#: basic_mapping.xml:1653
-#, no-c-format
-msgid ""
-"<![CDATA[<many-to-one name=\"product\"
property-ref=\"serialNumber\" column="
-"\"PRODUCT_SERIAL_NUMBER\"/>]]>"
-msgstr ""
-
#. Tag: para
-#: basic_mapping.xml:1655
-#, fuzzy, no-c-format
+#, no-c-format
msgid "This is not encouraged, however."
-msgstr "当然,我们决不鼓励这种用法。"
+msgstr "当然,我们决不鼓励这种用法。 "
#. Tag: para
-#: basic_mapping.xml:1659
#, no-c-format
-msgid ""
-"If the referenced unique key comprises multiple properties of the associated
"
-"entity, you should map the referenced properties inside a named
<literal><"
-"properties></literal> element."
-msgstr ""
-"如果被引用的唯一主键由关联实体的多个属性组成,你应该在名称为<literal><"
-"properties></literal>的元素 里面映射所有关联的属性。"
+msgid "If the referenced unique key comprises multiple properties of the associated
entity, you should map the referenced properties inside a named
<literal><properties></literal> element."
+msgstr "如果被引用的唯一主键由关联实体的多个属性组成,你应该在名称为
<literal><properties></literal> 的元素 里面映射所有关联的属性。"
#. Tag: para
-#: basic_mapping.xml:1664
-#, fuzzy, no-c-format
-msgid ""
-"If the referenced unique key is the property of a component, you can specify
"
-"a property path:"
-msgstr "假若被引用的唯一主键是组件的属性,你可以指定属性路径:"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1668
#, no-c-format
-msgid ""
-"<![CDATA[<many-to-one name=\"owner\"
property-ref=\"identity.ssn\" column="
-"\"OWNER_SSN\"/>]]>"
-msgstr ""
+msgid "If the referenced unique key is the property of a component, you can specify
a property path:"
+msgstr "假若被引用的唯一主键是组件的属性,你可以指定属性路径: "
#. Tag: title
-#: basic_mapping.xml:1673
-#, fuzzy, no-c-format
+#, no-c-format
msgid "One-to-one"
-msgstr "一对一"
+msgstr "一对一 "
#. Tag: para
-#: basic_mapping.xml:1675
#, no-c-format
-msgid ""
-"A one-to-one association to another persistent class is declared using a "
-"<literal>one-to-one</literal> element."
-msgstr ""
-"持久化对象之间一对一的关联关系是通过<literal>one-to-one</literal>元素定义的。"
+msgid "A one-to-one association to another persistent class is declared using a
<literal>one-to-one</literal> element."
+msgstr "持久化对象之间一对一的关联关系是通过 <literal>one-to-one</literal> 元素定义的。"
-#. Tag: programlisting
-#: basic_mapping.xml:1693
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<one-to-one\n"
-" name=\"propertyName\"\n"
-" class=\"ClassName\"\n"
-" cascade=\"cascade_style\"\n"
-" constrained=\"true|false\"\n"
-" fetch=\"join|select\"\n"
-" property-ref=\"propertyNameFromAssociatedClass\"\n"
-" access=\"field|property|ClassName\"\n"
-" formula=\"any SQL expression\"\n"
-" lazy=\"proxy|no-proxy|false\"\n"
-" entity-name=\"EntityName\"\n"
-"
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
-" embed-xml=\"true|false\"\n"
-" foreign-key=\"foreign_key_name\"\n"
-"/>]]>"
-msgstr ""
+msgid "<literal>constrained</literal> (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
<literal>save()</literal> and <literal>delete()</literal> are
cascaded, and determines whether the association can be proxied. It is also used by the
schema export tool."
+msgstr
"<literal>constrained(约束)</literal>(可选)表明该类对应的表对应的数据库表,和被关联的对象所对应的数据库表之间,通过一个外键引用对主键进行约束。这个选项影响
<literal>save()</literal> 和 <literal>delete()</literal>
在级联执行时的先后顺序以及决定该关联能否被委托(也在 schema export tool 中被使用)。 "
#. Tag: para
-#: basic_mapping.xml:1713
-#, fuzzy, no-c-format
-msgid ""
-"<literal>constrained</literal> (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
<literal>save"
-"()</literal> and <literal>delete()</literal> are cascaded, and
determines "
-"whether the association can be proxied. It is also used by the schema export
"
-"tool."
-msgstr ""
-"<literal>constrained(约束)</literal> (可选) 表明该类对应的表对应的数据库表,"
-"和被关联的对象所对应的数据库表之间,通过一个外键引用对主键进行约束。 这个选项"
-"影响<literal>save()</literal>和<literal>delete()</literal>在级联执行时的先后"
-"顺序以及 决定该关联能否被委托(也在schema export tool中被使用)."
+#, no-c-format
+msgid "<literal>property-ref</literal> (optional): the name of a
property of the associated class that is joined to the primary key of this class. If not
specified, the primary key of the associated class is used."
+msgstr
"<literal>property-ref</literal>:(可选)指定关联类的属性名,这个属性将会和本类的主键相对应。如果没有指定,会使用对方关联类的主键。
"
#. Tag: para
-#: basic_mapping.xml:1728
-#, fuzzy, no-c-format
-msgid ""
-"<literal>property-ref</literal> (optional): the name of a property of
the "
-"associated class that is joined to the primary key of this class. If not "
-"specified, the primary key of the associated class is used."
-msgstr ""
-"<literal>property-ref</literal>: (可选) 指定关联类的属性名,这个属性将会和本"
-"类的主键相对应。如果没有指定,会使用对方关联类的主键。"
+#, no-c-format
+msgid "<literal>formula</literal> (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
<literal>org.hibernate.test.onetooneformula</literal> for an example."
+msgstr "<literal>formula
</literal>(可选):绝大多数一对一的关联都指向其实体的主键。在一些少见的情况中,你可能会指向其他的一个或多个字段,或者是一个表达式,这些情况下,你可以用一个
SQL 公式来表示。(可以在 org.hibernate.test.onetooneformula 找到例子) "
#. Tag: para
-#: basic_mapping.xml:1741
-#, fuzzy, no-c-format
-msgid ""
-"<literal>formula</literal> (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 <literal>org.hibernate.test.onetooneformula</literal> for
an "
-"example."
-msgstr ""
-"<literal>formula </literal> (可选):绝大多数一对一的关联都指向其实体的主键。在"
-"一些少见的情况中, 你可能会指向其他的一个或多个字段,或者是一个表达式,这些情"
-"况下,你可以用一个SQL公式来表示。 (可以在org.hibernate.test.onetooneformula"
-"找到例子)"
+#, no-c-format
+msgid "<literal>lazy</literal> (optional - defaults to
<literal>proxy</literal>): by default, single point associations are proxied.
<literal>lazy=\"no-proxy\"</literal> specifies that the property
should be fetched lazily when the instance variable is first accessed. It requires
build-time bytecode instrumentation.
<literal>lazy=\"false\"</literal> specifies that the association
will always be eagerly fetched. <emphasis>Note that if
<literal>constrained=\"false\"</literal>, proxying is impossible and
Hibernate will eagerly fetch the association</emphasis>."
+msgstr "<literal>lazy</literal>(可选 — 默认为
<literal>proxy</literal>):默认情况下,单点关联是经过代理的。<literal>lazy=\"no-proxy\"</literal>指定此属性应该在实例变量第一次被访问时应该延迟抓取(fetche
lazily)(需要运行时字节码的增强)。
<literal>lazy=\"false\"</literal>指定此关联总是被预先抓取。<emphasis>注意,如果<literal>constrained=\"false\"</literal>,
不可能使用代理,Hibernate会采取预先抓取</emphasis>。"
#. Tag: para
-#: basic_mapping.xml:1749
-#, fuzzy, no-c-format
-msgid ""
-"<literal>lazy</literal> (optional - defaults to
<literal>proxy</literal>): "
-"by default, single point associations are proxied.
<literal>lazy=\"no-proxy"
-"\"</literal> specifies that the property should be fetched lazily when
the "
-"instance variable is first accessed. It requires build-time bytecode "
-"instrumentation. <literal>lazy=\"false\"</literal> specifies
that the "
-"association will always be eagerly fetched. <emphasis>Note that if "
-"<literal>constrained=\"false\"</literal>, proxying is
impossible and "
-"Hibernate will eagerly fetch the association</emphasis>."
-msgstr ""
-"<literal>lazy</literal> (可选 - 默认为
<literal>proxy</literal>): 默认情况"
-"下,单点关联是经过代理的。<literal>lazy=\"no-proxy\"</literal>指定此属性应该"
-"在实例变量第一次被访问时应该延迟抓取(fetche lazily)(需要运行时字节码的增"
-"强)。
<literal>lazy=\"false\"</literal>指定此关联总是被预先抓取。<emphasis>"
-"注意,如果<literal>constrained=\"false\"</literal>,
不可能使用代理,Hibernate"
-"会采取预先抓取!</emphasis>"
-
-#. Tag: para
-#: basic_mapping.xml:1767
-#, fuzzy, no-c-format
+#, no-c-format
msgid "There are two varieties of one-to-one associations:"
-msgstr "有两种不同的一对一关联:"
+msgstr "有两种不同的一对一关联: "
#. Tag: para
-#: basic_mapping.xml:1771
#, no-c-format
msgid "primary key associations"
msgstr "主键关联"
#. Tag: para
-#: basic_mapping.xml:1774
#, no-c-format
msgid "unique foreign key associations"
msgstr "惟一外键关联"
#. Tag: para
-#: basic_mapping.xml:1779
-#, fuzzy, 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 ""
-"主键关联不需要额外的表字段;如果两行是通过这种一对一关系相关联的,那么这两行"
-"就共享同样的主关键字值。所以如果你希望两个对象通过主键一对一关联,你必须确认"
-"它们被赋予同样的标识值!"
+#, 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
"主键关联不需要额外的表字段;如果两行是通过这种一对一关系相关联的,那么这两行就共享同样的主关键字值。所以如果你希望两个对象通过主键一对一关联,你必须确认它们被赋予同样的标识值。"
#. Tag: para
-#: basic_mapping.xml:1786
-#, fuzzy, no-c-format
-msgid ""
-"For a primary key association, add the following mappings to "
-"<literal>Employee</literal> and <literal>Person</literal>
respectively:"
-msgstr ""
-"比如说,对下面的<literal>Employee</literal>和<literal>Person</literal>进行主"
-"键一对一关联:"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1791
#, no-c-format
-msgid "<![CDATA[<one-to-one name=\"person\"
class=\"Person\"/>]]>"
-msgstr ""
+msgid "For a primary key association, add the following mappings to
<literal>Employee</literal> and <literal>Person</literal>
respectively:"
+msgstr "比如说,对下面的 <literal>Employee</literal> 和
<literal>Person</literal> 进行主键一对一关联:"
-#. Tag: programlisting
-#: basic_mapping.xml:1792
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<one-to-one name=\"employee\" class=\"Employee\"
constrained=\"true"
-"\"/>]]>"
-msgstr ""
+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
<literal>foreign</literal>:"
+msgstr "现在我们必须确保 PERSON 和 EMPLOYEE 中相关的字段是相等的。我们使用一个被成为
<literal>foreign</literal> 的特殊的 hibernate 标识符生成策略: "
#. Tag: para
-#: basic_mapping.xml:1794
-#, fuzzy, 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 <literal>foreign</literal>:"
-msgstr ""
-"现在我们必须确保PERSON和EMPLOYEE中相关的字段是相等的。我们使用一个被成为"
-"<literal>foreign</literal>的特殊的hibernate标识符生成策略:"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1800
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"person\"
table=\"PERSON\">\n"
-" <id name=\"id\" column=\"PERSON_ID\">\n"
-" <generator class=\"foreign\">\n"
-" <param
name=\"property\">employee</param>\n"
-" </generator>\n"
-" </id>\n"
-" ...\n"
-" <one-to-one name=\"employee\"\n"
-" class=\"Employee\"\n"
-" constrained=\"true\"/>\n"
-"</class>]]>"
-msgstr ""
+msgid "A newly saved instance of <literal>Person</literal> is assigned
the same primary key value as the <literal>Employee</literal> instance
referred with the <literal>employee</literal> property of that
<literal>Person</literal>."
+msgstr "一个刚刚保存的 <literal>Person</literal> 实例被赋予和该
<literal>Person</literal> 的 <literal>employee</literal> 属性所指向的
<literal>Employee</literal> 实例同样的关键字值。 "
#. Tag: para
-#: basic_mapping.xml:1802
-#, fuzzy, no-c-format
-msgid ""
-"A newly saved instance of <literal>Person</literal> is assigned the
same "
-"primary key value as the <literal>Employee</literal> instance referred
with "
-"the <literal>employee</literal> property of that
<literal>Person</literal>."
-msgstr ""
-"一个刚刚保存的<literal>Person</literal>实例被赋予和该<literal>Person</"
-"literal>的<literal>employee</literal>属性所指向的<literal>Employee</literal>"
-"实例同样的关键字值。"
-
-#. Tag: para
-#: basic_mapping.xml:1808
-#, fuzzy, no-c-format
-msgid ""
-"Alternatively, a foreign key with a unique constraint, from "
-"<literal>Employee</literal> to <literal>Person</literal>,
can be expressed "
-"as:"
-msgstr ""
-"另一种方式是一个外键和一个惟一关键字对应,上面的<literal>Employee</literal>和"
-"<literal>Person</literal>的例子,如果使用这种关联方式,可以表达成:"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1813
#, no-c-format
-msgid ""
-"<![CDATA[<many-to-one name=\"person\" class=\"Person\"
column=\"PERSON_ID\" "
-"unique=\"true\"/>]]>"
-msgstr ""
+msgid "Alternatively, a foreign key with a unique constraint, from
<literal>Employee</literal> to <literal>Person</literal>, can be
expressed as:"
+msgstr "另一种方式是一个外键和一个惟一关键字对应,上面的 <literal>Employee</literal> 和
<literal>Person</literal> 的例子,如果使用这种关联方式,可以表达成: "
#. Tag: para
-#: basic_mapping.xml:1815
-#, fuzzy, no-c-format
-msgid ""
-"This association can be made bidirectional by adding the following to the "
-"<literal>Person</literal> mapping:"
-msgstr ""
-"如果在<literal>Person</literal>的映射加入下面几句,这种关联就是双向的:"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1820
#, no-c-format
-msgid ""
-"<![CDATA[<one-to-one name=\"employee\" class=\"Employee\"
property-ref="
-"\"person\"/>]]>"
-msgstr ""
+msgid "This association can be made bidirectional by adding the following to the
<literal>Person</literal> mapping:"
+msgstr "如果在 <literal>Person</literal> 的映射加入下面几句,这种关联就是双向的: "
#. Tag: title
-#: basic_mapping.xml:1825
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Natural-id"
-msgstr "自然ID(natural-id)"
+msgstr "自然 ID(natural-id) "
-#. Tag: programlisting
-#: basic_mapping.xml:1827
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<natural-id mutable=\"true|false\"/>\n"
-" <property ... />\n"
-" <many-to-one ... />\n"
-" ......\n"
-"</natural-id>]]>"
-msgstr ""
+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 <literal><natural-id></literal> 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)是单个或组合属性,他们必须唯一且非空。如果它还是不可变的那就更理想了。在
<literal><natural-id></literal> 元素中列出自然键的属性。Hibernate
会帮你生成必须的唯一键值和非空约束,你的映射会更加的明显易懂(原文是 self-documenting,自我注解)。 "
#. Tag: para
-#: basic_mapping.xml:1829
-#, fuzzy, 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
<literal><"
-"natural-id></literal> 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)是单个或组合属"
-"性,他们必须唯一且非空。如果它还是不可变的那就更理想了。在<literal><"
-"natural-id></literal>元素中列出自然键的属性。Hibernate会帮你生成必须的唯一"
-"键值和非空约束,你的映射会更加的明显易懂(原文是self-documenting,自我注"
-"解)。"
+#, no-c-format
+msgid "It is recommended that you implement <literal>equals()</literal>
and <literal>hashCode()</literal> to compare the natural key properties of the
entity."
+msgstr "我们强烈建议你实现 <literal>equals()</literal> 和
<literal>hashCode()</literal> 方法,来比较实体的自然键属性。 "
#. Tag: para
-#: basic_mapping.xml:1838
-#, fuzzy, no-c-format
-msgid ""
-"It is recommended that you implement <literal>equals()</literal> and
"
-"<literal>hashCode()</literal> to compare the natural key properties of
the "
-"entity."
-msgstr ""
-"我们强烈建议你实现<literal>equals()</literal>
和<literal>hashCode()</literal>"
-"方法,来比较实体的自然键属性。"
+#, no-c-format
+msgid "This mapping is not intended for use with entities that have natural primary
keys."
+msgstr "这一映射不是为了把自然键作为主键而准备的。 "
#. Tag: para
-#: basic_mapping.xml:1843
-#, fuzzy, no-c-format
-msgid ""
-"This mapping is not intended for use with entities that have natural primary
"
-"keys."
-msgstr "这一映射不是为了把自然键作为主键而准备的。"
+#, no-c-format
+msgid "<literal>mutable</literal> (optional - defaults to
<literal>false</literal>): by default, natural identifier properties are
assumed to be immutable (constant)."
+msgstr "<literal>mutable</literal>(可选,默认为
<literal>false</literal>):默认情况下,自然标识属性被假定为不可变的(常量)。 "
-#. Tag: para
-#: basic_mapping.xml:1849
-#, fuzzy, no-c-format
-msgid ""
-"<literal>mutable</literal> (optional - defaults to
<literal>false</"
-"literal>): by default, natural identifier properties are assumed to be "
-"immutable (constant)."
-msgstr ""
-"<literal>mutable</literal> (可选,
默认为<literal>false</literal>): 默认情况"
-"下,自然标识属性被假定为不可变的(常量)。"
-
#. Tag: title
-#: basic_mapping.xml:1859
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Component and dynamic-component"
-msgstr "组件(component), 动态组件(dynamic-component)"
+msgstr "组件(component)和动态组件(dynamic-component) "
#. Tag: para
-#: basic_mapping.xml:1861
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><component></literal> 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 ""
-"<literal><component></literal>元素把子对象的一些元素与父类对应的表的一"
-"些字段映射起来。 然后组件可以定义它们自己的属性、组件或者集合。参见后面"
-"的“Components”一章。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1879
#, no-c-format
-msgid ""
-"<![CDATA[<component\n"
-" name=\"propertyName\"\n"
-" class=\"className\"\n"
-" insert=\"true|false\"\n"
-" update=\"true|false\"\n"
-" access=\"field|property|ClassName\"\n"
-" lazy=\"true|false\"\n"
-" optimistic-lock=\"true|false\"\n"
-" unique=\"true|false\"\n"
-" node=\"element-name|.\"\n"
-">\n"
-"\n"
-" <property ...../>\n"
-" <many-to-one .... />\n"
-" ........\n"
-"</component>]]>"
-msgstr ""
+msgid "The <literal><component></literal> 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 "<literal><component></literal>
元素把子对象的一些元素与父类对应的表的一些字段映射起来。然后组件可以定义它们自己的属性、组件或者集合。参见后面的“Components”一章。 "
#. Tag: para
-#: basic_mapping.xml:1887
-#, fuzzy, no-c-format
-msgid ""
-"<literal>class</literal> (optional - defaults to the property type
"
-"determined by reflection): the name of the component (child) class."
-msgstr ""
-"<literal>class</literal> (可选 - 默认为通过反射得到的属性类型):组件(子)类的名"
-"字。"
+#, no-c-format
+msgid "<literal>class</literal> (optional - defaults to the property
type determined by reflection): the name of the component (child) class."
+msgstr "<literal>class</literal>(可选 — 默认为通过反射得到的属性类型):组件(子)类的名字。 "
#. Tag: para
-#: basic_mapping.xml:1893 basic_mapping.xml:1982
-#, fuzzy, no-c-format
-msgid ""
-"<literal>insert</literal>: do the mapped columns appear in SQL "
-"<literal>INSERTs</literal>?"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>insert</literal>:
被映射的字段是否出现在SQL的<literal>INSERT</"
-"literal>语句中?\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>insert</literal>: 被映射的字段是否出现在SQL的
<literal>INSERT</"
-"literal>语句中?"
+#, no-c-format
+msgid "<literal>insert</literal>: do the mapped columns appear in SQL
<literal>INSERTs</literal>?"
+msgstr "<literal>insert</literal>:被映射的字段是否出现在 SQL 的
<literal>INSERT</literal> 语句中? "
#. Tag: para
-#: basic_mapping.xml:1899 basic_mapping.xml:1988
-#, fuzzy, no-c-format
-msgid ""
-"<literal>update</literal>: do the mapped columns appear in SQL "
-"<literal>UPDATEs</literal>?"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>update</literal>:
被映射的字段是否出现在SQL的<literal>UPDATE</"
-"literal>语句中?\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>update</literal>: 被映射的字段是否出现在SQL的
<literal>UPDATE</"
-"literal>语句中?"
+#, no-c-format
+msgid "<literal>update</literal>: do the mapped columns appear in SQL
<literal>UPDATEs</literal>?"
+msgstr "<literal>update</literal>:被映射的字段是否出现在 SQL 的
<literal>UPDATE</literal> 语句中? "
#. Tag: para
-#: basic_mapping.xml:1911
-#, fuzzy, no-c-format
-msgid ""
-"<literal>lazy</literal> (optional - defaults to
<literal>false</literal>): "
-"specifies that this component should be fetched lazily when the instance "
-"variable is first accessed. It requires build-time bytecode instrumentation."
-msgstr ""
-"<literal>lazy</literal> (可选 - 默认是
<literal>false</literal>): 表明此组件"
-"应在实例变量第一次被访问的时候延迟加载(需要编译时字节码装置器)"
+#, no-c-format
+msgid "<literal>lazy</literal> (optional - defaults to
<literal>false</literal>): specifies that this component should be fetched
lazily when the instance variable is first accessed. It requires build-time bytecode
instrumentation."
+msgstr "<literal>lazy</literal>(可选 — 默认是
<literal>false</literal>):表明此组件应在实例变量第一次被访问的时候延迟加载(需要编译时字节码装置器)。"
#. Tag: para
-#: basic_mapping.xml:1918
-#, fuzzy, no-c-format
-msgid ""
-"<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</"
-"literal>): 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 ""
-"<literal>optimistic-lock</literal> (可选 - 默认是
<literal>true</literal>):表"
-"明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号"
-"(Version)"
+#, no-c-format
+msgid "<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</literal>): 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 "<literal>optimistic-lock</literal>(可选 — 默认是
<literal>true</literal>):表明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号(Version)。"
#. Tag: para
-#: basic_mapping.xml:1926 basic_mapping.xml:2002
-#, fuzzy, no-c-format
-msgid ""
-"<literal>unique</literal> (optional - defaults to
<literal>false</literal>): "
-"specifies that a unique constraint exists upon all mapped columns of the "
-"component."
-msgstr ""
-"<literal>unique</literal> (可选 - 默认是
<literal>false</literal>):表明组件映"
-"射的所有字段上都有唯一性约束"
+#, no-c-format
+msgid "<literal>unique</literal> (optional - defaults to
<literal>false</literal>): specifies that a unique constraint exists upon all
mapped columns of the component."
+msgstr "<literal>unique</literal>(可选 — 默认是
<literal>false</literal>):表明组件映射的所有字段上都有唯一性约束。"
#. Tag: para
-#: basic_mapping.xml:1935
#, no-c-format
-msgid ""
-"The child <literal><property></literal> tags map
properties of the "
-"child class to table columns."
-msgstr ""
-"其<literal><property></literal>子标签为子类的一些属性与表字段之间建立映"
-"射。"
+msgid "The child <literal><property></literal> tags map
properties of the child class to table columns."
+msgstr "其 <literal><property></literal>
子标签为子类的一些属性与表字段之间建立映射。"
#. Tag: para
-#: basic_mapping.xml:1940
#, no-c-format
-msgid ""
-"The <literal><component></literal> element allows a
<literal><"
-"parent></literal> subelement that maps a property of the component
class "
-"as a reference back to the containing entity."
-msgstr ""
-"<literal><component></literal>元素允许加入一个<literal><parent></"
-"literal>子元素,在组件类内部就可以有一个指向其容器的实体的反向引用。"
+msgid "The <literal><component></literal> element allows a
<literal><parent></literal> subelement that maps a property of
the component class as a reference back to the containing entity."
+msgstr "<literal><component></literal> 元素允许加入一个
<literal><parent></literal>
子元素,在组件类内部就可以有一个指向其容器的实体的反向引用。"
#. Tag: para
-#: basic_mapping.xml:1946
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><dynamic-component></literal> element allows
a "
-"<literal>Map</literal> to be mapped as a component, where the property
names "
-"refer to keys of the map. See <xref
linkend=\"components-dynamic\"/> for "
-"more information."
-msgstr ""
-"<literal><dynamic-component></literal>元素允许把一个<literal>Map</"
-"literal>映射为组件,其属性名对应map的键值。 参见<xref linkend=\"components-"
-"dynamic\"/>."
+#, no-c-format
+msgid "The <literal><dynamic-component></literal> element
allows a <literal>Map</literal> to be mapped as a component, where the
property names refer to keys of the map. See <xref
linkend=\"components-dynamic\" /> for more information."
+msgstr "<literal><dynamic-component></literal> 元素允许把一个
<literal>Map</literal> 映射为组件,其属性名对应 map 的键值。参见 <xref
linkend=\"components-dynamic\"/>。 "
#. Tag: title
-#: basic_mapping.xml:1955
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Properties"
-msgstr "properties"
+msgstr "属性(Properties)"
#. Tag: para
-#: basic_mapping.xml:1957
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><properties></literal> 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 <literal>property-ref</literal>. It is also a convenient
way to "
-"define a multi-column unique constraint. For example:"
-msgstr ""
-"<literal><properties></literal> 元素允许定义一个命名的逻辑分组"
-"(grouping)包含一个类中的多个属性。 这个元素最重要的用处是允许多个属性的组合作"
-"为<literal>property-ref</literal>的目标(target)。 这也是定义多字段唯一约束的"
-"一种方便途径。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:1973
#, no-c-format
-msgid ""
-"<![CDATA[<properties\n"
-" name=\"logicalName\"\n"
-" insert=\"true|false\"\n"
-" update=\"true|false\"\n"
-" optimistic-lock=\"true|false\"\n"
-" unique=\"true|false\"\n"
-">\n"
-"\n"
-" <property ...../>\n"
-" <many-to-one .... />\n"
-" ........\n"
-"</properties>]]>"
-msgstr ""
+msgid "The <literal><properties></literal> 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 <literal>property-ref</literal>. It is also a convenient way to
define a multi-column unique constraint. For example:"
+msgstr "<literal><properties></literal>
元素允许定义一个命名的逻辑分组(grouping)包含一个类中的多个属性。这个元素最重要的用处是允许多个属性的组合作为
<literal>property-ref</literal> 的目标(target)。这也是定义多字段唯一约束的一种方便途径。例如:"
#. Tag: para
-#: basic_mapping.xml:1976
-#, fuzzy, no-c-format
-msgid ""
-"<literal>name</literal>: the logical name of the grouping. It is
"
-"<emphasis>not</emphasis> an actual property name."
-msgstr ""
-"<literal>name</literal>: 分组的逻辑名称 - <emphasis>不是</emphasis>
实际属性"
-"的名称."
+#, no-c-format
+msgid "<literal>name</literal>: the logical name of the grouping. It is
<emphasis>not</emphasis> an actual property name."
+msgstr "<literal>name</literal>:分组的逻辑名称 —
<emphasis>不是</emphasis> 实际属性的名称。 "
#. Tag: para
-#: basic_mapping.xml:1994
-#, fuzzy, no-c-format
-msgid ""
-"<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</"
-"literal>): 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 ""
-"<literal>optimistic-lock</literal> (可选 - 默认是
<literal>true</literal>):表"
-"明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号"
-"(Version)"
+#, no-c-format
+msgid "<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</literal>): 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 "<literal>optimistic-lock</literal>(可选 — 默认是
<literal>true</literal>):表明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号(Version)。"
#. Tag: para
-#: basic_mapping.xml:2011
#, no-c-format
-msgid ""
-"For example, if we have the following
<literal><properties></literal> "
-"mapping:"
-msgstr
"例如,如果我们有如下的<literal><properties></literal>映射:"
+msgid "For example, if we have the following
<literal><properties></literal> mapping:"
+msgstr "例如,如果我们有如下的 <literal><properties></literal>
映射:"
-#. Tag: programlisting
-#: basic_mapping.xml:2015
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"personNumber\"/>\n"
-"\n"
-" ...\n"
-" <properties name=\"name\"\n"
-" unique=\"true\" update=\"false\">\n"
-" <property name=\"firstName\"/>\n"
-" <property name=\"initial\"/>\n"
-" <property name=\"lastName\"/>\n"
-" </properties>\n"
-"</class>]]>"
-msgstr ""
+msgid "You might have some legacy data association that refers to this unique key of
the <literal>Person</literal> table, instead of to the primary key:"
+msgstr "然后,我们可能有一些遗留的数据关联,引用 <literal>Person</literal>
表的这个唯一键,而不是主键:"
#. Tag: para
-#: basic_mapping.xml:2017
-#, fuzzy, no-c-format
-msgid ""
-"You might have some legacy data association that refers to this unique key "
-"of the <literal>Person</literal> table, instead of to the primary
key:"
-msgstr ""
-"然后,我们可能有一些遗留的数据关联,引用 <literal>Person</literal>表的这个唯"
-"一键,而不是主键。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2022
#, no-c-format
-msgid ""
-"<![CDATA[<many-to-one name=\"person\"\n"
-" class=\"Person\" property-ref=\"name\">\n"
-" <column name=\"firstName\"/>\n"
-" <column name=\"initial\"/>\n"
-" <column name=\"lastName\"/>\n"
-"</many-to-one>]]>"
-msgstr ""
+msgid "The use of this outside the context of mapping legacy data is not
recommended."
+msgstr "我们并不推荐这样使用,除非在映射遗留数据的情况下。 "
-#. Tag: para
-#: basic_mapping.xml:2024
-#, fuzzy, no-c-format
-msgid ""
-"The use of this outside the context of mapping legacy data is not "
-"recommended."
-msgstr "我们并不推荐这样使用,除非在映射遗留数据的情况下。"
-
#. Tag: title
-#: basic_mapping.xml:2032
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Subclass"
-msgstr "子类(subclass)"
+msgstr "子类(subclass) "
#. Tag: para
-#: basic_mapping.xml:2034
-#, fuzzy, 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 <literal><subclass></literal> declaration is used.
For example:"
-msgstr ""
-"最后,多态持久化需要为父类的每个子类都进行定义。对于“每一棵类继承树对应一个"
-"表”的策略来说,就需要使用<literal><subclass></literal>定义。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2047
#, no-c-format
-msgid ""
-"<![CDATA[<subclass\n"
-" name=\"ClassName\"\n"
-" discriminator-value=\"discriminator_value\"\n"
-" proxy=\"ProxyInterface\"\n"
-" lazy=\"true|false\"\n"
-" dynamic-update=\"true|false\"\n"
-" dynamic-insert=\"true|false\"\n"
-" entity-name=\"EntityName\"\n"
-" node=\"element-name\"\n"
-" extends=\"SuperclassName\">\n"
-"\n"
-" <property .... />\n"
-" .....\n"
-"</subclass>]]>"
-msgstr ""
+msgid "Polymorphic persistence requires the declaration of each subclass of the root
persistent class. For the table-per-class-hierarchy mapping strategy, the
<literal><subclass></literal> declaration is used. For
example:"
+msgstr "最后,多态持久化需要为父类的每个子类都进行定义。对于“每一棵类继承树对应一个表”的策略来说,就需要使用
<literal><subclass></literal> 定义。 "
#. Tag: para
-#: basic_mapping.xml:2050 basic_mapping.xml:2108 basic_mapping.xml:2171
-#, fuzzy, no-c-format
-msgid ""
-"<literal>name</literal>: the fully qualified class name of the
subclass."
-msgstr "<literal>name</literal>: 子类的全限定名。"
+#, no-c-format
+msgid "<literal>name</literal>: the fully qualified class name of the
subclass."
+msgstr "<literal>name</literal>:子类的全限定名。 "
#. Tag: para
-#: basic_mapping.xml:2055
-#, fuzzy, no-c-format
-msgid ""
-"<literal>discriminator-value</literal> (optional - defaults to the
class "
-"name): a value that distinguishes individual subclasses."
-msgstr ""
-"<literal>discriminator-value(辨别标志)</literal> (可选 - 默认为类名):一个用于"
-"区分每个独立的子类的值。"
+#, no-c-format
+msgid "<literal>discriminator-value</literal> (optional - defaults to
the class name): a value that distinguishes individual subclasses."
+msgstr "<literal>discriminator-value(辨别标志)</literal>(可选 —
默认为类名):一个用于区分每个独立的子类的值。 "
#. Tag: para
-#: basic_mapping.xml:2061
-#, fuzzy, no-c-format
-msgid ""
-"<literal>proxy</literal> (optional): specifies a class or interface
used for "
-"lazy initializing proxies."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>proxy(代理)</literal> (可选): 指定一个类或者接口,在延迟装载时作为代"
-"理使用。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>proxy</literal> (可选): 指定一个类或者接口,在延迟装载时作为代理使"
-"用。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>proxy</literal> (可选): 指定一个类或者接口,在延迟装载时作为代理使"
-"用。"
+#, no-c-format
+msgid "<literal>proxy</literal> (optional): specifies a class or
interface used for lazy initializing proxies."
+msgstr "<literal>proxy</literal>(可选):指定一个类或者接口,在延迟装载时作为代理使用。 "
#. Tag: para
-#: basic_mapping.xml:2067
-#, fuzzy, no-c-format
-msgid ""
-"<literal>lazy</literal> (optional - defaults to
<literal>true</literal>): "
-"setting <literal>lazy=\"false\"</literal> disables the use of
lazy fetching."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>lazy</literal> (可选, 默认是<literal>true</literal>):
设置为 "
-"<literal>lazy=\"false\"</literal> 禁止使用延迟抓取\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>lazy</literal> (可选, 默认是 <literal>true</literal>):
设置为 "
-"<literal>lazy=\"false\"</literal> 禁止使用延迟装载。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>lazy</literal> (可选, 默认是 <literal>true</literal>):
设置为 "
-"<literal>lazy=\"false\"</literal> 禁止使用延迟装载。"
+#, no-c-format
+msgid "<literal>lazy</literal> (optional - defaults to
<literal>true</literal>): setting
<literal>lazy=\"false\"</literal> disables the use of lazy
fetching."
+msgstr "<literal>lazy</literal>(可选,默认是
<literal>true</literal>):设置为
<literal>lazy=\"false\"</literal> 禁止使用延迟装载。 "
#. Tag: para
-#: basic_mapping.xml:2075
-#, fuzzy, no-c-format
-msgid ""
-"Each subclass declares its own persistent properties and subclasses. "
-"<literal><version></literal> and
<literal><id></literal> "
-"properties are assumed to be inherited from the root class. Each subclass in
"
-"a hierarchy must define a unique
<literal>discriminator-value</literal>. If "
-"this is not specified, the fully qualified Java class name is used."
-msgstr ""
-"每个子类都应该定义它自己的持久化属性和子类。 <literal><version></"
-"literal> 和<literal><id></literal>
属性可以从根父类继承下来。在一棵继承"
-"树上的每个子类都必须定义一个唯一的<literal>discriminator-value</literal>。如"
-"果没有指定,就会使用Java类的全限定名。"
+#, no-c-format
+msgid "Each subclass declares its own persistent properties and subclasses.
<literal><version></literal> and
<literal><id></literal> properties are assumed to be inherited
from the root class. Each subclass in a hierarchy must define a unique
<literal>discriminator-value</literal>. If this is not specified, the fully
qualified Java class name is used."
+msgstr "每个子类都应该定义它自己的持久化属性和子类。<literal><version></literal>
和 <literal><id></literal> 属性可以从根父类继承下来。在一棵继承树上的每个子类都必须定义一个唯一的
<literal>discriminator-value</literal>。如果没有指定,就会使用 Java 类的全限定名。 "
#. Tag: para
-#: basic_mapping.xml:2083 basic_mapping.xml:2141 basic_mapping.xml:2199
-#, fuzzy, no-c-format
-msgid ""
-"For information about inheritance mappings see <xref
linkend=\"inheritance\"/"
-">."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"更多关于继承映射的信息, 参考 <xref linkend=\"inheritance\"/>章节.\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"更多关于继承映射的信息,参考<xref linkend=\"inheritance\"/>。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"更多关于继承映射的信息,参考<xref linkend=\"inheritance\"/>。"
+#, no-c-format
+msgid "For information about inheritance mappings see <xref
linkend=\"inheritance\" />."
+msgstr "更多关于继承映射的信息,参考 <xref linkend=\"inheritance\"/>。 "
#. Tag: title
-#: basic_mapping.xml:2090
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Joined-subclass"
-msgstr "连接的子类(joined-subclass)"
+msgstr "连接的子类(joined-subclass) "
#. Tag: para
-#: basic_mapping.xml:2092
-#, fuzzy, 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
<literal><joined-"
-"subclass></literal> element. For example:"
-msgstr ""
-"此外,每个子类可能被映射到他自己的表中(每个子类一个表的策略)。被继承的状态通"
-"过和超类的表关联得到。我们使用<literal><joined-subclass></literal>元"
-"素。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2105
#, no-c-format
-msgid ""
-"<![CDATA[<joined-subclass\n"
-" name=\"ClassName\"\n"
-" table=\"tablename\"\n"
-" proxy=\"ProxyInterface\"\n"
-" lazy=\"true|false\"\n"
-" dynamic-update=\"true|false\"\n"
-" dynamic-insert=\"true|false\"\n"
-" schema=\"schema\"\n"
-" catalog=\"catalog\"\n"
-" extends=\"SuperclassName\"\n"
-" persister=\"ClassName\"\n"
-" subselect=\"SQL expression\"\n"
-" entity-name=\"EntityName\"\n"
-" node=\"element-name\">\n"
-"\n"
-" <key .... >\n"
-"\n"
-" <property .... />\n"
-" .....\n"
-"</joined-subclass>]]>"
-msgstr ""
+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
<literal><joined-subclass></literal> element. For
example:"
+msgstr "此外,每个子类可能被映射到他自己的表中(每个子类一个表的策略)。被继承的状态通过和超类的表关联得到。我们使用
<literal><joined-subclass></literal> 元素。 "
#. Tag: para
-#: basic_mapping.xml:2113 basic_mapping.xml:2176
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>table</literal>: the name of the subclass table."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>table</literal>: 子类的表名.\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>table</literal>: 子类的表名"
+msgstr "<literal>table</literal>:子类的表名。"
#. Tag: para
-#: basic_mapping.xml:2118 basic_mapping.xml:2181
-#, fuzzy, no-c-format
-msgid ""
-"<literal>proxy</literal> (optional): specifies a class or interface to
use "
-"for lazy initializing proxies."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>proxy(代理)</literal> (可选): 指定一个类或者接口,在延迟装载时作为代"
-"理使用。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>proxy</literal> (可选): 指定一个类或者接口,在延迟装载时作为代理使"
-"用。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>proxy</literal> (可选): 指定一个类或者接口,在延迟装载时作为代理使"
-"用。"
+#, no-c-format
+msgid "<literal>proxy</literal> (optional): specifies a class or
interface to use for lazy initializing proxies."
+msgstr "<literal>proxy</literal>(可选):指定一个类或者接口,在延迟装载时作为代理使用。 "
#. Tag: para
-#: basic_mapping.xml:2124 basic_mapping.xml:2187
-#, fuzzy, no-c-format
-msgid ""
-"<literal>lazy</literal> (optional, defaults to
<literal>true</literal>): "
-"setting <literal>lazy=\"false\"</literal> disables the use of
lazy fetching."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>lazy</literal> (可选, 默认是<literal>true</literal>):
设置为 "
-"<literal>lazy=\"false\"</literal> 禁止使用延迟抓取\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>lazy</literal> (可选, 默认是 <literal>true</literal>):
设置为 "
-"<literal>lazy=\"false\"</literal> 禁止使用延迟装载。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>lazy</literal> (可选, 默认是 <literal>true</literal>):
设置为 "
-"<literal>lazy=\"false\"</literal> 禁止使用延迟装载。"
+#, no-c-format
+msgid "<literal>lazy</literal> (optional, defaults to
<literal>true</literal>): setting
<literal>lazy=\"false\"</literal> disables the use of lazy
fetching."
+msgstr "<literal>lazy</literal>(可选,默认是
<literal>true</literal>):设置为
<literal>lazy=\"false\"</literal> 禁止使用延迟装载。 "
#. Tag: para
-#: basic_mapping.xml:2132
-#, fuzzy, 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 <literal><key></literal> element. The mapping
at the start "
-"of the chapter would then be re-written as:"
-msgstr ""
-"这种映射策略不需要指定辨别标志(discriminator)字段。但是,每一个子类都必须使用"
-"<literal><key></literal>元素指定一个表字段来持有对象的标识符。本章开始"
-"的映射可以被用如下方式重写:"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2139
#, no-c-format
-msgid ""
-"<![CDATA[<?xml version=\"1.0\"?>\n"
-"<!DOCTYPE hibernate-mapping PUBLIC\n"
-" \"-//Hibernate/Hibernate Mapping DTD//EN\"\n"
-"
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
-"\n"
-"<hibernate-mapping package=\"eg\">\n"
-"\n"
-" <class name=\"Cat\" table=\"CATS\">\n"
-" <id name=\"id\" column=\"uid\"
type=\"long\">\n"
-" <generator class=\"hilo\"/>\n"
-" </id>\n"
-" <property name=\"birthdate\"
type=\"date\"/>\n"
-" <property name=\"color\"
not-null=\"true\"/>\n"
-" <property name=\"sex\"
not-null=\"true\"/>\n"
-" <property name=\"weight\"/>\n"
-" <many-to-one name=\"mate\"/>\n"
-" <set name=\"kittens\">\n"
-" <key column=\"MOTHER\"/>\n"
-" <one-to-many class=\"Cat\"/>\n"
-" </set>\n"
-" <joined-subclass name=\"DomesticCat\"
table=\"DOMESTIC_CATS"
-"\">\n"
-" <key column=\"CAT\"/>\n"
-" <property name=\"name\"
type=\"string\"/>\n"
-" </joined-subclass>\n"
-" </class>\n"
-"\n"
-" <class name=\"eg.Dog\">\n"
-" <!-- mapping for Dog could go here -->\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+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
<literal><key></literal> element. The mapping at the start of
the chapter would then be re-written as:"
+msgstr "这种映射策略不需要指定辨别标志(discriminator)字段。但是,每一个子类都必须使用
<literal><key></literal> 元素指定一个表字段来持有对象的标识符。本章开始的映射可以被用如下方式重写:
"
#. Tag: title
-#: basic_mapping.xml:2148
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Union-subclass"
-msgstr "联合子类(union-subclass)"
+msgstr "联合子类(union-subclass) "
#. Tag: para
-#: basic_mapping.xml:2150
-#, fuzzy, 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
<literal><"
-"class></literal> declaration. However, if you wish use polymorphic
"
-"associations (e.g. an association to the superclass of your hierarchy), you "
-"need to use the <literal><union-subclass></literal>
mapping. For "
-"example:"
-msgstr ""
-"第三种选择是仅仅映射类继承树中具体类部分到表中(每个具体类一张表的策略)。其"
-"中,每张表定义了类的所有持久化状态,包括继承的状态。在 Hibernate 中,并不需要"
-"完全显式地映射这样的继承树。你可以简单地使用单独的<literal><class></"
-"literal>定义映射每个类。然而,如果你想使用多态关联(例如,一个对类继承树中超类"
-"的关联),你需要使用<literal><union-subclass></literal>映射。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2168
#, no-c-format
-msgid ""
-"<![CDATA[<union-subclass\n"
-" name=\"ClassName\"\n"
-" table=\"tablename\"\n"
-" proxy=\"ProxyInterface\"\n"
-" lazy=\"true|false\"\n"
-" dynamic-update=\"true|false\"\n"
-" dynamic-insert=\"true|false\"\n"
-" schema=\"schema\"\n"
-" catalog=\"catalog\"\n"
-" extends=\"SuperclassName\"\n"
-" abstract=\"true|false\"\n"
-" persister=\"ClassName\"\n"
-" subselect=\"SQL expression\"\n"
-" entity-name=\"EntityName\"\n"
-" node=\"element-name\">\n"
-"\n"
-" <property .... />\n"
-" .....\n"
-"</union-subclass>]]>"
-msgstr ""
+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 <literal><class></literal> declaration. However,
if you wish use polymorphic associations (e.g. an association to the superclass of your
hierarchy), you need to use the
<literal><union-subclass></literal> mapping. For example:"
+msgstr "第三种选择是仅仅映射类继承树中具体类部分到表中(每个具体类一张表的策略)。其中,每张表定义了类的所有持久化状态,包括继承的状态。在 Hibernate
中,并不需要完全显式地映射这样的继承树。你可以简单地使用单独的 <literal><class></literal>
定义映射每个类。然而,如果你想使用多态关联(例如,一个对类继承树中超类的关联),你需要使用
<literal><union-subclass></literal> 映射。 "
#. Tag: para
-#: basic_mapping.xml:2195
#, no-c-format
-msgid ""
-"No discriminator column or key column is required for this mapping strategy."
-msgstr "这种映射策略不需要指定辨别标志(discriminator)字段。"
+msgid "No discriminator column or key column is required for this mapping
strategy."
+msgstr "这种映射策略不需要指定辨别标志(discriminator)字段。"
#. Tag: title
-#: basic_mapping.xml:2206
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Join"
-msgstr "连接(join)"
+msgstr "连接(join) "
#. Tag: para
-#: basic_mapping.xml:2208
-#, fuzzy, no-c-format
-msgid ""
-"Using the <literal><join></literal> element, it is
possible to map "
-"properties of one class to several tables that have a one-to-one "
-"relationship. For example:"
-msgstr ""
-"使用 <literal><join></literal> 元素,假若在表之间存在一对一关联,可以将"
-"一个类的属性映射到多张表中。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2222
#, no-c-format
-msgid ""
-"<![CDATA[<join\n"
-" table=\"tablename\"\n"
-" schema=\"owner\"\n"
-" catalog=\"catalog\"\n"
-" fetch=\"join|select\"\n"
-" inverse=\"true|false\"\n"
-" optional=\"true|false\">\n"
-"\n"
-" <key ... />\n"
-"\n"
-" <property ... />\n"
-" ...\n"
-"</join>]]>"
-msgstr ""
+msgid "Using the <literal><join></literal> element, it is
possible to map properties of one class to several tables that have a one-to-one
relationship. For example:"
+msgstr "使用 <literal><join></literal>
元素,假若在表之间存在一对一关联,可以将一个类的属性映射到多张表中。 "
#. Tag: para
-#: basic_mapping.xml:2226
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>table</literal>: the name of the joined table."
-msgstr "<literal>table</literal>: 被连接表的名称。"
+msgstr "<literal>table</literal>:被连接表的名称。 "
#. Tag: para
-#: basic_mapping.xml:2243
-#, fuzzy, no-c-format
-msgid ""
-"<literal>fetch</literal> (optional - defaults to
<literal>join</literal>): "
-"if set to <literal>join</literal>, the default, Hibernate will use an
inner "
-"join to retrieve a <literal><join></literal> defined by a
class or its "
-"superclasses. It will use an outer join for a
<literal><join></"
-"literal> defined by a subclass. If set to <literal>select</literal>
then "
-"Hibernate will use a sequential select for a
<literal><join></literal> "
-"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 "
-"<literal><join></literal> defined by the class and its
superclasses."
-msgstr ""
-"<literal>fetch</literal> (可选 - 默认是
<literal>join</literal>): 如果设置为"
-"默认值<literal>join</literal>, Hibernate 将使用一个内连接来得到这个类或其超"
-"类定义的<literal><join></literal>,而使用一个外连接来得到其子类定义的"
-"<literal><join></literal>。如果设置为<literal>select</literal>,则
"
-"Hibernate 将为子类定义的
<literal><join></literal>使用顺序选择。这仅在"
-"一行数据表示一个子类的对象的时候才会发生。对这个类和其超类定义的<literal><"
-"join></literal>,依然会使用内连接得到。"
+#, no-c-format
+msgid "<literal>fetch</literal> (optional - defaults to
<literal>join</literal>): if set to <literal>join</literal>, the
default, Hibernate will use an inner join to retrieve a
<literal><join></literal> defined by a class or its
superclasses. It will use an outer join for a
<literal><join></literal> defined by a subclass. If set to
<literal>select</literal> then Hibernate will use a sequential select for a
<literal><join></literal> 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 <literal><join></literal> defined by the
class and its superclasses."
+msgstr "<literal>fetch</literal>(可选 — 默认是
<literal>join</literal>):如果设置为默认值
<literal>join</literal>,Hibernate 将使用一个内连接来得到这个类或其超类定义的
<literal><join></literal>,而使用一个外连接来得到其子类定义的
<literal><join></literal>。如果设置为
<literal>select</literal>,则 Hibernate 将为子类定义的
<literal><join></literal>
使用顺序选择。这仅在一行数据表示一个子类的对象的时候才会发生。对这个类和其超类定义的
<literal><join></literal>,依然会使用内连接得到。 "
#. Tag: para
-#: basic_mapping.xml:2256
-#, fuzzy, no-c-format
-msgid ""
-"<literal>inverse</literal> (optional - defaults to
<literal>false</"
-"literal>): if enabled, Hibernate will not insert or update the properties
"
-"defined by this join."
-msgstr ""
-"<literal>inverse</literal> (可选 - 默认是
<literal>false</literal>): 如果打"
-"开,Hibernate 不会插入或者更新此连接定义的属性。"
+#, no-c-format
+msgid "<literal>inverse</literal> (optional - defaults to
<literal>false</literal>): if enabled, Hibernate will not insert or update the
properties defined by this join."
+msgstr "<literal>inverse</literal>(可选 — 默认是
<literal>false</literal>):如果打开,Hibernate 不会插入或者更新此连接定义的属性。 "
#. Tag: para
-#: basic_mapping.xml:2263
-#, fuzzy, no-c-format
-msgid ""
-"<literal>optional</literal> (optional - defaults to
<literal>false</"
-"literal>): if enabled, Hibernate will insert a row only if the properties
"
-"defined by this join are non-null. It will always use an outer join to "
-"retrieve the properties."
-msgstr ""
-"<literal>optional</literal> (可选 - 默认是
<literal>false</literal>): 如果打"
-"开,Hibernate 只会在此连接定义的属性非空时插入一行数据,并且总是使用一个外连"
-"接来得到这些属性。"
+#, no-c-format
+msgid "<literal>optional</literal> (optional - defaults to
<literal>false</literal>): if enabled, Hibernate will insert a row only if the
properties defined by this join are non-null. It will always use an outer join to retrieve
the properties."
+msgstr "<literal>optional</literal>(可选 — 默认是
<literal>false</literal>):如果打开,Hibernate
只会在此连接定义的属性非空时插入一行数据,并且总是使用一个外连接来得到这些属性。 "
#. Tag: para
-#: basic_mapping.xml:2272
-#, fuzzy, 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)信息可以被映射到单独的表中(并保留所有属性"
-"的值类型语义):"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2277
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\"\n"
-" table=\"PERSON\">\n"
-"\n"
-" <id name=\"id\"
column=\"PERSON_ID\">...</id>\n"
-"\n"
-" <join table=\"ADDRESS\">\n"
-" <key column=\"ADDRESS_ID\"/>\n"
-" <property name=\"address\"/>\n"
-" <property name=\"zip\"/>\n"
-" <property name=\"country\"/>\n"
-" </join>\n"
-" ...]]>"
-msgstr ""
+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
-#: basic_mapping.xml:2279
-#, fuzzy, 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 ""
-"此特性常常对遗留数据模型有用,我们推荐表个数比类个数少,以及细粒度的领域模"
-"型。然而,在单独的继承树上切换继承映射策略是有用的,后面会解释这点。"
+#, 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 "此特性常常对遗留数据模型有用,我们推荐表个数比类个数少,以及细粒度的领域模型。然而,在单独的继承树上切换继承映射策略是有用的,后面会解释这点。
"
#. Tag: title
-#: basic_mapping.xml:2289
#, no-c-format
-msgid "<title>Key</title>"
-msgstr ""
+msgid "Key"
+msgstr "Key"
#. Tag: para
-#: basic_mapping.xml:2291
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><key></literal> 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 ""
-"我们目前已经见到过<literal><key></literal>元素多次了。 这个元素在父映射"
-"元素定义了对新表的连接,并且在被连接表中定义了一个外键引用原表的主键的情况下"
-"经常使用。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2307
#, no-c-format
-msgid ""
-"<![CDATA[<key\n"
-" column=\"columnname\"\n"
-" on-delete=\"noaction|cascade\"\n"
-" property-ref=\"propertyName\"\n"
-" not-null=\"true|false\"\n"
-" update=\"true|false\"\n"
-" unique=\"true|false\"\n"
-"/>]]>"
-msgstr ""
+msgid "The <literal><key></literal> 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 "我们目前已经见到过 <literal><key></literal>
元素多次了。这个元素在父映射元素定义了对新表的连接,并且在被连接表中定义了一个外键引用原表的主键的情况下经常使用。 "
#. Tag: para
-#: basic_mapping.xml:2318
-#, fuzzy, no-c-format
-msgid ""
-"<literal>on-delete</literal> (optional - defaults to
<literal>noaction</"
-"literal>): specifies whether the foreign key constraint has database-level
"
-"cascade delete enabled."
-msgstr ""
-"<literal>on-delete</literal> (可选, 默认是
<literal>noaction</literal>): 表明"
-"外键关联是否打开数据库级别的级联删除。"
+#, no-c-format
+msgid "<literal>on-delete</literal> (optional - defaults to
<literal>noaction</literal>): specifies whether the foreign key constraint has
database-level cascade delete enabled."
+msgstr "<literal>on-delete</literal>(可选,默认是
<literal>noaction</literal>):表明外键关联是否打开数据库级别的级联删除。 "
#. Tag: para
-#: basic_mapping.xml:2325
-#, fuzzy, no-c-format
-msgid ""
-"<literal>property-ref</literal> (optional): specifies that the foreign
key "
-"refers to columns that are not the primary key of the original table. It is "
-"provided for legacy data."
-msgstr ""
-"<literal>property-ref</literal> (可选): 表明外键引用的字段不是原表的主键(提供"
-"给遗留数据)。"
+#, no-c-format
+msgid "<literal>property-ref</literal> (optional): specifies that the
foreign key refers to columns that are not the primary key of the original table. It is
provided for legacy data."
+msgstr "<literal>property-ref</literal>(可选):表明外键引用的字段不是原表的主键(提供给遗留数据)。
"
#. Tag: para
-#: basic_mapping.xml:2332
-#, fuzzy, no-c-format
-msgid ""
-"<literal>not-null</literal> (optional): specifies that the foreign key
"
-"columns are not nullable. This is implied whenever the foreign key is also "
-"part of the primary key."
-msgstr ""
-"<literal>not-null</literal> (可选): 表明外键的字段不可为空(这意味着无论何时外"
-"键都是主键的一部分)。"
+#, no-c-format
+msgid "<literal>not-null</literal> (optional): specifies that the
foreign key columns are not nullable. This is implied whenever the foreign key is also
part of the primary key."
+msgstr "<literal>not-null</literal>(可选):表明外键的字段不可为空(这意味着无论何时外键都是主键的一部分)。
"
#. Tag: para
-#: basic_mapping.xml:2339
-#, fuzzy, no-c-format
-msgid ""
-"<literal>update</literal> (optional): specifies that the foreign key
should "
-"never be updated. This is implied whenever the foreign key is also part of "
-"the primary key."
-msgstr ""
-"<literal>update</literal> (可选): 表明外键决不应该被更新(这意味着无论何时外键"
-"都是主键的一部分)。"
+#, no-c-format
+msgid "<literal>update</literal> (optional): specifies that the foreign
key should never be updated. This is implied whenever the foreign key is also part of the
primary key."
+msgstr "<literal>update</literal>(可选):表明外键决不应该被更新(这意味着无论何时外键都是主键的一部分)。
"
#. Tag: para
-#: basic_mapping.xml:2346
-#, fuzzy, no-c-format
-msgid ""
-"<literal>unique</literal> (optional): specifies that the foreign key
should "
-"have a unique constraint. This is implied whenever the foreign key is also "
-"the primary key."
-msgstr ""
-"<literal>unique</literal> (可选): 表明外键应有唯一性约束 (这意味着无论何时外"
-"键都是主键的一部分)。"
+#, no-c-format
+msgid "<literal>unique</literal> (optional): specifies that the foreign
key should have a unique constraint. This is implied whenever the foreign key is also the
primary key."
+msgstr "<literal>unique</literal>(可选):表明外键应有唯一性约束(这意味着无论何时外键都是主键的一部分)。
"
#. Tag: para
-#: basic_mapping.xml:2354
-#, fuzzy, no-c-format
-msgid ""
-"For systems where delete performance is important, we recommend that all "
-"keys should be defined
<literal>on-delete=\"cascade\"</literal>. Hibernate "
-"uses a database-level <literal>ON CASCADE DELETE</literal> constraint,
"
-"instead of many individual <literal>DELETE</literal> statements. Be
aware "
-"that this feature bypasses Hibernate's usual optimistic locking strategy for
"
-"versioned data."
-msgstr ""
-"对那些看重删除性能的系统,我们推荐所有的键都应该定义为<literal>on-delete="
-"\"cascade\"</literal>,这样 Hibernate 将使用数据库级的<literal>ON
CASCADE "
-"DELETE</literal>约束,而不是多个<literal>DELETE</literal>语句。
注意,这个特"
-"性会绕过 Hibernate 通常对版本数据(versioned data)采用的乐观锁策略。"
+#, no-c-format
+msgid "For systems where delete performance is important, we recommend that all keys
should be defined <literal>on-delete=\"cascade\"</literal>.
Hibernate uses a database-level <literal>ON CASCADE DELETE</literal>
constraint, instead of many individual <literal>DELETE</literal> statements.
Be aware that this feature bypasses Hibernate's usual optimistic locking strategy for
versioned data."
+msgstr "对那些看重删除性能的系统,我们推荐所有的键都应该定义为
<literal>on-delete=\"cascade\"</literal>,这样 Hibernate 将使用数据库级的
<literal>ON CASCADE DELETE</literal> 约束,而不是多个
<literal>DELETE</literal> 语句。注意,这个特性会绕过 Hibernate 通常对版本数据(versioned
data)采用的乐观锁策略。 "
#. Tag: para
-#: basic_mapping.xml:2362
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>not-null</literal> and
<literal>update</literal> attributes are "
-"useful when mapping a unidirectional one-to-many association. If you map a "
-"unidirectional one-to-many association to a non-nullable foreign key, you "
-"<emphasis>must</emphasis> declare the key column using
<literal><key not-"
-"null=\"true\"></literal>."
-msgstr ""
-"<literal>not-null</literal> 和 <literal>update</literal>
属性在映射单向一对多"
-"关联的时候有用。如果你映射一个单向一对多关联到非空的(non-nullable)外键,你"
-"<emphasis>必须</emphasis> 用<literal><key
not-null=\"true\"></literal>"
-"定义此键字段。"
+#, no-c-format
+msgid "The <literal>not-null</literal> and
<literal>update</literal> attributes are useful when mapping a unidirectional
one-to-many association. If you map a unidirectional one-to-many association to a
non-nullable foreign key, you <emphasis>must</emphasis> declare the key column
using <literal><key
not-null=\"true\"></literal>."
+msgstr "<literal>not-null</literal> 和
<literal>update</literal>
属性在映射单向一对多关联的时候有用。如果你映射一个单向一对多关联到非空的(non-nullable)外键,你<emphasis>必须</emphasis>
用 <literal><key not-null=\"true\"></literal> 定义此键字段。
"
#. Tag: title
-#: basic_mapping.xml:2372
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Column and formula elements"
-msgstr "字段和规则元素(column and formula elements)"
+msgstr "字段和规则元素(column and formula elements) "
#. Tag: para
-#: basic_mapping.xml:2373
-#, fuzzy, no-c-format
-msgid ""
-"Mapping elements which accept a <literal>column</literal> attribute
will "
-"alternatively accept a <literal><column></literal>
subelement. "
-"Likewise, <literal><formula></literal> is an alternative
to the "
-"<literal>formula</literal> attribute. For example:"
-msgstr ""
-"任何接受<literal>column</literal>属性的映射元素都可以选择接受<literal><"
-"column></literal>
子元素。同样的,<literal>formula</literal>子元素也可以替"
-"换<literal><formula></literal>属性。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2379
#, no-c-format
-msgid ""
-"<![CDATA[<column\n"
-" name=\"column_name\"\n"
-" length=\"N\"\n"
-" precision=\"N\"\n"
-" scale=\"N\"\n"
-" not-null=\"true|false\"\n"
-" unique=\"true|false\"\n"
-" unique-key=\"multicolumn_unique_key_name\"\n"
-" index=\"index_name\"\n"
-" sql-type=\"sql_type_name\"\n"
-" check=\"SQL expression\"\n"
-" default=\"SQL expression\"/>]]>"
-msgstr ""
+msgid "Mapping elements which accept a <literal>column</literal>
attribute will alternatively accept a
<literal><column></literal> subelement. Likewise,
<literal><formula></literal> is an alternative to the
<literal>formula</literal> attribute. For example:"
+msgstr "任何接受 <literal>column</literal> 属性的映射元素都可以选择接受
<literal><column></literal>
子元素。同样的,<literal>formula</literal> 子元素也可以替换
<literal><formula></literal> 属性。 "
-#. Tag: programlisting
-#: basic_mapping.xml:2381
-#, no-c-format
-msgid "<![CDATA[<formula>SQL expression</formula>]]>"
-msgstr ""
-
#. Tag: para
-#: basic_mapping.xml:2383
-#, fuzzy, no-c-format
-msgid ""
-"<literal>column</literal> and <literal>formula</literal>
attributes can even "
-"be combined within the same property or association mapping to express, for "
-"example, exotic join conditions."
-msgstr ""
-"<literal>column</literal> 和 <literal>formula</literal>
属性甚至可以在同一个"
-"属性或关联映射中被合并来表达,例如,一些奇异的连接条件。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2389
#, no-c-format
-msgid ""
-"<![CDATA[<many-to-one name=\"homeAddress\"
class=\"Address\"\n"
-" insert=\"false\" update=\"false\">\n"
-" <column name=\"person_id\" not-null=\"true\"
length=\"10\"/>\n"
-" <formula>'MAILING'</formula>\n"
-"</many-to-one>]]>"
-msgstr ""
+msgid "<literal>column</literal> and
<literal>formula</literal> attributes can even be combined within the same
property or association mapping to express, for example, exotic join conditions."
+msgstr "<literal>column</literal> 和
<literal>formula</literal> 属性甚至可以在同一个属性或关联映射中被合并来表达,例如,一些奇异的连接条件。 "
#. Tag: title
-#: basic_mapping.xml:2394
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Import"
-msgstr "引用(import)"
+msgstr "引用(import) "
#. Tag: para
-#: basic_mapping.xml:2396
-#, fuzzy, 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
"
-"<literal>auto-import=\"true\"</literal>. You can also import
classes and "
-"interfaces that are not explicitly mapped:"
-msgstr ""
-"假设你的应用程序有两个同样名字的持久化类,但是你不想在Hibernate查询中使用他们"
-"的全限定名。除了依赖<literal>auto-import=\"true\"</literal>以外,类也可以被显"
-"式地“import(引用)”。你甚至可以引用没有被明确映射的类和接口。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2403
#, no-c-format
-msgid "<![CDATA[<import class=\"java.lang.Object\"
rename=\"Universe\"/>]]>"
-msgstr ""
+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
<literal>auto-import=\"true\"</literal>. You can also import classes
and interfaces that are not explicitly mapped:"
+msgstr "假设你的应用程序有两个同样名字的持久化类,但是你不想在 Hibernate 查询中使用他们的全限定名。除了依赖
<literal>auto-import=\"true\"</literal>
以外,类也可以被显式地“import(引用)”。你甚至可以引用没有被明确映射的类和接口。 "
-#. Tag: programlisting
-#: basic_mapping.xml:2410
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<import\n"
-" class=\"ClassName\"\n"
-" rename=\"ShortName\"\n"
-"/>]]>"
-msgstr ""
+msgid "<literal>class</literal>: the fully qualified class name of any
Java class."
+msgstr "<literal>class</literal>:任何 Java 类的全限定名。 "
#. Tag: para
-#: basic_mapping.xml:2413
-#, fuzzy, no-c-format
-msgid ""
-"<literal>class</literal>: the fully qualified class name of any Java
class."
-msgstr "<literal>class</literal>: 任何Java类的全限定名。"
+#, no-c-format
+msgid "<literal>rename</literal> (optional - defaults to the unqualified
class name): a name that can be used in the query language."
+msgstr "<literal>rename</literal>(可选 — 默认为类的全限定名):在查询语句中可以使用的名字。 "
-#. Tag: para
-#: basic_mapping.xml:2418
-#, fuzzy, no-c-format
-msgid ""
-"<literal>rename</literal> (optional - defaults to the unqualified class
"
-"name): a name that can be used in the query language."
-msgstr ""
-"<literal>rename</literal> (可选 - 默认为类的全限定名): 在查询语句中可以使用的"
-"名字。"
-
#. Tag: title
-#: basic_mapping.xml:2429
#, no-c-format
-msgid "<title>Any</title>"
-msgstr ""
+msgid "Any"
+msgstr "Any"
#. Tag: para
-#: basic_mapping.xml:2431
-#, fuzzy, no-c-format
-msgid ""
-"There is one more type of property mapping. The
<literal><any></"
-"literal> 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 ""
-"这是属性映射的又一种类型。<literal><any></literal> 映射元素定义了一种从"
-"多个表到类的多态关联。这种类型的映射常常需要多于一个字段。第一个字段持有被关"
-"联实体的类型,其他的字段持有标识符。对这种类型的关联来说,不可能指定一个外键"
-"约束,所以这当然不是映射(多态)关联的通常的方式。你只应该在非常特殊的情况下使"
-"用它(比如,审计log,用户会话数据等等)。"
+#, no-c-format
+msgid "There is one more type of property mapping. The
<literal><any></literal> 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 "这是属性映射的又一种类型。<literal><any></literal>
映射元素定义了一种从多个表到类的多态关联。这种类型的映射常常需要多于一个字段。第一个字段持有被关联实体的类型,其他的字段持有标识符。对这种类型的关联来说,不可能指定一个外键约束,所以这当然不是映射(多态)关联的通常的方式。你只应该在非常特殊的情况下使用它(比如,审计
log,用户会话数据等等)。 "
#. Tag: para
-#: basic_mapping.xml:2441
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>meta-type</literal> 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
<literal>id-type</"
-"literal>. You must specify the mapping from values of the meta-type to class
"
-"names."
-msgstr ""
-"<literal>meta-type</literal> 属性使得应用程序能指定一个将数据库字段的值映射到"
-"持久化类的自定义类型。这个持久化类包含有用<literal>id-type</literal>指定的标"
-"识符属性。 你必须指定从meta-type的值到类名的映射。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2448
#, no-c-format
-msgid ""
-"<![CDATA[<any name=\"being\" id-type=\"long\"
meta-type=\"string\">\n"
-" <meta-value value=\"TBL_ANIMAL\"
class=\"Animal\"/>\n"
-" <meta-value value=\"TBL_HUMAN\"
class=\"Human\"/>\n"
-" <meta-value value=\"TBL_ALIEN\"
class=\"Alien\"/>\n"
-" <column name=\"table_name\"/>\n"
-" <column name=\"id\"/>\n"
-"</any>]]>"
-msgstr ""
+msgid "The <literal>meta-type</literal> 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 <literal>id-type</literal>. You
must specify the mapping from values of the meta-type to class names."
+msgstr "<literal>meta-type</literal>
属性使得应用程序能指定一个将数据库字段的值映射到持久化类的自定义类型。这个持久化类包含有用 <literal>id-type</literal>
指定的标识符属性。你必须指定从 meta-type 的值到类名的映射。 "
-#. Tag: programlisting
-#: basic_mapping.xml:2459
-#, no-c-format
-msgid ""
-"<![CDATA[<any\n"
-" name=\"propertyName\"\n"
-" id-type=\"idtypename\"\n"
-" meta-type=\"metatypename\"\n"
-" cascade=\"cascade_style\"\n"
-" access=\"field|property|ClassName\"\n"
-" optimistic-lock=\"true|false\"\n"
-">\n"
-" <meta-value ... />\n"
-" <meta-value ... />\n"
-" .....\n"
-" <column .... />\n"
-" <column .... />\n"
-" .....\n"
-"</any>]]>"
-msgstr ""
-
#. Tag: para
-#: basic_mapping.xml:2462
#, no-c-format
msgid "<literal>name</literal>: the property name."
-msgstr "<literal>name</literal>: 属性名"
+msgstr "<literal>name</literal>:属性名"
#. Tag: para
-#: basic_mapping.xml:2467
#, no-c-format
msgid "<literal>id-type</literal>: the identifier type."
-msgstr "<literal>id-type</literal>: 标识符类型"
+msgstr "<literal>id-type</literal>:标识符类型"
#. Tag: para
-#: basic_mapping.xml:2472
-#, fuzzy, no-c-format
-msgid ""
-"<literal>meta-type</literal> (optional - defaults to
<literal>string</"
-"literal>): any type that is allowed for a discriminator mapping."
-msgstr ""
-"<literal>meta-type</literal> (可选 -默认是
<literal>string</literal>): 允许辨"
-"别标志(discriminator)映射的任何类型"
+#, no-c-format
+msgid "<literal>meta-type</literal> (optional - defaults to
<literal>string</literal>): any type that is allowed for a discriminator
mapping."
+msgstr "<literal>meta-type</literal>(可选 -默认是
<literal>string</literal>):允许辨别标志(discriminator)映射的任何类型。 "
#. Tag: para
-#: basic_mapping.xml:2478
#, no-c-format
-msgid ""
-"<literal>cascade</literal> (optional- defaults to
<literal>none</literal>): "
-"the cascade style."
-msgstr ""
-"<literal>cascade</literal> (可选
-默认是<literal>none</literal>): 级联的类型"
+msgid "<literal>cascade</literal> (optional- defaults to
<literal>none</literal>): the cascade style."
+msgstr "<literal>cascade</literal>(可选 —
默认是<literal>none</literal>):级联的类型。"
#. Tag: para
-#: basic_mapping.xml:2490
-#, fuzzy, no-c-format
-msgid ""
-"<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</"
-"literal>): 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 ""
-"<literal>optimistic-lock</literal> (可选 -默认是
<literal>true</literal>): 表"
-"明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号"
-"(Version)"
+#, no-c-format
+msgid "<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</literal>): 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 "<literal>optimistic-lock</literal>(可选 — 默认是
<literal>true</literal>):表明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号(Version)。"
#. Tag: title
-#: basic_mapping.xml:2505
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Hibernate types"
-msgstr "Hibernate 的类型"
+msgstr "Hibernate 的类型 "
#. Tag: title
-#: basic_mapping.xml:2508
#, no-c-format
msgid "Entities and values"
-msgstr "实体(Entities)和值(values)"
+msgstr "实体(Entities)和值(values)"
#. Tag: para
-#: basic_mapping.xml:2510
#, no-c-format
-msgid ""
-"In relation to the persistence service, Java language-level objects are "
-"classified into two groups:"
-msgstr ""
+msgid "In relation to the persistence service, Java language-level objects are
classified into two groups:"
+msgstr "和持久化服务相比,Java 级别的对象分为两个组别:"
#. Tag: para
-#: basic_mapping.xml:2515
-#, fuzzy, no-c-format
-msgid ""
-"An <emphasis>entity</emphasis> exists independently of any other
objects "
-"holding references to the entity. Contrast this with the usual Java model, "
-"where an unreferenced object is garbage collected. Entities must be "
-"explicitly saved and deleted. Saves and deletions, however, can be "
-"<emphasis>cascaded</emphasis> 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 ""
-"<emphasis>实体entity</emphasis> 独立于任何持有实体引用的对象。与通常的Java模"
-"型相比,不再被引用的对象会被当作垃圾收集掉。实体必须被显式的保存和删除(除非保"
-"存和删除是从父实体向子实体引发的<emphasis>级联</emphasis>)。这和ODMG模型中关"
-"于对象通过可触及保持持久性有一些不同——比较起来更加接近应用程序对象通常在一个"
-"大系统中的使用方法。实体支持循环引用和交叉引用,它们也可以加上版本信息。"
+#, no-c-format
+msgid "An <emphasis>entity</emphasis> exists independently of any other
objects holding references to the entity. Contrast this with the usual Java model, where
an unreferenced object is garbage collected. Entities must be explicitly saved and
deleted. Saves and deletions, however, can be <emphasis>cascaded</emphasis>
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 "<emphasis>实体entity</emphasis> 独立于任何持有实体引用的对象。与通常的 Java
模型相比,不再被引用的对象会被当作垃圾收集掉。实体必须被显式的保存和删除(除非保存和删除是从父实体向子实体引发的<emphasis>级联</emphasis>)。这和
ODMG 模型中关于对象通过可触及保持持久性有一些不同 — 比较起来更加接近应用程序对象通常在一个大系统中的使用方法。实体支持循环引用和交叉引用,它们也可以加上版本信息。
"
#. Tag: para
-#: basic_mapping.xml:2526
-#, fuzzy, no-c-format
-msgid ""
-"An entity's persistent state consists of references to other entities and
"
-"instances of <emphasis>value</emphasis> types. Values are primitives:
"
-"collections (not what is inside a collection), components and certain "
-"immutable objects. Unlike entities, values in particular collections and "
-"components, <emphasis>are</emphasis> persisted and deleted by
reachability. "
-"Since value objects and primitives are persisted and deleted along with "
-"their containing entity, they cannot be independently versioned. Values have
"
-"no independent identity, so they cannot be shared by two entities or "
-"collections."
-msgstr ""
-"一个实体的持久状态包含指向其他实体和<emphasis>值</emphasis>类型实例的引用。值"
-"可以是原始类型,集合(不是集合中的对象),组件或者特定的不可变对象。与实体不"
-"同,值(特别是集合和组件)是通过可触及性来进行持久化和删除的。因为值对象(和原始"
-"类型数据)是随着包含他们的实体而被持久化和删除的,他们不能被独立的加上版本信"
-"息。值没有独立的标识,所以他们不能被两个实体或者集合共享。"
+#, no-c-format
+msgid "An entity's persistent state consists of references to other entities and
instances of <emphasis>value</emphasis> types. Values are primitives:
collections (not what is inside a collection), components and certain immutable objects.
Unlike entities, values in particular collections and components,
<emphasis>are</emphasis> persisted and deleted by reachability. Since value
objects and primitives are persisted and deleted along with their containing entity, they
cannot be independently versioned. Values have no independent identity, so they cannot be
shared by two entities or collections."
+msgstr
"一个实体的持久状态包含指向其他实体和<emphasis>值</emphasis>类型实例的引用。值可以是原始类型,集合(不是集合中的对象),组件或者特定的不可变对象。与实体不同,值(特别是集合和组件)是通过可触及性来进行持久化和删除的。因为值对象(和原始类型数据)是随着包含他们的实体而被持久化和删除的,他们不能被独立的加上版本信息。值没有独立的标识,所以他们不能被两个实体或者集合共享。
"
#. Tag: para
-#: basic_mapping.xml:2537
-#, fuzzy, 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
<emphasis>component</emphasis> is "
-"a user-defined class with value semantics. A Java property of type "
-"<literal>java.lang.String</literal> also has value semantics. Given
this "
-"definition, 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)来代表实体。我们仍然会"
-"这么做。 然而严格说来,不是所有的用户自定义的,带有持久化状态的类都是实体。"
-"<emphasis>组件</emphasis>就是用户自定义类,却是值语义的。<literal>java.lang."
-"String</literal>类型的java属性也是值语义的。给了这个定义以后,我们可以说所有"
-"JDK提供的类型(类)都是值类型的语义,而用于自定义类型可能被映射为实体类型或值类"
-"型语义。采用哪种类型的语义取决于开发人员。在领域模型中,寻找实体类的一个好线"
-"索是共享引用指向这个类的单一实例,而组合或聚合通常被转化为值类型。"
+#, 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 <emphasis>component</emphasis> is a
user-defined class with value semantics. A Java property of type
<literal>java.lang.String</literal> also has value semantics. Given this
definition, 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)来代表实体。我们仍然会这么做。然而严格说来,不是所有的用户自定义的,带有持久化状态的类都是实体。<emphasis>组件</emphasis>就是用户自定义类,却是值语义的。<literal>java.lang.String</literal>
类型的 java 属性也是值语义的。给了这个定义以后,我们可以说所有 JDK
提供的类型(类)都是值类型的语义,而用于自定义类型可能被映射为实体类型或值类型语义。采用哪种类型的语义取决于开发人员。在领域模型中,寻找实体类的一个好线索是共享引用指向这个类的单一实例,而组合或聚合通常被转化为值类型。
"
#. Tag: para
-#: basic_mapping.xml:2551
-#, fuzzy, no-c-format
+#, no-c-format
msgid "We will revisit both concepts throughout this reference guide."
-msgstr "我们会在本文档中重复碰到这两个概念。"
+msgstr "我们会在本文档中重复碰到这两个概念。 "
#. Tag: para
-#: basic_mapping.xml:2555
-#, fuzzy, 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,
<literal><"
-"class></literal>,
<literal><subclass></literal> and so on are used. "
-"For value types we use <literal><property></literal>,
<literal><"
-"component></literal>etc., that usually have a
<literal>type</literal> "
-"attribute. The value of this attribute is the name of a Hibernate "
-"<emphasis>mapping type</emphasis>. 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提供了连接两个系统之间的桥梁:对于实体类型,我们使用<literal><"
-"class></literal>,
<literal><subclass></literal> 等等。对于值类型,我"
-"们使用 <literal><property></literal>,
<literal><component></"
-"literal> 及其他,通常跟随着<literal>type</literal>属性。这个属性的值是"
-"Hibernate 的<emphasis>映射类型</emphasis>的名字。Hibernate提供了许多现成的映"
-"射(标准的JDK值类型)。你也可以编写自己的映射类型并实现自定义的变换策略,随后我"
-"们会看到这点。"
+#, 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,
<literal><class></literal>,
<literal><subclass></literal> and so on are used. For value
types we use <literal><property></literal>,
<literal><component></literal>etc., that usually have a
<literal>type</literal> attribute. The value of this attribute is the name of
a Hibernate <emphasis>mapping type</emphasis>. 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
提供了连接两个系统之间的桥梁:对于实体类型,我们使用
<literal><class></literal>,<literal><subclass></literal>
等等。对于值类型,我们使用
<literal><property></literal>,<literal><component></literal>
及其他,通常跟随着 <literal>type</literal> 属性。这个属性的值是Hibernate
的<emphasis>映射类型</emphasis>的名字。Hibernate 提供了许多现成的映射(标准的 JDK
值类型)。你也可以编写自己的映射类型并实现自定义的变换策略,随后我们会看到这点。 "
#. Tag: para
-#: basic_mapping.xml:2568
-#, fuzzy, no-c-format
-msgid ""
-"With the exception of collections, all built-in Hibernate types support null
"
-"semantics."
-msgstr "所有的Hibernate内建类型,除了collections以外,都支持空(null)语义。"
+#, no-c-format
+msgid "With the exception of collections, all built-in Hibernate types support null
semantics."
+msgstr "所有的 Hibernate 内建类型,除了 collections 以外,都支持空(null)语义。 "
#. Tag: title
-#: basic_mapping.xml:2575
#, no-c-format
msgid "Basic value types"
msgstr "基本值类型"
#. Tag: para
-#: basic_mapping.xml:2577
-#, fuzzy, no-c-format
-msgid ""
-"The built-in <emphasis>basic mapping types</emphasis> can be roughly
"
-"categorized into the following:"
-msgstr "内建的 <emphasis>基本映射类型</emphasis>可以大致分为
<placeholder-1/>"
+#, no-c-format
+msgid "The built-in <emphasis>basic mapping types</emphasis> can be
roughly categorized into the following:"
+msgstr "内置的 <emphasis>basic mapping types</emphasis> 可以大致地分类为:"
-#. Tag: literal
-#: basic_mapping.xml:2582
+#. 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 "<literal>integer, long, short, float, double, character, byte, boolean,
yes_no, true_false</literal>"
+msgstr "<literal>integer, long, short, float, double, character, byte,
boolean, yes_no, true_false</literal>"
#. Tag: para
-#: basic_mapping.xml:2585
#, no-c-format
-msgid ""
-"Type mappings from Java primitives or wrapper classes to appropriate
(vendor-"
-"specific) SQL column types. <literal>boolean, yes_no</literal> and
"
-"<literal>true_false</literal> are all alternative encodings for a Java
"
-"<literal>boolean</literal> or
<literal>java.lang.Boolean</literal>."
-msgstr ""
-"这些类型都对应Java的原始类型或者其封装类,来符合(特定厂商的)SQL 字段类型。"
-"<literal>boolean, yes_no</literal> 和
<literal>true_false</literal>都是Java "
-"中<literal>boolean</literal>
或者<literal>java.lang.Boolean</literal>的另外说"
-"法。"
+msgid "Type mappings from Java primitives or wrapper classes to appropriate
(vendor-specific) SQL column types. <literal>boolean, yes_no</literal> and
<literal>true_false</literal> are all alternative encodings for a Java
<literal>boolean</literal> or
<literal>java.lang.Boolean</literal>."
+msgstr "这些类型都对应 Java 的原始类型或者其封装类,来符合(特定厂商的)SQL 字段类型。<literal>boolean,
yes_no</literal> 和 <literal>true_false</literal> 都是 Java 中
<literal>boolean</literal> 或者 <literal>java.lang.Boolean</literal>
的另外说法。"
-#. Tag: literal
-#: basic_mapping.xml:2594
+#. Tag: term
#, no-c-format
-msgid "string"
-msgstr "string"
+msgid "<literal>string</literal>"
+msgstr "<literal>string</literal>"
#. Tag: para
-#: basic_mapping.xml:2596
#, no-c-format
-msgid ""
-"A type mapping from <literal>java.lang.String</literal> to
<literal>VARCHAR</"
-"literal> (or Oracle <literal>VARCHAR2</literal>)."
-msgstr ""
-"从<literal>java.lang.String</literal> 到
<literal>VARCHAR</literal> (或者 "
-"Oracle的 <literal>VARCHAR2</literal>)的映射。"
+msgid "A type mapping from <literal>java.lang.String</literal> to
<literal>VARCHAR</literal> (or Oracle
<literal>VARCHAR2</literal>)."
+msgstr "从 <literal>java.lang.String</literal> 到
<literal>VARCHAR</literal>(或者 Oracle 的
<literal>VARCHAR2</literal>)的映射。"
-#. Tag: literal
-#: basic_mapping.xml:2603
+#. Tag: term
#, no-c-format
-msgid "date, time, timestamp"
-msgstr "date, time, timestamp"
+msgid "<literal>date, time, timestamp</literal>"
+msgstr "<literal>date, time, timestamp</literal>"
#. Tag: para
-#: basic_mapping.xml:2605
#, no-c-format
-msgid ""
-"Type mappings from <literal>java.util.Date</literal> and its subclasses
to "
-"SQL types <literal>DATE</literal>, <literal>TIME</literal>
and "
-"<literal>TIMESTAMP</literal> (or equivalent)."
-msgstr ""
-"从<literal>java.util.Date</literal>和其子类到SQL类型<literal>DATE</literal>,
"
-"<literal>TIME</literal> 和<literal>TIMESTAMP</literal>
(或等价类型)的映射。"
+msgid "Type mappings from <literal>java.util.Date</literal> and its
subclasses to SQL types <literal>DATE</literal>,
<literal>TIME</literal> and <literal>TIMESTAMP</literal> (or
equivalent)."
+msgstr "从 <literal>java.util.Date</literal> 和其子类到 SQL 类型
<literal>DATE</literal>,<literal>TIME</literal> 和
<literal>TIMESTAMP</literal>(或等价类型)的映射。"
-#. Tag: literal
-#: basic_mapping.xml:2613
+#. Tag: term
#, no-c-format
-msgid "calendar, calendar_date"
-msgstr "calendar, calendar_date"
+msgid "<literal>calendar, calendar_date</literal>"
+msgstr "<literal>calendar, calendar_date</literal>"
#. Tag: para
-#: basic_mapping.xml:2615
#, no-c-format
-msgid ""
-"Type mappings from <literal>java.util.Calendar</literal> to SQL types
"
-"<literal>TIMESTAMP</literal> and <literal>DATE</literal>
(or equivalent)."
-msgstr ""
-"从<literal>java.util.Calendar</literal> 到SQL
类型<literal>TIMESTAMP</"
-"literal>和 <literal>DATE</literal>(或等价类型)的映射。"
+msgid "Type mappings from <literal>java.util.Calendar</literal> to SQL
types <literal>TIMESTAMP</literal> and <literal>DATE</literal> (or
equivalent)."
+msgstr "从 <literal>java.util.Calendar</literal> 到 SQL 类型
<literal>TIMESTAMP</literal> 和
<literal>DATE</literal>(或等价类型)的映射。"
-#. Tag: literal
-#: basic_mapping.xml:2623
+#. Tag: term
#, no-c-format
-msgid "big_decimal, big_integer"
-msgstr "big_decimal, big_integer"
+msgid "<literal>big_decimal, big_integer</literal>"
+msgstr "<literal>big_decimal, big_integer</literal>"
#. Tag: para
-#: basic_mapping.xml:2625
#, no-c-format
-msgid ""
-"Type mappings from <literal>java.math.BigDecimal</literal> and
<literal>java."
-"math.BigInteger</literal> to <literal>NUMERIC</literal> (or
Oracle "
-"<literal>NUMBER</literal>)."
-msgstr ""
-"从<literal>java.math.BigDecimal</literal>和<literal>java.math.BigInteger</"
-"literal>到<literal>NUMERIC</literal> (或者 Oracle
的<literal>NUMBER</literal>"
-"类型)的映射。"
+msgid "Type mappings from <literal>java.math.BigDecimal</literal> and
<literal>java.math.BigInteger</literal> to
<literal>NUMERIC</literal> (or Oracle
<literal>NUMBER</literal>)."
+msgstr "从 <literal>java.math.BigDecimal</literal> 和
<literal>java.math.BigInteger</literal> 到
<literal>NUMERIC</literal>(或者 Oracle 的
<literal>NUMBER</literal>类型)的映射。"
-#. Tag: literal
-#: basic_mapping.xml:2633
+#. Tag: term
#, no-c-format
-msgid "locale, timezone, currency"
-msgstr "locale, timezone, currency"
+msgid "<literal>locale, timezone, currency</literal>"
+msgstr "<literal>locale, timezone, currency</literal>"
#. Tag: para
-#: basic_mapping.xml:2635
#, no-c-format
-msgid ""
-"Type mappings from <literal>java.util.Locale</literal>,
<literal>java.util."
-"TimeZone</literal> and <literal>java.util.Currency</literal> to
"
-"<literal>VARCHAR</literal> (or Oracle
<literal>VARCHAR2</literal>). "
-"Instances of <literal>Locale</literal> and
<literal>Currency</literal> are "
-"mapped to their ISO codes. Instances of <literal>TimeZone</literal> are
"
-"mapped to their <literal>ID</literal>."
-msgstr ""
-"从<literal>java.util.Locale</literal>,
<literal>java.util.TimeZone</literal> "
-"和<literal>java.util.Currency</literal>
到<literal>VARCHAR</literal> (或者 "
-"Oracle 的<literal>VARCHAR2</literal>类型)的映射.
<literal>Locale</literal>和 "
-"<literal>Currency</literal>
的实例被映射为它们的ISO代码。<literal>TimeZone</"
-"literal>的实例被影射为它的<literal>ID</literal>。"
+msgid "Type mappings from <literal>java.util.Locale</literal>,
<literal>java.util.TimeZone</literal> and
<literal>java.util.Currency</literal> to
<literal>VARCHAR</literal> (or Oracle
<literal>VARCHAR2</literal>). Instances of
<literal>Locale</literal> and <literal>Currency</literal> are
mapped to their ISO codes. Instances of <literal>TimeZone</literal> are mapped
to their <literal>ID</literal>."
+msgstr "从
<literal>java.util.Locale</literal>,<literal>java.util.TimeZone</literal>
和 <literal>java.util.Currency</literal> 到
<literal>VARCHAR</literal>(或者 Oracle 的 <literal>VARCHAR2</literal>
类型)的映射。<literal>Locale</literal> 和 <literal>Currency</literal>
的实例被映射为它们的 ISO 代码。<literal>TimeZone</literal> 的实例被影射为它的
<literal>ID</literal>。"
-#. Tag: literal
-#: basic_mapping.xml:2647
+#. Tag: term
#, no-c-format
-msgid "class"
-msgstr "class"
+msgid "<literal>class</literal>"
+msgstr "<literal>class</literal>"
#. Tag: para
-#: basic_mapping.xml:2649
#, no-c-format
-msgid ""
-"A type mapping from <literal>java.lang.Class</literal> to
<literal>VARCHAR</"
-"literal> (or Oracle <literal>VARCHAR2</literal>). A
<literal>Class</literal> "
-"is mapped to its fully qualified name."
-msgstr ""
-"从<literal>java.lang.Class</literal> 到
<literal>VARCHAR</literal> (或者 "
-"Oracle
的<literal>VARCHAR2</literal>类型)的映射。<literal>Class</literal>被映"
-"射为它的全限定名。"
+msgid "A type mapping from <literal>java.lang.Class</literal> to
<literal>VARCHAR</literal> (or Oracle
<literal>VARCHAR2</literal>). A <literal>Class</literal> is mapped
to its fully qualified name."
+msgstr "从 <literal>java.lang.Class</literal> 到
<literal>VARCHAR</literal>(或者 Oracle 的 <literal>VARCHAR2</literal>
类型)的映射。<literal>Class</literal> 被映射为它的全限定名。"
-#. Tag: literal
-#: basic_mapping.xml:2657
+#. Tag: term
#, no-c-format
-msgid "binary"
-msgstr "binary"
+msgid "<literal>binary</literal>"
+msgstr "<literal>binary</literal>"
#. Tag: para
-#: basic_mapping.xml:2659
#, no-c-format
msgid "Maps byte arrays to an appropriate SQL binary type."
-msgstr "把字节数组(byte arrays)映射为对应的 SQL二进制类型。"
+msgstr "把字节数组(byte arrays)映射为对应的 SQL 二进制类型。"
-#. Tag: literal
-#: basic_mapping.xml:2665
+#. Tag: term
#, no-c-format
-msgid "text"
-msgstr "text"
+msgid "<literal>text</literal>"
+msgstr "<literal>text</literal>"
#. Tag: para
-#: basic_mapping.xml:2667
#, no-c-format
-msgid ""
-"Maps long Java strings to a SQL <literal>CLOB</literal> or
<literal>TEXT</"
-"literal> type."
-msgstr ""
-"把长Java字符串映射为SQL的<literal>CLOB</literal>或者<literal>TEXT</literal>类"
-"型。"
+msgid "Maps long Java strings to a SQL <literal>CLOB</literal> or
<literal>TEXT</literal> type."
+msgstr "把长 Java 字符串映射为 SQL 的 <literal>CLOB</literal> 或者
<literal>TEXT</literal> 类型。"
-#. Tag: literal
-#: basic_mapping.xml:2674
+#. Tag: term
#, no-c-format
-msgid "serializable"
-msgstr "serializable"
+msgid "<literal>serializable</literal>"
+msgstr "<literal>serializable</literal>"
#. Tag: para
-#: basic_mapping.xml:2676
-#, fuzzy, no-c-format
-msgid ""
-"Maps serializable Java types to an appropriate SQL binary type. You can also
"
-"indicate the Hibernate type <literal>serializable</literal> with the
name of "
-"a serializable Java class or interface that does not default to a basic
type."
-msgstr ""
-"把可序列化的Java类型映射到对应的SQL二进制类型。你也可以为一个并非默认为基本类"
-"型的可序列化Java类或者接口指定Hibernate类型<literal>serializable</literal>。"
+#, no-c-format
+msgid "Maps serializable Java types to an appropriate SQL binary type. You can also
indicate the Hibernate type <literal>serializable</literal> with the name of a
serializable Java class or interface that does not default to a basic type."
+msgstr "把可序列化的 Java 类型映射到对应的 SQL 二进制类型。你也可以为一个并非默认为基本类型的可序列化 Java 类或者接口指定 Hibernate
类型 <literal>serializable</literal>。 "
-#. Tag: literal
-#: basic_mapping.xml:2685
+#. Tag: term
#, no-c-format
-msgid "clob, blob"
-msgstr "clob, blob"
+msgid "<literal>clob, blob</literal>"
+msgstr "<literal>clob, blob</literal>"
#. Tag: para
-#: basic_mapping.xml:2687
-#, fuzzy, no-c-format
-msgid ""
-"Type mappings for the JDBC classes <literal>java.sql.Clob</literal> and
"
-"<literal>java.sql.Blob</literal>. 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 类 <literal>java.sql.Clob</literal> 和
<literal>java.sql.Blob</literal>"
-"的映射。某些程序可能不适合使用这个类型,因为blob和clob对象可能在一个事务之外"
-"是无法重用的。(而且, 驱动程序对这种类型的支持充满着补丁和前后矛盾。)"
+#, no-c-format
+msgid "Type mappings for the JDBC classes
<literal>java.sql.Clob</literal> and
<literal>java.sql.Blob</literal>. 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 类 <literal>java.sql.Clob</literal> 和
<literal>java.sql.Blob</literal>的映射。某些程序可能不适合使用这个类型,因为 blob 和 clob
对象可能在一个事务之外是无法重用的。(而且, 驱动程序对这种类型的支持充满着补丁和前后矛盾。) "
-#. Tag: literal
-#: basic_mapping.xml:2697
+#. 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 "<literal>imm_date, imm_time, imm_timestamp, imm_calendar,
imm_calendar_date, imm_serializable, imm_binary</literal>"
+msgstr "<literal>imm_date, imm_time, imm_timestamp, imm_calendar,
imm_calendar_date, imm_serializable, imm_binary</literal>"
#. Tag: para
-#: basic_mapping.xml:2701
-#, fuzzy, 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 <literal>Date.setTime()</literal> for an instance
mapped as "
-"<literal>imm_timestamp</literal>. To change the value of the property,
and "
-"have that change made persistent, the application must assign a new, "
-"nonidentical, object to the property."
-msgstr ""
-"一般来说,映射类型被假定为是可变的Java类型,只有对不可变Java类型,Hibernate会"
-"采取特定的优化措施,应用程序会把这些对象作为不可变对象处理。比如,你不应该对"
-"作为<literal>imm_timestamp</literal>映射的Date执行<literal>Date.setTime()</"
-"literal>。要改变属性的值,并且保存这一改变,应用程序必须对这一属性重新设置一"
-"个新的(不一样的)对象。"
+#, 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
<literal>Date.setTime()</literal> for an instance mapped as
<literal>imm_timestamp</literal>. To change the value of the property, and
have that change made persistent, the application must assign a new, nonidentical, object
to the property."
+msgstr "一般来说,映射类型被假定为是可变的 Java 类型,只有对不可变 Java 类型,Hibernate
会采取特定的优化措施,应用程序会把这些对象作为不可变对象处理。比如,你不应该对作为 <literal>imm_timestamp</literal> 映射的
Date 执行
<literal>Date.setTime()</literal>。要改变属性的值,并且保存这一改变,应用程序必须对这一属性重新设置一个新的(不一样的)对象。
"
#. Tag: para
-#: basic_mapping.xml:2716
-#, fuzzy, no-c-format
-msgid ""
-"Unique identifiers of entities and collections can be of any basic type "
-"except <literal>binary</literal>, <literal>blob</literal>
and <literal>clob</"
-"literal>. Composite identifiers are also allowed. See below for more "
-"information."
-msgstr ""
-"实体及其集合的唯一标识可以是除了<literal>binary</literal>、
<literal>blob</"
-"literal> 和 <literal>clob</literal>之外的任何基础类型。(联合标识也是允许的,"
-"后面会说到。)"
+#, no-c-format
+msgid "Unique identifiers of entities and collections can be of any basic type
except <literal>binary</literal>, <literal>blob</literal> and
<literal>clob</literal>. Composite identifiers are also allowed. See below for
more information."
+msgstr "实体及其集合的唯一标识可以是除了 <literal>binary</literal>、
<literal>blob</literal> 和 <literal>clob</literal>
之外的任何基础类型。(联合标识也是允许的,后面会说到。)"
#. Tag: para
-#: basic_mapping.xml:2722
#, no-c-format
-msgid ""
-"The basic value types have corresponding <literal>Type</literal>
constants "
-"defined on <literal>org.hibernate.Hibernate</literal>. For example,
"
-"<literal>Hibernate.STRING</literal> represents the
<literal>string</literal> "
-"type."
-msgstr ""
-"在<literal>org.hibernate.Hibernate</literal>中,定义了基础类型对应的"
-"<literal>Type</literal>常量。比如,<literal>Hibernate.STRING</literal>代表"
-"<literal>string</literal> 类型。"
+msgid "The basic value types have corresponding <literal>Type</literal>
constants defined on <literal>org.hibernate.Hibernate</literal>. For example,
<literal>Hibernate.STRING</literal> represents the
<literal>string</literal> type."
+msgstr "在 <literal>org.hibernate.Hibernate</literal> 中,定义了基础类型对应的
<literal>Type</literal> 常量。比如,<literal>Hibernate.STRING</literal>
代表 <literal>string</literal> 类型。"
#. Tag: title
-#: basic_mapping.xml:2731
#, no-c-format
msgid "Custom value types"
msgstr "自定义值类型"
#. Tag: para
-#: basic_mapping.xml:2733
-#, fuzzy, no-c-format
-msgid ""
-"It is relatively easy for developers to create their own value types. For "
-"example, you might want to persist properties of type
<literal>java.lang."
-"BigInteger</literal> to <literal>VARCHAR</literal> columns.
Hibernate does "
-"not provide a built-in type for this. Custom types are not limited to "
-"mapping a property, or collection element, to a single table column. So, for
"
-"example, you might have a Java property
<literal>getName()</literal>/"
-"<literal>setName()</literal> of type
<literal>java.lang.String</literal> "
-"that is persisted to the columns <literal>FIRST_NAME</literal>, "
-"<literal>INITIAL</literal>,
<literal>SURNAME</literal>."
-msgstr ""
-"开发者创建属于他们自己的值类型也是很容易的。比如说,你可能希望持久化"
-"<literal>java.lang.BigInteger</literal>类型的属性,持久化成为"
-"<literal>VARCHAR</literal>字段。Hibernate没有内置这样一种类型。自定义类型能够"
-"映射一个属性(或集合元素)到不止一个数据库表字段。比如说,你可能有这样的Java属"
-"性:<literal>getName()</literal>/<literal>setName()</literal>,这是"
-"<literal>java.lang.String</literal>类型的,对应的持久化到三个字段:"
-"<literal>FIRST_NAME</literal>, <literal>INITIAL</literal>,
<literal>SURNAME</"
-"literal>。"
+#, no-c-format
+msgid "It is relatively easy for developers to create their own value types. For
example, you might want to persist properties of type
<literal>java.lang.BigInteger</literal> to
<literal>VARCHAR</literal> columns. Hibernate does not provide a built-in type
for this. Custom types are not limited to mapping a property, or collection element, to a
single table column. So, for example, you might have a Java property
<literal>getName()</literal>/<literal>setName()</literal> of type
<literal>java.lang.String</literal> that is persisted to the columns
<literal>FIRST_NAME</literal>, <literal>INITIAL</literal>,
<literal>SURNAME</literal>."
+msgstr "开发者创建属于他们自己的值类型也是很容易的。比如说,你可能希望持久化
<literal>java.lang.BigInteger</literal> 类型的属性,持久化成为
<literal>VARCHAR</literal>
字段。Hibernate没有内置这样一种类型。自定义类型能够映射一个属性(或集合元素)到不止一个数据库表字段。比如说,你可能有这样的 Java
属性:<literal>getName()</literal>/<literal>setName()</literal>,这是
<literal>java.lang.String</literal>
类型的,对应的持久化到三个字段:<literal>FIRST_NAME</literal>,<literal>INITIAL</literal>,<literal>SURNAME</literal>。
"
#. Tag: para
-#: basic_mapping.xml:2744
-#, fuzzy, no-c-format
-msgid ""
-"To implement a custom type, implement either <literal>org.hibernate."
-"UserType</literal> or
<literal>org.hibernate.CompositeUserType</literal> and "
-"declare properties using the fully qualified classname of the type. View "
-"<literal>org.hibernate.test.DoubleStringType</literal> to see the kind
of "
-"things that are possible."
-msgstr ""
-"要实现一个自定义类型,可以实现<literal>org.hibernate.UserType</literal>或"
-"<literal>org.hibernate.CompositeUserType</literal>中的任一个,并且使用类型的"
-"Java全限定类名来定义属性。请查看<literal>org.hibernate.test."
-"DoubleStringType</literal>这个例子,看看它是怎么做的。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2752
#, no-c-format
-msgid ""
-"<![CDATA[<property name=\"twoStrings\"
type=\"org.hibernate.test."
-"DoubleStringType\">\n"
-" <column name=\"first_string\"/>\n"
-" <column name=\"second_string\"/>\n"
-"</property>]]>"
-msgstr ""
+msgid "To implement a custom type, implement either
<literal>org.hibernate.UserType</literal> or
<literal>org.hibernate.CompositeUserType</literal> and declare properties
using the fully qualified classname of the type. View
<literal>org.hibernate.test.DoubleStringType</literal> to see the kind of
things that are possible."
+msgstr "要实现一个自定义类型,可以实现 <literal>org.hibernate.UserType</literal> 或
<literal>org.hibernate.CompositeUserType</literal> 中的任一个,并且使用类型的 Java
全限定类名来定义属性。请查看 <literal>org.hibernate.test.DoubleStringType</literal>
这个例子,看看它是怎么做的。 "
#. Tag: para
-#: basic_mapping.xml:2754
#, no-c-format
-msgid ""
-"Notice the use of <literal><column></literal> tags to map
a property "
-"to multiple columns."
-msgstr ""
-"注意使用<literal><column></literal>标签来把一个属性映射到多个字段的做"
-"法。"
+msgid "Notice the use of <literal><column></literal> tags
to map a property to multiple columns."
+msgstr "注意使用 <literal><column></literal>
标签来把一个属性映射到多个字段的做法。"
#. Tag: para
-#: basic_mapping.xml:2759
#, no-c-format
-msgid ""
-"The <literal>CompositeUserType</literal>,
<literal>EnhancedUserType</"
-"literal>, <literal>UserCollectionType</literal>, and "
-"<literal>UserVersionType</literal> interfaces provide support for more
"
-"specialized uses."
-msgstr ""
-"<literal>CompositeUserType</literal>,
<literal>EnhancedUserType</literal>, "
-"<literal>UserCollectionType</literal>, 和
<literal>UserVersionType</literal> "
-"接口为更特殊的使用方式提供支持。"
+msgid "The <literal>CompositeUserType</literal>,
<literal>EnhancedUserType</literal>,
<literal>UserCollectionType</literal>, and
<literal>UserVersionType</literal> interfaces provide support for more
specialized uses."
+msgstr
"<literal>CompositeUserType</literal>,<literal>EnhancedUserType</literal>,<literal>UserCollectionType</literal>
和 <literal>UserVersionType</literal> 接口为更特殊的使用方式提供支持。"
#. Tag: para
-#: basic_mapping.xml:2765
-#, fuzzy, no-c-format
-msgid ""
-"You can even supply parameters to a <literal>UserType</literal> in the
"
-"mapping file. To do this, your <literal>UserType</literal> must
implement "
-"the <literal>org.hibernate.usertype.ParameterizedType</literal>
interface. "
-"To supply parameters to your custom type, you can use the
<literal><"
-"type></literal> element in your mapping files."
-msgstr ""
-"你甚至可以在一个映射文件中提供参数给一个<literal>UserType</literal>。 为了这"
-"样做,你的<literal>UserType</literal>必须实现<literal>org.hibernate.usertype."
-"ParameterizedType</literal>接口。为了给自定义类型提供参数,你可以在映射文件中"
-"使用<literal><type></literal>元素。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2773
#, no-c-format
-msgid ""
-"<![CDATA[<property name=\"priority\">\n"
-" <type
name=\"com.mycompany.usertypes.DefaultValueIntegerType\">\n"
-" <param name=\"default\">0</param>\n"
-" </type>\n"
-"</property>]]>"
-msgstr ""
+msgid "You can even supply parameters to a <literal>UserType</literal>
in the mapping file. To do this, your <literal>UserType</literal> must
implement the <literal>org.hibernate.usertype.ParameterizedType</literal>
interface. To supply parameters to your custom type, you can use the
<literal><type></literal> element in your mapping files."
+msgstr "你甚至可以在一个映射文件中提供参数给一个 <literal>UserType</literal>。 为了这样做,你的
<literal>UserType</literal> 必须实现
<literal>org.hibernate.usertype.ParameterizedType</literal>
接口。为了给自定义类型提供参数,你可以在映射文件中使用 <literal><type></literal> 元素。
"
#. Tag: para
-#: basic_mapping.xml:2775
#, no-c-format
-msgid ""
-"The <literal>UserType</literal> can now retrieve the value for the
parameter "
-"named <literal>default</literal> from the
<literal>Properties</literal> "
-"object passed to it."
-msgstr ""
-"现在,<literal>UserType</literal>
可以从传入的<literal>Properties</literal>对"
-"象中得到<literal>default</literal> 参数的值。"
+msgid "The <literal>UserType</literal> can now retrieve the value for
the parameter named <literal>default</literal> from the
<literal>Properties</literal> object passed to it."
+msgstr "现在,<literal>UserType</literal> 可以从传入的
<literal>Properties</literal> 对象中得到 <literal>default</literal>
参数的值。"
#. Tag: para
-#: basic_mapping.xml:2780
-#, fuzzy, no-c-format
-msgid ""
-"If you regularly use a certain <literal>UserType</literal>, it is
useful to "
-"define a shorter name for it. You can do this using the
<literal><"
-"typedef></literal> 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 ""
-"如果你非常频繁地使用某一<literal>UserType</literal>,可以为他定义一个简称。这"
-"可以通过使用
<literal><typedef></literal>元素来实现。Typedefs为一自定义"
-"类型赋予一个名称,并且如果此类型是参数化的,还可以包含一系列默认的参数值。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2787
#, no-c-format
-msgid ""
-"<![CDATA[<typedef
class=\"com.mycompany.usertypes.DefaultValueIntegerType\" "
-"name=\"default_zero\">\n"
-" <param name=\"default\">0</param>\n"
-"</typedef>]]>"
-msgstr ""
+msgid "If you regularly use a certain <literal>UserType</literal>, it is
useful to define a shorter name for it. You can do this using the
<literal><typedef></literal> 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 "如果你非常频繁地使用某一 <literal>UserType</literal>,可以为他定义一个简称。这可以通过使用
<literal><typedef></literal> 元素来实现。Typedefs
为一自定义类型赋予一个名称,并且如果此类型是参数化的,还可以包含一系列默认的参数值。 "
-#. Tag: programlisting
-#: basic_mapping.xml:2789
+#. Tag: para
#, no-c-format
-msgid "<![CDATA[<property name=\"priority\"
type=\"default_zero\"/>]]>"
-msgstr ""
+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
-#: basic_mapping.xml:2791
#, 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 "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 <literal>MonetaryAmount</literal> class is a good candidate for a
<literal>CompositeUserType</literal>, 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 内建的丰富的类型和对组件的支持意味着你可能很少
<emphasis>需要</emphasis>使用自定义类型。不过,为那些在你的应用中经常出现的(非实体)类使用自定义类型也是一个好方法。例如,一个
<literal>MonetaryAmount</literal> 类使用
<literal>CompositeUserType</literal>
来映射是不错的选择,虽然他可以很容易地被映射成组件。这样做的动机之一是抽象。使用自定义类型,以后假若你改变表示金额的方法时,它可以保证映射文件不需要修改。 "
-#. Tag: para
-#: basic_mapping.xml:2796
-#, fuzzy, 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
<literal>MonetaryAmount</"
-"literal> class is a good candidate for a
<literal>CompositeUserType</"
-"literal>, 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 内建的丰富的类型和对组件的支持意味着你可能很少 <emphasis>需要"
-"</emphasis>使用自定义类型。不过,为那些在你的应用中经常出现的(非实体)类使用自"
-"定义类型也是一个好方法。例如,一个<literal>MonetaryAmount</literal>类使用"
-"<literal>CompositeUserType</literal>来映射是不错的选择,虽然他可以很容易地被"
-"映射成组件。这样做的动机之一是抽象。使用自定义类型,以后假若你改变表示金额的"
-"方法时,它可以保证映射文件不需要修改。"
-
#. Tag: title
-#: basic_mapping.xml:2812
#, no-c-format
msgid "Mapping a class more than once"
msgstr "多次映射同一个类"
#. Tag: para
-#: basic_mapping.xml:2813
-#, fuzzy, no-c-format
-msgid ""
-"It is possible to provide more than one mapping for a particular persistent "
-"class. In this case, you must specify an <emphasis>entity
name</emphasis> 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 ""
-"对特定的持久化类,映射多次是允许的。这种情形下,你必须指定<emphasis>entity "
-"name</emphasis>来区别不同映射实体的对象实例。(默认情况下,实体名字和类名是相"
-"同的。) Hibernate在操作持久化对象、编写查询条件,或者把关联映射到指定实体"
-"时,允许你指定这个entity name(实体名字)。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2821
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Contract\"
table=\"Contracts\"\n"
-" entity-name=\"CurrentContract\">\n"
-" ...\n"
-" <set name=\"history\" inverse=\"true\"\n"
-" order-by=\"effectiveEndDate desc\">\n"
-" <key column=\"currentContractId\"/>\n"
-" <one-to-many entity-name=\"HistoricalContract\"/>\n"
-" </set>\n"
-"</class>\n"
-"\n"
-"<class name=\"Contract\" table=\"ContractHistory\"\n"
-" entity-name=\"HistoricalContract\">\n"
-" ...\n"
-" <many-to-one name=\"currentContract\"\n"
-" column=\"currentContractId\"\n"
-" entity-name=\"CurrentContract\"/>\n"
-"</class>]]>"
-msgstr ""
+msgid "It is possible to provide more than one mapping for a particular persistent
class. In this case, you must specify an <emphasis>entity name</emphasis> 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 "对特定的持久化类,映射多次是允许的。这种情形下,你必须指定 <emphasis>entity name</emphasis>
来区别不同映射实体的对象实例。(默认情况下,实体名字和类名是相同的。) Hibernate 在操作持久化对象、编写查询条件,或者把关联映射到指定实体时,允许你指定这个 entity
name(实体名字)。 "
#. Tag: para
-#: basic_mapping.xml:2823
-#, fuzzy, no-c-format
-msgid ""
-"Associations are now specified using <literal>entity-name</literal>
instead "
-"of <literal>class</literal>."
-msgstr ""
-"注意这里关联是如何用<literal>entity-name</literal>来代替<literal>class</"
-"literal>的。"
+#, no-c-format
+msgid "Associations are now specified using
<literal>entity-name</literal> instead of
<literal>class</literal>."
+msgstr "注意这里关联是如何用 <literal>entity-name</literal> 来代替
<literal>class</literal> 的。 "
#. Tag: title
-#: basic_mapping.xml:2831
#, no-c-format
msgid "SQL quoted identifiers"
-msgstr "SQL中引号包围的标识符"
+msgstr "SQL 中引号包围的标识符"
#. Tag: para
-#: basic_mapping.xml:2832
-#, fuzzy, 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
<literal>Dialect</"
-"literal>. This is usually double quotes, but the SQL Server uses brackets
"
-"and MySQL uses backticks."
-msgstr ""
-"你可通过在映射文档中使用反向引号(`)把表名或者字段名包围起来,以强制Hibernate"
-"在生成的SQL中把标识符用引号包围起来。Hibernate会使用相应的"
-"SQL<literal>Dialect</literal>(方言)来使用正确的引号风格(通常是双引号,但是在"
-"SQL Server中是括号,MySQL中是反向引号)。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2839
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"LineItem\" table=\"`Line
Item`\">\n"
-" <id name=\"id\" column=\"`Item Id`\"/><generator
class=\"assigned\"/></"
-"id>\n"
-" <property name=\"itemNumber\" column=\"`Item
#`\"/>\n"
-" ...\n"
-"</class>]]>"
-msgstr ""
+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 <literal>Dialect</literal>. This
is usually double quotes, but the SQL Server uses brackets and MySQL uses
backticks."
+msgstr "你可通过在映射文档中使用反向引号(`)把表名或者字段名包围起来,以强制 Hibernate 在生成的 SQL
中把标识符用引号包围起来。Hibernate 会使用相应的
SQL<literal>Dialect</literal>(方言)来使用正确的引号风格(通常是双引号,但是在 SQL Server 中是括号,MySQL
中是反向引号)。 "
#. Tag: title
-#: basic_mapping.xml:2845
#, no-c-format
msgid "Metadata alternatives"
-msgstr "其他元数据(Metadata)"
+msgstr "其他元数据(Metadata)"
#. Tag: para
-#: basic_mapping.xml:2847
-#, fuzzy, 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)的方"
-"法。"
+#, 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)的方法。 "
#. Tag: title
-#: basic_mapping.xml:2852
#, no-c-format
msgid "Using XDoclet markup"
msgstr "使用 XDoclet 标记"
#. Tag: para
-#: basic_mapping.xml:2854
-#, fuzzy, no-c-format
-msgid ""
-"Many Hibernate users prefer to embed mapping information directly in "
-"sourcecode using XDoclet <literal>(a)hibernate.tags</literal>. 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
<literal>Cat</"
-"literal> class with XDoclet mappings:"
-msgstr ""
-"很多Hibernate使用者更喜欢使用XDoclet<literal>(a)hibernate.xn--tags</literal>"-ij11csb2482c;
-"信息直接嵌入到源代码中。我们不会在本文档中涉及这个方法,因为严格说来,这属于"
-"XDoclet的一部分。然而,我们包含了如下使用XDoclet映射的<literal>Cat</literal>"
-"类的例子。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2861
#, no-c-format
-msgid ""
-"<![CDATA[package eg;\n"
-"import java.util.Set;\n"
-"import java.util.Date;\n"
-"\n"
-"/**\n"
-" * @hibernate.class\n"
-" * table=\"CATS\"\n"
-" */\n"
-"public class Cat {\n"
-" private Long id; // identifier\n"
-" private Date birthdate;\n"
-" private Cat mother;\n"
-" private Set kittens\n"
-" private Color color;\n"
-" private char sex;\n"
-" private float weight;\n"
-"\n"
-" /*\n"
-" * @hibernate.id\n"
-" * generator-class=\"native\"\n"
-" * column=\"CAT_ID\"\n"
-" */\n"
-" public Long getId() {\n"
-" return id;\n"
-" }\n"
-" private void setId(Long id) {\n"
-" this.id=id;\n"
-" }\n"
-"\n"
-" /**\n"
-" * @hibernate.many-to-one\n"
-" * column=\"PARENT_ID\"\n"
-" */\n"
-" public Cat getMother() {\n"
-" return mother;\n"
-" }\n"
-" void setMother(Cat mother) {\n"
-" this.mother = mother;\n"
-" }\n"
-"\n"
-" /**\n"
-" * @hibernate.property\n"
-" * column=\"BIRTH_DATE\"\n"
-" */\n"
-" public Date getBirthdate() {\n"
-" return birthdate;\n"
-" }\n"
-" void setBirthdate(Date date) {\n"
-" birthdate = date;\n"
-" }\n"
-" /**\n"
-" * @hibernate.property\n"
-" * column=\"WEIGHT\"\n"
-" */\n"
-" public float getWeight() {\n"
-" return weight;\n"
-" }\n"
-" void setWeight(float weight) {\n"
-" this.weight = weight;\n"
-" }\n"
-"\n"
-" /**\n"
-" * @hibernate.property\n"
-" * column=\"COLOR\"\n"
-" * not-null=\"true\"\n"
-" */\n"
-" public Color getColor() {\n"
-" return color;\n"
-" }\n"
-" void setColor(Color color) {\n"
-" this.color = color;\n"
-" }\n"
-" /**\n"
-" * @hibernate.set\n"
-" * inverse=\"true\"\n"
-" * order-by=\"BIRTH_DATE\"\n"
-" * @hibernate.collection-key\n"
-" * column=\"PARENT_ID\"\n"
-" * @hibernate.collection-one-to-many\n"
-" */\n"
-" public Set getKittens() {\n"
-" return kittens;\n"
-" }\n"
-" void setKittens(Set kittens) {\n"
-" this.kittens = kittens;\n"
-" }\n"
-" // addKitten not needed by Hibernate\n"
-" public void addKitten(Cat kitten) {\n"
-" kittens.add(kitten);\n"
-" }\n"
-"\n"
-" /**\n"
-" * @hibernate.property\n"
-" * column=\"SEX\"\n"
-" * not-null=\"true\"\n"
-" * update=\"false\"\n"
-" */\n"
-" public char getSex() {\n"
-" return sex;\n"
-" }\n"
-" void setSex(char sex) {\n"
-" this.sex=sex;\n"
-" }\n"
-"}]]>"
-msgstr ""
+msgid "Many Hibernate users prefer to embed mapping information directly in
sourcecode using XDoclet <literal>(a)hibernate.tags</literal>. 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 <literal>Cat</literal> class with XDoclet
mappings:"
+msgstr "很多 Hibernate 使用者更喜欢使用 XDoclet<literal>(a)hibernate.tags</literal>
将映射信息直接嵌入到源代码中。我们不会在本文档中涉及这个方法,因为严格说来,这属于 XDoclet 的一部分。然而,我们包含了如下使用 XDoclet 映射的
<literal>Cat</literal> 类的例子。 "
#. Tag: para
-#: basic_mapping.xml:2863
-#, fuzzy, no-c-format
+#, no-c-format
msgid "See the Hibernate website for more examples of XDoclet and Hibernate."
-msgstr "参考Hibernate网站更多的Xdoclet和Hibernate的例子"
+msgstr "参考 Hibernate 网站更多的 Xdoclet 和 Hibernate 的例子。"
#. Tag: title
-#: basic_mapping.xml:2870
#, no-c-format
msgid "Using JDK 5.0 Annotations"
-msgstr "使用 JDK 5.0 的注解(Annotation)"
+msgstr "使用 JDK 5.0 的注解(Annotation)"
#. Tag: para
-#: basic_mapping.xml:2872
-#, fuzzy, 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 <literal>EntityManager</literal> of JSR-220
(the "
-"persistence API). Support for mapping metadata is available via the "
-"<emphasis>Hibernate Annotations</emphasis> package as a separate
download. "
-"Both EJB3 (JSR-220) and Hibernate3 metadata is supported."
-msgstr ""
-"JDK 5.0 在语言级别引入了 XDoclet 风格的标注,并且是类型安全的,在编译期进行检"
-"查。这一机制比XDoclet的注解更为强大,有更好的工具和IDE支持。例如, IntelliJ "
-"IDEA,支持JDK 5.0注解的自动完成和语法高亮 。EJB规范的新修订版(JSR-220)使用 "
-"JDK 5.0的注解作为entity beans的主要元数据(metadata)机制。Hibernate 3 实现了"
-"JSR-220 (the persistence
API)的<literal>EntityManager</literal>,支持通过"
-"<emphasis>Hibernate Annotations</emphasis>包定义映射元数据。这个包作为单独的"
-"部分下载,支持EJB3 (JSR-220)和Hibernate3的元数据。"
+#, 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 <literal>EntityManager</literal> of
JSR-220 (the persistence API). Support for mapping metadata is available via the
<emphasis>Hibernate Annotations</emphasis> package as a separate download.
Both EJB3 (JSR-220) and Hibernate3 metadata is supported."
+msgstr "JDK 5.0 在语言级别引入了 XDoclet 风格的标注,并且是类型安全的,在编译期进行检查。这一机制比 XDoclet
的注解更为强大,有更好的工具和 IDE 支持。例如,IntelliJ IDEA,支持 JDK 5.0 注解的自动完成和语法高亮 。EJB 规范的新修订版 (JSR-220) 使用
JDK 5.0 的注解作为entity beans的主要元数据(metadata)机制。Hibernate 3 实现了JSR-220(the persistence API) 的
<literal>EntityManager</literal>,支持通过 <emphasis>Hibernate
Annotations</emphasis> 包定义映射元数据。这个包作为单独的部分下载,支持 EJB3(JSR-220) 和 Hibernate3 的元数据。
"
#. Tag: para
-#: basic_mapping.xml:2883
#, no-c-format
msgid "This is an example of a POJO class annotated as an EJB entity bean:"
-msgstr "这是一个被注解为EJB entity bean 的POJO类的例子"
+msgstr "这是一个被注解为 EJB entity bean 的 POJO 类的例子"
-#. Tag: programlisting
-#: basic_mapping.xml:2887
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[@Entity(access = AccessType.FIELD)\n"
-"public class Customer implements Serializable {\n"
-"\n"
-" @Id;\n"
-" Long id;\n"
-"\n"
-" String firstName;\n"
-" String lastName;\n"
-" Date birthday;\n"
-"\n"
-" @Transient\n"
-" Integer age;\n"
-"\n"
-" @Embedded\n"
-" private Address homeAddress;\n"
-"\n"
-" @OneToMany(cascade=CascadeType.ALL)\n"
-" @JoinColumn(name=\"CUSTOMER_ID\")\n"
-" Set<Order> orders;\n"
-"\n"
-" // Getter/setter and business methods\n"
-"}]]>"
-msgstr ""
+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: para
-#: basic_mapping.xml:2891
-#, fuzzy, 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 模块。"
-
#. Tag: title
-#: basic_mapping.xml:2901
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Generated properties"
-msgstr "数据库生成属性(Generated Properties)"
+msgstr "数据库生成属性(Generated Properties) "
#. Tag: para
-#: basic_mapping.xml:2902
-#, fuzzy, no-c-format
-msgid ""
-"Generated properties are properties that have their values generated by the "
-"database. Typically, Hibernate applications needed to
<literal>refresh</"
-"literal> 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应用程序需要进行<literal>刷新(refresh)</literal>。"
-"但如果把属性标明为generated,就可以转由Hibernate来负责这个动作。实际上。对定"
-"义了generated properties的实体,每当Hibernate执行一条SQL INSERT或者UPDATE语"
-"句,会立刻执行一条select来获得生成的值。"
+#, no-c-format
+msgid "Generated properties are properties that have their values generated by the
database. Typically, Hibernate applications needed to
<literal>refresh</literal> 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
应用程序需要进行<literal>刷新(refresh)</literal>。但如果把属性标明为 generated,就可以转由 Hibernate
来负责这个动作。实际上。对定义了 generated properties 的实体,每当 Hibernate 执行一条 SQL INSERT 或者 UPDATE
语句,会立刻执行一条 select 来获得生成的值。 "
#. Tag: para
-#: basic_mapping.xml:2911
-#, fuzzy, no-c-format
-msgid ""
-"Properties marked as generated must additionally be non-insertable and non-"
-"updateable. Only <link
linkend=\"mapping-declaration-version\">versions</"
-"link>, <link
linkend=\"mapping-declaration-timestamp\">timestamps</link>, "
-"and <link linkend=\"mapping-declaration-property\">simple
properties</link>, "
-"can be marked as generated."
-msgstr ""
-"被标明为generated的属性还必须是 non-insertable和 non-updateable的。只有<xref "
-"linkend=\"mapping-declaration-version\">versions</xref>,<xref
linkend="
-"\"mapping-declaration-timestamp\">timestamps</xref>和<xref
linkend=\"mapping-"
-"declaration-property\">简单属性(simple properties)</xref>可以被标明为"
-"generated。"
+#, no-c-format
+msgid "Properties marked as generated must additionally be non-insertable and
non-updateable. Only versions (<xref linkend=\"mapping-declaration-version\"
/>), timestamps (<xref linkend=\"mapping-declaration-timestamp\" />),
and simple properties (<xref linkend=\"mapping-declaration-property\" />),
can be marked as generated."
+msgstr "被标明为 generated 的属性还必须是 non-insertable 和 non-updateable 的。只有 <xref
linkend=\"mapping-declaration-version\"/> versions、<xref
linkend=\"mapping-declaration-timestamp\"/> timestamp 和 <xref
linkend=\"mapping-declaration-property\"/> 简单属性(simple properties)可以被标明为
generated。 "
#. Tag: para
-#: basic_mapping.xml:2918
-#, fuzzy, no-c-format
-msgid ""
-"<literal>never</literal> (the default): the given property value is not
"
-"generated within the database."
-msgstr "<literal>never</literal> (默认) 标明此属性值不是从数据库中生成。"
+#, no-c-format
+msgid "<literal>never</literal> (the default): the given property value
is not generated within the database."
+msgstr "<literal>never</literal>(默认)标明此属性值不是从数据库中生成。 "
#. Tag: para
-#: basic_mapping.xml:2922
-#, fuzzy, no-c-format
-msgid ""
-"<literal>insert</literal>: 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 <link
linkend=\"mapping-declaration-"
-"version\">version</link> and <link
linkend=\"mapping-declaration-timestamp"
-"\">timestamp</link> properties can be marked as generated, this
option is "
-"not available."
-msgstr ""
-"<literal>insert</literal> - 标明此属性值在insert的时候生成,但是不会在随后的"
-"update时重新生成。比如说创建日期就归属于这类。注意虽然<xref linkend="
-"\"mapping-declaration-version\">version</xref>和<xref
linkend=\"mapping-"
-"declaration-timestamp\">timestamp</xref>属性可以被标注为generated,但是不适用"
-"这个选项..."
+#, no-c-format
+msgid "<literal>insert</literal>: 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 (<xref
linkend=\"mapping-declaration-version\" />) and timestamp (<xref
linkend=\"mapping-declaration-timestamp\" />) properties can be marked as
generated, this option is not available."
+msgstr "<literal>insert</literal> — 标明此属性值在 insert 的时候生成,但是不会在随后的 update
时重新生成。比如说创建日期就归属于这类。注意虽然 <xref linkend=\"mapping-declaration-version\"/>
version 和 <xref linkend=\"mapping-declaration-timestamp\"/> timestamp
属性可以被标注为 generated,但是不适用这个选项... "
#. Tag: para
-#: basic_mapping.xml:2930
-#, fuzzy, no-c-format
-msgid ""
-"<literal>always</literal>: the property value is generated both on
insert "
-"and on update."
-msgstr "<literal>always</literal> - 标明此属性值在insert和update时都会被生成。"
+#, no-c-format
+msgid "<literal>always</literal>: the property value is generated both
on insert and on update."
+msgstr "<literal>always</literal> — 标明此属性值在 insert 和 update 时都会被生成。
"
#. Tag: title
-#: basic_mapping.xml:2937
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Auxiliary database objects"
-msgstr "辅助数据库对象(Auxiliary Database Objects)"
+msgstr "辅助数据库对象(Auxiliary Database Objects) "
#. Tag: para
-#: basic_mapping.xml:2938
-#, fuzzy, 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 <literal>java.sql.Statement.execute()</literal> method is valid
(for "
-"example, ALTERs, INSERTS, etc.). There are essentially two modes for "
-"defining auxiliary database objects:"
-msgstr ""
-"Allows CREATE and DROP of arbitrary database objects, in conjunction with "
-"Hibernate's schema evolution tools, to provide the ability to fully define a
"
-"user schema within the Hibernate mapping files. Although designed "
-"specifically for creating and dropping things like triggers or stored "
-"procedures, really any SQL command that can be run via a
<literal>java.sql."
-"Statement.execute()</literal> method is valid here (ALTERs, INSERTS, etc).
"
-"There are essentially two modes for defining auxiliary database objects... 帮"
-"助CREATE和DROP任意数据库对象,与Hibernate的schema交互工具组合起来,可以提供在"
-"Hibernate映射文件中完全定义用户schema的能力。虽然这是为创建和销毁trigger(触发"
-"器)或stored procedure(存储过程)等特别设计的,实际上任何可以在<literal>java."
-"sql.Statement.execute()</literal>方法中执行的SQL命令都可以在此使用(比如"
-"ALTER, INSERT,等等)。本质上有两种模式来定义辅助数据库对象..."
+#, 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
<literal>java.sql.Statement.execute()</literal> 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(存储过程)等特别设计的,实际上任何可以在
<literal>java.sql.Statement.execute()</literal> 方法中执行的 SQL 命令都可以在此使用(比如ALTER,
INSERT,等等)。本质上有两种模式来定义辅助数据库对象... "
#. Tag: para
-#: basic_mapping.xml:2947
-#, fuzzy, no-c-format
-msgid ""
-"The first mode is to explicitly list the CREATE and DROP commands in the "
-"mapping file:"
-msgstr "第一种模式是在映射文件中显式声明CREATE和DROP命令:"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2951
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-" ...\n"
-" <database-object>\n"
-" <create>CREATE TRIGGER my_trigger ...</create>\n"
-" <drop>DROP TRIGGER my_trigger</drop>\n"
-" </database-object>\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "The first mode is to explicitly list the CREATE and DROP commands in the
mapping file:"
+msgstr "第一种模式是在映射文件中显式声明 CREATE 和 DROP 命令: "
#. Tag: para
-#: basic_mapping.xml:2952
-#, fuzzy, 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
<literal>org.hibernate."
-"mapping.AuxiliaryDatabaseObject</literal> interface."
-msgstr ""
-"第二种模式是提供一个类,这个类知道如何组织CREATE和DROP命令。这个特别类必须实"
-"现<literal>org.hibernate.mapping.AuxiliaryDatabaseObject</literal>接口。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2957
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-" ...\n"
-" <database-object>\n"
-" <definition class=\"MyTriggerDefinition\"/>\n"
-" </database-object>\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "The second mode is to supply a custom class that constructs the CREATE and
DROP commands. This custom class must implement the
<literal>org.hibernate.mapping.AuxiliaryDatabaseObject</literal>
interface."
+msgstr "第二种模式是提供一个类,这个类知道如何组织 CREATE 和 DROP 命令。这个特别类必须实现
<literal>org.hibernate.mapping.AuxiliaryDatabaseObject</literal> 接口。 "
#. Tag: para
-#: basic_mapping.xml:2958
-#, fuzzy, no-c-format
-msgid ""
-"Additionally, these database objects can be optionally scoped so that they "
-"only apply when certain dialects are used."
-msgstr "还有,这些数据库对象可以特别指定为仅在特定的方言中才使用。"
-
-#. Tag: programlisting
-#: basic_mapping.xml:2962
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-" ...\n"
-" <database-object>\n"
-" <definition class=\"MyTriggerDefinition\"/>\n"
-" <dialect-scope
name=\"org.hibernate.dialect.Oracle9iDialect\"/>\n"
-" <dialect-scope
name=\"org.hibernate.dialect.Oracle10gDialect\"/>\n"
-" </database-object>\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "Additionally, these database objects can be optionally scoped so that they
only apply when certain dialects are used."
+msgstr "还有,这些数据库对象可以特别指定为仅在特定的方言中才使用。 "
#~ msgid ""
-#~ "<literal>type</literal> (optional): A name that indicates the
Hibernate "
-#~ "type."
-#~ msgstr "<literal>type</literal> (可选): 标识Hibernate类型的名字。"
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"
+#~ "\">\n"
+#~ "\n"
+#~ "<hibernate-mapping package=\"eg\">\n"
+#~ "\n"
+#~ " <class name=\"Cat\"\n"
+#~ " table=\"cats\"\n"
+#~ " discriminator-value=\"C\">\n"
+#~ "\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <discriminator column=\"subclass\"\n"
+#~ " type=\"character\"/>\n"
+#~ "\n"
+#~ " <property name=\"weight\"/>\n"
+#~ "\n"
+#~ " <property name=\"birthdate\"\n"
+#~ " type=\"date\"\n"
+#~ " not-null=\"true\"\n"
+#~ " update=\"false\"/>\n"
+#~ "\n"
+#~ " <property name=\"color\"\n"
+#~ " type=\"eg.types.ColorUserType\"\n"
+#~ " not-null=\"true\"\n"
+#~ " update=\"false\"/>\n"
+#~ "\n"
+#~ " <property name=\"sex\"\n"
+#~ " not-null=\"true\"\n"
+#~ " update=\"false\"/>\n"
+#~ "\n"
+#~ " <property name=\"litterId\"\n"
+#~ " column=\"litterId\"\n"
+#~ " update=\"false\"/>\n"
+#~ "\n"
+#~ " <many-to-one name=\"mother\"\n"
+#~ " column=\"mother_id\"\n"
+#~ " update=\"false\"/>\n"
+#~ "\n"
+#~ " <set name=\"kittens\"\n"
+#~ " inverse=\"true\"\n"
+#~ " order-by=\"litter_id\">\n"
+#~ " <key column=\"mother_id\"/>\n"
+#~ " <one-to-many class=\"Cat\"/>\n"
+#~ " </set>\n"
+#~ "\n"
+#~ " <subclass name=\"DomesticCat\"\n"
+#~ " discriminator-value=\"D\">\n"
+#~ "\n"
+#~ " <property name=\"name\"\n"
+#~ " type=\"string\"/>\n"
+#~ "\n"
+#~ " </subclass>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Dog\">\n"
+#~ " <!-- mapping for Dog could go here -->\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"
+#~ "\">\n"
+#~ "\n"
+#~ "<hibernate-mapping package=\"eg\">\n"
+#~ "\n"
+#~ " <class name=\"Cat\"\n"
+#~ " table=\"cats\"\n"
+#~ " discriminator-value=\"C\">\n"
+#~ "\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <discriminator column=\"subclass\"\n"
+#~ " type=\"character\"/>\n"
+#~ "\n"
+#~ " <property name=\"weight\"/>\n"
+#~ "\n"
+#~ " <property name=\"birthdate\"\n"
+#~ " type=\"date\"\n"
+#~ " not-null=\"true\"\n"
+#~ " update=\"false\"/>\n"
+#~ "\n"
+#~ " <property name=\"color\"\n"
+#~ " type=\"eg.types.ColorUserType\"\n"
+#~ " not-null=\"true\"\n"
+#~ " update=\"false\"/>\n"
+#~ "\n"
+#~ " <property name=\"sex\"\n"
+#~ " not-null=\"true\"\n"
+#~ " update=\"false\"/>\n"
+#~ "\n"
+#~ " <property name=\"litterId\"\n"
+#~ " column=\"litterId\"\n"
+#~ " update=\"false\"/>\n"
+#~ "\n"
+#~ " <many-to-one name=\"mother\"\n"
+#~ " column=\"mother_id\"\n"
+#~ " update=\"false\"/>\n"
+#~ "\n"
+#~ " <set name=\"kittens\"\n"
+#~ " inverse=\"true\"\n"
+#~ " order-by=\"litter_id\">\n"
+#~ " <key column=\"mother_id\"/>\n"
+#~ " <one-to-many class=\"Cat\"/>\n"
+#~ " </set>\n"
+#~ "\n"
+#~ " <subclass name=\"DomesticCat\"\n"
+#~ " discriminator-value=\"D\">\n"
+#~ "\n"
+#~ " <property name=\"name\"\n"
+#~ " type=\"string\"/>\n"
+#~ "\n"
+#~ " </subclass>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Dog\">\n"
+#~ " <!-- mapping for Dog could go here -->\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgid ""
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+#~ " \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\"
[\n"
+#~ " <!ENTITY types SYSTEM
\"classpath://your/domain/types.xml\">\n"
+#~ "]>\n"
+#~ "\n"
+#~ "<hibernate-mapping package=\"your.domain\">\n"
+#~ " <class name=\"MyEntity\">\n"
+#~ " <id name=\"id\"
type=\"my-custom-id-type\">\n"
+#~ " ...\n"
+#~ " </id>\n"
+#~ " <class>\n"
+#~ " &types;\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+#~ " \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\"
[\n"
+#~ " <!ENTITY types SYSTEM
\"classpath://your/domain/types.xml\">\n"
+#~ "]>\n"
+#~ "\n"
+#~ "<hibernate-mapping package=\"your.domain\">\n"
+#~ " <class name=\"MyEntity\">\n"
+#~ " <id name=\"id\"
type=\"my-custom-id-type\">\n"
+#~ " ...\n"
+#~ " </id>\n"
+#~ " <class>\n"
+#~ " &types;\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping\n"
+#~ " schema=\"schemaName\"\n"
+#~ " catalog=\"catalogName\"\n"
+#~ " default-cascade=\"cascade_style\"\n"
+#~ " default-access=\"field|property|ClassName\"\n"
+#~ " default-lazy=\"true|false\"\n"
+#~ " auto-import=\"true|false\"\n"
+#~ " package=\"package.name\"\n"
+#~ " />]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-mapping\n"
+#~ " schema=\"schemaName\"\n"
+#~ " catalog=\"catalogName\"\n"
+#~ " default-cascade=\"cascade_style\"\n"
+#~ " default-access=\"field|property|ClassName\"\n"
+#~ " default-lazy=\"true|false\"\n"
+#~ " auto-import=\"true|false\"\n"
+#~ " package=\"package.name\"\n"
+#~ " />]]>"
+#~ msgid ""
+#~ "<![CDATA[<class\n"
+#~ " name=\"ClassName\"\n"
+#~ " table=\"tableName\"\n"
+#~ " discriminator-value=\"discriminator_value\"\n"
+#~ " mutable=\"true|false\"\n"
+#~ " schema=\"owner\"\n"
+#~ " catalog=\"catalog\"\n"
+#~ " proxy=\"ProxyInterface\"\n"
+#~ " dynamic-update=\"true|false\"\n"
+#~ " dynamic-insert=\"true|false\"\n"
+#~ " select-before-update=\"true|false\"\n"
+#~ " polymorphism=\"implicit|explicit\"\n"
+#~ " where=\"arbitrary sql where condition\"\n"
+#~ " persister=\"PersisterClass\"\n"
+#~ " batch-size=\"N\"\n"
+#~ " optimistic-lock=\"none|version|dirty|all\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " check=\"arbitrary sql check condition\"\n"
+#~ " rowid=\"rowid\"\n"
+#~ " subselect=\"SQL expression\"\n"
+#~ " abstract=\"true|false\"\n"
+#~ " node=\"element-name\"\n"
+#~ "/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class\n"
+#~ " name=\"ClassName\"\n"
+#~ " table=\"tableName\"\n"
+#~ " discriminator-value=\"discriminator_value\"\n"
+#~ " mutable=\"true|false\"\n"
+#~ " schema=\"owner\"\n"
+#~ " catalog=\"catalog\"\n"
+#~ " proxy=\"ProxyInterface\"\n"
+#~ " dynamic-update=\"true|false\"\n"
+#~ " dynamic-insert=\"true|false\"\n"
+#~ " select-before-update=\"true|false\"\n"
+#~ " polymorphism=\"implicit|explicit\"\n"
+#~ " where=\"arbitrary sql where condition\"\n"
+#~ " persister=\"PersisterClass\"\n"
+#~ " batch-size=\"N\"\n"
+#~ " optimistic-lock=\"none|version|dirty|all\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " check=\"arbitrary sql check condition\"\n"
+#~ " rowid=\"rowid\"\n"
+#~ " subselect=\"SQL expression\"\n"
+#~ " abstract=\"true|false\"\n"
+#~ " node=\"element-name\"\n"
+#~ "/>]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Summary\">\n"
+#~ " <subselect>\n"
+#~ " select item.name, max(bid.amount), count(*)\n"
+#~ " from item\n"
+#~ " join bid on bid.item_id = item.id\n"
+#~ " group by item.name\n"
+#~ " </subselect>\n"
+#~ " <synchronize table=\"item\"/>\n"
+#~ " <synchronize table=\"bid\"/>\n"
+#~ " <id name=\"name\"/>\n"
+#~ " ...\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Summary\">\n"
+#~ " <subselect>\n"
+#~ " select item.name, max(bid.amount), count(*)\n"
+#~ " from item\n"
+#~ " join bid on bid.item_id = item.id\n"
+#~ " group by item.name\n"
+#~ " </subselect>\n"
+#~ " <synchronize table=\"item\"/>\n"
+#~ " <synchronize table=\"bid\"/>\n"
+#~ " <id name=\"name\"/>\n"
+#~ " ...\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<id\n"
+#~ " name=\"propertyName\"\n"
+#~ " type=\"typename\"\n"
+#~ " column=\"column_name\"\n"
+#~ " unsaved-value=\"null|any|none|undefined|id_value\"\n"
+#~ " access=\"field|property|ClassName\">\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ "\n"
+#~ " <generator class=\"generatorClass\"/>\n"
+#~ "</id>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<id\n"
+#~ " name=\"propertyName\"\n"
+#~ " type=\"typename\"\n"
+#~ " column=\"column_name\"\n"
+#~ " unsaved-value=\"null|any|none|undefined|id_value\"\n"
+#~ " access=\"field|property|ClassName\">\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ "\n"
+#~ " <generator class=\"generatorClass\"/>\n"
+#~ "</id>]]>"
+#~ msgid ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"cat_id\">\n"
+#~ " <generator
class=\"org.hibernate.id.TableHiLoGenerator\">\n"
+#~ " <param
name=\"table\">uid_table</param>\n"
+#~ " <param
name=\"column\">next_hi_value_column</param>\n"
+#~ " </generator>\n"
+#~ "</id>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"cat_id\">\n"
+#~ " <generator
class=\"org.hibernate.id.TableHiLoGenerator\">\n"
+#~ " <param
name=\"table\">uid_table</param>\n"
+#~ " <param
name=\"column\">next_hi_value_column</param>\n"
+#~ " </generator>\n"
+#~ "</id>]]>"
+#~ msgid "increment"
+#~ msgstr "increment"
+#~ msgid "identity"
+#~ msgstr "identity"
+#~ msgid "sequence"
+#~ msgstr "sequence"
+#~ msgid "hilo"
+#~ msgstr "hilo"
+#~ msgid "seqhilo"
+#~ msgstr "seqhilo"
+#~ msgid "guid"
+#~ msgstr "guid"
+#~ msgid "native"
+#~ msgstr "native"
+#~ msgid "assigned"
+#~ msgstr "assigned"
+#~ msgid "select"
+#~ msgstr "select"
+#~ msgid "foreign"
+#~ msgstr "foreign"
+#~ msgid ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"cat_id\">\n"
+#~ " <generator class=\"hilo\">\n"
+#~ " <param
name=\"table\">hi_value</param>\n"
+#~ " <param
name=\"column\">next_value</param>\n"
+#~ " <param
name=\"max_lo\">100</param>\n"
+#~ " </generator>\n"
+#~ "</id>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"cat_id\">\n"
+#~ " <generator class=\"hilo\">\n"
+#~ " <param
name=\"table\">hi_value</param>\n"
+#~ " <param
name=\"column\">next_value</param>\n"
+#~ " <param
name=\"max_lo\">100</param>\n"
+#~ " </generator>\n"
+#~ "</id>]]>"
+#~ msgid ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"cat_id\">\n"
+#~ " <generator class=\"seqhilo\">\n"
+#~ " <param
name=\"sequence\">hi_value</param>\n"
+#~ " <param
name=\"max_lo\">100</param>\n"
+#~ " </generator>\n"
+#~ "</id>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"cat_id\">\n"
+#~ " <generator class=\"seqhilo\">\n"
+#~ " <param
name=\"sequence\">hi_value</param>\n"
+#~ " <param
name=\"max_lo\">100</param>\n"
+#~ " </generator>\n"
+#~ "</id>]]>"
+#~ msgid ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"person_id\">\n"
+#~ " <generator class=\"sequence\">\n"
+#~ " <param
name=\"sequence\">person_id_sequence</param>\n"
+#~ " </generator>\n"
+#~ "</id>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"person_id\">\n"
+#~ " <generator class=\"sequence\">\n"
+#~ " <param
name=\"sequence\">person_id_sequence</param>\n"
+#~ " </generator>\n"
+#~ "</id>]]>"
+#~ msgid ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"person_id\" unsaved-value="
+#~ "\"0\">\n"
+#~ " <generator class=\"identity\"/>\n"
+#~ "</id>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"person_id\" unsaved-value="
+#~ "\"0\">\n"
+#~ " <generator class=\"identity\"/>\n"
+#~ "</id>]]>"
+#~ msgid ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"person_id\">\n"
+#~ " <generator class=\"select\">\n"
+#~ " <param
name=\"key\">socialSecurityNumber</param>\n"
+#~ " </generator>\n"
+#~ "</id>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<id name=\"id\" type=\"long\"
column=\"person_id\">\n"
+#~ " <generator class=\"select\">\n"
+#~ " <param
name=\"key\">socialSecurityNumber</param>\n"
+#~ " </generator>\n"
+#~ "</id>]]>"
+#~ msgid ""
+#~ "<![CDATA[<composite-id\n"
+#~ " name=\"propertyName\"\n"
+#~ " class=\"ClassName\"\n"
+#~ " mapped=\"true|false\"\n"
+#~ " access=\"field|property|ClassName\">\n"
+#~ " node=\"element-name|.\"\n"
+#~ "\n"
+#~ " <key-property name=\"propertyName\"
type=\"typename\" column="
+#~ "\"column_name\"/>\n"
+#~ " <key-many-to-one name=\"propertyName
class=\"ClassName\" column="
+#~ "\"column_name\"/>\n"
+#~ " ......\n"
+#~ "</composite-id>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<composite-id\n"
+#~ " name=\"propertyName\"\n"
+#~ " class=\"ClassName\"\n"
+#~ " mapped=\"true|false\"\n"
+#~ " access=\"field|property|ClassName\">\n"
+#~ " node=\"element-name|.\"\n"
+#~ "\n"
+#~ " <key-property name=\"propertyName\"
type=\"typename\" column="
+#~ "\"column_name\"/>\n"
+#~ " <key-many-to-one name=\"propertyName
class=\"ClassName\" column="
+#~ "\"column_name\"/>\n"
+#~ " ......\n"
+#~ "</composite-id>]]>"
+#~ msgid ""
+#~ "<![CDATA[<composite-id>\n"
+#~ " <key-property name=\"medicareNumber\"/>\n"
+#~ " <key-property name=\"dependent\"/>\n"
+#~ "</composite-id>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<composite-id>\n"
+#~ " <key-property name=\"medicareNumber\"/>\n"
+#~ " <key-property name=\"dependent\"/>\n"
+#~ "</composite-id>]]>"
+#~ msgid ""
+#~ "<![CDATA[<composite-id class=\"MedicareId\"
mapped=\"true\">\n"
+#~ " <key-property name=\"medicareNumber\"/>\n"
+#~ " <key-property name=\"dependent\"/>\n"
+#~ "</composite-id>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<composite-id class=\"MedicareId\"
mapped=\"true\">\n"
+#~ " <key-property name=\"medicareNumber\"/>\n"
+#~ " <key-property name=\"dependent\"/>\n"
+#~ "</composite-id>]]>"
+#~ msgid ""
+#~ "<![CDATA[<discriminator\n"
+#~ " column=\"discriminator_column\"\n"
+#~ " type=\"discriminator_type\"\n"
+#~ " force=\"true|false\"\n"
+#~ " insert=\"true|false\"\n"
+#~ " formula=\"arbitrary sql expression\"\n"
+#~ "/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<discriminator\n"
+#~ " column=\"discriminator_column\"\n"
+#~ " type=\"discriminator_type\"\n"
+#~ " force=\"true|false\"\n"
+#~ " insert=\"true|false\"\n"
+#~ " formula=\"arbitrary sql expression\"\n"
+#~ "/>]]>"
+#~ msgid ""
+#~ "<![CDATA[<discriminator\n"
+#~ " formula=\"case when CLASS_TYPE in ('a', 'b',
'c') then 0 else 1 end"
+#~ "\"\n"
+#~ " type=\"integer\"/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<discriminator\n"
+#~ " formula=\"case when CLASS_TYPE in ('a', 'b',
'c') then 0 else 1 end"
+#~ "\"\n"
+#~ " type=\"integer\"/>]]>"
+#~ msgid ""
+#~ "<![CDATA[<version\n"
+#~ " column=\"version_column\"\n"
+#~ " name=\"propertyName\"\n"
+#~ " type=\"typename\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " unsaved-value=\"null|negative|undefined\"\n"
+#~ " generated=\"never|always\"\n"
+#~ " insert=\"true|false\"\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ "/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<version\n"
+#~ " column=\"version_column\"\n"
+#~ " name=\"propertyName\"\n"
+#~ " type=\"typename\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " unsaved-value=\"null|negative|undefined\"\n"
+#~ " generated=\"never|always\"\n"
+#~ " insert=\"true|false\"\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ "/>]]>"
+#~ msgid ""
+#~ "<![CDATA[<timestamp\n"
+#~ " column=\"timestamp_column\"\n"
+#~ " name=\"propertyName\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " unsaved-value=\"null|undefined\"\n"
+#~ " source=\"vm|db\"\n"
+#~ " generated=\"never|always\"\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ "/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<timestamp\n"
+#~ " column=\"timestamp_column\"\n"
+#~ " name=\"propertyName\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " unsaved-value=\"null|undefined\"\n"
+#~ " source=\"vm|db\"\n"
+#~ " generated=\"never|always\"\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ "/>]]>"
+#~ msgid ""
+#~ "<![CDATA[<property\n"
+#~ " name=\"propertyName\"\n"
+#~ " column=\"column_name\"\n"
+#~ " type=\"typename\"\n"
+#~ " update=\"true|false\"\n"
+#~ " insert=\"true|false\"\n"
+#~ " formula=\"arbitrary SQL expression\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " not-null=\"true|false\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ " generated=\"never|insert|always\"\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ " index=\"index_name\"\n"
+#~ " unique_key=\"unique_key_id\"\n"
+#~ " length=\"L\"\n"
+#~ " precision=\"P\"\n"
+#~ " scale=\"S\"\n"
+#~ "/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<property\n"
+#~ " name=\"propertyName\"\n"
+#~ " column=\"column_name\"\n"
+#~ " type=\"typename\"\n"
+#~ " update=\"true|false\"\n"
+#~ " insert=\"true|false\"\n"
+#~ " formula=\"arbitrary SQL expression\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " not-null=\"true|false\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ " generated=\"never|insert|always\"\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ " index=\"index_name\"\n"
+#~ " unique_key=\"unique_key_id\"\n"
+#~ " length=\"L\"\n"
+#~ " precision=\"P\"\n"
+#~ " scale=\"S\"\n"
+#~ "/>]]>"
+#, fuzzy
#~ msgid ""
-#~ "<literal>cascade</literal> (optional): Specifies which operations
should "
-#~ "be cascaded from the parent object to the associated object."
+#~ "<![CDATA[\n"
+#~ "<property name=\"totalPrice\"\n"
+#~ " formula=\"( SELECT SUM (li.quantity*p.price) FROM LineItem li, "
+#~ "Product p\n"
+#~ " WHERE li.productId = p.productId\n"
+#~ " AND li.customerId = customerId\n"
+#~ " AND li.orderNumber = orderNumber )\"/>]]>"
#~ msgstr ""
-#~ "<literal>cascade(级联)</literal> (可选): 指明哪些操作会从父对象级联到关"
-#~ "联的对象。"
+#~ "<property name=\"totalPrice\"\n"
+#~ " formula=\"( SELECT SUM (li.quantity*p.price) FROM LineItem li, "
+#~ "Product p\n"
+#~ " WHERE li.productId = p.productId\n"
+#~ " AND li.customerId = customerId\n"
+#~ " AND li.orderNumber = orderNumber )\"/>"
+#, fuzzy
#~ msgid ""
-#~ "<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</"
-#~ "literal>): Specifies that updates to this property do or do not require
"
-#~ "acquisition of the optimistic lock. In other words, dertermines if a "
-#~ "version increment should occur when this property is dirty."
+#~ "<![CDATA[<many-to-one\n"
+#~ " name=\"propertyName\"\n"
+#~ " column=\"column_name\"\n"
+#~ " class=\"ClassName\"\n"
+#~ " cascade=\"cascade_style\"\n"
+#~ " fetch=\"join|select\"\n"
+#~ " update=\"true|false\"\n"
+#~ " insert=\"true|false\"\n"
+#~ " property-ref=\"propertyNameFromAssociatedClass\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " not-null=\"true|false\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ " lazy=\"proxy|no-proxy|false\"\n"
+#~ " not-found=\"ignore|exception\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " formula=\"arbitrary SQL expression\"\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ " embed-xml=\"true|false\"\n"
+#~ " index=\"index_name\"\n"
+#~ " unique_key=\"unique_key_id\"\n"
+#~ " foreign-key=\"foreign_key_name\"\n"
+#~ "/>]]>"
#~ msgstr ""
-#~ "<literal>optimistic-lock</literal> (可选 - 默认为
<literal>true</"
-#~ "literal>): 指定这个属性在做更新时是否需要获得乐观锁定(optimistic "
-#~ "lock)。 换句话说,它决定这个属性发生脏数据时版本(version)的值是否增长。"
+#~ "<many-to-one\n"
+#~ " name=\"propertyName\"\n"
+#~ " column=\"column_name\"\n"
+#~ " class=\"ClassName\"\n"
+#~ " cascade=\"cascade_style\"\n"
+#~ " fetch=\"join|select\"\n"
+#~ " update=\"true|false\"\n"
+#~ " insert=\"true|false\"\n"
+#~ " property-ref=\"propertyNameFromAssociatedClass\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " not-null=\"true|false\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ " lazy=\"proxy|no-proxy|false\"\n"
+#~ " not-found=\"ignore|exception\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " formula=\"arbitrary SQL expression\"\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ " embed-xml=\"true|false\"\n"
+#~ " index=\"index_name\"\n"
+#~ " unique_key=\"unique_key_id\"\n"
+#~ " foreign-key=\"foreign_key_name\"\n"
+#~ "/>"
+#, fuzzy
#~ msgid ""
-#~ "To understand the behaviour of various Java language-level objects with "
-#~ "respect to the persistence service, we need to classify them into two "
-#~ "groups:"
+#~ "<![CDATA[<many-to-one name=\"product\"
class=\"Product\" column="
+#~ "\"PRODUCT_ID\"/>]]>"
#~ msgstr ""
-#~ "为了理解很多与持久化服务相关的Java语言级对象的行为,我们需要把它们分为两"
-#~ "类:"
+#~ "<many-to-one name=\"product\" class=\"Product\"
column=\"PRODUCT_ID\"/"
+#~ ">"
#, fuzzy
-#~ msgid "<literal>class</literal>"
-#~ msgstr "<literal>all(全部)</literal> 检查全部字段"
+#~ msgid ""
+#~ "<![CDATA[<property name=\"serialNumber\"
unique=\"true\" type=\"string\" "
+#~ "column=\"SERIAL_NUMBER\"/>]]>"
+#~ msgstr ""
+#~ "<property name=\"serialNumber\" unique=\"true\"
type=\"string\" column="
+#~ "\"SERIAL_NUMBER\"/>"
-#~ msgid "id"
-#~ msgstr "id"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"product\"
property-ref=\"serialNumber\" "
+#~ "column=\"PRODUCT_SERIAL_NUMBER\"/>]]>"
+#~ msgstr ""
+#~ "<many-to-one name=\"product\"
property-ref=\"serialNumber\" column="
+#~ "\"PRODUCT_SERIAL_NUMBER\"/>"
+#, fuzzy
#~ msgid ""
-#~ "<literal>optimizer</literal> (optional, defaults to
<literal>none</"
-#~ "literal>): See <xref
linkend=\"mapping-declaration-id-enhanced-optimizers"
-#~ "\"/>"
+#~ "<![CDATA[<many-to-one name=\"owner\"
property-ref=\"identity.ssn\" column="
+#~ "\"OWNER_SSN\"/>]]>"
#~ msgstr ""
-#~ "<literal>optimizer</literal> (optional, defaults to
<literal>none</"
-#~ "literal>): See <xref
linkend=\"mapping-declaration-id-enhanced-optimizers"
-#~ "\"/>"
+#~ "<many-to-one name=\"owner\"
property-ref=\"identity.ssn\" column="
+#~ "\"OWNER_SSN\"/>"
+#, fuzzy
#~ msgid ""
-#~ "<literal>optimizer</literal> (optional, defaults to
<literal/>): See "
-#~ "<xref
linkend=\"mapping-declaration-id-enhanced-optimizers\"/>"
+#~ "<![CDATA[<one-to-one\n"
+#~ " name=\"propertyName\"\n"
+#~ " class=\"ClassName\"\n"
+#~ " cascade=\"cascade_style\"\n"
+#~ " constrained=\"true|false\"\n"
+#~ " fetch=\"join|select\"\n"
+#~ " property-ref=\"propertyNameFromAssociatedClass\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " formula=\"any SQL expression\"\n"
+#~ " lazy=\"proxy|no-proxy|false\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ " embed-xml=\"true|false\"\n"
+#~ " foreign-key=\"foreign_key_name\"\n"
+#~ "/>]]>"
#~ msgstr ""
-#~ "<literal>optimizer</literal> (optional, defaults to
<literal/>): See "
-#~ "<xref
linkend=\"mapping-declaration-id-enhanced-optimizers\"/>"
+#~ "<one-to-one\n"
+#~ " name=\"propertyName\"\n"
+#~ " class=\"ClassName\"\n"
+#~ " cascade=\"cascade_style\"\n"
+#~ " constrained=\"true|false\"\n"
+#~ " fetch=\"join|select\"\n"
+#~ " property-ref=\"propertyNameFromAssociatedClass\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " formula=\"any SQL expression\"\n"
+#~ " lazy=\"proxy|no-proxy|false\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ "
node=\"element-name|@attribute-name|element/(a)attribute|.\"\n"
+#~ " embed-xml=\"true|false\"\n"
+#~ " foreign-key=\"foreign_key_name\"\n"
+#~ "/>"
-#~ msgid "key"
-#~ msgstr "键(key)"
+#, fuzzy
+#~ msgid "<![CDATA[<one-to-one name=\"person\"
class=\"Person\"/>]]>"
+#~ msgstr "<one-to-one name=\"person\"
class=\"Person\"/>"
-#~ msgid "any"
-#~ msgstr "any"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<one-to-one name=\"employee\"
class=\"Employee\" constrained="
+#~ "\"true\"/>]]>"
+#~ msgstr ""
+#~ "<one-to-one name=\"employee\" class=\"Employee\"
constrained=\"true\"/"
+#~ ">"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"person\"
table=\"PERSON\">\n"
+#~ " <id name=\"id\" column=\"PERSON_ID\">\n"
+#~ " <generator class=\"foreign\">\n"
+#~ " <param
name=\"property\">employee</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " ...\n"
+#~ " <one-to-one name=\"employee\"\n"
+#~ " class=\"Employee\"\n"
+#~ " constrained=\"true\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"person\"
table=\"PERSON\">\n"
+#~ " <id name=\"id\"
column=\"PERSON_ID\">\n"
+#~ " <generator class=\"foreign\">\n"
+#~ " <param
name=\"property\">employee</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " ...\n"
+#~ " <one-to-one name=\"employee\"\n"
+#~ " class=\"Employee\"\n"
+#~ " constrained=\"true\"/>\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"person\" class=\"Person\"
column=\"PERSON_ID"
+#~ "\" unique=\"true\"/>]]>"
+#~ msgstr ""
+#~ "<many-to-one name=\"person\" class=\"Person\"
column=\"PERSON_ID\" "
+#~ "unique=\"true\"/>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<one-to-one name=\"employee\"
class=\"Employee\" property-ref="
+#~ "\"person\"/>]]>"
+#~ msgstr ""
+#~ "<one-to-one name\"employee\" class=\"Employee\"
property-ref=\"person"
+#~ "\"/>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<natural-id mutable=\"true|false\"/>\n"
+#~ " <property ... />\n"
+#~ " <many-to-one ... />\n"
+#~ " ......\n"
+#~ "</natural-id>]]>"
+#~ msgstr ""
+#~ "<natural-id mutable=\"true|false\"/>\n"
+#~ " <property ... />\n"
+#~ " <many-to-one ... />\n"
+#~ " ......\n"
+#~ "</natural-id>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<component\n"
+#~ " name=\"propertyName\"\n"
+#~ " class=\"className\"\n"
+#~ " insert=\"true|false\"\n"
+#~ " update=\"true|false\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " node=\"element-name|.\"\n"
+#~ ">\n"
+#~ "\n"
+#~ " <property ...../>\n"
+#~ " <many-to-one .... />\n"
+#~ " ........\n"
+#~ "</component>]]>"
+#~ msgstr ""
+#~ "<component \n"
+#~ " name=\"propertyName\" \n"
+#~ " class=\"className\"\n"
+#~ " insert=\"true|false\"\n"
+#~ " update=\"true|false\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " node=\"element-name|.\"\n"
+#~ ">\n"
+#~ " \n"
+#~ " <property ...../>\n"
+#~ " <many-to-one .... />\n"
+#~ " ........\n"
+#~ "</component>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<properties\n"
+#~ " name=\"logicalName\"\n"
+#~ " insert=\"true|false\"\n"
+#~ " update=\"true|false\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ ">\n"
+#~ "\n"
+#~ " <property ...../>\n"
+#~ " <many-to-one .... />\n"
+#~ " ........\n"
+#~ "</properties>]]>"
+#~ msgstr ""
+#~ "<properties \n"
+#~ " name=\"logicalName\" \n"
+#~ " insert=\"true|false\"\n"
+#~ " update=\"true|false\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ ">\n"
+#~ " \n"
+#~ " <property ...../>\n"
+#~ " <many-to-one .... />\n"
+#~ " ........\n"
+#~ "</properties>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"personNumber\"/>\n"
+#~ "\n"
+#~ " ...\n"
+#~ " <properties name=\"name\"\n"
+#~ " unique=\"true\" update=\"false\">\n"
+#~ " <property name=\"firstName\"/>\n"
+#~ " <property name=\"initial\"/>\n"
+#~ " <property name=\"lastName\"/>\n"
+#~ " </properties>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Person\">\n"
+#~ " <id name=\"personNumber\"/>\n"
+#~ " ...\n"
+#~ " <properties name=\"name\" \n"
+#~ " unique=\"true\"
update=\"false\">\n"
+#~ " <property name=\"firstName\"/>\n"
+#~ " <property name=\"initial\"/>\n"
+#~ " <property name=\"lastName\"/>\n"
+#~ " </properties>\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"person\"\n"
+#~ " class=\"Person\" property-ref=\"name\">\n"
+#~ " <column name=\"firstName\"/>\n"
+#~ " <column name=\"initial\"/>\n"
+#~ " <column name=\"lastName\"/>\n"
+#~ "</many-to-one>]]>"
+#~ msgstr ""
+#~ "<many-to-one name=\"person\" \n"
+#~ " class=\"Person\"
property-ref=\"name\">\n"
+#~ " <column name=\"firstName\"/>\n"
+#~ " <column name=\"initial\"/>\n"
+#~ " <column name=\"lastName\"/>\n"
+#~ "</many-to-one>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<subclass\n"
+#~ " name=\"ClassName\"\n"
+#~ " discriminator-value=\"discriminator_value\"\n"
+#~ " proxy=\"ProxyInterface\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " dynamic-update=\"true|false\"\n"
+#~ " dynamic-insert=\"true|false\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " node=\"element-name\"\n"
+#~ " extends=\"SuperclassName\">\n"
+#~ "\n"
+#~ " <property .... />\n"
+#~ " .....\n"
+#~ "</subclass>]]>"
+#~ msgstr ""
+#~ "<subclass\n"
+#~ " name=\"ClassName\"\n"
+#~ " discriminator-value=\"discriminator_value\"\n"
+#~ " proxy=\"ProxyInterface\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " dynamic-update=\"true|false\"\n"
+#~ " dynamic-insert=\"true|false\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " node=\"element-name\"\n"
+#~ " extends=\"SuperclassName\">\n"
+#~ "\n"
+#~ " <property .... />\n"
+#~ " .....\n"
+#~ "</subclass>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<joined-subclass\n"
+#~ " name=\"ClassName\"\n"
+#~ " table=\"tablename\"\n"
+#~ " proxy=\"ProxyInterface\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " dynamic-update=\"true|false\"\n"
+#~ " dynamic-insert=\"true|false\"\n"
+#~ " schema=\"schema\"\n"
+#~ " catalog=\"catalog\"\n"
+#~ " extends=\"SuperclassName\"\n"
+#~ " persister=\"ClassName\"\n"
+#~ " subselect=\"SQL expression\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " node=\"element-name\">\n"
+#~ "\n"
+#~ " <key .... >\n"
+#~ "\n"
+#~ " <property .... />\n"
+#~ " .....\n"
+#~ "</joined-subclass>]]>"
+#~ msgstr ""
+#~ "<joined-subclass\n"
+#~ " name=\"ClassName\"\n"
+#~ " table=\"tablename\"\n"
+#~ " proxy=\"ProxyInterface\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " dynamic-update=\"true|false\"\n"
+#~ " dynamic-insert=\"true|false\"\n"
+#~ " schema=\"schema\"\n"
+#~ " catalog=\"catalog\"\n"
+#~ " extends=\"SuperclassName\"\n"
+#~ " persister=\"ClassName\"\n"
+#~ " subselect=\"SQL expression\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " node=\"element-name\">\n"
+#~ "\n"
+#~ " <key .... >\n"
+#~ "\n"
+#~ " <property .... />\n"
+#~ " .....\n"
+#~ "</joined-subclass>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+#~ "\n"
+#~ "<hibernate-mapping package=\"eg\">\n"
+#~ "\n"
+#~ " <class name=\"Cat\" table=\"CATS\">\n"
+#~ " <id name=\"id\" column=\"uid\"
type=\"long\">\n"
+#~ " <generator class=\"hilo\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"birthdate\"
type=\"date\"/>\n"
+#~ " <property name=\"color\"
not-null=\"true\"/>\n"
+#~ " <property name=\"sex\"
not-null=\"true\"/>\n"
+#~ " <property name=\"weight\"/>\n"
+#~ " <many-to-one name=\"mate\"/>\n"
+#~ " <set name=\"kittens\">\n"
+#~ " <key column=\"MOTHER\"/>\n"
+#~ " <one-to-many class=\"Cat\"/>\n"
+#~ " </set>\n"
+#~ " <joined-subclass name=\"DomesticCat\" table="
+#~ "\"DOMESTIC_CATS\">\n"
+#~ " <key column=\"CAT\"/>\n"
+#~ " <property name=\"name\"
type=\"string\"/>\n"
+#~ " </joined-subclass>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"eg.Dog\">\n"
+#~ " <!-- mapping for Dog could go here -->\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD//EN\"\n"
+#~ " \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"
+#~ "\">\n"
+#~ "\n"
+#~ "<hibernate-mapping package=\"eg\">\n"
+#~ "\n"
+#~ " <class name=\"Cat\"
table=\"CATS\">\n"
+#~ " <id name=\"id\" column=\"uid\"
type=\"long\">\n"
+#~ " <generator
class=\"hilo\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"birthdate\"
type=\"date\"/>\n"
+#~ " <property name=\"color\"
not-null=\"true\"/>\n"
+#~ " <property name=\"sex\"
not-null=\"true\"/>\n"
+#~ " <property name=\"weight\"/>\n"
+#~ " <many-to-one name=\"mate\"/>\n"
+#~ " <set name=\"kittens\">\n"
+#~ " <key
column=\"MOTHER\"/>\n"
+#~ " <one-to-many
class=\"Cat\"/>\n"
+#~ " </set>\n"
+#~ " <joined-subclass name=\"DomesticCat\"
table="
+#~ "\"DOMESTIC_CATS\">\n"
+#~ " <key column=\"CAT\"/>\n"
+#~ " <property name=\"name\"
type=\"string\"/>\n"
+#~ " </joined-subclass>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"eg.Dog\">\n"
+#~ " <!-- mapping for Dog could go here -->\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<union-subclass\n"
+#~ " name=\"ClassName\"\n"
+#~ " table=\"tablename\"\n"
+#~ " proxy=\"ProxyInterface\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " dynamic-update=\"true|false\"\n"
+#~ " dynamic-insert=\"true|false\"\n"
+#~ " schema=\"schema\"\n"
+#~ " catalog=\"catalog\"\n"
+#~ " extends=\"SuperclassName\"\n"
+#~ " abstract=\"true|false\"\n"
+#~ " persister=\"ClassName\"\n"
+#~ " subselect=\"SQL expression\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " node=\"element-name\">\n"
+#~ "\n"
+#~ " <property .... />\n"
+#~ " .....\n"
+#~ "</union-subclass>]]>"
+#~ msgstr ""
+#~ "<union-subclass\n"
+#~ " name=\"ClassName\"\n"
+#~ " table=\"tablename\"\n"
+#~ " proxy=\"ProxyInterface\"\n"
+#~ " lazy=\"true|false\"\n"
+#~ " dynamic-update=\"true|false\"\n"
+#~ " dynamic-insert=\"true|false\"\n"
+#~ " schema=\"schema\"\n"
+#~ " catalog=\"catalog\"\n"
+#~ " extends=\"SuperclassName\"\n"
+#~ " abstract=\"true|false\"\n"
+#~ " persister=\"ClassName\"\n"
+#~ " subselect=\"SQL expression\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " node=\"element-name\">\n"
+#~ "\n"
+#~ " <property .... />\n"
+#~ " .....\n"
+#~ "</union-subclass>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<join\n"
+#~ " table=\"tablename\"\n"
+#~ " schema=\"owner\"\n"
+#~ " catalog=\"catalog\"\n"
+#~ " fetch=\"join|select\"\n"
+#~ " inverse=\"true|false\"\n"
+#~ " optional=\"true|false\">\n"
+#~ "\n"
+#~ " <key ... />\n"
+#~ "\n"
+#~ " <property ... />\n"
+#~ " ...\n"
+#~ "</join>]]>"
+#~ msgstr ""
+#~ "<join\n"
+#~ " table=\"tablename\"\n"
+#~ " schema=\"owner\"\n"
+#~ " catalog=\"catalog\"\n"
+#~ " fetch=\"join|select\"\n"
+#~ " inverse=\"true|false\"\n"
+#~ " optional=\"true|false\">\n"
+#~ " \n"
+#~ " <key ... />\n"
+#~ " \n"
+#~ " <property ... />\n"
+#~ " ...\n"
+#~ "</join>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\"\n"
+#~ " table=\"PERSON\">\n"
+#~ "\n"
+#~ " <id name=\"id\"
column=\"PERSON_ID\">...</id>\n"
+#~ "\n"
+#~ " <join table=\"ADDRESS\">\n"
+#~ " <key column=\"ADDRESS_ID\"/>\n"
+#~ " <property name=\"address\"/>\n"
+#~ " <property name=\"zip\"/>\n"
+#~ " <property name=\"country\"/>\n"
+#~ " </join>\n"
+#~ " ...]]>"
+#~ msgstr ""
+#~ "<class name=\"Person\"\n"
+#~ " table=\"PERSON\">\n"
+#~ "\n"
+#~ " <id name=\"id\"
column=\"PERSON_ID\">...</id>\n"
+#~ "\n"
+#~ " <join table=\"ADDRESS\">\n"
+#~ " <key column=\"ADDRESS_ID\"/>\n"
+#~ " <property name=\"address\"/>\n"
+#~ " <property name=\"zip\"/>\n"
+#~ " <property name=\"country\"/>\n"
+#~ " </join>\n"
+#~ " ..."
+
+#, fuzzy
+#~ msgid "<title>Key</title>"
+#~ msgstr "<title>键(key)</title>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<key\n"
+#~ " column=\"columnname\"\n"
+#~ " on-delete=\"noaction|cascade\"\n"
+#~ " property-ref=\"propertyName\"\n"
+#~ " not-null=\"true|false\"\n"
+#~ " update=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ "/>]]>"
+#~ msgstr ""
+#~ "<key\n"
+#~ " column=\"columnname\"\n"
+#~ " on-delete=\"noaction|cascade\"\n"
+#~ " property-ref=\"propertyName\"\n"
+#~ " not-null=\"true|false\"\n"
+#~ " update=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ "/>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<column\n"
+#~ " name=\"column_name\"\n"
+#~ " length=\"N\"\n"
+#~ " precision=\"N\"\n"
+#~ " scale=\"N\"\n"
+#~ " not-null=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " unique-key=\"multicolumn_unique_key_name\"\n"
+#~ " index=\"index_name\"\n"
+#~ " sql-type=\"sql_type_name\"\n"
+#~ " check=\"SQL expression\"\n"
+#~ " default=\"SQL expression\"/>]]>"
+#~ msgstr ""
+#~ "<column\n"
+#~ " name=\"column_name\"\n"
+#~ " length=\"N\"\n"
+#~ " precision=\"N\"\n"
+#~ " scale=\"N\"\n"
+#~ " not-null=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " unique-key=\"multicolumn_unique_key_name\"\n"
+#~ " index=\"index_name\"\n"
+#~ " sql-type=\"sql_type_name\"\n"
+#~ " check=\"SQL expression\"\n"
+#~ " default=\"SQL expression\"/>"
+
+#, fuzzy
+#~ msgid "<![CDATA[<formula>SQL expression</formula>]]>"
+#~ msgstr "<formula>SQL expression</formula>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"homeAddress\"
class=\"Address\"\n"
+#~ " insert=\"false\" update=\"false\">\n"
+#~ " <column name=\"person_id\" not-null=\"true\"
length=\"10\"/>\n"
+#~ " <formula>'MAILING'</formula>\n"
+#~ "</many-to-one>]]>"
+#~ msgstr ""
+#~ "<many-to-one name=\"homeAddress\"
class=\"Address\"\n"
+#~ " insert=\"false\" update=\"false\">\n"
+#~ " <column name=\"person_id\" not-null=\"true\"
length=\"10\"/>\n"
+#~ " <formula>'MAILING'</formula>\n"
+#~ "</many-to-one>"
+
+#, fuzzy
+#~ msgid "<![CDATA[<import class=\"java.lang.Object\"
rename=\"Universe\"/>]]>"
+#~ msgstr "<import class=\"java.lang.Object\"
rename=\"Universe\"/>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<import\n"
+#~ " class=\"ClassName\"\n"
+#~ " rename=\"ShortName\"\n"
+#~ "/>]]>"
+#~ msgstr ""
+#~ "<import\n"
+#~ " class=\"ClassName\"\n"
+#~ " rename=\"ShortName\"\n"
+#~ "/>"
+
+#, fuzzy
+#~ msgid "<title>Any</title>"
+#~ msgstr "<title>any</title>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<any name=\"being\" id-type=\"long\"
meta-type=\"string\">\n"
+#~ " <meta-value value=\"TBL_ANIMAL\"
class=\"Animal\"/>\n"
+#~ " <meta-value value=\"TBL_HUMAN\"
class=\"Human\"/>\n"
+#~ " <meta-value value=\"TBL_ALIEN\"
class=\"Alien\"/>\n"
+#~ " <column name=\"table_name\"/>\n"
+#~ " <column name=\"id\"/>\n"
+#~ "</any>]]>"
+#~ msgstr ""
+#~ "<any name=\"being\" id-type=\"long\"
meta-type=\"string\">\n"
+#~ " <meta-value value=\"TBL_ANIMAL\"
class=\"Animal\"/>\n"
+#~ " <meta-value value=\"TBL_HUMAN\"
class=\"Human\"/>\n"
+#~ " <meta-value value=\"TBL_ALIEN\"
class=\"Alien\"/>\n"
+#~ " <column name=\"table_name\"/>\n"
+#~ " <column name=\"id\"/>\n"
+#~ "</any>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<any\n"
+#~ " name=\"propertyName\"\n"
+#~ " id-type=\"idtypename\"\n"
+#~ " meta-type=\"metatypename\"\n"
+#~ " cascade=\"cascade_style\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ ">\n"
+#~ " <meta-value ... />\n"
+#~ " <meta-value ... />\n"
+#~ " .....\n"
+#~ " <column .... />\n"
+#~ " <column .... />\n"
+#~ " .....\n"
+#~ "</any>]]>"
+#~ msgstr ""
+#~ "<any\n"
+#~ " name=\"propertyName\"\n"
+#~ " id-type=\"idtypename\"\n"
+#~ " meta-type=\"metatypename\"\n"
+#~ " cascade=\"cascade_style\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ ">\n"
+#~ " <meta-value ... />\n"
+#~ " <meta-value ... />\n"
+#~ " .....\n"
+#~ " <column .... />\n"
+#~ " <column .... />\n"
+#~ " .....\n"
+#~ "</any>"
+#~ msgid "string"
+#~ msgstr "string"
+
+#, fuzzy
+#~ msgid "class"
+#~ msgstr "子类(subclass)"
+#~ msgid "binary"
+#~ msgstr "binary"
+#~ msgid "text"
+#~ msgstr "text"
+#~ msgid "serializable"
+#~ msgstr "serializable"
+#~ msgid "clob, blob"
+#~ msgstr "clob, blob"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<property name=\"twoStrings\"
type=\"org.hibernate.test."
+#~ "DoubleStringType\">\n"
+#~ " <column name=\"first_string\"/>\n"
+#~ " <column name=\"second_string\"/>\n"
+#~ "</property>]]>"
+#~ msgstr ""
+#~ "<property name=\"twoStrings\"
type=\"org.hibernate.test."
+#~ "DoubleStringType\">\n"
+#~ " <column name=\"first_string\"/>\n"
+#~ " <column name=\"second_string\"/>\n"
+#~ "</property>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<property name=\"priority\">\n"
+#~ " <type
name=\"com.mycompany.usertypes.DefaultValueIntegerType\">\n"
+#~ " <param name=\"default\">0</param>\n"
+#~ " </type>\n"
+#~ "</property>]]>"
+#~ msgstr ""
+#~ "<property name=\"priority\">\n"
+#~ " <type
name=\"com.mycompany.usertypes.DefaultValueIntegerType"
+#~ "\">\n"
+#~ " <param
name=\"default\">0</param>\n"
+#~ " </type>\n"
+#~ "</property>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<typedef
class=\"com.mycompany.usertypes.DefaultValueIntegerType"
+#~ "\" name=\"default_zero\">\n"
+#~ " <param name=\"default\">0</param>\n"
+#~ "</typedef>]]>"
+#~ msgstr ""
+#~ "<typedef
class=\"com.mycompany.usertypes.DefaultValueIntegerType\" "
+#~ "name=\"default_zero\">\n"
+#~ " <param
name=\"default\">0</param>\n"
+#~ "</typedef>"
+
+#, fuzzy
+#~ msgid "<![CDATA[<property name=\"priority\"
type=\"default_zero\"/>]]>"
+#~ msgstr "<property name=\"priority\"
type=\"default_zero\"/>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Contract\"
table=\"Contracts\"\n"
+#~ " entity-name=\"CurrentContract\">\n"
+#~ " ...\n"
+#~ " <set name=\"history\" inverse=\"true\"\n"
+#~ " order-by=\"effectiveEndDate desc\">\n"
+#~ " <key column=\"currentContractId\"/>\n"
+#~ " <one-to-many
entity-name=\"HistoricalContract\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Contract\"
table=\"ContractHistory\"\n"
+#~ " entity-name=\"HistoricalContract\">\n"
+#~ " ...\n"
+#~ " <many-to-one name=\"currentContract\"\n"
+#~ " column=\"currentContractId\"\n"
+#~ " entity-name=\"CurrentContract\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Contract\" table=\"Contracts\"
\n"
+#~ " entity-name=\"CurrentContract\">\n"
+#~ " ...\n"
+#~ " <set name=\"history\" inverse=\"true\" \n"
+#~ " order-by=\"effectiveEndDate desc\">\n"
+#~ " <key column=\"currentContractId\"/>\n"
+#~ " <one-to-many
entity-name=\"HistoricalContract\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Contract\" table=\"ContractHistory\"
\n"
+#~ " entity-name=\"HistoricalContract\">\n"
+#~ " ...\n"
+#~ " <many-to-one name=\"currentContract\" \n"
+#~ " column=\"currentContractId\" \n"
+#~ " entity-name=\"CurrentContract\"/>\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"LineItem\" table=\"`Line
Item`\">\n"
+#~ " <id name=\"id\" column=\"`Item
Id`\"/><generator class=\"assigned\"/"
+#~ "></id>\n"
+#~ " <property name=\"itemNumber\" column=\"`Item
#`\"/>\n"
+#~ " ...\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"LineItem\" table=\"`Line
Item`\">\n"
+#~ " <id name=\"id\" column=\"`Item
Id`\"/><generator class="
+#~ "\"assigned\"/></id>\n"
+#~ " <property name=\"itemNumber\" column=\"`Item
#`\"/>\n"
+#~ " ...\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[package eg;\n"
+#~ "import java.util.Set;\n"
+#~ "import java.util.Date;\n"
+#~ "\n"
+#~ "/**\n"
+#~ " * @hibernate.class\n"
+#~ " * table=\"CATS\"\n"
+#~ " */\n"
+#~ "public class Cat {\n"
+#~ " private Long id; // identifier\n"
+#~ " private Date birthdate;\n"
+#~ " private Cat mother;\n"
+#~ " private Set kittens\n"
+#~ " private Color color;\n"
+#~ " private char sex;\n"
+#~ " private float weight;\n"
+#~ "\n"
+#~ " /*\n"
+#~ " * @hibernate.id\n"
+#~ " * generator-class=\"native\"\n"
+#~ " * column=\"CAT_ID\"\n"
+#~ " */\n"
+#~ " public Long getId() {\n"
+#~ " return id;\n"
+#~ " }\n"
+#~ " private void setId(Long id) {\n"
+#~ " this.id=id;\n"
+#~ " }\n"
+#~ "\n"
+#~ " /**\n"
+#~ " * @hibernate.many-to-one\n"
+#~ " * column=\"PARENT_ID\"\n"
+#~ " */\n"
+#~ " public Cat getMother() {\n"
+#~ " return mother;\n"
+#~ " }\n"
+#~ " void setMother(Cat mother) {\n"
+#~ " this.mother = mother;\n"
+#~ " }\n"
+#~ "\n"
+#~ " /**\n"
+#~ " * @hibernate.property\n"
+#~ " * column=\"BIRTH_DATE\"\n"
+#~ " */\n"
+#~ " public Date getBirthdate() {\n"
+#~ " return birthdate;\n"
+#~ " }\n"
+#~ " void setBirthdate(Date date) {\n"
+#~ " birthdate = date;\n"
+#~ " }\n"
+#~ " /**\n"
+#~ " * @hibernate.property\n"
+#~ " * column=\"WEIGHT\"\n"
+#~ " */\n"
+#~ " public float getWeight() {\n"
+#~ " return weight;\n"
+#~ " }\n"
+#~ " void setWeight(float weight) {\n"
+#~ " this.weight = weight;\n"
+#~ " }\n"
+#~ "\n"
+#~ " /**\n"
+#~ " * @hibernate.property\n"
+#~ " * column=\"COLOR\"\n"
+#~ " * not-null=\"true\"\n"
+#~ " */\n"
+#~ " public Color getColor() {\n"
+#~ " return color;\n"
+#~ " }\n"
+#~ " void setColor(Color color) {\n"
+#~ " this.color = color;\n"
+#~ " }\n"
+#~ " /**\n"
+#~ " * @hibernate.set\n"
+#~ " * inverse=\"true\"\n"
+#~ " * order-by=\"BIRTH_DATE\"\n"
+#~ " * @hibernate.collection-key\n"
+#~ " * column=\"PARENT_ID\"\n"
+#~ " * @hibernate.collection-one-to-many\n"
+#~ " */\n"
+#~ " public Set getKittens() {\n"
+#~ " return kittens;\n"
+#~ " }\n"
+#~ " void setKittens(Set kittens) {\n"
+#~ " this.kittens = kittens;\n"
+#~ " }\n"
+#~ " // addKitten not needed by Hibernate\n"
+#~ " public void addKitten(Cat kitten) {\n"
+#~ " kittens.add(kitten);\n"
+#~ " }\n"
+#~ "\n"
+#~ " /**\n"
+#~ " * @hibernate.property\n"
+#~ " * column=\"SEX\"\n"
+#~ " * not-null=\"true\"\n"
+#~ " * update=\"false\"\n"
+#~ " */\n"
+#~ " public char getSex() {\n"
+#~ " return sex;\n"
+#~ " }\n"
+#~ " void setSex(char sex) {\n"
+#~ " this.sex=sex;\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "package eg;\n"
+#~ "import java.util.Set;\n"
+#~ "import java.util.Date;\n"
+#~ "\n"
+#~ "/**\n"
+#~ " * @hibernate.class\n"
+#~ " * table=\"CATS\"\n"
+#~ " */\n"
+#~ "public class Cat {\n"
+#~ " private Long id; // identifier\n"
+#~ " private Date birthdate;\n"
+#~ " private Cat mother;\n"
+#~ " private Set kittens\n"
+#~ " private Color color;\n"
+#~ " private char sex;\n"
+#~ " private float weight;\n"
+#~ "\n"
+#~ " /*\n"
+#~ " * @hibernate.id\n"
+#~ " * generator-class=\"native\"\n"
+#~ " * column=\"CAT_ID\"\n"
+#~ " */\n"
+#~ " public Long getId() {\n"
+#~ " return id;\n"
+#~ " }\n"
+#~ " private void setId(Long id) {\n"
+#~ " this.id=id;\n"
+#~ " }\n"
+#~ "\n"
+#~ " /**\n"
+#~ " * @hibernate.many-to-one\n"
+#~ " * column=\"PARENT_ID\"\n"
+#~ " */\n"
+#~ " public Cat getMother() {\n"
+#~ " return mother;\n"
+#~ " }\n"
+#~ " void setMother(Cat mother) {\n"
+#~ " this.mother = mother;\n"
+#~ " }\n"
+#~ "\n"
+#~ " /**\n"
+#~ " * @hibernate.property\n"
+#~ " * column=\"BIRTH_DATE\"\n"
+#~ " */\n"
+#~ " public Date getBirthdate() {\n"
+#~ " return birthdate;\n"
+#~ " }\n"
+#~ " void setBirthdate(Date date) {\n"
+#~ " birthdate = date;\n"
+#~ " }\n"
+#~ " /**\n"
+#~ " * @hibernate.property\n"
+#~ " * column=\"WEIGHT\"\n"
+#~ " */\n"
+#~ " public float getWeight() {\n"
+#~ " return weight;\n"
+#~ " }\n"
+#~ " void setWeight(float weight) {\n"
+#~ " this.weight = weight;\n"
+#~ " }\n"
+#~ "\n"
+#~ " /**\n"
+#~ " * @hibernate.property\n"
+#~ " * column=\"COLOR\"\n"
+#~ " * not-null=\"true\"\n"
+#~ " */\n"
+#~ " public Color getColor() {\n"
+#~ " return color;\n"
+#~ " }\n"
+#~ " void setColor(Color color) {\n"
+#~ " this.color = color;\n"
+#~ " }\n"
+#~ " /**\n"
+#~ " * @hibernate.set\n"
+#~ " * inverse=\"true\"\n"
+#~ " * order-by=\"BIRTH_DATE\"\n"
+#~ " * @hibernate.collection-key\n"
+#~ " * column=\"PARENT_ID\"\n"
+#~ " * @hibernate.collection-one-to-many\n"
+#~ " */\n"
+#~ " public Set getKittens() {\n"
+#~ " return kittens;\n"
+#~ " }\n"
+#~ " void setKittens(Set kittens) {\n"
+#~ " this.kittens = kittens;\n"
+#~ " }\n"
+#~ " // addKitten not needed by Hibernate\n"
+#~ " public void addKitten(Cat kitten) {\n"
+#~ " kittens.add(kitten);\n"
+#~ " }\n"
+#~ "\n"
+#~ " /**\n"
+#~ " * @hibernate.property\n"
+#~ " * column=\"SEX\"\n"
+#~ " * not-null=\"true\"\n"
+#~ " * update=\"false\"\n"
+#~ " */\n"
+#~ " public char getSex() {\n"
+#~ " return sex;\n"
+#~ " }\n"
+#~ " void setSex(char sex) {\n"
+#~ " this.sex=sex;\n"
+#~ " }\n"
+#~ "}"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[@Entity(access = AccessType.FIELD)\n"
+#~ "public class Customer implements Serializable {\n"
+#~ "\n"
+#~ " @Id;\n"
+#~ " Long id;\n"
+#~ "\n"
+#~ " String firstName;\n"
+#~ " String lastName;\n"
+#~ " Date birthday;\n"
+#~ "\n"
+#~ " @Transient\n"
+#~ " Integer age;\n"
+#~ "\n"
+#~ " @Embedded\n"
+#~ " private Address homeAddress;\n"
+#~ "\n"
+#~ " @OneToMany(cascade=CascadeType.ALL)\n"
+#~ " @JoinColumn(name=\"CUSTOMER_ID\")\n"
+#~ " Set<Order> orders;\n"
+#~ "\n"
+#~ " // Getter/setter and business methods\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "@Entity(access = AccessType.FIELD)\n"
+#~ "public class Customer implements Serializable {\n"
+#~ "\n"
+#~ " @Id;\n"
+#~ " Long id;\n"
+#~ "\n"
+#~ " String firstName;\n"
+#~ " String lastName;\n"
+#~ " Date birthday;\n"
+#~ "\n"
+#~ " @Transient\n"
+#~ " Integer age;\n"
+#~ "\n"
+#~ " @Embedded\n"
+#~ " private Address homeAddress;\n"
+#~ "\n"
+#~ " @OneToMany(cascade=CascadeType.ALL)\n"
+#~ " @JoinColumn(name=\"CUSTOMER_ID\")\n"
+#~ " Set<Order> orders;\n"
+#~ "\n"
+#~ " // Getter/setter and business methods\n"
+#~ "}"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ " ...\n"
+#~ " <database-object>\n"
+#~ " <create>CREATE TRIGGER my_trigger ...</create>\n"
+#~ " <drop>DROP TRIGGER my_trigger</drop>\n"
+#~ " </database-object>\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<hibernate-mapping>\n"
+#~ " ...\n"
+#~ " <database-object>\n"
+#~ " <create>CREATE TRIGGER my_trigger
...</create>\n"
+#~ " <drop>DROP TRIGGER
my_trigger</drop>\n"
+#~ " </database-object>\n"
+#~ "</hibernate-mapping>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ " ...\n"
+#~ " <database-object>\n"
+#~ " <definition class=\"MyTriggerDefinition\"/>\n"
+#~ " </database-object>\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<hibernate-mapping>\n"
+#~ " ...\n"
+#~ " <database-object>\n"
+#~ " <definition
class=\"MyTriggerDefinition\"/>\n"
+#~ " </database-object>\n"
+#~ "</hibernate-mapping>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ " ...\n"
+#~ " <database-object>\n"
+#~ " <definition class=\"MyTriggerDefinition\"/>\n"
+#~ " <dialect-scope
name=\"org.hibernate.dialect.Oracle9iDialect\"/>\n"
+#~ " <dialect-scope
name=\"org.hibernate.dialect.Oracle10gDialect\"/>\n"
+#~ " </database-object>\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<hibernate-mapping>\n"
+#~ " ...\n"
+#~ " <database-object>\n"
+#~ " <definition
class=\"MyTriggerDefinition\"/>\n"
+#~ " <dialect-scope
name=\"org.hibernate.dialect.Oracle9Dialect\"/"
+#~ ">\n"
+#~ " <dialect-scope
name=\"org.hibernate.dialect.OracleDialect\"/"
+#~ ">\n"
+#~ " </database-object>\n"
+#~ "</hibernate-mapping>"
+
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/batch.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/batch.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/batch.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,615 +1,408 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2010-01-08T04:07:18\n"
+"PO-Revision-Date: 2010-01-11 10:33+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: batch.xml:29
#, no-c-format
msgid "Batch processing"
msgstr "批量处理(Batch processing)"
#. Tag: para
-#: batch.xml:31
-#, fuzzy, 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 条记录插入到数据库的一个很自然的做法可能是这样的"
-
-#. Tag: programlisting
-#: batch.xml:36
#, no-c-format
-msgid ""
-"<![CDATA[Session session = sessionFactory.openSession();\n"
-"Transaction tx = session.beginTransaction();\n"
-"for ( int i=0; i<100000; i++ ) {\n"
-" Customer customer = new Customer(.....);\n"
-" session.save(customer);\n"
-"}\n"
-"tx.commit();\n"
-"session.close();]]>"
-msgstr ""
+msgid "A naive approach to inserting 100,000 rows in the database using Hibernate
might look like this:"
+msgstr "使用 Hibernate 将 100,000 条记录插入到数据库的一个很天真的做法可能是这样的:"
#. Tag: para
-#: batch.xml:38
-#, fuzzy, no-c-format
-msgid ""
-"This would fall over with an <literal>OutOfMemoryException</literal>
"
-"somewhere around the 50,000th row. That is because Hibernate caches all the "
-"newly inserted <literal>Customer</literal> instances in the
session-level "
-"cache. In this chapter we will show you how to avoid this problem."
-msgstr ""
-"这段程序大概运行到 50 000 条记录左右会失败并抛出 <literal>内存溢出异常"
-"(OutOfMemoryException)</literal> 。 这是因为 Hibernate 把所有新插入的 "
-"<literal>客户(Customer)</literal>实例在 session级别的缓存区进行了缓存的缘"
-"故。"
+#, no-c-format
+msgid "This would fall over with an
<literal>OutOfMemoryException</literal> somewhere around the 50,000th row.
That is because Hibernate caches all the newly inserted
<literal>Customer</literal> instances in the session-level cache. In this
chapter we will show you how to avoid this problem."
+msgstr "这段程序大概运行到 50,000
条记录左右会失败并抛出<literal>内存溢出异常(OutOfMemoryException)</literal> 。这是因为 Hibernate
把所有新插入的<literal>客户(Customer)</literal>实例在 session 级别的缓存区进行了缓存的缘故。 "
#. Tag: para
-#: batch.xml:45
-#, fuzzy, 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之间):"
-
-#. Tag: programlisting
-#: batch.xml:52
#, no-c-format
-msgid "<![CDATA[hibernate.jdbc.batch_size 20]]>"
-msgstr ""
+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
-#: batch.xml:54
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate disables insert batching at the JDBC level transparently if you "
-"use an <literal>identity</literal> identifier generator."
-msgstr ""
-"注意,假若你使用了<literal>identiy</literal>标识符生成器,Hibernate在JDBC级别透"
-"明的关闭插入语句的批量执行。"
+#, no-c-format
+msgid "Hibernate disables insert batching at the JDBC level transparently if you use
an <literal>identity</literal> identifier generator."
+msgstr "注意,假若你使用了 <literal>identiy</literal> 标识符生成器,Hibernate 在 JDBC
级别透明的关闭插入语句的批量执行。 "
#. Tag: para
-#: batch.xml:59
-#, fuzzy, 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:"
-msgstr "你也可能想在执行批量处理时关闭二级缓存:"
-
-#. Tag: programlisting
-#: batch.xml:64
#, no-c-format
-msgid "<![CDATA[hibernate.cache.use_second_level_cache false]]>"
-msgstr ""
+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
-#: batch.xml:66
#, no-c-format
-msgid ""
-"However, this is not absolutely necessary, since we can explicitly set the "
-"<literal>CacheMode</literal> to disable interaction with the
second-level "
-"cache."
-msgstr ""
-"但是,这不是绝对必须的,因为我们可以显式设置<literal>CacheMode</literal>来关"
-"闭与二级缓存的交互。"
+msgid "However, this is not absolutely necessary, since we can explicitly set the
<literal>CacheMode</literal> to disable interaction with the second-level
cache."
+msgstr "但是,这不是绝对必须的,因为我们可以显式设置 <literal>CacheMode</literal>
来关闭与二级缓存的交互。"
#. Tag: title
-#: batch.xml:72
#, no-c-format
msgid "Batch inserts"
msgstr "批量插入(Batch inserts)"
#. Tag: para
-#: batch.xml:74
-#, fuzzy, no-c-format
-msgid ""
-"When making new objects persistent <literal>flush()</literal> and then
"
-"<literal>clear()</literal> the session regularly in order to control
the "
-"size of the first-level cache."
-msgstr ""
-"如果要将很多对象持久化,你必须通过经常的调用 <literal>flush()</literal> 以及"
-"稍后调用 <literal>clear()</literal> 来控制第一级缓存的大小。"
-
-#. Tag: programlisting
-#: batch.xml:80
#, no-c-format
-msgid ""
-"<![CDATA[Session session = sessionFactory.openSession();\n"
-"Transaction tx = session.beginTransaction();\n"
-" \n"
-"for ( int i=0; i<100000; i++ ) {\n"
-" Customer customer = new Customer(.....);\n"
-" session.save(customer);\n"
-" if ( i % 20 == 0 ) { //20, same as the JDBC batch size\n"
-" //flush a batch of inserts and release memory:\n"
-" session.flush();\n"
-" session.clear();\n"
-" }\n"
-"}\n"
-" \n"
-"tx.commit();\n"
-"session.close();]]>"
-msgstr ""
+msgid "When making new objects persistent <literal>flush()</literal> and
then <literal>clear()</literal> the session regularly in order to control the
size of the first-level cache."
+msgstr "如果要将很多对象持久化,你必须通过经常的调用 <literal>flush()</literal> 以及稍后调用
<literal>clear()</literal> 来控制第一级缓存的大小。 "
#. Tag: title
-#: batch.xml:85
#, no-c-format
msgid "Batch updates"
msgstr "批量更新(Batch updates)"
#. Tag: para
-#: batch.xml:87
-#, fuzzy, no-c-format
-msgid ""
-"For retrieving and updating data, the same ideas apply. In addition, you "
-"need to use <literal>scroll()</literal> to take advantage of
server-side "
-"cursors for queries that return many rows of data."
-msgstr ""
-"此方法同样适用于检索和更新数据。此外,在进行会返回很多行数据的查询时, 你需要"
-"使用 <literal>scroll()</literal> 方法以便充分利用服务器端游标所带来的好处。"
-
-#. Tag: programlisting
-#: batch.xml:93
#, no-c-format
-msgid ""
-"<![CDATA[Session session = sessionFactory.openSession();\n"
-"Transaction tx = session.beginTransaction();\n"
-" \n"
-"ScrollableResults customers =
session.getNamedQuery(\"GetCustomers\")\n"
-" .setCacheMode(CacheMode.IGNORE)\n"
-" .scroll(ScrollMode.FORWARD_ONLY);\n"
-"int count=0;\n"
-"while ( customers.next() ) {\n"
-" Customer customer = (Customer) customers.get(0);\n"
-" customer.updateStuff(...);\n"
-" if ( ++count % 20 == 0 ) {\n"
-" //flush a batch of updates and release memory:\n"
-" session.flush();\n"
-" session.clear();\n"
-" }\n"
-"}\n"
-" \n"
-"tx.commit();\n"
-"session.close();]]>"
-msgstr ""
+msgid "For retrieving and updating data, the same ideas apply. In addition, you need
to use <literal>scroll()</literal> to take advantage of server-side cursors
for queries that return many rows of data."
+msgstr "此方法同样适用于检索和更新数据。此外,在进行会返回很多行数据的查询时,你需要使用
<literal>scroll()</literal> 方法以便充分利用服务器端游标所带来的好处。 "
#. Tag: title
-#: batch.xml:98
#, no-c-format
msgid "The StatelessSession interface"
-msgstr "StatelessSession (无状态session)接口"
+msgstr "StatelessSession(无状态 session)接口"
#. Tag: para
-#: batch.xml:99
-#, fuzzy, 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 <literal>StatelessSession</literal> has no persistence context
associated "
-"with it and does not provide many of the higher-level life cycle semantics. "
-"In particular, a stateless session does not implement a first-level cache "
-"nor interact with any second-level or query cache. It does not implement "
-"transactional write-behind or automatic dirty checking. Operations performed
"
-"using a stateless session 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的形式把数据以流"
-"的方法加入到数据库,或从数据库输出。<literal>StatelessSession</literal>没有持"
-"久化上下文,也不提供多少高层的生命周期语义。特别是,无状态session不实现第一级"
-"cache,也不和第二级缓存,或者查询缓存交互。它不实现事务化写,也不实现脏数据检"
-"查。用stateless session进行的操作甚至不级联到关联实例。stateless session忽略"
-"集合类(Collections)。通过stateless session进行的操作不触发Hibernate的事件模型"
-"和拦截器。无状态session对数据的混淆现象免疫,因为它没有第一级缓存。无状态"
-"session是低层的抽象,和低层JDBC相当接近。"
-
-#. Tag: programlisting
-#: batch.xml:114
#, no-c-format
-msgid ""
-"<![CDATA[StatelessSession session =
sessionFactory.openStatelessSession();\n"
-"Transaction tx = session.beginTransaction();\n"
-" \n"
-"ScrollableResults customers =
session.getNamedQuery(\"GetCustomers\")\n"
-" .scroll(ScrollMode.FORWARD_ONLY);\n"
-"while ( customers.next() ) {\n"
-" Customer customer = (Customer) customers.get(0);\n"
-" customer.updateStuff(...);\n"
-" session.update(customer);\n"
-"}\n"
-" \n"
-"tx.commit();\n"
-"session.close();]]>"
-msgstr ""
+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
<literal>StatelessSession</literal> has no persistence context associated with
it and does not provide many of the higher-level life cycle semantics. In particular, a
stateless session does not implement a first-level cache nor interact with any
second-level or query cache. It does not implement transactional write-behind or automatic
dirty checking. Operations performed using a stateless session 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
的形式把数据以流的方法加入到数据库,或从数据库输出。<literal>StatelessSession</literal>
没有持久化上下文,也不提供多少高层的生命周期语义。特别是,无状态 session 不实现第一级
cache,也不和第二级缓存,或者查询缓存交互。它不实现事务化写,也不实现脏数据检查。用 stateless session 进行的操作甚至不级联到关联实例。stateless
session 忽略集合类(Collections)。通过 stateless session 进行的操作不触发 Hibernate 的事件模型和拦截器。无状态 session
对数据的混淆现象免疫,因为它没有第一级缓存。无状态 session 是低层的抽象,和低层 JDBC 相当接近。 "
#. Tag: para
-#: batch.xml:116
-#, fuzzy, no-c-format
-msgid ""
-"In this code example, the <literal>Customer</literal> instances
returned by "
-"the query are immediately detached. They are never associated with any "
-"persistence context."
-msgstr ""
-"注意在上面的例子中,查询返回的<literal>Customer</literal>实例立即被脱管"
-"(detach)。它们与任何持久化上下文都没有关系。"
+#, no-c-format
+msgid "In this code example, the <literal>Customer</literal> instances
returned by the query are immediately detached. They are never associated with any
persistence context."
+msgstr "注意在上面的例子中,查询返回的 <literal>Customer</literal>
实例立即被脱管(detach)。它们与任何持久化上下文都没有关系。 "
#. Tag: para
-#: batch.xml:122
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>insert(), update()</literal> and
<literal>delete()</literal> "
-"operations defined by the <literal>StatelessSession</literal> interface
are "
-"considered to be direct database row-level operations. They result in the "
-"immediate execution of a SQL <literal>INSERT, UPDATE</literal> or
"
-"<literal>DELETE</literal> respectively. They have different semantics
to the "
-"<literal>save(), saveOrUpdate()</literal> and
<literal>delete()</literal> "
-"operations defined by the <literal>Session</literal> interface."
-msgstr ""
-"<literal>StatelessSession</literal> 接口定义的<literal>insert(),
update()</"
-"literal> 和 <literal>delete()</literal>操作是直接的数据库行级别操作,其结果是"
-"立刻执行一条<literal>INSERT, UPDATE</literal> 或
<literal>DELETE</literal> 语"
-"句。因此,它们的语义和<literal>Session</literal> 接口定义的<literal>save(),
"
-"saveOrUpdate()</literal> 和<literal>delete()</literal>
操作有很大的不同。"
+#, no-c-format
+msgid "The <literal>insert(), update()</literal> and
<literal>delete()</literal> operations defined by the
<literal>StatelessSession</literal> interface are considered to be direct
database row-level operations. They result in the immediate execution of a SQL
<literal>INSERT, UPDATE</literal> or <literal>DELETE</literal>
respectively. They have different semantics to the <literal>save(),
saveOrUpdate()</literal> and <literal>delete()</literal> operations
defined by the <literal>Session</literal> interface."
+msgstr "<literal>StatelessSession</literal> 接口定义的
<literal>insert(), update()</literal> 和
<literal>delete()</literal> 操作是直接的数据库行级别操作,其结果是立刻执行一条 <literal>INSERT,
UPDATE</literal> 或 <literal>DELETE</literal> 语句。因此,它们的语义和
<literal>Session</literal> 接口定义的 <literal>save(),
saveOrUpdate()</literal> 和<literal>delete()</literal> 操作有很大的不同。 "
#. Tag: title
-#: batch.xml:135
#, no-c-format
msgid "DML-style operations"
-msgstr "DML(数据操作语言)风格的操作(DML-style operations)"
+msgstr "DML(数据操作语言)风格的操作(DML-style operations)"
#. Tag: para
-#: batch.xml:137
-#, 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 <literal>Data Manipulation Language</literal>
(DML) "
-"the statements: <literal>INSERT</literal>,
<literal>UPDATE</literal>, "
-"<literal>DELETE</literal>) 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 (<link
linkend=\"queryhql"
-"\">HQL</link>)."
-msgstr ""
-"hence manipulating (using the SQL <literal>Data Manipulation
Language</"
-"literal> (DML) statements: <literal>INSERT</literal>,
<literal>UPDATE</"
-"literal>, <literal>DELETE</literal>) data directly in the database
will not "
-"affect in-memory state. However, Hibernate provides methods for bulk SQL-"
-"style DML statement execution which are performed through the Hibernate "
-"Query Language (<xref linkend=\"queryhql\">HQL</xref>).
就像已经讨论的那样,"
-"自动和透明的 对象/关系 映射(object/relational mapping)关注于管理对象的状"
-"态。 这就意味着对象的状态存在于内存,因此直接操作 (使用 SQL <literal>Data "
-"Manipulation Language</literal>(DML,数据操作语言)语句
:<literal>INSERT</"
-"literal> ,<literal>UPDATE</literal> 和
<literal>DELETE</literal>) 数据库中的"
-"数据将不会影响内存中的对象状态和对象数据。 不过,Hibernate提供通过Hibernate查"
-"询语言(<xref linkend=\"queryhql\">HQL</xref>)来执行大批
量SQL风格的DML语句"
-"的方法。"
+#, 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
<literal>Data Manipulation Language</literal> (DML) the statements:
<literal>INSERT</literal>, <literal>UPDATE</literal>,
<literal>DELETE</literal>) 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 (<xref linkend=\"queryhql\" />)."
+msgstr "就像已经讨论的那样,自动和透明的对象/关系映射(object/relational
mapping)关注于管理对象的状态。这就意味着对象的状态存在于内存,因此直接操作(使用 SQL <literal>Data Manipulation
Language</literal>(DML,数据操作语言)语句 :<literal>INSERT</literal>
,<literal>UPDATE</literal> 和 <literal>DELETE</literal>)
数据库中的数据将不会影响内存中的对象状态和对象数据。不过,Hibernate 提供通过 Hibernate 查询语言(<xref
linkend=\"queryhql\"/>)来执行大批量 SQL 风格的 DML 语句的方法。 "
#. Tag: para
-#: batch.xml:146
-#, fuzzy, no-c-format
-msgid ""
-"The pseudo-syntax for <literal>UPDATE</literal> and
<literal>DELETE</"
-"literal> statements is: <literal>( UPDATE | DELETE ) FROM? EntityName
(WHERE "
-"where_conditions)?</literal>."
-msgstr ""
-"<literal>UPDATE</literal> 和
<literal>DELETE</literal>语句的语法为: "
-"<literal>( UPDATE | DELETE ) FROM? EntityName (WHERE
where_conditions)?</"
-"literal> 有几点说明:"
+#, no-c-format
+msgid "The pseudo-syntax for <literal>UPDATE</literal> and
<literal>DELETE</literal> statements is: <literal>( UPDATE | DELETE )
FROM? EntityName (WHERE where_conditions)?</literal>."
+msgstr "<literal>UPDATE</literal> 和
<literal>DELETE</literal> 语句的伪语法为:<literal>( UPDATE | DELETE ) FROM?
EntityName (WHERE where_conditions)?</literal>。"
#. Tag: para
-#: batch.xml:151
#, no-c-format
msgid "Some points to note:"
-msgstr ""
+msgstr "要注意的事项:"
#. Tag: para
-#: batch.xml:157
#, no-c-format
msgid "In the from-clause, the FROM keyword is optional"
-msgstr "在FROM子句(from-clause)中,FROM关键字是可选的"
+msgstr "在 FROM 子句(from-clause)中,FROM 关键字是可选的"
#. Tag: para
-#: batch.xml:162
-#, fuzzy, 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)中只能有一个实体名,它可以是别名。如果实体名是别名,"
-"那么任何被引用的属性都必须加上此别名的前缀;如果不是别名,那么任何有前缀的属"
-"性引用都是非法的。"
+#, 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)中只能有一个实体名,它可以是别名。如果实体名是别名,那么任何被引用的属性都必须加上此别名的前缀;如果不是别名,那么任何有前缀的属性引用都是非法的。
"
#. Tag: para
-#: batch.xml:170
-#, fuzzy, no-c-format
-msgid ""
-"No <link linkend=\"queryhql-joins-forms\">joins</link>,
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语句中使用<xref
linkend=\"queryhql-joins-forms\">连接(join)</"
-"xref>(显式或者隐式的都不行)。不过在WHERE子句中可以使用子查询。可以在where子"
-"句中使用子查询,子查询本身可以包含join。"
+#, no-c-format
+msgid "No <xref linkend=\"queryhql-joins-forms\" />, 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 语句中使用 <xref linkend=\"queryhql-joins-forms\"/>
连接(显式或者隐式的都不行)。不过在 WHERE 子句中可以使用子查询。可以在 where 子句中使用子查询,子查询本身可以包含 join。 "
#. Tag: para
-#: batch.xml:177
#, no-c-format
msgid "The where-clause is also optional."
-msgstr "整个WHERE子句是可选的。"
+msgstr "整个 WHERE 子句是可选的。"
#. Tag: para
-#: batch.xml:183
-#, fuzzy, no-c-format
-msgid ""
-"As an example, to execute an HQL <literal>UPDATE</literal>, use the
"
-"<literal>Query.executeUpdate()</literal> method. The method is named
for "
-"those familiar with JDBC's
<literal>PreparedStatement.executeUpdate()</"
-"literal>:"
-msgstr ""
-"举个例子,使用<literal>Query.executeUpdate()</literal>方法执行一个HQL "
-"<literal>UPDATE</literal>语句(: (方法命名是来源于JDBC's "
-"<literal>PreparedStatement.executeUpdate()</literal>):"
-
-#. Tag: programlisting
-#: batch.xml:189
#, no-c-format
-msgid ""
-"<![CDATA[Session session = sessionFactory.openSession();\n"
-"Transaction tx = session.beginTransaction();\n"
-"\n"
-"String hqlUpdate = \"update Customer c set c.name = :newName where c.name =
:"
-"oldName\";\n"
-"// or String hqlUpdate = \"update Customer set name = :newName where name =
:"
-"oldName\";\n"
-"int updatedEntities = s.createQuery( hqlUpdate )\n"
-" .setString( \"newName\", newName )\n"
-" .setString( \"oldName\", oldName )\n"
-" .executeUpdate();\n"
-"tx.commit();\n"
-"session.close();]]>"
-msgstr ""
+msgid "As an example, to execute an HQL <literal>UPDATE</literal>, use
the <literal>Query.executeUpdate()</literal> method. The method is named for
those familiar with JDBC's
<literal>PreparedStatement.executeUpdate()</literal>:"
+msgstr "举个例子,使用 <literal>Query.executeUpdate()</literal> 方法执行一个 HQL
<literal>UPDATE</literal>语句(方法命名是来源于 JDBC 的
<literal>PreparedStatement.executeUpdate()</literal>): "
#. Tag: para
-#: batch.xml:191
-#, fuzzy, no-c-format
-msgid ""
-"In keeping with the EJB3 specification, HQL <literal>UPDATE</literal>
"
-"statements, by default, do not effect the <link linkend=\"mapping-"
-"declaration-version\">version</link> or the <link
linkend=\"mapping-"
-"declaration-timestamp\">timestamp</link> property values for the
affected "
-"entities. However, you can force Hibernate to reset the
<literal>version</"
-"literal> or <literal>timestamp</literal> property values through the
use of "
-"a <literal>versioned update</literal>. This is achieved by adding the
"
-"<literal>VERSIONED</literal> keyword after the
<literal>UPDATE</literal> "
-"keyword."
-msgstr ""
-"HQL <literal>UPDATE</literal>语句,默认不会影响更新实体的<xref linkend="
-"\"mapping-declaration-version\">version</xref>或者<xref
linkend=\"mapping-"
-"declaration-timestamp\">timestamp</xref>属性值。这和EJB3规范是一致的。但是,"
-"通过使用<literal>versioned update</literal>,你可以强制Hibernate正确的重置"
-"<literal>version</literal>或者<literal>timestamp</literal>属性值。这通过在"
-"<literal>UPDATE</literal>关键字后面增加<literal>VERSIONED</literal>关键字来实"
-"现的。"
-
-#. Tag: programlisting
-#: batch.xml:201
#, no-c-format
-msgid ""
-"<![CDATA[Session session = sessionFactory.openSession();\n"
-"Transaction tx = session.beginTransaction();\n"
-"String hqlVersionedUpdate = \"update versioned Customer set name = :newName
"
-"where name = :oldName\";\n"
-"int updatedEntities = s.createQuery( hqlUpdate )\n"
-" .setString( \"newName\", newName )\n"
-" .setString( \"oldName\", oldName )\n"
-" .executeUpdate();\n"
-"tx.commit();\n"
-"session.close();]]>"
-msgstr ""
+msgid "In keeping with the EJB3 specification, HQL
<literal>UPDATE</literal> statements, by default, do not effect the version
(<xref linkend=\"mapping-declaration-version\" />) or the timestamp
(<xref linkend=\"mapping-declaration-timestamp\" />) property values for
the affected entities. However, you can force Hibernate to reset the
<literal>version</literal> or <literal>timestamp</literal>
property values through the use of a <literal>versioned update</literal>. This
is achieved by adding the <literal>VERSIONED</literal> keyword after the
<literal>UPDATE</literal> keyword."
+msgstr "HQL <literal>UPDATE</literal> 语句,默认不会影响更新实体的 <xref
linkend=\"mapping-declaration-version\"/> 或者 <xref
linkend=\"mapping-declaration-timestamp\"/> 属性值。这和 EJB3 规范是一致的。但是,通过使用
<literal>versioned update</literal>,你可以强制 Hibernate
正确的重置<literal>version</literal> 或者 <literal>timestamp</literal>
属性值。这通过在 <literal>UPDATE</literal> 关键字后面增加
<literal>VERSIONED</literal> 关键字来实现的。 "
#. Tag: para
-#: batch.xml:203
-#, fuzzy, no-c-format
-msgid ""
-"Custom version types,
<literal>org.hibernate.usertype.UserVersionType</"
-"literal>, are not allowed in conjunction with a <literal>update
versioned</"
-"literal> statement."
-msgstr ""
-"注意,自定义的版本类型(<literal>org.hibernate.usertype.UserVersionType</"
-"literal>)不允许和<literal>update versioned</literal>语句联用。"
+#, no-c-format
+msgid "Custom version types,
<literal>org.hibernate.usertype.UserVersionType</literal>, are not allowed in
conjunction with a <literal>update versioned</literal> statement."
+msgstr
"注意,自定义的版本类型(<literal>org.hibernate.usertype.UserVersionType</literal>)不允许和
<literal>update versioned</literal> 语句联用。 "
#. Tag: para
-#: batch.xml:208
#, no-c-format
-msgid ""
-"To execute an HQL <literal>DELETE</literal>, use the same
<literal>Query."
-"executeUpdate()</literal> method:"
-msgstr ""
-"执行一个HQL <literal>DELETE</literal>,同样使用
<literal>Query.executeUpdate"
-"()</literal> 方法:"
+msgid "To execute an HQL <literal>DELETE</literal>, use the same
<literal>Query.executeUpdate()</literal> method:"
+msgstr "执行一个 HQL <literal>DELETE</literal>,同样使用
<literal>Query.executeUpdate()</literal> 方法:"
-#. Tag: programlisting
-#: batch.xml:213
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[Session session = sessionFactory.openSession();\n"
-"Transaction tx = session.beginTransaction();\n"
-"\n"
-"String hqlDelete = \"delete Customer c where c.name =
:oldName\";\n"
-"// or String hqlDelete = \"delete Customer where name =
:oldName\";\n"
-"int deletedEntities = s.createQuery( hqlDelete )\n"
-" .setString( \"oldName\", oldName )\n"
-" .executeUpdate();\n"
-"tx.commit();\n"
-"session.close();]]>"
-msgstr ""
+msgid "The <literal>int</literal> value returned by the
<literal>Query.executeUpdate()</literal> 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 "由 <literal>Query.executeUpdate()</literal>
方法返回的<literal>整型</literal>值表明了受此操作影响的记录数量。注意这个数值可能与数据库中被(最后一条 SQL
语句)影响了的“行”数有关,也可能没有。一个大批量 HQL 操作可能导致多条实际的SQL语句被执行,举个例子,对 joined-subclass
映射方式的类进行的此类操作。这个返回值代表了实际被语句影响了的记录数量。在那个 joined-subclass 的例子中,
对一个子类的删除实际上可能不仅仅会删除子类映射到的表而且会影响“根”表,还有可能影响与之有继承关系的 joined-subclass 映射方式的子类的表。 "
#. Tag: para
-#: batch.xml:215
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>int</literal> value returned by the
<literal>Query.executeUpdate"
-"()</literal> 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 ""
-"由<literal>Query.executeUpdate()</literal>方法返回的<literal>整型</literal>值"
-"表明了受此操作影响的记录数量。 注意这个数值可能与数据库中被(最后一条SQL语"
-"句)影响了的“行”数有关,也可能没有。一个大批量HQL操作可能导致多条实际的SQL语"
-"句被执行, 举个例子,对joined-subclass映射方式的类进行的此类操作。这个返回值"
-"代表了实际被语句影响了的记录数量。在那个joined-subclass的例子中, 对一个子类"
-"的删除实际上可能不仅仅会删除子类映射到的表而且会影响“根”表,还有可能影响与之"
-"有继承关系的joined-subclass映射方式的子类的表。"
+#, no-c-format
+msgid "The pseudo-syntax for <literal>INSERT</literal> statements is:
<literal>INSERT INTO EntityName properties_list select_statement</literal>.
Some points to note:"
+msgstr "<literal>INSERT</literal> 语句的伪码是:<literal>INSERT INTO
EntityName properties_list select_statement</literal>。要注意的是:"
#. Tag: para
-#: batch.xml:226
#, no-c-format
-msgid ""
-"The pseudo-syntax for <literal>INSERT</literal> statements is: "
-"<literal>INSERT INTO EntityName properties_list
select_statement</literal>. "
-"Some points to note:"
-msgstr ""
-"<literal>INSERT</literal>语句的伪码是: <literal>INSERT INTO EntityName
"
-"properties_list select_statement</literal>. 要注意的是:"
+msgid "Only the INSERT INTO ... SELECT ... form is supported; not the INSERT INTO
... VALUES ... form."
+msgstr "只支持 INSERT INTO ... SELECT ... 形式,不支持 INSERT INTO ... VALUES ... 形式。"
#. Tag: para
-#: batch.xml:234
#, 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 properties_list is analogous to the <literal>column
specification</literal> in the SQL <literal>INSERT</literal> 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,
<literal>INSERT</literal> statements are inherently non-polymorphic."
+msgstr "properties_list 和 SQL <literal>INSERT</literal>
语句中的<literal>字段定义(column
speficiation)</literal>类似。对参与继承树映射的实体而言,只有直接定义在给定的类级别的属性才能直接在 properties_list
中使用。超类的属性不被支持;子类的属性无意义。换句话说,<literal>INSERT</literal> 天生不支持多态性。"
#. Tag: para
-#: batch.xml:237
-#, fuzzy, no-c-format
-msgid ""
-"The properties_list is analogous to the <literal>column
specification</"
-"literal> in the SQL <literal>INSERT</literal> 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, "
-"<literal>INSERT</literal> statements are inherently
non-polymorphic."
-msgstr ""
-"properties_list和SQL
<literal>INSERT</literal>语句中的<literal>字段定义"
-"(column speficiation)</literal>类似。对参与继承树映射的实体而言,只有直接定义"
-"在给定的类级别的属性才能直接在properties_list中使用。超类的属性不被支持;子类"
-"的属性无意义。换句话说,<literal>INSERT</literal>天生不支持多态。"
+#, 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 <literal>Type</literal>s
which are <emphasis>equivalent</emphasis> as opposed to
<emphasis>equal</emphasis>. This might cause issues with mismatches between a
property defined as a <literal>org.hibernate.type.DateType</literal> and a
property defined as a <literal>org.hibernate.type.TimestampType</literal>,
even though the database might not make a distinction or might be able to handle the
conversion."
+msgstr "select_statement 可以是任何合法的 HQL
选择查询,不过要保证返回类型必须和要插入的类型完全匹配。目前,这一检查是在查询编译的时候进行的,而不是把它交给数据库。注意,在Hibernate<literal>Type</literal>
间如果只是<emphasis>等价(equivalent)</emphasis>而非<emphasis>相等(equal)</emphasis>,会导致问题。定义为
<literal>org.hibernate.type.DateType</literal> 和
<literal>org.hibernate.type.TimestampType</literal>
的两个属性可能会产生类型不匹配错误,虽然数据库级可能不加区分或者可以处理这种转换。 "
#. Tag: para
-#: batch.xml:247
-#, fuzzy, 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 "
-"<literal>Type</literal>s which are
<emphasis>equivalent</emphasis> as "
-"opposed to <emphasis>equal</emphasis>. This might cause issues with
"
-"mismatches between a property defined as a
<literal>org.hibernate.type."
-"DateType</literal> and a property defined as a
<literal>org.hibernate.type."
-"TimestampType</literal>, even though the database might not make a "
-"distinction or might be able to handle the conversion."
-msgstr ""
-"select_statement可以是任何合法的HQL选择查询,不过要保证返回类型必须和要插入的"
-"类型完全匹配。目前,这一检查是在查询编译的时候进行的,而不是把它交给数据库。"
-"注意,在Hibernate<literal>Type</literal>间如果只是<emphasis>等价"
-"(equivalent)</emphasis>而非<emphasis>相等(equal)</emphasis>,会导致问题。定"
-"义为<literal>org.hibernate.type.DateType</literal>和<literal>org.hibernate."
-"type.TimestampType</literal>的两个属性可能会产生类型不匹配错误,虽然数据库级"
-"可能不加区分或者可以处理这种转换。"
+#, 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
<literal>org.hibernate.id.SequenceGenerator</literal> (and its subclasses) and
any implementers of
<literal>org.hibernate.id.PostInsertIdentifierGenerator</literal>. The most
notable exception here is
<literal>org.hibernate.id.TableHiLoGenerator</literal>, which cannot be used
because it does not expose a selectable way to get its values."
+msgstr "对 id 属性来说,insert 语句给你两个选择。你可以明确地在 properties_list 表中指定 id 属性(这样它的值是从对应的
select 表达式中获得),或者在 properties_list 中省略它(此时使用生成指)。后一种选择只有当使用在数据库中生成值的 id
产生器时才能使用;如果是“内存”中计算的类型生成器,在解析时会抛出一个异常。注意,为了说明这一问题,数据库产生值的生成器是
<literal>org.hibernate.id.SequenceGenerator</literal>(和它的子类),以及任何
<literal>org.hibernate.id.PostInsertIdentifierGenerator</literal>
接口的实现。这儿最值得注意的意外是
<literal>org.hibernate.id.TableHiLoGenerator</literal>,它不能在此使用,因为它没有得到其值的途径。
"
#. Tag: para
-#: batch.xml:259
-#, fuzzy, 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 <literal>org."
-"hibernate.id.SequenceGenerator</literal> (and its subclasses) and any "
-"implementers of
<literal>org.hibernate.id.PostInsertIdentifierGenerator</"
-"literal>. The most notable exception here is
<literal>org.hibernate.id."
-"TableHiLoGenerator</literal>, which cannot be used because it does not
"
-"expose a selectable way to get its values."
-msgstr ""
-"对id属性来说,insert语句给你两个选择。你可以明确地在properties_list表中指定id"
-"属性(这样它的值是从对应的select表达式中获得),或者在properties_list中省略它"
-"(此时使用生成指)。后一种选择只有当使用在数据库中生成值的id产生器时才能使"
-"用;如果是“内存”中计算的类型生成器,在解析时会抛出一个异常。注意,为了说明这"
-"一问题,数据库产生值的生成器是<literal>org.hibernate.id.SequenceGenerator</"
-"literal>(和它的子类),以及任何<literal>org.hibernate.id."
-"PostInsertIdentifierGenerator</literal>接口的实现。这儿最值得注意的意外是"
-"<literal>org.hibernate.id.TableHiLoGenerator</literal>,它不能在此使用,因为"
-"它没有得到其值的途径。"
+#, no-c-format
+msgid "For properties mapped as either <literal>version</literal> or
<literal>timestamp</literal>, the insert statement gives you two options. You
can either specify the property in the properties_list, in which case its value is taken
from the corresponding select expressions, or omit it from the properties_list, in which
case the <literal>seed value</literal> defined by the
<literal>org.hibernate.type.VersionType</literal> is used."
+msgstr "对映射为 <literal>version</literal> 或
<literal>timestamp</literal> 的属性来说,insert 语句也给你两个选择,你可以在 properties_list
表中指定(此时其值从对应的 select 表达式中获得),或者在 properties_list 中省略它(此时,使用在
<literal>org.hibernate.type.VersionType</literal> 中定义的 <literal>seed
value(种子值)</literal>)。"
#. Tag: para
-#: batch.xml:274
-#, fuzzy, no-c-format
-msgid ""
-"For properties mapped as either <literal>version</literal> or "
-"<literal>timestamp</literal>, the insert statement gives you two
options. "
-"You can either specify the property in the properties_list, in which case "
-"its value is taken from the corresponding select expressions, or omit it "
-"from the properties_list, in which case the <literal>seed
value</literal> "
-"defined by the <literal>org.hibernate.type.VersionType</literal> is
used."
-msgstr ""
-"对映射为<literal>version</literal> 或
<literal>timestamp</literal>的属性来"
-"说,insert语句也给你两个选择,你可以在properties_list表中指定(此时其值从对应"
-"的select表达式中获得),或者在properties_list中省略它(此时,使用在"
-"<literal>org.hibernate.type.VersionType</literal>
中定义的<literal>seed value"
-"(种子值)</literal>)。"
+#, no-c-format
+msgid "The following is an example of an HQL <literal>INSERT</literal>
statement execution:"
+msgstr "下面是一个执行 HQL <literal>INSERT</literal> 语句的例子:"
-#. Tag: para
-#: batch.xml:284
-#, fuzzy, no-c-format
-msgid ""
-"The following is an example of an HQL <literal>INSERT</literal>
statement "
-"execution:"
-msgstr "执行HQL <literal>INSERT</literal>语句的例子如下:"
+#~ msgid ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "for ( int i=0; i<100000; i++ ) {\n"
+#~ " Customer customer = new Customer(.....);\n"
+#~ " session.save(customer);\n"
+#~ "}\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "for ( int i=0; i<100000; i++ ) {\n"
+#~ " Customer customer = new Customer(.....);\n"
+#~ " session.save(customer);\n"
+#~ "}\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgid "<![CDATA[hibernate.jdbc.batch_size 20]]>"
+#~ msgstr "<![CDATA[hibernate.jdbc.batch_size 20]]>"
+#~ msgid "<![CDATA[hibernate.cache.use_second_level_cache false]]>"
+#~ msgstr "<![CDATA[hibernate.cache.use_second_level_cache false]]>"
+#~ msgid ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ " \n"
+#~ "for ( int i=0; i<100000; i++ ) {\n"
+#~ " Customer customer = new Customer(.....);\n"
+#~ " session.save(customer);\n"
+#~ " if ( i % 20 == 0 ) { //20, same as the JDBC batch size\n"
+#~ " //flush a batch of inserts and release memory:\n"
+#~ " session.flush();\n"
+#~ " session.clear();\n"
+#~ " }\n"
+#~ "}\n"
+#~ " \n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ " \n"
+#~ "for ( int i=0; i<100000; i++ ) {\n"
+#~ " Customer customer = new Customer(.....);\n"
+#~ " session.save(customer);\n"
+#~ " if ( i % 20 == 0 ) { //20, same as the JDBC batch size\n"
+#~ " //flush a batch of inserts and release memory:\n"
+#~ " session.flush();\n"
+#~ " session.clear();\n"
+#~ " }\n"
+#~ "}\n"
+#~ " \n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgid ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ " \n"
+#~ "ScrollableResults customers =
session.getNamedQuery(\"GetCustomers\")\n"
+#~ " .setCacheMode(CacheMode.IGNORE)\n"
+#~ " .scroll(ScrollMode.FORWARD_ONLY);\n"
+#~ "int count=0;\n"
+#~ "while ( customers.next() ) {\n"
+#~ " Customer customer = (Customer) customers.get(0);\n"
+#~ " customer.updateStuff(...);\n"
+#~ " if ( ++count % 20 == 0 ) {\n"
+#~ " //flush a batch of updates and release memory:\n"
+#~ " session.flush();\n"
+#~ " session.clear();\n"
+#~ " }\n"
+#~ "}\n"
+#~ " \n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ " \n"
+#~ "ScrollableResults customers =
session.getNamedQuery(\"GetCustomers\")\n"
+#~ " .setCacheMode(CacheMode.IGNORE)\n"
+#~ " .scroll(ScrollMode.FORWARD_ONLY);\n"
+#~ "int count=0;\n"
+#~ "while ( customers.next() ) {\n"
+#~ " Customer customer = (Customer) customers.get(0);\n"
+#~ " customer.updateStuff(...);\n"
+#~ " if ( ++count % 20 == 0 ) {\n"
+#~ " //flush a batch of updates and release memory:\n"
+#~ " session.flush();\n"
+#~ " session.clear();\n"
+#~ " }\n"
+#~ "}\n"
+#~ " \n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgid ""
+#~ "<![CDATA[StatelessSession session =
sessionFactory.openStatelessSession"
+#~ "();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ " \n"
+#~ "ScrollableResults customers =
session.getNamedQuery(\"GetCustomers\")\n"
+#~ " .scroll(ScrollMode.FORWARD_ONLY);\n"
+#~ "while ( customers.next() ) {\n"
+#~ " Customer customer = (Customer) customers.get(0);\n"
+#~ " customer.updateStuff(...);\n"
+#~ " session.update(customer);\n"
+#~ "}\n"
+#~ " \n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[StatelessSession session =
sessionFactory.openStatelessSession"
+#~ "();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ " \n"
+#~ "ScrollableResults customers =
session.getNamedQuery(\"GetCustomers\")\n"
+#~ " .scroll(ScrollMode.FORWARD_ONLY);\n"
+#~ "while ( customers.next() ) {\n"
+#~ " Customer customer = (Customer) customers.get(0);\n"
+#~ " customer.updateStuff(...);\n"
+#~ " session.update(customer);\n"
+#~ "}\n"
+#~ " \n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgid ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "\n"
+#~ "String hqlUpdate = \"update Customer c set c.name = :newName where c.name
"
+#~ "= :oldName\";\n"
+#~ "// or String hqlUpdate = \"update Customer set name = :newName where name
"
+#~ "= :oldName\";\n"
+#~ "int updatedEntities = s.createQuery( hqlUpdate )\n"
+#~ " .setString( \"newName\", newName )\n"
+#~ " .setString( \"oldName\", oldName )\n"
+#~ " .executeUpdate();\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "\n"
+#~ "String hqlUpdate = \"update Customer c set c.name = :newName where c.name
"
+#~ "= :oldName\";\n"
+#~ "// or String hqlUpdate = \"update Customer set name = :newName where name
"
+#~ "= :oldName\";\n"
+#~ "int updatedEntities = s.createQuery( hqlUpdate )\n"
+#~ " .setString( \"newName\", newName )\n"
+#~ " .setString( \"oldName\", oldName )\n"
+#~ " .executeUpdate();\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgid ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "String hqlVersionedUpdate = \"update versioned Customer set name = :"
+#~ "newName where name = :oldName\";\n"
+#~ "int updatedEntities = s.createQuery( hqlUpdate )\n"
+#~ " .setString( \"newName\", newName )\n"
+#~ " .setString( \"oldName\", oldName )\n"
+#~ " .executeUpdate();\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "String hqlVersionedUpdate = \"update versioned Customer set name = :"
+#~ "newName where name = :oldName\";\n"
+#~ "int updatedEntities = s.createQuery( hqlUpdate )\n"
+#~ " .setString( \"newName\", newName )\n"
+#~ " .setString( \"oldName\", oldName )\n"
+#~ " .executeUpdate();\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgid ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "\n"
+#~ "String hqlDelete = \"delete Customer c where c.name =
:oldName\";\n"
+#~ "// or String hqlDelete = \"delete Customer where name =
:oldName\";\n"
+#~ "int deletedEntities = s.createQuery( hqlDelete )\n"
+#~ " .setString( \"oldName\", oldName )\n"
+#~ " .executeUpdate();\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "\n"
+#~ "String hqlDelete = \"delete Customer c where c.name =
:oldName\";\n"
+#~ "// or String hqlDelete = \"delete Customer where name =
:oldName\";\n"
+#~ "int deletedEntities = s.createQuery( hqlDelete )\n"
+#~ " .setString( \"oldName\", oldName )\n"
+#~ " .executeUpdate();\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgid ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "\n"
+#~ "String hqlInsert = \"insert into DelinquentAccount (id, name) select
c."
+#~ "id, c.name from Customer c where ...\";\n"
+#~ "int createdEntities = s.createQuery( hqlInsert )\n"
+#~ " .executeUpdate();\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "\n"
+#~ "String hqlInsert = \"insert into DelinquentAccount (id, name) select
c."
+#~ "id, c.name from Customer c where ...\";\n"
+#~ "int createdEntities = s.createQuery( hqlInsert )\n"
+#~ " .executeUpdate();\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
-#. Tag: programlisting
-#: batch.xml:288
-#, no-c-format
-msgid ""
-"<![CDATA[Session session = sessionFactory.openSession();\n"
-"Transaction tx = session.beginTransaction();\n"
-"\n"
-"String hqlInsert = \"insert into DelinquentAccount (id, name) select c.id,
c."
-"name from Customer c where ...\";\n"
-"int createdEntities = s.createQuery( hqlInsert )\n"
-" .executeUpdate();\n"
-"tx.commit();\n"
-"session.close();]]>"
-msgstr ""
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/best_practices.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/best_practices.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/best_practices.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,32 +1,34 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:26\n"
+"PO-Revision-Date: 2009-11-06 10:05+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: best_practices.xml:29
#, no-c-format
msgid "Best Practices"
-msgstr "最佳实践(Best Practices)"
+msgstr "最佳实践(Best Practices)"
#. Tag: term
-#: best_practices.xml:33
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Write fine-grained classes and map them using
<literal><component></"
"literal>:"
msgstr ""
-"设计细颗粒度的持久类并且使用<literal><component></literal>来实现映射。"
+"设计细颗粒度的持久类并且使用 <literal><component></literal> 来实现映"
+"射:"
#. Tag: para
-#: best_practices.xml:35
#, no-c-format
msgid ""
"Use an <literal>Address</literal> class to encapsulate
<literal>street</"
@@ -34,35 +36,31 @@
"<literal>postcode</literal>. This encourages code reuse and simplifies
"
"refactoring."
msgstr ""
-"使用一个<literal>Address</literal>持久类来封装
<literal>street</literal>, "
-"<literal>suburb</literal>, <literal>state</literal>,
<literal>postcode</"
-"literal>. 这将有利于代码重用和简化代码重构(refactoring)的工作。"
+"使用一个 <literal>Address</literal>
持久类来封装 <literal>street</literal>,"
+"<literal>suburb</literal>,<literal>state</literal>,<literal>postcode</"
+"literal>。 这将有利于代码重用和简化代码重构(refactoring)的工作。"
#. Tag: term
-#: best_practices.xml:43
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Declare identifier properties on persistent classes:"
-msgstr "对持久类声明标识符属性( identifier properties)。"
+msgstr "对持久类声明标识符属性(identifier properties):"
#. Tag: para
-#: best_practices.xml:45
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate makes identifier properties optional. There are a range of reasons
"
"why you should use them. We recommend that identifiers be 'synthetic', that
"
"is, generated with no business meaning."
msgstr ""
-"Hibernate中标识符属性是可选的,不过有很多原因来说明你应该使用标识符属性。我们"
-"建议标识符应该是“人造”的(自动生成,不涉及业务含义)。"
+"Hibernate 中标识符属性是可选的,不过有很多原因来说明你应该使用标识符属性。我"
+"们建议标识符应该是“人造”的(自动生成,不涉及业务含义)。 "
#. Tag: term
-#: best_practices.xml:53
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Identify natural keys:"
-msgstr "使用自然键(natural keys)标识"
+msgstr "使用自然键(natural keys)标识:"
#. Tag: para
-#: best_practices.xml:55
#, no-c-format
msgid ""
"Identify natural keys for all entities, and map them using
<literal><"
@@ -70,102 +68,90 @@
"<literal>hashCode()</literal> to compare the properties that make up
the "
"natural key."
msgstr ""
-"对所有的实体都标识出自然键,用<literal><natural-id></literal>进行映射。"
-"实现<literal>equals()</literal>和<literal>hashCode()</literal>,在其中用组成"
-"自然键的属性进行比较。"
+"对所有的实体都标识出自然键,用 <literal><natural-id></literal>
进行映"
+"射。实现 <literal>equals()</literal> 和
<literal>hashCode()</literal>,在其中"
+"用组成自然键的属性进行比较。"
#. Tag: term
-#: best_practices.xml:63
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Place each class mapping in its own file:"
-msgstr "为每个持久类写一个映射文件"
+msgstr "为每个持久类写一个映射文件:"
#. Tag: para
-#: best_practices.xml:65
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Do not use a single monolithic mapping document. Map
<literal>com.eg.Foo</"
"literal> in the file <literal>com/eg/Foo.hbm.xml</literal>. This
makes "
"sense, particularly in a team environment."
msgstr ""
"不要把所有的持久类映射都写到一个大文件中。把 <literal>com.eg.Foo</literal> 映"
-"射到<literal>com/eg/Foo.hbm.xml</literal>中, 在团队开发环境中,这一点显得特"
-"别有意义。"
+"射到 <literal>com/eg/Foo.hbm.xml</literal> 中。在团队开发环境中,这一点尤其重"
+"要。"
#. Tag: term
-#: best_practices.xml:73
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Load mappings as resources:"
-msgstr "把映射文件作为资源加载"
+msgstr "把映射文件作为资源加载:"
#. Tag: para
-#: best_practices.xml:75
#, no-c-format
msgid "Deploy the mappings along with the classes they map."
msgstr "把映射文件和他们的映射类放在一起进行部署。"
#. Tag: term
-#: best_practices.xml:81
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Consider externalizing query strings:"
-msgstr "考虑把查询字符串放在程序外面"
+msgstr "考虑把查询字符串放在程序外面:"
#. Tag: para
-#: best_practices.xml:83
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"This is recommended if your queries call non-ANSI-standard SQL functions. "
"Externalizing the query strings to mapping files will make the application "
"more portable."
msgstr ""
-"如果你的查询中调用了非ANSI标准的SQL函数,那么这条实践经验对你适用。把查询字符"
-"串放在映射文件中可以让程序具有更好的可移植性。"
+"如果你的查询中调用了非 ANSI 标准的 SQL 函数,那么这条实践经验对你适用。把查询"
+"字符串放在映射文件中可以让程序具有更好的可移植性。 "
#. Tag: term
-#: best_practices.xml:91
#, no-c-format
msgid "Use bind variables."
msgstr "使用绑定变量"
#. Tag: para
-#: best_practices.xml:93
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"As in JDBC, always replace non-constant values by \"?\". Do not use
string "
"manipulation to bind a non-constant value in a query. You should also "
"consider using named parameters in queries."
msgstr ""
-"就像在JDBC编程中一样,应该总是用占位符\"?\"来替换非常量值,不要在查询中用字符"
-"串值来构造非常量值!更好的办法是在查询中使用命名参数。"
+"就像在 JDBC 编程中一样,应该总是用占位符 \"?\" 来替换非常量值,不要在查询中用"
+"字符串值来构造非常量值。你也应该考虑在查询中使用命名参数。"
#. Tag: term
-#: best_practices.xml:101
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Do not manage your own JDBC connections:"
-msgstr "不要自己来管理JDBC connections"
+msgstr "不要自己来管理 JDBC 连接:"
#. Tag: para
-#: best_practices.xml:103
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate allows the application to manage JDBC connections, but his "
"approach should be considered a last-resort. If you cannot use the built-in "
"connection providers, consider providing your own implementation of "
"<literal>org.hibernate.connection.ConnectionProvider</literal>."
msgstr ""
-"Hibernate允许应用程序自己来管理JDBC connections,但是应该作为最后没有办法的办"
-"法。如果你不能使用Hibernate内建的connections providers,那么考虑实现自己来实"
-"现<literal>org.hibernate.connection.ConnectionProvider</literal>"
+"Hibernate 允许应用程序自己来管理 JDBC 连接,但是应该作为最后没有办法的办法。"
+"如果你不能使用 Hibernate 内建的 connections providers,那么考虑实现自己来实"
+"现
<literal>org.hibernate.connection.ConnectionProvider</literal>。"
#. Tag: term
-#: best_practices.xml:111
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Consider using a custom type:"
-msgstr "考虑使用用户自定义类型(custom type)"
+msgstr "考虑使用用户自定义类型(custom type):"
#. Tag: para
-#: best_practices.xml:113
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Suppose you have a Java type from a library that needs to be persisted but "
"does not provide the accessors needed to map it as a component. You should "
@@ -173,20 +159,18 @@
"approach frees the application code from implementing transformations to/"
"from a Hibernate type."
msgstr ""
-"假设你有一个Java类型,来自某些类库,需要被持久化,但是该类没有提供映射操作需"
-"要的存取方法。那么你应该考虑实现<literal>org.hibernate.UserType</literal>接"
-"口。这种办法使程序代码写起来更加自如,不再需要考虑类与Hibernate type之间的相"
-"互转换。"
+"假设你有一个 Java 类型,来自某些类库,需要被持久化,但是该类没有提供映射操作"
+"需要的存取方法。那么你应该考虑实现 <literal>org.hibernate.UserType</literal> "
+"接口。这种办法使程序代码写起来更加自如,不再需要考虑类与 Hibernate type 之间"
+"的相互转换。 "
#. Tag: term
-#: best_practices.xml:122
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Use hand-coded JDBC in bottlenecks:"
-msgstr "在性能瓶颈的地方使用硬编码的JDBC"
+msgstr "在性能瓶颈的地方使用硬编码的 JDBC:"
#. Tag: para
-#: best_practices.xml:124
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"In performance-critical areas of the system, some kinds of operations might "
"benefit from direct JDBC. Do not assume, however, that JDBC is necessarily "
@@ -196,28 +180,19 @@
"html that JDBC connection. This way you can still use the same transaction "
"strategy and underlying connection provider."
msgstr ""
-"In performance-critical areas of the system, some kinds of operations might "
-"benefit from direct JDBC. But please, wait until you
<emphasis>know</"
-"emphasis> something is a bottleneck. And don't assume that direct JDBC is
"
-"necessarily faster. If you need to use direct JDBC, it might be worth "
-"opening a Hibernate <literal>Session</literal> and using that JDBC
"
-"connection. That way you can still use the same transaction strategy and "
-"underlying connection provider. 在系统中对性能要求很严格的一些部分,某些操作"
-"也许直接使用JDBC会更好。但是请先<emphasis>确认</emphasis>这的确是一个瓶颈,并"
-"且不要想当然认为JDBC一定会更快。如果确实需要直接使用JDBC,那么最好打开一个 "
-"Hibernate <literal>Session</literal> 然后从
<literal>Session</literal>获得"
-"connection,按照这种办法你仍然可以使用同样的transaction策略和底层的"
-"connection provider。"
+"在系统中对性能要求很严格的一些部分,某些操作也许直接使用 JDBC 会更好。但是请"
+"先<emphasis>确认</emphasis>这的确是一个瓶颈,并且不要想当然认为 JDBC 一定会更"
+"快。如果确实需要直接使用 JDBC,那么最好打开一个 Hibernate <literal>Session</"
+"literal> 然后从 <literal>Session</literal> 获得
connection,按照这种办法你仍"
+"然可以使用同样的 transaction 策略和底层的 connection provider。 "
#. Tag: term
-#: best_practices.xml:134
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Understand <literal>Session</literal> flushing:"
-msgstr "理解<literal>Session</literal>清洗( flushing)"
+msgstr "理解 <literal>Session</literal> 冲刷(flushing):"
#. Tag: para
-#: best_practices.xml:136
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Sometimes the Session synchronizes its persistent state with the database. "
"Performance will be affected if this process occurs too often. You can "
@@ -225,19 +200,17 @@
"even by changing the order of queries and other operations within a "
"particular transaction."
msgstr ""
-"Session会不时的向数据库同步持久化状态,如果这种操作进行的过于频繁,性能会受到"
-"一定的影响。有时候你可以通过禁止自动flushing,尽量最小化非必要的flushing操"
-"作,或者更进一步,在一个特定的transaction中改变查询和其它操作的顺序。"
+"Session 会不时的向数据库同步持久化状态,如果这种操作进行的过于频繁,性能会受"
+"到一定的影响。有时候你可以通过禁止自动 flushing,尽量最小化非必要的 flushing "
+"操作,或者更进一步,在一个特定的 transaction 中改变查询和其它操作的顺序。 "
#. Tag: term
-#: best_practices.xml:145
-#, fuzzy, no-c-format
+#, no-c-format
msgid "In a three tiered architecture, consider using detached objects:"
-msgstr "在三层结构中,考虑使用托管对象(detached object)"
+msgstr "在三层结构中,考虑使用脱管对象(detached object):"
#. Tag: para
-#: best_practices.xml:147
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"When using a servlet/session bean architecture, you can pass persistent "
"objects loaded in the session bean to and from the servlet/JSP layer. Use a "
@@ -245,20 +218,18 @@
"or <literal>Session.saveOrUpdate()</literal> to synchronize objects
with the "
"database."
msgstr ""
-"当使用一个servlet / session bean 类型的架构的时候, 你可以把已加载的持久对象在"
-"session bean层和servlet / JSP 层之间来回传递。使用新的session来为每个请求服"
-"务,使用 <literal>Session.merge()</literal>
或者<literal>Session.saveOrUpdate"
-"()</literal>来与数据库同步。"
+"当使用一个 servlet / session bean 类型的架构的时候, 你可以把已加载的持久对象"
+"在 session bean 层和 servlet / JSP 层之间来回传递。使用新的 session 来为每个"
+"请求服务,使用 <literal>Session.merge()</literal> 或者
<literal>Session."
+"saveOrUpdate()</literal> 来与数据库同步。 "
#. Tag: term
-#: best_practices.xml:156
-#, fuzzy, no-c-format
+#, no-c-format
msgid "In a two tiered architecture, consider using long persistence
contexts:"
-msgstr "在两层结构中,考虑使用长持久上下文(long persistence contexts)."
+msgstr "在两层结构中,考虑使用长持久上下文(long persistence contexts):"
#. Tag: para
-#: best_practices.xml:158
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Database Transactions have to be as short as possible for best scalability. "
"However, it is often necessary to implement long running "
@@ -273,23 +244,21 @@
"across more than one application transaction or you will be working with "
"stale data."
msgstr ""
-"为了得到最佳的可伸缩性,数据库事务(Database Transaction)应该尽可能的短。但"
-"是,程序常常需要实现长时间运行的<emphasis>“应用程序事务(Application "
-"Transaction)”</emphasis>,包含一个从用户的观点来看的原子操作。这个应用程序事"
-"务可能跨越多次从用户请求到得到反馈的循环。用脱管对象(与session脱离的对象)来实"
-"现应用程序事务是常见的。或者,尤其在两层结构中,把Hibernate Session从JDBC连接"
-"中脱离开,下次需要用的时候再连接上。绝不要把一个Session用在多个应用程序事务"
-"(Application Transaction)中,否则你的数据可能会过期失效。"
+"为了得到最佳的可伸缩性,数据库事务(Database Transaction)应该尽可能的短。但"
+"是,程序常常需要实现长时间运行的<emphasis>“应用程序事务(Application "
+"Transaction)”</emphasis>,包含一个从用户的观点来看的原子操作。这个应用程序事"
+"务可能跨越多次从用户请求到得到反馈的循环。用脱管对象(与 session 脱离的对象)"
+"来实现应用程序事务是常见的。或者,尤其在两层结构中,把 Hibernate Session 从 "
+"JDBC 连接中脱离开,下次需要用的时候再连接上。绝不要把一个 Session 用在多个应"
+"用程序事务(Application Transaction)中,否则你的数据可能会过期失效。"
#. Tag: term
-#: best_practices.xml:172
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Do not treat exceptions as recoverable:"
-msgstr "不要把异常看成可恢复的"
+msgstr "不要把异常看成可恢复的:"
#. Tag: para
-#: best_practices.xml:174
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"This is more of a necessary practice than a \"best\" practice. When an
"
"exception occurs, roll back the <literal>Transaction</literal> and
close the "
@@ -300,20 +269,18 @@
"<literal>Session.get()</literal> or a query instead."
msgstr ""
"这一点甚至比“最佳实践”还要重要,这是“必备常识”。当异常发生的时候,必须要回滚 "
-"<literal>Transaction</literal>
,关闭<literal>Session</literal>。如果你不这样"
-"做的话,Hibernate无法保证内存状态精确的反应持久状态。尤其不要使用"
-"<literal>Session.load()</literal>来判断一个给定标识符的对象实例在数据库中是否"
-"存在,应该使用<literal>Session.get()</literal>或者进行一次查询."
+"<literal>Transaction</literal> ,关闭
<literal>Session</literal>。如果你不这"
+"样做的话,Hibernate 无法保证内存状态精确的反应持久状态。尤其不要使用 "
+"<literal>Session.load()</literal> 来判断一个给定标识符的对象实例在数据库中是"
+"否存在,应该使用 <literal>Session.get()</literal> 或者进行一次查询。"
#. Tag: term
-#: best_practices.xml:184
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Prefer lazy fetching for associations:"
-msgstr "对于关联优先考虑lazy fetching"
+msgstr "对于关联优先考虑 lazy fetching:"
#. Tag: para
-#: best_practices.xml:186
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Use eager fetching sparingly. Use proxies and lazy collections for most "
"associations to classes that are not likely to be completely held in the "
@@ -323,26 +290,24 @@
"to a particular use case, use a query with a <literal>left join
fetch</"
"literal>."
msgstr ""
-"谨慎的使用主动抓取(eager fetching)。对于关联来说,若其目标是无法在第二级缓存"
-"中完全缓存所有实例的类,应该使用代理(proxies)与/或具有延迟加载属性的集合"
-"(lazy collections)。若目标是可以被缓存的,尤其是缓存的命中率非常高的情况下,"
-"应该使用<literal>lazy=\"false\"</literal>,明确的禁止掉eager
fetching。如果那"
-"些特殊的确实适合使用join fetch 的场合,请在查询中使用<literal>left join "
-"fetch</literal>。"
+"谨慎的使用主动抓取(eager fetching)。对于关联来说,若其目标是无法在第二级缓"
+"存中完全缓存所有实例的类,应该使用代理(proxies)与/或具有延迟加载属性的集合"
+"(lazy collections)。若目标是可以被缓存的,尤其是缓存的命中率非常高的情况"
+"下,应该使用 <literal>lazy=\"false\"</literal>,明确的禁止掉 eager
fetching。"
+"如果那些特殊的确实适合使用 join fetch 的场合,请在查询中使用 <literal>left "
+"join fetch</literal>。 "
#. Tag: term
-#: best_practices.xml:196
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Use the <emphasis>open session in view</emphasis> pattern, or a
disciplined "
"<emphasis>assembly phase</emphasis> to avoid problems with unfetched
data:"
msgstr ""
-"使用<emphasis>open session in
view</emphasis>模式,或者执行严格的<emphasis>装"
-"配期(assembly phase)</emphasis>策略来避免再次抓取数据带来的问题"
+"使用 <emphasis>open session in view</emphasis>
模式,或者执行严格的<emphasis>"
+"装配期(assembly phase)</emphasis>策略来避免再次抓取数据带来的问题:"
#. Tag: para
-#: best_practices.xml:201
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate frees the developer from writing tedious <emphasis>Data Transfer
"
"Objects</emphasis> (DTO). In a traditional EJB architecture, DTOs serve dual
"
@@ -357,24 +322,22 @@
"objects. This is not a limitation of Hibernate. It is a fundamental "
"requirement of safe transactional data access."
msgstr ""
-"Hibernate让开发者们摆脱了繁琐的<emphasis>Data Transfer Objects</emphasis> "
-"(DTO)。在传统的EJB结构中,DTO有双重作用:首先,他们解决了entity bean无法序列"
-"化的问题;其次,他们隐含地定义了一个装配期,在此期间,所有在view层需要用到的"
-"数据,都被抓取、集中到了DTO中,然后控制才被装到表示层。Hibernate终结了第一个"
-"作用。然而,除非你做好了在整个渲染过程中都维护一个打开的持久化上下文(session)"
-"的准备,你仍然需要一个装配期(想象一下,你的业务方法与你的表示层有严格的契"
-"约,数据总是被放置到托管对象中)。这并非是Hibernate的限制!这是实现安全的事务"
-"化数据访问的基本需求。"
+"Hibernate 让开发者们摆脱了繁琐的 <emphasis>Data Transfer Objects</emphasis>"
+"(DTO)。在传统的 EJB 结构中,DTO 有双重作用:首先,他们解决了 entity bean 无"
+"法序列化的问题;其次,他们隐含地定义了一个装配期,在此期间,所有在 view 层需"
+"要用到的数据,都被抓取、集中到了 DTO 中,然后控制才被装到表示层。Hibernate 终"
+"结了第一个作用。然而,除非你做好了在整个渲染过程中都维护一个打开的持久化上下"
+"文(session)的准备,你仍然需要一个装配期(想象一下,你的业务方法与你的表示层"
+"有严格的契约,数据总是被放置到脱管对象中)。这并非是 Hibernate 的限制,这是实"
+"现安全的事务化数据访问的基本需求。"
#. Tag: term
-#: best_practices.xml:215
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Consider abstracting your business logic from Hibernate:"
-msgstr "考虑把Hibernate代码从业务逻辑代码中抽象出来"
+msgstr "考虑把 Hibernate 代码从业务逻辑代码中抽象出来:"
#. Tag: para
-#: best_practices.xml:217
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hide Hibernate data-access code behind an interface. Combine the "
"<emphasis>DAO</emphasis> and <emphasis>Thread Local
Session</emphasis> "
@@ -383,21 +346,19 @@
"however, intended for \"sufficiently large\" applications. It is not
"
"appropriate for an application with five tables."
msgstr ""
-"把Hibernate的数据存取代码隐藏到接口(interface)的后面,组合使用<emphasis>DAO</"
-"emphasis>和<emphasis>Thread Local
Session</emphasis>模式。通过Hibernate的"
-"<literal>UserType</literal>,你甚至可以用硬编码的JDBC来持久化那些本该被"
-"Hibernate持久化的类。 (该建议更适用于规模足够大应用软件中,对于那些只有5张表"
-"的应用程序并不适合。)"
+"把 Hibernate 的数据存取代码隐藏到接口(interface)的后面,组合使用 "
+"<emphasis>DAO</emphasis> 和 <emphasis>Thread Local
Session</emphasis> 模式。"
+"通过 Hibernate 的<literal>UserType</literal>,你甚至可以用硬编码的 JDBC 来持"
+"久化那些本该被 Hibernate 持久化的类。然而,该建议更适用于规模足够大应用软件"
+"中,对于那些只有 5 张表的应用程序并不适合。"
#. Tag: term
-#: best_practices.xml:227
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Do not use exotic association mappings:"
-msgstr "不要用怪异的连接映射"
+msgstr "不要用怪异的连接映射:"
#. Tag: para
-#: best_practices.xml:229
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Practical test cases for real many-to-many associations are rare. Most of "
"the time you need additional information stored in the \"link table\". In
"
@@ -408,17 +369,14 @@
msgstr ""
"多对多连接用得好的例子实际上相当少见。大多数时候你在“连接表”中需要保存额外的"
"信息。这种情况下,用两个指向中介类的一对多的连接比较好。实际上,我们认为绝大"
-"多数的连接是一对多和多对一的,你应该谨慎使用其它连接风格,用之前问自己一句,"
-"是否真的必须这么做。"
+"多数的连接是一对多和多对一的。i因此,你应该谨慎使用其它连接风格。"
#. Tag: term
-#: best_practices.xml:239
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Prefer bidirectional associations:"
-msgstr "偏爱双向关联"
+msgstr "偏爱双向关联:"
#. Tag: para
-#: best_practices.xml:241
#, no-c-format
msgid ""
"Unidirectional associations are more difficult to query. In a large "
Deleted:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/bibliography.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/bibliography.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/bibliography.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,68 +0,0 @@
-# Language zh-CN translations for Branch package.
-# Automatically generated, 2009.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Branch 3_3\n"
-"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: 2009-06-10 21:02+0000\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Tag: title
-#: bibliography.xml:27
-#, no-c-format
-msgid "References"
-msgstr ""
-
-#. Tag: title
-#: bibliography.xml:31
-#, no-c-format
-msgid "Patterns of Enterprise Application Architecture"
-msgstr ""
-
-#. Tag: author
-#: bibliography.xml:34
-#, no-c-format
-msgid "<firstname>Martin</firstname>
<surname>Fowler</surname>"
-msgstr ""
-
-#. Tag: holder
-#: bibliography.xml:41
-#, no-c-format
-msgid "Pearson Education, Inc."
-msgstr ""
-
-#. Tag: title
-#: bibliography.xml:50
-#, no-c-format
-msgid "Java Persistence with Hibernate"
-msgstr ""
-
-#. Tag: subtitle
-#: bibliography.xml:51
-#, no-c-format
-msgid "Second Edition of Hibernate in Action"
-msgstr ""
-
-#. Tag: author
-#: bibliography.xml:57
-#, no-c-format
-msgid "<firstname>Christian</firstname>
<surname>Bauer</surname>"
-msgstr ""
-
-#. Tag: author
-#: bibliography.xml:61
-#, no-c-format
-msgid "<firstname>Gavin</firstname>
<surname>King</surname>"
-msgstr ""
-
-#. Tag: holder
-#: bibliography.xml:68
-#, no-c-format
-msgid "Manning Publications Co."
-msgstr ""
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/collection_mapping.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/collection_mapping.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/collection_mapping.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,1860 +1,1599 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:26\n"
+"PO-Revision-Date: 2009-12-09 12:11+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: collection_mapping.xml:29
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Collection mapping"
-msgstr "集合映射( Collection mappings )"
+msgstr "集合映射(Collection mappings)"
#. Tag: title
-#: collection_mapping.xml:32
#, no-c-format
msgid "Persistent collections"
-msgstr "持久化集合类(Persistent collections)"
+msgstr "持久化集合类(Persistent collections)"
#. Tag: para
-#: collection_mapping.xml:34
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate requires that persistent collection-valued fields be declared as "
-"an interface type. For example:"
-msgstr ""
-"Hibernate要求持久化集合值字段必须声明为接口,比如:(译者注:在阅读本章的时"
-"候,以后整个手册的阅读过程中,我们都会面临一个名词方面的问题,那就是“集合”。"
-"\"Collections\"和\"Set\"在中文里对应都被翻译为“集合”,但是他们的含义很不一"
-"样。Collections是一个超集,Set是其中的一种。大部分情况下,本译稿中泛指的未加"
-"英文注明的“集合”,都应当理解为“Collections”。在有些二者同时出现,可能造成混淆"
-"的地方,我们用“集合类”来特指“Collecions”,“集合(Set)”来指\"Set\",一般都会在后"
-"面的括号中给出英文。希望大家在阅读时联系上下文理解,不要造成误解。 与此同"
-"时,“元素”一词对应的英文“element”,也有两个不同的含义。其一为集合的元素,是内"
-"存中的一个变量;另一含义则是XML文档中的一个标签所代表的元素。也请注意区别。 "
-"本章中,特别是后半部分是需要反复阅读才能理解清楚的。如果遇到任何疑问,请记住,英"
-"文版本的reference是惟一标准的参考资料。)"
-
-#. Tag: programlisting
-#: collection_mapping.xml:39
#, no-c-format
-msgid ""
-"<![CDATA[public class Product {\n"
-" private String serialNumber;\n"
-" private Set parts = new HashSet();\n"
-" \n"
-" public Set getParts() { return parts; }\n"
-" void setParts(Set parts) { this.parts = parts; }\n"
-" public String getSerialNumber() { return serialNumber; }\n"
-" void setSerialNumber(String sn) { serialNumber = sn; }\n"
-"}]]>"
-msgstr ""
+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
-#: collection_mapping.xml:41
-#, fuzzy, no-c-format
-msgid ""
-"The actual interface might be <literal>java.util.Set</literal>, "
-"<literal>java.util.Collection</literal>,
<literal>java.util.List</literal>, "
-"<literal>java.util.Map</literal>,
<literal>java.util.SortedSet</literal>, "
-"<literal>java.util.SortedMap</literal> or anything you like
(\"anything you "
-"like\" means you will have to write an implementation of
<literal>org."
-"hibernate.usertype.UserCollectionType</literal>.)"
-msgstr ""
-"实际的接口可能是<literal>java.util.Set</literal>,
<literal>java.util."
-"Collection</literal>, <literal>java.util.List</literal>,
<literal>java.util."
-"Map</literal>, <literal>java.util.SortedSet</literal>,
<literal>java.util."
-"SortedMap</literal> 或者...任何你喜欢的类型!(\"任何你喜欢的类型\" 代表你需要"
-"编写
<literal>org.hibernate.usertype.UserCollectionType</literal>的实现.)"
+#, no-c-format
+msgid "The actual interface might be <literal>java.util.Set</literal>,
<literal>java.util.Collection</literal>,
<literal>java.util.List</literal>,
<literal>java.util.Map</literal>,
<literal>java.util.SortedSet</literal>,
<literal>java.util.SortedMap</literal> or anything you like (\"anything
you like\" means you will have to write an implementation of
<literal>org.hibernate.usertype.UserCollectionType</literal>.)"
+msgstr "实际的接口可能是
<literal>java.util.Set</literal>、<literal>java.util.Collection</literal>、<literal>java.util.List</literal>、<literal>java.util.Map</literal>、<literal>java.util.SortedSet</literal>、<literal>java.util.SortedMap</literal>
或者任何你喜欢的类型(\"任何你喜欢的类型\" 代表你需要编写
<literal>org.hibernate.usertype.UserCollectionType</literal> 的实现)。"
#. Tag: para
-#: collection_mapping.xml:50
-#, fuzzy, no-c-format
-msgid ""
-"Notice how the instance variable was initialized with an instance of "
-"<literal>HashSet</literal>. This is the best way to initialize
collection "
-"valued properties of newly instantiated (non-persistent) instances. When you
"
-"make the instance persistent, by calling <literal>persist()</literal>
for "
-"example, Hibernate will actually replace the <literal>HashSet</literal>
with "
-"an instance of Hibernate's own implementation of
<literal>Set</literal>. Be "
-"aware of the following errors:"
-msgstr ""
-"注意我们是如何用一个<literal>HashSet</literal>实例来初始化实例变量的.这是用于"
-"初始化新创建(尚未持久化)的类实例中集合值属性的最佳方法。当你持久化这个实例时"
-"——比如通过调用<literal>persist()</literal>——Hibernate 会自动把"
-"<literal>HashSet</literal>替换为Hibernate自己的<literal>Set</literal>实现。观"
-"察下面的错误:"
-
-#. Tag: programlisting
-#: collection_mapping.xml:60
#, no-c-format
-msgid ""
-"<![CDATA[Cat cat = new DomesticCat();\n"
-"Cat kitten = new DomesticCat();\n"
-"....\n"
-"Set kittens = new HashSet();\n"
-"kittens.add(kitten);\n"
-"cat.setKittens(kittens);\n"
-"session.persist(cat);\n"
-"kittens = cat.getKittens(); // Okay, kittens collection is a Set\n"
-"(HashSet) cat.getKittens(); // Error!]]>"
-msgstr ""
+msgid "Notice how the instance variable was initialized with an instance of
<literal>HashSet</literal>. This is the best way to initialize collection
valued properties of newly instantiated (non-persistent) instances. When you make the
instance persistent, by calling <literal>persist()</literal> for example,
Hibernate will actually replace the <literal>HashSet</literal> with an
instance of Hibernate's own implementation of <literal>Set</literal>. Be
aware of the following errors:"
+msgstr "注意我们是如何用一个 <literal>HashSet</literal>
实例来初始化实例变量的。这是用于初始化新创建(尚未持久化)的类实例中集合值属性的最佳方法。当你持久化这个实例时 — 比如通过调用
<literal>persist()</literal> — Hibernate 会自动把
<literal>HashSet</literal> 替换为 Hibernate 自己的
<literal>Set</literal> 实现。注意下面的错误:"
#. Tag: para
-#: collection_mapping.xml:62
-#, fuzzy, no-c-format
-msgid ""
-"The persistent collections injected by Hibernate behave like "
-"<literal>HashMap</literal>, <literal>HashSet</literal>,
<literal>TreeMap</"
-"literal>, <literal>TreeSet</literal> or
<literal>ArrayList</literal>, "
-"depending on the interface type."
-msgstr ""
-"根据不同的接口类型,被Hibernate注射的持久化集合类的表现类似<literal>HashMap</"
-"literal>, <literal>HashSet</literal>,
<literal>TreeMap</literal>, "
-"<literal>TreeSet</literal> or
<literal>ArrayList</literal>。"
+#, no-c-format
+msgid "The persistent collections injected by Hibernate behave like
<literal>HashMap</literal>, <literal>HashSet</literal>,
<literal>TreeMap</literal>, <literal>TreeSet</literal> or
<literal>ArrayList</literal>, depending on the interface type."
+msgstr "根据不同的接口类型,被 Hibernate 注射的持久化集合类的表现类似
<literal>HashMap</literal>、<literal>HashSet</literal>、<literal>TreeMap</literal>、<literal>TreeSet</literal>
或 <literal>ArrayList</literal>。"
#. Tag: para
-#: collection_mapping.xml:69
-#, fuzzy, 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对空的集合引用和空集"
-"合不加区别。"
+#, 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
对空的集合引用和空集合不加区别。 "
#. Tag: para
-#: collection_mapping.xml:80
-#, fuzzy, 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集合类一样来使用持久化集合"
-"类。只是要确认你理解了双向关联的语义(后文讨论)。"
+#, 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
集合类一样来使用持久化集合类。只是要确认你理解了双向关联的语义(后文将进行讨论)。"
#. Tag: title
-#: collection_mapping.xml:89
#, no-c-format
msgid "Collection mappings"
msgstr "集合映射( Collection mappings )"
#. Tag: para
-#: collection_mapping.xml:92
-#, fuzzy, 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 ""
-"任何值集合或者多对多关联需要专用的具有一个或多个外键字段的"
-"<emphasis>collection table</emphasis>、一个或多个<emphasis>collection
"
-"element column</emphasis>,以及还可能有一个或多个索引字段。"
+#, 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 生成工具,来体会一下不同的映射声明是如何被翻译为数据库表的。
"
#. Tag: para
-#: collection_mapping.xml:99
-#, fuzzy, no-c-format
-msgid ""
-"The Hibernate mapping element used for mapping a collection depends upon the
"
-"type of interface. For example, a
<literal><set></literal> element is "
-"used for mapping properties of type <literal>Set</literal>."
-msgstr ""
-"用于映射集合类的Hibernate映射元素取决于接口的类型。比如, <literal><"
-"set></literal> 元素用来映射<literal>Set</literal>类型的属性。"
-
-#. Tag: programlisting
-#: collection_mapping.xml:105
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Product\">\n"
-" <id name=\"serialNumber\"
column=\"productSerialNumber\"/>\n"
-" <set name=\"parts\">\n"
-" <key column=\"productSerialNumber\"
not-null=\"true\"/>\n"
-" <one-to-many class=\"Part\"/>\n"
-" </set>\n"
-"</class>]]>"
-msgstr ""
+msgid "The Hibernate mapping element used for mapping a collection depends upon the
type of interface. For example, a <literal><set></literal>
element is used for mapping properties of type <literal>Set</literal>."
+msgstr "用于映射集合类的 Hibernate
映射元素取决于接口的类型。比如,<literal><set></literal> 元素用来映射
<literal>Set</literal> 类型的属性。 "
#. Tag: para
-#: collection_mapping.xml:107
#, no-c-format
-msgid ""
-"Apart from <literal><set></literal>, there is also
<literal><"
-"list></literal>, <literal><map></literal>,
<literal><bag></"
-"literal>, <literal><array></literal> and
<literal><primitive-"
-"array></literal> mapping elements. The
<literal><map></literal> "
-"element is representative:"
-msgstr ""
-"除了<literal><set></literal>,还有<literal><list></literal>,
"
-"<literal><map></literal>,
<literal><bag></literal>, <literal><"
-"array></literal> 和
<literal><primitive-array></literal> 映射元素。"
-"<literal><map></literal>具有代表性:"
+msgid "Apart from <literal><set></literal>, there is also
<literal><list></literal>,
<literal><map></literal>,
<literal><bag></literal>,
<literal><array></literal> and
<literal><primitive-array></literal> mapping elements. The
<literal><map></literal> element is representative:"
+msgstr "除了
<literal><set></literal>,还有<literal><list></literal>,<literal><map></literal>,<literal><bag></literal>,<literal><array></literal>
和 <literal><primitive-array></literal>
映射元素。<literal><map></literal> 具有代表性:"
-#. Tag: programlisting
-#: collection_mapping.xml:132
-#, no-c-format
-msgid ""
-"<![CDATA[<map\n"
-" name=\"propertyName\"\n"
-" table=\"table_name\"\n"
-" schema=\"schema_name\"\n"
-" lazy=\"true|extra|false\"\n"
-" inverse=\"true|false\"\n"
-"
cascade=\"all|none|save-update|delete|all-delete-orphan|delete-orphan\"\n"
-" sort=\"unsorted|natural|comparatorClass\"\n"
-" order-by=\"column_name asc|desc\"\n"
-" where=\"arbitrary sql where condition\"\n"
-" fetch=\"join|select|subselect\"\n"
-" batch-size=\"N\"\n"
-" access=\"field|property|ClassName\"\n"
-" optimistic-lock=\"true|false\"\n"
-" mutable=\"true|false\"\n"
-" node=\"element-name|.\"\n"
-" embed-xml=\"true|false\"\n"
-">\n"
-"\n"
-" <key .... />\n"
-" <map-key .... />\n"
-" <element .... />\n"
-"</map>]]>"
-msgstr ""
-
#. Tag: para
-#: collection_mapping.xml:135
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>name</literal>: the collection property name"
-msgstr "<literal>name</literal> 集合属性的名称"
+msgstr "<literal>name</literal>:集合属性的名称"
#. Tag: para
-#: collection_mapping.xml:140
-#, fuzzy, no-c-format
-msgid ""
-"<literal>table</literal> (optional - defaults to property name): the
name of "
-"the collection table. It is not used for one-to-many associations."
-msgstr ""
-"<literal>table</literal> (可选——默认为属性的名称)这个集合表的名称(不能在一"
-"对多的关联关系中使用)"
+#, no-c-format
+msgid "<literal>table</literal> (optional - defaults to property name):
the name of the collection table. It is not used for one-to-many associations."
+msgstr
"<literal>table</literal>(可选——默认为属性的名称)这个集合表的名称(不能在一对多的关联关系中使用)。"
#. Tag: para
-#: collection_mapping.xml:146
-#, fuzzy, no-c-format
-msgid ""
-"<literal>schema</literal> (optional): the name of a table schema to
override "
-"the schema declared on the root element"
-msgstr ""
-"<literal>schema</literal> (可选) 表的schema的名称, 他将覆盖在根元素中定义的"
-"schema"
+#, no-c-format
+msgid "<literal>schema</literal> (optional): the name of a table schema
to override the schema declared on the root element"
+msgstr "<literal>schema</literal>(可选):表的 schema 的名称,他将覆盖在根元素中定义的
schema"
#. Tag: para
-#: collection_mapping.xml:152
-#, fuzzy, no-c-format
-msgid ""
-"<literal>lazy</literal> (optional - defaults to
<literal>true</literal>): "
-"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 ""
-"<literal>lazy</literal> (可选--默认为true) 可以用来关闭延迟加载(false),指定"
-"一直使用预先抓取,或者打开\"extra-lazy\" 抓取,此时大多数操作不会初始化集合类"
-"(适用于非常大的集合)"
+#, no-c-format
+msgid "<literal>lazy</literal> (optional - defaults to
<literal>true</literal>): 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 "<literal>lazy</literal>(可选--默认为
true)可以用来关闭延迟加载(false):指定一直使用预先抓取,或者打开 \"extra-lazy\"
抓取,此时大多数操作不会初始化集合类(适用于非常大的集合)。"
#. Tag: para
-#: collection_mapping.xml:161
-#, fuzzy, no-c-format
-msgid ""
-"<literal>inverse</literal> (optional - defaults to
<literal>false</"
-"literal>): marks this collection as the \"inverse\" end of a
bidirectional "
-"association."
-msgstr ""
-"<literal>inverse</literal>
(可选——默认为<literal>false</literal>) 标记这个集"
-"合作为双向关联关系中的方向一端。"
+#, no-c-format
+msgid "<literal>inverse</literal> (optional - defaults to
<literal>false</literal>): marks this collection as the \"inverse\"
end of a bidirectional association."
+msgstr "<literal>inverse</literal>(可选 — 默认为
<literal>false</literal>)标记这个集合作为双向关联关系中的方向一端。 "
#. Tag: para
-#: collection_mapping.xml:167
-#, fuzzy, no-c-format
-msgid ""
-"<literal>cascade</literal> (optional - defaults to
<literal>none</literal>): "
-"enables operations to cascade to child entities."
-msgstr ""
-"<literal>cascade</literal> (可选——默认为<literal>none</literal>)
让操作级联到"
-"子实体"
+#, no-c-format
+msgid "<literal>cascade</literal> (optional - defaults to
<literal>none</literal>): enables operations to cascade to child
entities."
+msgstr "<literal>cascade</literal>(可选 — 默认为
<literal>none</literal>)让操作级联到子实体。"
#. Tag: para
-#: collection_mapping.xml:173
-#, fuzzy, no-c-format
-msgid ""
-"<literal>sort</literal> (optional): specifies a sorted collection with
"
-"<literal>natural</literal> sort order or a given comparator
class."
-msgstr ""
-"<literal>sort</literal>(可选)指定集合的排序顺序, 其可以为自然的"
-"(<literal>natural</literal>)或者给定一个用来比较的类。"
+#, no-c-format
+msgid "<literal>sort</literal> (optional): specifies a sorted collection
with <literal>natural</literal> sort order or a given comparator class."
+msgstr
"<literal>sort</literal>(可选)指定集合的排序顺序,其可以为自然的(<literal>natural</literal>)或者给定一个用来比较的类。
"
#. Tag: para
-#: collection_mapping.xml:179
-#, fuzzy, no-c-format
-msgid ""
-"<literal>order-by</literal> (optional, JDK1.4 only): specifies a table
"
-"column or columns that define the iteration order of the
<literal>Map</"
-"literal>, <literal>Set</literal> or bag, together with an optional
"
-"<literal>asc</literal> or <literal>desc</literal>."
-msgstr ""
-"<literal>order-by</literal> (可选, 仅用于jdk1.4) 指定表的字段(一个或几个)再加"
-"上asc或者desc(可选), 定义Map,Set和Bag的迭代顺序"
+#, no-c-format
+msgid "<literal>order-by</literal> (optional, JDK1.4 only): specifies a
table column or columns that define the iteration order of the
<literal>Map</literal>, <literal>Set</literal> or bag, together
with an optional <literal>asc</literal> or
<literal>desc</literal>."
+msgstr "<literal>order-by</literal>(可选,仅用于 jdk1.4):指定表的字段(一个或几个)再加上 asc
或者 desc(可选),定义 Map、Set 和 Bag 的迭代顺序。"
#. Tag: para
-#: collection_mapping.xml:186
-#, fuzzy, no-c-format
-msgid ""
-"<literal>where</literal> (optional): specifies an arbitrary SQL "
-"<literal>WHERE</literal> 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 ""
-"<literal>where</literal> (可选) 指定任意的SQL where条件, 该条件将在重新载入或"
-"者删除这个集合时使用(当集合中的数据仅仅是所有可用数据的一个子集时这个条件非常"
-"有用)"
+#, no-c-format
+msgid "<literal>where</literal> (optional): specifies an arbitrary SQL
<literal>WHERE</literal> 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 "<literal>where</literal>(可选):指定任意的 SQL where
条件,该条件将在重新载入或者删除这个集合时使用(当集合中的数据仅仅是所有可用数据的一个子集时这个条件非常有用)。"
#. Tag: para
-#: collection_mapping.xml:193
-#, fuzzy, no-c-format
-msgid ""
-"<literal>fetch</literal> (optional, defaults to
<literal>select</literal>): "
-"chooses between outer-join fetching, fetching by sequential select, and "
-"fetching by sequential subselect."
-msgstr ""
-"<literal>fetch</literal> (可选, 默认为<literal>select</literal>)
用于在外连接"
-"抓取、通过后续select抓取和通过后续subselect抓取之间选择。"
+#, no-c-format
+msgid "<literal>fetch</literal> (optional, defaults to
<literal>select</literal>): chooses between outer-join fetching, fetching by
sequential select, and fetching by sequential subselect."
+msgstr "<literal>fetch</literal>(可选,默认为
<literal>select</literal>):用于在外连接抓取、通过后续 select 抓取和通过后续 subselect
抓取之间选择。"
#. Tag: para
-#: collection_mapping.xml:200
-#, fuzzy, no-c-format
-msgid ""
-"<literal>batch-size</literal> (optional, defaults to
<literal>1</literal>): "
-"specifies a \"batch size\" for lazily fetching instances of this
collection."
-msgstr ""
-"<literal>batch-size</literal> (可选, 默认为<literal>1</literal>)
指定通过延迟"
-"加载取得集合实例的批处理块大小(\"batch size\")。"
+#, no-c-format
+msgid "<literal>batch-size</literal> (optional, defaults to
<literal>1</literal>): specifies a \"batch size\" for lazily
fetching instances of this collection."
+msgstr "<literal>batch-size</literal>(可选,默认为
<literal>1</literal>):指定通过延迟加载取得集合实例的批处理块大小(\"batch size\")。"
#. Tag: para
-#: collection_mapping.xml:206
-#, fuzzy, no-c-format
-msgid ""
-"<literal>access</literal> (optional - defaults to
<literal>property</"
-"literal>): the strategy Hibernate uses for accessing the collection property
"
-"value."
-msgstr ""
-"<literal>access</literal>(可选-默认为属性property):Hibernate取得集合属性值时"
-"使用的策略"
+#, no-c-format
+msgid "<literal>access</literal> (optional - defaults to
<literal>property</literal>): the strategy Hibernate uses for accessing the
collection property value."
+msgstr "<literal>access</literal>(可选-默认为属性 property):Hibernate
取得集合属性值时使用的策略。"
#. Tag: para
-#: collection_mapping.xml:212
-#, fuzzy, no-c-format
-msgid ""
-"<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</"
-"literal>): 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 ""
-"<literal>乐观锁</literal> (可选 - 默认为 <literal>true</literal>):
对集合的状"
-"态的改变会是否导致其所属的实体的版本增长。 (对一对多关联来说,关闭这个属性常"
-"常是有理的)"
+#, no-c-format
+msgid "<literal>optimistic-lock</literal> (optional - defaults to
<literal>true</literal>): 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 "<literal>乐观锁</literal>(可选 - 默认为
<literal>true</literal>):对集合的状态的改变会是否导致其所属的实体的版本增长(对一对多关联来说,关闭这个属性常常是有理的)。"
#. Tag: para
-#: collection_mapping.xml:220
-#, fuzzy, no-c-format
-msgid ""
-"<literal>mutable</literal> (optional - defaults to
<literal>true</literal>): "
-"a value of <literal>false</literal> specifies that the elements of the
"
-"collection never change. This allows for minor performance optimization in "
-"some cases."
-msgstr ""
-"<literal>mutable(可变)</literal> (可选 -
默认为<literal>true</literal>): 若"
-"值为<literal>false</literal>,表明集合中的元素不会改变(在某些情况下可以进行一"
-"些小的性能优化)。"
+#, no-c-format
+msgid "<literal>mutable</literal> (optional - defaults to
<literal>true</literal>): a value of <literal>false</literal>
specifies that the elements of the collection never change. This allows for minor
performance optimization in some cases."
+msgstr "<literal>mutable(可变)</literal>(可选 — 默认为
<literal>true</literal>):若值为
<literal>false</literal>,表明集合中的元素不会改变(在某些情况下可以进行一些小的性能优化)。 "
#. Tag: title
-#: collection_mapping.xml:230
#, no-c-format
msgid "Collection foreign keys"
-msgstr "集合外键(Collection foreign keys)"
+msgstr "集合外键(Collection foreign keys)"
#. Tag: para
-#: collection_mapping.xml:232
-#, fuzzy, no-c-format
-msgid ""
-"Collection instances are distinguished in the database by the foreign key of
"
-"the entity that owns the collection. This foreign key is referred to as the "
-"<emphasis>collection key column</emphasis>, or columns, of the
collection "
-"table. The collection key column is mapped by the
<literal><key></"
-"literal> element."
-msgstr ""
-"集合实例在数据库中依靠持有集合的实体的外键加以辨别。此外键作为<emphasis>集合"
-"关键字段(collection key column)</emphasis>(或多个字段)加以引用。集合关键"
-"字段通过<literal><key></literal> 元素映射。"
+#, no-c-format
+msgid "Collection instances are distinguished in the database by the foreign key of
the entity that owns the collection. This foreign key is referred to as the
<emphasis>collection key column</emphasis>, or columns, of the collection
table. The collection key column is mapped by the
<literal><key></literal> element."
+msgstr "集合实例在数据库中依靠持有集合的实体的外键加以辨别。此外键作为<emphasis>集合关键字段(collection key
column)</emphasis>(或多个字段)加以引用。集合关键字段通过
<literal><key></literal> 元素映射。 "
#. Tag: para
-#: collection_mapping.xml:240
-#, fuzzy, 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 "
-"<literal>not-null=\"true\"</literal>."
-msgstr ""
-"在外键字段上可能具有非空约束。对于大多数集合来说,这是隐含的。对单向一对多关"
-"联来说,外键字段默认是可以为空的,因此你可能需要指明 <literal>not-null=\"true"
-"\"</literal>。"
-
-#. Tag: programlisting
-#: collection_mapping.xml:247
#, no-c-format
-msgid "<![CDATA[<key column=\"productSerialNumber\"
not-null=\"true\"/>]]>"
-msgstr ""
+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
<literal>not-null=\"true\"</literal>."
+msgstr "在外键字段上可能具有非空约束。对于大多数集合来说,这是隐含的。对单向一对多关联来说,外键字段默认是可以为空的,因此你可能需要指明
<literal>not-null=\"true\"</literal>。 "
#. Tag: para
-#: collection_mapping.xml:249
-#, fuzzy, no-c-format
-msgid ""
-"The foreign key constraint can use <literal>ON DELETE
CASCADE</literal>."
-msgstr "外键约束可以使用<literal>ON DELETE CASCADE</literal>。"
-
-#. Tag: programlisting
-#: collection_mapping.xml:253
#, no-c-format
-msgid "<![CDATA[<key column=\"productSerialNumber\"
on-delete=\"cascade\"/>]]>"
-msgstr ""
+msgid "The foreign key constraint can use <literal>ON DELETE
CASCADE</literal>."
+msgstr "外键约束可以使用 <literal>ON DELETE CASCADE</literal>。 "
#. Tag: para
-#: collection_mapping.xml:255
#, no-c-format
-msgid ""
-"See the previous chapter for a full definition of the
<literal><key></"
-"literal> element."
-msgstr "对<literal><key></literal> 元素的完整定义,请参阅前面的章节。"
+msgid "See the previous chapter for a full definition of the
<literal><key></literal> element."
+msgstr "对 <literal><key></literal>
元素的完整定义,请参阅前面的章节。"
#. Tag: title
-#: collection_mapping.xml:263
#, no-c-format
msgid "Collection elements"
msgstr "集合元素(Collection elements)"
#. Tag: para
-#: collection_mapping.xml:265
-#, fuzzy, 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类型,包括所有的基本类型、自定义类型、组"
-"件,当然还有对其他实体的引用。存在一个重要的区别:位于集合中的对象可能是根"
-"据“值”语义来操作(其声明周期完全依赖于集合持有者),或者它可能是指向另一个实"
-"体的引用,具有其自己的生命周期。在后者的情况下,被作为集合持有的状态考虑的,"
-"只有两个对象之间的“连接”。"
+#, 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
类型,包括所有的基本类型、自定义类型、组件,当然还有对其他实体的引用。存在一个重要的区别:位于集合中的对象可能是根据“值”语义来操作(其声明周期完全依赖于集合持有者),或者它可能是指向另一个实体的引用,具有其自己的生命周期。在后者的情况下,被作为集合持有的状态考虑的,只有两个对象之间的“连接”。
"
#. Tag: para
-#: collection_mapping.xml:274
#, no-c-format
-msgid ""
-"The contained type is referred to as the <emphasis>collection element
type</"
-"emphasis>. Collection elements are mapped by
<literal><element></"
-"literal> or <literal><composite-element></literal>, or
in the case of "
-"entity references, with <literal><one-to-many></literal>
or "
-"<literal><many-to-many></literal>. The first two map
elements with "
-"value semantics, the next two are used to map entity associations."
-msgstr ""
-"被包容的类型被称为<emphasis>集合元素类型(collection element type)</"
-"emphasis>。集合元素通过<literal><element></literal>或<literal><"
-"composite-element></literal>映射,或在其是实体引用的时候,通过"
-"<literal><one-to-many></literal>
或<literal><many-to-many></"
-"literal>映射。前两种用于使用值语义映射元素,后两种用于映射实体关联。"
+msgid "The contained type is referred to as the <emphasis>collection element
type</emphasis>. Collection elements are mapped by
<literal><element></literal> or
<literal><composite-element></literal>, or in the case of entity
references, with <literal><one-to-many></literal> or
<literal><many-to-many></literal>. The first two map elements
with value semantics, the next two are used to map entity associations."
+msgstr "被包容的类型被称为<emphasis>集合元素类型(collection element
type)</emphasis>。集合元素通过 <literal><element></literal> 或
<literal><composite-element></literal> 映射,或在其是实体引用的时候,通过
<literal><one-to-many></literal> 或
<literal><many-to-many></literal>
映射。前两种用于使用值语义映射元素,后两种用于映射实体关联。"
#. Tag: title
-#: collection_mapping.xml:286
#, no-c-format
msgid "Indexed collections"
-msgstr "索引集合类(Indexed collections)"
+msgstr "索引集合类(Indexed collections)"
#. Tag: para
-#: collection_mapping.xml:288
-#, fuzzy, no-c-format
-msgid ""
-"All collection mappings, except those with set and bag semantics, need an "
-"<emphasis>index column</emphasis> in the collection table. An index
column "
-"is a column that maps to an array index, or <literal>List</literal>
index, "
-"or <literal>Map</literal> key. The index of a
<literal>Map</literal> may be "
-"of any basic type, mapped with
<literal><map-key></literal>. It can be "
-"an entity reference mapped with
<literal><map-key-many-to-many></"
-"literal>, or it can be a composite type mapped with
<literal><composite-"
-"map-key></literal>. The index of an array or list is always of type
"
-"<literal>integer</literal> and is mapped using the
<literal><list-"
-"index></literal> element. The mapped column contains sequential
integers "
-"that are numbered from zero by default."
-msgstr ""
-"所有的集合映射,除了set和bag语义的以外,都需要指定一个集合表的<emphasis>索引"
-"字段(index column)</emphasis>——用于对应到数组索引,或者<literal>List</"
-"literal>的索引,或者<literal>Map</literal>的关键字。通过<literal><map-"
-"key></literal>,<literal>Map</literal>
的索引可以是任何基础类型;若通过"
-"<literal><map-key-many-to-many></literal>,它也可以是一个实体引用;若通"
-"过<literal><composite-map-key></literal>,它还可以是一个组合类型。数组"
-"或列表的索引必须是<literal>integer</literal>类型,并且使用
<literal><list-"
-"index></literal>元素定义映射。被映射的字段包含有顺序排列的整数(默认从0开"
-"始)。"
+#, no-c-format
+msgid "All collection mappings, except those with set and bag semantics, need an
<emphasis>index column</emphasis> in the collection table. An index column is
a column that maps to an array index, or <literal>List</literal> index, or
<literal>Map</literal> key. The index of a <literal>Map</literal>
may be of any basic type, mapped with
<literal><map-key></literal>. It can be an entity reference
mapped with <literal><map-key-many-to-many></literal>, or it can
be a composite type mapped with
<literal><composite-map-key></literal>. The index of an array or
list is always of type <literal>integer</literal> and is mapped using the
<literal><list-index></literal> element. The mapped column
contains sequential integers that are numbered from zero by default."
+msgstr "所有的集合映射,除了 set 和 bag 语义的以外,都需要指定一个集合表的<emphasis>索引字段(index
column)</emphasis> — 用于对应到数组索引,或者 <literal>List</literal> 的索引,或者
<literal>Map</literal> 的关键字。通过
<literal><map-key></literal>,<literal>Map</literal>
的索引可以是任何基础类型;若通过
<literal><map-key-many-to-many></literal>,它也可以是一个实体引用;若通过
<literal><composite-map-key></literal>,它还可以是一个组合类型。数组或列表的索引必须是
<literal>integer</literal> 类型,并且使用
<literal><list-index></literal> 元素定义映射。被映射的字段包含有顺序排列的整数(默认从 0
开始)。 "
-#. Tag: sect2
-#: collection_mapping.xml:299
+#. Tag: para
#, no-c-format
-msgid ""
-"<programlistingco> <areaspec> <area id=\"index1\"
coords=\"2 45\"/> <area id="
-"\"index2\" coords=\"3 45\"/> </areaspec>
<programlisting><![CDATA[<list-"
-"index \n"
-" column=\"column_name\"\n"
-" base=\"0|1|...\"/>]]></programlisting>
<calloutlist> <callout "
-"arearefs=\"index1\"> <para>
<literal>column_name</literal> (required): the "
-"name of the column holding the collection index values. </para>
</callout> "
-"<callout arearefs=\"index1\"> <para>
<literal>base</literal> (optional - "
-"defaults to <literal>0</literal>): the value of the index column that
"
-"corresponds to the first element of the list or array. </para>
</callout> </"
-"calloutlist> </programlistingco> <programlistingco> <areaspec>
<area id="
-"\"mapkey1\" coords=\"2 45\"/> <area
id=\"mapkey2\" coords=\"3 45\"/> <area "
-"id=\"mapkey3\" coords=\"4 45\"/> </areaspec>
<programlisting><![CDATA[<map-"
-"key \n"
-" column=\"column_name\"\n"
-" formula=\"any SQL expression\"\n"
-" type=\"type_name\"\n"
-" node=\"@attribute-name\"\n"
-" length=\"N\"/>]]></programlisting>
<calloutlist> <callout arearefs="
-"\"mapkey1\"> <para> <literal>column</literal>
(optional): the name of the "
-"column holding the collection index values. </para> </callout>
<callout "
-"arearefs=\"mapkey2\"> <para>
<literal>formula</literal> (optional): a SQL "
-"formula used to evaluate the key of the map. </para> </callout>
<callout "
-"arearefs=\"mapkey3\"> <para> <literal>type</literal>
(required): the type of "
-"the map keys. </para> </callout> </calloutlist>
</programlistingco> "
-"<programlistingco> <areaspec> <area
id=\"indexmanytomany1\" coords=\"2 45\"/"
-"> <area id=\"indexmanytomany2\" coords=\"3 45\"/>
<area id=\"indexmanytomany3"
-"\" coords=\"3 45\"/> </areaspec>
<programlisting><![CDATA[<map-key-many-to-"
-"many\n"
-" column=\"column_name\"\n"
-" formula=\"any SQL expression\"\n"
-" class=\"ClassName\"\n"
-"/>]]></programlisting> <calloutlist> <callout
arearefs=\"indexmanytomany1\"> "
-"<para> <literal>column</literal> (optional): the name of the
foreign key "
-"column for the collection index values. </para> </callout> <callout
arearefs="
-"\"indexmanytomany2\"> <para>
<literal>formula</literal> (optional): a SQ "
-"formula used to evaluate the foreign key of the map key. </para>
</callout> "
-"<callout arearefs=\"indexmanytomany3\"> <para>
<literal>class</literal> "
-"(required): the entity class used as the map key. </para> </callout>
</"
-"calloutlist> </programlistingco>"
-msgstr ""
+msgid "<literal>column_name</literal> (required): the name of the column
holding the collection index values."
+msgstr "<literal>column_name</literal>(必需):持有集合索引值的字段的名称。 "
#. Tag: para
-#: collection_mapping.xml:380
-#, fuzzy, no-c-format
-msgid ""
-"If your table does not have an index column, and you still wish to use "
-"<literal>List</literal> as the property type, you can map the property
as a "
-"Hibernate <emphasis><bag></emphasis>. A bag does not
retain its order "
-"when it is retrieved from the database, but it can be optionally sorted or "
-"ordered."
-msgstr ""
-"值集合于多对多关联(Collections of values and many-to-many associations)"
+#, no-c-format
+msgid "<literal>base</literal> (optional - defaults to
<literal>0</literal>): the value of the index column that corresponds to the
first element of the list or array."
+msgstr "<literal>base</literal>(可选 — 默认为
<literal>0</literal>)对应列表或队列的第一个元素的索引字段的值。"
+#. Tag: para
+#, no-c-format
+msgid "<literal>column</literal> (optional): the name of the column
holding the collection index values."
+msgstr "<literal>column</literal>(可选):持有集合索引值的字段的名称。"
+
+#. Tag: para
+#, no-c-format
+msgid "<literal>formula</literal> (optional): a SQL formula used to
evaluate the key of the map."
+msgstr "<literal>formula</literal>(可选):用于对表键求值的 SQL 公式。"
+
+#. Tag: para
+#, no-c-format
+msgid "<literal>type</literal> (required): the type of the map
keys."
+msgstr "<literal>type</literal>(必需):映射键的类型。 "
+
+#. Tag: para
+#, no-c-format
+msgid "<literal>column</literal> (optional): the name of the foreign key
column for the collection index values."
+msgstr "<literal>column</literal>(可选):用于集合索引值的外键字段的名称。"
+
+#. Tag: para
+#, no-c-format
+msgid "<literal>formula</literal> (optional): a SQ formula used to
evaluate the foreign key of the map key."
+msgstr "<literal>formula</literal>(可选):用于对映射键的外键求值的 SQL 公式。"
+
+#. Tag: para
+#, no-c-format
+msgid "<literal>class</literal> (required): the entity class used as the
map key."
+msgstr "<literal>class</literal>(必需):用作映射键的实体类的名称。 "
+
+#. Tag: para
+#, no-c-format
+msgid "If your table does not have an index column, and you still wish to use
<literal>List</literal> as the property type, you can map the property as a
Hibernate <emphasis><bag></emphasis>. A bag does not retain its
order when it is retrieved from the database, but it can be optionally sorted or
ordered."
+msgstr "假若你的表没有一个索引字段,当你仍然希望使用 <literal>List</literal> 作为属性类型,你应该把此属性映射为
Hibernate <emphasis><bag></emphasis>。从数据库中获取的时候,bag
不维护其顺序,但也可选择性的进行排序。 "
+
#. Tag: title
-#: collection_mapping.xml:390
#, no-c-format
msgid "Collections of values and many-to-many associations"
-msgstr "对于一个值集合,
我们使用<literal><element></literal>标签。"
+msgstr "值集合于多对多关联(Collections of values and many-to-many associations)"
#. Tag: para
-#: collection_mapping.xml:392
-#, fuzzy, no-c-format
-msgid ""
-"Any collection of values or many-to-many associations requires a dedicated "
-"<emphasis>collection table</emphasis> with a foreign key column or
columns, "
-"<emphasis>collection element column</emphasis> or columns, and possibly
an "
-"index column or columns."
-msgstr "<literal>column</literal>(可选):保存集合元素值的字段名。"
+#, no-c-format
+msgid "Any collection of values or many-to-many associations requires a dedicated
<emphasis>collection table</emphasis> with a foreign key column or columns,
<emphasis>collection element column</emphasis> or columns, and possibly an
index column or columns."
+msgstr "任何值集合或者多对多关联需要专用的具有一个或多个外键字段的 <emphasis>collection
table</emphasis>、一个或多个 <emphasis>collection element
column</emphasis>,以及还可能有一个或多个索引字段。 "
#. Tag: para
-#: collection_mapping.xml:399
-#, fuzzy, no-c-format
-msgid ""
-"For a collection of values use the
<literal><element></literal> tag. "
-"For example:"
-msgstr "<literal>formula</literal> (可选): 用于计算元素的SQL公式"
+#, no-c-format
+msgid "For a collection of values use the
<literal><element></literal> tag. For example:"
+msgstr "对于一个值集合,我们使用 <literal><element></literal>
标签。例如:"
-#. Tag: sect2
-#: collection_mapping.xml:401
+#. Tag: para
#, no-c-format
-msgid ""
-"<programlistingco> <areaspec> <area id=\"element1b\"
coords=\"2 50\"/> <area "
-"id=\"element2b\" coords=\"3 50\"/> <area
id=\"element3b\" coords=\"4 50\"/> "
-"</areaspec> <programlisting><![CDATA[<element\n"
-" column=\"column_name\"\n"
-" formula=\"any SQL expression\"\n"
-" type=\"typename\"\n"
-" length=\"L\"\n"
-" precision=\"P\"\n"
-" scale=\"S\"\n"
-" not-null=\"true|false\"\n"
-" unique=\"true|false\"\n"
-" node=\"element-name\"\n"
-"/>]]></programlisting> <calloutlist> <callout
arearefs=\"element1b\"> <para> "
-"<literal>column</literal> (optional): the name of the column holding
the "
-"collection element values. </para> </callout> <callout
arearefs=\"element2b"
-"\"> <para> <literal>formula</literal> (optional): an SQL
formula used to "
-"evaluate the element. </para> </callout> <callout
arearefs=\"element3b\"> "
-"<para> <literal>type</literal> (required): the type of the
collection "
-"element. </para> </callout> </calloutlist>
</programlistingco> <para> A "
-"<emphasis>many-to-many association</emphasis> is specified using the
"
-"<literal><many-to-many></literal> element. </para>
<programlistingco> "
-"<areaspec> <area id=\"manytomany1\" coords=\"2
60\"/> <area id=\"manytomany2"
-"\" coords=\"3 60\"/> <area id=\"manytomany3\"
coords=\"4 60\"/> <area id="
-"\"manytomany4\" coords=\"5 60\"/> <area
id=\"manytomany5\" coords=\"6 60\"/> "
-"<area id=\"manytomany6\" coords=\"7 60\"/> <area
id=\"manytomany7\" coords="
-"\"8 60\"/> <area id=\"manytomany8\" coords=\"9
60\"/> </areaspec> "
-"<programlisting><![CDATA[<many-to-many\n"
-" column=\"column_name\"\n"
-" formula=\"any SQL expression\"\n"
-" class=\"ClassName\"\n"
-" fetch=\"select|join\"\n"
-" unique=\"true|false\"\n"
-" not-found=\"ignore|exception\"\n"
-" entity-name=\"EntityName\"\n"
-" property-ref=\"propertyNameFromAssociatedClass\"\n"
-" node=\"element-name\"\n"
-" embed-xml=\"true|false\"\n"
-" />]]></programlisting> <calloutlist> <callout
arearefs=\"manytomany1\"> "
-"<para> <literal>column</literal> (optional): the name of the
element foreign "
-"key column. </para> </callout> <callout
arearefs=\"manytomany2\"> <para> "
-"<literal>formula</literal> (optional): an SQL formula used to evaluate
the "
-"element foreign key value. </para> </callout> <callout
arearefs=\"manytomany3"
-"\"> <para> <literal>class</literal> (required): the name
of the associated "
-"class. </para> </callout> <callout
arearefs=\"manytomany4\"> <para> "
-"<literal>fetch</literal> (optional - defaults to
<literal>join</literal>): "
-"enables outer-join or sequential select fetching for this association. This "
-"is a special case; for full eager fetching in a single
<literal>SELECT</"
-"literal> of an entity and its many-to-many relationships to other entities,
"
-"you would enable <literal>join</literal> fetching,not only of the
collection "
-"itself, but also with this attribute on the
<literal><many-to-many></"
-"literal> nested element. </para> </callout> <callout
arearefs=\"manytomany5"
-"\"> <para> <literal>unique</literal> (optional): enables
the DDL generation "
-"of a unique constraint for the foreign-key column. This makes the "
-"association multiplicity effectively one-to-many. </para> </callout>
"
-"<callout arearefs=\"manytomany6\"> <para>
<literal>not-found</literal> "
-"(optional - defaults to <literal>exception</literal>): specifies how
foreign "
-"keys that reference missing rows will be handled:
<literal>ignore</literal> "
-"will treat a missing row as a null association. </para> </callout>
<callout "
-"arearefs=\"manytomany7\"> <para>
<literal>entity-name</literal> (optional): "
-"the entity name of the associated class, as an alternative to "
-"<literal>class</literal>. </para> </callout> <callout
arearefs=\"manytomany8"
-"\"> <para> <literal>property-ref</literal> (optional):
the name of a "
-"property of the associated class that is joined to this foreign key. If not "
-"specified, the primary key of the associated class is used. </para>
</"
-"callout> </calloutlist> </programlistingco>"
-msgstr ""
+msgid "<literal>column</literal> (optional): the name of the column
holding the collection element values."
+msgstr "<literal>column</literal>(可选):持有集合元素值的字段的名称。"
#. Tag: para
-#: collection_mapping.xml:506
#, no-c-format
-msgid "Here are some examples."
-msgstr ""
+msgid "<literal>formula</literal> (optional): an SQL formula used to
evaluate the element."
+msgstr "<literal>formula</literal>(可选):用于对元素求值的 SQL 公式。"
#. Tag: para
-#: collection_mapping.xml:509
#, no-c-format
-msgid "A set of strings:"
-msgstr ""
+msgid "<literal>type</literal> (required): the type of the collection
element."
+msgstr "<literal>type</literal>(必需):集合元素的类型。 "
-#. Tag: programlisting
-#: collection_mapping.xml:513
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"names\"
table=\"person_names\">\n"
-" <key column=\"person_id\"/>\n"
-" <element column=\"person_name\"
type=\"string\"/>\n"
-"</set>]]>"
-msgstr ""
+msgid "A <emphasis>many-to-many association</emphasis> is specified
using the <literal><many-to-many></literal> element."
+msgstr "用 <literal><many-to-many></literal> 元素指定
<emphasis>many-to-many association</emphasis>。"
#. Tag: para
-#: collection_mapping.xml:515
-#, fuzzy, no-c-format
-msgid ""
-"A bag containing integers with an iteration order determined by the "
-"<literal>order-by</literal> attribute:"
-msgstr ""
-"一个实体数组,在这个案例中是一个多对多的关联(注意这里的实体是自动管理生命周期"
-"的对象(life cycle
objects),<literal>cascade=\"all\"</literal>):"
+#, no-c-format
+msgid "<literal>column</literal> (optional): the name of the element
foreign key column."
+msgstr "<literal>column</literal>(必需):元素外键字段的名称。 "
-#. Tag: programlisting
-#: collection_mapping.xml:520
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<bag name=\"sizes\" \n"
-" table=\"item_sizes\" \n"
-" order-by=\"size asc\">\n"
-" <key column=\"item_id\"/>\n"
-" <element column=\"size\" type=\"integer\"/>\n"
-"</bag>]]>"
-msgstr ""
+msgid "<literal>formula</literal> (optional): an SQL formula used to
evaluate the element foreign key value."
+msgstr "<literal>formula</literal>(可选):用于对元素外键值求值的 SQL 公式。"
#. Tag: para
-#: collection_mapping.xml:522
-#, fuzzy, no-c-format
-msgid "An array of entities, in this case, a many-to-many association:"
-msgstr "一个map,通过字符串的索引来指明日期:"
+#, no-c-format
+msgid "<literal>class</literal> (required): the name of the associated
class."
+msgstr "<literal>class</literal>(必需):被关联类的名称。 "
-#. Tag: programlisting
-#: collection_mapping.xml:526
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<array name=\"addresses\" \n"
-" table=\"PersonAddress\" \n"
-" cascade=\"persist\">\n"
-" <key column=\"personId\"/>\n"
-" <list-index column=\"sortOrder\"/>\n"
-" <many-to-many column=\"addressId\"
class=\"Address\"/>\n"
-"</array>]]>"
-msgstr ""
+msgid "<literal>fetch</literal> (optional - defaults to
<literal>join</literal>): enables outer-join or sequential select fetching for
this association. This is a special case; for full eager fetching in a single
<literal>SELECT</literal> of an entity and its many-to-many relationships to
other entities, you would enable <literal>join</literal> fetching,not only of
the collection itself, but also with this attribute on the
<literal><many-to-many></literal> nested element."
+msgstr "<literal>fetch</literal>(可选 - 缺省为
<literal>join</literal>): 为这个关联启用外连接或序列性选择抓取。这是一个特例。对于在单个
<literal>SELECT</literal> 里进行完全的 eager fetching 以及使
<literal><many-to-many></literal> n用多对多关联,你可以启用
<literal>join</literal> fetching,这不仅是对于集合本身,也对
<literal><many-to-many></literal> 嵌套元素的属性。"
#. Tag: para
-#: collection_mapping.xml:528
#, no-c-format
-msgid "A map from string indices to dates:"
-msgstr "一个组件的列表:(下一章讨论)"
+msgid "<literal>unique</literal> (optional): enables the DDL generation
of a unique constraint for the foreign-key column. This makes the association multiplicity
effectively one-to-many."
+msgstr "<literal>unique</literal>(可选):未外键字段启用唯一约束的 DDL
生成。这使得关联一对多的多样性更为有效。"
-#. Tag: programlisting
-#: collection_mapping.xml:532
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<map name=\"holidays\" \n"
-" table=\"holidays\" \n"
-" schema=\"dbo\" \n"
-" order-by=\"hol_name asc\">\n"
-" <key column=\"id\"/>\n"
-" <map-key column=\"hol_name\"
type=\"string\"/>\n"
-" <element column=\"hol_date\" type=\"date\"/>\n"
-"</map>]]>"
-msgstr ""
+msgid "<literal>not-found</literal> (optional - defaults to
<literal>exception</literal>): specifies how foreign keys that reference
missing rows will be handled: <literal>ignore</literal> will treat a missing
row as a null association."
+msgstr "<literal>not-found</literal>(可选 - 默认为
<literal>exception</literal>):指明若缓存的标示值关联的行缺失,该如何处理:<literal>ignore</literal>
会把缺失的行作为一个空关联处理。 "
#. Tag: para
-#: collection_mapping.xml:534
-#, fuzzy, no-c-format
-msgid "A list of components (this is discussed in the next chapter):"
-msgstr "一对多关联(One-to-many Associations)"
+#, no-c-format
+msgid "<literal>entity-name</literal> (optional): the entity name of the
associated class, as an alternative to <literal>class</literal>."
+msgstr "<literal>entity-name</literal>(可选):被关联的类的实体名,作为
<literal>class</literal> 的替代。 "
-#. Tag: programlisting
-#: collection_mapping.xml:538
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<list name=\"carComponents\" \n"
-" table=\"CarComponents\">\n"
-" <key column=\"carId\"/>\n"
-" <list-index column=\"sortOrder\"/>\n"
-" <composite-element class=\"CarComponent\">\n"
-" <property name=\"price\"/>\n"
-" <property name=\"type\"/>\n"
-" <property name=\"serialNumber\"
column=\"serialNum\"/>\n"
-" </composite-element>\n"
-"</list>]]>"
-msgstr ""
+msgid "<literal>property-ref</literal> (optional): the name of a
property of the associated class that is joined to this foreign key. If not specified, the
primary key of the associated class is used."
+msgstr
"<literal>property-ref</literal>(可选):连接至这个外键的关联类的属性名称。如果未指定,关联类的主键将被使用。"
-#. Tag: title
-#: collection_mapping.xml:543
+#. Tag: para
#, no-c-format
-msgid "One-to-many associations"
-msgstr ""
-"<emphasis>一对多关联</emphasis><emphasis>通过外键</emphasis>连接两个类对应的"
-"表,而没有中间集合表。 这个关系模型失去了一些Java集合的语义:"
+msgid "Here are some examples."
+msgstr "下面是一些例子:"
#. Tag: para
-#: collection_mapping.xml:545
-#, fuzzy, no-c-format
-msgid ""
-"A <emphasis>one-to-many association</emphasis> links the tables of two
"
-"classes via a foreign key with no intervening collection table. This mapping
"
-"loses certain semantics of normal Java collections:"
-msgstr "一个被包含的实体的实例只能被包含在一个集合的实例中"
+#, no-c-format
+msgid "A set of strings:"
+msgstr "一系列字符串:"
#. Tag: para
-#: collection_mapping.xml:553
-#, fuzzy, no-c-format
-msgid ""
-"An instance of the contained entity class cannot belong to more than one "
-"instance of the collection."
-msgstr "一个被包含的实体的实例只能对应于集合索引的一个值中"
+#, no-c-format
+msgid "A bag containing integers with an iteration order determined by the
<literal>order-by</literal> attribute:"
+msgstr "包含一组整数的 bag(还设置了 <literal>order-by</literal> 参数指定了迭代的顺序):
"
#. Tag: para
-#: collection_mapping.xml:559
-#, fuzzy, no-c-format
-msgid ""
-"An instance of the contained entity class cannot appear at more than one "
-"value of the collection index."
-msgstr ""
-"一个从<literal>Product</literal>到<literal>Part</literal>的关联需要关键字字"
-"段,可能还有一个索引字段指向<literal>Part</literal>所对应的表。
<literal><"
-"one-to-many></literal>标记指明了一个一对多的关联。"
+#, no-c-format
+msgid "An array of entities, in this case, a many-to-many association:"
+msgstr "一个实体数组,在这个案例中是一个多对多的关联(注意这里的实体是自动管理生命周期的对象(lifecycle
objects),<literal>cascade=\"all\"</literal>): "
#. Tag: para
-#: collection_mapping.xml:566
-#, fuzzy, no-c-format
-msgid ""
-"An association from <literal>Product</literal> to
<literal>Part</literal> "
-"requires the existence of a foreign key column and possibly an index column "
-"to the <literal>Part</literal> table. A
<literal><one-to-many></"
-"literal> tag indicates that this is a one-to-many association."
-msgstr "<literal>class</literal>(必须):被关联类的名称。"
+#, no-c-format
+msgid "A map from string indices to dates:"
+msgstr "一个 map,通过字符串的索引来指明日期:"
-#. Tag: programlisting
-#: collection_mapping.xml:579
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<one-to-many \n"
-" class=\"ClassName\"\n"
-" not-found=\"ignore|exception\"\n"
-" entity-name=\"EntityName\"\n"
-" node=\"element-name\"\n"
-" embed-xml=\"true|false\"\n"
-" />]]>"
-msgstr ""
+msgid "A list of components (this is discussed in the next chapter):"
+msgstr "一个组件的列表:(将在下一章讨论)"
+#. Tag: title
+#, no-c-format
+msgid "One-to-many associations"
+msgstr "一对多关联(One-to-many Associations)"
+
#. Tag: para
-#: collection_mapping.xml:582
-#, fuzzy, no-c-format
-msgid "<literal>class</literal> (required): the name of the associated
class."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"为此关联打开外连接抓取或者后续select抓取。这是特殊情况;对于一个实体及其指向"
-"其他实体的多对多关联进全预先抓取(使用一条单独的<literal>SELECT</literal>),"
-"你不仅需要对集合自身打开<literal>join</literal>,也需要对<literal><many-"
-"to-many></literal>这个内嵌元素打开此属性。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>not-found</literal> (可选 -
默认为<literal>exception</literal>): 指"
-"明若缓存的标示值关联的行缺失,该如何处理: <literal>ignore</literal> 会把缺失的"
-"行作为一个空关联处理。"
+#, no-c-format
+msgid "A <emphasis>one-to-many association</emphasis> links the tables
of two classes via a foreign key with no intervening collection table. This mapping loses
certain semantics of normal Java collections:"
+msgstr
"<emphasis>一对多关联</emphasis><emphasis>通过外键</emphasis>连接两个类对应的表,而没有中间集合表。
这个关系模型失去了一些 Java 集合的语义:"
#. Tag: para
-#: collection_mapping.xml:587
-#, fuzzy, no-c-format
-msgid ""
-"<literal>not-found</literal> (optional - defaults to
<literal>exception</"
-"literal>): specifies how cached identifiers that reference missing rows will
"
-"be handled. <literal>ignore</literal> will treat a missing row as a
null "
-"association."
-msgstr ""
-"<literal>entity-name</literal> (可选): 被关联的类的实体名,作为"
-"<literal>class</literal>的替代。"
+#, no-c-format
+msgid "An instance of the contained entity class cannot belong to more than one
instance of the collection."
+msgstr "一个被包含的实体的实例只能被包含在一个集合的实例中。"
#. Tag: para
-#: collection_mapping.xml:594
-#, fuzzy, no-c-format
-msgid ""
-"<literal>entity-name</literal> (optional): the entity name of the
associated "
-"class, as an alternative to <literal>class</literal>."
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<literal>property-ref</literal>: (可选) 被关联到此外键(foreign key)的类中的对"
-"应属性的名字。若未指定,使用被关联类的主键。\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"例子"
+#, no-c-format
+msgid "An instance of the contained entity class cannot appear at more than one
value of the collection index."
+msgstr "一个被包含的实体的实例只能对应于集合索引的一个值中。"
#. Tag: para
-#: collection_mapping.xml:602
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><one-to-many></literal> element does not
need to declare "
-"any columns. Nor is it necessary to specify the
<literal>table</literal> "
-"name anywhere."
-msgstr ""
-"注意:<literal><one-to-many></literal>元素不需要定义任何字段。
也不需要"
-"指定表名。"
+#, no-c-format
+msgid "An association from <literal>Product</literal> to
<literal>Part</literal> requires the existence of a foreign key column and
possibly an index column to the <literal>Part</literal> table. A
<literal><one-to-many></literal> tag indicates that this is a
one-to-many association."
+msgstr "一个从 <literal>Product</literal> 到
<literal>Part</literal> 的关联需要关键字字段,可能还有一个索引字段指向
<literal>Part</literal>
所对应的表。<literal><one-to-many></literal> 标记指明了一个一对多的关联。 "
#. Tag: para
-#: collection_mapping.xml:609
-#, fuzzy, no-c-format
-msgid ""
-"If the foreign key column of a
<literal><one-to-many></literal> "
-"association is declared <literal>NOT NULL</literal>, you must declare
the "
-"<literal><key></literal> mapping
<literal>not-null=\"true\"</literal> "
-"or <emphasis>use a bidirectional association</emphasis> with the
collection "
-"mapping marked <literal>inverse=\"true\"</literal>. See the
discussion of "
-"bidirectional associations later in this chapter for more information."
-msgstr ""
-"<emphasis>重要提示</emphasis>:如果<literal>一对多</literal>关联中的外键字段定"
-"义成<literal>NOT
NULL</literal>,你必须把<literal><key></literal>映射声"
-"明为<literal>not-null=\"true\"</literal>,或者使用<emphasis>双向关联</"
-"emphasis>,并且标明<literal>inverse=\"true\"</literal>。参阅本章后面关于双向"
-"关联的讨论。"
+#, no-c-format
+msgid "<literal>not-found</literal> (optional - defaults to
<literal>exception</literal>): specifies how cached identifiers that reference
missing rows will be handled. <literal>ignore</literal> will treat a missing
row as a null association."
+msgstr "<literal>not-found</literal>(可选 -
默认为<literal>exception</literal>):指明若缓存的标示值关联的行缺失,该如何处理:<literal>ignore</literal>
会把缺失的行作为一个空关联处理。 "
#. Tag: para
-#: collection_mapping.xml:619
-#, fuzzy, no-c-format
-msgid ""
-"The following example shows a map of <literal>Part</literal> entities
by "
-"name, where <literal>partName</literal> is a persistent property of
"
-"<literal>Part</literal>. Notice the use of a formula-based
index:"
-msgstr ""
-"下面的例子展示一个<literal>Part</literal>实体的map,把name作为关键字。"
-"( <literal>partName</literal>
是<literal>Part</literal>的持久化属性)。注意其"
-"中的基于公式的索引的用法。"
+#, no-c-format
+msgid "The <literal><one-to-many></literal> element does
not need to declare any columns. Nor is it necessary to specify the
<literal>table</literal> name anywhere."
+msgstr "注意:<literal><one-to-many></literal>
元素不需要定义任何字段。也不需要指定表名。 "
-#. Tag: programlisting
-#: collection_mapping.xml:625
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<map name=\"parts\"\n"
-" cascade=\"all\">\n"
-" <key column=\"productId\"
not-null=\"true\"/>\n"
-" <map-key formula=\"partName\"/>\n"
-" <one-to-many class=\"Part\"/>\n"
-"</map>]]>"
-msgstr ""
+msgid "If the foreign key column of a
<literal><one-to-many></literal> association is declared
<literal>NOT NULL</literal>, you must declare the
<literal><key></literal> mapping
<literal>not-null=\"true\"</literal> or <emphasis>use a
bidirectional association</emphasis> with the collection mapping marked
<literal>inverse=\"true\"</literal>. See the discussion of
bidirectional associations later in this chapter for more information."
+msgstr
"<emphasis>重要提示</emphasis>:如果<literal>一对多</literal>关联中的外键字段定义成
<literal>NOT NULL</literal>,你必须把
<literal><key></literal> 映射声明为
<literal>not-null=\"true\"</literal>,或者使用<emphasis>双向关联</emphasis>,并且标明
<literal>inverse=\"true\"</literal>。参阅本章后面关于双向关联的讨论。 "
+#. Tag: para
+#, no-c-format
+msgid "The following example shows a map of <literal>Part</literal>
entities by name, where <literal>partName</literal> is a persistent property
of <literal>Part</literal>. Notice the use of a formula-based index:"
+msgstr "下面的例子展示一个 <literal>Part</literal> 实体的 map,把 name 作为关键字。(
<literal>partName</literal> 是 <literal>Part</literal>
的持久化属性)。注意其中的基于公式的索引的用法。 "
+
#. Tag: title
-#: collection_mapping.xml:631
#, no-c-format
msgid "Advanced collection mappings"
msgstr "高级集合映射(Advanced collection mappings)"
#. Tag: title
-#: collection_mapping.xml:634
#, no-c-format
msgid "Sorted collections"
msgstr "有序集合(Sorted collections)"
#. Tag: para
-#: collection_mapping.xml:636
#, no-c-format
-msgid ""
-"Hibernate supports collections implementing
<literal>java.util.SortedMap</"
-"literal> and <literal>java.util.SortedSet</literal>. You must
specify a "
-"comparator in the mapping file:"
-msgstr ""
-"Hibernate支持实现<literal>java.util.SortedMap</literal>和<literal>java.util."
-"SortedSet</literal>的集合。 你必须在映射文件中指定一个比较器:"
+msgid "Hibernate supports collections implementing
<literal>java.util.SortedMap</literal> and
<literal>java.util.SortedSet</literal>. You must specify a comparator in the
mapping file:"
+msgstr "Hibernate 支持实现 <literal>java.util.SortedMap</literal> 和
<literal>java.util.SortedSet</literal> 的集合。你必须在映射文件中指定一个比较器:"
-#. Tag: programlisting
-#: collection_mapping.xml:641
-#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"aliases\" \n"
-" table=\"person_aliases\" \n"
-" sort=\"natural\">\n"
-" <key column=\"person\"/>\n"
-" <element column=\"name\" type=\"string\"/>\n"
-"</set>\n"
-"\n"
-"<map name=\"holidays\"
sort=\"my.custom.HolidayComparator\">\n"
-" <key column=\"year_id\"/>\n"
-" <map-key column=\"hol_name\"
type=\"string\"/>\n"
-" <element column=\"hol_date\" type=\"date\"/>\n"
-"</map>]]>"
-msgstr ""
-
#. Tag: para
-#: collection_mapping.xml:643
#, no-c-format
-msgid ""
-"Allowed values of the <literal>sort</literal> attribute are "
-"<literal>unsorted</literal>, <literal>natural</literal> and
the name of a "
-"class implementing <literal>java.util.Comparator</literal>."
-msgstr ""
-"<literal>sort</literal>属性中允许的值包括<literal>unsorted</literal>,"
-"<literal>natural</literal>和某个实现了<literal>java.util.Comparator</literal>"
-"的类的名称。"
+msgid "Allowed values of the <literal>sort</literal> attribute are
<literal>unsorted</literal>, <literal>natural</literal> and the
name of a class implementing <literal>java.util.Comparator</literal>."
+msgstr "<literal>sort</literal> 属性中允许的值包括
<literal>unsorted</literal>,<literal>natural</literal> 和某个实现了
<literal>java.util.Comparator</literal> 的类的名称。"
#. Tag: para
-#: collection_mapping.xml:649
#, no-c-format
-msgid ""
-"Sorted collections actually behave like
<literal>java.util.TreeSet</literal> "
-"or <literal>java.util.TreeMap</literal>."
-msgstr ""
-"分类集合的行为事实上象<literal>java.util.TreeSet</literal>或者<literal>java."
-"util.TreeMap</literal>。"
+msgid "Sorted collections actually behave like
<literal>java.util.TreeSet</literal> or
<literal>java.util.TreeMap</literal>."
+msgstr "分类集合的行为事实上象 <literal>java.util.TreeSet</literal> 或者
<literal>java.util.TreeMap</literal>。"
#. Tag: para
-#: collection_mapping.xml:654
-#, fuzzy, no-c-format
-msgid ""
-"If you want the database itself to order the collection elements, use the "
-"<literal>order-by</literal> attribute of
<literal>set</literal>, "
-"<literal>bag</literal> or <literal>map</literal> mappings.
This solution is "
-"only available under JDK 1.4 or higher and is implemented using "
-"<literal>LinkedHashSet</literal> or
<literal>LinkedHashMap</literal>. This "
-"performs the ordering in the SQL query and not in the memory."
-msgstr ""
-"如果你希望数据库自己对集合元素排序,可以利用<literal>set</literal>,"
-"<literal>bag</literal>或者<literal>map</literal>映射中的<literal>order-by</"
-"literal>属性。这个解决方案只能在jdk1.4或者更高的jdk版本中才可以实现(通过"
-"LinkedHashSet或者 LinkedHashMap实现)。 它是在SQL查询中完成排序,而不是在内存"
-"中。"
-
-#. Tag: programlisting
-#: collection_mapping.xml:663
#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"aliases\" table=\"person_aliases\"
order-by=\"lower"
-"(name) asc\">\n"
-" <key column=\"person\"/>\n"
-" <element column=\"name\" type=\"string\"/>\n"
-"</set>\n"
-"\n"
-"<map name=\"holidays\" order-by=\"hol_date,
hol_name\">\n"
-" <key column=\"year_id\"/>\n"
-" <map-key column=\"hol_name\"
type=\"string\"/>\n"
-" <element column=\"hol_date type=\"date\"/>\n"
-"</map>]]>"
-msgstr ""
+msgid "If you want the database itself to order the collection elements, use the
<literal>order-by</literal> attribute of <literal>set</literal>,
<literal>bag</literal> or <literal>map</literal> mappings. This
solution is only available under JDK 1.4 or higher and is implemented using
<literal>LinkedHashSet</literal> or
<literal>LinkedHashMap</literal>. This performs the ordering in the SQL query
and not in the memory."
+msgstr "如果你希望数据库自己对集合元素排序,可以利用
<literal>set</literal>,<literal>bag</literal> 或者
<literal>map</literal> 映射中的 <literal>order-by</literal>
属性。这个解决方案只能在 jdk1.4 或者更高的 jdk 版本中才可以实现(通过 LinkedHashSet 或者 LinkedHashMap 实现)。它是在 SQL
查询中完成排序,而不是在内存中。 "
#. Tag: title
-#: collection_mapping.xml:666
#, no-c-format
msgid "Note"
-msgstr ""
+msgstr "注意"
#. Tag: para
-#: collection_mapping.xml:667
-#, fuzzy, no-c-format
-msgid ""
-"The value of the <literal>order-by</literal> attribute is an SQL
ordering, "
-"not an HQL ordering."
-msgstr ""
-"注意: 这个<literal>order-by</literal>属性的值是一个SQL排序子句而不是HQL的!"
+#, no-c-format
+msgid "The value of the <literal>order-by</literal> attribute is an SQL
ordering, not an HQL ordering."
+msgstr "注意:这个 <literal>order-by</literal> 属性的值是一个 SQL 排序子句而不是 HQL
的。"
#. Tag: para
-#: collection_mapping.xml:673
-#, fuzzy, no-c-format
-msgid ""
-"Associations can even be sorted by arbitrary criteria at runtime using a "
-"collection <literal>filter()</literal>:"
-msgstr ""
-"关联还可以在运行时使用集合<literal>filter()</literal>根据任意的条件来排序。"
-
-#. Tag: programlisting
-#: collection_mapping.xml:678
#, no-c-format
-msgid ""
-"<![CDATA[sortedUsers = s.createFilter( group.getUsers(), \"order by
this.name"
-"\" ).list();]]>"
-msgstr ""
+msgid "Associations can even be sorted by arbitrary criteria at runtime using a
collection <literal>filter()</literal>:"
+msgstr "关联还可以在运行时使用集合 <literal>filter()</literal> 根据任意的条件来排序:"
#. Tag: title
-#: collection_mapping.xml:683
#, no-c-format
msgid "Bidirectional associations"
msgstr "双向关联(Bidirectional associations)"
#. Tag: para
-#: collection_mapping.xml:685
-#, fuzzy, no-c-format
-msgid ""
-"A <emphasis>bidirectional association</emphasis> allows navigation from
both "
-"\"ends\" of the association. Two kinds of bidirectional association are
"
-"supported:"
-msgstr ""
-"<emphasis>双向关联</emphasis>允许通过关联的任一端访问另外一端。在Hibernate"
-"中, 支持两种类型的双向关联: <placeholder-1/>"
+#, no-c-format
+msgid "A <emphasis>bidirectional association</emphasis> allows
navigation from both \"ends\" of the association. Two kinds of bidirectional
association are supported:"
+msgstr "<emphasis>双向关联</emphasis>允许通过关联的任一端访问另外一端。在 Hibernate
中,支持两种类型的双向关联: "
#. Tag: term
-#: collection_mapping.xml:692
#, no-c-format
msgid "one-to-many"
msgstr "一对多(one-to-many)"
#. Tag: para
-#: collection_mapping.xml:694
-#, fuzzy, no-c-format
+#, no-c-format
msgid "set or bag valued at one end and single-valued at the other"
-msgstr "Set或者bag值在一端, 单独值(非集合)在另外一端"
+msgstr "Set 或者 bag 值在一端,单独值(非集合)在另外一端 "
#. Tag: term
-#: collection_mapping.xml:700
#, no-c-format
msgid "many-to-many"
msgstr "多对多(many-to-many)"
#. Tag: para
-#: collection_mapping.xml:702
#, no-c-format
msgid "set or bag valued at both ends"
-msgstr "两端都是set或bag值"
+msgstr "两端都是 set 或 bag 值"
#. Tag: para
-#: collection_mapping.xml:711
-#, fuzzy, 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 "
-"<emphasis>inverse</emphasis>. You cannot select an indexed
collection."
-msgstr ""
-"要建立一个双向的多对多关联,只需要映射两个many-to-many关联到同一个数据库表"
-"中,并再定义其中的一端为<emphasis>inverse</emphasis>(使用哪一端要根据你的选"
-"择,但它不能是一个索引集合)。"
+#, 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
<emphasis>inverse</emphasis>. You cannot select an indexed collection."
+msgstr "要建立一个双向的多对多关联,只需要映射两个 many-to-many 关联到同一个数据库表中,并再定义其中的一端为
<emphasis>inverse</emphasis>(使用哪一端要根据你的选择,但它不能是一个索引集合)。 "
#. Tag: para
-#: collection_mapping.xml:718
-#, fuzzy, 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:"
-
-#. Tag: programlisting
-#: collection_mapping.xml:723
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Category\">\n"
-" <id name=\"id\" column=\"CATEGORY_ID\"/>\n"
-" ...\n"
-" <bag name=\"items\" table=\"CATEGORY_ITEM\">\n"
-" <key column=\"CATEGORY_ID\"/>\n"
-" <many-to-many class=\"Item\"
column=\"ITEM_ID\"/>\n"
-" </bag>\n"
-"</class>\n"
-"\n"
-"<class name=\"Item\">\n"
-" <id name=\"id\" column=\"ITEM_ID\"/>\n"
-" ...\n"
-"\n"
-" <!-- inverse end -->\n"
-" <bag name=\"categories\" table=\"CATEGORY_ITEM\"
inverse=\"true\">\n"
-" <key column=\"ITEM_ID\"/>\n"
-" <many-to-many class=\"Category\"
column=\"CATEGORY_ID\"/>\n"
-" </bag>\n"
-"</class>]]>"
-msgstr ""
+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
-#: collection_mapping.xml:725
-#, fuzzy, no-c-format
-msgid ""
-"Changes made only to the inverse end of the association are
<emphasis>not</"
-"emphasis> persisted. This means that Hibernate has two representations in
"
-"memory for every bidirectional association: one link from A to B and another
"
-"link from B to A. This is easier to understand if you think about the Java "
-"object model and how a many-to-many relationship in Javais created:"
-msgstr ""
-"如果只对关联的反向端进行了改变,这个改变<emphasis>不会</emphasis>被持久化。 "
-"这表示Hibernate为每个双向关联在内存中存在两次表现,一个从A连接到B,另一个从B连"
-"接到A。如果你回想一下Java对象模型,我们是如何在Java中创建多对多关系的,这可以"
-"让你更容易理解:"
-
-#. Tag: programlisting
-#: collection_mapping.xml:733
#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"category.getItems().add(item); // The category now \"knows\"
about "
-"the relationship\n"
-"item.getCategories().add(category); // The item now \"knows\" about
the "
-"relationship\n"
-"\n"
-"session.persist(item); // The relationship won't be "
-"saved!\n"
-"session.persist(category); // The relationship will be
saved]]>"
-msgstr ""
+msgid "Changes made only to the inverse end of the association are
<emphasis>not</emphasis> persisted. This means that Hibernate has two
representations in memory for every bidirectional association: one link from A to B and
another link from B to A. This is easier to understand if you think about the Java object
model and how a many-to-many relationship in Javais created:"
+msgstr "如果只对关联的反向端进行了改变,这个改变<emphasis>不会</emphasis>被持久化。 这表示 Hibernate
为每个双向关联在内存中存在两次表现,一个从 A 连接到 B,另一个从 B 连接到 A。如果你回想一下 Java 对象模型,我们是如何在 Java
中创建多对多关系的,这可以让你更容易理解: "
#. Tag: para
-#: collection_mapping.xml:735
#, 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
-#: collection_mapping.xml:739
-#, fuzzy, 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
<literal>inverse=\"true\"</literal>."
-msgstr ""
-"要建立一个一对多的双向关联,你可以通过把一个一对多关联,作为一个多对一关联映"
-"射到到同一张表的字段上,并且在\"多\"的那一端定义<literal>inverse=\"true\"</"
-"literal>。"
-
-#. Tag: programlisting
-#: collection_mapping.xml:745
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Parent\">\n"
-" <id name=\"id\" column=\"parent_id\"/>\n"
-" ....\n"
-" <set name=\"children\" inverse=\"true\">\n"
-" <key column=\"parent_id\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-" </set>\n"
-"</class>\n"
-"\n"
-"<class name=\"Child\">\n"
-" <id name=\"id\" column=\"child_id\"/>\n"
-" ....\n"
-" <many-to-one name=\"parent\" \n"
-" class=\"Parent\" \n"
-" column=\"parent_id\"\n"
-" not-null=\"true\"/>\n"
-"</class>]]>"
-msgstr ""
+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
<literal>inverse=\"true\"</literal>."
+msgstr "要建立一个一对多的双向关联,你可以通过把一个一对多关联,作为一个多对一关联映射到到同一张表的字段上,并且在\"多\"的那一端定义
<literal>inverse=\"true\"</literal>。 "
#. Tag: para
-#: collection_mapping.xml:747
-#, fuzzy, no-c-format
-msgid ""
-"Mapping one end of an association with
<literal>inverse=\"true\"</literal> "
-"does not affect the operation of cascades as these are orthogonal concepts."
-msgstr ""
-"在“一”这一端定义<literal>inverse=\"true\"</literal>不会影响级联操作,二者是正"
-"交的概念!"
+#, no-c-format
+msgid "Mapping one end of an association with
<literal>inverse=\"true\"</literal> does not affect the operation of
cascades as these are orthogonal concepts."
+msgstr "在“一”这一端定义 <literal>inverse=\"true\"</literal>
不会影响级联操作,二者是正交的概念。"
#. Tag: title
-#: collection_mapping.xml:755
#, no-c-format
msgid "Bidirectional associations with indexed collections"
msgstr "双向关联,涉及有序集合类"
#. Tag: para
-#: collection_mapping.xml:756
-#, fuzzy, no-c-format
-msgid ""
-"A bidirectional association where one end is represented as a
<literal><"
-"list></literal> or <literal><map></literal>,
requires special "
-"consideration. If there is a property of the child class that maps to the "
-"index column you can use <literal>inverse=\"true\"</literal>
on the "
-"collection mapping:"
-msgstr ""
-"对于有一端是<literal><list></literal>或者<literal><map></literal>"
-"的双向关联,需要加以特别考虑。假若子类中的一个属性映射到索引字段,没问题,我"
-"们仍然可以在集合类映射上使用<literal>inverse=\"true\"</literal>:"
-
-#. Tag: programlisting
-#: collection_mapping.xml:763
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Parent\">\n"
-" <id name=\"id\" column=\"parent_id\"/>\n"
-" ....\n"
-" <map name=\"children\" inverse=\"true\">\n"
-" <key column=\"parent_id\"/>\n"
-" <map-key column=\"name\" \n"
-" type=\"string\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-" </map>\n"
-"</class>\n"
-"\n"
-"<class name=\"Child\">\n"
-" <id name=\"id\" column=\"child_id\"/>\n"
-" ....\n"
-" <property name=\"name\" \n"
-" not-null=\"true\"/>\n"
-" <many-to-one name=\"parent\" \n"
-" class=\"Parent\" \n"
-" column=\"parent_id\"\n"
-" not-null=\"true\"/>\n"
-"</class>]]>"
-msgstr ""
+msgid "A bidirectional association where one end is represented as a
<literal><list></literal> or
<literal><map></literal>, requires special consideration. If
there is a property of the child class that maps to the index column you can use
<literal>inverse=\"true\"</literal> on the collection
mapping:"
+msgstr "对于有一端是 <literal><list></literal> 或者
<literal><map></literal>
的双向关联,需要加以特别考虑。假若子类中的一个属性映射到索引字段,没问题,我们仍然可以在集合类映射上使用
<literal>inverse=\"true\"</literal>: "
#. Tag: para
-#: collection_mapping.xml:765
-#, fuzzy, 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
<literal>inverse=\"true\"</literal>. "
-"Instead, you could use the following mapping:"
-msgstr ""
-"但是,假若子类中没有这样的属性存在,我们不能认为这个关联是真正的双向关联(信"
-"息不对称,在关联的一端有一些另外一端没有的信息)。在这种情况下,我们不能使用"
-"<literal>inverse=\"true\"</literal>。我们需要这样用:"
-
-#. Tag: programlisting
-#: collection_mapping.xml:772
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Parent\">\n"
-" <id name=\"id\" column=\"parent_id\"/>\n"
-" ....\n"
-" <map name=\"children\">\n"
-" <key column=\"parent_id\"\n"
-" not-null=\"true\"/>\n"
-" <map-key column=\"name\" \n"
-" type=\"string\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-" </map>\n"
-"</class>\n"
-"\n"
-"<class name=\"Child\">\n"
-" <id name=\"id\" column=\"child_id\"/>\n"
-" ....\n"
-" <many-to-one name=\"parent\" \n"
-" class=\"Parent\" \n"
-" column=\"parent_id\"\n"
-" insert=\"false\"\n"
-" update=\"false\"\n"
-" not-null=\"true\"/>\n"
-"</class>]]>"
-msgstr ""
+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 <literal>inverse=\"true\"</literal>. Instead, you could
use the following mapping:"
+msgstr "但是,假若子类中没有这样的属性存在,我们不能认为这个关联是真正的双向关联(信息不对称,在关联的一端有一些另外一端没有的信息)。在这种情况下,我们不能使用
<literal>inverse=\"true\"</literal>。我们需要这样用: "
#. Tag: para
-#: collection_mapping.xml:774
-#, 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 ""
-"注意在这个映射中,关联中集合类\"值\"一端负责来更新外键.TODO: Does this "
-"really result in some unnecessary update statements?"
+#, no-c-format
+msgid "Note that in this mapping, the collection-valued end of the association is
responsible for updates to the foreign key. <!-- TODO: Does this really result in some
unnecessary update statements? -->"
+msgstr "注意在这个映射中,关联中集合类\"值\"一端负责来更新外键。 "
#. Tag: title
-#: collection_mapping.xml:782
#, no-c-format
msgid "Ternary associations"
msgstr "三重关联(Ternary associations)"
#. Tag: para
-#: collection_mapping.xml:784
-#, fuzzy, no-c-format
-msgid ""
-"There are three possible approaches to mapping a ternary association. One "
-"approach is to use a <literal>Map</literal> with an association as its
index:"
-msgstr ""
-"有三种可能的途径来映射一个三重关联。第一种是使用一个<literal>Map</literal>,"
-"把一个关联作为其索引:"
-
-#. Tag: programlisting
-#: collection_mapping.xml:789
#, no-c-format
-msgid ""
-"<![CDATA[<map name=\"contracts\">\n"
-" <key column=\"employer_id\"
not-null=\"true\"/>\n"
-" <map-key-many-to-many column=\"employee_id\"
class=\"Employee\"/>\n"
-" <one-to-many class=\"Contract\"/>\n"
-"</map>]]>"
-msgstr ""
+msgid "There are three possible approaches to mapping a ternary association. One
approach is to use a <literal>Map</literal> with an association as its
index:"
+msgstr "有三种可能的途径来映射一个三重关联。第一种是使用一个 <literal>Map</literal>,把一个关联作为其索引:
"
-#. Tag: programlisting
-#: collection_mapping.xml:791
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<map name=\"connections\">\n"
-" <key column=\"incoming_node_id\"/>\n"
-" <map-key-many-to-many column=\"outgoing_node_id\"
class=\"Node\"/>\n"
-" <many-to-many column=\"connection_id\"
class=\"Connection\"/>\n"
-"</map>]]>"
-msgstr ""
+msgid "A second approach is to remodel the association as an entity class. This is
the most common approach."
+msgstr "第二种方法是简单的把关联重新建模为一个实体类。这使我们最经常使用的方法。 "
#. Tag: para
-#: collection_mapping.xml:793
-#, fuzzy, no-c-format
-msgid ""
-"A second approach is to remodel the association as an entity class. This is "
-"the most common approach."
-msgstr ""
-"第二种方法是简单的把关联重新建模为一个实体类。这使我们最经常使用的方法。"
+#, no-c-format
+msgid "A final alternative is to use composite elements, which will be discussed
later."
+msgstr "最后一种选择是使用复合元素,我们会在后面讨论。"
-#. Tag: para
-#: collection_mapping.xml:798
-#, fuzzy, no-c-format
-msgid ""
-"A final alternative is to use composite elements, which will be discussed "
-"later."
-msgstr "最后一种选择是使用复合元素,我们会在后面讨论"
-
-#. Tag: literal
-#: collection_mapping.xml:805
+#. Tag: title
#, no-c-format
-msgid "Using an <idbag>"
-msgstr "使用<idbag>"
+msgid "<literal>Using an <idbag></literal>"
+msgstr "<literal>使用 an <idbag></literal>"
#. Tag: para
-#: collection_mapping.xml:807
-#, fuzzy, 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 "
-"<emphasis>might</emphasis>. 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)”的观点,也许你会感到有一些奇"
-"怪,我们目前为止展示的多对多关联和值集合都是映射成为带有联合主键的表的!现"
-"在,这一点非常值得争辩;看上去一个单纯的关联表并不能从代用标识符中获得什么好"
-"处(虽然使用组合值的集合<emphasis>可能</emphasis>会获得一点好处)。不过,"
-"Hibernate提供了一个(一点点试验性质的)功能,让你把多对多关联和值集合应得到一"
-"个使用代用标识符的表去。"
+#, 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 <emphasis>might</emphasis>. 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)”的观点,也许你会感到有一些奇怪,我们目前为止展示的多对多关联和值集合都是映射成为带有联合主键的表的!现在,这一点非常值得争辩;看上去一个单纯的关联表并不能从代用标识符中获得什么好处(虽然使用组合值的集合<emphasis>可能</emphasis>会获得一点好处)。不过,Hibernate
提供了一个(一点点试验性质的)功能,让你把多对多关联和值集合应得到一个使用代用标识符的表去。 "
#. Tag: para
-#: collection_mapping.xml:817
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><idbag></literal> element lets you map a
<literal>List</"
-"literal> (or <literal>Collection</literal>) with bag semantics. For
example:"
-msgstr ""
-"<literal><idbag></literal>
属性让你使用bag语义来映射一个<literal>List</"
-"literal> (或<literal>Collection</literal>)。"
-
-#. Tag: programlisting
-#: collection_mapping.xml:822
#, no-c-format
-msgid ""
-"<![CDATA[<idbag name=\"lovers\"
table=\"LOVERS\">\n"
-" <collection-id column=\"ID\" type=\"long\">\n"
-" <generator class=\"sequence\"/>\n"
-" </collection-id>\n"
-" <key column=\"PERSON1\"/>\n"
-" <many-to-many column=\"PERSON2\" class=\"Person\"
fetch=\"join\"/>\n"
-"</idbag>]]>"
-msgstr ""
+msgid "The <literal><idbag></literal> element lets you map
a <literal>List</literal> (or <literal>Collection</literal>) with
bag semantics. For example:"
+msgstr "<literal><idbag></literal> 属性让你使用 bag 语义来映射一个
<literal>List</literal> (或 <literal>Collection</literal>)。 "
#. Tag: para
-#: collection_mapping.xml:824
-#, fuzzy, no-c-format
-msgid ""
-"An <literal><idbag></literal> 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 ""
-"你可以理解,<literal><idbag></literal>人工的id生成器,就好像是实体类一"
-"样!集合的每一行都有一个不同的人造关键字。但是,Hibernate没有提供任何机制来让"
-"你取得某个特定行的人造关键字。"
+#, no-c-format
+msgid "An <literal><idbag></literal> 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 "你可以理解,<literal><idbag></literal> 人工的 id
生成器,就好像是实体类一样!集合的每一行都有一个不同的人造关键字。但是,Hibernate 没有提供任何机制来让你取得某个特定行的人造关键字。 "
#. Tag: para
-#: collection_mapping.xml:831
-#, fuzzy, no-c-format
-msgid ""
-"The update performance of an <literal><idbag></literal>
supersedes a "
-"regular <literal><bag></literal>. Hibernate can locate
individual rows "
-"efficiently and update or delete them individually, similar to a list, map "
-"or set."
-msgstr ""
-"注意<literal><idbag></literal>的更新性能要比普通的<literal><bag>"
-"</literal>高得多!Hibernate可以有效的定位到不同的行,分别进行更新或删除工作,"
-"就如同处理一个list, map或者set一样。"
+#, no-c-format
+msgid "The update performance of an
<literal><idbag></literal> supersedes a regular
<literal><bag></literal>. Hibernate can locate individual rows
efficiently and update or delete them individually, similar to a list, map or set."
+msgstr "注意 <literal><idbag></literal> 的更新性能要比普通的
<literal><bag></literal> 高得多!Hibernate
可以有效的定位到不同的行,分别进行更新或删除工作,就如同处理一个 list,map 或者 set 一样。 "
#. Tag: para
-#: collection_mapping.xml:837
#, no-c-format
-msgid ""
-"In the current implementation, the <literal>native</literal> identifier
"
-"generation strategy is not supported for
<literal><idbag></literal> "
-"collection identifiers."
-msgstr ""
-"在目前的实现中,还不支持使用<literal>identity</literal>标识符生成器策略来生成"
-"<literal><idbag></literal>集合的标识符。"
+msgid "In the current implementation, the <literal>native</literal>
identifier generation strategy is not supported for
<literal><idbag></literal> collection identifiers."
+msgstr "在目前的实现中,还不支持使用 <literal>identity</literal> 标识符生成器策略来生成
<literal><idbag></literal> 集合的标识符。"
#. Tag: title
-#: collection_mapping.xml:861
#, no-c-format
msgid "Collection examples"
msgstr "集合例子(Collection example)"
#. Tag: para
-#: collection_mapping.xml:863
-#, fuzzy, no-c-format
+#, no-c-format
msgid "This section covers collection examples."
-msgstr "集合例子(Collection example)"
+msgstr "集合例子(Collection example)。"
#. Tag: para
-#: collection_mapping.xml:867
#, no-c-format
-msgid ""
-"The following class has a collection of <literal>Child</literal>
instances:"
-msgstr ""
+msgid "The following class has a collection of <literal>Child</literal>
instances:"
+msgstr "下面的代码是用来添加一个新的 <literal>Child</literal>:"
-#. Tag: programlisting
-#: collection_mapping.xml:871
-#, no-c-format
-msgid ""
-"<![CDATA[package eg;\n"
-"import java.util.Set;\n"
-"\n"
-"public class Parent {\n"
-" private long id;\n"
-" private Set children;\n"
-"\n"
-" public long getId() { return id; }\n"
-" private void setId(long id) { this.id=id; }\n"
-"\n"
-" private Set getChildren() { return children; }\n"
-" private void setChildren(Set children) { this.children=children; }\n"
-"\n"
-" ....\n"
-" ....\n"
-"}]]>"
-msgstr ""
-
#. Tag: para
-#: collection_mapping.xml:873
-#, fuzzy, no-c-format
-msgid ""
-"If each child has, at most, one parent, the most natural mapping is a
one-to-"
-"many association:"
-msgstr ""
-"这个类有一个<literal>Child</literal>的实例集合。如果每一个子实例至多有一个父"
-"实例, 那么最自然的映射是一个one-to-many的关联关系:"
-
-#. Tag: programlisting
-#: collection_mapping.xml:879
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-"\n"
-" <class name=\"Parent\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-" <set name=\"children\">\n"
-" <key column=\"parent_id\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-" </set>\n"
-" </class>\n"
-"\n"
-" <class name=\"Child\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-" <property name=\"name\"/>\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "If each child has, at most, one parent, the most natural mapping is a
one-to-many association:"
+msgstr "这个类有一个 <literal>Child</literal>
的实例集合。如果每一个子实例至多有一个父实例,那么最自然的映射是一个 one-to-many 的关联关系: "
#. Tag: para
-#: collection_mapping.xml:881
#, no-c-format
msgid "This maps to the following table definitions:"
msgstr "在以下的表定义中反应了这个映射关系:"
-#. Tag: programlisting
-#: collection_mapping.xml:885
-#, no-c-format
-msgid ""
-"<![CDATA[create table parent ( id bigint not null primary key )\n"
-"create table child ( id bigint not null primary key, name varchar(255), "
-"parent_id bigint )\n"
-"alter table child add constraint childfk0 (parent_id) references
parent]]>"
-msgstr ""
-
#. Tag: para
-#: collection_mapping.xml:887
#, no-c-format
-msgid ""
-"If the parent is <emphasis>required</emphasis>, use a bidirectional
one-to-"
-"many association:"
-msgstr ""
-"如果父亲是<emphasis>必须</emphasis>的, 那么就可以使用双向one-to-many的关联"
-"了:"
+msgid "If the parent is <emphasis>required</emphasis>, use a
bidirectional one-to-many association:"
+msgstr "如果父亲是<emphasis>必须</emphasis>的,那么就可以使用双向 one-to-many 的关联了:"
-#. Tag: programlisting
-#: collection_mapping.xml:892
-#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-"\n"
-" <class name=\"Parent\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-" <set name=\"children\" inverse=\"true\">\n"
-" <key column=\"parent_id\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-" </set>\n"
-" </class>\n"
-"\n"
-" <class name=\"Child\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-" <property name=\"name\"/>\n"
-" <many-to-one name=\"parent\" class=\"Parent\"
column=\"parent_id\" "
-"not-null=\"true\"/>\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
-
#. Tag: para
-#: collection_mapping.xml:894
#, no-c-format
msgid "Notice the <literal>NOT NULL</literal> constraint:"
-msgstr "请注意<literal>NOT NULL</literal>的约束:"
+msgstr "请注意 <literal>NOT NULL</literal> 的约束:"
-#. Tag: programlisting
-#: collection_mapping.xml:898
-#, no-c-format
-msgid ""
-"<![CDATA[create table parent ( id bigint not null primary key )\n"
-"create table child ( id bigint not null\n"
-" primary key,\n"
-" name varchar(255),\n"
-" parent_id bigint not null )\n"
-"alter table child add constraint childfk0 (parent_id) references
parent]]>"
-msgstr ""
-
#. Tag: para
-#: collection_mapping.xml:900
-#, fuzzy, no-c-format
-msgid ""
-"Alternatively, if this association must be unidirectional you can declare "
-"the <literal>NOT NULL</literal> constraint on the
<literal><key></"
-"literal> mapping:"
-msgstr ""
-"另外,如果你绝对坚持这个关联应该是单向的,你可以对<literal><key></"
-"literal>映射声明<literal>NOT NULL</literal>约束:"
-
-#. Tag: programlisting
-#: collection_mapping.xml:906
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-"\n"
-" <class name=\"Parent\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-" <set name=\"children\">\n"
-" <key column=\"parent_id\"
not-null=\"true\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-" </set>\n"
-" </class>\n"
-"\n"
-" <class name=\"Child\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-" <property name=\"name\"/>\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "Alternatively, if this association must be unidirectional you can declare the
<literal>NOT NULL</literal> constraint on the
<literal><key></literal> mapping:"
+msgstr "另外,如果你绝对坚持这个关联应该是单向的,你可以对 <literal><key></literal>
映射声明 <literal>NOT NULL</literal> 约束: "
#. Tag: para
-#: collection_mapping.xml:908
-#, fuzzy, 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关联:"
-
-#. Tag: programlisting
-#: collection_mapping.xml:913
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-"\n"
-" <class name=\"Parent\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-" <set name=\"children\"
table=\"childset\">\n"
-" <key column=\"parent_id\"/>\n"
-" <many-to-many class=\"Child\"
column=\"child_id\"/>\n"
-" </set>\n"
-" </class>\n"
-"\n"
-" <class name=\"Child\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-" <property name=\"name\"/>\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "On the other hand, if a child has multiple parents, a many-to-many
association is appropriate:"
+msgstr "另外一方面,如果一个子实例可能有多个父实例,那么就应该使用 many-to-many 关联: "
#. Tag: para
-#: collection_mapping.xml:915
#, no-c-format
msgid "Table definitions:"
msgstr "表定义:"
-#. Tag: programlisting
-#: collection_mapping.xml:919
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[create table parent ( id bigint not null primary key )\n"
-"create table child ( id bigint not null primary key, name varchar(255) )\n"
-"create table childset ( parent_id bigint not null,\n"
-" child_id bigint not null,\n"
-" primary key ( parent_id, child_id ) )\n"
-"alter table childset add constraint childsetfk0 (parent_id) references "
-"parent\n"
-"alter table childset add constraint childsetfk1 (child_id) references
child]]"
-">"
-msgstr ""
+msgid "For more examples and a complete explanation of a parent/child relationship
mapping, see <xref linkend=\"example-parentchild\" /> for more
information."
+msgstr "更多的例子,以及一个完整的父/子关系映射的排练,请参阅 <xref
linkend=\"example-parentchild\"/>。 "
#. Tag: para
-#: collection_mapping.xml:921
-#, fuzzy, no-c-format
-msgid ""
-"For more examples and a complete explanation of a parent/child relationship "
-"mapping, see <xref linkend=\"example-parentchild\"/> for more
information."
-msgstr ""
-"更多的例子,以及一个完整的父/子关系映射的排练,请参阅<xref linkend=\"example-"
-"parentchild\"/>."
-
-#. Tag: para
-#: collection_mapping.xml:926
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Even more complex association mappings are covered in the next
chapter."
-msgstr "甚至可能出现更加复杂的关联映射,我们会在下一章中列出所有可能性。"
+msgstr "甚至可能出现更加复杂的关联映射,我们会在下一章中列出所有可能性。 "
-#~ msgid "Collection Mapping"
-#~ msgstr "集合类(Collections)映射"
-
-#~ msgid "Some examples, first, a set of strings:"
+#~ msgid ""
+#~ "<![CDATA[public class Product {\n"
+#~ " private String serialNumber;\n"
+#~ " private Set parts = new HashSet();\n"
+#~ " \n"
+#~ " public Set getParts() { return parts; }\n"
+#~ " void setParts(Set parts) { this.parts = parts; }\n"
+#~ " public String getSerialNumber() { return serialNumber; }\n"
+#~ " void setSerialNumber(String sn) { serialNumber = sn; }\n"
+#~ "}]]>"
#~ msgstr ""
-#~ "包含一组整数的bag(还设置了<literal>order-by</literal>参数指定了迭代的顺"
-#~ "序):"
-
+#~ "<![CDATA[public class Product {\n"
+#~ " private String serialNumber;\n"
+#~ " private Set parts = new HashSet();\n"
+#~ " \n"
+#~ " public Set getParts() { return parts; }\n"
+#~ " void setParts(Set parts) { this.parts = parts; }\n"
+#~ " public String getSerialNumber() { return serialNumber; }\n"
+#~ " void setSerialNumber(String sn) { serialNumber = sn; }\n"
+#~ "}]]>"
#~ msgid ""
-#~ "The previous sections are pretty confusing. So lets look at an example. "
-#~ "This class:"
-#~ msgstr "在前面的几个章节的确非常令人迷惑。 因此让我们来看一个例子。这个类:"
-
+#~ "<![CDATA[Cat cat = new DomesticCat();\n"
+#~ "Cat kitten = new DomesticCat();\n"
+#~ "....\n"
+#~ "Set kittens = new HashSet();\n"
+#~ "kittens.add(kitten);\n"
+#~ "cat.setKittens(kittens);\n"
+#~ "session.persist(cat);\n"
+#~ "kittens = cat.getKittens(); // Okay, kittens collection is a Set\n"
+#~ "(HashSet) cat.getKittens(); // Error!]]>"
+#~ msgstr ""
+#~ "<![CDATA[Cat cat = new DomesticCat();\n"
+#~ "Cat kitten = new DomesticCat();\n"
+#~ "....\n"
+#~ "Set kittens = new HashSet();\n"
+#~ "kittens.add(kitten);\n"
+#~ "cat.setKittens(kittens);\n"
+#~ "session.persist(cat);\n"
+#~ "kittens = cat.getKittens(); // Okay, kittens collection is a Set\n"
+#~ "(HashSet) cat.getKittens(); // Error!]]>"
#~ msgid ""
-#~ "<literal>column_name</literal> (required): The name of the column
holding "
-#~ "the collection index values."
-#~ msgstr "<literal>column</literal>(可选):保存集合索引值的字段名。"
-
+#~ "<![CDATA[<class name=\"Product\">\n"
+#~ " <id name=\"serialNumber\"
column=\"productSerialNumber\"/>\n"
+#~ " <set name=\"parts\">\n"
+#~ " <key column=\"productSerialNumber\"
not-null=\"true\"/>\n"
+#~ " <one-to-many class=\"Part\"/>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Product\">\n"
+#~ " <id name=\"serialNumber\"
column=\"productSerialNumber\"/>\n"
+#~ " <set name=\"parts\">\n"
+#~ " <key column=\"productSerialNumber\"
not-null=\"true\"/>\n"
+#~ " <one-to-many class=\"Part\"/>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
#~ msgid ""
-#~ "<literal>base</literal> (optional, defaults to
<literal>0</literal>): The "
-#~ "value of the index column that corresponds to the first element of the "
-#~ "list or array."
-#~ msgstr "<literal>formula</literal> (可选): 用于计算map关键字的SQL公式"
-
+#~ "<![CDATA[<map\n"
+#~ " name=\"propertyName\"\n"
+#~ " table=\"table_name\"\n"
+#~ " schema=\"schema_name\"\n"
+#~ " lazy=\"true|extra|false\"\n"
+#~ " inverse=\"true|false\"\n"
+#~ "
cascade=\"all|none|save-update|delete|all-delete-orphan|delete-orphan"
+#~ "\"\n"
+#~ " sort=\"unsorted|natural|comparatorClass\"\n"
+#~ " order-by=\"column_name asc|desc\"\n"
+#~ " where=\"arbitrary sql where condition\"\n"
+#~ " fetch=\"join|select|subselect\"\n"
+#~ " batch-size=\"N\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ " mutable=\"true|false\"\n"
+#~ " node=\"element-name|.\"\n"
+#~ " embed-xml=\"true|false\"\n"
+#~ ">\n"
+#~ "\n"
+#~ " <key .... />\n"
+#~ " <map-key .... />\n"
+#~ " <element .... />\n"
+#~ "</map>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<map\n"
+#~ " name=\"propertyName\"\n"
+#~ " table=\"table_name\"\n"
+#~ " schema=\"schema_name\"\n"
+#~ " lazy=\"true|extra|false\"\n"
+#~ " inverse=\"true|false\"\n"
+#~ "
cascade=\"all|none|save-update|delete|all-delete-orphan|delete-orphan"
+#~ "\"\n"
+#~ " sort=\"unsorted|natural|comparatorClass\"\n"
+#~ " order-by=\"column_name asc|desc\"\n"
+#~ " where=\"arbitrary sql where condition\"\n"
+#~ " fetch=\"join|select|subselect\"\n"
+#~ " batch-size=\"N\"\n"
+#~ " access=\"field|property|ClassName\"\n"
+#~ " optimistic-lock=\"true|false\"\n"
+#~ " mutable=\"true|false\"\n"
+#~ " node=\"element-name|.\"\n"
+#~ " embed-xml=\"true|false\"\n"
+#~ ">\n"
+#~ "\n"
+#~ " <key .... />\n"
+#~ " <map-key .... />\n"
+#~ " <element .... />\n"
+#~ "</map>]]>"
+#~ msgid "<![CDATA[<key column=\"productSerialNumber\"
not-null=\"true\"/>]]>"
+#~ msgstr "<![CDATA[<key column=\"productSerialNumber\"
not-null=\"true\"/>]]>"
#~ msgid ""
-#~ "<literal>column</literal> (optional): The name of the column holding
the "
-#~ "collection index values."
-#~ msgstr "<literal>type</literal> (必须):映射键(map key)的类型。"
-
+#~ "<![CDATA[<key column=\"productSerialNumber\"
on-delete=\"cascade\"/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<key column=\"productSerialNumber\"
on-delete=\"cascade\"/>]]>"
#~ msgid ""
-#~ "<literal>formula</literal> (optional): A SQL formula used to
evaluate the "
-#~ "key of the map."
-#~ msgstr "<literal>column</literal>(可选):集合索引值中外键字段的名称"
-
-#~ msgid "<literal>type</literal> (reguired): The type of the map
keys."
-#~ msgstr "<literal>formula</literal> (可选): 用于计算map关键字的外键的SQL公式"
-
+#~ "<programlistingco> <areaspec> <area id=\"index1\"
coords=\"2 45\"/> <area "
+#~ "id=\"index2\" coords=\"3 45\"/> </areaspec>
<programlisting><![CDATA"
+#~ "[<list-index \n"
+#~ " column=\"column_name\"\n"
+#~ " base=\"0|1|...\"/>]]></programlisting>
<calloutlist> <callout "
+#~ "arearefs=\"index1\"> <para>
<literal>column_name</literal> (required): "
+#~ "the name of the column holding the collection index values. </para>
</"
+#~ "callout> <callout arearefs=\"index1\"> <para>
<literal>base</literal> "
+#~ "(optional - defaults to <literal>0</literal>): the value of the
index "
+#~ "column that corresponds to the first element of the list or array. </"
+#~ "para> </callout> </calloutlist> </programlistingco>
<programlistingco> "
+#~ "<areaspec> <area id=\"mapkey1\" coords=\"2
45\"/> <area id=\"mapkey2\" "
+#~ "coords=\"3 45\"/> <area id=\"mapkey3\" coords=\"4
45\"/> </areaspec> "
+#~ "<programlisting><![CDATA[<map-key \n"
+#~ " column=\"column_name\"\n"
+#~ " formula=\"any SQL expression\"\n"
+#~ " type=\"type_name\"\n"
+#~ " node=\"@attribute-name\"\n"
+#~ " length=\"N\"/>]]></programlisting>
<calloutlist> <callout "
+#~ "arearefs=\"mapkey1\"> <para>
<literal>column</literal> (optional): the "
+#~ "name of the column holding the collection index values. </para>
</"
+#~ "callout> <callout arearefs=\"mapkey2\"> <para>
<literal>formula</literal> "
+#~ "(optional): a SQL formula used to evaluate the key of the map. </para>
</"
+#~ "callout> <callout arearefs=\"mapkey3\"> <para>
<literal>type</literal> "
+#~ "(required): the type of the map keys. </para> </callout>
</calloutlist> </"
+#~ "programlistingco> <programlistingco> <areaspec> <area
id="
+#~ "\"indexmanytomany1\" coords=\"2 45\"/> <area
id=\"indexmanytomany2\" "
+#~ "coords=\"3 45\"/> <area id=\"indexmanytomany3\"
coords=\"3 45\"/> </"
+#~ "areaspec> <programlisting><![CDATA[<map-key-many-to-many\n"
+#~ " column=\"column_name\"\n"
+#~ " formula=\"any SQL expression\"\n"
+#~ " class=\"ClassName\"\n"
+#~ "/>]]></programlisting> <calloutlist> <callout
arearefs=\"indexmanytomany1"
+#~ "\"> <para> <literal>column</literal> (optional): the
name of the foreign "
+#~ "key column for the collection index values. </para> </callout>
<callout "
+#~ "arearefs=\"indexmanytomany2\"> <para>
<literal>formula</literal> "
+#~ "(optional): a SQ formula used to evaluate the foreign key of the map key.
"
+#~ "</para> </callout> <callout
arearefs=\"indexmanytomany3\"> <para> "
+#~ "<literal>class</literal> (required): the entity class used as the
map "
+#~ "key. </para> </callout> </calloutlist>
</programlistingco>"
+#~ msgstr ""
+#~ "<programlistingco> <areaspec> <area id=\"index1\"
coords=\"2 45\"/> <area "
+#~ "id=\"index2\" coords=\"3 45\"/> </areaspec>
<programlisting><![CDATA"
+#~ "[<list-index \n"
+#~ " column=\"column_name\"\n"
+#~ " base=\"0|1|...\"/>]]></programlisting>
<calloutlist> <callout "
+#~ "arearefs=\"index1\"> <para>
<literal>column_name</literal> (required): "
+#~ "the name of the column holding the collection index values. </para>
</"
+#~ "callout> <callout arearefs=\"index1\"> <para>
<literal>base</literal> "
+#~ "(optional - defaults to <literal>0</literal>): the value of the
index "
+#~ "column that corresponds to the first element of the list or array. </"
+#~ "para> </callout> </calloutlist> </programlistingco>
<programlistingco> "
+#~ "<areaspec> <area id=\"mapkey1\" coords=\"2
45\"/> <area id=\"mapkey2\" "
+#~ "coords=\"3 45\"/> <area id=\"mapkey3\" coords=\"4
45\"/> </areaspec> "
+#~ "<programlisting><![CDATA[<map-key \n"
+#~ " column=\"column_name\"\n"
+#~ " formula=\"any SQL expression\"\n"
+#~ " type=\"type_name\"\n"
+#~ " node=\"@attribute-name\"\n"
+#~ " length=\"N\"/>]]></programlisting>
<calloutlist> <callout "
+#~ "arearefs=\"mapkey1\"> <para>
<literal>column</literal> (optional): the "
+#~ "name of the column holding the collection index values. </para>
</"
+#~ "callout> <callout arearefs=\"mapkey2\"> <para>
<literal>formula</literal> "
+#~ "(optional): a SQL formula used to evaluate the key of the map. </para>
</"
+#~ "callout> <callout arearefs=\"mapkey3\"> <para>
<literal>type</literal> "
+#~ "(required): the type of the map keys. </para> </callout>
</calloutlist> </"
+#~ "programlistingco> <programlistingco> <areaspec> <area
id="
+#~ "\"indexmanytomany1\" coords=\"2 45\"/> <area
id=\"indexmanytomany2\" "
+#~ "coords=\"3 45\"/> <area id=\"indexmanytomany3\"
coords=\"3 45\"/> </"
+#~ "areaspec> <programlisting><![CDATA[<map-key-many-to-many\n"
+#~ " column=\"column_name\"\n"
+#~ " formula=\"any SQL expression\"\n"
+#~ " class=\"ClassName\"\n"
+#~ "/>]]></programlisting> <calloutlist> <callout
arearefs=\"indexmanytomany1"
+#~ "\"> <para> <literal>column</literal> (optional): the
name of the foreign "
+#~ "key column for the collection index values. </para> </callout>
<callout "
+#~ "arearefs=\"indexmanytomany2\"> <para>
<literal>formula</literal> "
+#~ "(optional): a SQ formula used to evaluate the foreign key of the map key.
"
+#~ "</para> </callout> <callout
arearefs=\"indexmanytomany3\"> <para> "
+#~ "<literal>class</literal> (required): the entity class used as the
map "
+#~ "key. </para> </callout> </calloutlist>
</programlistingco>"
#~ msgid ""
-#~ "<literal>column</literal> (optional): The name of the foreign key
column "
-#~ "for the collection index values."
-#~ msgstr "<literal>class</literal> (必需):映射的键(map key)使用的实体类。"
-
+#~ "<programlistingco> <areaspec> <area id=\"element1b\"
coords=\"2 50\"/> "
+#~ "<area id=\"element2b\" coords=\"3 50\"/> <area
id=\"element3b\" coords="
+#~ "\"4 50\"/> </areaspec>
<programlisting><![CDATA[<element\n"
+#~ " column=\"column_name\"\n"
+#~ " formula=\"any SQL expression\"\n"
+#~ " type=\"typename\"\n"
+#~ " length=\"L\"\n"
+#~ " precision=\"P\"\n"
+#~ " scale=\"S\"\n"
+#~ " not-null=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " node=\"element-name\"\n"
+#~ "/>]]></programlisting> <calloutlist> <callout
arearefs=\"element1b\"> "
+#~ "<para> <literal>column</literal> (optional): the name of the
column "
+#~ "holding the collection element values. </para> </callout>
<callout "
+#~ "arearefs=\"element2b\"> <para>
<literal>formula</literal> (optional): an "
+#~ "SQL formula used to evaluate the element. </para> </callout>
<callout "
+#~ "arearefs=\"element3b\"> <para>
<literal>type</literal> (required): the "
+#~ "type of the collection element. </para> </callout>
</calloutlist> </"
+#~ "programlistingco> <para> A <emphasis>many-to-many
association</emphasis> "
+#~ "is specified using the
<literal><many-to-many></literal> element. </"
+#~ "para> <programlistingco> <areaspec> <area
id=\"manytomany1\" coords=\"2 60"
+#~ "\"/> <area id=\"manytomany2\" coords=\"3
60\"/> <area id=\"manytomany3\" "
+#~ "coords=\"4 60\"/> <area id=\"manytomany4\"
coords=\"5 60\"/> <area id="
+#~ "\"manytomany5\" coords=\"6 60\"/> <area
id=\"manytomany6\" coords=\"7 60"
+#~ "\"/> <area id=\"manytomany7\" coords=\"8
60\"/> <area id=\"manytomany8\" "
+#~ "coords=\"9 60\"/> </areaspec>
<programlisting><![CDATA[<many-to-many\n"
+#~ " column=\"column_name\"\n"
+#~ " formula=\"any SQL expression\"\n"
+#~ " class=\"ClassName\"\n"
+#~ " fetch=\"select|join\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " not-found=\"ignore|exception\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " property-ref=\"propertyNameFromAssociatedClass\"\n"
+#~ " node=\"element-name\"\n"
+#~ " embed-xml=\"true|false\"\n"
+#~ " />]]></programlisting> <calloutlist> <callout
arearefs=\"manytomany1"
+#~ "\"> <para> <literal>column</literal> (optional): the
name of the element "
+#~ "foreign key column. </para> </callout> <callout
arearefs=\"manytomany2\"> "
+#~ "<para> <literal>formula</literal> (optional): an SQL formula
used to "
+#~ "evaluate the element foreign key value. </para> </callout>
<callout "
+#~ "arearefs=\"manytomany3\"> <para>
<literal>class</literal> (required): the "
+#~ "name of the associated class. </para> </callout> <callout
arearefs="
+#~ "\"manytomany4\"> <para> <literal>fetch</literal>
(optional - defaults to "
+#~ "<literal>join</literal>): enables outer-join or sequential select
"
+#~ "fetching for this association. This is a special case; for full eager "
+#~ "fetching in a single <literal>SELECT</literal> of an entity and its
many-"
+#~ "to-many relationships to other entities, you would enable
<literal>join</"
+#~ "literal> fetching,not only of the collection itself, but also with this
"
+#~ "attribute on the <literal><many-to-many></literal>
nested element. "
+#~ "</para> </callout> <callout
arearefs=\"manytomany5\"> <para> "
+#~ "<literal>unique</literal> (optional): enables the DDL generation of
a "
+#~ "unique constraint for the foreign-key column. This makes the association "
+#~ "multiplicity effectively one-to-many. </para> </callout> <callout
"
+#~ "arearefs=\"manytomany6\"> <para>
<literal>not-found</literal> (optional - "
+#~ "defaults to <literal>exception</literal>): specifies how foreign
keys "
+#~ "that reference missing rows will be handled:
<literal>ignore</literal> "
+#~ "will treat a missing row as a null association. </para> </callout>
"
+#~ "<callout arearefs=\"manytomany7\"> <para>
<literal>entity-name</literal> "
+#~ "(optional): the entity name of the associated class, as an alternative to
"
+#~ "<literal>class</literal>. </para> </callout> <callout
arearefs="
+#~ "\"manytomany8\"> <para>
<literal>property-ref</literal> (optional): the "
+#~ "name of a property of the associated class that is joined to this foreign
"
+#~ "key. If not specified, the primary key of the associated class is used.
</"
+#~ "para> </callout> </calloutlist> </programlistingco>"
+#~ msgstr ""
+#~ "<programlistingco> <areaspec> <area id=\"element1b\"
coords=\"2 50\"/> "
+#~ "<area id=\"element2b\" coords=\"3 50\"/> <area
id=\"element3b\" coords="
+#~ "\"4 50\"/> </areaspec>
<programlisting><![CDATA[<element\n"
+#~ " column=\"column_name\"\n"
+#~ " formula=\"any SQL expression\"\n"
+#~ " type=\"typename\"\n"
+#~ " length=\"L\"\n"
+#~ " precision=\"P\"\n"
+#~ " scale=\"S\"\n"
+#~ " not-null=\"true|false\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " node=\"element-name\"\n"
+#~ "/>]]></programlisting> <calloutlist> <callout
arearefs=\"element1b\"> "
+#~ "<para> <literal>column</literal> (optional): the name of the
column "
+#~ "holding the collection element values. </para> </callout>
<callout "
+#~ "arearefs=\"element2b\"> <para>
<literal>formula</literal> (optional): an "
+#~ "SQL formula used to evaluate the element. </para> </callout>
<callout "
+#~ "arearefs=\"element3b\"> <para>
<literal>type</literal> (required): the "
+#~ "type of the collection element. </para> </callout>
</calloutlist> </"
+#~ "programlistingco> <para> A <emphasis>many-to-many
association</emphasis> "
+#~ "is specified using the
<literal><many-to-many></literal> element. </"
+#~ "para> <programlistingco> <areaspec> <area
id=\"manytomany1\" coords=\"2 60"
+#~ "\"/> <area id=\"manytomany2\" coords=\"3
60\"/> <area id=\"manytomany3\" "
+#~ "coords=\"4 60\"/> <area id=\"manytomany4\"
coords=\"5 60\"/> <area id="
+#~ "\"manytomany5\" coords=\"6 60\"/> <area
id=\"manytomany6\" coords=\"7 60"
+#~ "\"/> <area id=\"manytomany7\" coords=\"8
60\"/> <area id=\"manytomany8\" "
+#~ "coords=\"9 60\"/> </areaspec>
<programlisting><![CDATA[<many-to-many\n"
+#~ " column=\"column_name\"\n"
+#~ " formula=\"any SQL expression\"\n"
+#~ " class=\"ClassName\"\n"
+#~ " fetch=\"select|join\"\n"
+#~ " unique=\"true|false\"\n"
+#~ " not-found=\"ignore|exception\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " property-ref=\"propertyNameFromAssociatedClass\"\n"
+#~ " node=\"element-name\"\n"
+#~ " embed-xml=\"true|false\"\n"
+#~ " />]]></programlisting> <calloutlist> <callout
arearefs=\"manytomany1"
+#~ "\"> <para> <literal>column</literal> (optional): the
name of the element "
+#~ "foreign key column. </para> </callout> <callout
arearefs=\"manytomany2\"> "
+#~ "<para> <literal>formula</literal> (optional): an SQL formula
used to "
+#~ "evaluate the element foreign key value. </para> </callout>
<callout "
+#~ "arearefs=\"manytomany3\"> <para>
<literal>class</literal> (required): the "
+#~ "name of the associated class. </para> </callout> <callout
arearefs="
+#~ "\"manytomany4\"> <para> <literal>fetch</literal>
(optional - defaults to "
+#~ "<literal>join</literal>): enables outer-join or sequential select
"
+#~ "fetching for this association. This is a special case; for full eager "
+#~ "fetching in a single <literal>SELECT</literal> of an entity and its
many-"
+#~ "to-many relationships to other entities, you would enable
<literal>join</"
+#~ "literal> fetching,not only of the collection itself, but also with this
"
+#~ "attribute on the <literal><many-to-many></literal>
nested element. "
+#~ "</para> </callout> <callout
arearefs=\"manytomany5\"> <para> "
+#~ "<literal>unique</literal> (optional): enables the DDL generation of
a "
+#~ "unique constraint for the foreign-key column. This makes the association "
+#~ "multiplicity effectively one-to-many. </para> </callout> <callout
"
+#~ "arearefs=\"manytomany6\"> <para>
<literal>not-found</literal> (optional - "
+#~ "defaults to <literal>exception</literal>): specifies how foreign
keys "
+#~ "that reference missing rows will be handled:
<literal>ignore</literal> "
+#~ "will treat a missing row as a null association. </para> </callout>
"
+#~ "<callout arearefs=\"manytomany7\"> <para>
<literal>entity-name</literal> "
+#~ "(optional): the entity name of the associated class, as an alternative to
"
+#~ "<literal>class</literal>. </para> </callout> <callout
arearefs="
+#~ "\"manytomany8\"> <para>
<literal>property-ref</literal> (optional): the "
+#~ "name of a property of the associated class that is joined to this foreign
"
+#~ "key. If not specified, the primary key of the associated class is used.
</"
+#~ "para> </callout> </calloutlist> </programlistingco>"
#~ msgid ""
-#~ "<literal>formula</literal> (optional): A SQL formula used to
evaluate the "
-#~ "foreign key of the map key."
+#~ "<![CDATA[<set name=\"names\"
table=\"person_names\">\n"
+#~ " <key column=\"person_id\"/>\n"
+#~ " <element column=\"person_name\"
type=\"string\"/>\n"
+#~ "</set>]]>"
#~ msgstr ""
-#~ "假若你的表没有一个索引字段,当你仍然希望使用<literal>List</literal>作为属性"
-#~ "类型,你应该把此属性映射为Hibernate
<emphasis><bag></emphasis>。从数"
-#~ "据库中获取的时候,bag不维护其顺序,但也可选择性的进行排序。"
-
+#~ "<![CDATA[<set name=\"names\"
table=\"person_names\">\n"
+#~ " <key column=\"person_id\"/>\n"
+#~ " <element column=\"person_name\"
type=\"string\"/>\n"
+#~ "</set>]]>"
#~ msgid ""
-#~ "<literal>class</literal> (required): The entity class used as the
map key."
+#~ "<![CDATA[<bag name=\"sizes\" \n"
+#~ " table=\"item_sizes\" \n"
+#~ " order-by=\"size asc\">\n"
+#~ " <key column=\"item_id\"/>\n"
+#~ " <element column=\"size\"
type=\"integer\"/>\n"
+#~ "</bag>]]>"
#~ msgstr ""
-#~ "从集合类可以产生很大一部分映射,覆盖了很多常见的关系模型。我们建议你试验"
-#~ "schema生成工具,来体会一下不同的映射声明是如何被翻译为数据库表的。"
-
+#~ "<![CDATA[<bag name=\"sizes\" \n"
+#~ " table=\"item_sizes\" \n"
+#~ " order-by=\"size asc\">\n"
+#~ " <key column=\"item_id\"/>\n"
+#~ " <element column=\"size\"
type=\"integer\"/>\n"
+#~ "</bag>]]>"
#~ msgid ""
-#~ "<literal>column</literal> (optional): The name of the column holding
the "
-#~ "collection element values."
-#~ msgstr "<literal>type</literal> (必需):集合元素的类型"
-
+#~ "<![CDATA[<array name=\"addresses\" \n"
+#~ " table=\"PersonAddress\" \n"
+#~ " cascade=\"persist\">\n"
+#~ " <key column=\"personId\"/>\n"
+#~ " <list-index column=\"sortOrder\"/>\n"
+#~ " <many-to-many column=\"addressId\"
class=\"Address\"/>\n"
+#~ "</array>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<array name=\"addresses\" \n"
+#~ " table=\"PersonAddress\" \n"
+#~ " cascade=\"persist\">\n"
+#~ " <key column=\"personId\"/>\n"
+#~ " <list-index column=\"sortOrder\"/>\n"
+#~ " <many-to-many column=\"addressId\"
class=\"Address\"/>\n"
+#~ "</array>]]>"
#~ msgid ""
-#~ "<literal>formula</literal> (optional): An SQL formula used to
evaluate "
-#~ "the element."
+#~ "<![CDATA[<map name=\"holidays\" \n"
+#~ " table=\"holidays\" \n"
+#~ " schema=\"dbo\" \n"
+#~ " order-by=\"hol_name asc\">\n"
+#~ " <key column=\"id\"/>\n"
+#~ " <map-key column=\"hol_name\"
type=\"string\"/>\n"
+#~ " <element column=\"hol_date\"
type=\"date\"/>\n"
+#~ "</map>]]>"
#~ msgstr ""
-#~ "<emphasis>多对多关联(many-to-many association)</emphasis> 使用 "
-#~ "<literal><many-to-many></literal>元素定义."
-
+#~ "<![CDATA[<map name=\"holidays\" \n"
+#~ " table=\"holidays\" \n"
+#~ " schema=\"dbo\" \n"
+#~ " order-by=\"hol_name asc\">\n"
+#~ " <key column=\"id\"/>\n"
+#~ " <map-key column=\"hol_name\"
type=\"string\"/>\n"
+#~ " <element column=\"hol_date\"
type=\"date\"/>\n"
+#~ "</map>]]>"
#~ msgid ""
-#~ "<literal>type</literal> (required): The type of the collection
element."
-#~ msgstr "<literal>column</literal>(可选): 这个元素的外键关键字段名"
-
+#~ "<![CDATA[<list name=\"carComponents\" \n"
+#~ " table=\"CarComponents\">\n"
+#~ " <key column=\"carId\"/>\n"
+#~ " <list-index column=\"sortOrder\"/>\n"
+#~ " <composite-element class=\"CarComponent\">\n"
+#~ " <property name=\"price\"/>\n"
+#~ " <property name=\"type\"/>\n"
+#~ " <property name=\"serialNumber\"
column=\"serialNum\"/>\n"
+#~ " </composite-element>\n"
+#~ "</list>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<list name=\"carComponents\" \n"
+#~ " table=\"CarComponents\">\n"
+#~ " <key column=\"carId\"/>\n"
+#~ " <list-index column=\"sortOrder\"/>\n"
+#~ " <composite-element class=\"CarComponent\">\n"
+#~ " <property name=\"price\"/>\n"
+#~ " <property name=\"type\"/>\n"
+#~ " <property name=\"serialNumber\"
column=\"serialNum\"/>\n"
+#~ " </composite-element>\n"
+#~ "</list>]]>"
#~ msgid ""
-#~ "A <emphasis>many-to-many association</emphasis> is specified using
the "
-#~ "<literal><many-to-many></literal> element."
-#~ msgstr "<literal>formula</literal> (可选): 用于计算元素外键值的SQL公式."
-
+#~ "<![CDATA[<one-to-many \n"
+#~ " class=\"ClassName\"\n"
+#~ " not-found=\"ignore|exception\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " node=\"element-name\"\n"
+#~ " embed-xml=\"true|false\"\n"
+#~ " />]]>"
+#~ msgstr ""
+#~ "<![CDATA[<one-to-many \n"
+#~ " class=\"ClassName\"\n"
+#~ " not-found=\"ignore|exception\"\n"
+#~ " entity-name=\"EntityName\"\n"
+#~ " node=\"element-name\"\n"
+#~ " embed-xml=\"true|false\"\n"
+#~ " />]]>"
#~ msgid ""
-#~ "<literal>column</literal> (optional): The name of the element
foreign key "
-#~ "column."
-#~ msgstr "<literal>class</literal> (必需): 关联类的名称"
-
+#~ "<![CDATA[<map name=\"parts\"\n"
+#~ " cascade=\"all\">\n"
+#~ " <key column=\"productId\"
not-null=\"true\"/>\n"
+#~ " <map-key formula=\"partName\"/>\n"
+#~ " <one-to-many class=\"Part\"/>\n"
+#~ "</map>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<map name=\"parts\"\n"
+#~ " cascade=\"all\">\n"
+#~ " <key column=\"productId\"
not-null=\"true\"/>\n"
+#~ " <map-key formula=\"partName\"/>\n"
+#~ " <one-to-many class=\"Part\"/>\n"
+#~ "</map>]]>"
#~ msgid ""
-#~ "<literal>formula</literal> (optional): An SQL formula used to
evaluate "
-#~ "the element foreign key value."
+#~ "<![CDATA[<set name=\"aliases\" \n"
+#~ " table=\"person_aliases\" \n"
+#~ " sort=\"natural\">\n"
+#~ " <key column=\"person\"/>\n"
+#~ " <element column=\"name\"
type=\"string\"/>\n"
+#~ "</set>\n"
+#~ "\n"
+#~ "<map name=\"holidays\"
sort=\"my.custom.HolidayComparator\">\n"
+#~ " <key column=\"year_id\"/>\n"
+#~ " <map-key column=\"hol_name\"
type=\"string\"/>\n"
+#~ " <element column=\"hol_date\"
type=\"date\"/>\n"
+#~ "</map>]]>"
#~ msgstr ""
-#~ "<literal>outer-join</literal> (可选 -
默认为<literal>auto</literal>): 在"
-#~
"Hibernate系统参数中<literal>hibernate.use_outer_join</literal>被打开的情况"
-#~ "下,该参数用来允许使用outer join来载入此集合的数据。"
-
+#~ "<![CDATA[<set name=\"aliases\" \n"
+#~ " table=\"person_aliases\" \n"
+#~ " sort=\"natural\">\n"
+#~ " <key column=\"person\"/>\n"
+#~ " <element column=\"name\"
type=\"string\"/>\n"
+#~ "</set>\n"
+#~ "\n"
+#~ "<map name=\"holidays\"
sort=\"my.custom.HolidayComparator\">\n"
+#~ " <key column=\"year_id\"/>\n"
+#~ " <map-key column=\"hol_name\"
type=\"string\"/>\n"
+#~ " <element column=\"hol_date\"
type=\"date\"/>\n"
+#~ "</map>]]>"
#~ msgid ""
-#~ "<literal>fetch</literal> (optional - defaults to
<literal>join</"
-#~ "literal>): enables outer-join or sequential select fetching for this "
-#~ "association. This is a special case; for full eager fetching (in a single
"
-#~ "<literal>SELECT</literal>) of an entity and its many-to-many "
-#~ "relationships to other entities, you would enable
<literal>join</literal> "
-#~ "fetching not only of the collection itself, but also with this attribute "
-#~ "on the <literal><many-to-many></literal> nested
element."
+#~ "<![CDATA[<set name=\"aliases\"
table=\"person_aliases\" order-by=\"lower"
+#~ "(name) asc\">\n"
+#~ " <key column=\"person\"/>\n"
+#~ " <element column=\"name\"
type=\"string\"/>\n"
+#~ "</set>\n"
+#~ "\n"
+#~ "<map name=\"holidays\" order-by=\"hol_date,
hol_name\">\n"
+#~ " <key column=\"year_id\"/>\n"
+#~ " <map-key column=\"hol_name\"
type=\"string\"/>\n"
+#~ " <element column=\"hol_date type=\"date\"/>\n"
+#~ "</map>]]>"
#~ msgstr ""
-#~ "对外键字段允许DDL生成的时候生成一个惟一约束。这使关联变成了一个高效的一对"
-#~ "多关联。(此句存疑:原文为This makes the association multiplicity "
-#~ "effectively one to many.)"
-
+#~ "<![CDATA[<set name=\"aliases\"
table=\"person_aliases\" order-by=\"lower"
+#~ "(name) asc\">\n"
+#~ " <key column=\"person\"/>\n"
+#~ " <element column=\"name\"
type=\"string\"/>\n"
+#~ "</set>\n"
+#~ "\n"
+#~ "<map name=\"holidays\" order-by=\"hol_date,
hol_name\">\n"
+#~ " <key column=\"year_id\"/>\n"
+#~ " <map-key column=\"hol_name\"
type=\"string\"/>\n"
+#~ " <element column=\"hol_date type=\"date\"/>\n"
+#~ "</map>]]>"
#~ msgid ""
-#~ "<literal>unique</literal> (optional): Enable the DDL generation of a
"
-#~ "unique constraint for the foreign-key column. This makes the association "
-#~ "multiplicity effectively one to many."
+#~ "<![CDATA[sortedUsers = s.createFilter( group.getUsers(), \"order by
this."
+#~ "name\" ).list();]]>"
#~ msgstr ""
-#~ "<literal>not-found</literal> (可选 - 默认为
<literal>exception</"
-#~ "literal>): 指明引用的外键中缺少某些行该如何处理: <literal>ignore</"
-#~ "literal> 会把缺失的行作为一个空引用处理。"
-
+#~ "<![CDATA[sortedUsers = s.createFilter( group.getUsers(), \"order by
this."
+#~ "name\" ).list();]]>"
#~ msgid ""
-#~ "<literal>not-found</literal> (optional - defaults to
<literal>exception</"
-#~ "literal>): Specifies how foreign keys that reference missing rows will be
"
-#~ "handled: <literal>ignore</literal> will treat a missing row as a
null "
-#~ "association."
+#~ "<![CDATA[<class name=\"Category\">\n"
+#~ " <id name=\"id\" column=\"CATEGORY_ID\"/>\n"
+#~ " ...\n"
+#~ " <bag name=\"items\"
table=\"CATEGORY_ITEM\">\n"
+#~ " <key column=\"CATEGORY_ID\"/>\n"
+#~ " <many-to-many class=\"Item\"
column=\"ITEM_ID\"/>\n"
+#~ " </bag>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Item\">\n"
+#~ " <id name=\"id\" column=\"ITEM_ID\"/>\n"
+#~ " ...\n"
+#~ "\n"
+#~ " <!-- inverse end -->\n"
+#~ " <bag name=\"categories\" table=\"CATEGORY_ITEM\"
inverse=\"true\">\n"
+#~ " <key column=\"ITEM_ID\"/>\n"
+#~ " <many-to-many class=\"Category\"
column=\"CATEGORY_ID\"/>\n"
+#~ " </bag>\n"
+#~ "</class>]]>"
#~ msgstr ""
-#~ "<literal>entity-name</literal> (可选): 被关联的类的实体名,作为"
-#~ "<literal>class</literal>的替代。"
-
+#~ "<![CDATA[<class name=\"Category\">\n"
+#~ " <id name=\"id\" column=\"CATEGORY_ID\"/>\n"
+#~ " ...\n"
+#~ " <bag name=\"items\"
table=\"CATEGORY_ITEM\">\n"
+#~ " <key column=\"CATEGORY_ID\"/>\n"
+#~ " <many-to-many class=\"Item\"
column=\"ITEM_ID\"/>\n"
+#~ " </bag>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Item\">\n"
+#~ " <id name=\"id\" column=\"ITEM_ID\"/>\n"
+#~ " ...\n"
+#~ "\n"
+#~ " <!-- inverse end -->\n"
+#~ " <bag name=\"categories\" table=\"CATEGORY_ITEM\"
inverse=\"true\">\n"
+#~ " <key column=\"ITEM_ID\"/>\n"
+#~ " <many-to-many class=\"Category\"
column=\"CATEGORY_ID\"/>\n"
+#~ " </bag>\n"
+#~ "</class>]]>"
#~ msgid ""
-#~ "<literal>property-ref</literal>: (optional) The name of a property
of the "
-#~ "associated class that is joined to this foreign key. If not specified, "
-#~ "the primary key of the associated class is used."
-#~ msgstr "例子:首先, 一组字符串:"
+#~ "<![CDATA[\n"
+#~ "category.getItems().add(item); // The category now \"knows\"
"
+#~ "about the relationship\n"
+#~ "item.getCategories().add(category); // The item now \"knows\"
about "
+#~ "the relationship\n"
+#~ "\n"
+#~ "session.persist(item); // The relationship won't be
"
+#~ "saved!\n"
+#~ "session.persist(category); // The relationship will be "
+#~ "saved]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "category.getItems().add(item); // The category now \"knows\"
"
+#~ "about the relationship\n"
+#~ "item.getCategories().add(category); // The item now \"knows\"
about "
+#~ "the relationship\n"
+#~ "\n"
+#~ "session.persist(item); // The relationship won't be
"
+#~ "saved!\n"
+#~ "session.persist(category); // The relationship will be "
+#~ "saved]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Parent\">\n"
+#~ " <id name=\"id\" column=\"parent_id\"/>\n"
+#~ " ....\n"
+#~ " <set name=\"children\" inverse=\"true\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Child\">\n"
+#~ " <id name=\"id\" column=\"child_id\"/>\n"
+#~ " ....\n"
+#~ " <many-to-one name=\"parent\" \n"
+#~ " class=\"Parent\" \n"
+#~ " column=\"parent_id\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Parent\">\n"
+#~ " <id name=\"id\" column=\"parent_id\"/>\n"
+#~ " ....\n"
+#~ " <set name=\"children\" inverse=\"true\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Child\">\n"
+#~ " <id name=\"id\" column=\"child_id\"/>\n"
+#~ " ....\n"
+#~ " <many-to-one name=\"parent\" \n"
+#~ " class=\"Parent\" \n"
+#~ " column=\"parent_id\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Parent\">\n"
+#~ " <id name=\"id\" column=\"parent_id\"/>\n"
+#~ " ....\n"
+#~ " <map name=\"children\" inverse=\"true\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <map-key column=\"name\" \n"
+#~ " type=\"string\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </map>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Child\">\n"
+#~ " <id name=\"id\" column=\"child_id\"/>\n"
+#~ " ....\n"
+#~ " <property name=\"name\" \n"
+#~ " not-null=\"true\"/>\n"
+#~ " <many-to-one name=\"parent\" \n"
+#~ " class=\"Parent\" \n"
+#~ " column=\"parent_id\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Parent\">\n"
+#~ " <id name=\"id\" column=\"parent_id\"/>\n"
+#~ " ....\n"
+#~ " <map name=\"children\" inverse=\"true\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <map-key column=\"name\" \n"
+#~ " type=\"string\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </map>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Child\">\n"
+#~ " <id name=\"id\" column=\"child_id\"/>\n"
+#~ " ....\n"
+#~ " <property name=\"name\" \n"
+#~ " not-null=\"true\"/>\n"
+#~ " <many-to-one name=\"parent\" \n"
+#~ " class=\"Parent\" \n"
+#~ " column=\"parent_id\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Parent\">\n"
+#~ " <id name=\"id\" column=\"parent_id\"/>\n"
+#~ " ....\n"
+#~ " <map name=\"children\">\n"
+#~ " <key column=\"parent_id\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ " <map-key column=\"name\" \n"
+#~ " type=\"string\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </map>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Child\">\n"
+#~ " <id name=\"id\" column=\"child_id\"/>\n"
+#~ " ....\n"
+#~ " <many-to-one name=\"parent\" \n"
+#~ " class=\"Parent\" \n"
+#~ " column=\"parent_id\"\n"
+#~ " insert=\"false\"\n"
+#~ " update=\"false\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Parent\">\n"
+#~ " <id name=\"id\" column=\"parent_id\"/>\n"
+#~ " ....\n"
+#~ " <map name=\"children\">\n"
+#~ " <key column=\"parent_id\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ " <map-key column=\"name\" \n"
+#~ " type=\"string\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </map>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Child\">\n"
+#~ " <id name=\"id\" column=\"child_id\"/>\n"
+#~ " ....\n"
+#~ " <many-to-one name=\"parent\" \n"
+#~ " class=\"Parent\" \n"
+#~ " column=\"parent_id\"\n"
+#~ " insert=\"false\"\n"
+#~ " update=\"false\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<map name=\"contracts\">\n"
+#~ " <key column=\"employer_id\"
not-null=\"true\"/>\n"
+#~ " <map-key-many-to-many column=\"employee_id\"
class=\"Employee\"/>\n"
+#~ " <one-to-many class=\"Contract\"/>\n"
+#~ "</map>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<map name=\"contracts\">\n"
+#~ " <key column=\"employer_id\"
not-null=\"true\"/>\n"
+#~ " <map-key-many-to-many column=\"employee_id\"
class=\"Employee\"/>\n"
+#~ " <one-to-many class=\"Contract\"/>\n"
+#~ "</map>]]>"
+#~ msgid ""
+#~ "<![CDATA[<map name=\"connections\">\n"
+#~ " <key column=\"incoming_node_id\"/>\n"
+#~ " <map-key-many-to-many column=\"outgoing_node_id\"
class=\"Node\"/>\n"
+#~ " <many-to-many column=\"connection_id\"
class=\"Connection\"/>\n"
+#~ "</map>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<map name=\"connections\">\n"
+#~ " <key column=\"incoming_node_id\"/>\n"
+#~ " <map-key-many-to-many column=\"outgoing_node_id\"
class=\"Node\"/>\n"
+#~ " <many-to-many column=\"connection_id\"
class=\"Connection\"/>\n"
+#~ "</map>]]>"
+#~ msgid ""
+#~ "<![CDATA[<idbag name=\"lovers\"
table=\"LOVERS\">\n"
+#~ " <collection-id column=\"ID\"
type=\"long\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </collection-id>\n"
+#~ " <key column=\"PERSON1\"/>\n"
+#~ " <many-to-many column=\"PERSON2\" class=\"Person\"
fetch=\"join\"/>\n"
+#~ "</idbag>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<idbag name=\"lovers\"
table=\"LOVERS\">\n"
+#~ " <collection-id column=\"ID\"
type=\"long\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </collection-id>\n"
+#~ " <key column=\"PERSON1\"/>\n"
+#~ " <many-to-many column=\"PERSON2\" class=\"Person\"
fetch=\"join\"/>\n"
+#~ "</idbag>]]>"
+#~ msgid ""
+#~ "<![CDATA[package eg;\n"
+#~ "import java.util.Set;\n"
+#~ "\n"
+#~ "public class Parent {\n"
+#~ " private long id;\n"
+#~ " private Set children;\n"
+#~ "\n"
+#~ " public long getId() { return id; }\n"
+#~ " private void setId(long id) { this.id=id; }\n"
+#~ "\n"
+#~ " private Set getChildren() { return children; }\n"
+#~ " private void setChildren(Set children) { this.children=children; }\n"
+#~ "\n"
+#~ " ....\n"
+#~ " ....\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[package eg;\n"
+#~ "import java.util.Set;\n"
+#~ "\n"
+#~ "public class Parent {\n"
+#~ " private long id;\n"
+#~ " private Set children;\n"
+#~ "\n"
+#~ " public long getId() { return id; }\n"
+#~ " private void setId(long id) { this.id=id; }\n"
+#~ "\n"
+#~ " private Set getChildren() { return children; }\n"
+#~ " private void setChildren(Set children) { this.children=children; }\n"
+#~ "\n"
+#~ " ....\n"
+#~ " ....\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Parent\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"children\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </set>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Child\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Parent\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"children\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </set>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Child\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgid ""
+#~ "<![CDATA[create table parent ( id bigint not null primary key )\n"
+#~ "create table child ( id bigint not null primary key, name varchar(255), "
+#~ "parent_id bigint )\n"
+#~ "alter table child add constraint childfk0 (parent_id) references
parent]]>"
+#~ msgstr ""
+#~ "<![CDATA[create table parent ( id bigint not null primary key )\n"
+#~ "create table child ( id bigint not null primary key, name varchar(255), "
+#~ "parent_id bigint )\n"
+#~ "alter table child add constraint childfk0 (parent_id) references
parent]]>"
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Parent\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"children\"
inverse=\"true\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </set>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Child\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " <many-to-one name=\"parent\" class=\"Parent\"
column=\"parent_id"
+#~ "\" not-null=\"true\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Parent\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"children\"
inverse=\"true\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </set>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Child\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " <many-to-one name=\"parent\" class=\"Parent\"
column=\"parent_id"
+#~ "\" not-null=\"true\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgid ""
+#~ "<![CDATA[create table parent ( id bigint not null primary key )\n"
+#~ "create table child ( id bigint not null\n"
+#~ " primary key,\n"
+#~ " name varchar(255),\n"
+#~ " parent_id bigint not null )\n"
+#~ "alter table child add constraint childfk0 (parent_id) references
parent]]>"
+#~ msgstr ""
+#~ "<![CDATA[create table parent ( id bigint not null primary key )\n"
+#~ "create table child ( id bigint not null\n"
+#~ " primary key,\n"
+#~ " name varchar(255),\n"
+#~ " parent_id bigint not null )\n"
+#~ "alter table child add constraint childfk0 (parent_id) references
parent]]>"
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Parent\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"children\">\n"
+#~ " <key column=\"parent_id\"
not-null=\"true\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </set>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Child\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Parent\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"children\">\n"
+#~ " <key column=\"parent_id\"
not-null=\"true\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ " </set>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Child\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Parent\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"children\"
table=\"childset\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <many-to-many class=\"Child\"
column=\"child_id\"/>\n"
+#~ " </set>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Child\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Parent\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <set name=\"children\"
table=\"childset\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <many-to-many class=\"Child\"
column=\"child_id\"/>\n"
+#~ " </set>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Child\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgid ""
+#~ "<![CDATA[create table parent ( id bigint not null primary key )\n"
+#~ "create table child ( id bigint not null primary key, name varchar(255)
)\n"
+#~ "create table childset ( parent_id bigint not null,\n"
+#~ " child_id bigint not null,\n"
+#~ " primary key ( parent_id, child_id ) )\n"
+#~ "alter table childset add constraint childsetfk0 (parent_id) references "
+#~ "parent\n"
+#~ "alter table childset add constraint childsetfk1 (child_id) references "
+#~ "child]]>"
+#~ msgstr ""
+#~ "<![CDATA[create table parent ( id bigint not null primary key )\n"
+#~ "create table child ( id bigint not null primary key, name varchar(255)
)\n"
+#~ "create table childset ( parent_id bigint not null,\n"
+#~ " child_id bigint not null,\n"
+#~ " primary key ( parent_id, child_id ) )\n"
+#~ "alter table childset add constraint childsetfk0 (parent_id) references "
+#~ "parent\n"
+#~ "alter table childset add constraint childsetfk1 (child_id) references "
+#~ "child]]>"
+
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/component_mapping.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/component_mapping.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/component_mapping.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,662 +1,581 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2010-01-08T04:07:18\n"
+"PO-Revision-Date: 2010-01-11 10:36+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: component_mapping.xml:29
#, no-c-format
msgid "Component Mapping"
msgstr "组件(Component)映射"
#. Tag: para
-#: component_mapping.xml:31
-#, fuzzy, no-c-format
-msgid ""
-"The notion of a <emphasis>component</emphasis> is re-used in several
"
-"different contexts and purposes throughout Hibernate."
-msgstr ""
-"<emphasis>组件</emphasis>(Component)这个概念在Hibernate中几处不同的地方为了不"
-"同的目的被重复使用."
+#, no-c-format
+msgid "The notion of a <emphasis>component</emphasis> is re-used in
several different contexts and purposes throughout Hibernate."
+msgstr "<emphasis>组件(Component)</emphasis>这个概念在 Hibernate
中几处不同的地方为了不同的目的被重复使用。"
#. Tag: title
-#: component_mapping.xml:37
#, no-c-format
msgid "Dependent objects"
msgstr "依赖对象(Dependent objects)"
#. Tag: para
-#: component_mapping.xml:39
-#, fuzzy, 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)这个概念可以像下面这样来"
-"建模:"
-
-#. Tag: programlisting
-#: component_mapping.xml:45
#, no-c-format
-msgid ""
-"<![CDATA[public class Person {\n"
-" private java.util.Date birthday;\n"
-" private Name name;\n"
-" private String key;\n"
-" public String getKey() {\n"
-" return key;\n"
-" }\n"
-" private void setKey(String key) {\n"
-" this.key=key;\n"
-" }\n"
-" public java.util.Date getBirthday() {\n"
-" return birthday;\n"
-" }\n"
-" public void setBirthday(java.util.Date birthday) {\n"
-" this.birthday = birthday;\n"
-" }\n"
-" public Name getName() {\n"
-" return name;\n"
-" }\n"
-" public void setName(Name name) {\n"
-" this.name = name;\n"
-" }\n"
-" ......\n"
-" ......\n"
-"}]]>"
-msgstr ""
+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: programlisting
-#: component_mapping.xml:47
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[public class Name {\n"
-" char initial;\n"
-" String first;\n"
-" String last;\n"
-" public String getFirst() {\n"
-" return first;\n"
-" }\n"
-" void setFirst(String first) {\n"
-" this.first = first;\n"
-" }\n"
-" public String getLast() {\n"
-" return last;\n"
-" }\n"
-" void setLast(String last) {\n"
-" this.last = last;\n"
-" }\n"
-" public char getInitial() {\n"
-" return initial;\n"
-" }\n"
-" void setInitial(char initial) {\n"
-" this.initial = initial;\n"
-" }\n"
-"}]]>"
-msgstr ""
+msgid "Now <literal>Name</literal> can be persisted as a component of
<literal>Person</literal>. <literal>Name</literal> defines getter
and setter methods for its persistent properties, but it does not need to declare any
interfaces or identifier properties."
+msgstr
"在持久化的过程中,<literal>姓名(Name)</literal>可以作为<literal>人(Person)</literal>的一个组件。需要注意的是:你应该为<literal>姓名</literal>的持久化属性定义
getter 和 setter 方法,但是你不需要实现任何的接口或申明标识符字段。 "
#. Tag: para
-#: component_mapping.xml:49
-#, fuzzy, no-c-format
-msgid ""
-"Now <literal>Name</literal> can be persisted as a component of "
-"<literal>Person</literal>. <literal>Name</literal> defines
getter and setter "
-"methods for its persistent properties, but it does not need to declare any "
-"interfaces or identifier properties."
-msgstr ""
-"在持久化的过程中,<literal>姓名(Name)</literal>可以作为<literal>人(Person)</"
-"literal>的一个组件。需要注意的是:你应该为<literal>姓名</literal>的持久化属性"
-"定义getter和setter方法,但是你不需要实现任何的接口或申明标识符字段。"
-
-#. Tag: para
-#: component_mapping.xml:56
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Our Hibernate mapping would look like this:"
-msgstr "以下是这个例子的Hibernate映射文件:"
+msgstr "以下是这个例子的 Hibernate 映射文件: "
-#. Tag: programlisting
-#: component_mapping.xml:60
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"eg.Person\"
table=\"person\">\n"
-" <id name=\"Key\" column=\"pid\"
type=\"string\">\n"
-" <generator class=\"uuid\"/>\n"
-" </id>\n"
-" <property name=\"birthday\" type=\"date\"/>\n"
-" <component name=\"Name\" class=\"eg.Name\"> <!--
class attribute "
-"optional -->\n"
-" <property name=\"initial\"/>\n"
-" <property name=\"first\"/>\n"
-" <property name=\"last\"/>\n"
-" </component>\n"
-"</class>]]>"
-msgstr ""
+msgid "The person table would have the columns <literal>pid</literal>,
<literal>birthday</literal>, <literal>initial</literal>,
<literal>first</literal> and <literal>last</literal>."
+msgstr "人员(Person)表中将包括
<literal>pid</literal>,<literal>birthday</literal>,<literal>initial</literal>,<literal>first</literal>和
<literal>last</literal> 等字段。"
#. Tag: para
-#: component_mapping.xml:62
#, no-c-format
-msgid ""
-"The person table would have the columns <literal>pid</literal>, "
-"<literal>birthday</literal>, <literal>initial</literal>,
<literal>first</"
-"literal> and <literal>last</literal>."
-msgstr ""
-"人员(Person)表中将包括<literal>pid</literal>,
<literal>birthday</literal>, "
-"<literal>initial</literal>, <literal>first</literal>和
<literal>last</"
-"literal>等字段。"
+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 <emphasis>ad hoc</emphasis>. When reloading the
containing object, Hibernate will assume that if all component columns are null, then the
entire component is null. This is suitable for most purposes."
+msgstr "就像所有的值类型一样,组件不支持共享引用。换句话说,两个人可能重名,但是两个 Person 对象应该包含两个独立的 Name 对象,只不过这两个
Name 对象具有“同样”的值。组件的值可以为空,其定义如下。 每当 Hibernate 重新加载一个包含组件的对象,如果该组件的所有字段为空,Hibernate
将假定整个组件为空。在大多数情况下,这样假定应该是没有问题的。"
#. Tag: para
-#: component_mapping.xml:70
-#, fuzzy, 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 <emphasis>ad
hoc</"
-"emphasis>. When reloading the containing object, Hibernate will assume that
"
-"if all component columns are null, then the entire component is null. This "
-"is suitable for most purposes."
-msgstr ""
-"就像所有的值类型一样, 组件不支持共享引用。 换句话说,两个人可能重名,但是两个"
-"Person对象应该包含两个独立的Name对象,只不过这两个Name对象具有“同样”的值。 组"
-"件的值可以为空,其定义如下。 每当Hibernate重新加载一个包含组件的对象,如果该组"
-"件的所有字段为空,Hibernate将假定整个组件为空。 在大多数情况下,这样假定应该是"
-"没有问题的。"
+#, 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
<emphasis>not</emphasis> 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
-#: component_mapping.xml:78
-#, fuzzy, 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 "
-"<emphasis>not</emphasis> 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
-#: component_mapping.xml:85
#, no-c-format
-msgid ""
-"The <literal><component></literal> element allows a
<literal><"
-"parent></literal> subelement that maps a property of the component
class "
-"as a reference back to the containing entity."
-msgstr ""
-"<literal><component></literal> 元素还允许有
<literal><parent></"
-"literal>子元素,用来表明component类中的一个属性是指向包含它的实体的引用。"
+msgid "The <literal><component></literal> element allows a
<literal><parent></literal> subelement that maps a property of
the component class as a reference back to the containing entity."
+msgstr "<literal><component></literal> 元素允许加入一个
<literal><parent></literal>
子元素,在组件类内部就可以有一个指向其容器的实体的反向引用。"
-#. Tag: programlisting
-#: component_mapping.xml:91
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"eg.Person\"
table=\"person\">\n"
-" <id name=\"Key\" column=\"pid\"
type=\"string\">\n"
-" <generator class=\"uuid\"/>\n"
-" </id>\n"
-" <property name=\"birthday\" type=\"date\"/>\n"
-" <component name=\"Name\" class=\"eg.Name\"
unique=\"true\">\n"
-" <parent name=\"namedPerson\"/> <!-- reference back to
the Person --"
-">\n"
-" <property name=\"initial\"/>\n"
-" <property name=\"first\"/>\n"
-" <property name=\"last\"/>\n"
-" </component>\n"
-"</class>]]>"
-msgstr ""
-
#. Tag: title
-#: component_mapping.xml:96
#, no-c-format
msgid "Collections of dependent objects"
-msgstr "在集合中出现的依赖对象 (Collections of dependent objects)"
+msgstr "在集合中出现的依赖对象(Collections of dependent objects)"
#. Tag: para
-#: component_mapping.xml:98
#, fuzzy, no-c-format
-msgid ""
-"Collections of components are supported (e.g. an array of type "
-"<literal>Name</literal>). Declare your component collection by
replacing the "
-"<literal><element></literal> tag with a
<literal><composite-"
-"element></literal> tag:"
-msgstr ""
-"Hibernate支持组件的集合(例如: 一个元素是姓名(Name)这种类型的数组)。 你可以使"
-"用<literal><composite-element></literal>标签替代<literal><"
-"element></literal>标签来定义你的组件集合。"
+msgid "Collections of components are supported (e.g. an array of type
<literal>Name</literal>). Declare your component collection by replacing the
<literal><element></literal> tag with a
<literal><composite-element></literal> tag:"
+msgstr "Hibernate 支持组件的集合(例如:一个元素是姓名(Name)这种类型的数组)。你可以使用
<literal><composite-element></literal> 标签替代
<literal><element></literal> 标签来定义你的组件集合。"
-#. Tag: programlisting
-#: component_mapping.xml:105
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"someNames\" table=\"some_names\"
lazy=\"true\">\n"
-" <key column=\"id\"/>\n"
-" <composite-element class=\"eg.Name\"> <!-- class attribute
required -->\n"
-" <property name=\"initial\"/>\n"
-" <property name=\"first\"/>\n"
-" <property name=\"last\"/>\n"
-" </composite-element>\n"
-"</set>]]>"
-msgstr ""
+msgid "If you define a <literal>Set</literal> of composite elements, it
is important to implement <literal>equals()</literal> and
<literal>hashCode()</literal> correctly."
+msgstr "注意,如果你定义的 Set 包含组合元素(composite-element),正确地实现
<literal>equals()</literal> 和 <literal>hashCode()</literal>
是非常重要的。 "
#. Tag: para
-#: component_mapping.xml:108
-#, fuzzy, no-c-format
-msgid ""
-"If you define a <literal>Set</literal> of composite elements, it is
"
-"important to implement <literal>equals()</literal> and
<literal>hashCode()</"
-"literal> correctly."
-msgstr ""
-"注意,如果你定义的Set包含组合元素(composite-element),正确地实现"
-"<literal>equals()</literal>和<literal>hashCode()</literal>是非常重要的。"
+#, no-c-format
+msgid "Composite elements can contain components but not collections. If your
composite element contains components, use the
<literal><nested-composite-element></literal> 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 "组合元素可以包含组件,但是不能包含集合。如果你的组合元素自身包含组件,你必须使用
<literal><nested-composite-element></literal> 标签。这是一个相当特殊的案例 —
在一个组件的集合里,那些组件本身又可以包含其他的组件。这个时候你就应该考虑一下使用 one-to-many 关联是否会更恰当。尝试对这个组合元素重新建模为一个实体 —
但是需要注意的是,虽然 Java 模型和重新建模前是一样的,关系模型和持久性语义会有细微的变化。 "
#. Tag: para
-#: component_mapping.xml:115
-#, fuzzy, no-c-format
-msgid ""
-"Composite elements can contain components but not collections. If your "
-"composite element contains components, use the
<literal><nested-composite-"
-"element></literal> 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 ""
-"组合元素可以包含组件,但是不能包含集合。如果你的组合元素自身包含组件, 你必须"
-"使用<literal><nested-composite-element></literal>标签。这是一个相当特殊"
-"的案例 - 在一个组件的集合里,那些组件本身又可以包含其他的组件。这个时候你就应"
-"该考虑一下使用one-to-many关联是否会更恰当。 尝试对这个组合元素重新建模为一个"
-"实体-但是需要注意的是,虽然Java模型和重新建模前是一样的,关系模型和持久性语"
-"义会有细微的变化。"
+#, no-c-format
+msgid "A composite element mapping does not support null-able properties if you are
using a <literal><set></literal>. 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
<literal><list></literal>,
<literal><map></literal>,
<literal><bag></literal> or
<literal><idbag></literal>."
+msgstr "请注意如果你使用 <literal><set></literal>
标签,一个组合元素的映射不支持可能为空的属性. 当删除对象时,Hibernate 必须使用每一个字段的值来确定一条记录(在组合元素表中,没有单独的关键字段),如果有为 null
的字段,这样做就不可能了。你必须作出一个选择,要么在组合元素中使用不能为空的属性,要么选择使用
<literal><list></literal>,<literal><map></literal>,<literal><bag></literal>
或者 <literal><idbag></literal> 而不是
<literal><set></literal>。 "
#. Tag: para
-#: component_mapping.xml:127
-#, fuzzy, no-c-format
-msgid ""
-"A composite element mapping does not support null-able properties if you are
"
-"using a <literal><set></literal>. 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 <literal><list></literal>,
<literal><map></"
-"literal>, <literal><bag></literal> or
<literal><idbag></literal>."
-msgstr ""
-"请注意如果你使用<literal><set></literal>标签,一个组合元素的映射不支持可"
-"能为空的属性. 当删除对象时, Hibernate必须使用每一个字段的值来确定一条记录(在"
-"组合元素表中,没有单独的关键字段), 如果有为null的字段,这样做就不可能了。你"
-"必须作出一个选择,要么在组合元素中使用不能为空的属性,要么选择使用"
-"<literal><list></literal>,<literal><map></literal>,<literal><"
-"bag></literal> 或者
<literal><idbag></literal>而不是 <literal><"
-"set></literal>。"
+#, no-c-format
+msgid "A special case of a composite element is a composite element with a nested
<literal><many-to-one></literal> 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
<literal>Order</literal> to <literal>Item</literal>, where
<literal>purchaseDate</literal>, <literal>price</literal> and
<literal>quantity</literal> are properties of the association:"
+msgstr
"组合元素有个特别的用法是它可以包含一个<literal><many-to-one></literal>元素。类似这样的映射允许你将一个
many-to-many 关联表的额外字段映射为组合元素类。接下来的的例子是从 <literal>Order</literal> 到
<literal>Item</literal> 的一个多对多的关联关系,关联属性是
<literal>purchaseDate</literal>,<literal>price</literal> 和
<literal>quantity</literal> 。 "
#. Tag: para
-#: component_mapping.xml:138
-#, fuzzy, no-c-format
-msgid ""
-"A special case of a composite element is a composite element with a nested "
-"<literal><many-to-one></literal> 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 "
-"<literal>Order</literal> to <literal>Item</literal>, where
"
-"<literal>purchaseDate</literal>, <literal>price</literal>
and "
-"<literal>quantity</literal> are properties of the association:"
-msgstr ""
-"组合元素有个特别的用法是它可以包含一个<literal><many-to-one></literal>"
-"元素。类似这样的映射允许你将一个many-to-many关联表映射为组合元素的集合。(A "
-"mapping like this allows you to map extra columns of a many-to-many "
-"association table to the composite element class.) 接下来的的例子是从"
-"<literal>Order</literal>到<literal>Item</literal>的一个多对多的关联关系,
关联"
-"属性是 <literal>purchaseDate</literal>,
<literal>price</literal> 和 "
-"<literal>quantity</literal> 。"
-
-#. Tag: programlisting
-#: component_mapping.xml:148
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"eg.Order\" .... >\n"
-" ....\n"
-" <set name=\"purchasedItems\" table=\"purchase_items\"
lazy=\"true\">\n"
-" <key column=\"order_id\">\n"
-" <composite-element class=\"eg.Purchase\">\n"
-" <property name=\"purchaseDate\"/>\n"
-" <property name=\"price\"/>\n"
-" <property name=\"quantity\"/>\n"
-" <many-to-one name=\"item\"
class=\"eg.Item\"/> <!-- class "
-"attribute is optional -->\n"
-" </composite-element>\n"
-" </set>\n"
-"</class>]]>"
-msgstr ""
+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 <literal>Purchase</literal> can be in the set of an
<literal>Order</literal>, but it cannot be referenced by the
<literal>Item</literal> at the same time."
+msgstr "当然,当你定义 Item 时,你无法引用这些 purchase,因此你无法实现双向关联查询。记住组件是值类型,并且不允许共享引用。某一个特定的
<literal>Purchase</literal> 可以放在 <literal>Order</literal>
的集合中,但它不能同时被 <literal>Item</literal> 所引用。 "
#. Tag: para
-#: component_mapping.xml:150
-#, fuzzy, 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 <literal>Purchase</literal> can be in
the "
-"set of an <literal>Order</literal>, but it cannot be referenced by the
"
-"<literal>Item</literal> at the same time."
-msgstr ""
-"当然,当你定义Item时,你无法引用这些purchase,因此你无法实现双向关联查询。记"
-"住组件是值类型,并且不允许共享引用。某一个特定的<literal>Purchase</literal> "
-"可以放在<literal>Order</literal>的集合中,但它不能同时被<literal>Item</"
-"literal>所引用。"
-
-#. Tag: para
-#: component_mapping.xml:158
#, no-c-format
msgid "Even ternary (or quaternary, etc) associations are possible:"
msgstr "其实组合元素的这个用法可以扩展到三重或多重关联:"
-#. Tag: programlisting
-#: component_mapping.xml:160
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"eg.Order\" .... >\n"
-" ....\n"
-" <set name=\"purchasedItems\" table=\"purchase_items\"
lazy=\"true\">\n"
-" <key column=\"order_id\">\n"
-" <composite-element class=\"eg.OrderLine\">\n"
-" <many-to-one name=\"purchaseDetails
class=\"eg.Purchase\"/>\n"
-" <many-to-one name=\"item\"
class=\"eg.Item\"/>\n"
-" </composite-element>\n"
-" </set>\n"
-"</class>]]>"
-msgstr ""
+msgid "Composite elements can appear in queries using the same syntax as
associations to other entities."
+msgstr "在查询中,表达组合元素的语法和关联到其他实体的语法是一样的。 "
-#. Tag: para
-#: component_mapping.xml:162
-#, fuzzy, no-c-format
-msgid ""
-"Composite elements can appear in queries using the same syntax as "
-"associations to other entities."
-msgstr "在查询中,表达组合元素的语法和关联到其他实体的语法是一样的。"
-
#. Tag: title
-#: component_mapping.xml:170
#, no-c-format
msgid "Components as Map indices"
-msgstr "组件作为Map的索引(Components as Map indices )"
+msgstr "组件作为 Map 的索引(Components as Map indices )"
#. Tag: para
-#: component_mapping.xml:172
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><composite-map-key></literal> element allows
you to map a "
-"component class as the key of a <literal>Map</literal>. Ensure that you
"
-"override <literal>hashCode()</literal> and
<literal>equals()</literal> "
-"correctly on the component class."
-msgstr ""
-"<literal><composite-map-key></literal>元素允许你映射一个组件类作为一个"
-"<literal>Map</literal>的key,前提是你必须正确的在这个类中重写了"
-"<literal>hashCode()</literal> 和
<literal>equals()</literal>方法。"
+#, no-c-format
+msgid "The <literal><composite-map-key></literal> element
allows you to map a component class as the key of a <literal>Map</literal>.
Ensure that you override <literal>hashCode()</literal> and
<literal>equals()</literal> correctly on the component class."
+msgstr "<literal><composite-map-key></literal>
元素允许你映射一个组件类作为一个 <literal>Map</literal> 的 key,前提是你必须正确的在这个类中重写了
<literal>hashCode()</literal> 和 <literal>equals()</literal> 方法。
"
#. Tag: title
-#: component_mapping.xml:181
#, no-c-format
msgid "Components as composite identifiers"
-msgstr "组件作为联合标识符(Components as composite identifiers)"
+msgstr "组件作为联合标识符(Components as composite identifiers)"
#. Tag: para
-#: component_mapping.xml:183
-#, fuzzy, no-c-format
-msgid ""
-"You can use a component as an identifier of an entity class. Your component "
-"class must satisfy certain requirements:"
-msgstr ""
-"你可以使用一个组件作为一个实体类的标识符。 你的组件类必须满足以下要求:"
+#, no-c-format
+msgid "You can use a component as an identifier of an entity class. Your component
class must satisfy certain requirements:"
+msgstr "你可以使用一个组件作为一个实体类的标识符。你的组件类必须满足以下要求: "
#. Tag: para
-#: component_mapping.xml:190
#, no-c-format
msgid "It must implement <literal>java.io.Serializable</literal>."
-msgstr "它必须实现<literal>java.io.Serializable</literal>接口"
+msgstr "它必须实现 <literal>java.io.Serializable</literal> 接口"
#. Tag: para
-#: component_mapping.xml:195
-#, fuzzy, no-c-format
-msgid ""
-"It must re-implement <literal>equals()</literal> and
<literal>hashCode()</"
-"literal> consistently with the database's notion of composite key
equality."
-msgstr ""
-"它必须重新实现<literal>equals()</literal>和<literal>hashCode()</literal>方"
-"法, 始终和组合关键字在数据库中的概念保持一致"
+#, no-c-format
+msgid "It must re-implement <literal>equals()</literal> and
<literal>hashCode()</literal> consistently with the database's notion of
composite key equality."
+msgstr "它必须重新实现 <literal>equals()</literal> 和
<literal>hashCode()</literal> 方法,始终和组合关键字在数据库中的概念保持一致 "
#. Tag: title
-#: component_mapping.xml:204
#, no-c-format
msgid "Note"
-msgstr ""
+msgstr "注意"
#. Tag: para
-#: component_mapping.xml:205
-#, fuzzy, no-c-format
-msgid ""
-"In Hibernate3, although the second requirement is not an absolutely hard "
-"requirement of Hibernate, it is recommended."
-msgstr ""
-"注意:在Hibernate3中,第二个要求并非是Hibernate强制必须的。但最好这样做。"
+#, no-c-format
+msgid "In Hibernate3, although the second requirement is not an absolutely hard
requirement of Hibernate, it is recommended."
+msgstr "注意:在 Hibernate3 中,第二个要求并非是 Hibernate 强制必须的。但最好这样做。 "
#. Tag: para
-#: component_mapping.xml:211
-#, fuzzy, no-c-format
-msgid ""
-"You cannot use an <literal>IdentifierGenerator</literal> to generate
"
-"composite keys. Instead the application must assign its own identifiers."
-msgstr ""
-"你不能使用一个<literal>IdentifierGenerator</literal>产生组合关键字。一个应用"
-"程序必须分配它自己的标识符。"
+#, no-c-format
+msgid "You cannot use an <literal>IdentifierGenerator</literal> to
generate composite keys. Instead the application must assign its own identifiers."
+msgstr "你不能使用一个 <literal>IdentifierGenerator</literal>
产生组合关键字。一个应用程序必须分配它自己的标识符。 "
#. Tag: para
-#: component_mapping.xml:216
-#, fuzzy, no-c-format
-msgid ""
-"Use the <literal><composite-id></literal> tag, with
nested "
-"<literal><key-property></literal> elements, in place of
the usual "
-"<literal><id></literal> declaration. For example, the
"
-"<literal>OrderLine</literal> class has a primary key that depends upon
the "
-"(composite) primary key of <literal>Order</literal>."
-msgstr ""
-"使用<literal><composite-id></literal>
标签(并且内嵌<literal><key-"
-"property></literal>元素)代替通常的<literal><id></literal>标签。比如,"
-"<literal>OrderLine</literal>类具有一个主键,这个主键依赖于<literal>Order</"
-"literal>的(联合)主键。"
-
-#. Tag: programlisting
-#: component_mapping.xml:224
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"OrderLine\">\n"
-" \n"
-" <composite-id name=\"id\"
class=\"OrderLineId\">\n"
-" <key-property name=\"lineId\"/>\n"
-" <key-property name=\"orderId\"/>\n"
-" <key-property name=\"customerId\"/>\n"
-" </composite-id>\n"
-" \n"
-" <property name=\"name\"/>\n"
-" \n"
-" <many-to-one name=\"order\" class=\"Order\"\n"
-" insert=\"false\" update=\"false\">\n"
-" <column name=\"orderId\"/>\n"
-" <column name=\"customerId\"/>\n"
-" </many-to-one>\n"
-" ....\n"
-" \n"
-"</class>]]>"
-msgstr ""
+msgid "Use the <literal><composite-id></literal> tag, with
nested <literal><key-property></literal> elements, in place of
the usual <literal><id></literal> declaration. For example, the
<literal>OrderLine</literal> class has a primary key that depends upon the
(composite) primary key of <literal>Order</literal>."
+msgstr "使用 <literal><composite-id></literal> 标签(并且内嵌
<literal><key-property></literal> 元素)代替通常的
<literal><id></literal>
标签。比如,<literal>OrderLine</literal> 类具有一个主键,这个主键依赖于
<literal>Order</literal> 的(联合)主键。 "
#. Tag: para
-#: component_mapping.xml:226
-#, fuzzy, no-c-format
-msgid ""
-"Any foreign keys referencing the <literal>OrderLine</literal> table are
now "
-"composite. Declare this in your mappings for other classes. An association "
-"to <literal>OrderLine</literal> is mapped like this:"
-msgstr ""
-"现在,任何指向<literal>OrderLine</literal>的外键都是复合的。在你的映射文件"
-"中,必须为其他类也这样声明。例如,一个指向<literal>OrderLine</literal>的关联"
-"可能被这样映射:"
-
-#. Tag: programlisting
-#: component_mapping.xml:232
#, no-c-format
-msgid ""
-"<![CDATA[<many-to-one name=\"orderLine\"
class=\"OrderLine\">\n"
-"<!-- the \"class\" attribute is optional, as usual -->\n"
-" <column name=\"lineId\"/>\n"
-" <column name=\"orderId\"/>\n"
-" <column name=\"customerId\"/>\n"
-"</many-to-one>]]>"
-msgstr ""
+msgid "Any foreign keys referencing the <literal>OrderLine</literal>
table are now composite. Declare this in your mappings for other classes. An association
to <literal>OrderLine</literal> is mapped like this:"
+msgstr "现在,任何指向 <literal>OrderLine</literal>
的外键都是复合的。在你的映射文件中,必须为其他类也这样声明。例如,一个指向 <literal>OrderLine</literal> 的关联可能被这样映射:
"
#. Tag: para
-#: component_mapping.xml:235
#, no-c-format
-msgid ""
-"The <literal>column</literal> element is an alternative to the "
-"<literal>column</literal> attribute everywhere. Using the
<literal>column</"
-"literal> element just gives more declaration options, which are mostly "
-"useful when utilizing <literal>hbm2ddl</literal>"
-msgstr ""
+msgid "The <literal><column></literal> tag is an
alternative to the <literal>column</literal> attribute everywhere. Using the
<literal><column></literal> tag just gives more declaration
options, which are mostly useful when utilizing
<literal>hbm2ddl</literal>."
+msgstr "(注意在各个地方 <literal><column></literal> 标签都是
<literal>column</literal> 属性的替代写法。) "
#. Tag: para
-#: component_mapping.xml:244
#, no-c-format
-msgid ""
-"A <literal>many-to-many</literal> association to
<literal>OrderLine</"
-"literal> also uses the composite foreign key:"
-msgstr ""
-"指向<literal>OrderLine</literal>的<literal>多对多</literal>关联也使用联合外"
-"键:"
+msgid "A <literal>many-to-many</literal> association to
<literal>OrderLine</literal> also uses the composite foreign key:"
+msgstr "指向 <literal>OrderLine</literal>
的<literal>多对多</literal>关联也使用联合外键:"
-#. Tag: programlisting
-#: component_mapping.xml:249
-#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"undeliveredOrderLines\">\n"
-" <key column name=\"warehouseId\"/>\n"
-" <many-to-many class=\"OrderLine\">\n"
-" <column name=\"lineId\"/>\n"
-" <column name=\"orderId\"/>\n"
-" <column name=\"customerId\"/>\n"
-" </many-to-many>\n"
-"</set>]]>"
-msgstr ""
-
#. Tag: para
-#: component_mapping.xml:251
#, no-c-format
-msgid ""
-"The collection of <literal>OrderLine</literal>s in
<literal>Order</literal> "
-"would use:"
-msgstr ""
-"在<literal>Order</literal>中,<literal>OrderLine</literal>的集合则是这样:"
+msgid "The collection of <literal>OrderLine</literal>s in
<literal>Order</literal> would use:"
+msgstr "在 <literal>Order</literal>
中,<literal>OrderLine</literal> 的集合则是这样: "
-#. Tag: programlisting
-#: component_mapping.xml:256
-#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"orderLines\"
inverse=\"true\">\n"
-" <key>\n"
-" <column name=\"orderId\"/>\n"
-" <column name=\"customerId\"/>\n"
-" </key>\n"
-" <one-to-many class=\"OrderLine\"/>\n"
-"</set>]]>"
-msgstr ""
-
#. Tag: para
-#: component_mapping.xml:258
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The <literal><one-to-many></literal> element
declares no columns."
-msgstr
"(与通常一样,<literal><one-to-many></literal>元素不声明任何列.)"
+msgstr "与通常一样,<literal><one-to-many></literal>
元素不声明任何列。"
#. Tag: para
-#: component_mapping.xml:262
#, no-c-format
-msgid ""
-"If <literal>OrderLine</literal> itself owns a collection, it also has a
"
-"composite foreign key."
-msgstr "假若<literal>OrderLine</literal>本身拥有一个集合,它也具有组合外键。"
+msgid "If <literal>OrderLine</literal> itself owns a collection, it also
has a composite foreign key."
+msgstr "假若 <literal>OrderLine</literal> 本身拥有一个集合,它也具有组合外键。"
-#. Tag: programlisting
-#: component_mapping.xml:267
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"OrderLine\">\n"
-" ....\n"
-" ....\n"
-" <list name=\"deliveryAttempts\">\n"
-" <key> <!-- a collection inherits the composite key type
-->\n"
-" <column name=\"lineId\"/>\n"
-" <column name=\"orderId\"/>\n"
-" <column name=\"customerId\"/>\n"
-" </key>\n"
-" <list-index column=\"attemptId\"
base=\"1\"/>\n"
-" <composite-element class=\"DeliveryAttempt\">\n"
-" ...\n"
-" </composite-element>\n"
-" </set>\n"
-"</class>]]>"
-msgstr ""
-
#. Tag: title
-#: component_mapping.xml:272
#, no-c-format
msgid "Dynamic components"
-msgstr "动态组件 (Dynamic components)"
+msgstr "动态组件(Dynamic components)"
#. Tag: para
-#: component_mapping.xml:274
-#, fuzzy, no-c-format
+#, no-c-format
msgid "You can also map a property of type
<literal>Map</literal>:"
-msgstr "你甚至可以映射<literal>Map</literal>类型的属性:"
+msgstr "你甚至可以映射 <literal>Map</literal> 类型的属性: "
-#. Tag: programlisting
-#: component_mapping.xml:278
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<dynamic-component name=\"userAttributes\">\n"
-" <property name=\"foo\" column=\"FOO\"
type=\"string\"/>\n"
-" <property name=\"bar\" column=\"BAR\"
type=\"integer\"/>\n"
-" <many-to-one name=\"baz\" class=\"Baz\"
column=\"BAZ_ID\"/>\n"
-"</dynamic-component>]]>"
-msgstr ""
+msgid "The semantics of a
<literal><dynamic-component></literal> mapping are identical to
<literal><component></literal>. The advantage of this kind of
mapping is the ability to determine the actual properties of the bean at deployment time
just by editing the mapping document. Runtime manipulation of the mapping document is also
possible, using a DOM parser. You can also access, and change, Hibernate's
configuration-time metamodel via the <literal>Configuration</literal>
object."
+msgstr "从 <literal><dynamic-component></literal>
映射的语义上来讲,它和 <literal><component></literal>
是相同的。这种映射类型的优点在于通过修改映射文件,就可以具有在部署时检测真实属性的能力。利用一个 DOM 解析器,也可以在程序运行时操作映射文件。更好的是,你可以通过
<literal>Configuration</literal> 对象来访问(或者修改)Hibernate 的运行时元模型。 "
-#. Tag: para
-#: component_mapping.xml:280
-#, fuzzy, no-c-format
-msgid ""
-"The semantics of a <literal><dynamic-component></literal>
mapping are "
-"identical to <literal><component></literal>. The
advantage of this "
-"kind of mapping is the ability to determine the actual properties of the "
-"bean at deployment time just by editing the mapping document. Runtime "
-"manipulation of the mapping document is also possible, using a DOM parser. "
-"You can also access, and change, Hibernate's configuration-time metamodel
"
-"via the <literal>Configuration</literal> object."
-msgstr ""
-"从<literal><dynamic-component></literal>映射的语义上来讲,它和"
-"<literal><component></literal>是相同的。
这种映射类型的优点在于通过修改"
-"映射文件,就可以具有在部署时检测真实属性的能力。利用一个DOM解析器,也可以在程"
-"序运行时操作映射文件。 更好的是,你可以通过<literal>Configuration</literal>对"
-"象来访问(或者修改)Hibernate的运行时元模型。"
+#~ msgid ""
+#~ "<![CDATA[public class Person {\n"
+#~ " private java.util.Date birthday;\n"
+#~ " private Name name;\n"
+#~ " private String key;\n"
+#~ " public String getKey() {\n"
+#~ " return key;\n"
+#~ " }\n"
+#~ " private void setKey(String key) {\n"
+#~ " this.key=key;\n"
+#~ " }\n"
+#~ " public java.util.Date getBirthday() {\n"
+#~ " return birthday;\n"
+#~ " }\n"
+#~ " public void setBirthday(java.util.Date birthday) {\n"
+#~ " this.birthday = birthday;\n"
+#~ " }\n"
+#~ " public Name getName() {\n"
+#~ " return name;\n"
+#~ " }\n"
+#~ " public void setName(Name name) {\n"
+#~ " this.name = name;\n"
+#~ " }\n"
+#~ " ......\n"
+#~ " ......\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[public class Person {\n"
+#~ " private java.util.Date birthday;\n"
+#~ " private Name name;\n"
+#~ " private String key;\n"
+#~ " public String getKey() {\n"
+#~ " return key;\n"
+#~ " }\n"
+#~ " private void setKey(String key) {\n"
+#~ " this.key=key;\n"
+#~ " }\n"
+#~ " public java.util.Date getBirthday() {\n"
+#~ " return birthday;\n"
+#~ " }\n"
+#~ " public void setBirthday(java.util.Date birthday) {\n"
+#~ " this.birthday = birthday;\n"
+#~ " }\n"
+#~ " public Name getName() {\n"
+#~ " return name;\n"
+#~ " }\n"
+#~ " public void setName(Name name) {\n"
+#~ " this.name = name;\n"
+#~ " }\n"
+#~ " ......\n"
+#~ " ......\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[public class Name {\n"
+#~ " char initial;\n"
+#~ " String first;\n"
+#~ " String last;\n"
+#~ " public String getFirst() {\n"
+#~ " return first;\n"
+#~ " }\n"
+#~ " void setFirst(String first) {\n"
+#~ " this.first = first;\n"
+#~ " }\n"
+#~ " public String getLast() {\n"
+#~ " return last;\n"
+#~ " }\n"
+#~ " void setLast(String last) {\n"
+#~ " this.last = last;\n"
+#~ " }\n"
+#~ " public char getInitial() {\n"
+#~ " return initial;\n"
+#~ " }\n"
+#~ " void setInitial(char initial) {\n"
+#~ " this.initial = initial;\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[public class Name {\n"
+#~ " char initial;\n"
+#~ " String first;\n"
+#~ " String last;\n"
+#~ " public String getFirst() {\n"
+#~ " return first;\n"
+#~ " }\n"
+#~ " void setFirst(String first) {\n"
+#~ " this.first = first;\n"
+#~ " }\n"
+#~ " public String getLast() {\n"
+#~ " return last;\n"
+#~ " }\n"
+#~ " void setLast(String last) {\n"
+#~ " this.last = last;\n"
+#~ " }\n"
+#~ " public char getInitial() {\n"
+#~ " return initial;\n"
+#~ " }\n"
+#~ " void setInitial(char initial) {\n"
+#~ " this.initial = initial;\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"eg.Person\"
table=\"person\">\n"
+#~ " <id name=\"Key\" column=\"pid\"
type=\"string\">\n"
+#~ " <generator class=\"uuid\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"birthday\"
type=\"date\"/>\n"
+#~ " <component name=\"Name\" class=\"eg.Name\">
<!-- class attribute "
+#~ "optional -->\n"
+#~ " <property name=\"initial\"/>\n"
+#~ " <property name=\"first\"/>\n"
+#~ " <property name=\"last\"/>\n"
+#~ " </component>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"eg.Person\"
table=\"person\">\n"
+#~ " <id name=\"Key\" column=\"pid\"
type=\"string\">\n"
+#~ " <generator class=\"uuid\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"birthday\"
type=\"date\"/>\n"
+#~ " <component name=\"Name\" class=\"eg.Name\">
<!-- class attribute "
+#~ "optional -->\n"
+#~ " <property name=\"initial\"/>\n"
+#~ " <property name=\"first\"/>\n"
+#~ " <property name=\"last\"/>\n"
+#~ " </component>\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"eg.Person\"
table=\"person\">\n"
+#~ " <id name=\"Key\" column=\"pid\"
type=\"string\">\n"
+#~ " <generator class=\"uuid\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"birthday\"
type=\"date\"/>\n"
+#~ " <component name=\"Name\" class=\"eg.Name\"
unique=\"true\">\n"
+#~ " <parent name=\"namedPerson\"/> <!-- reference back to
the Person "
+#~ "-->\n"
+#~ " <property name=\"initial\"/>\n"
+#~ " <property name=\"first\"/>\n"
+#~ " <property name=\"last\"/>\n"
+#~ " </component>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"eg.Person\"
table=\"person\">\n"
+#~ " <id name=\"Key\" column=\"pid\"
type=\"string\">\n"
+#~ " <generator class=\"uuid\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"birthday\"
type=\"date\"/>\n"
+#~ " <component name=\"Name\" class=\"eg.Name\"
unique=\"true\">\n"
+#~ " <parent name=\"namedPerson\"/> <!-- reference back to
the Person "
+#~ "-->\n"
+#~ " <property name=\"initial\"/>\n"
+#~ " <property name=\"first\"/>\n"
+#~ " <property name=\"last\"/>\n"
+#~ " </component>\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<set name=\"someNames\" table=\"some_names\"
lazy=\"true\">\n"
+#~ " <key column=\"id\"/>\n"
+#~ " <composite-element class=\"eg.Name\"> <!-- class
attribute required --"
+#~ ">\n"
+#~ " <property name=\"initial\"/>\n"
+#~ " <property name=\"first\"/>\n"
+#~ " <property name=\"last\"/>\n"
+#~ " </composite-element>\n"
+#~ "</set>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<set name=\"someNames\" table=\"some_names\"
lazy=\"true\">\n"
+#~ " <key column=\"id\"/>\n"
+#~ " <composite-element class=\"eg.Name\"> <!-- class
attribute required --"
+#~ ">\n"
+#~ " <property name=\"initial\"/>\n"
+#~ " <property name=\"first\"/>\n"
+#~ " <property name=\"last\"/>\n"
+#~ " </composite-element>\n"
+#~ "</set>]]>"
+#, fuzzy
#~ msgid ""
-#~ "(Note that the <literal><column></literal> tag is an
alternative to "
-#~ "the <literal>column</literal> attribute everywhere.)"
+#~ "<![CDATA[<class name=\"eg.Order\" .... >\n"
+#~ " ....\n"
+#~ " <set name=\"purchasedItems\" table=\"purchase_items\"
lazy=\"true\">\n"
+#~ " <key column=\"order_id\">\n"
+#~ " <composite-element class=\"eg.Purchase\">\n"
+#~ " <property name=\"purchaseDate\"/>\n"
+#~ " <property name=\"price\"/>\n"
+#~ " <property name=\"quantity\"/>\n"
+#~ " <many-to-one name=\"item\"
class=\"eg.Item\"/> <!-- class "
+#~ "attribute is optional -->\n"
+#~ " </composite-element>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
#~ msgstr ""
-#~
"(注意在各个地方<literal><column></literal>标签都是<literal>column</"
-#~ "literal>属性的替代写法。)"
+#~ "<class name=\"eg.Order\" .... >\n"
+#~ " ....\n"
+#~ " <set name=\"purchasedItems\"
table=\"purchase_items\" lazy=\"true"
+#~ "\">\n"
+#~ " <key column=\"order_id\">\n"
+#~ " <composite-element
class=\"eg.Purchase\">\n"
+#~ " <property name=\"purchaseDate\"/>\n"
+#~ " <property name=\"price\"/>\n"
+#~ " <property name=\"quantity\"/>\n"
+#~ " <many-to-one name=\"item\"
class=\"eg.Item\"/> <!-- "
+#~ "class attribute is optional -->\n"
+#~ " </composite-element>\n"
+#~ " </set>\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"eg.Order\" .... >\n"
+#~ " ....\n"
+#~ " <set name=\"purchasedItems\" table=\"purchase_items\"
lazy=\"true\">\n"
+#~ " <key column=\"order_id\">\n"
+#~ " <composite-element class=\"eg.OrderLine\">\n"
+#~ " <many-to-one name=\"purchaseDetails
class=\"eg.Purchase\"/>\n"
+#~ " <many-to-one name=\"item\"
class=\"eg.Item\"/>\n"
+#~ " </composite-element>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"eg.Order\" .... >\n"
+#~ " ....\n"
+#~ " <set name=\"purchasedItems\"
table=\"purchase_items\" lazy=\"true"
+#~ "\">\n"
+#~ " <key column=\"order_id\">\n"
+#~ " <composite-element
class=\"eg.OrderLine\">\n"
+#~ " <many-to-one name=\"purchaseDetails
class=\"eg.Purchase\"/"
+#~ ">\n"
+#~ " <many-to-one name=\"item\"
class=\"eg.Item\"/>\n"
+#~ " </composite-element>\n"
+#~ " </set>\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"OrderLine\">\n"
+#~ " \n"
+#~ " <composite-id name=\"id\"
class=\"OrderLineId\">\n"
+#~ " <key-property name=\"lineId\"/>\n"
+#~ " <key-property name=\"orderId\"/>\n"
+#~ " <key-property name=\"customerId\"/>\n"
+#~ " </composite-id>\n"
+#~ " \n"
+#~ " <property name=\"name\"/>\n"
+#~ " \n"
+#~ " <many-to-one name=\"order\" class=\"Order\"\n"
+#~ " insert=\"false\" update=\"false\">\n"
+#~ " <column name=\"orderId\"/>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " </many-to-one>\n"
+#~ " ....\n"
+#~ " \n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"OrderLine\">\n"
+#~ " \n"
+#~ " <composite-id name=\"id\"
class=\"OrderLineId\">\n"
+#~ " <key-property name=\"lineId\"/>\n"
+#~ " <key-property name=\"orderId\"/>\n"
+#~ " <key-property name=\"customerId\"/>\n"
+#~ " </composite-id>\n"
+#~ " \n"
+#~ " <property name=\"name\"/>\n"
+#~ " \n"
+#~ " <many-to-one name=\"order\"
class=\"Order\"\n"
+#~ " insert=\"false\"
update=\"false\">\n"
+#~ " <column name=\"orderId\"/>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " </many-to-one>\n"
+#~ " ....\n"
+#~ " \n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"orderLine\"
class=\"OrderLine\">\n"
+#~ "<!-- the \"class\" attribute is optional, as usual -->\n"
+#~ " <column name=\"lineId\"/>\n"
+#~ " <column name=\"orderId\"/>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ "</many-to-one>]]>"
+#~ msgstr ""
+#~ "<many-to-one name=\"orderLine\"
class=\"OrderLine\">\n"
+#~ "<!-- the \"class\" attribute is optional, as usual
-->\n"
+#~ " <column name=\"lineId\"/>\n"
+#~ " <column name=\"orderId\"/>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ "</many-to-one>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<set name=\"undeliveredOrderLines\">\n"
+#~ " <key column name=\"warehouseId\"/>\n"
+#~ " <many-to-many class=\"OrderLine\">\n"
+#~ " <column name=\"lineId\"/>\n"
+#~ " <column name=\"orderId\"/>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " </many-to-many>\n"
+#~ "</set>]]>"
+#~ msgstr ""
+#~ "<set name=\"undeliveredOrderLines\">\n"
+#~ " <key column name=\"warehouseId\"/>\n"
+#~ " <many-to-many class=\"OrderLine\">\n"
+#~ " <column name=\"lineId\"/>\n"
+#~ " <column name=\"orderId\"/>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " </many-to-many>\n"
+#~ "</set>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<set name=\"orderLines\"
inverse=\"true\">\n"
+#~ " <key>\n"
+#~ " <column name=\"orderId\"/>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " </key>\n"
+#~ " <one-to-many class=\"OrderLine\"/>\n"
+#~ "</set>]]>"
+#~ msgstr ""
+#~ "<set name=\"orderLines\"
inverse=\"true\">\n"
+#~ " <key>\n"
+#~ " <column name=\"orderId\"/>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " </key>\n"
+#~ " <one-to-many class=\"OrderLine\"/>\n"
+#~ "</set>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"OrderLine\">\n"
+#~ " ....\n"
+#~ " ....\n"
+#~ " <list name=\"deliveryAttempts\">\n"
+#~ " <key> <!-- a collection inherits the composite key type
-->\n"
+#~ " <column name=\"lineId\"/>\n"
+#~ " <column name=\"orderId\"/>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " </key>\n"
+#~ " <list-index column=\"attemptId\"
base=\"1\"/>\n"
+#~ " <composite-element class=\"DeliveryAttempt\">\n"
+#~ " ...\n"
+#~ " </composite-element>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"OrderLine\">\n"
+#~ " ....\n"
+#~ " ....\n"
+#~ " <list name=\"deliveryAttempts\">\n"
+#~ " <key> <!-- a collection inherits the composite
key "
+#~ "type -->\n"
+#~ " <column name=\"lineId\"/>\n"
+#~ " <column name=\"orderId\"/>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " </key>\n"
+#~ " <list-index column=\"attemptId\"
base=\"1\"/>\n"
+#~ " <composite-element
class=\"DeliveryAttempt\">\n"
+#~ " ...\n"
+#~ " </composite-element>\n"
+#~ " </set>\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<dynamic-component name=\"userAttributes\">\n"
+#~ " <property name=\"foo\" column=\"FOO\"
type=\"string\"/>\n"
+#~ " <property name=\"bar\" column=\"BAR\"
type=\"integer\"/>\n"
+#~ " <many-to-one name=\"baz\" class=\"Baz\"
column=\"BAZ_ID\"/>\n"
+#~ "</dynamic-component>]]>"
+#~ msgstr ""
+#~ "<dynamic-component name=\"userAttributes\">\n"
+#~ " <property name=\"foo\" column=\"FOO\"
type=\"string\"/>\n"
+#~ " <property name=\"bar\" column=\"BAR\"
type=\"integer\"/>\n"
+#~ " <many-to-one name=\"baz\" class=\"Baz\"
column=\"BAZ_ID\"/>\n"
+#~ "</dynamic-component>"
+
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/configuration.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/configuration.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/configuration.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,3789 +1,1961 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-16 18:47+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2010-01-08T04:07:18\n"
+"PO-Revision-Date: 2010-01-11 10:39+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: configuration.xml:29
#, no-c-format
msgid "Configuration"
msgstr "配置"
#. Tag: para
-#: configuration.xml:31
-#, fuzzy, 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 "
-"<literal>hibernate.properties</literal> file in
<literal>etc/</literal> that "
-"displays the various options. Simply put the example file in your classpath "
-"and customize it to suit your needs."
-msgstr ""
-"由于Hibernate是为了能在各种不同环境下工作而设计的, 因此存在着大量的配置参数. "
-"幸运的是多数配置参数都 有比较直观的默认值, 并有随Hibernate一同分发的配置样例"
-"<literal>hibernate.properties</literal>
(位于<literal>etc/</literal>)来展示各"
-"种配置选项. 所需做的仅仅是将这个样例文件复制到类路径 (classpath)下并做一些自"
-"定义的修改."
+#, 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
<literal>hibernate.properties</literal> file in
<literal>etc/</literal> that displays the various options. Simply put the
example file in your classpath and customize it to suit your needs."
+msgstr "由于 Hibernate 是为了能在各种不同环境下工作而设计的,因此存在着大量的配置参数。幸运的是多数配置参数都有比较直观的默认值,并有随
Hibernate 一同分发的配置样例 <literal>hibernate.properties</literal>(位于
<literal>etc/</literal>)来展示各种配置选项。所需做的仅仅是将这个样例文件复制到类路径(classpath)下并进行定制。"
#. Tag: title
-#: configuration.xml:40
#, no-c-format
msgid "Programmatic configuration"
msgstr "可编程的配置方式"
#. Tag: para
-#: configuration.xml:42
-#, fuzzy, no-c-format
-msgid ""
-"An instance of <classname>org.hibernate.cfg.Configuration</classname>
"
-"represents an entire set of mappings of an application's Java types to an
"
-"SQL database. The
<classname>org.hibernate.cfg.Configuration</classname> is "
-"used to build an immutable
<interfacename>org.hibernate.SessionFactory</"
-"interfacename>. The mappings are compiled from various XML mapping files."
-msgstr ""
-"一个<literal>org.hibernate.cfg.Configuration</literal>实例代表了一个应用程序"
-"中Java类型 到SQL数据库映射的完整集合. <literal>Configuration</literal>被用来"
-"构建一个(不可变的 (immutable))<literal>SessionFactory</literal>. 映射定义则由"
-"不同的XML映射定义文件编译而来."
+#, no-c-format
+msgid "An instance of
<classname>org.hibernate.cfg.Configuration</classname> represents an entire
set of mappings of an application's Java types to an SQL database. The
<classname>org.hibernate.cfg.Configuration</classname> is used to build an
immutable <interfacename>org.hibernate.SessionFactory</interfacename>. The
mappings are compiled from various XML mapping files."
+msgstr "<literal>org.hibernate.cfg.Configuration</literal> 实例代表了一个应用程序中
Java 类型到SQL数据库映射的完整集合。<classname>org.hibernate.cfg.Configuration</classname>
被用来构建一个(不可变的(immutable))<interfacename>org.hibernate.SessionFactory</interfacename>。映射定义则由不同的
XML 映射定义文件编译而来。"
#. Tag: para
-#: configuration.xml:49
-#, fuzzy, no-c-format
-msgid ""
-"You can obtain a <classname>org.hibernate.cfg.Configuration</classname>
"
-"instance by instantiating it directly and specifying XML mapping documents. "
-"If the mapping files are in the classpath, use
<literal>addResource()</"
-"literal>. For example:"
-msgstr ""
-"你可以直接实例化<literal>Configuration</literal>来获取一个实例,并为它指定XML"
-"映射定义 文件. 如果映射定 义文件在类路径(classpath)中, 请使用"
-"<literal>addResource()</literal>:"
-
-#. Tag: programlisting
-#: configuration.xml:55
#, no-c-format
-msgid ""
-"<![CDATA[Configuration cfg = new Configuration()\n"
-" .addResource(\"Item.hbm.xml\")\n"
-" .addResource(\"Bid.hbm.xml\");]]>"
-msgstr ""
+msgid "You can obtain a
<classname>org.hibernate.cfg.Configuration</classname> instance by
instantiating it directly and specifying XML mapping documents. If the mapping files are
in the classpath, use <literal>addResource()</literal>. For example:"
+msgstr "你可以直接实例化 <classname>org.hibernate.cfg.Configuration</classname>
来获取一个实例,并为它指定 XML 映射定义文件。如果映射定义文件在类路径(classpath)中,请使用
<literal>addResource()</literal>。例如:"
#. Tag: para
-#: configuration.xml:57
-#, fuzzy, 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帮你寻找映射定"
-"义文件:"
-
-#. Tag: programlisting
-#: configuration.xml:62
#, no-c-format
-msgid ""
-"<![CDATA[Configuration cfg = new Configuration()\n"
-" .addClass(org.hibernate.auction.Item.class)\n"
-" .addClass(org.hibernate.auction.Bid.class);]]>"
-msgstr ""
+msgid "An alternative way is to specify the mapped class and allow Hibernate to find
the mapping document for you:"
+msgstr "一个替代方法(有时是更好的选择)是,指定被映射的类,让 Hibernate 帮你寻找映射定义文件: "
#. Tag: para
-#: configuration.xml:64
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate will then search for mapping files named
<filename>/org/hibernate/"
-"auction/Item.hbm.xml</filename> and
<filename>/org/hibernate/auction/Bid.hbm."
-"xml</filename> in the classpath. This approach eliminates any hardcoded
"
-"filenames."
-msgstr ""
-"Hibernate将会在类路径(classpath)中寻找名字为 <literal>/org/hibernate/auction/"
-"Item.hbm.xml</literal>和
<literal>/org/hibernate/auction/Bid.hbm.xml</"
-"literal>映射定义文件. 这种方式消除了任何对文件名的硬编码(hardcoded)."
+#, no-c-format
+msgid "Hibernate will then search for mapping files named
<filename>/org/hibernate/auction/Item.hbm.xml</filename> and
<filename>/org/hibernate/auction/Bid.hbm.xml</filename> in the classpath. This
approach eliminates any hardcoded filenames."
+msgstr "Hibernate 将会在类路径(classpath)中寻找名字为
<filename>/org/hibernate/auction/Item.hbm.xml</filename> 和
<filename>/org/hibernate/auction/Bid.hbm.xml</filename>
映射定义文件。这种方式消除了任何对文件名的硬编码(hardcoded)。"
#. Tag: para
-#: configuration.xml:70
-#, fuzzy, no-c-format
-msgid ""
-"A <classname>org.hibernate.cfg.Configuration</classname> also allows
you to "
-"specify configuration properties. For example:"
-msgstr "<literal>Configuration</literal>也允许你指定配置属性:"
-
-#. Tag: programlisting
-#: configuration.xml:75
#, no-c-format
-msgid ""
-"<![CDATA[Configuration cfg = new Configuration()\n"
-" .addClass(org.hibernate.auction.Item.class)\n"
-" .addClass(org.hibernate.auction.Bid.class)\n"
-" .setProperty(\"hibernate.dialect\",
\"org.hibernate.dialect."
-"MySQLInnoDBDialect\")\n"
-" .setProperty(\"hibernate.connection.datasource\",
\"java:comp/env/jdbc/"
-"test\")\n"
-" .setProperty(\"hibernate.order_updates\",
\"true\");]]>"
-msgstr ""
+msgid "A <classname>org.hibernate.cfg.Configuration</classname> also
allows you to specify configuration properties. For example:"
+msgstr "<classname>org.hibernate.cfg.Configuration</classname>>
也允许你指定配置属性。例如:"
#. Tag: para
-#: configuration.xml:77
-#, fuzzy, no-c-format
-msgid ""
-"This is not the only way to pass configuration properties to Hibernate. Some
"
-"alternative options include:"
-msgstr "当然这不是唯一的传递Hibernate配置属性的方式, 其他可选方式还包括:"
+#, no-c-format
+msgid "This is not the only way to pass configuration properties to Hibernate. Some
alternative options include:"
+msgstr "当然这不是唯一的传递 Hibernate 配置属性的方式,其他可选方式还包括: "
#. Tag: para
-#: configuration.xml:84
-#, fuzzy, no-c-format
-msgid ""
-"Pass an instance of <classname>java.util.Properties</classname> to
"
-"<literal>Configuration.setProperties()</literal>."
-msgstr ""
-"传一个<literal>java.util.Properties</literal>实例给
<literal>Configuration."
-"setProperties()</literal>."
+#, no-c-format
+msgid "Pass an instance of <classname>java.util.Properties</classname>
to <literal>Configuration.setProperties()</literal>."
+msgstr "传一个 <classname>java.util.Properties</classname> 实例给
<literal>Configuration.setProperties()</literal>。"
#. Tag: para
-#: configuration.xml:90
-#, fuzzy, no-c-format
-msgid ""
-"Place a file named <filename>hibernate.properties</filename> in a root
"
-"directory of the classpath."
-msgstr ""
-"将<literal>hibernate.properties</literal>放置在类路径(classpath)的根目录下 "
-"(root directory)."
+#, no-c-format
+msgid "Place a file named <filename>hibernate.properties</filename> in a
root directory of the classpath."
+msgstr "将 <filename>hibernate.properties</filename>
放置在类路径(classpath)的根目录下(root directory)。"
#. Tag: para
-#: configuration.xml:95
#, no-c-format
-msgid ""
-"Set <literal>System</literal> properties using <literal>java
-"
-"Dproperty=value</literal>."
-msgstr ""
-"通过<literal>java -Dproperty=value</literal>来设置系统
(<literal>System</"
-"literal>)属性."
+msgid "Set <literal>System</literal> properties using
<literal>java -Dproperty=value</literal>."
+msgstr "通过 <literal>java -Dproperty=value</literal>
来设置系统(<literal>System</literal>)属性。"
#. Tag: para
-#: configuration.xml:100
-#, fuzzy, no-c-format
-msgid ""
-"Include <literal><property></literal> elements in
<literal>hibernate."
-"cfg.xml</literal> (this is discussed later)."
-msgstr ""
-"在<literal>hibernate.cfg.xml</literal>中加入元素
<literal><property></"
-"literal> (稍后讨论)."
+#, no-c-format
+msgid "Include <literal><property></literal> elements in
<literal>hibernate.cfg.xml</literal> (this is discussed later)."
+msgstr "在 <literal>hibernate.cfg.xml</literal> 中加入元素
<literal><property></literal>(稍后讨论)。 "
#. Tag: para
-#: configuration.xml:107
#, no-c-format
-msgid ""
-"If you want to get started
quickly<filename>hibernate.properties</filename> "
-"is the easiest approach."
-msgstr ""
+msgid "If you want to get started
quickly<filename>hibernate.properties</filename> is the easiest
approach."
+msgstr "如果你想快速上路,<filename>hibernate.properties</filename>
就是最容易的途径。"
#. Tag: para
-#: configuration.xml:111
-#, fuzzy, no-c-format
-msgid ""
-"The <classname>org.hibernate.cfg.Configuration</classname> is intended
as a "
-"startup-time object that will be discarded once a
<literal>SessionFactory</"
-"literal> is created."
-msgstr ""
-"<literal>Configuration</literal>实例被设计成启动期间(startup-time)对象, 一"
-"旦<literal>SessionFactory</literal>创建完成它就被丢弃了."
+#, no-c-format
+msgid "The <classname>org.hibernate.cfg.Configuration</classname> is
intended as a startup-time object that will be discarded once a
<literal>SessionFactory</literal> is created."
+msgstr "<classname>org.hibernate.cfg.Configuration</classname>
实例被设计成启动期间(startup-time)对象,一旦 <literal>SessionFactory</literal>
创建完成它就被丢弃了。"
#. Tag: title
-#: configuration.xml:119
#, no-c-format
msgid "Obtaining a SessionFactory"
-msgstr "获得SessionFactory"
+msgstr "获得 SessionFactory"
#. Tag: para
-#: configuration.xml:121
-#, fuzzy, no-c-format
-msgid ""
-"When all mappings have been parsed by the
<classname>org.hibernate.cfg."
-"Configuration</classname>, the application must obtain a factory for "
-"<interfacename>org.hibernate.Session</interfacename> instances. This
factory "
-"is intended to be shared by all application threads:"
-msgstr ""
-"当所有映射定义被<literal>Configuration</literal>解析后, 应用程序必须获得一个"
-"用于构造<literal>Session</literal>实例的工厂. 这个工厂将被应用程序的所有线程"
-"共享:"
-
-#. Tag: programlisting
-#: configuration.xml:127
#, no-c-format
-msgid "<![CDATA[SessionFactory sessions = cfg.buildSessionFactory();]]>"
-msgstr ""
+msgid "When all mappings have been parsed by the
<classname>org.hibernate.cfg.Configuration</classname>, the application must
obtain a factory for <classname>org.hibernate.Session</classname> instances.
This factory is intended to be shared by all application threads:"
+msgstr "当所有映射定义被 <classname>org.hibernate.cfg.Configuration</classname>
解析后,应用程序必须获得一个用于构造 <interfacename>org.hibernate.Session</interfacename>
实例的工厂。这个工厂将被应用程序的所有线程共享: "
#. Tag: para
-#: configuration.xml:129
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate does allow your application to instantiate more than one "
-"<interfacename>org.hibernate.SessionFactory</interfacename>. This is
useful "
-"if you are using more than one database."
-msgstr ""
-"Hibernate允许你的应用程序创建多个<literal>SessionFactory</literal>实例. 这对 "
-"使用多个数据库的应用来说很有用."
+#, no-c-format
+msgid "Hibernate does allow your application to instantiate more than one
<classname>org.hibernate.SessionFactory</classname>. This is useful if you are
using more than one database."
+msgstr "Hibernate 允许你的应用程序创建多个
<interfacename>org.hibernate.SessionFactory</interfacename> 实例。这对
使用多个数据库的应用来说很有用。 "
#. Tag: title
-#: configuration.xml:138
#, no-c-format
msgid "JDBC connections"
-msgstr "JDBC连接"
+msgstr "JDBC 连接"
#. Tag: para
-#: configuration.xml:140
-#, fuzzy, no-c-format
-msgid ""
-"It is advisable to have the
<interfacename>org.hibernate.SessionFactory</"
-"interfacename> create and pool JDBC connections for you. If you take this
"
-"approach, opening a
<interfacename>org.hibernate.Session</interfacename> is "
-"as simple as:"
-msgstr ""
-"通常你希望<literal>SessionFactory</literal>来为你创建和缓存(pool)JDBC连接. 如"
-"果你采用这种方式, 只需要如下例所示那样,打开一个<literal>Session</literal>:"
-
-#. Tag: programlisting
-#: configuration.xml:146
#, no-c-format
-msgid ""
-"<![CDATA[Session session = sessions.openSession(); // open a new
Session]]>"
-msgstr ""
+msgid "It is advisable to have the
<interfacename>org.hibernate.SessionFactory</interfacename> create and pool
JDBC connections for you. If you take this approach, opening a
<interfacename>org.hibernate.Session</interfacename> is as simple as:"
+msgstr "通常你希望
<interfacename>org.hibernate.SessionFactory</interfacename> 来为你创建和缓存(pool)JDBC
连接。如果你采用这种方式,只需要如下例所示那样,打开一个
<interfacename>org.hibernate.Session</interfacename>:"
#. Tag: para
-#: configuration.xml:148
-#, fuzzy, 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连接."
+#, 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 连接。 "
#. Tag: para
-#: configuration.xml:153
-#, fuzzy, 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
<classname>org.hibernate.cfg.Environment</classname>. "
-"The most important settings for JDBC connection configuration are outlined "
-"below."
-msgstr ""
-"为了使这种方式工作起来, 我们需要向Hibernate传递一些JDBC连接的属性. 所有"
-"Hibernate属性的名字和语义都在<literal>org.hibernate.cfg.Environment</literal>"
-"中定义. 我们现在将描述JDBC连接配置中最重要的设置."
+#, 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 <classname>org.hibernate.cfg.Environment</classname>. The most important
settings for JDBC connection configuration are outlined below."
+msgstr "为了使这种方式工作起来,我们需要向 Hibernate 传递一些 JDBC 连接的属性。所有 Hibernate 属性的名字和语义都在
<classname>org.hibernate.cfg.Environment</classname> 中定义。我们现在将描述 JDBC
连接配置中最重要的设置。"
#. Tag: para
-#: configuration.xml:159
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate will obtain and pool connections using <classname>java.sql."
-"DriverManager</classname> if you set the following properties:"
-msgstr ""
-"如果你设置如下属性,Hibernate将使用<literal>java.sql.DriverManager</literal>"
-"来获得(和缓存)JDBC连接 :"
+#, no-c-format
+msgid "Hibernate will obtain and pool connections using
<classname>java.sql.DriverManager</classname> if you set the following
properties:"
+msgstr "如果你设置如下属性,Hibernate 将使用
<classname>java.sql.DriverManager</classname> 来获得(和缓存)JDBC 连接:"
#. Tag: title
-#: configuration.xml:165
#, no-c-format
msgid "Hibernate JDBC Properties"
-msgstr "Hibernate JDBC属性"
+msgstr "Hibernate JDBC 属性"
-#. Tag: entry
-#: configuration.xml:171 configuration.xml:257 configuration.xml:353
-#: configuration.xml:546 configuration.xml:741 configuration.xml:848
-#: configuration.xml:936
+#. Tag: para
#, no-c-format
msgid "Property name"
msgstr "属性名"
-#. Tag: entry
-#: configuration.xml:172 configuration.xml:258 configuration.xml:354
-#: configuration.xml:547 configuration.xml:742 configuration.xml:849
-#: configuration.xml:937
+#. Tag: para
#, no-c-format
msgid "Purpose"
msgstr "用途"
-#. Tag: property
-#: configuration.xml:178
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.driver_class"
-msgstr "hibernate.connection.driver_class"
+msgid "<property>hibernate.connection.driver_class</property>"
+msgstr "<property>hibernate.connection.driver_class</property>"
-#. Tag: emphasis
-#: configuration.xml:181
+#. Tag: para
#, no-c-format
-msgid "JDBC driver class"
-msgstr "jdbc驱动类"
+msgid "<emphasis>JDBC driver class</emphasis>"
+msgstr "<emphasis>JDBC 驱动类</emphasis>"
-#. Tag: property
-#: configuration.xml:186
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.url"
-msgstr "hibernate.connection.url"
+msgid "<property>hibernate.connection.url</property>"
+msgstr "<property>hibernate.connection.url</property>"
-#. Tag: emphasis
-#: configuration.xml:189
+#. Tag: para
#, no-c-format
-msgid "JDBC URL"
-msgstr "jdbc URL"
+msgid "<emphasis>JDBC URL</emphasis>"
+msgstr "<emphasis>JDBC URL</emphasis>"
-#. Tag: property
-#: configuration.xml:194 configuration.xml:288
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.username"
-msgstr "hibernate.connection.username"
+msgid "<property>hibernate.connection.username</property>"
+msgstr "<property>hibernate.connection.username</property>"
-#. Tag: emphasis
-#: configuration.xml:197
+#. Tag: para
#, no-c-format
-msgid "database user"
-msgstr "数据库用户"
+msgid "<emphasis>database user</emphasis>"
+msgstr "<emphasis>数据库用户</emphasis>(可选) "
-#. Tag: property
-#: configuration.xml:202 configuration.xml:296
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.password"
-msgstr "hibernate.connection.password"
+msgid "<property>hibernate.connection.password</property>"
+msgstr "<property>hibernate.connection.password</property>"
-#. Tag: emphasis
-#: configuration.xml:205
+#. Tag: para
#, no-c-format
-msgid "database user password"
-msgstr "数据库用户密码"
+msgid "<emphasis>database user password</emphasis>"
+msgstr "<emphasis>数据库密码</emphasis>(可选) "
-#. Tag: property
-#: configuration.xml:210
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.pool_size"
-msgstr "hibernate.connection.pool_size"
+msgid "<property>hibernate.connection.pool_size</property>"
+msgstr "<property>hibernate.connection.pool_size</property>"
-#. Tag: emphasis
-#: configuration.xml:213
+#. Tag: para
#, no-c-format
-msgid "maximum number of pooled connections"
-msgstr "连接池容量上限数目"
+msgid "<emphasis>maximum number of pooled connections</emphasis>"
+msgstr "<emphasis>连接池容量上限数目</emphasis>"
#. Tag: para
-#: configuration.xml:220
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate's own connection pooling algorithm is, however, quite rudimentary.
"
-"It is intended to help you get started and is <emphasis>not intended for use
"
-"in a production system</emphasis>, or even for performance testing. You
"
-"should use a third party pool for best performance and stability. Just "
-"replace the <property>hibernate.connection.pool_size</property>
property "
-"with connection pool specific settings. This will turn off Hibernate's "
-"internal pool. For example, you might like to use c3p0."
-msgstr ""
-"但Hibernate自带的连接池算法相当不成熟. 它只是为了让你快些上手<emphasis>,并不"
-"适合用于产品系统</emphasis>或性能测试中。 出于最佳性能和稳定性考虑你应该使用"
-"第三方的连接池。只需要用特定连接池的设置替换 <literal>hibernate.connection."
-"pool_size</literal>即可。这将关闭Hibernate自带的连接池. 例如, 你可能会想用"
-"C3P0."
+#, no-c-format
+msgid "Hibernate's own connection pooling algorithm is, however, quite
rudimentary. It is intended to help you get started and is <emphasis>not intended
for use in a production system</emphasis>, or even for performance testing. You
should use a third party pool for best performance and stability. Just replace the
<property>hibernate.connection.pool_size</property> property with connection
pool specific settings. This will turn off Hibernate's internal pool. For example, you
might like to use c3p0."
+msgstr "但 Hibernate
自带的连接池算法相当不成熟。它只是为了让你快些上手<emphasis>,并不适合用于产品系统</emphasis>或性能测试中。
出于最佳性能和稳定性考虑你应该使用第三方的连接池。只需要用特定连接池的设置替换
<literal>hibernate.connection.pool_size</literal> 即可。这将关闭 Hibernate
自带的连接池。例如,你可能会想用 C3P0。 "
#. Tag: para
-#: configuration.xml:230
-#, fuzzy, no-c-format
-msgid ""
-"C3P0 is an open source JDBC connection pool distributed along with Hibernate
"
-"in the <filename>lib</filename> directory. Hibernate will use its
"
-"<classname>org.hibernate.connection.C3P0ConnectionProvider</classname>
for "
-"connection pooling if you set <property>hibernate.c3p0.*</property>
"
-"properties. If you would like to use Proxool, refer to the packaged "
-"<filename>hibernate.properties</filename> and the Hibernate web site
for "
-"more information."
-msgstr ""
-"C3P0是一个随Hibernate一同分发的开源的JDBC连接池, 它位于<literal>lib</literal>"
-"目录下。 如果你设置了<literal>hibernate.c3p0.*</literal>相关的属性, Hibernate"
-"将使用 <literal>C3P0ConnectionProvider</literal>来缓存JDBC连接. 如果你更原意"
-"使用Proxool, 请参考发 行包中的<literal>hibernate.properties</literal>并到"
-"Hibernate网站获取更多的信息."
+#, no-c-format
+msgid "C3P0 is an open source JDBC connection pool distributed along with Hibernate
in the <filename>lib</filename> directory. Hibernate will use its
<classname>org.hibernate.connection.C3P0ConnectionProvider</classname> for
connection pooling if you set <property>hibernate.c3p0.*</property>
properties. If you would like to use Proxool, refer to the packaged
<filename>hibernate.properties</filename> and the Hibernate web site for more
information."
+msgstr "C3P0 是一个随 Hibernate 一同分发的开源的 JDBC 连接池,它位于
<literal>lib</literal>目录下。 如果你设置了
<literal>hibernate.c3p0.*</literal> 相关的属性,Hibernate将使用
<literal>C3P0ConnectionProvider</literal> 来缓存 JDBC 连接。如果你更原意使用
Proxool,请参考发行包中的 <literal>hibernate.properties</literal> 并到 Hibernate
网站获取更多的信息。 "
#. Tag: para
-#: configuration.xml:238
-#, fuzzy, no-c-format
-msgid ""
-"The following is an example <filename>hibernate.properties</filename>
file "
-"for c3p0:"
-msgstr "这是一个使用C3P0的<literal>hibernate.properties</literal>样例文件:"
-
-#. Tag: programlisting
-#: configuration.xml:242
#, no-c-format
-msgid ""
-"<![CDATA[hibernate.connection.driver_class = org.postgresql.Driver\n"
-"hibernate.connection.url = jdbc:postgresql://localhost/mydatabase\n"
-"hibernate.connection.username = myuser\n"
-"hibernate.connection.password = secret\n"
-"hibernate.c3p0.min_size=5\n"
-"hibernate.c3p0.max_size=20\n"
-"hibernate.c3p0.timeout=1800\n"
-"hibernate.c3p0.max_statements=50\n"
-"hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]>"
-msgstr ""
+msgid "The following is an example
<filename>hibernate.properties</filename> file for c3p0:"
+msgstr "这是一个使用 C3P0 的 <literal>hibernate.properties</literal> 样例文件:
"
#. Tag: para
-#: configuration.xml:244
-#, fuzzy, no-c-format
-msgid ""
-"For use inside an application server, you should almost always configure "
-"Hibernate to obtain connections from an application server "
-"<interfacename>javax.sql.Datasource</interfacename> registered in JNDI.
You "
-"will need to set at least one of the following properties:"
-msgstr ""
-"为了能在应用程序服务器(application server)中使用Hibernate, 应当总是将"
-"Hibernate 配置成从注册在JNDI中的<literal>Datasource</literal>处获得连接,你至"
-"少需要设置下列属性中的一个:"
+#, no-c-format
+msgid "For use inside an application server, you should almost always configure
Hibernate to obtain connections from an application server
<interfacename>javax.sql.Datasource</interfacename> registered in JNDI. You
will need to set at least one of the following properties:"
+msgstr "为了能在应用程序服务器(application server)中使用 Hibernate,应当总是将 Hibernate 配置成从注册在 JNDI 中的
<literal>Datasource</literal> 处获得连接,你至少需要设置下列属性中的一个: "
#. Tag: title
-#: configuration.xml:251
#, no-c-format
msgid "Hibernate Datasource Properties"
-msgstr "Hibernate数据源属性"
+msgstr "Hibernate 数据源属性"
-#. Tag: property
-#: configuration.xml:264
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.datasource"
-msgstr "hibernate.connection.datasource"
+msgid "<property>hibernate.connection.datasource</property>"
+msgstr "<property>hibernate.connection.datasource</property>"
-#. Tag: emphasis
-#: configuration.xml:267
+#. Tag: para
#, no-c-format
-msgid "datasource JNDI name"
-msgstr "数据源JNDI名字"
+msgid "<emphasis>datasource JNDI name</emphasis>"
+msgstr "<emphasis>数据库用户</emphasis>(可选) "
-#. Tag: property
-#: configuration.xml:272
+#. Tag: para
#, no-c-format
-msgid "hibernate.jndi.url"
-msgstr "hibernate.jndi.url"
+msgid "<property>hibernate.jndi.url</property>"
+msgstr "<property>hibernate.jndi.url</property>"
-#. Tag: entry
-#: configuration.xml:274
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "<emphasis>URL of the JNDI provider</emphasis> (optional)"
-msgstr "JNDI提供者的URL"
+msgstr "<emphasis>JNDI 提供者的 URL</emphasis>(可选)"
-#. Tag: property
-#: configuration.xml:280
+#. Tag: para
#, no-c-format
-msgid "hibernate.jndi.class"
-msgstr "hibernate.jndi.class"
+msgid "<property>hibernate.jndi.class</property>"
+msgstr "<property>hibernate.jndi.class</property>"
-#. Tag: entry
-#: configuration.xml:282
+#. Tag: para
#, no-c-format
-msgid ""
-"<emphasis>class of the JNDI
<literal>InitialContextFactory</literal></"
-"emphasis> (optional)"
-msgstr ""
+msgid "<emphasis>class of the JNDI
<literal>InitialContextFactory</literal></emphasis> (optional)"
+msgstr "<emphasis>JNDI <literal>InitialContextFactory</literal>
类</emphasis>(可选)"
-#. Tag: entry
-#: configuration.xml:290
+#. Tag: para
#, no-c-format
msgid "<emphasis>database user</emphasis> (optional)"
-msgstr ""
+msgstr "<emphasis>数据库用户</emphasis>(可选)"
-#. Tag: entry
-#: configuration.xml:298
+#. Tag: para
#, no-c-format
msgid "<emphasis>database user password</emphasis> (optional)"
-msgstr ""
+msgstr "<emphasis>数据库密码</emphasis>(可选)"
#. Tag: para
-#: configuration.xml:306
-#, fuzzy, no-c-format
-msgid ""
-"Here is an example <filename>hibernate.properties</filename> file for
an "
-"application server provided JNDI datasource:"
-msgstr ""
-"这是一个使用应用程序服务器提供的JNDI数据源的<literal>hibernate.properties</"
-"literal>样例文件:"
-
-#. Tag: programlisting
-#: configuration.xml:311
#, no-c-format
-msgid ""
-"<![CDATA[hibernate.connection.datasource = java:/comp/env/jdbc/test\n"
-"hibernate.transaction.factory_class = \\\n"
-" org.hibernate.transaction.JTATransactionFactory\n"
-"hibernate.transaction.manager_lookup_class = \\\n"
-" org.hibernate.transaction.JBossTransactionManagerLookup\n"
-"hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]>"
-msgstr ""
+msgid "Here is an example <filename>hibernate.properties</filename> file
for an application server provided JNDI datasource:"
+msgstr "这是一个使用应用程序服务器提供的 JNDI 数据源的
<literal>hibernate.properties</literal> 样例文件: "
#. Tag: para
-#: configuration.xml:313
#, 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
-#: configuration.xml:318
-#, fuzzy, no-c-format
-msgid ""
-"Arbitrary connection properties can be given by prepending "
-"\"<literal>hibernate.connection</literal>\" to the connection
property name. "
-"For example, you can specify a <property>charSet</property> connection
"
-"property using
<property>hibernate.connection.charSet</property>."
-msgstr ""
-"任何连接(connection)属性的属性名都要以\"<literal>hibernate.connnection</"
-"literal>\"开头. 例如,
你可能会使用<literal>hibernate.connection.charSet</"
-"literal>来指定字符集<literal>charSet</literal>."
+#, no-c-format
+msgid "Arbitrary connection properties can be given by prepending
\"<literal>hibernate.connection</literal>\" to the connection
property name. For example, you can specify a <property>charSet</property>
connection property using
<property>hibernate.connection.charSet</property>."
+msgstr "任何连接(connection)属性的属性名都要以
\"<literal>hibernate.connnection</literal>\" 开头。例如,你可能会使用
<literal>hibernate.connection.charSet</literal> 来指定
<property>charSet</property> 连接属性。 "
#. Tag: para
-#: configuration.xml:324
-#, fuzzy, no-c-format
-msgid ""
-"You can define your own plugin strategy for obtaining JDBC connections by "
-"implementing the interface <interfacename>org.hibernate.connection."
-"ConnectionProvider</interfacename>, and specifying your custom "
-"implementation via the
<property>hibernate.connection.provider_class</"
-"property> property."
-msgstr ""
-"通过实现<literal>org.hibernate.connection.ConnectionProvider</literal>接口,"
-"你可以定义属于 你自己的获得JDBC连接的插件策略。通过设置<literal>hibernate."
-"connection.provider_class</literal>, 你可以选择一个自定义的实现."
+#, no-c-format
+msgid "You can define your own plugin strategy for obtaining JDBC connections by
implementing the interface
<interfacename>org.hibernate.connection.ConnectionProvider</interfacename>,
and specifying your custom implementation via the
<property>hibernate.connection.provider_class</property> property."
+msgstr "通过实现
<literal>org.hibernate.connection.ConnectionProvider</literal>
接口,你可以定义属于你自己的获得JDBC连接的插件策略。通过设置<literal>hibernate.connection.provider_class</literal>,你可以选择一个自定义的实现。
"
#. Tag: title
-#: configuration.xml:333
#, no-c-format
msgid "Optional configuration properties"
msgstr "可选的配置属性"
#. Tag: para
-#: configuration.xml:335
-#, fuzzy, 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在运行期的行为. 它们都是可选的, 并拥有适当的默认"
-"值."
+#, 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 在运行期的行为。它们都是可选的,并拥有适当的默认值。 "
-#. Tag: warning
-#: configuration.xml:341
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Some of these properties are \"system-level\"
only.</emphasis> "
-"System-level properties can be set only via <literal>java
-Dproperty=value</"
-"literal> or <filename>hibernate.properties</filename>. They "
-"<emphasis>cannot</emphasis> be set by the other techniques described
above."
-msgstr ""
-"<emphasis>警告: 其中一些属性是\"系统级(system-level)的\".</emphasis>
系统级属"
-"性只能通过<literal>java -Dproperty=value</literal>或
<literal>hibernate."
-"properties</literal>来设置,
而<emphasis>不能</emphasis>用上面描述的其他方法来"
-"设置."
+#. Tag: para
+#, no-c-format
+msgid "Some of these properties are system-level only. System-level properties can
be set only via <code>java -Dproperty=value</code> or
<filename>hibernate.properties</filename>. They
<emphasis>cannot</emphasis> be set by the other techniques described
above."
+msgstr "警告: 其中一些属性是\"系统级(system-level)的\"。系统级属性只能通过<literal>java
-Dproperty=value</literal> 或 <literal>hibernate.properties</literal>
来设置,而<emphasis>不能</emphasis>用上面描述的其他方法来设置。 "
#. Tag: title
-#: configuration.xml:347
#, no-c-format
msgid "Hibernate Configuration Properties"
-msgstr "Hibernate配置属性"
+msgstr "Hibernate 配置属性"
-#. Tag: property
-#: configuration.xml:360
+#. Tag: para
#, no-c-format
-msgid "hibernate.dialect"
-msgstr "hibernate.dialect"
+msgid "<property>hibernate.dialect</property>"
+msgstr "<property>hibernate.dialect</property>"
-#. Tag: entry
-#: configuration.xml:362
-#, fuzzy, no-c-format
-msgid ""
-"The classname of a Hibernate
<classname>org.hibernate.dialect.Dialect</"
-"classname> which allows Hibernate to generate SQL optimized for a particular
"
-"relational database."
-msgstr ""
-"一个Hibernate <placeholder-1/>类名允许Hibernate针对特定的关系数据库生成优化的"
-"SQL. <placeholder-2/>"
+#. Tag: para
+#, no-c-format
+msgid "The classname of a Hibernate
<classname>org.hibernate.dialect.Dialect</classname> which allows Hibernate to
generate SQL optimized for a particular relational database."
+msgstr "允许 Hibernate 针对特定的关系数据库生成优化的 SQL 的
<classname>org.hibernate.dialect.Dialect</classname> 的类名。"
#. Tag: para
-#: configuration.xml:365
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>full.classname.of."
-"Dialect</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>full.classname.of.Dialect</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>full.classname.of.Dialect</literal>
"
#. Tag: para
-#: configuration.xml:369
#, no-c-format
-msgid ""
-"In most cases Hibernate will actually be able to choose the correct "
-"<classname>org.hibernate.dialect.Dialect</classname> implementation
based on "
-"the <literal>JDBC metadata</literal> returned by the JDBC
driver."
-msgstr ""
+msgid "In most cases Hibernate will actually be able to choose the correct
<classname>org.hibernate.dialect.Dialect</classname> implementation based on
the <literal>JDBC metadata</literal> returned by the JDBC driver."
+msgstr "在大多数情况下,Hibernate 可以根据 JDBC 驱动返回的 <literal>JDBC
metadata</literal> 选择正确的
<classname>org.hibernate.dialect.Dialect</classname> 实现。"
-#. Tag: property
-#: configuration.xml:378
+#. Tag: para
#, no-c-format
-msgid "hibernate.show_sql"
-msgstr "hibernate.show_sql"
+msgid "<property>hibernate.show_sql</property>"
+msgstr "<property>hibernate.show_sql</property>"
-#. Tag: entry
-#: configuration.xml:380
-#, fuzzy, no-c-format
-msgid ""
-"Write all SQL statements to console. This is an alternative to setting the "
-"log category <literal>org.hibernate.SQL</literal> to
<literal>debug</"
-"literal>."
-msgstr ""
-"输出所有SQL语句到控制台. 有一个另外的选择是把<placeholder-1/>这个log category"
-"设为<placeholder-2/>。 <placeholder-3/>"
+#. Tag: para
+#, no-c-format
+msgid "Write all SQL statements to console. This is an alternative to setting the
log category <literal>org.hibernate.SQL</literal> to
<literal>debug</literal>."
+msgstr "输出所有 SQL 语句到控制台。有一个另外的选择是把 <literal>org.hibernate.SQL</literal>
这个 log category设为 <literal>debug</literal>。"
#. Tag: para
-#: configuration.xml:384 configuration.xml:396 configuration.xml:490
-#: configuration.xml:503 configuration.xml:516 configuration.xml:529
-#: configuration.xml:581 configuration.xml:608 configuration.xml:621
-#: configuration.xml:676 configuration.xml:904 configuration.xml:919
-#: configuration.xml:1009
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>true</literal> | "
-"<literal>false</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>true</literal> | <literal>false</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>true</literal> |
<literal>false</literal> "
-#. Tag: property
-#: configuration.xml:392
+#. Tag: para
#, no-c-format
-msgid "hibernate.format_sql"
-msgstr "hibernate.format_sql"
+msgid "<property>hibernate.format_sql</property>"
+msgstr "<property>hibernate.format_sql</property>"
-#. Tag: entry
-#: configuration.xml:394
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "Pretty print the SQL in the log and console."
-msgstr "在log和console中打印出更漂亮的SQL。 <placeholder-1/>"
+msgstr "在 log 和 console 中打印出更漂亮的 SQL。"
-#. Tag: property
-#: configuration.xml:404
+#. Tag: para
#, no-c-format
-msgid "hibernate.default_schema"
-msgstr "hibernate.default_schema"
+msgid "<property>hibernate.default_schema</property>"
+msgstr "<property>hibernate.default_schema</property>"
-#. Tag: entry
-#: configuration.xml:406
-#, fuzzy, no-c-format
-msgid ""
-"Qualify unqualified table names with the given schema/tablespace in "
-"generated SQL."
-msgstr ""
-"在生成的SQL中, 将给定的schema/tablespace附加于非全限定名的表名上. "
-"<placeholder-1/>"
+#. Tag: para
+#, no-c-format
+msgid "Qualify unqualified table names with the given schema/tablespace in generated
SQL."
+msgstr "在生成的 SQL 中,将给定的 schema/tablespace 附加于非全限定名的表名上。 "
#. Tag: para
-#: configuration.xml:409
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>SCHEMA_NAME</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>SCHEMA_NAME</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>SCHEMA_NAME</literal>
"
-#. Tag: property
-#: configuration.xml:417
+#. Tag: para
#, no-c-format
-msgid "hibernate.default_catalog"
-msgstr "hibernate.default_catalog"
+msgid "<property>hibernate.default_catalog</property>"
+msgstr "<property>hibernate.default_catalog</property>"
-#. Tag: entry
-#: configuration.xml:419
-#, fuzzy, no-c-format
-msgid ""
-"Qualifies unqualified table names with the given catalog in generated SQL."
-msgstr ""
-"在生成的SQL中, 将给定的catalog附加于非全限定名的表名上. <placeholder-1/>"
+#. Tag: para
+#, no-c-format
+msgid "Qualifies unqualified table names with the given catalog in generated
SQL."
+msgstr "在生成的 SQL 中,将给定的 catalog 附加于非全限定名的表名上。 "
#. Tag: para
-#: configuration.xml:422
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>CATALOG_NAME</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>CATALOG_NAME</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>CATALOG_NAME</literal>
"
-#. Tag: property
-#: configuration.xml:430
+#. Tag: para
#, no-c-format
-msgid "hibernate.session_factory_name"
-msgstr "hibernate.session_factory_name"
+msgid "<property>hibernate.session_factory_name</property>"
+msgstr "<property>hibernate.session_factory_name</property>"
-#. Tag: entry
-#: configuration.xml:432
-#, fuzzy, no-c-format
-msgid ""
-"The <interfacename>org.hibernate.SessionFactory</interfacename> will be
"
-"automatically bound to this name in JNDI after it has been created."
-msgstr ""
-"<placeholder-1/>创建后,将自动使用这个名字绑定到JNDI中. <placeholder-2/>"
+#. Tag: para
+#, no-c-format
+msgid "The <interfacename>org.hibernate.SessionFactory</interfacename>
will be automatically bound to this name in JNDI after it has been created."
+msgstr "<interfacename>org.hibernate.SessionFactory</interfacename>
创建后,将自动使用这个名字绑定到 JNDI 中。"
#. Tag: para
-#: configuration.xml:435 configuration.xml:875
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>jndi/composite/name</"
-"literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>jndi/composite/name</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>jndi/composite/name</literal>
"
-#. Tag: property
-#: configuration.xml:443
+#. Tag: para
#, no-c-format
-msgid "hibernate.max_fetch_depth"
-msgstr "hibernate.max_fetch_depth"
+msgid "<property>hibernate.max_fetch_depth</property>"
+msgstr "<property>hibernate.max_fetch_depth</property>"
-#. Tag: entry
-#: configuration.xml:445
-#, fuzzy, 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 <literal>0</literal> disables
"
-"default outer join fetching."
-msgstr ""
-"为单向关联(一对一, 多对一)的外连接抓取(outer join fetch)树设置最大深度. 值"
-"为<placeholder-1/>意味着将关闭默认的外连接抓取. <placeholder-2/>"
+#. Tag: para
+#, 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 <literal>0</literal>
disables default outer join fetching."
+msgstr "为单向关联(一对一,多对一)的外连接抓取(outer join fetch)树设置最大深度。值为
<literal>0</literal> 意味着将关闭默认的外连接抓取。 "
#. Tag: para
-#: configuration.xml:449
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis> recommended values
between "
-"<literal>0</literal> and <literal>3</literal>"
-msgstr ""
-"<emphasis role=\"strong\">取值</emphasis>
建议在<literal>0</literal>到"
-"<literal>3</literal>之间取值"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis> recommended
values between <literal>0</literal> and
<literal>3</literal>"
+msgstr "<emphasis role=\"strong\">例如:</emphasis> 建议在
<literal>0</literal> 到 <literal>3</literal> 之间取值 "
-#. Tag: property
-#: configuration.xml:458
+#. Tag: para
#, no-c-format
-msgid "hibernate.default_batch_fetch_size"
-msgstr "hibernate.default_batch_fetch_size"
+msgid "<property>hibernate.default_batch_fetch_size</property>"
+msgstr "<property>hibernate.default_batch_fetch_size</property>"
-#. Tag: entry
-#: configuration.xml:460
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "Sets a default size for Hibernate batch fetching of associations."
-msgstr "为Hibernate关联的批量抓取设置默认数量. <placeholder-1/>"
+msgstr "为 Hibernate 关联的批量抓取设置默认数量。 "
#. Tag: para
-#: configuration.xml:462
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis> recommended values
<literal>4</"
-"literal>, <literal>8</literal>,
<literal>16</literal>"
-msgstr ""
-"<emphasis role=\"strong\">取值</emphasis>
建议的取值为<literal>4</literal>, "
-"<literal>8</literal>, 和<literal>16</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis> recommended
values <literal>4</literal>, <literal>8</literal>,
<literal>16</literal>"
+msgstr "<emphasis role=\"strong\">例如:</emphasis>建议的取值为
<literal>4</literal>,<literal>8</literal>,和
<literal>16</literal> "
-#. Tag: property
-#: configuration.xml:471
+#. Tag: para
#, no-c-format
-msgid "hibernate.default_entity_mode"
-msgstr "hibernate.default_entity_mode"
+msgid "<property>hibernate.default_entity_mode</property>"
+msgstr "<property>hibernate.default_entity_mode</property>"
-#. Tag: entry
-#: configuration.xml:473
-#, fuzzy, no-c-format
-msgid ""
-"Sets a default mode for entity representation for all sessions opened from "
-"this <literal>SessionFactory</literal>"
-msgstr ""
-"为由这个<placeholder-1/>打开的所有Session指定默认的实体表现模式. "
-"<placeholder-2/>"
+#. Tag: para
+#, no-c-format
+msgid "Sets a default mode for entity representation for all sessions opened from
this <literal>SessionFactory</literal>."
+msgstr "为由这个 <literal>SessionFactory</literal> 打开的所有 Session
指定默认的实体表现模式。 "
#. Tag: para
-#: configuration.xml:476
#, no-c-format
-msgid ""
-"<literal>dynamic-map</literal>, <literal>dom4j</literal>,
<literal>pojo</"
-"literal>"
-msgstr ""
-"<emphasis
role=\"strong\">取值</emphasis><literal>dynamic-map</literal>,
"
-"<literal>dom4j</literal>, <literal>pojo</literal>"
+msgid "<literal>dynamic-map</literal>,
<literal>dom4j</literal>, <literal>pojo</literal>"
+msgstr "<emphasis
role=\"strong\">取值</emphasis><literal>dynamic-map</literal>,<literal>dom4j</literal>,<literal>pojo</literal>"
-#. Tag: property
-#: configuration.xml:484
+#. Tag: para
#, no-c-format
-msgid "hibernate.order_updates"
-msgstr "hibernate.order_updates"
+msgid "<property>hibernate.order_updates</property>"
+msgstr "<property>hibernate.order_updates</property>"
-#. Tag: entry
-#: configuration.xml:486
-#, fuzzy, 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更新排序。这么做将减少在高并发系统中"
-"事务的死锁。 <placeholder-1/>"
+#. Tag: para
+#, 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 更新排序。这么做将减少在高并发系统中事务的死锁。"
-#. Tag: property
-#: configuration.xml:498
+#. Tag: para
#, no-c-format
-msgid "hibernate.generate_statistics"
-msgstr "hibernate.generate_statistics"
+msgid "<property>hibernate.generate_statistics</property>"
+msgstr "<property>hibernate.generate_statistics</property>"
-#. Tag: entry
-#: configuration.xml:500
-#, fuzzy, no-c-format
-msgid ""
-"If enabled, Hibernate will collect statistics useful for performance tuning."
-msgstr "如果开启, Hibernate将收集有助于性能调节的统计数据. <placeholder-1/>"
+#. Tag: para
+#, no-c-format
+msgid "If enabled, Hibernate will collect statistics useful for performance
tuning."
+msgstr "如果开启,Hibernate 将收集有助于性能调节的统计数据。"
-#. Tag: property
-#: configuration.xml:511
+#. Tag: para
#, no-c-format
-msgid "hibernate.use_identifier_rollback"
-msgstr "hibernate.use_identifer_rollback"
+msgid "<property>hibernate.use_identifier_rollback</property>"
+msgstr "<property>hibernate.use_identifier_rollback</property>"
-#. Tag: entry
-#: configuration.xml:513
-#, fuzzy, no-c-format
-msgid ""
-"If enabled, generated identifier properties will be reset to default values "
-"when objects are deleted."
-msgstr ""
-"如果开启, 在对象被删除时生成的标识属性将被重设为默认值. <placeholder-1/>"
+#. Tag: para
+#, no-c-format
+msgid "If enabled, generated identifier properties will be reset to default values
when objects are deleted."
+msgstr "如果开启,在对象被删除时生成的标识属性将被重设为默认值。"
-#. Tag: property
-#: configuration.xml:524
+#. Tag: para
#, no-c-format
-msgid "hibernate.use_sql_comments"
-msgstr "hibernate.use_sql_comments"
+msgid "<property>hibernate.use_sql_comments</property>"
+msgstr "<property>hibernate.use_sql_comments</property>"
-#. Tag: entry
-#: configuration.xml:526
-#, fuzzy, no-c-format
-msgid ""
-"If turned on, Hibernate will generate comments inside the SQL, for easier "
-"debugging, defaults to <literal>false</literal>."
-msgstr ""
-"如果开启, Hibernate将在SQL中生成有助于调试的注释信息, 默认值为<placeholder-1/"
-">. <placeholder-2/>"
+#. Tag: para
+#, no-c-format
+msgid "If turned on, Hibernate will generate comments inside the SQL, for easier
debugging, defaults to <literal>false</literal>."
+msgstr "如果开启,Hibernate 将在 SQL 中生成有助于调试的注释信息,默认值为
<literal>false</literal>。"
#. Tag: title
-#: configuration.xml:540
#, no-c-format
msgid "Hibernate JDBC and Connection Properties"
-msgstr "Hibernate JDBC和连接(connection)属性"
+msgstr "Hibernate JDBC 和连接(connection)属性"
-#. Tag: property
-#: configuration.xml:553
+#. Tag: para
#, no-c-format
-msgid "hibernate.jdbc.fetch_size"
-msgstr "hibernate.jdbc.fetch_size"
+msgid "<property>hibernate.jdbc.fetch_size</property>"
+msgstr "<property>hibernate.jdbc.fetch_size</property>"
-#. Tag: entry
-#: configuration.xml:555
-#, fuzzy, no-c-format
-msgid ""
-"A non-zero value determines the JDBC fetch size (calls
<literal>Statement."
-"setFetchSize()</literal>)."
-msgstr "非零值,指定JDBC抓取数量的大小 (调用<placeholder-1/>)."
+#. Tag: para
+#, no-c-format
+msgid "A non-zero value determines the JDBC fetch size (calls
<literal>Statement.setFetchSize()</literal>)."
+msgstr "非零值,指定 JDBC 抓取数量的大小(调用
<literal>Statement.setFetchSize()</literal>)。"
-#. Tag: property
-#: configuration.xml:562
+#. Tag: para
#, no-c-format
-msgid "hibernate.jdbc.batch_size"
-msgstr "hibernate.jdbc.batch_size"
+msgid "<property>hibernate.jdbc.batch_size</property>"
+msgstr "<property>hibernate.jdbc.batch_size</property>"
-#. Tag: entry
-#: configuration.xml:564
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "A non-zero value enables use of JDBC2 batch updates by Hibernate."
-msgstr "非零值,允许Hibernate使用JDBC2的批量更新. <placeholder-1/>"
+msgstr "非零值,允许 Hibernate 使用 JDBC2 的批量更新。"
#. Tag: para
-#: configuration.xml:566
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis> recommended values
between "
-"<literal>5</literal> and <literal>30</literal>"
-msgstr ""
-"<emphasis role=\"strong\">取值</emphasis>
建议取<literal>5</literal>到"
-"<literal>30</literal>之间的值"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis> recommended
values between <literal>5</literal> and
<literal>30</literal>"
+msgstr "<emphasis role=\"strong\">例如:</emphasis>建议取
<literal>5</literal> 到 <literal>30</literal> 之间的值 "
-#. Tag: property
-#: configuration.xml:574
+#. Tag: para
#, no-c-format
-msgid "hibernate.jdbc.batch_versioned_data"
-msgstr "hibernate.jdbc.batch_versioned_data"
+msgid "<property>hibernate.jdbc.batch_versioned_data</property>"
+msgstr "<property>hibernate.jdbc.batch_versioned_data</property>"
-#. Tag: entry
-#: configuration.xml:576
-#, fuzzy, no-c-format
-msgid ""
-"Set this property to <literal>true</literal> if your JDBC driver
returns "
-"correct row counts from <literal>executeBatch()</literal>. Iit is
usually "
-"safe to turn this option on. Hibernate will then use batched DML for "
-"automatically versioned data. Defaults to
<literal>false</literal>."
-msgstr ""
-"如果你想让你的JDBC驱动从<placeholder-1/>返回正确的行计数 , 那么将此属性设为"
-"<placeholder-2/>(开启这个选项通常是安全的). 同时,Hibernate将为自动版本化的数"
-"据使用批量DML. 默认值为<placeholder-3/>. <placeholder-4/>"
+#. Tag: para
+#, no-c-format
+msgid "Set this property to <literal>true</literal> if your JDBC driver
returns correct row counts from <literal>executeBatch()</literal>. Iit is
usually safe to turn this option on. Hibernate will then use batched DML for automatically
versioned data. Defaults to <literal>false</literal>."
+msgstr "如果你想让你的 JDBC 驱动从 <literal>true</literal> 返回正确的行计数 ,那么将此属性设为
<literal>executeBatch()</literal>(开启这个选项通常是安全的)。同时,Hibernate 将为自动版本化的数据使用批量
DML。默认值为 <literal>false</literal>。 "
-#. Tag: property
-#: configuration.xml:589
+#. Tag: para
#, no-c-format
-msgid "hibernate.jdbc.factory_class"
-msgstr "hibernate.jdbc.factory_class"
+msgid "<property>hibernate.jdbc.factory_class</property>"
+msgstr "<property>hibernate.jdbc.factory_class</property>"
-#. Tag: entry
-#: configuration.xml:591
-#, fuzzy, no-c-format
-msgid ""
-"Select a custom
<interfacename>org.hibernate.jdbc.Batcher</interfacename>. "
-"Most applications will not need this configuration property."
-msgstr ""
-"选择一个自定义的<placeholder-1/>. 多数应用程序不需要这个配置属性. "
-"<placeholder-2/>"
+#. Tag: para
+#, no-c-format
+msgid "Select a custom
<interfacename>org.hibernate.jdbc.Batcher</interfacename>. Most applications
will not need this configuration property."
+msgstr "选择一个自定义的 <literal>Batcher</literal>。多数应用程序不需要这个配置属性。 "
#. Tag: para
-#: configuration.xml:594
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of."
-"BatcherFactory</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of.BatcherFactory</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>classname.of.Batcher</literal>
"
-#. Tag: property
-#: configuration.xml:602
+#. Tag: para
#, no-c-format
-msgid "hibernate.jdbc.use_scrollable_resultset"
-msgstr "hibernate.jdbc.use_scrollable_resultset"
+msgid
"<property>hibernate.jdbc.use_scrollable_resultset</property>"
+msgstr
"<property>hibernate.jdbc.use_scrollable_resultset</property>"
-#. Tag: entry
-#: configuration.xml:604
-#, fuzzy, no-c-format
-msgid ""
-"Enables use of JDBC2 scrollable resultsets by Hibernate. This property is "
-"only necessary when using user-supplied JDBC connections. Hibernate uses "
-"connection metadata otherwise."
-msgstr ""
-"允许Hibernate使用JDBC2的可滚动结果集. 只有在使用用户提供的JDBC连接时,这个选"
-"项才是必要的, 否则Hibernate会使用连接的元数据. <placeholder-1/>"
+#. Tag: para
+#, 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
会使用连接的元数据。 "
-#. Tag: property
-#: configuration.xml:616
+#. Tag: para
#, no-c-format
-msgid "hibernate.jdbc.use_streams_for_binary"
-msgstr "hibernate.jdbc.use_streams_for_binary"
+msgid "<property>hibernate.jdbc.use_streams_for_binary</property>"
+msgstr
"<property>hibernate.jdbc.use_streams_for_binary</property>"
-#. Tag: entry
-#: configuration.xml:618
-#, fuzzy, no-c-format
-msgid ""
-"Use streams when writing/reading <literal>binary</literal> or "
-"<literal>serializable</literal> types to/from JDBC.
<emphasis>*system-level "
-"property*</emphasis>"
-msgstr ""
-"在JDBC读写<placeholder-1/>或<placeholder-2/> 的类型时使用流(stream)(系统级属"
-"性). <placeholder-3/>"
+#. Tag: para
+#, no-c-format
+msgid "Use streams when writing/reading <literal>binary</literal> or
<literal>serializable</literal> types to/from JDBC.
<emphasis>*system-level property*</emphasis>"
+msgstr "在 JDBC 读写 <literal>binary</literal> 或
<literal>serializable</literal> 的类型时使用流(stream)(系统级属性)。 "
-#. Tag: property
-#: configuration.xml:629
+#. Tag: para
#, no-c-format
-msgid "hibernate.jdbc.use_get_generated_keys"
-msgstr "hibernate.jdbc.use_get_generated_keys"
+msgid "<property>hibernate.jdbc.use_get_generated_keys</property>"
+msgstr
"<property>hibernate.jdbc.use_get_generated_keys</property>"
-#. Tag: entry
-#: configuration.xml:631
-#, fuzzy, no-c-format
-msgid ""
-"Enables use of JDBC3
<literal>PreparedStatement.getGeneratedKeys()</literal> "
-"to retrieve natively generated keys after insert. Requires JDBC3+ driver and
"
-"JRE1.4+, set to false if your driver has problems with the Hibernate "
-"identifier generators. By default, it tries to determine the driver "
-"capabilities using connection metadata."
-msgstr ""
-"在数据插入数据库之后,允许使用JDBC3 <placeholder-1/> 来获取数据库生成的key"
-"(键)。需要JDBC3+驱动和JRE1.4+, 如果你的数据库驱动在使用Hibernate的标 识生成器"
-"时遇到问题,请将此值设为false. 默认情况下将使用连接的元数据来判定驱动的能力. "
-"<placeholder-2/>"
+#. Tag: para
+#, no-c-format
+msgid "Enables use of JDBC3
<literal>PreparedStatement.getGeneratedKeys()</literal> to retrieve natively
generated keys after insert. Requires JDBC3+ driver and JRE1.4+, set to false if your
driver has problems with the Hibernate identifier generators. By default, it tries to
determine the driver capabilities using connection metadata."
+msgstr "在数据插入数据库之后,允许使用 JDBC3
<literal>PreparedStatement.getGeneratedKeys()</literal> 来获取数据库生成的 key(键)。需要
JDBC3+ 驱动和 JRE1.4+,如果你的数据库驱动在使用 Hibernate 的标识生成器时遇到问题,请将此值设为 false。默认情况下将使用连接的元数据来判定驱动的能力。
"
#. Tag: para
-#: configuration.xml:637 configuration.xml:767 configuration.xml:779
-#: configuration.xml:793 configuration.xml:831
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>true|false</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>true |
false</literal> "
-#. Tag: property
-#: configuration.xml:645
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.provider_class"
-msgstr "hibernate.connection.provider_class"
+msgid "<property>hibernate.connection.provider_class</property>"
+msgstr "<property>hibernate.connection.provider_class</property>"
-#. Tag: entry
-#: configuration.xml:647
-#, fuzzy, no-c-format
-msgid ""
-"The classname of a custom <interfacename>org.hibernate.connection."
-"ConnectionProvider</interfacename> which provides JDBC connections to "
-"Hibernate."
-msgstr ""
-"自定义<placeholder-1/>的类名, 此类用来向Hibernate提供JDBC连接. <placeholder-"
-"2/>"
+#. Tag: para
+#, no-c-format
+msgid "The classname of a custom
<interfacename>org.hibernate.connection.ConnectionProvider</interfacename>
which provides JDBC connections to Hibernate."
+msgstr "自定义 <literal>ConnectionProvider</literal> 的类名,此类用来向 Hibernate 提供
JDBC 连接。 "
#. Tag: para
-#: configuration.xml:650
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of."
-"ConnectionProvider</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of.ConnectionProvider</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>classname.of.ConnectionProvider</literal>
"
-#. Tag: property
-#: configuration.xml:658
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.isolation"
-msgstr "hibernate.connection.isolation"
+msgid "<property>hibernate.connection.isolation</property>"
+msgstr "<property>hibernate.connection.isolation</property>"
-#. Tag: entry
-#: configuration.xml:660
-#, fuzzy, no-c-format
-msgid ""
-"Sets the JDBC transaction isolation level. Check
<interfacename>java.sql."
-"Connection</interfacename> for meaningful values, but note that most "
-"databases do not support all isolation levels and some define additional, "
-"non-standard isolations."
-msgstr ""
-"设置JDBC事务隔离级别. 查看<placeholder-1/>来了解各个值的具体意义, 但请注意多"
-"数数据库都不支持所有的隔离级别. <placeholder-2/>"
+#. Tag: para
+#, no-c-format
+msgid "Sets the JDBC transaction isolation level. Check
<interfacename>java.sql.Connection</interfacename> for meaningful values, but
note that most databases do not support all isolation levels and some define additional,
non-standard isolations."
+msgstr "设置 JDBC 事务隔离级别。查看 <literal>java.sql.Connection</literal>
来了解各个值的具体意义,但请注意多数数据库都不支持所有的隔离级别。 "
#. Tag: para
-#: configuration.xml:664
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>1, 2, 4, 8</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>1, 2, 4, 8</literal>
"
-#. Tag: property
-#: configuration.xml:672
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.autocommit"
-msgstr "hibernate.connection.autocommit"
+msgid "<property>hibernate.connection.autocommit</property>"
+msgstr "<property>hibernate.connection.autocommit</property>"
-#. Tag: entry
-#: configuration.xml:674
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "Enables autocommit for JDBC pooled connections (it is not
recommended)."
-msgstr ""
-"允许被缓存的JDBC连接开启自动提交(autocommit) (不建议). <placeholder-1/>"
+msgstr "允许被缓存的 JDBC 连接开启自动提交(autocommit)(不推荐)。"
-#. Tag: property
-#: configuration.xml:684
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.release_mode"
-msgstr "hibernate.connection.release_mode"
+msgid "<property>hibernate.connection.release_mode</property>"
+msgstr "<property>hibernate.connection.release_mode</property>"
-#. Tag: entry
-#: configuration.xml:686
-#, fuzzy, 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
<literal>after_statement</"
-"literal> to aggressively release connections after every JDBC call. For a
"
-"non-JTA connection, it often makes sense to release the connection at the "
-"end of each transaction, by using <literal>after_transaction</literal>.
"
-"<literal>auto</literal> will choose
<literal>after_statement</literal> for "
-"the JTA and CMT transaction strategies and
<literal>after_transaction</"
-"literal> for the JDBC transaction strategy."
-msgstr ""
-"指定Hibernate在何时释放JDBC连接. 默认情况下,直到Session被显式关闭或被断开连接"
-"时,才会释放JDBC连接. 对于应用程序服务器的JTA数据源, 你应当使用<placeholder-1/"
-">, 这样在每次JDBC调用后,都会主动的释放连接. 对于非JTA的连接, 使用"
-"<placeholder-2/>在每个事务结束时释放连接是合理的. <placeholder-3/>将为JTA和"
-"CMT事务策略选择<placeholder-4/>, 为JDBC事务策略选择<placeholder-5/>. "
-"<placeholder-6/><placeholder-7/>"
+#. Tag: para
+#, 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 <literal>after_statement</literal> to
aggressively release connections after every JDBC call. For a non-JTA connection, it often
makes sense to release the connection at the end of each transaction, by using
<literal>after_transaction</literal>. <literal>auto</literal> will
choose <literal>after_statement</literal> for the JTA and CMT transaction
strategies and <literal>after_transaction</literal> for the JDBC transaction
strategy."
+msgstr "指定 Hibernate 在何时释放 JDBC 连接。默认情况下,直到 Session 被显式关闭或被断开连接时,才会释放 JDBC
连接。对于应用程序服务器的 JTA 数据源,你应当使用 <literal>after_statement</literal>,这样在每次 JDBC
调用后,都会主动的释放连接。对于非 JTA 的连接,使用 <literal>after_transaction</literal>
在每个事务结束时释放连接是合理的。<literal>auto</literal> 将为 JTA 和 CMT 事务策略选择
<literal>after_statement</literal>,为JDBC事务策略选择
<literal>after_transaction</literal>。"
#. Tag: para
-#: configuration.xml:697
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>auto</literal> (default) "
-"| <literal>on_close</literal> |
<literal>after_transaction</literal> | "
-"<literal>after_statement</literal>"
-msgstr ""
-"<emphasis
role=\"strong\">取值</emphasis><literal>auto</literal> (默认) |
"
-"<literal>on_close</literal> |
<literal>after_transaction</literal> | "
-"<literal>after_statement</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>auto</literal> (default) | <literal>on_close</literal> |
<literal>after_transaction</literal> |
<literal>after_statement</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>auto</literal> (默认)
| <literal>on_close</literal> |
<literal>after_transaction</literal> |
<literal>after_statement</literal> "
#. Tag: para
-#: configuration.xml:702
-#, fuzzy, no-c-format
-msgid ""
-"This setting only affects <literal>Session</literal>s returned from
"
-"<literal>SessionFactory.openSession</literal>. For
<literal>Session</"
-"literal>s obtained through
<literal>SessionFactory.getCurrentSession</"
-"literal>, the <literal>CurrentSessionContext</literal>
implementation "
-"configured for use controls the connection release mode for those "
-"<literal>Session</literal>s. See"
-msgstr ""
-"注意,这些设置仅对通过<literal>SessionFactory.openSession</literal>得到的"
-"<literal>Session</literal>起作用。对于通过<literal>SessionFactory."
-"getCurrentSession</literal>得到的<literal>Session</literal>,所配置的"
-"<literal>CurrentSessionContext</literal>实现控制这些<literal>Session</"
-"literal>的连接释放模式。请参阅<xref
linkend=\"architecture-current-session\"/"
-">。"
+#, no-c-format
+msgid "This setting only affects <literal>Session</literal>s returned
from <literal>SessionFactory.openSession</literal>. For
<literal>Session</literal>s obtained through
<literal>SessionFactory.getCurrentSession</literal>, the
<literal>CurrentSessionContext</literal> implementation configured for use
controls the connection release mode for those <literal>Session</literal>s.
See <xref linkend=\"architecture-current-session\" />"
+msgstr "注意,这些设置仅对通过 <literal>SessionFactory.openSession</literal> 得到的
<literal>Session</literal> 起作用。对于通过
<literal>SessionFactory.getCurrentSession</literal> 得到的
<literal>Session</literal>,所配置的
<literal>CurrentSessionContext</literal> 实现控制这些
<literal>Session</literal> 的连接释放模式。请参阅 <xref
linkend=\"architecture-current-session\" />。"
-#. Tag: entry
-#: configuration.xml:713
+#. Tag: para
#, no-c-format
-msgid ""
-"<property>hibernate.connection.</property><emphasis><propertyName></"
-"emphasis>"
-msgstr ""
+msgid
"<property>hibernate.connection.</property><emphasis><propertyName></emphasis>"
+msgstr
"<property>hibernate.connection.</property><emphasis><propertyName></emphasis>"
-#. Tag: entry
-#: configuration.xml:716
-#, fuzzy, no-c-format
-msgid ""
-"Pass the JDBC property
<emphasis><propertyName></emphasis> to "
-"<literal>DriverManager.getConnection()</literal>."
-msgstr ""
-"传一个<literal>java.util.Properties</literal>实例给
<literal>Configuration."
-"setProperties()</literal>."
+#. Tag: para
+#, no-c-format
+msgid "Pass the JDBC property
<emphasis><propertyName></emphasis> to
<literal>DriverManager.getConnection()</literal>."
+msgstr "把 JDBC 属性 <emphasis><propertyName></emphasis> 传递给
<literal>DriverManager.getConnection()</literal>。"
-#. Tag: entry
-#: configuration.xml:722
+#. Tag: para
#, no-c-format
-msgid ""
-"<property>hibernate.jndi.</property><emphasis><propertyName></emphasis>"
-msgstr ""
+msgid
"<property>hibernate.jndi.</property><emphasis><propertyName></emphasis>"
+msgstr
"<property>hibernate.jndi.</property><emphasis><propertyName></emphasis>"
-#. Tag: entry
-#: configuration.xml:725
-#, fuzzy, no-c-format
-msgid ""
-"Pass the property <emphasis><propertyName></emphasis> to
the JNDI "
-"<literal>InitialContextFactory</literal>."
-msgstr ""
-"传一个<literal>java.util.Properties</literal>实例给
<literal>Configuration."
-"setProperties()</literal>."
+#. Tag: para
+#, no-c-format
+msgid "Pass the property
<emphasis><propertyName></emphasis> to the JNDI
<literal>InitialContextFactory</literal>."
+msgstr "把 <emphasis><propertyName></emphasis> 属性传递给 JNDI
<literal>InitialContextFactory</literal>。"
#. Tag: title
-#: configuration.xml:735
#, no-c-format
msgid "Hibernate Cache Properties"
-msgstr "Hibernate缓存属性"
+msgstr "Hibernate 缓存属性"
-#. Tag: literal
-#: configuration.xml:748
+#. Tag: para
#, no-c-format
-msgid "hibernate.cache.provider_class"
-msgstr "hibernate.cache.provider_class"
+msgid "<literal>hibernate.cache.provider_class</literal>"
+msgstr "<literal>hibernate.cache.provider_class</literal>"
-#. Tag: entry
-#: configuration.xml:750
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "The classname of a custom
<literal>CacheProvider</literal>."
-msgstr "自定义的<placeholder-1/>的类名. <placeholder-2/>"
+msgstr "自定义的 <literal>CacheProvider</literal> 的类名。"
#. Tag: para
-#: configuration.xml:752
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of."
-"CacheProvider</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of.CacheProvider</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>classname.of.CacheProvider</literal>
"
-#. Tag: literal
-#: configuration.xml:760
+#. Tag: para
#, no-c-format
-msgid "hibernate.cache.use_minimal_puts"
-msgstr "hibernate.cache.use_minimal_puts"
+msgid "<literal>hibernate.cache.use_minimal_puts</literal>"
+msgstr "<literal>hibernate.cache.use_minimal_puts</literal>"
-#. Tag: entry
-#: configuration.xml:762
-#, fuzzy, 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中,这个设置对"
-"的集群缓存非常有用, 对集群缓存的实现而言,默认是开启的. <placeholder-1/>"
+#. Tag: para
+#, 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 中,这个设置对的集群缓存非常有用,对集群缓存的实现而言,默认是开启的。
"
-#. Tag: literal
-#: configuration.xml:775
+#. Tag: para
#, no-c-format
-msgid "hibernate.cache.use_query_cache"
-msgstr "hibernate.cache.use_query_cache"
+msgid "<literal>hibernate.cache.use_query_cache</literal>"
+msgstr "<literal>hibernate.cache.use_query_cache</literal>"
-#. Tag: entry
-#: configuration.xml:777
-#, fuzzy, no-c-format
-msgid ""
-"Enables the query cache. Individual queries still have to be set cachable."
-msgstr "允许查询缓存, 个别查询仍然需要被设置为可缓存的. <placeholder-1/>"
+#. Tag: para
+#, no-c-format
+msgid "Enables the query cache. Individual queries still have to be set
cachable."
+msgstr "允许查询缓存,个别查询仍然需要被设置为可缓存的。 "
-#. Tag: literal
-#: configuration.xml:787
+#. Tag: para
#, no-c-format
-msgid "hibernate.cache.use_second_level_cache"
-msgstr "hibernate.cache.use_second_level_cache"
+msgid "<literal>hibernate.cache.use_second_level_cache</literal>"
+msgstr "<literal>hibernate.cache.use_second_level_cache</literal>"
-#. Tag: entry
-#: configuration.xml:789
-#, fuzzy, no-c-format
-msgid ""
-"Can be used to completely disable the second level cache, which is enabled "
-"by default for classes which specify a
<literal><cache></literal> "
-"mapping."
-msgstr ""
-"能用来完全禁止使用二级缓存. 对那些在类的映射定义中指定<placeholder-1/>的类,"
-"会默认开启二级缓存. <placeholder-2/>"
+#. Tag: para
+#, no-c-format
+msgid "Can be used to completely disable the second level cache, which is enabled by
default for classes which specify a <literal><cache></literal>
mapping."
+msgstr "能用来完全禁止使用二级缓存。对那些在类的映射定义中指定
<literal><cache></literal> 的类,会默认开启二级缓存。 "
-#. Tag: literal
-#: configuration.xml:801
+#. Tag: para
#, no-c-format
-msgid "hibernate.cache.query_cache_factory"
-msgstr "hibernate.cache.query_cache_factory"
+msgid "<literal>hibernate.cache.query_cache_factory</literal>"
+msgstr "<literal>hibernate.cache.query_cache_factory</literal>"
-#. Tag: entry
-#: configuration.xml:803
-#, fuzzy, no-c-format
-msgid ""
-"The classname of a custom <literal>QueryCache</literal> interface,
defaults "
-"to the built-in <literal>StandardQueryCache</literal>."
-msgstr ""
-"自定义实现<placeholder-1/>接口的类名, 默认为内建的<placeholder-2/>. "
-"<placeholder-3/>"
+#. Tag: para
+#, no-c-format
+msgid "The classname of a custom <literal>QueryCache</literal>
interface, defaults to the built-in
<literal>StandardQueryCache</literal>."
+msgstr "自定义实现 <literal>QueryCache</literal> 接口的类名,默认为内建的
<literal>StandardQueryCache</literal>。"
#. Tag: para
-#: configuration.xml:806
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of.QueryCache</"
-"literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of.QueryCache</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>classname.of.QueryCache</literal>
"
-#. Tag: literal
-#: configuration.xml:814
+#. Tag: para
#, no-c-format
-msgid "hibernate.cache.region_prefix"
-msgstr "hibernate.cache.region_prefix"
+msgid "<literal>hibernate.cache.region_prefix</literal>"
+msgstr "<literal>hibernate.cache.region_prefix</literal>"
-#. Tag: entry
-#: configuration.xml:816
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "A prefix to use for second-level cache region names."
-msgstr "二级缓存区域名的前缀. <placeholder-1/>"
+msgstr "二级缓存区域名的前缀。"
#. Tag: para
-#: configuration.xml:818
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>prefix</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>prefix</literal>
"
-#. Tag: literal
-#: configuration.xml:826
+#. Tag: para
#, no-c-format
-msgid "hibernate.cache.use_structured_entries"
-msgstr "hibernate.cache.use_structured_entries"
+msgid "<literal>hibernate.cache.use_structured_entries</literal>"
+msgstr "<literal>hibernate.cache.use_structured_entries</literal>"
-#. Tag: entry
-#: configuration.xml:828
-#, fuzzy, no-c-format
-msgid ""
-"Forces Hibernate to store data in the second-level cache in a more human-"
-"friendly format."
-msgstr "强制Hibernate以更人性化的格式将数据存入二级缓存. <placeholder-1/>"
+#. Tag: para
+#, no-c-format
+msgid "Forces Hibernate to store data in the second-level cache in a more
human-friendly format."
+msgstr "强制 Hibernate 以更人性化的格式将数据存入二级缓存。"
#. Tag: title
-#: configuration.xml:842
#, no-c-format
msgid "Hibernate Transaction Properties"
-msgstr "Hibernate事务属性"
+msgstr "Hibernate 事务属性"
-#. Tag: literal
-#: configuration.xml:855
+#. Tag: para
#, no-c-format
-msgid "hibernate.transaction.factory_class"
-msgstr "hibernate.transaction.factory_class"
+msgid "<literal>hibernate.transaction.factory_class</literal>"
+msgstr "<literal>hibernate.transaction.factory_class</literal>"
-#. Tag: entry
-#: configuration.xml:857
-#, fuzzy, no-c-format
-msgid ""
-"The classname of a <literal>TransactionFactory</literal> to use with
"
-"Hibernate <literal>Transaction</literal> API (defaults to "
-"<literal>JDBCTransactionFactory</literal>)."
-msgstr ""
-"一个<placeholder-1/>的类名, 用于Hibernate <placeholder-2/> API (默认为"
-"<placeholder-3/>). <placeholder-4/>"
+#. Tag: para
+#, no-c-format
+msgid "The classname of a <literal>TransactionFactory</literal> to use
with Hibernate <literal>Transaction</literal> API (defaults to
<literal>JDBCTransactionFactory</literal>)."
+msgstr "一个 <literal>TransactionFactory</literal> 的类名,用于 Hibernate
<literal>Transaction</literal> API(默认为
<literal>JDBCTransactionFactory</literal>)。"
#. Tag: para
-#: configuration.xml:861
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of."
-"TransactionFactory</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of.TransactionFactory</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>classname.of.TransactionFactory</literal>
"
-#. Tag: literal
-#: configuration.xml:869
+#. Tag: para
#, no-c-format
-msgid "jta.UserTransaction"
-msgstr "jta.UserTransaction"
+msgid "<literal>jta.UserTransaction</literal>"
+msgstr "<literal>jta.UserTransaction</literal>"
-#. Tag: entry
-#: configuration.xml:871
-#, fuzzy, no-c-format
-msgid ""
-"A JNDI name used by <literal>JTATransactionFactory</literal> to obtain
the "
-"JTA <literal>UserTransaction</literal> from the application
server."
-msgstr ""
-"一个JNDI名字,被<placeholder-1/>用来从应用服务器获取JTA <placeholder-2/>. "
-"<placeholder-3/>"
+#. Tag: para
+#, no-c-format
+msgid "A JNDI name used by <literal>JTATransactionFactory</literal> to
obtain the JTA <literal>UserTransaction</literal> from the application
server."
+msgstr "一个 JNDI 名字,被 <literal>JTATransactionFactory</literal> 用来从应用服务器获取
JTA <literal>UserTransaction</literal>。"
-#. Tag: literal
-#: configuration.xml:883
+#. Tag: para
#, no-c-format
-msgid "hibernate.transaction.manager_lookup_class"
-msgstr "hibernate.transaction.manager_lookup_class"
+msgid "<literal>hibernate.transaction.
manager_lookup_class</literal>"
+msgstr "<literal>hibernate.transaction.
manager_lookup_class</literal>"
-#. Tag: entry
-#: configuration.xml:885
-#, fuzzy, no-c-format
-msgid ""
-"The classname of a <literal>TransactionManagerLookup</literal>. It is
"
-"required when JVM-level caching is enabled or when using hilo generator in a
"
-"JTA environment."
-msgstr ""
-"一个<placeholder-1/>的类名 - 当使用JVM级缓存,或在JTA环境中使用hilo生成器的时"
-"候需要该类. <placeholder-2/>"
+#. Tag: para
+#, no-c-format
+msgid "The classname of a <literal>TransactionManagerLookup</literal>.
It is required when JVM-level caching is enabled or when using hilo generator in a JTA
environment."
+msgstr "一个 <literal>TransactionManagerLookup</literal> 的类名 — 当使用 JVM
级缓存,或在 JTA 环境中使用 hilo 生成器的时候需要该类。 "
#. Tag: para
-#: configuration.xml:889
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of."
-"TransactionManagerLookup</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>classname.of.TransactionManagerLookup</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>classname.of.TransactionManagerLookup</literal>
"
-#. Tag: literal
-#: configuration.xml:897
+#. Tag: para
#, no-c-format
-msgid "hibernate.transaction.flush_before_completion"
-msgstr "hibernate.transaction.flush_before_completion"
+msgid "<literal>hibernate.transaction.
flush_before_completion</literal>"
+msgstr "<literal>hibernate.transaction.
flush_before_completion</literal>"
-#. Tag: entry
-#: configuration.xml:899
-#, fuzzy, no-c-format
-msgid ""
-"If enabled, the session will be automatically flushed during the before "
-"completion phase of the transaction. Built-in and automatic session context "
-"management is preferred, see <xref
linkend=\"architecture-current-session\"/"
-">."
-msgstr ""
-"如果开启, session在事务完成后将被自动清洗(flush)。 现在更好的方法是使用自动"
-"session上下文管理。请参见<xref linkend=\"architecture-current-session\"/>。
"
-"<placeholder-1/>"
+#. Tag: para
+#, no-c-format
+msgid "If enabled, the session will be automatically flushed during the before
completion phase of the transaction. Built-in and automatic session context management is
preferred, see <xref linkend=\"architecture-current-session\" />."
+msgstr "如果开启,session 在事务完成后将被自动清洗(flush)。现在更好的方法是使用自动 session 上下文管理。请参见 <xref
linkend=\"architecture-current-session\"/>。 "
-#. Tag: literal
-#: configuration.xml:912
+#. Tag: para
#, no-c-format
-msgid "hibernate.transaction.auto_close_session"
-msgstr "hibernate.transaction.auto_close_session"
+msgid "<literal>hibernate.transaction.
auto_close_session</literal>"
+msgstr "<literal>hibernate.transaction.
auto_close_session</literal>"
-#. Tag: entry
-#: configuration.xml:914
-#, fuzzy, 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 <xref
linkend=\"architecture-current-session\"/"
-">."
-msgstr ""
-"如果开启, session在事务完成后将被自动关闭。 现在更好的方法是使用自动session上"
-"下文管理。请参见<xref linkend=\"architecture-current-session\"/>。 "
-"<placeholder-1/>"
+#. Tag: para
+#, 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 <xref linkend=\"architecture-current-session\" />."
+msgstr "如果开启,session 在事务完成后将被自动关闭。 现在更好的方法是使用自动 session 上下文管理。请参见 <xref
linkend=\"architecture-current-session\"/>。 "
#. Tag: title
-#: configuration.xml:930
#, no-c-format
msgid "Miscellaneous Properties"
msgstr "其他属性"
-#. Tag: literal
-#: configuration.xml:943
+#. Tag: para
#, no-c-format
-msgid "hibernate.current_session_context_class"
-msgstr "hibernate.current_session_context_class"
+msgid "<literal>hibernate.
current_session_context_class</literal>"
+msgstr "<literal>hibernate.
current_session_context_class</literal>"
-#. Tag: entry
-#: configuration.xml:945
-#, fuzzy, no-c-format
-msgid ""
-"Supply a custom strategy for the scoping of the \"current\" "
-"<literal>Session</literal>. See <xref
linkend=\"architecture-current-session"
-"\"/> for more information about the built-in strategies."
-msgstr ""
-"为\"当前\" <placeholder-1/>指定一个(自定义的)策略。关于内置策略的详情,请参见"
-"<xref linkend=\"architecture-current-session\"/> 。
<placeholder-2/>"
+#. Tag: para
+#, no-c-format
+msgid "Supply a custom strategy for the scoping of the \"current\"
<literal>Session</literal>. See <xref
linkend=\"architecture-current-session\" /> for more information about the
built-in strategies."
+msgstr "为\"当前\" <literal>Session</literal>
指定一个(自定义的)策略。关于内置策略的详情,请参见 <xref
linkend=\"architecture-current-session\"/>。 "
#. Tag: para
-#: configuration.xml:950
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>jta</literal> | "
-"<literal>thread</literal> | <literal>managed</literal> |
<literal>custom."
-"Class</literal>"
-msgstr ""
-"<emphasis
role=\"strong\">eg.</emphasis><literal>jta</literal> |
"
-"<literal>thread</literal> | <literal>managed</literal> |
<literal>custom."
-"Class</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>jta</literal> | <literal>thread</literal> |
<literal>managed</literal> |
<literal>custom.Class</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>jta</literal> |
<literal>thread</literal> | <literal>managed</literal> |
<literal>custom.Class</literal> "
-#. Tag: literal
-#: configuration.xml:959
+#. Tag: para
#, no-c-format
-msgid "hibernate.query.factory_class"
-msgstr "hibernate.query.factory_class"
+msgid "<literal>hibernate.query.factory_class</literal>"
+msgstr "<literal>hibernate.query.factory_class</literal>"
-#. Tag: entry
-#: configuration.xml:961
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "Chooses the HQL parser implementation."
-msgstr "选择HQL解析器的实现. <placeholder-1/>"
+msgstr "选择 HQL 解析器的实现。"
#. Tag: para
-#: configuration.xml:963
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>org.hibernate.hql.ast."
-"ASTQueryTranslatorFactory</literal> or
<literal>org.hibernate.hql.classic."
-"ClassicQueryTranslatorFactory</literal>"
-msgstr ""
-"<emphasis
role=\"strong\">取值</emphasis><literal>org.hibernate.hql.ast."
-"ASTQueryTranslatorFactory</literal> or
<literal>org.hibernate.hql.classic."
-"ClassicQueryTranslatorFactory</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>org.hibernate.hql.ast.ASTQueryTranslatorFactory</literal> or
<literal>org.hibernate.hql.classic.ClassicQueryTranslatorFactory</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>org.hibernate.hql.ast.ASTQueryTranslatorFactory</literal>
或 <literal>org.hibernate.hql.classic.ClassicQueryTranslatorFactory</literal>
"
-#. Tag: literal
-#: configuration.xml:972
+#. Tag: para
#, no-c-format
-msgid "hibernate.query.substitutions"
-msgstr "hibernate.query.substitutions"
+msgid "<literal>hibernate.query.substitutions</literal>"
+msgstr "<literal>hibernate.query.substitutions</literal>"
-#. Tag: entry
-#: configuration.xml:974
-#, fuzzy, 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查询中的符号 (符号可能是函数名或常量名字). "
-"<placeholder-1/>"
+#. Tag: para
+#, 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 查询中的符号(符号可能是函数名或常量名字)。 "
#. Tag: para
-#: configuration.xml:977
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>hqlLiteral=SQL_LITERAL, "
-"hqlFunction=SQLFUNC</literal>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">eg.</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"<emphasis
role=\"strong\">取值</emphasis><literal>true</literal> |
"
-"<literal>false</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>hqlLiteral=SQL_LITERAL,
hqlFunction=SQLFUNC</literal> "
-#. Tag: literal
-#: configuration.xml:985
+#. Tag: para
#, no-c-format
-msgid "hibernate.hbm2ddl.auto"
-msgstr "hibernate.hbm2ddl.auto"
+msgid "<literal>hibernate.hbm2ddl.auto</literal>"
+msgstr "<literal>hibernate.hbm2ddl.auto</literal>"
-#. Tag: entry
-#: configuration.xml:987
-#, fuzzy, no-c-format
-msgid ""
-"Automatically validates or exports schema DDL to the database when the "
-"<literal>SessionFactory</literal> is created. With
<literal>create-drop</"
-"literal>, the database schema will be dropped when the "
-"<literal>SessionFactory</literal> is closed explicitly."
-msgstr ""
-"在<placeholder-1/>创建时,自动检查数据库结构,或者将数据库schema的DDL导出到数"
-"据库. 使用 <placeholder-2/>时,在显式关闭<placeholder-3/>时,将drop掉数据库"
-"schema. <placeholder-4/>"
+#. Tag: para
+#, no-c-format
+msgid "Automatically validates or exports schema DDL to the database when the
<literal>SessionFactory</literal> is created. With
<literal>create-drop</literal>, the database schema will be dropped when the
<literal>SessionFactory</literal> is closed explicitly."
+msgstr "在 <literal>SessionFactory</literal> 创建时,自动检查数据库结构,或者将数据库 schema
的 DDL 导出到数据库。使用 <literal>create-drop</literal> 时,在显式关闭
<literal>SessionFactory</literal> 时,将删除掉数据库 schema。 "
#. Tag: para
-#: configuration.xml:993
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis role=\"strong\">e.g.</emphasis>
<literal>validate</literal> | "
-"<literal>update</literal> | <literal>create</literal> |
<literal>create-"
-"drop</literal>"
-msgstr ""
-"<emphasis
role=\"strong\">取值</emphasis><literal>validate</literal> |
"
-"<literal>update</literal> | <literal>create</literal> |
<literal>create-"
-"drop</literal>"
+#, no-c-format
+msgid "<emphasis role=\"strong\">e.g.</emphasis>
<literal>validate</literal> | <literal>update</literal> |
<literal>create</literal> | <literal>create-drop</literal>"
+msgstr "<emphasis
role=\"strong\">例如:</emphasis><literal>validate</literal> |
<literal>update</literal> | <literal>create</literal> |
<literal>create-drop</literal> "
-#. Tag: literal
-#: configuration.xml:1002
+#. Tag: para
#, no-c-format
-msgid "hibernate.cglib.use_reflection_optimizer"
-msgstr "hibernate.cglib.use_reflection_optimizer"
+msgid "<literal>hibernate.cglib.
use_reflection_optimizer</literal>"
+msgstr "<literal>hibernate.cglib.
use_reflection_optimizer</literal>"
-#. Tag: entry
-#: configuration.xml:1004
-#, fuzzy, 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
<literal>hibernate.cfg.xml</literal>."
-msgstr ""
-"开启CGLIB来替代运行时反射机制(系统级属性). 反射机制有时在除错时比较有用. 注意"
-"即使关闭这个优化, Hibernate还是需要CGLIB. 你不能在<placeholder-1/>中设置此属"
-"性. <placeholder-2/>"
+#. Tag: para
+#, 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
<literal>hibernate.cfg.xml</literal>."
+msgstr "开启 CGLIB 来替代运行时反射机制(系统级属性)。反射机制有时在除错时比较有用。注意即使关闭这个优化,Hibernate 还是需要
CGLIB。你不能在 <literal>hibernate.cfg.xml</literal> 中设置此属性。 "
#. Tag: title
-#: configuration.xml:1020
#, no-c-format
msgid "SQL Dialects"
-msgstr "SQL方言"
+msgstr "SQL 方言"
#. Tag: para
-#: configuration.xml:1022
-#, fuzzy, no-c-format
-msgid ""
-"Always set the <literal>hibernate.dialect</literal> property to the
correct "
-"<literal>org.hibernate.dialect.Dialect</literal> subclass for your
database. "
-"If you specify a dialect, Hibernate will use sensible defaults for some of "
-"the other properties listed above. This means that you will not have to "
-"specify them manually."
-msgstr ""
-"你应当总是为你的数据库将<literal>hibernate.dialect</literal>属性设置成正确的 "
-"<literal>org.hibernate.dialect.Dialect</literal>子类. 如果你指定一种方言, "
-"Hibernate将为上面列出的一些属性使用合理的默认值, 为你省去了手工指定它们的功"
-"夫."
+#, no-c-format
+msgid "Always set the <literal>hibernate.dialect</literal> property to
the correct <literal>org.hibernate.dialect.Dialect</literal> subclass for your
database. If you specify a dialect, Hibernate will use sensible defaults for some of the
other properties listed above. This means that you will not have to specify them
manually."
+msgstr "你应当总是为你的数据库将 <literal>hibernate.dialect</literal> 属性设置成正确的
<literal>org.hibernate.dialect.Dialect</literal> 子类。如果你指定一种方言,Hibernate
将为上面列出的一些属性使用合理的默认值,这样你就不用手工指定它们。"
#. Tag: title
-#: configuration.xml:1030
#, no-c-format
msgid "Hibernate SQL Dialects
(<literal>hibernate.dialect</literal>)"
-msgstr "Hibernate SQL方言 (<literal>hibernate.dialect</literal>)"
+msgstr "Hibernate SQL 方言(<literal>hibernate.dialect</literal>)"
-#. Tag: entry
-#: configuration.xml:1036
+#. Tag: para
#, no-c-format
msgid "RDBMS"
msgstr "RDBMS"
-#. Tag: entry
-#: configuration.xml:1037
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "Dialect"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"Dialect\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"方言"
+msgstr "Dialect"
-#. Tag: entry
-#: configuration.xml:1042
+#. Tag: para
#, no-c-format
-msgid "<entry>DB2</entry>"
-msgstr ""
+msgid "DB2"
+msgstr "DB2"
-#. Tag: literal
-#: configuration.xml:1042
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.DB2Dialect"
-msgstr "org.hibernate.dialect.DB2Dialect"
+msgid "<literal>org.hibernate.dialect.DB2Dialect</literal>"
+msgstr "<literal>org.hibernate.dialect.DB2Dialect</literal>"
-#. Tag: entry
-#: configuration.xml:1045
+#. Tag: para
#, no-c-format
msgid "DB2 AS/400"
msgstr "DB2 AS/400"
-#. Tag: literal
-#: configuration.xml:1045
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.DB2400Dialect"
-msgstr "org.hibernate.dialect.DB2400Dialect"
+msgid "<literal>org.hibernate.dialect.DB2400Dialect</literal>"
+msgstr "<literal>org.hibernate.dialect.DB2400Dialect</literal>"
-#. Tag: entry
-#: configuration.xml:1048
+#. Tag: para
#, no-c-format
msgid "DB2 OS390"
msgstr "DB2 OS390"
-#. Tag: literal
-#: configuration.xml:1048
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.DB2390Dialect"
-msgstr "org.hibernate.dialect.DB2390Dialect"
+msgid "<literal>org.hibernate.dialect.DB2390Dialect</literal>"
+msgstr "<literal>org.hibernate.dialect.DB2390Dialect</literal>"
-#. Tag: entry
-#: configuration.xml:1051
+#. Tag: para
#, no-c-format
msgid "PostgreSQL"
msgstr "PostgreSQL"
-#. Tag: literal
-#: configuration.xml:1051
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.PostgreSQLDialect"
-msgstr "org.hibernate.dialect.PostgreSQLDialect"
+msgid "<literal>org.hibernate.dialect.PostgreSQLDialect</literal>"
+msgstr
"<literal>org.hibernate.dialect.PostgreSQLDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1054
+#. Tag: para
#, no-c-format
msgid "MySQL"
msgstr "MySQL"
-#. Tag: literal
-#: configuration.xml:1054
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.MySQLDialect"
-msgstr "org.hibernate.dialect.MySQLDialect"
+msgid "<literal>org.hibernate.dialect.MySQLDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.MySQLDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1057
+#. Tag: para
#, no-c-format
msgid "MySQL with InnoDB"
msgstr "MySQL with InnoDB"
-#. Tag: literal
-#: configuration.xml:1057
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.MySQLInnoDBDialect"
-msgstr "org.hibernate.dialect.MySQLInnoDBDialect"
+msgid
"<literal>org.hibernate.dialect.MySQLInnoDBDialect</literal>"
+msgstr
"<literal>org.hibernate.dialect.MySQLInnoDBDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1060
+#. Tag: para
#, no-c-format
msgid "MySQL with MyISAM"
msgstr "MySQL with MyISAM"
-#. Tag: literal
-#: configuration.xml:1060
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.MySQLMyISAMDialect"
-msgstr "org.hibernate.dialect.MySQLMyISAMDialect"
+msgid
"<literal>org.hibernate.dialect.MySQLMyISAMDialect</literal>"
+msgstr
"<literal>org.hibernate.dialect.MySQLMyISAMDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1063
+#. Tag: para
#, no-c-format
msgid "Oracle (any version)"
-msgstr "Oracle (any version)"
+msgstr "Oracle(any version)"
-#. Tag: literal
-#: configuration.xml:1063
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.OracleDialect"
-msgstr "org.hibernate.dialect.OracleDialect"
+msgid "<literal>org.hibernate.dialect.OracleDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.OracleDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1066
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "Oracle 9i"
-msgstr "Oracle 9i/10g"
+msgstr "Oracle 9i"
-#. Tag: literal
-#: configuration.xml:1066
-#, fuzzy, no-c-format
-msgid "org.hibernate.dialect.Oracle9iDialect"
-msgstr "org.hibernate.dialect.Oracle9Dialect"
+#. Tag: para
+#, no-c-format
+msgid "<literal>org.hibernate.dialect.Oracle9iDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.Oracle9iDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1069
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "Oracle 10g"
-msgstr "Oracle 9i/10g"
+msgstr "Oracle 10g"
-#. Tag: literal
-#: configuration.xml:1069
-#, fuzzy, no-c-format
-msgid "org.hibernate.dialect.Oracle10gDialect"
-msgstr "org.hibernate.dialect.OracleDialect"
+#. Tag: para
+#, no-c-format
+msgid "<literal>org.hibernate.dialect.Oracle10gDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.Oracle10gDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1072
+#. Tag: para
#, no-c-format
msgid "Sybase"
msgstr "Sybase"
-#. Tag: literal
-#: configuration.xml:1072
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.SybaseDialect"
-msgstr "org.hibernate.dialect.SybaseDialect"
+msgid "<literal>org.hibernate.dialect.SybaseDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.SybaseDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1075
+#. Tag: para
#, no-c-format
msgid "Sybase Anywhere"
msgstr "Sybase Anywhere"
-#. Tag: literal
-#: configuration.xml:1075
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.SybaseAnywhereDialect"
-msgstr "org.hibernate.dialect.SybaseAnywhereDialect"
+msgid
"<literal>org.hibernate.dialect.SybaseAnywhereDialect</literal>"
+msgstr
"<literal>org.hibernate.dialect.SybaseAnywhereDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1078
+#. Tag: para
#, no-c-format
msgid "Microsoft SQL Server"
msgstr "Microsoft SQL Server"
-#. Tag: literal
-#: configuration.xml:1078
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.SQLServerDialect"
-msgstr "org.hibernate.dialect.SQLServerDialect"
+msgid "<literal>org.hibernate.dialect.SQLServerDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.SQLServerDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1081
+#. Tag: para
#, no-c-format
msgid "SAP DB"
msgstr "SAP DB"
-#. Tag: literal
-#: configuration.xml:1081
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.SAPDBDialect"
-msgstr "org.hibernate.dialect.SAPDBDialect"
+msgid "<literal>org.hibernate.dialect.SAPDBDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.SAPDBDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1084
+#. Tag: para
#, no-c-format
msgid "Informix"
msgstr "Informix"
-#. Tag: literal
-#: configuration.xml:1084
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.InformixDialect"
-msgstr "org.hibernate.dialect.InformixDialect"
+msgid "<literal>org.hibernate.dialect.InformixDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.InformixDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1087
+#. Tag: para
#, no-c-format
msgid "HypersonicSQL"
msgstr "HypersonicSQL"
-#. Tag: literal
-#: configuration.xml:1087
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.HSQLDialect"
-msgstr "org.hibernate.dialect.HSQLDialect"
+msgid "<literal>org.hibernate.dialect.HSQLDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.HSQLDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1090
+#. Tag: para
#, no-c-format
msgid "Ingres"
msgstr "Ingres"
-#. Tag: literal
-#: configuration.xml:1090
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.IngresDialect"
-msgstr "org.hibernate.dialect.IngresDialect"
+msgid "<literal>org.hibernate.dialect.IngresDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.IngresDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1093
+#. Tag: para
#, no-c-format
msgid "Progress"
msgstr "Progress"
-#. Tag: literal
-#: configuration.xml:1093
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.ProgressDialect"
-msgstr "org.hibernate.dialect.ProgressDialect"
+msgid "<literal>org.hibernate.dialect.ProgressDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.ProgressDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1096
+#. Tag: para
#, no-c-format
msgid "Mckoi SQL"
msgstr "Mckoi SQL"
-#. Tag: literal
-#: configuration.xml:1096
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.MckoiDialect"
-msgstr "org.hibernate.dialect.MckoiDialect"
+msgid "<literal>org.hibernate.dialect.MckoiDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.MckoiDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1099
+#. Tag: para
#, no-c-format
msgid "Interbase"
msgstr "Interbase"
-#. Tag: literal
-#: configuration.xml:1099
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.InterbaseDialect"
-msgstr "org.hibernate.dialect.InterbaseDialect"
+msgid "<literal>org.hibernate.dialect.InterbaseDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.InterbaseDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1102
+#. Tag: para
#, no-c-format
msgid "Pointbase"
msgstr "Pointbase"
-#. Tag: literal
-#: configuration.xml:1102
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.PointbaseDialect"
-msgstr "org.hibernate.dialect.PointbaseDialect"
+msgid "<literal>org.hibernate.dialect.PointbaseDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.PointbaseDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1105
+#. Tag: para
#, no-c-format
msgid "FrontBase"
msgstr "FrontBase"
-#. Tag: literal
-#: configuration.xml:1105
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.FrontbaseDialect"
-msgstr "org.hibernate.dialect.FrontbaseDialect"
+msgid "<literal>org.hibernate.dialect.FrontbaseDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.FrontbaseDialect</literal>"
-#. Tag: entry
-#: configuration.xml:1108
+#. Tag: para
#, no-c-format
msgid "Firebird"
msgstr "Firebird"
-#. Tag: literal
-#: configuration.xml:1108
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.dialect.FirebirdDialect"
-msgstr "org.hibernate.dialect.FirebirdDialect"
+msgid "<literal>org.hibernate.dialect.FirebirdDialect</literal>"
+msgstr "<literal>org.hibernate.dialect.FirebirdDialect</literal>"
#. Tag: title
-#: configuration.xml:1117
#, no-c-format
msgid "Outer Join Fetching"
-msgstr "外连接抓取(Outer Join Fetching)"
+msgstr "外连接抓取(Outer Join Fetching)"
#. Tag: para
-#: configuration.xml:1119
-#, fuzzy, no-c-format
-msgid ""
-"If your database supports ANSI, Oracle or Sybase style outer joins, "
-"<emphasis>outer join fetching</emphasis> will often increase
performance by "
-"limiting the number of round trips to and from the database. 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 <literal>SELECT</literal>."
-msgstr ""
-"如果你的数据库支持ANSI, Oracle或Sybase风格的外连接, <emphasis>外连接抓取</"
-"emphasis>通常能通过限制往返数据库次数 (更多的工作交由数据库自己来完成)来提高"
-"效率. 外连接抓取允许在单个<literal>SELECT</literal>SQL语句中, 通过many-to-"
-"one, one-to-many, many-to-many和one-to-one关联获取连接对象的整个对象图."
+#, no-c-format
+msgid "If your database supports ANSI, Oracle or Sybase style outer joins,
<emphasis>outer join fetching</emphasis> will often increase performance by
limiting the number of round trips to and from the database. 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 <literal>SELECT</literal>."
+msgstr "如果你的数据库支持 ANSI、Oracle 或 Sybase
风格的外连接,<emphasis>外连接抓取</emphasis>通常能通过限制往返数据库次数(更多的工作交由数据库自己来完成)来提高效率。外连接抓取允许在单个
<literal>SELECT</literal> SQL 语句中, 通过 many-to-one、one-to-many、many-to-many 和
one-to-one 关联获取连接对象的整个对象图。"
#. Tag: para
-#: configuration.xml:1128
-#, fuzzy, no-c-format
-msgid ""
-"Outer join fetching can be disabled <emphasis>globally</emphasis> by
setting "
-"the property <literal>hibernate.max_fetch_depth</literal> to
<literal>0</"
-"literal>. A setting of <literal>1</literal> or higher enables outer
join "
-"fetching for one-to-one and many-to-one associations that have been mapped "
-"with <literal>fetch=\"join\"</literal>."
-msgstr ""
-"将<literal>hibernate.max_fetch_depth</literal>设为<literal>0</literal>能在"
-"<emphasis>全局</emphasis> 范围内禁止外连接抓取.
设为<literal>1</literal>或更"
-"高值能启用one-to-one和many-to-oneouter关联的外连接抓取, 它们通过 "
-"<literal>fetch=\"join\"</literal>来映射."
+#, no-c-format
+msgid "Outer join fetching can be disabled <emphasis>globally</emphasis>
by setting the property <literal>hibernate.max_fetch_depth</literal> to
<literal>0</literal>. A setting of <literal>1</literal> or higher
enables outer join fetching for one-to-one and many-to-one associations that have been
mapped with <literal>fetch=\"join\"</literal>."
+msgstr "将 <literal>hibernate.max_fetch_depth</literal> 设为
<literal>0</literal> 能在<emphasis>全局</emphasis> 范围内禁止外连接抓取。设为
<literal>1</literal> 或更高值能启用 one-to-one 和 many-to-oneouter 关联的外连接抓取,它们通过
<literal>fetch=\"join\"</literal> 来映射。 "
#. Tag: para
-#: configuration.xml:1136
#, no-c-format
-msgid "See <xref linkend=\"performance-fetching\"/> for more
information."
-msgstr "参见<xref linkend=\"performance-fetching\"/>获得更多信息."
+msgid "See <xref linkend=\"performance-fetching\" /> for more
information."
+msgstr "参见 <xref linkend=\"performance-fetching\"/> 获得更多信息。 "
#. Tag: title
-#: configuration.xml:1143
#, no-c-format
msgid "Binary Streams"
-msgstr "二进制流 (Binary Streams)"
+msgstr "二进制流(Binary Streams)"
#. Tag: para
-#: configuration.xml:1145
-#, fuzzy, no-c-format
-msgid ""
-"Oracle limits the size of <literal>byte</literal> arrays that can be
passed "
-"to and/or from its JDBC driver. If you wish to use large instances of "
-"<literal>binary</literal> or
<literal>serializable</literal> type, you "
-"should enable <literal>hibernate.jdbc.use_streams_for_binary</literal>.
"
-"<emphasis>This is a system-level setting only.</emphasis>"
-msgstr ""
-"Oracle限制那些通过JDBC驱动传输的<literal>字节</literal>数组的数目. 如果你希望"
-"使用<literal>二进值 (binary)</literal>或 <literal>可序列化的
(serializable)</"
-"literal>类型的大对象, 你应该开启 <literal>hibernate.jdbc."
-"use_streams_for_binary</literal>属性.
<emphasis>这是系统级属性.</emphasis>"
+#, no-c-format
+msgid "Oracle limits the size of <literal>byte</literal> arrays that can
be passed to and/or from its JDBC driver. If you wish to use large instances of
<literal>binary</literal> or <literal>serializable</literal> type,
you should enable <literal>hibernate.jdbc.use_streams_for_binary</literal>.
<emphasis>This is a system-level setting only.</emphasis>"
+msgstr "Oracle 限制那些通过 JDBC
驱动传输的<literal>字节</literal>数组的数目。如果你希望使用<literal>二进值(binary)</literal>或
<literal>可序列化的(serializable)</literal>类型的大对象,你应该开启
<literal>hibernate.jdbc.use_streams_for_binary</literal>
属性。<emphasis>这是系统级属性。</emphasis> "
#. Tag: title
-#: configuration.xml:1156
#, no-c-format
msgid "Second-level and query cache"
msgstr "二级缓存与查询缓存"
#. Tag: para
-#: configuration.xml:1158
-#, fuzzy, no-c-format
-msgid ""
-"The properties prefixed by <literal>hibernate.cache</literal> allow you
to "
-"use a process or cluster scoped second-level cache system with Hibernate. "
-"See the <xref linkend=\"performance-cache\"/> for more
information."
-msgstr ""
-"以<literal>hibernate.cache</literal>为前缀的属性允许你在Hibernate中,使用进程"
-"或群集范围内的二级缓存系统. 参见<xref linkend=\"performance-cache\"/>获取更多"
-"的详情."
+#, no-c-format
+msgid "The properties prefixed by <literal>hibernate.cache</literal>
allow you to use a process or cluster scoped second-level cache system with Hibernate. See
the <xref linkend=\"performance-cache\" /> for more information."
+msgstr "以 <literal>hibernate.cache</literal> 为前缀的属性允许你在 Hibernate
中,使用进程或群集范围内的二级缓存系统。参见 <xref linkend=\"performance-cache\"/>
获取更多的详情。"
#. Tag: title
-#: configuration.xml:1168
#, no-c-format
msgid "Query Language Substitution"
msgstr "查询语言中的替换"
#. Tag: para
-#: configuration.xml:1170
-#, fuzzy, no-c-format
-msgid ""
-"You can define new Hibernate query tokens using
<literal>hibernate.query."
-"substitutions</literal>. For example:"
-msgstr ""
-"你可以使用<literal>hibernate.query.substitutions</literal>在Hibernate中定义新"
-"的查询符号. 例如:"
-
-#. Tag: programlisting
-#: configuration.xml:1175
#, no-c-format
-msgid "hibernate.query.substitutions true=1, false=0"
-msgstr "hibernate.query.substitutions true=1, false=0"
+msgid "You can define new Hibernate query tokens using
<literal>hibernate.query.substitutions</literal>. For example:"
+msgstr "你可以使用 <literal>hibernate.query.substitutions</literal> 在
Hibernate 中定义新的查询符号。例如: "
#. Tag: para
-#: configuration.xml:1177
-#, fuzzy, no-c-format
-msgid ""
-"This would cause the tokens <literal>true</literal> and
<literal>false</"
-"literal> to be translated to integer literals in the generated SQL."
-msgstr ""
-"将导致符号<literal>true</literal>和<literal>false</literal>在生成的SQL中被翻"
-"译成整数常量."
-
-#. Tag: programlisting
-#: configuration.xml:1182
#, no-c-format
-msgid "hibernate.query.substitutions toLowercase=LOWER"
-msgstr "hibernate.query.substitutions toLowercase=LOWER"
+msgid "This would cause the tokens <literal>true</literal> and
<literal>false</literal> to be translated to integer literals in the generated
SQL."
+msgstr "将导致符号 <literal>true</literal> 和
<literal>false</literal> 在生成的 SQL 中被翻译成整数常量。"
#. Tag: para
-#: configuration.xml:1184
-#, fuzzy, no-c-format
-msgid ""
-"This would allow you to rename the SQL <literal>LOWER</literal>
function."
-msgstr "将允许你重命名SQL中的<literal>LOWER</literal>函数."
+#, no-c-format
+msgid "This would allow you to rename the SQL <literal>LOWER</literal>
function."
+msgstr "将允许你重命名 SQL 中的 <literal>LOWER</literal> 函数。"
#. Tag: title
-#: configuration.xml:1191
#, no-c-format
msgid "Hibernate statistics"
-msgstr "Hibernate的统计(statistics)机制"
+msgstr "Hibernate 的统计(statistics)机制"
#. Tag: para
-#: configuration.xml:1193
-#, fuzzy, no-c-format
-msgid ""
-"If you enable <literal>hibernate.generate_statistics</literal>,
Hibernate "
-"exposes a number of metrics that are useful when tuning a running system via
"
-"<literal>SessionFactory.getStatistics()</literal>. Hibernate can even
be "
-"configured to expose these statistics via JMX. Read the Javadoc of the "
-"interfaces in <literal>org.hibernate.stats</literal> for more
information."
-msgstr ""
-"如果你开启<literal>hibernate.generate_statistics</literal>, 那么当你通过 "
-"<literal>SessionFactory.getStatistics()</literal>调整正在运行的系统时,"
-"Hibernate将导出大量有用的数据. Hibernate甚至能被配置成通过JMX导出这些统计信"
-"息. 参考<literal>org.hibernate.stats</literal>中接口的Javadoc,以获得更多信"
-"息."
+#, no-c-format
+msgid "If you enable <literal>hibernate.generate_statistics</literal>,
Hibernate exposes a number of metrics that are useful when tuning a running system via
<literal>SessionFactory.getStatistics()</literal>. Hibernate can even be
configured to expose these statistics via JMX. Read the Javadoc of the interfaces in
<literal>org.hibernate.stats</literal> for more information."
+msgstr "如果你开启 <literal>hibernate.generate_statistics</literal>,那么当你通过
<literal>SessionFactory.getStatistics()</literal> 调整正在运行的系统时,Hibernate
将导出大量有用的数据。Hibernate 甚至能被配置成通过 JMX 导出这些统计信息。参考
<literal>org.hibernate.stats</literal> 中接口的 Javadoc,以获得更多信息。 "
#. Tag: title
-#: configuration.xml:1205
#, no-c-format
msgid "Logging"
msgstr "日志"
#. Tag: para
-#: configuration.xml:1207
#, no-c-format
-msgid ""
-"Hibernate utilizes <ulink
url=\"http://www.slf4j.org/\">Simple
Logging "
-"Facade for Java</ulink> (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
<filename>slf4j-api.jar</"
-"filename> in your classpath together with the jar file for your preferred
"
-"binding - <filename>slf4j-log4j12.jar</filename> in the case of Log4J.
See "
-"the SLF4J <ulink
url=\"http://www.slf4j.org/manual.html\">documentation</&...
-"ulink> for more detail. To use Log4j you will also need to place a "
-"<filename>log4j.properties</filename> file in your classpath. An
example "
-"properties file is distributed with Hibernate in the
<literal>src/</literal> "
-"directory."
-msgstr ""
+msgid "Hibernate utilizes <ulink
url=\"http://www.slf4j.org/\">Simple Logging Facade for Java</ulink>
(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
<filename>slf4j-api.jar</filename> in your classpath together with the jar
file for your preferred binding - <filename>slf4j-log4j12.jar</filename> in
the case of Log4J. See the SLF4J <ulink
url=\"http://www.slf4j.org/manual.html\">documentation</u... for more
detail. To use Log4j you will also need to place a
<filename>log4j.properties</filename> file in your classpath. An example
properties file is distributed with Hibernate in the <literal>src/</literal>
directory."
+msgstr "Hibernate 利用 <ulink
url=\"http://www.slf4j.org/\">Simple
Logging Facade for Java</ulink> (SLF4J) 来记录不同系统事件的日志。SLF4J
可以根据你选择的绑定把日志输出到几个日志框架(NOP、Simple、log4j version 1.2、JDK 1.4 logging、JCL 或
logback)上。为了设置日志,你需要在 classpath 里加入 <filename>slf4j-api.jar</filename>
和你选择的绑定的 JAR 文件(使用 Log4J 时加入 <filename>slf4j-log4j12.jar</filename>)。更多的细节请参考
SLF4J <ulink
url=\"http://www.slf4j.org/manual.html\">文档</ulink>。要使用
Log4j,你也需要在 classpath 里加入 <filename>log4j.properties</filename> 文件。Hibernate
里的 <literal>src/</literal> 目录里带有一个属性文件的例子。"
#. Tag: para
-#: configuration.xml:1218
-#, fuzzy, 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的日志可能地详细. 这是必要的查错利器. 最令人感兴趣的日志分"
-"类有如下这些:"
+#, 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
的日志可能地详细。这是必要的查错利器。最令人感兴趣的日志分类有如下这些:"
#. Tag: title
-#: configuration.xml:1227
#, no-c-format
msgid "Hibernate Log Categories"
-msgstr "Hibernate日志类别"
+msgstr "Hibernate 日志类别"
-#. Tag: entry
-#: configuration.xml:1233
+#. Tag: para
#, no-c-format
msgid "Category"
msgstr "类别"
-#. Tag: entry
-#: configuration.xml:1234
+#. Tag: para
#, no-c-format
msgid "Function"
msgstr "功能"
-#. Tag: literal
-#: configuration.xml:1239
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.SQL"
-msgstr "org.hibernate.SQL"
+msgid "<literal>org.hibernate.SQL</literal>"
+msgstr "<literal>org.hibernate.SQL</literal>"
-#. Tag: entry
-#: configuration.xml:1240
+#. Tag: para
#, no-c-format
msgid "Log all SQL DML statements as they are executed"
-msgstr "在所有SQL DML语句被执行时为它们记录日志"
+msgstr "在所有 SQL DML 语句被执行时为它们记录日志"
-#. Tag: literal
-#: configuration.xml:1243
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.type"
-msgstr "org.hibernate.type"
+msgid "<literal>org.hibernate.type</literal>"
+msgstr "<literal>org.hibernate.type</literal>"
-#. Tag: entry
-#: configuration.xml:1244
+#. Tag: para
#, no-c-format
msgid "Log all JDBC parameters"
-msgstr "为所有JDBC参数记录日志"
+msgstr "为所有 JDBC 参数记录日志"
-#. Tag: literal
-#: configuration.xml:1247
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.tool.hbm2ddl"
-msgstr "org.hibernate.tool.hbm2ddl"
+msgid "<literal>org.hibernate.tool. hbm2ddl</literal>"
+msgstr "<literal>org.hibernate.tool. hbm2ddl</literal>"
-#. Tag: entry
-#: configuration.xml:1248
+#. Tag: para
#, no-c-format
msgid "Log all SQL DDL statements as they are executed"
-msgstr "在所有SQL DDL语句执行时为它们记录日志"
+msgstr "在所有 SQL DDL 语句执行时为它们记录日志"
-#. Tag: literal
-#: configuration.xml:1251
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.pretty"
-msgstr "org.hibernate.pretty"
+msgid "<literal>org.hibernate.pretty</literal>"
+msgstr "<literal>org.hibernate.pretty</literal>"
-#. Tag: entry
-#: configuration.xml:1252
+#. Tag: para
#, 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: literal
-#: configuration.xml:1258
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.cache"
-msgstr "org.hibernate.cache"
+msgid "<literal>org.hibernate.cache</literal>"
+msgstr "<literal>org.hibernate.cache</literal>"
-#. Tag: entry
-#: configuration.xml:1259
+#. Tag: para
#, no-c-format
msgid "Log all second-level cache activity"
msgstr "为所有二级缓存的活动记录日志"
-#. Tag: literal
-#: configuration.xml:1262
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction"
-msgstr "org.hibernate.transaction"
+msgid "<literal>org.hibernate. transaction</literal>"
+msgstr "<literal>org.hibernate. transaction</literal>"
-#. Tag: entry
-#: configuration.xml:1263
+#. Tag: para
#, no-c-format
msgid "Log transaction related activity"
msgstr "为事务相关的活动记录日志"
-#. Tag: literal
-#: configuration.xml:1266
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.jdbc"
-msgstr "org.hibernate.jdbc"
+msgid "<literal>org.hibernate.jdbc</literal>"
+msgstr "<literal>org.hibernate.jdbc</literal>"
-#. Tag: entry
-#: configuration.xml:1267
+#. Tag: para
#, no-c-format
msgid "Log all JDBC resource acquisition"
-msgstr "为所有JDBC资源的获取记录日志"
+msgstr "为所有 JDBC 资源的获取记录日志"
-#. Tag: literal
-#: configuration.xml:1270
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.hql.ast.AST"
-msgstr "org.hibernate.hql.AST"
+msgid "<literal>org.hibernate.hql. ast.AST</literal>"
+msgstr "<literal>org.hibernate.hql. ast.AST</literal>"
-#. Tag: entry
-#: configuration.xml:1271
+#. Tag: para
#, no-c-format
msgid "Log HQL and SQL ASTs during query parsing"
-msgstr "在解析查询的时候,记录HQL和SQL的AST分析日志"
+msgstr "在解析查询的时候,记录 HQL 和 SQL 的 AST 分析日志"
-#. Tag: literal
-#: configuration.xml:1276
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.secure"
-msgstr "org.hibernate.secure"
+msgid "<literal>org.hibernate.secure</literal>"
+msgstr "<literal>org.hibernate.secure</literal>"
-#. Tag: entry
-#: configuration.xml:1277
+#. Tag: para
#, no-c-format
msgid "Log all JAAS authorization requests"
-msgstr "为JAAS认证请求做日志"
+msgstr "为 JAAS 认证请求做日志"
-#. Tag: literal
-#: configuration.xml:1280
+#. Tag: para
#, no-c-format
-msgid "org.hibernate"
-msgstr "org.hibernate"
+msgid "<literal>org.hibernate</literal>"
+msgstr "<literal>org.hibernate</literal>"
-#. Tag: entry
-#: configuration.xml:1281
-#, fuzzy, no-c-format
-msgid ""
-"Log everything. This is a lot of information but it is useful for "
-"troubleshooting"
-msgstr "为任何Hibernate相关信息做日志 (信息量较大, 但对查错非常有帮助)"
+#. Tag: para
+#, no-c-format
+msgid "Log everything. This is a lot of information but it is useful for
troubleshooting"
+msgstr "为任何 Hibernate 相关信息记录日志(信息量较大,但对查错非常有帮助)"
#. Tag: para
-#: configuration.xml:1290
#, no-c-format
-msgid ""
-"When developing applications with Hibernate, you should almost always work "
-"with <literal>debug</literal> enabled for the category
<literal>org."
-"hibernate.SQL</literal>, or, alternatively, the property
<literal>hibernate."
-"show_sql</literal> enabled."
-msgstr ""
-"在使用Hibernate开发应用程序时, 你应当总是为<literal>org.hibernate.SQL</"
-"literal> 开启<literal>debug</literal>级别的日志记录,或者开启"
-"<literal>hibernate.show_sql</literal>属性。"
+msgid "When developing applications with Hibernate, you should almost always work
with <literal>debug</literal> enabled for the category
<literal>org.hibernate.SQL</literal>, or, alternatively, the property
<literal>hibernate.show_sql</literal> enabled."
+msgstr "在使用 Hibernate 开发应用程序时,你应当总是为
<literal>org.hibernate.SQL</literal> 开启 <literal>debug</literal>
级别的日志记录,或者开启 <literal>hibernate.show_sql</literal> 属性。"
#. Tag: title
-#: configuration.xml:1300
#, no-c-format
msgid "Implementing a <literal>NamingStrategy</literal>"
-msgstr "实现<literal>NamingStrategy</literal>"
+msgstr "实现 <literal>NamingStrategy</literal>"
#. Tag: para
-#: configuration.xml:1302
#, no-c-format
-msgid ""
-"The interface <literal>org.hibernate.cfg.NamingStrategy</literal>
allows you "
-"to specify a \"naming standard\" for database objects and schema
elements."
-msgstr ""
-"<literal>org.hibernate.cfg.NamingStrategy</literal>接口允许你为数据库中的对象"
-"和schema 元素指定一个“命名标准”."
+msgid "The interface <literal>org.hibernate.cfg.NamingStrategy</literal>
allows you to specify a \"naming standard\" for database objects and schema
elements."
+msgstr "<literal>org.hibernate.cfg.NamingStrategy</literal>
接口允许你为数据库中的对象和 schema 元素指定一个“命名标准”。"
#. Tag: para
-#: configuration.xml:1307
-#, fuzzy, 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 (<literal>TBL_</literal> prefixes, for example). The default
strategy "
-"used by Hibernate is quite minimal."
-msgstr ""
-"你可能会提供一些通过Java标识生成数据库标识或将映射定义文件中\"逻辑\"表/列名处"
-"理成\"物理\"表/列名的规则. 这个特性有助于减少冗长的映射定义文件."
+#, 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
(<literal>TBL_</literal> prefixes, for example). The default strategy used by
Hibernate is quite minimal."
+msgstr "你可能会提供一些通过 Java
标识生成数据库标识或将映射定义文件中\"逻辑\"表/列名处理成\"物理\"表/列名的规则。这个特性有助于减少冗长的映射定义文件,消除重复内容(如
<literal>TBL_</literal> 前缀)。Hibernate 使用的缺省策略是相当精简的。"
#. Tag: para
-#: configuration.xml:1316
-#, fuzzy, no-c-format
-msgid ""
-"You can specify a different strategy by calling
<literal>Configuration."
-"setNamingStrategy()</literal> before adding mappings:"
-msgstr ""
-"在加入映射定义前,你可以调用 <literal>Configuration.setNamingStrategy()</"
-"literal>指定一个不同的命名策略:"
-
-#. Tag: programlisting
-#: configuration.xml:1321
#, no-c-format
-msgid ""
-"<![CDATA[SessionFactory sf = new Configuration()\n"
-" .setNamingStrategy(ImprovedNamingStrategy.INSTANCE)\n"
-" .addFile(\"Item.hbm.xml\")\n"
-" .addFile(\"Bid.hbm.xml\")\n"
-" .buildSessionFactory();]]>"
-msgstr ""
+msgid "You can specify a different strategy by calling
<literal>Configuration.setNamingStrategy()</literal> before adding
mappings:"
+msgstr "在加入映射定义前,你可以调用
<literal>Configuration.setNamingStrategy()</literal> 指定一个不同的命名策略: "
#. Tag: para
-#: configuration.xml:1323
#, no-c-format
-msgid ""
-"<literal>org.hibernate.cfg.ImprovedNamingStrategy</literal> is a
built-in "
-"strategy that might be a useful starting point for some applications."
-msgstr ""
-"<literal>org.hibernate.cfg.ImprovedNamingStrategy</literal>是一个内建的命名策"
-"略, 对 一些应用程序而言,可能是非常有用的起点."
+msgid "<literal>org.hibernate.cfg.ImprovedNamingStrategy</literal> is a
built-in strategy that might be a useful starting point for some applications."
+msgstr "<literal>org.hibernate.cfg.ImprovedNamingStrategy</literal>
是一个内建的命名策略,对一些应用程序而言,可能是非常有用的起点。"
#. Tag: title
-#: configuration.xml:1331
#, no-c-format
msgid "XML configuration file"
-msgstr "XML配置文件"
+msgstr "XML 配置文件"
#. Tag: para
-#: configuration.xml:1333
#, no-c-format
-msgid ""
-"An alternative approach to configuration is to specify a full configuration "
-"in a file named <literal>hibernate.cfg.xml</literal>. This file can be
used "
-"as a replacement for the <literal>hibernate.properties</literal> file
or, if "
-"both are present, to override properties."
-msgstr ""
-"另一个配置方法是在<literal>hibernate.cfg.xml</literal>文件中指定一套完整的配"
-"置. 这个文件可以当成<literal>hibernate.properties</literal>的替代。 若两个文"
-"件同时存在,它将覆盖前者的属性."
+msgid "An alternative approach to configuration is to specify a full configuration
in a file named <literal>hibernate.cfg.xml</literal>. This file can be used as
a replacement for the <literal>hibernate.properties</literal> file or, if both
are present, to override properties."
+msgstr "另一个配置方法是在 <literal>hibernate.cfg.xml</literal>
文件中指定一套完整的配置。这个文件可以当成 <literal>hibernate.properties</literal>
的替代。若两个文件同时存在,它将覆盖前者的属性。"
#. Tag: para
-#: configuration.xml:1340
-#, fuzzy, no-c-format
-msgid ""
-"The XML configuration file is by default expected to be in the root of your "
-"<literal>CLASSPATH</literal>. Here is an example:"
-msgstr ""
-"XML配置文件被默认是放在<literal>CLASSPATH</literal>的根目录下. 这是一个例子:"
-
-#. Tag: programlisting
-#: configuration.xml:1345
#, no-c-format
-msgid ""
-"<![CDATA[<?xml version='1.0' encoding='utf-8'?>\n"
-"<!DOCTYPE hibernate-configuration PUBLIC\n"
-" \"-//Hibernate/Hibernate Configuration DTD//EN\"\n"
-"
\"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd\">\n"
-"\n"
-"<hibernate-configuration>\n"
-"\n"
-" <!-- a SessionFactory instance listed as /jndi/name -->\n"
-" <session-factory\n"
-" name=\"java:hibernate/SessionFactory\">\n"
-"\n"
-" <!-- properties -->\n"
-" <property
name=\"connection.datasource\">java:/comp/env/jdbc/MyDB</"
-"property>\n"
-" <property
name=\"dialect\">org.hibernate.dialect.MySQLDialect</"
-"property>\n"
-" <property name=\"show_sql\">false</property>\n"
-" <property name=\"transaction.factory_class\">\n"
-" org.hibernate.transaction.JTATransactionFactory\n"
-" </property>\n"
-" <property
name=\"jta.UserTransaction\">java:comp/UserTransaction</"
-"property>\n"
-"\n"
-" <!-- mapping files -->\n"
-" <mapping
resource=\"org/hibernate/auction/Item.hbm.xml\"/>\n"
-" <mapping
resource=\"org/hibernate/auction/Bid.hbm.xml\"/>\n"
-"\n"
-" <!-- cache settings -->\n"
-" <class-cache class=\"org.hibernate.auction.Item\"
usage=\"read-write"
-"\"/>\n"
-" <class-cache class=\"org.hibernate.auction.Bid\"
usage=\"read-only\"/"
-">\n"
-" <collection-cache
collection=\"org.hibernate.auction.Item.bids\" "
-"usage=\"read-write\"/>\n"
-"\n"
-" </session-factory>\n"
-"\n"
-"</hibernate-configuration>]]>"
-msgstr ""
+msgid "The XML configuration file is by default expected to be in the root of your
<literal>CLASSPATH</literal>. Here is an example:"
+msgstr "XML 配置文件被默认是放在 <literal>CLASSPATH</literal> 的根目录下。下面是一个例子:
"
#. Tag: para
-#: configuration.xml:1347
-#, fuzzy, no-c-format
-msgid ""
-"The advantage of this approach is the externalization of the mapping file "
-"names to configuration. The <literal>hibernate.cfg.xml</literal> is
also "
-"more convenient once you have to tune the Hibernate cache. It is your choice
"
-"to use either <literal>hibernate.properties</literal> or
<literal>hibernate."
-"cfg.xml</literal>. Both are equivalent, except for the above mentioned
"
-"benefits of using the XML syntax."
-msgstr ""
-"如你所见, 这个方法优势在于,在配置文件中指出了映射定义文件的名字. 一旦你需要"
-"调整Hibernate的缓存, <literal>hibernate.cfg.xml</literal>也是更方便. 注意,"
-"使用<literal>hibernate.properties</literal>还是
<literal>hibernate.cfg.xml</"
-"literal>完全是由你来决定, 除了上面提到的XML语法的优势之外, 两者是等价的."
+#, no-c-format
+msgid "The advantage of this approach is the externalization of the mapping file
names to configuration. The <literal>hibernate.cfg.xml</literal> is also more
convenient once you have to tune the Hibernate cache. It is your choice to use either
<literal>hibernate.properties</literal> or
<literal>hibernate.cfg.xml</literal>. Both are equivalent, except for the
above mentioned benefits of using the XML syntax."
+msgstr "如你所见,这个方法优势在于,在配置文件中指出了映射定义文件的名字。一旦你需要调整 Hibernate
的缓存,<literal>hibernate.cfg.xml</literal> 也是更方便。注意,使用
<literal>hibernate.properties</literal> 还是
<literal>hibernate.cfg.xml</literal> 完全是由你来决定,除了上面提到的 XML 语法的优势之外,两者是等价的。
"
#. Tag: para
-#: configuration.xml:1356
-#, fuzzy, no-c-format
+#, no-c-format
msgid "With the XML configuration, starting Hibernate is then as simple as:"
-msgstr ""
-"使用XML配置,使得启动Hibernate变的异常简单, 如下所示,一行代码就可以搞定:"
+msgstr "使用 XML 配置,使得启动 Hibernate 变的异常简单:"
-#. Tag: programlisting
-#: configuration.xml:1360
-#, no-c-format
-msgid ""
-"<![CDATA[SessionFactory sf = new Configuration().configure()."
-"buildSessionFactory();]]>"
-msgstr ""
-
#. Tag: para
-#: configuration.xml:1362
-#, fuzzy, no-c-format
+#, no-c-format
msgid "You can select a different XML configuration file using:"
-msgstr "你可以使用如下代码来添加一个不同的XML配置文件"
+msgstr "你可以使用如下代码来添加一个不同的 XML 配置文件:"
-#. Tag: programlisting
-#: configuration.xml:1366
-#, no-c-format
-msgid ""
-"<![CDATA[SessionFactory sf = new Configuration()\n"
-" .configure(\"catdb.cfg.xml\")\n"
-" .buildSessionFactory();]]>"
-msgstr ""
-
#. Tag: title
-#: configuration.xml:1371
#, no-c-format
msgid "J2EE Application Server integration"
-msgstr "J2EE应用程序服务器的集成"
+msgstr "J2EE 应用程序服务器的集成"
#. Tag: para
-#: configuration.xml:1373
#, no-c-format
msgid "Hibernate has the following integration points for J2EE
infrastructure:"
-msgstr "针对J2EE体系,Hibernate有如下几个集成的方面:"
+msgstr "针对 J2EE 体系,Hibernate 有如下几个集成的方面:"
#. Tag: para
-#: configuration.xml:1379
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Container-managed datasources</emphasis>: Hibernate can use
JDBC "
-"connections managed by the container and provided through JNDI. Usually, a "
-"JTA compatible <literal>TransactionManager</literal> and a "
-"<literal>ResourceManager</literal> take care of transaction management
"
-"(CMT), especially distributed transaction handling across several "
-"datasources. You can also demarcate transaction boundaries programmatically "
-"(BMT), or you might want to use the optional Hibernate
<literal>Transaction</"
-"literal> API for this to keep your code portable."
-msgstr ""
-"<emphasis>容器管理的数据源(Container-managed datasources)</emphasis>: "
-"Hibernate能使用通过容器管理,并由JNDI提供的JDBC连接. 通常, 特别是当处理多个数"
-"据源的分布式事务的时候, 由一个JTA兼容的<literal>TransactionManager</literal>"
-"和一个 <literal>ResourceManager</literal>来处理事务管理(CMT, 容器管理的事"
-"务). 当然你可以通过 编程方式来划分事务边界(BMT, Bean管理的事务). 或者为了代码"
-"的可移植性,你也也许会想使用可选的 Hibernate <literal>Transaction</literal> "
-"API."
+#, no-c-format
+msgid "<emphasis>Container-managed datasources</emphasis>: Hibernate can
use JDBC connections managed by the container and provided through JNDI. Usually, a JTA
compatible <literal>TransactionManager</literal> and a
<literal>ResourceManager</literal> take care of transaction management (CMT),
especially distributed transaction handling across several datasources. You can also
demarcate transaction boundaries programmatically (BMT), or you might want to use the
optional Hibernate <literal>Transaction</literal> API for this to keep your
code portable."
+msgstr "<emphasis>容器管理的数据源(Container-managed datasources)</emphasis>:
Hibernate 能使用通过容器管理,并由 JNDI 提供的 JDBC 连接。通常,特别是当处理多个数据源的分布式事务的时候,由一个 JTA 兼容的
<literal>TransactionManager</literal> 和一个
<literal>ResourceManager</literal> 来处理事务管理(CMT,容器管理的事务)。当然你可以通过
编程方式来划分事务边界(BMT,Bean 管理的事务)。或者为了代码的可移植性,你也也许会想使用可选的 Hibernate
<literal>Transaction</literal> API。 "
#. Tag: para
-#: configuration.xml:1394
#, no-c-format
-msgid ""
-"<emphasis>Automatic JNDI binding</emphasis>: Hibernate can bind its
"
-"<literal>SessionFactory</literal> to JNDI after startup."
-msgstr ""
-"<emphasis>自动JNDI绑定</emphasis>: Hibernate可以在启动后将 "
-"<literal>SessionFactory</literal>绑定到JNDI."
+msgid "<emphasis>Automatic JNDI binding</emphasis>: Hibernate can bind
its <literal>SessionFactory</literal> to JNDI after startup."
+msgstr "<emphasis>自动 JNDI 绑定</emphasis>:Hibernate 可以在启动后将
<literal>SessionFactory</literal> 绑定到 JNDI。"
#. Tag: para
-#: configuration.xml:1403
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>JTA Session binding:</emphasis> the Hibernate
<literal>Session</"
-"literal> can be automatically bound to the scope of JTA transactions. Simply
"
-"lookup the <literal>SessionFactory</literal> from JNDI and get the
current "
-"<literal>Session</literal>. Let Hibernate manage flushing and closing
the "
-"<literal>Session</literal> when your JTA transaction completes.
Transaction "
-"demarcation is either declarative (CMT) or programmatic (BMT/"
-"UserTransaction)."
-msgstr ""
-"<emphasis>JTA Session绑定:</emphasis> Hibernate
<literal>Session</literal> 可"
-"以自动绑定到JTA事务作用的范围. 只需简单地从JNDI查找<literal>SessionFactory</"
-"literal>并获得当前的 <literal>Session</literal>. 当JTA事务完成时,
让Hibernate"
-"来处理 <literal>Session</literal>的清洗(flush)与关闭. 事务的划分可以是声明式"
-"的(CMT),也可以是编程式的(BMT/UserTransaction)."
+#, no-c-format
+msgid "<emphasis>JTA Session binding:</emphasis> the Hibernate
<literal>Session</literal> can be automatically bound to the scope of JTA
transactions. Simply lookup the <literal>SessionFactory</literal> from JNDI
and get the current <literal>Session</literal>. Let Hibernate manage flushing
and closing the <literal>Session</literal> when your JTA transaction
completes. Transaction demarcation is either declarative (CMT) or programmatic
(BMT/UserTransaction)."
+msgstr "<emphasis>JTA Session 绑定:</emphasis> Hibernate
<literal>Session</literal> 可以自动绑定到 JTA 事务作用的范围。只需简单地从 JNDI 查找
<literal>SessionFactory</literal> 并获得当前的
<literal>Session</literal>。当 JTA 事务完成时,让 Hibernate来处理
<literal>Session</literal>
的清洗(flush)与关闭。事务的划分可以是声明式的(CMT),也可以是编程式的(BMT/UserTransaction)。 "
#. Tag: para
-#: configuration.xml:1416
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>JMX deployment:</emphasis> 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 "
-"<literal>SessionFactory</literal> from a
<literal>Configuration</literal>. "
-"The container will startup your <literal>HibernateService</literal> and
also "
-"take care of service dependencies (datasource has to be available before "
-"Hibernate starts, etc)."
-msgstr ""
-"<emphasis>JMX部署:</emphasis> 如果你使用支持JMX应用程序服务器(如, JBoss AS), "
-"那么你可以选择将Hibernate部署成托管MBean. 这将为你省去一行从"
-"<literal>Configuration</literal>构建<literal>SessionFactory</literal>的启动代"
-"码. 容器将启动你的<literal>HibernateService</literal>, 并完美地处理好服务间的"
-"依赖关系 (在Hibernate启动前,数据源必须是可用的,等等)."
+#, no-c-format
+msgid "<emphasis>JMX deployment:</emphasis> 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
<literal>SessionFactory</literal> from a
<literal>Configuration</literal>. The container will startup your
<literal>HibernateService</literal> and also take care of service dependencies
(datasource has to be available before Hibernate starts, etc)."
+msgstr "<emphasis>JMX 部署:</emphasis> 如果你使用支持 JMX 应用程序服务器(如,JBoss
AS),那么你可以选择将 Hibernate 部署成托管 MBean。这将为你省去一行从<literal>Configuration</literal>
构建 <literal>SessionFactory</literal> 的启动代码。容器将启动你的
<literal>HibernateService</literal>,并完美地处理好服务间的依赖关系(在 Hibernate
启动前,数据源必须是可用的,等等)。 "
#. Tag: para
-#: configuration.xml:1427
#, no-c-format
-msgid ""
-"Depending on your environment, you might have to set the configuration "
-"option <literal>hibernate.connection.aggressive_release</literal> to
true if "
-"your application server shows \"connection containment\"
exceptions."
-msgstr ""
-"如果应用程序服务器抛出\"connection containment\"异常, 根据你的环境,也许该将"
-"配置属性 <literal>hibernate.connection.release_mode</literal>设为"
-"<literal>after_statement</literal>."
+msgid "Depending on your environment, you might have to set the configuration option
<literal>hibernate.connection.aggressive_release</literal> to true if your
application server shows \"connection containment\" exceptions."
+msgstr "如果应用程序服务器抛出 \"connection containment\" 异常,根据你的环境,也许该将配置属性
<literal>hibernate.connection.release_mode</literal> 设为
<literal>after_statement</literal>。"
#. Tag: title
-#: configuration.xml:1434
#, no-c-format
msgid "Transaction strategy configuration"
msgstr "事务策略配置"
#. Tag: para
-#: configuration.xml:1436
-#, fuzzy, no-c-format
-msgid ""
-"The Hibernate <literal>Session</literal> API is independent of any
"
-"transaction demarcation system in your architecture. If you let Hibernate "
-"use JDBC directly through a connection pool, you 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 <literal>UserTransaction</literal> when needed."
-msgstr ""
-"在你的架构中,Hibernate的<literal>Session</literal> API是独立于任何事务分界系"
-"统的. 如果你让Hibernate通过连接池直接使用JDBC, 你需要调用JDBC API来打开和关闭"
-"你的事务. 如果你运行在J2EE应用程序服务器中, 你也许想用Bean管理的事务并在需要"
-"的时候调用JTA API和<literal>UserTransaction</literal>."
+#, no-c-format
+msgid "The Hibernate <literal>Session</literal> API is independent of
any transaction demarcation system in your architecture. If you let Hibernate use JDBC
directly through a connection pool, you 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 <literal>UserTransaction</literal> when
needed."
+msgstr "在你的架构中,Hibernate 的 <literal>Session</literal> API
是独立于任何事务分界系统的。如果你让 Hibernate 通过连接池直接使用 JDBC,你需要调用 JDBC API 来打开和关闭你的事务。如果你运行在 J2EE
应用程序服务器中,你也许想用 Bean 管理的事务并在需要的时候调用 JTA API 和
<literal>UserTransaction</literal>。 "
#. Tag: para
-#: configuration.xml:1444
#, no-c-format
-msgid ""
-"To keep your code portable between these two (and other) environments we "
-"recommend the optional Hibernate <literal>Transaction</literal> API,
which "
-"wraps and hides the underlying system. You have to specify a factory class "
-"for <literal>Transaction</literal> instances by setting the Hibernate
"
-"configuration property
<literal>hibernate.transaction.factory_class</"
-"literal>."
-msgstr ""
-"为了让你的代码在两种(或其他)环境中可以移植,我们建议使用可选的Hibernate "
-"<literal>Transaction</literal> API, 它包装并隐藏了底层系统. 你必须通过设置"
-"Hibernate配置属性<literal>hibernate.transaction.factory_class</literal>来指"
-"定 一个<literal>Transaction</literal>实例的工厂类."
+msgid "To keep your code portable between these two (and other) environments we
recommend the optional Hibernate <literal>Transaction</literal> API, which
wraps and hides the underlying system. You have to specify a factory class for
<literal>Transaction</literal> instances by setting the Hibernate
configuration property
<literal>hibernate.transaction.factory_class</literal>."
+msgstr "为了让你的代码在两种(或其他)环境中可以移植,我们建议使用可选的 Hibernate
<literal>Transaction</literal> API,它包装并隐藏了底层系统。你必须通过设置 Hibernate 配置属性
<literal>hibernate.transaction.factory_class</literal> 来指定一个
<literal>Transaction</literal> 实例的工厂类。"
#. Tag: para
-#: configuration.xml:1451
-#, fuzzy, no-c-format
+#, no-c-format
msgid "There are three standard, or built-in, choices:"
-msgstr "有三个标准(内建)的选择:"
+msgstr "有三个标准(内建)的选择: "
-#. Tag: literal
-#: configuration.xml:1457
+#. Tag: term
#, no-c-format
-msgid "org.hibernate.transaction.JDBCTransactionFactory"
-msgstr "org.hibernate.transaction.JDBCTransactionFactory"
+msgid
"<literal>org.hibernate.transaction.JDBCTransactionFactory</literal>"
+msgstr
"<literal>org.hibernate.transaction.JDBCTransactionFactory</literal>"
#. Tag: para
-#: configuration.xml:1459
#, no-c-format
msgid "delegates to database (JDBC) transactions (default)"
-msgstr "委托给数据库(JDBC)事务(默认)"
+msgstr "委托给数据库(JDBC)事务(默认)"
-#. Tag: literal
-#: configuration.xml:1463
+#. Tag: term
#, no-c-format
-msgid "org.hibernate.transaction.JTATransactionFactory"
-msgstr "org.hibernate.transaction.JTATransactionFactory"
+msgid
"<literal>org.hibernate.transaction.JTATransactionFactory</literal>"
+msgstr
"<literal>org.hibernate.transaction.JTATransactionFactory</literal>"
#. Tag: para
-#: configuration.xml:1465
-#, fuzzy, 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管理的事务."
+#, 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
管理的事务。"
-#. Tag: literal
-#: configuration.xml:1473
+#. Tag: term
#, no-c-format
-msgid "org.hibernate.transaction.CMTTransactionFactory"
-msgstr "org.hibernate.transaction.CMTTransactionFactory"
+msgid
"<literal>org.hibernate.transaction.CMTTransactionFactory</literal>"
+msgstr
"<literal>org.hibernate.transaction.CMTTransactionFactory</literal>"
#. Tag: para
-#: configuration.xml:1475
#, no-c-format
msgid "delegates to container-managed JTA transactions"
-msgstr "委托给容器管理的JTA事务"
+msgstr "委托给容器管理的 JTA 事务"
#. Tag: para
-#: configuration.xml:1480
-#, fuzzy, no-c-format
-msgid ""
-"You can also define your own transaction strategies (for a CORBA transaction
"
-"service, for example)."
-msgstr "你也可以定义属于你自己的事务策略 (如, 针对CORBA的事务服务)"
+#, no-c-format
+msgid "You can also define your own transaction strategies (for a CORBA transaction
service, for example)."
+msgstr "你也可以定义属于你自己的事务策略(如,针对 CORBA 的事务服务)。"
#. Tag: para
-#: configuration.xml:1485
-#, fuzzy, no-c-format
-msgid ""
-"Some features in Hibernate (i.e., the second level cache, Contextual "
-"Sessions with JTA, etc.) require access to the JTA "
-"<literal>TransactionManager</literal> in a managed environment. In an
"
-"application server, since J2EE does not standardize a single mechanism, you "
-"have to specify how Hibernate should obtain a reference to the "
-"<literal>TransactionManager</literal>:"
-msgstr ""
-"Hibernate的一些特性 (比如二级缓存, Contextual Sessions with JTA等等)需要访问"
-"在托管环境中的JTA <literal>TransactionManager</literal>. 由于J2EE没有标准化一"
-"个单一的机制,Hibernate在应用程序服务器中,你必须指定Hibernate如何获得"
-"<literal>TransactionManager</literal>的引用:"
+#, no-c-format
+msgid "Some features in Hibernate (i.e., the second level cache, Contextual Sessions
with JTA, etc.) require access to the JTA
<literal>TransactionManager</literal> in a managed environment. In an
application server, since J2EE does not standardize a single mechanism, you have to
specify how Hibernate should obtain a reference to the
<literal>TransactionManager</literal>:"
+msgstr "Hibernate 的一些特性(比如二级缓存,Contextual Sessions with JTA 等等)需要访问在托管环境中的 JTA
<literal>TransactionManager</literal>。由于 J2EE 没有标准化一个单一的机制,Hibernate
在应用程序服务器中,你必须指定 Hibernate 如何获得 <literal>TransactionManager</literal> 的引用:
"
#. Tag: title
-#: configuration.xml:1493
#, no-c-format
msgid "JTA TransactionManagers"
msgstr "JTA TransactionManagers"
-#. Tag: entry
-#: configuration.xml:1499
+#. Tag: para
#, no-c-format
msgid "Transaction Factory"
-msgstr "Transaction工厂类"
+msgstr "Transaction 工厂类"
-#. Tag: entry
-#: configuration.xml:1500
+#. Tag: para
#, no-c-format
msgid "Application Server"
msgstr "应用程序服务器"
-#. Tag: literal
-#: configuration.xml:1505
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction.JBossTransactionManagerLookup"
-msgstr "org.hibernate.transaction.JBossTransactionManagerLookup"
+msgid "<literal>org.hibernate.transaction.
JBossTransactionManagerLookup</literal>"
+msgstr "<literal>org.hibernate.transaction.
JBossTransactionManagerLookup</literal>"
-#. Tag: entry
-#: configuration.xml:1506
+#. Tag: para
#, no-c-format
msgid "JBoss"
msgstr "JBoss"
-#. Tag: literal
-#: configuration.xml:1509
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup"
-msgstr "org.hibernate.transaction.WeblogicTransactionManagerLookup"
+msgid "<literal>org.hibernate.transaction.
WeblogicTransactionManagerLookup</literal>"
+msgstr "<literal>org.hibernate.transaction.
WeblogicTransactionManagerLookup</literal>"
-#. Tag: entry
-#: configuration.xml:1510
+#. Tag: para
#, no-c-format
msgid "Weblogic"
msgstr "Weblogic"
-#. Tag: literal
-#: configuration.xml:1513
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup"
-msgstr "org.hibernate.transaction.WebSphereTransactionManagerLookup"
+msgid "<literal>org.hibernate.transaction.
WebSphereTransactionManagerLookup</literal>"
+msgstr "<literal>org.hibernate.transaction.
WebSphereTransactionManagerLookup</literal>"
-#. Tag: entry
-#: configuration.xml:1514
+#. Tag: para
#, no-c-format
msgid "WebSphere"
msgstr "WebSphere"
-#. Tag: literal
-#: configuration.xml:1517
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"
-msgstr "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"
+msgid "<literal>org.hibernate.transaction.
WebSphereExtendedJTATransactionLookup</literal>"
+msgstr "<literal>org.hibernate.transaction.
WebSphereExtendedJTATransactionLookup</literal>"
-#. Tag: entry
-#: configuration.xml:1518
+#. Tag: para
#, no-c-format
msgid "WebSphere 6"
msgstr "WebSphere 6"
-#. Tag: literal
-#: configuration.xml:1521
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction.OrionTransactionManagerLookup"
-msgstr "org.hibernate.transaction.OrionTransactionManagerLookup"
+msgid "<literal>org.hibernate.transaction.
OrionTransactionManagerLookup</literal>"
+msgstr "<literal>org.hibernate.transaction.
OrionTransactionManagerLookup</literal>"
-#. Tag: entry
-#: configuration.xml:1522
+#. Tag: para
#, no-c-format
msgid "Orion"
msgstr "Orion"
-#. Tag: literal
-#: configuration.xml:1525
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction.ResinTransactionManagerLookup"
-msgstr "org.hibernate.transaction.ResinTransactionManagerLookup"
+msgid "<literal>org.hibernate.transaction.
ResinTransactionManagerLookup</literal>"
+msgstr "<literal>org.hibernate.transaction.
ResinTransactionManagerLookup</literal>"
-#. Tag: entry
-#: configuration.xml:1526
+#. Tag: para
#, no-c-format
msgid "Resin"
msgstr "Resin"
-#. Tag: literal
-#: configuration.xml:1529
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction.JOTMTransactionManagerLookup"
-msgstr "org.hibernate.transaction.JOTMTransactionManagerLookup"
+msgid "<literal>org.hibernate.transaction.
JOTMTransactionManagerLookup</literal>"
+msgstr "<literal>org.hibernate.transaction.
JOTMTransactionManagerLookup</literal>"
-#. Tag: entry
-#: configuration.xml:1530
+#. Tag: para
#, no-c-format
msgid "JOTM"
msgstr "JOTM"
-#. Tag: literal
-#: configuration.xml:1533
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction.JOnASTransactionManagerLookup"
-msgstr "org.hibernate.transaction.JOnASTransactionManagerLookup"
+msgid "<literal>org.hibernate.transaction.
JOnASTransactionManagerLookup</literal>"
+msgstr "<literal>org.hibernate.transaction.
JOnASTransactionManagerLookup</literal>"
-#. Tag: entry
-#: configuration.xml:1534
+#. Tag: para
#, no-c-format
msgid "JOnAS"
msgstr "JOnAS"
-#. Tag: literal
-#: configuration.xml:1537
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction.JRun4TransactionManagerLookup"
-msgstr "org.hibernate.transaction.JRun4TransactionManagerLookup"
+msgid "<literal>org.hibernate.transaction.
JRun4TransactionManagerLookup</literal>"
+msgstr "<literal>org.hibernate.transaction.
JRun4TransactionManagerLookup</literal>"
-#. Tag: entry
-#: configuration.xml:1538
+#. Tag: para
#, no-c-format
msgid "JRun4"
msgstr "JRun4"
-#. Tag: literal
-#: configuration.xml:1541
+#. Tag: para
#, no-c-format
-msgid "org.hibernate.transaction.BESTransactionManagerLookup"
-msgstr "org.hibernate.transaction.BESTransactionManagerLookup"
+msgid "<literal>org.hibernate.transaction.
BESTransactionManagerLookup</literal>"
+msgstr "<literal>org.hibernate.transaction.
BESTransactionManagerLookup</literal>"
-#. Tag: entry
-#: configuration.xml:1542
+#. Tag: para
#, no-c-format
msgid "Borland ES"
msgstr "Borland ES"
#. Tag: title
-#: configuration.xml:1551
#, no-c-format
msgid "JNDI-bound <literal>SessionFactory</literal>"
-msgstr "JNDI绑定的<literal>SessionFactory</literal>"
+msgstr "JNDI 绑定的 <literal>SessionFactory</literal>"
#. Tag: para
-#: configuration.xml:1553
-#, fuzzy, no-c-format
-msgid ""
-"A JNDI-bound Hibernate <literal>SessionFactory</literal> can simplify
the "
-"lookup function of the factory and create new
<literal>Session</literal>s. "
-"This is not, however, related to a JNDI bound
<literal>Datasource</literal>; "
-"both simply use the same registry."
-msgstr ""
-"与JNDI绑定的Hibernate的<literal>SessionFactory</literal>能简化工厂的查询,简"
-"化创建新的<literal>Session</literal>. 需要注意的是这与JNDI绑定"
-"<literal>Datasource</literal>没有关系, 它们只是恰巧用了相同的注册表!"
+#, no-c-format
+msgid "A JNDI-bound Hibernate <literal>SessionFactory</literal> can
simplify the lookup function of the factory and create new
<literal>Session</literal>s. This is not, however, related to a JNDI bound
<literal>Datasource</literal>; both simply use the same registry."
+msgstr "与 JNDI 绑定的 Hibernate 的 <literal>SessionFactory</literal>
能简化工厂的查询,简化创建新的 <literal>Session</literal>。需要注意的是这与 JNDI 绑定
<literal>Datasource</literal> 没有关系,它们只是恰巧用了相同的注册表。"
#. Tag: para
-#: configuration.xml:1560
-#, fuzzy, no-c-format
-msgid ""
-"If you wish to have the <literal>SessionFactory</literal> bound to a
JNDI "
-"namespace, specify a name (e.g.
<literal>java:hibernate/SessionFactory</"
-"literal>) using the property
<literal>hibernate.session_factory_name</"
-"literal>. If this property is omitted, the
<literal>SessionFactory</literal> "
-"will not be bound to JNDI. This is especially useful in environments with a "
-"read-only JNDI default implementation (in Tomcat, for example)."
-msgstr ""
-"如果你希望将<literal>SessionFactory</literal>绑定到一个JNDI的名字空间, 用属性"
-"<literal>hibernate.session_factory_name</literal>指定一个名字(如, "
-"<literal>java:hibernate/SessionFactory</literal>). 如果不设置这个属性, "
-"<literal>SessionFactory</literal>将不会被绑定到JNDI中. (在以只读JNDI为默认实"
-"现的环境中,这个设置尤其有用, 如Tomcat.)"
+#, no-c-format
+msgid "If you wish to have the <literal>SessionFactory</literal> bound
to a JNDI namespace, specify a name (e.g.
<literal>java:hibernate/SessionFactory</literal>) using the property
<literal>hibernate.session_factory_name</literal>. If this property is
omitted, the <literal>SessionFactory</literal> will not be bound to JNDI. This
is especially useful in environments with a read-only JNDI default implementation (in
Tomcat, for example)."
+msgstr "如果你希望将 <literal>SessionFactory</literal> 绑定到一个 JNDI 的名字空间,用属性
<literal>hibernate.session_factory_name</literal>
指定一个名字(如,<literal>java:hibernate/SessionFactory</literal>)。如果不设置这个属性,<literal>SessionFactory</literal>
将不会被绑定到 JNDI 中(在以只读 JNDI 为默认实现的环境中,这个设置尤其有用,如 Tomcat)。"
#. Tag: para
-#: configuration.xml:1568
#, no-c-format
-msgid ""
-"When binding the <literal>SessionFactory</literal> to JNDI, Hibernate
will "
-"use the values of <literal>hibernate.jndi.url</literal>,
<literal>hibernate."
-"jndi.class</literal> to instantiate an initial context. If they are not
"
-"specified, the default <literal>InitialContext</literal> will be
used."
-msgstr ""
-"在将<literal>SessionFactory</literal>绑定至JNDI时, Hibernate将使用"
-"<literal>hibernate.jndi.url</literal>,
和<literal>hibernate.jndi.class</"
-"literal>的值来实例化初始环境(initial context). 如果它们没有被指定, 将使用默认"
-"的<literal>InitialContext</literal>."
+msgid "When binding the <literal>SessionFactory</literal> to JNDI,
Hibernate will use the values of <literal>hibernate.jndi.url</literal>,
<literal>hibernate.jndi.class</literal> to instantiate an initial context. If
they are not specified, the default <literal>InitialContext</literal> will be
used."
+msgstr "在将 <literal>SessionFactory</literal> 绑定至 JNDI 时,Hibernate 将使用
<literal>hibernate.jndi.url</literal>,和
<literal>hibernate.jndi.class</literal> 的值来实例化初始环境(initial
context)。如果它们没有被指定,将使用默认的 <literal>InitialContext</literal>。"
#. Tag: para
-#: configuration.xml:1575
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate will automatically place the
<literal>SessionFactory</literal> in "
-"JNDI after you call <literal>cfg.buildSessionFactory()</literal>. This
means "
-"you will have this call in some startup code, or utility class in your "
-"application, unless you use JMX deployment with the "
-"<literal>HibernateService</literal> (this is discussed later in greater
"
-"detail)."
-msgstr ""
-"在你调用<literal>cfg.buildSessionFactory()</literal>后, Hibernate会自动将"
-"<literal>SessionFactory</literal>注册到JNDI. 这意味这你至少需要在你应用程序的"
-"启动代码(或工具类)中完成这个调用, 除非你使用<literal>HibernateService</"
-"literal>来做JMX部署 (见后面讨论)."
+#, no-c-format
+msgid "Hibernate will automatically place the
<literal>SessionFactory</literal> in JNDI after you call
<literal>cfg.buildSessionFactory()</literal>. This means you will have this
call in some startup code, or utility class in your application, unless you use JMX
deployment with the <literal>HibernateService</literal> (this is discussed
later in greater detail)."
+msgstr "在你调用 <literal>cfg.buildSessionFactory()</literal>后,Hibernate
会自动将 <literal>SessionFactory</literal> 注册到
JNDI。这意味这你至少需要在你应用程序的启动代码(或工具类)中完成这个调用,除非你使用
<literal>HibernateService</literal> 来做 JMX 部署(见后面讨论)。"
#. Tag: para
-#: configuration.xml:1582
-#, fuzzy, no-c-format
-msgid ""
-"If you use a JNDI <literal>SessionFactory</literal>, an EJB or any
other "
-"class, you can obtain the <literal>SessionFactory</literal> using a
JNDI "
-"lookup."
-msgstr ""
-"假若你使用JNDI <literal>SessionFactory</literal>,EJB或者任何其它类都可以从"
-"JNDI中找到此<literal>SessionFactory</literal>。"
+#, no-c-format
+msgid "If you use a JNDI <literal>SessionFactory</literal>, an EJB or
any other class, you can obtain the <literal>SessionFactory</literal> using a
JNDI lookup."
+msgstr "假若你使用 JNDI <literal>SessionFactory</literal>,EJB 或者任何其它类都可以从
JNDI 中找到此 <literal>SessionFactory</literal>。 "
#. Tag: para
-#: configuration.xml:1587
-#, fuzzy, no-c-format
-msgid ""
-"It is recommended that you bind the <literal>SessionFactory</literal>
to "
-"JNDI in a managed environment and use a <literal>static</literal>
singleton "
-"otherwise. To shield your application code from these details, we also "
-"recommend to hide the actual lookup code for a
<literal>SessionFactory</"
-"literal> in a helper class, such as
<literal>HibernateUtil.getSessionFactory"
-"()</literal>. Note that such a class is also a convenient way to startup
"
-"Hibernate—see chapter 1."
-msgstr ""
-"我们建议,在受管理的环境中,把<literal>SessionFactory</literal>绑定到JNDI,在"
-"其它情况下,使用一个<literal>static(静态的)</literal>singleton。为了在你的应"
-"用程序代码中隐藏这些细节,我们还建议你用一个helper类把实际查找"
-"<literal>SessionFactory</literal>的代码隐藏起来,比如<literal>HibernateUtil."
-"getSessionFactory()</literal>。注意,这个类也就可以方便地启动Hibernate,参见"
-"第一章。"
+#, no-c-format
+msgid "It is recommended that you bind the
<literal>SessionFactory</literal> to JNDI in a managed environment and use a
<literal>static</literal> singleton otherwise. To shield your application code
from these details, we also recommend to hide the actual lookup code for a
<literal>SessionFactory</literal> in a helper class, such as
<literal>HibernateUtil.getSessionFactory()</literal>. Note that such a class
is also a convenient way to startup Hibernate—see chapter 1."
+msgstr "我们建议,在受管理的环境中,把 <literal>SessionFactory</literal> 绑定到
JNDI,在其它情况下,使用一个
<literal>static(静态的)</literal>singleton。为了在你的应用程序代码中隐藏这些细节,我们还建议你用一个 helper
类把实际查找 <literal>SessionFactory</literal> 的代码隐藏起来,比如
<literal>HibernateUtil.getSessionFactory()</literal>。注意,这个类也就可以方便地启动
Hibernate,参见第一章。 "
#. Tag: title
-#: configuration.xml:1599
#, no-c-format
msgid "Current Session context management with JTA"
-msgstr "在JTA环境下使用Current Session context (当前session上下文)管理"
+msgstr "在 JTA 环境下使用 Current Session context(当前 session 上下文)管理"
#. Tag: para
-#: configuration.xml:1601
-#, fuzzy, no-c-format
-msgid ""
-"The easiest way to handle <literal>Sessions</literal> and transactions
is "
-"Hibernate's automatic \"current\"
<literal>Session</literal> management. For "
-"a discussion of contextual sessions see <xref
linkend=\"architecture-current-"
-"session\"/>. Using the <literal>\"jta\"</literal>
session context, if there "
-"is no Hibernate <literal>Session</literal> associated with the current
JTA "
-"transaction, one will be started and associated with that JTA transaction "
-"the first time you call
<literal>sessionFactory.getCurrentSession()</"
-"literal>. The <literal>Session</literal>s retrieved via "
-"<literal>getCurrentSession()</literal> in
the<literal>\"jta\"</literal> "
-"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
<literal>Session</"
-"literal>s to be managed by the life cycle of the JTA transaction to which it
"
-"is associated, keeping user code clean of such management concerns. Your "
-"code can either use JTA programmatically through
<literal>UserTransaction</"
-"literal>, or (recommended for portable code) use the Hibernate "
-"<literal>Transaction</literal> API to set transaction boundaries. If
you run "
-"in an EJB container, declarative transaction demarcation with CMT is "
-"preferred."
-msgstr ""
-"在Hibernate中,管理<literal>Session</literal>和transaction最好的方法是自动的"
-"\"当前\"<literal>Session</literal>管理。请参见<xref
linkend=\"architecture-"
-"current-session\">contextual
sessions</xref>一节的讨论。使用<literal>\"jta"
-"\"</literal>session上下文,假若在当前JTA事务中还没有"
-"Hibernate<literal>Session</literal>关联,第一次<literal>sessionFactory."
-"getCurrentSession()</literal>调用会启动一个Session,并关联到当前的JTA事务。在"
-"<literal>\"jta\"</literal>上下文中调用<literal>getCurrentSession()</literal>"
-"获得的<literal>Session</literal>,会被设置为在transaction关闭的时候自动flush"
-"(清洗)、在transaction关闭之后自动关闭,每句语句之后主动释放JDBC连接。这就可"
-"以根据JTA事务的生命周期来管理与之关联的<literal>Session</literal>,用户代码中"
-"就可以不再考虑这些管理。你的代码也可以通过<literal>UserTransaction</literal>"
-"用编程方式使用JTA,或者(我们建议,为了便于移植代码)使用Hibernate的"
-"<literal>Transaction</literal> API来设置transaction边界。如果你的代码运行在"
-"EJB容器中,建议对CMT使用声明式事务声明。"
+#, no-c-format
+msgid "The easiest way to handle <literal>Sessions</literal> and
transactions is Hibernate's automatic \"current\"
<literal>Session</literal> management. For a discussion of contextual sessions
see <xref linkend=\"architecture-current-session\" />. Using the
<literal>\"jta\"</literal> session context, if there is no Hibernate
<literal>Session</literal> associated with the current JTA transaction, one
will be started and associated with that JTA transaction the first time you call
<literal>sessionFactory.getCurrentSession()</literal>. The
<literal>Session</literal>s retrieved via
<literal>getCurrentSession()</literal> in
the<literal>\"jta\"</literal> 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
<literal>Session</literal>s to be managed by the life cycle of the JTA
transaction to which it is associated, keeping user code clean of s!
uch management concerns. Your code can either use JTA programmatically through
<literal>UserTransaction</literal>, or (recommended for portable code) use the
Hibernate <literal>Transaction</literal> API to set transaction boundaries. If
you run in an EJB container, declarative transaction demarcation with CMT is
preferred."
+msgstr "在 Hibernate 中,管理 <literal>Session</literal> 和 transaction
最好的方法是自动的\"当前\"<literal>Session</literal> 管理。请参见 <xref
linkend=\"architecture-current-session\" /> 一节的讨论。使用
<literal>\"jta\"</literal> session 上下文,假若在当前 JTA 事务中还没有
Hibernate<literal>Session</literal> 关联,第一次
<literal>sessionFactory.getCurrentSession()</literal> 调用会启动一个 Session,并关联到当前的
JTA 事务。在 <literal>\"jta\"</literal> 上下文中调用
<literal>getCurrentSession()</literal> 获得的
<literal>Session</literal>,会被设置为在 transaction 关闭的时候自动 flush(清洗)、在 transaction
关闭之后自动关闭,每句语句之后主动释放 JDBC 连接。这就可以根据 JTA 事务的生命周期来管理与之关联的
<literal>Session</literal>,用户代码中就可以不再考虑这些管理。你的代码也可以通过
<literal>UserTransaction!
</literal>用编程方式使用 JTA,或者(我们建议,为了便于移植代码)使用 Hibernate 的
<literal>Transaction</literal> API 来设置 transaction 边界。如果你的代码运行在 EJB 容器中,我们建议对
CMT 使用声明式事务声明。 "
#. Tag: title
-#: configuration.xml:1624
#, no-c-format
msgid "JMX deployment"
-msgstr "JMX部署"
+msgstr "JMX 部署"
#. Tag: para
-#: configuration.xml:1626
-#, fuzzy, no-c-format
-msgid ""
-"The line <literal>cfg.buildSessionFactory()</literal> still has to be
"
-"executed somewhere to get a <literal>SessionFactory</literal> into
JNDI. You "
-"can do this either in a <literal>static</literal> initializer block,
like "
-"the one in <literal>HibernateUtil</literal>, or you can deploy
Hibernate as "
-"a <emphasis>managed service</emphasis>."
-msgstr ""
-"为了将<literal>SessionFactory</literal>注册到JNDI中,<literal>cfg."
-"buildSessionFactory()</literal>这行代码仍需在某处被执行. 你可在一个"
-"<literal>static</literal>初始化块(像<literal>HibernateUtil</literal>中的那样)"
-"中执行它或将Hibernate部署为一个<emphasis>托管的服务</emphasis>."
+#, no-c-format
+msgid "The line <literal>cfg.buildSessionFactory()</literal> still has
to be executed somewhere to get a <literal>SessionFactory</literal> into JNDI.
You can do this either in a <literal>static</literal> initializer block, like
the one in <literal>HibernateUtil</literal>, or you can deploy Hibernate as a
<emphasis>managed service</emphasis>."
+msgstr "为了将 <literal>SessionFactory</literal> 注册到 JNDI
中,<literal>cfg.buildSessionFactory()</literal> 这行代码仍需在某处被执行。你可在一个
<literal>static</literal> 初始化块(像 <literal>HibernateUtil</literal>
中的那样)中执行它或将 Hibernate 部署为一个<emphasis>托管的服务</emphasis>。 "
#. Tag: para
-#: configuration.xml:1634
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate is distributed with
<literal>org.hibernate.jmx.HibernateService</"
-"literal> for deployment on an application server with JMX capabilities, such
"
-"as JBoss AS. The actual deployment and configuration is vendor-specific. "
-"Here is an example <literal>jboss-service.xml</literal> for JBoss
4.0.x:"
-msgstr ""
-"为了部署在一个支持JMX的应用程序服务器上,Hibernate和 <literal>org.hibernate."
-"jmx.HibernateService</literal>一同分发,如Jboss AS。 实际的部署和配置是由应用"
-"程序服务器提供者指定的. 这里是JBoss 4.0.x的<literal>jboss-service.xml</"
-"literal>样例:"
-
-#. Tag: programlisting
-#: configuration.xml:1641
#, no-c-format
-msgid ""
-"<![CDATA[<?xml version=\"1.0\"?>\n"
-"<server>\n"
-"\n"
-"<mbean code=\"org.hibernate.jmx.HibernateService\"\n"
-"
name=\"jboss.jca:service=HibernateFactory,name=HibernateFactory\">\n"
-"\n"
-" <!-- Required services -->\n"
-" <depends>jboss.jca:service=RARDeployer</depends>\n"
-" <depends>jboss.jca:service=LocalTxCM,name=HsqlDS</depends>\n"
-"\n"
-" <!-- Bind the Hibernate service to JNDI -->\n"
-" <attribute
name=\"JndiName\">java:/hibernate/SessionFactory</attribute>\n"
-"\n"
-" <!-- Datasource settings -->\n"
-" <attribute
name=\"Datasource\">java:HsqlDS</attribute>\n"
-" <attribute
name=\"Dialect\">org.hibernate.dialect.HSQLDialect</"
-"attribute>\n"
-"\n"
-" <!-- Transaction integration -->\n"
-" <attribute name=\"TransactionStrategy\">\n"
-" org.hibernate.transaction.JTATransactionFactory</attribute>\n"
-" <attribute name=\"TransactionManagerLookupStrategy\">\n"
-"
org.hibernate.transaction.JBossTransactionManagerLookup</attribute>\n"
-" <attribute
name=\"FlushBeforeCompletionEnabled\">true</attribute>\n"
-" <attribute
name=\"AutoCloseSessionEnabled\">true</attribute>\n"
-"\n"
-" <!-- Fetching options -->\n"
-" <attribute
name=\"MaximumFetchDepth\">5</attribute>\n"
-"\n"
-" <!-- Second-level caching -->\n"
-" <attribute
name=\"SecondLevelCacheEnabled\">true</attribute>\n"
-" <attribute
name=\"CacheProviderClass\">org.hibernate.cache."
-"EhCacheProvider</attribute>\n"
-" <attribute
name=\"QueryCacheEnabled\">true</attribute>\n"
-"\n"
-" <!-- Logging -->\n"
-" <attribute
name=\"ShowSqlEnabled\">true</attribute>\n"
-"\n"
-" <!-- Mapping files -->\n"
-" <attribute
name=\"MapResources\">auction/Item.hbm.xml,auction/Category."
-"hbm.xml</attribute>\n"
-"\n"
-"</mbean>\n"
-"\n"
-"</server>]]>"
-msgstr ""
+msgid "Hibernate is distributed with
<literal>org.hibernate.jmx.HibernateService</literal> for deployment on an
application server with JMX capabilities, such as JBoss AS. The actual deployment and
configuration is vendor-specific. Here is an example
<literal>jboss-service.xml</literal> for JBoss 4.0.x:"
+msgstr "为了部署在一个支持 JMX 的应用程序服务器上,Hibernate 和
<literal>org.hibernate.jmx.HibernateService</literal> 一同分发,如 Jboss AS。
实际的部署和配置是由应用程序服务器提供者指定的。这里是 JBoss 4.0.x 的 <literal>jboss-service.xml</literal>
样例: "
#. Tag: para
-#: configuration.xml:1643
-#, fuzzy, no-c-format
-msgid ""
-"This file is deployed in a directory called <literal>META-INF</literal>
and "
-"packaged in a JAR file with the extension <literal>.sar</literal>
(service "
-"archive). You also need to package Hibernate, its required third-party "
-"libraries, your compiled persistent classes, as well as your mapping files "
-"in the same archive. Your enterprise beans (usually session beans) 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 ""
-"这个文件是部署在<literal>META-INF</literal>目录下的, 并会被打包到以<literal>."
-"sar</literal> (service archive)为扩展名的JAR文件中. 同时,你需要将Hibernate、"
-"它所需要的第三方库、你编译好的持久化类以及你的映射定义文件打包进同一个文档. "
-"你的企业Bean(一般为会话Bean)可能会被打包成它们自己的JAR文件, 但你也许会将EJB "
-"JAR文件一同包含进能独立(热)部署的主服务文档. 参考JBoss AS文档以了解更多的JMX"
-"服务与EJB部署的信息."
+#, no-c-format
+msgid "This file is deployed in a directory called
<literal>META-INF</literal> and packaged in a JAR file with the extension
<literal>.sar</literal> (service archive). You also need to package Hibernate,
its required third-party libraries, your compiled persistent classes, as well as your
mapping files in the same archive. Your enterprise beans (usually session beans) 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 "这个文件是部署在 <literal>META-INF</literal> 目录下的,并会被打包到以
<literal>.sar</literal>(service archive)为扩展名的 JAR 文件中。同时,你需要将
Hibernate、它所需要的第三方库、你编译好的持久化类以及你的映射定义文件打包进同一个文档。你的企业 Bean(一般为会话 Bean)可能会被打包成它们自己的 JAR
文件,但你也许会将 EJB JAR 文件一同包含进能独立(热)部署的主服务文档。参考 JBoss AS 文档以了解更多的 JMX服务与 EJB 部署的信息。 "
#~ msgid ""
-#~ "<literal>hibernate.properties</literal> is the easiest approach if
you "
-#~ "want to get started quickly."
+#~ "<![CDATA[Configuration cfg = new Configuration()\n"
+#~ " .addResource(\"Item.hbm.xml\")\n"
+#~ " .addResource(\"Bid.hbm.xml\");]]>"
#~ msgstr ""
-#~ "如果想尽快体验Hibernate,
<literal>hibernate.properties</literal>是最简单的"
-#~ "方式."
-
-#~ msgid "Hibernate logs various events using Apache commons-logging."
-#~ msgstr "Hibernate使用Apache commons-logging来为各种事件记录日志."
-
+#~ "<![CDATA[Configuration cfg = new Configuration()\n"
+#~ " .addResource(\"Item.hbm.xml\")\n"
+#~ " .addResource(\"Bid.hbm.xml\");]]>"
#~ msgid ""
-#~ "The commons-logging service will direct output to either Apache Log4j (if
"
-#~ "you include <literal>log4j.jar</literal> in your classpath) or
JDK1.4 "
-#~ "logging (if running under JDK1.4 or above). You may download Log4j from "
-#~ "<literal>http://jakarta.apache.org</literal>. To use Log4j you will
need "
-#~ "to place a <literal>log4j.properties</literal> file in your
classpath, an "
-#~ "example properties file is distributed with Hibernate in the
<literal>src/"
-#~ "</literal> directory."
+#~ "<![CDATA[Configuration cfg = new Configuration()\n"
+#~ " .addClass(org.hibernate.auction.Item.class)\n"
+#~ " .addClass(org.hibernate.auction.Bid.class);]]>"
#~ msgstr ""
-#~ "commons-logging将直接输出到Apache Log4j(如果在类路径中包括<literal>log4j."
-#~ "jar</literal>)或 JDK1.4 logging (如果运行在JDK1.4或以上的环境下). 你可以从"
-#~ "<literal>http://jakarta.apache.org</literal> 下载Log4j.
要使用Log4j,你需"
-#~ "要将<literal>log4j.properties</literal>文件放置在类路径下, 随Hibernate 一"
-#~ "同分发的样例属性文件在<literal>src/</literal>目录下."
-
-#~ msgid "<placeholder-1/> (optional)"
-#~ msgstr "<placeholder-1/> (可选)"
-
-#~ msgid "InitialContextFactory"
-#~ msgstr "InitialContextFactory"
-
-#~ msgid "class of the JNDI <placeholder-1/>"
-#~ msgstr "JNDI <placeholder-1/>类"
-
-#, fuzzy
-#~ msgid "eg."
+#~ "<![CDATA[Configuration cfg = new Configuration()\n"
+#~ " .addClass(org.hibernate.auction.Item.class)\n"
+#~ " .addClass(org.hibernate.auction.Bid.class);]]>"
+#~ msgid ""
+#~ "<![CDATA[Configuration cfg = new Configuration()\n"
+#~ " .addClass(org.hibernate.auction.Item.class)\n"
+#~ " .addClass(org.hibernate.auction.Bid.class)\n"
+#~ " .setProperty(\"hibernate.dialect\",
\"org.hibernate.dialect."
+#~ "MySQLInnoDBDialect\")\n"
+#~ " .setProperty(\"hibernate.connection.datasource\",
\"java:comp/env/"
+#~ "jdbc/test\")\n"
+#~ " .setProperty(\"hibernate.order_updates\",
\"true\");]]>"
#~ msgstr ""
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "eg.\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "取值"
+#~ "<![CDATA[Configuration cfg = new Configuration()\n"
+#~ " .addClass(org.hibernate.auction.Item.class)\n"
+#~ " .addClass(org.hibernate.auction.Bid.class)\n"
+#~ " .setProperty(\"hibernate.dialect\",
\"org.hibernate.dialect."
+#~ "MySQLInnoDBDialect\")\n"
+#~ " .setProperty(\"hibernate.connection.datasource\",
\"java:comp/env/"
+#~ "jdbc/test\")\n"
+#~ " .setProperty(\"hibernate.order_updates\",
\"true\");]]>"
+#~ msgid "<![CDATA[SessionFactory sessions =
cfg.buildSessionFactory();]]>"
+#~ msgstr "<![CDATA[SessionFactory sessions =
cfg.buildSessionFactory();]]>"
+#~ msgid ""
+#~ "<![CDATA[Session session = sessions.openSession(); // open a new
Session]]"
+#~ ">"
+#~ msgstr ""
+#~ "<![CDATA[Session session = sessions.openSession(); // open a new
Session]]"
+#~ ">"
+#~ msgid "JDBC URL"
+#~ msgstr "JDBC URL"
+#~ msgid "database user"
+#~ msgstr "database user"
+#~ msgid "database user password"
+#~ msgstr "数据库用户密码"
+#~ msgid ""
+#~ "<![CDATA[hibernate.connection.driver_class = org.postgresql.Driver\n"
+#~ "hibernate.connection.url = jdbc:postgresql://localhost/mydatabase\n"
+#~ "hibernate.connection.username = myuser\n"
+#~ "hibernate.connection.password = secret\n"
+#~ "hibernate.c3p0.min_size=5\n"
+#~ "hibernate.c3p0.max_size=20\n"
+#~ "hibernate.c3p0.timeout=1800\n"
+#~ "hibernate.c3p0.max_statements=50\n"
+#~ "hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]>"
+#~ msgstr ""
+#~ "<![CDATA[hibernate.connection.driver_class = org.postgresql.Driver\n"
+#~ "hibernate.connection.url = jdbc:postgresql://localhost/mydatabase\n"
+#~ "hibernate.connection.username = myuser\n"
+#~ "hibernate.connection.password = secret\n"
+#~ "hibernate.c3p0.min_size=5\n"
+#~ "hibernate.c3p0.max_size=20\n"
+#~ "hibernate.c3p0.timeout=1800\n"
+#~ "hibernate.c3p0.max_statements=50\n"
+#~ "hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]>"
+#~ msgid "datasource JNDI name"
+#~ msgstr "数据源 JNDI 名字"
+#~ msgid ""
+#~ "<![CDATA[hibernate.connection.datasource = java:/comp/env/jdbc/test\n"
+#~ "hibernate.transaction.factory_class = \\\n"
+#~ " org.hibernate.transaction.JTATransactionFactory\n"
+#~ "hibernate.transaction.manager_lookup_class = \\\n"
+#~ " org.hibernate.transaction.JBossTransactionManagerLookup\n"
+#~ "hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]>"
+#~ msgstr ""
+#~ "<![CDATA[hibernate.connection.datasource = java:/comp/env/jdbc/test\n"
+#~ "hibernate.transaction.factory_class = \\\n"
+#~ " org.hibernate.transaction.JTATransactionFactory\n"
+#~ "hibernate.transaction.manager_lookup_class = \\\n"
+#~ " org.hibernate.transaction.JBossTransactionManagerLookup\n"
+#~ "hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]>"
+#~ msgid "<entry>DB2</entry>"
+#~ msgstr "<entry>DB2</entry>"
+#~ msgid "hibernate.query.substitutions true=1, false=0"
+#~ msgstr "hibernate.query.substitutions true=1,false=0"
+#~ msgid "hibernate.query.substitutions toLowercase=LOWER"
+#~ msgstr "hibernate.query.substitutions toLowercase=LOWER"
+#~ msgid "org.hibernate"
+#~ msgstr "org.hibernate"
+#~ msgid ""
+#~ "<![CDATA[SessionFactory sf = new Configuration()\n"
+#~ " .setNamingStrategy(ImprovedNamingStrategy.INSTANCE)\n"
+#~ " .addFile(\"Item.hbm.xml\")\n"
+#~ " .addFile(\"Bid.hbm.xml\")\n"
+#~ " .buildSessionFactory();]]>"
+#~ msgstr ""
+#~ "<![CDATA[SessionFactory sf = new Configuration()\n"
+#~ " .setNamingStrategy(ImprovedNamingStrategy.INSTANCE)\n"
+#~ " .addFile(\"Item.hbm.xml\")\n"
+#~ " .addFile(\"Bid.hbm.xml\")\n"
+#~ " .buildSessionFactory();]]>"
+#~ msgid ""
+#~ "<![CDATA[<?xml version='1.0'
encoding='utf-8'?>\n"
+#~ "<!DOCTYPE hibernate-configuration PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Configuration DTD//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"
+#~ "\">\n"
+#~ "\n"
+#~ "<hibernate-configuration>\n"
+#~ "\n"
+#~ " <!-- a SessionFactory instance listed as /jndi/name -->\n"
+#~ " <session-factory\n"
+#~ " name=\"java:hibernate/SessionFactory\">\n"
+#~ "\n"
+#~ " <!-- properties -->\n"
+#~ " <property
name=\"connection.datasource\">java:/comp/env/jdbc/"
+#~ "MyDB</property>\n"
+#~ " <property
name=\"dialect\">org.hibernate.dialect.MySQLDialect</"
+#~ "property>\n"
+#~ " <property
name=\"show_sql\">false</property>\n"
+#~ " <property name=\"transaction.factory_class\">\n"
+#~ " org.hibernate.transaction.JTATransactionFactory\n"
+#~ " </property>\n"
+#~ " <property
name=\"jta.UserTransaction\">java:comp/UserTransaction</"
+#~ "property>\n"
+#~ "\n"
+#~ " <!-- mapping files -->\n"
+#~ " <mapping
resource=\"org/hibernate/auction/Item.hbm.xml\"/>\n"
+#~ " <mapping
resource=\"org/hibernate/auction/Bid.hbm.xml\"/>\n"
+#~ "\n"
+#~ " <!-- cache settings -->\n"
+#~ " <class-cache class=\"org.hibernate.auction.Item\"
usage=\"read-"
+#~ "write\"/>\n"
+#~ " <class-cache class=\"org.hibernate.auction.Bid\"
usage=\"read-only"
+#~ "\"/>\n"
+#~ " <collection-cache
collection=\"org.hibernate.auction.Item.bids\" "
+#~ "usage=\"read-write\"/>\n"
+#~ "\n"
+#~ " </session-factory>\n"
+#~ "\n"
+#~ "</hibernate-configuration>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<?xml version='1.0'
encoding='utf-8'?>\n"
+#~ "<!DOCTYPE hibernate-configuration PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Configuration DTD//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"
+#~ "\">\n"
+#~ "\n"
+#~ "<hibernate-configuration>\n"
+#~ "\n"
+#~ " <!-- a SessionFactory instance listed as /jndi/name -->\n"
+#~ " <session-factory\n"
+#~ " name=\"java:hibernate/SessionFactory\">\n"
+#~ "\n"
+#~ " <!-- properties -->\n"
+#~ " <property
name=\"connection.datasource\">java:/comp/env/jdbc/"
+#~ "MyDB</property>\n"
+#~ " <property
name=\"dialect\">org.hibernate.dialect.MySQLDialect</"
+#~ "property>\n"
+#~ " <property
name=\"show_sql\">false</property>\n"
+#~ " <property name=\"transaction.factory_class\">\n"
+#~ " org.hibernate.transaction.JTATransactionFactory\n"
+#~ " </property>\n"
+#~ " <property
name=\"jta.UserTransaction\">java:comp/UserTransaction</"
+#~ "property>\n"
+#~ "\n"
+#~ " <!-- mapping files -->\n"
+#~ " <mapping
resource=\"org/hibernate/auction/Item.hbm.xml\"/>\n"
+#~ " <mapping
resource=\"org/hibernate/auction/Bid.hbm.xml\"/>\n"
+#~ "\n"
+#~ " <!-- cache settings -->\n"
+#~ " <class-cache class=\"org.hibernate.auction.Item\"
usage=\"read-"
+#~ "write\"/>\n"
+#~ " <class-cache class=\"org.hibernate.auction.Bid\"
usage=\"read-only"
+#~ "\"/>\n"
+#~ " <collection-cache
collection=\"org.hibernate.auction.Item.bids\" "
+#~ "usage=\"read-write\"/>\n"
+#~ "\n"
+#~ " </session-factory>\n"
+#~ "\n"
+#~ "</hibernate-configuration>]]>"
+#~ msgid ""
+#~ "<![CDATA[SessionFactory sf = new Configuration().configure()."
+#~ "buildSessionFactory();]]>"
+#~ msgstr ""
+#~ "<![CDATA[SessionFactory sf = new Configuration().configure()."
+#~ "buildSessionFactory();]]>"
+#~ msgid ""
+#~ "<![CDATA[SessionFactory sf = new Configuration()\n"
+#~ " .configure(\"catdb.cfg.xml\")\n"
+#~ " .buildSessionFactory();]]>"
+#~ msgstr ""
+#~ "<![CDATA[SessionFactory sf = new Configuration()\n"
+#~ " .configure(\"catdb.cfg.xml\")\n"
+#~ " .buildSessionFactory();]]>"
+#~ msgid ""
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<server>\n"
+#~ "\n"
+#~ "<mbean code=\"org.hibernate.jmx.HibernateService\"\n"
+#~ "
name=\"jboss.jca:service=HibernateFactory,name=HibernateFactory\">\n"
+#~ "\n"
+#~ " <!-- Required services -->\n"
+#~ " <depends>jboss.jca:service=RARDeployer</depends>\n"
+#~ "
<depends>jboss.jca:service=LocalTxCM,name=HsqlDS</depends>\n"
+#~ "\n"
+#~ " <!-- Bind the Hibernate service to JNDI -->\n"
+#~ " <attribute
name=\"JndiName\">java:/hibernate/SessionFactory</"
+#~ "attribute>\n"
+#~ "\n"
+#~ " <!-- Datasource settings -->\n"
+#~ " <attribute
name=\"Datasource\">java:HsqlDS</attribute>\n"
+#~ " <attribute
name=\"Dialect\">org.hibernate.dialect.HSQLDialect</"
+#~ "attribute>\n"
+#~ "\n"
+#~ " <!-- Transaction integration -->\n"
+#~ " <attribute name=\"TransactionStrategy\">\n"
+#~ "
org.hibernate.transaction.JTATransactionFactory</attribute>\n"
+#~ " <attribute
name=\"TransactionManagerLookupStrategy\">\n"
+#~ " org.hibernate.transaction.JBossTransactionManagerLookup</"
+#~ "attribute>\n"
+#~ " <attribute
name=\"FlushBeforeCompletionEnabled\">true</attribute>\n"
+#~ " <attribute
name=\"AutoCloseSessionEnabled\">true</attribute>\n"
+#~ "\n"
+#~ " <!-- Fetching options -->\n"
+#~ " <attribute
name=\"MaximumFetchDepth\">5</attribute>\n"
+#~ "\n"
+#~ " <!-- Second-level caching -->\n"
+#~ " <attribute
name=\"SecondLevelCacheEnabled\">true</attribute>\n"
+#~ " <attribute
name=\"CacheProviderClass\">org.hibernate.cache."
+#~ "EhCacheProvider</attribute>\n"
+#~ " <attribute
name=\"QueryCacheEnabled\">true</attribute>\n"
+#~ "\n"
+#~ " <!-- Logging -->\n"
+#~ " <attribute
name=\"ShowSqlEnabled\">true</attribute>\n"
+#~ "\n"
+#~ " <!-- Mapping files -->\n"
+#~ " <attribute
name=\"MapResources\">auction/Item.hbm.xml,auction/"
+#~ "Category.hbm.xml</attribute>\n"
+#~ "\n"
+#~ "</mbean>\n"
+#~ "\n"
+#~ "</server>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<server>\n"
+#~ "\n"
+#~ "<mbean code=\"org.hibernate.jmx.HibernateService\"\n"
+#~ "
name=\"jboss.jca:service=HibernateFactory,name=HibernateFactory\">\n"
+#~ "\n"
+#~ " <!-- Required services -->\n"
+#~ " <depends>jboss.jca:service=RARDeployer</depends>\n"
+#~ "
<depends>jboss.jca:service=LocalTxCM,name=HsqlDS</depends>\n"
+#~ "\n"
+#~ " <!-- Bind the Hibernate service to JNDI -->\n"
+#~ " <attribute
name=\"JndiName\">java:/hibernate/SessionFactory</"
+#~ "attribute>\n"
+#~ "\n"
+#~ " <!-- Datasource settings -->\n"
+#~ " <attribute
name=\"Datasource\">java:HsqlDS</attribute>\n"
+#~ " <attribute
name=\"Dialect\">org.hibernate.dialect.HSQLDialect</"
+#~ "attribute>\n"
+#~ "\n"
+#~ " <!-- Transaction integration -->\n"
+#~ " <attribute name=\"TransactionStrategy\">\n"
+#~ "
org.hibernate.transaction.JTATransactionFactory</attribute>\n"
+#~ " <attribute
name=\"TransactionManagerLookupStrategy\">\n"
+#~ " org.hibernate.transaction.JBossTransactionManagerLookup</"
+#~ "attribute>\n"
+#~ " <attribute
name=\"FlushBeforeCompletionEnabled\">true</attribute>\n"
+#~ " <attribute
name=\"AutoCloseSessionEnabled\">true</attribute>\n"
+#~ "\n"
+#~ " <!-- Fetching options -->\n"
+#~ " <attribute
name=\"MaximumFetchDepth\">5</attribute>\n"
+#~ "\n"
+#~ " <!-- Second-level caching -->\n"
+#~ " <attribute
name=\"SecondLevelCacheEnabled\">true</attribute>\n"
+#~ " <attribute
name=\"CacheProviderClass\">org.hibernate.cache."
+#~ "EhCacheProvider</attribute>\n"
+#~ " <attribute
name=\"QueryCacheEnabled\">true</attribute>\n"
+#~ "\n"
+#~ " <!-- Logging -->\n"
+#~ " <attribute
name=\"ShowSqlEnabled\">true</attribute>\n"
+#~ "\n"
+#~ " <!-- Mapping files -->\n"
+#~ " <attribute
name=\"MapResources\">auction/Item.hbm.xml,auction/"
+#~ "Category.hbm.xml</attribute>\n"
+#~ "\n"
+#~ "</mbean>\n"
+#~ "\n"
+#~ "</server>]]>"
-#~ msgid "full.classname.of.Dialect"
-#~ msgstr "full.classname.of.Dialect"
-
-#~ msgid "debug"
-#~ msgstr "debug"
-
-#~ msgid "SCHEMA_NAME"
-#~ msgstr "SCHEMA_NAME"
-
-#~ msgid "CATALOG_NAME"
-#~ msgstr "CATALOG_NAME"
-
-#~ msgid "SessionFactory"
-#~ msgstr "SessionFactory"
-
-#~ msgid "jndi/composite/name"
-#~ msgstr "jndi/composite/name"
-
-#~ msgid "0"
-#~ msgstr "0"
-
-#~ msgid "false"
-#~ msgstr "false"
-
-#~ msgid "Statement.setFetchSize()"
-#~ msgstr "Statement.setFetchSize()"
-
-#~ msgid "true"
-#~ msgstr "executeBatch()"
-
-#~ msgid "executeBatch()"
-#~ msgstr "true"
-
-#~ msgid "Batcher"
-#~ msgstr "Batcher"
-
-#~ msgid "classname.of.BatcherFactory"
-#~ msgstr "classname.of.BatcherFactory"
-
-#~ msgid "binary"
-#~ msgstr "binary (二进制)"
-
-#~ msgid "serializable"
-#~ msgstr "serializable (可序列化)"
-
-#~ msgid "PreparedStatement.getGeneratedKeys()"
-#~ msgstr "PreparedStatement.getGeneratedKeys()"
-
-#~ msgid "true|false"
-#~ msgstr "true|false"
-
-#~ msgid "ConnectionProvider"
-#~ msgstr "ConnectionProvider"
-
-#~ msgid "classname.of.ConnectionProvider"
-#~ msgstr "classname.of.ConnectionProvider"
-
-#~ msgid "java.sql.Connection"
-#~ msgstr "java.sql.Connection"
-
-#~ msgid "1, 2, 4, 8"
-#~ msgstr "1, 2, 4, 8"
-
-#~ msgid "after_statement"
-#~ msgstr "after_statement"
-
-#~ msgid "after_transaction"
-#~ msgstr "after_transaction"
-
-#~ msgid "auto"
-#~ msgstr "auto"
-
-#~ msgid "<propertyName>"
-#~ msgstr "<propertyName>"
-
-#~ msgid "hibernate.connection.<placeholder-1/>"
-#~ msgstr "hibernate.connection.<placeholder-1/>"
-
-#~ msgid "propertyName"
-#~ msgstr "propertyName"
-
-#~ msgid "DriverManager.getConnection()"
-#~ msgstr "DriverManager.getConnection()"
-
-#~ msgid "Pass the JDBC property <placeholder-1/> to
<placeholder-2/>."
-#~ msgstr "将JDBC属性<placeholder-1/>传递到<placeholder-2/>中去."
-
-#~ msgid "hibernate.jndi.<placeholder-1/>"
-#~ msgstr "hibernate.jndi.<placeholder-1/>"
-
-#~ msgid "Pass the property <placeholder-1/> to the JNDI
<placeholder-2/>."
-#~ msgstr "将属性<placeholder-1/>传递到JNDI <placeholder-2/>中去."
-
-#~ msgid "CacheProvider"
-#~ msgstr "CacheProvider"
-
-#~ msgid "classname.of.CacheProvider"
-#~ msgstr "classname.of.CacheProvider"
-
-#~ msgid "<cache>"
-#~ msgstr "<cache>"
-
-#~ msgid "QueryCache"
-#~ msgstr "QueryCache"
-
-#~ msgid "StandardQueryCache"
-#~ msgstr "StandardQueryCache"
-
-#~ msgid "classname.of.QueryCache"
-#~ msgstr "classname.of.QueryCache"
-
-#~ msgid "prefix"
-#~ msgstr "prefix"
-
-#~ msgid "TransactionFactory"
-#~ msgstr "TransactionFactory"
-
-#~ msgid "Transaction"
-#~ msgstr "Transaction"
-
-#~ msgid "JDBCTransactionFactory"
-#~ msgstr "JDBCTransactionFactory"
-
-#~ msgid "classname.of.TransactionFactory"
-#~ msgstr "classname.of.TransactionFactory"
-
-#~ msgid "JTATransactionFactory"
-#~ msgstr "JTATransactionFactory"
-
-#~ msgid "UserTransaction"
-#~ msgstr "UserTransaction"
-
-#~ msgid "TransactionManagerLookup"
-#~ msgstr "TransactionManagerLookup"
-
-#~ msgid "classname.of.TransactionManagerLookup"
-#~ msgstr "classname.of.TransactionManagerLookup"
-
-#~ msgid "Session"
-#~ msgstr "Session"
-
-#~ msgid "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC"
-#~ msgstr "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC"
-
-#~ msgid "create-drop"
-#~ msgstr "create-drop"
-
-#~ msgid "hibernate.cfg.xml"
-#~ msgstr "hibernate.cfg.xml"
-
-#~ msgid "DB2"
-#~ msgstr "DB2"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/events.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/events.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/events.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,41 +1,41 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:26\n"
+"PO-Revision-Date: 2009-11-23 09:36+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: events.xml:29
#, no-c-format
msgid "Interceptors and events"
-msgstr "拦截器与事件(Interceptors and events)"
+msgstr "拦截器与事件(Interceptors and events)"
#. Tag: para
-#: events.xml:31
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"It is useful for the application to react to certain events that occur "
"inside Hibernate. This allows for the implementation of generic "
"functionality and the extension of Hibernate functionality."
msgstr ""
-"应用程序能够响应Hibernate内部产生的特定事件是非常有用的。这样就允许实现某些通"
-"用的功能 以及允许对Hibernate功能进行扩展。"
+"应用程序能够响应 Hibernate 内部产生的特定事件是非常有用的。这样就允许实现某些"
+"通用的功能以及允许对 Hibernate 功能进行扩展。"
#. Tag: title
-#: events.xml:38
#, no-c-format
msgid "Interceptors"
-msgstr "拦截器(Interceptors)"
+msgstr "拦截器(Interceptors)"
#. Tag: para
-#: events.xml:40
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The <literal>Interceptor</literal> interface provides callbacks from
the "
"session to the application, allowing the application to inspect and/or "
@@ -47,145 +47,46 @@
"<literal>lastUpdateTimestamp</literal> property when an
<literal>Auditable</"
"literal> is updated."
msgstr ""
-"<literal>Interceptor</literal>接口提供了从会话(session)回调(callback)应用程序"
-"(application)的机制, 这种回调机制可以允许应用程序在持久化对象被保存、更新、"
-"删除或是加载之前,检查并(或)修改其 属性。一个可能的用途,就是用来跟踪审核"
-"(auditing)信息。例如:下面的这个<literal>拦截器</literal>,会在一个实现了 "
-"<literal>Auditable</literal>接口的对象被创建时自动地设置"
-"<literal>createTimestamp</literal>属性,并在实现了
<literal>Auditable</"
-"literal>接口的对象被更新时,同步更新<literal>lastUpdateTimestamp</literal>属"
-"性。"
+"<literal>Interceptor</literal> 接口提供了从会话(session)回调(callback)应"
+"用程序(application)的机制, 这种回调机制可以允许应用程序在持久化对象被保"
+"存、更新、删除或是加载之前,检查并(或)修改其 属性。一个可能的用途,就是用来"
+"跟踪审核(auditing)信息。例如:下面的这个<literal>拦截器</literal>,会在一个"
+"实现了 <literal>Auditable</literal> 接口的对象被创建时自动地设置 "
+"<literal>createTimestamp</literal> 属性,并在实现了
<literal>Auditable</"
+"literal> 接口的对象被更新时,同步更新 <literal>lastUpdateTimestamp</literal>
"
+"属性。 "
#. Tag: para
-#: events.xml:51
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You can either implement <literal>Interceptor</literal> directly or
extend "
"<literal>EmptyInterceptor</literal>."
msgstr ""
-"你可以直接实现<literal>Interceptor</literal>接口,也可以(最好)继承自"
-"<literal>EmptyInterceptor</literal>。"
+"你可以直接实现 <literal>Interceptor</literal> 接口,也可以(最好)继承自 "
+"<literal>EmptyInterceptor</literal>。 "
-#. Tag: programlisting
-#: events.xml:56
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[package org.hibernate.test;\n"
-"\n"
-"import java.io.Serializable;\n"
-"import java.util.Date;\n"
-"import java.util.Iterator;\n"
-"\n"
-"import org.hibernate.EmptyInterceptor;\n"
-"import org.hibernate.Transaction;\n"
-"import org.hibernate.type.Type;\n"
-"\n"
-"public class AuditInterceptor extends EmptyInterceptor {\n"
-"\n"
-" private int updates;\n"
-" private int creates;\n"
-" private int loads;\n"
-"\n"
-" public void onDelete(Object entity,\n"
-" Serializable id,\n"
-" Object[] state,\n"
-" String[] propertyNames,\n"
-" Type[] types) {\n"
-" // do nothing\n"
-" }\n"
-"\n"
-" public boolean onFlushDirty(Object entity,\n"
-" Serializable id,\n"
-" Object[] currentState,\n"
-" Object[] previousState,\n"
-" String[] propertyNames,\n"
-" Type[] types) {\n"
-"\n"
-" if ( entity instanceof Auditable ) {\n"
-" updates++;\n"
-" for ( int i=0; i < propertyNames.length; i++ ) {\n"
-" if ( \"lastUpdateTimestamp\".equals( propertyNames[i] ) )
{\n"
-" currentState[i] = new Date();\n"
-" return true;\n"
-" }\n"
-" }\n"
-" }\n"
-" return false;\n"
-" }\n"
-"\n"
-" public boolean onLoad(Object entity,\n"
-" Serializable id,\n"
-" Object[] state,\n"
-" String[] propertyNames,\n"
-" Type[] types) {\n"
-" if ( entity instanceof Auditable ) {\n"
-" loads++;\n"
-" }\n"
-" return false;\n"
-" }\n"
-"\n"
-" public boolean onSave(Object entity,\n"
-" Serializable id,\n"
-" Object[] state,\n"
-" String[] propertyNames,\n"
-" Type[] types) {\n"
-"\n"
-" if ( entity instanceof Auditable ) {\n"
-" creates++;\n"
-" for ( int i=0; i<propertyNames.length; i++ ) {\n"
-" if ( \"createTimestamp\".equals( propertyNames[i] ) )
{\n"
-" state[i] = new Date();\n"
-" return true;\n"
-" }\n"
-" }\n"
-" }\n"
-" return false;\n"
-" }\n"
-"\n"
-" public void afterTransactionCompletion(Transaction tx) {\n"
-" if ( tx.wasCommitted() ) {\n"
-" System.out.println(\"Creations: \" + creates + \",
Updates: \" + "
-"updates, \"Loads: \" + loads);\n"
-" }\n"
-" updates=0;\n"
-" creates=0;\n"
-" loads=0;\n"
-" }\n"
-"\n"
-"}]]>"
-msgstr ""
-
-#. Tag: para
-#: events.xml:58
-#, fuzzy, no-c-format
-msgid ""
"There are two kinds of inteceptors: <literal>Session</literal>-scoped
and "
"<literal>SessionFactory</literal>-scoped."
msgstr ""
-"拦截器可以有两种:<literal>Session</literal>范围内的,和"
-"<literal>SessionFactory</literal>范围内的。"
+"拦截器可以有两种:<literal>Session</literal> 范围内的和 "
+"<literal>SessionFactory</literal> 范围内的。"
#. Tag: para
-#: events.xml:63
#, no-c-format
msgid ""
"A <literal>Session</literal>-scoped interceptor is specified when a
session "
"is opened using one of the overloaded SessionFactory.openSession() methods "
"accepting an <literal>Interceptor</literal>."
msgstr ""
-"当使用某个重载的SessionFactory.openSession()使用<literal>Interceptor</"
-"literal>作为参数调用打开一个session的时候,就指定了<literal>Session</literal>"
-"范围内的拦截器。"
+"当使用某个重载的 SessionFactory.openSession() 使用 <literal>Interceptor</"
+"literal> 作为参数调用打开一个 session 的时候,就指定了 <literal>Session</"
+"literal> 范围内的拦截器。"
-#. Tag: programlisting
-#: events.xml:69
+#. Tag: para
#, no-c-format
-msgid "<![CDATA[Session session = sf.openSession( new AuditInterceptor()
);]]>"
-msgstr ""
-
-#. Tag: para
-#: events.xml:71
-#, fuzzy, no-c-format
msgid ""
"A <literal>SessionFactory</literal>-scoped interceptor is registered
with "
"the <literal>Configuration</literal> object prior to building the
"
@@ -196,40 +97,31 @@
"Ensure that you do not store session-specific states, since multiple "
"sessions will use this interceptor potentially concurrently."
msgstr ""
-"<literal>SessionFactory</literal>范围内的拦截器要通过<literal>Configuration</"
-"literal>中注册,而这必须在创建<literal>SessionFactory</literal>之前。在这种情"
-"况下,给出的拦截器会被这个<literal>SessionFactory</literal>所打开的所有"
-"session使用了;除非session打开时明确指明了使用的拦截器。"
-"<literal>SessionFactory</literal>范围内的拦截器,必须是线程安全的,因为多个"
-"session可能并发使用这个拦截器,要因此小心不要保存与session相关的状态。"
+"<literal>SessionFactory</literal> 范围内的拦截器要通过 "
+"<literal>Configuration</literal> 中注册,而这必须在创建 "
+"<literal>SessionFactory</literal> 之前。在这种情况下,给出的拦截器会被这个 "
+"<literal>SessionFactory</literal> 所打开的所有 session 使用了;除非 session "
+"打开时明确指明了使用的拦截器。<literal>SessionFactory</literal> 范围内的拦截"
+"器,必须是线程安全的。确保你没有保存 session 专有的状态,因为多个 session 可"
+"能并发使用这个拦截器。"
-#. Tag: programlisting
-#: events.xml:80
-#, no-c-format
-msgid ""
-"<![CDATA[new Configuration().setInterceptor( new AuditInterceptor()
);]]>"
-msgstr ""
-
#. Tag: title
-#: events.xml:85
#, no-c-format
msgid "Event system"
-msgstr "事件系统(Event system)"
+msgstr "事件系统(Event system)"
#. Tag: para
-#: events.xml:87
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"If you have to react to particular events in your persistence layer, you can
"
"also use the Hibernate3 <emphasis>event</emphasis> architecture. The
event "
"system can be used in addition, or as a replacement, for interceptors."
msgstr ""
-"如果需要响应持久层的某些特殊事件,你也可以使用Hibernate3的事件框架。 该事件系"
-"统可以用来替代拦截器,也可以作为拦截器的补充来使用。"
+"如果需要响应持久层的某些特殊事件,你也可以使用 Hibernate3 的事件框架。该事件"
+"系统可以用来替代拦截器,也可以作为拦截器的补充来使用。 "
#. Tag: para
-#: events.xml:93
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"All the methods of the <literal>Session</literal> interface correlate
to an "
"event. You have a <literal>LoadEvent</literal>, a
<literal>FlushEvent</"
@@ -246,30 +138,28 @@
"processing any <literal>load()</literal> requests made of the "
"<literal>Session</literal>."
msgstr ""
-"基本上,<literal>Session</literal>接口的每个方法都有相对应的事件。比如 "
-"<literal>LoadEvent</literal>,<literal>FlushEvent</literal>,等等(查阅XML配"
-"置文件 的DTD,以及<literal>org.hibernate.event</literal>包来获得所有已定义的"
-"事件的列表)。当某个方 法被调用时,Hibernate <literal>Session</literal>会生成"
-"一个相对应的事件并激活所 有配置好的事件监听器。系统预设的监听器实现的处理过程"
-"就是被监听的方法要做的(被监听的方法所做的其实仅仅是激活监听器, “实际”的工作"
-"是由监听器完成的)。不过,你可以自由地选择实现 一个自己定制的监听器(比如,实"
-"现并注册用来处理处理<literal>LoadEvent</literal>的"
-"<literal>LoadEventListener</literal>接口), 来负责处理所有的调用"
-"<literal>Session</literal>的<literal>load()</literal>方法的请求。"
+"基本上,<literal>Session</literal> 接口的每个方法都有相对应的事件。比如 "
+"<literal>LoadEvent</literal>,<literal>FlushEvent</literal>,等等(查阅
XML "
+"配置文件的 DTD,以及 <literal>org.hibernate.event</literal> 包来获得所有已定"
+"义的事件的列表)。当某个方 法被调用时,Hibernate <literal>Session</literal>会"
+"生成一个相对应的事件并激活所 有配置好的事件监听器。系统预设的监听器实现的处理"
+"过程就是被监听的方法要做的(被监听的方法所做的其实仅仅是激活监听器,“实际”的"
+"工作是由监听器完成的)。不过,你可以自由地选择实现 一个自己定制的监听器(比"
+"如,实现并注册用来处理处理 <literal>LoadEvent</literal> 的 "
+"<literal>LoadEventListener</literal> 接口), 来负责处理所有的调用 "
+"<literal>Session</literal> 的 <literal>load()</literal>
方法的请求。"
#. Tag: para
-#: events.xml:108
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The listeners should be considered singletons. This means they are shared "
"between requests, and should not save any state as instance variables."
msgstr ""
-"监听器应该被看作是单例(singleton)对象,也就是说,所有同类型的事件的处理共享同"
-"一个监听器实例,因此监听器 不应该保存任何状态(也就是不应该使用成员变量)。"
+"监听器应该被看作是单例(singleton)对象,也就是说,所有同类型的事件的处理共享"
+"同一个监听器实例,因此监听器不应该保存任何状态(也就是不应该使用成员变量)。"
#. Tag: para
-#: events.xml:113
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"A custom listener implements the appropriate interface for the event it "
"wants to process and/or extend one of the convenience base classes (or even "
@@ -281,89 +171,42 @@
"example of a custom load event listener:"
msgstr ""
"用户定制的监听器应该实现与所要处理的事件相对应的接口,或者从一个合适的基类继"
-"承(甚至是从Hibernate自带的默认事件监听器类继承, 为了方便你这样做,这些类都"
-"被声明成non-final的了)。用户定制的监听器可以通过编程使用"
-"<literal>Configuration</literal>对象 来注册,也可以在Hibernate的XML格式的配置"
-"文件中进行声明(不支持在Properties格式的配置文件声明监听器)。 下面是一个用户"
-"定制的加载事件(load event)的监听器:"
+"承(甚至是从 Hibernate 自带的默认事件监听器类继承,为了方便你这样做,这些类都"
+"被声明成 non-final 的了)。用户定制的监听器可以通过编程使用 "
+"<literal>Configuration</literal> 对象 来注册,也可以在Hibernate的 XML 格式的"
+"配置文件中进行声明(不支持在 Properties 格式的配置文件声明监听器)。下面是一"
+"个用户定制的加载事件(load event)的监听器:"
-#. Tag: programlisting
-#: events.xml:123
-#, no-c-format
-msgid ""
-"<![CDATA[public class MyLoadListener implements LoadEventListener {\n"
-" // this is the single method defined by the LoadEventListener
interface\n"
-" public void onLoad(LoadEvent event, LoadEventListener.LoadType "
-"loadType)\n"
-" throws HibernateException {\n"
-" if ( !MySecurity.isAuthorized( event.getEntityClassName(), event."
-"getEntityId() ) ) {\n"
-" throw MySecurityException(\"Unauthorized access\");\n"
-" }\n"
-" }\n"
-"}]]>"
-msgstr ""
-
#. Tag: para
-#: events.xml:125
#, no-c-format
msgid ""
"You also need a configuration entry telling Hibernate to use the listener in
"
"addition to the default listener:"
msgstr ""
-"你还需要修改一处配置,来告诉Hibernate,除了默认的监听器,还要附加选定的监听"
+"你还需要修改一处配置,来告诉 Hibernate,除了默认的监听器,还要附加选定的监听"
"器。"
-#. Tag: programlisting
-#: events.xml:130
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-configuration>\n"
-" <session-factory>\n"
-" ...\n"
-" <event type=\"load\">\n"
-" <listener class=\"com.eg.MyLoadListener\"/>\n"
-" <listener class=\"org.hibernate.event.def."
-"DefaultLoadEventListener\"/>\n"
-" </event>\n"
-" </session-factory>\n"
-"</hibernate-configuration>]]>"
-msgstr ""
+msgid "Instead, you can register it programmatically:"
+msgstr "或者,你可以通过编程的方式来注册它:"
#. Tag: para
-#: events.xml:132
-#, fuzzy, no-c-format
-msgid "Instead, you can register it programmatically:"
-msgstr "看看用另一种方式,通过编程的方式来注册它。"
-
-#. Tag: programlisting
-#: events.xml:136
#, no-c-format
msgid ""
-"<![CDATA[Configuration cfg = new Configuration();\n"
-"LoadEventListener[] stack = { new MyLoadListener(), new "
-"DefaultLoadEventListener() };\n"
-"cfg.EventListeners().setLoadEventListeners(stack);]]>"
-msgstr ""
-
-#. Tag: para
-#: events.xml:138
-#, fuzzy, no-c-format
-msgid ""
"Listeners registered declaratively cannot share instances. If the same class
"
"name is used in multiple <literal><listener/></literal>
elements, each "
"reference will result in a separate instance of that class. If you need to "
"share listener instances between listener types you must use the "
"programmatic registration approach."
msgstr ""
-"通过在XML配置文件声明而注册的监听器不能共享实例。如果在多个<literal><"
-"listener/></literal>节点中使用 了相同的类的名字,则每一个引用都将会产生一"
+"通过在XML配置文件声明而注册的监听器不能共享实例。如果在多个 <literal><"
+"listener/></literal> 节点中使用 了相同的类的名字,则每一个引用都将会产生一"
"个独立的实例。如果你需要在多个监听器类型之间共享 监听器的实例,则你必须使用编"
-"程的方式来进行注册。"
+"程的方式来进行注册。 "
#. Tag: para
-#: events.xml:146
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Why implement an interface and define the specific type during "
"configuration? A listener implementation could implement multiple event "
@@ -373,84 +216,326 @@
msgstr ""
"为什么我们实现了特定监听器的接口,在注册的时候还要明确指出我们要注册哪个事件"
"的监听器呢? 这是因为一个类可能实现多个监听器的接口。在注册的时候明确指定要监"
-"听的事件,可以让启用或者禁用对某个事件的监听的配置工作简单些。"
+"听的事件,可以让启用或者禁用对某个事件的监听的配置工作简单些。 "
#. Tag: title
-#: events.xml:156
#, no-c-format
msgid "Hibernate declarative security"
-msgstr "Hibernate的声明式安全机制"
+msgstr "Hibernate 的声明式安全机制"
#. Tag: para
-#: events.xml:157
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Usually, declarative security in Hibernate applications is managed in a "
"session facade layer. Hibernate3 allows certain actions to be permissioned "
"via JACC, and authorized via JAAS. This is an optional functionality that is
"
"built on top of the event architecture."
msgstr ""
-"通常,Hibernate应用程序的声明式安全机制由会话外观层(session facade)所管理。 "
-"现在,Hibernate3允许某些特定的行为由JACC进行许可管理,由JAAS进行授权管理。 本"
-"功能是一个建立在事件框架之上的可选的功能。"
+"通常,Hibernate 应用程序的声明式安全机制由会话外观层(session facade)所管"
+"理。现在,Hibernate3允许某些特定的行为由 JACC 进行许可管理,由 JAAS 进行授权"
+"管理。本功能是一个建立在事件框架之上的可选的功能。 "
#. Tag: para
-#: events.xml:163
#, no-c-format
msgid ""
"First, you must configure the appropriate event listeners, to enable the use
"
"of JAAS authorization."
msgstr ""
-"首先,你必须要配置适当的事件监听器(event listener),来激活使用JAAS管理授权"
-"的功能。"
+"首先,你必须要配置适当的事件监听器(event listener),来激活使用 JAAS 管理授"
+"权的功能。"
-#. Tag: programlisting
-#: events.xml:168
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<listener type=\"pre-delete\"
class=\"org.hibernate.secure."
-"JACCPreDeleteEventListener\"/>\n"
-"<listener type=\"pre-update\"
class=\"org.hibernate.secure."
-"JACCPreUpdateEventListener\"/>\n"
-"<listener type=\"pre-insert\"
class=\"org.hibernate.secure."
-"JACCPreInsertEventListener\"/>\n"
-"<listener type=\"pre-load\" class=\"org.hibernate.secure."
-"JACCPreLoadEventListener\"/>]]>"
-msgstr ""
-
-#. Tag: para
-#: events.xml:170
-#, fuzzy, no-c-format
-msgid ""
"Note that <literal><listener type=\"...\"
class=\"...\"/></literal> is "
"shorthand for <literal><event
type=\"...\"><listener class=\"...\"/"
"></event></literal> when there is exactly one listener
for a "
"particular event type."
msgstr ""
-"注意,<literal><listener type=\"...\"
class=\"...\"/></literal>只是"
+"注意,<literal><listener type=\"...\"
class=\"...\"/></literal> 只是 "
"<literal><event type=\"...\"><listener
class=\"...\"/></"
-"event></literal>的简写,对每一个事件类型都必须严格的有一个监听器与之对应。"
+"event></literal> 的简写,对每一个事件类型都必须严格的有一个监听器与之对"
+"应。 "
#. Tag: para
-#: events.xml:176
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Next, while still in <literal>hibernate.cfg.xml</literal>, bind the
"
"permissions to roles:"
msgstr ""
-"接下来,仍然在<literal>hibernate.cfg.xml</literal>文件中,绑定角色的权限:"
+"接下来,仍然在 <literal>hibernate.cfg.xml</literal> 文件中,绑定角色的权限: "
-#. Tag: programlisting
-#: events.xml:180
-#, no-c-format
-msgid ""
-"<![CDATA[<grant role=\"admin\" entity-name=\"User\"
actions=\"insert,update,"
-"read\"/>\n"
-"<grant role=\"su\" entity-name=\"User\"
actions=\"*\"/>]]>"
-msgstr ""
-
#. Tag: para
-#: events.xml:182
#, no-c-format
msgid "The role names are the roles understood by your JACC provider."
-msgstr "这些角色的名字就是你的JACC provider所定义的角色的名字。"
+msgstr "这些角色的名字就是你的 JACC provider 所定义的角色的名字。"
+
+#~ msgid ""
+#~ "<![CDATA[package org.hibernate.test;\n"
+#~ "\n"
+#~ "import java.io.Serializable;\n"
+#~ "import java.util.Date;\n"
+#~ "import java.util.Iterator;\n"
+#~ "\n"
+#~ "import org.hibernate.EmptyInterceptor;\n"
+#~ "import org.hibernate.Transaction;\n"
+#~ "import org.hibernate.type.Type;\n"
+#~ "\n"
+#~ "public class AuditInterceptor extends EmptyInterceptor {\n"
+#~ "\n"
+#~ " private int updates;\n"
+#~ " private int creates;\n"
+#~ " private int loads;\n"
+#~ "\n"
+#~ " public void onDelete(Object entity,\n"
+#~ " Serializable id,\n"
+#~ " Object[] state,\n"
+#~ " String[] propertyNames,\n"
+#~ " Type[] types) {\n"
+#~ " // do nothing\n"
+#~ " }\n"
+#~ "\n"
+#~ " public boolean onFlushDirty(Object entity,\n"
+#~ " Serializable id,\n"
+#~ " Object[] currentState,\n"
+#~ " Object[] previousState,\n"
+#~ " String[] propertyNames,\n"
+#~ " Type[] types) {\n"
+#~ "\n"
+#~ " if ( entity instanceof Auditable ) {\n"
+#~ " updates++;\n"
+#~ " for ( int i=0; i < propertyNames.length; i++ ) {\n"
+#~ " if ( \"lastUpdateTimestamp\".equals( propertyNames[i]
) ) "
+#~ "{\n"
+#~ " currentState[i] = new Date();\n"
+#~ " return true;\n"
+#~ " }\n"
+#~ " }\n"
+#~ " }\n"
+#~ " return false;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public boolean onLoad(Object entity,\n"
+#~ " Serializable id,\n"
+#~ " Object[] state,\n"
+#~ " String[] propertyNames,\n"
+#~ " Type[] types) {\n"
+#~ " if ( entity instanceof Auditable ) {\n"
+#~ " loads++;\n"
+#~ " }\n"
+#~ " return false;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public boolean onSave(Object entity,\n"
+#~ " Serializable id,\n"
+#~ " Object[] state,\n"
+#~ " String[] propertyNames,\n"
+#~ " Type[] types) {\n"
+#~ "\n"
+#~ " if ( entity instanceof Auditable ) {\n"
+#~ " creates++;\n"
+#~ " for ( int i=0; i<propertyNames.length; i++ ) {\n"
+#~ " if ( \"createTimestamp\".equals( propertyNames[i] ) )
{\n"
+#~ " state[i] = new Date();\n"
+#~ " return true;\n"
+#~ " }\n"
+#~ " }\n"
+#~ " }\n"
+#~ " return false;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void afterTransactionCompletion(Transaction tx) {\n"
+#~ " if ( tx.wasCommitted() ) {\n"
+#~ " System.out.println(\"Creations: \" + creates + \",
Updates: "
+#~ "\" + updates, \"Loads: \" + loads);\n"
+#~ " }\n"
+#~ " updates=0;\n"
+#~ " creates=0;\n"
+#~ " loads=0;\n"
+#~ " }\n"
+#~ "\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[package org.hibernate.test;\n"
+#~ "\n"
+#~ "import java.io.Serializable;\n"
+#~ "import java.util.Date;\n"
+#~ "import java.util.Iterator;\n"
+#~ "\n"
+#~ "import org.hibernate.EmptyInterceptor;\n"
+#~ "import org.hibernate.Transaction;\n"
+#~ "import org.hibernate.type.Type;\n"
+#~ "\n"
+#~ "public class AuditInterceptor extends EmptyInterceptor {\n"
+#~ "\n"
+#~ " private int updates;\n"
+#~ " private int creates;\n"
+#~ " private int loads;\n"
+#~ "\n"
+#~ " public void onDelete(Object entity,\n"
+#~ " Serializable id,\n"
+#~ " Object[] state,\n"
+#~ " String[] propertyNames,\n"
+#~ " Type[] types) {\n"
+#~ " // do nothing\n"
+#~ " }\n"
+#~ "\n"
+#~ " public boolean onFlushDirty(Object entity,\n"
+#~ " Serializable id,\n"
+#~ " Object[] currentState,\n"
+#~ " Object[] previousState,\n"
+#~ " String[] propertyNames,\n"
+#~ " Type[] types) {\n"
+#~ "\n"
+#~ " if ( entity instanceof Auditable ) {\n"
+#~ " updates++;\n"
+#~ " for ( int i=0; i < propertyNames.length; i++ ) {\n"
+#~ " if ( \"lastUpdateTimestamp\".equals( propertyNames[i]
) ) "
+#~ "{\n"
+#~ " currentState[i] = new Date();\n"
+#~ " return true;\n"
+#~ " }\n"
+#~ " }\n"
+#~ " }\n"
+#~ " return false;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public boolean onLoad(Object entity,\n"
+#~ " Serializable id,\n"
+#~ " Object[] state,\n"
+#~ " String[] propertyNames,\n"
+#~ " Type[] types) {\n"
+#~ " if ( entity instanceof Auditable ) {\n"
+#~ " loads++;\n"
+#~ " }\n"
+#~ " return false;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public boolean onSave(Object entity,\n"
+#~ " Serializable id,\n"
+#~ " Object[] state,\n"
+#~ " String[] propertyNames,\n"
+#~ " Type[] types) {\n"
+#~ "\n"
+#~ " if ( entity instanceof Auditable ) {\n"
+#~ " creates++;\n"
+#~ " for ( int i=0; i<propertyNames.length; i++ ) {\n"
+#~ " if ( \"createTimestamp\".equals( propertyNames[i] ) )
{\n"
+#~ " state[i] = new Date();\n"
+#~ " return true;\n"
+#~ " }\n"
+#~ " }\n"
+#~ " }\n"
+#~ " return false;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void afterTransactionCompletion(Transaction tx) {\n"
+#~ " if ( tx.wasCommitted() ) {\n"
+#~ " System.out.println(\"Creations: \" + creates + \",
Updates: "
+#~ "\" + updates, \"Loads: \" + loads);\n"
+#~ " }\n"
+#~ " updates=0;\n"
+#~ " creates=0;\n"
+#~ " loads=0;\n"
+#~ " }\n"
+#~ "\n"
+#~ "}]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Session session = sf.openSession( new AuditInterceptor()
);]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session session = sf.openSession( new AuditInterceptor()
);]]>"
+
+#~ msgid ""
+#~ "<![CDATA[new Configuration().setInterceptor( new AuditInterceptor()
);]]>"
+#~ msgstr ""
+#~ "<![CDATA[new Configuration().setInterceptor( new AuditInterceptor()
);]]>"
+
+#~ msgid ""
+#~ "<![CDATA[public class MyLoadListener implements LoadEventListener {\n"
+#~ " // this is the single method defined by the LoadEventListener "
+#~ "interface\n"
+#~ " public void onLoad(LoadEvent event, LoadEventListener.LoadType "
+#~ "loadType)\n"
+#~ " throws HibernateException {\n"
+#~ " if ( !MySecurity.isAuthorized( event.getEntityClassName(), event."
+#~ "getEntityId() ) ) {\n"
+#~ " throw MySecurityException(\"Unauthorized
access\");\n"
+#~ " }\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[public class MyLoadListener implements LoadEventListener {\n"
+#~ " // this is the single method defined by the LoadEventListener "
+#~ "interface\n"
+#~ " public void onLoad(LoadEvent event, LoadEventListener.LoadType "
+#~ "loadType)\n"
+#~ " throws HibernateException {\n"
+#~ " if ( !MySecurity.isAuthorized( event.getEntityClassName(), event."
+#~ "getEntityId() ) ) {\n"
+#~ " throw MySecurityException(\"Unauthorized
access\");\n"
+#~ " }\n"
+#~ " }\n"
+#~ "}]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<hibernate-configuration>\n"
+#~ " <session-factory>\n"
+#~ " ...\n"
+#~ " <event type=\"load\">\n"
+#~ " <listener class=\"com.eg.MyLoadListener\"/>\n"
+#~ " <listener class=\"org.hibernate.event.def."
+#~ "DefaultLoadEventListener\"/>\n"
+#~ " </event>\n"
+#~ " </session-factory>\n"
+#~ "</hibernate-configuration>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-configuration>\n"
+#~ " <session-factory>\n"
+#~ " ...\n"
+#~ " <event type=\"load\">\n"
+#~ " <listener class=\"com.eg.MyLoadListener\"/>\n"
+#~ " <listener class=\"org.hibernate.event.def."
+#~ "DefaultLoadEventListener\"/>\n"
+#~ " </event>\n"
+#~ " </session-factory>\n"
+#~ "</hibernate-configuration>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Configuration cfg = new Configuration();\n"
+#~ "LoadEventListener[] stack = { new MyLoadListener(), new "
+#~ "DefaultLoadEventListener() };\n"
+#~ "cfg.EventListeners().setLoadEventListeners(stack);]]>"
+#~ msgstr ""
+#~ "<![CDATA[Configuration cfg = new Configuration();\n"
+#~ "LoadEventListener[] stack = { new MyLoadListener(), new "
+#~ "DefaultLoadEventListener() };\n"
+#~ "cfg.EventListeners().setLoadEventListeners(stack);]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<listener type=\"pre-delete\"
class=\"org.hibernate.secure."
+#~ "JACCPreDeleteEventListener\"/>\n"
+#~ "<listener type=\"pre-update\"
class=\"org.hibernate.secure."
+#~ "JACCPreUpdateEventListener\"/>\n"
+#~ "<listener type=\"pre-insert\"
class=\"org.hibernate.secure."
+#~ "JACCPreInsertEventListener\"/>\n"
+#~ "<listener type=\"pre-load\"
class=\"org.hibernate.secure."
+#~ "JACCPreLoadEventListener\"/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<listener type=\"pre-delete\"
class=\"org.hibernate.secure."
+#~ "JACCPreDeleteEventListener\"/>\n"
+#~ "<listener type=\"pre-update\"
class=\"org.hibernate.secure."
+#~ "JACCPreUpdateEventListener\"/>\n"
+#~ "<listener type=\"pre-insert\"
class=\"org.hibernate.secure."
+#~ "JACCPreInsertEventListener\"/>\n"
+#~ "<listener type=\"pre-load\"
class=\"org.hibernate.secure."
+#~ "JACCPreLoadEventListener\"/>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<grant role=\"admin\" entity-name=\"User\"
actions=\"insert,"
+#~ "update,read\"/>\n"
+#~ "<grant role=\"su\" entity-name=\"User\"
actions=\"*\"/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<grant role=\"admin\" entity-name=\"User\"
actions=\"insert,"
+#~ "update,read\"/>\n"
+#~ "<grant role=\"su\" entity-name=\"User\"
actions=\"*\"/>]]>"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_mappings.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_mappings.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_mappings.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,36 +1,36 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:26\n"
+"PO-Revision-Date: 2009-11-20 18:36+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: example_mappings.xml:29
#, no-c-format
msgid "Example: Various Mappings"
msgstr "示例:复杂映射实例"
#. Tag: para
-#: example_mappings.xml:32
-#, fuzzy, no-c-format
+#, no-c-format
msgid "This chapters explores some more complex association mappings."
-msgstr "本章展示了一些较为复杂的关系映射。"
+msgstr "本章展示了一些较为复杂的关系映射。 "
#. Tag: title
-#: example_mappings.xml:37
#, no-c-format
msgid "Employer/Employee"
-msgstr "Employer(雇主)/Employee(雇员)"
+msgstr "Employer(雇主)/Employee(雇员)"
#. Tag: para
-#: example_mappings.xml:39
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The following model of the relationship between
<literal>Employer</literal> "
"and <literal>Employee</literal> uses an entity class
(<literal>Employment</"
@@ -38,128 +38,28 @@
"more than one period of employment for the same two parties. Components are "
"used to model monetary values and employee names."
msgstr ""
-"下面关于<literal>Employer</literal> 和
<literal>Employee</literal>的关系模型"
-"使用了一个真实的实体类 (<literal>Employment</literal>)来表述,这是因为对于相"
-"同的雇员和雇主可能会有多个雇佣时间段。 对于金额和雇员姓名,用Components建模。"
+"下面关于 <literal>Employer</literal> 和
<literal>Employee</literal> 的关系模"
+"型使用了一个真实的实体类(<literal>Employment</literal>)来表述,这是因为对于"
+"相同的雇员和雇主可能会有多个雇佣时间段。对于金额和雇员姓名,用 Components 建"
+"模。 "
#. Tag: para
-#: example_mappings.xml:56
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Here is a possible mapping document:"
-msgstr "映射文件可能是这样:"
+msgstr "映射文件可能是这样: "
-#. Tag: programlisting
-#: example_mappings.xml:60
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-" \n"
-" <class name=\"Employer\"
table=\"employers\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\">\n"
-" <param
name=\"sequence\">employer_id_seq</param>\n"
-" </generator>\n"
-" </id>\n"
-" <property name=\"name\"/>\n"
-" </class>\n"
-"\n"
-" <class name=\"Employment\"
table=\"employment_periods\">\n"
-"\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\">\n"
-" <param
name=\"sequence\">employment_id_seq</param>\n"
-" </generator>\n"
-" </id>\n"
-" <property name=\"startDate\"
column=\"start_date\"/>\n"
-" <property name=\"endDate\"
column=\"end_date\"/>\n"
-"\n"
-" <component name=\"hourlyRate\"
class=\"MonetaryAmount\">\n"
-" <property name=\"amount\">\n"
-" <column name=\"hourly_rate\"
sql-type=\"NUMERIC(12, 2)\"/>\n"
-" </property>\n"
-" <property name=\"currency\"
length=\"12\"/>\n"
-" </component>\n"
-"\n"
-" <many-to-one name=\"employer\"
column=\"employer_id\" not-null=\"true"
-"\"/>\n"
-" <many-to-one name=\"employee\"
column=\"employee_id\" not-null=\"true"
-"\"/>\n"
-"\n"
-" </class>\n"
-"\n"
-" <class name=\"Employee\"
table=\"employees\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"sequence\">\n"
-" <param
name=\"sequence\">employee_id_seq</param>\n"
-" </generator>\n"
-" </id>\n"
-" <property name=\"taxfileNumber\"/>\n"
-" <component name=\"name\" class=\"Name\">\n"
-" <property name=\"firstName\"/>\n"
-" <property name=\"initial\"/>\n"
-" <property name=\"lastName\"/>\n"
-" </component>\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
-
-#. Tag: para
-#: example_mappings.xml:62
-#, fuzzy, no-c-format
msgid "Here is the table schema generated by
<literal>SchemaExport</literal>."
-msgstr "用<literal>SchemaExport</literal>生成表结构。"
+msgstr "用 <literal>SchemaExport</literal> 生成表结构。 "
-#. Tag: programlisting
-#: example_mappings.xml:66
-#, no-c-format
-msgid ""
-"<![CDATA[create table employers (\n"
-" id BIGINT not null, \n"
-" name VARCHAR(255), \n"
-" primary key (id)\n"
-")\n"
-"\n"
-"create table employment_periods (\n"
-" id BIGINT not null,\n"
-" hourly_rate NUMERIC(12, 2),\n"
-" currency VARCHAR(12), \n"
-" employee_id BIGINT not null, \n"
-" employer_id BIGINT not null, \n"
-" end_date TIMESTAMP, \n"
-" start_date TIMESTAMP, \n"
-" primary key (id)\n"
-")\n"
-"\n"
-"create table employees (\n"
-" id BIGINT not null, \n"
-" firstName VARCHAR(255), \n"
-" initial CHAR(1), \n"
-" lastName VARCHAR(255), \n"
-" taxfileNumber VARCHAR(255), \n"
-" primary key (id)\n"
-")\n"
-"\n"
-"alter table employment_periods \n"
-" add constraint employment_periodsFK0 foreign key (employer_id) "
-"references employers\n"
-"alter table employment_periods \n"
-" add constraint employment_periodsFK1 foreign key (employee_id) "
-"references employees\n"
-"create sequence employee_id_seq\n"
-"create sequence employment_id_seq\n"
-"create sequence employer_id_seq]]>"
-msgstr ""
-
#. Tag: title
-#: example_mappings.xml:71
#, no-c-format
msgid "Author/Work"
-msgstr "Author(作家)/Work(作品)"
+msgstr "Author(作家)/Work(作品)"
#. Tag: para
-#: example_mappings.xml:73
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Consider the following model of the relationships between
<literal>Work</"
"literal>, <literal>Author</literal> and
<literal>Person</literal>. In the "
@@ -169,141 +69,39 @@
"literal> is represented as one-to-one association. Another possibility would
"
"be to have <literal>Author</literal> extend
<literal>Person</literal>."
msgstr ""
-"考虑下面的<literal>Work</literal>,<literal>Author</literal> 和
"
-"<literal>Person</literal>模型的关系。
我们用多对多关系来描述<literal>Work</"
-"literal> 和 <literal>Author</literal>,
用一对一关系来描述<literal>Author</"
-"literal> 和 <literal>Person</literal>,
另一种可能性是<literal>Author</"
-"literal>继承<literal>Person</literal>。"
+"考虑下面的 <literal>Work</literal>,<literal>Author</literal> 和
"
+"<literal>Person</literal> 模型的关系。我们用多对多关系来描述
<literal>Work</"
+"literal> 和 <literal>Author</literal>,用一对一关系来描述
<literal>Author</"
+"literal> 和 <literal>Person</literal>,另一种可能性是
<literal>Author</"
+"literal> 继承 <literal>Person</literal>。 "
#. Tag: para
-#: example_mappings.xml:91
#, no-c-format
msgid ""
"The following mapping document correctly represents these relationships:"
msgstr "下面的映射文件正确的描述了这些关系:"
-#. Tag: programlisting
-#: example_mappings.xml:95
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-"\n"
-" <class name=\"Work\" table=\"works\"
discriminator-value=\"W\">\n"
-"\n"
-" <id name=\"id\" column=\"id\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <discriminator column=\"type\"
type=\"character\"/>\n"
-"\n"
-" <property name=\"title\"/>\n"
-" <set name=\"authors\"
table=\"author_work\">\n"
-" <key column name=\"work_id\"/>\n"
-" <many-to-many class=\"Author\" column
name=\"author_id\"/>\n"
-" </set>\n"
-"\n"
-" <subclass name=\"Book\"
discriminator-value=\"B\">\n"
-" <property name=\"text\"/>\n"
-" </subclass>\n"
-"\n"
-" <subclass name=\"Song\"
discriminator-value=\"S\">\n"
-" <property name=\"tempo\"/>\n"
-" <property name=\"genre\"/>\n"
-" </subclass>\n"
-"\n"
-" </class>\n"
-"\n"
-" <class name=\"Author\" table=\"authors\">\n"
-"\n"
-" <id name=\"id\" column=\"id\">\n"
-" <!-- The Author must have the same identifier as the Person
-->\n"
-" <generator class=\"assigned\"/> \n"
-" </id>\n"
-"\n"
-" <property name=\"alias\"/>\n"
-" <one-to-one name=\"person\"
constrained=\"true\"/>\n"
-"\n"
-" <set name=\"works\" table=\"author_work\"
inverse=\"true\">\n"
-" <key column=\"author_id\"/>\n"
-" <many-to-many class=\"Work\"
column=\"work_id\"/>\n"
-" </set>\n"
-"\n"
-" </class>\n"
-"\n"
-" <class name=\"Person\" table=\"persons\">\n"
-" <id name=\"id\" column=\"id\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"name\"/>\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
-
-#. Tag: para
-#: example_mappings.xml:97
-#, fuzzy, no-c-format
-msgid ""
"There are four tables in this mapping: <literal>works</literal>,
"
"<literal>authors</literal> and <literal>persons</literal>
hold work, author "
"and person data respectively. <literal>author_work</literal> is an
"
"association table linking authors to works. Here is the table schema, as "
"generated by <literal>SchemaExport</literal>:"
msgstr ""
-"映射中有4个表。<literal>works</literal>,
<literal>authors</literal> 和 "
-"<literal>persons</literal> 分别保存着work,author和person的数据。"
-"<literal>author_work</literal>是authors和works的关联表。 表结构是由"
-"<literal>SchemaExport</literal>生成的。"
+"映射中有 4
个表。<literal>works</literal>,<literal>authors</literal> 和 "
+"<literal>persons</literal> 分别保存着 work,author 和 person 的数据。"
+"<literal>author_work</literal> 是 authors 和 works 的关联表。表结构是由 "
+"<literal>SchemaExport</literal> 生成的:"
-#. Tag: programlisting
-#: example_mappings.xml:105
-#, no-c-format
-msgid ""
-"<![CDATA[create table works (\n"
-" id BIGINT not null generated by default as identity, \n"
-" tempo FLOAT, \n"
-" genre VARCHAR(255), \n"
-" text INTEGER, \n"
-" title VARCHAR(255), \n"
-" type CHAR(1) not null, \n"
-" primary key (id)\n"
-")\n"
-"\n"
-"create table author_work (\n"
-" author_id BIGINT not null, \n"
-" work_id BIGINT not null, \n"
-" primary key (work_id, author_id)\n"
-")\n"
-"\n"
-"create table authors (\n"
-" id BIGINT not null generated by default as identity, \n"
-" alias VARCHAR(255), \n"
-" primary key (id)\n"
-")\n"
-"\n"
-"create table persons (\n"
-" id BIGINT not null generated by default as identity, \n"
-" name VARCHAR(255), \n"
-" primary key (id)\n"
-")\n"
-"\n"
-"alter table authors \n"
-" add constraint authorsFK0 foreign key (id) references persons\n"
-"alter table author_work \n"
-" add constraint author_workFK0 foreign key (author_id) references "
-"authors\n"
-"alter table author_work\n"
-" add constraint author_workFK1 foreign key (work_id) references
works]]>"
-msgstr ""
-
#. Tag: title
-#: example_mappings.xml:110
#, no-c-format
msgid "Customer/Order/Product"
-msgstr "Customer(客户)/Order(订单)/Product(产品)"
+msgstr "Customer(客户)/Order(订单)/Product(产品)"
#. Tag: para
-#: example_mappings.xml:112
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"In this section we consider a model of the relationships between "
"<literal>Customer</literal>, <literal>Order</literal>,
<literal>Line Item</"
@@ -315,65 +113,20 @@
"between <literal>Order</literal> and
<literal>Product</literal>. In "
"Hibernate this is called a composite element."
msgstr ""
-"现在来考虑<literal>Customer</literal>,<literal>Order</literal> ,
"
-"<literal>LineItem</literal> 和
<literal>Product</literal>关系的模型。"
-"<literal>Customer</literal> 和 <literal>Order</literal>之间
是一对多的关系,"
-"但是我们怎么来描述<literal>Order</literal> /
<literal>LineItem</literal> / "
-"<literal>Product</literal>呢?
我可以把<literal>LineItem</literal>作为描述"
-"<literal>Order</literal> 和 <literal>Product</literal>
多对多关系的关联类,在"
-"Hibernate,这叫做组合元素。"
+"现在来考虑 <literal>Customer</literal>,<literal>Order</literal>,
"
+"<literal>LineItem</literal> 和 <literal>Product</literal>
关系的模型。"
+"<literal>Customer</literal> 和 <literal>Order</literal> 之间
是一对多的关系,"
+"但是我们怎么来描述 <literal>Order</literal> /
<literal>LineItem</literal> / "
+"<literal>Product</literal>呢? 我可以把
<literal>LineItem</literal> 作为描述 "
+"<literal>Order</literal> 和 <literal>Product</literal>
多对多关系的关联类,"
+"在 Hibernate,这叫做组合元素。 "
#. Tag: para
-#: example_mappings.xml:132
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The mapping document will look like this:"
-msgstr "映射文件如下:"
+msgstr "映射文件如下: "
-#. Tag: programlisting
-#: example_mappings.xml:136
-#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-"\n"
-" <class name=\"Customer\"
table=\"customers\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"name\"/>\n"
-" <set name=\"orders\" inverse=\"true\">\n"
-" <key column=\"customer_id\"/>\n"
-" <one-to-many class=\"Order\"/>\n"
-" </set>\n"
-" </class>\n"
-"\n"
-" <class name=\"Order\" table=\"orders\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"date\"/>\n"
-" <many-to-one name=\"customer\"
column=\"customer_id\"/>\n"
-" <list name=\"lineItems\"
table=\"line_items\">\n"
-" <key column=\"order_id\"/>\n"
-" <list-index column=\"line_number\"/>\n"
-" <composite-element class=\"LineItem\">\n"
-" <property name=\"quantity\"/>\n"
-" <many-to-one name=\"product\"
column=\"product_id\"/>\n"
-" </composite-element>\n"
-" </list>\n"
-" </class>\n"
-"\n"
-" <class name=\"Product\" table=\"products\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"serialNumber\"/>\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
-
#. Tag: para
-#: example_mappings.xml:138
#, no-c-format
msgid ""
"<literal>customers</literal>, <literal>orders</literal>,
"
@@ -381,401 +134,1121 @@
"order, order line item and product data respectively.
<literal>line_items</"
"literal> also acts as an association table linking orders with products."
msgstr ""
-"<literal>customers</literal>, <literal>orders</literal>,
"
-"<literal>line_items</literal> 和 <literal>products</literal>
分别保存着"
-"customer, order, order line item 和 product的数据。
<literal>line_items</"
-"literal>也作为连接orders 和 products的关联表。"
+"<literal>customers</literal>,<literal>orders</literal>,"
+"<literal>line_items</literal> 和
<literal>products</literal> 分别保存着 "
+"customer,order,order line item 和 product 的数据。 <literal>line_items</"
+"literal> 也作为连接 orders 和 products 的关联表。"
-#. Tag: programlisting
-#: example_mappings.xml:145
-#, no-c-format
-msgid ""
-"<![CDATA[create table customers (\n"
-" id BIGINT not null generated by default as identity, \n"
-" name VARCHAR(255), \n"
-" primary key (id)\n"
-")\n"
-"\n"
-"create table orders (\n"
-" id BIGINT not null generated by default as identity, \n"
-" customer_id BIGINT, \n"
-" date TIMESTAMP, \n"
-" primary key (id)\n"
-")\n"
-"\n"
-"create table line_items (\n"
-" line_number INTEGER not null, \n"
-" order_id BIGINT not null, \n"
-" product_id BIGINT, \n"
-" quantity INTEGER, \n"
-" primary key (order_id, line_number)\n"
-")\n"
-"\n"
-"create table products (\n"
-" id BIGINT not null generated by default as identity, \n"
-" serialNumber VARCHAR(255), \n"
-" primary key (id)\n"
-")\n"
-"\n"
-"alter table orders \n"
-" add constraint ordersFK0 foreign key (customer_id) references
customers\n"
-"alter table line_items\n"
-" add constraint line_itemsFK0 foreign key (product_id) references "
-"products\n"
-"alter table line_items\n"
-" add constraint line_itemsFK1 foreign key (order_id) references
orders]]>"
-msgstr ""
-
#. Tag: title
-#: example_mappings.xml:150
#, no-c-format
msgid "Miscellaneous example mappings"
msgstr "杂例"
#. Tag: para
-#: example_mappings.xml:152
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"These examples are available from the Hibernate test suite. You will find "
"many other useful example mappings there by searching in the
<literal>test</"
"literal> folder of the Hibernate distribution."
msgstr ""
-"这些例子全部来自于Hibernate的test suite,同时你也可以找到其他有用的例子。 可"
-"以参考Hibernate的<literal>test</literal>目录。"
+"这些例子全部来自于 Hibernate 的 test suite,同时你也可以找到其他有用的例子。"
+"可以参考 Hibernate 的 <literal>test</literal> 目录。 "
#. Tag: title
-#: example_mappings.xml:161
#, no-c-format
msgid "\"Typed\" one-to-one association"
-msgstr "\"Typed\" one-to-one association"
+msgstr "\"Typed\" 一对一关联"
-#. Tag: programlisting
-#: example_mappings.xml:162
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"name\"/>\n"
-" <one-to-one name=\"address\" \n"
-" cascade=\"all\">\n"
-" <formula>name</formula>\n"
-" <formula>'HOME'</formula>\n"
-" </one-to-one>\n"
-" <one-to-one name=\"mailingAddress\" \n"
-" cascade=\"all\">\n"
-" <formula>name</formula>\n"
-" <formula>'MAILING'</formula>\n"
-" </one-to-one>\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\" batch-size=\"2\" \n"
-" check=\"addressType in ('MAILING', 'HOME',
'BUSINESS')\">\n"
-" <composite-id>\n"
-" <key-many-to-one name=\"person\" \n"
-" column=\"personName\"/>\n"
-" <key-property name=\"type\" \n"
-" column=\"addressType\"/>\n"
-" </composite-id>\n"
-" <property name=\"street\" type=\"text\"/>\n"
-" <property name=\"state\"/>\n"
-" <property name=\"zip\"/>\n"
-"</class>]]>"
-msgstr ""
-
#. Tag: title
-#: example_mappings.xml:166
#, no-c-format
msgid "Composite key example"
-msgstr "Composite key example"
+msgstr "组合键示例"
-#. Tag: programlisting
-#: example_mappings.xml:167
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Customer\">\n"
-"\n"
-" <id name=\"customerId\"\n"
-" length=\"10\">\n"
-" <generator class=\"assigned\"/>\n"
-" </id>\n"
-"\n"
-" <property name=\"name\" not-null=\"true\"
length=\"100\"/>\n"
-" <property name=\"address\" not-null=\"true\"
length=\"200\"/>\n"
-"\n"
-" <list name=\"orders\"\n"
-" inverse=\"true\"\n"
-" cascade=\"save-update\">\n"
-" <key column=\"customerId\"/>\n"
-" <index column=\"orderNumber\"/>\n"
-" <one-to-many class=\"Order\"/>\n"
-" </list>\n"
-"\n"
-"</class>\n"
-"\n"
-"<class name=\"Order\" table=\"CustomerOrder\"
lazy=\"true\">\n"
-" <synchronize table=\"LineItem\"/>\n"
-" <synchronize table=\"Product\"/>\n"
-" \n"
-" <composite-id name=\"id\" \n"
-" class=\"Order$Id\">\n"
-" <key-property name=\"customerId\"
length=\"10\"/>\n"
-" <key-property name=\"orderNumber\"/>\n"
-" </composite-id>\n"
-" \n"
-" <property name=\"orderDate\" \n"
-" type=\"calendar_date\"\n"
-" not-null=\"true\"/>\n"
-" \n"
-" <property name=\"total\">\n"
-" <formula>\n"
-" ( select sum(li.quantity*p.price) \n"
-" from LineItem li, Product p \n"
-" where li.productId = p.productId \n"
-" and li.customerId = customerId \n"
-" and li.orderNumber = orderNumber )\n"
-" </formula>\n"
-" </property>\n"
-" \n"
-" <many-to-one name=\"customer\"\n"
-" column=\"customerId\"\n"
-" insert=\"false\"\n"
-" update=\"false\" \n"
-" not-null=\"true\"/>\n"
-" \n"
-" <bag name=\"lineItems\"\n"
-" fetch=\"join\" \n"
-" inverse=\"true\"\n"
-" cascade=\"save-update\">\n"
-" <key>\n"
-" <column name=\"customerId\"/>\n"
-" <column name=\"orderNumber\"/>\n"
-" </key>\n"
-" <one-to-many class=\"LineItem\"/>\n"
-" </bag>\n"
-" \n"
-"</class>\n"
-" \n"
-"<class name=\"LineItem\">\n"
-" \n"
-" <composite-id name=\"id\" \n"
-" class=\"LineItem$Id\">\n"
-" <key-property name=\"customerId\"
length=\"10\"/>\n"
-" <key-property name=\"orderNumber\"/>\n"
-" <key-property name=\"productId\"
length=\"10\"/>\n"
-" </composite-id>\n"
-" \n"
-" <property name=\"quantity\"/>\n"
-" \n"
-" <many-to-one name=\"order\"\n"
-" insert=\"false\"\n"
-" update=\"false\" \n"
-" not-null=\"true\">\n"
-" <column name=\"customerId\"/>\n"
-" <column name=\"orderNumber\"/>\n"
-" </many-to-one>\n"
-" \n"
-" <many-to-one name=\"product\"\n"
-" insert=\"false\"\n"
-" update=\"false\" \n"
-" not-null=\"true\"\n"
-" column=\"productId\"/>\n"
-" \n"
-"</class>\n"
-"\n"
-"<class name=\"Product\">\n"
-" <synchronize table=\"LineItem\"/>\n"
-"\n"
-" <id name=\"productId\"\n"
-" length=\"10\">\n"
-" <generator class=\"assigned\"/>\n"
-" </id>\n"
-" \n"
-" <property name=\"description\" \n"
-" not-null=\"true\" \n"
-" length=\"200\"/>\n"
-" <property name=\"price\" length=\"3\"/>\n"
-" <property name=\"numberAvailable\"/>\n"
-" \n"
-" <property name=\"numberOrdered\">\n"
-" <formula>\n"
-" ( select sum(li.quantity) \n"
-" from LineItem li \n"
-" where li.productId = productId )\n"
-" </formula>\n"
-" </property>\n"
-" \n"
-"</class>]]>"
-msgstr ""
-
#. Tag: title
-#: example_mappings.xml:171
#, no-c-format
msgid "Many-to-many with shared composite key attribute"
msgstr ""
-"共有组合键属性的多对多(Many-to-many with shared composite key attribute)"
+"共有组合键属性的多对多(Many-to-many with shared composite key attribute)"
-#. Tag: programlisting
-#: example_mappings.xml:172
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"User\"
table=\"`User`\">\n"
-" <composite-id>\n"
-" <key-property name=\"name\"/>\n"
-" <key-property name=\"org\"/>\n"
-" </composite-id>\n"
-" <set name=\"groups\" table=\"UserGroup\">\n"
-" <key>\n"
-" <column name=\"userName\"/>\n"
-" <column name=\"org\"/>\n"
-" </key>\n"
-" <many-to-many class=\"Group\">\n"
-" <column name=\"groupName\"/>\n"
-" <formula>org</formula>\n"
-" </many-to-many>\n"
-" </set>\n"
-"</class>\n"
-" \n"
-"<class name=\"Group\" table=\"`Group`\">\n"
-" <composite-id>\n"
-" <key-property name=\"name\"/>\n"
-" <key-property name=\"org\"/>\n"
-" </composite-id>\n"
-" <property name=\"description\"/>\n"
-" <set name=\"users\" table=\"UserGroup\"
inverse=\"true\">\n"
-" <key>\n"
-" <column name=\"groupName\"/>\n"
-" <column name=\"org\"/>\n"
-" </key>\n"
-" <many-to-many class=\"User\">\n"
-" <column name=\"userName\"/>\n"
-" <formula>org</formula>\n"
-" </many-to-many>\n"
-" </set>\n"
-"</class>\n"
-"]]>"
-msgstr ""
-
#. Tag: title
-#: example_mappings.xml:176
#, no-c-format
msgid "Content based discrimination"
-msgstr "Content based discrimination"
+msgstr "基于内容的识别"
-#. Tag: programlisting
-#: example_mappings.xml:177
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\"\n"
-" discriminator-value=\"P\">\n"
-" \n"
-" <id name=\"id\" \n"
-" column=\"person_id\" \n"
-" unsaved-value=\"0\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" \n"
-" \n"
-" <discriminator \n"
-" type=\"character\">\n"
-" <formula>\n"
-" case \n"
-" when title is not null then 'E' \n"
-" when salesperson is not null then 'C' \n"
-" else 'P' \n"
-" end\n"
-" </formula>\n"
-" </discriminator>\n"
-"\n"
-" <property name=\"name\" \n"
-" not-null=\"true\"\n"
-" length=\"80\"/>\n"
-" \n"
-" <property name=\"sex\" \n"
-" not-null=\"true\"\n"
-" update=\"false\"/>\n"
-" \n"
-" <component name=\"address\">\n"
-" <property name=\"address\"/>\n"
-" <property name=\"zip\"/>\n"
-" <property name=\"country\"/>\n"
-" </component>\n"
-" \n"
-" <subclass name=\"Employee\" \n"
-" discriminator-value=\"E\">\n"
-" <property name=\"title\"\n"
-" length=\"20\"/>\n"
-" <property name=\"salary\"/>\n"
-" <many-to-one name=\"manager\"/>\n"
-" </subclass>\n"
-" \n"
-" <subclass name=\"Customer\" \n"
-" discriminator-value=\"C\">\n"
-" <property name=\"comments\"/>\n"
-" <many-to-one name=\"salesperson\"/>\n"
-" </subclass>\n"
-" \n"
-"</class>]]>"
-msgstr ""
-
#. Tag: title
-#: example_mappings.xml:181
#, no-c-format
msgid "Associations on alternate keys"
-msgstr "Associations on alternate keys"
+msgstr "备用键的联合"
-#. Tag: programlisting
-#: example_mappings.xml:182
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" \n"
-" <id name=\"id\">\n"
-" <generator class=\"hilo\"/>\n"
-" </id>\n"
-" \n"
-" <property name=\"name\" length=\"100\"/>\n"
-" \n"
-" <one-to-one name=\"address\" \n"
-" property-ref=\"person\"\n"
-" cascade=\"all\"\n"
-" fetch=\"join\"/>\n"
-" \n"
-" <set name=\"accounts\" \n"
-" inverse=\"true\">\n"
-" <key column=\"userId\"\n"
-" property-ref=\"userId\"/>\n"
-" <one-to-many class=\"Account\"/>\n"
-" </set>\n"
-" \n"
-" <property name=\"userId\" length=\"8\"/>\n"
-"\n"
-"</class>\n"
-"\n"
-"<class name=\"Address\">\n"
-"\n"
-" <id name=\"id\">\n"
-" <generator class=\"hilo\"/>\n"
-" </id>\n"
-"\n"
-" <property name=\"address\" length=\"300\"/>\n"
-" <property name=\"zip\" length=\"5\"/>\n"
-" <property name=\"country\" length=\"25\"/>\n"
-" <many-to-one name=\"person\" unique=\"true\"
not-null=\"true\"/>\n"
-"\n"
-"</class>\n"
-"\n"
-"<class name=\"Account\">\n"
-" <id name=\"accountId\" length=\"32\">\n"
-" <generator class=\"uuid\"/>\n"
-" </id>\n"
-" \n"
-" <many-to-one name=\"user\"\n"
-" column=\"userId\"\n"
-" property-ref=\"userId\"/>\n"
-" \n"
-" <property name=\"type\" not-null=\"true\"/>\n"
-" \n"
-"</class>]]>"
-msgstr ""
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ " \n"
+#~ " <class name=\"Employer\"
table=\"employers\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\">\n"
+#~ " <param
name=\"sequence\">employer_id_seq</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Employment\"
table=\"employment_periods\">\n"
+#~ "\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\">\n"
+#~ " <param
name=\"sequence\">employment_id_seq</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " <property name=\"startDate\"
column=\"start_date\"/>\n"
+#~ " <property name=\"endDate\"
column=\"end_date\"/>\n"
+#~ "\n"
+#~ " <component name=\"hourlyRate\"
class=\"MonetaryAmount\">\n"
+#~ " <property name=\"amount\">\n"
+#~ " <column name=\"hourly_rate\"
sql-type=\"NUMERIC(12, 2)\"/"
+#~ ">\n"
+#~ " </property>\n"
+#~ " <property name=\"currency\"
length=\"12\"/>\n"
+#~ " </component>\n"
+#~ "\n"
+#~ " <many-to-one name=\"employer\"
column=\"employer_id\" not-null="
+#~ "\"true\"/>\n"
+#~ " <many-to-one name=\"employee\"
column=\"employee_id\" not-null="
+#~ "\"true\"/>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Employee\"
table=\"employees\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\">\n"
+#~ " <param
name=\"sequence\">employee_id_seq</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " <property name=\"taxfileNumber\"/>\n"
+#~ " <component name=\"name\"
class=\"Name\">\n"
+#~ " <property name=\"firstName\"/>\n"
+#~ " <property name=\"initial\"/>\n"
+#~ " <property name=\"lastName\"/>\n"
+#~ " </component>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ " \n"
+#~ " <class name=\"Employer\"
table=\"employers\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\">\n"
+#~ " <param
name=\"sequence\">employer_id_seq</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Employment\"
table=\"employment_periods\">\n"
+#~ "\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\">\n"
+#~ " <param
name=\"sequence\">employment_id_seq</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " <property name=\"startDate\"
column=\"start_date\"/>\n"
+#~ " <property name=\"endDate\"
column=\"end_date\"/>\n"
+#~ "\n"
+#~ " <component name=\"hourlyRate\"
class=\"MonetaryAmount\">\n"
+#~ " <property name=\"amount\">\n"
+#~ " <column name=\"hourly_rate\"
sql-type=\"NUMERIC(12, 2)\"/"
+#~ ">\n"
+#~ " </property>\n"
+#~ " <property name=\"currency\"
length=\"12\"/>\n"
+#~ " </component>\n"
+#~ "\n"
+#~ " <many-to-one name=\"employer\"
column=\"employer_id\" not-null="
+#~ "\"true\"/>\n"
+#~ " <many-to-one name=\"employee\"
column=\"employee_id\" not-null="
+#~ "\"true\"/>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Employee\"
table=\"employees\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"sequence\">\n"
+#~ " <param
name=\"sequence\">employee_id_seq</param>\n"
+#~ " </generator>\n"
+#~ " </id>\n"
+#~ " <property name=\"taxfileNumber\"/>\n"
+#~ " <component name=\"name\"
class=\"Name\">\n"
+#~ " <property name=\"firstName\"/>\n"
+#~ " <property name=\"initial\"/>\n"
+#~ " <property name=\"lastName\"/>\n"
+#~ " </component>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
-#~ msgid "TODO: put words around this stuff"
-#~ msgstr "TODO: put words around this stuff"
+#~ msgid ""
+#~ "<![CDATA[create table employers (\n"
+#~ " id BIGINT not null, \n"
+#~ " name VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table employment_periods (\n"
+#~ " id BIGINT not null,\n"
+#~ " hourly_rate NUMERIC(12, 2),\n"
+#~ " currency VARCHAR(12), \n"
+#~ " employee_id BIGINT not null, \n"
+#~ " employer_id BIGINT not null, \n"
+#~ " end_date TIMESTAMP, \n"
+#~ " start_date TIMESTAMP, \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table employees (\n"
+#~ " id BIGINT not null, \n"
+#~ " firstName VARCHAR(255), \n"
+#~ " initial CHAR(1), \n"
+#~ " lastName VARCHAR(255), \n"
+#~ " taxfileNumber VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "alter table employment_periods \n"
+#~ " add constraint employment_periodsFK0 foreign key (employer_id) "
+#~ "references employers\n"
+#~ "alter table employment_periods \n"
+#~ " add constraint employment_periodsFK1 foreign key (employee_id) "
+#~ "references employees\n"
+#~ "create sequence employee_id_seq\n"
+#~ "create sequence employment_id_seq\n"
+#~ "create sequence employer_id_seq]]>"
+#~ msgstr ""
+#~ "<![CDATA[create table employers (\n"
+#~ " id BIGINT not null, \n"
+#~ " name VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table employment_periods (\n"
+#~ " id BIGINT not null,\n"
+#~ " hourly_rate NUMERIC(12, 2),\n"
+#~ " currency VARCHAR(12), \n"
+#~ " employee_id BIGINT not null, \n"
+#~ " employer_id BIGINT not null, \n"
+#~ " end_date TIMESTAMP, \n"
+#~ " start_date TIMESTAMP, \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table employees (\n"
+#~ " id BIGINT not null, \n"
+#~ " firstName VARCHAR(255), \n"
+#~ " initial CHAR(1), \n"
+#~ " lastName VARCHAR(255), \n"
+#~ " taxfileNumber VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "alter table employment_periods \n"
+#~ " add constraint employment_periodsFK0 foreign key (employer_id) "
+#~ "references employers\n"
+#~ "alter table employment_periods \n"
+#~ " add constraint employment_periodsFK1 foreign key (employee_id) "
+#~ "references employees\n"
+#~ "create sequence employee_id_seq\n"
+#~ "create sequence employment_id_seq\n"
+#~ "create sequence employer_id_seq]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Work\" table=\"works\"
discriminator-value=\"W\">\n"
+#~ "\n"
+#~ " <id name=\"id\" column=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <discriminator column=\"type\"
type=\"character\"/>\n"
+#~ "\n"
+#~ " <property name=\"title\"/>\n"
+#~ " <set name=\"authors\"
table=\"author_work\">\n"
+#~ " <key column name=\"work_id\"/>\n"
+#~ " <many-to-many class=\"Author\" column
name=\"author_id\"/>\n"
+#~ " </set>\n"
+#~ "\n"
+#~ " <subclass name=\"Book\"
discriminator-value=\"B\">\n"
+#~ " <property name=\"text\"/>\n"
+#~ " </subclass>\n"
+#~ "\n"
+#~ " <subclass name=\"Song\"
discriminator-value=\"S\">\n"
+#~ " <property name=\"tempo\"/>\n"
+#~ " <property name=\"genre\"/>\n"
+#~ " </subclass>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Author\" table=\"authors\">\n"
+#~ "\n"
+#~ " <id name=\"id\" column=\"id\">\n"
+#~ " <!-- The Author must have the same identifier as the Person
--"
+#~ ">\n"
+#~ " <generator class=\"assigned\"/> \n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property name=\"alias\"/>\n"
+#~ " <one-to-one name=\"person\"
constrained=\"true\"/>\n"
+#~ "\n"
+#~ " <set name=\"works\" table=\"author_work\"
inverse=\"true\">\n"
+#~ " <key column=\"author_id\"/>\n"
+#~ " <many-to-many class=\"Work\"
column=\"work_id\"/>\n"
+#~ " </set>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Person\" table=\"persons\">\n"
+#~ " <id name=\"id\" column=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Work\" table=\"works\"
discriminator-value=\"W\">\n"
+#~ "\n"
+#~ " <id name=\"id\" column=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <discriminator column=\"type\"
type=\"character\"/>\n"
+#~ "\n"
+#~ " <property name=\"title\"/>\n"
+#~ " <set name=\"authors\"
table=\"author_work\">\n"
+#~ " <key column name=\"work_id\"/>\n"
+#~ " <many-to-many class=\"Author\" column
name=\"author_id\"/>\n"
+#~ " </set>\n"
+#~ "\n"
+#~ " <subclass name=\"Book\"
discriminator-value=\"B\">\n"
+#~ " <property name=\"text\"/>\n"
+#~ " </subclass>\n"
+#~ "\n"
+#~ " <subclass name=\"Song\"
discriminator-value=\"S\">\n"
+#~ " <property name=\"tempo\"/>\n"
+#~ " <property name=\"genre\"/>\n"
+#~ " </subclass>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Author\" table=\"authors\">\n"
+#~ "\n"
+#~ " <id name=\"id\" column=\"id\">\n"
+#~ " <!-- The Author must have the same identifier as the Person
--"
+#~ ">\n"
+#~ " <generator class=\"assigned\"/> \n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property name=\"alias\"/>\n"
+#~ " <one-to-one name=\"person\"
constrained=\"true\"/>\n"
+#~ "\n"
+#~ " <set name=\"works\" table=\"author_work\"
inverse=\"true\">\n"
+#~ " <key column=\"author_id\"/>\n"
+#~ " <many-to-many class=\"Work\"
column=\"work_id\"/>\n"
+#~ " </set>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Person\" table=\"persons\">\n"
+#~ " <id name=\"id\" column=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[create table works (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " tempo FLOAT, \n"
+#~ " genre VARCHAR(255), \n"
+#~ " text INTEGER, \n"
+#~ " title VARCHAR(255), \n"
+#~ " type CHAR(1) not null, \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table author_work (\n"
+#~ " author_id BIGINT not null, \n"
+#~ " work_id BIGINT not null, \n"
+#~ " primary key (work_id, author_id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table authors (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " alias VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table persons (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " name VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "alter table authors \n"
+#~ " add constraint authorsFK0 foreign key (id) references persons\n"
+#~ "alter table author_work \n"
+#~ " add constraint author_workFK0 foreign key (author_id) references "
+#~ "authors\n"
+#~ "alter table author_work\n"
+#~ " add constraint author_workFK1 foreign key (work_id) references
works]]"
+#~ ">"
+#~ msgstr ""
+#~ "<![CDATA[create table works (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " tempo FLOAT, \n"
+#~ " genre VARCHAR(255), \n"
+#~ " text INTEGER, \n"
+#~ " title VARCHAR(255), \n"
+#~ " type CHAR(1) not null, \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table author_work (\n"
+#~ " author_id BIGINT not null, \n"
+#~ " work_id BIGINT not null, \n"
+#~ " primary key (work_id, author_id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table authors (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " alias VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table persons (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " name VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "alter table authors \n"
+#~ " add constraint authorsFK0 foreign key (id) references persons\n"
+#~ "alter table author_work \n"
+#~ " add constraint author_workFK0 foreign key (author_id) references "
+#~ "authors\n"
+#~ "alter table author_work\n"
+#~ " add constraint author_workFK1 foreign key (work_id) references
works]]"
+#~ ">"
+
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Customer\"
table=\"customers\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " <set name=\"orders\"
inverse=\"true\">\n"
+#~ " <key column=\"customer_id\"/>\n"
+#~ " <one-to-many class=\"Order\"/>\n"
+#~ " </set>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Order\" table=\"orders\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"date\"/>\n"
+#~ " <many-to-one name=\"customer\"
column=\"customer_id\"/>\n"
+#~ " <list name=\"lineItems\"
table=\"line_items\">\n"
+#~ " <key column=\"order_id\"/>\n"
+#~ " <list-index column=\"line_number\"/>\n"
+#~ " <composite-element class=\"LineItem\">\n"
+#~ " <property name=\"quantity\"/>\n"
+#~ " <many-to-one name=\"product\"
column=\"product_id\"/>\n"
+#~ " </composite-element>\n"
+#~ " </list>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Product\"
table=\"products\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"serialNumber\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"Customer\"
table=\"customers\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " <set name=\"orders\"
inverse=\"true\">\n"
+#~ " <key column=\"customer_id\"/>\n"
+#~ " <one-to-many class=\"Order\"/>\n"
+#~ " </set>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Order\" table=\"orders\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"date\"/>\n"
+#~ " <many-to-one name=\"customer\"
column=\"customer_id\"/>\n"
+#~ " <list name=\"lineItems\"
table=\"line_items\">\n"
+#~ " <key column=\"order_id\"/>\n"
+#~ " <list-index column=\"line_number\"/>\n"
+#~ " <composite-element class=\"LineItem\">\n"
+#~ " <property name=\"quantity\"/>\n"
+#~ " <many-to-one name=\"product\"
column=\"product_id\"/>\n"
+#~ " </composite-element>\n"
+#~ " </list>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ " <class name=\"Product\"
table=\"products\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"serialNumber\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[create table customers (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " name VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table orders (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " customer_id BIGINT, \n"
+#~ " date TIMESTAMP, \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table line_items (\n"
+#~ " line_number INTEGER not null, \n"
+#~ " order_id BIGINT not null, \n"
+#~ " product_id BIGINT, \n"
+#~ " quantity INTEGER, \n"
+#~ " primary key (order_id, line_number)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table products (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " serialNumber VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "alter table orders \n"
+#~ " add constraint ordersFK0 foreign key (customer_id) references "
+#~ "customers\n"
+#~ "alter table line_items\n"
+#~ " add constraint line_itemsFK0 foreign key (product_id) references "
+#~ "products\n"
+#~ "alter table line_items\n"
+#~ " add constraint line_itemsFK1 foreign key (order_id) references "
+#~ "orders]]>"
+#~ msgstr ""
+#~ "<![CDATA[create table customers (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " name VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table orders (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " customer_id BIGINT, \n"
+#~ " date TIMESTAMP, \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table line_items (\n"
+#~ " line_number INTEGER not null, \n"
+#~ " order_id BIGINT not null, \n"
+#~ " product_id BIGINT, \n"
+#~ " quantity INTEGER, \n"
+#~ " primary key (order_id, line_number)\n"
+#~ ")\n"
+#~ "\n"
+#~ "create table products (\n"
+#~ " id BIGINT not null generated by default as identity, \n"
+#~ " serialNumber VARCHAR(255), \n"
+#~ " primary key (id)\n"
+#~ ")\n"
+#~ "\n"
+#~ "alter table orders \n"
+#~ " add constraint ordersFK0 foreign key (customer_id) references "
+#~ "customers\n"
+#~ "alter table line_items\n"
+#~ " add constraint line_itemsFK0 foreign key (product_id) references "
+#~ "products\n"
+#~ "alter table line_items\n"
+#~ " add constraint line_itemsFK1 foreign key (order_id) references "
+#~ "orders]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"name\"/>\n"
+#~ " <one-to-one name=\"address\" \n"
+#~ " cascade=\"all\">\n"
+#~ " <formula>name</formula>\n"
+#~ " <formula>'HOME'</formula>\n"
+#~ " </one-to-one>\n"
+#~ " <one-to-one name=\"mailingAddress\" \n"
+#~ " cascade=\"all\">\n"
+#~ " <formula>name</formula>\n"
+#~ " <formula>'MAILING'</formula>\n"
+#~ " </one-to-one>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\" batch-size=\"2\" \n"
+#~ " check=\"addressType in ('MAILING', 'HOME',
'BUSINESS')\">\n"
+#~ " <composite-id>\n"
+#~ " <key-many-to-one name=\"person\" \n"
+#~ " column=\"personName\"/>\n"
+#~ " <key-property name=\"type\" \n"
+#~ " column=\"addressType\"/>\n"
+#~ " </composite-id>\n"
+#~ " <property name=\"street\" type=\"text\"/>\n"
+#~ " <property name=\"state\"/>\n"
+#~ " <property name=\"zip\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"name\"/>\n"
+#~ " <one-to-one name=\"address\" \n"
+#~ " cascade=\"all\">\n"
+#~ " <formula>name</formula>\n"
+#~ " <formula>'HOME'</formula>\n"
+#~ " </one-to-one>\n"
+#~ " <one-to-one name=\"mailingAddress\" \n"
+#~ " cascade=\"all\">\n"
+#~ " <formula>name</formula>\n"
+#~ " <formula>'MAILING'</formula>\n"
+#~ " </one-to-one>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\" batch-size=\"2\" \n"
+#~ " check=\"addressType in ('MAILING', 'HOME',
'BUSINESS')\">\n"
+#~ " <composite-id>\n"
+#~ " <key-many-to-one name=\"person\" \n"
+#~ " column=\"personName\"/>\n"
+#~ " <key-property name=\"type\" \n"
+#~ " column=\"addressType\"/>\n"
+#~ " </composite-id>\n"
+#~ " <property name=\"street\" type=\"text\"/>\n"
+#~ " <property name=\"state\"/>\n"
+#~ " <property name=\"zip\"/>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Customer\">\n"
+#~ "\n"
+#~ " <id name=\"customerId\"\n"
+#~ " length=\"10\">\n"
+#~ " <generator class=\"assigned\"/>\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property name=\"name\" not-null=\"true\"
length=\"100\"/>\n"
+#~ " <property name=\"address\" not-null=\"true\"
length=\"200\"/>\n"
+#~ "\n"
+#~ " <list name=\"orders\"\n"
+#~ " inverse=\"true\"\n"
+#~ " cascade=\"save-update\">\n"
+#~ " <key column=\"customerId\"/>\n"
+#~ " <index column=\"orderNumber\"/>\n"
+#~ " <one-to-many class=\"Order\"/>\n"
+#~ " </list>\n"
+#~ "\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Order\" table=\"CustomerOrder\"
lazy=\"true\">\n"
+#~ " <synchronize table=\"LineItem\"/>\n"
+#~ " <synchronize table=\"Product\"/>\n"
+#~ " \n"
+#~ " <composite-id name=\"id\" \n"
+#~ " class=\"Order$Id\">\n"
+#~ " <key-property name=\"customerId\"
length=\"10\"/>\n"
+#~ " <key-property name=\"orderNumber\"/>\n"
+#~ " </composite-id>\n"
+#~ " \n"
+#~ " <property name=\"orderDate\" \n"
+#~ " type=\"calendar_date\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ " \n"
+#~ " <property name=\"total\">\n"
+#~ " <formula>\n"
+#~ " ( select sum(li.quantity*p.price) \n"
+#~ " from LineItem li, Product p \n"
+#~ " where li.productId = p.productId \n"
+#~ " and li.customerId = customerId \n"
+#~ " and li.orderNumber = orderNumber )\n"
+#~ " </formula>\n"
+#~ " </property>\n"
+#~ " \n"
+#~ " <many-to-one name=\"customer\"\n"
+#~ " column=\"customerId\"\n"
+#~ " insert=\"false\"\n"
+#~ " update=\"false\" \n"
+#~ " not-null=\"true\"/>\n"
+#~ " \n"
+#~ " <bag name=\"lineItems\"\n"
+#~ " fetch=\"join\" \n"
+#~ " inverse=\"true\"\n"
+#~ " cascade=\"save-update\">\n"
+#~ " <key>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " <column name=\"orderNumber\"/>\n"
+#~ " </key>\n"
+#~ " <one-to-many class=\"LineItem\"/>\n"
+#~ " </bag>\n"
+#~ " \n"
+#~ "</class>\n"
+#~ " \n"
+#~ "<class name=\"LineItem\">\n"
+#~ " \n"
+#~ " <composite-id name=\"id\" \n"
+#~ " class=\"LineItem$Id\">\n"
+#~ " <key-property name=\"customerId\"
length=\"10\"/>\n"
+#~ " <key-property name=\"orderNumber\"/>\n"
+#~ " <key-property name=\"productId\"
length=\"10\"/>\n"
+#~ " </composite-id>\n"
+#~ " \n"
+#~ " <property name=\"quantity\"/>\n"
+#~ " \n"
+#~ " <many-to-one name=\"order\"\n"
+#~ " insert=\"false\"\n"
+#~ " update=\"false\" \n"
+#~ " not-null=\"true\">\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " <column name=\"orderNumber\"/>\n"
+#~ " </many-to-one>\n"
+#~ " \n"
+#~ " <many-to-one name=\"product\"\n"
+#~ " insert=\"false\"\n"
+#~ " update=\"false\" \n"
+#~ " not-null=\"true\"\n"
+#~ " column=\"productId\"/>\n"
+#~ " \n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Product\">\n"
+#~ " <synchronize table=\"LineItem\"/>\n"
+#~ "\n"
+#~ " <id name=\"productId\"\n"
+#~ " length=\"10\">\n"
+#~ " <generator class=\"assigned\"/>\n"
+#~ " </id>\n"
+#~ " \n"
+#~ " <property name=\"description\" \n"
+#~ " not-null=\"true\" \n"
+#~ " length=\"200\"/>\n"
+#~ " <property name=\"price\" length=\"3\"/>\n"
+#~ " <property name=\"numberAvailable\"/>\n"
+#~ " \n"
+#~ " <property name=\"numberOrdered\">\n"
+#~ " <formula>\n"
+#~ " ( select sum(li.quantity) \n"
+#~ " from LineItem li \n"
+#~ " where li.productId = productId )\n"
+#~ " </formula>\n"
+#~ " </property>\n"
+#~ " \n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Customer\">\n"
+#~ "\n"
+#~ " <id name=\"customerId\"\n"
+#~ " length=\"10\">\n"
+#~ " <generator class=\"assigned\"/>\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property name=\"name\" not-null=\"true\"
length=\"100\"/>\n"
+#~ " <property name=\"address\" not-null=\"true\"
length=\"200\"/>\n"
+#~ "\n"
+#~ " <list name=\"orders\"\n"
+#~ " inverse=\"true\"\n"
+#~ " cascade=\"save-update\">\n"
+#~ " <key column=\"customerId\"/>\n"
+#~ " <index column=\"orderNumber\"/>\n"
+#~ " <one-to-many class=\"Order\"/>\n"
+#~ " </list>\n"
+#~ "\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Order\" table=\"CustomerOrder\"
lazy=\"true\">\n"
+#~ " <synchronize table=\"LineItem\"/>\n"
+#~ " <synchronize table=\"Product\"/>\n"
+#~ " \n"
+#~ " <composite-id name=\"id\" \n"
+#~ " class=\"Order$Id\">\n"
+#~ " <key-property name=\"customerId\"
length=\"10\"/>\n"
+#~ " <key-property name=\"orderNumber\"/>\n"
+#~ " </composite-id>\n"
+#~ " \n"
+#~ " <property name=\"orderDate\" \n"
+#~ " type=\"calendar_date\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ " \n"
+#~ " <property name=\"total\">\n"
+#~ " <formula>\n"
+#~ " ( select sum(li.quantity*p.price) \n"
+#~ " from LineItem li, Product p \n"
+#~ " where li.productId = p.productId \n"
+#~ " and li.customerId = customerId \n"
+#~ " and li.orderNumber = orderNumber )\n"
+#~ " </formula>\n"
+#~ " </property>\n"
+#~ " \n"
+#~ " <many-to-one name=\"customer\"\n"
+#~ " column=\"customerId\"\n"
+#~ " insert=\"false\"\n"
+#~ " update=\"false\" \n"
+#~ " not-null=\"true\"/>\n"
+#~ " \n"
+#~ " <bag name=\"lineItems\"\n"
+#~ " fetch=\"join\" \n"
+#~ " inverse=\"true\"\n"
+#~ " cascade=\"save-update\">\n"
+#~ " <key>\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " <column name=\"orderNumber\"/>\n"
+#~ " </key>\n"
+#~ " <one-to-many class=\"LineItem\"/>\n"
+#~ " </bag>\n"
+#~ " \n"
+#~ "</class>\n"
+#~ " \n"
+#~ "<class name=\"LineItem\">\n"
+#~ " \n"
+#~ " <composite-id name=\"id\" \n"
+#~ " class=\"LineItem$Id\">\n"
+#~ " <key-property name=\"customerId\"
length=\"10\"/>\n"
+#~ " <key-property name=\"orderNumber\"/>\n"
+#~ " <key-property name=\"productId\"
length=\"10\"/>\n"
+#~ " </composite-id>\n"
+#~ " \n"
+#~ " <property name=\"quantity\"/>\n"
+#~ " \n"
+#~ " <many-to-one name=\"order\"\n"
+#~ " insert=\"false\"\n"
+#~ " update=\"false\" \n"
+#~ " not-null=\"true\">\n"
+#~ " <column name=\"customerId\"/>\n"
+#~ " <column name=\"orderNumber\"/>\n"
+#~ " </many-to-one>\n"
+#~ " \n"
+#~ " <many-to-one name=\"product\"\n"
+#~ " insert=\"false\"\n"
+#~ " update=\"false\" \n"
+#~ " not-null=\"true\"\n"
+#~ " column=\"productId\"/>\n"
+#~ " \n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Product\">\n"
+#~ " <synchronize table=\"LineItem\"/>\n"
+#~ "\n"
+#~ " <id name=\"productId\"\n"
+#~ " length=\"10\">\n"
+#~ " <generator class=\"assigned\"/>\n"
+#~ " </id>\n"
+#~ " \n"
+#~ " <property name=\"description\" \n"
+#~ " not-null=\"true\" \n"
+#~ " length=\"200\"/>\n"
+#~ " <property name=\"price\" length=\"3\"/>\n"
+#~ " <property name=\"numberAvailable\"/>\n"
+#~ " \n"
+#~ " <property name=\"numberOrdered\">\n"
+#~ " <formula>\n"
+#~ " ( select sum(li.quantity) \n"
+#~ " from LineItem li \n"
+#~ " where li.productId = productId )\n"
+#~ " </formula>\n"
+#~ " </property>\n"
+#~ " \n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"User\"
table=\"`User`\">\n"
+#~ " <composite-id>\n"
+#~ " <key-property name=\"name\"/>\n"
+#~ " <key-property name=\"org\"/>\n"
+#~ " </composite-id>\n"
+#~ " <set name=\"groups\" table=\"UserGroup\">\n"
+#~ " <key>\n"
+#~ " <column name=\"userName\"/>\n"
+#~ " <column name=\"org\"/>\n"
+#~ " </key>\n"
+#~ " <many-to-many class=\"Group\">\n"
+#~ " <column name=\"groupName\"/>\n"
+#~ " <formula>org</formula>\n"
+#~ " </many-to-many>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ " \n"
+#~ "<class name=\"Group\" table=\"`Group`\">\n"
+#~ " <composite-id>\n"
+#~ " <key-property name=\"name\"/>\n"
+#~ " <key-property name=\"org\"/>\n"
+#~ " </composite-id>\n"
+#~ " <property name=\"description\"/>\n"
+#~ " <set name=\"users\" table=\"UserGroup\"
inverse=\"true\">\n"
+#~ " <key>\n"
+#~ " <column name=\"groupName\"/>\n"
+#~ " <column name=\"org\"/>\n"
+#~ " </key>\n"
+#~ " <many-to-many class=\"User\">\n"
+#~ " <column name=\"userName\"/>\n"
+#~ " <formula>org</formula>\n"
+#~ " </many-to-many>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"User\"
table=\"`User`\">\n"
+#~ " <composite-id>\n"
+#~ " <key-property name=\"name\"/>\n"
+#~ " <key-property name=\"org\"/>\n"
+#~ " </composite-id>\n"
+#~ " <set name=\"groups\" table=\"UserGroup\">\n"
+#~ " <key>\n"
+#~ " <column name=\"userName\"/>\n"
+#~ " <column name=\"org\"/>\n"
+#~ " </key>\n"
+#~ " <many-to-many class=\"Group\">\n"
+#~ " <column name=\"groupName\"/>\n"
+#~ " <formula>org</formula>\n"
+#~ " </many-to-many>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ " \n"
+#~ "<class name=\"Group\" table=\"`Group`\">\n"
+#~ " <composite-id>\n"
+#~ " <key-property name=\"name\"/>\n"
+#~ " <key-property name=\"org\"/>\n"
+#~ " </composite-id>\n"
+#~ " <property name=\"description\"/>\n"
+#~ " <set name=\"users\" table=\"UserGroup\"
inverse=\"true\">\n"
+#~ " <key>\n"
+#~ " <column name=\"groupName\"/>\n"
+#~ " <column name=\"org\"/>\n"
+#~ " </key>\n"
+#~ " <many-to-many class=\"User\">\n"
+#~ " <column name=\"userName\"/>\n"
+#~ " <formula>org</formula>\n"
+#~ " </many-to-many>\n"
+#~ " </set>\n"
+#~ "</class>\n"
+#~ "]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\"\n"
+#~ " discriminator-value=\"P\">\n"
+#~ " \n"
+#~ " <id name=\"id\" \n"
+#~ " column=\"person_id\" \n"
+#~ " unsaved-value=\"0\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " \n"
+#~ " \n"
+#~ " <discriminator \n"
+#~ " type=\"character\">\n"
+#~ " <formula>\n"
+#~ " case \n"
+#~ " when title is not null then 'E' \n"
+#~ " when salesperson is not null then 'C' \n"
+#~ " else 'P' \n"
+#~ " end\n"
+#~ " </formula>\n"
+#~ " </discriminator>\n"
+#~ "\n"
+#~ " <property name=\"name\" \n"
+#~ " not-null=\"true\"\n"
+#~ " length=\"80\"/>\n"
+#~ " \n"
+#~ " <property name=\"sex\" \n"
+#~ " not-null=\"true\"\n"
+#~ " update=\"false\"/>\n"
+#~ " \n"
+#~ " <component name=\"address\">\n"
+#~ " <property name=\"address\"/>\n"
+#~ " <property name=\"zip\"/>\n"
+#~ " <property name=\"country\"/>\n"
+#~ " </component>\n"
+#~ " \n"
+#~ " <subclass name=\"Employee\" \n"
+#~ " discriminator-value=\"E\">\n"
+#~ " <property name=\"title\"\n"
+#~ " length=\"20\"/>\n"
+#~ " <property name=\"salary\"/>\n"
+#~ " <many-to-one name=\"manager\"/>\n"
+#~ " </subclass>\n"
+#~ " \n"
+#~ " <subclass name=\"Customer\" \n"
+#~ " discriminator-value=\"C\">\n"
+#~ " <property name=\"comments\"/>\n"
+#~ " <many-to-one name=\"salesperson\"/>\n"
+#~ " </subclass>\n"
+#~ " \n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\"\n"
+#~ " discriminator-value=\"P\">\n"
+#~ " \n"
+#~ " <id name=\"id\" \n"
+#~ " column=\"person_id\" \n"
+#~ " unsaved-value=\"0\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " \n"
+#~ " \n"
+#~ " <discriminator \n"
+#~ " type=\"character\">\n"
+#~ " <formula>\n"
+#~ " case \n"
+#~ " when title is not null then 'E' \n"
+#~ " when salesperson is not null then 'C' \n"
+#~ " else 'P' \n"
+#~ " end\n"
+#~ " </formula>\n"
+#~ " </discriminator>\n"
+#~ "\n"
+#~ " <property name=\"name\" \n"
+#~ " not-null=\"true\"\n"
+#~ " length=\"80\"/>\n"
+#~ " \n"
+#~ " <property name=\"sex\" \n"
+#~ " not-null=\"true\"\n"
+#~ " update=\"false\"/>\n"
+#~ " \n"
+#~ " <component name=\"address\">\n"
+#~ " <property name=\"address\"/>\n"
+#~ " <property name=\"zip\"/>\n"
+#~ " <property name=\"country\"/>\n"
+#~ " </component>\n"
+#~ " \n"
+#~ " <subclass name=\"Employee\" \n"
+#~ " discriminator-value=\"E\">\n"
+#~ " <property name=\"title\"\n"
+#~ " length=\"20\"/>\n"
+#~ " <property name=\"salary\"/>\n"
+#~ " <many-to-one name=\"manager\"/>\n"
+#~ " </subclass>\n"
+#~ " \n"
+#~ " <subclass name=\"Customer\" \n"
+#~ " discriminator-value=\"C\">\n"
+#~ " <property name=\"comments\"/>\n"
+#~ " <many-to-one name=\"salesperson\"/>\n"
+#~ " </subclass>\n"
+#~ " \n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " \n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"hilo\"/>\n"
+#~ " </id>\n"
+#~ " \n"
+#~ " <property name=\"name\" length=\"100\"/>\n"
+#~ " \n"
+#~ " <one-to-one name=\"address\" \n"
+#~ " property-ref=\"person\"\n"
+#~ " cascade=\"all\"\n"
+#~ " fetch=\"join\"/>\n"
+#~ " \n"
+#~ " <set name=\"accounts\" \n"
+#~ " inverse=\"true\">\n"
+#~ " <key column=\"userId\"\n"
+#~ " property-ref=\"userId\"/>\n"
+#~ " <one-to-many class=\"Account\"/>\n"
+#~ " </set>\n"
+#~ " \n"
+#~ " <property name=\"userId\" length=\"8\"/>\n"
+#~ "\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ "\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"hilo\"/>\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property name=\"address\"
length=\"300\"/>\n"
+#~ " <property name=\"zip\" length=\"5\"/>\n"
+#~ " <property name=\"country\"
length=\"25\"/>\n"
+#~ " <many-to-one name=\"person\" unique=\"true\"
not-null=\"true\"/>\n"
+#~ "\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Account\">\n"
+#~ " <id name=\"accountId\" length=\"32\">\n"
+#~ " <generator class=\"uuid\"/>\n"
+#~ " </id>\n"
+#~ " \n"
+#~ " <many-to-one name=\"user\"\n"
+#~ " column=\"userId\"\n"
+#~ " property-ref=\"userId\"/>\n"
+#~ " \n"
+#~ " <property name=\"type\"
not-null=\"true\"/>\n"
+#~ " \n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " \n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"hilo\"/>\n"
+#~ " </id>\n"
+#~ " \n"
+#~ " <property name=\"name\" length=\"100\"/>\n"
+#~ " \n"
+#~ " <one-to-one name=\"address\" \n"
+#~ " property-ref=\"person\"\n"
+#~ " cascade=\"all\"\n"
+#~ " fetch=\"join\"/>\n"
+#~ " \n"
+#~ " <set name=\"accounts\" \n"
+#~ " inverse=\"true\">\n"
+#~ " <key column=\"userId\"\n"
+#~ " property-ref=\"userId\"/>\n"
+#~ " <one-to-many class=\"Account\"/>\n"
+#~ " </set>\n"
+#~ " \n"
+#~ " <property name=\"userId\" length=\"8\"/>\n"
+#~ "\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Address\">\n"
+#~ "\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"hilo\"/>\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property name=\"address\"
length=\"300\"/>\n"
+#~ " <property name=\"zip\" length=\"5\"/>\n"
+#~ " <property name=\"country\"
length=\"25\"/>\n"
+#~ " <many-to-one name=\"person\" unique=\"true\"
not-null=\"true\"/>\n"
+#~ "\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Account\">\n"
+#~ " <id name=\"accountId\" length=\"32\">\n"
+#~ " <generator class=\"uuid\"/>\n"
+#~ " </id>\n"
+#~ " \n"
+#~ " <many-to-one name=\"user\"\n"
+#~ " column=\"userId\"\n"
+#~ " property-ref=\"userId\"/>\n"
+#~ " \n"
+#~ " <property name=\"type\"
not-null=\"true\"/>\n"
+#~ " \n"
+#~ "</class>]]>"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_parentchild.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_parentchild.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_parentchild.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,24 +1,26 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:26\n"
+"PO-Revision-Date: 2009-11-27 13:54+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: example_parentchild.xml:29
#, no-c-format
msgid "Example: Parent/Child"
-msgstr "示例:父子关系(Parent Child Relationships)"
+msgstr "示例:父子关系(Parent/Child)"
#. Tag: para
-#: example_parentchild.xml:31
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"One of the first things that new users want to do with Hibernate is to model
"
"a parent/child type relationship. There are two different approaches to "
@@ -34,45 +36,42 @@
"cascades</emphasis> to model a parent/child relationship efficiently and
"
"elegantly."
msgstr ""
-"刚刚接触Hibernate的人大多是从父子关系(parent / child type relationship)的建"
-"模入手的。父子关系的建模有两种方法。由于种种原因,最方便的方法是把"
-"<literal>Parent</literal>和<literal>Child</literal>都建模成实体类,并创建一个"
-"从<literal>Parent</literal>指向<literal>Child</literal>的<one-to-many>"
-"关联,对新手来说尤其如此。还有一种方法,就是将<literal>Child</literal>声明为"
-"一个<literal><composite-element></literal>(组合元素)。
事实上在"
-"Hibernate中one to many关联的默认语义远没有composite element贴近parent / child"
-"关系的通常语义。下面我们会阐述如何使用<emphasis>带有级联的双向一对多关联"
-"(bidirectional one to many association with cascades)</emphasis>去建立有效、"
-"优美的parent / child关系。这一点也不难!"
+"刚刚接触 Hibernate 的人大多是从父子关系(parent / child type relationship)的"
+"建模入手的。父子关系的建模有两种方法。由于种种原因,最方便的方法是把 "
+"<literal>Parent</literal> 和 <literal>Child</literal>
都建模成实体类,并创建"
+"一个从 <literal>Parent</literal> 指向 <literal>Child</literal> 的
<one-to-"
+"many> 关联,对新手来说尤其如此。还有一种方法,就是将 <literal>Child</"
+"literal> 声明为一个
<literal><composite-element></literal>(组合元"
+"素)。 事实上在 Hibernate 中 one to many 关联的默认语义远没有 composite "
+"element 贴近 parent / child 关系的通常语义。下面我们会阐述如何使用<emphasis>"
+"带有级联的双向一对多关联(idirectional one to many association with "
+"cascades)</emphasis>去建立有效、优美的 parent / child 关系。"
#. Tag: title
-#: example_parentchild.xml:45
#, no-c-format
msgid "A note about collections"
-msgstr "关于collections需要注意的一点"
+msgstr "关于 collections 需要注意的一点"
#. Tag: para
-#: example_parentchild.xml:47
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate collections are considered to be a logical part of their owning "
"entity and not of the contained entities. Be aware that this is a critical "
"distinction that has the following consequences:"
msgstr ""
-"Hibernate collections被当作其所属实体而不是其包含实体的一个逻辑部分。这非常重"
-"要!它主要体现为以下几点:"
+"Hibernate collections 被当作其所属实体而不是其包含实体的一个逻辑部分。这非常"
+"重要,它主要体现为以下几点:"
#. Tag: para
-#: example_parentchild.xml:54
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"When you remove/add an object from/to a collection, the version number of "
"the collection owner is incremented."
-msgstr "当删除或增加collection中对象的时候,collection所属者的版本值会递增。"
+msgstr ""
+"当删除或增加 collection 中对象的时候,collection 所属者的版本值会递增。 "
#. Tag: para
-#: example_parentchild.xml:60
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"If an object that was removed from a collection is an instance of a value "
"type (e.g. a composite element), that object will cease to be persistent and
"
@@ -80,13 +79,13 @@
"value type instance to the collection will cause its state to be immediately
"
"persistent."
msgstr ""
-"如果一个从collection中移除的对象是一个值类型(value type)的实例,比如"
+"如果一个从 collection 中移除的对象是一个值类型(value type)的实例,比如 "
"composite element,那么这个对象的持久化状态将会终止,其在数据库中对应的记录会"
-"被删除。同样的,向collection增加一个value type的实例将会使之立即被持久化。"
+"被删除。同样的,向 collection 增加一个 value type 的实例将会使之立即被持久"
+"化。 "
#. Tag: para
-#: example_parentchild.xml:68
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Conversely, if an entity is removed from a collection (a one-to-many or
many-"
"to-many association), it will not be deleted by default. This behavior is "
@@ -94,13 +93,13 @@
"should not cause the associated entity to vanish. Likewise, adding an entity
"
"to a collection does not cause that entity to become persistent, by default."
msgstr ""
-"另一方面,如果从一对多或多对多关联的collection中移除一个实体,在缺省情况下这"
-"个对象并不会被删除。这个行为是完全合乎逻辑的--改变一个实体的内部状态不应该"
-"使与它关联的实体消失掉!同样的,向collection增加一个实体不会使之被持久化。"
+"另一方面,如果从一对多或多对多关联的 collection 中移除一个实体,在缺省情况下"
+"这个对象并不会被删除。这个行为是完全合乎逻辑的--改变一个实体的内部状态不应"
+"该使与它关联的实体消失掉。同样的,向 collection 增加一个实体不会使之被持久"
+"化。 "
#. Tag: para
-#: example_parentchild.xml:78
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Adding an entity to a collection, by default, merely creates a link between "
"the two entities. Removing the entity will remove the link. This is "
@@ -108,106 +107,68 @@
"case of a parent/child relationship. In this case, the life of the child is "
"bound to the life cycle of the parent."
msgstr ""
-"实际上,向Collection增加一个实体的缺省动作只是在两个实体之间创建一个连接而"
+"实际上,向 Collection 增加一个实体的缺省动作只是在两个实体之间创建一个连接而"
"已,同样移除的时候也只是删除连接。这种处理对于所有的情况都是合适的。对于父子"
-"关系则是完全不适合的,在这种关系下,子对象的生存绑定于父对象的生存周期。"
+"关系则是完全不适合的,在这种关系下,子对象的生存绑定于父对象的生存周期。 "
#. Tag: title
-#: example_parentchild.xml:88
#, no-c-format
msgid "Bidirectional one-to-many"
-msgstr "双向的一对多关系(Bidirectional one-to-many)"
+msgstr "双向的一对多关系(Bidirectional one-to-many)"
#. Tag: para
-#: example_parentchild.xml:90
#, no-c-format
msgid ""
"Suppose we start with a simple
<literal><one-to-many></literal> "
"association from <literal>Parent</literal> to
<literal>Child</literal>."
-msgstr "假设我们要实现一个简单的从Parent到Child的<one-to-many>关联。"
-
-#. Tag: programlisting
-#: example_parentchild.xml:95
-#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"children\">\n"
-" <key column=\"parent_id\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-"</set>]]>"
msgstr ""
+"假设我们要实现一个简单的从 Parent 到 Child 的 <one-to-many> 关联。"
#. Tag: para
-#: example_parentchild.xml:97
-#, fuzzy, no-c-format
+#, no-c-format
msgid "If we were to execute the following code:"
-msgstr "如果我们运行下面的代码"
+msgstr "如果我们运行下面的代码:"
-#. Tag: programlisting
-#: example_parentchild.xml:101
-#, no-c-format
-msgid ""
-"<![CDATA[Parent p = .....;\n"
-"Child c = new Child();\n"
-"p.getChildren().add(c);\n"
-"session.save(c);\n"
-"session.flush();]]>"
-msgstr ""
-
#. Tag: para
-#: example_parentchild.xml:103
#, no-c-format
msgid "Hibernate would issue two SQL statements:"
-msgstr "Hibernate会产生两条SQL语句:"
+msgstr "Hibernate 会产生两条 SQL 语句:"
#. Tag: para
-#: example_parentchild.xml:109
#, no-c-format
msgid ""
"an <literal>INSERT</literal> to create the record for
<literal>c</literal>"
-msgstr
"一条<literal>INSERT</literal>语句,为<literal>c</literal>创建一条记录"
+msgstr ""
+"一条 <literal>INSERT</literal> 语句,为 <literal>c</literal>
创建一条记录"
#. Tag: para
-#: example_parentchild.xml:112
#, no-c-format
msgid ""
"an <literal>UPDATE</literal> to create the link from
<literal>p</literal> to "
"<literal>c</literal>"
msgstr ""
-"一条<literal>UPDATE</literal>语句,创建从<literal>p</literal>到<literal>c</"
-"literal>的连接"
+"一条 <literal>UPDATE</literal> 语句,创建从 <literal>p</literal> 到
"
+"<literal>c</literal> 的连接"
#. Tag: para
-#: example_parentchild.xml:119
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"This is not only inefficient, but also violates any <literal>NOT
NULL</"
"literal> constraint on the <literal>parent_id</literal> column. You
can fix "
"the nullability constraint violation by specifying
<literal>not-null=\"true"
"\"</literal> in the collection mapping:"
msgstr ""
-"这样做不仅效率低,而且违反了列<literal>parent_id</literal>非空的限制。我们可"
-"以通过在集合类映射上指定<literal>not-null=\"true\"</literal>来解决违反非空约"
-"束的问题:"
+"这样做不仅效率低,而且违反了 <literal>parent_id</literal> 列 "
+"<literal>parent_id</literal> 非空的限制。我们可以通过在集合类映射上指定 "
+"<literal>not-null=\"true\"</literal> 来解决违反非空约束的问题:"
-#. Tag: programlisting
-#: example_parentchild.xml:125
-#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"children\">\n"
-" <key column=\"parent_id\"
not-null=\"true\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-"</set>]]>"
-msgstr ""
-
#. Tag: para
-#: example_parentchild.xml:127
#, no-c-format
msgid "However, this is not the recommended solution."
msgstr "然而,这并非是推荐的解决方法。"
#. Tag: para
-#: example_parentchild.xml:130
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The underlying cause of this behavior is that the link (the foreign key "
"<literal>parent_id</literal>) from <literal>p</literal> to
<literal>c</"
@@ -215,261 +176,131 @@
"object and is therefore not created in the <literal>INSERT</literal>.
The "
"solution is to make the link part of the <literal>Child</literal>
mapping."
msgstr ""
-"这种现象的根本原因是从<literal>p</literal>到<literal>c</literal>的连接(外键"
-"parent_id)没有被当作<literal>Child</literal>对象状态的一部分,因而没有在"
-"INSERT语句中被创建。因此解决的办法就是把这个连接添加到Child的映射中。"
+"这种现象的根本原因是从 <literal>p</literal> 到 <literal>c</literal>
的连接"
+"(外键 parent_id)没有被当作 <literal>Child</literal> 对象状态的一部分,因而"
+"没有在 <literal>INSERT</literal> 语句中被创建。因此解决的办法就是把这个连接添"
+"加到 <literal>Child</literal> 的映射中。"
-#. Tag: programlisting
-#: example_parentchild.xml:137
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<many-to-one name=\"parent\"
column=\"parent_id\" not-null=\"true\"/"
-">]]>"
-msgstr ""
-
-#. Tag: para
-#: example_parentchild.xml:139
-#, fuzzy, no-c-format
-msgid ""
"You also need to add the <literal>parent</literal> property to the
"
"<literal>Child</literal> class."
msgstr ""
-"(我们还需要为类<literal>Child</literal>添加<literal>parent</literal>属性)"
+"你还需要为类 <literal>Child</literal> 添加
<literal>parent</literal> 属性。"
#. Tag: para
-#: example_parentchild.xml:143
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Now that the <literal>Child</literal> entity is managing the state of
the "
"link, we tell the collection not to update the link. We use the "
"<literal>inverse</literal> attribute to do this:"
msgstr ""
-"现在实体<literal>Child</literal>在管理连接的状态,为了使collection不更新连"
-"接,我们使用<literal>inverse</literal>属性。"
+"现在实体 <literal>Child</literal> 在管理连接的状态,为了使 collection 不更新"
+"连接,我们使用 <literal>inverse</literal> 属性:"
-#. Tag: programlisting
-#: example_parentchild.xml:148
-#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"children\"
inverse=\"true\">\n"
-" <key column=\"parent_id\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-"</set>]]>"
-msgstr ""
-
#. Tag: para
-#: example_parentchild.xml:150
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The following code would be used to add a new
<literal>Child</literal>:"
-msgstr "下面的代码是用来添加一个新的<literal>Child</literal>"
+msgstr "下面的代码是用来添加一个新的 <literal>Child</literal>:"
-#. Tag: programlisting
-#: example_parentchild.xml:154
-#, no-c-format
-msgid ""
-"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-"Child c = new Child();\n"
-"c.setParent(p);\n"
-"p.getChildren().add(c);\n"
-"session.save(c);\n"
-"session.flush();]]>"
-msgstr ""
-
#. Tag: para
-#: example_parentchild.xml:156
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Only one SQL <literal>INSERT</literal> would now be
issued."
-msgstr "现在,只会有一条<literal>INSERT</literal>语句被执行!"
+msgstr "现在,只会有一条 <literal>INSERT</literal> 语句被执行。"
#. Tag: para
-#: example_parentchild.xml:160
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You could also create an <literal>addChild()</literal> method of
"
"<literal>Parent</literal>."
msgstr ""
-"为了让事情变得井井有条,可以为<literal>Parent</literal>加一个"
-"<literal>addChild()</literal>方法。"
+"为了让事情变得井井有条,可以为 <literal>Parent</literal> 加一个 "
+"<literal>addChild()</literal> 方法。"
-#. Tag: programlisting
-#: example_parentchild.xml:165
-#, no-c-format
-msgid ""
-"<![CDATA[public void addChild(Child c) {\n"
-" c.setParent(this);\n"
-" children.add(c);\n"
-"}]]>"
-msgstr ""
-
#. Tag: para
-#: example_parentchild.xml:167
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The code to add a <literal>Child</literal> looks like
this:"
-msgstr "现在,添加<literal>Child</literal>的代码就是这样"
+msgstr "现在,添加 <literal>Child</literal> 的代码就是这样:"
-#. Tag: programlisting
-#: example_parentchild.xml:171
-#, no-c-format
-msgid ""
-"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-"Child c = new Child();\n"
-"p.addChild(c);\n"
-"session.save(c);\n"
-"session.flush();]]>"
-msgstr ""
-
#. Tag: title
-#: example_parentchild.xml:176
#, no-c-format
msgid "Cascading life cycle"
-msgstr "级联生命周期(Cascading life cycle)"
+msgstr "级联生命周期(Cascading lifecycle) "
#. Tag: para
-#: example_parentchild.xml:178
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You can address the frustrations of the explicit call to
<literal>save()</"
"literal> by using cascades."
msgstr ""
-"需要显式调用<literal>save()</literal>仍然很麻烦,我们可以用级联来解决这个问"
-"题。"
+"需要显式调用 <literal>save()</literal> 仍然很麻烦,我们可以用级联来解决这个问"
+"题。 "
-#. Tag: programlisting
-#: example_parentchild.xml:183
-#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"children\" inverse=\"true\"
cascade=\"all\">\n"
-" <key column=\"parent_id\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-"</set>]]>"
-msgstr ""
-
#. Tag: para
-#: example_parentchild.xml:185
-#, fuzzy, no-c-format
+#, no-c-format
msgid "This simplifies the code above to:"
-msgstr "这样上面的代码可以简化为:"
+msgstr "这样上面的代码可以简化为: "
-#. Tag: programlisting
-#: example_parentchild.xml:189
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-"Child c = new Child();\n"
-"p.addChild(c);\n"
-"session.flush();]]>"
-msgstr ""
-
-#. Tag: para
-#: example_parentchild.xml:191
-#, fuzzy, no-c-format
-msgid ""
"Similarly, we do not need to iterate over the children when saving or "
"deleting a <literal>Parent</literal>. The following removes
<literal>p</"
"literal> and all its children from the database."
msgstr ""
-"同样的,保存或删除<literal>Parent</literal>对象的时候并不需要遍历其子对象。 "
-"下面的代码会删除对象<literal>p</literal>及其所有子对象对应的数据库记录。"
+"同样的,保存或删除 <literal>Parent</literal> 对象的时候并不需要遍历其子对象。"
+"下面的代码会删除对象 <literal>p</literal> 及其所有子对象对应的数据库记录。 "
-#. Tag: programlisting
-#: example_parentchild.xml:196
-#, no-c-format
-msgid ""
-"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-"session.delete(p);\n"
-"session.flush();]]>"
-msgstr ""
-
#. Tag: para
-#: example_parentchild.xml:198
-#, fuzzy, no-c-format
+#, no-c-format
msgid "However, the following code:"
-msgstr "然而,这段代码"
+msgstr "然而,这段代码:"
-#. Tag: programlisting
-#: example_parentchild.xml:202
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-"Child c = (Child) p.getChildren().iterator().next();\n"
-"p.getChildren().remove(c);\n"
-"c.setParent(null);\n"
-"session.flush();]]>"
-msgstr ""
-
-#. Tag: para
-#: example_parentchild.xml:204
-#, fuzzy, no-c-format
-msgid ""
"will not remove <literal>c</literal> from the database. In this case,
it "
"will only remove the link to <literal>p</literal> and cause a
<literal>NOT "
"NULL</literal> constraint violation. You need to explicitly
<literal>delete()"
"</literal> the <literal>Child</literal>."
msgstr ""
-"不会从数据库删除<literal>c</literal>;它只会删除与<literal>p</literal>之间的"
-"连接(并且会导致违反<literal>NOT NULL</literal>约束,在这个例子中)。你需要显"
-"式调用<literal>delete()</literal>来删除<literal>Child</literal>。"
+"不会从数据库删除<literal>c</literal>;它只会删除与 <literal>p</literal>
之间"
+"的连接(并且会导致违反 <literal>NOT NULL</literal> 约束,在这个例子中)。你需"
+"要显式调用 <literal>delete()</literal> 来删除
<literal>Child</literal>。 "
-#. Tag: programlisting
-#: example_parentchild.xml:210
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
-"Child c = (Child) p.getChildren().iterator().next();\n"
-"p.getChildren().remove(c);\n"
-"session.delete(c);\n"
-"session.flush();]]>"
-msgstr ""
-
-#. Tag: para
-#: example_parentchild.xml:212
-#, fuzzy, no-c-format
-msgid ""
"In our case, a <literal>Child</literal> cannot exist without its
parent. So "
"if we remove a <literal>Child</literal> from the collection, we do want
it "
"to be deleted. To do this, we must use
<literal>cascade=\"all-delete-orphan"
"\"</literal>."
msgstr ""
-"在我们的例子中,如果没有父对象,子对象就不应该存在,如果将子对象从collection"
-"中移除,实际上我们是想删除它。要实现这种要求,就必须使用<literal>cascade="
-"\"all-delete-orphan\"</literal>。"
+"在我们的例子中,如果没有父对象,子对象就不应该存在,如果将子对象从 "
+"collection 中移除,实际上我们是想删除它。要实现这种要求,就必须使用 "
+"<literal>cascade=\"all-delete-orphan\"</literal>。 "
-#. Tag: programlisting
-#: example_parentchild.xml:218
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<set name=\"children\" inverse=\"true\"
cascade=\"all-delete-orphan"
-"\">\n"
-" <key column=\"parent_id\"/>\n"
-" <one-to-many class=\"Child\"/>\n"
-"</set>]]>"
-msgstr ""
-
-#. Tag: para
-#: example_parentchild.xml:220
-#, fuzzy, no-c-format
-msgid ""
"Even though the collection mapping specifies
<literal>inverse=\"true\"</"
"literal>, cascades are still processed by iterating the collection elements.
"
"If you need an object be saved, deleted or updated by cascade, you must add "
"it to the collection. It is not enough to simply call
<literal>setParent()</"
"literal>."
msgstr ""
-"注意:即使在collection一方的映射中指定<literal>inverse=\"true\"</literal>,级"
-"联仍然是通过遍历collection中的元素来处理的。如果你想要通过级联进行子对象的插"
-"入、删除、更新操作,就必须把它加到collection中,只调用<literal>setParent()</"
-"literal>是不够的。"
+"注意:即使在 collection 一方的映射中指定 <literal>inverse=\"true\"</"
+"literal>,级联仍然是通过遍历 collection 中的元素来处理的。如果你想要通过级联"
+"进行子对象的插入、删除、更新操作,就必须把它加到 collection 中,只调用 "
+"<literal>setParent()</literal> 是不够的。 "
#. Tag: title
-#: example_parentchild.xml:230
#, no-c-format
msgid "Cascades and <literal>unsaved-value</literal>"
-msgstr ""
-"级联与<literal>未保存值</literal>(Cascades and
<literal>unsaved-value</"
-"literal>)"
+msgstr "级联与未保存值(<literal>unsaved-value</literal>)"
#. Tag: para
-#: example_parentchild.xml:232
#, fuzzy, no-c-format
msgid ""
"Suppose we loaded up a <literal>Parent</literal> in one
<literal>Session</"
@@ -482,47 +313,33 @@
"literal> have generated identifier properties of type
<literal>Long</"
"literal>. Hibernate will use the identifier and version/timestamp property
"
"value to determine which of the children are new. (See <xref linkend="
-"\"objectstate-saveorupdate\"/>.) <emphasis>In Hibernate3, it is
no longer "
+"\"objectstate-saveorupdate\" />.) <emphasis>In Hibernate3, it is
no longer "
"necessary to specify an <literal>unsaved-value</literal>
explicitly.</"
"emphasis>"
msgstr ""
-"假设我们从<literal>Session</literal>中装入了一个<literal>Parent</literal>对"
-"象,用户界面对其进行了修改,然后希望在一个新的Session里面调用<literal>update"
-"()</literal>来保存这些修改。对象<literal>Parent</literal>包含了子对象的集合,"
-"由于打开了级联更新,Hibernate需要知道哪些Child对象是新实例化的,哪些代表数据"
-"库中已经存在的记录。我们假设<literal>Parent</literal>和<literal>Child</"
-"literal>对象的标识属性都是自动生成的,类型为<literal>java.lang.Long</"
-"literal>。Hibernate会使用标识属性的值,和version 或 timestamp 属性,来判断哪"
-"些子对象是新的。(参见<xref linkend=\"objectstate-saveorupdate\"/>.) "
-"<emphasis>在 Hibernate3
中,显式指定<literal>unsaved-value</literal>不再是必须"
-"的了。</emphasis>"
+"假设我们从 <literal>Session</literal> 中装入了一个
<literal>Parent</literal> "
+"对象,用户界面对其进行了修改,然后希望在一个新的 Session 里面调用 "
+"<literal>update()</literal> 来保存这些修改。对象
<literal>Parent</literal> 包"
+"含了子对象的集合,由于打开了级联更新,Hibernate 需要知道哪些 Child 对象是新实"
+"例化的,哪些代表数据库中已经存在的记录。我们假设 <literal>Parent</literal> "
+"和 <literal>Child</literal> 对象的标识属性都是自动生成的,类型为 "
+"<literal>java.lang.Long</literal>。Hibernate 会使用标识属性的值,和 version "
+"或 timestamp 属性,来判断哪些子对象是新的。(参见 <xref linkend="
+"\"objectstate-saveorupdate\"/>)<emphasis>在 Hibernate3 中,显式指定
"
+"<literal>unsaved-value</literal> 不再是必须的了。</emphasis>"
#. Tag: para
-#: example_parentchild.xml:244
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The following code will update <literal>parent</literal> and
<literal>child</"
"literal> and insert <literal>newChild</literal>:"
msgstr ""
-"下面的代码会更新<literal>parent</literal>和<literal>child</literal>对象,并且"
-"插入<literal>newChild</literal>对象。"
+"下面的代码会更新 <literal>parent</literal> 和
<literal>child</literal> 对象,"
+"并且插入 <literal>newChild</literal> 对象。 "
-#. Tag: programlisting
-#: example_parentchild.xml:249
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[//parent and child were both loaded in a previous session\n"
-"parent.addChild(child);\n"
-"Child newChild = new Child();\n"
-"parent.addChild(newChild);\n"
-"session.update(parent);\n"
-"session.flush();]]>"
-msgstr ""
-
-#. Tag: para
-#: example_parentchild.xml:251
-#, fuzzy, no-c-format
-msgid ""
"This may be suitable for the case of a generated identifier, but what about "
"assigned identifiers and composite identifiers? This is more difficult, "
"since Hibernate cannot use the identifier property to distinguish between a "
@@ -532,30 +349,27 @@
"cache or, worst case, the database, to see if the row exists."
msgstr ""
"这对于自动生成标识的情况是非常好的,但是自分配的标识和复合标识怎么办呢?这是"
-"有点麻烦,因为Hibernate没有办法区分新实例化的对象(标识被用户指定了)和前一个"
-"Session装入的对象。在这种情况下,Hibernate会使用timestamp或version属性,或者"
-"查询第二级缓存,或者最坏的情况,查询数据库,来确认是否此行存在。"
+"有点麻烦,因为 Hibernate 没有办法区分新实例化的对象(标识被用户指定了)和前一"
+"个 Session 装入的对象。在这种情况下,Hibernate 会使用 timestamp 或 version 属"
+"性,或者查询第二级缓存,或者最坏的情况,查询数据库,来确认是否此行存在。 "
#. Tag: title
-#: example_parentchild.xml:284
#, no-c-format
msgid "Conclusion"
msgstr "结论"
#. Tag: para
-#: example_parentchild.xml:286
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The sections we have just covered can be a bit confusing. However, in "
"practice, it all works out nicely. Most Hibernate applications use the "
"parent/child pattern in many places."
msgstr ""
"这里有不少东西需要融会贯通,可能会让新手感到迷惑。但是在实践中它们都工作地非"
-"常好。大部分Hibernate应用程序都会经常用到父子对象模式。"
+"常好。大部分 Hibernate 应用程序都会经常用到父子对象模式。 "
#. Tag: para
-#: example_parentchild.xml:291
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"We mentioned an alternative in the first paragraph. None of the above issues
"
"exist in the case of
<literal><composite-element></literal> mappings, "
@@ -564,7 +378,184 @@
"composite elements cannot own collections and they should not be the child "
"of any entity other than the unique parent."
msgstr ""
-"在第一段中我们曾经提到另一个方案。上面的这些问题都不会出现在<literal><"
-"composite-element></literal>映射中,它准确地表达了父子关系的语义。很不幸复"
-"合元素还有两个重大限制:复合元素不能拥有collections,并且,除了用于惟一的父对"
-"象外,它们不能再作为其它任何实体的子对象。"
+"在第一段中我们曾经提到另一个方案。上面的这些问题都不会出现在 <literal><"
+"composite-element></literal> 映射中,它准确地表达了父子关系的语义。很不幸"
+"复合元素还有两个重大限制:复合元素不能拥有 collections,并且,除了用于惟一的"
+"父对象外,它们不能再作为其它任何实体的子对象。 "
+
+#~ msgid ""
+#~ "<![CDATA[<set name=\"children\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ "</set>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<set name=\"children\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ "</set>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Parent p = .....;\n"
+#~ "Child c = new Child();\n"
+#~ "p.getChildren().add(c);\n"
+#~ "session.save(c);\n"
+#~ "session.flush();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Parent p = .....;\n"
+#~ "Child c = new Child();\n"
+#~ "p.getChildren().add(c);\n"
+#~ "session.save(c);\n"
+#~ "session.flush();]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<set name=\"children\">\n"
+#~ " <key column=\"parent_id\"
not-null=\"true\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ "</set>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<set name=\"children\">\n"
+#~ " <key column=\"parent_id\"
not-null=\"true\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ "</set>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"parent\"
column=\"parent_id\" not-null=\"true"
+#~ "\"/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<many-to-one name=\"parent\"
column=\"parent_id\" not-null=\"true"
+#~ "\"/>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<set name=\"children\"
inverse=\"true\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ "</set>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<set name=\"children\"
inverse=\"true\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ "</set>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "Child c = new Child();\n"
+#~ "c.setParent(p);\n"
+#~ "p.getChildren().add(c);\n"
+#~ "session.save(c);\n"
+#~ "session.flush();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "Child c = new Child();\n"
+#~ "c.setParent(p);\n"
+#~ "p.getChildren().add(c);\n"
+#~ "session.save(c);\n"
+#~ "session.flush();]]>"
+
+#~ msgid ""
+#~ "<![CDATA[public void addChild(Child c) {\n"
+#~ " c.setParent(this);\n"
+#~ " children.add(c);\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[public void addChild(Child c) {\n"
+#~ " c.setParent(this);\n"
+#~ " children.add(c);\n"
+#~ "}]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "Child c = new Child();\n"
+#~ "p.addChild(c);\n"
+#~ "session.save(c);\n"
+#~ "session.flush();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "Child c = new Child();\n"
+#~ "p.addChild(c);\n"
+#~ "session.save(c);\n"
+#~ "session.flush();]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<set name=\"children\" inverse=\"true\"
cascade=\"all\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ "</set>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<set name=\"children\" inverse=\"true\"
cascade=\"all\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ "</set>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "Child c = new Child();\n"
+#~ "p.addChild(c);\n"
+#~ "session.flush();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "Child c = new Child();\n"
+#~ "p.addChild(c);\n"
+#~ "session.flush();]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "session.delete(p);\n"
+#~ "session.flush();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "session.delete(p);\n"
+#~ "session.flush();]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "Child c = (Child) p.getChildren().iterator().next();\n"
+#~ "p.getChildren().remove(c);\n"
+#~ "c.setParent(null);\n"
+#~ "session.flush();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "Child c = (Child) p.getChildren().iterator().next();\n"
+#~ "p.getChildren().remove(c);\n"
+#~ "c.setParent(null);\n"
+#~ "session.flush();]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "Child c = (Child) p.getChildren().iterator().next();\n"
+#~ "p.getChildren().remove(c);\n"
+#~ "session.delete(c);\n"
+#~ "session.flush();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Parent p = (Parent) session.load(Parent.class, pid);\n"
+#~ "Child c = (Child) p.getChildren().iterator().next();\n"
+#~ "p.getChildren().remove(c);\n"
+#~ "session.delete(c);\n"
+#~ "session.flush();]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<set name=\"children\" inverse=\"true\"
cascade=\"all-delete-"
+#~ "orphan\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ "</set>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<set name=\"children\" inverse=\"true\"
cascade=\"all-delete-"
+#~ "orphan\">\n"
+#~ " <key column=\"parent_id\"/>\n"
+#~ " <one-to-many class=\"Child\"/>\n"
+#~ "</set>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[//parent and child were both loaded in a previous session\n"
+#~ "parent.addChild(child);\n"
+#~ "Child newChild = new Child();\n"
+#~ "parent.addChild(newChild);\n"
+#~ "session.update(parent);\n"
+#~ "session.flush();]]>"
+#~ msgstr ""
+#~ "<![CDATA[//parent and child were both loaded in a previous session\n"
+#~ "parent.addChild(child);\n"
+#~ "Child newChild = new Child();\n"
+#~ "parent.addChild(newChild);\n"
+#~ "session.update(parent);\n"
+#~ "session.flush();]]>"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_weblog.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_weblog.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/example_weblog.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,481 +1,856 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:26\n"
+"PO-Revision-Date: 2009-11-27 13:54+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: example_weblog.xml:29
#, no-c-format
msgid "Example: Weblog Application"
-msgstr "示例:Weblog 应用程序"
+msgstr "示例:Weblog 应用程序 "
#. Tag: title
-#: example_weblog.xml:32
#, no-c-format
msgid "Persistent Classes"
-msgstr "持久化类"
+msgstr "持久化类(Persistent Classes)"
#. Tag: para
-#: example_weblog.xml:34
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The persistent classes here represent a weblog and an item posted in a "
"weblog. They are to be modelled as a standard parent/child relationship, but
"
"we will use an ordered bag, instead of a set:"
msgstr ""
-"下面的持久化类表示一个weblog和在其中张贴的一个贴子。他们是标准的父/子关系模"
-"型,但是我们会用一个有序包(ordered bag)而非集合(set)。"
+"下面的持久化类表示一个 weblog 和在其中张贴的一个贴子。他们是标准的父/子关系模"
+"型,但是我们会用一个有序包(ordered bag)而非集合(set)。 "
-#. Tag: programlisting
-#: example_weblog.xml:40
-#, no-c-format
-msgid ""
-"<![CDATA[package eg;\n"
-"\n"
-"import java.util.List;\n"
-"\n"
-"public class Blog {\n"
-" private Long _id;\n"
-" private String _name;\n"
-" private List _items;\n"
-"\n"
-" public Long getId() {\n"
-" return _id;\n"
-" }\n"
-" public List getItems() {\n"
-" return _items;\n"
-" }\n"
-" public String getName() {\n"
-" return _name;\n"
-" }\n"
-" public void setId(Long long1) {\n"
-" _id = long1;\n"
-" }\n"
-" public void setItems(List list) {\n"
-" _items = list;\n"
-" }\n"
-" public void setName(String string) {\n"
-" _name = string;\n"
-" }\n"
-"}]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: example_weblog.xml:42
-#, no-c-format
-msgid ""
-"<![CDATA[package eg;\n"
-"\n"
-"import java.text.DateFormat;\n"
-"import java.util.Calendar;\n"
-"\n"
-"public class BlogItem {\n"
-" private Long _id;\n"
-" private Calendar _datetime;\n"
-" private String _text;\n"
-" private String _title;\n"
-" private Blog _blog;\n"
-"\n"
-" public Blog getBlog() {\n"
-" return _blog;\n"
-" }\n"
-" public Calendar getDatetime() {\n"
-" return _datetime;\n"
-" }\n"
-" public Long getId() {\n"
-" return _id;\n"
-" }\n"
-" public String getText() {\n"
-" return _text;\n"
-" }\n"
-" public String getTitle() {\n"
-" return _title;\n"
-" }\n"
-" public void setBlog(Blog blog) {\n"
-" _blog = blog;\n"
-" }\n"
-" public void setDatetime(Calendar calendar) {\n"
-" _datetime = calendar;\n"
-" }\n"
-" public void setId(Long long1) {\n"
-" _id = long1;\n"
-" }\n"
-" public void setText(String string) {\n"
-" _text = string;\n"
-" }\n"
-" public void setTitle(String string) {\n"
-" _title = string;\n"
-" }\n"
-"}]]>"
-msgstr ""
-
#. Tag: title
-#: example_weblog.xml:47
#, no-c-format
msgid "Hibernate Mappings"
msgstr "Hibernate 映射"
#. Tag: para
-#: example_weblog.xml:49
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The XML mappings are now straightforward. For example:"
-msgstr "下列的XML映射应该是很直白的。"
+msgstr "下列的 XML 映射应该是很直白的。例如:"
-#. Tag: programlisting
-#: example_weblog.xml:53
-#, no-c-format
-msgid ""
-"<![CDATA[<?xml version=\"1.0\"?>\n"
-"<!DOCTYPE hibernate-mapping PUBLIC\n"
-" \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
-"
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
-"\n"
-"<hibernate-mapping package=\"eg\">\n"
-"\n"
-" <class\n"
-" name=\"Blog\"\n"
-" table=\"BLOGS\">\n"
-"\n"
-" <id\n"
-" name=\"id\"\n"
-" column=\"BLOG_ID\">\n"
-"\n"
-" <generator class=\"native\"/>\n"
-"\n"
-" </id>\n"
-"\n"
-" <property\n"
-" name=\"name\"\n"
-" column=\"NAME\"\n"
-" not-null=\"true\"\n"
-" unique=\"true\"/>\n"
-"\n"
-" <bag\n"
-" name=\"items\"\n"
-" inverse=\"true\"\n"
-" order-by=\"DATE_TIME\"\n"
-" cascade=\"all\">\n"
-"\n"
-" <key column=\"BLOG_ID\"/>\n"
-" <one-to-many class=\"BlogItem\"/>\n"
-"\n"
-" </bag>\n"
-"\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: example_weblog.xml:55
-#, no-c-format
-msgid ""
-"<![CDATA[<?xml version=\"1.0\"?>\n"
-"<!DOCTYPE hibernate-mapping PUBLIC\n"
-" \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
-"
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
-"\n"
-"<hibernate-mapping package=\"eg\">\n"
-"\n"
-" <class\n"
-" name=\"BlogItem\"\n"
-" table=\"BLOG_ITEMS\"\n"
-" dynamic-update=\"true\">\n"
-"\n"
-" <id\n"
-" name=\"id\"\n"
-" column=\"BLOG_ITEM_ID\">\n"
-"\n"
-" <generator class=\"native\"/>\n"
-"\n"
-" </id>\n"
-"\n"
-" <property\n"
-" name=\"title\"\n"
-" column=\"TITLE\"\n"
-" not-null=\"true\"/>\n"
-"\n"
-" <property\n"
-" name=\"text\"\n"
-" column=\"TEXT\"\n"
-" not-null=\"true\"/>\n"
-"\n"
-" <property\n"
-" name=\"datetime\"\n"
-" column=\"DATE_TIME\"\n"
-" not-null=\"true\"/>\n"
-"\n"
-" <many-to-one\n"
-" name=\"blog\"\n"
-" column=\"BLOG_ID\"\n"
-" not-null=\"true\"/>\n"
-"\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
-
#. Tag: title
-#: example_weblog.xml:60
#, no-c-format
msgid "Hibernate Code"
msgstr "Hibernate 代码"
#. Tag: para
-#: example_weblog.xml:62
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The following class demonstrates some of the kinds of things we can do with "
"these classes using Hibernate:"
-msgstr "下面的类演示了我们可以使用Hibernate对这些类进行的一些操作。"
+msgstr "下面的类演示了我们可以使用 Hibernate 对这些类进行的一些操作:"
-#. Tag: programlisting
-#: example_weblog.xml:67
-#, no-c-format
-msgid ""
-"<![CDATA[package eg;\n"
-"\n"
-"import java.util.ArrayList;\n"
-"import java.util.Calendar;\n"
-"import java.util.Iterator;\n"
-"import java.util.List;\n"
-"\n"
-"import org.hibernate.HibernateException;\n"
-"import org.hibernate.Query;\n"
-"import org.hibernate.Session;\n"
-"import org.hibernate.SessionFactory;\n"
-"import org.hibernate.Transaction;\n"
-"import org.hibernate.cfg.Configuration;\n"
-"import org.hibernate.tool.hbm2ddl.SchemaExport;\n"
-"\n"
-"public class BlogMain {\n"
-" \n"
-" private SessionFactory _sessions;\n"
-" \n"
-" public void configure() throws HibernateException {\n"
-" _sessions = new Configuration()\n"
-" .addClass(Blog.class)\n"
-" .addClass(BlogItem.class)\n"
-" .buildSessionFactory();\n"
-" }\n"
-" \n"
-" public void exportTables() throws HibernateException {\n"
-" Configuration cfg = new Configuration()\n"
-" .addClass(Blog.class)\n"
-" .addClass(BlogItem.class);\n"
-" new SchemaExport(cfg).create(true, true);\n"
-" }\n"
-" \n"
-" public Blog createBlog(String name) throws HibernateException {\n"
-" \n"
-" Blog blog = new Blog();\n"
-" blog.setName(name);\n"
-" blog.setItems( new ArrayList() );\n"
-" \n"
-" Session session = _sessions.openSession();\n"
-" Transaction tx = null;\n"
-" try {\n"
-" tx = session.beginTransaction();\n"
-" session.persist(blog);\n"
-" tx.commit();\n"
-" }\n"
-" catch (HibernateException he) {\n"
-" if (tx!=null) tx.rollback();\n"
-" throw he;\n"
-" }\n"
-" finally {\n"
-" session.close();\n"
-" }\n"
-" return blog;\n"
-" }\n"
-" \n"
-" public BlogItem createBlogItem(Blog blog, String title, String text)\n"
-" throws HibernateException {\n"
-" \n"
-" BlogItem item = new BlogItem();\n"
-" item.setTitle(title);\n"
-" item.setText(text);\n"
-" item.setBlog(blog);\n"
-" item.setDatetime( Calendar.getInstance() );\n"
-" blog.getItems().add(item);\n"
-" \n"
-" Session session = _sessions.openSession();\n"
-" Transaction tx = null;\n"
-" try {\n"
-" tx = session.beginTransaction();\n"
-" session.update(blog);\n"
-" tx.commit();\n"
-" }\n"
-" catch (HibernateException he) {\n"
-" if (tx!=null) tx.rollback();\n"
-" throw he;\n"
-" }\n"
-" finally {\n"
-" session.close();\n"
-" }\n"
-" return item;\n"
-" }\n"
-" \n"
-" public BlogItem createBlogItem(Long blogid, String title, String text)\n"
-" throws HibernateException {\n"
-" \n"
-" BlogItem item = new BlogItem();\n"
-" item.setTitle(title);\n"
-" item.setText(text);\n"
-" item.setDatetime( Calendar.getInstance() );\n"
-" \n"
-" Session session = _sessions.openSession();\n"
-" Transaction tx = null;\n"
-" try {\n"
-" tx = session.beginTransaction();\n"
-" Blog blog = (Blog) session.load(Blog.class, blogid);\n"
-" item.setBlog(blog);\n"
-" blog.getItems().add(item);\n"
-" tx.commit();\n"
-" }\n"
-" catch (HibernateException he) {\n"
-" if (tx!=null) tx.rollback();\n"
-" throw he;\n"
-" }\n"
-" finally {\n"
-" session.close();\n"
-" }\n"
-" return item;\n"
-" }\n"
-" \n"
-" public void updateBlogItem(BlogItem item, String text)\n"
-" throws HibernateException {\n"
-" \n"
-" item.setText(text);\n"
-" \n"
-" Session session = _sessions.openSession();\n"
-" Transaction tx = null;\n"
-" try {\n"
-" tx = session.beginTransaction();\n"
-" session.update(item);\n"
-" tx.commit();\n"
-" }\n"
-" catch (HibernateException he) {\n"
-" if (tx!=null) tx.rollback();\n"
-" throw he;\n"
-" }\n"
-" finally {\n"
-" session.close();\n"
-" }\n"
-" }\n"
-" \n"
-" public void updateBlogItem(Long itemid, String text)\n"
-" throws HibernateException {\n"
-" \n"
-" Session session = _sessions.openSession();\n"
-" Transaction tx = null;\n"
-" try {\n"
-" tx = session.beginTransaction();\n"
-" BlogItem item = (BlogItem) session.load(BlogItem.class, "
-"itemid);\n"
-" item.setText(text);\n"
-" tx.commit();\n"
-" }\n"
-" catch (HibernateException he) {\n"
-" if (tx!=null) tx.rollback();\n"
-" throw he;\n"
-" }\n"
-" finally {\n"
-" session.close();\n"
-" }\n"
-" }\n"
-" \n"
-" public List listAllBlogNamesAndItemCounts(int max)\n"
-" throws HibernateException {\n"
-" \n"
-" Session session = _sessions.openSession();\n"
-" Transaction tx = null;\n"
-" List result = null;\n"
-" try {\n"
-" tx = session.beginTransaction();\n"
-" Query q = session.createQuery(\n"
-" \"select blog.id, blog.name, count(blogItem) \"
+\n"
-" \"from Blog as blog \" +\n"
-" \"left outer join blog.items as blogItem \" +\n"
-" \"group by blog.name, blog.id \" +\n"
-" \"order by max(blogItem.datetime)\"\n"
-" );\n"
-" q.setMaxResults(max);\n"
-" result = q.list();\n"
-" tx.commit();\n"
-" }\n"
-" catch (HibernateException he) {\n"
-" if (tx!=null) tx.rollback();\n"
-" throw he;\n"
-" }\n"
-" finally {\n"
-" session.close();\n"
-" }\n"
-" return result;\n"
-" }\n"
-" \n"
-" public Blog getBlogAndAllItems(Long blogid)\n"
-" throws HibernateException {\n"
-" \n"
-" Session session = _sessions.openSession();\n"
-" Transaction tx = null;\n"
-" Blog blog = null;\n"
-" try {\n"
-" tx = session.beginTransaction();\n"
-" Query q = session.createQuery(\n"
-" \"from Blog as blog \" +\n"
-" \"left outer join fetch blog.items \" +\n"
-" \"where blog.id = :blogid\"\n"
-" );\n"
-" q.setParameter(\"blogid\", blogid);\n"
-" blog = (Blog) q.uniqueResult();\n"
-" tx.commit();\n"
-" }\n"
-" catch (HibernateException he) {\n"
-" if (tx!=null) tx.rollback();\n"
-" throw he;\n"
-" }\n"
-" finally {\n"
-" session.close();\n"
-" }\n"
-" return blog;\n"
-" }\n"
-" \n"
-" public List listBlogsAndRecentItems() throws HibernateException {\n"
-" \n"
-" Session session = _sessions.openSession();\n"
-" Transaction tx = null;\n"
-" List result = null;\n"
-" try {\n"
-" tx = session.beginTransaction();\n"
-" Query q = session.createQuery(\n"
-" \"from Blog as blog \" +\n"
-" \"inner join blog.items as blogItem \" +\n"
-" \"where blogItem.datetime > :minDate\"\n"
-" );\n"
-"\n"
-" Calendar cal = Calendar.getInstance();\n"
-" cal.roll(Calendar.MONTH, false);\n"
-" q.setCalendar(\"minDate\", cal);\n"
-" \n"
-" result = q.list();\n"
-" tx.commit();\n"
-" }\n"
-" catch (HibernateException he) {\n"
-" if (tx!=null) tx.rollback();\n"
-" throw he;\n"
-" }\n"
-" finally {\n"
-" session.close();\n"
-" }\n"
-" return result;\n"
-" }\n"
-"}]]>"
-msgstr ""
+#~ msgid ""
+#~ "<![CDATA[package eg;\n"
+#~ "\n"
+#~ "import java.util.List;\n"
+#~ "\n"
+#~ "public class Blog {\n"
+#~ " private Long _id;\n"
+#~ " private String _name;\n"
+#~ " private List _items;\n"
+#~ "\n"
+#~ " public Long getId() {\n"
+#~ " return _id;\n"
+#~ " }\n"
+#~ " public List getItems() {\n"
+#~ " return _items;\n"
+#~ " }\n"
+#~ " public String getName() {\n"
+#~ " return _name;\n"
+#~ " }\n"
+#~ " public void setId(Long long1) {\n"
+#~ " _id = long1;\n"
+#~ " }\n"
+#~ " public void setItems(List list) {\n"
+#~ " _items = list;\n"
+#~ " }\n"
+#~ " public void setName(String string) {\n"
+#~ " _name = string;\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[package eg;\n"
+#~ "\n"
+#~ "import java.util.List;\n"
+#~ "\n"
+#~ "public class Blog {\n"
+#~ " private Long _id;\n"
+#~ " private String _name;\n"
+#~ " private List _items;\n"
+#~ "\n"
+#~ " public Long getId() {\n"
+#~ " return _id;\n"
+#~ " }\n"
+#~ " public List getItems() {\n"
+#~ " return _items;\n"
+#~ " }\n"
+#~ " public String getName() {\n"
+#~ " return _name;\n"
+#~ " }\n"
+#~ " public void setId(Long long1) {\n"
+#~ " _id = long1;\n"
+#~ " }\n"
+#~ " public void setItems(List list) {\n"
+#~ " _items = list;\n"
+#~ " }\n"
+#~ " public void setName(String string) {\n"
+#~ " _name = string;\n"
+#~ " }\n"
+#~ "}]]>"
+
+#~ msgid ""
+#~ "<![CDATA[package eg;\n"
+#~ "\n"
+#~ "import java.text.DateFormat;\n"
+#~ "import java.util.Calendar;\n"
+#~ "\n"
+#~ "public class BlogItem {\n"
+#~ " private Long _id;\n"
+#~ " private Calendar _datetime;\n"
+#~ " private String _text;\n"
+#~ " private String _title;\n"
+#~ " private Blog _blog;\n"
+#~ "\n"
+#~ " public Blog getBlog() {\n"
+#~ " return _blog;\n"
+#~ " }\n"
+#~ " public Calendar getDatetime() {\n"
+#~ " return _datetime;\n"
+#~ " }\n"
+#~ " public Long getId() {\n"
+#~ " return _id;\n"
+#~ " }\n"
+#~ " public String getText() {\n"
+#~ " return _text;\n"
+#~ " }\n"
+#~ " public String getTitle() {\n"
+#~ " return _title;\n"
+#~ " }\n"
+#~ " public void setBlog(Blog blog) {\n"
+#~ " _blog = blog;\n"
+#~ " }\n"
+#~ " public void setDatetime(Calendar calendar) {\n"
+#~ " _datetime = calendar;\n"
+#~ " }\n"
+#~ " public void setId(Long long1) {\n"
+#~ " _id = long1;\n"
+#~ " }\n"
+#~ " public void setText(String string) {\n"
+#~ " _text = string;\n"
+#~ " }\n"
+#~ " public void setTitle(String string) {\n"
+#~ " _title = string;\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[package eg;\n"
+#~ "\n"
+#~ "import java.text.DateFormat;\n"
+#~ "import java.util.Calendar;\n"
+#~ "\n"
+#~ "public class BlogItem {\n"
+#~ " private Long _id;\n"
+#~ " private Calendar _datetime;\n"
+#~ " private String _text;\n"
+#~ " private String _title;\n"
+#~ " private Blog _blog;\n"
+#~ "\n"
+#~ " public Blog getBlog() {\n"
+#~ " return _blog;\n"
+#~ " }\n"
+#~ " public Calendar getDatetime() {\n"
+#~ " return _datetime;\n"
+#~ " }\n"
+#~ " public Long getId() {\n"
+#~ " return _id;\n"
+#~ " }\n"
+#~ " public String getText() {\n"
+#~ " return _text;\n"
+#~ " }\n"
+#~ " public String getTitle() {\n"
+#~ " return _title;\n"
+#~ " }\n"
+#~ " public void setBlog(Blog blog) {\n"
+#~ " _blog = blog;\n"
+#~ " }\n"
+#~ " public void setDatetime(Calendar calendar) {\n"
+#~ " _datetime = calendar;\n"
+#~ " }\n"
+#~ " public void setId(Long long1) {\n"
+#~ " _id = long1;\n"
+#~ " }\n"
+#~ " public void setText(String string) {\n"
+#~ " _text = string;\n"
+#~ " }\n"
+#~ " public void setTitle(String string) {\n"
+#~ " _title = string;\n"
+#~ " }\n"
+#~ "}]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+#~ "\n"
+#~ "<hibernate-mapping package=\"eg\">\n"
+#~ "\n"
+#~ " <class\n"
+#~ " name=\"Blog\"\n"
+#~ " table=\"BLOGS\">\n"
+#~ "\n"
+#~ " <id\n"
+#~ " name=\"id\"\n"
+#~ " column=\"BLOG_ID\">\n"
+#~ "\n"
+#~ " <generator class=\"native\"/>\n"
+#~ "\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property\n"
+#~ " name=\"name\"\n"
+#~ " column=\"NAME\"\n"
+#~ " not-null=\"true\"\n"
+#~ " unique=\"true\"/>\n"
+#~ "\n"
+#~ " <bag\n"
+#~ " name=\"items\"\n"
+#~ " inverse=\"true\"\n"
+#~ " order-by=\"DATE_TIME\"\n"
+#~ " cascade=\"all\">\n"
+#~ "\n"
+#~ " <key column=\"BLOG_ID\"/>\n"
+#~ " <one-to-many class=\"BlogItem\"/>\n"
+#~ "\n"
+#~ " </bag>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+#~ "\n"
+#~ "<hibernate-mapping package=\"eg\">\n"
+#~ "\n"
+#~ " <class\n"
+#~ " name=\"Blog\"\n"
+#~ " table=\"BLOGS\">\n"
+#~ "\n"
+#~ " <id\n"
+#~ " name=\"id\"\n"
+#~ " column=\"BLOG_ID\">\n"
+#~ "\n"
+#~ " <generator class=\"native\"/>\n"
+#~ "\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property\n"
+#~ " name=\"name\"\n"
+#~ " column=\"NAME\"\n"
+#~ " not-null=\"true\"\n"
+#~ " unique=\"true\"/>\n"
+#~ "\n"
+#~ " <bag\n"
+#~ " name=\"items\"\n"
+#~ " inverse=\"true\"\n"
+#~ " order-by=\"DATE_TIME\"\n"
+#~ " cascade=\"all\">\n"
+#~ "\n"
+#~ " <key column=\"BLOG_ID\"/>\n"
+#~ " <one-to-many class=\"BlogItem\"/>\n"
+#~ "\n"
+#~ " </bag>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+#~ "\n"
+#~ "<hibernate-mapping package=\"eg\">\n"
+#~ "\n"
+#~ " <class\n"
+#~ " name=\"BlogItem\"\n"
+#~ " table=\"BLOG_ITEMS\"\n"
+#~ " dynamic-update=\"true\">\n"
+#~ "\n"
+#~ " <id\n"
+#~ " name=\"id\"\n"
+#~ " column=\"BLOG_ITEM_ID\">\n"
+#~ "\n"
+#~ " <generator class=\"native\"/>\n"
+#~ "\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property\n"
+#~ " name=\"title\"\n"
+#~ " column=\"TITLE\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "\n"
+#~ " <property\n"
+#~ " name=\"text\"\n"
+#~ " column=\"TEXT\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "\n"
+#~ " <property\n"
+#~ " name=\"datetime\"\n"
+#~ " column=\"DATE_TIME\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "\n"
+#~ " <many-to-one\n"
+#~ " name=\"blog\"\n"
+#~ " column=\"BLOG_ID\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+#~ "\n"
+#~ "<hibernate-mapping package=\"eg\">\n"
+#~ "\n"
+#~ " <class\n"
+#~ " name=\"BlogItem\"\n"
+#~ " table=\"BLOG_ITEMS\"\n"
+#~ " dynamic-update=\"true\">\n"
+#~ "\n"
+#~ " <id\n"
+#~ " name=\"id\"\n"
+#~ " column=\"BLOG_ITEM_ID\">\n"
+#~ "\n"
+#~ " <generator class=\"native\"/>\n"
+#~ "\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property\n"
+#~ " name=\"title\"\n"
+#~ " column=\"TITLE\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "\n"
+#~ " <property\n"
+#~ " name=\"text\"\n"
+#~ " column=\"TEXT\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "\n"
+#~ " <property\n"
+#~ " name=\"datetime\"\n"
+#~ " column=\"DATE_TIME\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "\n"
+#~ " <many-to-one\n"
+#~ " name=\"blog\"\n"
+#~ " column=\"BLOG_ID\"\n"
+#~ " not-null=\"true\"/>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[package eg;\n"
+#~ "\n"
+#~ "import java.util.ArrayList;\n"
+#~ "import java.util.Calendar;\n"
+#~ "import java.util.Iterator;\n"
+#~ "import java.util.List;\n"
+#~ "\n"
+#~ "import org.hibernate.HibernateException;\n"
+#~ "import org.hibernate.Query;\n"
+#~ "import org.hibernate.Session;\n"
+#~ "import org.hibernate.SessionFactory;\n"
+#~ "import org.hibernate.Transaction;\n"
+#~ "import org.hibernate.cfg.Configuration;\n"
+#~ "import org.hibernate.tool.hbm2ddl.SchemaExport;\n"
+#~ "\n"
+#~ "public class BlogMain {\n"
+#~ " \n"
+#~ " private SessionFactory _sessions;\n"
+#~ " \n"
+#~ " public void configure() throws HibernateException {\n"
+#~ " _sessions = new Configuration()\n"
+#~ " .addClass(Blog.class)\n"
+#~ " .addClass(BlogItem.class)\n"
+#~ " .buildSessionFactory();\n"
+#~ " }\n"
+#~ " \n"
+#~ " public void exportTables() throws HibernateException {\n"
+#~ " Configuration cfg = new Configuration()\n"
+#~ " .addClass(Blog.class)\n"
+#~ " .addClass(BlogItem.class);\n"
+#~ " new SchemaExport(cfg).create(true, true);\n"
+#~ " }\n"
+#~ " \n"
+#~ " public Blog createBlog(String name) throws HibernateException {\n"
+#~ " \n"
+#~ " Blog blog = new Blog();\n"
+#~ " blog.setName(name);\n"
+#~ " blog.setItems( new ArrayList() );\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " session.persist(blog);\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return blog;\n"
+#~ " }\n"
+#~ " \n"
+#~ " public BlogItem createBlogItem(Blog blog, String title, String
text)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " BlogItem item = new BlogItem();\n"
+#~ " item.setTitle(title);\n"
+#~ " item.setText(text);\n"
+#~ " item.setBlog(blog);\n"
+#~ " item.setDatetime( Calendar.getInstance() );\n"
+#~ " blog.getItems().add(item);\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " session.update(blog);\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return item;\n"
+#~ " }\n"
+#~ " \n"
+#~ " public BlogItem createBlogItem(Long blogid, String title, String "
+#~ "text)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " BlogItem item = new BlogItem();\n"
+#~ " item.setTitle(title);\n"
+#~ " item.setText(text);\n"
+#~ " item.setDatetime( Calendar.getInstance() );\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " Blog blog = (Blog) session.load(Blog.class, blogid);\n"
+#~ " item.setBlog(blog);\n"
+#~ " blog.getItems().add(item);\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return item;\n"
+#~ " }\n"
+#~ " \n"
+#~ " public void updateBlogItem(BlogItem item, String text)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " item.setText(text);\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " session.update(item);\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " }\n"
+#~ " \n"
+#~ " public void updateBlogItem(Long itemid, String text)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " BlogItem item = (BlogItem) session.load(BlogItem.class, "
+#~ "itemid);\n"
+#~ " item.setText(text);\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " }\n"
+#~ " \n"
+#~ " public List listAllBlogNamesAndItemCounts(int max)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " List result = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " Query q = session.createQuery(\n"
+#~ " \"select blog.id, blog.name, count(blogItem) \"
+\n"
+#~ " \"from Blog as blog \" +\n"
+#~ " \"left outer join blog.items as blogItem \" +\n"
+#~ " \"group by blog.name, blog.id \" +\n"
+#~ " \"order by max(blogItem.datetime)\"\n"
+#~ " );\n"
+#~ " q.setMaxResults(max);\n"
+#~ " result = q.list();\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return result;\n"
+#~ " }\n"
+#~ " \n"
+#~ " public Blog getBlogAndAllItems(Long blogid)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " Blog blog = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " Query q = session.createQuery(\n"
+#~ " \"from Blog as blog \" +\n"
+#~ " \"left outer join fetch blog.items \" +\n"
+#~ " \"where blog.id = :blogid\"\n"
+#~ " );\n"
+#~ " q.setParameter(\"blogid\", blogid);\n"
+#~ " blog = (Blog) q.uniqueResult();\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return blog;\n"
+#~ " }\n"
+#~ " \n"
+#~ " public List listBlogsAndRecentItems() throws HibernateException {\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " List result = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " Query q = session.createQuery(\n"
+#~ " \"from Blog as blog \" +\n"
+#~ " \"inner join blog.items as blogItem \" +\n"
+#~ " \"where blogItem.datetime > :minDate\"\n"
+#~ " );\n"
+#~ "\n"
+#~ " Calendar cal = Calendar.getInstance();\n"
+#~ " cal.roll(Calendar.MONTH, false);\n"
+#~ " q.setCalendar(\"minDate\", cal);\n"
+#~ " \n"
+#~ " result = q.list();\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return result;\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[package eg;\n"
+#~ "\n"
+#~ "import java.util.ArrayList;\n"
+#~ "import java.util.Calendar;\n"
+#~ "import java.util.Iterator;\n"
+#~ "import java.util.List;\n"
+#~ "\n"
+#~ "import org.hibernate.HibernateException;\n"
+#~ "import org.hibernate.Query;\n"
+#~ "import org.hibernate.Session;\n"
+#~ "import org.hibernate.SessionFactory;\n"
+#~ "import org.hibernate.Transaction;\n"
+#~ "import org.hibernate.cfg.Configuration;\n"
+#~ "import org.hibernate.tool.hbm2ddl.SchemaExport;\n"
+#~ "\n"
+#~ "public class BlogMain {\n"
+#~ " \n"
+#~ " private SessionFactory _sessions;\n"
+#~ " \n"
+#~ " public void configure() throws HibernateException {\n"
+#~ " _sessions = new Configuration()\n"
+#~ " .addClass(Blog.class)\n"
+#~ " .addClass(BlogItem.class)\n"
+#~ " .buildSessionFactory();\n"
+#~ " }\n"
+#~ " \n"
+#~ " public void exportTables() throws HibernateException {\n"
+#~ " Configuration cfg = new Configuration()\n"
+#~ " .addClass(Blog.class)\n"
+#~ " .addClass(BlogItem.class);\n"
+#~ " new SchemaExport(cfg).create(true, true);\n"
+#~ " }\n"
+#~ " \n"
+#~ " public Blog createBlog(String name) throws HibernateException {\n"
+#~ " \n"
+#~ " Blog blog = new Blog();\n"
+#~ " blog.setName(name);\n"
+#~ " blog.setItems( new ArrayList() );\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " session.persist(blog);\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return blog;\n"
+#~ " }\n"
+#~ " \n"
+#~ " public BlogItem createBlogItem(Blog blog, String title, String
text)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " BlogItem item = new BlogItem();\n"
+#~ " item.setTitle(title);\n"
+#~ " item.setText(text);\n"
+#~ " item.setBlog(blog);\n"
+#~ " item.setDatetime( Calendar.getInstance() );\n"
+#~ " blog.getItems().add(item);\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " session.update(blog);\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return item;\n"
+#~ " }\n"
+#~ " \n"
+#~ " public BlogItem createBlogItem(Long blogid, String title, String "
+#~ "text)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " BlogItem item = new BlogItem();\n"
+#~ " item.setTitle(title);\n"
+#~ " item.setText(text);\n"
+#~ " item.setDatetime( Calendar.getInstance() );\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " Blog blog = (Blog) session.load(Blog.class, blogid);\n"
+#~ " item.setBlog(blog);\n"
+#~ " blog.getItems().add(item);\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return item;\n"
+#~ " }\n"
+#~ " \n"
+#~ " public void updateBlogItem(BlogItem item, String text)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " item.setText(text);\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " session.update(item);\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " }\n"
+#~ " \n"
+#~ " public void updateBlogItem(Long itemid, String text)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " BlogItem item = (BlogItem) session.load(BlogItem.class, "
+#~ "itemid);\n"
+#~ " item.setText(text);\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " }\n"
+#~ " \n"
+#~ " public List listAllBlogNamesAndItemCounts(int max)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " List result = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " Query q = session.createQuery(\n"
+#~ " \"select blog.id, blog.name, count(blogItem) \"
+\n"
+#~ " \"from Blog as blog \" +\n"
+#~ " \"left outer join blog.items as blogItem \" +\n"
+#~ " \"group by blog.name, blog.id \" +\n"
+#~ " \"order by max(blogItem.datetime)\"\n"
+#~ " );\n"
+#~ " q.setMaxResults(max);\n"
+#~ " result = q.list();\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return result;\n"
+#~ " }\n"
+#~ " \n"
+#~ " public Blog getBlogAndAllItems(Long blogid)\n"
+#~ " throws HibernateException {\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " Blog blog = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " Query q = session.createQuery(\n"
+#~ " \"from Blog as blog \" +\n"
+#~ " \"left outer join fetch blog.items \" +\n"
+#~ " \"where blog.id = :blogid\"\n"
+#~ " );\n"
+#~ " q.setParameter(\"blogid\", blogid);\n"
+#~ " blog = (Blog) q.uniqueResult();\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return blog;\n"
+#~ " }\n"
+#~ " \n"
+#~ " public List listBlogsAndRecentItems() throws HibernateException {\n"
+#~ " \n"
+#~ " Session session = _sessions.openSession();\n"
+#~ " Transaction tx = null;\n"
+#~ " List result = null;\n"
+#~ " try {\n"
+#~ " tx = session.beginTransaction();\n"
+#~ " Query q = session.createQuery(\n"
+#~ " \"from Blog as blog \" +\n"
+#~ " \"inner join blog.items as blogItem \" +\n"
+#~ " \"where blogItem.datetime > :minDate\"\n"
+#~ " );\n"
+#~ "\n"
+#~ " Calendar cal = Calendar.getInstance();\n"
+#~ " cal.roll(Calendar.MONTH, false);\n"
+#~ " q.setCalendar(\"minDate\", cal);\n"
+#~ " \n"
+#~ " result = q.list();\n"
+#~ " tx.commit();\n"
+#~ " }\n"
+#~ " catch (HibernateException he) {\n"
+#~ " if (tx!=null) tx.rollback();\n"
+#~ " throw he;\n"
+#~ " }\n"
+#~ " finally {\n"
+#~ " session.close();\n"
+#~ " }\n"
+#~ " return result;\n"
+#~ " }\n"
+#~ "}]]>"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/filters.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/filters.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/filters.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,44 +1,44 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:26\n"
+"PO-Revision-Date: 2009-11-27 13:53+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: filters.xml:29
#, no-c-format
msgid "Filtering data"
msgstr "过滤数据"
#. Tag: para
-#: filters.xml:31
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate3 provides an innovative new approach to handling data with "
"\"visibility\" rules. A <emphasis>Hibernate filter</emphasis>
is a global, "
"named, parameterized filter that can be enabled or disabled for a particular
"
"Hibernate session."
msgstr ""
-"Hibernate3 提供了一种创新的方式来处理具有“显性(visibility)”规则的数据,那就是"
-"使用<emphasis>Hibernate filter</emphasis>。 <emphasis>Hibernate
filter</"
-"emphasis>是全局有效的、具有名字、可以带参数的过滤器, 对于某个特定的"
-"Hibernate session您可以选择是否启用(或禁用)某个过滤器。"
+"Hibernate3 提供了一种创新的方式来处理具有“显性(visibility)”规则的数据,那就"
+"是使用<emphasis>Hibernate 过滤器</emphasis>。<emphasis>Hibernate
过滤器</"
+"emphasis>是全局有效的、具有名字、可以带参数的过滤器,对于某个特定的 "
+"Hibernate session 您可以选择是否启用(或禁用)某个过滤器。"
#. Tag: title
-#: filters.xml:38
#, no-c-format
msgid "Hibernate filters"
-msgstr "Hibernate 过滤器(filters)"
+msgstr "Hibernate 过滤器(filters)"
#. Tag: para
-#: filters.xml:40
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate3 has the ability to pre-define filter criteria and attach those "
"filters at both a class level and a collection level. A filter criteria "
@@ -49,14 +49,13 @@
"parameter values should be. Filters can be used like database views, but "
"they are parameterized inside the application."
msgstr ""
-"Hibernate3新增了对某个类或者集合使用预先定义的过滤器条件(filter criteria)的功"
-"能。过滤器条件相当于定义一个 非常类似于类和各种集合上的“where”属性的约束子"
-"句,但是过滤器条件可以带参数。 应用程序可以在运行时决定是否启用给定的过滤器,"
-"以及使用什么样的参数值。 过滤器的用法很像数据库视图,只不过是在应用程序中确定"
-"使用什么样的参数的。"
+"Hibernate3 新增了对某个类或者集合使用预先定义的过滤器条件(filter criteria)"
+"的功能。过滤器条件相当于定义一个 非常类似于类和各种集合上的“where”属性的约束"
+"子句,但是过滤器条件可以带参数。 应用程序可以在运行时决定是否启用给定的过滤"
+"器,以及使用什么样的参数值。过滤器的用法很像数据库视图,只不过是在应用程序中"
+"确定使用什么样的参数的。 "
#. Tag: para
-#: filters.xml:50
#, no-c-format
msgid ""
"In order to use filters, they must first be defined and then attached to the
"
@@ -64,62 +63,27 @@
"filter-def/></literal> element within a
<literal><hibernate-mapping/"
"></literal> element:"
msgstr ""
-"要使用过滤器,必须首先在相应的映射节点中定义。而定义一个过滤器,要用到位于"
-"<literal><hibernate-mapping/></literal>
节点之内的<literal><filter-"
-"def/></literal>节点:"
+"要使用过滤器,必须首先在相应的映射节点中定义。而定义一个过滤器,要用到位于 "
+"<literal><hibernate-mapping/></literal> 节点之内的
<literal><filter-"
+"def/></literal> 节点:"
-#. Tag: programlisting
-#: filters.xml:56
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<filter-def name=\"myFilter\">\n"
-" <filter-param name=\"myFilterParam\"
type=\"string\"/>\n"
-"</filter-def>]]>"
-msgstr ""
+msgid "This filter can then be attached to a class:"
+msgstr "定义好之后,就可以在某个类中使用这个过滤器: "
#. Tag: para
-#: filters.xml:58
-#, fuzzy, no-c-format
-msgid "This filter can then be attached to a class:"
-msgstr "定义好之后,就可以在某个类中使用这个过滤器:"
-
-#. Tag: programlisting
-#: filters.xml:62
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"myClass\" ...>\n"
-" ...\n"
-" <filter name=\"myFilter\" condition=\":myFilterParam =
MY_FILTERED_COLUMN"
-"\"/>\n"
-"</class>]]>"
-msgstr ""
+msgid "Or, to a collection:"
+msgstr "或者也可以在某个集合使用它:"
#. Tag: para
-#: filters.xml:64
-#, fuzzy, no-c-format
-msgid "Or, to a collection:"
-msgstr "也可以在某个集合使用它:"
-
-#. Tag: programlisting
-#: filters.xml:68
#, no-c-format
-msgid ""
-"<![CDATA[<set ...>\n"
-" <filter name=\"myFilter\" condition=\":myFilterParam =
MY_FILTERED_COLUMN"
-"\"/>\n"
-"</set>]]>"
-msgstr ""
-
-#. Tag: para
-#: filters.xml:70
-#, fuzzy, no-c-format
msgid "Or, to both or multiples of each at the same time."
-msgstr ""
-"可以在多个类或集合中使用某个过滤器;某个类或者集合中也可以使用多个过滤器。"
+msgstr "或者在同时可以使用多个过滤器。"
#. Tag: para
-#: filters.xml:74
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The methods on <literal>Session</literal> are:
<literal>enableFilter(String "
"filterName)</literal>, <literal>getEnabledFilter(String
filterName)</"
@@ -130,129 +94,64 @@
"interface. If you used the simple filter defined above, it would look like "
"this:"
msgstr ""
-"<literal>Session</literal>对象中会用到的方法有:<literal>enableFilter(String
"
-"filterName)</literal>, <literal>getEnabledFilter(String
filterName)</"
-"literal>, 和 <literal>disableFilter(String filterName)</literal>.
Session中默"
-"认是<emphasis>不</emphasis>启用过滤器的,必须通过<literal>Session."
-"enabledFilter()</literal>方法显式的启用。 该方法返回被启用的<literal>Filter</"
-"literal>的实例。以上文定义的过滤器为例:"
+"<literal>Session</literal>
对象中会用到的方法有:<literal>enableFilter"
+"(String filterName)</literal>,<literal>getEnabledFilter(String
filterName)</"
+"literal>,和 <literal>disableFilter(String
filterName)</literal>。Session 中"
+"默认是<emphasis>不</emphasis>启用过滤器的,必须通过 <literal>Session."
+"enabledFilter()</literal> 方法显式的启用。该方法返回被启用的 "
+"<literal>Filter</literal> 的实例。以上文定义的过滤器为例:"
-#. Tag: programlisting
-#: filters.xml:83
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[session.enableFilter(\"myFilter\").setParameter(\"myFilterParam\",
"
-"\"some-value\");]]>"
-msgstr ""
-
-#. Tag: para
-#: filters.xml:85
-#, fuzzy, no-c-format
-msgid ""
"Methods on the org.hibernate.Filter interface do allow the method-chaining "
"common to much of Hibernate."
msgstr ""
-"注意,org.hibernate.Filter的方法允许链式方法调用。(类似上面例子中启用Filter"
-"之后设定Filter参数这个“方法链”) Hibernate的其他部分也大多有这个特性。"
+"注意,org.hibernate.Filter 的方法允许链式方法调用。(类似上面例子中启用 "
+"Filter 之后设定 Filter 参数这个“方法链”) Hibernate 的其他部分也大多有这个特"
+"性。 "
#. Tag: para
-#: filters.xml:89
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The following is a full example, using temporal data with an effective "
"record date pattern:"
-msgstr "下面是一个比较完整的例子,使用了记录生效日期模式过滤有时效的数据:"
+msgstr "下面是一个比较完整的例子,使用了记录生效日期模式过滤有时效的数据: "
-#. Tag: programlisting
-#: filters.xml:93
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<filter-def name=\"effectiveDate\">\n"
-" <filter-param name=\"asOfDate\"
type=\"date\"/>\n"
-"</filter-def>\n"
-"\n"
-"<class name=\"Employee\" ...>\n"
-"...\n"
-" <many-to-one name=\"department\" column=\"dept_id\"
class=\"Department\"/"
-">\n"
-" <property name=\"effectiveStartDate\" type=\"date\"
column=\"eff_start_dt"
-"\"/>\n"
-" <property name=\"effectiveEndDate\" type=\"date\"
column=\"eff_end_dt\"/"
-">\n"
-"...\n"
-" <!--\n"
-" Note that this assumes non-terminal records have an eff_end_dt set "
-"to\n"
-" a max db date for simplicity-sake\n"
-" -->\n"
-" <filter name=\"effectiveDate\"\n"
-" condition=\":asOfDate BETWEEN eff_start_dt and
eff_end_dt\"/>\n"
-"</class>\n"
-"\n"
-"<class name=\"Department\" ...>\n"
-"...\n"
-" <set name=\"employees\" lazy=\"true\">\n"
-" <key column=\"dept_id\"/>\n"
-" <one-to-many class=\"Employee\"/>\n"
-" <filter name=\"effectiveDate\"\n"
-" condition=\":asOfDate BETWEEN eff_start_dt and
eff_end_dt\"/"
-">\n"
-" </set>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: para
-#: filters.xml:95
-#, fuzzy, no-c-format
-msgid ""
"In order to ensure that you are provided with currently effective records, "
"enable the filter on the session prior to retrieving employee data:"
msgstr ""
"定义好后,如果想要保证取回的都是目前处于生效期的记录,只需在获取雇员数据的操"
-"作之前先开启过滤器即可:"
+"作之前先开启过滤器即可: "
-#. Tag: programlisting
-#: filters.xml:100
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[Session session = ...;\n"
-"session.enableFilter(\"effectiveDate\").setParameter(\"asOfDate\",
new Date"
-"());\n"
-"List results = session.createQuery(\"from Employee as e where e.salary >
:"
-"targetSalary\")\n"
-" .setLong(\"targetSalary\", new Long(1000000))\n"
-" .list();\n"
-"]]>"
-msgstr ""
-
-#. Tag: para
-#: filters.xml:102
-#, fuzzy, no-c-format
-msgid ""
"Even though a salary constraint was mentioned explicitly on the results in "
"the above HQL, because of the enabled filter, the query will return only "
"currently active employees who have a salary greater than one million "
"dollars."
msgstr ""
-"在上面的HQL中,虽然我们仅仅显式的使用了一个薪水条件,但因为启用了过滤器,查询"
-"将仅返回那些目前雇用 关系处于生效期的,并且薪水高于一百万美刀的雇员的数据。"
+"在上面的 HQL 中,虽然我们仅仅显式的使用了一个薪水条件,但因为启用了过滤器,查"
+"询将仅返回那些目前雇用关系处于生效期的,并且薪水高于一百万美元的雇员的数据。 "
#. Tag: para
-#: filters.xml:108
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"If you want to use filters with outer joining, either through HQL or load "
"fetching, be careful of the direction of the condition expression. It is "
"safest to set this up for left outer joining. Place the parameter first "
"followed by the column name(s) after the operator."
msgstr ""
-"注意:如果你打算在使用外连接(或者通过HQL或load fetching)的同时使用过滤器,"
-"要注意条件表达式的方向(左还是右)。 最安全的方式是使用左外连接(left outer "
-"joining)。并且通常来说,先写参数, 然后是操作符,最后写数据库字段名。"
+"注意:如果你打算在使用外连接(或者通过 HQL 或 load fetching)的同时使用过滤"
+"器,要注意条件表达式的方向(左还是右)。最安全的方式是使用左外连接(left "
+"outer joining)。并且通常来说,先写参数,然后是操作符,最后写数据库字段名。"
#. Tag: para
-#: filters.xml:115
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"After being defined, a filter might be attached to multiple entities and/or "
"collections each with its own condition. This can be problematic when the "
@@ -260,27 +159,154 @@
"literal> allows you to definine a default condition, either as an attribute
"
"or CDATA:"
msgstr ""
-"在Filter定义之后,它可能被附加到多个实体和/或集合类,每个都有自己的条件。假若这"
-"些条件都是一样的,每次都要定义就显得很繁琐。因此,<literal><filter-def/"
-"></literal>被用来定义一个默认条件,它可能作为属性或者CDATA出现:"
+"在 Filter 定义之后,它可能被附加到多个实体和/或集合类,每个都有自己的条件。假若"
+"这些条件都是一样的,每次都要定义就显得很繁琐。因此,<literal><filter-def/"
+"></literal> 被用来定义一个默认条件,它可能作为属性或者 CDATA 出现: "
-#. Tag: programlisting
-#: filters.xml:122
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<filter-def name=\"myFilter\" condition=\"abc >
xyz\">...</filter-"
-"def>\n"
-"<filter-def
name=\"myOtherFilter\">abc=xyz</filter-def>]]>"
-msgstr ""
-
-#. Tag: para
-#: filters.xml:124
-#, fuzzy, no-c-format
-msgid ""
"This default condition will be used whenever the filter is attached to "
"something without specifying a condition. This means you can give a specific
"
"condition as part of the attachment of the filter that overrides the default
"
"condition in that particular case."
msgstr ""
-"当这个filter被附加到任何目的地,而又没有指明条件时,这个条件就会被使用。注"
-"意,换句话说,你可以通过给filter附加特别的条件来重载默认条件。"
+"当这个 filter 被附加到任何目的地,而又没有指明条件时,这个缺省条件就会被使"
+"用。注意,换句话说,你可以通过给 filter 附加特别的条件来重载默认条件。"
+
+#~ msgid ""
+#~ "<![CDATA[<filter-def name=\"myFilter\">\n"
+#~ " <filter-param name=\"myFilterParam\"
type=\"string\"/>\n"
+#~ "</filter-def>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<filter-def name=\"myFilter\">\n"
+#~ " <filter-param name=\"myFilterParam\"
type=\"string\"/>\n"
+#~ "</filter-def>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<class name=\"myClass\" ...>\n"
+#~ " ...\n"
+#~ " <filter name=\"myFilter\" condition=\":myFilterParam =
"
+#~ "MY_FILTERED_COLUMN\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"myClass\" ...>\n"
+#~ " ...\n"
+#~ " <filter name=\"myFilter\" condition=\":myFilterParam =
"
+#~ "MY_FILTERED_COLUMN\"/>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<set ...>\n"
+#~ " <filter name=\"myFilter\" condition=\":myFilterParam =
"
+#~ "MY_FILTERED_COLUMN\"/>\n"
+#~ "</set>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<set ...>\n"
+#~ " <filter name=\"myFilter\" condition=\":myFilterParam =
"
+#~ "MY_FILTERED_COLUMN\"/>\n"
+#~ "</set>]]>"
+
+#~ msgid ""
+#~
"<![CDATA[session.enableFilter(\"myFilter\").setParameter(\"myFilterParam"
+#~ "\", \"some-value\");]]>"
+#~ msgstr ""
+#~
"<![CDATA[session.enableFilter(\"myFilter\").setParameter(\"myFilterParam"
+#~ "\", \"some-value\");]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<filter-def name=\"effectiveDate\">\n"
+#~ " <filter-param name=\"asOfDate\"
type=\"date\"/>\n"
+#~ "</filter-def>\n"
+#~ "\n"
+#~ "<class name=\"Employee\" ...>\n"
+#~ "...\n"
+#~ " <many-to-one name=\"department\" column=\"dept_id\"
class=\"Department"
+#~ "\"/>\n"
+#~ " <property name=\"effectiveStartDate\" type=\"date\"
column="
+#~ "\"eff_start_dt\"/>\n"
+#~ " <property name=\"effectiveEndDate\" type=\"date\"
column=\"eff_end_dt"
+#~ "\"/>\n"
+#~ "...\n"
+#~ " <!--\n"
+#~ " Note that this assumes non-terminal records have an eff_end_dt "
+#~ "set to\n"
+#~ " a max db date for simplicity-sake\n"
+#~ " -->\n"
+#~ " <filter name=\"effectiveDate\"\n"
+#~ " condition=\":asOfDate BETWEEN eff_start_dt and
eff_end_dt\"/"
+#~ ">\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Department\" ...>\n"
+#~ "...\n"
+#~ " <set name=\"employees\" lazy=\"true\">\n"
+#~ " <key column=\"dept_id\"/>\n"
+#~ " <one-to-many class=\"Employee\"/>\n"
+#~ " <filter name=\"effectiveDate\"\n"
+#~ " condition=\":asOfDate BETWEEN eff_start_dt and
eff_end_dt"
+#~ "\"/>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<filter-def name=\"effectiveDate\">\n"
+#~ " <filter-param name=\"asOfDate\"
type=\"date\"/>\n"
+#~ "</filter-def>\n"
+#~ "\n"
+#~ "<class name=\"Employee\" ...>\n"
+#~ "...\n"
+#~ " <many-to-one name=\"department\" column=\"dept_id\"
class=\"Department"
+#~ "\"/>\n"
+#~ " <property name=\"effectiveStartDate\" type=\"date\"
column="
+#~ "\"eff_start_dt\"/>\n"
+#~ " <property name=\"effectiveEndDate\" type=\"date\"
column=\"eff_end_dt"
+#~ "\"/>\n"
+#~ "...\n"
+#~ " <!--\n"
+#~ " Note that this assumes non-terminal records have an eff_end_dt "
+#~ "set to\n"
+#~ " a max db date for simplicity-sake\n"
+#~ " -->\n"
+#~ " <filter name=\"effectiveDate\"\n"
+#~ " condition=\":asOfDate BETWEEN eff_start_dt and
eff_end_dt\"/"
+#~ ">\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"Department\" ...>\n"
+#~ "...\n"
+#~ " <set name=\"employees\" lazy=\"true\">\n"
+#~ " <key column=\"dept_id\"/>\n"
+#~ " <one-to-many class=\"Employee\"/>\n"
+#~ " <filter name=\"effectiveDate\"\n"
+#~ " condition=\":asOfDate BETWEEN eff_start_dt and
eff_end_dt"
+#~ "\"/>\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Session session = ...;\n"
+#~
"session.enableFilter(\"effectiveDate\").setParameter(\"asOfDate\",
new "
+#~ "Date());\n"
+#~ "List results = session.createQuery(\"from Employee as e where e.salary >
:"
+#~ "targetSalary\")\n"
+#~ " .setLong(\"targetSalary\", new Long(1000000))\n"
+#~ " .list();\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session session = ...;\n"
+#~
"session.enableFilter(\"effectiveDate\").setParameter(\"asOfDate\",
new "
+#~ "Date());\n"
+#~ "List results = session.createQuery(\"from Employee as e where e.salary >
:"
+#~ "targetSalary\")\n"
+#~ " .setLong(\"targetSalary\", new Long(1000000))\n"
+#~ " .list();\n"
+#~ "]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<filter-def name=\"myFilter\" condition=\"abc >
xyz\">...</"
+#~ "filter-def>\n"
+#~ "<filter-def
name=\"myOtherFilter\">abc=xyz</filter-def>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<filter-def name=\"myFilter\" condition=\"abc >
xyz\">...</"
+#~ "filter-def>\n"
+#~ "<filter-def
name=\"myOtherFilter\">abc=xyz</filter-def>]]>"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/inheritance_mapping.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/inheritance_mapping.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/inheritance_mapping.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,72 +1,63 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-16 18:47+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2010-01-08T04:07:19\n"
+"PO-Revision-Date: 2009-12-07 09:35+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: inheritance_mapping.xml:29
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Inheritance mapping"
-msgstr "继承映射(Inheritance Mappings)"
+msgstr "继承映射(Inheritance Mapping) "
#. Tag: title
-#: inheritance_mapping.xml:32
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The three strategies"
-msgstr "三种策略"
+msgstr "三种策略 "
#. Tag: para
-#: inheritance_mapping.xml:34
#, no-c-format
msgid "Hibernate supports the three basic inheritance mapping strategies:"
-msgstr "Hibernate支持三种基本的继承映射策略:"
+msgstr "Hibernate 支持三种基本的继承映射策略:"
#. Tag: para
-#: inheritance_mapping.xml:40
#, no-c-format
msgid "table per class hierarchy"
-msgstr "每个类分层结构一张表(table per class hierarchy)"
+msgstr "每个类分层结构一张表(table per class hierarchy)"
#. Tag: para
-#: inheritance_mapping.xml:45
-#, fuzzy, no-c-format
-msgid "<para>table per subclass</para>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"每个子类一张表(table per subclass)\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"每个子类一张表"
+#, no-c-format
+msgid "table per subclass"
+msgstr "每个子类一张表(Table per subclass) "
#. Tag: para
-#: inheritance_mapping.xml:50
#, no-c-format
msgid "table per concrete class"
-msgstr "每个具体类一张表(table per concrete class)"
+msgstr "每个具体类一张表(table per concrete class)"
#. Tag: para
-#: inheritance_mapping.xml:56
#, no-c-format
msgid ""
"In addition, Hibernate supports a fourth, slightly different kind of "
"polymorphism:"
-msgstr "此外,Hibernate还支持第四种稍有不同的多态映射策略:"
+msgstr "此外,Hibernate 还支持第四种稍有不同的多态映射策略:"
#. Tag: para
-#: inheritance_mapping.xml:63
#, no-c-format
msgid "implicit polymorphism"
-msgstr "隐式多态(implicit polymorphism)"
+msgstr "隐式多态(implicit polymorphism)"
#. Tag: para
-#: inheritance_mapping.xml:69
-#, fuzzy, no-c-format
+#, 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 "
@@ -80,17 +71,16 @@
"<literal><join></literal> elements (see below for an
example)."
msgstr ""
"对于同一个继承层次内的不同分支,可以采用不同的映射策略,然后用隐式多 态来完成"
-"跨越整个层次的多态。但是在同一个<literal><class></literal>根元素 下,"
-"Hibernate不支持混合了元素<literal><subclass></literal>、
<literal><"
-"joined-subclass></literal>和<literal><union-subclass></literal>
的映"
-"射。在同一个<literal><class></literal>元素下,可以混合使用 “每个类分层"
-"结构一张表”(table per hierarchy) 和“每个子类一张表”(table per subclass) "
-"这两种映射策略,这是通过结合元素<literal><subclass></literal>和 "
-"<literal><join></literal>来实现的(见后)。"
+"跨越整个层次的多态。但是在同一个 <literal><class></literal> 根元素下,"
+"Hibernate 不支持混合了元素
<literal><subclass></literal>、<literal><"
+"joined-subclass></literal> 和
<literal><union-subclass></literal> 的"
+"映射。在同一个 <literal><class></literal> 元素下,可以混合使用“每个类分"
+"层结构一张表”(table per hierarchy)和“每个子类一张表”(table per subclass) "
+"这两种映射策略,这是通过结合元素 <literal><subclass></literal> 和 "
+"<literal><join></literal> 来实现的(见后)。 "
#. Tag: para
-#: inheritance_mapping.xml:83
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"It is possible to define <literal>subclass</literal>,
<literal>union-"
"subclass</literal>, and <literal>joined-subclass</literal>
mappings in "
@@ -103,36 +93,21 @@
"extends keyword. The ordering inside a single mapping file still needs to be
"
"defined as superclasses before subclasses."
msgstr ""
-"在多个映射文件中,可以直接在<literal>hibernate-mapping</literal>根下定义"
-"<literal>subclass</literal>,<literal>union-subclass</literal>和"
+"在多个映射文件中,可以直接在 <literal>hibernate-mapping</literal> 根下定义 "
+"<literal>subclass</literal>,<literal>union-subclass</literal>
和 "
"<literal>joined-subclass</literal>。也就是说,你可以仅加入一个新的映射文件来"
-"扩展类层次。你必须在subclass的映射中指明<literal>extends</literal>属性,给出"
-"一个之前定义的超类的名字。注意,在以前,这一功能对映射文件的顺序有严格的要"
-"求,从Hibernate 3开始,使用extends关键字的时侯,对映射文件的顺序不再有要求;"
-"但在每个映射文件里,超类必须在子类之前定义。"
+"扩展类层次。你必须在 subclass 的映射中指明 <literal>extends</literal> 属性,"
+"给出一个之前定义的超类的名字。注意,在以前,这一功能对映射文件的顺序有严格的"
+"要求,从 Hibernate 3 开始,使用 extends 关键字的时侯,对映射文件的顺序不再有"
+"要求;但在每个映射文件里,超类必须在子类之前定义。 "
-#. Tag: programlisting
-#: inheritance_mapping.xml:94
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-" <hibernate-mapping>\n"
-" <subclass name=\"DomesticCat\" extends=\"Cat\"
discriminator-value=\"D"
-"\">\n"
-" <property name=\"name\"
type=\"string\"/>\n"
-" </subclass>\n"
-" </hibernate-mapping>]]>"
-msgstr ""
-
#. Tag: title
-#: inheritance_mapping.xml:98
#, no-c-format
msgid "Table per class hierarchy"
-msgstr "每个类分层结构一张表(Table per class hierarchy)"
+msgstr "每个类分层结构一张表(Table per class hierarchy)"
#. Tag: para
-#: inheritance_mapping.xml:100
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Suppose we have an interface <literal>Payment</literal> with the
"
"implementors <literal>CreditCardPayment</literal>,
<literal>CashPayment</"
@@ -140,102 +115,49 @@
"mapping would display in the following way:"
msgstr ""
"假设我们有接口<literal>Payment</literal>和它的几个实现类: "
-"<literal>CreditCardPayment</literal>,
<literal>CashPayment</literal>, 和"
-"<literal>ChequePayment</literal>。则“每个类分层结构一张表”(Table per class "
-"hierarchy)的映射代码如下所示:"
+"<literal>CreditCardPayment</literal>,
<literal>CashPayment</literal> 和"
+"<literal>ChequePayment</literal>。则“每个类分层结构一张表”(Table per class "
+"hierarchy)的映射代码如下所示: "
-#. Tag: programlisting
-#: inheritance_mapping.xml:107
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<class name=\"Payment\"
table=\"PAYMENT\">\n"
-" <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <discriminator column=\"PAYMENT_TYPE\"
type=\"string\"/>\n"
-" <property name=\"amount\"
column=\"AMOUNT\"/>\n"
-" ...\n"
-" <subclass name=\"CreditCardPayment\"
discriminator-value=\"CREDIT\">\n"
-" <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
-" ...\n"
-" </subclass>\n"
-" <subclass name=\"CashPayment\"
discriminator-value=\"CASH\">\n"
-" ...\n"
-" </subclass>\n"
-" <subclass name=\"ChequePayment\"
discriminator-value=\"CHEQUE\">\n"
-" ...\n"
-" </subclass>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: para
-#: inheritance_mapping.xml:109
-#, fuzzy, no-c-format
-msgid ""
"Exactly one table is required. There is a limitation of this mapping "
"strategy: columns declared by the subclasses, such as
<literal>CCTYPE</"
"literal>, cannot have <literal>NOT NULL</literal>
constraints."
msgstr ""
"采用这种策略只需要一张表即可。它有一个很大的限制:要求那些由子类定义的字段, "
-"如<literal>CCTYPE</literal>,不能有<literal>非空(NOT
NULL)</literal>约束。"
+"如 <literal>CCTYPE</literal>,不能有<literal>非空(NOT
NULL)</literal>约"
+"束。 "
#. Tag: title
-#: inheritance_mapping.xml:118
#, no-c-format
msgid "Table per subclass"
-msgstr "每个子类一张表(Table per subclass)"
+msgstr "每个子类一张表(Table per subclass)"
#. Tag: para
-#: inheritance_mapping.xml:120
-#, fuzzy, no-c-format
+#, no-c-format
msgid "A table per subclass mapping looks like this:"
-msgstr "对于上例中的几个类而言,采用“每个子类一张表”的映射策略,代码如下所示:"
-
-#. Tag: programlisting
-#: inheritance_mapping.xml:124
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Payment\"
table=\"PAYMENT\">\n"
-" <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"amount\"
column=\"AMOUNT\"/>\n"
-" ...\n"
-" <joined-subclass name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT\">\n"
-" <key column=\"PAYMENT_ID\"/>\n"
-" <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
-" ...\n"
-" </joined-subclass>\n"
-" <joined-subclass name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
-" <key column=\"PAYMENT_ID\"/>\n"
-" ...\n"
-" </joined-subclass>\n"
-" <joined-subclass name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT\">\n"
-" <key column=\"PAYMENT_ID\"/>\n"
-" ...\n"
-" </joined-subclass>\n"
-"</class>]]>"
msgstr ""
+" 对于上例中的几个类而言,采用“每个子类一张表”的映射策略,代码如下所示:"
#. Tag: para
-#: inheritance_mapping.xml:126
-#, fuzzy, no-c-format
+#, 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 ""
-"需要四张表。三个子类表通过主键关联到超类表(因而关系模型实际上是一对一关联)。"
+"需要四张表。三个子类表通过主键关联到超类表(因而关系模型实际上是一对一关"
+"联)。 "
#. Tag: title
-#: inheritance_mapping.xml:135
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Table per subclass: using a discriminator"
-msgstr "每个子类一张表(Table per subclass),使用辨别标志(Discriminator)"
+msgstr "每个子类一张表(Table per subclass),使用辨别标志(Discriminator) "
#. Tag: para
-#: inheritance_mapping.xml:137
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate's implementation of table per subclass does not require a "
"discriminator column. Other object/relational mappers use a different "
@@ -246,160 +168,63 @@
"strategy, you can combine the use of
<literal><subclass></literal> and "
"<literal><join></literal>, as follows:"
msgstr ""
-"注意,对“每个子类一张表”的映射策略,Hibernate的实现不需要辨别字段,而其他 的"
-"对象/关系映射工具使用了一种不同于Hibernate的实现方法,该方法要求在超类 表中有"
-"一个类型辨别字段(type discriminator column)。Hibernate采用的方法更 难实现,但"
-"从关系(数据库)的角度来看,按理说它更正确。若你愿意使用带有辨别字 段的“每个"
-"子类一张表”的策略,你可以结合使用<literal><subclass></literal> 与"
-"<literal><join></literal>,如下所示:"
+"注意,对“每个子类一张表”的映射策略,Hibernate 的实现不需要辨别字段,而其他的"
+"对象/关系映射工具使用了一种不同于Hibernate的实现方法,该方法要求在超类表中有"
+"一个类型辨别字段(type discriminator column)。Hibernate 采用的方法更难实现,"
+"但从关系(数据库)的角度来看,按理说它更正确。若你愿意使用带有辨别字段的“每个"
+"子类一张表”的策略,你可以结合使用 <literal><subclass></literal> 与"
+"<literal><join></literal>,如下所示: "
-#. Tag: programlisting
-#: inheritance_mapping.xml:149
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Payment\"
table=\"PAYMENT\">\n"
-" <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <discriminator column=\"PAYMENT_TYPE\"
type=\"string\"/>\n"
-" <property name=\"amount\"
column=\"AMOUNT\"/>\n"
-" ...\n"
-" <subclass name=\"CreditCardPayment\"
discriminator-value=\"CREDIT\">\n"
-" <join table=\"CREDIT_PAYMENT\">\n"
-" <key column=\"PAYMENT_ID\"/>\n"
-" <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
-" ...\n"
-" </join>\n"
-" </subclass>\n"
-" <subclass name=\"CashPayment\"
discriminator-value=\"CASH\">\n"
-" <join table=\"CASH_PAYMENT\">\n"
-" <key column=\"PAYMENT_ID\"/>\n"
-" ...\n"
-" </join>\n"
-" </subclass>\n"
-" <subclass name=\"ChequePayment\"
discriminator-value=\"CHEQUE\">\n"
-" <join table=\"CHEQUE_PAYMENT\"
fetch=\"select\">\n"
-" <key column=\"PAYMENT_ID\"/>\n"
-" ...\n"
-" </join>\n"
-" </subclass>\n"
-"</class>]]>"
-msgstr ""
-
#. Tag: para
-#: inheritance_mapping.xml:151
#, no-c-format
msgid ""
"The optional <literal>fetch=\"select\"</literal> declaration
tells Hibernate "
"not to fetch the <literal>ChequePayment</literal> subclass data using
an "
"outer join when querying the superclass."
msgstr ""
-"可选的声明<literal>fetch=\"select\"</literal>,是用来告诉Hibernate,在查询超"
-"类时, 不要使用外部连接(outer join)来抓取子类<literal>ChequePayment</literal>"
-"的数据。"
+"可选的声明 <literal>fetch=\"select\"</literal>,是用来告诉
Hibernate,在查询"
+"超类时,不要使用外部连接(outer join)来抓取子类 <literal>ChequePayment</"
+"literal> 的数据。"
#. Tag: title
-#: inheritance_mapping.xml:160
#, no-c-format
msgid "Mixing table per class hierarchy with table per subclass"
msgstr "混合使用“每个类分层结构一张表”和“每个子类一张表”"
#. Tag: para
-#: inheritance_mapping.xml:162
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You can even mix the table per hierarchy and table per subclass strategies "
"using the following approach:"
msgstr ""
"你甚至可以采取如下方法混和使用“每个类分层结构一张表”和“每个子类一张表”这两种"
-"策略:"
+"策略: "
-#. Tag: programlisting
-#: inheritance_mapping.xml:167
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Payment\"
table=\"PAYMENT\">\n"
-" <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <discriminator column=\"PAYMENT_TYPE\"
type=\"string\"/>\n"
-" <property name=\"amount\"
column=\"AMOUNT\"/>\n"
-" ...\n"
-" <subclass name=\"CreditCardPayment\"
discriminator-value=\"CREDIT\">\n"
-" <join table=\"CREDIT_PAYMENT\">\n"
-" <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
-" ...\n"
-" </join>\n"
-" </subclass>\n"
-" <subclass name=\"CashPayment\"
discriminator-value=\"CASH\">\n"
-" ...\n"
-" </subclass>\n"
-" <subclass name=\"ChequePayment\"
discriminator-value=\"CHEQUE\">\n"
-" ...\n"
-" </subclass>\n"
-"</class>]]>"
-msgstr ""
-
#. Tag: para
-#: inheritance_mapping.xml:169
#, no-c-format
msgid ""
"For any of these mapping strategies, a polymorphic association to the root "
"<literal>Payment</literal> class is mapped using
<literal><many-to-one>"
"</literal>."
msgstr ""
-"对上述任何一种映射策略而言,指向根类<literal>Payment</literal>的 关联是使用"
-"<literal><many-to-one></literal>进行映射的。"
+"对上述任何一种映射策略而言,指向根类 <literal>Payment</literal> 的关联是使用 "
+"<literal><many-to-one></literal> 进行映射的。"
-#. Tag: programlisting
-#: inheritance_mapping.xml:175
-#, no-c-format
-msgid ""
-"<![CDATA[<many-to-one name=\"payment\"
column=\"PAYMENT_ID\" class=\"Payment"
-"\"/>]]>"
-msgstr ""
-
#. Tag: title
-#: inheritance_mapping.xml:180
#, no-c-format
msgid "Table per concrete class"
-msgstr "每个具体类一张表(Table per concrete class)"
+msgstr "每个具体类一张表(Table per concrete class)"
#. Tag: para
-#: inheritance_mapping.xml:182
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"There are two ways we can map the table per concrete class strategy. First, "
"you can use <literal><union-subclass></literal>."
msgstr ""
-"对于“每个具体类一张表”的映射策略,可以采用两种方法。第一种方法是使用 "
-"<literal><union-subclass></literal>。"
+"对于“每个具体类一张表”的映射策略,可以采用两种方法。第一种方法是使用 "
+"<literal><union-subclass></literal>。 "
-#. Tag: programlisting
-#: inheritance_mapping.xml:187
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Payment\">\n"
-" <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-" <property name=\"amount\"
column=\"AMOUNT\"/>\n"
-" ...\n"
-" <union-subclass name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT\">\n"
-" <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
-" ...\n"
-" </union-subclass>\n"
-" <union-subclass name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
-" ...\n"
-" </union-subclass>\n"
-" <union-subclass name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT\">\n"
-" ...\n"
-" </union-subclass>\n"
-"</class>]]>"
-msgstr ""
-
#. Tag: para
-#: inheritance_mapping.xml:189
#, no-c-format
msgid ""
"Three tables are involved for the subclasses. Each table defines columns for
"
@@ -409,8 +234,7 @@
"定义相应字段。"
#. Tag: para
-#: inheritance_mapping.xml:194
-#, fuzzy, no-c-format
+#, 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 "
@@ -418,68 +242,35 @@
"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)不得不为同一继承层次中的全部被"
-"联合子类所共用."
+"这种方式的局限在于,如果一个属性在超类中做了映射,其字段名必须与所有子类表中"
+"定义的相同。(我们可能会在 Hibernate 的后续发布版本中放宽此限制。)不允许在联"
+"合子类(union subclass)的继承层次中使用标识生成器策略(identity generator "
+"strategy),实际上,主键的种子(primary key seed)不得不为同一继承层次中的全"
+"部被联合子类所共用。 "
#. Tag: para
-#: inheritance_mapping.xml:203
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"If your superclass is abstract, map it with
<literal>abstract=\"true\"</"
"literal>. If it is not abstract, an additional table (it defaults to "
"<literal>PAYMENT</literal> in the example above), is needed to hold
"
"instances of the superclass."
msgstr ""
-"假若超类是抽象类,请使用<literal>abstract=\"true\"</literal>。当然,假若它不"
-"是抽象的,需要一个额外的表(上面的例子中,默认是<literal>PAYMENT</"
-"literal>),来保存超类的实例。"
+"假若超类是抽象类,请使用
<literal>abstract=\"true\"</literal>。当然,假若它不"
+"是抽象的,需要一个额外的表(上面的例子中,默认是 <literal>PAYMENT</"
+"literal>),来保存超类的实例。 "
#. Tag: title
-#: inheritance_mapping.xml:213
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Table per concrete class using implicit polymorphism"
-msgstr "每个具体类一张表,使用隐式多态"
+msgstr "每个具体类一张表,使用隐式多态 "
#. Tag: para
-#: inheritance_mapping.xml:215
#, no-c-format
msgid "An alternative approach is to make use of implicit polymorphism:"
msgstr "另一种可供选择的方法是采用隐式多态:"
-#. Tag: programlisting
-#: inheritance_mapping.xml:219
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT\">\n"
-" <id name=\"id\" type=\"long\"
column=\"CREDIT_PAYMENT_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"amount\"
column=\"CREDIT_AMOUNT\"/>\n"
-" ...\n"
-"</class>\n"
-"\n"
-"<class name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
-" <id name=\"id\" type=\"long\"
column=\"CASH_PAYMENT_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"amount\"
column=\"CASH_AMOUNT\"/>\n"
-" ...\n"
-"</class>\n"
-"\n"
-"<class name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT\">\n"
-" <id name=\"id\" type=\"long\"
column=\"CHEQUE_PAYMENT_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"amount\"
column=\"CHEQUE_AMOUNT\"/>\n"
-" ...\n"
-"</class>]]>"
-msgstr ""
-
#. Tag: para
-#: inheritance_mapping.xml:221
#, fuzzy, no-c-format
msgid ""
"Notice that the <literal>Payment</literal> interface is not mentioned
"
@@ -487,56 +278,39 @@
"mapped in each of the subclasses. If you want to avoid duplication, consider
"
"using XML entities (for example, <literal>[ <!ENTITY allproperties
SYSTEM "
"\"allproperties.xml\"> ]</literal> in the
<literal>DOCTYPE</literal> "
-"declaration and <literal>&allproperties;</literal> in the
mapping)."
+"declaration and <literal>&allproperties;</literal> in
the mapping)."
msgstr ""
-"注意,我们没有在任何地方明确的提及接口<literal>Payment</literal>。同时注意 "
-"<literal>Payment</literal>的属性在每个子类中都进行了映射。如果你想避免重复, "
-"可以考虑使用XML实体(例如:位于<literal>DOCTYPE</literal>声明内的 <literal>"
-"[ <!ENTITY allproperties SYSTEM \"allproperties.xml\">
]</literal> 和映"
-"射中的<literal>&allproperties;</literal>)。"
+"请注意这里没有显性地提及 <literal>Payment</literal>
接口。<literal>Payment</"
+"literal> 的属性映射到每个子类。如果你想避免重复,请考虑使用 XML 实体(如:"
+"<literal>DOCTYPE</literal> 声明里的 <literal>[ <!ENTITY
allproperties "
+"SYSTEM \"allproperties.xml\"> ]</literal> 和映射里的 "
+"<literal>&allproperties;</literal>)。"
#. Tag: para
-#: inheritance_mapping.xml:231
#, no-c-format
msgid ""
"The disadvantage of this approach is that Hibernate does not generate SQL "
"<literal>UNION</literal>s when performing polymorphic queries."
msgstr ""
-"这种方法的缺陷在于,在Hibernate执行多态查询时(polymorphic queries)无法生成带 "
-"<literal>UNION</literal>的SQL语句。"
+"这种方法的缺陷在于,在 Hibernate 执行多态查询时(polymorphic queries)无法生"
+"成带 <literal>UNION</literal> 的 SQL 语句。 "
#. Tag: para
-#: inheritance_mapping.xml:236
#, no-c-format
msgid ""
"For this mapping strategy, a polymorphic association to
<literal>Payment</"
"literal> is usually mapped using
<literal><any></literal>."
msgstr ""
-"对于这种映射策略而言,通常用<literal><any></literal>来实现到 "
-"<literal>Payment</literal>的多态关联映射。"
+"对于这种映射策略而言,通常用 <literal><any></literal> 来实现到 "
+"<literal>Payment</literal> 的多态关联映射。"
-#. Tag: programlisting
-#: inheritance_mapping.xml:241
-#, no-c-format
-msgid ""
-"<![CDATA[<any name=\"payment\" meta-type=\"string\"
id-type=\"long\">\n"
-" <meta-value value=\"CREDIT\"
class=\"CreditCardPayment\"/>\n"
-" <meta-value value=\"CASH\"
class=\"CashPayment\"/>\n"
-" <meta-value value=\"CHEQUE\"
class=\"ChequePayment\"/>\n"
-" <column name=\"PAYMENT_CLASS\"/>\n"
-" <column name=\"PAYMENT_ID\"/>\n"
-"</any>]]>"
-msgstr ""
-
#. Tag: title
-#: inheritance_mapping.xml:246
#, no-c-format
msgid "Mixing implicit polymorphism with other inheritance mappings"
msgstr "隐式多态和其他继承映射混合使用"
#. Tag: para
-#: inheritance_mapping.xml:248
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Since the subclasses are each mapped in their own
<literal><class></"
"literal> element, and since <literal>Payment</literal> is just an
"
@@ -544,48 +318,14 @@
"inheritance hierarchy. You can still use polymorphic queries against the "
"<literal>Payment</literal> interface."
msgstr ""
-"对这一映射还有一点需要注意。因为每个子类都在各自独立的元素<literal><"
-"class></literal>
中映射(并且<literal>Payment</literal>只是一个接口),每个"
-"子类可以很容易的成为另一 个继承体系中的一部分!(你仍然可以对接口"
-"<literal>Payment</literal>使用多态查询。)"
+"对这一映射还有一点需要注意。因为每个子类都在各自独立的元素 <literal><"
+"class></literal> 中映射(并且 <literal>Payment</literal>
只是一个接口),"
+"每个子类可以很容易的成为另一个继承体系中的一部分!(你仍然可以对接口 "
+"<literal>Payment</literal> 使用多态查询。) "
-#. Tag: programlisting
-#: inheritance_mapping.xml:256
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<class name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT\">\n"
-" <id name=\"id\" type=\"long\"
column=\"CREDIT_PAYMENT_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <discriminator column=\"CREDIT_CARD\"
type=\"string\"/>\n"
-" <property name=\"amount\"
column=\"CREDIT_AMOUNT\"/>\n"
-" ...\n"
-" <subclass name=\"MasterCardPayment\"
discriminator-value=\"MDC\"/>\n"
-" <subclass name=\"VisaPayment\"
discriminator-value=\"VISA\"/>\n"
-"</class>\n"
-"\n"
-"<class name=\"NonelectronicTransaction\"
table=\"NONELECTRONIC_TXN\">\n"
-" <id name=\"id\" type=\"long\"
column=\"TXN_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" ...\n"
-" <joined-subclass name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
-" <key column=\"PAYMENT_ID\"/>\n"
-" <property name=\"amount\"
column=\"CASH_AMOUNT\"/>\n"
-" ...\n"
-" </joined-subclass>\n"
-" <joined-subclass name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT\">\n"
-" <key column=\"PAYMENT_ID\"/>\n"
-" <property name=\"amount\"
column=\"CHEQUE_AMOUNT\"/>\n"
-" ...\n"
-" </joined-subclass>\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: para
-#: inheritance_mapping.xml:258
-#, fuzzy, no-c-format
-msgid ""
"Once again, <literal>Payment</literal> is not mentioned explicitly. If
we "
"execute a query against the <literal>Payment</literal> interface, for
"
"example <literal>from Payment</literal>, Hibernate automatically
returns "
@@ -594,225 +334,573 @@
"literal> and <literal>ChequePayment</literal>, but not instances of
"
"<literal>NonelectronicTransaction</literal>."
msgstr ""
-"我们还是没有明确的提到<literal>Payment</literal>。 如果我们针对接口"
-"<literal>Payment</literal>执行查询 ——如<literal>from
Payment</literal>—— "
-"Hibernate 自动返回<literal>CreditCardPayment</literal>(和它的子类,因为 它们"
-"也实现了接口<literal>Payment</literal>)、
<literal>CashPayment</literal>和"
-"<literal>Chequepayment</literal>的实例, 但不返回"
-"<literal>NonelectronicTransaction</literal>的实例。"
+"我们还是没有明确的提到 <literal>Payment</literal>。如果我们针对接口 "
+"<literal>Payment</literal> 执行查询 — 如 <literal>from
Payment</literal> — "
+"Hibernate 自动返回 <literal>CreditCardPayment</literal>(和它的子类,因为 它"
+"们也实现了接口
<literal>Payment</literal>)、<literal>CashPayment</literal> "
+"和 <literal>Chequepayment</literal> 的实例,但不返回 "
+"<literal>NonelectronicTransaction</literal> 的实例。 "
#. Tag: title
-#: inheritance_mapping.xml:273
#, no-c-format
msgid "Limitations"
msgstr "限制"
#. Tag: para
-#: inheritance_mapping.xml:275
-#, fuzzy, no-c-format
+#, 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 <literal><union-subclass></literal>
mappings."
msgstr ""
"对“每个具体类映射一张表”(table per concrete-class)的映射策略而言,隐式多态"
-"的
方式有一定的限制。而<literal><union-subclass></literal>映射的限制则"
-"没有那 么严格。"
+"的方式有一定的限制。而 <literal><union-subclass></literal>
映射的限制则"
+"没有那么严格。 "
#. Tag: para
-#: inheritance_mapping.xml:282
#, no-c-format
msgid ""
-"The following table shows the limitations of table per concrete-class "
+"The following list shows the limitations of table per concrete-class "
"mappings, and of implicit polymorphism, in Hibernate."
-msgstr "下面表格中列出了在Hibernte中“每个具体类一张表”的策略和隐式多态的限制。"
+msgstr ""
+"下面表格中列出了在 Hibernte 中“每个具体类一张表”的策略和隐式多态的限制。 "
-#. Tag: title
-#: inheritance_mapping.xml:288
+#. Tag: term
#, no-c-format
-msgid "Features of inheritance mappings"
-msgstr "继承映射特性(Features of inheritance mappings)"
+msgid "table per class-heirarchy"
+msgstr "每个类分层结构一张表 "
-#. Tag: entry
-#: inheritance_mapping.xml:301
+#. Tag: para
#, no-c-format
-msgid "Inheritance strategy"
-msgstr "继承策略(Inheritance strategy)"
+msgid "Polymorphic many-to-one:
<code><many-to-one></code>"
+msgstr "多态性多对一:<code><many-to-one></code>"
-#. Tag: entry
-#: inheritance_mapping.xml:302
+#. Tag: para
#, no-c-format
-msgid "Polymorphic many-to-one"
-msgstr "多态多对一"
+msgid "Polymorphic one-to-one:
<code><one-to-one></code>"
+msgstr "多态性一对一:<code><one-to-one></code>"
-#. Tag: entry
-#: inheritance_mapping.xml:303
+#. Tag: para
#, no-c-format
-msgid "Polymorphic one-to-one"
-msgstr "多态一对一"
+msgid "Polymorphic one-to-many:
<code><one-to-many></code>"
+msgstr "多态性一对多:<code><one-to-many></code>"
-#. Tag: entry
-#: inheritance_mapping.xml:304
+#. Tag: para
#, no-c-format
-msgid "Polymorphic one-to-many"
-msgstr "多态一对多"
+msgid "Polymorphic many-to-many:
<code><many-to-many></code>"
+msgstr "多态性多对多:<code><many-to-many></code>"
-#. Tag: entry
-#: inheritance_mapping.xml:305
+#. Tag: para
#, no-c-format
-msgid "Polymorphic many-to-many"
-msgstr "多态多对多"
-
-#. Tag: entry
-#: inheritance_mapping.xml:306
-#, no-c-format
-msgid "Polymorphic <literal>load()/get()</literal>"
+msgid ""
+"Polymorphic <literal>load()</literal> or
<literal>get()</literal>: <code>s."
+"get(Payment.class, id)</code>"
msgstr ""
+"多态性 <literal>load()</literal> 或
<literal>get()</literal>:<code>s.get"
+"(Payment.class, id)</code>"
-#. Tag: entry
-#: inheritance_mapping.xml:307
+#. Tag: para
#, no-c-format
-msgid "Polymorphic queries"
-msgstr "多态查询"
+msgid "Polymorphic queries: <code>from Payment p</code>"
+msgstr "多态性查询:<code>from Payment p</code>"
-#. Tag: entry
-#: inheritance_mapping.xml:308
+#. Tag: para
#, no-c-format
-msgid "Polymorphic joins"
-msgstr "多态连接(join)"
+msgid "Polymorphic joins: <code>from Order o join o.payment
p</code>"
+msgstr "多态性 join:<code>from Order o join o.payment p</code>"
-#. Tag: entry
-#: inheritance_mapping.xml:309
+#. Tag: para
#, no-c-format
-msgid "Outer join fetching"
-msgstr "外连接(Outer join)读取"
+msgid "Outer join fetching is supported."
+msgstr "支持外连接(Outer join)读取。"
-#. Tag: entry
-#: inheritance_mapping.xml:314
+#. Tag: term
#, no-c-format
-msgid "table per class-hierarchy"
-msgstr "每个类分层结构一张表"
+msgid "table per concrete-class (union-subclass)"
+msgstr "每个具体类一张表(union-subclass)"
-#. Tag: literal
-#: inheritance_mapping.xml:315 inheritance_mapping.xml:326
-#: inheritance_mapping.xml:337
+#. Tag: para
#, no-c-format
-msgid "<many-to-one>"
-msgstr "<many-to-one>"
+msgid ""
+"Polymorphic one-to-many: <code><one-to-many></code> (for
<code>inverse="
+"\"true\"</code> only)"
+msgstr ""
+"多态性一对多:<literal><one-to-many></literal> (仅适用于 "
+"<literal>inverse=\"true\"</literal>)"
-#. Tag: literal
-#: inheritance_mapping.xml:316 inheritance_mapping.xml:327
-#: inheritance_mapping.xml:338
+#. Tag: term
#, no-c-format
-msgid "<one-to-one>"
-msgstr "<one-to-one>"
+msgid "table per concrete class (implicit polymorphism"
+msgstr "每个具体类一张表(隐式多态) "
-#. Tag: literal
-#: inheritance_mapping.xml:317 inheritance_mapping.xml:328
+#. Tag: para
#, no-c-format
-msgid "<one-to-many>"
-msgstr "<one-to-many>"
+msgid "Polymorphic many-to-one: <code><any></code>"
+msgstr "多态多对一:<code><any></code>"
-#. Tag: literal
-#: inheritance_mapping.xml:318 inheritance_mapping.xml:329
-#: inheritance_mapping.xml:340
+#. Tag: para
#, no-c-format
-msgid "<many-to-many>"
-msgstr "<many-to-many>"
+msgid ""
+"Polymorphic <literal>load()</literal> or
<literal>get()</literal>: <code>s."
+"createCriteria(Payment.class).add( Restrictions.idEq(id)
).uniqueResult()</"
+"code>"
+msgstr ""
+"多态性 <literal>load()</literal> 或
<literal>get()</literal>:<code>s."
+"createCriteria(Payment.class).add( Restrictions.idEq(id)
).uniqueResult()</"
+"code>"
-#. Tag: literal
-#: inheritance_mapping.xml:319 inheritance_mapping.xml:330
-#: inheritance_mapping.xml:341
+#. Tag: para
#, no-c-format
-msgid "s.get(Payment.class, id)"
-msgstr "s.get(Payment.class, id)"
+msgid ""
+"Polymorphic one-to-one, polymorphic one-to-many, polymorphic joins, and "
+"outer join fetching are not supported."
+msgstr "多态性一对一、多态性一对多,不支持多态性 join 和 outer join fetching。"
-#. Tag: literal
-#: inheritance_mapping.xml:320 inheritance_mapping.xml:331
-#: inheritance_mapping.xml:342 inheritance_mapping.xml:353
-#, no-c-format
-msgid "from Payment p"
-msgstr "from Payment p"
+#~ msgid "<para>table per subclass</para>"
+#~ msgstr "<para>每个子类一张表</para>"
-#. Tag: literal
-#: inheritance_mapping.xml:321 inheritance_mapping.xml:332
-#: inheritance_mapping.xml:343
-#, no-c-format
-msgid "from Order o join o.payment p"
-msgstr "from Order o join o.payment p"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ " <hibernate-mapping>\n"
+#~ " <subclass name=\"DomesticCat\" extends=\"Cat\"
discriminator-value="
+#~ "\"D\">\n"
+#~ " <property name=\"name\"
type=\"string\"/>\n"
+#~ " </subclass>\n"
+#~ " </hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<hibernate-mapping>\n"
+#~ " <subclass name=\"DomesticCat\" extends=\"Cat\"
discriminator-"
+#~ "value=\"D\">\n"
+#~ " <property name=\"name\"
type=\"string\"/>\n"
+#~ " </subclass>\n"
+#~ " </hibernate-mapping>"
-#. Tag: emphasis
-#: inheritance_mapping.xml:322 inheritance_mapping.xml:333
-#: inheritance_mapping.xml:344
-#, no-c-format
-msgid "supported"
-msgstr "支持"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Payment\"
table=\"PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <discriminator column=\"PAYMENT_TYPE\"
type=\"string\"/>\n"
+#~ " <property name=\"amount\"
column=\"AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <subclass name=\"CreditCardPayment\"
discriminator-value=\"CREDIT\">\n"
+#~ " <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
+#~ " ...\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"CashPayment\"
discriminator-value=\"CASH\">\n"
+#~ " ...\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"ChequePayment\"
discriminator-value=\"CHEQUE\">\n"
+#~ " ...\n"
+#~ " </subclass>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Payment\"
table=\"PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <discriminator column=\"PAYMENT_TYPE\"
type=\"string\"/>\n"
+#~ " <property name=\"amount\"
column=\"AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <subclass name=\"CreditCardPayment\"
discriminator-value=\"CREDIT"
+#~ "\">\n"
+#~ " <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
+#~ " ...\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"CashPayment\"
discriminator-value=\"CASH\">\n"
+#~ " ...\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"ChequePayment\"
discriminator-value=\"CHEQUE"
+#~ "\">\n"
+#~ " ...\n"
+#~ " </subclass>\n"
+#~ "</class>"
-#. Tag: entry
-#: inheritance_mapping.xml:325
-#, fuzzy, no-c-format
-msgid "<entry>table per subclass</entry>"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"每个子类一张表(table per subclass)\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"每个子类一张表"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Payment\"
table=\"PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"amount\"
column=\"AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <joined-subclass name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT"
+#~ "\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
+#~ " ...\n"
+#~ " </joined-subclass>\n"
+#~ " <joined-subclass name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " ...\n"
+#~ " </joined-subclass>\n"
+#~ " <joined-subclass name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " ...\n"
+#~ " </joined-subclass>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Payment\"
table=\"PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"amount\"
column=\"AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <joined-subclass name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT"
+#~ "\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
+#~ " ...\n"
+#~ " </joined-subclass>\n"
+#~ " <joined-subclass name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " ...\n"
+#~ " </joined-subclass>\n"
+#~ " <joined-subclass name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT"
+#~ "\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " ...\n"
+#~ " </joined-subclass>\n"
+#~ "</class>"
-#. Tag: entry
-#: inheritance_mapping.xml:336
-#, no-c-format
-msgid "table per concrete-class (union-subclass)"
-msgstr "每个具体类一张表(union-subclass)"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Payment\"
table=\"PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <discriminator column=\"PAYMENT_TYPE\"
type=\"string\"/>\n"
+#~ " <property name=\"amount\"
column=\"AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <subclass name=\"CreditCardPayment\"
discriminator-value=\"CREDIT\">\n"
+#~ " <join table=\"CREDIT_PAYMENT\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
+#~ " ...\n"
+#~ " </join>\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"CashPayment\"
discriminator-value=\"CASH\">\n"
+#~ " <join table=\"CASH_PAYMENT\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " ...\n"
+#~ " </join>\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"ChequePayment\"
discriminator-value=\"CHEQUE\">\n"
+#~ " <join table=\"CHEQUE_PAYMENT\"
fetch=\"select\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " ...\n"
+#~ " </join>\n"
+#~ " </subclass>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Payment\"
table=\"PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <discriminator column=\"PAYMENT_TYPE\"
type=\"string\"/>\n"
+#~ " <property name=\"amount\"
column=\"AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <subclass name=\"CreditCardPayment\"
discriminator-value=\"CREDIT"
+#~ "\">\n"
+#~ " <join table=\"CREDIT_PAYMENT\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
+#~ " ...\n"
+#~ " </join>\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"CashPayment\"
discriminator-value=\"CASH\">\n"
+#~ " <join table=\"CASH_PAYMENT\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " ...\n"
+#~ " </join>\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"ChequePayment\"
discriminator-value=\"CHEQUE"
+#~ "\">\n"
+#~ " <join table=\"CHEQUE_PAYMENT\"
fetch=\"select\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " ...\n"
+#~ " </join>\n"
+#~ " </subclass>\n"
+#~ "</class>"
-#. Tag: entry
-#: inheritance_mapping.xml:339
-#, no-c-format
-msgid ""
-"<literal><one-to-many></literal> (for
<literal>inverse=\"true\"</"
-"literal> only)"
-msgstr ""
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Payment\"
table=\"PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <discriminator column=\"PAYMENT_TYPE\"
type=\"string\"/>\n"
+#~ " <property name=\"amount\"
column=\"AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <subclass name=\"CreditCardPayment\"
discriminator-value=\"CREDIT\">\n"
+#~ " <join table=\"CREDIT_PAYMENT\">\n"
+#~ " <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
+#~ " ...\n"
+#~ " </join>\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"CashPayment\"
discriminator-value=\"CASH\">\n"
+#~ " ...\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"ChequePayment\"
discriminator-value=\"CHEQUE\">\n"
+#~ " ...\n"
+#~ " </subclass>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Payment\"
table=\"PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <discriminator column=\"PAYMENT_TYPE\"
type=\"string\"/>\n"
+#~ " <property name=\"amount\"
column=\"AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <subclass name=\"CreditCardPayment\"
discriminator-value=\"CREDIT"
+#~ "\">\n"
+#~ " <join table=\"CREDIT_PAYMENT\">\n"
+#~ " <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
+#~ " ...\n"
+#~ " </join>\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"CashPayment\"
discriminator-value=\"CASH\">\n"
+#~ " ...\n"
+#~ " </subclass>\n"
+#~ " <subclass name=\"ChequePayment\"
discriminator-value=\"CHEQUE"
+#~ "\">\n"
+#~ " ...\n"
+#~ " </subclass>\n"
+#~ "</class>"
-#. Tag: entry
-#: inheritance_mapping.xml:347
-#, no-c-format
-msgid "table per concrete class (implicit polymorphism)"
-msgstr "每个具体类一张表(隐式多态)"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"payment\"
column=\"PAYMENT_ID\" class="
+#~ "\"Payment\"/>]]>"
+#~ msgstr ""
+#~ "<many-to-one name=\"payment\" column=\"PAYMENT_ID\"
class=\"Payment\"/"
+#~ ">"
-#. Tag: literal
-#: inheritance_mapping.xml:348
-#, no-c-format
-msgid "<any>"
-msgstr "<any>"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Payment\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"amount\"
column=\"AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <union-subclass name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT\">\n"
+#~ " <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
+#~ " ...\n"
+#~ " </union-subclass>\n"
+#~ " <union-subclass name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
+#~ " ...\n"
+#~ " </union-subclass>\n"
+#~ " <union-subclass name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT\">\n"
+#~ " ...\n"
+#~ " </union-subclass>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Payment\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"PAYMENT_ID\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"amount\"
column=\"AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <union-subclass name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT"
+#~ "\">\n"
+#~ " <property name=\"creditCardType\"
column=\"CCTYPE\"/>\n"
+#~ " ...\n"
+#~ " </union-subclass>\n"
+#~ " <union-subclass name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
+#~ " ...\n"
+#~ " </union-subclass>\n"
+#~ " <union-subclass name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT"
+#~ "\">\n"
+#~ " ...\n"
+#~ " </union-subclass>\n"
+#~ "</class>"
-#. Tag: emphasis
-#: inheritance_mapping.xml:349 inheritance_mapping.xml:350
-#: inheritance_mapping.xml:354 inheritance_mapping.xml:355
-#, no-c-format
-msgid "not supported"
-msgstr "不支持"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"CREDIT_PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"amount\"
column=\"CREDIT_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"CASH_PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"amount\"
column=\"CASH_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"CHEQUE_PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"amount\"
column=\"CHEQUE_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"CREDIT_PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"amount\"
column=\"CREDIT_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"CASH_PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"amount\"
column=\"CASH_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"CHEQUE_PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"amount\"
column=\"CHEQUE_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ "</class>"
-#. Tag: literal
-#: inheritance_mapping.xml:351
-#, no-c-format
-msgid "<many-to-any>"
-msgstr "<many-to-any>"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<any name=\"payment\" meta-type=\"string\"
id-type=\"long\">\n"
+#~ " <meta-value value=\"CREDIT\"
class=\"CreditCardPayment\"/>\n"
+#~ " <meta-value value=\"CASH\"
class=\"CashPayment\"/>\n"
+#~ " <meta-value value=\"CHEQUE\"
class=\"ChequePayment\"/>\n"
+#~ " <column name=\"PAYMENT_CLASS\"/>\n"
+#~ " <column name=\"PAYMENT_ID\"/>\n"
+#~ "</any>]]>"
+#~ msgstr ""
+#~ "<any name=\"payment\" meta-type=\"string\"
id-type=\"long\">\n"
+#~ " <meta-value value=\"CREDIT\"
class=\"CreditCardPayment\"/>\n"
+#~ " <meta-value value=\"CASH\"
class=\"CashPayment\"/>\n"
+#~ " <meta-value value=\"CHEQUE\"
class=\"ChequePayment\"/>\n"
+#~ " <column name=\"PAYMENT_CLASS\"/>\n"
+#~ " <column name=\"PAYMENT_ID\"/>\n"
+#~ "</any>"
-#. Tag: literal
-#: inheritance_mapping.xml:352
-#, no-c-format
-msgid ""
-"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"
-msgstr ""
-"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"CREDIT_PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <discriminator column=\"CREDIT_CARD\"
type=\"string\"/>\n"
+#~ " <property name=\"amount\"
column=\"CREDIT_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <subclass name=\"MasterCardPayment\"
discriminator-value=\"MDC\"/>\n"
+#~ " <subclass name=\"VisaPayment\"
discriminator-value=\"VISA\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"NonelectronicTransaction\"
table=\"NONELECTRONIC_TXN\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"TXN_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " ...\n"
+#~ " <joined-subclass name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " <property name=\"amount\"
column=\"CASH_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " </joined-subclass>\n"
+#~ " <joined-subclass name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " <property name=\"amount\"
column=\"CHEQUE_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " </joined-subclass>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"CreditCardPayment\"
table=\"CREDIT_PAYMENT\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"CREDIT_PAYMENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <discriminator column=\"CREDIT_CARD\"
type=\"string\"/>\n"
+#~ " <property name=\"amount\"
column=\"CREDIT_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " <subclass name=\"MasterCardPayment\"
discriminator-value=\"MDC\"/"
+#~ ">\n"
+#~ " <subclass name=\"VisaPayment\"
discriminator-value=\"VISA\"/>\n"
+#~ "</class>\n"
+#~ "\n"
+#~ "<class name=\"NonelectronicTransaction\"
table=\"NONELECTRONIC_TXN"
+#~ "\">\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"TXN_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " ...\n"
+#~ " <joined-subclass name=\"CashPayment\"
table=\"CASH_PAYMENT\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " <property name=\"amount\"
column=\"CASH_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " </joined-subclass>\n"
+#~ " <joined-subclass name=\"ChequePayment\"
table=\"CHEQUE_PAYMENT"
+#~ "\">\n"
+#~ " <key column=\"PAYMENT_ID\"/>\n"
+#~ " <property name=\"amount\"
column=\"CHEQUE_AMOUNT\"/>\n"
+#~ " ...\n"
+#~ " </joined-subclass>\n"
+#~ "</class>"
-#~ msgid "load()/get()"
-#~ msgstr "load()/get()"
+#~ msgid "Features of inheritance mappings"
+#~ msgstr "继承映射特性(Features of inheritance mappings)"
-#~ msgid "Polymorphic <placeholder-1/>"
-#~ msgstr "多态 <placeholder-1/>"
+#~ msgid "Inheritance strategy"
+#~ msgstr "继承策略(Inheritance strategy)"
-#~ msgid "inverse=\"true\""
-#~ msgstr "inverse=\"true\""
+#~ msgid "Polymorphic one-to-one"
+#~ msgstr "多态一对一"
-#~ msgid "<placeholder-1/> (for <placeholder-2/> only)"
-#~ msgstr "<placeholder-1/> (仅对于<placeholder-2/>的情况)"
+#~ msgid "Polymorphic one-to-many"
+#~ msgstr "多态一对多"
+
+#~ msgid "Polymorphic many-to-many"
+#~ msgstr "多态多对多"
+
+#~ msgid "Polymorphic <literal>load()/get()</literal>"
+#~ msgstr "Polymorphic <literal>load()/get()</literal>"
+
+#~ msgid "Polymorphic queries"
+#~ msgstr "多态查询"
+
+#~ msgid "Polymorphic joins"
+#~ msgstr "多态连接(join)"
+
+#~ msgid "<many-to-one>"
+#~ msgstr "<many-to-one>"
+
+#~ msgid "<one-to-one>"
+#~ msgstr "<one-to-one>"
+
+#~ msgid "<one-to-many>"
+#~ msgstr "<one-to-many>"
+
+#~ msgid "<many-to-many>"
+#~ msgstr "<many-to-many>"
+
+#~ msgid "s.get(Payment.class, id)"
+#~ msgstr "s.get(Payment.class, id)"
+
+#~ msgid "from Payment p"
+#~ msgstr "from Payment p"
+
+#~ msgid "supported"
+#~ msgstr "支持"
+
+#~ msgid "<entry>table per subclass</entry>"
+#~ msgstr "<entry>每个子类一张表</entry>"
+
+#~ msgid "<any>"
+#~ msgstr "<any>"
+
+#~ msgid "not supported"
+#~ msgstr "不支持"
+
+#~ msgid "<many-to-any>"
+#~ msgstr "<many-to-any>"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/performance.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/performance.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/performance.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,2484 +1,1440 @@
+# translation of performance.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007, 2009.
+# translation of Collection_Mapping.po to
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: performance\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:26\n"
+"PO-Revision-Date: 2009-12-07 09:35+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: performance.xml:29
#, no-c-format
msgid "Improving performance"
msgstr "提升性能"
#. Tag: title
-#: performance.xml:32
#, no-c-format
msgid "Fetching strategies"
-msgstr "抓取策略(Fetching strategies)"
+msgstr "抓取策略(Fetching strategies)"
#. Tag: para
-#: performance.xml:34
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate uses a <emphasis>fetching strategy</emphasis> 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 <literal>Criteria</literal> query."
-msgstr ""
-"<emphasis>抓取策略(fetching strategy)</emphasis> 是指:当应用程序需要在"
-"(Hibernate实体对象图的)关联关系间进行导航的时候, Hibernate如何获取关联对象"
-"的策略。抓取策略可以在O/R映射的元数据中声明,也可以在特定的HQL 或<literal>条"
-"件查询(Criteria Query)</literal>中重载声明。"
+#, no-c-format
+msgid "Hibernate uses a <emphasis>fetching strategy</emphasis> 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 <literal>Criteria</literal> query."
+msgstr "当应用程序需要在(Hibernate实体对象图的)关联关系间进行导航的时候,Hibernate 使用
<emphasis>抓取策略(fetching strategy)</emphasis> 获取关联对象。抓取策略可以在 O/R
映射的元数据中声明,也可以在特定的 HQL 或<literal>条件查询(Criteria Query)</literal>中重载声明。"
#. Tag: para
-#: performance.xml:41
#, no-c-format
msgid "Hibernate3 defines the following fetching strategies:"
msgstr "Hibernate3 定义了如下几种抓取策略:"
#. Tag: para
-#: performance.xml:47
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Join fetching</emphasis>: Hibernate retrieves the associated
"
-"instance or collection in the same <literal>SELECT</literal>, using an
"
-"<literal>OUTER JOIN</literal>."
-msgstr ""
-"<emphasis>连接抓取(Join fetching)</emphasis> - Hibernate通过 在"
-"<literal>SELECT</literal>语句使用<literal>OUTER
JOIN</literal>(外连接)来 获"
-"得对象的关联实例或者关联集合。"
+#, no-c-format
+msgid "<emphasis>Join fetching</emphasis>: Hibernate retrieves the
associated instance or collection in the same <literal>SELECT</literal>, using
an <literal>OUTER JOIN</literal>."
+msgstr "<emphasis>连接抓取(Join fetching)</emphasis>:Hibernate 通过在
<literal>SELECT</literal> 语句使用 <literal>OUTER
JOIN</literal>(外连接)来获得对象的关联实例或者关联集合。 "
#. Tag: para
-#: performance.xml:54
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Select fetching</emphasis>: a second
<literal>SELECT</literal> is "
-"used to retrieve the associated entity or collection. Unless you explicitly "
-"disable lazy fetching by specifying
<literal>lazy=\"false\"</literal>, this "
-"second select will only be executed when you access the association."
-msgstr ""
-"<emphasis>查询抓取(Select fetching)</emphasis> - 另外发送一条 "
-"<literal>SELECT</literal> 语句抓取当前对象的关联实体或集合。除非你显式的指定"
-"<literal>lazy=\"false\"</literal>禁止 延迟抓取(lazy
fetching),否则只有当你"
-"真正访问关联关系的时候,才会执行第二条select语句。"
+#, no-c-format
+msgid "<emphasis>Select fetching</emphasis>: a second
<literal>SELECT</literal> is used to retrieve the associated entity or
collection. Unless you explicitly disable lazy fetching by specifying
<literal>lazy=\"false\"</literal>, this second select will only be
executed when you access the association."
+msgstr "<emphasis>查询抓取(Select fetching)</emphasis>:另外发送一条
<literal>SELECT</literal> 语句抓取当前对象的关联实体或集合。除非你显式的指定
<literal>lazy=\"false\"</literal> 禁止 延迟抓取(lazy
fetching),否则只有当你真正访问关联关系的时候,才会执行第二条 select 语句。"
#. Tag: para
-#: performance.xml:63
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Subselect fetching</emphasis>: a second
<literal>SELECT</literal> "
-"is used to retrieve the associated collections for all entities retrieved in
"
-"a previous query or fetch. Unless you explicitly disable lazy fetching by "
-"specifying <literal>lazy=\"false\"</literal>, this second
select will only "
-"be executed when you access the association."
-msgstr ""
-"<emphasis>子查询抓取(Subselect fetching)</emphasis> - 另外发送一条"
-"<literal>SELECT</literal> 语句抓取在前面查询到(或者抓取到)的所有实体对象的"
-"关联集合。除非你显式的指定<literal>lazy=\"false\"</literal> 禁止延迟抓取"
-"(lazy fetching),否则只有当你真正访问关联关系的时候,才会执行第二条select语"
-"句。"
+#, no-c-format
+msgid "<emphasis>Subselect fetching</emphasis>: a second
<literal>SELECT</literal> is used to retrieve the associated collections for
all entities retrieved in a previous query or fetch. Unless you explicitly disable lazy
fetching by specifying <literal>lazy=\"false\"</literal>, this
second select will only be executed when you access the association."
+msgstr "<emphasis>子查询抓取(Subselect fetching)</emphasis>:另外发送一条
<literal>SELECT</literal> 语句抓取在前面查询到(或者抓取到)的所有实体对象的关联集合。除非你显式的指定
<literal>lazy=\"false\"</literal> 禁止延迟抓取(lazy
fetching),否则只有当你真正访问关联关系的时候,才会执行第二条 select 语句。"
#. Tag: para
-#: performance.xml:72
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Batch fetching</emphasis>: an optimization strategy for
select "
-"fetching. Hibernate retrieves a batch of entity instances or collections in "
-"a single <literal>SELECT</literal> by specifying a list of primary or
"
-"foreign keys."
-msgstr ""
-"<emphasis>批量抓取(Batch fetching)</emphasis> - 对查询抓取的优化方案, 通过"
-"指定一个主键或外键列表,Hibernate使用单条<literal>SELECT</literal>语句获取一"
-"批对象实例或集合。"
+#, no-c-format
+msgid "<emphasis>Batch fetching</emphasis>: an optimization strategy for
select fetching. Hibernate retrieves a batch of entity instances or collections in a
single <literal>SELECT</literal> by specifying a list of primary or foreign
keys."
+msgstr "<emphasis>批量抓取(Batch
fetching)</emphasis>:对查询抓取的优化方案,通过指定一个主键或外键列表,Hibernate 使用单条
<literal>SELECT</literal> 语句获取一批对象实例或集合。"
#. Tag: para
-#: performance.xml:81
#, no-c-format
msgid "Hibernate also distinguishes between:"
-msgstr "Hibernate会区分下列各种情况:"
+msgstr "Hibernate 会区分下列各种情况:"
#. Tag: para
-#: performance.xml:87
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Immediate fetching</emphasis>: an association, collection or
"
-"attribute is fetched immediately when the owner is loaded."
-msgstr ""
-"<emphasis>Immediate fetching,立即抓取</emphasis> - 当宿主被加载时,关联、集"
-"合或属性被立即抓取。"
+#, no-c-format
+msgid "<emphasis>Immediate fetching</emphasis>: an association,
collection or attribute is fetched immediately when the owner is loaded."
+msgstr "<emphasis>Immediate
fetching,立即抓取</emphasis>:当宿主被加载时,关联、集合或属性被立即抓取。"
#. Tag: para
-#: performance.xml:93
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Lazy collection fetching</emphasis>: a collection is fetched
when "
-"the application invokes an operation upon that collection. This is the "
-"default for collections."
-msgstr ""
-"<emphasis>Lazy collection fetching,延迟集合抓取</emphasis>- 直到应用程序对集"
-"合进行了一次操作时,集合才被抓取。(对集合而言这是默认行为。)"
+#, no-c-format
+msgid "<emphasis>Lazy collection fetching</emphasis>: a collection is
fetched when the application invokes an operation upon that collection. This is the
default for collections."
+msgstr "<emphasis>Lazy collection
fetching,延迟集合抓取</emphasis>:直到应用程序对集合进行了一次操作时,集合才被抓取(对集合而言这是默认行为)。"
#. Tag: para
-#: performance.xml:100
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>\"Extra-lazy\" collection fetching</emphasis>:
individual elements "
-"of the collection are accessed from the database as needed. Hibernate tries "
-"not to fetch the whole collection into memory unless absolutely needed. It "
-"is suitable for large collections."
-msgstr ""
-"<emphasis>\"Extra-lazy\" collection
fetching,\"Extra-lazy\"集合抓取</"
-"emphasis> -对集合类中的每个元素而言,都是直到需要时才去访问数据库。除非绝对必"
-"要,Hibernate不会试图去把整个集合都抓取到内存里来(适用于非常大的集合)。"
+#, no-c-format
+msgid "<emphasis>\"Extra-lazy\" collection
fetching</emphasis>: individual elements of the collection are accessed from the
database as needed. Hibernate tries not to fetch the whole collection into memory unless
absolutely needed. It is suitable for large collections."
+msgstr "<emphasis>\"Extra-lazy\" collection
fetching,\"Extra-lazy\"
集合抓取</emphasis>:对集合类中的每个元素而言,都是直到需要时才去访问数据库。除非绝对必要,Hibernate
不会试图去把整个集合都抓取到内存里来(适用于非常大的集合)。"
#. Tag: para
-#: performance.xml:108
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Proxy fetching</emphasis>: a single-valued association is
fetched "
-"when a method other than the identifier getter is invoked upon the "
-"associated object."
-msgstr ""
-"<emphasis>Proxy fetching,代理抓取</emphasis> - 对返回单值的关联而言,当其某"
-"个方法被调用,而非对其关键字进行get操作时才抓取。"
+#, no-c-format
+msgid "<emphasis>Proxy fetching</emphasis>: a single-valued association
is fetched when a method other than the identifier getter is invoked upon the associated
object."
+msgstr "<emphasis>Proxy
fetching,代理抓取</emphasis>:对返回单值的关联而言,当其某个方法被调用,而非对其关键字进行 get 操作时才抓取。"
#. Tag: para
-#: performance.xml:115
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>\"No-proxy\" fetching</emphasis>: a single-valued
association is "
-"fetched when the instance variable is accessed. Compared to proxy fetching, "
-"this approach is less lazy; the association is fetched even when only the "
-"identifier is accessed. It is also more transparent, since no proxy is "
-"visible to the application. This approach requires buildtime bytecode "
-"instrumentation and is rarely necessary."
-msgstr ""
-"<emphasis>\"No-proxy\" fetching,非代理抓取</emphasis> -
对返回单值的关联而"
-"言,当实例变量被访问的时候进行抓取。与上面的代理抓取相比,这种方法没有那么“延"
-"迟”得厉害(就算只访问标识符,也会导致关联抓取)但是更加透明,因为对应用程序来"
-"说,不再看到proxy。这种方法需要在编译期间进行字节码增强操作,因此很少需要用"
-"到。"
+#, no-c-format
+msgid "<emphasis>\"No-proxy\" fetching</emphasis>: a
single-valued association is fetched when the instance variable is accessed. Compared to
proxy fetching, this approach is less lazy; the association is fetched even when only the
identifier is accessed. It is also more transparent, since no proxy is visible to the
application. This approach requires buildtime bytecode instrumentation and is rarely
necessary."
+msgstr "<emphasis>\"No-proxy\"
fetching,非代理抓取</emphasis>:对返回单值的关联而言,当实例变量被访问的时候进行抓取。与上面的代理抓取相比,这种方法没有那么“延迟”得厉害(就算只访问标识符,也会导致关联抓取)但是更加透明,因为对应用程序来说,不再看到
proxy。这种方法需要在编译期间进行字节码增强操作,因此很少需要用到。"
#. Tag: para
-#: performance.xml:125
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Lazy attribute fetching</emphasis>: an attribute or single
valued "
-"association is fetched when the instance variable is accessed. This approach
"
-"requires buildtime bytecode instrumentation and is rarely necessary."
-msgstr ""
-"<emphasis>Lazy attribute fetching,属性延迟加载</emphasis> - 对属性或返回单值"
-"的关联而言,当其实例变量被访问的时候进行抓取。需要编译期字节码强化,因此这一"
-"方法很少是必要的。"
+#, no-c-format
+msgid "<emphasis>Lazy attribute fetching</emphasis>: an attribute or
single valued association is fetched when the instance variable is accessed. This approach
requires buildtime bytecode instrumentation and is rarely necessary."
+msgstr "<emphasis>Lazy attribute
fetching,属性延迟加载</emphasis>:对属性或返回单值的关联而言,当其实例变量被访问的时候进行抓取。需要编译期字节码强化,因此这一方法很少是必要的。"
#. Tag: para
-#: performance.xml:134
-#, fuzzy, no-c-format
-msgid ""
-"We have two orthogonal notions here: <emphasis>when</emphasis> is the
"
-"association fetched and <emphasis>how</emphasis> is it fetched. It is
"
-"important that you do not confuse them. We use <literal>fetch</literal>
to "
-"tune performance. We can use <literal>lazy</literal> to define a
contract "
-"for what data is always available in any detached instance of a particular "
-"class."
-msgstr ""
-"这里有两个正交的概念:关联<emphasis>何时</emphasis>被抓取,以及被<emphasis>如"
-"何</emphasis>抓取(会采用什么样的SQL语句)。不要混淆它们!我们使用<literal>抓"
-"取</literal>来改善性能。我们使用<literal>延迟</literal>来定义一些契约,对某特"
-"定类的某个脱管的实例,知道有哪些数据是可以使用的。"
+#, no-c-format
+msgid "We have two orthogonal notions here: <emphasis>when</emphasis> is
the association fetched and <emphasis>how</emphasis> is it fetched. It is
important that you do not confuse them. We use <literal>fetch</literal> to
tune performance. We can use <literal>lazy</literal> to define a contract for
what data is always available in any detached instance of a particular class."
+msgstr
"这里有两个正交的概念:关联<emphasis>何时</emphasis>被抓取,以及被<emphasis>如何</emphasis>抓取(会采用什么样的
SQL
语句)。注意不要混淆它们。我们使用<literal>抓取</literal>来改善性能。我们使用<literal>延迟</literal>来定义一些契约,对某特定类的某个脱管的实例,知道有哪些数据是可以使用的。"
#. Tag: title
-#: performance.xml:143
#, no-c-format
msgid "Working with lazy associations"
msgstr "操作延迟加载的关联"
#. Tag: para
-#: performance.xml:145
-#, fuzzy, 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抓取,对返回单值的关联使用延迟代理"
-"抓取。对几乎是所有的应用而言,其绝大多数的关联,这种策略都是有效的。"
+#, 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
抓取,对返回单值的关联使用延迟代理抓取。对几乎是所有的应用而言,其绝大多数的关联,这种策略都是有效的。"
#. Tag: para
-#: performance.xml:151
-#, fuzzy, no-c-format
-msgid ""
-"If you set <literal>hibernate.default_batch_fetch_size</literal>,
Hibernate "
-"will use the batch fetch optimization for lazy fetching. This optimization "
-"can also be enabled at a more granular level."
-msgstr ""
-"<emphasis>注意:</emphasis>假若你设置了<literal>hibernate."
-"default_batch_fetch_size</literal>,Hibernate会对延迟加载采取批量抓取优化措施"
-"(这种优化也可能会在更细化的级别打开)。"
+#, no-c-format
+msgid "If you set <literal>hibernate.default_batch_fetch_size</literal>,
Hibernate will use the batch fetch optimization for lazy fetching. This optimization can
also be enabled at a more granular level."
+msgstr "假若你设置了
<literal>hibernate.default_batch_fetch_size</literal>,Hibernate
会对延迟加载采取批量抓取优化措施(这种优化也可能会在更细化的级别打开)。"
#. Tag: para
-#: performance.xml:158
-#, fuzzy, 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上下文之"
-"外调用延迟集合会导致一次意外。比如:"
-
-#. Tag: programlisting
-#: performance.xml:164
#, no-c-format
-msgid ""
-"<![CDATA[s = sessions.openSession();\n"
-"Transaction tx = s.beginTransaction();\n"
-" \n"
-"User u = (User) s.createQuery(\"from User u where
u.name=:userName\")\n"
-" .setString(\"userName\", userName).uniqueResult();\n"
-"Map permissions = u.getPermissions();\n"
-"\n"
-"tx.commit();\n"
-"s.close();\n"
-"\n"
-"Integer accessLevel = (Integer) permissions.get(\"accounts\"); //
Error!]]>"
-msgstr ""
+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
-#: performance.xml:166
-#, fuzzy, no-c-format
-msgid ""
-"Since the permissions collection was not initialized when the "
-"<literal>Session</literal> was closed, the collection will not be able
to "
-"load its state. <emphasis>Hibernate does not support lazy initialization for
"
-"detached objects</emphasis>. This can be fixed by moving the code that reads
"
-"from the collection to just before the transaction is committed."
-msgstr ""
-"在<literal>Session</literal>关闭后,permessions集合将是未实例化的、不再可用,"
-"因此无法正常载入其状态。 <emphasis>Hibernate对脱管对象不支持延迟实例化</"
-"emphasis>. 这里的修改方法是:将permissions读取数据的代码 移到tx.commit()之"
-"前。"
+#, no-c-format
+msgid "Since the permissions collection was not initialized when the
<literal>Session</literal> was closed, the collection will not be able to load
its state. <emphasis>Hibernate does not support lazy initialization for detached
objects</emphasis>. This can be fixed by moving the code that reads from the
collection to just before the transaction is committed."
+msgstr "在 <literal>Session</literal> 关闭后,permessions
集合将是未实例化的、不再可用,因此无法正常载入其状态。 <emphasis>Hibernate
对脱管对象不支持延迟实例化</emphasis>。这里的修改方法是将 permissions 读取数据的代码移到事务提交之前。"
#. Tag: para
-#: performance.xml:174
-#, fuzzy, no-c-format
-msgid ""
-"Alternatively, you can use a non-lazy collection or association, by "
-"specifying <literal>lazy=\"false\"</literal> for the
association mapping. "
-"However, it is intended that lazy initialization be used for almost all "
-"collections and associations. If you define too many non-lazy associations "
-"in your object model, Hibernate will fetch the entire database into memory "
-"in every transaction."
-msgstr ""
-"除此之外,通过对关联映射指定<literal>lazy=\"false\"</literal>,我们也可以使用"
-"非延迟的集合或关联。但是, 对绝大部分集合来说,更推荐使用延迟方式抓取数据。如"
-"果在你的对象模型中定义了太多的非延迟关联,Hibernate最终几乎需要在每个事务中载"
-"入整个数据库到内存中!"
+#, no-c-format
+msgid "Alternatively, you can use a non-lazy collection or association, by
specifying <literal>lazy=\"false\"</literal> for the association
mapping. However, it is intended that lazy initialization be used for almost all
collections and associations. If you define too many non-lazy associations in your object
model, Hibernate will fetch the entire database into memory in every transaction."
+msgstr "除此之外,通过对关联映射指定
<literal>lazy=\"false\"</literal>,我们也可以使用非延迟的集合或关联。但是,对绝大部分集合来说,更推荐使用延迟方式抓取数据。如果在你的对象模型中定义了太多的非延迟关联,Hibernate
最终几乎需要在每个事务中载入整个数据库到内存中。"
#. Tag: para
-#: performance.xml:183
-#, fuzzy, 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中,具体选择哪种抓取策略的机制是和选择 单值关联或集合"
-"关联相一致的。"
+#, 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 中,具体选择哪种抓取策略的机制是和选择 单值关联或集合关联相一致的。 "
#. Tag: title
-#: performance.xml:194
#, no-c-format
msgid "Tuning fetch strategies"
msgstr "调整抓取策略(Tuning fetch strategies)"
#. Tag: para
-#: performance.xml:196
#, 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: programlisting
-#: performance.xml:201
-#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"permissions\" \n"
-" fetch=\"join\">\n"
-" <key column=\"userId\"/>\n"
-" <one-to-many class=\"Permission\"/>\n"
-"</set]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: performance.xml:203
-#, no-c-format
-msgid "<![CDATA[<many-to-one name=\"mother\" class=\"Cat\"
fetch=\"join\"/>]]>"
-msgstr ""
-
#. Tag: para
-#: performance.xml:205
#, no-c-format
-msgid ""
-"The <literal>fetch</literal> strategy defined in the mapping document
"
-"affects:"
-msgstr ""
-"在映射文档中定义的<literal>抓取</literal>策略将会对以下列表条目产生影响:"
+msgid "The <literal>fetch</literal> strategy defined in the mapping
document affects:"
+msgstr "在映射文档中定义的<literal>抓取</literal>策略将会对以下列表条目产生影响:"
#. Tag: para
-#: performance.xml:211
#, no-c-format
msgid "retrieval via <literal>get()</literal> or
<literal>load()</literal>"
-msgstr
"通过<literal>get()</literal>或<literal>load()</literal>方法取得数据。"
+msgstr "通过 <literal>get()</literal> 或
<literal>load()</literal> 方法取得数据。"
#. Tag: para
-#: performance.xml:216
#, no-c-format
msgid "retrieval that happens implicitly when an association is navigated"
msgstr "只有在关联之间进行导航时,才会隐式的取得数据。"
#. Tag: para
-#: performance.xml:221
#, no-c-format
msgid "<literal>Criteria</literal> queries"
msgstr "条件查询"
#. Tag: para
-#: performance.xml:226
#, no-c-format
msgid "HQL queries if <literal>subselect</literal> fetching is
used"
-msgstr "使用了<literal>subselect</literal>抓取的HQL查询"
+msgstr "使用了 <literal>subselect</literal> 抓取的 HQL 查询"
#. Tag: para
-#: performance.xml:232
-#, fuzzy, 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查询后紧跟着一系列的查询。"
+#, 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 查询后紧跟着一系列的查询。 "
#. Tag: para
-#: performance.xml:238
-#, fuzzy, 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 <literal>left join fetch</literal> in HQL. This tells Hibernate
to "
-"fetch the association eagerly in the first select, using an outer join. In "
-"the <literal>Criteria</literal> query API, you would use "
-"<literal>setFetchMode(FetchMode.JOIN)</literal>."
-msgstr ""
-"通常情况下,我们并不使用映射文档进行抓取策略的定制。更多的是,保持其默认值,"
-"然后在特定的事务中, 使用HQL的<literal>左连接抓取(left join fetch)</"
-"literal> 对其进行重载。这将通知 Hibernate在第一次查询中使用外部关联(outer "
-"join),直接得到其关联数据。 在<literal>条件查询</literal> API中,应该调用 "
-"<literal>setFetchMode(FetchMode.JOIN)</literal>语句。"
+#, 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
<literal>left join fetch</literal> in HQL. This tells Hibernate to fetch the
association eagerly in the first select, using an outer join. In the
<literal>Criteria</literal> query API, you would use
<literal>setFetchMode(FetchMode.JOIN)</literal>."
+msgstr "通常情况下,我们并不使用映射文档进行抓取策略的定制。更多的是,保持其默认值,然后在特定的事务中, 使用 HQL
的<literal>左连接抓取(left join fetch)</literal> 对其进行重载。这将通知
Hibernate在第一次查询中使用外部关联(outer join),直接得到其关联数据。在<literal>条件查询</literal> API
中,应该调用 <literal>setFetchMode(FetchMode.JOIN)</literal>语句。 "
#. Tag: para
-#: performance.xml:247
-#, fuzzy, no-c-format
-msgid ""
-"If you want to change the fetching strategy used by
<literal>get()</literal> "
-"or <literal>load()</literal>, you can use a
<literal>Criteria</literal> "
-"query. For example:"
-msgstr ""
-"也许你喜欢仅仅通过条件查询,就可以改变<literal>get()</literal> 或 "
-"<literal>load()</literal>语句中的数据抓取策略。例如:"
-
-#. Tag: programlisting
-#: performance.xml:253
#, no-c-format
-msgid ""
-"<![CDATA[User user = (User) session.createCriteria(User.class)\n"
-" .setFetchMode(\"permissions\", FetchMode.JOIN)\n"
-" .add( Restrictions.idEq(userId) )\n"
-" .uniqueResult();]]>"
-msgstr ""
+msgid "If you want to change the fetching strategy used by
<literal>get()</literal> or <literal>load()</literal>, you can use
a <literal>Criteria</literal> query. For example:"
+msgstr "也许你喜欢仅仅通过条件查询,就可以改变 <literal>get()</literal> 或
<literal>load()</literal> 语句中的数据抓取策略。例如: "
#. Tag: para
-#: performance.xml:255
-#, fuzzy, no-c-format
-msgid ""
-"This is Hibernate's equivalent of what some ORM solutions call a \"fetch
plan"
-"\"."
-msgstr ""
-"(这就是其他ORM解决方案的“抓取计划(fetch plan)”在Hibernate中的等价物。)"
+#, no-c-format
+msgid "This is Hibernate's equivalent of what some ORM solutions call a
\"fetch plan\"."
+msgstr "这就是其他 ORM 解决方案的“抓取计划(fetch plan)”在 Hibernate 中的等价物。"
#. Tag: para
-#: performance.xml:259
-#, fuzzy, no-c-format
-msgid ""
-"A completely different approach to problems with N+1 selects is to use the "
-"second-level cache."
-msgstr "截然不同的一种避免N+1次查询的方法是,使用二级缓存。"
+#, no-c-format
+msgid "A completely different approach to problems with N+1 selects is to use the
second-level cache."
+msgstr "截然不同的一种避免 N+1 次查询的方法是,使用二级缓存。 "
#. Tag: title
-#: performance.xml:267
#, no-c-format
msgid "Single-ended association proxies"
msgstr "单端关联代理(Single-ended association proxies)"
#. Tag: para
-#: performance.xml:269
-#, fuzzy, 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库), 为持久对象实现了延迟载入代理。"
+#, 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 库), 为持久对象实现了延迟载入代理。 "
#. Tag: para
-#: performance.xml:277
-#, fuzzy, no-c-format
-msgid ""
-"At startup, Hibernate3 generates proxies by default for all persistent "
-"classes and uses them to enable lazy fetching of
<literal>many-to-one</"
-"literal> and <literal>one-to-one</literal> associations."
-msgstr ""
-"默认的,Hibernate3将会为所有的持久对象产生代理(在启动阶段),然后使用他们实"
-"现
<literal>多对一(many-to-one)</literal>关联和<literal>一对一(one-to-"
-"one)</literal> 关联的延迟抓取。"
+#, no-c-format
+msgid "At startup, Hibernate3 generates proxies by default for all persistent
classes and uses them to enable lazy fetching of
<literal>many-to-one</literal> and <literal>one-to-one</literal>
associations."
+msgstr "默认的,Hibernate3 将会为所有的持久对象产生代理(在启动阶段),然后使用他们实现
<literal>多对一(many-to-one)</literal>关联和<literal>一对一(one-to-one)</literal>
关联的延迟抓取。 "
#. Tag: para
-#: performance.xml:283
-#, fuzzy, no-c-format
-msgid ""
-"The mapping file may declare an interface to use as the proxy interface for "
-"that class, with the <literal>proxy</literal> attribute. By default,
"
-"Hibernate uses a subclass of the class. <emphasis>The proxied class must
"
-"implement a default constructor with at least package visibility. This "
-"constructor is recommended for all persistent classes</emphasis>."
-msgstr ""
-"在映射文件中,可以通过设置<literal>proxy</literal>属性为目标class声明一个接口"
-"供代理接口使用。 默认的,Hibernate将会使用该类的一个子类。 <emphasis>注意:被"
-"代理的类必须实现一个至少包可见的默认构造函数,我们建议所有的持久类都应拥有这"
-"样的构造函数</emphasis>"
+#, no-c-format
+msgid "The mapping file may declare an interface to use as the proxy interface for
that class, with the <literal>proxy</literal> attribute. By default, Hibernate
uses a subclass of the class. <emphasis>The proxied class must implement a default
constructor with at least package visibility. This constructor is recommended for all
persistent classes</emphasis>."
+msgstr "在映射文件中,可以通过设置 <literal>proxy</literal> 属性为目标 class
声明一个接口供代理接口使用。 默认的,Hibernate
将会使用该类的一个子类。<emphasis>注意:被代理的类必须实现一个至少包可见的默认构造函数,我们建议所有的持久类都应拥有这样的构造函数。</emphasis>"
#. Tag: para
-#: performance.xml:290
-#, fuzzy, no-c-format
-msgid ""
-"There are potential problems to note when extending this approach to "
-"polymorphic classes.For example:"
-msgstr "在如此方式定义一个多态类的时候,有许多值得注意的常见性的问题,例如:"
-
-#. Tag: programlisting
-#: performance.xml:294
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Cat\" proxy=\"Cat\">\n"
-" ......\n"
-" <subclass name=\"DomesticCat\">\n"
-" .....\n"
-" </subclass>\n"
-"</class>]]>"
-msgstr ""
+msgid "There are potential problems to note when extending this approach to
polymorphic classes.For example:"
+msgstr "在如此方式定义一个多态类的时候,有许多值得注意的常见性的问题,例如: "
#. Tag: para
-#: performance.xml:296
#, no-c-format
-msgid ""
-"Firstly, instances of <literal>Cat</literal> will never be castable to
"
-"<literal>DomesticCat</literal>, even if the underlying instance is an
"
-"instance of <literal>DomesticCat</literal>:"
-msgstr ""
-"首先,<literal>Cat</literal>实例永远不可以被强制转换为<literal>DomesticCat</"
-"literal>, 即使它本身就是<literal>DomesticCat</literal>实例。"
+msgid "Firstly, instances of <literal>Cat</literal> will never be
castable to <literal>DomesticCat</literal>, even if the underlying instance is
an instance of <literal>DomesticCat</literal>:"
+msgstr "首先,<literal>Cat</literal> 实例永远不可以被强制转换为
<literal>DomesticCat</literal>,即使它本身就是
<literal>DomesticCat</literal> 实例。"
-#. Tag: programlisting
-#: performance.xml:302
-#, no-c-format
-msgid ""
-"<![CDATA[Cat cat = (Cat) session.load(Cat.class, id); // instantiate a "
-"proxy (does not hit the db)\n"
-"if ( cat.isDomesticCat() ) { // hit the db to initialize "
-"the proxy\n"
-" DomesticCat dc = (DomesticCat) cat; // Error!\n"
-" ....\n"
-"}]]>"
-msgstr ""
-
#. Tag: para
-#: performance.xml:304
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Secondly, it is possible to break proxy
<literal>==</literal>:"
-msgstr "其次,代理的“<literal>==</literal>”可能不再成立。"
+msgstr "其次,代理的“<literal>==</literal>”可能不再成立。 "
-#. Tag: programlisting
-#: performance.xml:308
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[Cat cat = (Cat) session.load(Cat.class, id); // "
-"instantiate a Cat proxy\n"
-"DomesticCat dc = \n"
-" (DomesticCat) session.load(DomesticCat.class, id); // acquire new "
-"DomesticCat proxy!\n"
-"System.out.println(cat==dc); // false]]>"
-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
-#: performance.xml:310
#, 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 "Third, you cannot use a CGLIB proxy for a
<literal>final</literal> class or a class with any
<literal>final</literal> methods."
+msgstr "第三,你不能对 <literal>final</literal> 类或具有
<literal>final</literal> 方法的类使用 CGLIB 代理。"
-#. Tag: programlisting
-#: performance.xml:315
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[cat.setWeight(11.0); // hit the db to initialize the proxy\n"
-"System.out.println( dc.getWeight() ); // 11.0]]>"
-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
-#: performance.xml:317
-#, fuzzy, no-c-format
-msgid ""
-"Third, you cannot use a CGLIB proxy for a <literal>final</literal>
class or "
-"a class with any <literal>final</literal> methods."
-msgstr "第三,你不能对“final类”或“具有final方法的类”使用CGLIB代理。"
-
-#. Tag: para
-#: performance.xml:322
-#, fuzzy, 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 ""
-"最后,如果你的持久化对象在实例化时需要某些资源(例如,在实例化方法、默认构造"
-"方法中), 那么代理对象也同样需要使用这些资源。实际上,代理类是持久化类的子"
-"类。"
-
-#. Tag: para
-#: performance.xml:328
-#, fuzzy, 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
<literal>CatImpl</"
-"literal> implements the interface <literal>Cat</literal> and "
-"<literal>DomesticCatImpl</literal> implements the interface "
-"<literal>DomesticCat</literal>. For example:"
-msgstr ""
-"这些问题都源于Java的单根继承模型的天生限制。如果你希望避免这些问题,那么你的"
-"每个持久化类必须实现一个接口, 在此接口中已经声明了其业务方法。然后,你需要在"
-"映射文档中再指定这些接口。例如:"
-
-#. Tag: programlisting
-#: performance.xml:336
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"CatImpl\"
proxy=\"Cat\">\n"
-" ......\n"
-" <subclass name=\"DomesticCatImpl\"
proxy=\"DomesticCat\">\n"
-" .....\n"
-" </subclass>\n"
-"</class>]]>"
-msgstr ""
+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 <literal>CatImpl</literal> implements the interface
<literal>Cat</literal> and <literal>DomesticCatImpl</literal>
implements the interface <literal>DomesticCat</literal>. For example:"
+msgstr "这些问题都源于 Java 的单根继承模型的天生限制。如果你希望避免这些问题,那么你的每个持久化类必须实现一个接口,
在此接口中已经声明了其业务方法。然后,你需要在映射文档中再指定这些接口,如 <literal>CatImpl</literal> 实现
<literal>Cat</literal> 而 <literal>DomesticCatImpl</literal> 实现
<literal>DomesticCat</literal> 接口。例如:"
#. Tag: para
-#: performance.xml:338
-#, fuzzy, no-c-format
-msgid ""
-"Then proxies for instances of <literal>Cat</literal> and "
-"<literal>DomesticCat</literal> can be returned by
<literal>load()</literal> "
-"or <literal>iterate()</literal>."
-msgstr ""
-"首先,<literal>Cat</literal>实例永远不可以被强制转换为<literal>DomesticCat</"
-"literal>, 即使它本身就是<literal>DomesticCat</literal>实例。"
-
-#. Tag: programlisting
-#: performance.xml:343
#, no-c-format
-msgid ""
-"<![CDATA[Cat cat = (Cat) session.load(CatImpl.class, catid);\n"
-"Iterator iter = session.createQuery(\"from CatImpl as cat where cat."
-"name='fritz'\").iterate();\n"
-"Cat fritz = (Cat) iter.next();]]>"
-msgstr ""
+msgid "Then proxies for instances of <literal>Cat</literal> and
<literal>DomesticCat</literal> can be returned by
<literal>load()</literal> or <literal>iterate()</literal>."
+msgstr "然后,<literal>load()</literal> 和
<literal>iterate()</literal> 永远也不会返回 <literal>Cat</literal> 和
<literal>DomesticCat</literal> 实例的代理。"
#. Tag: title
-#: performance.xml:346
#, no-c-format
msgid "Note"
-msgstr ""
+msgstr "注意"
#. Tag: para
-#: performance.xml:347
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>list()</literal> does not usually return proxies."
-msgstr "条件查询"
+msgstr "<literal>list()</literal> 通常不返回代理。"
#. Tag: para
-#: performance.xml:352
#, no-c-format
-msgid ""
-"Relationships are also lazily initialized. This means you must declare any "
-"properties to be of type <literal>Cat</literal>, not
<literal>CatImpl</"
-"literal>."
-msgstr ""
-"这里,对象之间的关系也将被延迟载入。这就意味着,你应该将属性声明为"
-"<literal>Cat</literal>,而不是<literal>CatImpl</literal>。"
+msgid "Relationships are also lazily initialized. This means you must declare any
properties to be of type <literal>Cat</literal>, not
<literal>CatImpl</literal>."
+msgstr "这里,对象之间的关系也将被延迟载入。这就意味着,你应该将属性声明为 <literal>Cat</literal>,而不是
<literal>CatImpl</literal>。"
#. Tag: para
-#: performance.xml:357
-#, fuzzy, no-c-format
-msgid ""
-"Certain operations do <emphasis>not</emphasis> require proxy
initialization:"
-msgstr "但是,在有些方法中是<emphasis>不需要</emphasis>使用代理的。例如:"
+#, no-c-format
+msgid "Certain operations do <emphasis>not</emphasis> require proxy
initialization:"
+msgstr "有些方法中是<emphasis>不</emphasis>需要代理初始化的:"
#. Tag: para
-#: performance.xml:363
-#, fuzzy, no-c-format
-msgid ""
-"<literal>equals()</literal>: if the persistent class does not override
"
-"<literal>equals()</literal>"
-msgstr ""
-"<literal>equals()</literal>方法,如果持久类没有重载<literal>equals()</"
-"literal>方法。"
+#, no-c-format
+msgid "<literal>equals()</literal>: if the persistent class does not
override <literal>equals()</literal>"
+msgstr "<literal>equals()</literal> 方法,如果持久类没有重载
<literal>equals()</literal> 方法。"
#. Tag: para
-#: performance.xml:369
-#, fuzzy, no-c-format
-msgid ""
-"<literal>hashCode()</literal>: if the persistent class does not
override "
-"<literal>hashCode()</literal>"
-msgstr ""
-"<literal>hashCode()</literal>方法,如果持久类没有重载<literal>hashCode()</"
-"literal>方法。"
+#, no-c-format
+msgid "<literal>hashCode()</literal>: if the persistent class does not
override <literal>hashCode()</literal>"
+msgstr "<literal>hashCode()</literal>:如果持久类没有重载
<literal>hashCode()</literal> 方法。"
#. Tag: para
-#: performance.xml:375
#, no-c-format
msgid "The identifier getter method"
-msgstr "标志符的getter方法。"
+msgstr "标志符的 getter 方法。"
#. Tag: para
-#: performance.xml:381
#, no-c-format
-msgid ""
-"Hibernate will detect persistent classes that override
<literal>equals()</"
-"literal> or <literal>hashCode()</literal>."
-msgstr ""
-"Hibernate将会识别出那些重载了<literal>equals()</literal>、或<literal>hashCode"
-"()</literal>方法的持久化类。"
+msgid "Hibernate will detect persistent classes that override
<literal>equals()</literal> or
<literal>hashCode()</literal>."
+msgstr "Hibernate 将会识别出那些重载了 <literal>equals()</literal>、或
<literal>hashCode()</literal> 方法的持久化类。"
#. Tag: para
-#: performance.xml:386
-#, fuzzy, no-c-format
-msgid ""
-"By choosing <literal>lazy=\"no-proxy\"</literal> instead of
the default "
-"<literal>lazy=\"proxy\"</literal>, you can avoid problems
associated with "
-"typecasting. However, buildtime bytecode instrumentation is required, and "
-"all operations will result in immediate proxy initialization."
-msgstr ""
-"若选择<literal>lazy=\"no-proxy\"</literal>而非默认的<literal>lazy=\"proxy\"</"
-"literal>,我们可以避免类型转换带来的问题。然而,这样我们就需要编译期字节码增"
-"强,并且所有的操作都会导致立刻进行代理初始化。"
+#, no-c-format
+msgid "By choosing <literal>lazy=\"no-proxy\"</literal>
instead of the default <literal>lazy=\"proxy\"</literal>, you can
avoid problems associated with typecasting. However, buildtime bytecode instrumentation is
required, and all operations will result in immediate proxy initialization."
+msgstr "若选择 <literal>lazy=\"no-proxy\"</literal> 而非默认的
<literal>lazy=\"proxy\"</literal>,我们可以避免类型转换带来的问题。然而,这样我们就需要编译期字节码增强,并且所有的操作都会导致立刻进行代理初始化。
"
#. Tag: title
-#: performance.xml:396
#, no-c-format
msgid "Initializing collections and proxies"
msgstr "实例化集合和代理(Initializing collections and proxies)"
#. Tag: para
-#: performance.xml:398
-#, fuzzy, no-c-format
-msgid ""
-"A <literal>LazyInitializationException</literal> will be thrown by
Hibernate "
-"if an uninitialized collection or proxy is accessed outside of the scope of "
-"the <literal>Session</literal>, i.e., when the entity owning the
collection "
-"or having the reference to the proxy is in the detached state."
-msgstr ""
-"在<literal>Session</literal>范围之外访问未初始化的集合或代理,Hibernate将会抛"
-"出<literal>LazyInitializationException</literal>异常。 也就是说,在分离状态"
-"下,访问一个实体所拥有的集合,或者访问其指向代理的属性时,会引发此异常。"
+#, no-c-format
+msgid "A <literal>LazyInitializationException</literal> will be thrown
by Hibernate if an uninitialized collection or proxy is accessed outside of the scope of
the <literal>Session</literal>, i.e., when the entity owning the collection or
having the reference to the proxy is in the detached state."
+msgstr "在 <literal>Session</literal> 范围之外访问未初始化的集合或代理,Hibernate 将会抛出
<literal>LazyInitializationException</literal>
异常。也就是说,在分离状态下,访问一个实体所拥有的集合,或者访问其指向代理的属性时,会引发此异常。 "
#. Tag: para
-#: performance.xml:404
-#, fuzzy, no-c-format
-msgid ""
-"Sometimes a proxy or collection needs to be initialized before closing the "
-"<literal>Session</literal>. You can force initialization by calling
"
-"<literal>cat.getSex()</literal> or
<literal>cat.getKittens().size()</"
-"literal>, for example. However, this can be confusing to readers of the code
"
-"and it is not convenient for generic code."
-msgstr ""
-"有时候我们需要保证某个代理或者集合在Session关闭前就已经被初始化了。 当然,我"
-"们可以通过强行调用<literal>cat.getSex()</literal>或者<literal>cat.getKittens"
-"().size()</literal>之类的方法来确保这一点。 但是这样的程序会造成读者的疑惑,"
-"也不符合通常的代码规范。"
+#, no-c-format
+msgid "Sometimes a proxy or collection needs to be initialized before closing the
<literal>Session</literal>. You can force initialization by calling
<literal>cat.getSex()</literal> or
<literal>cat.getKittens().size()</literal>, for example. However, this can be
confusing to readers of the code and it is not convenient for generic code."
+msgstr "有时候我们需要保证某个代理或者集合在 Session 关闭前就已经被初始化了。当然,我们可以通过强行调用
<literal>cat.getSex()</literal> 或者
<literal>cat.getKittens().size()</literal> 之类的方法来确保这一点。
但是这样的程序会造成读者的疑惑,也不符合通常的代码规范。 "
#. Tag: para
-#: performance.xml:411
-#, fuzzy, no-c-format
-msgid ""
-"The static methods <literal>Hibernate.initialize()</literal> and
"
-"<literal>Hibernate.isInitialized()</literal>, provide the application
with a "
-"convenient way of working with lazily initialized collections or proxies. "
-"<literal>Hibernate.initialize(cat)</literal> will force the
initialization "
-"of a proxy, <literal>cat</literal>, as long as its
<literal>Session</"
-"literal> is still open. <literal>Hibernate.initialize( cat.getKittens()
)</"
-"literal> has a similar effect for the collection of kittens."
-msgstr ""
-"静态方法<literal>Hibernate.initialized()</literal> 为你的应用程序提供了一个便"
-"捷的途径来延迟加载集合或代理。 只要它的Session处于open状态,"
-"<literal>Hibernate.initialize(cat)</literal> 将会为cat强制对代理实例化。 同"
-"样,<literal>Hibernate.initialize( cat.getKittens() )</literal>
对kittens的集"
-"合具有同样的功能。"
+#, no-c-format
+msgid "The static methods <literal>Hibernate.initialize()</literal> and
<literal>Hibernate.isInitialized()</literal>, provide the application with a
convenient way of working with lazily initialized collections or proxies.
<literal>Hibernate.initialize(cat)</literal> will force the initialization of
a proxy, <literal>cat</literal>, as long as its
<literal>Session</literal> is still open. <literal>Hibernate.initialize(
cat.getKittens() )</literal> has a similar effect for the collection of
kittens."
+msgstr "静态方法 <literal>Hibernate.initialized()</literal>
为你的应用程序提供了一个便捷的途径来延迟加载集合或代理。 只要它的 Session 处于 open
状态,<literal>Hibernate.initialize(cat)</literal> 将会为 cat
强制对代理实例化。同样,<literal>Hibernate.initialize(cat.getKittens())</literal> 对
kittens 的集合具有同样的功能。 "
#. Tag: para
-#: performance.xml:420
-#, fuzzy, no-c-format
-msgid ""
-"Another option is to keep the <literal>Session</literal> 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 "
-"<literal>Session</literal> is open when a collection is initialized.
There "
-"are two basic ways to deal with this issue:"
-msgstr ""
-"还有另外一种选择,就是保持<literal>Session</literal>一直处于open状态,直到所"
-"有需要的集合或代理都被载入。 在某些应用架构中,特别是对于那些使用Hibernate进"
-"行数据访问的代码,以及那些在不同应用层和不同物理进程中使用Hibernate的代码。 "
-"在集合实例化时,如何保证<literal>Session</literal>处于open状态经常会是一个问"
-"题。有两种方法可以解决此问题:"
+#, no-c-format
+msgid "Another option is to keep the <literal>Session</literal> 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 <literal>Session</literal> is open when a
collection is initialized. There are two basic ways to deal with this issue:"
+msgstr "还有另外一种选择,就是保持 <literal>Session</literal> 一直处于 open
状态,直到所有需要的集合或代理都被载入。 在某些应用架构中,特别是对于那些使用 Hibernate 进行数据访问的代码,以及那些在不同应用层和不同物理进程中使用 Hibernate
的代码。 在集合实例化时,如何保证 <literal>Session</literal> 处于 open 状态经常会是一个问题。有两种方法可以解决此问题:
"
#. Tag: para
-#: performance.xml:431
-#, fuzzy, no-c-format
-msgid ""
-"In a web-based application, a servlet filter can be used to close the "
-"<literal>Session</literal> only at the end of a user request, once the
"
-"rendering of the view is complete (the <emphasis>Open Session in
View</"
-"emphasis> pattern). Of course, this places heavy demands on the correctness
"
-"of the exception handling of your application infrastructure. It is vitally "
-"important that the <literal>Session</literal> is closed and the
transaction "
-"ended before returning to the user, even when an exception occurs during "
-"rendering of the view. See the Hibernate Wiki for examples of this \"Open
"
-"Session in View\" pattern."
-msgstr ""
-"在一个基于Web的应用中,可以利用servlet过滤器(filter),在用户请求(request)"
-"结束、页面生成 结束时关闭<literal>Session</literal>(这里使用了<emphasis>在展"
-"示层保持打开Session模式(Open Session in View)</emphasis>), 当然,这将依赖"
-"于应用框架中异常需要被正确的处理。在返回界面给用户之前,乃至在生成界面过程中"
-"发生异常的情况下, 正确关闭<literal>Session</literal>和结束事务将是非常重要"
-"的, 请参见Hibernate wiki上的\"Open Session in View\"模式,你可以找到示例。"
+#, no-c-format
+msgid "In a web-based application, a servlet filter can be used to close the
<literal>Session</literal> only at the end of a user request, once the
rendering of the view is complete (the <emphasis>Open Session in
View</emphasis> pattern). Of course, this places heavy demands on the correctness of
the exception handling of your application infrastructure. It is vitally important that
the <literal>Session</literal> is closed and the transaction ended before
returning to the user, even when an exception occurs during rendering of the view. See the
Hibernate Wiki for examples of this \"Open Session in View\" pattern."
+msgstr "在一个基于 Web 的应用中,可以利用 servlet 过滤器(filter),在用户请求(request)结束、页面生成 结束时关闭
<literal>Session</literal>(这里使用了<emphasis>在展示层保持打开 Session 模式(Open
Session in
View)</emphasis>),当然,这将依赖于应用框架中异常需要被正确的处理。在返回界面给用户之前,乃至在生成界面过程中发生异常的情况下,正确关闭
<literal>Session</literal> 和结束事务将是非常重要的, 请参见 Hibernate wiki 上的 \"Open
Session in View\" 模式,你可以找到示例。 "
#. Tag: para
-#: performance.xml:444
-#, fuzzy, 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
<literal>Hibernate."
-"initialize()</literal> for each collection that will be needed in the web
"
-"tier (this call must occur before the session is closed) or retrieves the "
-"collection eagerly using a Hibernate query with a
<literal>FETCH</literal> "
-"clause or a <literal>FetchMode.JOIN</literal> in
<literal>Criteria</"
-"literal>. This is usually easier if you adopt the
<emphasis>Command</"
-"emphasis> pattern instead of a <emphasis>Session
Facade</emphasis>."
-msgstr ""
-"在一个拥有单独业务层的应用中,业务层必须在返回之前,为web层“准备”好其所需的数"
-"据集合。这就意味着 业务层应该载入所有表现层/web层所需的数据,并将这些已实例化"
-"完毕的数据返回。通常,应用程序应该 为web层所需的每个集合调用"
-"<literal>Hibernate.initialize()</literal>(这个调用必须发生咱session关闭之"
-"前);
或者使用带有<literal>FETCH</literal>从句,或<literal>FetchMode.JOIN</"
-"literal>的Hibernate查询, 事先取得所有的数据集合。如果你在应用中使用了"
-"<emphasis>Command</emphasis>模式,代替<emphasis>Session
Facade</emphasis> , "
-"那么这项任务将会变得简单的多。"
+#, 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 <literal>Hibernate.initialize()</literal> for
each collection that will be needed in the web tier (this call must occur before the
session is closed) or retrieves the collection eagerly using a Hibernate query with a
<literal>FETCH</literal> clause or a
<literal>FetchMode.JOIN</literal> in <literal>Criteria</literal>.
This is usually easier if you adopt the <emphasis>Command</emphasis> pattern
instead of a <emphasis>Session Facade</emphasis>."
+msgstr "在一个拥有单独业务层的应用中,业务层必须在返回之前,为 web 层“准备”好其所需的数据集合。这就意味着 业务层应该载入所有表现层/web
层所需的数据,并将这些已实例化完毕的数据返回。通常,应用程序应该为 web 层所需的每个集合调用
<literal>Hibernate.initialize()</literal>(这个调用必须发生咱 session 关闭之前);或者使用带有
<literal>FETCH</literal> 从句,或 <literal>FetchMode.JOIN</literal> 的
Hibernate 查询,事先取得所有的数据集合。如果你在应用中使用了 <emphasis>Command</emphasis> 模式,代替
<emphasis>Session Facade</emphasis>,那么这项任务将会变得简单的多。 "
#. Tag: para
-#: performance.xml:459
-#, fuzzy, no-c-format
-msgid ""
-"You can also attach a previously loaded object to a new
<literal>Session</"
-"literal> with <literal>merge()</literal> or
<literal>lock()</literal> before "
-"accessing uninitialized collections or other proxies. Hibernate does not, "
-"and certainly <emphasis>should</emphasis> not, do this automatically
since "
-"it would introduce impromptu transaction semantics."
-msgstr ""
-"你也可以通过<literal>merge()</literal>或<literal>lock()</literal>方法,在访问"
-"未实例化的集合(或代理)之前, 为先前载入的对象绑定一个新的<literal>Session</"
-"literal>。 显然,Hibernate将不会,也不<emphasis>应该</emphasis>自动完成这些任"
-"务,因为这将引入一个特殊的事务语义。"
+#, no-c-format
+msgid "You can also attach a previously loaded object to a new
<literal>Session</literal> with <literal>merge()</literal> or
<literal>lock()</literal> before accessing uninitialized collections or other
proxies. Hibernate does not, and certainly <emphasis>should</emphasis> not, do
this automatically since it would introduce impromptu transaction semantics."
+msgstr "你也可以通过 <literal>merge()</literal> 或
<literal>lock()</literal> 方法,在访问未实例化的集合(或代理)之前,为先前载入的对象绑定一个新的
<literal>Session</literal>。显然,Hibernate
将不会,也不<emphasis>应该</emphasis>自动完成这些任务,因为这将引入一个特殊的事务语义。 "
#. Tag: para
-#: performance.xml:469
-#, fuzzy, 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 ""
-"有时候,你并不需要完全实例化整个大的集合,仅需要了解它的部分信息(例如其大"
-"小)、或者集合的部分内容。"
+#, 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 "有时候,你并不需要完全实例化整个大的集合,仅需要了解它的部分信息(例如其大小)、或者集合的部分内容。 "
#. Tag: para
-#: performance.xml:474
#, 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: programlisting
-#: performance.xml:478
-#, no-c-format
-msgid ""
-"<![CDATA[( (Integer) s.createFilter( collection, \"select count(*)\"
).list"
-"().get(0) ).intValue()]]>"
-msgstr ""
-
#. Tag: para
-#: performance.xml:480
#, no-c-format
-msgid ""
-"The <literal>createFilter()</literal> method is also used to
efficiently "
-"retrieve subsets of a collection without needing to initialize the whole "
-"collection:"
-msgstr ""
-"这里的<literal>createFilter()</literal>方法也可以被用来有效的抓取集合的部分内"
-"容,而无需实例化整个集合:"
+msgid "The <literal>createFilter()</literal> method is also used to
efficiently retrieve subsets of a collection without needing to initialize the whole
collection:"
+msgstr "这里的 <literal>createFilter()</literal>
方法也可以被用来有效的抓取集合的部分内容,而无需实例化整个集合:"
-#. Tag: programlisting
-#: performance.xml:485
-#, no-c-format
-msgid ""
-"<![CDATA[s.createFilter( lazyCollection,
\"\").setFirstResult(0)."
-"setMaxResults(10).list();]]>"
-msgstr ""
-
#. Tag: title
-#: performance.xml:490
#, no-c-format
msgid "Using batch fetching"
msgstr "使用批量抓取(Using batch fetching)"
#. Tag: para
-#: performance.xml:492
-#, fuzzy, 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将不载入其他未实例化的代理。 批量抓取是延迟查询抓取的优化方案,"
-"你可以在两种批量抓取方案之间进行选择:在类级别和集合级别。"
+#, 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
将不载入其他未实例化的代理。批量抓取是延迟查询抓取的优化方案,你可以在两种批量抓取方案之间进行选择:在类级别和集合级别。 "
#. Tag: para
-#: performance.xml:498
-#, fuzzy, no-c-format
-msgid ""
-"Batch fetching for classes/entities is easier to understand. Consider the "
-"following example: at runtime you have 25 <literal>Cat</literal>
instances "
-"loaded in a <literal>Session</literal>, and each
<literal>Cat</literal> has "
-"a reference to its <literal>owner</literal>, a
<literal>Person</literal>. "
-"The <literal>Person</literal> class is mapped with a proxy,
<literal>lazy="
-"\"true\"</literal>. If you now iterate through all cats and call
"
-"<literal>getOwner()</literal> on each, Hibernate will, by default,
execute "
-"25 <literal>SELECT</literal> statements to retrieve the proxied owners.
You "
-"can tune this behavior by specifying a <literal>batch-size</literal> in
the "
-"mapping of <literal>Person</literal>:"
-msgstr ""
-"类/实体级别的批量抓取很容易理解。假设你在运行时将需要面对下面的问题:你在一个"
-"<literal>Session</literal>中载入了25个
<literal>Cat</literal>实例,每个"
-"<literal>Cat</literal>实例都拥有一个引用成员<literal>owner</literal>,
其指向"
-"<literal>Person</literal>,而<literal>Person</literal>类是代理,同时"
-"<literal>lazy=\"true\"</literal>。
如果你必须遍历整个cats集合,对每个元素调用"
-"<literal>getOwner()</literal>方法,Hibernate将会默认的执行25次"
-"<literal>SELECT</literal>查询, 得到其owner的代理对象。这时,你可以通过在映射"
-"文件的<literal>Person</literal>属性,显式声明<literal>batch-size</literal>,"
-"改变其行为:"
-
-#. Tag: programlisting
-#: performance.xml:508
#, no-c-format
-msgid "<![CDATA[<class name=\"Person\"
batch-size=\"10\">...</class>]]>"
-msgstr ""
+msgid "Batch fetching for classes/entities is easier to understand. Consider the
following example: at runtime you have 25 <literal>Cat</literal> instances
loaded in a <literal>Session</literal>, and each
<literal>Cat</literal> has a reference to its
<literal>owner</literal>, a <literal>Person</literal>. The
<literal>Person</literal> class is mapped with a proxy,
<literal>lazy=\"true\"</literal>. If you now iterate through all
cats and call <literal>getOwner()</literal> on each, Hibernate will, by
default, execute 25 <literal>SELECT</literal> statements to retrieve the
proxied owners. You can tune this behavior by specifying a
<literal>batch-size</literal> in the mapping of
<literal>Person</literal>:"
+msgstr "类/实体级别的批量抓取很容易理解。假设你在运行时将需要面对下面的问题:你在一个
<literal>Session</literal> 中载入了 25 个 <literal>Cat</literal> 实例,每个
<literal>Cat</literal> 实例都拥有一个引用成员 <literal>owner</literal>,其指向
<literal>Person</literal>,而 <literal>Person</literal> 类是代理,同时
<literal>lazy=\"true\"</literal>。如果你必须遍历整个 cats 集合,对每个元素调用
<literal>getOwner()</literal> 方法,Hibernate 将会默认的执行 25 次
<literal>SELECT</literal> 查询, 得到其 owner 的代理对象。这时,你可以通过在映射文件的
<literal>Person</literal> 属性,显式声明
<literal>batch-size</literal>,改变其行为: "
#. Tag: para
-#: performance.xml:510
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate will now execute only three queries: the pattern is 10, 10, 5."
-msgstr "随之,Hibernate将只需要执行三次查询,分别为10、10、 5。"
+#, no-c-format
+msgid "Hibernate will now execute only three queries: the pattern is 10, 10,
5."
+msgstr "随之,Hibernate 将只需要执行三次查询,分别为 10、10、 5。 "
#. Tag: para
-#: performance.xml:514
-#, fuzzy, no-c-format
-msgid ""
-"You can also enable batch fetching of collections. For example, if each "
-"<literal>Person</literal> has a lazy collection of
<literal>Cat</literal>s, "
-"and 10 persons are currently loaded in the <literal>Session</literal>,
"
-"iterating through all persons will generate 10
<literal>SELECT</literal>s, "
-"one for every call to <literal>getCats()</literal>. If you enable batch
"
-"fetching for the <literal>cats</literal> collection in the mapping of
"
-"<literal>Person</literal>, Hibernate can pre-fetch collections:"
-msgstr ""
-"你也可以在集合级别定义批量抓取。例如,如果每个<literal>Person</literal>都拥有"
-"一个延迟载入的<literal>Cats</literal>集合,
现在,<literal>Sesssion</literal>"
-"中载入了10个person对象,遍历person集合将会引起10次<literal>SELECT</literal>查"
-"询, 每次查询都会调用<literal>getCats()</literal>方法。如果你在"
-"<literal>Person</literal>的映射定义部分,允许对<literal>cats</literal>批量抓"
-"取, 那么,Hibernate将可以预先抓取整个集合。请看例子:"
-
-#. Tag: programlisting
-#: performance.xml:523
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <set name=\"cats\" batch-size=\"3\">\n"
-" ...\n"
-" </set>\n"
-"</class>]]>"
-msgstr ""
+msgid "You can also enable batch fetching of collections. For example, if each
<literal>Person</literal> has a lazy collection of
<literal>Cat</literal>s, and 10 persons are currently loaded in the
<literal>Session</literal>, iterating through all persons will generate 10
<literal>SELECT</literal>s, one for every call to
<literal>getCats()</literal>. If you enable batch fetching for the
<literal>cats</literal> collection in the mapping of
<literal>Person</literal>, Hibernate can pre-fetch collections:"
+msgstr "你也可以在集合级别定义批量抓取。例如,如果每个 <literal>Person</literal> 都拥有一个延迟载入的
<literal>Cats</literal> 集合, 现在,<literal>Sesssion</literal> 中载入了 10
个 person 对象,遍历 person 集合将会引起 10 次 <literal>SELECT</literal> 查询,每次查询都会调用
<literal>getCats()</literal> 方法。如果你在 <literal>Person</literal>
的映射定义部分,允许对 <literal>cats</literal> 批量抓取,那么,Hibernate 将可以预先抓取整个集合。请看例子:
"
#. Tag: para
-#: performance.xml:525
#, no-c-format
-msgid ""
-"With a <literal>batch-size</literal> of 3, Hibernate will load 3, 3, 3,
1 "
-"collections in four <literal>SELECT</literal>s. Again, the value of the
"
-"attribute depends on the expected number of uninitialized collections in a "
-"particular <literal>Session</literal>."
-msgstr ""
-"如果整个的<literal>batch-size</literal>是3(笔误?),那么Hibernate将会分四次"
-"执行<literal>SELECT</literal>查询, 按照3、3、3、1的大小分别载入数据。这里的"
-"每次载入的数据量还具体依赖于当前<literal>Session</literal>中未实例化集合的个"
-"数。"
+msgid "With a <literal>batch-size</literal> of 3, Hibernate will load 3,
3, 3, 1 collections in four <literal>SELECT</literal>s. Again, the value of
the attribute depends on the expected number of uninitialized collections in a particular
<literal>Session</literal>."
+msgstr "如果整个的 <literal>batch-size</literal> 是 3,那么 Hibernate 将会分四次执行
<literal>SELECT</literal> 查询, 按照 3、3、3、1 的大小分别载入数据。这里的每次载入的数据量还具体依赖于当前
<literal>Session</literal> 中未实例化集合的个数。 "
#. Tag: para
-#: performance.xml:531
-#, fuzzy, 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 "
-"<emphasis>nested set</emphasis> or a <emphasis>materialized
path</emphasis> "
-"might be a better option for read-mostly trees."
-msgstr ""
-"如果你的模型中有嵌套的树状结构,例如典型的帐单-原料结构(bill-of-materials "
-"pattern),集合的批量抓取是非常有用的。 (尽管在更多情况下对树进行读取时,"
-"<emphasis>嵌套集合(nested set)</emphasis>或<emphasis>原料路径(materialized
"
-"path)</emphasis>(××) 是更好的解决方法。)"
+#, 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
<emphasis>nested set</emphasis> or a <emphasis>materialized
path</emphasis> might be a better option for read-mostly trees."
+msgstr "如果你的模型中有嵌套的树状结构,例如典型的帐单-原料结构(bill-of-materials
pattern),集合的批量抓取是非常有用的。(尽管在更多情况下对树进行读取时,<emphasis>嵌套集合(nested
set)</emphasis>或<emphasis>原料路径(materialized
path)</emphasis>可能是更好的解决方法。)"
#. Tag: title
-#: performance.xml:540
#, no-c-format
msgid "Using subselect fetching"
msgstr "使用子查询抓取(Using subselect fetching)"
#. Tag: para
-#: performance.xml:542
-#, fuzzy, 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重新运行原来"
-"的查询,一次性读入所有的实例。这和批量抓取的实现方法是一样的,不会有破碎的加"
-"载。"
+#, 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
重新运行原来的查询,一次性读入所有的实例。这和批量抓取的实现方法是一样的,不会有破碎的加载。 "
#. Tag: title
-#: performance.xml:553
#, no-c-format
msgid "Using lazy property fetching"
msgstr "使用延迟属性抓取(Using lazy property fetching)"
#. Tag: para
-#: performance.xml:555
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate3 supports the lazy fetching of individual properties. This "
-"optimization technique is also known as <emphasis>fetch
groups</emphasis>. "
-"Please note that this is mostly a marketing feature; 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对单独的属性支持延迟抓取,这项优化技术也被称为<emphasis>组抓取"
-"(fetch groups)</emphasis>。 请注意,该技术更多的属于市场特性。在实际应用"
-"中,优化行读取比优化列读取更重要。但是,仅载入类的部分属性在某些特定情况下会"
-"有用,例如在原有表中拥有几百列数据、数据模型无法改动的情况下。"
+#, no-c-format
+msgid "Hibernate3 supports the lazy fetching of individual properties. This
optimization technique is also known as <emphasis>fetch groups</emphasis>.
Please note that this is mostly a marketing feature; 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 对单独的属性支持延迟抓取,这项优化技术也被称为<emphasis>组抓取(fetch
groups)</emphasis>。
请注意,该技术更多的属于市场特性。在实际应用中,优化行读取比优化列读取更重要。但是,仅载入类的部分属性在某些特定情况下会有用,例如在原有表中拥有几百列数据、数据模型无法改动的情况下。
"
#. Tag: para
-#: performance.xml:564
#, no-c-format
-msgid ""
-"To enable lazy property loading, set the <literal>lazy</literal>
attribute "
-"on your particular property mappings:"
-msgstr ""
-"可以在映射文件中对特定的属性设置<literal>lazy</literal>,定义该属性为延迟载"
-"入。"
+msgid "To enable lazy property loading, set the <literal>lazy</literal>
attribute on your particular property mappings:"
+msgstr "可以在映射文件中对特定的属性设置 <literal>lazy</literal>,定义该属性为延迟载入。"
-#. Tag: programlisting
-#: performance.xml:569
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Document\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"name\" not-null=\"true\"
length=\"50\"/>\n"
-" <property name=\"summary\" not-null=\"true\"
length=\"200\" lazy=\"true"
-"\"/>\n"
-" <property name=\"text\" not-null=\"true\"
length=\"2000\" lazy=\"true\"/"
-">\n"
-"</class>]]>"
-msgstr ""
+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
-#: performance.xml:571
-#, fuzzy, 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将会忽略这些"
-"属性的延迟设置,仍然将其直接载入。"
-
-#. Tag: para
-#: performance.xml:577
#, no-c-format
msgid "For bytecode instrumentation, use the following Ant task:"
-msgstr "你可以在Ant的Task中,进行如下定义,对持久类代码加入“二进制指令。”"
+msgstr "你可以在 Ant 的 Task 中,进行如下定义,对持久类代码加入“二进制指令。”"
-#. Tag: programlisting
-#: performance.xml:581
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<target name=\"instrument\"
depends=\"compile\">\n"
-" <taskdef name=\"instrument\"
classname=\"org.hibernate.tool.instrument."
-"InstrumentTask\">\n"
-" <classpath path=\"${jar.path}\"/>\n"
-" <classpath path=\"${classes.dir}\"/>\n"
-" <classpath refid=\"lib.class.path\"/>\n"
-" </taskdef>\n"
-"\n"
-" <instrument verbose=\"true\">\n"
-" <fileset
dir=\"${testclasses.dir}/org/hibernate/auction/model\">\n"
-" <include name=\"*.class\"/>\n"
-" </fileset>\n"
-" </instrument>\n"
-"</target>]]>"
-msgstr ""
+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
-#: performance.xml:583
-#, fuzzy, 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)特性,可以避免"
-"读取非必要的列, 这一点至少对只读事务是非常有用的。它无需在代码构建时“二进制"
-"指令”处理,因此是一个更加值得选择的解决方法。"
+#, no-c-format
+msgid "You can force the usual eager fetching of properties using
<literal>fetch all properties</literal> in HQL."
+msgstr "有时你需要在 HQL 中通过<literal>抓取所有属性</literal>,强行抓取所有内容。 "
-#. Tag: para
-#: performance.xml:590
-#, fuzzy, no-c-format
-msgid ""
-"You can force the usual eager fetching of properties using <literal>fetch
"
-"all properties</literal> in HQL."
-msgstr ""
-"有时你需要在HQL中通过<literal>抓取所有属性</literal>,强行抓取所有内容。"
-
#. Tag: title
-#: performance.xml:600
#, no-c-format
msgid "The Second Level Cache"
msgstr "二级缓存(The Second Level Cache)"
#. Tag: para
-#: performance.xml:602
-#, fuzzy, no-c-format
-msgid ""
-"A Hibernate <literal>Session</literal> is a transaction-level cache of
"
-"persistent data. It is possible to configure a cluster or JVM-level "
-"(<literal>SessionFactory</literal>-level) cache on a class-by-class and
"
-"collection-by-collection basis. You 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的<literal>Session</literal>在事务级别进行持久化数据的缓存操作。 当"
-"然,也有可能分别为每个类(或集合),配置集群、或JVM级别"
-"(<literal>SessionFactory级别</literal>)的缓存。 你甚至可以为之插入一个集群的"
-"缓存。注意,缓存永远不知道其他应用程序对持久化仓库(数据库)可能进行的修改 "
-"(即使可以将缓存数据设定为定期失效)。"
+#, no-c-format
+msgid "A Hibernate <literal>Session</literal> is a transaction-level
cache of persistent data. It is possible to configure a cluster or JVM-level
(<literal>SessionFactory</literal>-level) cache on a class-by-class and
collection-by-collection basis. You 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 的 <literal>Session</literal> 在事务级别进行持久化数据的缓存操作。
当然,也有可能分别为每个类(或集合),配置集群、或 JVM 级别(<literal>SessionFactory
级别</literal>)的缓存。你甚至可以为之插入一个集群的缓存。注意,缓存永远不知道其他应用程序对持久化仓库(数据库)可能进行的修改
(即使可以将缓存数据设定为定期失效)。 "
#. Tag: para
-#: performance.xml:610
-#, fuzzy, no-c-format
-msgid ""
-"You have the option to tell Hibernate which caching implementation to use by
"
-"specifying the name of a class that implements
<literal>org.hibernate.cache."
-"CacheProvider</literal> using the property
<literal>hibernate.cache."
-"provider_class</literal>. Hibernate 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 ""
-"通过在<literal>hibernate.cache.provider_class</literal>属性中指定"
-"<literal>org.hibernate.cache.CacheProvider</literal>的某个实现的类名,你可以选"
-"择让Hibernate使用哪个缓存实现。Hibernate打包一些开源缓存实现,提供对它们的内"
-"置支持(见下表)。除此之外,你也可以实现你自己的实现,将它们插入到系统中。注"
-"意,在3.2版本之前,默认使用EhCache 作为缓存实现,但从3.2起就不再这样了。"
+#, no-c-format
+msgid "You have the option to tell Hibernate which caching implementation to use by
specifying the name of a class that implements
<literal>org.hibernate.cache.CacheProvider</literal> using the property
<literal>hibernate.cache.provider_class</literal>. Hibernate 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 "通过在 <literal>hibernate.cache.provider_class</literal> 属性中指定
<literal>org.hibernate.cache.CacheProvider</literal> 的某个实现的类名,你可以选择让 Hibernate
使用哪个缓存实现。Hibernate 打包一些开源缓存实现,提供对它们的内置支持(见下表)。除此之外,你也可以实现你自己的实现,将它们插入到系统中。注意,在 3.2
版本之前,默认使用 EhCache 作为缓存实现,但从 3.2 起就不再这样了。 "
#. Tag: title
-#: performance.xml:621
#, no-c-format
msgid "Cache Providers"
msgstr "缓存策略提供商(Cache Providers)"
#. Tag: entry
-#: performance.xml:630 performance.xml:818
#, no-c-format
msgid "Cache"
msgstr "Cache"
#. Tag: entry
-#: performance.xml:631
#, no-c-format
msgid "Provider class"
msgstr "Provider class"
#. Tag: entry
-#: performance.xml:632
#, no-c-format
msgid "Type"
msgstr "Type"
#. Tag: entry
-#: performance.xml:633
#, no-c-format
msgid "Cluster Safe"
msgstr "Cluster Safe"
#. Tag: entry
-#: performance.xml:634
#, no-c-format
msgid "Query Cache Supported"
msgstr "Query Cache Supported"
#. Tag: entry
-#: performance.xml:639 performance.xml:827
#, no-c-format
msgid "Hashtable (not intended for production use)"
-msgstr "Hashtable (not intended for production use)"
+msgstr "Hashtable (not intended for production use)"
-#. Tag: literal
-#: performance.xml:640
+#. Tag: entry
#, no-c-format
-msgid "org.hibernate.cache.HashtableCacheProvider"
-msgstr "org.hibernate.cache.HashtableCacheProvider"
+msgid
"<literal>org.hibernate.cache.HashtableCacheProvider</literal>"
+msgstr
"<literal>org.hibernate.cache.HashtableCacheProvider</literal>"
#. Tag: entry
-#: performance.xml:641
#, no-c-format
msgid "memory"
msgstr "memory"
#. Tag: entry
-#: performance.xml:643 performance.xml:650 performance.xml:657
-#: performance.xml:828 performance.xml:829 performance.xml:830
-#: performance.xml:835 performance.xml:836 performance.xml:837
-#: performance.xml:842 performance.xml:843 performance.xml:844
-#: performance.xml:849 performance.xml:850 performance.xml:856
-#: performance.xml:859 performance.xml:863 performance.xml:866
#, no-c-format
-msgid "<entry>yes</entry>"
-msgstr ""
+msgid "yes"
+msgstr "yes"
#. Tag: entry
-#: performance.xml:646 performance.xml:834
#, no-c-format
msgid "EHCache"
msgstr "EHCache"
-#. Tag: literal
-#: performance.xml:647
+#. Tag: entry
#, no-c-format
-msgid "org.hibernate.cache.EhCacheProvider"
-msgstr "org.hibernate.cache.EhCacheProvider"
+msgid "<literal>org.hibernate.cache.EhCacheProvider</literal>"
+msgstr "<literal>org.hibernate.cache.EhCacheProvider</literal>"
#. Tag: entry
-#: performance.xml:648 performance.xml:655
#, no-c-format
msgid "memory, disk"
-msgstr "memory, disk"
+msgstr "memory,disk"
#. Tag: entry
-#: performance.xml:653 performance.xml:841
#, no-c-format
msgid "OSCache"
msgstr "OSCache"
-#. Tag: literal
-#: performance.xml:654
+#. Tag: entry
#, no-c-format
-msgid "org.hibernate.cache.OSCacheProvider"
-msgstr "org.hibernate.cache.OSCacheProvider"
+msgid "<literal>org.hibernate.cache.OSCacheProvider</literal>"
+msgstr "<literal>org.hibernate.cache.OSCacheProvider</literal>"
#. Tag: entry
-#: performance.xml:660 performance.xml:848
#, no-c-format
msgid "SwarmCache"
msgstr "SwarmCache"
-#. Tag: literal
-#: performance.xml:661
+#. Tag: entry
#, no-c-format
-msgid "org.hibernate.cache.SwarmCacheProvider"
-msgstr "org.hibernate.cache.SwarmCacheProvider"
+msgid "<literal>org.hibernate.cache.SwarmCacheProvider</literal>"
+msgstr "<literal>org.hibernate.cache.SwarmCacheProvider</literal>"
#. Tag: entry
-#: performance.xml:662
#, no-c-format
msgid "clustered (ip multicast)"
msgstr "clustered (ip multicast)"
#. Tag: entry
-#: performance.xml:663
#, no-c-format
msgid "yes (clustered invalidation)"
msgstr "yes (clustered invalidation)"
#. Tag: entry
-#: performance.xml:667 performance.xml:855
-#, fuzzy, no-c-format
+#, no-c-format
msgid "JBoss Cache 1.x"
-msgstr "JBoss TreeCache"
+msgstr "JBoss Cache 1.x"
-#. Tag: literal
-#: performance.xml:668
+#. Tag: entry
#, no-c-format
-msgid "org.hibernate.cache.TreeCacheProvider"
-msgstr "org.hibernate.cache.TreeCacheProvider"
+msgid "<literal>org.hibernate.cache.TreeCacheProvider</literal>"
+msgstr "<literal>org.hibernate.cache.TreeCacheProvider</literal>"
#. Tag: entry
-#: performance.xml:669 performance.xml:676
#, no-c-format
msgid "clustered (ip multicast), transactional"
msgstr "clustered (ip multicast), transactional"
#. Tag: entry
-#: performance.xml:670
#, no-c-format
msgid "yes (replication)"
msgstr "yes (replication)"
#. Tag: entry
-#: performance.xml:671 performance.xml:678
#, no-c-format
msgid "yes (clock sync req.)"
msgstr "yes (clock sync req.)"
#. Tag: entry
-#: performance.xml:674 performance.xml:862
-#, fuzzy, no-c-format
+#, no-c-format
msgid "JBoss Cache 2"
-msgstr "JBoss TreeCache"
+msgstr "JBoss Cache 2"
-#. Tag: literal
-#: performance.xml:675
-#, fuzzy, no-c-format
-msgid "org.hibernate.cache.jbc2.JBossCacheRegionFactory"
-msgstr "org.hibernate.cache.EhCacheProvider"
+#. Tag: entry
+#, no-c-format
+msgid
"<literal>org.hibernate.cache.jbc2.JBossCacheRegionFactory</literal>"
+msgstr
"<literal>org.hibernate.cache.jbc2.JBossCacheRegionFactory</literal>"
#. Tag: entry
-#: performance.xml:677
-#, fuzzy, no-c-format
+#, no-c-format
msgid "yes (replication or invalidation)"
-msgstr "yes (clustered invalidation)"
+msgstr "yes (replication or invalidation)"
#. Tag: title
-#: performance.xml:685
#, no-c-format
msgid "Cache mappings"
msgstr "缓存映射(Cache mappings)"
#. Tag: para
-#: performance.xml:687
#, no-c-format
-msgid ""
-"The <literal><cache></literal> element of a class or
collection "
-"mapping has the following form:"
-msgstr
"类或者集合映射的“<literal><cache></literal>元素”可以有下列形式:"
+msgid "The <literal><cache></literal> element of a class
or collection mapping has the following form:"
+msgstr "类或者集合映射的“<literal><cache></literal>
元素”可以有下列形式:"
-#. Tag: programlisting
-#: performance.xml:698
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<cache \n"
-"
usage=\"transactional|read-write|nonstrict-read-write|read-only\"\n"
-" region=\"RegionName\"\n"
-" include=\"all|non-lazy\"\n"
-"/>]]>"
-msgstr ""
+msgid "<literal>usage</literal> (required) specifies the caching
strategy: <literal>transactional</literal>,
<literal>read-write</literal>,
<literal>nonstrict-read-write</literal> or
<literal>read-only</literal>"
+msgstr
"<literal>usage</literal>(必须)说明了缓存的策略:<literal>transactional</literal>、
<literal>read-write</literal>、<literal>nonstrict-read-write</literal>
或 <literal>read-only</literal>。"
#. Tag: para
-#: performance.xml:701
#, no-c-format
-msgid ""
-"<literal>usage</literal> (required) specifies the caching strategy:
"
-"<literal>transactional</literal>,
<literal>read-write</literal>, "
-"<literal>nonstrict-read-write</literal> or
<literal>read-only</literal>"
-msgstr ""
-"<literal>usage</literal>(必须)说明了缓存的策略:
<literal>transactional</"
-"literal>、 <literal>read-write</literal>、
<literal>nonstrict-read-write</"
-"literal>或 <literal>read-only</literal>。"
+msgid "<literal>region</literal> (optional: defaults to the class or
collection role name): specifies the name of the second level cache region"
+msgstr "<literal>region</literal> (可选,默认为类或者集合的名字(class or collection
role name)) 指定第二级缓存的区域名(name of the second level cache region) "
#. Tag: para
-#: performance.xml:710
-#, fuzzy, no-c-format
-msgid ""
-"<literal>region</literal> (optional: defaults to the class or
collection "
-"role name): specifies the name of the second level cache region"
-msgstr ""
-"<literal>region</literal> (可选, 默认为类或者集合的名字(class or collection "
-"role name)) 指定第二级缓存的区域名(name of the second level cache region)"
+#, no-c-format
+msgid "<literal>include</literal> (optional: defaults to
<literal>all</literal>) <literal>non-lazy</literal>: specifies
that properties of the entity mapped with
<literal>lazy=\"true\"</literal> cannot be cached when
attribute-level lazy fetching is enabled"
+msgstr "<literal>include</literal>(可选,默认为
<literal>all</literal>) <literal>non-lazy</literal>
当属性级延迟抓取打开时,标记为 <literal>lazy=\"true\"</literal> 的实体的属性可能无法被缓存
"
#. Tag: para
-#: performance.xml:717
-#, fuzzy, no-c-format
-msgid ""
-"<literal>include</literal> (optional: defaults to
<literal>all</literal>) "
-"<literal>non-lazy</literal>: specifies that properties of the entity
mapped "
-"with <literal>lazy=\"true\"</literal> cannot be cached when
attribute-level "
-"lazy fetching is enabled"
-msgstr ""
-"<literal>include</literal> (可选,默认为 <literal>all</literal>)
<literal>non-"
-"lazy</literal> 当属性级延迟抓取打开时,
标记为<literal>lazy=\"true\"</literal>"
-"的实体的属性可能无法被缓存"
+#, no-c-format
+msgid "Alternatively, you can specify
<literal><class-cache></literal> and
<literal><collection-cache></literal> elements in
<literal>hibernate.cfg.xml</literal>."
+msgstr "另外(首选?),你可以在<literal>hibernate.cfg.xml</literal> 中指定
<literal><class-cache></literal> 和
<literal><collection-cache></literal> 元素。"
#. Tag: para
-#: performance.xml:727
-#, fuzzy, no-c-format
-msgid ""
-"Alternatively, you can specify
<literal><class-cache></literal> and "
-"<literal><collection-cache></literal> elements in
<literal>hibernate."
-"cfg.xml</literal>."
-msgstr ""
-"另外(首选?),
你可以在hibernate.cfg.xml中指定<literal><class-cache></"
-"literal>和 <literal><collection-cache></literal>
元素。"
-
-#. Tag: para
-#: performance.xml:732
#, no-c-format
-msgid ""
-"The <literal>usage</literal> attribute specifies a
<emphasis>cache "
-"concurrency strategy</emphasis>."
-msgstr ""
-"这里的<literal>usage</literal> 属性指明了<emphasis>缓存并发策略(cache "
-"concurrency strategy)</emphasis>。"
+msgid "The <literal>usage</literal> attribute specifies a
<emphasis>cache concurrency strategy</emphasis>."
+msgstr "这里的 <literal>usage</literal> 属性指明了<emphasis>缓存并发策略(cache
concurrency strategy)</emphasis>。"
#. Tag: title
-#: performance.xml:739
#, no-c-format
msgid "Strategy: read only"
-msgstr "策略:只读缓存(Strategy: read only)"
+msgstr "策略:只读缓存(Strategy:read only)"
#. Tag: para
-#: performance.xml:741
-#, fuzzy, no-c-format
-msgid ""
-"If your application needs to read, but not modify, instances of a persistent
"
-"class, a <literal>read-only</literal> cache can be used. This is the
"
-"simplest and optimal performing strategy. It is even safe for use in a "
-"cluster."
-msgstr ""
-"如果你的应用程序只需读取一个持久化类的实例,而无需对其修改, 那么就可以对其进"
-"行<literal>只读</literal> 缓存。这是最简单,也是实用性最好的方法。甚至在集群"
-"中,它也能完美地运作。"
-
-#. Tag: programlisting
-#: performance.xml:747
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"eg.Immutable\"
mutable=\"false\">\n"
-" <cache usage=\"read-only\"/>\n"
-" ....\n"
-"</class>]]>"
-msgstr ""
+msgid "If your application needs to read, but not modify, instances of a persistent
class, a <literal>read-only</literal> cache can be used. This is the simplest
and optimal performing strategy. It is even safe for use in a cluster."
+msgstr "如果你的应用程序只需读取一个持久化类的实例,而无需对其修改, 那么就可以对其进行<literal>只读</literal>
缓存。这是最简单,也是实用性最好的方法。甚至在集群中,它也能完美地运作。 "
#. Tag: title
-#: performance.xml:753
#, no-c-format
msgid "Strategy: read/write"
-msgstr "策略:读/写缓存(Strategy: read/write)"
+msgstr "策略:读写/缓存(Strategy:read/write)"
#. Tag: para
-#: performance.xml:755
-#, fuzzy, no-c-format
-msgid ""
-"If the application needs to update data, a
<literal>read-write</literal> "
-"cache might be appropriate. This cache strategy should never be used if "
-"serializable transaction isolation level is required. If the cache is used "
-"in a JTA environment, you must specify the property
<literal>hibernate."
-"transaction.manager_lookup_class</literal> and naming a strategy for "
-"obtaining the JTA <literal>TransactionManager</literal>. In other
"
-"environments, you should ensure that the transaction is completed when "
-"<literal>Session.close()</literal> or
<literal>Session.disconnect()</"
-"literal> is called. If you want to use this strategy in a cluster, you "
-"should ensure that the underlying cache implementation supports locking. The
"
-"built-in cache providers <emphasis>do not</emphasis> support
locking."
-msgstr ""
-"如果应用程序需要更新数据,那么使用<literal>读/写缓存</literal> 比较合适。 如"
-"果应用程序要求“序列化事务”的隔离级别(serializable transaction isolation "
-"level),那么就决不能使用这种缓存策略。 如果在JTA环境中使用缓存,你必须指定"
-"<literal>hibernate.transaction.manager_lookup_class</literal>属性的值,
通过"
-"它,Hibernate才能知道该应用程序中JTA的<literal>TransactionManager</literal>的"
-"具体策略。 在其它环境中,你必须保证在<literal>Session.close()</literal>、或"
-"<literal>Session.disconnect()</literal>调用前, 整个事务已经结束。 如果你想在"
-"集群环境中使用此策略,你必须保证底层的缓存实现支持锁定(locking)。Hibernate内"
-"置的缓存策略并不支持锁定功能。"
-
-#. Tag: programlisting
-#: performance.xml:766
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"eg.Cat\" .... >\n"
-" <cache usage=\"read-write\"/>\n"
-" ....\n"
-" <set name=\"kittens\" ... >\n"
-" <cache usage=\"read-write\"/>\n"
-" ....\n"
-" </set>\n"
-"</class>]]>"
-msgstr ""
+msgid "If the application needs to update data, a
<literal>read-write</literal> cache might be appropriate. This cache strategy
should never be used if serializable transaction isolation level is required. If the cache
is used in a JTA environment, you must specify the property
<literal>hibernate.transaction.manager_lookup_class</literal> and naming a
strategy for obtaining the JTA <literal>TransactionManager</literal>. In other
environments, you should ensure that the transaction is completed when
<literal>Session.close()</literal> or
<literal>Session.disconnect()</literal> is called. If you want to use this
strategy in a cluster, you should ensure that the underlying cache implementation supports
locking. The built-in cache providers <emphasis>do not</emphasis> support
locking."
+msgstr "如果应用程序需要更新数据,那么使用<literal>读/写缓存</literal> 比较合适。
如果应用程序要求“序列化事务”的隔离级别(serializable transaction isolation level),那么就决不能使用这种缓存策略。 如果在 JTA
环境中使用缓存,你必须指定 <literal>hibernate.transaction.manager_lookup_class</literal>
属性的值, 通过它,Hibernate 才能知道该应用程序中 JTA
的<literal>TransactionManager</literal>的具体策略。 在其它环境中,你必须保证在
<literal>Session.close()</literal>、或
<literal>Session.disconnect()</literal> 调用前, 整个事务已经结束。
如果你想在集群环境中使用此策略,你必须保证底层的缓存实现支持锁定(locking)。Hibernate 内置的缓存策略并不支持锁定功能。 "
#. Tag: title
-#: performance.xml:771
#, no-c-format
msgid "Strategy: nonstrict read/write"
-msgstr "策略:非严格读/写缓存(Strategy: nonstrict read/write)"
+msgstr "策略:非严格读/写缓存(Strategy:nonstrict read/write)"
#. Tag: para
-#: performance.xml:773
-#, fuzzy, 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 "
-"<literal>nonstrict-read-write</literal> cache might be appropriate. If
the "
-"cache is used in a JTA environment, you must specify
<literal>hibernate."
-"transaction.manager_lookup_class</literal>. In other environments, you
"
-"should ensure that the transaction is completed when
<literal>Session.close()"
-"</literal> or <literal>Session.disconnect()</literal> is
called."
-msgstr ""
-"如果应用程序只偶尔需要更新数据(也就是说,两个事务同时更新同一记录的情况很不"
-"常见),也不需要十分严格的事务隔离, 那么比较适合使用<literal>非严格读/写缓存"
-"</literal>策略。如果在JTA环境中使用该策略, 你必须为其指定<literal>hibernate."
-"transaction.manager_lookup_class</literal>属性的值, 在其它环境中,你必须保证"
-"在<literal>Session.close()</literal>、或<literal>Session.disconnect()</"
-"literal>调用前, 整个事务已经结束。"
+#, 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
<literal>nonstrict-read-write</literal> cache might be appropriate. If the
cache is used in a JTA environment, you must specify
<literal>hibernate.transaction.manager_lookup_class</literal>. In other
environments, you should ensure that the transaction is completed when
<literal>Session.close()</literal> or
<literal>Session.disconnect()</literal> is called."
+msgstr
"如果应用程序只偶尔需要更新数据(也就是说,两个事务同时更新同一记录的情况很不常见),也不需要十分严格的事务隔离,那么比较适合使用<literal>非严格读/写缓存</literal>策略。如果在
JTA 环境中使用该策略,你必须为其指定
<literal>hibernate.transaction.manager_lookup_class</literal>
属性的值,在其它环境中,你必须保证在<literal>Session.close()</literal>、或
<literal>Session.disconnect()</literal> 调用前,整个事务已经结束。 "
#. Tag: title
-#: performance.xml:785
#, no-c-format
msgid "Strategy: transactional"
-msgstr "策略:事务缓存(transactional)"
+msgstr "策略:事务缓存(transactional)"
#. Tag: para
-#: performance.xml:787
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>transactional</literal> 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 "
-"<literal>hibernate.transaction.manager_lookup_class</literal>."
-msgstr ""
-"Hibernate的<literal>事务缓存</literal>策略提供了全事务的缓存支持, 例如对"
-"JBoss TreeCache的支持。这样的缓存只能用于JTA环境中,你必须指定 为其"
-"<literal>hibernate.transaction.manager_lookup_class</literal>属性。"
+#, no-c-format
+msgid "The <literal>transactional</literal> 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
<literal>hibernate.transaction.manager_lookup_class</literal>."
+msgstr "Hibernate 的<literal>事务缓存</literal>策略提供了全事务的缓存支持,例如对 JBoss
TreeCache 的支持。这样的缓存只能用于 JTA 环境中,你必须指定为其
<literal>hibernate.transaction.manager_lookup_class</literal> 属性。 "
#. Tag: title
-#: performance.xml:796
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Cache-provider/concurrency-strategy compatibility"
-msgstr ""
-"各种缓存提供商对缓存并发策略的支持情况(Cache Concurrency Strategy Support)"
+msgstr "各种缓存提供商/缓存并发策略的兼容性"
#. Tag: para
-#: performance.xml:799
-#, fuzzy, no-c-format
-msgid ""
-"None of the cache providers support all of the cache concurrency strategies."
-msgstr ""
-"没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及"
-"其各自适用的并发策略。"
+#, no-c-format
+msgid "None of the cache providers support all of the cache concurrency
strategies."
+msgstr "没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及其各自适用的并发策略。 "
#. Tag: para
-#: performance.xml:804
-#, fuzzy, no-c-format
-msgid ""
-"The following table shows which providers are compatible with which "
-"concurrency strategies."
-msgstr ""
-"没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及"
-"其各自适用的并发策略。"
+#, no-c-format
+msgid "The following table shows which providers are compatible with which
concurrency strategies."
+msgstr "没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及其各自适用的并发策略。 "
#. Tag: title
-#: performance.xml:809
#, no-c-format
msgid "Cache Concurrency Strategy Support"
-msgstr ""
-"各种缓存提供商对缓存并发策略的支持情况(Cache Concurrency Strategy Support)"
+msgstr "各种缓存提供商对缓存并发策略的支持情况(Cache Concurrency Strategy Support)"
#. Tag: entry
-#: performance.xml:819
#, no-c-format
msgid "read-only"
msgstr "read-only"
#. Tag: entry
-#: performance.xml:820
#, no-c-format
msgid "nonstrict-read-write"
msgstr "nonstrict-read-write"
#. Tag: entry
-#: performance.xml:821
#, no-c-format
msgid "read-write"
msgstr "read-write"
#. Tag: entry
-#: performance.xml:822
#, no-c-format
msgid "transactional"
msgstr "transactional"
#. Tag: title
-#: performance.xml:877
#, no-c-format
msgid "Managing the caches"
msgstr "管理缓存(Managing the caches)"
#. Tag: para
-#: performance.xml:879
-#, fuzzy, no-c-format
-msgid ""
-"Whenever you pass an object to <literal>save()</literal>,
<literal>update()</"
-"literal> or <literal>saveOrUpdate()</literal>, and whenever you
retrieve an "
-"object using <literal>load()</literal>,
<literal>get()</literal>, "
-"<literal>list()</literal>, <literal>iterate()</literal> or
<literal>scroll()"
-"</literal>, that object is added to the internal cache of the "
-"<literal>Session</literal>."
-msgstr ""
-"无论何时,当你给<literal>save()</literal>、<literal>update()</literal>或
"
-"<literal>saveOrUpdate()</literal>方法传递一个对象时,或使用<literal>load()</"
-"literal>、
<literal>get()</literal>、<literal>list()</literal>、"
-"<literal>iterate()</literal>
或<literal>scroll()</literal>方法获得一个对象"
-"时, 该对象都将被加入到<literal>Session</literal>的内部缓存中。"
+#, no-c-format
+msgid "Whenever you pass an object to <literal>save()</literal>,
<literal>update()</literal> or <literal>saveOrUpdate()</literal>,
and whenever you retrieve an object using <literal>load()</literal>,
<literal>get()</literal>, <literal>list()</literal>,
<literal>iterate()</literal> or <literal>scroll()</literal>, that
object is added to the internal cache of the
<literal>Session</literal>."
+msgstr "无论何时,当你给
<literal>save()</literal>、<literal>update()</literal> 或
<literal>saveOrUpdate()</literal> 方法传递一个对象时,或使用
<literal>load()</literal>、<literal>get()</literal>、<literal>list()</literal>、<literal>iterate()</literal>
或 <literal>scroll()</literal> 方法获得一个对象时,该对象都将被加入到
<literal>Session</literal> 的内部缓存中。 "
#. Tag: para
-#: performance.xml:886
-#, fuzzy, no-c-format
-msgid ""
-"When <literal>flush()</literal> is subsequently called, the state of
that "
-"object will be synchronized with the database. If you do not want this "
-"synchronization to occur, or if you are processing a huge number of objects "
-"and need to manage memory efficiently, the <literal>evict()</literal>
method "
-"can be used to remove the object and its collections from the first-level "
-"cache."
-msgstr ""
-"当随后flush()方法被调用时,对象的状态会和数据库取得同步。 如果你不希望此同步"
-"操作发生,或者你正处理大量对象、需要对有效管理内存时,你可以调用"
-"<literal>evict()</literal> 方法,从一级缓存中去掉这些对象及其集合。"
-
-#. Tag: programlisting
-#: performance.xml:894
#, no-c-format
-msgid ""
-"<![CDATA[ScrollableResult cats = sess.createQuery(\"from Cat as
cat\").scroll"
-"(); //a huge result set\n"
-"while ( cats.next() ) {\n"
-" Cat cat = (Cat) cats.get(0);\n"
-" doSomethingWithACat(cat);\n"
-" sess.evict(cat);\n"
-"}]]>"
-msgstr ""
+msgid "When <literal>flush()</literal> is subsequently called, the state
of that object will be synchronized with the database. If you do not want this
synchronization to occur, or if you are processing a huge number of objects and need to
manage memory efficiently, the <literal>evict()</literal> method can be used
to remove the object and its collections from the first-level cache."
+msgstr "当随后 flush() 方法被调用时,对象的状态会和数据库取得同步。如果你不希望此同步操作发生,或者你正处理大量对象、需要对有效管理内存时,你可以调用
<literal>evict()</literal> 方法,从一级缓存中去掉这些对象及其集合。 "
#. Tag: para
-#: performance.xml:896
#, no-c-format
-msgid ""
-"The <literal>Session</literal> also provides a
<literal>contains()</literal> "
-"method to determine if an instance belongs to the session cache."
-msgstr ""
-"Session还提供了一个<literal>contains()</literal>方法,用来判断某个实例是否处"
-"于当前session的缓存中。"
+msgid "The <literal>Session</literal> also provides a
<literal>contains()</literal> method to determine if an instance belongs to
the session cache."
+msgstr "Session 还提供了一个 <literal>contains()</literal> 方法,用来判断某个实例是否处于当前
session 的缓存中。"
#. Tag: para
-#: performance.xml:901
-#, fuzzy, no-c-format
-msgid ""
-"To evict all objects from the session cache, call
<literal>Session.clear()</"
-"literal>"
-msgstr ""
-"如若要把所有的对象从session缓存中彻底清除,则需要调用<literal>Session.clear()"
-"</literal>。"
+#, no-c-format
+msgid "To evict all objects from the session cache, call
<literal>Session.clear()</literal>"
+msgstr "如若要把所有的对象从 session 缓存中彻底清除,则需要调用
<literal>Session.clear()</literal>。 "
#. Tag: para
-#: performance.xml:905
#, no-c-format
-msgid ""
-"For the second-level cache, there are methods defined on "
-"<literal>SessionFactory</literal> for evicting the cached state of an
"
-"instance, entire class, collection instance or entire collection role."
-msgstr ""
-"对于二级缓存来说,在<literal>SessionFactory</literal>中定义了许多方法, 清除"
-"缓存中实例、整个类、集合实例或者整个集合。"
+msgid "For the second-level cache, there are methods defined on
<literal>SessionFactory</literal> for evicting the cached state of an
instance, entire class, collection instance or entire collection role."
+msgstr "对于二级缓存来说,在 <literal>SessionFactory</literal>
中定义了许多方法,清除缓存中实例、整个类、集合实例或者整个集合。"
-#. Tag: programlisting
-#: performance.xml:911
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[sessionFactory.evict(Cat.class, catId); //evict a particular
Cat\n"
-"sessionFactory.evict(Cat.class); //evict all Cats\n"
-"sessionFactory.evictCollection(\"Cat.kittens\", catId); //evict a
particular "
-"collection of kittens\n"
-"sessionFactory.evictCollection(\"Cat.kittens\"); //evict all kitten
"
-"collections]]>"
-msgstr ""
+msgid "The <literal>CacheMode</literal> controls how a particular
session interacts with the second-level cache:"
+msgstr "<literal>CacheMode</literal> 参数用于控制具体的 Session 如何与二级缓存进行交互。
"
#. Tag: para
-#: performance.xml:913
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>CacheMode</literal> controls how a particular session
interacts "
-"with the second-level cache:"
-msgstr ""
-"<literal>CacheMode</literal>参数用于控制具体的Session如何与二级缓存进行交互。"
+#, no-c-format
+msgid "<literal>CacheMode.NORMAL</literal>: will read items from and
write items to the second-level cache"
+msgstr "<literal>CacheMode.NORMAL</literal>:从二级缓存中读、写数据。"
#. Tag: para
-#: performance.xml:920
-#, fuzzy, no-c-format
-msgid ""
-"<literal>CacheMode.NORMAL</literal>: will read items from and write
items to "
-"the second-level cache"
-msgstr "<literal>CacheMode.NORMAL</literal> - 从二级缓存中读、写数据。"
+#, no-c-format
+msgid "<literal>CacheMode.GET</literal>: will read items from the
second-level cache. Do not write to the second-level cache except when updating
data"
+msgstr
"<literal>CacheMode.GET</literal>:从二级缓存中读取数据,仅在数据更新时对二级缓存写数据。"
#. Tag: para
-#: performance.xml:925
-#, fuzzy, no-c-format
-msgid ""
-"<literal>CacheMode.GET</literal>: will read items from the second-level
"
-"cache. Do not write to the second-level cache except when updating data"
-msgstr ""
-"<literal>CacheMode.GET</literal> - 从二级缓存中读取数据,仅在数据更新时对二级"
-"缓存写数据。"
+#, no-c-format
+msgid "<literal>CacheMode.PUT</literal>: will write items to the
second-level cache. Do not read from the second-level cache"
+msgstr "<literal>CacheMode.PUT</literal>:仅向二级缓存写数据,但不从二级缓存中读数据。"
#. Tag: para
-#: performance.xml:931
-#, fuzzy, no-c-format
-msgid ""
-"<literal>CacheMode.PUT</literal>: will write items to the second-level
"
-"cache. Do not read from the second-level cache"
-msgstr ""
-"<literal>CacheMode.PUT</literal> - 仅向二级缓存写数据,但不从二级缓存中读数"
-"据。"
+#, no-c-format
+msgid "<literal>CacheMode.REFRESH</literal>: will write items to the
second-level cache. Do not read from the second-level cache. Bypass the effect of
<literal>hibernate.cache.use_minimal_puts</literal> forcing a refresh of the
second-level cache for all items read from the database"
+msgstr "<literal>CacheMode.REFRESH</literal>:仅向二级缓存写数据,但不从二级缓存中读数据。通过
<literal>hibernate.cache.use_minimal_puts</literal>
的设置,强制二级缓存从数据库中读取数据,刷新缓存内容。"
#. Tag: para
-#: performance.xml:937
-#, fuzzy, no-c-format
-msgid ""
-"<literal>CacheMode.REFRESH</literal>: will write items to the
second-level "
-"cache. Do not read from the second-level cache. Bypass the effect of "
-"<literal>hibernate.cache.use_minimal_puts</literal> forcing a refresh
of the "
-"second-level cache for all items read from the database"
-msgstr ""
-"<literal>CacheMode.REFRESH</literal> - 仅向二级缓存写数据,但不从二级缓存中读"
-"数据。通过 <literal>hibernate.cache.use_minimal_puts</literal>的设置,强制二"
-"级缓存从数据库中读取数据,刷新缓存内容。"
-
-#. Tag: para
-#: performance.xml:945
#, no-c-format
-msgid ""
-"To browse the contents of a second-level or query cache region, use the "
-"<literal>Statistics</literal> API:"
-msgstr ""
-"如若需要查看二级缓存或查询缓存区域的内容,你可以使用<literal>统计"
-"(Statistics)</literal> API。"
+msgid "To browse the contents of a second-level or query cache region, use the
<literal>Statistics</literal> API:"
+msgstr "如若需要查看二级缓存或查询缓存区域的内容,你可以使用<literal>统计(Statistics)</literal>
API。"
-#. Tag: programlisting
-#: performance.xml:950
-#, no-c-format
-msgid ""
-"<![CDATA[Map cacheEntries = sessionFactory.getStatistics()\n"
-" .getSecondLevelCacheStatistics(regionName)\n"
-" .getEntries();]]>"
-msgstr ""
-
#. Tag: para
-#: performance.xml:952
-#, fuzzy, 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更人工可读的方式维护缓"
-"存内容。"
-
-#. Tag: programlisting
-#: performance.xml:957
#, no-c-format
-msgid ""
-"<![CDATA[hibernate.generate_statistics true\n"
-"hibernate.cache.use_structured_entries true]]>"
-msgstr ""
+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
-#: performance.xml:962
#, no-c-format
msgid "The Query Cache"
msgstr "查询缓存(The Query Cache)"
#. Tag: para
-#: performance.xml:964
-#, 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. You will first need to enable "
-"the query cache:"
-msgstr ""
-"查询的结果集也可以被缓存。只有当经常使用同样的参数进行查询时,这才会有些用"
-"处。 要使用查询缓存,首先你必须打开它:"
-
-#. Tag: programlisting
-#: performance.xml:969
#, no-c-format
-msgid "<![CDATA[hibernate.cache.use_query_cache true]]>"
-msgstr ""
+msgid "Query result sets can also be cached. This is only useful for queries that
are run frequently with the same parameters. You will first need to enable the query
cache:"
+msgstr "查询的结果集也可以被缓存。只有当经常使用同样的参数进行查询时,这才会有些用处。要使用查询缓存,首先你必须打开它: "
#. Tag: para
-#: performance.xml:971
-#, fuzzy, no-c-format
-msgid ""
-"This setting creates two new cache regions: one holding cached query result "
-"sets (<literal>org.hibernate.cache.StandardQueryCache</literal>), the
other "
-"holding timestamps of the most recent updates to queryable tables "
-"(<literal>org.hibernate.cache.UpdateTimestampsCache</literal>). Note
that "
-"the query cache does not cache the state of the actual entities in the "
-"result set; it caches only identifier values and results of value type. The "
-"query cache should always be used in conjunction with the second-level
cache."
-msgstr ""
-"该设置将会创建两个缓存区域 - 一个用于保存查询结果集(<literal>org.hibernate."
-"cache.StandardQueryCache</literal>); 另一个则用于保存最近查询的一系列表的时"
-"间戳(<literal>org.hibernate.cache.UpdateTimestampsCache</literal>)。
请注意:"
-"在查询缓存中,它并不缓存结果集中所包含的实体的确切状态;它只缓存这些实体的标"
-"识符属性的值、以及各值类型的结果。 所以查询缓存通常会和二级缓存一起使用。"
+#, no-c-format
+msgid "This setting creates two new cache regions: one holding cached query result
sets (<literal>org.hibernate.cache.StandardQueryCache</literal>), the other
holding timestamps of the most recent updates to queryable tables
(<literal>org.hibernate.cache.UpdateTimestampsCache</literal>). Note that the
query cache does not cache the state of the actual entities in the result set; it caches
only identifier values and results of value type. The query cache should always be used in
conjunction with the second-level cache."
+msgstr "该设置将会创建两个缓存区域 —
一个用于保存查询结果集(<literal>org.hibernate.cache.StandardQueryCache</literal>);
另一个则用于保存最近查询的一系列表的时间戳(<literal>org.hibernate.cache.UpdateTimestampsCache</literal>)。请注意:在查询缓存中,它并不缓存结果集中所包含的实体的确切状态;它只缓存这些实体的标识符属性的值、以及各值类型的结果。所以查询缓存通常会和二级缓存一起使用。
"
#. Tag: para
-#: performance.xml:981
-#, fuzzy, no-c-format
-msgid ""
-"Most queries do not benefit from caching, so by default, queries are not "
-"cached. To enable caching, call
<literal>Query.setCacheable(true)</literal>. "
-"This call allows the query to look for existing cache results or add its "
-"results to the cache when it is executed."
-msgstr ""
-"绝大多数的查询并不能从查询缓存中受益,所以Hibernate默认是不进行查询缓存的。如"
-"若需要进行缓存,请调用 <literal>Query.setCacheable(true)</literal>方法。这个"
-"调用会让查询在执行过程中时先从缓存中查找结果, 并将自己的结果集放到缓存中去。"
+#, no-c-format
+msgid "Most queries do not benefit from caching, so by default, queries are not
cached. To enable caching, call <literal>Query.setCacheable(true)</literal>.
This call allows the query to look for existing cache results or add its results to the
cache when it is executed."
+msgstr "绝大多数的查询并不能从查询缓存中受益,所以 Hibernate 默认是不进行查询缓存的。如若需要进行缓存,请调用
<literal>Query.setCacheable(true)</literal>方法。这个调用会让查询在执行过程中时先从缓存中查找结果,并将自己的结果集放到缓存中去。
"
#. Tag: para
-#: performance.xml:988
-#, fuzzy, 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 "
-"<literal>Query.setCacheRegion()</literal>."
-msgstr ""
-"如果你要对查询缓存的失效政策进行精确的控制,你必须调用<literal>Query."
-"setCacheRegion()</literal>方法, 为每个查询指定其命名的缓存区域。"
-
-#. Tag: programlisting
-#: performance.xml:994
#, no-c-format
-msgid ""
-"<![CDATA[List blogs = sess.createQuery(\"from Blog blog where blog.blogger
"
-"= :blogger\")\n"
-" .setEntity(\"blogger\", blogger)\n"
-" .setMaxResults(15)\n"
-" .setCacheable(true)\n"
-" .setCacheRegion(\"frontpages\")\n"
-" .list();]]>"
-msgstr ""
+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
<literal>Query.setCacheRegion()</literal>."
+msgstr "如果你要对查询缓存的失效政策进行精确的控制,你必须调用
<literal>Query.setCacheRegion()</literal> 方法,为每个查询指定其命名的缓存区域。 "
#. Tag: para
-#: performance.xml:996
#, no-c-format
-msgid ""
-"If the query should force a refresh of its query cache region, you should "
-"call <literal>Query.setCacheMode(CacheMode.REFRESH)</literal>. This is
"
-"particularly useful in cases where underlying data may have been updated via
"
-"a separate process (i.e., not modified through Hibernate) and allows the "
-"application to selectively refresh particular query result sets. This is a "
-"more efficient alternative to eviction of a query cache region via "
-"<literal>SessionFactory.evictQueries()</literal>."
-msgstr ""
-"如果查询需要强行刷新其查询缓存区域,那么你应该调用<literal>Query.setCacheMode"
-"(CacheMode.REFRESH)</literal>方法。 这对在其他进程中修改底层数据(例如,不通"
-"过Hibernate修改数据),或对那些需要选择性更新特定查询结果集的情况特别有用。 "
-"这是对<literal>SessionFactory.evictQueries()</literal>的更为有效的替代方案,"
-"同样可以清除查询缓存区域。"
+msgid "If the query should force a refresh of its query cache region, you should
call <literal>Query.setCacheMode(CacheMode.REFRESH)</literal>. This is
particularly useful in cases where underlying data may have been updated via a separate
process (i.e., not modified through Hibernate) and allows the application to selectively
refresh particular query result sets. This is a more efficient alternative to eviction of
a query cache region via
<literal>SessionFactory.evictQueries()</literal>."
+msgstr "如果查询需要强行刷新其查询缓存区域,那么你应该调用
<literal>Query.setCacheMode(CacheMode.REFRESH)</literal>方法。
这对在其他进程中修改底层数据(例如,不通过Hibernate修改数据),或对那些需要选择性更新特定查询结果集的情况特别有用。 这是对
<literal>SessionFactory.evictQueries()</literal>
的更为有效的替代方案,同样可以清除查询缓存区域。"
#. Tag: title
-#: performance.xml:1008
#, no-c-format
msgid "Understanding Collection performance"
msgstr "理解集合性能(Understanding Collection performance)"
#. Tag: para
-#: performance.xml:1010
#, 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
-#: performance.xml:1017
#, no-c-format
msgid "Taxonomy"
msgstr "分类(Taxonomy)"
#. Tag: para
-#: performance.xml:1019
#, no-c-format
msgid "Hibernate defines three basic kinds of collections:"
-msgstr "Hibernate定义了三种基本类型的集合:"
+msgstr "Hibernate 定义了三种基本类型的集合:"
#. Tag: para
-#: performance.xml:1023
#, no-c-format
msgid "collections of values"
msgstr "值数据集合"
#. Tag: para
-#: performance.xml:1026
-#, fuzzy, no-c-format
+#, no-c-format
msgid "one-to-many associations"
-msgstr "一对多关联"
+msgstr "一对多关联(One-to-many Associations) "
#. Tag: para
-#: performance.xml:1029
-#, fuzzy, no-c-format
+#, no-c-format
msgid "many-to-many associations"
-msgstr "多对多关联"
+msgstr "多对多关联 "
#. Tag: para
-#: performance.xml:1033
#, 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
-#: performance.xml:1044
#, no-c-format
msgid "indexed collections"
msgstr "有序集合类"
#. Tag: para
-#: performance.xml:1047
#, no-c-format
msgid "sets"
msgstr "集合(sets)"
#. Tag: para
-#: performance.xml:1050
#, no-c-format
msgid "bags"
-msgstr "包(bags)"
+msgstr "包(bags)"
#. Tag: para
-#: performance.xml:1054
-#, fuzzy, no-c-format
-msgid ""
-"All indexed collections (maps, lists, and arrays) have a primary key "
-"consisting of the <literal><key></literal> and
<literal><index></"
-"literal> 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)都拥有一个由<literal><key></"
-"literal>和 <literal><index></literal>组成的主键。
这种情况下集合类的更"
-"新是非常高效的——主键已经被有效的索引,因此当Hibernate试图更新或删除一行时,可"
-"以迅速找到该行数据。"
+#, no-c-format
+msgid "All indexed collections (maps, lists, and arrays) have a primary key
consisting of the <literal><key></literal> and
<literal><index></literal> 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)都拥有一个由
<literal><key></literal> 和
<literal><index></literal> 组成的主键。这种情况下集合类的更新是非常高效的 —
主键已经被有效的索引,因此当 Hibernate 试图更新或删除一行时,可以迅速找到该行数据。 "
#. Tag: para
-#: performance.xml:1062
-#, fuzzy, no-c-format
-msgid ""
-"Sets have a primary key consisting of
<literal><key></literal> 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 <literal>SchemaExport</literal> to actually create the primary key
of a "
-"<literal><set></literal>, you must declare all columns as
<literal>not-"
-"null=\"true\"</literal>."
-msgstr ""
-"集合(sets)的主键由<literal><key></literal>和其他元素字段构成。
对于有些"
-"元素类型来说,这很低效,特别是组合元素或者大文本、大二进制字段; 数据库可能无"
-"法有效的对复杂的主键进行索引。 另一方面,对于一对多、多对多关联,特别是合成的"
-"标识符来说,集合也可以达到同样的高效性能。( 附注:如果你希望"
-"<literal>SchemaExport</literal>为你的<literal><set></literal>创建主"
-"键, 你必须把所有的字段都声明为<literal>not-null=\"true\"</literal>。)"
+#, no-c-format
+msgid "Sets have a primary key consisting of
<literal><key></literal> 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
<literal>SchemaExport</literal> to actually create the primary key of a
<literal><set></literal>, you must declare all columns as
<literal>not-null=\"true\"</literal>."
+msgstr "集合(sets)的主键由 <literal><key></literal>
和其他元素字段构成。对于有些元素类型来说,这很低效,特别是组合元素或者大文本、大二进制字段;数据库可能无法有效的对复杂的主键进行索引。另一方面,对于一对多、多对多关联,特别是合成的标识符来说,集合也可以达到同样的高效性能。(
附注:如果你希望 <literal>SchemaExport</literal> 为你的
<literal><set></literal> 创建主键,你必须把所有的字段都声明为
<literal>not-null=\"true\"</literal>。) "
#. Tag: para
-#: performance.xml:1073
-#, fuzzy, no-c-format
-msgid ""
-"<literal><idbag></literal> mappings define a surrogate
key, so they "
-"are efficient to update. In fact, they are the best case."
-msgstr ""
-"<literal><idbag></literal>映射定义了代理键,因此它总是可以很高效的被更"
-"新。事实上, <literal><idbag></literal>拥有着最好的性能表现。"
+#, no-c-format
+msgid "<literal><idbag></literal> mappings define a
surrogate key, so they are efficient to update. In fact, they are the best case."
+msgstr "<literal><idbag></literal>
映射定义了代理键,因此它总是可以很高效的被更新。事实上,<literal><idbag></literal>
拥有着最好的性能表现。 "
#. Tag: para
-#: performance.xml:1078
-#, fuzzy, 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 <literal>DELETE</literal>
and "
-"recreating the collection whenever it changes. This can be inefficient."
-msgstr ""
-"Bag是最差的。因为bag允许重复的元素值,也没有索引字段,因此不可能定义主键。 "
-"Hibernate无法判断出重复的行。当这种集合被更改时,Hibernate将会先完整地移除 "
-"(通过一个(in a single <literal>DELETE</literal>))整个集合,然后再重新创建整"
-"个集合。 因此Bag是非常低效的。"
+#, 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 <literal>DELETE</literal> and recreating the collection
whenever it changes. This can be inefficient."
+msgstr "Bag 是最差的。因为 bag 允许重复的元素值,也没有索引字段,因此不可能定义主键。 Hibernate
无法判断出重复的行。当这种集合被更改时,Hibernate 将会先完整地移除 (通过一个(in a single
<literal>DELETE</literal>))整个集合,然后再重新创建整个集合。因此 Bag 是非常低效的。 "
#. Tag: para
-#: performance.xml:1086
-#, fuzzy, 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在集合的各数据行中是如"
-"何进行“定位”的。)"
+#, 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
在集合的各数据行中是如何进行“定位”的。) "
#. Tag: title
-#: performance.xml:1096
#, no-c-format
-msgid ""
-"Lists, maps, idbags and sets are the most efficient collections to update"
-msgstr "Lists, maps 和sets用于更新效率最高"
+msgid "Lists, maps, idbags and sets are the most efficient collections to
update"
+msgstr "Lists,maps 和 sets 用于更新效率最高"
#. Tag: para
-#: performance.xml:1098
-#, fuzzy, 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都可以在增加、删除、修改元素中"
-"拥有最好的性能。"
+#, 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 都可以在增加、删除、修改元素中拥有最好的性能。 "
#. Tag: para
-#: performance.xml:1104
-#, fuzzy, no-c-format
-msgid ""
-"There is, arguably, one more advantage that indexed collections have over "
-"sets for many-to-many associations or collections of values. Because of the "
-"structure of a <literal>Set</literal>, Hibernate does not
<literal>UPDATE</"
-"literal> a row when an element is \"changed\". Changes to a
<literal>Set</"
-"literal> always work via <literal>INSERT</literal> and
<literal>DELETE</"
-"literal> of individual rows. Once again, this consideration does not apply
"
-"to one-to-many associations."
-msgstr ""
-"可论证的是对于多对多关联、值数据集合而言,有序集合类比集合(set)有一个好处。因"
-"为<literal>Set</literal>的内在结构, 如果“改变”了一个元素,Hibernate并不会"
-"<literal>更新(UPDATE)</literal>这一行。
对于<literal>Set</literal>来说,只"
-"有在<literal>插入(INSERT)</literal>和<literal>删除(DELETE)</literal>
操作"
-"时“改变”才有效。再次强调:这段讨论对“一对多关联”并不适用。"
+#, no-c-format
+msgid "There is, arguably, one more advantage that indexed collections have over
sets for many-to-many associations or collections of values. Because of the structure of a
<literal>Set</literal>, Hibernate does not
<literal>UPDATE</literal> a row when an element is \"changed\".
Changes to a <literal>Set</literal> always work via
<literal>INSERT</literal> and <literal>DELETE</literal> of
individual rows. Once again, this consideration does not apply to one-to-many
associations."
+msgstr "可论证的是对于多对多关联、值数据集合而言,有序集合类比集合(set)有一个好处。因为
<literal>Set</literal> 的内在结构, 如果“改变”了一个元素,Hibernate
并不会<literal>更新(UPDATE)</literal>这一行。对于 <literal>Set</literal>
来说,只有在<literal>插入(INSERT)</literal>和<literal>删除(DELETE)</literal>
操作时“改变”才有效。再次强调:这段讨论对“一对多关联”并不适用。 "
#. Tag: para
-#: performance.xml:1113
-#, fuzzy, 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”的语义在关系模型中是最自然的。"
+#, 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”的语义在关系模型中是最自然的。 "
#. Tag: para
-#: performance.xml:1121
-#, fuzzy, no-c-format
-msgid ""
-"However, in well-designed Hibernate domain models, most collections are in "
-"fact one-to-many associations with
<literal>inverse=\"true\"</literal>. For "
-"these associations, the update is handled by the many-to-one end of the "
-"association, and so considerations of collection update performance simply "
-"do not apply."
-msgstr ""
-"但是,在设计良好的Hibernate领域模型中,我们通常可以看到更多的集合事实上是带有"
-"<literal>inverse=\"true\"</literal>
的一对多的关联。对于这些关联,更新操作将"
-"会在多对一的这一端进行处理。因此对于此类情况,无需考虑其集合的更新性能。"
+#, no-c-format
+msgid "However, in well-designed Hibernate domain models, most collections are in
fact one-to-many associations with
<literal>inverse=\"true\"</literal>. For these associations, the
update is handled by the many-to-one end of the association, and so considerations of
collection update performance simply do not apply."
+msgstr "但是,在设计良好的 Hibernate 领域模型中,我们通常可以看到更多的集合事实上是带有
<literal>inverse=\"true\"</literal>
的一对多的关联。对于这些关联,更新操作将会在多对一的这一端进行处理。因此对于此类情况,无需考虑其集合的更新性能。 "
#. Tag: title
-#: performance.xml:1131
#, no-c-format
msgid "Bags and lists are the most efficient inverse collections"
-msgstr "Bag和list是反向集合类中效率最高的"
+msgstr "Bag 和 list 是反向集合类中效率最高的"
#. Tag: para
-#: performance.xml:1133
-#, fuzzy, 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
<literal>inverse=\"true\"</"
-"literal>, the standard bidirectional one-to-many relationship idiom, for "
-"example, we can add elements to a bag or list without needing to initialize "
-"(fetch) the bag elements. This is because, unlike a
<literal>set</literal>, "
-"<literal>Collection.add()</literal> or
<literal>Collection.addAll()</"
-"literal> must always return true for a bag or
<literal>List</literal>. This "
-"can make the following common code much faster:"
-msgstr ""
-"在把bag扔进水沟之前,你必须了解,在一种情况下,bag的性能(包括list)要比set高得"
-"多:
对于指明了<literal>inverse=\"true\"</literal>的集合类(比如说,标准的双"
-"向的一对多关联), 我们可以在未初始化(fetch)包元素的情况下直接向bag或list添加"
-"新元素!
这是因为<literal>Collection.add()</literal>)或者<literal>Collection."
-"addAll()</literal> 方法 对bag或者List总是返回true(这点与与Set不同)。因此对"
-"于下面的相同代码来说,速度会快得多。"
-
-#. Tag: programlisting
-#: performance.xml:1143
#, no-c-format
-msgid ""
-"<![CDATA[Parent p = (Parent) sess.load(Parent.class, id);\n"
-"Child c = new Child();\n"
-"c.setParent(p);\n"
-"p.getChildren().add(c); //no need to fetch the collection!\n"
-"sess.flush();]]>"
-msgstr ""
+msgid "There is a particular case, however, in which bags, and also lists, are much
more performant than sets. For a collection with
<literal>inverse=\"true\"</literal>, the standard bidirectional
one-to-many relationship idiom, for example, we can add elements to a bag or list without
needing to initialize (fetch) the bag elements. This is because, unlike a
<literal>set</literal>, <literal>Collection.add()</literal> or
<literal>Collection.addAll()</literal> must always return true for a bag or
<literal>List</literal>. This can make the following common code much
faster:"
+msgstr "在把 bag 扔进水沟之前,你必须了解,在一种情况下,bag 的性能(包括list)要比 set 高得多:对于指明了
<literal>inverse=\"true\"</literal>
的集合类(比如说,标准的双向的一对多关联),我们可以在未初始化(fetch)包元素的情况下直接向 bag 或 list 添加新元素! 这是因为
<literal>Collection.add()</literal>)或者
<literal>Collection.addAll()</literal> 方法对 bag 或者 List 总是返回 true(这点与与 Set
不同)。因此对于下面的相同代码来说,速度会快得多。 "
#. Tag: title
-#: performance.xml:1148
#, no-c-format
msgid "One shot delete"
msgstr "一次性删除(One shot delete)"
#. Tag: para
-#: performance.xml:1150
-#, fuzzy, 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 <literal>list.clear()</literal>, for
example). In "
-"this case, Hibernate will issue a single
<literal>DELETE</literal>."
-msgstr ""
-"偶尔的,逐个删除集合类中的元素是相当低效的。Hibernate并没那么笨, 如果你想要"
-"把整个集合都删除(比如说调用list.clear()),Hibernate只需要一个DELETE就搞定"
-"了。"
+#, 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 <literal>list.clear()</literal>, for example). In this case,
Hibernate will issue a single <literal>DELETE</literal>."
+msgstr "偶尔的,逐个删除集合类中的元素是相当低效的。Hibernate 并没那么笨,如果你想要把整个集合都删除(比如说调用
list.clear()),Hibernate 只需要一个 DELETE 就搞定了。 "
#. Tag: para
-#: performance.xml:1157
-#, fuzzy, 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 <literal>INSERT</literal>
"
-"statement and two <literal>DELETE</literal> statements, unless the
"
-"collection is a bag. This is certainly desirable."
-msgstr ""
-"假设我们在一个长度为20的集合类中新增加了一个元素,然后再删除两个。 Hibernate"
-"会安排一条<literal>INSERT</literal>语句和两条<literal>DELETE</literal>语句"
-"(除非集合类是一个bag)。 这当然是显而易见的。"
+#, 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 <literal>INSERT</literal>
statement and two <literal>DELETE</literal> statements, unless the collection
is a bag. This is certainly desirable."
+msgstr "假设我们在一个长度为20的集合类中新增加了一个元素,然后再删除两个。Hibernate 会安排一条
<literal>INSERT</literal> 语句和两条 <literal>DELETE</literal>
语句(除非集合类是一个 bag)。这当然是令人满意的。 "
#. Tag: para
-#: performance.xml:1163
#, 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
-#: performance.xml:1170
#, no-c-format
msgid "delete eighteen rows one by one and then insert three rows"
-msgstr "逐一的删除这18个数据,再新增三个;"
+msgstr "逐一的删除这 18 个数据,再新增三个;"
#. Tag: para
-#: performance.xml:1173
-#, fuzzy, no-c-format
-msgid ""
-"remove the whole collection in one SQL <literal>DELETE</literal> and
insert "
-"all five current elements one by one"
-msgstr "删除整个集合类(只用一句DELETE语句),然后增加5个数据。"
+#, no-c-format
+msgid "remove the whole collection in one SQL <literal>DELETE</literal>
and insert all five current elements one by one"
+msgstr "删除整个集合类(只用一句 DELETE 语句),然后逐一添加 5 个数据。"
#. Tag: para
-#: performance.xml:1178
-#, fuzzy, 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不这么聪"
-"明也是好事,否则可能会引发意外的“数据库触发器”之类的问题。)"
+#, 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
不这么聪明也是好事,否则可能会引发意外的“数据库触发器”之类的问题。)"
#. Tag: para
-#: performance.xml:1184
-#, fuzzy, 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 ""
-"幸运的是,你可以强制使用第二种策略。你需要取消原来的整个集合类(解除其引"
-"用), 然后再返回一个新的实例化的集合类,只包含需要的元素。有些时候这是非常有"
-"用的。"
+#, 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
"幸运的是,你可以强制使用第二种策略。你需要取消原来的整个集合类(解除其引用),然后再返回一个新的实例化的集合类,只包含需要的元素。有些时候这是非常有用的。
"
#. Tag: para
-#: performance.xml:1190
-#, fuzzy, no-c-format
-msgid ""
-"One-shot-delete does not apply to collections mapped
<literal>inverse=\"true"
-"\"</literal>."
-msgstr ""
-"显然,一次性删除并不适用于被映射为<literal>inverse=\"true\"</literal>的集合。"
+#, no-c-format
+msgid "One-shot-delete does not apply to collections mapped
<literal>inverse=\"true\"</literal>."
+msgstr "显然,一次性删除并不适用于被映射为 <literal>inverse=\"true\"</literal>
的集合。 "
#. Tag: title
-#: performance.xml:1199
#, no-c-format
msgid "Monitoring performance"
msgstr "监测性能(Monitoring performance)"
#. Tag: para
-#: performance.xml:1201
#, no-c-format
-msgid ""
-"Optimization is not much use without monitoring and access to performance "
-"numbers. Hibernate provides a full range of figures about its internal "
-"operations. Statistics in Hibernate are available per "
-"<literal>SessionFactory</literal>."
-msgstr ""
-"没有监测和性能参数而进行优化是毫无意义的。Hibernate为其内部操作提供了一系列的"
-"示意图,因此可以从 每个<literal>SessionFactory</literal>抓取其统计数据。"
+msgid "Optimization is not much use without monitoring and access to performance
numbers. Hibernate provides a full range of figures about its internal operations.
Statistics in Hibernate are available per
<literal>SessionFactory</literal>."
+msgstr "没有监测和性能参数而进行优化是毫无意义的。Hibernate 为其内部操作提供了一系列的示意图,因此可以从 每个
<literal>SessionFactory</literal> 抓取其统计数据。"
#. Tag: title
-#: performance.xml:1208
#, no-c-format
msgid "Monitoring a SessionFactory"
-msgstr "监测SessionFactory"
+msgstr "监测 SessionFactory"
#. Tag: para
-#: performance.xml:1210
#, no-c-format
-msgid ""
-"You can access <literal>SessionFactory</literal> metrics in two ways.
Your "
-"first option is to call
<literal>sessionFactory.getStatistics()</literal> "
-"and read or display the <literal>Statistics</literal> yourself."
-msgstr ""
-"你可以有两种方式访问<literal>SessionFactory</literal>的数据记录,第一种就是自"
-"己直接调用 <literal>sessionFactory.getStatistics()</literal>方法读取、显示"
-"<literal>统计</literal>数据。"
+msgid "You can access <literal>SessionFactory</literal> metrics in two
ways. Your first option is to call
<literal>sessionFactory.getStatistics()</literal> and read or display the
<literal>Statistics</literal> yourself."
+msgstr "你可以有两种方式访问 <literal>SessionFactory</literal> 的数据记录,第一种就是自己直接调用
<literal>sessionFactory.getStatistics()</literal>
方法读取、显示<literal>统计</literal>数据。"
#. Tag: para
-#: performance.xml:1216
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate can also use JMX to publish metrics if you enable the "
-"<literal>StatisticsService</literal> MBean. You can enable a single
MBean "
-"for all your <literal>SessionFactory</literal> or one per factory. See
the "
-"following code for minimalistic configuration examples:"
-msgstr ""
-"此外,如果你打开<literal>StatisticsService</literal> MBean选项,那么Hibernate"
-"则可以使用JMX技术 发布其数据记录。你可以让应用中所有的"
-"<literal>SessionFactory</literal>同时共享一个MBean,也可以每个
SessionFactory"
-"分配一个MBean。下面的代码即是其演示代码:"
-
-#. Tag: programlisting
-#: performance.xml:1223
#, no-c-format
-msgid ""
-"<![CDATA[// MBean service registration for a specific SessionFactory\n"
-"Hashtable tb = new Hashtable();\n"
-"tb.put(\"type\", \"statistics\");\n"
-"tb.put(\"sessionFactory\", \"myFinancialApp\");\n"
-"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object
name\n"
-"\n"
-"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
-"stats.setSessionFactory(sessionFactory); // Bind the stats to a "
-"SessionFactory\n"
-"server.registerMBean(stats, on); // Register the Mbean on the server]]>"
-msgstr ""
+msgid "Hibernate can also use JMX to publish metrics if you enable the
<literal>StatisticsService</literal> MBean. You can enable a single MBean for
all your <literal>SessionFactory</literal> or one per factory. See the
following code for minimalistic configuration examples:"
+msgstr "此外,如果你打开 <literal>StatisticsService</literal> MBean 选项,那么
Hibernate 则可以使用 JMX 技术 发布其数据记录。你可以让应用中所有的 <literal>SessionFactory</literal>
同时共享一个 MBean,也可以每个 SessionFactory 分配一个 MBean。下面的代码即是其演示代码: "
-#. Tag: programlisting
-#: performance.xml:1226
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[// MBean service registration for all SessionFactory's\n"
-"Hashtable tb = new Hashtable();\n"
-"tb.put(\"type\", \"statistics\");\n"
-"tb.put(\"sessionFactory\", \"all\");\n"
-"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object
name\n"
-"\n"
-"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
-"server.registerMBean(stats, on); // Register the MBean on the server]]>"
-msgstr ""
+msgid "You can activate and deactivate the monitoring for a
<literal>SessionFactory</literal>:"
+msgstr "你可以通过以下方法打开或关闭 <literal>SessionFactory</literal> 的监测功能: "
#. Tag: para
-#: performance.xml:1233
-#, fuzzy, no-c-format
-msgid ""
-"You can activate and deactivate the monitoring for a "
-"<literal>SessionFactory</literal>:"
-msgstr ""
-"你可以通过以下方法打开或关闭<literal>SessionFactory</literal>的监测功能:"
+#, no-c-format
+msgid "at configuration time, set
<literal>hibernate.generate_statistics</literal> to
<literal>false</literal>"
+msgstr "在配置期间,将 <literal>hibernate.generate_statistics</literal> 设置为
<literal>true</literal> 或 <literal>false</literal>;"
#. Tag: para
-#: performance.xml:1238
#, no-c-format
-msgid ""
-"at configuration time, set
<literal>hibernate.generate_statistics</literal> "
-"to <literal>false</literal>"
-msgstr ""
-"在配置期间,将<literal>hibernate.generate_statistics</literal>设置为"
-"<literal>true</literal>或<literal>false</literal>;"
+msgid "at runtime:
<literal>sf.getStatistics().setStatisticsEnabled(true)</literal> or
<literal>hibernateStatsBean.setStatisticsEnabled(true)</literal>"
+msgstr "在运行期间,则可以可以通过
<literal>sf.getStatistics().setStatisticsEnabled(true)</literal> 或
<literal>hibernateStatsBean.setStatisticsEnabled(true)</literal>"
#. Tag: para
-#: performance.xml:1245
#, no-c-format
-msgid ""
-"at runtime:
<literal>sf.getStatistics().setStatisticsEnabled(true)</literal> "
-"or
<literal>hibernateStatsBean.setStatisticsEnabled(true)</literal>"
-msgstr ""
-"在运行期间,则可以可以通过<literal>sf.getStatistics().setStatisticsEnabled"
-"(true)</literal>
或<literal>hibernateStatsBean.setStatisticsEnabled(true)</"
-"literal>"
+msgid "Statistics can be reset programmatically using the
<literal>clear()</literal> method. A summary can be sent to a logger (info
level) using the <literal>logSummary()</literal> method."
+msgstr "你也可以在程序中调用 <literal>clear()</literal> 方法重置统计数据,调用
<literal>logSummary()</literal> 在日志中记录(info 级别)其总结。 "
-#. Tag: para
-#: performance.xml:1252
-#, fuzzy, no-c-format
-msgid ""
-"Statistics can be reset programmatically using the
<literal>clear()</"
-"literal> method. A summary can be sent to a logger (info level) using the
"
-"<literal>logSummary()</literal> method."
-msgstr ""
-"你也可以在程序中调用<literal>clear()</literal>方法重置统计数据,调用"
-"<literal>logSummary()</literal> 在日志中记录(info级别)其总结。"
-
#. Tag: title
-#: performance.xml:1261
#, no-c-format
msgid "Metrics"
msgstr "数据记录(Metrics)"
#. Tag: para
-#: performance.xml:1263
-#, fuzzy, 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 <literal>Statistics</literal>
"
-"interface API, in three categories:"
-msgstr ""
-"Hibernate提供了一系列数据记录,其记录的内容包括从最基本的信息到与具体场景的特"
-"殊信息。所有的测量值都可以由 <literal>Statistics</literal>接口进行访问,主要"
-"分为三类:"
+#, 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 <literal>Statistics</literal> interface API, in three
categories:"
+msgstr "Hibernate 提供了一系列数据记录,其记录的内容包括从最基本的信息到与具体场景的特殊信息。所有的测量值都可以由
<literal>Statistics</literal> 接口 API 进行访问,主要分为三类:"
#. Tag: para
-#: performance.xml:1270
#, no-c-format
-msgid ""
-"Metrics related to the general <literal>Session</literal> usage, such
as "
-"number of open sessions, retrieved JDBC connections, etc."
-msgstr ""
-"使用<literal>Session</literal>的普通数据记录,例如打开的Session的个数、取得的"
-"JDBC的连接数等;"
+msgid "Metrics related to the general <literal>Session</literal> usage,
such as number of open sessions, retrieved JDBC connections, etc."
+msgstr "使用 <literal>Session</literal> 的普通数据记录,例如打开的 Session 的个数、取得的 JDBC
的连接数等;"
#. Tag: para
-#: performance.xml:1276
-#, fuzzy, no-c-format
-msgid ""
-"Metrics related to the entities, collections, queries, and caches as a whole
"
-"(aka global metrics)."
-msgstr "实体、集合、查询、缓存等内容的统一数据记录"
+#, no-c-format
+msgid "Metrics related to the entities, collections, queries, and caches as a whole
(aka global metrics)."
+msgstr "实体、集合、查询、缓存等内容的统一数据记录。"
#. Tag: para
-#: performance.xml:1282
#, 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
-#: performance.xml:1289
-#, fuzzy, 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秒。"
+#, 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 秒。 "
#. Tag: para
-#: performance.xml:1296
-#, fuzzy, no-c-format
-msgid ""
-"Simple getters are used to access the global metrics (i.e. not tied to a "
-"particular entity, collection, cache region, etc.). You can access the "
-"metrics of a particular entity, collection or cache region through its name,
"
-"and through its HQL or SQL representation for queries. Please refer to the "
-"<literal>Statistics</literal>,
<literal>EntityStatistics</literal>, "
-"<literal>CollectionStatistics</literal>, "
-"<literal>SecondLevelCacheStatistics</literal>, and
<literal>QueryStatistics</"
-"literal> API Javadoc for more information. The following code is a simple
"
-"example:"
-msgstr ""
-"你可以直接使用getter方法得到全局数据记录(例如,和具体的实体、集合、缓存区无"
-"关的数据),你也可以在具体查询中通过标记实体名、 或HQL、SQL语句得到某实体的数"
-"据记录。请参考<literal>Statistics</literal>、<literal>EntityStatistics</"
-"literal>、 <literal>CollectionStatistics</literal>、"
-"<literal>SecondLevelCacheStatistics</literal>、
和<literal>QueryStatistics</"
-"literal>的API文档以抓取更多信息。下面的代码则是个简单的例子:"
-
-#. Tag: programlisting
-#: performance.xml:1306
#, no-c-format
-msgid ""
-"<![CDATA[Statistics stats =
HibernateUtil.sessionFactory.getStatistics();\n"
-"\n"
-"double queryCacheHitCount = stats.getQueryCacheHitCount();\n"
-"double queryCacheMissCount = stats.getQueryCacheMissCount();\n"
-"double queryCacheHitRatio =\n"
-" queryCacheHitCount / (queryCacheHitCount + queryCacheMissCount);\n"
-"\n"
-"log.info(\"Query Hit ratio:\" + queryCacheHitRatio);\n"
-"\n"
-"EntityStatistics entityStats =\n"
-" stats.getEntityStatistics( Cat.class.getName() );\n"
-"long changes =\n"
-" entityStats.getInsertCount()\n"
-" + entityStats.getUpdateCount()\n"
-" + entityStats.getDeleteCount();\n"
-"log.info(Cat.class.getName() + \" changed \" + changes +
\"times\" );]]>"
-msgstr ""
+msgid "Simple getters are used to access the global metrics (i.e. not tied to a
particular entity, collection, cache region, etc.). You can access the metrics of a
particular entity, collection or cache region through its name, and through its HQL or SQL
representation for queries. Please refer to the <literal>Statistics</literal>,
<literal>EntityStatistics</literal>,
<literal>CollectionStatistics</literal>,
<literal>SecondLevelCacheStatistics</literal>, and
<literal>QueryStatistics</literal> API Javadoc for more information. The
following code is a simple example:"
+msgstr "你可以直接使用 getter 方法得到全局数据记录(例如,和具体的实体、集合、缓存区无关的数据),你也可以在具体查询中通过标记实体名、 或
HQL、SQL 语句得到某实体的数据记录。请参考
<literal>Statistics</literal>、<literal>EntityStatistics</literal>、<literal>CollectionStatistics</literal>、<literal>SecondLevelCacheStatistics</literal>
和 <literal>QueryStatistics</literal> 的 API 文档以抓取更多信息。下面的代码则是个简单的例子: "
#. Tag: para
-#: performance.xml:1308
-#, fuzzy, 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: <literal>getQueries()</literal>,
"
-"<literal>getEntityNames()</literal>,
<literal>getCollectionRoleNames()</"
-"literal>, and
<literal>getSecondLevelCacheRegionNames()</literal>."
-msgstr ""
-"如果你想得到所有实体、集合、查询和缓存区的数据,你可以通过以下方法获得实体、"
-"集合、查询和缓存区列表: <literal>getQueries()</literal>、"
-"<literal>getEntityNames()</literal>、
<literal>getCollectionRoleNames()</"
-"literal>和
<literal>getSecondLevelCacheRegionNames()</literal>。"
+#, 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: <literal>getQueries()</literal>,
<literal>getEntityNames()</literal>,
<literal>getCollectionRoleNames()</literal>, and
<literal>getSecondLevelCacheRegionNames()</literal>."
+msgstr
"如果你想得到所有实体、集合、查询和缓存区的数据,你可以通过以下方法获得实体、集合、查询和缓存区列表:<literal>getQueries()</literal>、<literal>getEntityNames()</literal>、<literal>getCollectionRoleNames()</literal>
和 <literal>getSecondLevelCacheRegionNames()</literal>。"
#~ msgid ""
-#~ "where <literal>CatImpl</literal> implements the interface
<literal>Cat</"
-#~ "literal> and <literal>DomesticCatImpl</literal> implements the
interface "
-#~ "<literal>DomesticCat</literal>. Then proxies for instances of
"
-#~ "<literal>Cat</literal> and
<literal>DomesticCat</literal> may be returned "
-#~ "by <literal>load()</literal> or
<literal>iterate()</literal>. (Note that "
-#~ "<literal>list()</literal> does not usually return proxies.)"
+#~ "<![CDATA[s = sessions.openSession();\n"
+#~ "Transaction tx = s.beginTransaction();\n"
+#~ " \n"
+#~ "User u = (User) s.createQuery(\"from User u where
u.name=:userName\")\n"
+#~ " .setString(\"userName\", userName).uniqueResult();\n"
+#~ "Map permissions = u.getPermissions();\n"
+#~ "\n"
+#~ "tx.commit();\n"
+#~ "s.close();\n"
+#~ "\n"
+#~ "Integer accessLevel = (Integer) permissions.get(\"accounts\"); //
"
+#~ "Error!]]>"
#~ msgstr ""
-#~ "这里<literal>CatImpl</literal>实现了<literal>Cat</literal>接口,
"
-#~
"<literal>DomesticCatImpl</literal>实现<literal>DomesticCat</literal>接"
-#~ "口。
在<literal>load()</literal>、<literal>iterate()</literal>方法中就会返"
-#~ "回
<literal>Cat</literal>和<literal>DomesticCat</literal>的代理对象。
(注"
-#~ "意<literal>list()</literal>并不会返回代理对象。)"
-
+#~ "<![CDATA[s = sessions.openSession();\n"
+#~ "Transaction tx = s.beginTransaction();\n"
+#~ " \n"
+#~ "User u = (User) s.createQuery(\"from User u where
u.name=:userName\")\n"
+#~ " .setString(\"userName\", userName).uniqueResult();\n"
+#~ "Map permissions = u.getPermissions();\n"
+#~ "\n"
+#~ "tx.commit();\n"
+#~ "s.close();\n"
+#~ "\n"
+#~ "Integer accessLevel = (Integer) permissions.get(\"accounts\"); //
"
+#~ "Error!]]>"
#~ msgid ""
-#~ "We've already spent quite some time talking about collections. In this
"
-#~ "section we will highlight a couple more issues about how collections "
-#~ "behave at runtime."
+#~ "<![CDATA[<set name=\"permissions\" \n"
+#~ " fetch=\"join\">\n"
+#~ " <key column=\"userId\"/>\n"
+#~ " <one-to-many class=\"Permission\"/>\n"
+#~ "</set]]>"
#~ msgstr ""
-#~ "前面我们已经对集合进行了足够的讨论。本段中,我们将着重讲述集合在运行时的事"
-#~ "宜。"
-
+#~ "<![CDATA[<set name=\"permissions\" \n"
+#~ " fetch=\"join\">\n"
+#~ " <key column=\"userId\"/>\n"
+#~ " <one-to-many class=\"Permission\"/>\n"
+#~ "</set]]>"
#~ msgid ""
-#~ "TODO: This doesn't make sense: In the first case, we retrieve and use the
"
-#~ "MBean directly. In the second one, we must give the JNDI name in which "
-#~ "the session factory is held before using it. Use "
-#~
"<literal>hibernateStatsBean.setSessionFactoryJNDIName(\"my/JNDI/Name\")</"
-#~ "literal>"
+#~ "<![CDATA[<many-to-one name=\"mother\" class=\"Cat\"
fetch=\"join\"/>]]>"
#~ msgstr ""
-#~ "TODO:仍需要说明的是:在第一个例子中,我们直接得到和使用MBean;而在第二个"
-#~ "例子中,在使用MBean之前 我们则需要给出SessionFactory的JNDI名,使用"
-#~
"<literal>hibernateStatsBean.setSessionFactoryJNDIName(\"my/JNDI/Name\")</"
-#~ "literal> 得到SessionFactory,然后将MBean保存于其中。"
+#~ "<![CDATA[<many-to-one name=\"mother\" class=\"Cat\"
fetch=\"join\"/>]]>"
+#~ msgid ""
+#~ "<![CDATA[User user = (User) session.createCriteria(User.class)\n"
+#~ " .setFetchMode(\"permissions\",
FetchMode.JOIN)\n"
+#~ " .add( Restrictions.idEq(userId) )\n"
+#~ " .uniqueResult();]]>"
+#~ msgstr ""
+#~ "<![CDATA[User user = (User) session.createCriteria(User.class)\n"
+#~ " .setFetchMode(\"permissions\",
FetchMode.JOIN)\n"
+#~ " .add( Restrictions.idEq(userId) )\n"
+#~ " .uniqueResult();]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Cat\"
proxy=\"Cat\">\n"
+#~ " ......\n"
+#~ " <subclass name=\"DomesticCat\">\n"
+#~ " .....\n"
+#~ " </subclass>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Cat\"
proxy=\"Cat\">\n"
+#~ " ......\n"
+#~ " <subclass name=\"DomesticCat\">\n"
+#~ " .....\n"
+#~ " </subclass>\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[Cat cat = (Cat) session.load(Cat.class, id); // instantiate a
"
+#~ "proxy (does not hit the db)\n"
+#~ "if ( cat.isDomesticCat() ) { // hit the db to initialize
"
+#~ "the proxy\n"
+#~ " DomesticCat dc = (DomesticCat) cat; // Error!\n"
+#~ " ....\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[Cat cat = (Cat) session.load(Cat.class, id); // instantiate a
"
+#~ "proxy (does not hit the db)\n"
+#~ "if ( cat.isDomesticCat() ) { // hit the db to initialize
"
+#~ "the proxy\n"
+#~ " DomesticCat dc = (DomesticCat) cat; // Error!\n"
+#~ " ....\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[Cat cat = (Cat) session.load(Cat.class, id); // "
+#~ "instantiate a Cat proxy\n"
+#~ "DomesticCat dc = \n"
+#~ " (DomesticCat) session.load(DomesticCat.class, id); // acquire "
+#~ "new DomesticCat proxy!\n"
+#~ "System.out.println(cat==dc); // false]]>"
+#~ msgstr ""
+#~ "<![CDATA[Cat cat = (Cat) session.load(Cat.class, id); // "
+#~ "instantiate a Cat proxy\n"
+#~ "DomesticCat dc = \n"
+#~ " (DomesticCat) session.load(DomesticCat.class, id); // acquire "
+#~ "new DomesticCat proxy!\n"
+#~ "System.out.println(cat==dc); // false]]>"
+#~ msgid ""
+#~ "<![CDATA[cat.setWeight(11.0); // hit the db to initialize the proxy\n"
+#~ "System.out.println( dc.getWeight() ); // 11.0]]>"
+#~ msgstr ""
+#~ "<![CDATA[cat.setWeight(11.0); // hit the db to initialize the proxy\n"
+#~ "System.out.println( dc.getWeight() ); // 11.0]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"CatImpl\"
proxy=\"Cat\">\n"
+#~ " ......\n"
+#~ " <subclass name=\"DomesticCatImpl\"
proxy=\"DomesticCat\">\n"
+#~ " .....\n"
+#~ " </subclass>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"CatImpl\"
proxy=\"Cat\">\n"
+#~ " ......\n"
+#~ " <subclass name=\"DomesticCatImpl\"
proxy=\"DomesticCat\">\n"
+#~ " .....\n"
+#~ " </subclass>\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[Cat cat = (Cat) session.load(CatImpl.class, catid);\n"
+#~ "Iterator iter = session.createQuery(\"from CatImpl as cat where cat."
+#~ "name='fritz'\").iterate();\n"
+#~ "Cat fritz = (Cat) iter.next();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Cat cat = (Cat) session.load(CatImpl.class, catid);\n"
+#~ "Iterator iter = session.createQuery(\"from CatImpl as cat where cat."
+#~ "name='fritz'\").iterate();\n"
+#~ "Cat fritz = (Cat) iter.next();]]>"
+#~ msgid ""
+#~ "<![CDATA[( (Integer) s.createFilter( collection, \"select
count(*)\" )."
+#~ "list().get(0) ).intValue()]]>"
+#~ msgstr ""
+#~ "<![CDATA[( (Integer) s.createFilter( collection, \"select
count(*)\" )."
+#~ "list().get(0) ).intValue()]]>"
+#~ msgid ""
+#~ "<![CDATA[s.createFilter( lazyCollection,
\"\").setFirstResult(0)."
+#~ "setMaxResults(10).list();]]>"
+#~ msgstr ""
+#~ "<![CDATA[s.createFilter( lazyCollection,
\"\").setFirstResult(0)."
+#~ "setMaxResults(10).list();]]>"
+#~ msgid "<![CDATA[<class name=\"Person\"
batch-size=\"10\">...</class>]]>"
+#~ msgstr "<![CDATA[<class name=\"Person\"
batch-size=\"10\">...</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <set name=\"cats\" batch-size=\"3\">\n"
+#~ " ...\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <set name=\"cats\" batch-size=\"3\">\n"
+#~ " ...\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Document\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\" not-null=\"true\"
length=\"50\"/>\n"
+#~ " <property name=\"summary\" not-null=\"true\"
length=\"200\" lazy="
+#~ "\"true\"/>\n"
+#~ " <property name=\"text\" not-null=\"true\"
length=\"2000\" lazy=\"true"
+#~ "\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Document\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\" not-null=\"true\"
length=\"50\"/>\n"
+#~ " <property name=\"summary\" not-null=\"true\"
length=\"200\" lazy="
+#~ "\"true\"/>\n"
+#~ " <property name=\"text\" not-null=\"true\"
length=\"2000\" lazy=\"true"
+#~ "\"/>\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<target name=\"instrument\"
depends=\"compile\">\n"
+#~ " <taskdef name=\"instrument\"
classname=\"org.hibernate.tool."
+#~ "instrument.InstrumentTask\">\n"
+#~ " <classpath path=\"${jar.path}\"/>\n"
+#~ " <classpath path=\"${classes.dir}\"/>\n"
+#~ " <classpath refid=\"lib.class.path\"/>\n"
+#~ " </taskdef>\n"
+#~ "\n"
+#~ " <instrument verbose=\"true\">\n"
+#~ " <fileset
dir=\"${testclasses.dir}/org/hibernate/auction/model\">\n"
+#~ " <include name=\"*.class\"/>\n"
+#~ " </fileset>\n"
+#~ " </instrument>\n"
+#~ "</target>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<target name=\"instrument\"
depends=\"compile\">\n"
+#~ " <taskdef name=\"instrument\"
classname=\"org.hibernate.tool."
+#~ "instrument.InstrumentTask\">\n"
+#~ " <classpath path=\"${jar.path}\"/>\n"
+#~ " <classpath path=\"${classes.dir}\"/>\n"
+#~ " <classpath refid=\"lib.class.path\"/>\n"
+#~ " </taskdef>\n"
+#~ "\n"
+#~ " <instrument verbose=\"true\">\n"
+#~ " <fileset
dir=\"${testclasses.dir}/org/hibernate/auction/model\">\n"
+#~ " <include name=\"*.class\"/>\n"
+#~ " </fileset>\n"
+#~ " </instrument>\n"
+#~ "</target>]]>"
+#~ msgid "<entry>yes</entry>"
+#~ msgstr "<entry>yes</entry>"
+#~ msgid ""
+#~ "<![CDATA[<cache \n"
+#~ "
usage=\"transactional|read-write|nonstrict-read-write|read-only\"\n"
+#~ " region=\"RegionName\"\n"
+#~ " include=\"all|non-lazy\"\n"
+#~ "/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<cache \n"
+#~ "
usage=\"transactional|read-write|nonstrict-read-write|read-only\"\n"
+#~ " region=\"RegionName\"\n"
+#~ " include=\"all|non-lazy\"\n"
+#~ "/>]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"eg.Immutable\"
mutable=\"false\">\n"
+#~ " <cache usage=\"read-only\"/>\n"
+#~ " ....\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"eg.Immutable\"
mutable=\"false\">\n"
+#~ " <cache usage=\"read-only\"/>\n"
+#~ " ....\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"eg.Cat\" .... >\n"
+#~ " <cache usage=\"read-write\"/>\n"
+#~ " ....\n"
+#~ " <set name=\"kittens\" ... >\n"
+#~ " <cache usage=\"read-write\"/>\n"
+#~ " ....\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"eg.Cat\" .... >\n"
+#~ " <cache usage=\"read-write\"/>\n"
+#~ " ....\n"
+#~ " <set name=\"kittens\" ... >\n"
+#~ " <cache usage=\"read-write\"/>\n"
+#~ " ....\n"
+#~ " </set>\n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[ScrollableResult cats = sess.createQuery(\"from Cat as
cat\")."
+#~ "scroll(); //a huge result set\n"
+#~ "while ( cats.next() ) {\n"
+#~ " Cat cat = (Cat) cats.get(0);\n"
+#~ " doSomethingWithACat(cat);\n"
+#~ " sess.evict(cat);\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[ScrollableResult cats = sess.createQuery(\"from Cat as
cat\")."
+#~ "scroll(); //a huge result set\n"
+#~ "while ( cats.next() ) {\n"
+#~ " Cat cat = (Cat) cats.get(0);\n"
+#~ " doSomethingWithACat(cat);\n"
+#~ " sess.evict(cat);\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[sessionFactory.evict(Cat.class, catId); //evict a particular "
+#~ "Cat\n"
+#~ "sessionFactory.evict(Cat.class); //evict all Cats\n"
+#~ "sessionFactory.evictCollection(\"Cat.kittens\", catId); //evict a
"
+#~ "particular collection of kittens\n"
+#~ "sessionFactory.evictCollection(\"Cat.kittens\"); //evict all kitten
"
+#~ "collections]]>"
+#~ msgstr ""
+#~ "<![CDATA[sessionFactory.evict(Cat.class, catId); //evict a particular "
+#~ "Cat\n"
+#~ "sessionFactory.evict(Cat.class); //evict all Cats\n"
+#~ "sessionFactory.evictCollection(\"Cat.kittens\", catId); //evict a
"
+#~ "particular collection of kittens\n"
+#~ "sessionFactory.evictCollection(\"Cat.kittens\"); //evict all kitten
"
+#~ "collections]]>"
+#~ msgid ""
+#~ "<![CDATA[Map cacheEntries = sessionFactory.getStatistics()\n"
+#~ " .getSecondLevelCacheStatistics(regionName)\n"
+#~ " .getEntries();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Map cacheEntries = sessionFactory.getStatistics()\n"
+#~ " .getSecondLevelCacheStatistics(regionName)\n"
+#~ " .getEntries();]]>"
+#~ msgid ""
+#~ "<![CDATA[hibernate.generate_statistics true\n"
+#~ "hibernate.cache.use_structured_entries true]]>"
+#~ msgstr ""
+#~ "<![CDATA[hibernate.generate_statistics true\n"
+#~ "hibernate.cache.use_structured_entries true]]>"
+#~ msgid "<![CDATA[hibernate.cache.use_query_cache true]]>"
+#~ msgstr "<![CDATA[hibernate.cache.use_query_cache true]]>"
+#~ msgid ""
+#~ "<![CDATA[List blogs = sess.createQuery(\"from Blog blog where
blog."
+#~ "blogger = :blogger\")\n"
+#~ " .setEntity(\"blogger\", blogger)\n"
+#~ " .setMaxResults(15)\n"
+#~ " .setCacheable(true)\n"
+#~ " .setCacheRegion(\"frontpages\")\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "<![CDATA[List blogs = sess.createQuery(\"from Blog blog where
blog."
+#~ "blogger = :blogger\")\n"
+#~ " .setEntity(\"blogger\", blogger)\n"
+#~ " .setMaxResults(15)\n"
+#~ " .setCacheable(true)\n"
+#~ " .setCacheRegion(\"frontpages\")\n"
+#~ " .list();]]>"
+#~ msgid ""
+#~ "<![CDATA[Parent p = (Parent) sess.load(Parent.class, id);\n"
+#~ "Child c = new Child();\n"
+#~ "c.setParent(p);\n"
+#~ "p.getChildren().add(c); //no need to fetch the collection!\n"
+#~ "sess.flush();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Parent p = (Parent) sess.load(Parent.class, id);\n"
+#~ "Child c = new Child();\n"
+#~ "c.setParent(p);\n"
+#~ "p.getChildren().add(c); //no need to fetch the collection!\n"
+#~ "sess.flush();]]>"
+#~ msgid ""
+#~ "<![CDATA[// MBean service registration for a specific SessionFactory\n"
+#~ "Hashtable tb = new Hashtable();\n"
+#~ "tb.put(\"type\", \"statistics\");\n"
+#~ "tb.put(\"sessionFactory\", \"myFinancialApp\");\n"
+#~ "ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object
name\n"
+#~ "\n"
+#~ "StatisticsService stats = new StatisticsService(); // MBean "
+#~ "implementation\n"
+#~ "stats.setSessionFactory(sessionFactory); // Bind the stats to a "
+#~ "SessionFactory\n"
+#~ "server.registerMBean(stats, on); // Register the Mbean on the
server]]>"
+#~ msgstr ""
+#~ "<![CDATA[// MBean service registration for a specific SessionFactory\n"
+#~ "Hashtable tb = new Hashtable();\n"
+#~ "tb.put(\"type\", \"statistics\");\n"
+#~ "tb.put(\"sessionFactory\", \"myFinancialApp\");\n"
+#~ "ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object
name\n"
+#~ "\n"
+#~ "StatisticsService stats = new StatisticsService(); // MBean "
+#~ "implementation\n"
+#~ "stats.setSessionFactory(sessionFactory); // Bind the stats to a "
+#~ "SessionFactory\n"
+#~ "server.registerMBean(stats, on); // Register the Mbean on the
server]]>"
+#~ msgid ""
+#~ "<![CDATA[// MBean service registration for all SessionFactory's\n"
+#~ "Hashtable tb = new Hashtable();\n"
+#~ "tb.put(\"type\", \"statistics\");\n"
+#~ "tb.put(\"sessionFactory\", \"all\");\n"
+#~ "ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object
name\n"
+#~ "\n"
+#~ "StatisticsService stats = new StatisticsService(); // MBean "
+#~ "implementation\n"
+#~ "server.registerMBean(stats, on); // Register the MBean on the
server]]>"
+#~ msgstr ""
+#~ "<![CDATA[// MBean service registration for all SessionFactory's\n"
+#~ "Hashtable tb = new Hashtable();\n"
+#~ "tb.put(\"type\", \"statistics\");\n"
+#~ "tb.put(\"sessionFactory\", \"all\");\n"
+#~ "ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object
name\n"
+#~ "\n"
+#~ "StatisticsService stats = new StatisticsService(); // MBean "
+#~ "implementation\n"
+#~ "server.registerMBean(stats, on); // Register the MBean on the
server]]>"
+#~ msgid ""
+#~ "<![CDATA[Statistics stats = HibernateUtil.sessionFactory.getStatistics"
+#~ "();\n"
+#~ "\n"
+#~ "double queryCacheHitCount = stats.getQueryCacheHitCount();\n"
+#~ "double queryCacheMissCount = stats.getQueryCacheMissCount();\n"
+#~ "double queryCacheHitRatio =\n"
+#~ " queryCacheHitCount / (queryCacheHitCount + queryCacheMissCount);\n"
+#~ "\n"
+#~ "log.info(\"Query Hit ratio:\" + queryCacheHitRatio);\n"
+#~ "\n"
+#~ "EntityStatistics entityStats =\n"
+#~ " stats.getEntityStatistics( Cat.class.getName() );\n"
+#~ "long changes =\n"
+#~ " entityStats.getInsertCount()\n"
+#~ " + entityStats.getUpdateCount()\n"
+#~ " + entityStats.getDeleteCount();\n"
+#~ "log.info(Cat.class.getName() + \" changed \" + changes +
\"times\" );]]>"
+#~ msgstr ""
+#~ "<![CDATA[Statistics stats = HibernateUtil.sessionFactory.getStatistics"
+#~ "();\n"
+#~ "\n"
+#~ "double queryCacheHitCount = stats.getQueryCacheHitCount();\n"
+#~ "double queryCacheMissCount = stats.getQueryCacheMissCount();\n"
+#~ "double queryCacheHitRatio =\n"
+#~ " queryCacheHitCount / (queryCacheHitCount + queryCacheMissCount);\n"
+#~ "\n"
+#~ "log.info(\"Query Hit ratio:\" + queryCacheHitRatio);\n"
+#~ "\n"
+#~ "EntityStatistics entityStats =\n"
+#~ " stats.getEntityStatistics( Cat.class.getName() );\n"
+#~ "long changes =\n"
+#~ " entityStats.getInsertCount()\n"
+#~ " + entityStats.getUpdateCount()\n"
+#~ " + entityStats.getDeleteCount();\n"
+#~ "log.info(Cat.class.getName() + \" changed \" + changes +
\"times\" );]]>"
-#~ msgid "yes"
-#~ msgstr "yes"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/persistent_classes.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/persistent_classes.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/persistent_classes.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,24 +1,27 @@
+# translation of persistent_classes.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007, 2009.
+# translation of Collection_Mapping.po to
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: persistent_classes\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2010-01-08T04:07:19\n"
+"PO-Revision-Date: 2009-12-07 09:36+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: persistent_classes.xml:29
#, no-c-format
msgid "Persistent Classes"
-msgstr "持久化类(Persistent Classes)"
+msgstr "持久化类(Persistent Classes)"
#. Tag: para
-#: persistent_classes.xml:31
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Persistent classes are classes in an application that implement the entities
"
"of the business problem (e.g. Customer and Order in an E-commerce "
@@ -26,13 +29,12 @@
"in the persistent state. For example, an instance can instead be transient "
"or detached."
msgstr ""
-"在应用程序中,用来实现业务问题实体的(如,在电子商务应用程序中的Customer和"
-"Order) 类就是持久化类。不能认为所有的持久化类的实例都是持久的状态——一个实例"
-"的状态也可能 是瞬时的或脱管的。"
+"在应用程序中,用来实现业务问题实体的(如,在电子商务应用程序中的 Customer 和 "
+"Order)类就是持久化类。不能认为所有的持久化类的实例都是持久的状态 - 一个实例"
+"的状态也可能是瞬时的或脱管的。"
#. Tag: para
-#: persistent_classes.xml:38
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate works best if these classes follow some simple rules, also known "
"as the Plain Old Java Object (POJO) programming model. However, none of "
@@ -40,126 +42,37 @@
"about the nature of your persistent objects. You can express a domain model "
"in other ways (using trees of <literal>Map</literal> instances, for
example)."
msgstr ""
-"如果这些持久化类遵循一些简单的规则,Hibernate能够工作得更好,这些规则也被称"
-"作 简单传统Java对象(POJO:Plain Old Java Object)编程模型。但是这些规则并不是必"
-"需的。 实际上,Hibernate3对于你的持久化类几乎不做任何设想。你可以用其他的方法"
-"来表达领域模型: 比如,使用<literal>Map</literal>实例的树型结构。"
+"如果这些持久化类遵循一些简单的规则,Hibernate 能够工作得更好,这些规则也被称"
+"作简单传统 Java 对象(POJO:Plain Old Java Object)编程模型。但是这些规则并不"
+"是必需的。 实际上,Hibernate3 对于你的持久化类几乎不做任何设想。你可以用其他"
+"的方法来表达领域模型:比如,使用 <literal>Map</literal> 实例的树型结构。"
#. Tag: title
-#: persistent_classes.xml:47
#, no-c-format
msgid "A simple POJO example"
-msgstr "一个简单的POJO例子"
+msgstr "一个简单的 POJO 例子"
#. Tag: para
-#: persistent_classes.xml:49
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Most Java applications require a persistent class representing felines. For "
"example:"
-msgstr "大多数Java程序需要用一个持久化类来表示猫科动物。"
+msgstr "大多数 Java 程序需要用一个持久化类来表示猫科动物。例如:"
-#. Tag: programlisting
-#: persistent_classes.xml:53
-#, no-c-format
-msgid ""
-"<![CDATA[package eg;\n"
-"import java.util.Set;\n"
-"import java.util.Date;\n"
-"\n"
-"public class Cat {\n"
-" private Long id; // identifier\n"
-"\n"
-" private Date birthdate;\n"
-" private Color color;\n"
-" private char sex;\n"
-" private float weight;\n"
-" private int litterId;\n"
-"\n"
-" private Cat mother;\n"
-" private Set kittens = new HashSet();\n"
-"\n"
-" private void setId(Long id) {\n"
-" this.id=id;\n"
-" }\n"
-" public Long getId() {\n"
-" return id;\n"
-" }\n"
-"\n"
-" void setBirthdate(Date date) {\n"
-" birthdate = date;\n"
-" }\n"
-" public Date getBirthdate() {\n"
-" return birthdate;\n"
-" }\n"
-"\n"
-" void setWeight(float weight) {\n"
-" this.weight = weight;\n"
-" }\n"
-" public float getWeight() {\n"
-" return weight;\n"
-" }\n"
-"\n"
-" public Color getColor() {\n"
-" return color;\n"
-" }\n"
-" void setColor(Color color) {\n"
-" this.color = color;\n"
-" }\n"
-"\n"
-" void setSex(char sex) {\n"
-" this.sex=sex;\n"
-" }\n"
-" public char getSex() {\n"
-" return sex;\n"
-" }\n"
-"\n"
-" void setLitterId(int id) {\n"
-" this.litterId = id;\n"
-" }\n"
-" public int getLitterId() {\n"
-" return litterId;\n"
-" }\n"
-"\n"
-" void setMother(Cat mother) {\n"
-" this.mother = mother;\n"
-" }\n"
-" public Cat getMother() {\n"
-" return mother;\n"
-" }\n"
-" void setKittens(Set kittens) {\n"
-" this.kittens = kittens;\n"
-" }\n"
-" public Set getKittens() {\n"
-" return kittens;\n"
-" }\n"
-" \n"
-" // addKitten not needed by Hibernate\n"
-" public void addKitten(Cat kitten) {\n"
-" kitten.setMother(this);\n"
-" kitten.setLitterId( kittens.size() ); \n"
-" kittens.add(kitten);\n"
-" }\n"
-"}]]>"
-msgstr ""
-
#. Tag: para
-#: persistent_classes.xml:55
#, no-c-format
msgid ""
"The four main rules of persistent classes are explored in more detail in the
"
"following sections."
-msgstr ""
+msgstr "在后续的章节里我们将介绍持久性类的 4 个主要规则的更多细节。"
#. Tag: title
-#: persistent_classes.xml:61
#, no-c-format
msgid "Implement a no-argument constructor"
msgstr "实现一个默认的(即无参数的)构造方法(constructor)"
#. Tag: para
-#: persistent_classes.xml:63
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<literal>Cat</literal> has a no-argument constructor. All persistent
classes "
"must have a default constructor (which can be non-public) so that Hibernate "
@@ -168,21 +81,19 @@
"<emphasis>package</emphasis> visibility for runtime proxy generation in
"
"Hibernate."
msgstr ""
-"<literal>Cat</literal>有一个无参数的构造方法。所有的持久化类都必须有一个 默认"
-"的构造方法(可以不是public的),这样的话Hibernate就可以使用 "
-"<literal>Constructor.newInstance()</literal>来实例化它们。 我们强烈建议,在"
-"Hibernate中,为了运行期代理的生成,构造方法至少是 <emphasis>包(package)</"
+"<literal>Cat</literal> 有一个无参数的构造方法。所有的持久化类都必须有一个默认"
+"的构造方法(可以不是 public 的),这样的话 Hibernate 就可以使用 "
+"<literal>Constructor.newInstance()</literal>来实例化它们。 我们强烈建议,在 "
+"Hibernate 中,为了运行期代理的生成,构造方法至少是<emphasis>包(package)</"
"emphasis>内可见的。"
#. Tag: title
-#: persistent_classes.xml:73
#, no-c-format
msgid "Provide an identifier property (optional)"
msgstr "提供一个标识属性(identifier property)(可选)"
#. Tag: para
-#: persistent_classes.xml:75
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<literal>Cat</literal> has a property called
<literal>id</literal>. This "
"property maps to the primary key column of a database table. The property "
@@ -192,94 +103,85 @@
"composite keys, you can use a user-defined class with properties of these "
"types (see the section on composite identifiers later in the chapter.)"
msgstr ""
-"<literal>Cat</literal>有一个属性叫做<literal>id</literal>。这个属性映射数据库"
-"表的主 键字段。这个属性可以叫任何名字,其类型可以是任何的原始类型、原始类型的"
-"包装类型、 <literal>java.lang.String</literal> 或者是
<literal>java.util."
-"Date</literal>。 (如果你的遗留数据库表有联合主键,你甚至可以用一个用户自定义"
-"的类,该类拥有这些类型 的属性。参见后面的关于联合标识符的章节。)"
+"<literal>Cat</literal> 有一个属性叫做
<literal>id</literal>。这个属性映射数据"
+"库表的主 键字段。这个属性可以叫任何名字,其类型可以是任何的原始类型、原始类型"
+"的包装类型、 <literal>java.lang.String</literal> 或者是
<literal>java.util."
+"Date</literal>。(如果你的遗留数据库表有联合主键,你甚至可以用一个用户自定义"
+"的类,该类拥有这些类型的属性。参见后面的关于联合标识符的章节。)"
#. Tag: para
-#: persistent_classes.xml:84
#, no-c-format
msgid ""
"The identifier property is strictly optional. You can leave them off and let
"
"Hibernate keep track of object identifiers internally. We do not recommend "
"this, however."
msgstr ""
-"标识符属性是可选的。可以不用管它,让Hibernate内部来追踪对象的识别。 但是我们"
-"并不推荐这样做。"
+"标识符属性是可选的。可以不用管它,让 Hibernate 内部来追踪对象的识别。 但是我"
+"们并不推荐这样做。"
#. Tag: para
-#: persistent_classes.xml:89
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"In fact, some functionality is available only to classes that declare an "
"identifier property:"
-msgstr "实际上,一些功能只对那些声明了标识符属性的类起作用:"
+msgstr "实际上,一些功能只对那些声明了标识符属性的类起作用: "
#. Tag: para
-#: persistent_classes.xml:96
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Transitive reattachment for detached objects (cascade update or cascade "
-"merge) - see"
+"merge) - see <xref linkend=\"objectstate-transitive\" />"
msgstr ""
-"托管对象的传播性再连接(级联更新或级联合并) ——参阅 <xref linkend="
+"托管对象的传播性再连接(级联更新或级联合并) — 参阅 <xref linkend="
"\"objectstate-transitive\"/>"
-#. Tag: literal
-#: persistent_classes.xml:103
+#. Tag: para
#, no-c-format
-msgid "Session.saveOrUpdate()"
-msgstr "Session.saveOrUpdate()"
+msgid "<literal>Session.saveOrUpdate()</literal>"
+msgstr "<literal>Session.saveOrUpdate()</literal>"
-#. Tag: literal
-#: persistent_classes.xml:108
+#. Tag: para
#, no-c-format
-msgid "Session.merge()"
-msgstr "Session.merge()"
+msgid "<literal>Session.merge()</literal>"
+msgstr "<literal>Session.merge()</literal>"
#. Tag: para
-#: persistent_classes.xml:113
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"We recommend that you declare consistently-named identifier properties on "
"persistent classes and that you use a nullable (i.e., non-primitive) type."
msgstr ""
-"我们建议你对持久化类声明命名一致的标识属性。我们还建议你使用一 个可以为空(也"
-"就是说,不是原始类型)的类型。"
+"我们建议你对持久化类声明命名一致的标识属性。我们还建议你使用一个可以为空(也"
+"就是说,不是原始类型)的类型。 "
#. Tag: title
-#: persistent_classes.xml:120
#, no-c-format
msgid "Prefer non-final classes (optional)"
-msgstr "使用非final的类 (可选)"
+msgstr "使用非final的类(可选)"
#. Tag: para
-#: persistent_classes.xml:121
#, no-c-format
msgid ""
"A central feature of Hibernate, <emphasis>proxies</emphasis>, depends
upon "
"the persistent class being either non-final, or the implementation of an "
"interface that declares all public methods."
msgstr ""
-"<emphasis>代理(proxies)</emphasis>是Hibernate的一个重要的功能,它依赖的条件"
-"是,持久 化类或者是非final的,或者是实现了一个所有方法都声明为public的接口。"
+"<emphasis>代理(proxies)</emphasis>是 Hibernate 的一个重要的功能,它依赖的条"
+"件是,持久化类或者是非 final 的,或者是实现了一个所有方法都声明为 public 的接"
+"口。"
#. Tag: para
-#: persistent_classes.xml:126
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You can persist <literal>final</literal> classes that do not implement
an "
"interface with Hibernate. You will not, however, be able to use proxies for "
"lazy association fetching which will ultimately limit your options for "
"performance tuning."
msgstr ""
-"你可以用Hibernate持久化一个没有实现任何接口的<literal>final</literal>类,但是"
-"你 不能使用代理来延迟关联加载,这会限制你进行性能优化的选择。"
+"你可以用 Hibernate 持久化一个没有实现任何接口的 <literal>final</literal> 类,"
+"但是你不能使用代理来延迟关联加载,这会限制你进行性能优化的选择。 "
#. Tag: para
-#: persistent_classes.xml:131
#, no-c-format
msgid ""
"You should also avoid declaring <literal>public final</literal> methods
on "
@@ -287,19 +189,18 @@
"final</literal> method, you must explicitly disable proxying by setting
"
"<literal>lazy=\"false\"</literal>."
msgstr ""
-"你也应该避免在非final类中声明 <literal>public final</literal>的方法。如果你想"
-"使用一 个有<literal>public final</literal>方法的类,你必须通过设置"
-"<literal>lazy=\"false\"</literal> 来明确地禁用代理。"
+"你也应该避免在非 final 类中声明 <literal>public final</literal> 的方法。如果"
+"你想使用一个有 <literal>public final</literal> 方法的类,你必须通过设置 "
+"<literal>lazy=\"false\"</literal> 来明确地禁用代理。 "
#. Tag: title
-#: persistent_classes.xml:139
#, no-c-format
msgid "Declare accessors and mutators for persistent fields (optional)"
-msgstr "为持久化字段声明访问器(accessors)和是否可变的标志(mutators)(可选)"
+msgstr ""
+"为持久化字段声明访问器(accessors)和是否可变的标志(mutators)(可选)"
#. Tag: para
-#: persistent_classes.xml:141
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<literal>Cat</literal> declares accessor methods for all its persistent
"
"fields. Many other ORM tools directly persist instance variables. It is "
@@ -309,95 +210,71 @@
"literal>, <literal>isFoo</literal> and
<literal>setFoo</literal>. If "
"required, you can switch to direct field access for particular properties."
msgstr ""
-"<literal>Cat</literal>为它的所有持久化字段声明了访问方法。很多其他ORM工具直接"
-"对 实例变量进行持久化。我们相信,在关系数据库schema和类的内部数据结构之间引入"
-"间接层(原文为\"非直接\",indirection)会好一些。默认情况下Hibernate持久化"
-"JavaBeans风格的属性,认可
<literal>getFoo</literal>,<literal>isFoo</"
-"literal> 和 <literal>setFoo</literal>这种形式的方法名。 如果需要,你可以对某"
-"些特定属性实行直接字段访问。"
+"<literal>Cat</literal> 为它的所有持久化字段声明了访问方法。很多其他 ORM 工具"
+"直接对实例变量进行持久化。我们相信,在关系数据库 schema 和类的内部数据结构之"
+"间引入间接层(原文为\"非直接\",indirection)会好一些。默认情况下 Hibernate "
+"持久化 JavaBeans 风格的属性,认可 <literal>getFoo</literal>,"
+"<literal>isFoo</literal> 和 <literal>setFoo</literal>
这种形式的方法名。如果"
+"需要,你可以对某些特定属性实行直接字段访问。 "
#. Tag: para
-#: persistent_classes.xml:151
#, no-c-format
msgid ""
"Properties need <emphasis>not</emphasis> be declared public - Hibernate
can "
"persist a property with a default, <literal>protected</literal> or
"
"<literal>private</literal> get / set pair."
msgstr ""
-"属性<emphasis>不需要</emphasis>要声明为public的。Hibernate可以持久化一个有 "
-"<literal>default</literal>、<literal>protected</literal>或<literal>private</"
-"literal>的get/set方法对 的属性进行持久化。"
+"属性<emphasis>不需要</emphasis>要声明为 public 的。Hibernate 可以持久化一个"
+"有 <literal>default</literal>、<literal>protected</literal> 或
"
+"<literal>private</literal> 的 get/set 方法对的属性进行持久化。"
#. Tag: title
-#: persistent_classes.xml:162
#, no-c-format
msgid "Implementing inheritance"
msgstr "实现继承(Inheritance)"
#. Tag: para
-#: persistent_classes.xml:164
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"A subclass must also observe the first and second rules. It inherits its "
"identifier property from the superclass, <literal>Cat</literal>. For
example:"
msgstr ""
-"子类也必须遵守第一条和第二条规则。它从超类<literal>Cat</literal>继承了标识属"
-"性。"
+"子类也必须遵守第一条和第二条规则。它从超类 <literal>Cat</literal> 继承了标识"
+"属性。例如:"
-#. Tag: programlisting
-#: persistent_classes.xml:169
-#, no-c-format
-msgid ""
-"<![CDATA[package eg;\n"
-"\n"
-"public class DomesticCat extends Cat {\n"
-" private String name;\n"
-"\n"
-" public String getName() {\n"
-" return name;\n"
-" }\n"
-" protected void setName(String name) {\n"
-" this.name=name;\n"
-" }\n"
-"}]]>"
-msgstr ""
-
#. Tag: title
-#: persistent_classes.xml:173
#, no-c-format
msgid ""
"Implementing <literal>equals()</literal> and
<literal>hashCode()</literal>"
-msgstr
"实现<literal>equals()</literal>和<literal>hashCode()</literal>"
+msgstr ""
+"实现 <literal>equals()</literal> 和
<literal>hashCode()</literal> 方法:"
#. Tag: para
-#: persistent_classes.xml:175
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You have to override the <literal>equals()</literal> and
<literal>hashCode()"
"</literal> methods if you:"
msgstr ""
"如果你有如下需求,你必须重载 <literal>equals()</literal> 和
<literal>hashCode"
-"()</literal>方法:"
+"()</literal> 方法: "
#. Tag: para
-#: persistent_classes.xml:181
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"intend to put instances of persistent classes in a
<literal>Set</literal> "
"(the recommended way to represent many-valued associations);
<emphasis>and</"
"emphasis>"
msgstr ""
-"想把持久类的实例放入<literal>Set</literal>中(当表示多值关联时,推荐这么做)"
+"想把持久类的实例放入 <literal>Set</literal> 中(当表示多值关联时,推荐这么"
+"做),<emphasis>而且</emphasis>"
#. Tag: para
-#: persistent_classes.xml:188
#, no-c-format
msgid "intend to use reattachment of detached instances"
msgstr "想重用脱管实例"
#. Tag: para
-#: persistent_classes.xml:194
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate guarantees equivalence of persistent identity (database row) and "
"Java identity only inside a particular session scope. When you mix instances
"
@@ -405,14 +282,13 @@
"literal> and <literal>hashCode()</literal> if you wish to have
meaningful "
"semantics for <literal>Set</literal>s."
msgstr ""
-"Hibernate保证,仅在特定会话范围内,持久化标识(数据库的行)和Java标识是等价"
-"的。因此,一旦 我们混合了从不同会话中获取的实例,如果希望<literal>Set</"
-"literal>有明确的语义,就必 须实现<literal>equals()</literal> 和"
-"<literal>hashCode()</literal>。"
+"Hibernate 保证,仅在特定会话范围内,持久化标识(数据库的行)和 Java 标识是等"
+"价的。因此,一旦我们混合了从不同会话中获取的实例,如果希望 <literal>Set</"
+"literal> 有明确的语义,就必须实现 <literal>equals()</literal> 和 "
+"<literal>hashCode()</literal>。 "
#. Tag: para
-#: persistent_classes.xml:202
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The most obvious way is to implement
<literal>equals()</literal>/"
"<literal>hashCode()</literal> by comparing the identifier value of both
"
@@ -429,20 +305,20 @@
"the Hibernate website for a full discussion of this problem. This is not a "
"Hibernate issue, but normal Java semantics of object identity and equality."
msgstr ""
-"实现<literal>equals()</literal>/<literal>hashCode()</literal>最显而易见的方法"
-"是比较两个对象 标识符的值。如果值相同,则两个对象对应于数据库的同一行,因此它"
-"们是相等的(如果都被添加到
<literal>Set</literal>,则在<literal>Set</literal>"
-"中只有一个元素)。不幸的是,对生成的标识不能 使用这种方法。Hibernate仅对那些"
-"持久化对象赋标识值,一个新创建的实例将不会有任何标识值。此外, 如果一个实例没"
-"有被保存(unsaved),并且它当前正在一个<literal>Set</literal>中,保存它将会给这"
-"个对象 赋一个标识值。如果<literal>equals()</literal> 和
<literal>hashCode()</"
-"literal>是基于标识值 实现的,则其哈希码将会改变,这违反了<literal>Set</"
-"literal>的契约。建议去Hibernate的站点阅读关于这个 问题的全部讨论。注意,这不"
-"是Hibernate的问题,而是一般的Java对象标识和Java对象等价的语义问题。"
+"实现
<literal>equals()</literal>/<literal>hashCode()</literal>
最显而易见的方"
+"法是比较两个对象 标识符的值。如果值相同,则两个对象对应于数据库的同一行,因此"
+"它们是相等的(如果都被添加到 <literal>Set</literal>,则在 <literal>Set</"
+"literal> 中只有一个元素)。不幸的是,对生成的标识不能 使用这种方法。"
+"Hibernate 仅对那些持久化对象赋标识值,一个新创建的实例将不会有任何标识值。此"
+"外, 如果一个实例没有被保存(unsaved),并且它当前正在一个 <literal>Set</"
+"literal> 中,保存它将会给这个对象赋一个标识值。如果 <literal>equals()</"
+"literal> 和 <literal>hashCode()</literal> 是基于标识值 实现的,则其哈希码将会"
+"改变,这违反了 <literal>Set</literal> 的契约。建议去 Hibernate 的站点阅读关于"
+"这个问题的全部讨论。注意,这不是 Hibernate 的问题,而是一般的 Java 对象标识"
+"和 Java 对象等价的语义问题。 "
#. Tag: para
-#: persistent_classes.xml:216
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"It is recommended that you implement <literal>equals()</literal> and
"
"<literal>hashCode()</literal> using <emphasis>Business key
equality</"
@@ -451,74 +327,42 @@
"that would identify our instance in the real world (a
<emphasis>natural</"
"emphasis> candidate key):"
msgstr ""
-"我们建议使用<emphasis>业务键值相等(Business key equality)</emphasis>来实现"
+"我们建议使用<emphasis>业务键值相等(Business key equality)</emphasis>来实现 "
"<literal>equals()</literal> 和
<literal>hashCode()</literal>。业务键值相等的"
-"意思是,<literal>equals()</literal>方法 仅仅比较形成业务键的属性,它能在现实"
+"意思是,<literal>equals()</literal> 方法仅仅比较形成业务键的属性,它能在现实"
"世界里标识我们的实例(是一个<emphasis>自然的</emphasis>候选码)。"
-#. Tag: programlisting
-#: persistent_classes.xml:224
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[public class Cat {\n"
-"\n"
-" ...\n"
-" public boolean equals(Object other) {\n"
-" if (this == other) return true;\n"
-" if ( !(other instanceof Cat) ) return false;\n"
-"\n"
-" final Cat cat = (Cat) other;\n"
-"\n"
-" if ( !cat.getLitterId().equals( getLitterId() ) ) return false;\n"
-" if ( !cat.getMother().equals( getMother() ) ) return false;\n"
-"\n"
-" return true;\n"
-" }\n"
-"\n"
-" public int hashCode() {\n"
-" int result;\n"
-" result = getMother().hashCode();\n"
-" result = 29 * result + getLitterId();\n"
-" return result;\n"
-" }\n"
-"\n"
-"}]]>"
-msgstr ""
-
-#. Tag: para
-#: persistent_classes.xml:226
-#, fuzzy, no-c-format
-msgid ""
"A business key does not have to be as solid as a database primary key "
-"candidate (see <xref linkend=\"transactions-basics-identity\"/>).
Immutable "
+"candidate (see <xref linkend=\"transactions-basics-identity\" />).
Immutable "
"or unique properties are usually good candidates for a business key."
msgstr ""
-"注意,业务键不必像数据库的主键那样固定不变(参见<xref linkend=\"transactions-"
-"basics-identity\"/>)。 对业务键而言,不可变或唯一的属性是不错的选择。"
+"注意,业务键不必像数据库的主键那样固定不变(参见 <xref linkend="
+"\"transactions-basics-identity\"/>)。对业务键而言,不可变或唯一的属性是不错"
+"的选择。 "
#. Tag: title
-#: persistent_classes.xml:236
#, no-c-format
msgid "Dynamic models"
-msgstr "动态模型(Dynamic models)"
+msgstr "动态模型(Dynamic models)"
#. Tag: title
-#: persistent_classes.xml:239
#, no-c-format
msgid "Note"
-msgstr ""
+msgstr "注意"
-#. Tag: emphasis
-#: persistent_classes.xml:241
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid ""
-"The following features are currently considered experimental and may change "
-"in the near future."
-msgstr "注意,以下特性在当前处于试验阶段,将来可能会有变化。"
+"<emphasis>The following features are currently considered experimental and
"
+"may change in the near future.</emphasis>"
+msgstr ""
+"<emphasis>注意,以下特性在当前处于试验阶段,将来可能会有变化。</emphasis>"
#. Tag: para
-#: persistent_classes.xml:246
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Persistent entities do not necessarily have to be represented as POJO "
"classes or as JavaBean objects at runtime. Hibernate also supports dynamic "
@@ -526,128 +370,57 @@
"and the representation of entities as DOM4J trees. With this approach, you "
"do not write persistent classes, only mapping files."
msgstr ""
-"运行期的持久化实体没有必要一定表示为像POJO类或JavaBean对象那样的形式。"
-"Hibernate也支持动态模型
(在运行期使用<literal>Map</literal>的<literal>Map</"
-"literal>)和象DOM4J的树模型那 样的实体表示。使用这种方法,你不用写持久化类,"
-"只写映射文件就行了。"
+"运行期的持久化实体没有必要一定表示为像 POJO 类或 JavaBean 对象那样的形式。"
+"Hibernate 也支持动态模型 (在运行期使用 <literal>Map</literal> 的 "
+"<literal>Map</literal>)和象 DOM4J 的树模型那样的实体表示。使用这种方法,你不"
+"用写持久化类,只写映射文件就行了。 "
#. Tag: para
-#: persistent_classes.xml:254
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"By default, Hibernate works in normal POJO mode. You can set a default "
"entity representation mode for a particular
<literal>SessionFactory</"
"literal> using the <literal>default_entity_mode</literal>
configuration "
-"option (see <xref
linkend=\"configuration-optional-properties\"/>)."
+"option (see <xref linkend=\"configuration-optional-properties\"
/>)."
msgstr ""
-"Hibernate默认工作在普通POJO模式。你可以使用配置选项"
-"<literal>default_entity_mode</literal>,
对特定的<literal>SessionFactory</"
-"literal>,设置一个默认的实体表示模式。 (参见<xref linkend=\"configuration-"
-"optional-properties\"/>。)"
+"Hibernate 默认工作在普通 POJO 模式。你可以使用配置选项 "
+"<literal>default_entity_mode</literal>, 对特定的
<literal>SessionFactory</"
+"literal>,设置一个默认的实体表示模式。(参见 <xref linkend=\"configuration-"
+"optional-properties\"/>) "
#. Tag: para
-#: persistent_classes.xml:261
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The following examples demonstrate the representation using
<literal>Map</"
"literal>s. First, in the mapping file an
<literal>entity-name</literal> has "
"to be declared instead of, or in addition to, a class name:"
msgstr ""
-"下面是用<literal>Map</literal>来表示的例子。首先,在映射文件中,要声明 "
-"<literal>entity-name</literal>来代替一个类名(或作为一种附属)。"
+"下面是用 <literal>Map</literal> 来表示的例子。首先,在映射文件中,要声明 "
+"<literal>entity-name</literal> 来代替一个类名(或作为一种附属)。 "
-#. Tag: programlisting
-#: persistent_classes.xml:267
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-"\n"
-" <class entity-name=\"Customer\">\n"
-"\n"
-" <id name=\"id\"\n"
-" type=\"long\"\n"
-" column=\"ID\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-"\n"
-" <property name=\"name\"\n"
-" column=\"NAME\"\n"
-" type=\"string\"/>\n"
-"\n"
-" <property name=\"address\"\n"
-" column=\"ADDRESS\"\n"
-" type=\"string\"/>\n"
-"\n"
-" <many-to-one name=\"organization\"\n"
-" column=\"ORGANIZATION_ID\"\n"
-" class=\"Organization\"/>\n"
-"\n"
-" <bag name=\"orders\"\n"
-" inverse=\"true\"\n"
-" lazy=\"false\"\n"
-" cascade=\"all\">\n"
-" <key column=\"CUSTOMER_ID\"/>\n"
-" <one-to-many class=\"Order\"/>\n"
-" </bag>\n"
-"\n"
-" </class>\n"
-" \n"
-"</hibernate-mapping>]]>"
-msgstr ""
-
-#. Tag: para
-#: persistent_classes.xml:269
-#, fuzzy, no-c-format
-msgid ""
"Even though associations are declared using target class names, the target "
"type of associations can also be a dynamic entity instead of a POJO."
msgstr ""
-"注意,虽然是用目标类名来声明关联的,但是关联的目标类型除了是POJO之外,也可以 "
-"是一个动态的实体。"
+"注意,虽然是用目标类名来声明关联的,但是关联的目标类型除了是 POJO 之外,也可"
+"以是一个动态的实体。 "
#. Tag: para
-#: persistent_classes.xml:276
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"After setting the default entity mode to <literal>dynamic-map</literal>
for "
"the <literal>SessionFactory</literal>, you can, at runtime, work with
"
"<literal>Map</literal>s of <literal>Map</literal>s:"
msgstr ""
-"在使用<literal>dynamic-map</literal>为<literal>SessionFactory</literal>
设置"
-"了默认的实体模式之后,可以在运行期使用<literal>Map</literal>的
<literal>Map</"
-"literal>。"
+"在使用 <literal>dynamic-map</literal> 为
<literal>SessionFactory</literal> 设"
+"置了默认的实体模式之后,可以在运行期使用 <literal>Map</literal> 的 "
+"<literal>Map</literal>:"
-#. Tag: programlisting
-#: persistent_classes.xml:282
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[Session s = openSession();\n"
-"Transaction tx = s.beginTransaction();\n"
-"Session s = openSession();\n"
-"\n"
-"// Create a customer\n"
-"Map david = new HashMap();\n"
-"david.put(\"name\", \"David\");\n"
-"\n"
-"// Create an organization\n"
-"Map foobar = new HashMap();\n"
-"foobar.put(\"name\", \"Foobar Inc.\");\n"
-"\n"
-"// Link both\n"
-"david.put(\"organization\", foobar);\n"
-"\n"
-"// Save both\n"
-"s.save(\"Customer\", david);\n"
-"s.save(\"Organization\", foobar);\n"
-"\n"
-"tx.commit();\n"
-"s.close();]]>"
-msgstr ""
-
-#. Tag: para
-#: persistent_classes.xml:284
-#, fuzzy, no-c-format
-msgid ""
"One of the main advantages of dynamic mapping is quick turnaround time for "
"prototyping, without the need for entity class implementation. However, you "
"lose compile-time type checking and will likely deal with many exceptions at
"
@@ -656,40 +429,20 @@
"implementation on top later on."
msgstr ""
"动态映射的好处是,变化所需要的时间少了,因为原型不需要实现实体类。然而,你无"
-"法进行 编译期的类型检查,并可能由此会处理很多的运行期异常。幸亏有了Hibernate"
-"映射,它使得数 据库的schema能容易的规格化和合理化,并允许稍后在此之上添加合适"
-"的领域模型实现。"
+"法进行编译期的类型检查,并可能由此会处理很多的运行期异常。幸亏有了 Hibernate "
+"映射,它使得数据库的 schema 能容易的规格化和合理化,并允许稍后在此之上添加合"
+"适的领域模型实现。 "
#. Tag: para
-#: persistent_classes.xml:292
#, no-c-format
msgid ""
"Entity representation modes can also be set on a per
<literal>Session</"
"literal> basis:"
-msgstr "实体表示模式也能在每个<literal>Session</literal>的基础上设置:"
+msgstr "实体表示模式也能在每个 <literal>Session</literal> 的基础上设置:"
-#. Tag: programlisting
-#: persistent_classes.xml:297
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[Session dynamicSession =
pojoSession.getSession(EntityMode.MAP);\n"
-"\n"
-"// Create a customer\n"
-"Map david = new HashMap();\n"
-"david.put(\"name\", \"David\");\n"
-"dynamicSession.save(\"Customer\", david);\n"
-"...\n"
-"dynamicSession.flush();\n"
-"dynamicSession.close()\n"
-"...\n"
-"// Continue on pojoSession\n"
-"]]>"
-msgstr ""
-
-#. Tag: para
-#: persistent_classes.xml:300
-#, fuzzy, no-c-format
-msgid ""
"Please note that the call to <literal>getSession()</literal> using an
"
"<literal>EntityMode</literal> is on the
<literal>Session</literal> API, not "
"the <literal>SessionFactory</literal>. That way, the new
<literal>Session</"
@@ -699,30 +452,27 @@
"literal>, and also leave the transaction and connection handling to the "
"primary unit of work."
msgstr ""
-"请注意,用<literal>EntityMode</literal>调用<literal>getSession()</literal>是"
-"在
<literal>Session</literal>的API中,而不是<literal>SessionFactory</"
-"literal>。 这样,新的<literal>Session</literal>共享底层的JDBC连接,事务,和其"
-"他的上下文信 息。这意味着,你不需要在第二个<literal>Session</literal>中调用 "
-"<literal>flush()</literal>和<literal>close()</literal>,同样的,把事务和连接"
-"的处理 交给原来的工作单元。"
+"请注意,用 <literal>EntityMode</literal> 调用
<literal>getSession()</"
+"literal> 是在 <literal>Session</literal> 的 API 中,而不是 "
+"<literal>SessionFactory</literal>。 这样,新的
<literal>Session</literal> 共"
+"享底层的 JDBC 连接,事务,和其他的上下文信息。这意味着,你不需要在第二个 "
+"<literal>Session</literal> 中调用 <literal>flush()</literal> 和
"
+"<literal>close()</literal>,同样的,把事务和连接的处理交给原来的工作单元。 "
#. Tag: para
-#: persistent_classes.xml:310
#, no-c-format
msgid ""
"More information about the XML representation capabilities can be found in "
-"<xref linkend=\"xml\"/>."
-msgstr "关于XML表示能力的更多信息可以在<xref linkend=\"xml\"/>中找到。"
+"<xref linkend=\"xml\" />."
+msgstr "关于 XML 表示能力的更多信息可以在 <xref linkend=\"xml\"/> 中找到。 "
#. Tag: title
-#: persistent_classes.xml:318
#, no-c-format
msgid "Tuplizers"
-msgstr "元组片断映射(Tuplizers)"
+msgstr "元组片断映射(Tuplizers)"
#. Tag: para
-#: persistent_classes.xml:320
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<literal>org.hibernate.tuple.Tuplizer</literal>, and its
sub-interfaces, are "
"responsible for managing a particular representation of a piece of data "
@@ -736,16 +486,16 @@
msgstr ""
"<literal>org.hibernate.tuple.Tuplizer</literal>,以及其子接口,负责根据给定的"
"<literal>org.hibernate.EntityMode</literal>,来复现片断数据。如果给定的片断数"
-"据被认为其是一种数据结构,\"tuplizer\"就是一个知道如何创建这样的数据结构,以"
-"及如何给这个数据结构赋值的东西。比如说,对于POJO这种Entity Mode,对应的"
-"tuplizer知道通过其构造方法来创建一个POJO,再通过其属性访问器来访问POJO属性。"
-"有两大类高层Tuplizer,分别是<literal>org.hibernate.tuple.entity."
-"EntityTuplizer</literal> 和<literal>org.hibernate.tuple.entity."
-"ComponentTuplizer</literal>接口。<literal>EntityTuplizer</literal>负责管理上"
-"面提到的实体的契约,而<literal>ComponentTuplizer</literal>则是针对组件的。"
+"据被认为其是一种数据结构,\"tuplizer\" 就是一个知道如何创建这样的数据结构,以"
+"及如何给这个数据结构赋值的东西。比如说,对于 POJO 这种 Entity Mode,对应的 "
+"tuplizer 知道通过其构造方法来创建一个 POJO,再通过其属性访问器来访问 POJO 属"
+"性。有两大类高层 Tuplizer,分别是<literal>org.hibernate.tuple.entity."
+"EntityTuplizer</literal> 和 <literal>org.hibernate.tuple.entity."
+"ComponentTuplizer</literal> 接口。<literal>EntityTuplizer</literal>
负责管理"
+"上面提到的实体的契约,而 <literal>ComponentTuplizer</literal> 则是针对组件"
+"的。 "
#. Tag: para
-#: persistent_classes.xml:330
#, no-c-format
msgid ""
"There are two high-level types of Tuplizers, represented by the
<literal>org."
@@ -755,10 +505,13 @@
"mentioned contracts in regards to entities, while "
"<literal>ComponentTuplizer</literal>s do the same for
components."
msgstr ""
+"有两种高层类型的 Tuplizer,分别由 <literal>org.hibernate.tuple.entity."
+"EntityTuplizer</literal> 和
<literal>org.hibernate.tuple.component."
+"ComponentTuplizer</literal>
接口代表。<literal>EntityTuplizer</literal> 负责"
+"管理和实体相关的上述合约,而<literal>ComponentTuplizer</literal> 则负责组件。"
#. Tag: para
-#: persistent_classes.xml:338
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Users can also plug in their own tuplizers. Perhaps you require that a "
"<literal>java.util.Map</literal> implementation other than
<literal>java."
@@ -769,61 +522,19 @@
"mapping they are meant to manage. Going back to the example of our customer "
"entity:"
msgstr ""
-"用户也可以插入其自定义的tuplizer。或许您需要一种不同于dynamic-map entity-mode"
-"中使用的<literal>java.util.HashMap</literal>的<literal>java.util.Map</"
-"literal>实现;或许您需要与默认策略不同的代理生成策略(proxy generation "
-"strategy)。通过自定义tuplizer实现,这两个目标您都可以达到。Tuplizer定义被附加"
-"到它们期望管理的entity或者component映射中。回到我们的customer entity例子:"
+"用户也可以插入其自定义的 tuplizer。或许您需要一种不同于 dynamic-map entity-"
+"mode 中使用的 <literal>java.util.HashMap</literal> 的
<literal>java.util."
+"Map</literal> 实现;或许您需要与默认策略不同的代理生成策略(proxy generation "
+"strategy)。通过自定义 tuplizer 实现,这两个目标您都可以达到。Tuplizer 定义被"
+"附加到它们期望管理的 entity 或者 component 映射中。回到我们的 customer "
+"entity 例子: "
-#. Tag: programlisting
-#: persistent_classes.xml:347
-#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping>\n"
-" <class entity-name=\"Customer\">\n"
-" <!--\n"
-" Override the dynamic-map entity-mode\n"
-" tuplizer for the customer entity\n"
-" -->\n"
-" <tuplizer entity-mode=\"dynamic-map\"\n"
-" class=\"CustomMapTuplizerImpl\"/>\n"
-"\n"
-" <id name=\"id\" type=\"long\"
column=\"ID\">\n"
-" <generator class=\"sequence\"/>\n"
-" </id>\n"
-"\n"
-" <!-- other properties -->\n"
-" ...\n"
-" </class>\n"
-"</hibernate-mapping>\n"
-"\n"
-"\n"
-"public class CustomMapTuplizerImpl\n"
-" extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n"
-" // override the buildInstantiator() method to plug in our custom
map...\n"
-" protected final Instantiator buildInstantiator(\n"
-" org.hibernate.mapping.PersistentClass mappingInfo) {\n"
-" return new CustomMapInstantiator( mappingInfo );\n"
-" }\n"
-"\n"
-" private static final class CustomMapInstantiator\n"
-" extends org.hibernate.tuple.DynamicMapInstantitor {\n"
-" // override the generateMap() method to return our custom map...\n"
-" protected final Map generateMap() {\n"
-" return new CustomMap();\n"
-" }\n"
-" }\n"
-"}]]>"
-msgstr ""
-
#. Tag: title
-#: persistent_classes.xml:353
#, no-c-format
msgid "EntityNameResolvers"
-msgstr ""
+msgstr "EntityNameResolvers"
#. Tag: para
-#: persistent_classes.xml:355
#, no-c-format
msgid ""
"The <interfacename>org.hibernate.EntityNameResolver</interfacename>
"
@@ -840,158 +551,35 @@
"dynamicentity.tuplizer2</package>. Here is some of the code from that "
"package for illustration."
msgstr ""
+"<interfacename>org.hibernate.EntityNameResolver</interfacename>
接口是一个解"
+"析给定实体实例的实体名称的合约。这个接口定义了一个单一的方法 "
+"<methodname>resolveEntityName</methodname>,它传递实体实例并预期返回合适的实"
+"体名称(null 指明解析器不知道如何解析给定实体实例的实体名称)。一般说来,"
+"<interfacename>org.hibernate.EntityNameResolver</interfacename>
在动态模型里"
+"最为有用。其中的例子是把代理接口用作你的域模型。Hibernate Test Suite 在 "
+"<package>org.hibernate.test.dynamicentity.tuplizer2</package>
下有具有完全相"
+"同风格的例子。下面是该包里的一些代码:"
-#. Tag: programlisting
-#: persistent_classes.xml:367
-#, no-c-format
-msgid ""
-"/**\n"
-" * A very trivial JDK Proxy InvocationHandler implementation where we proxy "
-"an interface as\n"
-" * the domain model and simply store persistent state in an internal Map. "
-"This is an extremely\n"
-" * trivial example meant only for illustration.\n"
-" */\n"
-"public final class DataProxyHandler implements InvocationHandler {\n"
-" private String entityName;\n"
-" private HashMap data = new HashMap();\n"
-"\n"
-" public DataProxyHandler(String entityName, Serializable id) {\n"
-" this.entityName = entityName;\n"
-" data.put( \"Id\", id );\n"
-" }\n"
-"\n"
-" public Object invoke(Object proxy, Method method, Object[] args) "
-"throws Throwable {\n"
-" String methodName = method.getName();\n"
-" if ( methodName.startsWith( \"set\" ) ) {\n"
-" String propertyName = methodName.substring( 3 );\n"
-" data.put( propertyName, args[0] );\n"
-" }\n"
-" else if ( methodName.startsWith( \"get\" ) ) {\n"
-" String propertyName = methodName.substring( 3 );\n"
-" return data.get( propertyName );\n"
-" }\n"
-" else if ( \"toString\".equals( methodName ) ) {\n"
-" return entityName + \"#\" + data.get(
\"Id\" );\n"
-" }\n"
-" else if ( \"hashCode\".equals( methodName ) ) {\n"
-" return new Integer( this.hashCode() );\n"
-" }\n"
-" return null;\n"
-" }\n"
-"\n"
-" public String getEntityName() {\n"
-" return entityName;\n"
-" }\n"
-"\n"
-" public HashMap getData() {\n"
-" return data;\n"
-" }\n"
-"}\n"
-"\n"
-"/**\n"
-" *\n"
-" */\n"
-"public class ProxyHelper {\n"
-" public static String extractEntityName(Object object) {\n"
-" // Our custom java.lang.reflect.Proxy instances actually bundle\n"
-" // their appropriate entity name, so we simply extract it from "
-"there\n"
-" // if this represents one of our proxies; otherwise, we return
null\n"
-" if ( Proxy.isProxyClass( object.getClass() ) ) {\n"
-" InvocationHandler handler = Proxy.getInvocationHandler"
-"( object );\n"
-" if ( DataProxyHandler.class.isAssignableFrom( handler.getClass"
-"() ) ) {\n"
-" DataProxyHandler myHandler = ( DataProxyHandler ) handler;\n"
-" return myHandler.getEntityName();\n"
-" }\n"
-" }\n"
-" return null;\n"
-" }\n"
-"\n"
-" // various other utility methods ....\n"
-"\n"
-"}\n"
-"\n"
-"/**\n"
-" * The EntityNameResolver implementation.\n"
-" * IMPL NOTE : An EntityNameResolver really defines a strategy for how "
-"entity names should be\n"
-" * resolved. Since this particular impl can handle resolution for all of "
-"our entities we want to\n"
-" * take advantage of the fact that SessionFactoryImpl keeps these in a Set "
-"so that we only ever\n"
-" * have one instance registered. Why? Well, when it comes time to resolve "
-"an entity name,\n"
-" * Hibernate must iterate over all the registered resolvers. So keeping "
-"that number down\n"
-" * helps that process be as speedy as possible. Hence the equals and "
-"hashCode impls\n"
-" */\n"
-"public class MyEntityNameResolver implements EntityNameResolver {\n"
-" public static final MyEntityNameResolver INSTANCE = new "
-"MyEntityNameResolver();\n"
-"\n"
-" public String resolveEntityName(Object entity) {\n"
-" return ProxyHelper.extractEntityName( entity );\n"
-" }\n"
-"\n"
-" public boolean equals(Object obj) {\n"
-" return getClass().equals( obj.getClass() );\n"
-" }\n"
-"\n"
-" public int hashCode() {\n"
-" return getClass().hashCode();\n"
-" }\n"
-"}\n"
-"\n"
-"public class MyEntityTuplizer extends PojoEntityTuplizer {\n"
-" public MyEntityTuplizer(EntityMetamodel entityMetamodel, "
-"PersistentClass mappedEntity) {\n"
-" super( entityMetamodel, mappedEntity );\n"
-" }\n"
-"\n"
-" public EntityNameResolver[] getEntityNameResolvers() {\n"
-" return new EntityNameResolver[] { MyEntityNameResolver."
-"INSTANCE };\n"
-" }\n"
-"\n"
-" public String determineConcreteSubclassEntityName(Object entityInstance,
"
-"SessionFactoryImplementor factory) {\n"
-" String entityName = ProxyHelper.extractEntityName"
-"( entityInstance );\n"
-" if ( entityName == null ) {\n"
-" entityName = super.determineConcreteSubclassEntityName"
-"( entityInstance, factory );\n"
-" }\n"
-" return entityName;\n"
-" }\n"
-"\n"
-" ...\n"
-"}"
-msgstr ""
-
#. Tag: para
-#: persistent_classes.xml:369
#, no-c-format
msgid ""
"In order to register an
<interfacename>org.hibernate.EntityNameResolver</"
"interfacename> users must either:"
msgstr ""
+"为了注册
<interfacename>org.hibernate.EntityNameResolver</interfacename>,用"
+"户必须:"
#. Tag: para
-#: persistent_classes.xml:373
-#, no-c-format
+#, fuzzy, no-c-format
msgid ""
-"Implement a custom <link
linkend=\"persistent-classes-tuplizers\">Tuplizer</"
-"link>, implementing the
<methodname>getEntityNameResolvers</methodname> "
-"method."
+"Implement a custom Tupelizer implementing the "
+"<methodname>getEntityNameResolvers</methodname> method (see <xref
linkend="
+"\"persistent-classes-tuplizers\" />)."
msgstr ""
+"实现自定义的 <xref linkend=\"persistent-classes-tuplizers\"/> 并实现 "
+"<methodname>getEntityNameResolvers</methodname> 方法。 "
#. Tag: para
-#: persistent_classes.xml:379
#, no-c-format
msgid ""
"Register it with the
<classname>org.hibernate.impl.SessionFactoryImpl</"
@@ -999,10 +587,718 @@
"hibernate.SessionFactory</interfacename>) using the "
"<methodname>registerEntityNameResolver</methodname> method."
msgstr ""
+"用 <methodname>registerEntityNameResolver</methodname> 方法注册到 "
+"<classname>org.hibernate.impl.SessionFactoryImpl</classname>(它是 "
+"<interfacename>org.hibernate.SessionFactory</interfacename>
的实现类)。"
-#~ msgid "There are four main rules to follow here:"
-#~ msgstr "这里要遵循四条主要的规则:"
+#~ msgid ""
+#~ "<![CDATA[package eg;\n"
+#~ "import java.util.Set;\n"
+#~ "import java.util.Date;\n"
+#~ "\n"
+#~ "public class Cat {\n"
+#~ " private Long id; // identifier\n"
+#~ "\n"
+#~ " private Date birthdate;\n"
+#~ " private Color color;\n"
+#~ " private char sex;\n"
+#~ " private float weight;\n"
+#~ " private int litterId;\n"
+#~ "\n"
+#~ " private Cat mother;\n"
+#~ " private Set kittens = new HashSet();\n"
+#~ "\n"
+#~ " private void setId(Long id) {\n"
+#~ " this.id=id;\n"
+#~ " }\n"
+#~ " public Long getId() {\n"
+#~ " return id;\n"
+#~ " }\n"
+#~ "\n"
+#~ " void setBirthdate(Date date) {\n"
+#~ " birthdate = date;\n"
+#~ " }\n"
+#~ " public Date getBirthdate() {\n"
+#~ " return birthdate;\n"
+#~ " }\n"
+#~ "\n"
+#~ " void setWeight(float weight) {\n"
+#~ " this.weight = weight;\n"
+#~ " }\n"
+#~ " public float getWeight() {\n"
+#~ " return weight;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public Color getColor() {\n"
+#~ " return color;\n"
+#~ " }\n"
+#~ " void setColor(Color color) {\n"
+#~ " this.color = color;\n"
+#~ " }\n"
+#~ "\n"
+#~ " void setSex(char sex) {\n"
+#~ " this.sex=sex;\n"
+#~ " }\n"
+#~ " public char getSex() {\n"
+#~ " return sex;\n"
+#~ " }\n"
+#~ "\n"
+#~ " void setLitterId(int id) {\n"
+#~ " this.litterId = id;\n"
+#~ " }\n"
+#~ " public int getLitterId() {\n"
+#~ " return litterId;\n"
+#~ " }\n"
+#~ "\n"
+#~ " void setMother(Cat mother) {\n"
+#~ " this.mother = mother;\n"
+#~ " }\n"
+#~ " public Cat getMother() {\n"
+#~ " return mother;\n"
+#~ " }\n"
+#~ " void setKittens(Set kittens) {\n"
+#~ " this.kittens = kittens;\n"
+#~ " }\n"
+#~ " public Set getKittens() {\n"
+#~ " return kittens;\n"
+#~ " }\n"
+#~ " \n"
+#~ " // addKitten not needed by Hibernate\n"
+#~ " public void addKitten(Cat kitten) {\n"
+#~ " kitten.setMother(this);\n"
+#~ " kitten.setLitterId( kittens.size() ); \n"
+#~ " kittens.add(kitten);\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[package eg;\n"
+#~ "import java.util.Set;\n"
+#~ "import java.util.Date;\n"
+#~ "\n"
+#~ "public class Cat {\n"
+#~ " private Long id; // identifier\n"
+#~ "\n"
+#~ " private Date birthdate;\n"
+#~ " private Color color;\n"
+#~ " private char sex;\n"
+#~ " private float weight;\n"
+#~ " private int litterId;\n"
+#~ "\n"
+#~ " private Cat mother;\n"
+#~ " private Set kittens = new HashSet();\n"
+#~ "\n"
+#~ " private void setId(Long id) {\n"
+#~ " this.id=id;\n"
+#~ " }\n"
+#~ " public Long getId() {\n"
+#~ " return id;\n"
+#~ " }\n"
+#~ "\n"
+#~ " void setBirthdate(Date date) {\n"
+#~ " birthdate = date;\n"
+#~ " }\n"
+#~ " public Date getBirthdate() {\n"
+#~ " return birthdate;\n"
+#~ " }\n"
+#~ "\n"
+#~ " void setWeight(float weight) {\n"
+#~ " this.weight = weight;\n"
+#~ " }\n"
+#~ " public float getWeight() {\n"
+#~ " return weight;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public Color getColor() {\n"
+#~ " return color;\n"
+#~ " }\n"
+#~ " void setColor(Color color) {\n"
+#~ " this.color = color;\n"
+#~ " }\n"
+#~ "\n"
+#~ " void setSex(char sex) {\n"
+#~ " this.sex=sex;\n"
+#~ " }\n"
+#~ " public char getSex() {\n"
+#~ " return sex;\n"
+#~ " }\n"
+#~ "\n"
+#~ " void setLitterId(int id) {\n"
+#~ " this.litterId = id;\n"
+#~ " }\n"
+#~ " public int getLitterId() {\n"
+#~ " return litterId;\n"
+#~ " }\n"
+#~ "\n"
+#~ " void setMother(Cat mother) {\n"
+#~ " this.mother = mother;\n"
+#~ " }\n"
+#~ " public Cat getMother() {\n"
+#~ " return mother;\n"
+#~ " }\n"
+#~ " void setKittens(Set kittens) {\n"
+#~ " this.kittens = kittens;\n"
+#~ " }\n"
+#~ " public Set getKittens() {\n"
+#~ " return kittens;\n"
+#~ " }\n"
+#~ " \n"
+#~ " // addKitten not needed by Hibernate\n"
+#~ " public void addKitten(Cat kitten) {\n"
+#~ " kitten.setMother(this);\n"
+#~ " kitten.setLitterId( kittens.size() ); \n"
+#~ " kittens.add(kitten);\n"
+#~ " }\n"
+#~ "}]]>"
#~ msgid ""
-#~ "TODO: Document user-extension framework in the property and proxy
packages"
-#~ msgstr "TODO:property和proxy包里的用户扩展框架文档。"
+#~ "<![CDATA[package eg;\n"
+#~ "\n"
+#~ "public class DomesticCat extends Cat {\n"
+#~ " private String name;\n"
+#~ "\n"
+#~ " public String getName() {\n"
+#~ " return name;\n"
+#~ " }\n"
+#~ " protected void setName(String name) {\n"
+#~ " this.name=name;\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[package eg;\n"
+#~ "\n"
+#~ "public class DomesticCat extends Cat {\n"
+#~ " private String name;\n"
+#~ "\n"
+#~ " public String getName() {\n"
+#~ " return name;\n"
+#~ " }\n"
+#~ " protected void setName(String name) {\n"
+#~ " this.name=name;\n"
+#~ " }\n"
+#~ "}]]>"
+
+#~ msgid ""
+#~ "<![CDATA[public class Cat {\n"
+#~ "\n"
+#~ " ...\n"
+#~ " public boolean equals(Object other) {\n"
+#~ " if (this == other) return true;\n"
+#~ " if ( !(other instanceof Cat) ) return false;\n"
+#~ "\n"
+#~ " final Cat cat = (Cat) other;\n"
+#~ "\n"
+#~ " if ( !cat.getLitterId().equals( getLitterId() ) ) return false;\n"
+#~ " if ( !cat.getMother().equals( getMother() ) ) return false;\n"
+#~ "\n"
+#~ " return true;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public int hashCode() {\n"
+#~ " int result;\n"
+#~ " result = getMother().hashCode();\n"
+#~ " result = 29 * result + getLitterId();\n"
+#~ " return result;\n"
+#~ " }\n"
+#~ "\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[public class Cat {\n"
+#~ "\n"
+#~ " ...\n"
+#~ " public boolean equals(Object other) {\n"
+#~ " if (this == other) return true;\n"
+#~ " if ( !(other instanceof Cat) ) return false;\n"
+#~ "\n"
+#~ " final Cat cat = (Cat) other;\n"
+#~ "\n"
+#~ " if ( !cat.getLitterId().equals( getLitterId() ) ) return false;\n"
+#~ " if ( !cat.getMother().equals( getMother() ) ) return false;\n"
+#~ "\n"
+#~ " return true;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public int hashCode() {\n"
+#~ " int result;\n"
+#~ " result = getMother().hashCode();\n"
+#~ " result = 29 * result + getLitterId();\n"
+#~ " return result;\n"
+#~ " }\n"
+#~ "\n"
+#~ "}]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class entity-name=\"Customer\">\n"
+#~ "\n"
+#~ " <id name=\"id\"\n"
+#~ " type=\"long\"\n"
+#~ " column=\"ID\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property name=\"name\"\n"
+#~ " column=\"NAME\"\n"
+#~ " type=\"string\"/>\n"
+#~ "\n"
+#~ " <property name=\"address\"\n"
+#~ " column=\"ADDRESS\"\n"
+#~ " type=\"string\"/>\n"
+#~ "\n"
+#~ " <many-to-one name=\"organization\"\n"
+#~ " column=\"ORGANIZATION_ID\"\n"
+#~ " class=\"Organization\"/>\n"
+#~ "\n"
+#~ " <bag name=\"orders\"\n"
+#~ " inverse=\"true\"\n"
+#~ " lazy=\"false\"\n"
+#~ " cascade=\"all\">\n"
+#~ " <key column=\"CUSTOMER_ID\"/>\n"
+#~ " <one-to-many class=\"Order\"/>\n"
+#~ " </bag>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ " \n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class entity-name=\"Customer\">\n"
+#~ "\n"
+#~ " <id name=\"id\"\n"
+#~ " type=\"long\"\n"
+#~ " column=\"ID\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <property name=\"name\"\n"
+#~ " column=\"NAME\"\n"
+#~ " type=\"string\"/>\n"
+#~ "\n"
+#~ " <property name=\"address\"\n"
+#~ " column=\"ADDRESS\"\n"
+#~ " type=\"string\"/>\n"
+#~ "\n"
+#~ " <many-to-one name=\"organization\"\n"
+#~ " column=\"ORGANIZATION_ID\"\n"
+#~ " class=\"Organization\"/>\n"
+#~ "\n"
+#~ " <bag name=\"orders\"\n"
+#~ " inverse=\"true\"\n"
+#~ " lazy=\"false\"\n"
+#~ " cascade=\"all\">\n"
+#~ " <key column=\"CUSTOMER_ID\"/>\n"
+#~ " <one-to-many class=\"Order\"/>\n"
+#~ " </bag>\n"
+#~ "\n"
+#~ " </class>\n"
+#~ " \n"
+#~ "</hibernate-mapping>]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Session s = openSession();\n"
+#~ "Transaction tx = s.beginTransaction();\n"
+#~ "Session s = openSession();\n"
+#~ "\n"
+#~ "// Create a customer\n"
+#~ "Map david = new HashMap();\n"
+#~ "david.put(\"name\", \"David\");\n"
+#~ "\n"
+#~ "// Create an organization\n"
+#~ "Map foobar = new HashMap();\n"
+#~ "foobar.put(\"name\", \"Foobar Inc.\");\n"
+#~ "\n"
+#~ "// Link both\n"
+#~ "david.put(\"organization\", foobar);\n"
+#~ "\n"
+#~ "// Save both\n"
+#~ "s.save(\"Customer\", david);\n"
+#~ "s.save(\"Organization\", foobar);\n"
+#~ "\n"
+#~ "tx.commit();\n"
+#~ "s.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session s = openSession();\n"
+#~ "Transaction tx = s.beginTransaction();\n"
+#~ "Session s = openSession();\n"
+#~ "\n"
+#~ "// Create a customer\n"
+#~ "Map david = new HashMap();\n"
+#~ "david.put(\"name\", \"David\");\n"
+#~ "\n"
+#~ "// Create an organization\n"
+#~ "Map foobar = new HashMap();\n"
+#~ "foobar.put(\"name\", \"Foobar Inc.\");\n"
+#~ "\n"
+#~ "// Link both\n"
+#~ "david.put(\"organization\", foobar);\n"
+#~ "\n"
+#~ "// Save both\n"
+#~ "s.save(\"Customer\", david);\n"
+#~ "s.save(\"Organization\", foobar);\n"
+#~ "\n"
+#~ "tx.commit();\n"
+#~ "s.close();]]>"
+
+#~ msgid ""
+#~ "<![CDATA[Session dynamicSession = pojoSession.getSession(EntityMode."
+#~ "MAP);\n"
+#~ "\n"
+#~ "// Create a customer\n"
+#~ "Map david = new HashMap();\n"
+#~ "david.put(\"name\", \"David\");\n"
+#~ "dynamicSession.save(\"Customer\", david);\n"
+#~ "...\n"
+#~ "dynamicSession.flush();\n"
+#~ "dynamicSession.close()\n"
+#~ "...\n"
+#~ "// Continue on pojoSession\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session dynamicSession = pojoSession.getSession(EntityMode."
+#~ "MAP);\n"
+#~ "\n"
+#~ "// Create a customer\n"
+#~ "Map david = new HashMap();\n"
+#~ "david.put(\"name\", \"David\");\n"
+#~ "dynamicSession.save(\"Customer\", david);\n"
+#~ "...\n"
+#~ "dynamicSession.flush();\n"
+#~ "dynamicSession.close()\n"
+#~ "...\n"
+#~ "// Continue on pojoSession\n"
+#~ "]]>"
+
+#~ msgid ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ " <class entity-name=\"Customer\">\n"
+#~ " <!--\n"
+#~ " Override the dynamic-map entity-mode\n"
+#~ " tuplizer for the customer entity\n"
+#~ " -->\n"
+#~ " <tuplizer entity-mode=\"dynamic-map\"\n"
+#~ " class=\"CustomMapTuplizerImpl\"/>\n"
+#~ "\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"ID\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <!-- other properties -->\n"
+#~ " ...\n"
+#~ " </class>\n"
+#~ "</hibernate-mapping>\n"
+#~ "\n"
+#~ "\n"
+#~ "public class CustomMapTuplizerImpl\n"
+#~ " extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n"
+#~ " // override the buildInstantiator() method to plug in our custom "
+#~ "map...\n"
+#~ " protected final Instantiator buildInstantiator(\n"
+#~ " org.hibernate.mapping.PersistentClass mappingInfo) {\n"
+#~ " return new CustomMapInstantiator( mappingInfo );\n"
+#~ " }\n"
+#~ "\n"
+#~ " private static final class CustomMapInstantiator\n"
+#~ " extends org.hibernate.tuple.DynamicMapInstantitor {\n"
+#~ " // override the generateMap() method to return our custom
map...\n"
+#~ " protected final Map generateMap() {\n"
+#~ " return new CustomMap();\n"
+#~ " }\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[<hibernate-mapping>\n"
+#~ " <class entity-name=\"Customer\">\n"
+#~ " <!--\n"
+#~ " Override the dynamic-map entity-mode\n"
+#~ " tuplizer for the customer entity\n"
+#~ " -->\n"
+#~ " <tuplizer entity-mode=\"dynamic-map\"\n"
+#~ " class=\"CustomMapTuplizerImpl\"/>\n"
+#~ "\n"
+#~ " <id name=\"id\" type=\"long\"
column=\"ID\">\n"
+#~ " <generator class=\"sequence\"/>\n"
+#~ " </id>\n"
+#~ "\n"
+#~ " <!-- other properties -->\n"
+#~ " ...\n"
+#~ " </class>\n"
+#~ "</hibernate-mapping>\n"
+#~ "\n"
+#~ "\n"
+#~ "public class CustomMapTuplizerImpl\n"
+#~ " extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n"
+#~ " // override the buildInstantiator() method to plug in our custom "
+#~ "map...\n"
+#~ " protected final Instantiator buildInstantiator(\n"
+#~ " org.hibernate.mapping.PersistentClass mappingInfo) {\n"
+#~ " return new CustomMapInstantiator( mappingInfo );\n"
+#~ " }\n"
+#~ "\n"
+#~ " private static final class CustomMapInstantiator\n"
+#~ " extends org.hibernate.tuple.DynamicMapInstantitor {\n"
+#~ " // override the generateMap() method to return our custom
map...\n"
+#~ " protected final Map generateMap() {\n"
+#~ " return new CustomMap();\n"
+#~ " }\n"
+#~ " }\n"
+#~ "}]]>"
+
+#~ msgid ""
+#~ "/**\n"
+#~ " * A very trivial JDK Proxy InvocationHandler implementation where we "
+#~ "proxy an interface as\n"
+#~ " * the domain model and simply store persistent state in an internal "
+#~ "Map. This is an extremely\n"
+#~ " * trivial example meant only for illustration.\n"
+#~ " */\n"
+#~ "public final class DataProxyHandler implements InvocationHandler {\n"
+#~ " private String entityName;\n"
+#~ " private HashMap data = new HashMap();\n"
+#~ "\n"
+#~ " public DataProxyHandler(String entityName, Serializable id) {\n"
+#~ " this.entityName = entityName;\n"
+#~ " data.put( \"Id\", id );\n"
+#~ " }\n"
+#~ "\n"
+#~ " public Object invoke(Object proxy, Method method, Object[] args) "
+#~ "throws Throwable {\n"
+#~ " String methodName = method.getName();\n"
+#~ " if ( methodName.startsWith( \"set\" ) ) {\n"
+#~ " String propertyName = methodName.substring( 3
);\n"
+#~ " data.put( propertyName, args[0] );\n"
+#~ " }\n"
+#~ " else if ( methodName.startsWith( \"get\" ) )
{\n"
+#~ " String propertyName = methodName.substring( 3
);\n"
+#~ " return data.get( propertyName );\n"
+#~ " }\n"
+#~ " else if ( \"toString\".equals( methodName ) )
{\n"
+#~ " return entityName + \"#\" + data.get(
\"Id\" );\n"
+#~ " }\n"
+#~ " else if ( \"hashCode\".equals( methodName ) )
{\n"
+#~ " return new Integer( this.hashCode() );\n"
+#~ " }\n"
+#~ " return null;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public String getEntityName() {\n"
+#~ " return entityName;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public HashMap getData() {\n"
+#~ " return data;\n"
+#~ " }\n"
+#~ "}\n"
+#~ "\n"
+#~ "/**\n"
+#~ " *\n"
+#~ " */\n"
+#~ "public class ProxyHelper {\n"
+#~ " public static String extractEntityName(Object object) {\n"
+#~ " // Our custom java.lang.reflect.Proxy instances actually bundle\n"
+#~ " // their appropriate entity name, so we simply extract it from "
+#~ "there\n"
+#~ " // if this represents one of our proxies; otherwise, we return "
+#~ "null\n"
+#~ " if ( Proxy.isProxyClass( object.getClass() ) ) {\n"
+#~ " InvocationHandler handler = Proxy.getInvocationHandler"
+#~ "( object );\n"
+#~ " if ( DataProxyHandler.class.isAssignableFrom(
handler.getClass"
+#~ "() ) ) {\n"
+#~ " DataProxyHandler myHandler = ( DataProxyHandler ) "
+#~ "handler;\n"
+#~ " return myHandler.getEntityName();\n"
+#~ " }\n"
+#~ " }\n"
+#~ " return null;\n"
+#~ " }\n"
+#~ "\n"
+#~ " // various other utility methods ....\n"
+#~ "\n"
+#~ "}\n"
+#~ "\n"
+#~ "/**\n"
+#~ " * The EntityNameResolver implementation.\n"
+#~ " * IMPL NOTE : An EntityNameResolver really defines a strategy for how "
+#~ "entity names should be\n"
+#~ " * resolved. Since this particular impl can handle resolution for all of
"
+#~ "our entities we want to\n"
+#~ " * take advantage of the fact that SessionFactoryImpl keeps these in a "
+#~ "Set so that we only ever\n"
+#~ " * have one instance registered. Why? Well, when it comes time to "
+#~ "resolve an entity name,\n"
+#~ " * Hibernate must iterate over all the registered resolvers. So keeping "
+#~ "that number down\n"
+#~ " * helps that process be as speedy as possible. Hence the equals and "
+#~ "hashCode impls\n"
+#~ " */\n"
+#~ "public class MyEntityNameResolver implements EntityNameResolver {\n"
+#~ " public static final MyEntityNameResolver INSTANCE = new "
+#~ "MyEntityNameResolver();\n"
+#~ "\n"
+#~ " public String resolveEntityName(Object entity) {\n"
+#~ " return ProxyHelper.extractEntityName( entity );\n"
+#~ " }\n"
+#~ "\n"
+#~ " public boolean equals(Object obj) {\n"
+#~ " return getClass().equals( obj.getClass() );\n"
+#~ " }\n"
+#~ "\n"
+#~ " public int hashCode() {\n"
+#~ " return getClass().hashCode();\n"
+#~ " }\n"
+#~ "}\n"
+#~ "\n"
+#~ "public class MyEntityTuplizer extends PojoEntityTuplizer {\n"
+#~ " public MyEntityTuplizer(EntityMetamodel entityMetamodel, "
+#~ "PersistentClass mappedEntity) {\n"
+#~ " super( entityMetamodel, mappedEntity );\n"
+#~ " }\n"
+#~ "\n"
+#~ " public EntityNameResolver[] getEntityNameResolvers() {\n"
+#~ " return new EntityNameResolver[] { MyEntityNameResolver."
+#~ "INSTANCE };\n"
+#~ " }\n"
+#~ "\n"
+#~ " public String determineConcreteSubclassEntityName(Object "
+#~ "entityInstance, SessionFactoryImplementor factory) {\n"
+#~ " String entityName = ProxyHelper.extractEntityName"
+#~ "( entityInstance );\n"
+#~ " if ( entityName == null ) {\n"
+#~ " entityName = super.determineConcreteSubclassEntityName"
+#~ "( entityInstance, factory );\n"
+#~ " }\n"
+#~ " return entityName;\n"
+#~ " }\n"
+#~ "\n"
+#~ " ...\n"
+#~ "}"
+#~ msgstr ""
+#~ "/**\n"
+#~ " * A very trivial JDK Proxy InvocationHandler implementation where we "
+#~ "proxy an interface as\n"
+#~ " * the domain model and simply store persistent state in an internal "
+#~ "Map. This is an extremely\n"
+#~ " * trivial example meant only for illustration.\n"
+#~ " */\n"
+#~ "public final class DataProxyHandler implements InvocationHandler {\n"
+#~ " private String entityName;\n"
+#~ " private HashMap data = new HashMap();\n"
+#~ "\n"
+#~ " public DataProxyHandler(String entityName, Serializable id) {\n"
+#~ " this.entityName = entityName;\n"
+#~ " data.put( \"Id\", id );\n"
+#~ " }\n"
+#~ "\n"
+#~ " public Object invoke(Object proxy, Method method, Object[] args) "
+#~ "throws Throwable {\n"
+#~ " String methodName = method.getName();\n"
+#~ " if ( methodName.startsWith( \"set\" ) ) {\n"
+#~ " String propertyName = methodName.substring( 3
);\n"
+#~ " data.put( propertyName, args[0] );\n"
+#~ " }\n"
+#~ " else if ( methodName.startsWith( \"get\" ) )
{\n"
+#~ " String propertyName = methodName.substring( 3
);\n"
+#~ " return data.get( propertyName );\n"
+#~ " }\n"
+#~ " else if ( \"toString\".equals( methodName ) )
{\n"
+#~ " return entityName + \"#\" + data.get(
\"Id\" );\n"
+#~ " }\n"
+#~ " else if ( \"hashCode\".equals( methodName ) )
{\n"
+#~ " return new Integer( this.hashCode() );\n"
+#~ " }\n"
+#~ " return null;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public String getEntityName() {\n"
+#~ " return entityName;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public HashMap getData() {\n"
+#~ " return data;\n"
+#~ " }\n"
+#~ "}\n"
+#~ "\n"
+#~ "/**\n"
+#~ " *\n"
+#~ " */\n"
+#~ "public class ProxyHelper {\n"
+#~ " public static String extractEntityName(Object object) {\n"
+#~ " // Our custom java.lang.reflect.Proxy instances actually bundle\n"
+#~ " // their appropriate entity name, so we simply extract it from "
+#~ "there\n"
+#~ " // if this represents one of our proxies; otherwise, we return "
+#~ "null\n"
+#~ " if ( Proxy.isProxyClass( object.getClass() ) ) {\n"
+#~ " InvocationHandler handler = Proxy.getInvocationHandler"
+#~ "( object );\n"
+#~ " if ( DataProxyHandler.class.isAssignableFrom(
handler.getClass"
+#~ "() ) ) {\n"
+#~ " DataProxyHandler myHandler = ( DataProxyHandler ) "
+#~ "handler;\n"
+#~ " return myHandler.getEntityName();\n"
+#~ " }\n"
+#~ " }\n"
+#~ " return null;\n"
+#~ " }\n"
+#~ "\n"
+#~ " // various other utility methods ....\n"
+#~ "\n"
+#~ "}\n"
+#~ "\n"
+#~ "/**\n"
+#~ " * The EntityNameResolver implementation.\n"
+#~ " * IMPL NOTE : An EntityNameResolver really defines a strategy for how "
+#~ "entity names should be\n"
+#~ " * resolved. Since this particular impl can handle resolution for all of
"
+#~ "our entities we want to\n"
+#~ " * take advantage of the fact that SessionFactoryImpl keeps these in a "
+#~ "Set so that we only ever\n"
+#~ " * have one instance registered. Why? Well, when it comes time to "
+#~ "resolve an entity name,\n"
+#~ " * Hibernate must iterate over all the registered resolvers. So keeping "
+#~ "that number down\n"
+#~ " * helps that process be as speedy as possible. Hence the equals and "
+#~ "hashCode impls\n"
+#~ " */\n"
+#~ "public class MyEntityNameResolver implements EntityNameResolver {\n"
+#~ " public static final MyEntityNameResolver INSTANCE = new "
+#~ "MyEntityNameResolver();\n"
+#~ "\n"
+#~ " public String resolveEntityName(Object entity) {\n"
+#~ " return ProxyHelper.extractEntityName( entity );\n"
+#~ " }\n"
+#~ "\n"
+#~ " public boolean equals(Object obj) {\n"
+#~ " return getClass().equals( obj.getClass() );\n"
+#~ " }\n"
+#~ "\n"
+#~ " public int hashCode() {\n"
+#~ " return getClass().hashCode();\n"
+#~ " }\n"
+#~ "}\n"
+#~ "\n"
+#~ "public class MyEntityTuplizer extends PojoEntityTuplizer {\n"
+#~ " public MyEntityTuplizer(EntityMetamodel entityMetamodel, "
+#~ "PersistentClass mappedEntity) {\n"
+#~ " super( entityMetamodel, mappedEntity );\n"
+#~ " }\n"
+#~ "\n"
+#~ " public EntityNameResolver[] getEntityNameResolvers() {\n"
+#~ " return new EntityNameResolver[] { MyEntityNameResolver."
+#~ "INSTANCE };\n"
+#~ " }\n"
+#~ "\n"
+#~ " public String determineConcreteSubclassEntityName(Object "
+#~ "entityInstance, SessionFactoryImplementor factory) {\n"
+#~ " String entityName = ProxyHelper.extractEntityName"
+#~ "( entityInstance );\n"
+#~ " if ( entityName == null ) {\n"
+#~ " entityName = super.determineConcreteSubclassEntityName"
+#~ "( entityInstance, factory );\n"
+#~ " }\n"
+#~ " return entityName;\n"
+#~ " }\n"
+#~ "\n"
+#~ " ...\n"
+#~ "}"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/portability.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/portability.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/portability.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,234 +1,141 @@
-# Language zh-CN translations for Branch package.
-# Automatically generated, 2009.
-#
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: Branch 3_3\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-23 18:41+0000\n"
-"PO-Revision-Date: 2009-06-16 18:47+0000\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"POT-Creation-Date: 2010-01-08T04:07:19\n"
+"PO-Revision-Date: 2010-01-11 10:57+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: portability.xml:26
#, no-c-format
msgid "Database Portability Considerations"
-msgstr ""
+msgstr "数据库移植性考量"
#. Tag: title
-#: portability.xml:29
#, no-c-format
msgid "Portability Basics"
-msgstr ""
+msgstr "移植性基础"
#. Tag: para
-#: portability.xml:31
#, no-c-format
-msgid ""
-"One of the selling points of Hibernate (and really Object/Relational Mapping
"
-"as a whole) is the notion of database portability. This could mean an "
-"internal IT user migrating from one database vendor to another, or it could "
-"mean a framework or deployable application consuming Hibernate to "
-"simultaneously target multiple database products by their users. Regardless "
-"of the exact scenario, the basic idea is that you want Hibernate to help you
"
-"run against any number of databases without changes to your code, and "
-"ideally without any changes to the mapping metadata."
-msgstr ""
+msgid "One of the selling points of Hibernate (and really Object/Relational Mapping
as a whole) is the notion of database portability. This could mean an internal IT user
migrating from one database vendor to another, or it could mean a framework or deployable
application consuming Hibernate to simultaneously target multiple database products by
their users. Regardless of the exact scenario, the basic idea is that you want Hibernate
to help you run against any number of databases without changes to your code, and ideally
without any changes to the mapping metadata."
+msgstr "Hibernate(实际上是整个 Object/Relational Mapping)的一个卖点是数据库的移植性。这意味着内部的 IT
用户可以改变数据库供应商,或者可部署的应用程序/框架使用 Hibernate 来同时使用多个数据库产品。不考虑具体的应用情景,这里的基本概念是 Hibernate
可帮助你运行多种数据库而无需修改你的代码,理想情况下甚至不用修改映射元数据。"
#. Tag: title
-#: portability.xml:42
#, no-c-format
msgid "Dialect"
-msgstr ""
+msgstr "Dialect"
#. Tag: para
-#: portability.xml:44
#, no-c-format
-msgid ""
-"The first line of portability for Hibernate is the dialect, which is a "
-"specialization of the
<classname>org.hibernate.dialect.Dialect</classname> "
-"contract. A dialect encapsulates all the differences in how Hibernate must "
-"communicate with a particular database to accomplish some task like getting "
-"a sequence value or structuring a SELECT query. Hibernate bundles a wide "
-"range of dialects for many of the most popular databases. If you find that "
-"your particular database is not among them, it is not terribly difficult to "
-"write your own."
-msgstr ""
+msgid "The first line of portability for Hibernate is the dialect, which is a
specialization of the <classname>org.hibernate.dialect.Dialect</classname>
contract. A dialect encapsulates all the differences in how Hibernate must communicate
with a particular database to accomplish some task like getting a sequence value or
structuring a SELECT query. Hibernate bundles a wide range of dialects for many of the
most popular databases. If you find that your particular database is not among them, it is
not terribly difficult to write your own."
+msgstr "Hibernate 的移植性的首要问题是方言(dialect),也就是
<classname>org.hibernate.dialect.Dialect</classname> 合约的具体实例。方言封装了 Hibernate
和特定数据库通讯以完成某些任务如获取序列值或构建 SELECT 查询等的所有差异。Hibernate
捆绑了用于许多最常用的数据库的方言。如果你发现自己使用的数据库不在其中,编写自定义的方言也不是很困难的事情。"
#. Tag: title
-#: portability.xml:55
#, no-c-format
msgid "Dialect resolution"
-msgstr ""
+msgstr "方言的使用"
#. Tag: para
-#: portability.xml:57
#, no-c-format
-msgid ""
-"Originally, Hibernate would always require that users specify which dialect "
-"to use. In the case of users looking to simultaneously target multiple "
-"databases with their build that was problematic. Generally this required "
-"their users to configure the Hibernate dialect or defining their own method "
-"of setting that value."
-msgstr ""
+msgid "Originally, Hibernate would always require that users specify which dialect
to use. In the case of users looking to simultaneously target multiple databases with
their build that was problematic. Generally this required their users to configure the
Hibernate dialect or defining their own method of setting that value."
+msgstr "最开始,Hibernate 总是要求用户指定所使用的方言(dialect)。在用户希望同时使用多个数据库时就会出现问题。通常这要求用户配置
Hibernate 方言或者定义自己设置这个值的方法。"
#. Tag: para
-#: portability.xml:64
#, no-c-format
-msgid ""
-"Starting with version 3.2, Hibernate introduced the notion of automatically "
-"detecting the dialect to use based on the <interfacename>java.sql."
-"DatabaseMetaData</interfacename> obtained from a
<interfacename>java.sql."
-"Connection</interfacename> to that database. This was much better, expect
"
-"that this resolution was limited to databases Hibernate know about ahead of "
-"time and was in no way configurable or overrideable."
-msgstr ""
+msgid "Starting with version 3.2, Hibernate introduced the notion of automatically
detecting the dialect to use based on the
<interfacename>java.sql.DatabaseMetaData</interfacename> obtained from a
<interfacename>java.sql.Connection</interfacename> to that database. This was
much better, expect that this resolution was limited to databases Hibernate know about
ahead of time and was in no way configurable or overrideable."
+msgstr "从版本 3.2 开始,Hibernate 引入了方言的自动检测,它基于从该数据库的
<interfacename>java.sql.Connection</interfacename> 上获得的
<interfacename>java.sql.DatabaseMetaData</interfacename>。这是一个更好的方案,但它局限于
Hibernate 已知的数据库且无法进行配置和覆盖。"
#. Tag: para
-#: portability.xml:72
#, no-c-format
-msgid ""
-"Starting with version 3.3, Hibernate has a fare more powerful way to "
-"automatically determine which dialect to should be used by relying on a "
-"series of delegates which implement the
<interfacename>org.hibernate.dialect."
-"resolver.DialectResolver</interfacename> which defines only a single
method:"
-"<programlisting><![CDATA[public Dialect resolveDialect(DatabaseMetaData
"
-"metaData) throws JDBCConnectionException]]></programlisting>. The basic
"
-"contract here is that if the resolver 'understands' the given database
"
-"metadata then it returns the corresponding Dialect; if not it returns null "
-"and the process continues to the next resolver. The signature also "
-"identifies
<exceptionname>org.hibernate.exception.JDBCConnectionException</"
-"exceptionname> as possibly being thrown. A JDBCConnectionException here is
"
-"interpreted to imply a \"non transient\" (aka non-recoverable) connection
"
-"problem and is used to indicate an immediate stop to resolution attempts. "
-"All other exceptions result in a warning and continuing on to the next "
-"resolver."
-msgstr ""
+msgid "Starting with version 3.3, Hibernate has a fare more powerful way to
automatically determine which dialect to should be used by relying on a series of
delegates which implement the
<interfacename>org.hibernate.dialect.resolver.DialectResolver</interfacename>
which defines only a single method:<programlisting>public Dialect
resolveDialect(DatabaseMetaData metaData) throws
JDBCConnectionException</programlisting>. The basic contract here is that if the
resolver 'understands' the given database metadata then it returns the
corresponding Dialect; if not it returns null and the process continues to the next
resolver. The signature also identifies
<exceptionname>org.hibernate.exception.JDBCConnectionException</exceptionname>
as possibly being thrown. A JDBCConnectionException here is interpreted to imply a
\"non transient\" (aka non-recoverable) connection problem and is used to
indicate an immediate stop to resolution attempts. All other exceptions result in a
warning and!
continuing on to the next resolver."
+msgstr "从版本 3.3 开始,Hibernate 有了更为强大的自动决定应该使用哪个方言的方法,这根据一系列实现
<interfacename>org.hibernate.dialect.resolver.DialectResolver</interfacename>
接口的代理,它们只定义一个方法:<programlisting>public Dialect resolveDialect(DatabaseMetaData
metaData) throws
JDBCConnectionException</programlisting>。这里的基本合约是如果解析者(resolver)“理解”给点数据库的元数据并返回对应的方言;否则返回
null 并使用下一个解析者。这个签名也指定可能抛出的异常
<exceptionname>org.hibernate.exception.JDBCConnectionException</exceptionname>。这里的
JDBCConnectionException
被认为是“非瞬时的”(也就是不可恢复的)连接问题且指示立即终止解析。所有其他的异常都导致警告发出并使用下一个解析者。\""
#. Tag: para
-#: portability.xml:85
#, no-c-format
-msgid ""
-"The cool part about these resolvers is that users can also register their "
-"own custom resolvers which will be processed ahead of the built-in Hibernate
"
-"ones. This might be useful in a number of different situations: it allows "
-"easy integration for auto-detection of dialects beyond those shipped with "
-"HIbernate itself; it allows you to specify to use a custom dialect when a "
-"particular database is recognized; etc. To register one or more resolvers, "
-"simply specify them (seperated by commas, tabs or spaces) using the "
-"'hibernate.dialect_resolvers' configuration setting (see the "
-"<constant>DIALECT_RESOLVERS</constant> constant on
<classname>org.hibernate."
-"cfg.Environment</classname>)."
-msgstr ""
+msgid "The cool part about these resolvers is that users can also register their own
custom resolvers which will be processed ahead of the built-in Hibernate ones. This might
be useful in a number of different situations: it allows easy integration for
auto-detection of dialects beyond those shipped with HIbernate itself; it allows you to
specify to use a custom dialect when a particular database is recognized; etc. To register
one or more resolvers, simply specify them (seperated by commas, tabs or spaces) using the
'hibernate.dialect_resolvers' configuration setting (see the
<constant>DIALECT_RESOLVERS</constant> constant on
<classname>org.hibernate.cfg.Environment</classname>)."
+msgstr
"这些解析者最棒的功能是用户也可以注册自定义的解析者,它们将在内置的解析者之前被调用。在许多情况下这可能很有用:它可以轻易地集成内置方言之外的方言的自动检测;它让你可以使用自定义的方言等。要注册一个或多个解析者,只要用
'hibernate.dialect_resolvers' 配置设置指定它们(由逗号、制表符或空格隔开)就可以了(请参考
<classname>org.hibernate.cfg.Environment</classname> 上的
<constant>DIALECT_RESOLVERS</constant>)。"
#. Tag: title
-#: portability.xml:98
#, no-c-format
msgid "Identifier generation"
-msgstr ""
+msgstr "标识符的生成"
#. Tag: para
-#: portability.xml:100
#, no-c-format
-msgid ""
-"When considering portability between databases, another important decision "
-"is selecting the identifier generation stratagy you want to use. Originally "
-"Hibernate provided the <emphasis>native</emphasis> generator for this
"
-"purpose, which was intended to select between a
<emphasis>sequence</"
-"emphasis>, <emphasis>identity</emphasis>, or
<emphasis>table</emphasis> "
-"strategy depending on the capability of the underlying database. However, an
"
-"insidious implication of this approach comes about when targtetting some "
-"databases which support <emphasis>identity</emphasis> generation and
some "
-"which do not. <emphasis>identity</emphasis> generation relies on the
SQL "
-"definition of an IDENTITY (or auto-increment) column to manage the "
-"identifier value; it is what is known as a post-insert generation strategy "
-"becauase the insert must actually happen before we can know the identifier "
-"value. Because Hibernate relies on this identifier value to uniquely "
-"reference entities within a persistence context it must then issue the "
-"insert immediately when the users requests the entitiy be associated with "
-"the session (like via save() e.g.) regardless of current transactional "
-"semantics. <note> <para> Hibernate was changed slightly once the
implication "
-"of this was better understood so that the insert is delayed in cases where "
-"that is feasible. </para> </note> The underlying issue is that the
actual "
-"semanctics of the application itself changes in these cases."
-msgstr ""
+msgid "When considering portability between databases, another important decision is
selecting the identifier generation stratagy you want to use. Originally Hibernate
provided the <emphasis>native</emphasis> generator for this purpose, which was
intended to select between a <emphasis>sequence</emphasis>,
<emphasis>identity</emphasis>, or <emphasis>table</emphasis>
strategy depending on the capability of the underlying database. However, an insidious
implication of this approach comes about when targtetting some databases which support
<emphasis>identity</emphasis> generation and some which do not.
<emphasis>identity</emphasis> generation relies on the SQL definition of an
IDENTITY (or auto-increment) column to manage the identifier value; it is what is known as
a post-insert generation strategy becauase the insert must actually happen before we can
know the identifier value. Because Hibernate relies on this identifier value to uniquely
reference entities within a persisten!
ce context it must then issue the insert immediately when the users requests the entitiy
be associated with the session (like via save() e.g.) regardless of current transactional
semantics. The underlying issue is that the semantics of the application itself changes in
these cases."
+msgstr "当考虑数据库的移植性时,另外一个重要的考量是选择标识符生成策略。Hibernate 原先提供的
<emphasis>native</emphasis> 生成器的目的是根据底层数据库的能力在
<emphasis>sequence</emphasis>、<emphasis>identity</emphasis> 或
<emphasis>table</emphasis>
策略间进行选择。然而,这个方法一个潜在的问题是有些数据库支持<emphasis>标识符(identity)</emphasis>生成而有些则不支持。<emphasis>标识符(identity)</emphasis>
生成依赖于管理标识符值的 IDENTITY(或 auto-increment)字段的 SQL 定义。它也成为 post-insert 生成策略,因为 insert
必须在知道标识符值后才能实际发生。因为 Hibernate 依赖于这个标识符值来唯一地引用持久性上下文里的实体,当用户请求和会话相关联的实体时,它必须立即执行 insert
语句而不管当前的事务性语义。底层的问题是应用程序的语义在这些情况下自�!
��也会发生改变。"
#. Tag: para
-#: portability.xml:125
#, no-c-format
-msgid ""
-"Starting with version 3.2.3, Hibernate comes with a set of <ulink url="
-"\"http://in.relation.to/2082.lace\">enhanced</ulink> identifier
generators "
-"targetting portability in a much different way. <note> <para> There are
"
-"specifically 2 bundled <emphasis>enhanced</emphasis>generators: "
-"<itemizedlist> <listitem> <para>
<classname>org.hibernate.id.enhanced."
-"SequenceStyleGenerator</classname> </para> </listitem>
<listitem> <para> "
-"<classname>org.hibernate.id.enhanced.TableGenerator</classname>
</para> </"
-"listitem> </itemizedlist> </para> </note> The idea behind
these generators "
-"is to port the actual semantics of the identifer value generation to the "
-"different databases. For example, the
<classname>org.hibernate.id.enhanced."
-"SequenceStyleGenerator</classname> mimics the behavior of a sequence on
"
-"databases which do not support sequences by using a table."
-msgstr ""
+msgid "Hibernate has been improved so that the insert is delayed in cases where that
is feasible."
+msgstr "Hibernate 已经进行了改进,所以在可行时这种插入会被延迟。"
+#. Tag: para
+#, no-c-format
+msgid "Starting with version 3.2.3, Hibernate comes with a set of <ulink
url=\"http://in.relation.to/2082.lace\">enhanced</ulink> identifier
generators targetting portability in a much different way."
+msgstr "从 3.2.3 版本开始,Hibernate 带有一套 <ulink
url=\"http://in.relation.to/2082.lace\">enhanced</ulink>
标识符生成器,它以很不同的方式实现移植性。"
+
+#. Tag: para
+#, no-c-format
+msgid "There are specifically 2 bundled
<emphasis>enhanced</emphasis>generators:"
+msgstr "特别是两个捆绑的 <emphasis>enhanced</emphasis> 生成器:"
+
+#. Tag: para
+#, no-c-format
+msgid
"<classname>org.hibernate.id.enhanced.SequenceStyleGenerator</classname>"
+msgstr
"<classname>org.hibernate.id.enhanced.SequenceStyleGenerator</classname>"
+
+#. Tag: para
+#, no-c-format
+msgid
"<classname>org.hibernate.id.enhanced.TableGenerator</classname>"
+msgstr
"<classname>org.hibernate.id.enhanced.TableGenerator</classname>"
+
+#. Tag: para
+#, no-c-format
+msgid "The idea behind these generators is to port the actual semantics of the
identifer value generation to the different databases. For example, the
<classname>org.hibernate.id.enhanced.SequenceStyleGenerator</classname> mimics
the behavior of a sequence on databases which do not support sequences by using a
table."
+msgstr
"这些生成器背后的概念是把标识符值生成的实际情景移植到不同的数据库里。例如,<classname>org.hibernate.id.enhanced.SequenceStyleGenerator</classname>
通过使用表来模拟不支持序列(sequences)的数据库上的序列行为。"
+
#. Tag: title
-#: portability.xml:154
#, no-c-format
msgid "Database functions"
-msgstr ""
+msgstr "数据库函数"
#. Tag: para
-#: portability.xml:157
#, no-c-format
-msgid ""
-"This is an area in Hibernate in need of improvement. In terms of portability
"
-"concerns, this function handling currently works pretty well from HQL; "
-"however, it is quite lacking in all other aspects."
-msgstr ""
+msgid "This is a new area in Hibernate and as such it is not as mature as the
overall Hibernate experience."
+msgstr "这是 Hibernate 的一个新的领域,暂时还不如 Hibernate 总体那么成熟。"
#. Tag: para
-#: portability.xml:164
#, no-c-format
-msgid ""
-"SQL functions can be referenced in many ways by users. However, not all "
-"databases support the same set of functions. Hibernate, provides a means of "
-"mapping a <emphasis>logical</emphasis> function name to a a delegate
which "
-"knows how to render that particular function, perhaps even using a totally "
-"different physical function call."
-msgstr ""
+msgid "SQL functions can be referenced in many ways by users. However, not all
databases support the same set of functions. Hibernate, provides a means of mapping a
<emphasis>logical</emphasis> function name to a a delegate which knows how to
render that particular function, perhaps even using a totally different physical function
call."
+msgstr "用户可以以多种方式引用 SQL 函数。然而,不是所有的数据库都支持相同的函数集。Hibernate
提供了一种映射<emphasis>逻辑</emphasis>函数名到代理的方法,这个代理知道如何解析特定的函数,甚至可能使用完全不同的物理函数调用。"
#. Tag: para
-#: portability.xml:170
#, no-c-format
-msgid ""
-"Technically this function registration is handled through the
<classname>org."
-"hibernate.dialect.function.SQLFunctionRegistry</classname> class which is
"
-"intended to allow users to provide custom function definitions without "
-"having to provide a custom dialect. This specific behavior is not fully "
-"completed as of yet."
-msgstr ""
+msgid "Technically this function registration is handled through the
<classname>org.hibernate.dialect.function.SQLFunctionRegistry</classname>
class which is intended to allow users to provide custom function definitions without
having to provide a custom dialect. This specific behavior is not fully completed as of
yet."
+msgstr "从技术上来讲,这个函数注册是通过
<classname>org.hibernate.dialect.function.SQLFunctionRegistry</classname>
类进行处理的,它的目的是允许用户提供自定义的函数定义而无需提供自定义的方言。这种特殊的行为目前还未全部开发完毕。"
#. Tag: para
-#: portability.xml:177
#, no-c-format
-msgid ""
-"It is sort of implemented such that users can programatically register "
-"functions with the
<classname>org.hibernate.cfg.Configuration</classname> "
-"and those functions will be recognized for HQL."
-msgstr ""
+msgid "It is sort of implemented such that users can programatically register
functions with the <classname>org.hibernate.cfg.Configuration</classname> and
those functions will be recognized for HQL."
+msgstr "其中一些功能已经实现,如用户可以在程序里用
<classname>org.hibernate.cfg.Configuration</classname> 注册函数且这些函数可被 HQL
识别。"
#. Tag: title
-#: portability.xml:187
#, no-c-format
msgid "Type mappings"
-msgstr ""
+msgstr "类型映射"
#. Tag: para
-#: portability.xml:189
#, no-c-format
msgid "This section scheduled for completion at a later date..."
-msgstr ""
+msgstr "本节内容仍未完成..."
+
Deleted:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/preface.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/preface.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/preface.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,195 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-16 18:47+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Tag: title
-#: preface.xml:29
-#, no-c-format
-msgid "Preface"
-msgstr "前言"
-
-#. Tag: para
-#: preface.xml:31
-#, fuzzy, no-c-format
-msgid ""
-"Working with object-oriented software and a relational database can be "
-"cumbersome and time consuming in today's enterprise environments. Hibernate
"
-"is an Object/Relational Mapping tool for Java environments. The term Object/"
-"Relational Mapping (ORM) refers to the technique of mapping a data "
-"representation from an object model to a relational data model with a SQL-"
-"based schema."
-msgstr ""
-"在今日的企业环境中,把面向对象的软件和关系数据库一起使用可能是相当麻烦、浪费"
-"时间的。Hibernate是一个面向Java环境的对象/关系数据库映射工具。对象/关系数据库"
-"映射(object/relational mapping (ORM))这个术语表示一种技术,用来把对象模型表示"
-"的对象映射到基于SQL的关系模型数据结构中去。"
-
-#. Tag: para
-#: preface.xml:39
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate not only takes care of the mapping from Java classes to database "
-"tables (and from Java data types to SQL data types), but also provides data "
-"query and retrieval facilities. It can also significantly reduce development
"
-"time otherwise spent with manual data handling in SQL and JDBC."
-msgstr ""
-"Hibernate不仅仅管理Java类到数据库表的映射(包括Java数据类型到SQL数据类型的映"
-"射),还提供数据查询和获取数据的方法,可以大幅度减少开发时人工使用SQL和JDBC处"
-"理数据的时间。"
-
-#. Tag: para
-#: preface.xml:46
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate's goal is to relieve the developer from 95 percent of common data
"
-"persistence related programming tasks. Hibernate may not be the best "
-"solution for data-centric applications that only use stored-procedures to "
-"implement the business logic in the database, it is most useful with object-"
-"oriented domain models and business logic in the Java-based middle-tier. "
-"However, Hibernate can certainly help you to remove or encapsulate vendor-"
-"specific SQL code and will help with the common task of result set "
-"translation from a tabular representation to a graph of objects."
-msgstr ""
-"Hibernate的目标是对于开发者通常的数据持久化相关的编程任务,解放其中的95%。对"
-"于以数据为中心的程序来说,它们往往只在数据库中使用存储过程来实现商业逻辑,"
-"Hibernate可能不是最好的解决方案;对于那些在基于Java的中间层应用中,它们实现面"
-"向对象的业务模型和商业逻辑的应用,Hibernate是最有用的。不管怎样,Hibernate一"
-"定可以帮助你消除或者包装那些针对特定厂商的SQL代码,并且帮你把结果集从表格式的"
-"表示形式转换到一系列的对象去。"
-
-#. Tag: para
-#: preface.xml:56
-#, no-c-format
-msgid ""
-"If you are new to Hibernate and Object/Relational Mapping or even Java, "
-"please follow these steps:"
-msgstr ""
-"如果你对Hibernate和对象/关系数据库映射还是个新手,或者甚至对Java也不熟悉,请"
-"按照下面的步骤来学习。"
-
-#. Tag: para
-#: preface.xml:63
-#, no-c-format
-msgid ""
-"Read <xref linkend=\"tutorial\"/> for a tutorial with step-by-step
"
-"instructions. The source code for the tutorial is included in the "
-"distribution in the <literal>doc/reference/tutorial/</literal>
directory."
-msgstr ""
-"阅读<xref linkend=\"tutorial\"/>,这是一篇包含详细的逐步指导的指南。本指南的"
-"源代码包含在发行包中,你可以在<literal>doc/reference/tutorial/</literal>目录"
-"下找到。"
-
-#. Tag: para
-#: preface.xml:71
-#, no-c-format
-msgid ""
-"Read <xref linkend=\"architecture\"/> to understand the
environments where "
-"Hibernate can be used."
-msgstr "阅读<xref
linkend=\"architecture\"/>来理解Hibernate可以使用的环境。"
-
-#. Tag: para
-#: preface.xml:77
-#, fuzzy, no-c-format
-msgid ""
-"View the <literal>eg/</literal> directory in the Hibernate
distribution. It "
-"contains a simple standalone application. Copy your JDBC driver to the "
-"<literal>lib/</literal> directory and edit
<literal>etc/hibernate."
-"properties</literal>, specifying correct values for your database. From a
"
-"command prompt in the distribution directory, type <literal>ant
eg</literal> "
-"(using Ant), or under Windows, type <literal>build eg</literal>."
-msgstr ""
-"查看Hibernate发行包中的<literal>eg/</literal>目录,里面有一个简单的独立运行的"
-"程序。把你的JDBC驱动拷贝到<literal>lib/</literal>目录下,修改一下"
-"<literal>src/hibernate.properties</literal>,指定其中你的数据库的信息。进入命"
-"令行,切换到你的发行包的目录,输入<literal>ant eg</literal>(使用了Ant),或者"
-"在Windows操作系统中使用<literal>build eg</literal>。"
-
-#. Tag: para
-#: preface.xml:88
-#, fuzzy, no-c-format
-msgid ""
-"Use this reference documentation as your primary source of information. "
-"Consider reading <biblioref
linkend=\"biblio-JPwH\"></biblioref> if you need "
-"more help with application design, or if you prefer a step-by-step tutorial.
"
-"Also visit <ulink
url=\"http://caveatemptor.hibernate.org\"></ulink> and "
-"download the example application from <biblioref
linkend=\"biblio-JPwH\"></"
-"biblioref>."
-msgstr "把这份参考文档作为你学习的主要信息来源。"
-
-#. Tag: para
-#: preface.xml:98
-#, no-c-format
-msgid "FAQs are answered on the Hibernate website."
-msgstr "在Hibernate 的网站上可以找到经常提问的问题与解答(FAQ)。"
-
-#. Tag: para
-#: preface.xml:103
-#, fuzzy, no-c-format
-msgid ""
-"Links to third party demos, examples, and tutorials are maintained on the "
-"Hibernate website."
-msgstr "在Hibernate网站上还有第三方的演示、示例和教程的链接。"
-
-#. Tag: para
-#: preface.xml:109
-#, no-c-format
-msgid ""
-"The Community Area on the Hibernate website is a good resource for design "
-"patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, "
-"etc.)."
-msgstr ""
-"Hibernate网站的“社区(Community Area)”是讨论关于设计模式以及很多整合方案"
-"(Tomcat, JBoss AS, Struts, EJB,等等)的好地方。"
-
-#. Tag: para
-#: preface.xml:117
-#, fuzzy, no-c-format
-msgid ""
-"If you have questions, use the user forum linked on the Hibernate website. "
-"We also provide a JIRA issue tracking system for bug reports and feature "
-"requests. If you are interested in the development of Hibernate, join the "
-"developer mailing list. If you are interested in translating this "
-"documentation into your language, contact us on the developer mailing list."
-msgstr ""
-"如果你有问题,请使用Hibernate网站上链接的用户论坛。我们也提供一个JIRA问题追踪"
-"系统,来搜集bug报告和新功能请求。如果你对开发Hibernate有兴趣,请加入开发者的"
-"邮件列表。(Hibernate网站上的用户论坛有一个中文版面,JavaEye也有Hibernate中文"
-"版面,您可以在那里交流问题与经验。)"
-
-#. Tag: para
-#: preface.xml:125
-#, no-c-format
-msgid ""
-"Commercial development support, production support, and training for "
-"Hibernate is available through JBoss Inc. (see
http://www.hibernate.org/"
-"SupportTraining/). Hibernate is a Professional Open Source project and a "
-"critical component of the JBoss Enterprise Middleware System (JEMS) suite of
"
-"products."
-msgstr ""
-"商业开发、产品支持和Hibernate培训可以通过JBoss Inc.获得。(请查阅:http://"
-"www.hibernate.org/SupportTraining/)。 Hibernate是一个专业的开放源代码项目"
-"(Professional Open Source project),也是JBoss Enterprise Middleware System"
-"(JEMS),JBoss企业级中间件系统的一个核心组件。"
-
-#. Tag: title
-#: preface.xml:133
-#, no-c-format
-msgid "Feedback"
-msgstr ""
-
-#. Tag: para
-#: preface.xml:134
-#, no-c-format
-msgid ""
-"Use <ulink
url=\"http://opensource.atlassian.com/projects/hibernate"
-"\">Hibernate JIRA</ulink> to report errors or request enhacements to
this "
-"documentation."
-msgstr ""
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_criteria.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_criteria.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_criteria.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,754 +1,728 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:27\n"
+"PO-Revision-Date: 2009-12-07 20:31+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: query_criteria.xml:29
#, no-c-format
msgid "Criteria Queries"
-msgstr "条件查询(Criteria Queries)"
+msgstr "条件查询(Criteria Queries)"
#. Tag: para
-#: query_criteria.xml:31
#, no-c-format
msgid "Hibernate features an intuitive, extensible criteria query API."
-msgstr "具有一个直观的、可扩展的条件查询API是Hibernate的特色。"
+msgstr "具有一个直观的、可扩展的条件查询 API 是 Hibernate 的特色。"
#. Tag: title
-#: query_criteria.xml:36
#, no-c-format
msgid "Creating a <literal>Criteria</literal> instance"
-msgstr "创建一个<literal>Criteria</literal> 实例"
+msgstr "创建一个 <literal>Criteria</literal> 实例"
#. Tag: para
-#: query_criteria.xml:38
#, no-c-format
-msgid ""
-"The interface <literal>org.hibernate.Criteria</literal> represents a
query "
-"against a particular persistent class. The <literal>Session</literal>
is a "
-"factory for <literal>Criteria</literal> instances."
-msgstr ""
-"<literal>org.hibernate.Criteria</literal>接口表示特定持久类的一个查询。"
-"<literal>Session</literal>是
<literal>Criteria</literal>实例的工厂。"
+msgid "The interface <literal>org.hibernate.Criteria</literal>
represents a query against a particular persistent class. The
<literal>Session</literal> is a factory for
<literal>Criteria</literal> instances."
+msgstr "<literal>org.hibernate.Criteria</literal
>接口表示特定持久类的一个查询。<literal>Session</literal> 是
<literal>Criteria</literal> 实例的工厂。"
-#. Tag: programlisting
-#: query_criteria.xml:44
-#, no-c-format
-msgid ""
-"<![CDATA[Criteria crit = sess.createCriteria(Cat.class);\n"
-"crit.setMaxResults(50);\n"
-"List cats = crit.list();]]>"
-msgstr ""
-
#. Tag: title
-#: query_criteria.xml:49
#, no-c-format
msgid "Narrowing the result set"
msgstr "限制结果集内容"
#. Tag: para
-#: query_criteria.xml:51
#, no-c-format
-msgid ""
-"An individual query criterion is an instance of the interface
<literal>org."
-"hibernate.criterion.Criterion</literal>. The class
<literal>org.hibernate."
-"criterion.Restrictions</literal> defines factory methods for obtaining
"
-"certain built-in <literal>Criterion</literal> types."
-msgstr ""
-"一个单独的查询条件是<literal>org.hibernate.criterion.Criterion</literal>
接口"
-"的一个实例。<literal>org.hibernate.criterion.Restrictions</literal>类
定义了"
-"获得某些内置<literal>Criterion</literal>类型的工厂方法。"
+msgid "An individual query criterion is an instance of the interface
<literal>org.hibernate.criterion.Criterion</literal>. The class
<literal>org.hibernate.criterion.Restrictions</literal> defines factory
methods for obtaining certain built-in <literal>Criterion</literal>
types."
+msgstr "一个单独的查询条件是 <literal>org.hibernate.criterion.Criterion</literal>
接口的一个实例。<literal>org.hibernate.criterion.Restrictions</literal> 类定义了获得某些内置
<literal>Criterion</literal> 类型的工厂方法。"
-#. Tag: programlisting
-#: query_criteria.xml:59
-#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-" .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
-" .add( Restrictions.between(\"weight\", minWeight, maxWeight)
)\n"
-" .list();]]>"
-msgstr ""
-
#. Tag: para
-#: query_criteria.xml:61
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Restrictions can be grouped logically."
-msgstr "约束可以按逻辑分组。"
+msgstr "约束可以按逻辑分组。 "
-#. Tag: programlisting
-#: query_criteria.xml:65
-#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-" .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
-" .add( Restrictions.or(\n"
-" Restrictions.eq( \"age\", new Integer(0) ),\n"
-" Restrictions.isNull(\"age\")\n"
-" ) )\n"
-" .list();]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_criteria.xml:67
-#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-" .add( Restrictions.in( \"name\", new String[] { \"Fritz\",
\"Izi\", \"Pk"
-"\" } ) )\n"
-" .add( Restrictions.disjunction()\n"
-" .add( Restrictions.isNull(\"age\") )\n"
-" .add( Restrictions.eq(\"age\", new Integer(0) ) )\n"
-" .add( Restrictions.eq(\"age\", new Integer(1) ) )\n"
-" .add( Restrictions.eq(\"age\", new Integer(2) ) )\n"
-" ) )\n"
-" .list();]]>"
-msgstr ""
-
#. Tag: para
-#: query_criteria.xml:69
-#, fuzzy, no-c-format
-msgid ""
-"There are a range of built-in criterion types
(<literal>Restrictions</"
-"literal> subclasses). One of the most useful allows you to specify SQL "
-"directly."
-msgstr ""
-"Hibernate提供了相当多的内置criterion类型(<literal>Restrictions</literal> 子"
-"类), 但是尤其有用的是可以允许你直接使用SQL。"
-
-#. Tag: programlisting
-#: query_criteria.xml:74
#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-" .add( Restrictions.sqlRestriction(\"lower({alias}.name) like
lower(?)\", "
-"\"Fritz%\", Hibernate.STRING) )\n"
-" .list();]]>"
-msgstr ""
+msgid "There are a range of built-in criterion types
(<literal>Restrictions</literal> subclasses). One of the most useful allows
you to specify SQL directly."
+msgstr "Hibernate 提供了相当多的内置 criterion 类型(<literal>Restrictions</literal>
子类),但是尤其有用的是可以允许你直接使用 SQL。 "
#. Tag: para
-#: query_criteria.xml:76
#, no-c-format
-msgid ""
-"The <literal>{alias}</literal> placeholder with be replaced by the row
alias "
-"of the queried entity."
-msgstr "<literal>{alias}</literal>占位符应当被替换为被查询实体的列别名。"
+msgid "The <literal>{alias}</literal> placeholder with be replaced by
the row alias of the queried entity."
+msgstr "<literal>{alias}</literal> 占位符应当被替换为被查询实体的列别名。"
#. Tag: para
-#: query_criteria.xml:81
-#, fuzzy, no-c-format
-msgid ""
-"You can also obtain a criterion from a <literal>Property</literal>
instance. "
-"You can create a <literal>Property</literal> by calling
<literal>Property."
-"forName()</literal>:"
-msgstr ""
-"<literal>Property</literal>实例是获得一个条件的另外一种途径。你可以通过调用"
-"<literal>Property.forName()</literal>
创建一个<literal>Property</literal>。"
-
-#. Tag: programlisting
-#: query_criteria.xml:87
#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"Property age = Property.forName(\"age\");\n"
-"List cats = sess.createCriteria(Cat.class)\n"
-" .add( Restrictions.disjunction()\n"
-" .add( age.isNull() )\n"
-" .add( age.eq( new Integer(0) ) )\n"
-" .add( age.eq( new Integer(1) ) )\n"
-" .add( age.eq( new Integer(2) ) )\n"
-" ) )\n"
-" .add( Property.forName(\"name\").in( new String[] {
\"Fritz\", \"Izi\", "
-"\"Pk\" } ) )\n"
-" .list();]]>"
-msgstr ""
+msgid "You can also obtain a criterion from a
<literal>Property</literal> instance. You can create a
<literal>Property</literal> by calling
<literal>Property.forName()</literal>:"
+msgstr "<literal>Property</literal> 实例是获得一个条件的另外一种途径。你可以通过调用
<literal>Property.forName()</literal> 创建一个
<literal>Property</literal>:"
#. Tag: title
-#: query_criteria.xml:92
#, no-c-format
msgid "Ordering the results"
msgstr "结果集排序"
#. Tag: para
-#: query_criteria.xml:94
-#, fuzzy, no-c-format
-msgid ""
-"You can order the results using
<literal>org.hibernate.criterion.Order</"
-"literal>."
-msgstr ""
-"你可以使用<literal>org.hibernate.criterion.Order</literal>来为查询结果排序。"
-
-#. Tag: programlisting
-#: query_criteria.xml:98
#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-" .add( Restrictions.like(\"name\", \"F%\")\n"
-" .addOrder( Order.asc(\"name\") )\n"
-" .addOrder( Order.desc(\"age\") )\n"
-" .setMaxResults(50)\n"
-" .list();]]>"
-msgstr ""
+msgid "You can order the results using
<literal>org.hibernate.criterion.Order</literal>."
+msgstr "你可以使用 <literal>org.hibernate.criterion.Order</literal> 来为查询结果排序。
"
-#. Tag: programlisting
-#: query_criteria.xml:100
-#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-" .add( Property.forName(\"name\").like(\"F%\") )\n"
-" .addOrder( Property.forName(\"name\").asc() )\n"
-" .addOrder( Property.forName(\"age\").desc() )\n"
-" .setMaxResults(50)\n"
-" .list();]]>"
-msgstr ""
-
#. Tag: title
-#: query_criteria.xml:105
#, no-c-format
msgid "Associations"
msgstr "关联"
#. Tag: para
-#: query_criteria.xml:107
#, no-c-format
-msgid ""
-"By navigating associations using <literal>createCriteria()</literal>
you can "
-"specify constraints upon related entities:"
-msgstr ""
+msgid "By navigating associations using
<literal>createCriteria()</literal> you can specify constraints upon related
entities:"
+msgstr "通过使用 <literal>createCriteria()</literal>
对关联进行导航,你可以指定相关实体的约束。"
-#. Tag: programlisting
-#: query_criteria.xml:112
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-" .add( Restrictions.like(\"name\", \"F%\") )\n"
-" .createCriteria(\"kittens\")\n"
-" .add( Restrictions.like(\"name\", \"F%\") )\n"
-" .list();]]>"
-msgstr ""
+msgid "The second <literal>createCriteria()</literal> returns a new
instance of <literal>Criteria</literal> that refers to the elements of the
<literal>kittens</literal> collection."
+msgstr "注意第二个 <literal>createCriteria()</literal> 返回一个新的
<literal>Criteria</literal> 实例,该实例引用 <literal>kittens</literal>
集合中的元素。 "
#. Tag: para
-#: query_criteria.xml:114
-#, fuzzy, no-c-format
-msgid ""
-"The second <literal>createCriteria()</literal> returns a new instance
of "
-"<literal>Criteria</literal> that refers to the elements of the "
-"<literal>kittens</literal> collection."
-msgstr ""
-"注意第二个 <literal>createCriteria()</literal>返回一个新的 "
-"<literal>Criteria</literal>实例,该实例引用<literal>kittens</literal>
集合中"
-"的元素。"
-
-#. Tag: para
-#: query_criteria.xml:120
-#, fuzzy, no-c-format
-msgid ""
-"There is also an alternate form that is useful in certain circumstances:"
-msgstr "接下来,替换形态在某些情况下也是很有用的。"
-
-#. Tag: programlisting
-#: query_criteria.xml:124
#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-" .createAlias(\"kittens\", \"kt\")\n"
-" .createAlias(\"mate\", \"mt\")\n"
-" .add( Restrictions.eqProperty(\"kt.name\", \"mt.name\")
)\n"
-" .list();]]>"
-msgstr ""
+msgid "There is also an alternate form that is useful in certain
circumstances:"
+msgstr "接下来,替换形态在某些情况下也是很有用的。 "
#. Tag: para
-#: query_criteria.xml:126
#, no-c-format
-msgid ""
-"(<literal>createAlias()</literal> does not create a new instance of
"
-"<literal>Criteria</literal>.)"
-msgstr ""
-"(<literal>createAlias()</literal>并不创建一个新的
<literal>Criteria</literal>"
-"实例。)"
+msgid "(<literal>createAlias()</literal> does not create a new instance
of <literal>Criteria</literal>.)"
+msgstr "(<literal>createAlias()</literal> 并不创建一个新的
<literal>Criteria</literal> 实例。)"
#. Tag: para
-#: query_criteria.xml:131
-#, fuzzy, no-c-format
-msgid ""
-"The kittens collections held by the <literal>Cat</literal> instances
"
-"returned by the previous two queries are <emphasis>not</emphasis>
pre-"
-"filtered by the criteria. If you want to retrieve just the kittens that "
-"match the criteria, you must use a
<literal>ResultTransformer</literal>."
-msgstr ""
-"<literal>Cat</literal>实例所保存的之前两次查询所返回的kittens集合是 "
-"<emphasis>没有</emphasis>被条件预过滤的。如果你希望只获得符合条件的kittens, "
-"你必须使用<literal>ResultTransformer</literal>。"
-
-#. Tag: programlisting
-#: query_criteria.xml:138
#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-" .createCriteria(\"kittens\", \"kt\")\n"
-" .add( Restrictions.eq(\"name\", \"F%\") )\n"
-" .setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)\n"
-" .list();\n"
-"Iterator iter = cats.iterator();\n"
-"while ( iter.hasNext() ) {\n"
-" Map map = (Map) iter.next();\n"
-" Cat cat = (Cat) map.get(Criteria.ROOT_ALIAS);\n"
-" Cat kitten = (Cat) map.get(\"kt\");\n"
-"}]]>"
-msgstr ""
+msgid "The kittens collections held by the <literal>Cat</literal>
instances returned by the previous two queries are <emphasis>not</emphasis>
pre-filtered by the criteria. If you want to retrieve just the kittens that match the
criteria, you must use a <literal>ResultTransformer</literal>."
+msgstr "<literal>Cat</literal> 实例所保存的之前两次查询所返回的 kittens 集合是
<emphasis>没有</emphasis>被条件预过滤的。如果你希望只获得符合条件的 kittens,你必须使用
<literal>ResultTransformer</literal>。 "
#. Tag: title
-#: query_criteria.xml:143
#, no-c-format
msgid "Dynamic association fetching"
msgstr "动态关联抓取"
#. Tag: para
-#: query_criteria.xml:145
-#, fuzzy, no-c-format
-msgid ""
-"You can specify association fetching semantics at runtime using "
-"<literal>setFetchMode()</literal>."
-msgstr ""
-"你可以使用<literal>setFetchMode()</literal>在运行时定义动态关联抓取的语义。"
-
-#. Tag: programlisting
-#: query_criteria.xml:150
#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
-" .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
-" .setFetchMode(\"mate\", FetchMode.EAGER)\n"
-" .setFetchMode(\"kittens\", FetchMode.EAGER)\n"
-" .list();]]>"
-msgstr ""
+msgid "You can specify association fetching semantics at runtime using
<literal>setFetchMode()</literal>."
+msgstr "你可以使用 <literal>setFetchMode()</literal> 在运行时定义动态关联抓取的语义。 "
#. Tag: para
-#: query_criteria.xml:152
#, no-c-format
-msgid ""
-"This query will fetch both <literal>mate</literal> and
<literal>kittens</"
-"literal> by outer join. See <xref
linkend=\"performance-fetching\"/> for "
-"more information."
-msgstr ""
-"这个查询可以通过外连接抓取<literal>mate</literal>和<literal>kittens</"
-"literal>。 查看<xref
linkend=\"performance-fetching\"/>可以获得更多信息。"
+msgid "This query will fetch both <literal>mate</literal> and
<literal>kittens</literal> by outer join. See <xref
linkend=\"performance-fetching\" /> for more information."
+msgstr "这个查询可以通过外连接抓取 <literal>mate</literal> 和
<literal>kittens</literal>。查看 <xref
linkend=\"performance-fetching\" /> 可以获得更多信息。"
#. Tag: title
-#: query_criteria.xml:160
#, no-c-format
msgid "Example queries"
msgstr "查询示例"
#. Tag: para
-#: query_criteria.xml:162
#, no-c-format
-msgid ""
-"The class <literal>org.hibernate.criterion.Example</literal> allows you
to "
-"construct a query criterion from a given instance."
-msgstr ""
-"<literal>org.hibernate.criterion.Example</literal>类允许你通过一个给定实例 构"
-"建一个条件查询。"
+msgid "The class <literal>org.hibernate.criterion.Example</literal>
allows you to construct a query criterion from a given instance."
+msgstr "<literal>org.hibernate.criterion.Example</literal>
类允许你通过一个给定实例构建一个条件查询。"
-#. Tag: programlisting
-#: query_criteria.xml:167
-#, no-c-format
-msgid ""
-"<![CDATA[Cat cat = new Cat();\n"
-"cat.setSex('F');\n"
-"cat.setColor(Color.BLACK);\n"
-"List results = session.createCriteria(Cat.class)\n"
-" .add( Example.create(cat) )\n"
-" .list();]]>"
-msgstr ""
-
#. Tag: para
-#: query_criteria.xml:169
#, no-c-format
-msgid ""
-"Version properties, identifiers and associations are ignored. By default, "
-"null valued properties are excluded."
-msgstr "版本属性、标识符和关联被忽略。默认情况下值为null的属性将被排除。"
+msgid "Version properties, identifiers and associations are ignored. By default,
null valued properties are excluded."
+msgstr "版本属性、标识符和关联被忽略。默认情况下值为 null 的属性将被排除。"
#. Tag: para
-#: query_criteria.xml:174
#, no-c-format
msgid "You can adjust how the <literal>Example</literal> is
applied."
-msgstr "你可以自行调整<literal>Example</literal>使之更实用。"
+msgstr "你可以自行调整 <literal>Example</literal> 使之更实用。"
-#. Tag: programlisting
-#: query_criteria.xml:178
-#, no-c-format
-msgid ""
-"<![CDATA[Example example = Example.create(cat)\n"
-" .excludeZeroes() //exclude zero valued properties\n"
-" .excludeProperty(\"color\") //exclude the property named
\"color\"\n"
-" .ignoreCase() //perform case insensitive string "
-"comparisons\n"
-" .enableLike(); //use like for string comparisons\n"
-"List results = session.createCriteria(Cat.class)\n"
-" .add(example)\n"
-" .list();]]>"
-msgstr ""
-
#. Tag: para
-#: query_criteria.xml:180
#, no-c-format
msgid "You can even use examples to place criteria upon associated objects."
-msgstr "你甚至可以使用examples在关联对象上放置条件。"
+msgstr "你甚至可以使用 examples 在关联对象上放置条件。"
-#. Tag: programlisting
-#: query_criteria.xml:184
-#, no-c-format
-msgid ""
-"<![CDATA[List results = session.createCriteria(Cat.class)\n"
-" .add( Example.create(cat) )\n"
-" .createCriteria(\"mate\")\n"
-" .add( Example.create( cat.getMate() ) )\n"
-" .list();]]>"
-msgstr ""
-
#. Tag: title
-#: query_criteria.xml:189
#, no-c-format
msgid "Projections, aggregation and grouping"
-msgstr "投影(Projections)、聚合(aggregation)和分组(grouping)"
+msgstr "投影(Projections)、聚合(aggregation)和分组(grouping)"
#. Tag: para
-#: query_criteria.xml:190
-#, fuzzy, no-c-format
-msgid ""
-"The class <literal>org.hibernate.criterion.Projections</literal> is a
"
-"factory for <literal>Projection</literal> instances. You can apply a
"
-"projection to a query by calling
<literal>setProjection()</literal>."
-msgstr ""
-"<literal>org.hibernate.criterion.Projections</literal>是 "
-"<literal>Projection</literal> 的实例工厂。我们通过调用
<literal>setProjection"
-"()</literal>应用投影到一个查询。"
+#, no-c-format
+msgid "The class <literal>org.hibernate.criterion.Projections</literal>
is a factory for <literal>Projection</literal> instances. You can apply a
projection to a query by calling <literal>setProjection()</literal>."
+msgstr "<literal>org.hibernate.criterion.Projections</literal> 是
<literal>Projection</literal> 的实例工厂。我们通过调用
<literal>setProjection()</literal> 应用投影到一个查询。 "
-#. Tag: programlisting
-#: query_criteria.xml:196
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[List results = session.createCriteria(Cat.class)\n"
-" .setProjection( Projections.rowCount() )\n"
-" .add( Restrictions.eq(\"color\", Color.BLACK) )\n"
-" .list();]]>"
-msgstr ""
+msgid "There is no explicit \"group by\" necessary in a criteria query.
Certain projection types are defined to be <emphasis>grouping
projections</emphasis>, which also appear in the SQL <literal>group
by</literal> clause."
+msgstr "在一个条件查询中没有必要显式的使用 \"group by\"
。某些投影类型就是被定义为<emphasis>分组投影</emphasis>,他们也出现在 SQL 的 <literal>group
by</literal> 子句中。"
-#. Tag: programlisting
-#: query_criteria.xml:198
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[List results = session.createCriteria(Cat.class)\n"
-" .setProjection( Projections.projectionList()\n"
-" .add( Projections.rowCount() )\n"
-" .add( Projections.avg(\"weight\") )\n"
-" .add( Projections.max(\"weight\") )\n"
-" .add( Projections.groupProperty(\"color\") )\n"
-" )\n"
-" .list();]]>"
-msgstr ""
+msgid "An alias can be assigned to a projection so that the projected value can be
referred to in restrictions or orderings. Here are two different ways to do this:"
+msgstr "你可以选择把一个别名指派给一个投影,这样可以使投影值被约束或排序所引用。下面是两种不同的实现方式: "
#. Tag: para
-#: query_criteria.xml:200
#, no-c-format
-msgid ""
-"There is no explicit \"group by\" necessary in a criteria query. Certain
"
-"projection types are defined to be <emphasis>grouping projections</"
-"emphasis>, which also appear in the SQL <literal>group by</literal>
clause."
-msgstr ""
-"在一个条件查询中没有必要显式的使用 \"group by\" 。某些投影类型就是被定义为"
-"<emphasis> 分组投影</emphasis>,他们也出现在SQL的<literal>group
by</literal>"
-"子句中。"
+msgid "The <literal>alias()</literal> and
<literal>as()</literal> methods simply wrap a projection instance in another,
aliased, instance of <literal>Projection</literal>. As a shortcut, you can
assign an alias when you add the projection to a projection list:"
+msgstr "<literal>alias()</literal> 和 <literal>as()</literal>
方法简便的将一个投影实例包装到另外一个 别名的 <literal>Projection</literal>
实例中。简而言之,当你添加一个投影到一个投影列表中时你可以为它指定一个别名:"
#. Tag: para
-#: query_criteria.xml:206
-#, fuzzy, no-c-format
-msgid ""
-"An alias can be assigned to a projection so that the projected value can be "
-"referred to in restrictions or orderings. Here are two different ways to do "
-"this:"
-msgstr ""
-"你可以选择把一个别名指派给一个投影,这样可以使投影值被约束或排序所引用。下面"
-"是两种不同的实现方式:"
+#, no-c-format
+msgid "You can also use <literal>Property.forName()</literal> to express
projections:"
+msgstr "你也可以使用 <literal>Property.forName()</literal> 来表示投影:"
-#. Tag: programlisting
-#: query_criteria.xml:212
+#. Tag: title
#, no-c-format
-msgid ""
-"<![CDATA[List results = session.createCriteria(Cat.class)\n"
-" .setProjection( Projections.alias(
Projections.groupProperty(\"color\"), "
-"\"colr\" ) )\n"
-" .addOrder( Order.asc(\"colr\") )\n"
-" .list();]]>"
-msgstr ""
+msgid "Detached queries and subqueries"
+msgstr "离线(detached)查询和子查询"
-#. Tag: programlisting
-#: query_criteria.xml:214
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[List results = session.createCriteria(Cat.class)\n"
-" .setProjection(
Projections.groupProperty(\"color\").as(\"colr\") )\n"
-" .addOrder( Order.asc(\"colr\") )\n"
-" .list();]]>"
-msgstr ""
+msgid "The <literal>DetachedCriteria</literal> class allows you to
create a query outside the scope of a session and then execute it using an arbitrary
<literal>Session</literal>."
+msgstr "<literal>DetachedCriteria</literal> 类使你在一个 session
范围之外创建一个查询,并且可以使用任意的 <literal>Session</literal> 来执行它。 "
#. Tag: para
-#: query_criteria.xml:216
#, no-c-format
-msgid ""
-"The <literal>alias()</literal> and <literal>as()</literal>
methods simply "
-"wrap a projection instance in another, aliased, instance of "
-"<literal>Projection</literal>. As a shortcut, you can assign an alias
when "
-"you add the projection to a projection list:"
-msgstr ""
-"<literal>alias()</literal>和<literal>as()</literal>方法简便的将一个投影实例包"
-"装到另外一个 别名的<literal>Projection</literal>实例中。简而言之,当你添加一"
-"个投影到一个投影列表中时 你可以为它指定一个别名:"
+msgid "A <literal>DetachedCriteria</literal> can also be used to express
a subquery. Criterion instances involving subqueries can be obtained via
<literal>Subqueries</literal> or
<literal>Property</literal>."
+msgstr "<literal>DetachedCriteria</literal> 也可以用以表示子查询。条件实例包含子查询可以通过
<literal>Subqueries</literal> 或者 <literal>Property</literal> 获得。
"
-#. Tag: programlisting
-#: query_criteria.xml:223
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[List results = session.createCriteria(Cat.class)\n"
-" .setProjection( Projections.projectionList()\n"
-" .add( Projections.rowCount(), \"catCountByColor\" )\n"
-" .add( Projections.avg(\"weight\"), \"avgWeight\"
)\n"
-" .add( Projections.max(\"weight\"), \"maxWeight\"
)\n"
-" .add( Projections.groupProperty(\"color\"), \"color\"
)\n"
-" )\n"
-" .addOrder( Order.desc(\"catCountByColor\") )\n"
-" .addOrder( Order.desc(\"avgWeight\") )\n"
-" .list();]]>"
-msgstr ""
+msgid "Correlated subqueries are also possible:"
+msgstr "甚至相互关联的子查询也是有可能的: "
-#. Tag: programlisting
-#: query_criteria.xml:225
+#. Tag: title
#, no-c-format
-msgid ""
-"<![CDATA[List results = session.createCriteria(Domestic.class,
\"cat\")\n"
-" .createAlias(\"kittens\", \"kit\")\n"
-" .setProjection( Projections.projectionList()\n"
-" .add( Projections.property(\"cat.name\"), \"catName\"
)\n"
-" .add( Projections.property(\"kit.name\"), \"kitName\"
)\n"
-" )\n"
-" .addOrder( Order.asc(\"catName\") )\n"
-" .addOrder( Order.asc(\"kitName\") )\n"
-" .list();]]>"
-msgstr ""
+msgid "Queries by natural identifier"
+msgstr "根据自然标识查询(Queries by natural identifier)"
#. Tag: para
-#: query_criteria.xml:227
#, no-c-format
-msgid ""
-"You can also use <literal>Property.forName()</literal> to express
"
-"projections:"
-msgstr "你也可以使用<literal>Property.forName()</literal>来表示投影:"
+msgid "For most queries, including criteria queries, the query cache is not
efficient because query cache invalidation occurs too frequently. However, there is a
special kind of query where you can optimize the cache invalidation algorithm: lookups by
a constant natural key. In some applications, this kind of query occurs frequently. The
criteria API provides special provision for this use case."
+msgstr
"对大多数查询,包括条件查询而言,因为查询缓存的失效(invalidation)发生得太频繁,查询缓存不是非常高效。然而,有一种特别的查询,可以通过不变的自然键优化缓存的失效算法。在某些应用中,这种类型的查询比较常见。条件查询
API 对这种用例提供了特别规约。 "
-#. Tag: programlisting
-#: query_criteria.xml:231
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[List results = session.createCriteria(Cat.class)\n"
-" .setProjection( Property.forName(\"name\") )\n"
-" .add( Property.forName(\"color\").eq(Color.BLACK) )\n"
-" .list();]]>"
-msgstr ""
+msgid "First, map the natural key of your entity using
<literal><natural-id></literal> and enable use of the
second-level cache."
+msgstr "首先,你应该对你的 entity 使用
<literal><natural-id></literal> 来映射自然键,然后打开第二级缓存。 "
-#. Tag: programlisting
-#: query_criteria.xml:233
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[List results = session.createCriteria(Cat.class)\n"
-" .setProjection( Projections.projectionList()\n"
-" .add( Projections.rowCount().as(\"catCountByColor\") )\n"
-" .add(
Property.forName(\"weight\").avg().as(\"avgWeight\") )\n"
-" .add(
Property.forName(\"weight\").max().as(\"maxWeight\") )\n"
-" .add( Property.forName(\"color\").group().as(\"color\"
)\n"
-" )\n"
-" .addOrder( Order.desc(\"catCountByColor\") )\n"
-" .addOrder( Order.desc(\"avgWeight\") )\n"
-" .list();]]>"
-msgstr ""
+msgid "This functionality is not intended for use with entities with
<emphasis>mutable</emphasis> natural keys."
+msgstr "注意,此功能对具有<emphasis>mutable</emphasis>自然键的 entity 并不适用。 "
-#. Tag: title
-#: query_criteria.xml:238
+#. Tag: para
#, no-c-format
-msgid "Detached queries and subqueries"
-msgstr "离线(detached)查询和子查询"
+msgid "Once you have enabled the Hibernate query cache, the
<literal>Restrictions.naturalId()</literal> allows you to make use of the more
efficient cache algorithm."
+msgstr "现在,我们可以用 <literal>Restrictions.naturalId()</literal>
来使用更加高效的缓存算法。 "
-#. Tag: para
-#: query_criteria.xml:239
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>DetachedCriteria</literal> class allows you to create a
query "
-"outside the scope of a session and then execute it using an arbitrary "
-"<literal>Session</literal>."
-msgstr ""
-"<literal>DetachedCriteria</literal>类使你在一个session范围之外创建一个查询,"
-"并且可以使用任意的 <literal>Session</literal>来执行它。"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[Criteria crit = sess.createCriteria(Cat.class);\n"
+#~ "crit.setMaxResults(50);\n"
+#~ "List cats = crit.list();]]>"
+#~ msgstr ""
+#~ "Criteria crit = sess.createCriteria(Cat.class);\n"
+#~ "crit.setMaxResults(50);\n"
+#~ "List cats = crit.list();"
-#. Tag: programlisting
-#: query_criteria.xml:244
-#, no-c-format
-msgid ""
-"<![CDATA[DetachedCriteria query = DetachedCriteria.forClass(Cat.class)\n"
-" .add( Property.forName(\"sex\").eq('F') );\n"
-" \n"
-"Session session = ....;\n"
-"Transaction txn = session.beginTransaction();\n"
-"List results = query.getExecutableCriteria(session).setMaxResults(100).list"
-"();\n"
-"txn.commit();\n"
-"session.close();]]>"
-msgstr ""
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
+#~ " .add( Restrictions.between(\"weight\", minWeight, maxWeight)
)\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.like(\"name\", \"Fritz%\")
)\n"
+#~ " .add( Restrictions.between(\"weight\", minWeight, maxWeight)
)\n"
+#~ " .list();"
-#. Tag: para
-#: query_criteria.xml:246
-#, fuzzy, no-c-format
-msgid ""
-"A <literal>DetachedCriteria</literal> can also be used to express a
"
-"subquery. Criterion instances involving subqueries can be obtained via "
-"<literal>Subqueries</literal> or
<literal>Property</literal>."
-msgstr ""
-"<literal>DetachedCriteria</literal>也可以用以表示子查询。条件实例包含子查询可"
-"以通过
<literal>Subqueries</literal>或者<literal>Property</literal>获得。"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
+#~ " .add( Restrictions.or(\n"
+#~ " Restrictions.eq( \"age\", new Integer(0) ),\n"
+#~ " Restrictions.isNull(\"age\")\n"
+#~ " ) )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.like(\"name\", \"Fritz%\")
)\n"
+#~ " .add( Restrictions.or(\n"
+#~ " Restrictions.eq( \"age\", new Integer(0) ),\n"
+#~ " Restrictions.isNull(\"age\")\n"
+#~ " ) )\n"
+#~ " .list();"
-#. Tag: programlisting
-#: query_criteria.xml:252
-#, no-c-format
-msgid ""
-"<![CDATA[DetachedCriteria avgWeight =
DetachedCriteria.forClass(Cat.class)\n"
-" .setProjection( Property.forName(\"weight\").avg() );\n"
-"session.createCriteria(Cat.class)\n"
-" .add( Property.forName(\"weight\").gt(avgWeight) )\n"
-" .list();]]>"
-msgstr ""
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.in( \"name\", new String[] {
\"Fritz\", \"Izi\", "
+#~ "\"Pk\" } ) )\n"
+#~ " .add( Restrictions.disjunction()\n"
+#~ " .add( Restrictions.isNull(\"age\") )\n"
+#~ " .add( Restrictions.eq(\"age\", new Integer(0) ) )\n"
+#~ " .add( Restrictions.eq(\"age\", new Integer(1) ) )\n"
+#~ " .add( Restrictions.eq(\"age\", new Integer(2) ) )\n"
+#~ " ) )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.in( \"name\", new String[] {
\"Fritz\", \"Izi\", "
+#~ "\"Pk\" } ) )\n"
+#~ " .add( Restrictions.disjunction()\n"
+#~ " .add( Restrictions.isNull(\"age\") )\n"
+#~ " .add( Restrictions.eq(\"age\", new Integer(0) ) )\n"
+#~ " .add( Restrictions.eq(\"age\", new Integer(1) ) )\n"
+#~ " .add( Restrictions.eq(\"age\", new Integer(2) ) )\n"
+#~ " ) )\n"
+#~ " .list();"
-#. Tag: programlisting
-#: query_criteria.xml:254
-#, no-c-format
-msgid ""
-"<![CDATA[DetachedCriteria weights =
DetachedCriteria.forClass(Cat.class)\n"
-" .setProjection( Property.forName(\"weight\") );\n"
-"session.createCriteria(Cat.class)\n"
-" .add( Subqueries.geAll(\"weight\", weights) )\n"
-" .list();]]>"
-msgstr ""
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.sqlRestriction(\"lower({alias}.name) like
lower(?)"
+#~ "\", \"Fritz%\", Hibernate.STRING) )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.sqlRestriction(\"lower({alias}.name) like
lower(?)"
+#~ "\", \"Fritz%\", \n"
+#~ " Hibernate.STRING) )\n"
+#~ " .list();"
-#. Tag: para
-#: query_criteria.xml:256
-#, fuzzy, no-c-format
-msgid "Correlated subqueries are also possible:"
-msgstr "甚至相互关联的子查询也是有可能的:"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "Property age = Property.forName(\"age\");\n"
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.disjunction()\n"
+#~ " .add( age.isNull() )\n"
+#~ " .add( age.eq( new Integer(0) ) )\n"
+#~ " .add( age.eq( new Integer(1) ) )\n"
+#~ " .add( age.eq( new Integer(2) ) )\n"
+#~ " ) )\n"
+#~ " .add( Property.forName(\"name\").in( new String[] {
\"Fritz\", \"Izi"
+#~ "\", \"Pk\" } ) )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "Property age = Property.forName(\"age\");\n"
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.disjunction()\n"
+#~ " .add( age.isNull() )\n"
+#~ " .add( age.eq( new Integer(0) ) )\n"
+#~ " .add( age.eq( new Integer(1) ) )\n"
+#~ " .add( age.eq( new Integer(2) ) )\n"
+#~ " ) )\n"
+#~ " .add( Property.forName(\"name\").in( new String[] {
\"Fritz\", \"Izi"
+#~ "\", \"Pk\" } ) )\n"
+#~ " .list();"
-#. Tag: programlisting
-#: query_criteria.xml:260
-#, no-c-format
-msgid ""
-"<![CDATA[DetachedCriteria avgWeightForSex =
DetachedCriteria.forClass(Cat."
-"class, \"cat2\")\n"
-" .setProjection( Property.forName(\"weight\").avg() )\n"
-" .add(
Property.forName(\"cat2.sex\").eqProperty(\"cat.sex\") );\n"
-"session.createCriteria(Cat.class, \"cat\")\n"
-" .add( Property.forName(\"weight\").gt(avgWeightForSex) )\n"
-" .list();]]>"
-msgstr ""
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.like(\"name\", \"F%\")\n"
+#~ " .addOrder( Order.asc(\"name\") )\n"
+#~ " .addOrder( Order.desc(\"age\") )\n"
+#~ " .setMaxResults(50)\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.like(\"name\",
\"F%\")\n"
+#~ " .addOrder( Order.asc(\"name\") )\n"
+#~ " .addOrder( Order.desc(\"age\") )\n"
+#~ " .setMaxResults(50)\n"
+#~ " .list();"
-#. Tag: title
-#: query_criteria.xml:269
-#, no-c-format
-msgid "Queries by natural identifier"
-msgstr "根据自然标识查询(Queries by natural identifier)"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Property.forName(\"name\").like(\"F%\") )\n"
+#~ " .addOrder( Property.forName(\"name\").asc() )\n"
+#~ " .addOrder( Property.forName(\"age\").desc() )\n"
+#~ " .setMaxResults(50)\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Property.forName(\"name\").like(\"F%\")
)\n"
+#~ " .addOrder( Property.forName(\"name\").asc() )\n"
+#~ " .addOrder( Property.forName(\"age\").desc() )\n"
+#~ " .setMaxResults(50)\n"
+#~ " .list();"
-#. Tag: para
-#: query_criteria.xml:271
-#, fuzzy, no-c-format
-msgid ""
-"For most queries, including criteria queries, the query cache is not "
-"efficient because query cache invalidation occurs too frequently. However, "
-"there is a special kind of query where you can optimize the cache "
-"invalidation algorithm: lookups by a constant natural key. In some "
-"applications, this kind of query occurs frequently. The criteria API "
-"provides special provision for this use case."
-msgstr ""
-"对大多数查询,包括条件查询而言,因为查询缓存的失效(invalidation)发生得太频"
-"繁,查询缓存不是非常高效。然而,有一种特别的查询,可以通过不变的自然键优化缓"
-"存的失效算法。在某些应用中,这种类型的查询比较常见。条件查询API对这种用例提供"
-"了特别规约。"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.like(\"name\", \"F%\") )\n"
+#~ " .createCriteria(\"kittens\")\n"
+#~ " .add( Restrictions.like(\"name\", \"F%\") )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.like(\"name\", \"F%\")
)\n"
+#~ " .createCriteria(\"kittens\")\n"
+#~ " .add( Restrictions.like(\"name\", \"F%\")
)\n"
+#~ " .list();"
-#. Tag: para
-#: query_criteria.xml:279
-#, fuzzy, no-c-format
-msgid ""
-"First, map the natural key of your entity using
<literal><natural-id></"
-"literal> and enable use of the second-level cache."
-msgstr ""
-"首先,你应该对你的entity使用<literal><natural-id></literal>来映射自然"
-"键,然后打开第二级缓存。"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+#~ " .createAlias(\"kittens\", \"kt\")\n"
+#~ " .createAlias(\"mate\", \"mt\")\n"
+#~ " .add( Restrictions.eqProperty(\"kt.name\", \"mt.name\")
)\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .createAlias(\"kittens\", \"kt\")\n"
+#~ " .createAlias(\"mate\", \"mt\")\n"
+#~ " .add( Restrictions.eqProperty(\"kt.name\", \"mt.name\")
)\n"
+#~ " .list();"
-#. Tag: programlisting
-#: query_criteria.xml:284
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"User\">\n"
-" <cache usage=\"read-write\"/>\n"
-" <id name=\"id\">\n"
-" <generator class=\"increment\"/>\n"
-" </id>\n"
-" <natural-id>\n"
-" <property name=\"name\"/>\n"
-" <property name=\"org\"/>\n"
-" </natural-id>\n"
-" <property name=\"password\"/>\n"
-"</class>]]>"
-msgstr ""
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+#~ " .createCriteria(\"kittens\", \"kt\")\n"
+#~ " .add( Restrictions.eq(\"name\", \"F%\") )\n"
+#~ " .setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)\n"
+#~ " .list();\n"
+#~ "Iterator iter = cats.iterator();\n"
+#~ "while ( iter.hasNext() ) {\n"
+#~ " Map map = (Map) iter.next();\n"
+#~ " Cat cat = (Cat) map.get(Criteria.ROOT_ALIAS);\n"
+#~ " Cat kitten = (Cat) map.get(\"kt\");\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .createCriteria(\"kittens\", \"kt\")\n"
+#~ " .add( Restrictions.eq(\"name\", \"F%\")
)\n"
+#~ " .setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)\n"
+#~ " .list();\n"
+#~ "Iterator iter = cats.iterator();\n"
+#~ "while ( iter.hasNext() ) {\n"
+#~ " Map map = (Map) iter.next();\n"
+#~ " Cat cat = (Cat) map.get(Criteria.ROOT_ALIAS);\n"
+#~ " Cat kitten = (Cat) map.get(\"kt\");\n"
+#~ "}"
-#. Tag: para
-#: query_criteria.xml:286
-#, fuzzy, no-c-format
-msgid ""
-"This functionality is not intended for use with entities with "
-"<emphasis>mutable</emphasis> natural keys."
-msgstr "注意,此功能对具有<emphasis>mutable</emphasis>自然键的entity并不适用。"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.like(\"name\", \"Fritz%\") )\n"
+#~ " .setFetchMode(\"mate\", FetchMode.EAGER)\n"
+#~ " .setFetchMode(\"kittens\", FetchMode.EAGER)\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List cats = sess.createCriteria(Cat.class)\n"
+#~ " .add( Restrictions.like(\"name\", \"Fritz%\")
)\n"
+#~ " .setFetchMode(\"mate\", FetchMode.EAGER)\n"
+#~ " .setFetchMode(\"kittens\", FetchMode.EAGER)\n"
+#~ " .list();"
-#. Tag: para
-#: query_criteria.xml:291
-#, fuzzy, no-c-format
-msgid ""
-"Once you have enabled the Hibernate query cache, the
<literal>Restrictions."
-"naturalId()</literal> allows you to make use of the more efficient cache
"
-"algorithm."
-msgstr ""
-"现在,我们可以用<literal>Restrictions.naturalId()</literal>来使用更加高效的缓"
-"存算法。"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[Cat cat = new Cat();\n"
+#~ "cat.setSex('F');\n"
+#~ "cat.setColor(Color.BLACK);\n"
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .add( Example.create(cat) )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "Cat cat = new Cat();\n"
+#~ "cat.setSex('F');\n"
+#~ "cat.setColor(Color.BLACK);\n"
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .add( Example.create(cat) )\n"
+#~ " .list();"
-#. Tag: programlisting
-#: query_criteria.xml:297
-#, no-c-format
-msgid ""
-"<![CDATA[session.createCriteria(User.class)\n"
-" .add( Restrictions.naturalId()\n"
-" .set(\"name\", \"gavin\")\n"
-" .set(\"org\", \"hb\") \n"
-" ).setCacheable(true)\n"
-" .uniqueResult();]]>"
-msgstr ""
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[Example example = Example.create(cat)\n"
+#~ " .excludeZeroes() //exclude zero valued properties\n"
+#~ " .excludeProperty(\"color\") //exclude the property named
\"color\"\n"
+#~ " .ignoreCase() //perform case insensitive string "
+#~ "comparisons\n"
+#~ " .enableLike(); //use like for string comparisons\n"
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .add(example)\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "Example example = Example.create(cat)\n"
+#~ " .excludeZeroes() //exclude zero valued properties\n"
+#~ " .excludeProperty(\"color\") //exclude the property named
\"color\"\n"
+#~ " .ignoreCase() //perform case insensitive string "
+#~ "comparisons\n"
+#~ " .enableLike(); //use like for string comparisons\n"
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .add(example)\n"
+#~ " .list();"
+#, fuzzy
#~ msgid ""
-#~ "You may easily specify constraints upon related entities by navigating "
-#~ "associations using <literal>createCriteria()</literal>."
+#~ "<![CDATA[List results = session.createCriteria(Cat.class)\n"
+#~ " .add( Example.create(cat) )\n"
+#~ " .createCriteria(\"mate\")\n"
+#~ " .add( Example.create( cat.getMate() ) )\n"
+#~ " .list();]]>"
#~ msgstr ""
-#~ "你可以使用<literal>createCriteria()</literal>非常容易的在互相关联的实体间"
-#~ "建立 约束。"
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .add( Example.create(cat) )\n"
+#~ " .createCriteria(\"mate\")\n"
+#~ " .add( Example.create( cat.getMate() ) )\n"
+#~ " .list();"
-#~ msgid "Next, enable the Hibernate query cache."
-#~ msgstr "然后,打开Hibernate 查询缓存。"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Projections.rowCount() )\n"
+#~ " .add( Restrictions.eq(\"color\", Color.BLACK) )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Projections.rowCount() )\n"
+#~ " .add( Restrictions.eq(\"color\", Color.BLACK) )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Projections.projectionList()\n"
+#~ " .add( Projections.rowCount() )\n"
+#~ " .add( Projections.avg(\"weight\") )\n"
+#~ " .add( Projections.max(\"weight\") )\n"
+#~ " .add( Projections.groupProperty(\"color\") )\n"
+#~ " )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Projections.projectionList()\n"
+#~ " .add( Projections.rowCount() )\n"
+#~ " .add( Projections.avg(\"weight\") )\n"
+#~ " .add( Projections.max(\"weight\") )\n"
+#~ " .add( Projections.groupProperty(\"color\") )\n"
+#~ " )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Projections.alias(
Projections.groupProperty(\"color"
+#~ "\"), \"colr\" ) )\n"
+#~ " .addOrder( Order.asc(\"colr\") )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Projections.alias(
Projections.groupProperty(\"color"
+#~ "\"), \"colr\" ) )\n"
+#~ " .addOrder( Order.asc(\"colr\") )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection(
Projections.groupProperty(\"color\").as(\"colr\") )\n"
+#~ " .addOrder( Order.asc(\"colr\") )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection(
Projections.groupProperty(\"color\").as(\"colr\") )\n"
+#~ " .addOrder( Order.asc(\"colr\") )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Projections.projectionList()\n"
+#~ " .add( Projections.rowCount(), \"catCountByColor\" )\n"
+#~ " .add( Projections.avg(\"weight\"), \"avgWeight\"
)\n"
+#~ " .add( Projections.max(\"weight\"), \"maxWeight\"
)\n"
+#~ " .add( Projections.groupProperty(\"color\"),
\"color\" )\n"
+#~ " )\n"
+#~ " .addOrder( Order.desc(\"catCountByColor\") )\n"
+#~ " .addOrder( Order.desc(\"avgWeight\") )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Projections.projectionList()\n"
+#~ " .add( Projections.rowCount(), \"catCountByColor\" )\n"
+#~ " .add( Projections.avg(\"weight\"), \"avgWeight\"
)\n"
+#~ " .add( Projections.max(\"weight\"), \"maxWeight\"
)\n"
+#~ " .add( Projections.groupProperty(\"color\"),
\"color\" )\n"
+#~ " )\n"
+#~ " .addOrder( Order.desc(\"catCountByColor\") )\n"
+#~ " .addOrder( Order.desc(\"avgWeight\") )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List results = session.createCriteria(Domestic.class,
\"cat\")\n"
+#~ " .createAlias(\"kittens\", \"kit\")\n"
+#~ " .setProjection( Projections.projectionList()\n"
+#~ " .add( Projections.property(\"cat.name\"),
\"catName\" )\n"
+#~ " .add( Projections.property(\"kit.name\"),
\"kitName\" )\n"
+#~ " )\n"
+#~ " .addOrder( Order.asc(\"catName\") )\n"
+#~ " .addOrder( Order.asc(\"kitName\") )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List results = session.createCriteria(Domestic.class,
\"cat\")\n"
+#~ " .createAlias(\"kittens\", \"kit\")\n"
+#~ " .setProjection( Projections.projectionList()\n"
+#~ " .add( Projections.property(\"cat.name\"),
\"catName\" )\n"
+#~ " .add( Projections.property(\"kit.name\"),
\"kitName\" )\n"
+#~ " )\n"
+#~ " .addOrder( Order.asc(\"catName\") )\n"
+#~ " .addOrder( Order.asc(\"kitName\") )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Property.forName(\"name\") )\n"
+#~ " .add( Property.forName(\"color\").eq(Color.BLACK) )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Property.forName(\"name\") )\n"
+#~ " .add( Property.forName(\"color\").eq(Color.BLACK) )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Projections.projectionList()\n"
+#~ " .add( Projections.rowCount().as(\"catCountByColor\")
)\n"
+#~ " .add(
Property.forName(\"weight\").avg().as(\"avgWeight\") )\n"
+#~ " .add(
Property.forName(\"weight\").max().as(\"maxWeight\") )\n"
+#~ " .add(
Property.forName(\"color\").group().as(\"color\" )\n"
+#~ " )\n"
+#~ " .addOrder( Order.desc(\"catCountByColor\") )\n"
+#~ " .addOrder( Order.desc(\"avgWeight\") )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List results = session.createCriteria(Cat.class)\n"
+#~ " .setProjection( Projections.projectionList()\n"
+#~ " .add( Projections.rowCount().as(\"catCountByColor\")
)\n"
+#~ " .add(
Property.forName(\"weight\").avg().as(\"avgWeight\") )\n"
+#~ " .add(
Property.forName(\"weight\").max().as(\"maxWeight\") )\n"
+#~ " .add(
Property.forName(\"color\").group().as(\"color\" )\n"
+#~ " )\n"
+#~ " .addOrder( Order.desc(\"catCountByColor\") )\n"
+#~ " .addOrder( Order.desc(\"avgWeight\") )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[DetachedCriteria query =
DetachedCriteria.forClass(Cat.class)\n"
+#~ " .add( Property.forName(\"sex\").eq('F') );\n"
+#~ " \n"
+#~ "Session session = ....;\n"
+#~ "Transaction txn = session.beginTransaction();\n"
+#~ "List results = query.getExecutableCriteria(session).setMaxResults(100)."
+#~ "list();\n"
+#~ "txn.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "DetachedCriteria query = DetachedCriteria.forClass(Cat.class)\n"
+#~ " .add( Property.forName(\"sex\").eq('F') );\n"
+#~ " \n"
+#~ "Session session = ....;\n"
+#~ "Transaction txn = session.beginTransaction();\n"
+#~ "List results = query.getExecutableCriteria(session).setMaxResults(100)."
+#~ "list();\n"
+#~ "txn.commit();\n"
+#~ "session.close();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[DetachedCriteria avgWeight = DetachedCriteria.forClass(Cat."
+#~ "class)\n"
+#~ " .setProjection( Property.forName(\"weight\").avg() );\n"
+#~ "session.createCriteria(Cat.class)\n"
+#~ " .add( Property.forName(\"weight\").gt(avgWeight) )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "DetachedCriteria avgWeight = DetachedCriteria.forClass(Cat.class)\n"
+#~ " .setProjection( Property.forName(\"weight\").avg() );\n"
+#~ "session.createCriteria(Cat.class)\n"
+#~ " .add( Property.forName(\"weight).gt(avgWeight) )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[DetachedCriteria weights =
DetachedCriteria.forClass(Cat.class)\n"
+#~ " .setProjection( Property.forName(\"weight\") );\n"
+#~ "session.createCriteria(Cat.class)\n"
+#~ " .add( Subqueries.geAll(\"weight\", weights) )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "DetachedCriteria weights = DetachedCriteria.forClass(Cat.class)\n"
+#~ " .setProjection( Property.forName(\"weight\") );\n"
+#~ "session.createCriteria(Cat.class)\n"
+#~ " .add( Subqueries.geAll(\"weight\", weights) )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[DetachedCriteria avgWeightForSex =
DetachedCriteria.forClass(Cat."
+#~ "class, \"cat2\")\n"
+#~ " .setProjection( Property.forName(\"weight\").avg() )\n"
+#~ " .add(
Property.forName(\"cat2.sex\").eqProperty(\"cat.sex\") );\n"
+#~ "session.createCriteria(Cat.class, \"cat\")\n"
+#~ " .add( Property.forName(\"weight\").gt(avgWeightForSex) )\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "DetachedCriteria avgWeightForSex = DetachedCriteria.forClass(Cat.class, "
+#~ "\"cat2\")\n"
+#~ " .setProjection( Property.forName(\"weight\").avg() )\n"
+#~ " .add(
Property.forName(\"cat2.sex\").eqProperty(\"cat.sex\") );\n"
+#~ "session.createCriteria(Cat.class, \"cat\")\n"
+#~ " .add( Property.forName(\"weight).gt(avgWeightForSex) )\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"User\">\n"
+#~ " <cache usage=\"read-write\"/>\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"increment\"/>\n"
+#~ " </id>\n"
+#~ " <natural-id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " <property name=\"org\"/>\n"
+#~ " </natural-id>\n"
+#~ " <property name=\"password\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"User\">\n"
+#~ " <cache usage=\"read-write\"/>\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"increment\"/>\n"
+#~ " </id>\n"
+#~ " <natural-id>\n"
+#~ " <property name=\"name\"/>\n"
+#~ " <property name=\"org\"/>\n"
+#~ " </natural-id>\n"
+#~ " <property name=\"password\"/>\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[session.createCriteria(User.class)\n"
+#~ " .add( Restrictions.naturalId()\n"
+#~ " .set(\"name\", \"gavin\")\n"
+#~ " .set(\"org\", \"hb\") \n"
+#~ " ).setCacheable(true)\n"
+#~ " .uniqueResult();]]>"
+#~ msgstr ""
+#~ "session.createCriteria(User.class)\n"
+#~ " .add( Restrictions.naturalId()\n"
+#~ " .set(\"name\", \"gavin\")\n"
+#~ " .set(\"org\", \"hb\") \n"
+#~ " ).setCacheable(true)\n"
+#~ " .uniqueResult();"
+
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_hql.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_hql.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_hql.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,42 +1,42 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2010-01-08T04:07:19\n"
+"PO-Revision-Date: 2009-12-07 21:13+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: query_hql.xml:29
#, no-c-format
msgid "HQL: The Hibernate Query Language"
-msgstr "HQL: Hibernate查询语言"
+msgstr "HQL: Hibernate 查询语言"
#. Tag: para
-#: query_hql.xml:31
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate uses a powerful query language (HQL) that is similar in appearance
"
"to SQL. Compared with SQL, however, HQL is fully object-oriented and "
"understands notions like inheritance, polymorphism and association."
msgstr ""
-"Hibernate配备了一种非常强大的查询语言,这种语言看上去很像SQL。但是不要被语法"
-"结构 上的相似所迷惑,HQL是非常有意识的被设计为完全面向对象的查询,它可以理解"
-"如继承、多态 和关联之类的概念。"
+"Hibernate 配备了一种非常强大的查询语言,这种语言看上去很像 SQL。但是不要被语"
+"法结构上的相似所迷惑,HQL 是非常有意识的被设计为完全面向对象的查询,它可以理"
+"解如继承、多态和关联之类的概念。 "
#. Tag: title
-#: query_hql.xml:38
#, no-c-format
msgid "Case Sensitivity"
msgstr "大小写敏感性问题"
#. Tag: para
-#: query_hql.xml:40
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"With the exception of names of Java classes and properties, queries are
case-"
"insensitive. So <literal>SeLeCT</literal> is the same as
<literal>sELEct</"
@@ -44,257 +44,157 @@
"hibernate.eg.FOO</literal> is not
<literal>org.hibernate.eg.Foo</literal>, "
"and <literal>foo.barSet</literal> is not
<literal>foo.BARSET</literal>."
msgstr ""
-"除了Java类与属性的名称外,查询语句对大小写并不敏感。 所以 <literal>SeLeCT</"
+"除了 Java 类与属性的名称外,查询语句对大小写并不敏感。 所以 <literal>SeLeCT</"
"literal> 与 <literal>sELEct</literal> 以及
<literal>SELECT</literal> 是相同"
"的,但是 <literal>org.hibernate.eg.FOO</literal> 并不等价于
<literal>org."
"hibernate.eg.Foo</literal> 并且 <literal>foo.barSet</literal> 也不等价于
"
-"<literal>foo.BARSET</literal>。"
+"<literal>foo.BARSET</literal>。 "
#. Tag: para
-#: query_hql.xml:51
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"This manual uses lowercase HQL keywords. Some users find queries with "
"uppercase keywords more readable, but this convention is unsuitable for "
"queries embedded in Java code."
msgstr ""
-"本手册中的HQL关键字将使用小写字母. 很多用户发现使用完全大写的关键字会使查询语"
-"句 的可读性更强, 但我们发现,当把查询语句嵌入到Java语句中的时候使用大写关键字"
-"比较难看。"
+"本手册中的 HQL 关键字将使用小写字母。很多用户发现使用完全大写的关键字会使查询"
+"语句的可读性更强,但我们发现,当把查询语句嵌入到 Java 语句中的时候使用大写关"
+"键字比较难看。"
#. Tag: title
-#: query_hql.xml:59
#, no-c-format
msgid "The from clause"
-msgstr "from子句"
+msgstr "from 子句"
#. Tag: para
-#: query_hql.xml:61
#, no-c-format
msgid "The simplest possible Hibernate query is of the form:"
-msgstr "Hibernate中最简单的查询语句的形式如下:"
+msgstr "Hibernate 中最简单的查询语句的形式如下:"
-#. Tag: programlisting
-#: query_hql.xml:65
-#, no-c-format
-msgid "<![CDATA[from eg.Cat]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:67
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"This returns all instances of the class <literal>eg.Cat</literal>. You
do "
"not usually need to qualify the class name, since
<literal>auto-import</"
"literal> is the default. For example:"
msgstr ""
-"该子句简单的返回<literal>eg.Cat</literal>类的所有实例。 通常我们不需要使用类"
-"的全限定名, 因为 <literal>auto-import</literal>(自动引入) 是缺省的情况。 所"
-"以我们几乎只使用如下的简单写法:"
+"该子句简单的返回 <literal>eg.Cat</literal> 类的所有实例。通常我们不需要使用类"
+"的全限定名,因为 <literal>auto-import</literal>(自动引入)是缺省的情况。所"
+"以我们几乎只使用如下的简单写法: "
-#. Tag: programlisting
-#: query_hql.xml:73
-#, no-c-format
-msgid "<![CDATA[from Cat]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:75
#, no-c-format
msgid ""
"In order to refer to the <literal>Cat</literal> in other parts of the
query, "
"you will need to assign an <emphasis>alias</emphasis>. For
example:"
msgstr ""
+"为了在这个查询的其他部分里引用 <literal>Cat</literal>,你将需要分配一个"
+"<emphasis>别名</emphasis>。例如:"
-#. Tag: programlisting
-#: query_hql.xml:81 query_hql.xml:396
-#, no-c-format
-msgid "<![CDATA[from Cat as cat]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:83
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"This query assigns the alias <literal>cat</literal> to
<literal>Cat</"
"literal> instances, so you can use that alias later in the query. The "
"<literal>as</literal> keyword is optional. You could also write:"
msgstr ""
-"这个语句把别名<literal>cat</literal>指定给类<literal>Cat</literal>
的实例, 这"
-"样我们就可以在随后的查询中使用此别名了。 关键字<literal>as</literal> 是可选"
-"的,我们也可以这样写:"
+"这个语句把别名 <literal>cat</literal> 指定给类<literal>Cat</literal>
的实例,"
+"这样我们就可以在随后的查询中使用此别名了。关键字 <literal>as</literal> 是可选"
+"的,我们也可以这样写: "
-#. Tag: programlisting
-#: query_hql.xml:89
-#, no-c-format
-msgid "<![CDATA[from Cat cat]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:91
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Multiple classes can appear, resulting in a cartesian product or
\"cross\" "
"join."
msgstr ""
-"子句中可以同时出现多个类, 其查询结果是产生一个笛卡儿积或产生跨表的连接。"
+"子句中可以同时出现多个类,其查询结果是产生一个笛卡儿积或产生跨表的连接。 "
-#. Tag: programlisting
-#: query_hql.xml:95
-#, no-c-format
-msgid "<![CDATA[from Formula, Parameter]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:96
-#, no-c-format
-msgid "<![CDATA[from Formula as form, Parameter as param]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:98
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"It is good practice to name query aliases using an initial lowercase as this
"
"is consistent with Java naming standards for local variables (e.g. "
"<literal>domesticCat</literal>)."
msgstr ""
-"查询语句中别名的开头部分小写被认为是实践中的好习惯, 这样做与Java变量的命名标"
-"准保持了一致 (比如,<literal>domesticCat</literal>)。"
+"查询语句中别名的开头部分小写被认为是实践中的好习惯,这样做与 Java 变量的命名"
+"标准保持了一致(比如,<literal>domesticCat</literal>)。 "
#. Tag: title
-#: query_hql.xml:107
#, no-c-format
msgid "Associations and joins"
-msgstr "关联(Association)与连接(Join)"
+msgstr "关联(Association)与连接(Join)"
#. Tag: para
-#: query_hql.xml:109
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You can also assign aliases to associated entities or to elements of a "
"collection of values using a <literal>join</literal>. For
example:"
msgstr ""
-"我们也可以为相关联的实体甚至是对一个集合中的全部元素指定一个别名, 这时要使用"
-"关键字<literal>join</literal>。"
+"我们也可以为相关联的实体甚至是对一个集合中的全部元素指定一个别名,这时要使用"
+"关键字 <literal>join</literal>。 "
-#. Tag: programlisting
-#: query_hql.xml:114
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[from Cat as cat\n"
-" inner join cat.mate as mate\n"
-" left outer join cat.kittens as kitten]]>"
-msgstr ""
+msgid "The supported join types are borrowed from ANSI SQL:"
+msgstr "受支持的连接类型是从 ANSI SQL 中借鉴来的:"
-#. Tag: programlisting
-#: query_hql.xml:116
+#. Tag: para
#, no-c-format
-msgid "<![CDATA[from Cat as cat left join cat.mate.kittens as
kittens]]>"
-msgstr ""
+msgid "<literal>inner join</literal>"
+msgstr "<literal>inner join</literal>"
-#. Tag: programlisting
-#: query_hql.xml:118
+#. Tag: para
#, no-c-format
-msgid "<![CDATA[from Formula form full join form.parameter param]]>"
-msgstr ""
+msgid "<literal>left outer join</literal>"
+msgstr "<literal>left outer join</literal>"
#. Tag: para
-#: query_hql.xml:120
-#, fuzzy, no-c-format
-msgid "The supported join types are borrowed from ANSI SQL:"
-msgstr "受支持的连接类型是从ANSI SQL中借鉴来的。"
-
-#. Tag: literal
-#: query_hql.xml:127
#, no-c-format
-msgid "inner join"
-msgstr "<literal>inner join</literal>(内连接)"
+msgid "<literal>right outer join</literal>"
+msgstr "<literal>right outer join</literal>"
-#. Tag: literal
-#: query_hql.xml:132
-#, no-c-format
-msgid "left outer join"
-msgstr "<literal>left outer join</literal>(左外连接)"
-
-#. Tag: literal
-#: query_hql.xml:137
-#, no-c-format
-msgid "right outer join"
-msgstr "<literal>right outer join</literal>(右外连接)"
-
#. Tag: para
-#: query_hql.xml:141
#, no-c-format
msgid "<literal>full join</literal> (not usually useful)"
-msgstr "<literal>full join</literal> (全连接,并不常用)"
+msgstr "<literal>full join</literal>(全连接,并不常用)"
#. Tag: para
-#: query_hql.xml:147
#, no-c-format
msgid ""
"The <literal>inner join</literal>, <literal>left outer
join</literal> and "
"<literal>right outer join</literal> constructs may be
abbreviated."
msgstr ""
-"语句<literal>inner join</literal>, <literal>left outer
join</literal> 以及 "
+"语句 <literal>inner join</literal>,<literal>left outer
join</literal> 以及 "
"<literal>right outer join</literal> 可以简写。"
-#. Tag: programlisting
-#: query_hql.xml:152
-#, no-c-format
-msgid ""
-"<![CDATA[from Cat as cat\n"
-" join cat.mate as mate\n"
-" left join cat.kittens as kitten]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:154
#, no-c-format
msgid ""
"You may supply extra join conditions using the HQL
<literal>with</literal> "
"keyword."
-msgstr "通过HQL的<literal>with</literal>关键字,你可以提供额外的join条件。"
-
-#. Tag: programlisting
-#: query_hql.xml:159
-#, no-c-format
-msgid ""
-"<![CDATA[from Cat as cat\n"
-" left join cat.kittens as kitten\n"
-" with kitten.bodyWeight > 10.0]]>"
msgstr ""
+"通过 HQL 的 <literal>with</literal> 关键字,你可以提供额外的 join 条件。"
#. Tag: para
-#: query_hql.xml:161
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"A \"fetch\" join allows associations or collections of values to be
"
"initialized along with their parent objects using a single select. This is "
"particularly useful in the case of a collection. It effectively overrides "
"the outer join and lazy declarations of the mapping file for associations "
-"and collections. See <xref linkend=\"performance-fetching\"/> for
more "
+"and collections. See <xref linkend=\"performance-fetching\" /> for
more "
"information."
msgstr ""
-"还有,一个\"fetch\"连接允许仅仅使用一个选择语句就将相关联的对象或一组值的集合"
-"随着他们的父对象的初始化而被初始化,这种方法在使用到集合的情况下尤其有用,对"
-"于关联和集合来说,它有效的代替了映射文件中的外联接 与延迟声明(lazy "
-"declarations). 查看 <xref linkend=\"performance-fetching\"/>
以获得等多的信"
+"还有,一个 \"fetch\" 连接允许仅仅使用一个选择语句就将相关联的对象或一组值的集"
+"合随着他们的父对象的初始化而被初始化,这种方法在使用到集合的情况下尤其有用,"
+"对于关联和集合来说,它有效的代替了映射文件中的外联接与延迟声明(lazy "
+"declarations)。查看 <xref linkend=\"performance-fetching\" />
以获得等多的信"
"息。"
-#. Tag: programlisting
-#: query_hql.xml:169
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[from Cat as cat\n"
-" inner join fetch cat.mate\n"
-" left join fetch cat.kittens]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:171
-#, fuzzy, no-c-format
-msgid ""
"A fetch join does not usually need to assign an alias, because the "
"associated objects should not be used in the <literal>where</literal>
clause "
"(or any other clause). The associated objects are also not returned directly
"
@@ -302,24 +202,13 @@
"The only reason you might need an alias is if you are recursively join "
"fetching a further collection:"
msgstr ""
-"一个fetch连接通常不需要被指定别名, 因为相关联的对象不应当被用在 "
-"<literal>where</literal> 子句 (或其它任何子句)中。同时,相关联的对象 并不在查"
-"询的结果中直接返回,但可以通过他们的父对象来访问到他们。"
+"一个 fetch 连接通常不需要被指定别名,因为相关联的对象不应当被用在 "
+"<literal>where</literal> 子句(或其它任何子句)中。同时,相关联的对象并不在查"
+"询的结果中直接返回,但可以通过他们的父对象来访问到他们。 "
-#. Tag: programlisting
-#: query_hql.xml:179
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[from Cat as cat\n"
-" inner join fetch cat.mate\n"
-" left join fetch cat.kittens child\n"
-" left join fetch child.kittens]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:181
-#, fuzzy, no-c-format
-msgid ""
"The <literal>fetch</literal> construct cannot be used in queries called
"
"using <literal>iterate()</literal> (though
<literal>scroll()</literal> can "
"be used). <literal>Fetch</literal> should be used together with "
@@ -335,20 +224,19 @@
"<literal>full join fetch</literal> and <literal>right join
fetch</literal> "
"are not meaningful."
msgstr ""
-"假若使用<literal>iterate()</literal>来调用查询,请注意<literal>fetch</"
-"literal>构造是不能使用的(<literal>scroll()</literal> 可以使用)。"
-"<literal>fetch</literal>也不应该与<literal>setMaxResults()</literal>
或"
-"<literal>setFirstResult()</literal>共用,这是因为这些操作是基于结果集的,而在"
-"预先抓取集合类时可能包含重复的数据,也就是说无法预先知道精确的行数。"
-"<literal>fetch</literal>还不能与独立的
<literal>with</literal>条件一起使用。"
-"通过在一次查询中fetch多个集合,可以制造出笛卡尔积,因此请多加注意。对bag映射"
-"来说,同时join fetch多个集合角色可能在某些情况下给出并非预期的结果,也请小"
-"心。最后注意,使用<literal>full join fetch</literal> 与 <literal>right join
"
-"fetch</literal>是没有意义的。"
+"假若使用 <literal>iterate()</literal> 来调用查询,请注意
<literal>fetch</"
+"literal> 构造是不能使用的(<literal>scroll()</literal> 可以使用)。"
+"<literal>fetch</literal> 也不应该与
<literal>setMaxResults()</literal> 或 "
+"<literal>setFirstResult()</literal> 共用,这是因为这些操作是基于结果集的,而"
+"在预先抓取集合类时可能包含重复的数据,也就是说无法预先知道精确的行数。"
+"<literal>fetch</literal> 还不能与独立的 <literal>with</literal>
条件一起使"
+"用。通过在一次查询中 fetch 多个集合,可以制造出笛卡尔积,因此请多加注意。对 "
+"bag 映射来说,同时 join fetch 多个集合角色可能在某些情况下给出并非预期的结"
+"果,也请小心。最后注意,使用 <literal>full join fetch</literal> 与 "
+"<literal>right join fetch</literal> 是没有意义的。 "
#. Tag: para
-#: query_hql.xml:196
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"If you are using property-level lazy fetching (with bytecode "
"instrumentation), it is possible to force Hibernate to fetch the lazy "
@@ -356,52 +244,34 @@
"properties</literal>."
msgstr ""
"如果你使用属性级别的延迟获取(lazy fetching)(这是通过重新编写字节码实现"
-"的),可以使用 <literal>fetch all properties</literal> 来强制Hibernate立即取"
-"得那些原本需要延迟加载的属性(在第一个查询中)。"
+"的),可以使用 <literal>fetch all properties</literal> 来强制 Hibernate
立即"
+"取得那些原本需要延迟加载的属性(在第一个查询中)。 "
-#. Tag: programlisting
-#: query_hql.xml:202
-#, no-c-format
-msgid "<![CDATA[from Document fetch all properties order by name]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:203
-#, no-c-format
-msgid ""
-"<![CDATA[from Document doc fetch all properties where lower(doc.name) like
'%"
-"cats%']]>"
-msgstr ""
-
#. Tag: title
-#: query_hql.xml:208
#, no-c-format
msgid "Forms of join syntax"
msgstr "join 语法的形式"
#. Tag: para
-#: query_hql.xml:210
#, no-c-format
msgid ""
"HQL supports two forms of association joining:
<literal>implicit</literal> "
"and <literal>explicit</literal>."
msgstr ""
-"HQL支持两种关联join的形式:<literal>implicit(隐式)</literal> 与"
+"HQL 支持两种关联 join 的形式:<literal>implicit(隐式)</literal> 与 "
"<literal>explicit(显式)</literal>。"
#. Tag: para
-#: query_hql.xml:214
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The queries shown in the previous section all use the
<literal>explicit</"
"literal> form, that is, where the join keyword is explicitly used in the "
"from clause. This is the recommended form."
msgstr ""
-"上一节中给出的查询都是使用<literal>explicit(显式)</literal>形式的,其中form子"
-"句中明确给出了join关键字。这是建议使用的方式。"
+"上一节中给出的查询都是使用 <literal>explicit(显式)</literal>形式的,其中 "
+"form 子句中明确给出了 join 关键字。这是建议使用的方式。 "
#. Tag: para
-#: query_hql.xml:219
#, no-c-format
msgid ""
"The <literal>implicit</literal> form does not use the join keyword.
Instead, "
@@ -409,55 +279,41 @@
"literal> joins can appear in any of the HQL clauses.
<literal>implicit</"
"literal> join result in inner joins in the resulting SQL statement."
msgstr ""
-"<literal>implicit(隐式)</literal>形式不使用join关键字。关联使用\"点号\"来进"
-"行“引用”。<literal>implicit</literal> join可以在任何HQL子句中出现."
-"<literal>implicit</literal> join在最终的SQL语句中以inner join的方式出现。"
+"<literal>implicit(隐式)</literal>形式不使用 join
关键字。关联使用\"点号\"来"
+"进行“引用”。<literal>implicit</literal> join 可以在任何 HQL 子句中出现。"
+"<literal>implicit</literal> join 在最终的 SQL 语句中以 inner join 的方式出"
+"现。"
-#. Tag: programlisting
-#: query_hql.xml:226
-#, no-c-format
-msgid "<![CDATA[from Cat as cat where cat.mate.name like
'%s%']]>"
-msgstr ""
-
#. Tag: title
-#: query_hql.xml:230
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Referring to identifier property"
-msgstr "Refering to identifier property"
+msgstr "引用 identifier 属性 "
#. Tag: para
-#: query_hql.xml:232
-#, fuzzy, no-c-format
+#, no-c-format
msgid "There are 2 ways to refer to an entity's identifier property:"
-msgstr ""
-"There are, generally speaking, 2 ways to refer to an entity's identifier
"
-"property:"
+msgstr "通常有两种方法来引用实体的 identifier 属性: "
#. Tag: para
-#: query_hql.xml:237
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The special property (lowercase) <literal>id</literal> may be used to
"
"reference the identifier property of an entity <emphasis>provided that the
"
"entity does not define a non-identifier property named id</emphasis>."
msgstr ""
-"The special property (lowercase) <literal>id</literal> may be used to
"
-"reference the identifier property of an entity <emphasis>provided that
"
-"entity does not define a non-identifier property named id</emphasis>."
+"特殊属性(lowercase)<literal>id</literal> 可以用来引用实体的 identifier 属"
+"性 <emphasis>假设这个实体没有定义用 non-identifier 属性命名的 id</"
+"emphasis>。 "
#. Tag: para
-#: query_hql.xml:244
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"If the entity defines a named identifier property, you can use that property
"
"name."
-msgstr ""
-"If the entity defines a named identifier property, you may use that property
"
-"name."
+msgstr "如果这个实体定义了 identifier 属性,你可以使用属性名。 "
#. Tag: para
-#: query_hql.xml:250
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"References to composite identifier properties follow the same naming rules. "
"If the entity has a non-identifier property named id, the composite "
@@ -465,15 +321,12 @@
"the special <literal>id</literal> property can be used to reference the
"
"identifier property."
msgstr ""
-"References to composite identifier properties follow the same naming rules. "
-"If the entity has a non-identifier property named id, the composite "
-"identifier property can only be referenced by its defined named; otherwise, "
-"the special <literal>id</literal> property can be used to rerference
the "
-"identifier property."
+"对组合 identifier 属性的引用遵循相同的命名规则。如果实体有一个 non-"
+"identifier 属性命名的 id,这个组合 identifier 属性只能用自己定义的名字来引"
+"用;否则,特殊 <literal>id</literal> 属性可以用来引用 identifier 属性。 "
#. Tag: para
-#: query_hql.xml:258
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Please note that, starting in version 3.2.2, this has changed significantly.
"
"In previous versions, <literal>id</literal>
<emphasis>always</emphasis> "
@@ -481,277 +334,146 @@
"ramification of that decision was that non-identifier properties named "
"<literal>id</literal> could never be referenced in Hibernate
queries."
msgstr ""
-"Note: this has changed significantly starting in version 3.2.2. In previous "
-"versions, <literal>id</literal><emphasis>always</emphasis>
referred to the "
-"identifier property no matter what its actual name. A ramification of that "
-"decision was that non-identifier properties named <literal>id</literal>
"
-"could never be referenced in Hibernate queries."
+"注意:从 3.2.2 版本开始,这已经改变了很多。在前面的版本里,不管实际的名字,"
+"<literal>id</literal> <emphasis>总是</emphasis>指向 identifier
属性;而用 "
+"non-identifier 属性命名的 <literal>id</literal> 就从来不在 Hibernate 查询里引"
+"用。 "
#. Tag: title
-#: query_hql.xml:269
#, no-c-format
msgid "The select clause"
-msgstr "select子句"
+msgstr "select 子句"
#. Tag: para
-#: query_hql.xml:271
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The <literal>select</literal> clause picks which objects and properties
to "
"return in the query result set. Consider the following:"
msgstr ""
-"<literal>select</literal> 子句选择将哪些对象与属性返 回到查询结果集中. 考虑如"
-"下情况:"
+"<literal>select</literal> 子句选择将哪些对象与属性返回到查询结果集中。考虑如"
+"下情况:"
-#. Tag: programlisting
-#: query_hql.xml:276
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[select mate\n"
-"from Cat as cat\n"
-" inner join cat.mate as mate]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:278
-#, fuzzy, no-c-format
-msgid ""
"The query will select <literal>mate</literal>s of other
<literal>Cat</"
"literal>s. You can express this query more compactly as:"
msgstr ""
-"该语句将选择<literal>mate</literal>s of other
<literal>Cat</literal>s。(其他"
-"猫的配偶) 实际上, 你可以更简洁的用以下的查询语句表达相同的含义:"
+"该语句将选择其它 <literal>Cat</literal> 的
<literal>mate</literal>(其他猫的"
+"配偶)。实际上,你可以更简洁的用以下的查询语句表达相同的含义: "
-#. Tag: programlisting
-#: query_hql.xml:283
-#, no-c-format
-msgid "<![CDATA[select cat.mate from Cat cat]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:285
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Queries can return properties of any value type including properties of "
"component type:"
msgstr ""
-"查询语句可以返回值为任何类型的属性,包括返回类型为某种组件(Component)的属性:"
+"查询语句可以返回值为任何类型的属性,包括返回类型为某种组件(Component)的属"
+"性: "
-#. Tag: programlisting
-#: query_hql.xml:289
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[select cat.name from DomesticCat cat\n"
-"where cat.name like 'fri%']]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:291
-#, no-c-format
-msgid "<![CDATA[select cust.name.firstName from Customer as cust]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:293
-#, fuzzy, no-c-format
-msgid ""
"Queries can return multiple objects and/or properties as an array of type "
"<literal>Object[]</literal>:"
msgstr ""
-"查询语句可以返回多个对象和(或)属性,存放在 <literal>Object[]</literal>队列"
-"中,"
+"查询语句可以返回多个对象和(或)属性,存放在 <literal>Object[]</literal> 队列"
+"中, "
-#. Tag: programlisting
-#: query_hql.xml:298
-#, no-c-format
-msgid ""
-"<![CDATA[select mother, offspr, mate.name\n"
-"from DomesticCat as mother\n"
-" inner join mother.mate as mate\n"
-" left outer join mother.kittens as offspr]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:300
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Or as a <literal>List</literal>:"
-msgstr "或存放在一个<literal>List</literal>对象中,"
+msgstr "或存放在一个 <literal>List</literal> 对象中:"
-#. Tag: programlisting
-#: query_hql.xml:304
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[select new list(mother, offspr, mate.name)\n"
-"from DomesticCat as mother\n"
-" inner join mother.mate as mate\n"
-" left outer join mother.kittens as offspr]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:306
-#, fuzzy, no-c-format
-msgid ""
"Or - assuming that the class <literal>Family</literal> has an
appropriate "
"constructor - as an actual typesafe Java object:"
-msgstr "假设类<literal>Family</literal>有一个合适的构造函数."
-
-#. Tag: programlisting
-#: query_hql.xml:310
-#, no-c-format
-msgid ""
-"<![CDATA[select new Family(mother, mate, offspr)\n"
-"from DomesticCat as mother\n"
-" join mother.mate as mate\n"
-" left join mother.kittens as offspr]]>"
msgstr ""
+"假设类 <literal>Family</literal> 有一个合适的构造函数 - 作为实际的类型安全的 "
+"Java 对象:"
#. Tag: para
-#: query_hql.xml:313
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You can assign aliases to selected expressions using
<literal>as</literal>:"
-msgstr "你可以使用关键字<literal>as</literal>给“被选择了的表达式”指派别名:"
+msgstr "你可以使用关键字 <literal>as</literal> 给“被选择了的表达式”指派别名: "
-#. Tag: programlisting
-#: query_hql.xml:317
-#, no-c-format
-msgid ""
-"<![CDATA[select max(bodyWeight) as max, min(bodyWeight) as min, count(*) as
"
-"n\n"
-"from Cat cat]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:319
#, no-c-format
msgid ""
"This is most useful when used together with <literal>select new
map</"
"literal>:"
-msgstr "这种做法在与子句<literal>select new map</literal>一起使用时最有用:"
+msgstr "这种做法在与子句 <literal>select new map</literal> 一起使用时最有用:"
-#. Tag: programlisting
-#: query_hql.xml:323
-#, no-c-format
-msgid ""
-"<![CDATA[select new map( max(bodyWeight) as max, min(bodyWeight) as min, "
-"count(*) as n )\n"
-"from Cat cat]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:325
#, no-c-format
msgid ""
"This query returns a <literal>Map</literal> from aliases to selected
values."
msgstr ""
-"该查询返回了一个<literal>Map</literal>的对象,内容是别名与被选择的值组成的名-"
-"值映射。"
+"该查询返回了一个 <literal>Map</literal> 的对象,内容是别名与被选择的值组成的"
+"名-值映射。"
#. Tag: title
-#: query_hql.xml:332
#, no-c-format
msgid "Aggregate functions"
msgstr "聚集函数"
#. Tag: para
-#: query_hql.xml:334
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"HQL queries can even return the results of aggregate functions on
properties:"
-msgstr "HQL查询甚至可以返回作用于属性之上的聚集函数的计算结果:"
+msgstr "HQL 查询甚至可以返回作用于属性之上的聚集函数的计算结果: "
-#. Tag: programlisting
-#: query_hql.xml:338
-#, no-c-format
-msgid ""
-"<![CDATA[select avg(cat.weight), sum(cat.weight), max(cat.weight), count"
-"(cat)\n"
-"from Cat cat]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:349
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The supported aggregate functions are:"
-msgstr "受支持的聚集函数如下:"
+msgstr "受支持的聚集函数如下: "
-#. Tag: literal
-#: query_hql.xml:356
+#. Tag: para
#, no-c-format
-msgid "avg(...), sum(...), min(...), max(...)"
-msgstr "avg(...), sum(...), min(...), max(...)"
+msgid "<literal>avg(...), sum(...), min(...), max(...)</literal>"
+msgstr "<literal>avg(...), sum(...), min(...), max(...)</literal>"
-#. Tag: literal
-#: query_hql.xml:361
+#. Tag: para
#, no-c-format
-msgid "count(*)"
-msgstr "count(*)"
+msgid "<literal>count(*)</literal>"
+msgstr "<literal>count(*)</literal>"
-#. Tag: literal
-#: query_hql.xml:366
+#. Tag: para
#, no-c-format
-msgid "count(...), count(distinct ...), count(all...)"
-msgstr "count(...), count(distinct ...), count(all...)"
+msgid "<literal>count(...), count(distinct ...),
count(all...)</literal>"
+msgstr "<literal>count(...), count(distinct ...),
count(all...)</literal>"
#. Tag: para
-#: query_hql.xml:371
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You can use arithmetic operators, concatenation, and recognized SQL "
"functions in the select clause:"
-msgstr "你可以在选择子句中使用数学操作符、连接以及经过验证的SQL函数:"
+msgstr "你可以在选择子句中使用数学操作符、连接以及经过验证的 SQL 函数: "
-#. Tag: programlisting
-#: query_hql.xml:376
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[select cat.weight + sum(kitten.weight)\n"
-"from Cat cat\n"
-" join cat.kittens kitten\n"
-"group by cat.id, cat.weight]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:378
-#, no-c-format
-msgid ""
-"<![CDATA[select firstName||' '||initial||' '||upper(lastName)
from Person]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:380
-#, fuzzy, no-c-format
-msgid ""
"The <literal>distinct</literal> and <literal>all</literal>
keywords can be "
"used and have the same semantics as in SQL."
msgstr ""
-"关键字<literal>distinct</literal>与<literal>all</literal>
也可以使用,它们具"
-"有与SQL相同的语义."
+"关键字 <literal>distinct</literal> 与 <literal>all</literal>
也可以使用,它们"
+"具有与 SQL 相同的语义。 "
-#. Tag: programlisting
-#: query_hql.xml:385
-#, no-c-format
-msgid ""
-"<![CDATA[select distinct cat.name from Cat cat\n"
-"\n"
-"select count(distinct cat.name), count(cat) from Cat cat]]>"
-msgstr ""
-
#. Tag: title
-#: query_hql.xml:390
#, no-c-format
msgid "Polymorphic queries"
msgstr "多态查询"
#. Tag: para
-#: query_hql.xml:392
#, no-c-format
msgid "A query like:"
-msgstr "一个如下的查询语句:"
+msgstr "一个如下的查询语句:"
#. Tag: para
-#: query_hql.xml:398
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"returns instances not only of <literal>Cat</literal>, but also of
subclasses "
"like <literal>DomesticCat</literal>. Hibernate queries can name "
@@ -760,281 +482,173 @@
"that extend that class or implement the interface. The following query would
"
"return all persistent objects:"
msgstr ""
-"不仅返回<literal>Cat</literal>类的实例, 也同时返回子类
<literal>DomesticCat</"
-"literal>的实例. Hibernate
可以在<literal>from</literal>子句中指定<emphasis>任"
-"何</emphasis> Java 类或接口. 查询会返回继承了该类的所有持久化子类 的实例或返"
-"回声明了该接口的所有持久化类的实例。下面的查询语句返回所有的被持久化的对象:"
+"不仅返回 <literal>Cat</literal> 类的实例,也同时返回子类 "
+"<literal>DomesticCat</literal> 的实例。Hibernate 可以在
<literal>from</"
+"literal> 子句中指定<emphasis>任何</emphasis> Java 类或接口。查询会返回继承了"
+"该类的所有持久化子类的实例或返回声明了该接口的所有持久化类的实例。下面的查询"
+"语句返回所有的被持久化的对象: "
-#. Tag: programlisting
-#: query_hql.xml:406
-#, no-c-format
-msgid "<![CDATA[from java.lang.Object o]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:408
#, no-c-format
msgid ""
"The interface <literal>Named</literal> might be implemented by various
"
"persistent classes:"
-msgstr "接口<literal>Named</literal> 可能被各种各样的持久化类声明:"
+msgstr "接口 <literal>Named</literal> 可能被各种各样的持久化类声明:"
-#. Tag: programlisting
-#: query_hql.xml:413
-#, no-c-format
-msgid "<![CDATA[from Named n, Named m where n.name = m.name]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:415
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"These last two queries will require more than one SQL
<literal>SELECT</"
"literal>. This means that the <literal>order by</literal> clause
does not "
"correctly order the whole result set. It also means you cannot call these "
"queries using <literal>Query.scroll()</literal>."
msgstr ""
-"注意,最后的两个查询将需要超过一个的SQL <literal>SELECT</literal>.这表明"
-"<literal>order by</literal>子句 没有对整个结果集进行正确的排序. (这也说明你不"
-"能对这样的查询使用<literal>Query.scroll()</literal>方法.)"
+"注意,最后的两个查询将需要超过一个的 SQL <literal>SELECT</literal>。这表明 "
+"<literal>order by</literal> 子句没有对整个结果集进行正确的排序。(这也说明你"
+"不能对这样的查询使用 <literal>Query.scroll()</literal> 方法。)"
#. Tag: title
-#: query_hql.xml:424
#, no-c-format
msgid "The where clause"
-msgstr "where子句"
+msgstr "where 子句"
#. Tag: para
-#: query_hql.xml:426
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The <literal>where</literal> clause allows you to refine the list of
"
"instances returned. If no alias exists, you can refer to properties by name:"
msgstr ""
-"<literal>where</literal>子句允许你将返回的实例列表的范围缩小. 如果没有指定别"
-"名,你可以使用属性名来直接引用属性:"
+"<literal>where</literal> 子句允许你将返回的实例列表的范围缩小。如果没有指定别"
+"名,你可以使用属性名来直接引用属性: "
-#. Tag: programlisting
-#: query_hql.xml:431
-#, no-c-format
-msgid "<![CDATA[from Cat where name='Fritz']]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:433
#, no-c-format
msgid "If there is an alias, use a qualified property name:"
-msgstr "如果指派了别名,需要使用完整的属性名:"
+msgstr "如果指派了别名,需要使用完整的属性名:"
-#. Tag: programlisting
-#: query_hql.xml:437
+#. Tag: para
#, no-c-format
-msgid "<![CDATA[from Cat as cat where cat.name='Fritz']]>"
+msgid "This returns instances of <literal>Cat</literal> named
'Fritz'."
msgstr ""
+"返回名为(属性 name 等于)'Fritz' 的 <literal>Cat</literal> 类的实例。 "
#. Tag: para
-#: query_hql.xml:439
-#, fuzzy, no-c-format
-msgid "This returns instances of <literal>Cat</literal> named
'Fritz'."
-msgstr "返回名为(属性name等于)'Fritz'的<literal>Cat</literal>类的实例。"
+#, no-c-format
+msgid "The following query:"
+msgstr "下面的查询:"
#. Tag: para
-#: query_hql.xml:443
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
-"The following query: <programlisting><![CDATA[select foo\n"
-"from Foo foo, Bar bar\n"
-"where foo.startDate = bar.date]]></programlisting> returns all instances
of "
-"<literal>Foo</literal> with an instance of
<literal>bar</literal> with a "
-"<literal>date</literal> property equal to the
<literal>startDate</literal> "
-"property of the <literal>Foo</literal>. Compound path expressions make
the "
-"<literal>where</literal> clause extremely powerful. Consider the
following:"
+"returns all instances of <literal>Foo</literal> with an instance of
"
+"<literal>bar</literal> with a <literal>date</literal>
property equal to the "
+"<literal>startDate</literal> property of the
<literal>Foo</literal>. "
+"Compound path expressions make the <literal>where</literal> clause
extremely "
+"powerful. Consider the following:"
msgstr ""
-"将返回所有满足下面条件的<literal>Foo</literal>类的实例: 存在如下的"
-"<literal>bar</literal>的一个实例,其<literal>date</literal>属性等于
"
-"<literal>Foo</literal>的<literal>startDate</literal>属性。
复合路径表达式使得"
-"<literal>where</literal>子句非常的强大,考虑如下情况:"
+"将返回所有满足下面条件的 <literal>Foo</literal> 类的实例: 存在如下的 "
+"<literal>bar</literal> 的一个实例,其 <literal>date</literal> 属性等于
"
+"<literal>Foo</literal> 的 <literal>startDate</literal>
属性。复合路径表达式使"
+"得 <literal>where</literal> 子句非常的强大,考虑如下情况: "
-#. Tag: programlisting
-#: query_hql.xml:454
-#, no-c-format
-msgid "<![CDATA[from Cat cat where cat.mate.name is not null]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:456
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"This query translates to an SQL query with a table (inner) join. For
example:"
msgstr ""
-"该查询将被翻译成为一个含有表连接(内连接)的SQL查询。如果你打算写像这样的查询"
-"语句"
+"该查询将被翻译成为一个含有表连接(内连接)的 SQL 查询。如果你打算写像这样的查"
+"询语句:"
-#. Tag: programlisting
-#: query_hql.xml:461
-#, no-c-format
-msgid ""
-"<![CDATA[from Foo foo\n"
-"where foo.bar.baz.customer.address.city is not null]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:463
-#, fuzzy, no-c-format
+#, no-c-format
msgid "would result in a query that would require four table joins in SQL."
-msgstr "在SQL中,你为达此目的将需要进行一个四表连接的查询。"
+msgstr "在 SQL 中,你为达此目的将需要进行一个四表连接的查询。 "
#. Tag: para
-#: query_hql.xml:467
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The <literal>=</literal> operator can be used to compare not only
"
"properties, but also instances:"
msgstr ""
-"<literal>=</literal>运算符不仅可以被用来比较属性的值,也可以用来比较实例:"
+"<literal>=</literal> 运算符不仅可以被用来比较属性的值,也可以用来比较实例: "
-#. Tag: programlisting
-#: query_hql.xml:472
+#. Tag: para
#, no-c-format
-msgid "<![CDATA[from Cat cat, Cat rival where cat.mate = rival.mate]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:474
-#, no-c-format
msgid ""
-"<![CDATA[select cat, mate\n"
-"from Cat cat, Cat mate\n"
-"where cat.mate = mate]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:476
-#, fuzzy, no-c-format
-msgid ""
"The special property (lowercase) <literal>id</literal> can be used to
"
"reference the unique identifier of an object. See <xref
linkend=\"queryhql-"
-"identifier-property\"/> for more information."
+"identifier-property\" /> for more information."
msgstr ""
-"特殊属性(小写)<literal>id</literal>可以用来表示一个对象的唯一的标识符。(你"
-"也可以使用该对象的属性名。)"
+"特殊属性(小写)<literal>id</literal> 可以用来表示一个对象的唯一的标识符。详"
+"情请参考 <xref linkend=\"queryhql-identifier-property\" />。"
-#. Tag: programlisting
-#: query_hql.xml:482
-#, no-c-format
-msgid ""
-"<![CDATA[from Cat as cat where cat.id = 123\n"
-"\n"
-"from Cat as cat where cat.mate.id = 69]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:484
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The second query is efficient and does not require a table join."
-msgstr "第二个查询是有效的。此时不需要进行表连接!"
+msgstr "第二个查询是有效的。此时不需要进行表连接。"
#. Tag: para
-#: query_hql.xml:488
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Properties of composite identifiers can also be used. Consider the following
"
"example where <literal>Person</literal> has composite identifiers
consisting "
"of <literal>country</literal> and
<literal>medicareNumber</literal>:"
msgstr ""
-"同样也可以使用复合标识符。比如<literal>Person</literal>类有一个复合标识符,它"
-"由<literal>country</literal>属性
与<literal>medicareNumber</literal>属性组"
-"成。"
+"同样也可以使用复合标识符。比如 <literal>Person</literal> 类有一个复合标识符,"
+"它由 <literal>country</literal> 属性与
<literal>medicareNumber</literal> 属性"
+"组成:"
-#. Tag: programlisting
-#: query_hql.xml:494
-#, no-c-format
-msgid ""
-"<![CDATA[from bank.Person person\n"
-"where person.id.country = 'AU'\n"
-" and person.id.medicareNumber = 123456]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:496
-#, no-c-format
-msgid ""
-"<![CDATA[from bank.Account account\n"
-"where account.owner.id.country = 'AU'\n"
-" and account.owner.id.medicareNumber = 123456]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:498
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Once again, the second query does not require a table join."
-msgstr "第二个查询也不需要进行表连接。"
+msgstr "第二个查询也不需要进行表连接。 "
#. Tag: para
-#: query_hql.xml:502
#, no-c-format
msgid ""
-"See <xref linkend=\"queryhql-identifier-property\"/> for more
information "
+"See <xref linkend=\"queryhql-identifier-property\" /> for more
information "
"regarding referencing identifier properties)"
msgstr ""
+"关于引用标识符属性的更多信息,请参考 <xref linkend=\"queryhql-identifier-"
+"property\" />。"
#. Tag: para
-#: query_hql.xml:507
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The special property <literal>class</literal> accesses the
discriminator "
"value of an instance in the case of polymorphic persistence. A Java class "
"name embedded in the where clause will be translated to its discriminator "
"value."
msgstr ""
-"同样的,特殊属性<literal>class</literal>在进行多态持久化的情况下被用来存取一"
-"个实例的鉴别值(discriminator value)。 一个嵌入到where子句中的Java类的名字将"
-"被转换为该类的鉴别值。"
+"同样的,特殊属性 <literal>class</literal> 在进行多态持久化的情况下被用来存取"
+"一个实例的鉴别值(discriminator value)。一个嵌入到 where 子句中的 Java 类的"
+"名字将被转换为该类的鉴别值。 "
-#. Tag: programlisting
-#: query_hql.xml:513
-#, no-c-format
-msgid "<![CDATA[from Cat cat where cat.class = DomesticCat]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:515
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You can also use components or composite user types, or properties of said "
-"component types. See <xref linkend=\"queryhql-components\"/> for
more "
+"component types. See <xref linkend=\"queryhql-components\" /> for
more "
"information."
msgstr ""
-"你也可以声明一个属性的类型是组件或者复合用户类型(以及由组件构成的组件等"
-"等)。永远不要尝试使用以组件类型来结尾的路径表达式(path-expression) (与此"
-"相反,你应当使用组件的一个属性来结尾)。 举例来说,如果<literal>store.owner</"
-"literal>含有一个包含了组件的实体<literal>address</literal>"
+"你也可以使用组件或者复合用户类型,以及组件类型的属性。详情请参考 <xref "
+"linkend=\"queryhql-components\" />。"
#. Tag: para
-#: query_hql.xml:520
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"An \"any\" type has the special properties
<literal>id</literal> and "
"<literal>class</literal> that allows you to express a join in the
following "
"way (where <literal>AuditLog.item</literal> is a property mapped with
"
"<literal><any></literal>):"
msgstr ""
-"一个“任意”类型有两个特殊的属性<literal>id</literal>和<literal>class</"
-"literal>, 来允许我们按照下面的方式表达一个连接(<literal>AuditLog.item</"
-"literal>
是一个属性,该属性被映射为<literal><any></literal>)。"
+"一个“任意”类型有两个特殊的属性 <literal>id</literal> 和
<literal>class</"
+"literal>,来允许我们按照下面的方式表达一个连接(<literal>AuditLog.item</"
+"literal> 是一个属性,该属性被映射为 <literal><any></literal>)。
"
-#. Tag: programlisting
-#: query_hql.xml:526
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[from AuditLog log, Payment payment\n"
-"where log.item.class = 'Payment' and log.item.id = payment.id]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:528
-#, fuzzy, no-c-format
-msgid ""
"The <literal>log.item.class</literal> and
<literal>payment.class</literal> "
"would refer to the values of completely different database columns in the "
"above query."
@@ -1043,49 +657,43 @@
"<literal>payment.class</literal> 将涉及到完全不同的数据库中的列。"
#. Tag: title
-#: query_hql.xml:536
#, no-c-format
msgid "Expressions"
msgstr "表达式"
#. Tag: para
-#: query_hql.xml:538
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Expressions used in the <literal>where</literal> clause include the
"
"following:"
msgstr ""
-"在<literal>where</literal>子句中允许使用的表达式包括 大多数你可以在SQL使用的"
-"表达式种类:"
+"在 <literal>where</literal> 子句中允许使用的表达式包括 大多数你可以在 SQL 使"
+"用的表达式种类: "
#. Tag: para
-#: query_hql.xml:545
-#, fuzzy, no-c-format
+#, no-c-format
msgid "mathematical operators: <literal>+, -, *, /</literal>"
-msgstr "数学运算符<literal>+, -, *, /</literal>"
+msgstr "数学运算符 <literal>+,-,*,/</literal> "
#. Tag: para
-#: query_hql.xml:550
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"binary comparison operators: <literal>=, >=, <=,
<>, !=, like</"
"literal>"
-msgstr "二进制比较运算符<literal>=, >=, <=, <>, !=,
like</literal>"
+msgstr ""
+"二进制比较运算符 <literal>=, >=, <=, <>, !=,
like</literal> "
#. Tag: para
-#: query_hql.xml:555
#, no-c-format
msgid "logical operations <literal>and, or, not</literal>"
-msgstr "逻辑运算符<literal>and, or, not</literal>"
+msgstr "逻辑运算符 <literal>and,or,not</literal>"
#. Tag: para
-#: query_hql.xml:560
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Parentheses <literal>( )</literal> that indicates grouping"
-msgstr "Parentheses <literal>( )</literal>, indicating grouping"
+msgstr "括号 <literal>( )</literal>,表示分组 "
#. Tag: para
-#: query_hql.xml:565
#, no-c-format
msgid ""
"<literal>in</literal>, <literal>not in</literal>,
<literal>between</"
@@ -1099,65 +707,59 @@
"<literal>member of</literal> and <literal>not member
of</literal>"
#. Tag: para
-#: query_hql.xml:578
#, no-c-format
msgid ""
"\"Simple\" case, <literal>case ... when ... then ... else ...
end</literal>, "
"and \"searched\" case, <literal>case when ... then ... else ...
end</literal>"
msgstr ""
-"\"简单的\" case, <literal>case ... when ... then ... else ...
end</literal>,"
-"和 \"搜索\" case, <literal>case when ... then ... else ...
end</literal>"
+"\"Simple\" case, <literal>case ... when ... then ... else ...
end</literal>, "
+"and \"searched\" case, <literal>case when ... then ... else ...
end</literal>"
#. Tag: para
-#: query_hql.xml:584
#, no-c-format
msgid ""
"string concatenation <literal>...||...</literal> or
<literal>concat(...,...)"
"</literal>"
msgstr ""
-"字符串连接符<literal>...||...</literal> or
<literal>concat(...,...)</literal>"
+"字符串连接符 <literal>...||...</literal> or
<literal>concat(...,...)</"
+"literal>"
#. Tag: para
-#: query_hql.xml:589
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<literal>current_date()</literal>,
<literal>current_time()</literal>, and "
"<literal>current_timestamp()</literal>"
msgstr ""
-"<literal>current_date()</literal>,
<literal>current_time()</literal>, "
+"<literal>current_date()</literal>,
<literal>current_time()</literal>, and "
"<literal>current_timestamp()</literal>"
#. Tag: para
-#: query_hql.xml:595
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<literal>second(...)</literal>,
<literal>minute(...)</literal>, <literal>hour"
"(...)</literal>, <literal>day(...)</literal>,
<literal>month(...)</literal>, "
"and <literal>year(...)</literal>"
msgstr ""
-"<literal>second(...)</literal>,
<literal>minute(...)</literal>, <literal>hour"
-"(...)</literal>, <literal>day(...)</literal>,
<literal>month(...)</literal>, "
-"<literal>year(...)</literal>,"
+"<literal>second(...)</literal>、<literal>minute(...)</literal>、<literal>hour"
+"(...)</literal>、<literal>day(...)</literal>、<literal>month(...)</literal>
"
+"和 <literal>year(...)</literal>"
#. Tag: para
-#: query_hql.xml:602
#, no-c-format
msgid ""
"Any function or operator defined by EJB-QL 3.0: <literal>substring(),
trim"
"(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()"
"</literal>"
msgstr ""
-"EJB-QL 3.0定义的任何函数或操作:<literal>substring(), trim(), lower(), upper"
-"(), length(), locate(), abs(), sqrt(), bit_length(), mod()</literal>"
+"EJB-QL 3.0 定义的任何功能或操作符:<literal>substring(), trim(), lower(), "
+"upper(), length(), locate(), abs(), sqrt(), bit_length(),
mod()</literal>"
#. Tag: para
-#: query_hql.xml:608
#, no-c-format
msgid "<literal>coalesce()</literal> and
<literal>nullif()</literal>"
msgstr "<literal>coalesce()</literal> 和
<literal>nullif()</literal>"
#. Tag: para
-#: query_hql.xml:613
#, no-c-format
msgid ""
"<literal>str()</literal> for converting numeric or temporal values to a
"
@@ -1165,7 +767,6 @@
msgstr "<literal>str()</literal> 把数字或者时间值转换为可读的字符串"
#. Tag: para
-#: query_hql.xml:619
#, no-c-format
msgid ""
"<literal>cast(... as ...)</literal>, where the second argument is the
name "
@@ -1173,21 +774,19 @@
"<literal>cast()</literal> and <literal>extract()</literal>
is supported by "
"the underlying database"
msgstr ""
-"<literal>cast(... as ...)</literal>, 其第二个参数是某Hibernate类型的名字,以"
-"及<literal>extract(... from ...)</literal>,只要ANSI
<literal>cast()</"
-"literal> 和 <literal>extract()</literal> 被底层数据库支持"
+"<literal>cast(... as ...)</literal>,其第二个参数是某 Hibernate 类型的名字,"
+"以及 <literal>extract(... from ...)</literal>,只要 ANSI
<literal>cast()</"
+"literal> 和 <literal>extract()</literal> 被底层数据库支持"
#. Tag: para
-#: query_hql.xml:627
#, no-c-format
msgid ""
"the HQL <literal>index()</literal> function, that applies to aliases of
a "
"joined indexed collection"
-msgstr "HQL <literal>index()</literal> 函数,作用于join的有序集合的别名。"
+msgstr "HQL <literal>index()</literal> 函数,作用于 join 的有序集合的别名。"
#. Tag: para
-#: query_hql.xml:633
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"HQL functions that take collection-valued path expressions: <literal>size(),
"
"minelement(), maxelement(), minindex(), maxindex()</literal>, along with the
"
@@ -1195,40 +794,36 @@
"functions that can be quantified using <literal>some, all, exists, any,
in</"
"literal>."
msgstr ""
-"HQL函数,把集合作为参数:<literal>size(), minelement(), maxelement(), minindex"
-"(), maxindex()</literal>,还有特别的<literal>elements()</literal>
和"
-"<literal>indices</literal>函数,可以与数量词加以限定:<literal>some, all,
"
-"exists, any, in</literal>。"
+"HQL 函数,把集合作为参数:<literal>size(), minelement(), maxelement(), "
+"minindex(), maxindex()</literal>,还有特别的
<literal>elements()</literal> "
+"和 <literal>indices</literal> 函数,可以与数量词加以限定:<literal>some, "
+"all, exists, any, in</literal>。 "
#. Tag: para
-#: query_hql.xml:641
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Any database-supported SQL scalar function like
<literal>sign()</literal>, "
"<literal>trunc()</literal>, <literal>rtrim()</literal>, and
<literal>sin()</"
"literal>"
msgstr ""
-"任何数据库支持的SQL标量函数,比如<literal>sign()</literal>,
<literal>trunc()"
-"</literal>, <literal>rtrim()</literal>,
<literal>sin()</literal>"
+"任何数据库支持的 SQL 标量函数,比如 <literal>sign()</literal>,
<literal>trunc"
+"()</literal>, <literal>rtrim()</literal>,
<literal>sin()</literal> "
#. Tag: para
-#: query_hql.xml:647
#, no-c-format
msgid "JDBC-style positional parameters <literal>?</literal>"
-msgstr "JDBC风格的参数传入 <literal>?</literal>"
+msgstr "JDBC 风格的参数传入 <literal>?</literal>"
#. Tag: para
-#: query_hql.xml:652
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"named parameters <literal>:name</literal>,
<literal>:start_date</literal>, "
"and <literal>:x1</literal>"
msgstr ""
-"命名参数<literal>:name</literal>,
<literal>:start_date</literal>, <literal>:"
-"x1</literal>"
+"命名参数
<literal>:name</literal>,<literal>:start_date</literal>,<literal>:"
+"x1</literal> "
#. Tag: para
-#: query_hql.xml:657
#, no-c-format
msgid ""
"SQL literals <literal>'foo'</literal>,
<literal>69</literal>, <literal>6.66E"
@@ -1238,7 +833,6 @@
"+2</literal>, <literal>'1970-01-01
10:00:01.0'</literal>"
#. Tag: para
-#: query_hql.xml:663
#, no-c-format
msgid ""
"Java <literal>public static final</literal> constants
<literal>eg.Color."
@@ -1248,117 +842,58 @@
"TABBY</literal>"
#. Tag: para
-#: query_hql.xml:669
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<literal>in</literal> and <literal>between</literal> can be
used as follows:"
msgstr ""
-"关键字<literal>in</literal>与<literal>between</literal>可按如下方法使用:"
+"关键字 <literal>in</literal> 与 <literal>between</literal>
可按如下方法使"
+"用: "
-#. Tag: programlisting
-#: query_hql.xml:673
-#, no-c-format
-msgid "<![CDATA[from DomesticCat cat where cat.name between 'A' and
'B']]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:675
-#, no-c-format
-msgid ""
-"<![CDATA[from DomesticCat cat where cat.name in ( 'Foo', 'Bar',
'Baz' )]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:677
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The negated forms can be written as follows:"
-msgstr "而且否定的格式也可以如下书写:"
+msgstr "而且否定的格式也可以如下书写: "
-#. Tag: programlisting
-#: query_hql.xml:681
+#. Tag: para
#, no-c-format
-msgid "<![CDATA[from DomesticCat cat where cat.name not between 'A' and
'B']]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:683
-#, no-c-format
msgid ""
-"<![CDATA[from DomesticCat cat where cat.name not in ( 'Foo',
'Bar', 'Baz' )]]"
-">"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:685
-#, fuzzy, no-c-format
-msgid ""
"Similarly, <literal>is null</literal> and <literal>is not
null</literal> can "
"be used to test for null values."
msgstr ""
-"同样, 子句<literal>is null</literal>与<literal>is not
null</literal>可以被用"
-"来测试空值(null)."
+"同样,子句 <literal>is null</literal> 与 <literal>is not
null</literal> 可以"
+"被用来测试空值(null)。 "
#. Tag: para
-#: query_hql.xml:690
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Booleans can be easily used in expressions by declaring HQL query "
"substitutions in Hibernate configuration:"
msgstr ""
-"在Hibernate配置文件中声明HQL“查询替代(query substitutions)”之后, 布尔表达"
-"式(Booleans)可以在其他表达式中轻松的使用:"
+"在 Hibernate 配置文件中声明 HQL“查询替代(query substitutions)”之后,布尔表"
+"达式(Booleans)可以在其他表达式中轻松的使用: "
-#. Tag: programlisting
-#: query_hql.xml:695
-#, no-c-format
-msgid ""
-"<![CDATA[<property name=\"hibernate.query.substitutions\">true
1, false 0</"
-"property>]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:697
#, no-c-format
msgid ""
"This will replace the keywords <literal>true</literal> and
<literal>false</"
"literal> with the literals <literal>1</literal> and
<literal>0</literal> in "
"the translated SQL from this HQL:"
msgstr ""
-"系统将该HQL转换为SQL语句时,该设置表明将用字符 <literal>1</literal> 和 "
-"<literal>0</literal> 来 取代关键字<literal>true</literal> 和
<literal>false</"
-"literal>:"
+"系统将该 HQL 转换为 SQL 语句时,该设置表明将用字符 <literal>1</literal> 和 "
+"<literal>0</literal> 来取代关键字 <literal>true</literal> 和
<literal>false</"
+"literal>:"
-#. Tag: programlisting
-#: query_hql.xml:702
-#, no-c-format
-msgid "<![CDATA[from Cat cat where cat.alive = true]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:704
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You can test the size of a collection with the special property "
"<literal>size</literal> or the special
<literal>size()</literal> function."
msgstr ""
-"你可以用特殊属性<literal>size</literal>,
或是特殊函数<literal>size()</"
-"literal>测试一个集合的大小。"
+"你可以用特殊属性 <literal>size</literal>,或是特殊函数
<literal>size()</"
+"literal> 测试一个集合的大小。 "
-#. Tag: programlisting
-#: query_hql.xml:709
-#, no-c-format
-msgid "<![CDATA[from Cat cat where cat.kittens.size > 0]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:711
-#, no-c-format
-msgid "<![CDATA[from Cat cat where size(cat.kittens) > 0]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:713
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"For indexed collections, you can refer to the minimum and maximum indices "
"using <literal>minindex</literal> and
<literal>maxindex</literal> functions. "
@@ -1366,364 +901,155 @@
"of basic type using the <literal>minelement</literal> and "
"<literal>maxelement</literal> functions. For example:"
msgstr ""
-"对于索引了(有序)的集合,你可以使用<literal>minindex</literal> 与 "
-"<literal>maxindex</literal>函数来引用到最小与最大的索引序数。 同理,你可以使"
-"用<literal>minelement</literal> 与
<literal>maxelement</literal>函数来 引用到"
-"一个基本数据类型的集合中最小与最大的元素。"
+"对于索引了(有序)的集合,你可以使用 <literal>minindex</literal> 与 "
+"<literal>maxindex</literal> 函数来引用到最小与最大的索引序数。同理,你可以使"
+"用 <literal>minelement</literal> 与
<literal>maxelement</literal> 函数来引用"
+"到一个基本数据类型的集合中最小与最大的元素。例如:"
-#. Tag: programlisting
-#: query_hql.xml:721
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[from Calendar cal where maxelement(cal.holidays) >
current_date]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:723
-#, no-c-format
-msgid "<![CDATA[from Order order where maxindex(order.items) >
100]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:725
-#, no-c-format
-msgid "<![CDATA[from Order order where minelement(order.items) >
10000]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:727
-#, fuzzy, no-c-format
-msgid ""
"The SQL functions <literal>any, some, all, exists, in</literal> are
"
"supported when passed the element or index set of a collection "
"(<literal>elements</literal> and <literal>indices</literal>
functions) or "
"the result of a subquery (see below):"
msgstr ""
-"在传递一个集合的索引集或者是元素集(<literal>elements</literal>与"
-"<literal>indices</literal> 函数) 或者传递一个子查询的结果的时候,可以使用SQL"
-"函数<literal>any, some, all, exists, in</literal>"
+"在传递一个集合的索引集或者是元素集(<literal>elements</literal> 与 "
+"<literal>indices</literal> 函数)或者传递一个子查询的结果的时候,可以使用 "
+"SQL 函数 <literal>any, some,all, exists, in</literal>:"
-#. Tag: programlisting
-#: query_hql.xml:733
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[select mother from Cat as mother, Cat as kit\n"
-"where kit in elements(foo.kittens)]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:735
-#, no-c-format
-msgid ""
-"<![CDATA[select p from NameList list, Person p\n"
-"where p.name = some elements(list.names)]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:737
-#, no-c-format
-msgid "<![CDATA[from Cat cat where exists elements(cat.kittens)]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:739
-#, no-c-format
-msgid "<![CDATA[from Player p where 3 > all elements(p.scores)]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:741
-#, no-c-format
-msgid "<![CDATA[from Show show where 'fizard' in
indices(show.acts)]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:743
-#, fuzzy, no-c-format
-msgid ""
"Note that these constructs - <literal>size</literal>,
<literal>elements</"
"literal>, <literal>indices</literal>,
<literal>minindex</literal>, "
"<literal>maxindex</literal>, <literal>minelement</literal>,
"
"<literal>maxelement</literal> - can only be used in the where clause in
"
"Hibernate3."
msgstr ""
-"注意,在Hibernate3种,这些结构变量- <literal>size</literal>, "
-"<literal>elements</literal>, <literal>indices</literal>,
<literal>minindex</"
-"literal>, <literal>maxindex</literal>,
<literal>minelement</literal>, "
-"<literal>maxelement</literal> - 只能在where子句中使用。"
+"注意,在 Hibernate3 中,这些结构变量 — <literal>size</literal>,"
+"<literal>elements</literal>,<literal>indices</literal>,<literal>minindex</"
+"literal>,<literal>maxindex</literal>,<literal>minelement</literal>,"
+"<literal>maxelement</literal> — 只能在 where 子句中使用。 "
#. Tag: para
-#: query_hql.xml:750
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Elements of indexed collections (arrays, lists, and maps) can be referred to
"
"by index in a where clause only:"
msgstr ""
-"一个被索引过的(有序的)集合的元素(arrays, lists, maps)可以在其他索引中被引用"
-"(只能在where子句中):"
+"一个被索引过的(有序的)集合的元素(arrays,lists,maps)可以在其他索引中被引"
+"用(只能在 where 子句中): "
-#. Tag: programlisting
-#: query_hql.xml:755
+#. Tag: para
#, no-c-format
-msgid "<![CDATA[from Order order where order.items[0].id = 1234]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:757
-#, no-c-format
msgid ""
-"<![CDATA[select person from Person person, Calendar calendar\n"
-"where calendar.holidays['national day'] = person.birthDay\n"
-" and person.nationality.calendar = calendar]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:759
-#, no-c-format
-msgid ""
-"<![CDATA[select item from Item item, Order order\n"
-"where order.items[ order.deliveredItemIndices[0] ] = item and order.id =
11]]"
-">"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:761
-#, no-c-format
-msgid ""
-"<![CDATA[select item from Item item, Order order\n"
-"where order.items[ maxindex(order.items) ] = item and order.id = 11]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:763
-#, fuzzy, no-c-format
-msgid ""
"The expression inside <literal>[]</literal> can even be an arithmetic
"
"expression:"
-msgstr "在<literal>[]</literal>中的表达式甚至可以是一个算数表达式。"
+msgstr "在 <literal>[]</literal> 中的表达式甚至可以是一个算数表达式:"
-#. Tag: programlisting
-#: query_hql.xml:767
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[select item from Item item, Order order\n"
-"where order.items[ size(order.items) - 1 ] = item]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:769
-#, fuzzy, no-c-format
-msgid ""
"HQL also provides the built-in <literal>index()</literal> function for
"
"elements of a one-to-many association or collection of values."
msgstr ""
-"对于一个一对多的关联(one-to-many association)或是值的集合中的元素, HQL也提"
-"供内建的<literal>index()</literal>函数,"
+"对于一个一对多的关联(one-to-many association)或是值的集合中的元素,HQL 也提"
+"供内建的 <literal>index()</literal> 函数。"
-#. Tag: programlisting
-#: query_hql.xml:774
-#, no-c-format
-msgid ""
-"<![CDATA[select item, index(item) from Order order\n"
-" join order.items item\n"
-"where index(item) < 5]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:776
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Scalar SQL functions supported by the underlying database can be used:"
-msgstr "如果底层数据库支持标量的SQL函数,它们也可以被使用"
+msgstr "如果底层数据库支持标量的 SQL 函数,它们也可以被使用:"
-#. Tag: programlisting
-#: query_hql.xml:780
-#, no-c-format
-msgid "<![CDATA[from DomesticCat cat where upper(cat.name) like
'FRI%']]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:782
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Consider how much longer and less readable the following query would be in "
"SQL:"
msgstr ""
-"如果你还不能对所有的这些深信不疑,想想下面的查询。如果使用SQL,语句长度会增长"
-"多少,可读性会下降多少:"
+"如果你还不能对所有的这些深信不疑,想想下面的查询。如果使用 SQL,语句长度会增"
+"长多少,可读性会下降多少: "
-#. Tag: programlisting
-#: query_hql.xml:787
-#, no-c-format
-msgid ""
-"<![CDATA[select cust\n"
-"from Product prod,\n"
-" Store store\n"
-" inner join store.customers cust\n"
-"where prod.name = 'widget'\n"
-" and store.location.name in ( 'Melbourne', 'Sydney' )\n"
-" and prod = all elements(cust.currentOrder.lineItems)]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:789
#, no-c-format
msgid "<emphasis>Hint:</emphasis> something like"
-msgstr "<emphasis>提示:</emphasis> 会像如下的语句"
+msgstr "<emphasis>提示:</emphasis> 会像如下的语句"
-#. Tag: programlisting
-#: query_hql.xml:793
-#, no-c-format
-msgid ""
-"<![CDATA[SELECT cust.name, cust.address, cust.phone, cust.id, cust."
-"current_order\n"
-"FROM customers cust,\n"
-" stores store,\n"
-" locations loc,\n"
-" store_customers sc,\n"
-" product prod\n"
-"WHERE prod.name = 'widget'\n"
-" AND store.loc_id = loc.id\n"
-" AND loc.name IN ( 'Melbourne', 'Sydney' )\n"
-" AND sc.store_id = store.id\n"
-" AND sc.cust_id = cust.id\n"
-" AND prod.id = ALL(\n"
-" SELECT item.prod_id\n"
-" FROM line_items item, orders o\n"
-" WHERE item.order_id = o.id\n"
-" AND cust.current_order = o.id\n"
-" )]]>"
-msgstr ""
-
#. Tag: title
-#: query_hql.xml:798
#, no-c-format
msgid "The order by clause"
-msgstr "order by子句"
+msgstr "order by 子句"
#. Tag: para
-#: query_hql.xml:800
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The list returned by a query can be ordered by any property of a returned "
"class or components:"
msgstr ""
-"查询返回的列表(list)可以按照一个返回的类或组件(components)中的任何属性"
-"(property)进行排序:"
+"查询返回的列表(list)可以按照一个返回的类或组件(components)中的任何属性"
+"(property)进行排序: "
-#. Tag: programlisting
-#: query_hql.xml:804
-#, no-c-format
-msgid ""
-"<![CDATA[from DomesticCat cat\n"
-"order by cat.name asc, cat.weight desc, cat.birthdate]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:806
#, no-c-format
msgid ""
"The optional <literal>asc</literal> or
<literal>desc</literal> indicate "
"ascending or descending order respectively."
msgstr ""
-"可选的<literal>asc</literal>或<literal>desc</literal>关键字指明了按照升序或降"
-"序进行排序."
+"可选的 <literal>asc</literal> 或 <literal>desc</literal>
关键字指明了按照升序"
+"或降序进行排序。"
#. Tag: title
-#: query_hql.xml:813
#, no-c-format
msgid "The group by clause"
-msgstr "group by子句"
+msgstr "group by 子句"
#. Tag: para
-#: query_hql.xml:815
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"A query that returns aggregate values can be grouped by any property of a "
"returned class or components:"
msgstr ""
-"一个返回聚集值(aggregate values)的查询可以按照一个返回的类或组件(components)"
-"中的任何属性(property)进行分组:"
+"一个返回聚集值(aggregate values)的查询可以按照一个返回的类或组件"
+"(components)中的任何属性(property)进行分组: "
-#. Tag: programlisting
-#: query_hql.xml:819
-#, no-c-format
-msgid ""
-"<![CDATA[select cat.color, sum(cat.weight), count(cat)\n"
-"from Cat cat\n"
-"group by cat.color]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:821
-#, no-c-format
-msgid ""
-"<![CDATA[select foo.id, avg(name), max(name)\n"
-"from Foo foo join foo.names name\n"
-"group by foo.id]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:823
#, no-c-format
msgid "A <literal>having</literal> clause is also allowed."
-msgstr "<literal>having</literal>子句在这里也允许使用."
+msgstr "<literal>having</literal> 子句在这里也允许使用。"
-#. Tag: programlisting
-#: query_hql.xml:827
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[select cat.color, sum(cat.weight), count(cat)\n"
-"from Cat cat\n"
-"group by cat.color\n"
-"having cat.color in (eg.Color.TABBY, eg.Color.BLACK)]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:829
-#, fuzzy, no-c-format
-msgid ""
"SQL functions and aggregate functions are allowed in the
<literal>having</"
"literal> and <literal>order by</literal> clauses if they are
supported by "
"the underlying database (i.e., not in MySQL)."
msgstr ""
-"如果底层的数据库支持的话(例如不能在MySQL中使用),SQL的一般函数与聚集函数也可"
-"以出现 在<literal>having</literal>与<literal>order by</literal>
子句中。"
+"如果底层的数据库支持的话(例如不能在 MySQL 中使用),SQL 的一般函数与聚集函数"
+"也可以出现在 <literal>having</literal> 与 <literal>order
by</literal> 子句"
+"中。 "
-#. Tag: programlisting
-#: query_hql.xml:835
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[select cat\n"
-"from Cat cat\n"
-" join cat.kittens kitten\n"
-"group by cat.id, cat.name, cat.other, cat.properties\n"
-"having avg(kitten.weight) > 100\n"
-"order by count(kitten) asc, sum(kitten.weight) desc]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:837
-#, fuzzy, no-c-format
-msgid ""
"Neither the <literal>group by</literal> clause nor the
<literal>order by</"
"literal> clause can contain arithmetic expressions. Hibernate also does not
"
"currently expand a grouped entity, so you cannot write <literal>group by
"
"cat</literal> if all properties of <literal>cat</literal> are
non-"
"aggregated. You have to list all non-aggregated properties explicitly."
msgstr ""
-"注意<literal>group by</literal>子句与 <literal>order
by</literal>子句中都不能"
-"包含算术表达式(arithmetic expressions). 也要注意Hibernate目前不会扩展group"
-"的实体,因此你不能写<literal>group by
cat</literal>,除非<literal>cat</literal>"
-"的所有属性都不是聚集的(non-aggregated)。你必须明确的列出所有的非聚集属性。"
+"注意 <literal>group by</literal> 子句与 <literal>order
by</literal> 子句中都"
+"不能包含算术表达式(arithmetic expressions)。也要注意 Hibernate 目前不会扩"
+"展 group 的实体,因此你不能写 <literal>group by cat</literal>,除非 "
+"<literal>cat</literal> 的所有属性都不是聚集的(non-aggregated)。你必须明确的"
+"列出所有的非聚集属性。 "
#. Tag: title
-#: query_hql.xml:849
#, no-c-format
msgid "Subqueries"
msgstr "子查询"
#. Tag: para
-#: query_hql.xml:851
#, no-c-format
msgid ""
"For databases that support subselects, Hibernate supports subqueries within "
@@ -1731,83 +1057,32 @@
"aggregate function call). Even correlated subqueries (subqueries that refer "
"to an alias in the outer query) are allowed."
msgstr ""
-"对于支持子查询的数据库,Hibernate支持在查询中使用子查询。一个子查询必须被圆括"
-"号包围起来(经常是SQL聚集函数的圆括号)。 甚至相互关联的子查询(引用到外部查"
-"询中的别名的子查询)也是允许的。"
+"对于支持子查询的数据库,Hibernate 支持在查询中使用子查询。一个子查询必须被圆"
+"括号包围起来(经常是 SQL 聚集函数的圆括号)。甚至相互关联的子查询(引用到外部"
+"查询中的别名的子查询)也是允许的。"
-#. Tag: programlisting
-#: query_hql.xml:857
-#, no-c-format
-msgid ""
-"<![CDATA[from Cat as fatcat\n"
-"where fatcat.weight > (\n"
-" select avg(cat.weight) from DomesticCat cat\n"
-")]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:859
-#, no-c-format
-msgid ""
-"<![CDATA[from DomesticCat as cat\n"
-"where cat.name = some (\n"
-" select name.nickName from Name as name\n"
-")]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:861
-#, no-c-format
-msgid ""
-"<![CDATA[from Cat as cat\n"
-"where not exists (\n"
-" from Cat as mate where mate.mate = cat\n"
-")]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:863
-#, no-c-format
-msgid ""
-"<![CDATA[from DomesticCat as cat\n"
-"where cat.name not in (\n"
-" select name.nickName from Name as name\n"
-")]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:865
-#, no-c-format
-msgid ""
-"<![CDATA[select cat.id, (select max(kit.weight) from cat.kitten kit)\n"
-"from Cat as cat]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:867
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Note that HQL subqueries can occur only in the select or where
clauses."
-msgstr "注意,HQL自查询只可以在select或者where子句中出现。"
+msgstr "注意,HQL 自查询只可以在 select 或者 where 子句中出现。 "
#. Tag: para
-#: query_hql.xml:871
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Note that subqueries can also utilize <literal>row value
constructor</"
-"literal> syntax. See <xref linkend=\"queryhql-tuple\"/> for more
information."
+"literal> syntax. See <xref linkend=\"queryhql-tuple\" /> for
more "
+"information."
msgstr ""
-"Note that subqueries can also utilize <literal>row value
constructor</"
-"literal> syntax. See <xref linkend=\"queryhql-tuple\"/> for more
details."
+"注意子查询也可以利用 <literal>row value constructor</literal> 语法。请参考 "
+"<xref linkend=\"queryhql-tuple\" /> 来获得详情。 "
#. Tag: title
-#: query_hql.xml:879
#, no-c-format
msgid "HQL examples"
-msgstr "HQL示例"
+msgstr "HQL 示例 "
#. Tag: para
-#: query_hql.xml:881
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hibernate queries can be quite powerful and complex. In fact, the power of "
"the query language is one of Hibernate's main strengths. The following "
@@ -1815,13 +1090,12 @@
"projects. Please note that most queries you will write will be much simpler "
"than the following examples."
msgstr ""
-"Hibernate查询可以非常的强大与复杂。实际上,Hibernate的一个主要卖点就是查询语"
-"句的威力。这里有一些例子,它们与我在最近的 一个项目中使用的查询非常相似。注意"
-"你能用到的大多数查询比这些要简单的多!"
+"Hibernate 查询可以非常的强大与复杂。实际上,Hibernate 的一个主要卖点就是查询"
+"语句的威力。这里有一些例子,它们与我在最近的一个项目中使用的查询非常相似。注"
+"意你能用到的大多数查询比这些要简单的多。"
#. Tag: para
-#: query_hql.xml:887
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The following query returns the order id, number of items, the given minimum
"
"total value and the total value of the order for all unpaid orders for a "
@@ -1832,37 +1106,12 @@
"literal> tables has four inner joins and an (uncorrelated) subselect."
msgstr ""
"下面的查询对于某个特定的客户的所有未支付的账单,在给定给最小总价值的情况下,"
-"返回订单的id,条目的数量和总价值, 返回值按照总价值的结果进行排序。为了决定价"
-"格,查询使用了当前目录。作为转换结果的SQL查询,使用了<literal>ORDER</"
-"literal>, <literal>ORDER_LINE</literal>,
<literal>PRODUCT</literal>, "
-"<literal>CATALOG</literal> 和<literal>PRICE</literal>
库表。"
+"返回订单的 id,条目的数量和总价值,返回值按照总价值的结果进行排序。为了决定价"
+"格,查询使用了当前目录。作为转换结果的 SQL 查询,使用了<literal>ORDER</"
+"literal>,<literal>ORDER_LINE</literal>,<literal>PRODUCT</literal>,"
+"<literal>CATALOG</literal> 和 <literal>PRICE</literal>
库表。"
-#. Tag: programlisting
-#: query_hql.xml:896
-#, no-c-format
-msgid ""
-"<![CDATA[select order.id, sum(price.amount), count(item)\n"
-"from Order as order\n"
-" join order.lineItems as item\n"
-" join item.product as product,\n"
-" Catalog as catalog\n"
-" join catalog.prices as price\n"
-"where order.paid = false\n"
-" and order.customer = :customer\n"
-" and price.product = product\n"
-" and catalog.effectiveDate < sysdate\n"
-" and catalog.effectiveDate >= all (\n"
-" select cat.effectiveDate\n"
-" from Catalog as cat\n"
-" where cat.effectiveDate < sysdate\n"
-" )\n"
-"group by order\n"
-"having sum(price.amount) > :minAmount\n"
-"order by sum(price.amount) desc]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:898
#, no-c-format
msgid ""
"What a monster! Actually, in real life, I'm not very keen on subqueries, so
"
@@ -1871,27 +1120,7 @@
"这简直是一个怪物!实际上,在现实生活中,我并不热衷于子查询,所以我的查询语句"
"看起来更像这个:"
-#. Tag: programlisting
-#: query_hql.xml:903
-#, no-c-format
-msgid ""
-"<![CDATA[select order.id, sum(price.amount), count(item)\n"
-"from Order as order\n"
-" join order.lineItems as item\n"
-" join item.product as product,\n"
-" Catalog as catalog\n"
-" join catalog.prices as price\n"
-"where order.paid = false\n"
-" and order.customer = :customer\n"
-" and price.product = product\n"
-" and catalog = :currentCatalog\n"
-"group by order\n"
-"having sum(price.amount) > :minAmount\n"
-"order by sum(price.amount) desc]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:905
#, no-c-format
msgid ""
"The next query counts the number of payments in each status, excluding all "
@@ -1901,59 +1130,22 @@
"<literal>PAYMENT</literal>,
<literal>PAYMENT_STATUS</literal> and "
"<literal>PAYMENT_STATUS_CHANGE</literal> tables."
msgstr ""
-"下面一个查询计算每一种状态下的支付的数目,除去所有处于"
-"<literal>AWAITING_APPROVAL</literal>状态的支付,因为在该状态下 当前的用户作出"
-"了状态的最新改变。该查询被转换成含有两个内连接以及一个相关联的子选择的SQL查"
-"询,该查询使用了表 <literal>PAYMENT</literal>,
<literal>PAYMENT_STATUS</"
-"literal> 以及 <literal>PAYMENT_STATUS_CHANGE</literal>。"
+"下面一个查询计算每一种状态下的支付的数目,除去所有处于 "
+"<literal>AWAITING_APPROVAL</literal> 状态的支付,因为在该状态下 当前的用户作"
+"出了状态的最新改变。该查询被转换成含有两个内连接以及一个相关联的子选择的 SQL "
+"查询,该查询使用了表
<literal>PAYMENT</literal>,<literal>PAYMENT_STATUS</"
+"literal> 以及 <literal>PAYMENT_STATUS_CHANGE</literal>。"
-#. Tag: programlisting
-#: query_hql.xml:913
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[select count(payment), status.name\n"
-"from Payment as payment\n"
-" join payment.currentStatus as status\n"
-" join payment.statusChanges as statusChange\n"
-"where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
-" or (\n"
-" statusChange.timeStamp = (\n"
-" select max(change.timeStamp)\n"
-" from PaymentStatusChange change\n"
-" where change.payment = payment\n"
-" )\n"
-" and statusChange.user <> :currentUser\n"
-" )\n"
-"group by status.name, status.sortOrder\n"
-"order by status.sortOrder]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:915
-#, fuzzy, no-c-format
-msgid ""
"If the <literal>statusChanges</literal> collection was mapped as a
list, "
"instead of a set, the query would have been much simpler to write."
msgstr ""
-"如果我把<literal>statusChanges</literal>实例集映射为一个列表(list)而不是一"
-"个集合(set), 书写查询语句将更加简单."
+"如果我把 <literal>statusChanges</literal> 实例集映射为一个列表(list)而不是"
+"一个集合(set),书写查询语句将更加简单。 "
-#. Tag: programlisting
-#: query_hql.xml:920
-#, no-c-format
-msgid ""
-"<![CDATA[select count(payment), status.name\n"
-"from Payment as payment\n"
-" join payment.currentStatus as status\n"
-"where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
-" or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <>
:"
-"currentUser\n"
-"group by status.name, status.sortOrder\n"
-"order by status.sortOrder]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:922
#, no-c-format
msgid ""
"The next query uses the MS SQL Server <literal>isNull()</literal>
function "
@@ -1964,305 +1156,142 @@
"<literal>ACCOUNT_TYPE</literal>,
<literal>ORGANIZATION</literal> and "
"<literal>ORG_USER</literal> tables."
msgstr ""
-"下面一个查询使用了MS SQL Server的 <literal>isNull()</literal>函数用以返回当前"
-"用户所属组织的组织帐号及组织未支付的账。 它被转换成一个对表<literal>ACCOUNT</"
-"literal>, <literal>PAYMENT</literal>,
<literal>PAYMENT_STATUS</literal>, "
-"<literal>ACCOUNT_TYPE</literal>,
<literal>ORGANIZATION</literal> 以及 "
-"<literal>ORG_USER</literal>进行的三个内连接, 一个外连接和一个子选择的SQL查"
-"询。"
+"下面一个查询使用了 MS SQL Server 的 <literal>isNull()</literal> 函数用以返回"
+"当前用户所属组织的组织帐号及组织未支付的账。它被转换成一个对表 "
+"<literal>ACCOUNT</literal>,<literal>PAYMENT</literal>,"
+"<literal>PAYMENT_STATUS</literal>,<literal>ACCOUNT_TYPE</literal>,"
+"<literal>ORGANIZATION</literal> 以及
<literal>ORG_USER</literal> 进行的三个"
+"内连接,一个外连接和一个子选择的 SQL 查询。"
-#. Tag: programlisting
-#: query_hql.xml:931
-#, no-c-format
-msgid ""
-"<![CDATA[select account, payment\n"
-"from Account as account\n"
-" left outer join account.payments as payment\n"
-"where :currentUser in elements(account.holder.users)\n"
-" and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
-"PaymentStatus.UNPAID)\n"
-"order by account.type.sortOrder, account.accountNumber,
payment.dueDate]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:933
#, no-c-format
msgid ""
"For some databases, we would need to do away with the (correlated)
subselect."
msgstr "对于一些数据库,我们需要弃用(相关的)子选择。"
-#. Tag: programlisting
-#: query_hql.xml:937
-#, no-c-format
-msgid ""
-"<![CDATA[select account, payment\n"
-"from Account as account\n"
-" join account.holder.users as user\n"
-" left outer join account.payments as payment\n"
-"where :currentUser = user\n"
-" and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
-"PaymentStatus.UNPAID)\n"
-"order by account.type.sortOrder, account.accountNumber,
payment.dueDate]]>"
-msgstr ""
-
#. Tag: title
-#: query_hql.xml:942
#, no-c-format
msgid "Bulk update and delete"
-msgstr "批量的UPDATE和DELETE"
+msgstr "批量的 UPDATE 和 DELETE"
#. Tag: para
-#: query_hql.xml:944
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"HQL now supports <literal>update</literal>,
<literal>delete</literal> and "
"<literal>insert ... select ...</literal> statements. See <xref
linkend="
-"\"batch-direct\"/> for more information."
+"\"batch-direct\" /> for more information."
msgstr ""
-"HQL现在支持 <literal>update</literal>,
<literal>delete</literal> 和 "
-"<literal>insert ... select ...</literal>语句. 查阅 <xref
linkend=\"batch-"
-"direct\"/> 以获得更多信息。"
+"HQL 现在支持
<literal>update</literal>,<literal>delete</literal> 和 "
+"<literal>insert ... select ...</literal>语句。查阅 <xref
linkend=\"batch-"
+"direct\" /> 以获得更多信息。"
#. Tag: title
-#: query_hql.xml:952
#, no-c-format
msgid "Tips & Tricks"
msgstr "小技巧 & 小窍门"
#. Tag: para
-#: query_hql.xml:954
-#, fuzzy, no-c-format
+#, no-c-format
msgid "You can count the number of query results without returning them:"
-msgstr "你可以统计查询结果的数目而不必实际的返回他们:"
+msgstr "你可以统计查询结果的数目而不必实际的返回他们: "
-#. Tag: programlisting
-#: query_hql.xml:958
-#, no-c-format
-msgid ""
-"<![CDATA[( (Integer) session.createQuery(\"select count(*) from
....\")."
-"iterate().next() ).intValue()]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:960
#, no-c-format
msgid "To order a result by the size of a collection, use the following
query:"
msgstr "若想根据一个集合的大小来进行排序,可以使用如下的语句:"
-#. Tag: programlisting
-#: query_hql.xml:964
-#, no-c-format
-msgid ""
-"<![CDATA[select usr.id, usr.name\n"
-"from User as usr\n"
-" left join usr.messages as msg\n"
-"group by usr.id, usr.name\n"
-"order by count(msg)]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:966
#, no-c-format
msgid ""
"If your database supports subselects, you can place a condition upon "
"selection size in the where clause of your query:"
msgstr ""
-"如果你的数据库支持子选择,你可以在你的查询的where子句中为选择的大小"
-"(selection size)指定一个条件:"
+"如果你的数据库支持子选择,你可以在你的查询的 where 子句中为选择的大小"
+"(selection size)指定一个条件:"
-#. Tag: programlisting
-#: query_hql.xml:971
-#, no-c-format
-msgid "<![CDATA[from User usr where size(usr.messages) >= 1]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:973
-#, fuzzy, no-c-format
+#, no-c-format
msgid "If your database does not support subselects, use the following query:"
-msgstr "如果你的数据库不支持子选择语句,使用下面的查询:"
+msgstr "如果你的数据库不支持子选择语句,使用下面的查询: "
-#. Tag: programlisting
-#: query_hql.xml:977
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[select usr.id, usr.name\n"
-"from User usr.name\n"
-" join usr.messages msg\n"
-"group by usr.id, usr.name\n"
-"having count(msg) >= 1]]>"
-msgstr ""
-
-#. Tag: para
-#: query_hql.xml:980
-#, fuzzy, no-c-format
-msgid ""
"As this solution cannot return a <literal>User</literal> with zero
messages "
"because of the inner join, the following form is also useful:"
msgstr ""
-"因为内连接(inner join)的原因,这个解决方案不能返回含有零个信息的"
-"<literal>User</literal> 类的实例, 所以这种情况下使用下面的格式将是有帮助的:"
+"因为内连接(inner join)的原因,这个解决方案不能返回含有零个信息的 "
+"<literal>User</literal> 类的实例,所以这种情况下使用下面的格式将是有帮助的: "
-#. Tag: programlisting
-#: query_hql.xml:985
-#, no-c-format
-msgid ""
-"<![CDATA[select usr.id, usr.name\n"
-"from User as usr\n"
-" left join usr.messages as msg\n"
-"group by usr.id, usr.name\n"
-"having count(msg) = 0]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:987
#, no-c-format
msgid "Properties of a JavaBean can be bound to named query parameters:"
-msgstr "JavaBean的属性可以被绑定到一个命名查询(named query)的参数上:"
+msgstr "JavaBean 的属性可以被绑定到一个命名查询(named query)的参数上:"
-#. Tag: programlisting
-#: query_hql.xml:991
-#, no-c-format
-msgid ""
-"<![CDATA[Query q = s.createQuery(\"from foo Foo as foo where foo.name=:name
"
-"and foo.size=:size\");\n"
-"q.setProperties(fooBean); // fooBean has getName() and getSize()\n"
-"List foos = q.list();]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:993
#, no-c-format
msgid ""
"Collections are pageable by using the <literal>Query</literal>
interface "
"with a filter:"
msgstr ""
-"通过将接口<literal>Query</literal>与一个过滤器(filter)一起使用,集合"
+"通过将接口 <literal>Query</literal> 与一个过滤器(filter)一起使用,集合"
"(Collections)是可以分页的:"
-#. Tag: programlisting
-#: query_hql.xml:997
-#, no-c-format
-msgid ""
-"<![CDATA[Query q = s.createFilter( collection, \"\" ); // the trivial
"
-"filter\n"
-"q.setMaxResults(PAGE_SIZE);\n"
-"q.setFirstResult(PAGE_SIZE * pageNumber);\n"
-"List page = q.list();]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:999
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Collection elements can be ordered or grouped using a query filter:"
msgstr ""
-"通过使用查询过滤器(query filter)可以将集合(Collection)的原素分组或排序:"
+"通过使用查询过滤器(query filter)可以将集合(Collection)的元素分组或排序: "
-#. Tag: programlisting
-#: query_hql.xml:1003
-#, no-c-format
-msgid ""
-"<![CDATA[Collection orderedCollection = s.filter( collection, \"order by
"
-"this.amount\" );\n"
-"Collection counts = s.filter( collection, \"select this.type, count(this)
"
-"group by this.type\" );]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:1005
#, no-c-format
msgid "You can find the size of a collection without initializing it:"
msgstr "不用通过初始化,你就可以知道一个集合(Collection)的大小:"
-#. Tag: programlisting
-#: query_hql.xml:1009
-#, no-c-format
-msgid ""
-"<![CDATA[( (Integer) session.createQuery(\"select count(*) from
....\")."
-"iterate().next() ).intValue();]]>"
-msgstr ""
-
#. Tag: title
-#: query_hql.xml:1014
#, no-c-format
msgid "Components"
-msgstr "translator-credits"
+msgstr "组件"
#. Tag: para
-#: query_hql.xml:1016
#, no-c-format
msgid ""
"Components can be used similarly to the simple value types that are used in "
"HQL queries. They can appear in the <literal>select</literal> clause as
"
"follows:"
msgstr ""
+"在 HQL 查询里,组件可以和简单值类型一样使用。它们可以出现在 <literal>select</"
+"literal> 子句里: "
-#. Tag: programlisting
-#: query_hql.xml:1021 query_hql.xml:1067
-#, no-c-format
-msgid "<![CDATA[select p.name from Person p]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:1022
-#, no-c-format
-msgid "<![CDATA[select p.name.first from Person p]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:1024
#, no-c-format
msgid ""
"where the Person's name property is a component. Components can also be used
"
"in the <literal>where</literal> clause:"
msgstr ""
+"在这里,Person 的 name 属性是一个组件。组件也可以用在 <literal>where</"
+"literal> 子句里:"
-#. Tag: programlisting
-#: query_hql.xml:1029
-#, no-c-format
-msgid "<![CDATA[from Person p where p.name = :name]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:1030
-#, no-c-format
-msgid "<![CDATA[from Person p where p.name.first = :firstName]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:1032
#, no-c-format
msgid "Components can also be used in the <literal>order by</literal>
clause:"
-msgstr ""
+msgstr "组件也可以用在 <literal>order by</literal> 子句里:"
-#. Tag: programlisting
-#: query_hql.xml:1036
-#, no-c-format
-msgid "<![CDATA[from Person p order by p.name]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: query_hql.xml:1037
-#, no-c-format
-msgid "<![CDATA[from Person p order by p.name.first]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:1039
-#, no-c-format
+#, fuzzy, no-c-format
msgid ""
-"Another common use of components is in <link
linkend=\"queryhql-tuple\">row "
-"value constructors</link>."
+"Another common use of components is in row value constructors (<xref
linkend="
+"\"queryhql-tuple\" />)."
msgstr ""
+"组件的另外一个常见用法是在 <xref linkend=\"queryhql-tuple\" /> 行值(row "
+"value)构造函数里。"
#. Tag: title
-#: query_hql.xml:1045
#, no-c-format
msgid "Row value constructor syntax"
-msgstr ""
+msgstr "Row value 构造函数语法"
#. Tag: para
-#: query_hql.xml:1047
#, no-c-format
msgid ""
"HQL supports the use of ANSI SQL <literal>row value
constructor</literal> "
@@ -2271,71 +1300,974 @@
"generally referring to multi-valued comparisons, typically associated with "
"components. Consider an entity Person which defines a name component:"
msgstr ""
+"HQL 支持 ANSI SQL <literal>row value constructor</literal> 语法(有时也叫作
"
+"<literal>tuple</literal> 语法),即使底层数据库可能不支持这个概念。在这里我们"
+"通常指的是多值(multi-valued)的比较,典型地是和组件相关联。来看看一个定义了 "
+"name 组件的实体 Person:"
-#. Tag: programlisting
-#: query_hql.xml:1054
-#, no-c-format
-msgid ""
-"<![CDATA[from Person p where p.name.first='John' and p.name."
-"last='Jingleheimer-Schmidt']]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:1056
#, no-c-format
msgid ""
"That is valid syntax although it is a little verbose. You can make this more
"
"concise by using <literal>row value constructor</literal>
syntax:"
msgstr ""
+"那是有效的语法,虽然有点冗长。我们可以使它更加简洁一点,并使用 <literal>row "
+"value constructor</literal> 语法: "
-#. Tag: programlisting
-#: query_hql.xml:1061
-#, no-c-format
-msgid "<![CDATA[from Person p where p.name=('John',
'Jingleheimer-Schmidt')]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:1063
#, no-c-format
msgid ""
"It can also be useful to specify this in the <literal>select</literal>
"
"clause:"
-msgstr ""
+msgstr "在 <literal>select</literal> 子句里指定这个也是很有用的:"
#. Tag: para
-#: query_hql.xml:1069
#, no-c-format
msgid ""
"Using <literal>row value constructor</literal> syntax can also be
beneficial "
"when using subqueries that need to compare against multiple values:"
msgstr ""
+"当使用需要比较多个值的子查询时,采用 <literal>row value constructor</"
+"literal> 语法也很有用处: "
-#. Tag: programlisting
-#: query_hql.xml:1074
-#, no-c-format
-msgid ""
-"<![CDATA[from Cat as cat\n"
-"where not ( cat.name, cat.color ) in (\n"
-" select cat.name, cat.color from DomesticCat cat\n"
-")]]>"
-msgstr ""
-
#. Tag: para
-#: query_hql.xml:1076
#, no-c-format
msgid ""
"One thing to consider when deciding if you want to use this syntax, is that "
"the query will be dependent upon the ordering of the component sub-"
"properties in the metadata."
msgstr ""
+"决定是否使用这个语法的一件因素就是:这个查询将依赖于元数据里的组件子属性"
+"(sub-properties)的顺序。 "
+#, fuzzy
+#~ msgid "<![CDATA[from eg.Cat]]>"
+#~ msgstr "from eg.Cat"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat as cat]]>"
+#~ msgstr "from Cat as cat"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat cat]]>"
+#~ msgstr "from Cat cat"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Formula, Parameter]]>"
+#~ msgstr "from Formula, Parameter"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Formula as form, Parameter as param]]>"
+#~ msgstr "from Formula as form, Parameter as param"
+
+#, fuzzy
#~ msgid ""
-#~ "Most of the time, you will need to assign an
<emphasis>alias</emphasis>, "
-#~ "since you will want to refer to the <literal>Cat</literal> in other
parts "
-#~ "of the query."
+#~ "<![CDATA[from Cat as cat\n"
+#~ " inner join cat.mate as mate\n"
+#~ " left outer join cat.kittens as kitten]]>"
#~ msgstr ""
-#~ "大多数情况下, 你需要指定一个<emphasis>别名</emphasis>, 原因是你可能需要 在"
-#~ "查询语句的其它部分引用到<literal>Cat</literal>"
+#~ "from Cat as cat\n"
+#~ " inner join cat.mate as mate\n"
+#~ " left outer join cat.kittens as kitten"
-#~ msgid "or as an actual typesafe Java object,"
-#~ msgstr "也可能直接返回一个实际的类型安全的Java对象,"
+#, fuzzy
+#~ msgid "<![CDATA[from Cat as cat left join cat.mate.kittens as
kittens]]>"
+#~ msgstr "from Cat as cat left join cat.mate.kittens as kittens"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Formula form full join form.parameter param]]>"
+#~ msgstr "from Formula form full join form.parameter param"
+
+#~ msgid "inner join"
+#~ msgstr "<literal>inner join</literal>(内连接)"
+
+#~ msgid "left outer join"
+#~ msgstr "<literal>left outer join</literal>(左外连接)"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Cat as cat\n"
+#~ " join cat.mate as mate\n"
+#~ " left join cat.kittens as kitten]]>"
+#~ msgstr ""
+#~ "from Cat as cat\n"
+#~ " join cat.mate as mate\n"
+#~ " left join cat.kittens as kitten"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Cat as cat\n"
+#~ " left join cat.kittens as kitten\n"
+#~ " with kitten.bodyWeight > 10.0]]>"
+#~ msgstr ""
+#~ "from Cat as cat\n"
+#~ " left join cat.kittens as kitten\n"
+#~ " with kitten.bodyWeight > 10.0"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Cat as cat\n"
+#~ " inner join fetch cat.mate\n"
+#~ " left join fetch cat.kittens]]>"
+#~ msgstr ""
+#~ "from Cat as cat\n"
+#~ " inner join fetch cat.mate\n"
+#~ " left join fetch cat.kittens"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Cat as cat\n"
+#~ " inner join fetch cat.mate\n"
+#~ " left join fetch cat.kittens child\n"
+#~ " left join fetch child.kittens]]>"
+#~ msgstr ""
+#~ "from Cat as cat\n"
+#~ " inner join fetch cat.mate\n"
+#~ " left join fetch cat.kittens child\n"
+#~ " left join fetch child.kittens"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Document fetch all properties order by name]]>"
+#~ msgstr "from Document fetch all properties order by name"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Document doc fetch all properties where lower(doc.name) "
+#~ "like '%cats%']]>"
+#~ msgstr ""
+#~ "from Document doc fetch all properties where lower(doc.name) like
'%"
+#~ "cats%'"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat as cat where cat.mate.name like
'%s%']]>"
+#~ msgstr "from Cat as cat where cat.mate.name like
'%s%'"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select mate\n"
+#~ "from Cat as cat\n"
+#~ " inner join cat.mate as mate]]>"
+#~ msgstr ""
+#~ "select mate\n"
+#~ "from Cat as cat\n"
+#~ " inner join cat.mate as mate"
+
+#, fuzzy
+#~ msgid "<![CDATA[select cat.mate from Cat cat]]>"
+#~ msgstr "select cat.mate from Cat cat"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select cat.name from DomesticCat cat\n"
+#~ "where cat.name like 'fri%']]>"
+#~ msgstr ""
+#~ "select cat.name from DomesticCat cat\n"
+#~ "where cat.name like 'fri%'"
+
+#, fuzzy
+#~ msgid "<![CDATA[select cust.name.firstName from Customer as cust]]>"
+#~ msgstr "select cust.name.firstName from Customer as cust"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select mother, offspr, mate.name\n"
+#~ "from DomesticCat as mother\n"
+#~ " inner join mother.mate as mate\n"
+#~ " left outer join mother.kittens as offspr]]>"
+#~ msgstr ""
+#~ "select mother, offspr, mate.name\n"
+#~ "from DomesticCat as mother\n"
+#~ " inner join mother.mate as mate\n"
+#~ " left outer join mother.kittens as offspr"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select new list(mother, offspr, mate.name)\n"
+#~ "from DomesticCat as mother\n"
+#~ " inner join mother.mate as mate\n"
+#~ " left outer join mother.kittens as offspr]]>"
+#~ msgstr ""
+#~ "select new list(mother, offspr, mate.name)\n"
+#~ "from DomesticCat as mother\n"
+#~ " inner join mother.mate as mate\n"
+#~ " left outer join mother.kittens as offspr"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select new Family(mother, mate, offspr)\n"
+#~ "from DomesticCat as mother\n"
+#~ " join mother.mate as mate\n"
+#~ " left join mother.kittens as offspr]]>"
+#~ msgstr ""
+#~ "select new Family(mother, mate, offspr)\n"
+#~ "from DomesticCat as mother\n"
+#~ " join mother.mate as mate\n"
+#~ " left join mother.kittens as offspr"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select max(bodyWeight) as max, min(bodyWeight) as min, count(*)
"
+#~ "as n\n"
+#~ "from Cat cat]]>"
+#~ msgstr ""
+#~ "select max(bodyWeight) as max, min(bodyWeight) as min, count(*) as n\n"
+#~ "from Cat cat"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select new map( max(bodyWeight) as max, min(bodyWeight) as min,
"
+#~ "count(*) as n )\n"
+#~ "from Cat cat]]>"
+#~ msgstr ""
+#~ "select new map( max(bodyWeight) as max, min(bodyWeight) as min, count(*) "
+#~ "as n )\n"
+#~ "from Cat cat"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select avg(cat.weight), sum(cat.weight), max(cat.weight),
count"
+#~ "(cat)\n"
+#~ "from Cat cat]]>"
+#~ msgstr ""
+#~ "select avg(cat.weight), sum(cat.weight), max(cat.weight), count(cat)\n"
+#~ "from Cat cat"
+
+#~ msgid "count(*)"
+#~ msgstr "count(*)"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select cat.weight + sum(kitten.weight)\n"
+#~ "from Cat cat\n"
+#~ " join cat.kittens kitten\n"
+#~ "group by cat.id, cat.weight]]>"
+#~ msgstr ""
+#~ "select cat.weight + sum(kitten.weight)\n"
+#~ "from Cat cat\n"
+#~ " join cat.kittens kitten\n"
+#~ "group by cat.id, cat.weight"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select firstName||' '||initial||' '||upper(lastName)
from "
+#~ "Person]]>"
+#~ msgstr "select firstName||' '||initial||' '||upper(lastName) from
Person"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select distinct cat.name from Cat cat\n"
+#~ "\n"
+#~ "select count(distinct cat.name), count(cat) from Cat cat]]>"
+#~ msgstr ""
+#~ "select distinct cat.name from Cat cat\n"
+#~ "\n"
+#~ "select count(distinct cat.name), count(cat) from Cat cat"
+
+#, fuzzy
+#~ msgid "<![CDATA[from java.lang.Object o]]>"
+#~ msgstr "from java.lang.Object o"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Named n, Named m where n.name = m.name]]>"
+#~ msgstr "from Named n, Named m where n.name = m.name"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat where name='Fritz']]>"
+#~ msgstr "from Cat where name='Fritz'"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat as cat where cat.name='Fritz']]>"
+#~ msgstr "from Cat as cat where cat.name='Fritz'"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select foo\n"
+#~ "from Foo foo, Bar bar\n"
+#~ "where foo.startDate = bar.date]]>"
+#~ msgstr ""
+#~ "select foo\n"
+#~ "from Foo foo, Bar bar\n"
+#~ "where foo.startDate = bar.date"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat cat where cat.mate.name is not null]]>"
+#~ msgstr "from Cat cat where cat.mate.name is not null"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Foo foo\n"
+#~ "where foo.bar.baz.customer.address.city is not null]]>"
+#~ msgstr ""
+#~ "from Foo foo\n"
+#~ "where foo.bar.baz.customer.address.city is not null"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat cat, Cat rival where cat.mate =
rival.mate]]>"
+#~ msgstr "from Cat cat, Cat rival where cat.mate = rival.mate"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select cat, mate\n"
+#~ "from Cat cat, Cat mate\n"
+#~ "where cat.mate = mate]]>"
+#~ msgstr ""
+#~ "select cat, mate\n"
+#~ "from Cat cat, Cat mate\n"
+#~ "where cat.mate = mate"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Cat as cat where cat.id = 123\n"
+#~ "\n"
+#~ "from Cat as cat where cat.mate.id = 69]]>"
+#~ msgstr ""
+#~ "from Cat as cat where cat.id = 123\n"
+#~ "\n"
+#~ "from Cat as cat where cat.mate.id = 69"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from bank.Person person\n"
+#~ "where person.id.country = 'AU'\n"
+#~ " and person.id.medicareNumber = 123456]]>"
+#~ msgstr ""
+#~ "from bank.Person person\n"
+#~ "where person.id.country = 'AU'\n"
+#~ " and person.id.medicareNumber = 123456"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from bank.Account account\n"
+#~ "where account.owner.id.country = 'AU'\n"
+#~ " and account.owner.id.medicareNumber = 123456]]>"
+#~ msgstr ""
+#~ "from bank.Account account\n"
+#~ "where account.owner.id.country = 'AU'\n"
+#~ " and account.owner.id.medicareNumber = 123456"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat cat where cat.class = DomesticCat]]>"
+#~ msgstr "from Cat cat where cat.class = DomesticCat"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from AuditLog log, Payment payment\n"
+#~ "where log.item.class = 'Payment' and log.item.id =
payment.id]]>"
+#~ msgstr ""
+#~ "from AuditLog log, Payment payment\n"
+#~ "where log.item.class = 'Payment' and log.item.id = payment.id"
+
+#, fuzzy
+#~ msgid "<![CDATA[from DomesticCat cat where cat.name between 'A' and
'B']]>"
+#~ msgstr "from DomesticCat cat where cat.name between 'A' and
'B'"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from DomesticCat cat where cat.name in ( 'Foo',
'Bar', 'Baz' )]]>"
+#~ msgstr "from DomesticCat cat where cat.name in ( 'Foo', 'Bar',
'Baz' )"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from DomesticCat cat where cat.name not between 'A' and
'B']]>"
+#~ msgstr "from DomesticCat cat where cat.name not between 'A' and
'B'"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from DomesticCat cat where cat.name not in ( 'Foo',
'Bar', "
+#~ "'Baz' )]]>"
+#~ msgstr "from DomesticCat cat where cat.name not in ( 'Foo',
'Bar', 'Baz' )"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<property
name=\"hibernate.query.substitutions\">true 1, false "
+#~ "0</property>]]>"
+#~ msgstr ""
+#~ "<property name=\"hibernate.query.substitutions\">true 1,
false "
+#~ "0</property>"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat cat where cat.alive = true]]>"
+#~ msgstr "from Cat cat where cat.alive = true"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat cat where cat.kittens.size > 0]]>"
+#~ msgstr "from Cat cat where cat.kittens.size > 0"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat cat where size(cat.kittens) > 0]]>"
+#~ msgstr "from Cat cat where size(cat.kittens) > 0"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Calendar cal where maxelement(cal.holidays) >
current_date]]"
+#~ ">"
+#~ msgstr "from Calendar cal where maxelement(cal.holidays) >
current_date"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Order order where maxindex(order.items) >
100]]>"
+#~ msgstr "from Order order where maxindex(order.items) > 100"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Order order where minelement(order.items) >
10000]]>"
+#~ msgstr "from Order order where minelement(order.items) > 10000"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select mother from Cat as mother, Cat as kit\n"
+#~ "where kit in elements(foo.kittens)]]>"
+#~ msgstr ""
+#~ "select mother from Cat as mother, Cat as kit\n"
+#~ "where kit in elements(foo.kittens)"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select p from NameList list, Person p\n"
+#~ "where p.name = some elements(list.names)]]>"
+#~ msgstr ""
+#~ "select p from NameList list, Person p\n"
+#~ "where p.name = some elements(list.names)"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Cat cat where exists elements(cat.kittens)]]>"
+#~ msgstr "from Cat cat where exists elements(cat.kittens)"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Player p where 3 > all elements(p.scores)]]>"
+#~ msgstr "from Player p where 3 > all elements(p.scores)"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Show show where 'fizard' in
indices(show.acts)]]>"
+#~ msgstr "from Show show where 'fizard' in indices(show.acts)"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Order order where order.items[0].id = 1234]]>"
+#~ msgstr "from Order order where order.items[0].id = 1234"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select person from Person person, Calendar calendar\n"
+#~ "where calendar.holidays['national day'] = person.birthDay\n"
+#~ " and person.nationality.calendar = calendar]]>"
+#~ msgstr ""
+#~ "select person from Person person, Calendar calendar\n"
+#~ "where calendar.holidays['national day'] = person.birthDay\n"
+#~ " and person.nationality.calendar = calendar"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select item from Item item, Order order\n"
+#~ "where order.items[ order.deliveredItemIndices[0] ] = item and order.id = "
+#~ "11]]>"
+#~ msgstr ""
+#~ "select item from Item item, Order order\n"
+#~ "where order.items[ order.deliveredItemIndices[0] ] = item and order.id = "
+#~ "11"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select item from Item item, Order order\n"
+#~ "where order.items[ maxindex(order.items) ] = item and order.id = 11]]>"
+#~ msgstr ""
+#~ "select item from Item item, Order order\n"
+#~ "where order.items[ maxindex(order.items) ] = item and order.id = 11"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select item from Item item, Order order\n"
+#~ "where order.items[ size(order.items) - 1 ] = item]]>"
+#~ msgstr ""
+#~ "select item from Item item, Order order\n"
+#~ "where order.items[ size(order.items) - 1 ] = item"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select item, index(item) from Order order\n"
+#~ " join order.items item\n"
+#~ "where index(item) < 5]]>"
+#~ msgstr ""
+#~ "select item, index(item) from Order order\n"
+#~ " join order.items item\n"
+#~ "where index(item) < 5"
+
+#, fuzzy
+#~ msgid "<![CDATA[from DomesticCat cat where upper(cat.name) like
'FRI%']]>"
+#~ msgstr "from DomesticCat cat where upper(cat.name) like
'FRI%'"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select cust\n"
+#~ "from Product prod,\n"
+#~ " Store store\n"
+#~ " inner join store.customers cust\n"
+#~ "where prod.name = 'widget'\n"
+#~ " and store.location.name in ( 'Melbourne', 'Sydney'
)\n"
+#~ " and prod = all elements(cust.currentOrder.lineItems)]]>"
+#~ msgstr ""
+#~ "select cust\n"
+#~ "from Product prod,\n"
+#~ " Store store\n"
+#~ " inner join store.customers cust\n"
+#~ "where prod.name = 'widget'\n"
+#~ " and store.location.name in ( 'Melbourne', 'Sydney'
)\n"
+#~ " and prod = all elements(cust.currentOrder.lineItems)"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[SELECT cust.name, cust.address, cust.phone, cust.id, cust."
+#~ "current_order\n"
+#~ "FROM customers cust,\n"
+#~ " stores store,\n"
+#~ " locations loc,\n"
+#~ " store_customers sc,\n"
+#~ " product prod\n"
+#~ "WHERE prod.name = 'widget'\n"
+#~ " AND store.loc_id = loc.id\n"
+#~ " AND loc.name IN ( 'Melbourne', 'Sydney' )\n"
+#~ " AND sc.store_id = store.id\n"
+#~ " AND sc.cust_id = cust.id\n"
+#~ " AND prod.id = ALL(\n"
+#~ " SELECT item.prod_id\n"
+#~ " FROM line_items item, orders o\n"
+#~ " WHERE item.order_id = o.id\n"
+#~ " AND cust.current_order = o.id\n"
+#~ " )]]>"
+#~ msgstr ""
+#~ "SELECT cust.name, cust.address, cust.phone, cust.id, cust.current_order\n"
+#~ "FROM customers cust,\n"
+#~ " stores store,\n"
+#~ " locations loc,\n"
+#~ " store_customers sc,\n"
+#~ " product prod\n"
+#~ "WHERE prod.name = 'widget'\n"
+#~ " AND store.loc_id = loc.id\n"
+#~ " AND loc.name IN ( 'Melbourne', 'Sydney' )\n"
+#~ " AND sc.store_id = store.id\n"
+#~ " AND sc.cust_id = cust.id\n"
+#~ " AND prod.id = ALL(\n"
+#~ " SELECT item.prod_id\n"
+#~ " FROM line_items item, orders o\n"
+#~ " WHERE item.order_id = o.id\n"
+#~ " AND cust.current_order = o.id\n"
+#~ " )"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from DomesticCat cat\n"
+#~ "order by cat.name asc, cat.weight desc, cat.birthdate]]>"
+#~ msgstr ""
+#~ "from DomesticCat cat\n"
+#~ "order by cat.name asc, cat.weight desc, cat.birthdate"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select cat.color, sum(cat.weight), count(cat)\n"
+#~ "from Cat cat\n"
+#~ "group by cat.color]]>"
+#~ msgstr ""
+#~ "select cat.color, sum(cat.weight), count(cat)\n"
+#~ "from Cat cat\n"
+#~ "group by cat.color"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select foo.id, avg(name), max(name)\n"
+#~ "from Foo foo join foo.names name\n"
+#~ "group by foo.id]]>"
+#~ msgstr ""
+#~ "select foo.id, avg(name), max(name)\n"
+#~ "from Foo foo join foo.names name\n"
+#~ "group by foo.id"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select cat.color, sum(cat.weight), count(cat)\n"
+#~ "from Cat cat\n"
+#~ "group by cat.color\n"
+#~ "having cat.color in (eg.Color.TABBY, eg.Color.BLACK)]]>"
+#~ msgstr ""
+#~ "select cat.color, sum(cat.weight), count(cat)\n"
+#~ "from Cat cat\n"
+#~ "group by cat.color\n"
+#~ "having cat.color in (eg.Color.TABBY, eg.Color.BLACK)"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select cat\n"
+#~ "from Cat cat\n"
+#~ " join cat.kittens kitten\n"
+#~ "group by cat.id, cat.name, cat.other, cat.properties\n"
+#~ "having avg(kitten.weight) > 100\n"
+#~ "order by count(kitten) asc, sum(kitten.weight) desc]]>"
+#~ msgstr ""
+#~ "select cat\n"
+#~ "from Cat cat\n"
+#~ " join cat.kittens kitten\n"
+#~ "group by cat.id, cat.name, cat.other, cat.properties\n"
+#~ "having avg(kitten.weight) > 100\n"
+#~ "order by count(kitten) asc, sum(kitten.weight) desc"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Cat as fatcat\n"
+#~ "where fatcat.weight > (\n"
+#~ " select avg(cat.weight) from DomesticCat cat\n"
+#~ ")]]>"
+#~ msgstr ""
+#~ "from Cat as fatcat\n"
+#~ "where fatcat.weight > (\n"
+#~ " select avg(cat.weight) from DomesticCat cat\n"
+#~ ")"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from DomesticCat as cat\n"
+#~ "where cat.name = some (\n"
+#~ " select name.nickName from Name as name\n"
+#~ ")]]>"
+#~ msgstr ""
+#~ "from DomesticCat as cat\n"
+#~ "where cat.name = some (\n"
+#~ " select name.nickName from Name as name\n"
+#~ ")"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Cat as cat\n"
+#~ "where not exists (\n"
+#~ " from Cat as mate where mate.mate = cat\n"
+#~ ")]]>"
+#~ msgstr ""
+#~ "from Cat as cat\n"
+#~ "where not exists (\n"
+#~ " from Cat as mate where mate.mate = cat\n"
+#~ ")"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from DomesticCat as cat\n"
+#~ "where cat.name not in (\n"
+#~ " select name.nickName from Name as name\n"
+#~ ")]]>"
+#~ msgstr ""
+#~ "from DomesticCat as cat\n"
+#~ "where cat.name not in (\n"
+#~ " select name.nickName from Name as name\n"
+#~ ")"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select cat.id, (select max(kit.weight) from cat.kitten kit)\n"
+#~ "from Cat as cat]]>"
+#~ msgstr ""
+#~ "select cat.id, (select max(kit.weight) from cat.kitten kit)\n"
+#~ "from Cat as cat"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select order.id, sum(price.amount), count(item)\n"
+#~ "from Order as order\n"
+#~ " join order.lineItems as item\n"
+#~ " join item.product as product,\n"
+#~ " Catalog as catalog\n"
+#~ " join catalog.prices as price\n"
+#~ "where order.paid = false\n"
+#~ " and order.customer = :customer\n"
+#~ " and price.product = product\n"
+#~ " and catalog.effectiveDate < sysdate\n"
+#~ " and catalog.effectiveDate >= all (\n"
+#~ " select cat.effectiveDate\n"
+#~ " from Catalog as cat\n"
+#~ " where cat.effectiveDate < sysdate\n"
+#~ " )\n"
+#~ "group by order\n"
+#~ "having sum(price.amount) > :minAmount\n"
+#~ "order by sum(price.amount) desc]]>"
+#~ msgstr ""
+#~ "select order.id, sum(price.amount), count(item)\n"
+#~ "from Order as order\n"
+#~ " join order.lineItems as item\n"
+#~ " join item.product as product,\n"
+#~ " Catalog as catalog\n"
+#~ " join catalog.prices as price\n"
+#~ "where order.paid = false\n"
+#~ " and order.customer = :customer\n"
+#~ " and price.product = product\n"
+#~ " and catalog.effectiveDate < sysdate\n"
+#~ " and catalog.effectiveDate >= all (\n"
+#~ " select cat.effectiveDate\n"
+#~ " from Catalog as cat\n"
+#~ " where cat.effectiveDate < sysdate\n"
+#~ " )\n"
+#~ "group by order\n"
+#~ "having sum(price.amount) > :minAmount\n"
+#~ "order by sum(price.amount) desc"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select order.id, sum(price.amount), count(item)\n"
+#~ "from Order as order\n"
+#~ " join order.lineItems as item\n"
+#~ " join item.product as product,\n"
+#~ " Catalog as catalog\n"
+#~ " join catalog.prices as price\n"
+#~ "where order.paid = false\n"
+#~ " and order.customer = :customer\n"
+#~ " and price.product = product\n"
+#~ " and catalog = :currentCatalog\n"
+#~ "group by order\n"
+#~ "having sum(price.amount) > :minAmount\n"
+#~ "order by sum(price.amount) desc]]>"
+#~ msgstr ""
+#~ "select order.id, sum(price.amount), count(item)\n"
+#~ "from Order as order\n"
+#~ " join order.lineItems as item\n"
+#~ " join item.product as product,\n"
+#~ " Catalog as catalog\n"
+#~ " join catalog.prices as price\n"
+#~ "where order.paid = false\n"
+#~ " and order.customer = :customer\n"
+#~ " and price.product = product\n"
+#~ " and catalog = :currentCatalog\n"
+#~ "group by order\n"
+#~ "having sum(price.amount) > :minAmount\n"
+#~ "order by sum(price.amount) desc"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select count(payment), status.name\n"
+#~ "from Payment as payment\n"
+#~ " join payment.currentStatus as status\n"
+#~ " join payment.statusChanges as statusChange\n"
+#~ "where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
+#~ " or (\n"
+#~ " statusChange.timeStamp = (\n"
+#~ " select max(change.timeStamp)\n"
+#~ " from PaymentStatusChange change\n"
+#~ " where change.payment = payment\n"
+#~ " )\n"
+#~ " and statusChange.user <> :currentUser\n"
+#~ " )\n"
+#~ "group by status.name, status.sortOrder\n"
+#~ "order by status.sortOrder]]>"
+#~ msgstr ""
+#~ "select count(payment), status.name\n"
+#~ "from Payment as payment\n"
+#~ " join payment.currentStatus as status\n"
+#~ " join payment.statusChanges as statusChange\n"
+#~ "where payment.status.name <>
PaymentStatus.AWAITING_APPROVAL\n"
+#~ " or (\n"
+#~ " statusChange.timeStamp = (\n"
+#~ " select max(change.timeStamp)\n"
+#~ " from PaymentStatusChange change\n"
+#~ " where change.payment = payment\n"
+#~ " )\n"
+#~ " and statusChange.user <> :currentUser\n"
+#~ " )\n"
+#~ "group by status.name, status.sortOrder\n"
+#~ "order by status.sortOrder"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select count(payment), status.name\n"
+#~ "from Payment as payment\n"
+#~ " join payment.currentStatus as status\n"
+#~ "where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
+#~ " or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <>
:"
+#~ "currentUser\n"
+#~ "group by status.name, status.sortOrder\n"
+#~ "order by status.sortOrder]]>"
+#~ msgstr ""
+#~ "select count(payment), status.name\n"
+#~ "from Payment as payment\n"
+#~ " join payment.currentStatus as status\n"
+#~ "where payment.status.name <>
PaymentStatus.AWAITING_APPROVAL\n"
+#~ " or payment.statusChanges[ maxIndex(payment.statusChanges) ].user
<"
+#~ "> :currentUser\n"
+#~ "group by status.name, status.sortOrder\n"
+#~ "order by status.sortOrder"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select account, payment\n"
+#~ "from Account as account\n"
+#~ " left outer join account.payments as payment\n"
+#~ "where :currentUser in elements(account.holder.users)\n"
+#~ " and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
+#~ "PaymentStatus.UNPAID)\n"
+#~ "order by account.type.sortOrder, account.accountNumber,
payment.dueDate]]>"
+#~ msgstr ""
+#~ "select account, payment\n"
+#~ "from Account as account\n"
+#~ " left outer join account.payments as payment\n"
+#~ "where :currentUser in elements(account.holder.users)\n"
+#~ " and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
+#~ "PaymentStatus.UNPAID)\n"
+#~ "order by account.type.sortOrder, account.accountNumber, payment.dueDate"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select account, payment\n"
+#~ "from Account as account\n"
+#~ " join account.holder.users as user\n"
+#~ " left outer join account.payments as payment\n"
+#~ "where :currentUser = user\n"
+#~ " and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
+#~ "PaymentStatus.UNPAID)\n"
+#~ "order by account.type.sortOrder, account.accountNumber,
payment.dueDate]]>"
+#~ msgstr ""
+#~ "select account, payment\n"
+#~ "from Account as account\n"
+#~ " join account.holder.users as user\n"
+#~ " left outer join account.payments as payment\n"
+#~ "where :currentUser = user\n"
+#~ " and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
+#~ "PaymentStatus.UNPAID)\n"
+#~ "order by account.type.sortOrder, account.accountNumber, payment.dueDate"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[( (Integer) session.createQuery(\"select count(*) from
....\")."
+#~ "iterate().next() ).intValue()]]>"
+#~ msgstr ""
+#~ "( (Integer) session.iterate(\"select count(*) from ....\").next()
)."
+#~ "intValue()"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select usr.id, usr.name\n"
+#~ "from User as usr\n"
+#~ " left join usr.messages as msg\n"
+#~ "group by usr.id, usr.name\n"
+#~ "order by count(msg)]]>"
+#~ msgstr ""
+#~ "select usr.id, usr.name\n"
+#~ "from User as usr\n"
+#~ " left join usr.messages as msg\n"
+#~ "group by usr.id, usr.name\n"
+#~ "order by count(msg)"
+
+#, fuzzy
+#~ msgid "<![CDATA[from User usr where size(usr.messages) >= 1]]>"
+#~ msgstr "from User usr where size(usr.messages) >= 1"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select usr.id, usr.name\n"
+#~ "from User usr.name\n"
+#~ " join usr.messages msg\n"
+#~ "group by usr.id, usr.name\n"
+#~ "having count(msg) >= 1]]>"
+#~ msgstr ""
+#~ "select usr.id, usr.name\n"
+#~ "from User usr.name\n"
+#~ " join usr.messages msg\n"
+#~ "group by usr.id, usr.name\n"
+#~ "having count(msg) >= 1"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[select usr.id, usr.name\n"
+#~ "from User as usr\n"
+#~ " left join usr.messages as msg\n"
+#~ "group by usr.id, usr.name\n"
+#~ "having count(msg) = 0]]>"
+#~ msgstr ""
+#~ "select usr.id, usr.name\n"
+#~ "from User as usr\n"
+#~ " left join usr.messages as msg\n"
+#~ "group by usr.id, usr.name\n"
+#~ "having count(msg) = 0"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[Query q = s.createQuery(\"from foo Foo as foo where
foo.name=:"
+#~ "name and foo.size=:size\");\n"
+#~ "q.setProperties(fooBean); // fooBean has getName() and getSize()\n"
+#~ "List foos = q.list();]]>"
+#~ msgstr ""
+#~ "Query q = s.createQuery(\"from foo Foo as foo where foo.name=:name and
"
+#~ "foo.size=:size\");\n"
+#~ "q.setProperties(fooBean); // fooBean has getName() and getSize()\n"
+#~ "List foos = q.list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[Query q = s.createFilter( collection, \"\" ); // the
trivial "
+#~ "filter\n"
+#~ "q.setMaxResults(PAGE_SIZE);\n"
+#~ "q.setFirstResult(PAGE_SIZE * pageNumber);\n"
+#~ "List page = q.list();]]>"
+#~ msgstr ""
+#~ "Query q = s.createFilter( collection, \"\" ); // the trivial
filter\n"
+#~ "q.setMaxResults(PAGE_SIZE);\n"
+#~ "q.setFirstResult(PAGE_SIZE * pageNumber);\n"
+#~ "List page = q.list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[Collection orderedCollection = s.filter( collection, \"order by
"
+#~ "this.amount\" );\n"
+#~ "Collection counts = s.filter( collection, \"select this.type, count(this)
"
+#~ "group by this.type\" );]]>"
+#~ msgstr ""
+#~ "Collection orderedCollection = s.filter( collection, \"order by
this."
+#~ "amount\" );\n"
+#~ "Collection counts = s.filter( collection, \"select this.type, count(this)
"
+#~ "group by this.type\" );"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[( (Integer) session.createQuery(\"select count(*) from
....\")."
+#~ "iterate().next() ).intValue();]]>"
+#~ msgstr ""
+#~ "( (Integer) session.iterate(\"select count(*) from ....\").next()
)."
+#~ "intValue();"
+
+#, fuzzy
+#~ msgid "<![CDATA[select p.name from Person p]]>"
+#~ msgstr "select p.name from from Person p"
+
+#, fuzzy
+#~ msgid "<![CDATA[select p.name.first from Person p]]>"
+#~ msgstr "select p.name.first from from Person p"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Person p where p.name = :name]]>"
+#~ msgstr "from from Person p where p.name = :name"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Person p where p.name.first = :firstName]]>"
+#~ msgstr "from from Person p where p.name.first = :firstName"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Person p order by p.name]]>"
+#~ msgstr "from from Person p order by p.name"
+
+#, fuzzy
+#~ msgid "<![CDATA[from Person p order by p.name.first]]>"
+#~ msgstr "from from Person p order by p.name.first"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Person p where p.name.first='John' and p.name."
+#~ "last='Jingleheimer-Schmidt']]>"
+#~ msgstr ""
+#~ "from Person p where p.name.first='John' and
p.name.last='Jingleheimer-"
+#~ "Schmidt'"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Person p where p.name=('John',
'Jingleheimer-Schmidt')]]>"
+#~ msgstr "from Person p where p.name=('John',
'Jingleheimer-Schmidt')"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[from Cat as cat\n"
+#~ "where not ( cat.name, cat.color ) in (\n"
+#~ " select cat.name, cat.color from DomesticCat cat\n"
+#~ ")]]>"
+#~ msgstr ""
+#~ "from Cat as cat\n"
+#~ "where not ( cat.name, cat.color ) in (\n"
+#~ " select cat.name, cat.color from DomesticCat cat\n"
+#~ ")"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_sql.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_sql.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/query_sql.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,1426 +1,1194 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:27\n"
+"PO-Revision-Date: 2010-01-11 10:42+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: query_sql.xml:29
#, no-c-format
msgid "Native SQL"
-msgstr "Native SQL查询"
+msgstr "Native SQL 查询"
#. Tag: para
-#: query_sql.xml:31
-#, fuzzy, no-c-format
-msgid ""
-"You can also express queries in the native SQL dialect of your database. "
-"This is useful if you want to utilize database-specific features such as "
-"query hints or the <literal>CONNECT</literal> keyword in Oracle. It
also "
-"provides a clean migration path from a direct SQL/JDBC based application to "
-"Hibernate."
-msgstr ""
-"你也可以使用你的数据库的Native SQL语言来查询数据。这对你在要使用数据库的某些"
-"特性的时候(比如说在查询提示或者Oracle中的 <literal>CONNECT</literal>关键字),"
-"这是非常有用的。这就能够扫清你把原来直接使用SQL/JDBC 的程序迁移到基于 "
-"Hibernate应用的道路上的障碍。"
+#, no-c-format
+msgid "You can also express queries in the native SQL dialect of your database. This
is useful if you want to utilize database-specific features such as query hints or the
<literal>CONNECT</literal> keyword in Oracle. It also provides a clean
migration path from a direct SQL/JDBC based application to Hibernate."
+msgstr "你也可以使用你的数据库的 Native SQL 语言来查询数据。这对你在要使用数据库的某些特性的时候(比如说在查询提示或者 Oracle 中的
<literal>CONNECT</literal> 关键字),这是非常有用的。这就能够扫清你把原来直接使用 SQL/JDBC 的程序迁移到基于
Hibernate 应用的道路上的障碍。 "
#. Tag: para
-#: query_sql.xml:37
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate3 allows you to specify handwritten SQL, including stored "
-"procedures, for all create, update, delete, and load operations."
-msgstr ""
-"Hibernate3允许你使用手写的sql来完成所有的create,update,delete,和load操作(包"
-"括存储过程)"
+#, no-c-format
+msgid "Hibernate3 allows you to specify handwritten SQL, including stored
procedures, for all create, update, delete, and load operations."
+msgstr "Hibernate3 允许你使用手写的 sql 来完成所有的 create、update、delete 和 load 操作(包括存储过程)
"
#. Tag: title
-#: query_sql.xml:41
#, no-c-format
msgid "Using a <literal>SQLQuery</literal>"
-msgstr "使用<literal>SQLQuery</literal>"
+msgstr "使用 <literal>SQLQuery</literal>"
#. Tag: para
-#: query_sql.xml:43
-#, fuzzy, no-c-format
-msgid ""
-"Execution of native SQL queries is controlled via the
<literal>SQLQuery</"
-"literal> interface, which is obtained by calling <literal>Session."
-"createSQLQuery()</literal>. The following sections describe how to use this
"
-"API for querying."
-msgstr ""
-"对原生SQL查询执行的控制是通过<literal>SQLQuery</literal>接口进行的,通过执行"
-"<literal>Session.createSQLQuery()</literal>获取这个接口。下面来描述如何使用这"
-"个API进行查询。"
+#, no-c-format
+msgid "Execution of native SQL queries is controlled via the
<literal>SQLQuery</literal> interface, which is obtained by calling
<literal>Session.createSQLQuery()</literal>. The following sections describe
how to use this API for querying."
+msgstr "对原生 SQL 查询执行的控制是通过 <literal>SQLQuery</literal>
接口进行的,通过执行<literal>Session.createSQLQuery()</literal>获取这个接口。下面来描述如何使用这个 API
进行查询。 "
#. Tag: title
-#: query_sql.xml:49
#, no-c-format
msgid "Scalar queries"
msgstr "标量查询(Scalar queries)"
#. Tag: para
-#: query_sql.xml:51
#, no-c-format
msgid "The most basic SQL query is to get a list of scalars (values)."
-msgstr "最基本的SQL查询就是获得一个标量(数值)的列表。"
+msgstr "最基本的 SQL 查询就是获得一个标量(数值)的列表。"
-#. Tag: programlisting
-#: query_sql.xml:54
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\").list();\n"
-"sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE FROM
CATS\").list();\n"
-"]]>"
-msgstr ""
+msgid "These will return a List of Object arrays (Object[]) with scalar values for
each column in the CATS table. Hibernate will use ResultSetMetadata to deduce the actual
order and types of the returned scalar values."
+msgstr "它们都将返回一个 Object 数组(Object[])组成的 List,数组每个元素都是 CATS 表的一个字段值。Hibernate 会使用
ResultSetMetadata 来判定返回的标量值的实际顺序和类型。 "
#. Tag: para
-#: query_sql.xml:56
-#, fuzzy, no-c-format
-msgid ""
-"These will return a List of Object arrays (Object[]) with scalar values for "
-"each column in the CATS table. Hibernate will use ResultSetMetadata to "
-"deduce the actual order and types of the returned scalar values."
-msgstr ""
-"它们都将返回一个Object数组(Object[])组成的List,数组每个元素都是CATS表的一个"
-"字段值。Hibernate会使用ResultSetMetadata来判定返回的标量值的实际顺序和类型。"
-
-#. Tag: para
-#: query_sql.xml:61
-#, fuzzy, no-c-format
-msgid ""
-"To avoid the overhead of using <literal>ResultSetMetadata</literal>, or
"
-"simply to be more explicit in what is returned, one can use "
-"<literal>addScalar()</literal>:"
-msgstr ""
-"如果要避免过多的使用<literal>ResultSetMetadata</literal>,或者只是为了更加明确"
-"的指名返回值,可以使用<literal>addScalar()</literal>。"
-
-#. Tag: programlisting
-#: query_sql.xml:65
#, no-c-format
-msgid ""
-"<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\")\n"
-" .addScalar(\"ID\", Hibernate.LONG)\n"
-" .addScalar(\"NAME\", Hibernate.STRING)\n"
-" .addScalar(\"BIRTHDATE\", Hibernate.DATE)\n"
-"]]>"
-msgstr ""
+msgid "To avoid the overhead of using
<literal>ResultSetMetadata</literal>, or simply to be more explicit in what is
returned, one can use <literal>addScalar()</literal>:"
+msgstr "如果要避免过多的使用
<literal>ResultSetMetadata</literal>,或者只是为了更加明确的指名返回值,可以使用
<literal>addScalar()</literal>: "
#. Tag: para
-#: query_sql.xml:67 query_sql.xml:113 query_sql.xml:198 query_sql.xml:349
-#, fuzzy, no-c-format
+#, no-c-format
msgid "This query specified:"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"这个查询指定了:\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"这个查询指定:\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"这个查询指明:\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"这个查询指定:"
+msgstr "这个查询指定:"
#. Tag: para
-#: query_sql.xml:71 query_sql.xml:117 query_sql.xml:353
#, no-c-format
msgid "the SQL query string"
-msgstr "SQL查询字符串"
+msgstr "SQL 查询字符串"
#. Tag: para
-#: query_sql.xml:75
#, no-c-format
msgid "the columns and types to return"
msgstr "要返回的字段和类型"
#. Tag: para
-#: query_sql.xml:79
-#, fuzzy, no-c-format
-msgid ""
-"This will return Object arrays, but now it will not use "
-"<literal>ResultSetMetadata</literal> but will instead explicitly get
the ID, "
-"NAME and BIRTHDATE column as respectively a Long, String and a Short from "
-"the underlying resultset. This also means that only these three columns will
"
-"be returned, even though the query is using <literal>*</literal> and
could "
-"return more than the three listed columns."
-msgstr ""
-"它仍然会返回Object数组,但是此时不再使用<literal>ResultSetMetdata</literal>,而"
-"是明确的将ID,NAME和BIRTHDATE按照Long,String和Short类型从resultset中取出。同"
-"时,也指明了就算query是使用<literal>*</literal>来查询的,可能获得超过列出的这"
-"三个字段,也仅仅会返回这三个字段。"
+#, no-c-format
+msgid "This will return Object arrays, but now it will not use
<literal>ResultSetMetadata</literal> but will instead explicitly get the ID,
NAME and BIRTHDATE column as respectively a Long, String and a Short from the underlying
resultset. This also means that only these three columns will be returned, even though the
query is using <literal>*</literal> and could return more than the three
listed columns."
+msgstr "它仍然会返回 Object 数组,但是此时不再使用
<literal>ResultSetMetdata</literal>,而是明确的将 ID,NAME 和 BIRTHDATE 按照 Long,String
和 Short 类型从 resultset 中取出。同时,也指明了就算 query 是使用 <literal>*</literal>
来查询的,可能获得超过列出的这三个字段,也仅仅会返回这三个字段。 "
#. Tag: para
-#: query_sql.xml:87
#, no-c-format
-msgid ""
-"It is possible to leave out the type information for all or some of the "
-"scalars."
+msgid "It is possible to leave out the type information for all or some of the
scalars."
msgstr "对全部或者部分的标量值不设置类型信息也是可以的。"
-#. Tag: programlisting
-#: query_sql.xml:90
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\")\n"
-" .addScalar(\"ID\", Hibernate.LONG)\n"
-" .addScalar(\"NAME\")\n"
-" .addScalar(\"BIRTHDATE\")\n"
-"]]>"
-msgstr ""
+msgid "This is essentially the same query as before, but now
<literal>ResultSetMetaData</literal> is used to determine the type of NAME and
BIRTHDATE, where as the type of ID is explicitly specified."
+msgstr "基本上这和前面一个查询相同,只是此时使用 <literal>ResultSetMetaData</literal> 来决定
NAME 和 BIRTHDATE 的类型,而 ID 的类型是明确指出的。 "
#. Tag: para
-#: query_sql.xml:92
-#, fuzzy, no-c-format
-msgid ""
-"This is essentially the same query as before, but now "
-"<literal>ResultSetMetaData</literal> is used to determine the type of
NAME "
-"and BIRTHDATE, where as the type of ID is explicitly specified."
-msgstr ""
-"基本上这和前面一个查询相同,只是此时使用<literal>ResultSetMetaData</literal>来"
-"决定NAME和BIRTHDATE的类型,而ID的类型是明确指出的。"
+#, no-c-format
+msgid "How the java.sql.Types returned from ResultSetMetaData is mapped to Hibernate
types is controlled by the Dialect. If a specific type is not mapped, or does not result
in the expected type, it is possible to customize it via calls to
<literal>registerHibernateType</literal> in the Dialect."
+msgstr "关于从 ResultSetMetaData 返回的 java.sql.Types 是如何映射到 Hibernate
类型,是由方言(Dialect)控制的。假若某个指定的类型没有被映射,或者不是你所预期的类型,你可以通过 Dialet 的
<literal>registerHibernateType</literal> 调用自行定义。 "
-#. Tag: para
-#: query_sql.xml:96
-#, fuzzy, no-c-format
-msgid ""
-"How the java.sql.Types returned from ResultSetMetaData is mapped to "
-"Hibernate types is controlled by the Dialect. If a specific type is not "
-"mapped, or does not result in the expected type, it is possible to customize
"
-"it via calls to <literal>registerHibernateType</literal> in the
Dialect."
-msgstr ""
-"关于从ResultSetMetaData返回的java.sql.Types是如何映射到Hibernate类型,是由方"
-"言(Dialect)控制的。假若某个指定的类型没有被映射,或者不是你所预期的类型,你可"
-"以通过Dialet的<literal>registerHibernateType</literal>调用自行定义。"
-
#. Tag: title
-#: query_sql.xml:104
#, no-c-format
msgid "Entity queries"
-msgstr "实体查询(Entity queries)"
+msgstr "实体查询(Entity queries)"
#. Tag: para
-#: query_sql.xml:106
#, no-c-format
-msgid ""
-"The above queries were all about returning scalar values, basically "
-"returning the \"raw\" values from the resultset. The following shows how
to "
-"get entity objects from a native sql query via
<literal>addEntity()</"
-"literal>."
-msgstr ""
-"上面的查询都是返回标量值的,也就是从resultset中返回的“裸”数据。下面展示如何通"
-"过<literal>addEntity()</literal>让原生查询返回实体对象。"
+msgid "The above queries were all about returning scalar values, basically returning
the \"raw\" values from the resultset. The following shows how to get entity
objects from a native sql query via <literal>addEntity()</literal>."
+msgstr "上面的查询都是返回标量值的,也就是从 resultset 中返回的“裸”数据。下面展示如何通过
<literal>addEntity()</literal> 让原生查询返回实体对象。"
-#. Tag: programlisting
-#: query_sql.xml:111
-#, no-c-format
-msgid ""
-"<![CDATA[sess.createSQLQuery(\"SELECT * FROM
CATS\").addEntity(Cat.class);\n"
-"sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE FROM
CATS\").addEntity(Cat."
-"class);\n"
-"]]>"
-msgstr ""
-
#. Tag: para
-#: query_sql.xml:121
#, no-c-format
msgid "the entity returned by the query"
msgstr "要返回的实体"
#. Tag: para
-#: query_sql.xml:125
#, no-c-format
-msgid ""
-"Assuming that Cat is mapped as a class with the columns ID, NAME and "
-"BIRTHDATE the above queries will both return a List where each element is a "
-"Cat entity."
-msgstr ""
-"假设Cat被映射为拥有ID,NAME和BIRTHDATE三个字段的类,以上的两个查询都返回一个"
-"List,每个元素都是一个Cat实体。"
+msgid "Assuming that Cat is mapped as a class with the columns ID, NAME and
BIRTHDATE the above queries will both return a List where each element is a Cat
entity."
+msgstr "假设 Cat 被映射为拥有 ID,NAME 和 BIRTHDATE 三个字段的类,以上的两个查询都返回一个 List,每个元素都是一个 Cat
实体。"
#. Tag: para
-#: query_sql.xml:129
#, no-c-format
-msgid ""
-"If the entity is mapped with a <literal>many-to-one</literal> to
another "
-"entity it is required to also return this when performing the native query, "
-"otherwise a database specific \"column not found\" error will occur. The
"
-"additional columns will automatically be returned when using the * notation,
"
-"but we prefer to be explicit as in the following example for a
<literal>many-"
-"to-one</literal> to a <literal>Dog</literal>:"
-msgstr ""
-"假若实体在映射时有一个<literal>many-to-one</literal>的关联指向另外一个实体,"
-"在查询时必须也返回那个实体,否则会导致发生一个\"column not found\"的数据库错"
-"误。这些附加的字段可以使用*标注来自动返回,但我们希望还是明确指明,看下面这个"
-"具有指向<literal>Dog</literal>的<literal>many-to-one</literal>的例子:"
+msgid "If the entity is mapped with a <literal>many-to-one</literal> to
another entity it is required to also return this when performing the native query,
otherwise a database specific \"column not found\" error will occur. The
additional columns will automatically be returned when using the * notation, but we prefer
to be explicit as in the following example for a
<literal>many-to-one</literal> to a <literal>Dog</literal>:"
+msgstr "假若实体在映射时有一个 <literal>many-to-one</literal>
的关联指向另外一个实体,在查询时必须也返回那个实体,否则会导致发生一个 \"column not found\" 的数据库错误。这些附加的字段可以使用 *
标注来自动返回,但我们希望还是明确指明,看下面这个具有指向 <literal>Dog</literal> 的
<literal>many-to-one</literal> 的例子:"
-#. Tag: programlisting
-#: query_sql.xml:137
-#, no-c-format
-msgid ""
-"<![CDATA[sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE, DOG_ID FROM
CATS"
-"\").addEntity(Cat.class);\n"
-"]]>"
-msgstr ""
-
#. Tag: para
-#: query_sql.xml:139
#, no-c-format
msgid "This will allow cat.getDog() to function properly."
-msgstr "这样cat.getDog()就能正常运作。"
+msgstr "这样 cat.getDog() 就能正常运作。"
#. Tag: title
-#: query_sql.xml:143
#, no-c-format
msgid "Handling associations and collections"
-msgstr "处理关联和集合类(Handling associations and collections)"
+msgstr "处理关联和集合类(Handling associations and collections)"
#. Tag: para
-#: query_sql.xml:145
#, no-c-format
-msgid ""
-"It is possible to eagerly join in the <literal>Dog</literal> to avoid
the "
-"possible extra roundtrip for initializing the proxy. This is done via the "
-"<literal>addJoin()</literal> method, which allows you to join in an
"
-"association or collection."
-msgstr ""
-"通过提前抓取将<literal>Dog</literal>连接获得,而避免初始化proxy带来的额外开销"
-"也是可能的。这是通过<literal>addJoin()</literal>方法进行的,这个方法可以让你"
-"将关联或集合连接进来。"
+msgid "It is possible to eagerly join in the <literal>Dog</literal> to
avoid the possible extra roundtrip for initializing the proxy. This is done via the
<literal>addJoin()</literal> method, which allows you to join in an
association or collection."
+msgstr "通过提前抓取将 <literal>Dog</literal> 连接获得,而避免初始化 proxy
带来的额外开销也是可能的。这是通过 <literal>addJoin()</literal>
方法进行的,这个方法可以让你将关联或集合连接进来。"
-#. Tag: programlisting
-#: query_sql.xml:150
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[sess.createSQLQuery(\"SELECT c.ID, NAME, BIRTHDATE, DOG_ID, D_ID,
"
-"D_NAME FROM CATS c, DOGS d WHERE c.DOG_ID = d.D_ID\")\n"
-" .addEntity(\"cat\", Cat.class)\n"
-" .addJoin(\"cat.dog\");\n"
-"]]>"
-msgstr ""
+msgid "In this example, the returned <literal>Cat</literal>'s will
have their <literal>dog</literal> property fully initialized without any extra
roundtrip to the database. Notice that you added an alias name (\"cat\") to be
able to specify the target property path of the join. It is possible to do the same eager
joining for collections, e.g. if the <literal>Cat</literal> had a one-to-many
to <literal>Dog</literal> instead."
+msgstr "上面这个例子中,返回的 <literal>Cat</literal> 对象,其
<literal>dog</literal>
属性被完全初始化了,不再需要数据库的额外操作。注意,我们加了一个别名(\"cat\"),以便指明 join
的目标属性路径。通过同样的提前连接也可以作用于集合类,例如,假若 <literal>Cat</literal> 有一个指向
<literal>Dog</literal> 的一对多关联。 "
#. Tag: para
-#: query_sql.xml:152
-#, fuzzy, no-c-format
-msgid ""
-"In this example, the returned <literal>Cat</literal>'s will have
their "
-"<literal>dog</literal> property fully initialized without any extra
"
-"roundtrip to the database. Notice that you added an alias name (\"cat\")
to "
-"be able to specify the target property path of the join. It is possible to "
-"do the same eager joining for collections, e.g. if the
<literal>Cat</"
-"literal> had a one-to-many to <literal>Dog</literal> instead."
-msgstr ""
-"上面这个例子中,返回的<literal>Cat</literal>对象,其<literal>dog</literal>属"
-"性被完全初始化了,不再需要数据库的额外操作。注意,我们加了一个别名(\"cat\"),"
-"以便指明join的目标属性路径。通过同样的提前连接也可以作用于集合类,例如,假若"
-"<literal>Cat</literal>有一个指向<literal>Dog</literal>的一对多关联。"
-
-#. Tag: programlisting
-#: query_sql.xml:160
#, no-c-format
-msgid ""
-"<![CDATA[sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE, D_ID, D_NAME,
"
-"CAT_ID FROM CATS c, DOGS d WHERE c.ID = d.CAT_ID\")\n"
-" .addEntity(\"cat\", Cat.class)\n"
-" .addJoin(\"cat.dogs\");\n"
-"]]>"
-msgstr ""
+msgid "At this stage you are reaching the limits of what is possible with native
queries, without starting to enhance the sql queries to make them usable in Hibernate.
Problems can arise when returning multiple entities of the same type or when the default
alias/column names are not enough."
+msgstr "到此为止,我们碰到了天花板:若不对 SQL 查询进行增强,这些已经是在 Hibernate 中使用原生 SQL
查询所能做到的最大可能了。下面的问题即将出现:返回多个同样类型的实体怎么办?或者默认的别名/字段不够又怎么办? "
-#. Tag: para
-#: query_sql.xml:162
-#, fuzzy, no-c-format
-msgid ""
-"At this stage you are reaching the limits of what is possible with native "
-"queries, without starting to enhance the sql queries to make them usable in "
-"Hibernate. Problems can arise when returning multiple entities of the same "
-"type or when the default alias/column names are not enough."
-msgstr ""
-"到此为止,我们碰到了天花板:若不对SQL查询进行增强,这些已经是在Hibernate中使"
-"用原生SQL查询所能做到的最大可能了。下面的问题即将出现:返回多个同样类型的实体"
-"怎么办?或者默认的别名/字段不够又怎么办?"
-
#. Tag: title
-#: query_sql.xml:170
#, no-c-format
msgid "Returning multiple entities"
-msgstr "返回多个实体(Returning multiple entities)"
+msgstr "返回多个实体(Returning multiple entities)"
#. Tag: para
-#: query_sql.xml:172
-#, fuzzy, no-c-format
-msgid ""
-"Until now, the result set column names are assumed to be the same as the "
-"column names specified in the mapping document. This can be problematic for "
-"SQL queries that join multiple tables, since the same column names can "
-"appear in more than one table."
-msgstr ""
-"到目前为止,结果集字段名被假定为和映射文件中指定的的字段名是一致的。假若SQL查"
-"询连接了多个表,同一个字段名可能在多个表中出现多次,这就会造成问题。"
+#, no-c-format
+msgid "Until now, the result set column names are assumed to be the same as the
column names specified in the mapping document. This can be problematic for SQL queries
that join multiple tables, since the same column names can appear in more than one
table."
+msgstr "到目前为止,结果集字段名被假定为和映射文件中指定的的字段名是一致的。假若 SQL 查询连接了多个表,同一个字段名可能在多个表中出现多次,这就会造成问题。
"
#. Tag: para
-#: query_sql.xml:177
#, no-c-format
-msgid ""
-"Column alias injection is needed in the following query (which most likely "
-"will fail):"
+msgid "Column alias injection is needed in the following query (which most likely
will fail):"
msgstr "下面的查询中需要使用字段别名注射(这个例子本身会失败):"
-#. Tag: programlisting
-#: query_sql.xml:180
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[sess.createSQLQuery(\"SELECT c.*, m.* FROM CATS c, CATS m WHERE
c."
-"MOTHER_ID = c.ID\")\n"
-" .addEntity(\"cat\", Cat.class)\n"
-" .addEntity(\"mother\", Cat.class)\n"
-"]]>"
-msgstr ""
+msgid "The query was intended to return two Cat instances per row: a cat and its
mother. The query will, however, fail because there is a conflict of names; the instances
are mapped to the same column names. Also, on some databases the returned column aliases
will most likely be on the form \"c.ID\", \"c.NAME\", etc. which are
not equal to the columns specified in the mappings (\"ID\" and
\"NAME\")."
+msgstr "这个查询的本意是希望每行返回两个 Cat 实例,一个是
cat,另一个是它的妈妈。但是因为它们的字段名被映射为相同的,而且在某些数据库中,返回的字段别名是“c.ID”,\"c.NAME\"
这样的形式,而它们和在映射文件中的名字(\"ID\" 和 \"NAME\")不匹配,这就会造成失败。 "
#. Tag: para
-#: query_sql.xml:184
-#, fuzzy, no-c-format
-msgid ""
-"The query was intended to return two Cat instances per row: a cat and its "
-"mother. The query will, however, fail because there is a conflict of names; "
-"the instances are mapped to the same column names. Also, on some databases "
-"the returned column aliases will most likely be on the form \"c.ID\",
\"c."
-"NAME\", etc. which are not equal to the columns specified in the mappings
"
-"(\"ID\" and \"NAME\")."
-msgstr ""
-"这个查询的本意是希望每行返回两个Cat实例,一个是cat,另一个是它的妈妈。但是因为"
-"它们的字段名被映射为相同的,而且在某些数据库中,返回的字段别名是“c.ID”,\"c."
-"NAME\"这样的形式,而它们和在映射文件中的名字(\"ID\"和\"NAME\")不匹配,这就"
-"会造成失败。"
-
-#. Tag: para
-#: query_sql.xml:193
#, no-c-format
msgid "The following form is not vulnerable to column name duplication:"
msgstr "下面的形式可以解决字段名重复:"
-#. Tag: programlisting
-#: query_sql.xml:196
-#, no-c-format
-msgid ""
-"<![CDATA[sess.createSQLQuery(\"SELECT {cat.*}, {mother.*} FROM CATS c,
CATS "
-"m WHERE c.MOTHER_ID = c.ID\")\n"
-" .addEntity(\"cat\", Cat.class)\n"
-" .addEntity(\"mother\", Cat.class)\n"
-"]]>"
-msgstr ""
-
#. Tag: para
-#: query_sql.xml:202
#, no-c-format
-msgid ""
-"the SQL query string, with placeholders for Hibernate to inject column "
-"aliases"
-msgstr "SQL查询语句,其中包含占位附来让Hibernate注射字段别名"
+msgid "the SQL query string, with placeholders for Hibernate to inject column
aliases"
+msgstr "SQL 查询语句,其中包含占位附来让 Hibernate 注射字段别名"
#. Tag: para
-#: query_sql.xml:207
#, no-c-format
msgid "the entities returned by the query"
msgstr "查询返回的实体"
#. Tag: para
-#: query_sql.xml:211
-#, fuzzy, no-c-format
-msgid ""
-"The {cat.*} and {mother.*} notation used above is a shorthand for \"all
"
-"properties\". Alternatively, you can list the columns explicitly, but even
"
-"in this case Hibernate injects the SQL column aliases for each property. The
"
-"placeholder for a column alias is just the property name qualified by the "
-"table alias. In the following example, you retrieve Cats and their mothers "
-"from a different table (cat_log) to the one declared in the mapping "
-"metadata. You can even use the property aliases in the where clause."
-msgstr ""
-"上面使用的{cat.*}和{mother.*}标记是作为“所有属性”的简写形式出现的。当然你也可"
-"以明确地罗列出字段名,但在这个例子里面我们让Hibernate来为每个属性注射SQL字段"
-"别名。字段别名的占位符是属性名加上表别名的前缀。在下面的例子中,我们从另外一"
-"个表(cat_log)中通过映射元数据中的指定获取Cat和它的妈妈。注意,要是我们愿"
-"意,我们甚至可以在where子句中使用属性别名。"
-
-#. Tag: programlisting
-#: query_sql.xml:220
#, no-c-format
-msgid ""
-"<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" +
\n"
-" \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*}
"
-"\" +\n"
-" \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID\";\n"
-"\n"
-"List loggedCats = sess.createSQLQuery(sql)\n"
-" .addEntity(\"cat\", Cat.class)\n"
-" .addEntity(\"mother\", Cat.class).list()\n"
-"]]>"
-msgstr ""
+msgid "The {cat.*} and {mother.*} notation used above is a shorthand for \"all
properties\". Alternatively, you can list the columns explicitly, but even in this
case Hibernate injects the SQL column aliases for each property. The placeholder for a
column alias is just the property name qualified by the table alias. In the following
example, you retrieve Cats and their mothers from a different table (cat_log) to the one
declared in the mapping metadata. You can even use the property aliases in the where
clause."
+msgstr "上面使用的 {cat.*} 和 {mother.*} 标记是作为“所有属性”的简写形式出现的。当然你也可以明确地罗列出字段名,但在这个例子里面我们让
Hibernate 来为每个属性注射 SQL 字段别名。字段别名的占位符是属性名加上表别名的前缀。在下面的例子中,我们从另外一个表(cat_log)中通过映射元数据中的指定获取
Cat 和它的妈妈。注意,要是我们愿意,我们甚至可以在 where 子句中使用属性别名。 "
#. Tag: title
-#: query_sql.xml:223
#, no-c-format
msgid "Alias and property references"
-msgstr "别名和属性引用(Alias and property references)"
+msgstr "别名和属性引用(Alias and property references)"
#. Tag: para
-#: query_sql.xml:225
-#, fuzzy, no-c-format
-msgid ""
-"In most cases the above alias injection is needed. For queries relating to "
-"more complex mappings, like composite properties, inheritance "
-"discriminators, collections etc., you can use specific aliases that allow "
-"Hibernate to inject the proper aliases."
-msgstr ""
-"大多数情况下,都需要上面的属性注射,但在使用更加复杂的映射,比如复合属性、通"
-"过标识符构造继承树,以及集合类等等情况下,也有一些特别的别名,来允许Hibernate"
-"注射合适的别名。"
+#, no-c-format
+msgid "In most cases the above alias injection is needed. For queries relating to
more complex mappings, like composite properties, inheritance discriminators, collections
etc., you can use specific aliases that allow Hibernate to inject the proper
aliases."
+msgstr "大多数情况下,都需要上面的属性注射,但在使用更加复杂的映射,比如复合属性、通过标识符构造继承树,以及集合类等等情况下,也有一些特别的别名,来允许
Hibernate 注入合适的别名。 "
#. Tag: para
-#: query_sql.xml:230
-#, fuzzy, no-c-format
-msgid ""
-"The following table shows the different ways you can use the alias "
-"injection. Please note that the alias names in the result are simply "
-"examples; each alias will have a unique and probably different name when "
-"used."
-msgstr ""
-"下表列出了使用别名注射参数的不同可能性。注意:下面结果中的别名只是示例,实用"
-"时每个别名需要唯一并且不同的名字。"
+#, no-c-format
+msgid "The following table shows the different ways you can use the alias injection.
Please note that the alias names in the result are simply examples; each alias will have a
unique and probably different name when used."
+msgstr "下表列出了使用别名注射参数的不同可能性。注意:下面结果中的别名只是示例,实用时每个别名需要唯一并且不同的名字。 "
#. Tag: title
-#: query_sql.xml:236
#, no-c-format
msgid "Alias injection names"
-msgstr "别名注射(alias injection names)"
+msgstr "别名注射(alias injection names)"
#. Tag: entry
-#: query_sql.xml:247
#, no-c-format
msgid "Description"
msgstr "描述"
#. Tag: entry
-#: query_sql.xml:249
#, no-c-format
msgid "Syntax"
msgstr "语法"
#. Tag: entry
-#: query_sql.xml:251
#, no-c-format
msgid "Example"
msgstr "示例"
#. Tag: entry
-#: query_sql.xml:257
#, no-c-format
msgid "A simple property"
msgstr "简单属性"
-#. Tag: literal
-#: query_sql.xml:259
+#. Tag: entry
#, no-c-format
-msgid "{[aliasname].[propertyname]"
-msgstr "{[aliasname].[propertyname]"
+msgid "<literal>{[aliasname].[propertyname]</literal>"
+msgstr "<literal>{[aliasname].[propertyname]</literal>"
-#. Tag: literal
-#: query_sql.xml:261
+#. Tag: entry
#, no-c-format
-msgid "A_NAME as {item.name}"
-msgstr "A_NAME as {item.name}"
+msgid "<literal>A_NAME as {item.name}</literal>"
+msgstr "<literal>A_NAME as {item.name}</literal>"
#. Tag: entry
-#: query_sql.xml:265
#, no-c-format
msgid "A composite property"
msgstr "复合属性"
-#. Tag: literal
-#: query_sql.xml:267
+#. Tag: entry
#, no-c-format
-msgid "{[aliasname].[componentname].[propertyname]}"
-msgstr "{[aliasname].[componentname].[propertyname]}"
+msgid
"<literal>{[aliasname].[componentname].[propertyname]}</literal>"
+msgstr
"<literal>{[aliasname].[componentname].[propertyname]}</literal>"
-#. Tag: literal
-#: query_sql.xml:269
+#. Tag: entry
#, no-c-format
-msgid "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}"
-msgstr "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}"
+msgid "<literal>CURRENCY as {item.amount.currency}, VALUE as
{item.amount.value}</literal>"
+msgstr "<literal>CURRENCY as {item.amount.currency}, VALUE as
{item.amount.value}</literal>"
#. Tag: entry
-#: query_sql.xml:274
#, no-c-format
msgid "Discriminator of an entity"
-msgstr "实体辨别器(Discriminator of an entity)"
+msgstr "实体辨别器(Discriminator of an entity)"
-#. Tag: literal
-#: query_sql.xml:276
+#. Tag: entry
#, no-c-format
-msgid "{[aliasname].class}"
-msgstr "{[aliasname].class}"
+msgid "<literal>{[aliasname].class}</literal>"
+msgstr "<literal>{[aliasname].class}</literal>"
-#. Tag: literal
-#: query_sql.xml:278
+#. Tag: entry
#, no-c-format
-msgid "DISC as {item.class}"
-msgstr "DISC as {item.class}"
+msgid "<literal>DISC as {item.class}</literal>"
+msgstr "<literal>DISC as {item.class}</literal>"
#. Tag: entry
-#: query_sql.xml:282
#, no-c-format
msgid "All properties of an entity"
msgstr "实体的所有属性"
-#. Tag: literal
-#: query_sql.xml:284 query_sql.xml:332
+#. Tag: entry
#, no-c-format
-msgid "{[aliasname].*}"
-msgstr "{[aliasname].*}"
+msgid "<literal>{[aliasname].*}</literal>"
+msgstr "<literal>{[aliasname].*}</literal>"
-#. Tag: literal
-#: query_sql.xml:286
+#. Tag: entry
#, no-c-format
-msgid "{item.*}"
-msgstr "{item.*}"
+msgid "<literal>{item.*}</literal>"
+msgstr "<literal>{item.*}</literal>"
#. Tag: entry
-#: query_sql.xml:290
#, no-c-format
msgid "A collection key"
-msgstr "集合键(collection key)"
+msgstr "集合键(collection key)"
-#. Tag: literal
-#: query_sql.xml:292
+#. Tag: entry
#, no-c-format
-msgid "{[aliasname].key}"
-msgstr "{[aliasname].key}"
+msgid "<literal>{[aliasname].key}</literal>"
+msgstr "<literal>{[aliasname].key}</literal>"
-#. Tag: literal
-#: query_sql.xml:294
+#. Tag: entry
#, no-c-format
-msgid "ORGID as {coll.key}"
-msgstr "ORGID as {coll.key}"
+msgid "<literal>ORGID as {coll.key}</literal>"
+msgstr "<literal>ORGID as {coll.key}</literal>"
#. Tag: entry
-#: query_sql.xml:298
#, no-c-format
msgid "The id of an collection"
-msgstr "集合id"
+msgstr "集合 id"
-#. Tag: literal
-#: query_sql.xml:300
+#. Tag: entry
#, no-c-format
-msgid "{[aliasname].id}"
-msgstr "{[aliasname].id}"
+msgid "<literal>{[aliasname].id}</literal>"
+msgstr "<literal>{[aliasname].id}</literal>"
-#. Tag: literal
-#: query_sql.xml:302
+#. Tag: entry
#, no-c-format
-msgid "EMPID as {coll.id}"
-msgstr "EMPID as {coll.id}"
+msgid "<literal>EMPID as {coll.id}</literal>"
+msgstr "<literal>EMPID as {coll.id}</literal>"
#. Tag: entry
-#: query_sql.xml:306
#, no-c-format
msgid "The element of an collection"
msgstr "集合元素"
-#. Tag: literal
-#: query_sql.xml:308
+#. Tag: entry
#, no-c-format
-msgid "{[aliasname].element}"
-msgstr "{[aliasname].element}"
+msgid "<literal>{[aliasname].element}</literal>"
+msgstr "<literal>{[aliasname].element}</literal>"
-#. Tag: literal
-#: query_sql.xml:310
+#. Tag: entry
#, no-c-format
-msgid "XID as {coll.element}"
-msgstr "XID as {coll.element}"
+msgid "<literal>XID as {coll.element}</literal>"
+msgstr "<literal>XID as {coll.element}</literal>"
#. Tag: entry
-#: query_sql.xml:314
-#, fuzzy, no-c-format
+#, no-c-format
msgid "property of the element in the collection"
-msgstr "集合元素的属性"
+msgstr "集合元素的属性 "
-#. Tag: literal
-#: query_sql.xml:316
+#. Tag: entry
#, no-c-format
-msgid "{[aliasname].element.[propertyname]}"
-msgstr "{[aliasname].element.[propertyname]}"
+msgid "<literal>{[aliasname].element.[propertyname]}</literal>"
+msgstr "<literal>{[aliasname].element.[propertyname]}</literal>"
-#. Tag: literal
-#: query_sql.xml:318
+#. Tag: entry
#, no-c-format
-msgid "NAME as {coll.element.name}"
-msgstr "NAME as {coll.element.name}"
+msgid "<literal>NAME as {coll.element.name}</literal>"
+msgstr "<literal>NAME as {coll.element.name}</literal>"
#. Tag: entry
-#: query_sql.xml:322
#, no-c-format
msgid "All properties of the element in the collection"
msgstr "集合元素的所有属性"
-#. Tag: literal
-#: query_sql.xml:324
+#. Tag: entry
#, no-c-format
-msgid "{[aliasname].element.*}"
-msgstr "{[aliasname].element.*}"
+msgid "<literal>{[aliasname].element.*}</literal>"
+msgstr "<literal>{[aliasname].element.*}</literal>"
-#. Tag: literal
-#: query_sql.xml:326
+#. Tag: entry
#, no-c-format
-msgid "{coll.element.*}"
-msgstr "{coll.element.*}"
+msgid "<literal>{coll.element.*}</literal>"
+msgstr "<literal>{coll.element.*}</literal>"
#. Tag: entry
-#: query_sql.xml:330
#, no-c-format
msgid "All properties of the the collection"
msgstr "集合的所有属性"
-#. Tag: literal
-#: query_sql.xml:334
+#. Tag: entry
#, no-c-format
-msgid "{coll.*}"
-msgstr "{coll.*}"
+msgid "<literal>{coll.*}</literal>"
+msgstr "<literal>{coll.*}</literal>"
#. Tag: title
-#: query_sql.xml:343
#, no-c-format
msgid "Returning non-managed entities"
-msgstr "返回非受管实体(Returning non-managed entities)"
+msgstr "返回非受管实体(Returning non-managed entities)"
#. Tag: para
-#: query_sql.xml:345
-#, fuzzy, no-c-format
-msgid ""
-"It is possible to apply a ResultTransformer to native SQL queries, allowing "
-"it to return non-managed entities."
-msgstr ""
-"可以对原生sql 查询使用ResultTransformer。这会返回不受Hibernate管理的实体。"
-
-#. Tag: programlisting
-#: query_sql.xml:347
#, no-c-format
-msgid ""
-"<![CDATA[sess.createSQLQuery(\"SELECT NAME, BIRTHDATE FROM
CATS\")\n"
-" .setResultTransformer(Transformers.aliasToBean(CatDTO.class))]]>"
-msgstr ""
+msgid "It is possible to apply a ResultTransformer to native SQL queries, allowing
it to return non-managed entities."
+msgstr "可以对原生 sql 查询使用 ResultTransformer。这会返回不受 Hibernate 管理的实体。 "
#. Tag: para
-#: query_sql.xml:357
#, no-c-format
msgid "a result transformer"
-msgstr "结果转换器(result transformer)"
+msgstr "结果转换器(result transformer)"
#. Tag: para
-#: query_sql.xml:361
#, no-c-format
-msgid ""
-"The above query will return a list of <literal>CatDTO</literal> which
has "
-"been instantiated and injected the values of NAME and BIRTHNAME into its "
-"corresponding properties or fields."
-msgstr ""
-"上面的查询将会返回<literal>CatDTO</literal>的列表,它将被实例化并且将NAME和"
-"BIRTHDAY的值注射入对应的属性或者字段。"
+msgid "The above query will return a list of <literal>CatDTO</literal>
which has been instantiated and injected the values of NAME and BIRTHNAME into its
corresponding properties or fields."
+msgstr "上面的查询将会返回 <literal>CatDTO</literal> 的列表,它将被实例化并且将 NAME 和
BIRTHDAY 的值注射入对应的属性或者字段。"
#. Tag: title
-#: query_sql.xml:368
#, no-c-format
msgid "Handling inheritance"
msgstr "处理继承(Handling inheritance)"
#. Tag: para
-#: query_sql.xml:370
-#, fuzzy, no-c-format
-msgid ""
-"Native SQL queries which query for entities that are mapped as part of an "
-"inheritance must include all properties for the baseclass and all its "
-"subclasses."
-msgstr ""
-"原生SQL查询假若其查询结果实体是继承树中的一部分,它必须包含基类和所有子类的所"
-"有属性。"
+#, no-c-format
+msgid "Native SQL queries which query for entities that are mapped as part of an
inheritance must include all properties for the baseclass and all its subclasses."
+msgstr "原生 SQL 查询假若其查询结果实体是继承树中的一部分,它必须包含基类和所有子类的所有属性。 "
#. Tag: title
-#: query_sql.xml:376
#, no-c-format
msgid "Parameters"
msgstr "参数(Parameters)"
#. Tag: para
-#: query_sql.xml:378
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Native SQL queries support positional as well as named parameters:"
-msgstr "原生查询支持位置参数和命名参数:"
+msgstr "原生查询支持位置参数和命名参数: "
-#. Tag: programlisting
-#: query_sql.xml:381
-#, no-c-format
-msgid ""
-"<![CDATA[Query query = sess.createSQLQuery(\"SELECT * FROM CATS WHERE NAME
"
-"like ?\").addEntity(Cat.class);\n"
-"List pusList = query.setString(0, \"Pus%\").list();\n"
-" \n"
-"query = sess.createSQLQuery(\"SELECT * FROM CATS WHERE NAME like
:name\")."
-"addEntity(Cat.class);\n"
-"List pusList = query.setString(\"name\", \"Pus%\").list();
]]>"
-msgstr ""
-
#. Tag: title
-#: query_sql.xml:389
#, no-c-format
msgid "Named SQL queries"
-msgstr "命名SQL查询"
+msgstr "命名 SQL 查询"
#. Tag: para
-#: query_sql.xml:391
-#, fuzzy, no-c-format
-msgid ""
-"Named SQL queries can be defined in the mapping document and called in "
-"exactly the same way as a named HQL query. In this case, you do "
-"<emphasis>not</emphasis> need to call
<literal>addEntity()</literal>."
-msgstr ""
-"可以在映射文档中定义查询的名字,然后就可以象调用一个命名的HQL查询一样直接调用"
-"命名SQL查询.在这种情况下,我们<emphasis>不</emphasis> 需要调用"
-"<literal>addEntity()</literal>方法."
-
-#. Tag: programlisting
-#: query_sql.xml:396
#, no-c-format
-msgid ""
-"<![CDATA[<sql-query name=\"persons\">\n"
-" <return alias=\"person\"
class=\"eg.Person\"/>\n"
-" SELECT person.NAME AS {person.name},\n"
-" person.AGE AS {person.age},\n"
-" person.SEX AS {person.sex}\n"
-" FROM PERSON person\n"
-" WHERE person.NAME LIKE :namePattern\n"
-"</sql-query>]]>"
-msgstr ""
+msgid "Named SQL queries can be defined in the mapping document and called in
exactly the same way as a named HQL query. In this case, you do
<emphasis>not</emphasis> need to call
<literal>addEntity()</literal>."
+msgstr "可以在映射文档中定义查询的名字,然后就可以象调用一个命名的 HQL 查询一样直接调用命名 SQL
查询.在这种情况下,我们<emphasis>不</emphasis> 需要调用
<literal>addEntity()</literal> 方法。 "
-#. Tag: programlisting
-#: query_sql.xml:398
-#, no-c-format
-msgid ""
-"<![CDATA[List people = sess.getNamedQuery(\"persons\")\n"
-" .setString(\"namePattern\", namePattern)\n"
-" .setMaxResults(50)\n"
-" .list();]]>"
-msgstr ""
-
#. Tag: para
-#: query_sql.xml:400
-#, fuzzy, no-c-format
-msgid ""
-"The <literal><return-join></literal> element is use to
join "
-"associations and the <literal><load-collection></literal>
element is "
-"used to define queries which initialize collections,"
-msgstr ""
-"<literal><return-join></literal>和
<literal><load-collection></"
-"literal> 元素是用来连接关联以及将查询定义为预先初始化各个集合的。"
-
-#. Tag: programlisting
-#: query_sql.xml:404
#, no-c-format
-msgid ""
-"<![CDATA[<sql-query name=\"personsWith\">\n"
-" <return alias=\"person\"
class=\"eg.Person\"/>\n"
-" <return-join alias=\"address\"
property=\"person.mailingAddress\"/>\n"
-" SELECT person.NAME AS {person.name},\n"
-" person.AGE AS {person.age},\n"
-" person.SEX AS {person.sex},\n"
-" address.STREET AS {address.street},\n"
-" address.CITY AS {address.city},\n"
-" address.STATE AS {address.state},\n"
-" address.ZIP AS {address.zip}\n"
-" FROM PERSON person\n"
-" JOIN ADDRESS address\n"
-" ON person.ID = address.PERSON_ID AND
address.TYPE='MAILING'\n"
-" WHERE person.NAME LIKE :namePattern\n"
-"</sql-query>]]>"
-msgstr ""
+msgid "The <literal><return-join></literal> element is use
to join associations and the
<literal><load-collection></literal> element is used to define
queries which initialize collections,"
+msgstr "<literal><return-join></literal> 和
<literal><load-collection></literal>
元素是用来连接关联以及将查询定义为预先初始化各个集合的。 "
#. Tag: para
-#: query_sql.xml:406
#, no-c-format
-msgid ""
-"A named SQL query may return a scalar value. You must declare the column "
-"alias and Hibernate type using the
<literal><return-scalar></literal> "
-"element:"
-msgstr ""
-"一个命名查询可能会返回一个标量值.你必须使用<literal><return-scalar></"
-"literal>元素来指定字段的别名和 Hibernate类型"
+msgid "A named SQL query may return a scalar value. You must declare the column
alias and Hibernate type using the
<literal><return-scalar></literal> element:"
+msgstr "一个命名查询可能会返回一个标量值。你必须使用
<literal><return-scalar></literal> 元素来指定字段的别名和 Hibernate
类型:"
-#. Tag: programlisting
-#: query_sql.xml:410
-#, no-c-format
-msgid ""
-"<![CDATA[<sql-query name=\"mySqlQuery\">\n"
-" <return-scalar column=\"name\"
type=\"string\"/>\n"
-" <return-scalar column=\"age\"
type=\"long\"/>\n"
-" SELECT p.NAME AS name,\n"
-" p.AGE AS age,\n"
-" FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n"
-"</sql-query>]]>"
-msgstr ""
-
#. Tag: para
-#: query_sql.xml:412
-#, fuzzy, no-c-format
-msgid ""
-"You can externalize the resultset mapping information in a
<literal><"
-"resultset></literal> element which will allow you to either reuse them
"
-"across several named queries or through the
<literal>setResultSetMapping()</"
-"literal> API."
-msgstr ""
-"你可以把结果集映射的信息放在外部的<literal><resultset></literal>元素"
-"中,这样就可以在多个命名查询间,或者通过<literal>setResultSetMapping()</"
-"literal>API来访问。(此处原文即存疑。原文为:You can externalize the "
-"resultset mapping informations in a
<literal><resultset></literal> "
-"element to either reuse them accross several named queries or through the "
-"<literal>setResultSetMapping()</literal> API.)"
-
-#. Tag: programlisting
-#: query_sql.xml:417
#, no-c-format
-msgid ""
-"<![CDATA[<resultset name=\"personAddress\">\n"
-" <return alias=\"person\"
class=\"eg.Person\"/>\n"
-" <return-join alias=\"address\"
property=\"person.mailingAddress\"/>\n"
-"</resultset>\n"
-"\n"
-"<sql-query name=\"personsWith\"
resultset-ref=\"personAddress\">\n"
-" SELECT person.NAME AS {person.name},\n"
-" person.AGE AS {person.age},\n"
-" person.SEX AS {person.sex},\n"
-" address.STREET AS {address.street},\n"
-" address.CITY AS {address.city},\n"
-" address.STATE AS {address.state},\n"
-" address.ZIP AS {address.zip}\n"
-" FROM PERSON person\n"
-" JOIN ADDRESS address\n"
-" ON person.ID = address.PERSON_ID AND
address.TYPE='MAILING'\n"
-" WHERE person.NAME LIKE :namePattern\n"
-"</sql-query>]]>"
-msgstr ""
+msgid "You can externalize the resultset mapping information in a
<literal><resultset></literal> element which will allow you to
either reuse them across several named queries or through the
<literal>setResultSetMapping()</literal> API."
+msgstr "你可以把结果集映射的信息放在外部的 <literal><resultset></literal>
元素中,这样就可以在多个命名查询间,或者通过 <literal>setResultSetMapping()</literal> API 来访问。
"
#. Tag: para
-#: query_sql.xml:419
-#, fuzzy, no-c-format
-msgid ""
-"You can, alternatively, use the resultset mapping information in your hbm "
-"files directly in java code."
-msgstr "另外,你可以在java代码中直接使用hbm文件中的结果集定义信息。"
-
-#. Tag: programlisting
-#: query_sql.xml:422
#, no-c-format
-msgid ""
-"<![CDATA[List cats = sess.createSQLQuery(\n"
-" \"select {cat.*}, {kitten.*} from cats cat, cats kitten where
kitten."
-"mother = cat.id\"\n"
-" )\n"
-" .setResultSetMapping(\"catAndKitten\")\n"
-" .list();]]>"
-msgstr ""
+msgid "You can, alternatively, use the resultset mapping information in your hbm
files directly in java code."
+msgstr "另外,你可以在 java 代码中直接使用 hbm 文件中的结果集定义信息。 "
#. Tag: title
-#: query_sql.xml:425
#, no-c-format
msgid "Using return-property to explicitly specify column/alias names"
-msgstr "使用return-property来明确地指定字段/别名"
+msgstr "使用 return-property 来明确地指定字段/别名"
#. Tag: para
-#: query_sql.xml:428
-#, fuzzy, no-c-format
-msgid ""
-"You can explicitly tell Hibernate what column aliases to use with "
-"<literal><return-property></literal>, instead of using
the <literal>{}"
-"</literal>-syntax to let Hibernate inject its own aliases.For example:"
-msgstr ""
-"使用<literal><return-property></literal>你可以明确的告诉Hibernate使用哪"
-"些字段别名,这取代了使用<literal>{}</literal>-语法 来让Hibernate注入它自己的别"
-"名."
-
-#. Tag: programlisting
-#: query_sql.xml:433
#, no-c-format
-msgid ""
-"<![CDATA[<sql-query name=\"mySqlQuery\">\n"
-" <return alias=\"person\"
class=\"eg.Person\">\n"
-" <return-property name=\"name\"
column=\"myName\"/>\n"
-" <return-property name=\"age\"
column=\"myAge\"/>\n"
-" <return-property name=\"sex\"
column=\"mySex\"/>\n"
-" </return>\n"
-" SELECT person.NAME AS myName,\n"
-" person.AGE AS myAge,\n"
-" person.SEX AS mySex,\n"
-" FROM PERSON person WHERE person.NAME LIKE :name\n"
-"</sql-query>\n"
-"]]>"
-msgstr ""
+msgid "You can explicitly tell Hibernate what column aliases to use with
<literal><return-property></literal>, instead of using the
<literal>{}</literal>-syntax to let Hibernate inject its own aliases.For
example:"
+msgstr "使用 <literal><return-property></literal> 你可以明确的告诉
Hibernate 使用哪些字段别名,这取代了使用 <literal>{}</literal>-语法 来让 Hibernate
注入它自己的别名。例如:"
#. Tag: para
-#: query_sql.xml:435
-#, fuzzy, no-c-format
-msgid ""
-"<literal><return-property></literal> also works with
multiple columns. "
-"This solves a limitation with the <literal>{}</literal>-syntax which
cannot "
-"allow fine grained control of multi-column properties."
-msgstr ""
-"<literal><return-property></literal>也可用于多个字段,它解决了使用"
-"<literal>{}</literal>-语法不能细粒度控制多个字段的限制"
-
-#. Tag: programlisting
-#: query_sql.xml:440
#, no-c-format
-msgid ""
-"<![CDATA[<sql-query
name=\"organizationCurrentEmployments\">\n"
-" <return alias=\"emp\" class=\"Employment\">\n"
-" <return-property name=\"salary\">\n"
-" <return-column name=\"VALUE\"/>\n"
-" <return-column name=\"CURRENCY\"/>\n"
-" </return-property>\n"
-" <return-property name=\"endDate\"
column=\"myEndDate\"/>\n"
-" </return>\n"
-" SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n"
-" STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n"
-" REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n"
-" FROM EMPLOYMENT\n"
-" WHERE EMPLOYER = :id AND ENDDATE IS NULL\n"
-" ORDER BY STARTDATE ASC\n"
-"</sql-query>]]>"
-msgstr ""
+msgid "<literal><return-property></literal> also works
with multiple columns. This solves a limitation with the
<literal>{}</literal>-syntax which cannot allow fine grained control of
multi-column properties."
+msgstr "<literal><return-property></literal>
也可用于多个字段,它解决了使用 <literal>{}</literal>-语法不能细粒度控制多个字段的限制。 "
#. Tag: para
-#: query_sql.xml:442
-#, fuzzy, no-c-format
-msgid ""
-"In this example <literal><return-property></literal> was
used in "
-"combination with the <literal>{}</literal>-syntax for injection. This
allows "
-"users to choose how they want to refer column and properties."
-msgstr ""
-"注意在这个例子中,我们使用了<literal><return-property></literal>结合"
-"<literal>{}</literal>的注入语法. 允许用户来选择如何引用字段以及属性."
+#, no-c-format
+msgid "In this example
<literal><return-property></literal> was used in combination
with the <literal>{}</literal>-syntax for injection. This allows users to
choose how they want to refer column and properties."
+msgstr "注意在这个例子中,我们使用了
<literal><return-property></literal> 结合
<literal>{}</literal> 的注入语法。允许用户来选择如何引用字段以及属性。 "
#. Tag: para
-#: query_sql.xml:447
#, no-c-format
-msgid ""
-"If your mapping has a discriminator you must use
<literal><return-"
-"discriminator></literal> to specify the discriminator column."
-msgstr ""
-"如果你映射一个识别器(discriminator),你必须使用<literal><return-"
-"discriminator></literal> 来指定识别器字段"
+msgid "If your mapping has a discriminator you must use
<literal><return-discriminator></literal> to specify the
discriminator column."
+msgstr "如果你映射一个识别器(discriminator),你必须使用
<literal><return-discriminator></literal> 来指定识别器字段。"
#. Tag: title
-#: query_sql.xml:453
#, no-c-format
msgid "Using stored procedures for querying"
msgstr "使用存储过程来查询"
#. Tag: para
-#: query_sql.xml:455
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate3 provides support for queries via stored procedures and functions.
"
-"Most of the following documentation is equivalent for both. The stored "
-"procedure/function must return a resultset as the first out-parameter to be "
-"able to work with Hibernate. An example of such a stored function in Oracle "
-"9 and higher is as follows:"
-msgstr ""
-"Hibernate 3引入了对存储过程查询(stored procedure)和函数(function)的支持.以下"
-"的说明中,这二者一般都适用。 存储过程/函数必须返回一个结果集,作为Hibernate能"
-"够使用的第一个外部参数. 下面是一个Oracle9和更高版本的存储过程例子."
-
-#. Tag: programlisting
-#: query_sql.xml:461
#, no-c-format
-msgid ""
-"<![CDATA[CREATE OR REPLACE FUNCTION selectAllEmployments\n"
-" RETURN SYS_REFCURSOR\n"
-"AS\n"
-" st_cursor SYS_REFCURSOR;\n"
-"BEGIN\n"
-" OPEN st_cursor FOR\n"
-" SELECT EMPLOYEE, EMPLOYER,\n"
-" STARTDATE, ENDDATE,\n"
-" REGIONCODE, EID, VALUE, CURRENCY\n"
-" FROM EMPLOYMENT;\n"
-" RETURN st_cursor;\n"
-" END;]]>"
-msgstr ""
+msgid "Hibernate3 provides support for queries via stored procedures and functions.
Most of the following documentation is equivalent for both. The stored procedure/function
must return a resultset as the first out-parameter to be able to work with Hibernate. An
example of such a stored function in Oracle 9 and higher is as follows:"
+msgstr "Hibernate 3 引入了对存储过程查询(stored
procedure)和函数(function)的支持。以下的说明中,这二者一般都适用。存储过程/函数必须返回一个结果集,作为 Hibernate
能够使用的第一个外部参数。下面是一个 Oracle9 和更高版本的存储过程例子。 "
#. Tag: para
-#: query_sql.xml:463
#, no-c-format
msgid "To use this query in Hibernate you need to map it via a named query."
-msgstr "在Hibernate里要要使用这个查询,你需要通过命名查询来映射它."
+msgstr "在 Hibernate 里要要使用这个查询,你需要通过命名查询来映射它。"
-#. Tag: programlisting
-#: query_sql.xml:466
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<sql-query name=\"selectAllEmployees_SP\"
callable=\"true\">\n"
-" <return alias=\"emp\" class=\"Employment\">\n"
-" <return-property name=\"employee\"
column=\"EMPLOYEE\"/>\n"
-" <return-property name=\"employer\"
column=\"EMPLOYER\"/>\n"
-" <return-property name=\"startDate\"
column=\"STARTDATE\"/>\n"
-" <return-property name=\"endDate\"
column=\"ENDDATE\"/>\n"
-" <return-property name=\"regionCode\"
column=\"REGIONCODE\"/>\n"
-" <return-property name=\"id\"
column=\"EID\"/>\n"
-" <return-property name=\"salary\">\n"
-" <return-column name=\"VALUE\"/>\n"
-" <return-column name=\"CURRENCY\"/>\n"
-" </return-property>\n"
-" </return>\n"
-" { ? = call selectAllEmployments() }\n"
-"</sql-query>]]>"
-msgstr ""
+msgid "Stored procedures currently only return scalars and entities.
<literal><return-join></literal> and
<literal><load-collection></literal> are not supported."
+msgstr "注意存储过程当前仅仅返回标量和实体现在。不支持
<literal><return-join></literal> 和
<literal><load-collection></literal>。 "
-#. Tag: para
-#: query_sql.xml:468
-#, fuzzy, no-c-format
-msgid ""
-"Stored procedures currently only return scalars and entities.
<literal><"
-"return-join></literal> and
<literal><load-collection></literal> are "
-"not supported."
-msgstr ""
-"注意存储过程当前仅仅返回标量和实体.现在不支持<literal><return-join></"
-"literal>和<literal><load-collection></literal>"
-
#. Tag: title
-#: query_sql.xml:473
#, no-c-format
msgid "Rules/limitations for using stored procedures"
msgstr "使用存储过程的规则和限制"
#. Tag: para
-#: query_sql.xml:475
-#, fuzzy, no-c-format
-msgid ""
-"You cannot use stored procedures with Hibernate unless you follow some "
-"procedure/function rules. If they do not follow those rules they are not "
-"usable with Hibernate. If you still want to use these procedures you have to
"
-"execute them via <literal>session.connection()</literal>. The rules are
"
-"different for each database, since database vendors have different stored "
-"procedure semantics/syntax."
-msgstr ""
-"为了在Hibernate中使用存储过程,你必须遵循一些规则.不遵循这些规则的存储过程将不"
-"可用.如果你仍然想要使用他们, 你必须通过<literal>session.connection()</"
-"literal>来执行他们.这些规则针对于不同的数据库.因为数据库 提供商有各种不同的存"
-"储过程语法和语义."
+#, no-c-format
+msgid "You cannot use stored procedures with Hibernate unless you follow some
procedure/function rules. If they do not follow those rules they are not usable with
Hibernate. If you still want to use these procedures you have to execute them via
<literal>session.connection()</literal>. The rules are different for each
database, since database vendors have different stored procedure semantics/syntax."
+msgstr "为了在 Hibernate 中使用存储过程,你必须遵循一些规则。不遵循这些规则的存储过程将不可用。如果你仍然想使用他们,你必须通过
<literal>session.connection()</literal>
来执行他们。这些规则针对于不同的数据库。因为数据库提供商有各种不同的存储过程语法和语义。 "
#. Tag: para
-#: query_sql.xml:482
-#, fuzzy, no-c-format
-msgid ""
-"Stored procedure queries cannot be paged with
<literal>setFirstResult()/"
-"setMaxResults()</literal>."
-msgstr ""
-"对存储过程进行的查询无法使用<literal>setFirstResult()/setMaxResults()</"
-"literal>进行分页。"
+#, no-c-format
+msgid "Stored procedure queries cannot be paged with
<literal>setFirstResult()/setMaxResults()</literal>."
+msgstr "对存储过程进行的查询无法使用
<literal>setFirstResult()/setMaxResults()</literal> 进行分页。 "
#. Tag: para
-#: query_sql.xml:485
-#, fuzzy, no-c-format
-msgid ""
-"The recommended call form is standard SQL92: <literal>{ ? = call
functionName"
-"(<parameters>) }</literal> or <literal>{ ? = call
procedureName(<"
-"parameters>}</literal>. Native call syntax is not supported."
-msgstr ""
-"建议采用的调用方式是标准SQL92: <literal>{ ? = call functionName(<"
-"parameters>) }</literal> 或者 <literal>{ ? = call
procedureName(<"
-"parameters>}</literal>.原生调用语法不被支持。"
+#, no-c-format
+msgid "The recommended call form is standard SQL92: <literal>{ ? = call
functionName(<parameters>) }</literal> or <literal>{ ? = call
procedureName(<parameters>}</literal>. Native call syntax is not
supported."
+msgstr "建议采用的调用方式是标准 SQL92: <literal>{ ? = call
functionName(<parameters>) }</literal> 或者 <literal>{ ? = call
procedureName(<parameters>) }</literal>。原生调用语法不被支持。 "
#. Tag: para
-#: query_sql.xml:490
#, no-c-format
msgid "For Oracle the following rules apply:"
-msgstr "对于Oracle有如下规则:"
+msgstr "对于 Oracle 有如下规则:"
#. Tag: para
-#: query_sql.xml:494
-#, fuzzy, no-c-format
-msgid ""
-"A function must return a result set. The first parameter of a procedure must
"
-"be an <literal>OUT</literal> that returns a result set. This is done by
"
-"using a <literal>SYS_REFCURSOR</literal> type in Oracle 9 or 10. In
Oracle "
-"you need to define a <literal>REF CURSOR</literal> type. See Oracle
"
-"literature for further information."
-msgstr ""
-"函数必须返回一个结果集。存储过程的第一个参数必须是<literal>OUT</literal>,它"
-"返回一个结果集。这是通过Oracle 9或10的<literal>SYS_REFCURSOR</literal>类型来"
-"完成的。在Oracle中你需要定义一个<literal>REF CURSOR</literal>类型,参见Oracle"
-"的手册。"
+#, no-c-format
+msgid "A function must return a result set. The first parameter of a procedure must
be an <literal>OUT</literal> that returns a result set. This is done by using
a <literal>SYS_REFCURSOR</literal> type in Oracle 9 or 10. In Oracle you need
to define a <literal>REF CURSOR</literal> type. See Oracle literature for
further information."
+msgstr "函数必须返回一个结果集。存储过程的第一个参数必须是 <literal>OUT</literal>,它返回一个结果集。这是通过
Oracle 9 或 10 的 <literal>SYS_REFCURSOR</literal> 类型来完成的。在 Oracle 中你需要定义一个
<literal>REF CURSOR</literal> 类型,参见 Oracle 的手册。 "
#. Tag: para
-#: query_sql.xml:503
#, no-c-format
msgid "For Sybase or MS SQL server the following rules apply:"
-msgstr "对于Sybase或者MS SQL server有如下规则:"
+msgstr "对于 Sybase 或者 MS SQL server 有如下规则:"
#. Tag: para
-#: query_sql.xml:507
-#, fuzzy, no-c-format
-msgid ""
-"The procedure must return a result set. Note that since these servers can "
-"return multiple result sets and update counts, Hibernate will iterate the "
-"results and take the first result that is a result set as its return value. "
-"Everything else will be discarded."
-msgstr ""
-"存储过程必须返回一个结果集。.注意这些servers可能返回多个结果集以及更新的数目."
-"Hibernate将取出第一条结果集作为它的返回值, 其他将被丢弃。"
+#, no-c-format
+msgid "The procedure must return a result set. Note that since these servers can
return multiple result sets and update counts, Hibernate will iterate the results and take
the first result that is a result set as its return value. Everything else will be
discarded."
+msgstr "存储过程必须返回一个结果集。注意这些 servers 可能返回多个结果集以及更新的数目。Hibernate
将取出第一条结果集作为它的返回值,其他将被丢弃。 "
#. Tag: para
-#: query_sql.xml:515
#, no-c-format
-msgid ""
-"If you can enable <literal>SET NOCOUNT ON</literal> in your procedure
it "
-"will probably be more efficient, but this is not a requirement."
-msgstr ""
-"如果你能够在存储过程里设定<literal>SET NOCOUNT ON</literal>,这可能会效率更"
-"高,但这不是必需的。"
+msgid "If you can enable <literal>SET NOCOUNT ON</literal> in your
procedure it will probably be more efficient, but this is not a requirement."
+msgstr "如果你能够在存储过程里设定 <literal>SET NOCOUNT
ON</literal>,这可能会效率更高,但这不是必需的。"
#. Tag: title
-#: query_sql.xml:525
#, no-c-format
msgid "Custom SQL for create, update and delete"
-msgstr "定制SQL用来create,update和delete"
+msgstr "定制 SQL 用来 create,update 和 delete"
#. Tag: para
-#: query_sql.xml:527
#, no-c-format
-msgid ""
-"Hibernate3 can use custom SQL statements for create, update, and delete "
-"operations. The class and collection persisters in Hibernate already contain
"
-"a set of configuration time generated strings (insertsql, deletesql, "
-"updatesql etc.). The mapping tags
<literal><sql-insert></literal>, "
-"<literal><sql-delete></literal>, and
<literal><sql-update></"
-"literal> override these strings:"
-msgstr ""
-"Hibernate3能够使用定制的SQL语句来执行create,update和delete操作。在Hibernate"
-"中,持久化的类和集合已经 包含了一套配置期产生的语句(insertsql, deletesql, "
-"updatesql等等),这些映射标记 <literal><sql-insert></literal>,
"
-"<literal><sql-delete></literal>, and
<literal><sql-update></"
-"literal>重载了 这些语句。"
+msgid "Hibernate3 can use custom SQL statements for create, update, and delete
operations. The class and collection persisters in Hibernate already contain a set of
configuration time generated strings (insertsql, deletesql, updatesql etc.). The mapping
tags <literal><sql-insert></literal>,
<literal><sql-delete></literal>, and
<literal><sql-update></literal> override these strings:"
+msgstr "Hibernate3 能够使用定制的 SQL 语句来执行 create,update 和 delete 操作。在 Hibernate
中,持久化的类和集合已经包含了一套配置期产生的语句(insertsql,deletesql,updatesql 等等),这些映射标记
<literal><sql-insert></literal>,<literal><sql-delete></literal>
和 <literal><sql-update></literal> 重载了这些语句。"
-#. Tag: programlisting
-#: query_sql.xml:535
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"increment\"/>\n"
-" </id>\n"
-" <property name=\"name\" not-null=\"true\"/>\n"
-" <sql-insert>INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ?
)</sql-"
-"insert>\n"
-" <sql-update>UPDATE PERSON SET NAME=UPPER(?) WHERE
ID=?</sql-update>\n"
-" <sql-delete>DELETE FROM PERSON WHERE ID=?</sql-delete>\n"
-"</class>]]>"
-msgstr ""
+msgid "The SQL is directly executed in your database, so you can use any dialect you
like. This will reduce the portability of your mapping if you use database specific
SQL."
+msgstr "这些 SQL 直接在你的数据库里执行,所以你可以自由的使用你喜欢的任意语法。但如果你使用数据库特定的语法,这当然会降低你映射的可移植性。 "
#. Tag: para
-#: query_sql.xml:537
-#, fuzzy, no-c-format
-msgid ""
-"The SQL is directly executed in your database, so you can use any dialect "
-"you like. This will reduce the portability of your mapping if you use "
-"database specific SQL."
-msgstr ""
-"这些SQL直接在你的数据库里执行,所以你可以自由的使用你喜欢的任意语法。但如果你"
-"使用数据库特定的语法, 这当然会降低你映射的可移植性。"
+#, no-c-format
+msgid "Stored procedures are supported if the
<literal>callable</literal> attribute is set:"
+msgstr "如果设定 <literal>callable</literal>,则能够支持存储过程了。"
#. Tag: para
-#: query_sql.xml:541
#, no-c-format
-msgid ""
-"Stored procedures are supported if the <literal>callable</literal>
attribute "
-"is set:"
-msgstr "如果设定<literal>callable</literal>,则能够支持存储过程了。"
+msgid "The order of the positional parameters is vital, as they must be in the same
sequence as Hibernate expects them."
+msgstr "参数的位置顺序是非常重要的,他们必须和 Hibernate 所期待的顺序相同。 "
-#. Tag: programlisting
-#: query_sql.xml:544
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"increment\"/>\n"
-" </id>\n"
-" <property name=\"name\" not-null=\"true\"/>\n"
-" <sql-insert callable=\"true\">{call createPerson (?,
?)}</sql-insert>\n"
-" <sql-delete callable=\"true\">{? = call deletePerson
(?)}</sql-delete>\n"
-" <sql-update callable=\"true\">{? = call updatePerson (?,
?)}</sql-"
-"update>\n"
-"</class>]]>"
-msgstr ""
+msgid "You can view the expected order by enabling debug logging for the
<literal>org.hibernate.persister.entity</literal> level. With this level
enabled, Hibernate will print out the static SQL that is used to create, update, delete
etc. entities. To view the expected sequence, do not include your custom SQL in the
mapping files, as this will override the Hibernate generated static SQL."
+msgstr "你能够通过设定日志调试级别为 <literal>org.hiberante.persister.entity</literal>
来查看 Hibernate 所期待的顺序。在这个级别下,Hibernate 将会打印出create,update 和 delete 实体的静态
SQL。(如果想看到预计的顺序。记得不要将定制 SQL 包含在映射文件里,因为他们会重载 Hibernate 生成的静态 SQL。) "
#. Tag: para
-#: query_sql.xml:546
-#, fuzzy, no-c-format
-msgid ""
-"The order of the positional parameters is vital, as they must be in the same
"
-"sequence as Hibernate expects them."
-msgstr "参数的位置顺序是非常重要的,他们必须和Hibernate所期待的顺序相同。"
-
-#. Tag: para
-#: query_sql.xml:549
-#, fuzzy, no-c-format
-msgid ""
-"You can view the expected order by enabling debug logging for the "
-"<literal>org.hibernate.persister.entity</literal> level. With this
level "
-"enabled, Hibernate will print out the static SQL that is used to create, "
-"update, delete etc. entities. To view the expected sequence, do not include "
-"your custom SQL in the mapping files, as this will override the Hibernate "
-"generated static SQL."
-msgstr ""
-"你能够通过设定日志调试级别为<literal>org.hiberante.persister.entity</"
-"literal>,来查看Hibernate所期待的顺序。在这个级别下, Hibernate将会打印出"
-"create,update和delete实体的静态SQL。(如果想看到预计的顺序。记得不要将定制SQL"
-"包含在映射文件里, 因为他们会重载Hibernate生成的静态SQL。)"
-
-#. Tag: para
-#: query_sql.xml:556
-#, fuzzy, no-c-format
-msgid ""
-"The stored procedures are in most cases required to return the number of "
-"rows inserted, updated and deleted, as Hibernate has some runtime checks for
"
-"the success of the statement. Hibernate always registers the first statement
"
-"parameter as a numeric output parameter for the CUD operations:"
-msgstr ""
-"在大多数情况下(最好这么做),存储过程需要返回插入/更新/删除的行数,因为"
-"Hibernate对语句的成功执行有些运行时的检查。 Hibernate常会把进行CUD操作的语句"
-"的第一个参数注册为一个数值型输出参数。"
-
-#. Tag: programlisting
-#: query_sql.xml:562
#, no-c-format
-msgid ""
-"<![CDATA[CREATE OR REPLACE FUNCTION updatePerson (uid IN NUMBER, uname IN
"
-"VARCHAR2)\n"
-" RETURN NUMBER IS\n"
-"BEGIN\n"
-"\n"
-" update PERSON\n"
-" set\n"
-" NAME = uname,\n"
-" where\n"
-" ID = uid;\n"
-"\n"
-" return SQL%ROWCOUNT;\n"
-"\n"
-"END updatePerson;]]>"
-msgstr ""
+msgid "The stored procedures are in most cases required to return the number of rows
inserted, updated and deleted, as Hibernate has some runtime checks for the success of the
statement. Hibernate always registers the first statement parameter as a numeric output
parameter for the CUD operations:"
+msgstr "在大多数情况下(最好这么做),存储过程需要返回插入/更新/删除的行数,因为 Hibernate 对语句的成功执行有些运行时的检查。Hibernate
常会把进行 CUD 操作的语句的第一个参数注册为一个数值型输出参数。 "
#. Tag: title
-#: query_sql.xml:566
#, no-c-format
msgid "Custom SQL for loading"
-msgstr "定制装载SQL"
+msgstr "定制装载 SQL"
#. Tag: para
-#: query_sql.xml:568
-#, fuzzy, no-c-format
+#, no-c-format
msgid "You can also declare your own SQL (or HQL) queries for entity loading:"
-msgstr "你可能需要声明你自己的SQL(或HQL)来装载实体"
+msgstr "你可能需要声明你自己的 SQL(或 HQL)来装载实体:"
-#. Tag: programlisting
-#: query_sql.xml:571
-#, no-c-format
-msgid ""
-"<![CDATA[<sql-query name=\"person\">\n"
-" <return alias=\"pers\" class=\"Person\"
lock-mode=\"upgrade\"/>\n"
-" SELECT NAME AS {pers.name}, ID AS {pers.id}\n"
-" FROM PERSON\n"
-" WHERE ID=?\n"
-" FOR UPDATE\n"
-"</sql-query>]]>"
-msgstr ""
-
#. Tag: para
-#: query_sql.xml:573
-#, fuzzy, no-c-format
-msgid ""
-"This is just a named query declaration, as discussed earlier. You can "
-"reference this named query in a class mapping:"
-msgstr "这只是一个前面讨论过的命名查询声明,你可以在类映射里引用这个命名查询。"
-
-#. Tag: programlisting
-#: query_sql.xml:576
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\">\n"
-" <id name=\"id\">\n"
-" <generator class=\"increment\"/>\n"
-" </id>\n"
-" <property name=\"name\" not-null=\"true\"/>\n"
-" <loader query-ref=\"person\"/>\n"
-"</class>]]>"
-msgstr ""
+msgid "This is just a named query declaration, as discussed earlier. You can
reference this named query in a class mapping:"
+msgstr "这只是一个前面讨论过的命名查询声明,你可以在类映射里引用这个命名查询。 "
#. Tag: para
-#: query_sql.xml:578
#, no-c-format
msgid "This even works with stored procedures."
msgstr "这也可以用于存储过程"
#. Tag: para
-#: query_sql.xml:580
-#, fuzzy, no-c-format
+#, no-c-format
msgid "You can even define a query for collection loading:"
-msgstr "你甚至可以定一个用于集合装载的查询:"
+msgstr "你甚至可以定一个用于集合装载的查询: "
-#. Tag: programlisting
-#: query_sql.xml:582
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<set name=\"employments\"
inverse=\"true\">\n"
-" <key/>\n"
-" <one-to-many class=\"Employment\"/>\n"
-" <loader query-ref=\"employments\"/>\n"
-"</set>]]>"
-msgstr ""
+msgid "You can also define an entity loader that loads a collection by join
fetching:"
+msgstr "你甚至还可以定义一个实体装载器,它通过连接抓取装载一个集合: "
-#. Tag: programlisting
-#: query_sql.xml:584
-#, no-c-format
-msgid ""
-"<![CDATA[<sql-query name=\"employments\">\n"
-" <load-collection alias=\"emp\"
role=\"Person.employments\"/>\n"
-" SELECT {emp.*}\n"
-" FROM EMPLOYMENT emp\n"
-" WHERE EMPLOYER = :id\n"
-" ORDER BY STARTDATE ASC, EMPLOYEE ASC\n"
-"</sql-query>]]>"
-msgstr ""
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[sess.createSQLQuery(\"SELECT * FROM
CATS\").list();\n"
+#~ "sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE FROM
CATS\").list();\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "sess.createSQLQuery(\"SELECT * FROM CATS\").list();\n"
+#~ "sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE FROM
CATS\").list();"
-#. Tag: para
-#: query_sql.xml:586
-#, fuzzy, no-c-format
-msgid ""
-"You can also define an entity loader that loads a collection by join "
-"fetching:"
-msgstr "你甚至还可以定义一个实体装载器,它通过连接抓取装载一个集合:"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\")\n"
+#~ " .addScalar(\"ID\", Hibernate.LONG)\n"
+#~ " .addScalar(\"NAME\", Hibernate.STRING)\n"
+#~ " .addScalar(\"BIRTHDATE\", Hibernate.DATE)\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "sess.createSQLQuery(\"SELECT * FROM CATS\")\n"
+#~ " .addScalar(\"ID\", Hibernate.LONG)\n"
+#~ " .addScalar(\"NAME\", Hibernate.STRING)\n"
+#~ " .addScalar(\"BIRTHDATE\", Hibernate.DATE)"
-#. Tag: programlisting
-#: query_sql.xml:589
-#, no-c-format
-msgid ""
-"<![CDATA[<sql-query name=\"person\">\n"
-" <return alias=\"pers\" class=\"Person\"/>\n"
-" <return-join alias=\"emp\"
property=\"pers.employments\"/>\n"
-" SELECT NAME AS {pers.*}, {emp.*}\n"
-" FROM PERSON pers\n"
-" LEFT OUTER JOIN EMPLOYMENT emp\n"
-" ON pers.ID = emp.PERSON_ID\n"
-" WHERE ID=?\n"
-"</sql-query>]]>"
-msgstr ""
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[sess.createSQLQuery(\"SELECT * FROM CATS\")\n"
+#~ " .addScalar(\"ID\", Hibernate.LONG)\n"
+#~ " .addScalar(\"NAME\")\n"
+#~ " .addScalar(\"BIRTHDATE\")\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "sess.createSQLQuery(\"SELECT * FROM CATS\")\n"
+#~ " .addScalar(\"ID\", Hibernate.LONG)\n"
+#~ " .addScalar(\"NAME\")\n"
+#~ " .addScalar(\"BIRTHDATE\")"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[sess.createSQLQuery(\"SELECT * FROM
CATS\").addEntity(Cat."
+#~ "class);\n"
+#~ "sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE FROM
CATS\").addEntity"
+#~ "(Cat.class);\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "sess.createSQLQuery(\"SELECT * FROM
CATS\").addEntity(Cat.class);\n"
+#~ "sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE FROM
CATS\").addEntity"
+#~ "(Cat.class);"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE, DOG_ID FROM
"
+#~ "CATS\").addEntity(Cat.class);\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE, DOG_ID FROM
CATS\")."
+#~ "addEntity(Cat.class);"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[sess.createSQLQuery(\"SELECT c.ID, NAME, BIRTHDATE, DOG_ID,
"
+#~ "D_ID, D_NAME FROM CATS c, DOGS d WHERE c.DOG_ID = d.D_ID\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ " .addJoin(\"cat.dog\");\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "sess.createSQLQuery(\"SELECT c.ID, NAME, BIRTHDATE, DOG_ID, D_ID, D_NAME
"
+#~ "FROM CATS c, DOGS d \n"
+#~ " WHERE c.DOG_ID = d.D_ID\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ " .addJoin(\"cat.dog\");"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE, D_ID, D_NAME,
"
+#~ "CAT_ID FROM CATS c, DOGS d WHERE c.ID = d.CAT_ID\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ " .addJoin(\"cat.dogs\");\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "sess.createSQLQuery(\"SELECT ID, NAME, BIRTHDATE, D_ID, D_NAME, CAT_ID
"
+#~ "FROM CATS c, DOGS d\n"
+#~ " WHERE c.ID = d.CAT_ID\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ " .addJoin(\"cat.dogs\");"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[sess.createSQLQuery(\"SELECT c.*, m.* FROM CATS c, CATS m
WHERE "
+#~ "c.MOTHER_ID = c.ID\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ " .addEntity(\"mother\", Cat.class)\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "sess.createSQLQuery(\"SELECT c.*, m.* FROM CATS c, CATS m WHERE c."
+#~ "MOTHER_ID = c.ID\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ " .addEntity(\"mother\", Cat.class)"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[sess.createSQLQuery(\"SELECT {cat.*}, {mother.*} FROM CATS c,
"
+#~ "CATS m WHERE c.MOTHER_ID = c.ID\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ " .addEntity(\"mother\", Cat.class)\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "sess.createSQLQuery(\"SELECT {cat.*}, {mother.*} FROM CATS c, CATS m
"
+#~ "WHERE c.MOTHER_ID = c.ID\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ " .addEntity(\"mother\", Cat.class)"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" +
\n"
+#~ " \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother},
{mother."
+#~ "*} \" +\n"
+#~ " \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} =
c.ID\";\n"
+#~ "\n"
+#~ "List loggedCats = sess.createSQLQuery(sql)\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ " .addEntity(\"mother\", Cat.class).list()\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "String sql = \"SELECT ID as {c.id}, NAME as {c.name}, \" + \n"
+#~ " \"BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother},
{mother."
+#~ "*} \" +\n"
+#~ " \"FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} =
c.ID\";\n"
+#~ "\n"
+#~ "List loggedCats = sess.createSQLQuery(sql)\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ " .addEntity(\"mother\", Cat.class).list()"
+#~ msgid "{item.*}"
+#~ msgstr "{item.*}"
+#~ msgid "{coll.*}"
+#~ msgstr "{coll.*}"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[sess.createSQLQuery(\"SELECT NAME, BIRTHDATE FROM
CATS\")\n"
+#~ "
.setResultTransformer(Transformers.aliasToBean(CatDTO.class))]]>"
+#~ msgstr ""
+#~ "sess.createSQLQuery(\"SELECT NAME, BIRTHDATE FROM CATS\")\n"
+#~ " .setResultTransformer(Transformers.aliasToBean(CatDTO.class))"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[Query query = sess.createSQLQuery(\"SELECT * FROM CATS WHERE
"
+#~ "NAME like ?\").addEntity(Cat.class);\n"
+#~ "List pusList = query.setString(0, \"Pus%\").list();\n"
+#~ " \n"
+#~ "query = sess.createSQLQuery(\"SELECT * FROM CATS WHERE NAME like
:name\")."
+#~ "addEntity(Cat.class);\n"
+#~ "List pusList = query.setString(\"name\", \"Pus%\").list();
]]>"
+#~ msgstr ""
+#~ "Query query = sess.createSQLQuery(\"SELECT * FROM CATS WHERE NAME like
?"
+#~ "\").addEntity(Cat.class);\n"
+#~ "List pusList = query.setString(0, \"Pus%\").list();\n"
+#~ " \n"
+#~ "query = sess.createSQLQuery(\"SELECT * FROM CATS WHERE NAME like
:name\")."
+#~ "addEntity(Cat.class);\n"
+#~ "List pusList = query.setString(\"name\",
\"Pus%\").list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<sql-query name=\"persons\">\n"
+#~ " <return alias=\"person\"
class=\"eg.Person\"/>\n"
+#~ " SELECT person.NAME AS {person.name},\n"
+#~ " person.AGE AS {person.age},\n"
+#~ " person.SEX AS {person.sex}\n"
+#~ " FROM PERSON person\n"
+#~ " WHERE person.NAME LIKE :namePattern\n"
+#~ "</sql-query>]]>"
+#~ msgstr ""
+#~ "<sql-query name=\"persons\">\n"
+#~ " <return alias=\"person\"
class=\"eg.Person\"/>\n"
+#~ " SELECT person.NAME AS {person.name},\n"
+#~ " person.AGE AS {person.age},\n"
+#~ " person.SEX AS {person.sex}\n"
+#~ " FROM PERSON person\n"
+#~ " WHERE person.NAME LIKE :namePattern\n"
+#~ "</sql-query>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List people = sess.getNamedQuery(\"persons\")\n"
+#~ " .setString(\"namePattern\", namePattern)\n"
+#~ " .setMaxResults(50)\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List people = sess.getNamedQuery(\"persons\")\n"
+#~ " .setString(\"namePattern\", namePattern)\n"
+#~ " .setMaxResults(50)\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<sql-query name=\"personsWith\">\n"
+#~ " <return alias=\"person\"
class=\"eg.Person\"/>\n"
+#~ " <return-join alias=\"address\"
property=\"person.mailingAddress\"/>\n"
+#~ " SELECT person.NAME AS {person.name},\n"
+#~ " person.AGE AS {person.age},\n"
+#~ " person.SEX AS {person.sex},\n"
+#~ " address.STREET AS {address.street},\n"
+#~ " address.CITY AS {address.city},\n"
+#~ " address.STATE AS {address.state},\n"
+#~ " address.ZIP AS {address.zip}\n"
+#~ " FROM PERSON person\n"
+#~ " JOIN ADDRESS address\n"
+#~ " ON person.ID = address.PERSON_ID AND
address.TYPE='MAILING'\n"
+#~ " WHERE person.NAME LIKE :namePattern\n"
+#~ "</sql-query>]]>"
+#~ msgstr ""
+#~ "<sql-query name=\"personsWith\">\n"
+#~ " <return alias=\"person\"
class=\"eg.Person\"/>\n"
+#~ " <return-join alias=\"address\"
property=\"person.mailingAddress\"/"
+#~ ">\n"
+#~ " SELECT person.NAME AS {person.name},\n"
+#~ " person.AGE AS {person.age},\n"
+#~ " person.SEX AS {person.sex},\n"
+#~ " adddress.STREET AS {address.street},\n"
+#~ " adddress.CITY AS {address.city},\n"
+#~ " adddress.STATE AS {address.state},\n"
+#~ " adddress.ZIP AS {address.zip}\n"
+#~ " FROM PERSON person\n"
+#~ " JOIN ADDRESS adddress\n"
+#~ " ON person.ID = address.PERSON_ID AND
address.TYPE='MAILING'\n"
+#~ " WHERE person.NAME LIKE :namePattern\n"
+#~ "</sql-query>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<sql-query name=\"mySqlQuery\">\n"
+#~ " <return-scalar column=\"name\"
type=\"string\"/>\n"
+#~ " <return-scalar column=\"age\"
type=\"long\"/>\n"
+#~ " SELECT p.NAME AS name,\n"
+#~ " p.AGE AS age,\n"
+#~ " FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n"
+#~ "</sql-query>]]>"
+#~ msgstr ""
+#~ "<sql-query name=\"mySqlQuery\">\n"
+#~ " <return-scalar column=\"name\"
type=\"string\"/>\n"
+#~ " <return-scalar column=\"age\"
type=\"long\"/>\n"
+#~ " SELECT p.NAME AS name,\n"
+#~ " p.AGE AS age,\n"
+#~ " FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n"
+#~ "</sql-query>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<resultset name=\"personAddress\">\n"
+#~ " <return alias=\"person\"
class=\"eg.Person\"/>\n"
+#~ " <return-join alias=\"address\"
property=\"person.mailingAddress\"/>\n"
+#~ "</resultset>\n"
+#~ "\n"
+#~ "<sql-query name=\"personsWith\"
resultset-ref=\"personAddress\">\n"
+#~ " SELECT person.NAME AS {person.name},\n"
+#~ " person.AGE AS {person.age},\n"
+#~ " person.SEX AS {person.sex},\n"
+#~ " address.STREET AS {address.street},\n"
+#~ " address.CITY AS {address.city},\n"
+#~ " address.STATE AS {address.state},\n"
+#~ " address.ZIP AS {address.zip}\n"
+#~ " FROM PERSON person\n"
+#~ " JOIN ADDRESS address\n"
+#~ " ON person.ID = address.PERSON_ID AND
address.TYPE='MAILING'\n"
+#~ " WHERE person.NAME LIKE :namePattern\n"
+#~ "</sql-query>]]>"
+#~ msgstr ""
+#~ "<resultset name=\"personAddress\">\n"
+#~ " <return alias=\"person\"
class=\"eg.Person\"/>\n"
+#~ " <return-join alias=\"address\"
property=\"person.mailingAddress\"/"
+#~ ">\n"
+#~ "</resultset>\n"
+#~ "\n"
+#~ "<sql-query name=\"personsWith\"
resultset-ref=\"personAddress\">\n"
+#~ " SELECT person.NAME AS {person.name},\n"
+#~ " person.AGE AS {person.age},\n"
+#~ " person.SEX AS {person.sex},\n"
+#~ " adddress.STREET AS {address.street},\n"
+#~ " adddress.CITY AS {address.city},\n"
+#~ " adddress.STATE AS {address.state},\n"
+#~ " adddress.ZIP AS {address.zip}\n"
+#~ " FROM PERSON person\n"
+#~ " JOIN ADDRESS adddress\n"
+#~ " ON person.ID = address.PERSON_ID AND
address.TYPE='MAILING'\n"
+#~ " WHERE person.NAME LIKE :namePattern\n"
+#~ "</sql-query>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[List cats = sess.createSQLQuery(\n"
+#~ " \"select {cat.*}, {kitten.*} from cats cat, cats kitten where
"
+#~ "kitten.mother = cat.id\"\n"
+#~ " )\n"
+#~ " .setResultSetMapping(\"catAndKitten\")\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "List cats = sess.createSQLQuery(\n"
+#~ " \"select {cat.*}, {kitten.*} from cats cat, cats kitten where
"
+#~ "kitten.mother = cat.id\"\n"
+#~ " )\n"
+#~ " .setResultSetMapping(\"catAndKitten\")\n"
+#~ " .list();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<sql-query name=\"mySqlQuery\">\n"
+#~ " <return alias=\"person\"
class=\"eg.Person\">\n"
+#~ " <return-property name=\"name\"
column=\"myName\"/>\n"
+#~ " <return-property name=\"age\"
column=\"myAge\"/>\n"
+#~ " <return-property name=\"sex\"
column=\"mySex\"/>\n"
+#~ " </return>\n"
+#~ " SELECT person.NAME AS myName,\n"
+#~ " person.AGE AS myAge,\n"
+#~ " person.SEX AS mySex,\n"
+#~ " FROM PERSON person WHERE person.NAME LIKE :name\n"
+#~ "</sql-query>\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "<sql-query name=\"mySqlQuery\">\n"
+#~ " <return alias=\"person\"
class=\"eg.Person\">\n"
+#~ " <return-property name=\"name\"
column=\"myName\"/>\n"
+#~ " <return-property name=\"age\"
column=\"myAge\"/>\n"
+#~ " <return-property name=\"sex\"
column=\"mySex\"/>\n"
+#~ " </return>\n"
+#~ " SELECT person.NAME AS myName,\n"
+#~ " person.AGE AS myAge,\n"
+#~ " person.SEX AS mySex,\n"
+#~ " FROM PERSON person WHERE person.NAME LIKE :name\n"
+#~ "</sql-query>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<sql-query
name=\"organizationCurrentEmployments\">\n"
+#~ " <return alias=\"emp\"
class=\"Employment\">\n"
+#~ " <return-property name=\"salary\">\n"
+#~ " <return-column name=\"VALUE\"/>\n"
+#~ " <return-column name=\"CURRENCY\"/>\n"
+#~ " </return-property>\n"
+#~ " <return-property name=\"endDate\"
column=\"myEndDate\"/>\n"
+#~ " </return>\n"
+#~ " SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n"
+#~ " STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n"
+#~ " REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE,
CURRENCY\n"
+#~ " FROM EMPLOYMENT\n"
+#~ " WHERE EMPLOYER = :id AND ENDDATE IS NULL\n"
+#~ " ORDER BY STARTDATE ASC\n"
+#~ "</sql-query>]]>"
+#~ msgstr ""
+#~ "<sql-query
name=\"organizationCurrentEmployments\">\n"
+#~ " <return alias=\"emp\"
class=\"Employment\">\n"
+#~ " <return-property name=\"salary\">\n"
+#~ " <return-column name=\"VALUE\"/>\n"
+#~ " <return-column name=\"CURRENCY\"/>\n"
+#~ " </return-property>\n"
+#~ " <return-property name=\"endDate\"
column=\"myEndDate\"/>\n"
+#~ " </return>\n"
+#~ " SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n"
+#~ " STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n"
+#~ " REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE,
CURRENCY\n"
+#~ " FROM EMPLOYMENT\n"
+#~ " WHERE EMPLOYER = :id AND ENDDATE IS NULL\n"
+#~ " ORDER BY STARTDATE ASC\n"
+#~ "</sql-query>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[CREATE OR REPLACE FUNCTION selectAllEmployments\n"
+#~ " RETURN SYS_REFCURSOR\n"
+#~ "AS\n"
+#~ " st_cursor SYS_REFCURSOR;\n"
+#~ "BEGIN\n"
+#~ " OPEN st_cursor FOR\n"
+#~ " SELECT EMPLOYEE, EMPLOYER,\n"
+#~ " STARTDATE, ENDDATE,\n"
+#~ " REGIONCODE, EID, VALUE, CURRENCY\n"
+#~ " FROM EMPLOYMENT;\n"
+#~ " RETURN st_cursor;\n"
+#~ " END;]]>"
+#~ msgstr ""
+#~ "CREATE OR REPLACE FUNCTION selectAllEmployments\n"
+#~ " RETURN SYS_REFCURSOR\n"
+#~ "AS\n"
+#~ " st_cursor SYS_REFCURSOR;\n"
+#~ "BEGIN\n"
+#~ " OPEN st_cursor FOR\n"
+#~ " SELECT EMPLOYEE, EMPLOYER,\n"
+#~ " STARTDATE, ENDDATE,\n"
+#~ " REGIONCODE, EID, VALUE, CURRENCY\n"
+#~ " FROM EMPLOYMENT;\n"
+#~ " RETURN st_cursor;\n"
+#~ " END;"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<sql-query name=\"selectAllEmployees_SP\"
callable=\"true\">\n"
+#~ " <return alias=\"emp\"
class=\"Employment\">\n"
+#~ " <return-property name=\"employee\"
column=\"EMPLOYEE\"/>\n"
+#~ " <return-property name=\"employer\"
column=\"EMPLOYER\"/>\n"
+#~ " <return-property name=\"startDate\"
column=\"STARTDATE\"/>\n"
+#~ " <return-property name=\"endDate\"
column=\"ENDDATE\"/>\n"
+#~ " <return-property name=\"regionCode\"
column=\"REGIONCODE\"/>\n"
+#~ " <return-property name=\"id\"
column=\"EID\"/>\n"
+#~ " <return-property name=\"salary\">\n"
+#~ " <return-column name=\"VALUE\"/>\n"
+#~ " <return-column name=\"CURRENCY\"/>\n"
+#~ " </return-property>\n"
+#~ " </return>\n"
+#~ " { ? = call selectAllEmployments() }\n"
+#~ "</sql-query>]]>"
+#~ msgstr ""
+#~ "<sql-query name=\"selectAllEmployees_SP\"
callable=\"true\">\n"
+#~ " <return alias=\"emp\"
class=\"Employment\">\n"
+#~ " <return-property name=\"employee\"
column=\"EMPLOYEE\"/>\n"
+#~ " <return-property name=\"employer\"
column=\"EMPLOYER\"/>\n"
+#~ " <return-property name=\"startDate\"
column=\"STARTDATE\"/>\n"
+#~ " <return-property name=\"endDate\"
column=\"ENDDATE\"/>\n"
+#~ " <return-property name=\"regionCode\"
column=\"REGIONCODE\"/"
+#~ ">\n"
+#~ " <return-property name=\"id\"
column=\"EID\"/>\n"
+#~ " <return-property name=\"salary\">\n"
+#~ " <return-column name=\"VALUE\"/>\n"
+#~ " <return-column name=\"CURRENCY\"/>\n"
+#~ " </return-property>\n"
+#~ " </return>\n"
+#~ " { ? = call selectAllEmployments() }\n"
+#~ "</sql-query>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"increment\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"
not-null=\"true\"/>\n"
+#~ " <sql-insert>INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ?
)</sql-"
+#~ "insert>\n"
+#~ " <sql-update>UPDATE PERSON SET NAME=UPPER(?) WHERE
ID=?</sql-update>\n"
+#~ " <sql-delete>DELETE FROM PERSON WHERE ID=?</sql-delete>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Person\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"increment\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"
not-null=\"true\"/>\n"
+#~ " <sql-insert>INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ?
)"
+#~ "</sql-insert>\n"
+#~ " <sql-update>UPDATE PERSON SET NAME=UPPER(?) WHERE
ID=?</sql-"
+#~ "update>\n"
+#~ " <sql-delete>DELETE FROM PERSON WHERE
ID=?</sql-delete>\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"increment\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"
not-null=\"true\"/>\n"
+#~ " <sql-insert callable=\"true\">{call createPerson (?,
?)}</sql-"
+#~ "insert>\n"
+#~ " <sql-delete callable=\"true\">{? = call deletePerson
(?)}</sql-"
+#~ "delete>\n"
+#~ " <sql-update callable=\"true\">{? = call updatePerson (?,
?)}</sql-"
+#~ "update>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Person\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"increment\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"
not-null=\"true\"/>\n"
+#~ " <sql-insert callable=\"true\">{call createPerson (?,
?)}</"
+#~ "sql-insert>\n"
+#~ " <sql-delete callable=\"true\">{? = call deletePerson
(?)}</"
+#~ "sql-delete>\n"
+#~ " <sql-update callable=\"true\">{? = call updatePerson
(?, ?)}"
+#~ "</sql-update>\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[CREATE OR REPLACE FUNCTION updatePerson (uid IN NUMBER, uname IN
"
+#~ "VARCHAR2)\n"
+#~ " RETURN NUMBER IS\n"
+#~ "BEGIN\n"
+#~ "\n"
+#~ " update PERSON\n"
+#~ " set\n"
+#~ " NAME = uname,\n"
+#~ " where\n"
+#~ " ID = uid;\n"
+#~ "\n"
+#~ " return SQL%ROWCOUNT;\n"
+#~ "\n"
+#~ "END updatePerson;]]>"
+#~ msgstr ""
+#~ "CREATE OR REPLACE FUNCTION updatePerson (uid IN NUMBER, uname IN "
+#~ "VARCHAR2)\n"
+#~ " RETURN NUMBER IS\n"
+#~ "BEGIN\n"
+#~ "\n"
+#~ " update PERSON\n"
+#~ " set\n"
+#~ " NAME = uname,\n"
+#~ " where\n"
+#~ " ID = uid;\n"
+#~ "\n"
+#~ " return SQL%ROWCOUNT;\n"
+#~ "\n"
+#~ "END updatePerson;"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<sql-query name=\"person\">\n"
+#~ " <return alias=\"pers\" class=\"Person\"
lock-mode=\"upgrade\"/>\n"
+#~ " SELECT NAME AS {pers.name}, ID AS {pers.id}\n"
+#~ " FROM PERSON\n"
+#~ " WHERE ID=?\n"
+#~ " FOR UPDATE\n"
+#~ "</sql-query>]]>"
+#~ msgstr ""
+#~ "<sql-query name=\"person\">\n"
+#~ " <return alias=\"pers\" class=\"Person\"
lock-mode=\"upgrade\"/"
+#~ ">\n"
+#~ " SELECT NAME AS {pers.name}, ID AS {pers.id}\n"
+#~ " FROM PERSON\n"
+#~ " WHERE ID=?\n"
+#~ " FOR UPDATE\n"
+#~ "</sql-query>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Person\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"increment\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"
not-null=\"true\"/>\n"
+#~ " <loader query-ref=\"person\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Person\">\n"
+#~ " <id name=\"id\">\n"
+#~ " <generator class=\"increment\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"name\"
not-null=\"true\"/>\n"
+#~ " <loader query-ref=\"person\"/>\n"
+#~ "</class>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<set name=\"employments\"
inverse=\"true\">\n"
+#~ " <key/>\n"
+#~ " <one-to-many class=\"Employment\"/>\n"
+#~ " <loader query-ref=\"employments\"/>\n"
+#~ "</set>]]>"
+#~ msgstr ""
+#~ "<set name=\"employments\"
inverse=\"true\">\n"
+#~ " <key/>\n"
+#~ " <one-to-many class=\"Employment\"/>\n"
+#~ " <loader query-ref=\"employments\"/>\n"
+#~ "</set>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<sql-query name=\"employments\">\n"
+#~ " <load-collection alias=\"emp\"
role=\"Person.employments\"/>\n"
+#~ " SELECT {emp.*}\n"
+#~ " FROM EMPLOYMENT emp\n"
+#~ " WHERE EMPLOYER = :id\n"
+#~ " ORDER BY STARTDATE ASC, EMPLOYEE ASC\n"
+#~ "</sql-query>]]>"
+#~ msgstr ""
+#~ "<sql-query name=\"employments\">\n"
+#~ " <load-collection alias=\"emp\"
role=\"Person.employments\"/>\n"
+#~ " SELECT {emp.*}\n"
+#~ " FROM EMPLOYMENT emp\n"
+#~ " WHERE EMPLOYER = :id\n"
+#~ " ORDER BY STARTDATE ASC, EMPLOYEE ASC\n"
+#~ "</sql-query>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<sql-query name=\"person\">\n"
+#~ " <return alias=\"pers\" class=\"Person\"/>\n"
+#~ " <return-join alias=\"emp\"
property=\"pers.employments\"/>\n"
+#~ " SELECT NAME AS {pers.*}, {emp.*}\n"
+#~ " FROM PERSON pers\n"
+#~ " LEFT OUTER JOIN EMPLOYMENT emp\n"
+#~ " ON pers.ID = emp.PERSON_ID\n"
+#~ " WHERE ID=?\n"
+#~ "</sql-query>]]>"
+#~ msgstr ""
+#~ "<sql-query name=\"person\">\n"
+#~ " <return alias=\"pers\"
class=\"Person\"/>\n"
+#~ " <return-join alias=\"emp\"
property=\"pers.employments\"/>\n"
+#~ " SELECT NAME AS {pers.*}, {emp.*}\n"
+#~ " FROM PERSON pers\n"
+#~ " LEFT OUTER JOIN EMPLOYMENT emp\n"
+#~ " ON pers.ID = emp.PERSON_ID\n"
+#~ " WHERE ID=?\n"
+#~ "</sql-query>"
+
Deleted:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/quickstart.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/quickstart.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/quickstart.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,12 +0,0 @@
-#, fuzzy
-msgid ""
-msgstr ""
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Content-Type: text/plain; charset=utf-8\n"
-msgid "ROLES_OF_TRANSLATORS"
-msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-msgid "CREDIT_FOR_TRANSLATORS"
-msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
-
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/session_api.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/session_api.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/session_api.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,2125 +1,1343 @@
+# translation of session_api.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007, 2009.
+# translation of Collection_Mapping.po to
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: session_api\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:27\n"
+"PO-Revision-Date: 2009-12-04 14:00+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: session_api.xml:29
#, no-c-format
msgid "Working with objects"
msgstr "与对象共事"
#. Tag: para
-#: session_api.xml:31
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate is a full object/relational mapping solution that not only shields
"
-"the developer from the details of the underlying database management system,
"
-"but also offers <emphasis>state management</emphasis> of objects. This
is, "
-"contrary to the management of SQL <literal>statements</literal> in
common "
-"JDBC/SQL persistence layers, a natural object-oriented view of persistence "
-"in Java applications."
-msgstr ""
-"Hibernate是完整的对象/关系映射解决方案,它提供了对象<emphasis>状态管理(state "
-"management)</emphasis>的功能,使开发者不再需要理会底层数据库系统的细节。 也就"
-"是说,相对于常见的JDBC/SQL持久层方案中需要<literal>管理SQL语句</literal>,"
-"Hibernate采用了更自然的面向对象的视角来持久化Java应用中的数据。"
+#, no-c-format
+msgid "Hibernate is a full object/relational mapping solution that not only shields
the developer from the details of the underlying database management system, but also
offers <emphasis>state management</emphasis> of objects. This is, contrary to
the management of SQL <literal>statements</literal> in common JDBC/SQL
persistence layers, a natural object-oriented view of persistence in Java
applications."
+msgstr "Hibernate 是完整的对象/关系映射解决方案,它提供了对象<emphasis>状态管理(state
management)</emphasis>的功能,使开发者不再需要理会底层数据库系统的细节。也就是说,相对于常见的 JDBC/SQL
持久层方案中需要<literal>管理 SQL 语句</literal>,Hibernate 采用了更自然的面向对象的视角来持久化 Java 应用中的数据。
"
#. Tag: para
-#: session_api.xml:40
#, no-c-format
-msgid ""
-"In other words, Hibernate application developers should always think about "
-"the <emphasis>state</emphasis> of their objects, and not necessarily
about "
-"the execution of SQL statements. This part is taken care of by Hibernate and
"
-"is only relevant for the application developer when tuning the performance "
-"of the system."
-msgstr ""
-"换句话说,使用Hibernate的开发者应该总是关注对象的<emphasis>状态(state)</"
-"emphasis>,不必考虑SQL语句的执行。 这部分细节已经由Hibernate掌管妥当,只有开"
-"发者在进行系统性能调优的时候才需要进行了解。"
+msgid "In other words, Hibernate application developers should always think about
the <emphasis>state</emphasis> of their objects, and not necessarily about the
execution of SQL statements. This part is taken care of by Hibernate and is only relevant
for the application developer when tuning the performance of the system."
+msgstr "换句话说,使用 Hibernate
的开发者应该总是关注对象的<emphasis>状态(state)</emphasis>,不必考虑 SQL 语句的执行。这部分细节已经由 Hibernate
掌管妥当,只有开发者在进行系统性能调优的时候才需要进行了解。"
#. Tag: title
-#: session_api.xml:48
#, no-c-format
msgid "Hibernate object states"
-msgstr "Hibernate对象状态(object states)"
+msgstr "Hibernate 对象状态(object states)"
#. Tag: para
-#: session_api.xml:50
#, no-c-format
msgid "Hibernate defines and supports the following object states:"
-msgstr "Hibernate定义并支持下列对象状态(state):"
+msgstr "Hibernate 定义并支持下列对象状态(state):"
#. Tag: para
-#: session_api.xml:56
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Transient</emphasis> - an object is transient if it has just
been "
-"instantiated using the <literal>new</literal> operator, and it is not
"
-"associated with a Hibernate <literal>Session</literal>. It has no
persistent "
-"representation in the database and no identifier value has been assigned. "
-"Transient instances will be destroyed by the garbage collector if the "
-"application does not hold a reference anymore. Use the Hibernate "
-"<literal>Session</literal> to make an object persistent (and let
Hibernate "
-"take care of the SQL statements that need to be executed for this "
-"transition)."
-msgstr ""
-"<emphasis>瞬时(Transient)</emphasis> -
由<literal>new</literal>操作符创建,且"
-"尚未与Hibernate <literal>Session</literal> 关联的对象被认定为瞬时(Transient)"
-"的。瞬时(Transient)对象不会被持久化到数据库中,也不会被赋予持久化标识"
-"(identifier)。 如果瞬时(Transient)对象在程序中没有被引用,它会被垃圾回收器"
-"(garbage collector)销毁。 使用Hibernate
<literal>Session</literal>可以将其变"
-"为持久(Persistent)状态。(Hibernate会自动执行必要的SQL语句)"
+#, no-c-format
+msgid "<emphasis>Transient</emphasis> - an object is transient if it has
just been instantiated using the <literal>new</literal> operator, and it is
not associated with a Hibernate <literal>Session</literal>. It has no
persistent representation in the database and no identifier value has been assigned.
Transient instances will be destroyed by the garbage collector if the application does not
hold a reference anymore. Use the Hibernate <literal>Session</literal> to make
an object persistent (and let Hibernate take care of the SQL statements that need to be
executed for this transition)."
+msgstr "<emphasis>瞬时(Transient)</emphasis> — 由
<literal>new</literal> 操作符创建,且尚未与Hibernate
<literal>Session</literal>
关联的对象被认定为瞬时(Transient)的。瞬时(Transient)对象不会被持久化到数据库中,也不会被赋予持久化标识(identifier)。
如果瞬时(Transient)对象在程序中没有被引用,它会被垃圾回收器(garbage collector)销毁。 使用 Hibernate
<literal>Session</literal>可以将其变为持久(Persistent)状态。(Hibernate会自动执行必要的SQL语句)
"
#. Tag: para
-#: session_api.xml:68
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Persistent</emphasis> - a persistent instance has a
representation "
-"in the database and an identifier value. It might just have been saved or "
-"loaded, however, it is by definition in the scope of a
<literal>Session</"
-"literal>. Hibernate will detect any changes made to an object in persistent
"
-"state and synchronize the state with the database when the unit of work "
-"completes. Developers do not execute manual <literal>UPDATE</literal>
"
-"statements, or <literal>DELETE</literal> statements when an object
should be "
-"made transient."
-msgstr ""
-"<emphasis>持久(Persistent)</emphasis> - 持久(Persistent)的实例在数据库中有对"
-"应的记录,并拥有一个持久化标识(identifier)。 持久(Persistent)的实例可能是刚被"
-"保存的,或刚被加载的,无论哪一种,按定义,它存在于相关联的<literal>Session</"
-"literal>作用范围内。 Hibernate会检测到处于持久(Persistent)状态的对象的任何改"
-"动,在当前操作单元(unit of work)执行完毕时将对象数据(state)与数据库同步"
-"(synchronize)。 开发者不需要手动执行<literal>UPDATE</literal>。将对象从持久"
-"(Persistent)状态变成瞬时(Transient)状态同样也不需要手动执行<literal>DELETE</"
-"literal>语句。"
+#, no-c-format
+msgid "<emphasis>Persistent</emphasis> - a persistent instance has a
representation in the database and an identifier value. It might just have been saved or
loaded, however, it is by definition in the scope of a
<literal>Session</literal>. Hibernate will detect any changes made to an
object in persistent state and synchronize the state with the database when the unit of
work completes. Developers do not execute manual <literal>UPDATE</literal>
statements, or <literal>DELETE</literal> statements when an object should be
made transient."
+msgstr "<emphasis>持久(Persistent)</emphasis> —
持久(Persistent)的实例在数据库中有对应的记录,并拥有一个持久化标识(identifier)。
持久(Persistent)的实例可能是刚被保存的,或刚被加载的,无论哪一种,按定义,它存在于相关联的<literal>Session</literal>作用范围内。
Hibernate会检测到处于持久(Persistent)状态的对象的任何改动,在当前操作单元(unit of
work)执行完毕时将对象数据(state)与数据库同步(synchronize)。
开发者不需要手动执行<literal>UPDATE</literal>。将对象从持久(Persistent)状态变成瞬时(Transient)状态同样也不需要手动执行
<literal>DELETE</literal> 语句。 "
#. Tag: para
-#: session_api.xml:79
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Detached</emphasis> - a detached instance is an object that
has "
-"been persistent, but its <literal>Session</literal> has been closed.
The "
-"reference to the object is still valid, of course, and the detached instance
"
-"might even be modified in this state. A detached instance can be reattached "
-"to a new <literal>Session</literal> at a later point in time, making it
(and "
-"all the modifications) persistent again. This feature enables a programming "
-"model for long running units of work that require user think-time. We call "
-"them <emphasis>application transactions</emphasis>, i.e., a unit of
work "
-"from the point of view of the user."
-msgstr ""
-"<emphasis>脱管(Detached)</emphasis> - 与持久(Persistent)对象关联的"
-"<literal>Session</literal>被关闭后,对象就变为脱管(Detached)的。 对脱管"
-"(Detached)对象的引用依然有效,对象可继续被修改。脱管(Detached)对象如果重新关"
-"联到某个新的<literal>Session</literal>上, 会再次转变为持久(Persistent)的(在"
-"Detached其间的改动将被持久化到数据库)。 这个功能使得一种编程模型,即中间会给"
-"用户思考时间(user think-time)的长时间运行的操作单元(unit of work)的编程模型成"
-"为可能。 我们称之为<emphasis>应用程序事务</emphasis>,即从用户观点看是一个操"
-"作单元(unit of work)。"
+#, no-c-format
+msgid "<emphasis>Detached</emphasis> - a detached instance is an object
that has been persistent, but its <literal>Session</literal> has been closed.
The reference to the object is still valid, of course, and the detached instance might
even be modified in this state. A detached instance can be reattached to a new
<literal>Session</literal> at a later point in time, making it (and all the
modifications) persistent again. This feature enables a programming model for long running
units of work that require user think-time. We call them <emphasis>application
transactions</emphasis>, i.e., a unit of work from the point of view of the
user."
+msgstr "<emphasis>脱管(Detached)</emphasis> —
与持久(Persistent)对象关联的<literal>Session</literal>被关闭后,对象就变为脱管(Detached)的。对脱管(Detached)对象的引用依然有效,对象可继续被修改。脱管(Detached)对象如果重新关联到某个新的
<literal>Session</literal> 上, 会再次转变为持久(Persistent)的(在Detached其间的改动将被持久化到数据库)。
这个功能使得一种编程模型,即中间会给用户思考时间(user think-time)的长时间运行的操作单元(unit of
work)的编程模型成为可能。我们称之为<emphasis>应用程序事务</emphasis>,即从用户观点看是一个操作单元(unit of work)。
"
#. Tag: para
-#: session_api.xml:93
-#, fuzzy, no-c-format
-msgid ""
-"We will now discuss the states and state transitions (and the Hibernate "
-"methods that trigger a transition) in more detail."
-msgstr ""
-"接下来我们来细致的讨论下状态(states)及状态间的转换(state transitions)(以及触"
-"发状态转换的Hibernate方法)。"
+#, no-c-format
+msgid "We will now discuss the states and state transitions (and the Hibernate
methods that trigger a transition) in more detail."
+msgstr "接下来我们来细致地讨论下状态(states)及状态间的转换(state transitions)(以及触发状态转换的 Hibernate 方法)。
"
#. Tag: title
-#: session_api.xml:101
#, no-c-format
msgid "Making objects persistent"
msgstr "使对象持久化"
#. Tag: para
-#: session_api.xml:103
#, no-c-format
-msgid ""
-"Newly instantiated instances of a a persistent class are considered "
-"<emphasis>transient</emphasis> by Hibernate. We can make a transient
"
-"instance <emphasis>persistent</emphasis> by associating it with a
session:"
-msgstr ""
-"Hibernate认为持久化类(persistent class)新实例化的对象是<emphasis>瞬时"
-"(Transient)</emphasis>的。 我们可通过将瞬时(Transient)对象与session关联而把它"
-"变为<emphasis>持久(Persistent)</emphasis>的。"
+msgid "Newly instantiated instances of a a persistent class are considered
<emphasis>transient</emphasis> by Hibernate. We can make a transient instance
<emphasis>persistent</emphasis> by associating it with a session:"
+msgstr "Hibernate 认为持久化类(persistent
class)新实例化的对象是<emphasis>瞬时(Transient)</emphasis>的。我们可通过将瞬时(Transient)对象与
session 关联而把它变为<emphasis>持久(Persistent)</emphasis>的。"
-#. Tag: programlisting
-#: session_api.xml:110
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[DomesticCat fritz = new DomesticCat();\n"
-"fritz.setColor(Color.GINGER);\n"
-"fritz.setSex('M');\n"
-"fritz.setName(\"Fritz\");\n"
-"Long generatedId = (Long) sess.save(fritz);]]>"
-msgstr ""
+msgid "If <literal>Cat</literal> has a generated identifier, the
identifier is generated and assigned to the <literal>cat</literal> when
<literal>save()</literal> is called. If <literal>Cat</literal> has
an <literal>assigned</literal> identifier, or a composite key, the identifier
should be assigned to the <literal>cat</literal> instance before calling
<literal>save()</literal>. You can also use
<literal>persist()</literal> instead of <literal>save()</literal>,
with the semantics defined in the EJB3 early draft."
+msgstr "如果 <literal>Cat</literal> 的持久化标识(identifier)是
<literal>generated</literal> 类型的, 那么该标识(identifier)会自动在
<literal>save()</literal> 被调用时产生并分配给 <literal>cat</literal>。如果
<literal>Cat</literal>
的持久化标识(identifier)是<literal>assigned</literal>类型的,或是一个复合主键(composite
key),那么该标识(identifier)应当在调用 <literal>save()</literal> 之前手动赋予给
<literal>cat</literal>。你也可以按照 EJB3 early draft 中定义的语义,使用
<literal>persist()</literal> 替代<literal>save()</literal>。 "
#. Tag: para
-#: session_api.xml:112
-#, fuzzy, no-c-format
-msgid ""
-"If <literal>Cat</literal> has a generated identifier, the identifier is
"
-"generated and assigned to the <literal>cat</literal> when
<literal>save()</"
-"literal> is called. If <literal>Cat</literal> has an
<literal>assigned</"
-"literal> identifier, or a composite key, the identifier should be assigned
"
-"to the <literal>cat</literal> instance before calling
<literal>save()</"
-"literal>. You can also use <literal>persist()</literal> instead of
"
-"<literal>save()</literal>, with the semantics defined in the EJB3 early
"
-"draft."
-msgstr ""
-"如果<literal>Cat</literal>的持久化标识(identifier)是<literal>generated</"
-"literal>类型的, 那么该标识(identifier)会自动在<literal>save()</literal>被调"
-"用时产生并分配给<literal>cat</literal>。
如果<literal>Cat</literal>的持久化标"
-"识(identifier)是<literal>assigned</literal>类型的,或是一个复合主键"
-"(composite key),
那么该标识(identifier)应当在调用<literal>save()</literal>之"
-"前手动赋予给<literal>cat</literal>。 你也可以按照EJB3 early draft中定义的语"
-"义,使用<literal>persist()</literal>替代<literal>save()</literal>。"
+#, no-c-format
+msgid "<literal>persist()</literal> makes a transient instance
persistent. However, it does not guarantee that the identifier value will be assigned to
the persistent instance immediately, the assignment might happen at flush time.
<literal>persist()</literal> also guarantees that it will not execute an
<literal>INSERT</literal> statement if it is called outside of transaction
boundaries. This is useful in long-running conversations with an extended
Session/persistence context."
+msgstr "<literal>persist()</literal>
使一个临时实例持久化。然而,它不保证立即把标识符值分配给持久性实例,这会发生在冲刷(flush)的时候。<literal>persist()</literal>
也保证它在事务边界外调用时不会执行 <literal>INSERT</literal>
语句。这对于长期运行的带有扩展会话/持久化上下文的会话是很有用的。"
#. Tag: para
-#: session_api.xml:124
-#, fuzzy, no-c-format
-msgid ""
-"<literal>persist()</literal> makes a transient instance persistent.
However, "
-"it does not guarantee that the identifier value will be assigned to the "
-"persistent instance immediately, the assignment might happen at flush time. "
-"<literal>persist()</literal> also guarantees that it will not execute
an "
-"<literal>INSERT</literal> statement if it is called outside of
transaction "
-"boundaries. This is useful in long-running conversations with an extended "
-"Session/persistence context."
-msgstr ""
-"<literal>persist()</literal> makes a transient instance persistent.
However, "
-"it doesn't guarantee that the identifier value will be assigned to the "
-"persistent instance immediately, the assignment might happen at flush time. "
-"<literal>persist()</literal> also guarantees that it will not execute
an "
-"<literal>INSERT</literal> statement if it is called outside of
transaction "
-"boundaries. This is useful in long-running conversations with an extended "
-"Session/persistence context."
+#, no-c-format
+msgid "<literal>save()</literal> does guarantee to return an identifier.
If an INSERT has to be executed to get the identifier ( e.g. \"identity\"
generator, not \"sequence\"), this INSERT happens immediately, no matter if you
are inside or outside of a transaction. This is problematic in a long-running conversation
with an extended Session/persistence context."
+msgstr "<literal>save()</literal> 保证返回一个标识符。如果需要运行 INSERT 来获取标识符(如
\"identity\" 而非 \"sequence\" 生成器),这个 INSERT
将立即执行,不管你是否在事务内部还是外部。这对于长期运行的带有扩展会话/持久化上下文的会话来说会出现问题。"
#. Tag: para
-#: session_api.xml:135
#, no-c-format
-msgid ""
-"<literal>save()</literal> does guarantee to return an identifier. If an
"
-"INSERT has to be executed to get the identifier ( e.g. \"identity\"
"
-"generator, not \"sequence\"), this INSERT happens immediately, no matter
if "
-"you are inside or outside of a transaction. This is problematic in a long-"
-"running conversation with an extended Session/persistence context."
-msgstr ""
-"<literal>save()</literal> does guarantee to return an identifier. If an
"
-"INSERT has to be executed to get the identifier ( e.g. \"identity\"
"
-"generator, not \"sequence\"), this INSERT happens immediately, no matter
if "
-"you are inside or outside of a transaction. This is problematic in a long-"
-"running conversation with an extended Session/persistence context."
+msgid "Alternatively, you can assign the identifier using an overloaded version of
<literal>save()</literal>."
+msgstr "此外,你可以用一个重载版本的 <literal>save()</literal> 方法。 "
#. Tag: para
-#: session_api.xml:145
-#, fuzzy, no-c-format
-msgid ""
-"Alternatively, you can assign the identifier using an overloaded version of "
-"<literal>save()</literal>."
-msgstr "此外,你可以用一个重载版本的<literal>save()</literal>方法。"
-
-#. Tag: programlisting
-#: session_api.xml:150
#, no-c-format
-msgid ""
-"<![CDATA[DomesticCat pk = new DomesticCat();\n"
-"pk.setColor(Color.TABBY);\n"
-"pk.setSex('F');\n"
-"pk.setName(\"PK\");\n"
-"pk.setKittens( new HashSet() );\n"
-"pk.addKitten(fritz);\n"
-"sess.save( pk, new Long(1234) );]]>"
-msgstr ""
+msgid "If the object you make persistent has associated objects (e.g. the
<literal>kittens</literal> collection in the previous example), these objects
can be made persistent in any order you like unless you have a <literal>NOT
NULL</literal> constraint upon a foreign key column. There is never a risk of
violating foreign key constraints. However, you might violate a <literal>NOT
NULL</literal> constraint if you <literal>save()</literal> the objects
in the wrong order."
+msgstr "如果你持久化的对象有关联的对象(associated objects)(例如上例中的
<literal>kittens</literal> 集合) 那么对这些对象(译注:pk 和 kittens)进行持久化的顺序是任意的(也就是说可以先对
kittens 进行持久化也可以先对 pk 进行持久化), 除非你在外键列上有 <literal>NOT NULL</literal> 约束。
Hibernate 不会违反外键约束,但是如果你用错误的顺序持久化对象(译注:在 pk 持久化之前持久化kitten),那么可能会违反 <literal>NOT
NULL</literal> 约束。 "
#. Tag: para
-#: session_api.xml:152
-#, fuzzy, no-c-format
-msgid ""
-"If the object you make persistent has associated objects (e.g. the "
-"<literal>kittens</literal> collection in the previous example), these
"
-"objects can be made persistent in any order you like unless you have a "
-"<literal>NOT NULL</literal> constraint upon a foreign key column. There
is "
-"never a risk of violating foreign key constraints. However, you might "
-"violate a <literal>NOT NULL</literal> constraint if you
<literal>save()</"
-"literal> the objects in the wrong order."
-msgstr ""
-"如果你持久化的对象有关联的对象(associated objects)(例如上例中的"
-"<literal>kittens</literal>集合) 那么对这些对象(译注:pk和kittens)进行持久"
-"化的顺序是任意的(也就是说可以先对kittens进行持久化也可以先对pk进行持久"
-"化), 除非你在外键列上有<literal>NOT NULL</literal>约束。 Hibernate不会违反"
-"外键约束,但是如果你用错误的顺序持久化对象(译注:在pk持久化之前持久化"
-"kitten),那么可能会违反<literal>NOT NULL</literal>约束。"
+#, no-c-format
+msgid "Usually you do not bother with this detail, as you will normally use
Hibernate's <emphasis>transitive persistence</emphasis> feature to save
the associated objects automatically. Then, even <literal>NOT NULL</literal>
constraint violations do not occur - Hibernate will take care of everything. Transitive
persistence is discussed later in this chapter."
+msgstr "通常你不会为这些细节烦心,因为你很可能会使用 Hibernate 的<emphasis>传播性持久化(transitive
persistence)</emphasis>功能自动保存相关联那些对象。这样连违反 <literal>NOT NULL</literal>
约束的情况都不会出现了 — Hibernate 会管好所有的事情。传播性持久化(transitive persistence)将在本章稍后讨论。"
-#. Tag: para
-#: session_api.xml:162
-#, fuzzy, no-c-format
-msgid ""
-"Usually you do not bother with this detail, as you will normally use "
-"Hibernate's <emphasis>transitive persistence</emphasis> feature to
save the "
-"associated objects automatically. Then, even <literal>NOT
NULL</literal> "
-"constraint violations do not occur - Hibernate will take care of everything.
"
-"Transitive persistence is discussed later in this chapter."
-msgstr ""
-"通常你不会为这些细节烦心,因为你很可能会使用Hibernate的 <emphasis>传播性持久"
-"化(transitive persistence)</emphasis>功能自动保存相关联那些对象。 这样连违反"
-"<literal>NOT NULL</literal>约束的情况都不会出现了 - Hibernate会管好所有的事"
-"情。 传播性持久化(transitive persistence)将在本章稍后讨论。"
-
#. Tag: title
-#: session_api.xml:173
#, no-c-format
msgid "Loading an object"
msgstr "装载对象"
#. Tag: para
-#: session_api.xml:175
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>load()</literal> methods of
<literal>Session</literal> provide "
-"a way of retrieving a persistent instance if you know its identifier. "
-"<literal>load()</literal> takes a class object and loads the state into
a "
-"newly instantiated instance of that class in a persistent state."
-msgstr ""
-"如果你知道某个实例的持久化标识(identifier),你就可以使用<literal>Session</"
-"literal>的<literal>load()</literal>方法 来获取它。
<literal>load()</literal>"
-"的另一个参数是指定类的.class对象。 本方法会创建指定类的持久化实例,并从数据库"
-"加载其数据(state)。"
-
-#. Tag: programlisting
-#: session_api.xml:182
#, no-c-format
-msgid "<![CDATA[Cat fritz = (Cat) sess.load(Cat.class, generatedId);]]>"
-msgstr ""
+msgid "The <literal>load()</literal> methods of
<literal>Session</literal> provide a way of retrieving a persistent instance
if you know its identifier. <literal>load()</literal> takes a class object and
loads the state into a newly instantiated instance of that class in a persistent
state."
+msgstr "如果你知道某个实例的持久化标识(identifier),你就可以使用 <literal>Session</literal> 的
<literal>load()</literal> 方法来获取它。<literal>load()</literal>
的另一个参数是指定类的对象。本方法会创建指定类的持久化实例,并从数据库加载其数据(state)。 "
-#. Tag: programlisting
-#: session_api.xml:184
-#, no-c-format
-msgid ""
-"<![CDATA[// you need to wrap primitive identifiers\n"
-"long id = 1234;\n"
-"DomesticCat pk = (DomesticCat) sess.load( DomesticCat.class, new Long"
-"(id) );]]>"
-msgstr ""
-
#. Tag: para
-#: session_api.xml:186
#, no-c-format
msgid "Alternatively, you can load state into a given instance:"
-msgstr ""
-"此外, 你可以把数据(state)加载到指定的对象实例上(覆盖掉该实例原来的数据)。"
+msgstr "此外,你可以把数据(state)加载到指定的对象实例上(覆盖掉该实例原来的数据)。"
-#. Tag: programlisting
-#: session_api.xml:190
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[Cat cat = new DomesticCat();\n"
-"// load pk's state into cat\n"
-"sess.load( cat, new Long(pkId) );\n"
-"Set kittens = cat.getKittens();]]>"
-msgstr ""
+msgid "Be aware that <literal>load()</literal> will throw an
unrecoverable exception if there is no matching database row. If the class is mapped with
a proxy, <literal>load()</literal> just returns an uninitialized proxy and
does not actually hit the database until you invoke a method of the proxy. This is useful
if you wish to create an association to an object without actually loading it from the
database. It also allows multiple instances to be loaded as a batch if
<literal>batch-size</literal> is defined for the class mapping."
+msgstr "请注意如果没有匹配的数据库记录,<literal>load()</literal>
方法可能抛出无法恢复的异常(unrecoverable
exception)。如果类的映射使用了代理(proxy),<literal>load()</literal>
方法会返回一个未初始化的代理,直到你调用该代理的某方法时才会去访问数据库。
若你希望在某对象中创建一个指向另一个对象的关联,又不想在从数据库中装载该对象时同时装载相关联的那个对象,那么这种操作方式就用得上的了。如果为相应类映射关系设置了
<literal>batch-size</literal>,那么使用这种操作方式允许多个对象被一批装载(因为返回的是代理,无需从数据库中抓取所有对象的数据)。
"
#. Tag: para
-#: session_api.xml:192
-#, fuzzy, no-c-format
-msgid ""
-"Be aware that <literal>load()</literal> will throw an unrecoverable
"
-"exception if there is no matching database row. If the class is mapped with "
-"a proxy, <literal>load()</literal> just returns an uninitialized proxy
and "
-"does not actually hit the database until you invoke a method of the proxy. "
-"This is useful if you wish to create an association to an object without "
-"actually loading it from the database. It also allows multiple instances to "
-"be loaded as a batch if <literal>batch-size</literal> is defined for
the "
-"class mapping."
-msgstr ""
-"请注意如果没有匹配的数据库记录,<literal>load()</literal>方法可能抛出无法恢复"
-"的异常(unrecoverable exception)。 如果类的映射使用了代理(proxy),"
-"<literal>load()</literal>方法会返回一个未初始化的代理,直到你调用该代理的某方"
-"法时才会去访问数据库。 若你希望在某对象中创建一个指向另一个对象的关联,又不想"
-"在从数据库中装载该对象时同时装载相关联的那个对象,那么这种操作方式就用得上的"
-"了。 如果为相应类映射关系设置了<literal>batch-size</literal>, 那么使用这种操"
-"作方式允许多个对象被一批装载(因为返回的是代理,无需从数据库中抓取所有对象的"
-"数据)。"
+#, no-c-format
+msgid "If you are not certain that a matching row exists, you should use the
<literal>get()</literal> method which hits the database immediately and
returns null if there is no matching row."
+msgstr "如果你不确定是否有匹配的行存在,应该使用 <literal>get()</literal>
方法,它会立刻访问数据库,如果没有对应的记录,会返回 null。 "
#. Tag: para
-#: session_api.xml:203
-#, fuzzy, no-c-format
-msgid ""
-"If you are not certain that a matching row exists, you should use the "
-"<literal>get()</literal> method which hits the database immediately and
"
-"returns null if there is no matching row."
-msgstr ""
-"如果你不确定是否有匹配的行存在,应该使用<literal>get()</literal>方法,它会立"
-"刻访问数据库,如果没有对应的记录,会返回null。"
-
-#. Tag: programlisting
-#: session_api.xml:209
#, no-c-format
-msgid ""
-"<![CDATA[Cat cat = (Cat) sess.get(Cat.class, id);\n"
-"if (cat==null) {\n"
-" cat = new Cat();\n"
-" sess.save(cat, id);\n"
-"}\n"
-"return cat;]]>"
-msgstr ""
+msgid "You can even load an object using an SQL <literal>SELECT ... FOR
UPDATE</literal>, using a <literal>LockMode</literal>. See the API
documentation for more information."
+msgstr "你甚至可以选用某个 <literal>LockMode</literal>,用 SQL 的
<literal>SELECT ... FOR UPDATE</literal> 装载对象。 请查阅 API 文档以获取更多信息。 "
#. Tag: para
-#: session_api.xml:211
-#, fuzzy, no-c-format
-msgid ""
-"You can even load an object using an SQL <literal>SELECT ... FOR
UPDATE</"
-"literal>, using a <literal>LockMode</literal>. See the API
documentation for "
-"more information."
-msgstr ""
-"你甚至可以选用某个<literal>LockMode</literal>,用SQL的<literal>SELECT ...
"
-"FOR UPDATE</literal>装载对象。 请查阅API文档以获取更多信息。"
-
-#. Tag: programlisting
-#: session_api.xml:216
#, no-c-format
-msgid "<![CDATA[Cat cat = (Cat) sess.get(Cat.class, id,
LockMode.UPGRADE);]]>"
-msgstr ""
+msgid "Any associated instances or contained collections will
<emphasis>not</emphasis> be selected <literal>FOR
UPDATE</literal>, unless you decide to specify <literal>lock</literal>
or <literal>all</literal> as a cascade style for the association."
+msgstr "注意,任何关联的对象或者包含的集合都<emphasis>不会</emphasis>被以 <literal>FOR
UPDATE</literal> 方式返回, 除非你指定了 <literal>lock</literal> 或者
<literal>all</literal> 作为关联(association)的级联风格(cascade style)。 "
#. Tag: para
-#: session_api.xml:218
-#, fuzzy, no-c-format
-msgid ""
-"Any associated instances or contained collections will
<emphasis>not</"
-"emphasis> be selected <literal>FOR UPDATE</literal>, unless you
decide to "
-"specify <literal>lock</literal> or <literal>all</literal>
as a cascade style "
-"for the association."
-msgstr ""
-"注意,任何关联的对象或者包含的集合都<emphasis>不会</emphasis>被以"
-"<literal>FOR UPDATE</literal>方式返回,
除非你指定了<literal>lock</literal>或"
-"者<literal>all</literal>作为关联(association)的级联风格(cascade style)。"
+#, no-c-format
+msgid "It is possible to re-load an object and all its collections at any time,
using the <literal>refresh()</literal> method. This is useful when database
triggers are used to initialize some of the properties of the object."
+msgstr "任何时候都可以使用 <literal>refresh()</literal>
方法强迫装载对象和它的集合。如果你使用数据库触发器功能来处理对象的某些属性,这个方法就很有用了。"
#. Tag: para
-#: session_api.xml:225
#, no-c-format
-msgid ""
-"It is possible to re-load an object and all its collections at any time, "
-"using the <literal>refresh()</literal> method. This is useful when
database "
-"triggers are used to initialize some of the properties of the object."
-msgstr ""
-"任何时候都可以使用<literal>refresh()</literal>方法强迫装载对象和它的集合。如"
-"果你使用数据库触发器功能来处理对象的某些属性,这个方法就很有用了。"
+msgid "How much does Hibernate load from the database and how many SQL
<literal>SELECT</literal>s will it use? This depends on the
<emphasis>fetching strategy</emphasis>. This is explained in <xref
linkend=\"performance-fetching\" />."
+msgstr "此处通常会出现一个重要问题: Hibernate 会从数据库中装载多少东西?会执行多少条相应的
SQL<literal>SELECT</literal> 语句?这取决于<emphasis>抓取策略(fetching
strategy)</emphasis>,我们会在 <xref linkend=\"performance-fetching\" />
中解释。 "
-#. Tag: programlisting
-#: session_api.xml:231
-#, no-c-format
-msgid ""
-"<![CDATA[sess.save(cat);\n"
-"sess.flush(); //force the SQL INSERT\n"
-"sess.refresh(cat); //re-read the state (after the trigger executes)]]>"
-msgstr ""
-
-#. Tag: para
-#: session_api.xml:233
-#, fuzzy, no-c-format
-msgid ""
-"How much does Hibernate load from the database and how many SQL "
-"<literal>SELECT</literal>s will it use? This depends on the "
-"<emphasis>fetching strategy</emphasis>. This is explained in <xref
linkend="
-"\"performance-fetching\"/>."
-msgstr ""
-"此处通常会出现一个重要问题: Hibernate会从数据库中装载多少东西?会执行多少条相"
-"应的SQL<literal>SELECT</literal>语句? 这取决于<emphasis>抓取策略(fetching
"
-"strategy)</emphasis>,会在<xref
linkend=\"performance-fetching\"/>中解释。"
-
#. Tag: title
-#: session_api.xml:243
#, no-c-format
msgid "Querying"
msgstr "查询"
#. Tag: para
-#: session_api.xml:245
-#, fuzzy, no-c-format
-msgid ""
-"If you do not know the identifiers of the objects you are looking for, you "
-"need a query. Hibernate supports an easy-to-use but powerful object oriented
"
-"query language (HQL). For programmatic query creation, Hibernate supports a "
-"sophisticated Criteria and Example query feature (QBC and QBE). You can also
"
-"express your query in the native SQL of your database, with optional support
"
-"from Hibernate for result set conversion into objects."
-msgstr ""
-"如果不知道所要寻找的对象的持久化标识,那么你需要使用查询。Hibernate支持强大且"
-"易于使用的面向对象查询语言(HQL)。 如果希望通过编程的方式创建查询,Hibernate提"
-"供了完善的按条件(Query By Criteria, QBC)以及按样例(Query By Example, QBE)进行"
-"查询的功能。 你也可以用原生SQL(native SQL)描述查询,Hibernate额外提供了将结果"
-"集(result set)转化为对象的支持。"
+#, no-c-format
+msgid "If you do not know the identifiers of the objects you are looking for, you
need a query. Hibernate supports an easy-to-use but powerful object oriented query
language (HQL). For programmatic query creation, Hibernate supports a sophisticated
Criteria and Example query feature (QBC and QBE). You can also express your query in the
native SQL of your database, with optional support from Hibernate for result set
conversion into objects."
+msgstr "如果不知道所要寻找的对象的持久化标识,那么你需要使用查询。Hibernate
支持强大且易于使用的面向对象查询语言(HQL)。如果希望通过编程的方式创建查询,Hibernate 提供了完善的按条件(Query By
Criteria,QBC)以及按样例(Query By Example,QBE)进行查询的功能。你也可以用原生 SQL(native SQL)描述查询,Hibernate
额外提供了将结果集(result set)转化为对象的支持。 "
#. Tag: title
-#: session_api.xml:255
#, no-c-format
msgid "Executing queries"
msgstr "执行查询"
#. Tag: para
-#: session_api.xml:257
#, no-c-format
-msgid ""
-"HQL and native SQL queries are represented with an instance of
<literal>org."
-"hibernate.Query</literal>. This interface offers methods for parameter
"
-"binding, result set handling, and for the execution of the actual query. You
"
-"always obtain a <literal>Query</literal> using the current
<literal>Session</"
-"literal>:"
-msgstr ""
-"HQL和原生SQL(native
SQL)查询要通过为<literal>org.hibernate.Query</literal>的"
-"实例来表达。 这个接口提供了参数绑定、结果集处理以及运行实际查询的方法。 你总"
-"是可以通过当前<literal>Session</literal>获取一个<literal>Query</literal>对"
-"象:"
+msgid "HQL and native SQL queries are represented with an instance of
<literal>org.hibernate.Query</literal>. This interface offers methods for
parameter binding, result set handling, and for the execution of the actual query. You
always obtain a <literal>Query</literal> using the current
<literal>Session</literal>:"
+msgstr "HQL 和原生 SQL(native SQL)查询要通过为
<literal>org.hibernate.Query</literal> 的实例来表达。
这个接口提供了参数绑定、结果集处理以及运行实际查询的方法。你总是可以通过当前 <literal>Session</literal> 获取一个
<literal>Query</literal> 对象:"
-#. Tag: programlisting
-#: session_api.xml:264
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[List cats = session.createQuery(\n"
-" \"from Cat as cat where cat.birthdate < ?\")\n"
-" .setDate(0, date)\n"
-" .list();\n"
-"\n"
-"List mothers = session.createQuery(\n"
-" \"select mother from Cat as cat join cat.mother as mother where cat.name
"
-"= ?\")\n"
-" .setString(0, name)\n"
-" .list();\n"
-"\n"
-"List kittens = session.createQuery(\n"
-" \"from Cat as cat where cat.mother = ?\")\n"
-" .setEntity(0, pk)\n"
-" .list();\n"
-"\n"
-"Cat mother = (Cat) session.createQuery(\n"
-" \"select cat.mother from Cat as cat where cat = ?\")\n"
-" .setEntity(0, izi)\n"
-" .uniqueResult();]]\n"
-"\n"
-"Query mothersWithKittens = (Cat) session.createQuery(\n"
-" \"select mother from Cat as mother left join fetch
mother.kittens\");\n"
-"Set uniqueMothers = new HashSet(mothersWithKittens.list());]]>"
-msgstr ""
+msgid "A query is usually executed by invoking
<literal>list()</literal>. The result of the query will be loaded completely
into a collection in memory. Entity instances retrieved by a query are in a persistent
state. The <literal>uniqueResult()</literal> method offers a shortcut if you
know your query will only return a single object. Queries that make use of eager fetching
of collections usually return duplicates of the root objects, but with their collections
initialized. You can filter these duplicates through a
<literal>Set</literal>."
+msgstr "一个查询通常在调用 <literal>list()</literal>
时被执行,执行结果会完全装载进内存中的一个集合(collection)。查询返回的对象处于持久(persistent)状态。如果你知道的查询只会返回一个对象,可使用
<literal>list()</literal> 的快捷方式
<literal>uniqueResult()</literal>。注意,使用集合预先抓取的查询往往会返回多次根对象(他们的集合类都被初始化了)。你可以通过一个<literal>集合(Set)</literal>来过滤这些重复对象。"
-#. Tag: para
-#: session_api.xml:266
-#, fuzzy, no-c-format
-msgid ""
-"A query is usually executed by invoking <literal>list()</literal>. The
"
-"result of the query will be loaded completely into a collection in memory. "
-"Entity instances retrieved by a query are in a persistent state. The "
-"<literal>uniqueResult()</literal> method offers a shortcut if you know
your "
-"query will only return a single object. Queries that make use of eager "
-"fetching of collections usually return duplicates of the root objects, but "
-"with their collections initialized. You can filter these duplicates through "
-"a <literal>Set</literal>."
-msgstr ""
-"一个查询通常在调用<literal>list()</literal>时被执行,执行结果会完全装载进内存"
-"中的一个集合(collection)。 查询返回的对象处于持久(persistent)状态。如果你知道"
-"的查询只会返回一个对象,可使用<literal>list()</literal>的快捷方式"
-"<literal>uniqueResult()</literal>。 注意,使用集合预先抓取的查询往往会返回多"
-"次根对象(他们的集合类都被初始化了)。你可以通过一个集合来过滤这些重复对象。"
-
#. Tag: title
-#: session_api.xml:278
#, no-c-format
msgid "Iterating results"
-msgstr "迭代式获取结果(Iterating results)"
+msgstr "迭代式获取结果(Iterating results)"
#. Tag: para
-#: session_api.xml:280
-#, fuzzy, no-c-format
-msgid ""
-"Occasionally, you might be able to achieve better performance by executing "
-"the query using the <literal>iterate()</literal> method. This will
usually "
-"be the case if you expect that the actual entity instances returned by the "
-"query will already be in the session or second-level cache. If they are not "
-"already cached, <literal>iterate()</literal> will be slower than
"
-"<literal>list()</literal> and might require many database hits for a
simple "
-"query, usually <emphasis>1</emphasis> for the initial select which only
"
-"returns identifiers, and <emphasis>n</emphasis> additional selects to
"
-"initialize the actual instances."
-msgstr ""
-"某些情况下,你可以使用<literal>iterate()</literal>方法得到更好的性能。 这通常"
-"是你预期返回的结果在session,或二级缓存(second-level cache)中已经存在时的情"
-"况。
如若不然,<literal>iterate()</literal>会比<literal>list()</literal>慢,"
-"而且可能简单查询也需要进行多次数据库访问: <literal>iterate()</literal>会首先"
-"使用<emphasis>1</emphasis>条语句得到所有对象的持久化标识(identifiers),再根据"
-"持久化标识执行<emphasis>n</emphasis>条附加的select语句实例化实际的对象。"
-
-#. Tag: programlisting
-#: session_api.xml:292
#, no-c-format
-msgid ""
-"<![CDATA[// fetch ids\n"
-"Iterator iter = sess.createQuery(\"from eg.Qux q order by
q.likeliness\")."
-"iterate();\n"
-"while ( iter.hasNext() ) {\n"
-" Qux qux = (Qux) iter.next(); // fetch the object\n"
-" // something we couldnt express in the query\n"
-" if ( qux.calculateComplicatedAlgorithm() ) {\n"
-" // delete the current instance\n"
-" iter.remove();\n"
-" // dont need to process the rest\n"
-" break;\n"
-" }\n"
-"}]]>"
-msgstr ""
+msgid "Occasionally, you might be able to achieve better performance by executing
the query using the <literal>iterate()</literal> method. This will usually be
the case if you expect that the actual entity instances returned by the query will already
be in the session or second-level cache. If they are not already cached,
<literal>iterate()</literal> will be slower than
<literal>list()</literal> and might require many database hits for a simple
query, usually <emphasis>1</emphasis> for the initial select which only
returns identifiers, and <emphasis>n</emphasis> additional selects to
initialize the actual instances."
+msgstr "某些情况下,你可以使用 <literal>iterate()</literal> 方法得到更好的性能。
这通常是你预期返回的结果在 session,或二级缓存(second-level
cache)中已经存在时的情况。如若不然,<literal>iterate()</literal> 会比
<literal>list()</literal>
慢,而且可能简单查询也需要进行多次数据库访问:<literal>iterate()</literal> 会首先使用
<emphasis>1</emphasis> 条语句得到所有对象的持久化标识(identifiers),再根据持久化标识执行
<emphasis>n</emphasis> 条附加的 select 语句实例化实际的对象。 "
#. Tag: title
-#: session_api.xml:296
#, no-c-format
msgid "Queries that return tuples"
-msgstr "返回元组(tuples)的查询"
+msgstr "返回元组(tuples)的查询"
#. Tag: para
-#: session_api.xml:298
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate queries sometimes return tuples of objects. Each tuple is returned
"
-"as an array:"
-msgstr ""
-"(译注:元组(tuples)指一条结果行包含多个对象) Hibernate查询有时返回元组"
-"(tuples),每个元组(tuples)以数组的形式返回:"
-
-#. Tag: programlisting
-#: session_api.xml:303
#, no-c-format
-msgid ""
-"<![CDATA[Iterator kittensAndMothers = sess.createQuery(\n"
-" \"select kitten, mother from Cat kitten join kitten.mother
mother"
-"\")\n"
-" .list()\n"
-" .iterator();\n"
-"\n"
-"while ( kittensAndMothers.hasNext() ) {\n"
-" Object[] tuple = (Object[]) kittensAndMothers.next();\n"
-" Cat kitten = (Cat) tuple[0];\n"
-" Cat mother = (Cat) tuple[1];\n"
-" ....\n"
-"}]]>"
-msgstr ""
+msgid "Hibernate queries sometimes return tuples of objects. Each tuple is returned
as an array:"
+msgstr "(译注:元组(tuples)指一条结果行包含多个对象) Hibernate 查询有时返回元组(tuples),每个元组(tuples)以数组的形式返回:
"
#. Tag: title
-#: session_api.xml:308
#, no-c-format
msgid "Scalar results"
-msgstr "标量(Scalar)结果"
+msgstr "标量(Scalar)结果"
#. Tag: para
-#: session_api.xml:310
-#, fuzzy, no-c-format
-msgid ""
-"Queries can specify a property of a class in the
<literal>select</literal> "
-"clause. They can even call SQL aggregate functions. Properties or aggregates
"
-"are considered \"scalar\" results and not entities in persistent
state."
-msgstr ""
-"查询可在<literal>select</literal>从句中指定类的属性,甚至可以调用SQL统计"
-"(aggregate)函数。 属性或统计结果被认定为\"标量(Scalar)\"的结果(而不是持久"
-"(persistent state)的实体)。"
-
-#. Tag: programlisting
-#: session_api.xml:316
#, no-c-format
-msgid ""
-"<![CDATA[Iterator results = sess.createQuery(\n"
-" \"select cat.color, min(cat.birthdate), count(cat) from Cat cat
\" "
-"+\n"
-" \"group by cat.color\")\n"
-" .list()\n"
-" .iterator();\n"
-"\n"
-"while ( results.hasNext() ) {\n"
-" Object[] row = (Object[]) results.next();\n"
-" Color type = (Color) row[0];\n"
-" Date oldest = (Date) row[1];\n"
-" Integer count = (Integer) row[2];\n"
-" .....\n"
-"}]]>"
-msgstr ""
+msgid "Queries can specify a property of a class in the
<literal>select</literal> clause. They can even call SQL aggregate functions.
Properties or aggregates are considered \"scalar\" results and not entities in
persistent state."
+msgstr "查询可在 <literal>select</literal> 从句中指定类的属性,甚至可以调用 SQL
统计(aggregate)函数。属性或统计结果被认定为\"标量(Scalar)\"的结果(而不是持久(persistent state)的实体)。
"
#. Tag: title
-#: session_api.xml:321
#, no-c-format
msgid "Bind parameters"
msgstr "绑定参数"
#. Tag: para
-#: session_api.xml:323
-#, fuzzy, no-c-format
-msgid ""
-"Methods on <literal>Query</literal> are provided for binding values to
named "
-"parameters or JDBC-style <literal>?</literal> parameters.
<emphasis>Contrary "
-"to JDBC, Hibernate numbers parameters from zero.</emphasis> Named parameters
"
-"are identifiers of the form <literal>:name</literal> in the query
string. "
-"The advantages of named parameters are as follows:"
-msgstr ""
-"接口<literal>Query</literal>提供了对命名参数(named parameters)、JDBC风格的"
-"<literal>问号(?)</literal>参数进行绑定的方法。 <emphasis>不同于JDBC,"
-"Hibernate对参数从0开始计数。</emphasis> 命名参数(named parameters)在查询字符"
-"串中是形如<literal>:name</literal>的标识符。 命名参数(named parameters)的优点"
-"是:"
+#, no-c-format
+msgid "Methods on <literal>Query</literal> are provided for binding
values to named parameters or JDBC-style <literal>?</literal> parameters.
<emphasis>Contrary to JDBC, Hibernate numbers parameters from zero.</emphasis>
Named parameters are identifiers of the form <literal>:name</literal> in the
query string. The advantages of named parameters are as follows:"
+msgstr "接口 <literal>Query</literal> 提供了对命名参数(named parameters)、JDBC
风格的<literal>问号(?)</literal>参数进行绑定的方法。<emphasis>不同于 JDBC,Hibernate 对参数从 0
开始计数。</emphasis> 命名参数(named parameters)在查询字符串中是形如
<literal>:name</literal> 的标识符。命名参数(named parameters)的优点是: "
#. Tag: para
-#: session_api.xml:333
#, no-c-format
-msgid ""
-"named parameters are insensitive to the order they occur in the query string"
-msgstr "命名参数(named parameters)与其在查询串中出现的顺序无关"
+msgid "named parameters are insensitive to the order they occur in the query
string"
+msgstr "命名参数(named parameters)与其在查询串中出现的顺序无关"
#. Tag: para
-#: session_api.xml:339
-#, fuzzy, no-c-format
+#, no-c-format
msgid "they can occur multiple times in the same query"
-msgstr "它们可在同一查询串中多次出现"
+msgstr "它们可在同一查询串中多次出现 "
#. Tag: para
-#: session_api.xml:344
#, no-c-format
msgid "they are self-documenting"
msgstr "它们本身是自我说明的"
-#. Tag: programlisting
-#: session_api.xml:350
-#, no-c-format
-msgid ""
-"<![CDATA[//named parameter (preferred)\n"
-"Query q = sess.createQuery(\"from DomesticCat cat where cat.name =
:name"
-"\");\n"
-"q.setString(\"name\", \"Fritz\");\n"
-"Iterator cats = q.iterate();]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: session_api.xml:352
-#, no-c-format
-msgid ""
-"<![CDATA[//positional parameter\n"
-"Query q = sess.createQuery(\"from DomesticCat cat where cat.name =
?\");\n"
-"q.setString(0, \"Izi\");\n"
-"Iterator cats = q.iterate();]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: session_api.xml:354
-#, no-c-format
-msgid ""
-"<![CDATA[//named parameter list\n"
-"List names = new ArrayList();\n"
-"names.add(\"Izi\");\n"
-"names.add(\"Fritz\");\n"
-"Query q = sess.createQuery(\"from DomesticCat cat where cat.name in (:"
-"namesList)\");\n"
-"q.setParameterList(\"namesList\", names);\n"
-"List cats = q.list();]]>"
-msgstr ""
-
#. Tag: title
-#: session_api.xml:359
#, no-c-format
msgid "Pagination"
msgstr "分页"
#. Tag: para
-#: session_api.xml:361
-#, fuzzy, no-c-format
-msgid ""
-"If you need to specify bounds upon your result set, that is, the maximum "
-"number of rows you want to retrieve and/or the first row you want to "
-"retrieve, you can use methods of the <literal>Query</literal>
interface:"
-msgstr ""
-"如果你需要指定结果集的范围(希望返回的最大行数/或开始的行数),应该使用"
-"<literal>Query</literal>接口提供的方法:"
-
-#. Tag: programlisting
-#: session_api.xml:367
#, no-c-format
-msgid ""
-"<![CDATA[Query q = sess.createQuery(\"from DomesticCat
cat\");\n"
-"q.setFirstResult(20);\n"
-"q.setMaxResults(10);\n"
-"List cats = q.list();]]>"
-msgstr ""
+msgid "If you need to specify bounds upon your result set, that is, the maximum
number of rows you want to retrieve and/or the first row you want to retrieve, you can use
methods of the <literal>Query</literal> interface:"
+msgstr "如果你需要指定结果集的范围(希望返回的最大行数/或开始的行数),应该使用 <literal>Query</literal>
接口提供的方法: "
#. Tag: para
-#: session_api.xml:369
#, no-c-format
-msgid ""
-"Hibernate knows how to translate this limit query into the native SQL of "
-"your DBMS."
-msgstr ""
-"Hibernate 知道如何将这个有限定条件的查询转换成你的数据库的原生SQL(native "
-"SQL)。"
+msgid "Hibernate knows how to translate this limit query into the native SQL of your
DBMS."
+msgstr "Hibernate 知道如何将这个有限定条件的查询转换成你的数据库的原生 SQL(native SQL)。"
#. Tag: title
-#: session_api.xml:377
#, no-c-format
msgid "Scrollable iteration"
-msgstr "可滚动遍历(Scrollable iteration)"
+msgstr "可滚动遍历(Scrollable iteration)"
#. Tag: para
-#: session_api.xml:379
-#, fuzzy, no-c-format
-msgid ""
-"If your JDBC driver supports scrollable <literal>ResultSet</literal>s,
the "
-"<literal>Query</literal> interface can be used to obtain a "
-"<literal>ScrollableResults</literal> object that allows flexible
navigation "
-"of the query results."
-msgstr ""
-"如果你的JDBC驱动支持可滚动的<literal>ResuleSet</literal>,<literal>Query</"
-"literal>接口可以使用<literal>ScrollableResults</literal>,允许你在查询结果中"
-"灵活游走。"
-
-#. Tag: programlisting
-#: session_api.xml:386
#, no-c-format
-msgid ""
-"<![CDATA[Query q = sess.createQuery(\"select cat.name, cat from DomesticCat
"
-"cat \" +\n"
-" \"order by cat.name\");\n"
-"ScrollableResults cats = q.scroll();\n"
-"if ( cats.first() ) {\n"
-"\n"
-" // find the first name on each page of an alphabetical list of cats by "
-"name\n"
-" firstNamesOfPages = new ArrayList();\n"
-" do {\n"
-" String name = cats.getString(0);\n"
-" firstNamesOfPages.add(name);\n"
-" }\n"
-" while ( cats.scroll(PAGE_SIZE) );\n"
-"\n"
-" // Now get the first page of cats\n"
-" pageOfCats = new ArrayList();\n"
-" cats.beforeFirst();\n"
-" int i=0;\n"
-" while( ( PAGE_SIZE > i++ ) && cats.next() ) pageOfCats.add(
cats.get"
-"(1) );\n"
-"\n"
-"}\n"
-"cats.close()]]>"
-msgstr ""
+msgid "If your JDBC driver supports scrollable
<literal>ResultSet</literal>s, the <literal>Query</literal>
interface can be used to obtain a <literal>ScrollableResults</literal> object
that allows flexible navigation of the query results."
+msgstr "如果你的 JDBC 驱动支持可滚动的
<literal>ResuleSet</literal>,<literal>Query</literal> 接口可以使用
<literal>ScrollableResults</literal>,允许你在查询结果中灵活游走。 "
#. Tag: para
-#: session_api.xml:388
-#, fuzzy, no-c-format
-msgid ""
-"Note that an open database connection and cursor is required for this "
-"functionality. Use
<literal>setMaxResult()</literal>/<literal>setFirstResult"
-"()</literal> if you need offline pagination functionality."
-msgstr ""
-"请注意,使用此功能需要保持数据库连接(以及游标(cursor))处于一直打开状态。 如"
-"果你需要断开连接使用分页功能,请使用<literal>setMaxResult()</literal>/"
-"<literal>setFirstResult()</literal>"
+#, no-c-format
+msgid "Note that an open database connection and cursor is required for this
functionality. Use
<literal>setMaxResult()</literal>/<literal>setFirstResult()</literal>
if you need offline pagination functionality."
+msgstr "请注意,使用此功能需要保持数据库连接(以及游标(cursor))处于一直打开状态。如果你需要断开连接使用分页功能,请使用
<literal>setMaxResult()</literal>/<literal>setFirstResult()</literal>。
"
#. Tag: title
-#: session_api.xml:397
#, no-c-format
msgid "Externalizing named queries"
-msgstr "外置命名查询(Externalizing named queries)"
+msgstr "外置命名查询(Externalizing named queries)"
#. Tag: para
-#: session_api.xml:399
-#, fuzzy, no-c-format
-msgid ""
-"You can also define named queries in the mapping document. Remember to use a
"
-"<literal>CDATA</literal> section if your query contains characters that
"
-"could be interpreted as markup."
-msgstr ""
-"你可以在映射文件中定义命名查询(named queries)。 (如果你的查询串中包含可能被"
-"解释为XML标记(markup)的字符,别忘了用<literal>CDATA</literal>包裹起来。)"
-
-#. Tag: programlisting
-#: session_api.xml:405
#, no-c-format
-msgid ""
-"<![CDATA[<query
name=\"ByNameAndMaximumWeight\"><![CDATA[\n"
-" from eg.DomesticCat as cat\n"
-" where cat.name = ?\n"
-" and cat.weight > ?\n"
-"] ]></query>]]>"
-msgstr ""
+msgid "You can also define named queries in the mapping document. Remember to use a
<literal>CDATA</literal> section if your query contains characters that could
be interpreted as markup."
+msgstr "你可以在映射文件中定义命名查询(named queries)。如果你的查询串中包含可能被解释为 XML
标记(markup)的字符,别忘了用<literal>CDATA</literal>包裹起来。"
#. Tag: para
-#: session_api.xml:407
#, no-c-format
msgid "Parameter binding and executing is done programatically:"
-msgstr "参数绑定及执行以编程方式(programatically)完成:"
+msgstr "参数绑定及执行以编程方式(programatically)完成:"
-#. Tag: programlisting
-#: session_api.xml:411
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[Query q =
sess.getNamedQuery(\"ByNameAndMaximumWeight\");\n"
-"q.setString(0, name);\n"
-"q.setInt(1, minWeight);\n"
-"List cats = q.list();]]>"
-msgstr ""
+msgid "The actual program code is independent of the query language that is used.
You can also define native SQL queries in metadata, or migrate existing queries to
Hibernate by placing them in mapping files."
+msgstr "请注意实际的程序代码与所用的查询语言无关,你也可在元数据中定义原生 SQL(native
SQL)查询,或将原有的其他的查询语句放在配置文件中,这样就可以让 Hibernate 统一管理,达到迁移的目的。 "
#. Tag: para
-#: session_api.xml:413
-#, fuzzy, no-c-format
-msgid ""
-"The actual program code is independent of the query language that is used. "
-"You can also define native SQL queries in metadata, or migrate existing "
-"queries to Hibernate by placing them in mapping files."
-msgstr ""
-"请注意实际的程序代码与所用的查询语言无关,你也可在元数据中定义原生SQL(native "
-"SQL)查询, 或将原有的其他的查询语句放在配置文件中,这样就可以让Hibernate统一"
-"管理,达到迁移的目的。"
+#, no-c-format
+msgid "Also note that a query declaration inside a
<literal><hibernate-mapping></literal> element requires a global
unique name for the query, while a query declaration inside a
<literal><class></literal> element is made unique automatically
by prepending the fully qualified name of the class. For example
<literal>eg.Cat.ByNameAndMaximumWeight</literal>."
+msgstr "也请注意在 <literal><hibernate-mapping></literal>
元素中声明的查询必须有一个全局唯一的名字,而在 <literal><class></literal>
元素中声明的查询自动具有全局名,是通过类的全名加以限定的。比如
<literal>eg.Cat.ByNameAndMaximumWeight</literal>。 "
-#. Tag: para
-#: session_api.xml:419
-#, fuzzy, no-c-format
-msgid ""
-"Also note that a query declaration inside a
<literal><hibernate-"
-"mapping></literal> element requires a global unique name for the
query, "
-"while a query declaration inside a
<literal><class></literal> element "
-"is made unique automatically by prepending the fully qualified name of the "
-"class. For example
<literal>eg.Cat.ByNameAndMaximumWeight</literal>."
-msgstr ""
-"也请注意在<literal><hibernate-mapping></literal>元素中声明的查询必须有"
-"一个全局唯一的名字,而在<literal><class></literal>元素中声明的查询自动具"
-"有全局名,是通过类的全名加以限定的。比如<literal>eg.Cat."
-"ByNameAndMaximumWeight</literal>。"
-
#. Tag: title
-#: session_api.xml:432
#, no-c-format
msgid "Filtering collections"
msgstr "过滤集合"
#. Tag: para
-#: session_api.xml:433
-#, fuzzy, no-c-format
-msgid ""
-"A collection <emphasis>filter</emphasis> is a special type of query
that can "
-"be applied to a persistent collection or array. The query string can refer "
-"to <literal>this</literal>, meaning the current collection
element."
-msgstr ""
-"集合<emphasis>过滤器(filter)</emphasis>是一种用于一个持久化集合或者数组的特殊"
-"的查询。查询字符串中可以使用<literal>\"this\"</literal>来引用集合中的当前元"
-"素。"
-
-#. Tag: programlisting
-#: session_api.xml:439
#, no-c-format
-msgid ""
-"<![CDATA[Collection blackKittens = session.createFilter(\n"
-" pk.getKittens(), \n"
-" \"where this.color = ?\")\n"
-" .setParameter( Color.BLACK, Hibernate.custom(ColorUserType.class) )\n"
-" .list()\n"
-");]]>"
-msgstr ""
+msgid "A collection <emphasis>filter</emphasis> is a special type of
query that can be applied to a persistent collection or array. The query string can refer
to <literal>this</literal>, meaning the current collection element."
+msgstr
"集合<emphasis>过滤器(filter)</emphasis>是一种用于一个持久化集合或者数组的特殊的查询。查询字符串中可以使用
<literal>\"this\"</literal> 来引用集合中的当前元素。 "
#. Tag: para
-#: session_api.xml:441
-#, fuzzy, no-c-format
-msgid ""
-"The returned collection is considered a bag that is a copy of the given "
-"collection. The original collection is not modified. This is contrary to the
"
-"implication of the name \"filter\", but consistent with expected
behavior."
-msgstr ""
-"返回的集合可以被认为是一个包(bag, 无顺序可重复的集合(collection)),它是所给集"
-"合的副本。 原来的集合不会被改动(这与“过滤器(filter)”的隐含的含义不符,不过与"
-"我们期待的行为一致)。"
+#, no-c-format
+msgid "The returned collection is considered a bag that is a copy of the given
collection. The original collection is not modified. This is contrary to the implication
of the name \"filter\", but consistent with expected behavior."
+msgstr "返回的集合可以被认为是一个包(bag,无顺序可重复的集合(collection)),它是所给集合的副本。
原来的集合不会被改动(这与“过滤器(filter)”的隐含的含义不符,不过与我们期待的行为一致)。 "
#. Tag: para
-#: session_api.xml:447
-#, fuzzy, no-c-format
-msgid ""
-"Observe that filters do not require a <literal>from</literal> clause,
"
-"although they can have one if required. Filters are not limited to returning
"
-"the collection elements themselves."
-msgstr ""
-"请注意过滤器(filter)并不需要<literal>from</literal>子句(当然需要的话它们也可"
-"以加上)。过滤器(filter)不限定于只能返回集合元素本身。"
-
-#. Tag: programlisting
-#: session_api.xml:452
#, no-c-format
-msgid ""
-"<![CDATA[Collection blackKittenMates = session.createFilter(\n"
-" pk.getKittens(), \n"
-" \"select this.mate where this.color =
eg.Color.BLACK.intValue\")\n"
-" .list();]]>"
-msgstr ""
+msgid "Observe that filters do not require a <literal>from</literal>
clause, although they can have one if required. Filters are not limited to returning the
collection elements themselves."
+msgstr "请注意过滤器(filter)并不需要 <literal>from</literal>
子句(当然需要的话它们也可以加上)。过滤器(filter)不限定于只能返回集合元素本身。 "
#. Tag: para
-#: session_api.xml:454
-#, fuzzy, no-c-format
-msgid ""
-"Even an empty filter query is useful, e.g. to load a subset of elements in a
"
-"large collection:"
-msgstr ""
-"即使无条件的过滤器(filter)也是有意义的。例如,用于加载一个大集合的子集:"
-
-#. Tag: programlisting
-#: session_api.xml:459
#, no-c-format
-msgid ""
-"<![CDATA[Collection tenKittens = session.createFilter(\n"
-" mother.getKittens(), \"\")\n"
-" .setFirstResult(0).setMaxResults(10)\n"
-" .list();]]>"
-msgstr ""
+msgid "Even an empty filter query is useful, e.g. to load a subset of elements in a
large collection:"
+msgstr "即使无条件的过滤器(filter)也是有意义的。例如,用于加载一个大集合的子集: "
#. Tag: title
-#: session_api.xml:464
#, no-c-format
msgid "Criteria queries"
-msgstr "条件查询(Criteria queries)"
+msgstr "条件查询(Criteria queries)"
#. Tag: para
-#: session_api.xml:466
-#, fuzzy, no-c-format
-msgid ""
-"HQL is extremely powerful, but some developers prefer to build queries "
-"dynamically using an object-oriented API, rather than building query "
-"strings. Hibernate provides an intuitive <literal>Criteria</literal>
query "
-"API for these cases:"
-msgstr ""
-"HQL极为强大,但是有些人希望能够动态的使用一种面向对象API创建查询,而非在他们"
-"的Java代码中嵌入字符串。对于那部分人来说,Hibernate提供了直观的"
-"<literal>Criteria</literal>查询API。"
-
-#. Tag: programlisting
-#: session_api.xml:472
#, no-c-format
-msgid ""
-"<![CDATA[Criteria crit = session.createCriteria(Cat.class);\n"
-"crit.add( Restrictions.eq( \"color\", eg.Color.BLACK ) );\n"
-"crit.setMaxResults(10);\n"
-"List cats = crit.list();]]>"
-msgstr ""
+msgid "HQL is extremely powerful, but some developers prefer to build queries
dynamically using an object-oriented API, rather than building query strings. Hibernate
provides an intuitive <literal>Criteria</literal> query API for these
cases:"
+msgstr "HQL 极为强大,但是有些人希望能够动态的使用一种面向对象 API 创建查询,而非在他们的 Java
代码中嵌入字符串。对于那部分人来说,Hibernate 提供了直观的 <literal>Criteria</literal> 查询 API。 "
#. Tag: para
-#: session_api.xml:474
#, no-c-format
-msgid ""
-"The <literal>Criteria</literal> and the associated
<literal>Example</"
-"literal> API are discussed in more detail in <xref
linkend=\"querycriteria\"/"
-">."
-msgstr ""
-"<literal>Criteria</literal>以及相关的<literal>样例(Example)</literal>API将会"
-"再<xref linkend=\"querycriteria\"/>中详细讨论。"
+msgid "The <literal>Criteria</literal> and the associated
<literal>Example</literal> API are discussed in more detail in <xref
linkend=\"querycriteria\" />."
+msgstr "<literal>Criteria</literal>
以及相关的<literal>样例(Example)</literal>API 将会在 <xref
linkend=\"querycriteria\"/> 中详细讨论。 "
#. Tag: title
-#: session_api.xml:482
#, no-c-format
msgid "Queries in native SQL"
-msgstr "使用原生SQL的查询"
+msgstr "使用原生 SQL 的查询"
#. Tag: para
-#: session_api.xml:484
-#, fuzzy, no-c-format
-msgid ""
-"You can express a query in SQL, using
<literal>createSQLQuery()</literal> "
-"and let Hibernate manage the mapping from result sets to objects. You can at
"
-"any time call <literal>session.connection()</literal> and use the JDBC
"
-"<literal>Connection</literal> directly. If you choose to use the
Hibernate "
-"API, you must enclose SQL aliases in braces:"
-msgstr ""
-"你可以使用<literal>createSQLQuery()</literal>方法,用SQL来描述查询,并由"
-"Hibernate将结果集转换成对象。 请注意,你可以在任何时候调用<literal>session."
-"connection()</literal>来获得并使用JDBC <literal>Connection</literal>对象。
如"
-"果你选择使用Hibernate的API, 你必须把SQL别名用大括号包围起来:"
-
-#. Tag: programlisting
-#: session_api.xml:492
#, no-c-format
-msgid ""
-"<![CDATA[List cats = session.createSQLQuery(\"SELECT {cat.*} FROM CAT {cat}
"
-"WHERE ROWNUM<10\")\n"
-" .addEntity(\"cat\", Cat.class)\n"
-".list();]]>"
-msgstr ""
+msgid "You can express a query in SQL, using
<literal>createSQLQuery()</literal> and let Hibernate manage the mapping from
result sets to objects. You can at any time call
<literal>session.connection()</literal> and use the JDBC
<literal>Connection</literal> directly. If you choose to use the Hibernate
API, you must enclose SQL aliases in braces:"
+msgstr "你可以使用 <literal>createSQLQuery()</literal> 方法,用 SQL 来描述查询,并由
Hibernate 将结果集转换成对象。请注意,你可以在任何时候调用 <literal>session.connection()</literal>
来获得并使用 JDBC <literal>Connection</literal> 对象。 如果你选择使用 Hibernate 的 API,你必须把 SQL
别名用大括号包围起来: "
-#. Tag: programlisting
-#: session_api.xml:494
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[List cats = session.createSQLQuery(\n"
-" \"SELECT {cat}.ID AS {cat.id}, {cat}.SEX AS {cat.sex}, \" +\n"
-" \"{cat}.MATE AS {cat.mate}, {cat}.SUBCLASS AS {cat.class}, ...
\" "
-"+\n"
-" \"FROM CAT {cat} WHERE ROWNUM<10\")\n"
-" .addEntity(\"cat\", Cat.class)\n"
-".list()]]>"
-msgstr ""
+msgid "SQL queries can contain named and positional parameters, just like Hibernate
queries. More information about native SQL queries in Hibernate can be found in <xref
linkend=\"querysql\" />."
+msgstr "和 Hibernate 查询一样,SQL 查询也可以包含命名参数和占位参数。可以在 <xref
linkend=\"querysql\"/> 找到更多关于 Hibernate 中原生 SQL(native SQL)的信息。 "
-#. Tag: para
-#: session_api.xml:496
-#, fuzzy, no-c-format
-msgid ""
-"SQL queries can contain named and positional parameters, just like Hibernate
"
-"queries. More information about native SQL queries in Hibernate can be found
"
-"in <xref linkend=\"querysql\"/>."
-msgstr ""
-"和Hibernate查询一样,SQL查询也可以包含命名参数和占位参数。 可以在<xref "
-"linkend=\"querysql\"/>找到更多关于Hibernate中原生SQL(native SQL)的信息。"
-
#. Tag: title
-#: session_api.xml:507
#, no-c-format
msgid "Modifying persistent objects"
msgstr "修改持久对象"
#. Tag: para
-#: session_api.xml:509
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Transactional persistent instances</emphasis> (i.e. objects
"
-"loaded, saved, created or queried by the <literal>Session</literal>)
can be "
-"manipulated by the application, and any changes to persistent state will be "
-"persisted when the <literal>Session</literal> is
<emphasis>flushed</"
-"emphasis>. This is discussed later in this chapter. There is no need to call
"
-"a particular method (like <literal>update()</literal>, which has a
different "
-"purpose) to make your modifications persistent. The most straightforward way
"
-"to update the state of an object is to <literal>load()</literal> it and
then "
-"manipulate it directly while the <literal>Session</literal> is
open:"
-msgstr ""
-"<emphasis>事务中的持久实例</emphasis>(就是通过<literal>session</literal>装"
-"载、保存、创建或者查询出的对象) 被应用程序操作所造成的任何修改都会在"
-"<literal>Session</literal>被<emphasis>刷出(flushed)</emphasis>的时候被持久"
-"化(本章后面会详细讨论)。 这里不需要调用某个特定的方法(比如<literal>update"
-"()</literal>,设计它的目的是不同的)将你的修改持久化。 所以最直接的更新一个对"
-"象的方法就是在<literal>Session</literal>处于打开状态时<literal>load()</"
-"literal>它,然后直接修改即可:"
-
-#. Tag: programlisting
-#: session_api.xml:520
#, no-c-format
-msgid ""
-"<![CDATA[DomesticCat cat = (DomesticCat) sess.load( Cat.class, new Long"
-"(69) );\n"
-"cat.setName(\"PK\");\n"
-"sess.flush(); // changes to cat are automatically detected and
persisted]]>"
-msgstr ""
+msgid "<emphasis>Transactional persistent instances</emphasis> (i.e.
objects loaded, saved, created or queried by the <literal>Session</literal>)
can be manipulated by the application, and any changes to persistent state will be
persisted when the <literal>Session</literal> is
<emphasis>flushed</emphasis>. This is discussed later in this chapter. There
is no need to call a particular method (like <literal>update()</literal>,
which has a different purpose) to make your modifications persistent. The most
straightforward way to update the state of an object is to
<literal>load()</literal> it and then manipulate it directly while the
<literal>Session</literal> is open:"
+msgstr "<emphasis>事务中的持久实例</emphasis>(就是通过
<literal>session</literal> 装载、保存、创建或者查询出的对象) 被应用程序操作所造成的任何修改都会在
<literal>Session</literal>
被<emphasis>刷出(flushed)</emphasis>的时候被持久化(本章后面会详细讨论)。这里不需要调用某个特定的方法(比如
<literal>update()</literal>,设计它的目的是不同的)将你的修改持久化。所以最直接的更新一个对象的方法就是在
<literal>Session</literal> 处于打开状态时 <literal>load()</literal>
它,然后直接修改即可: "
#. Tag: para
-#: session_api.xml:522
-#, fuzzy, no-c-format
-msgid ""
-"Sometimes this programming model is inefficient, as it requires in the same "
-"session both an SQL <literal>SELECT</literal> to load an object and an
SQL "
-"<literal>UPDATE</literal> to persist its updated state. Hibernate
offers an "
-"alternate approach by using detached instances."
-msgstr ""
-"有时这种程序模型效率低下,因为它在同一Session里需要一条SQL <literal>SELECT</"
-"literal>语句(用于加载对象) 以及一条SQL <literal>UPDATE</literal>语句(持久化"
-"更新的状态)。 为此Hibernate提供了另一种途径,使用脱管(detached)实例。"
+#, no-c-format
+msgid "Sometimes this programming model is inefficient, as it requires in the same
session both an SQL <literal>SELECT</literal> to load an object and an SQL
<literal>UPDATE</literal> to persist its updated state. Hibernate offers an
alternate approach by using detached instances."
+msgstr "有时这种程序模型效率低下,因为它在同一 Session 里需要一条 SQL <literal>SELECT</literal>
语句(用于加载对象) 以及一条 SQL <literal>UPDATE</literal> 语句(持久化更新的状态)。为此 Hibernate
提供了另一种途径,使用脱管(detached)实例。 "
#. Tag: para
-#: session_api.xml:529
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate does not offer its own API for direct execution of "
-"<literal>UPDATE</literal> or <literal>DELETE</literal>
statements. Hibernate "
-"is a <emphasis>state management</emphasis> service, you do not have to
think "
-"in <emphasis>statements</emphasis> to use it. JDBC is a perfect API for
"
-"executing SQL statements, you can get a JDBC
<literal>Connection</literal> "
-"at any time by calling <literal>session.connection()</literal>.
Furthermore, "
-"the notion of mass operations conflicts with object/relational mapping for "
-"online transaction processing-oriented applications. Future versions of "
-"Hibernate can, however, provide special mass operation functions. See <xref
"
-"linkend=\"batch\"/> for some possible batch operation tricks."
-msgstr ""
-"请注意Hibernate本身不提供直接执行<placeholder-1/>或<placeholder-2/>语句的"
-"API。 Hibernate提供的是<placeholder-3/>服务,你不必考虑要使用的<placeholder-"
-"4/>。 JDBC是出色的执行SQL语句的API,任何时候调用<placeholder-5/>你都可以得到"
-"一个JDBC <placeholder-6/>对象。 此外,在联机事务处理(OLTP)程序中,大量操作"
-"(mass operations)与对象/关系映射的观点是相冲突的。 Hibernate的将来版本可能会"
-"提供专门的进行大量操作(mass operation)的功能。 参考<xref linkend=\"batch\"/"
-">,寻找一些可用的批量(batch)操作技巧。"
+#, no-c-format
+msgid "Hibernate does not offer its own API for direct execution of
<literal>UPDATE</literal> or <literal>DELETE</literal> statements.
Hibernate is a <emphasis>state management</emphasis> service, you do not have
to think in <emphasis>statements</emphasis> to use it. JDBC is a perfect API
for executing SQL statements, you can get a JDBC <literal>Connection</literal>
at any time by calling <literal>session.connection()</literal>. Furthermore,
the notion of mass operations conflicts with object/relational mapping for online
transaction processing-oriented applications. Future versions of Hibernate can, however,
provide special mass operation functions. See <xref linkend=\"batch\" />
for some possible batch operation tricks."
+msgstr "请注意 Hibernate 本身不提供直接执行 <literal>UPDATE</literal> 或
<literal>DELETE</literal> 语句的 API。Hibernate 提供的是 <emphasis>state
management</emphasis> 服务,你不必考虑要使用的 <emphasis>statements</emphasis>。JDBC
是出色的执行 SQL 语句的 API,任何时候调用 <literal>session.connection()</literal> 你都可以得到一个
<literal>Connection</literal> 对象。 此外,在联机事务处理(OLTP)程序中,大量操作(mass
operations)与对象/关系映射的观点是相冲突的。Hibernate 的将来版本可能会提供专门的进行大量操作(mass operation)的功能。参考 <xref
linkend=\"batch\"/>,寻找一些可用的批量(batch)操作技巧。 "
#. Tag: title
-#: session_api.xml:546
#, no-c-format
msgid "Modifying detached objects"
-msgstr "修改脱管(Detached)对象"
+msgstr "修改脱管(Detached)对象"
#. Tag: para
-#: session_api.xml:548
#, no-c-format
-msgid ""
-"Many applications need to retrieve an object in one transaction, send it to "
-"the UI layer for manipulation, then save the changes in a new transaction. "
-"Applications that use this kind of approach in a high-concurrency "
-"environment usually use versioned data to ensure isolation for the
\"long\" "
-"unit of work."
-msgstr ""
-"很多程序需要在某个事务中获取对象,然后将对象发送到界面层去操作,最后在一个新"
-"的事务保存所做的修改。 在高并发访问的环境中使用这种方式,通常使用附带版本信息"
-"的数据来保证这些“长“工作单元之间的隔离。"
+msgid "Many applications need to retrieve an object in one transaction, send it to
the UI layer for manipulation, then save the changes in a new transaction. Applications
that use this kind of approach in a high-concurrency environment usually use versioned
data to ensure isolation for the \"long\" unit of work."
+msgstr
"很多程序需要在某个事务中获取对象,然后将对象发送到界面层去操作,最后在一个新的事务保存所做的修改。在高并发访问的环境中使用这种方式,通常使用附带版本信息的数据来保证这些“长“工作单元之间的隔离。"
#. Tag: para
-#: session_api.xml:555
#, no-c-format
-msgid ""
-"Hibernate supports this model by providing for reattachment of detached "
-"instances using the <literal>Session.update()</literal> or
<literal>Session."
-"merge()</literal> methods:"
-msgstr ""
-"Hibernate通过提供<literal>Session.update()</literal>或<literal>Session.merge"
-"()</literal> 重新关联脱管实例的办法来支持这种模型。"
+msgid "Hibernate supports this model by providing for reattachment of detached
instances using the <literal>Session.update()</literal> or
<literal>Session.merge()</literal> methods:"
+msgstr "Hibernate 通过提供 <literal>Session.update()</literal> 或
<literal>Session.merge()</literal> 重新关联脱管实例的办法来支持这种模型。"
-#. Tag: programlisting
-#: session_api.xml:561
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[// in the first session\n"
-"Cat cat = (Cat) firstSession.load(Cat.class, catId);\n"
-"Cat potentialMate = new Cat();\n"
-"firstSession.save(potentialMate);\n"
-"\n"
-"// in a higher layer of the application\n"
-"cat.setMate(potentialMate);\n"
-"\n"
-"// later, in a new session\n"
-"secondSession.update(cat); // update cat\n"
-"secondSession.update(mate); // update mate]]>"
-msgstr ""
+msgid "If the <literal>Cat</literal> with identifier
<literal>catId</literal> had already been loaded by
<literal>secondSession</literal> when the application tried to reattach it, an
exception would have been thrown."
+msgstr "如果具有 <literal>catId</literal> 持久化标识的
<literal>Cat</literal>
之前已经被<literal>另一Session(secondSession)</literal>装载了,
应用程序进行重关联操作(reattach)的时候会抛出一个异常。"
#. Tag: para
-#: session_api.xml:563
#, no-c-format
-msgid ""
-"If the <literal>Cat</literal> with identifier
<literal>catId</literal> had "
-"already been loaded by <literal>secondSession</literal> when the
application "
-"tried to reattach it, an exception would have been thrown."
-msgstr ""
-"如果具有<literal>catId</literal>持久化标识的<literal>Cat</literal>之前已经被"
-"<literal>另一Session(secondSession)</literal>装载了, 应用程序进行重关联操作"
-"(reattach)的时候会抛出一个异常。"
+msgid "Use <literal>update()</literal> if you are certain that the
session does not contain an already persistent instance with the same identifier. Use
<literal>merge()</literal> if you want to merge your modifications at any time
without consideration of the state of the session. In other words,
<literal>update()</literal> is usually the first method you would call in a
fresh session, ensuring that the reattachment of your detached instances is the first
operation that is executed."
+msgstr "如果你确定当前 session 没有包含与之具有相同持久化标识的持久实例,使用
<literal>update()</literal>。如果想随时合并你的的改动而不考虑 session 的状态,使用
<literal>merge()</literal>。换句话说,在一个新 session 中通常第一个调用的是
<literal>update()</literal> 方法,以便保证重新关联脱管(detached)对象的操作首先被执行。 "
#. Tag: para
-#: session_api.xml:569
-#, fuzzy, no-c-format
-msgid ""
-"Use <literal>update()</literal> if you are certain that the session
does not "
-"contain an already persistent instance with the same identifier. Use "
-"<literal>merge()</literal> if you want to merge your modifications at
any "
-"time without consideration of the state of the session. In other words, "
-"<literal>update()</literal> is usually the first method you would call
in a "
-"fresh session, ensuring that the reattachment of your detached instances is "
-"the first operation that is executed."
-msgstr ""
-"如果你确定当前session没有包含与之具有相同持久化标识的持久实例,使用"
-"<literal>update()</literal>。 如果想随时合并你的的改动而不考虑session的状态,"
-"使用<literal>merge()</literal>。 换句话说,在一个新session中通常第一个调用的"
-"是<literal>update()</literal>方法,以便保证重新关联脱管(detached)对象的操作首"
-"先被执行。"
+#, no-c-format
+msgid "The application should individually <literal>update()</literal>
detached instances that are reachable from the given detached instance
<emphasis>only</emphasis> if it wants their state to be updated. This can be
automated using <emphasis>transitive persistence</emphasis>. See <xref
linkend=\"objectstate-transitive\" /> for more information."
+msgstr
"如果希望相关联的脱管对象(通过引用“可到达”的脱管对象)的数据也要更新到数据库时(并且也<emphasis>仅仅</emphasis>在这种情况),可以对该相关联的脱管对象单独调用
<literal>update()</literal> 当然这些可以自动完成,即通过使用<emphasis>传播性持久化(transitive
persistence)</emphasis>,请看 <xref
linkend=\"objectstate-transitive\"/>。 "
#. Tag: para
-#: session_api.xml:578
-#, fuzzy, no-c-format
-msgid ""
-"The application should individually <literal>update()</literal>
detached "
-"instances that are reachable from the given detached instance "
-"<emphasis>only</emphasis> if it wants their state to be updated. This
can be "
-"automated using <emphasis>transitive persistence</emphasis>. See
<xref "
-"linkend=\"objectstate-transitive\"/> for more information."
-msgstr ""
-"如果希望相关联的脱管对象(通过引用“可到达”的脱管对象)的数据也要更新到数据库"
-"时(并且也<emphasis>仅仅</emphasis>在这种情况), 可以对该相关联的脱管对象单"
-"独调用<literal>update()</literal> 当然这些可以自动完成,即通过使用<emphasis>"
-"传播性持久化(transitive persistence)</emphasis>,请看<xref linkend="
-"\"objectstate-transitive\"/>。"
+#, no-c-format
+msgid "The <literal>lock()</literal> method also allows an application
to reassociate an object with a new session. However, the detached instance has to be
unmodified."
+msgstr "<literal>lock()</literal> 方法也允许程序重新关联某个对象到一个新 session
上。不过,该脱管(detached)的对象必须是没有修改过的。"
#. Tag: para
-#: session_api.xml:585
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>lock()</literal> method also allows an application to
"
-"reassociate an object with a new session. However, the detached instance has
"
-"to be unmodified."
-msgstr ""
-"<literal>lock()</literal>方法也允许程序重新关联某个对象到一个新session上。不"
-"过,该脱管(detached)的对象必须是没有修改过的!"
-
-#. Tag: programlisting
-#: session_api.xml:590
#, no-c-format
-msgid ""
-"<![CDATA[//just reassociate:\n"
-"sess.lock(fritz, LockMode.NONE);\n"
-"//do a version check, then reassociate:\n"
-"sess.lock(izi, LockMode.READ);\n"
-"//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n"
-"sess.lock(pk, LockMode.UPGRADE);]]>"
-msgstr ""
+msgid "Note that <literal>lock()</literal> can be used with various
<literal>LockMode</literal>s. See the API documentation and the chapter on
transaction handling for more information. Reattachment is not the only usecase for
<literal>lock()</literal>."
+msgstr "请注意,<literal>lock()</literal> 可以搭配多种
<literal>LockMode</literal>,更多信息请阅读 API 文档以及关于事务处理(transaction
handling)的章节。重新关联不是 <literal>lock()</literal> 的唯一用途。 "
#. Tag: para
-#: session_api.xml:592
-#, fuzzy, no-c-format
-msgid ""
-"Note that <literal>lock()</literal> can be used with various "
-"<literal>LockMode</literal>s. See the API documentation and the chapter
on "
-"transaction handling for more information. Reattachment is not the only "
-"usecase for <literal>lock()</literal>."
-msgstr ""
-"请注意,<literal>lock()</literal>可以搭配多种<literal>LockMode</literal>,
更"
-"多信息请阅读API文档以及关于事务处理(transaction handling)的章节。重新关联不是"
-"<literal>lock()</literal>的唯一用途。"
-
-#. Tag: para
-#: session_api.xml:599
#, no-c-format
-msgid ""
-"Other models for long units of work are discussed in <xref linkend="
-"\"transactions-optimistic\"/>."
-msgstr ""
-"其他用于长时间工作单元的模型会在<xref linkend=\"transactions-optimistic\"/>中"
-"讨论。"
+msgid "Other models for long units of work are discussed in <xref
linkend=\"transactions-optimistic\" />."
+msgstr "其他用于长时间工作单元的模型会在 <xref linkend=\"transactions-optimistic\"/>
中讨论。 "
#. Tag: title
-#: session_api.xml:606
#, no-c-format
msgid "Automatic state detection"
msgstr "自动状态检测"
#. Tag: para
-#: session_api.xml:608
#, no-c-format
-msgid ""
-"Hibernate users have requested a general purpose method that either saves a "
-"transient instance by generating a new identifier or updates/reattaches the "
-"detached instances associated with its current identifier. The "
-"<literal>saveOrUpdate()</literal> method implements this
functionality."
-msgstr ""
-"Hibernate的用户曾要求一个既可自动分配新持久化标识(identifier)保存瞬时"
-"(transient)对象,又可更新/重新关联脱管(detached)实例的通用方法。 "
-"<literal>saveOrUpdate()</literal>方法实现了这个功能。"
+msgid "Hibernate users have requested a general purpose method that either saves a
transient instance by generating a new identifier or updates/reattaches the detached
instances associated with its current identifier. The
<literal>saveOrUpdate()</literal> method implements this functionality."
+msgstr "Hibernate
的用户曾要求一个既可自动分配新持久化标识(identifier)保存瞬时(transient)对象,又可更新/重新关联脱管(detached)实例的通用方法。<literal>saveOrUpdate()</literal>
方法实现了这个功能。"
-#. Tag: programlisting
-#: session_api.xml:615
-#, no-c-format
-msgid ""
-"<![CDATA[// in the first session\n"
-"Cat cat = (Cat) firstSession.load(Cat.class, catID);\n"
-"\n"
-"// in a higher tier of the application\n"
-"Cat mate = new Cat();\n"
-"cat.setMate(mate);\n"
-"\n"
-"// later, in a new session\n"
-"secondSession.saveOrUpdate(cat); // update existing state (cat has a non-"
-"null id)\n"
-"secondSession.saveOrUpdate(mate); // save the new instance (mate has a null
"
-"id)]]>"
-msgstr ""
-
#. Tag: para
-#: session_api.xml:617
#, no-c-format
-msgid ""
-"The usage and semantics of <literal>saveOrUpdate()</literal> seems to
be "
-"confusing for new users. Firstly, so long as you are not trying to use "
-"instances from one session in another new session, you should not need to "
-"use <literal>update()</literal>,
<literal>saveOrUpdate()</literal>, or "
-"<literal>merge()</literal>. Some whole applications will never use
either of "
-"these methods."
-msgstr ""
-"<literal>saveOrUpdate()</literal>用途和语义可能会使新用户感到迷惑。 首先,只"
-"要你没有尝试在某个session中使用来自另一session的实例,你就应该不需要使用"
-"<literal>update()</literal>,
<literal>saveOrUpdate()</literal>,或"
-"<literal>merge()</literal>。有些程序从来不用这些方法。"
+msgid "The usage and semantics of <literal>saveOrUpdate()</literal>
seems to be confusing for new users. Firstly, so long as you are not trying to use
instances from one session in another new session, you should not need to use
<literal>update()</literal>, <literal>saveOrUpdate()</literal>, or
<literal>merge()</literal>. Some whole applications will never use either of
these methods."
+msgstr "<literal>saveOrUpdate()</literal> 用途和语义可能会使新用户感到迷惑。首先,只要你没有尝试在某个
session 中使用来自另一 session 的实例,你就应该不需要使用 <literal>update()</literal>,
<literal>saveOrUpdate()</literal>,或
<literal>merge()</literal>。有些程序从来不用这些方法。"
#. Tag: para
-#: session_api.xml:625
#, no-c-format
-msgid ""
-"Usually <literal>update()</literal> or
<literal>saveOrUpdate()</literal> are "
-"used in the following scenario:"
-msgstr ""
-"通常下面的场景会使用<literal>update()</literal>或<literal>saveOrUpdate()</"
-"literal>:"
+msgid "Usually <literal>update()</literal> or
<literal>saveOrUpdate()</literal> are used in the following scenario:"
+msgstr "通常下面的场景会使用 <literal>update()</literal> 或
<literal>saveOrUpdate()</literal>:"
#. Tag: para
-#: session_api.xml:632
#, no-c-format
msgid "the application loads an object in the first session"
-msgstr "程序在第一个session中加载对象"
+msgstr "程序在第一个 session 中加载对象"
#. Tag: para
-#: session_api.xml:637
#, no-c-format
msgid "the object is passed up to the UI tier"
msgstr "该对象被传递到表现层"
#. Tag: para
-#: session_api.xml:642
#, no-c-format
msgid "some modifications are made to the object"
msgstr "对象发生了一些改动"
#. Tag: para
-#: session_api.xml:647
#, no-c-format
msgid "the object is passed back down to the business logic tier"
msgstr "该对象被返回到业务逻辑层"
#. Tag: para
-#: session_api.xml:652
#, no-c-format
-msgid ""
-"the application persists these modifications by calling
<literal>update()</"
-"literal> in a second session"
-msgstr "程序调用第二个session的<literal>update()</literal>方法持久这些改动"
+msgid "the application persists these modifications by calling
<literal>update()</literal> in a second session"
+msgstr "程序调用第二个 session 的 <literal>update()</literal> 方法持久这些改动"
#. Tag: para
-#: session_api.xml:659
#, no-c-format
msgid "<literal>saveOrUpdate()</literal> does the following:"
-msgstr "<literal>saveOrUpdate()</literal>做下面的事:"
+msgstr "<literal>saveOrUpdate()</literal> 做下面的事:"
#. Tag: para
-#: session_api.xml:665
#, no-c-format
msgid "if the object is already persistent in this session, do nothing"
-msgstr "如果对象已经在本session中持久化了,不做任何事"
+msgstr "如果对象已经在本 session 中持久化了,不做任何事"
#. Tag: para
-#: session_api.xml:670
#, no-c-format
-msgid ""
-"if another object associated with the session has the same identifier, throw
"
-"an exception"
-msgstr ""
-"如果另一个与本session关联的对象拥有相同的持久化标识(identifier),抛出一个异常"
+msgid "if another object associated with the session has the same identifier, throw
an exception"
+msgstr "如果另一个与本 session 关联的对象拥有相同的持久化标识(identifier),抛出一个异常"
#. Tag: para
-#: session_api.xml:676
#, no-c-format
msgid "if the object has no identifier property,
<literal>save()</literal> it"
-msgstr ""
-"如果对象没有持久化标识(identifier)属性,对其调用<literal>save()</literal>"
+msgstr "如果对象没有持久化标识(identifier)属性,对其调用 <literal>save()</literal>"
#. Tag: para
-#: session_api.xml:681
#, no-c-format
-msgid ""
-"if the object's identifier has the value assigned to a newly instantiated
"
-"object, <literal>save()</literal> it"
-msgstr ""
-"如果对象的持久标识(identifier)表明其是一个新实例化的对象,对其调用"
-"<literal>save()</literal>"
+msgid "if the object's identifier has the value assigned to a newly instantiated
object, <literal>save()</literal> it"
+msgstr "如果对象的持久标识(identifier)表明其是一个新实例化的对象,对其调用
<literal>save()</literal>。"
#. Tag: para
-#: session_api.xml:687
-#, fuzzy, no-c-format
-msgid ""
-"if the object is versioned by a
<literal><version></literal> or "
-"<literal><timestamp></literal>, and the version property
value is the "
-"same value assigned to a newly instantiated object,
<literal>save()</"
-"literal> it"
-msgstr ""
-"如果对象是附带版本信息的(通过<literal><version></literal>或"
-"<literal><timestamp></literal>)
并且版本属性的值表明其是一个新实例化的"
-"对象,<literal>save()</literal>它。"
+#, no-c-format
+msgid "if the object is versioned by a
<literal><version></literal> or
<literal><timestamp></literal>, and the version property value
is the same value assigned to a newly instantiated object,
<literal>save()</literal> it"
+msgstr "如果对象是附带版本信息的(通过 <literal><version></literal> 或
<literal><timestamp></literal>)并且版本属性的值表明其是一个新实例化的对象,<literal>save()</literal>
它。 "
#. Tag: para
-#: session_api.xml:695
#, no-c-format
msgid "otherwise <literal>update()</literal> the object"
-msgstr "否则<literal>update()</literal> 这个对象"
+msgstr "否则 <literal>update()</literal> 这个对象"
#. Tag: para
-#: session_api.xml:701
#, no-c-format
msgid "and <literal>merge()</literal> is very different:"
-msgstr "<literal>merge()</literal>可非常不同:"
+msgstr "<literal>merge()</literal> 可非常不同:"
#. Tag: para
-#: session_api.xml:707
#, no-c-format
-msgid ""
-"if there is a persistent instance with the same identifier currently "
-"associated with the session, copy the state of the given object onto the "
-"persistent instance"
-msgstr ""
-"如果session中存在相同持久化标识(identifier)的实例,用用户给出的对象的状态覆盖"
-"旧有的持久实例"
+msgid "if there is a persistent instance with the same identifier currently
associated with the session, copy the state of the given object onto the persistent
instance"
+msgstr "如果 session 中存在相同持久化标识(identifier)的实例,用用户给出的对象的状态覆盖旧有的持久实例"
#. Tag: para
-#: session_api.xml:714
#, no-c-format
-msgid ""
-"if there is no persistent instance currently associated with the session, "
-"try to load it from the database, or create a new persistent instance"
-msgstr ""
-"如果session没有相应的持久实例,则尝试从数据库中加载,或创建新的持久化实例"
+msgid "if there is no persistent instance currently associated with the session, try
to load it from the database, or create a new persistent instance"
+msgstr "如果 session 没有相应的持久实例,则尝试从数据库中加载,或创建新的持久化实例"
#. Tag: para
-#: session_api.xml:720
#, no-c-format
msgid "the persistent instance is returned"
msgstr "最后返回该持久实例"
#. Tag: para
-#: session_api.xml:725
#, no-c-format
-msgid ""
-"the given instance does not become associated with the session, it remains "
-"detached"
-msgstr "用户给出的这个对象没有被关联到session上,它依旧是脱管的"
+msgid "the given instance does not become associated with the session, it remains
detached"
+msgstr "用户给出的这个对象没有被关联到 session 上,它依旧是脱管的"
#. Tag: title
-#: session_api.xml:735
#, no-c-format
msgid "Deleting persistent objects"
msgstr "删除持久对象"
#. Tag: para
-#: session_api.xml:737
-#, fuzzy, no-c-format
-msgid ""
-"<literal>Session.delete()</literal> will remove an object's state
from the "
-"database. Your application, however, can still hold a reference to a deleted
"
-"object. It is best to think of <literal>delete()</literal> as making a
"
-"persistent instance, transient."
-msgstr ""
-"使用<literal>Session.delete()</literal>会把对象的状态从数据库中移除。 当然,"
-"你的应用程序可能仍然持有一个指向已删除对象的引用。所以,最好这样理解:"
-"<literal>delete()</literal>的用途是把一个持久实例变成瞬时(transient)实例。"
-
-#. Tag: programlisting
-#: session_api.xml:744
#, no-c-format
-msgid "<![CDATA[sess.delete(cat);]]>"
-msgstr ""
+msgid "<literal>Session.delete()</literal> will remove an object's
state from the database. Your application, however, can still hold a reference to a
deleted object. It is best to think of <literal>delete()</literal> as making a
persistent instance, transient."
+msgstr "使用 <literal>Session.delete()</literal>
会把对象的状态从数据库中移除。当然,你的应用程序可能仍然持有一个指向已删除对象的引用。所以,最好这样理解:<literal>delete()</literal>
的用途是把一个持久实例变成瞬时(transient)实例。 "
#. Tag: para
-#: session_api.xml:746
-#, fuzzy, no-c-format
-msgid ""
-"You can delete objects in any order, without risk of foreign key constraint "
-"violations. It is still possible to violate a <literal>NOT
NULL</literal> "
-"constraint on a foreign key column by deleting objects in the wrong order,
e."
-"g. if you delete the parent, but forget to delete the children."
-msgstr ""
-"你可以用你喜欢的任何顺序删除对象,不用担心外键约束冲突。当然,如果你搞错了顺"
-"序,还是有可能引发在外键字段定义的<literal>NOT NULL</literal>约束冲突。 例如"
-"你删除了父对象,但是忘记删除孩子们。"
+#, no-c-format
+msgid "You can delete objects in any order, without risk of foreign key constraint
violations. It is still possible to violate a <literal>NOT NULL</literal>
constraint on a foreign key column by deleting objects in the wrong order, e.g. if you
delete the parent, but forget to delete the children."
+msgstr "你可以用你喜欢的任何顺序删除对象,不用担心外键约束冲突。当然,如果你搞错了顺序,还是有可能引发在外键字段定义的 <literal>NOT
NULL</literal> 约束冲突。例如你删除了父对象,但是忘记删除其子对象。"
#. Tag: title
-#: session_api.xml:757
#, no-c-format
msgid "Replicating object between two different datastores"
msgstr "在两个不同数据库间复制对象"
#. Tag: para
-#: session_api.xml:759
-#, fuzzy, no-c-format
-msgid ""
-"It is sometimes useful to be able to take a graph of persistent instances "
-"and make them persistent in a different datastore, without regenerating "
-"identifier values."
-msgstr ""
-"偶尔会用到不重新生成持久化标识(identifier),将持久实例以及其关联的实例持久到"
-"不同的数据库中的操作。"
-
-#. Tag: programlisting
-#: session_api.xml:765
#, no-c-format
-msgid ""
-"<![CDATA[//retrieve a cat from one database\n"
-"Session session1 = factory1.openSession();\n"
-"Transaction tx1 = session1.beginTransaction();\n"
-"Cat cat = session1.get(Cat.class, catId);\n"
-"tx1.commit();\n"
-"session1.close();\n"
-"\n"
-"//reconcile with a second database\n"
-"Session session2 = factory2.openSession();\n"
-"Transaction tx2 = session2.beginTransaction();\n"
-"session2.replicate(cat, ReplicationMode.LATEST_VERSION);\n"
-"tx2.commit();\n"
-"session2.close();]]>"
-msgstr ""
+msgid "It is sometimes useful to be able to take a graph of persistent instances and
make them persistent in a different datastore, without regenerating identifier
values."
+msgstr "偶尔会用到不重新生成持久化标识(identifier),将持久实例以及其关联的实例持久到不同的数据库中的操作。 "
#. Tag: para
-#: session_api.xml:767
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>ReplicationMode</literal> determines how
<literal>replicate()</"
-"literal> will deal with conflicts with existing rows in the database:"
-msgstr ""
-"<literal>ReplicationMode</literal>决定在和数据库中已存在记录由冲突时,"
-"<literal>replicate()</literal>如何处理。"
+#, no-c-format
+msgid "The <literal>ReplicationMode</literal> determines how
<literal>replicate()</literal> will deal with conflicts with existing rows in
the database:"
+msgstr "<literal>ReplicationMode</literal>
决定在和数据库中已存在记录由冲突时,<literal>replicate()</literal> 如何处理。 "
#. Tag: para
-#: session_api.xml:774
-#, fuzzy, no-c-format
-msgid ""
-"<literal>ReplicationMode.IGNORE</literal>: ignores the object when
there is "
-"an existing database row with the same identifier"
-msgstr "<literal>ReplicationMode.IGNORE</literal> - 忽略它"
+#, no-c-format
+msgid "<literal>ReplicationMode.IGNORE</literal>: ignores the object
when there is an existing database row with the same identifier"
+msgstr
"<literal>ReplicationMode.IGNORE</literal>:当某个现有数据库记录具有相同标识符时忽略它"
#. Tag: para
-#: session_api.xml:780
-#, fuzzy, no-c-format
-msgid ""
-"<literal>ReplicationMode.OVERWRITE</literal>: overwrites any existing
"
-"database row with the same identifier"
-msgstr "<literal>ReplicationMode.OVERWRITE</literal> - 覆盖相同的行"
+#, no-c-format
+msgid "<literal>ReplicationMode.OVERWRITE</literal>: overwrites any
existing database row with the same identifier"
+msgstr
"<literal>ReplicationMode.OVERWRITE</literal>:用相同的标识符覆盖现有数据库记录"
#. Tag: para
-#: session_api.xml:786
-#, fuzzy, no-c-format
-msgid ""
-"<literal>ReplicationMode.EXCEPTION</literal>: throws an exception if
there "
-"is an existing database row with the same identifier"
-msgstr "<literal>ReplicationMode.EXCEPTION</literal> - 抛出异常"
+#, no-c-format
+msgid "<literal>ReplicationMode.EXCEPTION</literal>: throws an exception
if there is an existing database row with the same identifier"
+msgstr
"<literal>ReplicationMode.EXCEPTION</literal>:当某个现有数据库记录具有相同标识符时抛出异常"
#. Tag: para
-#: session_api.xml:792
-#, fuzzy, no-c-format
-msgid ""
-"<literal>ReplicationMode.LATEST_VERSION</literal>: overwrites the row
if its "
-"version number is earlier than the version number of the object, or ignore "
-"the object otherwise"
-msgstr ""
-"<literal>ReplicationMode.LATEST_VERSION</literal> - 如果当前的版本较新,则覆"
-"盖,否则忽略"
+#, no-c-format
+msgid "<literal>ReplicationMode.LATEST_VERSION</literal>: overwrites the
row if its version number is earlier than the version number of the object, or ignore the
object otherwise"
+msgstr
"<literal>ReplicationMode.LATEST_VERSION</literal>:如果当前的版本较新,则覆盖,否则忽略"
#. Tag: para
-#: session_api.xml:800
#, no-c-format
-msgid ""
-"Usecases for this feature include reconciling data entered into different "
-"database instances, upgrading system configuration information during "
-"product upgrades, rolling back changes made during non-ACID transactions and
"
-"more."
-msgstr ""
-"这个功能的用途包括使录入的数据在不同数据库中一致,产品升级时升级系统配置信"
-"息,回滚non-ACID事务中的修改等等。 (译注,non-ACID,非ACID;ACID,Atomic,"
-"Consistent,Isolated and Durable的缩写)"
+msgid "Usecases for this feature include reconciling data entered into different
database instances, upgrading system configuration information during product upgrades,
rolling back changes made during non-ACID transactions and more."
+msgstr "这个功能的用途包括使录入的数据在不同数据库中一致,产品升级时升级系统配置信息,回滚 non-ACID 事务中的修改等等。(译注,non-ACID,非
ACID;ACID,Atomic,Consistent,Isolated and Durable 的缩写)"
#. Tag: title
-#: session_api.xml:809
#, no-c-format
msgid "Flushing the Session"
-msgstr "Session刷出(flush)"
+msgstr "Session 刷出(flush)"
#. Tag: para
-#: session_api.xml:811
-#, fuzzy, no-c-format
-msgid ""
-"Sometimes the <literal>Session</literal> will execute the SQL
statements "
-"needed to synchronize the JDBC connection's state with the state of objects
"
-"held in memory. This process, called <emphasis>flush</emphasis>, occurs
by "
-"default at the following points:"
-msgstr ""
-"每间隔一段时间,<literal>Session</literal>会执行一些必需的SQL语句来把内存中的"
-"对象的状态同步到JDBC连接中。这个过程被称为<emphasis>刷出(flush)</emphasis>,"
-"默认会在下面的时间点执行:"
+#, no-c-format
+msgid "Sometimes the <literal>Session</literal> will execute the SQL
statements needed to synchronize the JDBC connection's state with the state of objects
held in memory. This process, called <emphasis>flush</emphasis>, occurs by
default at the following points:"
+msgstr "每间隔一段时间,<literal>Session</literal> 会执行一些必需的 SQL 语句来把内存中的对象的状态同步到
JDBC 连接中。这个过程被称为<emphasis>刷出(flush)</emphasis>,默认会在下面的时间点执行: "
#. Tag: para
-#: session_api.xml:820
#, no-c-format
msgid "before some query executions"
msgstr "在某些查询执行之前"
#. Tag: para
-#: session_api.xml:825
#, no-c-format
msgid "from <literal>org.hibernate.Transaction.commit()</literal>"
-msgstr
"在调用<literal>org.hibernate.Transaction.commit()</literal>的时候"
+msgstr "在调用 <literal>org.hibernate.Transaction.commit()</literal>
的时候"
#. Tag: para
-#: session_api.xml:830
#, no-c-format
msgid "from <literal>Session.flush()</literal>"
-msgstr "在调用<literal>Session.flush()</literal>的时候"
+msgstr "在调用 <literal>Session.flush()</literal> 的时候"
#. Tag: para
-#: session_api.xml:836
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The SQL statements are issued in the following order:"
-msgstr "涉及的SQL语句会按照下面的顺序发出执行:"
+msgstr "涉及的 SQL 语句会按照下面的顺序发出执行: "
#. Tag: para
-#: session_api.xml:842
-#, fuzzy, no-c-format
-msgid ""
-"all entity insertions in the same order the corresponding objects were saved
"
-"using <literal>Session.save()</literal>"
-msgstr ""
-"所有对实体进行插入的语句,其顺序按照对象执行<literal>Session.save()</literal>"
-"的时间顺序"
+#, no-c-format
+msgid "all entity insertions in the same order the corresponding objects were saved
using <literal>Session.save()</literal>"
+msgstr "所有对实体进行插入的语句,其顺序按照对象执行 <literal>Session.save()</literal> 的时间顺序
"
#. Tag: para
-#: session_api.xml:848
#, no-c-format
msgid "all entity updates"
msgstr "所有对实体进行更新的语句"
#. Tag: para
-#: session_api.xml:853
#, no-c-format
msgid "all collection deletions"
msgstr "所有进行集合删除的语句"
#. Tag: para
-#: session_api.xml:858
#, no-c-format
msgid "all collection element deletions, updates and insertions"
msgstr "所有对集合元素进行删除,更新或者插入的语句"
#. Tag: para
-#: session_api.xml:863
#, no-c-format
msgid "all collection insertions"
msgstr "所有进行集合插入的语句"
#. Tag: para
-#: session_api.xml:868
-#, fuzzy, no-c-format
-msgid ""
-"all entity deletions in the same order the corresponding objects were "
-"deleted using <literal>Session.delete()</literal>"
-msgstr ""
-"所有对实体进行删除的语句,其顺序按照对象执行<literal>Session.delete()</"
-"literal>的时间顺序"
+#, no-c-format
+msgid "all entity deletions in the same order the corresponding objects were deleted
using <literal>Session.delete()</literal>"
+msgstr "所有对实体进行删除的语句,其顺序按照对象执行 <literal>Session.delete()</literal> 的时间顺序
"
#. Tag: para
-#: session_api.xml:875
-#, fuzzy, no-c-format
-msgid ""
-"An exception is that objects using <literal>native</literal> ID
generation "
-"are inserted when they are saved."
-msgstr ""
-"(有一个例外是,如果对象使用<literal>native</literal>方式来生成ID(持久化标"
-"识)的话,它们一执行save就会被插入。)"
+#, no-c-format
+msgid "An exception is that objects using <literal>native</literal> ID
generation are inserted when they are saved."
+msgstr "有一个例外是,如果对象使用 <literal>native</literal> 方式来生成 ID(持久化标识)的话,它们一执行
save 就会被插入。"
#. Tag: para
-#: session_api.xml:880
-#, fuzzy, no-c-format
-msgid ""
-"Except when you explicitly <literal>flush()</literal>, there are
absolutely "
-"no guarantees about <emphasis>when</emphasis> the
<literal>Session</literal> "
-"executes the JDBC calls, only the <emphasis>order</emphasis> in which
they "
-"are executed. However, Hibernate does guarantee that the
<literal>Query.list"
-"(..)</literal> will never return stale or incorrect data."
-msgstr ""
-"除非你明确地发出了<literal>flush()</literal>指令,关于Session<emphasis>何时</"
-"emphasis>会执行这些JDBC调用是完全无法保证的,只能保证它们执行的前后顺序。 当"
-"然,Hibernate保证,<literal>Query.list(..)</literal>绝对不会返回已经失效的数"
-"据,也不会返回错误数据。"
+#, no-c-format
+msgid "Except when you explicitly <literal>flush()</literal>, there are
absolutely no guarantees about <emphasis>when</emphasis> the
<literal>Session</literal> executes the JDBC calls, only the
<emphasis>order</emphasis> in which they are executed. However, Hibernate does
guarantee that the <literal>Query.list(..)</literal> will never return stale
or incorrect data."
+msgstr "除非你明确地发出了 <literal>flush()</literal> 指令,关于
Session<emphasis> 何时</emphasis>会执行这些 JDBC
调用是完全无法保证的,只能保证它们执行的前后顺序。当然,Hibernate 保证,<literal>Query.list(..)</literal>
绝对不会返回已经失效的数据,也不会返回错误数据。 "
#. Tag: para
-#: session_api.xml:888
-#, fuzzy, no-c-format
-msgid ""
-"It is possible to change the default behavior so that flush occurs less "
-"frequently. The <literal>FlushMode</literal> class defines three
different "
-"modes: only flush at commit time when the Hibernate
<literal>Transaction</"
-"literal> API is used, flush automatically using the explained routine, or
"
-"never flush unless <literal>flush()</literal> is called explicitly. The
last "
-"mode is useful for long running units of work, where a
<literal>Session</"
-"literal> is kept open and disconnected for a long time (see <xref
linkend="
-"\"transactions-optimistic-longsession\"/>)."
-msgstr ""
-"也可以改变默认的设置,来让刷出(flush)操作发生的不那么频繁。 "
-"<literal>FlushMode</literal>类定义了三种不同的方式。 仅在提交时刷出(仅当"
-"Hibernate的<literal>Transaction</literal> API被使用时有效), 按照刚才说的方式"
-"刷出, 以及除非明确使用<literal>flush()</literal>否则从不刷出。 最后一种模式"
-"对于那些需要长时间保持<literal>Session</literal>为打开或者断线状态的长时间运"
-"行的工作单元很有用。 (参见 <xref linkend=\"transactions-optimistic-"
-"longsession\"/>)."
-
-#. Tag: programlisting
-#: session_api.xml:898
#, no-c-format
-msgid ""
-"<![CDATA[sess = sf.openSession();\n"
-"Transaction tx = sess.beginTransaction();\n"
-"sess.setFlushMode(FlushMode.COMMIT); // allow queries to return stale
state\n"
-"\n"
-"Cat izi = (Cat) sess.load(Cat.class, id);\n"
-"izi.setName(iznizi);\n"
-"\n"
-"// might return stale data\n"
-"sess.find(\"from Cat as cat left outer join cat.kittens
kitten\");\n"
-"\n"
-"// change to izi is not flushed!\n"
-"...\n"
-"tx.commit(); // flush occurs\n"
-"sess.close();]]>"
-msgstr ""
+msgid "It is possible to change the default behavior so that flush occurs less
frequently. The <literal>FlushMode</literal> class defines three different
modes: only flush at commit time when the Hibernate
<literal>Transaction</literal> API is used, flush automatically using the
explained routine, or never flush unless <literal>flush()</literal> is called
explicitly. The last mode is useful for long running units of work, where a
<literal>Session</literal> is kept open and disconnected for a long time (see
<xref linkend=\"transactions-optimistic-longsession\" />)."
+msgstr "也可以改变默认的设置,来让刷出(flush)操作发生的不那么频繁。<literal>FlushMode</literal>
类定义了三种不同的方式。仅在提交时刷出(仅当 Hibernate 的 <literal>Transaction</literal> API
被使用时有效),按照刚才说的方式刷出,以及除非明确使用 <literal>flush()</literal> 否则从不刷出。
最后一种模式对于那些需要长时间保持 <literal>Session</literal> 为打开或者断线状态的长时间运行的工作单元很有用。(参见
<xref linkend=\"transactions-optimistic-longsession\"/>)。 "
#. Tag: para
-#: session_api.xml:900
#, no-c-format
-msgid ""
-"During flush, an exception might occur (e.g. if a DML operation violates a "
-"constraint). Since handling exceptions involves some understanding of "
-"Hibernate's transactional behavior, we discuss it in <xref linkend="
-"\"transactions\"/>."
-msgstr ""
-"刷出(flush)期间,可能会抛出异常。(例如一个DML操作违反了约束) 异常处理涉及到"
-"对Hibernate事务性行为的理解,因此我们将在<xref linkend=\"transactions\"/>中讨"
-"论。"
+msgid "During flush, an exception might occur (e.g. if a DML operation violates a
constraint). Since handling exceptions involves some understanding of Hibernate's
transactional behavior, we discuss it in <xref linkend=\"transactions\"
/>."
+msgstr "刷出(flush)期间,可能会抛出异常(例如一个 DML 操作违反了约束)。异常处理涉及到对 Hibernate 事务性行为的理解,因此我们将在
<xref linkend=\"transactions\"/> 中讨论。"
#. Tag: title
-#: session_api.xml:909
#, no-c-format
msgid "Transitive persistence"
-msgstr "传播性持久化(transitive persistence)"
+msgstr "传播性持久化(transitive persistence)"
#. Tag: para
-#: session_api.xml:911
#, no-c-format
-msgid ""
-"It is quite cumbersome to save, delete, or reattach individual objects, "
-"especially if you deal with a graph of associated objects. A common case is "
-"a parent/child relationship. Consider the following example:"
-msgstr ""
-"对每一个对象都要执行保存,删除或重关联操作让人感觉有点麻烦,尤其是在处理许多"
-"彼此关联的对象的时候。 一个常见的例子是父子关系。考虑下面的例子:"
+msgid "It is quite cumbersome to save, delete, or reattach individual objects,
especially if you deal with a graph of associated objects. A common case is a parent/child
relationship. Consider the following example:"
+msgstr
"对每一个对象都要执行保存,删除或重关联操作让人感觉有点麻烦,尤其是在处理许多彼此关联的对象的时候。一个常见的例子是父子关系。考虑下面的例子:"
#. Tag: para
-#: session_api.xml:917
-#, fuzzy, no-c-format
-msgid ""
-"If the children in a parent/child relationship would be value typed (e.g. a "
-"collection of addresses or strings), their life cycle would depend on the "
-"parent and no further action would be required for convenient
\"cascading\" "
-"of state changes. When the parent is saved, the value-typed child objects "
-"are saved and when the parent is deleted, the children will be deleted, etc.
"
-"This works for operations such as the removal of a child from the "
-"collection. Since value-typed objects cannot have shared references, "
-"Hibernate will detect this and delete the child from the database."
-msgstr ""
-"如果一个父子关系中的子对象是值类型(value typed)(例如,地址或字符串的集合)"
-"的,他们的生命周期会依赖于父对象,可以享受方便的级联操作(Cascading),不需要额"
-"外的动作。 父对象被保存时,这些值类型(value typed)子对象也将被保存;父对象被"
-"删除时,子对象也将被删除。 这对将一个子对象从集合中移除是同样有效:Hibernate"
-"会检测到,并且因为值类型(value typed)的对象不可能被其他对象引用,所以"
-"Hibernate会在数据库中删除这个子对象。"
+#, no-c-format
+msgid "If the children in a parent/child relationship would be value typed (e.g. a
collection of addresses or strings), their life cycle would depend on the parent and no
further action would be required for convenient \"cascading\" of state changes.
When the parent is saved, the value-typed child objects are saved and when the parent is
deleted, the children will be deleted, etc. This works for operations such as the removal
of a child from the collection. Since value-typed objects cannot have shared references,
Hibernate will detect this and delete the child from the database."
+msgstr "如果一个父子关系中的子对象是值类型(value
typed)(例如,地址或字符串的集合)的,他们的生命周期会依赖于父对象,可以享受方便的级联操作(Cascading),不需要额外的动作。父对象被保存时,这些值类型(value
typed)子对象也将被保存;父对象被删除时,子对象也将被删除。这对将一个子对象从集合中移除是同样有效:Hibernate 会检测到,并且因为值类型(value
typed)的对象不可能被其他对象引用,所以 Hibernate 会在数据库中删除这个子对象。 "
#. Tag: para
-#: session_api.xml:928
-#, fuzzy, no-c-format
-msgid ""
-"Now consider the same scenario with parent and child objects being entities,
"
-"not value-types (e.g. categories and items, or parent and child cats). "
-"Entities have their own life cycle and support shared references. Removing "
-"an entity from the collection does not mean it can be deleted), and there is
"
-"by default no cascading of state from one entity to any other associated "
-"entities. Hibernate does not implement <emphasis>persistence by "
-"reachability</emphasis> by default."
-msgstr ""
-"现在考虑同样的场景,不过父子对象都是实体(entities)类型,而非值类型(value "
-"typed)(例如,类别与个体,或母猫和小猫)。 实体有自己的生命期,允许共享对其的"
-"引用(因此从集合中移除一个实体,不意味着它可以被删除), 并且实体到其他关联实"
-"体之间默认没有级联操作的设置。 Hibernate默认不实现所谓的<emphasis>可到达即持"
-"久化(persistence by reachability)</emphasis>的策略。"
+#, no-c-format
+msgid "Now consider the same scenario with parent and child objects being entities,
not value-types (e.g. categories and items, or parent and child cats). Entities have their
own life cycle and support shared references. Removing an entity from the collection does
not mean it can be deleted), and there is by default no cascading of state from one entity
to any other associated entities. Hibernate does not implement <emphasis>persistence
by reachability</emphasis> by default."
+msgstr "现在考虑同样的场景,不过父子对象都是实体(entities)类型,而非值类型(value
typed)(例如,类别与个体,或母猫和小猫)。实体有自己的生命期,允许共享对其的引用(因此从集合中移除一个实体,不意味着它可以被删除),并且实体到其他关联实体之间默认没有级联操作的设置。
Hibernate 默认不实现所谓的<emphasis>可到达即持久化(persistence by
reachability)</emphasis>的策略。 "
#. Tag: para
-#: session_api.xml:937
#, no-c-format
-msgid ""
-"For each basic operation of the Hibernate session - including "
-"<literal>persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(),
"
-"evict(), replicate()</literal> - there is a corresponding cascade style.
"
-"Respectively, the cascade styles are named <literal>create, merge,
save-"
-"update, delete, lock, refresh, evict, replicate</literal>. If you want an
"
-"operation to be cascaded along an association, you must indicate that in the
"
-"mapping document. For example:"
-msgstr ""
-"每个Hibernate session的基本操作 - 包括 <literal>persist(), merge(), "
-"saveOrUpdate(), delete(), lock(), refresh(), evict(), replicate()</literal>
"
-"- 都有对应的级联风格(cascade style)。 这些级联风格(cascade style)风格分别命名"
-"为 <literal>create, merge, save-update, delete, lock, refresh, evict, "
-"replicate</literal>。 如果你希望一个操作被顺着关联关系级联传播,你必须在映射"
-"文件中指出这一点。例如:"
+msgid "For each basic operation of the Hibernate session - including
<literal>persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), evict(),
replicate()</literal> - there is a corresponding cascade style. Respectively, the
cascade styles are named <literal>create, merge, save-update, delete, lock, refresh,
evict, replicate</literal>. If you want an operation to be cascaded along an
association, you must indicate that in the mapping document. For example:"
+msgstr "每个 Hibernate session 的基本操作 — 包括 <literal>persist(), merge(),
saveOrUpdate(), delete(), lock(), refresh(), evict(), replicate()</literal> —
都有对应的级联风格(cascade style)。这些级联风格(cascade style)风格分别命名为 <literal>create, merge,
save-update, delete, lock, refresh, evict,
replicate</literal>。如果你希望一个操作被顺着关联关系级联传播,你必须在映射文件中指出这一点。例如:"
-#. Tag: programlisting
-#: session_api.xml:946
-#, no-c-format
-msgid "<![CDATA[<one-to-one name=\"person\"
cascade=\"persist\"/>]]>"
-msgstr ""
-
#. Tag: para
-#: session_api.xml:948
#, no-c-format
msgid "Cascade styles my be combined:"
-msgstr "级联风格(cascade style)是可组合的:"
+msgstr "级联风格(cascade style)是可组合的:"
-#. Tag: programlisting
-#: session_api.xml:952
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<one-to-one name=\"person\"
cascade=\"persist,delete,lock\"/>]]>"
-msgstr ""
+msgid "You can even use <literal>cascade=\"all\"</literal> to
specify that <emphasis>all</emphasis> operations should be cascaded along the
association. The default <literal>cascade=\"none\"</literal>
specifies that no operations are to be cascaded."
+msgstr "你可以使用 <literal>cascade=\"all\"</literal>
来指定<emphasis>全部</emphasis>操作都顺着关联关系级联(cascaded)。默认值是
<literal>cascade=\"none\"</literal>,即任何操作都不会被级联(cascaded)。 "
#. Tag: para
-#: session_api.xml:954
-#, fuzzy, no-c-format
-msgid ""
-"You can even use <literal>cascade=\"all\"</literal> to
specify that "
-"<emphasis>all</emphasis> operations should be cascaded along the
"
-"association. The default <literal>cascade=\"none\"</literal>
specifies that "
-"no operations are to be cascaded."
-msgstr ""
-"你可以使用<literal>cascade=\"all\"</literal>来指定<emphasis>全部</emphasis>操"
-"作都顺着关联关系级联(cascaded)。 默认值是<literal>cascade=\"none\"</"
-"literal>,即任何操作都不会被级联(cascaded)。"
-
-#. Tag: para
-#: session_api.xml:960
#, no-c-format
-msgid ""
-"A special cascade style, <literal>delete-orphan</literal>, applies only
to "
-"one-to-many associations, and indicates that the
<literal>delete()</literal> "
-"operation should be applied to any child object that is removed from the "
-"association."
-msgstr ""
-"注意有一个特殊的级联风格(cascade style) <literal>delete-orphan</literal>,只"
-"应用于one-to-many关联,表明<literal>delete()</literal>操作 应该被应用于所有从"
-"关联中删除的对象。"
+msgid "A special cascade style, <literal>delete-orphan</literal>,
applies only to one-to-many associations, and indicates that the
<literal>delete()</literal> operation should be applied to any child object
that is removed from the association."
+msgstr "注意有一个特殊的级联风格(cascade style)
<literal>delete-orphan</literal>,只应用于 one-to-many 关联,表明
<literal>delete()</literal> 操作应该被应用于所有从关联中删除的对象。"
#. Tag: para
-#: session_api.xml:967
#, no-c-format
msgid "Recommendations:"
-msgstr "建议:"
+msgstr "建议:"
#. Tag: para
-#: session_api.xml:973
-#, fuzzy, no-c-format
-msgid ""
-"It does not usually make sense to enable cascade on a
<literal><many-to-"
-"one></literal> or
<literal><many-to-many></literal> association. "
-"Cascade is often useful for
<literal><one-to-one></literal> and "
-"<literal><one-to-many></literal> associations."
-msgstr ""
-"通常在<literal><many-to-one></literal>或<literal><many-to-many></"
-"literal>关系中应用级联(cascade)没什么意义。 级联(cascade)通常在 <literal><"
-"one-to-one></literal>和<literal><one-to-many></literal>关系中比较有"
-"用。"
+#, no-c-format
+msgid "It does not usually make sense to enable cascade on a
<literal><many-to-one></literal> or
<literal><many-to-many></literal> association. Cascade is often
useful for <literal><one-to-one></literal> and
<literal><one-to-many></literal> associations."
+msgstr "通常在 <literal><many-to-one></literal> 或
<literal><many-to-many></literal>
关系中应用级联(cascade)没什么意义。级联(cascade)通常在
<literal><one-to-one></literal> 和
<literal><one-to-many></literal> 关系中比较有用。 "
#. Tag: para
-#: session_api.xml:981
#, no-c-format
-msgid ""
-"If the child object's lifespan is bounded by the lifespan of the parent "
-"object, make it a <emphasis>life cycle object</emphasis> by specifying
"
-"<literal>cascade=\"all,delete-orphan\"</literal>."
-msgstr ""
-"如果子对象的寿命限定在父亲对象的寿命之内,可通过指定<literal>cascade=\"all,"
-"delete-orphan\"</literal>将其变为<emphasis>自动生命周期管理的对象(life cycle
"
-"object)</emphasis>。"
+msgid "If the child object's lifespan is bounded by the lifespan of the parent
object, make it a <emphasis>life cycle object</emphasis> by specifying
<literal>cascade=\"all,delete-orphan\"</literal>."
+msgstr "如果子对象的寿命限定在父亲对象的寿命之内,可通过指定
<literal>cascade=\"all,delete-orphan\"</literal>
将其变为<emphasis>自动生命周期管理的对象(lifecycle object)</emphasis>。 "
#. Tag: para
-#: session_api.xml:988
#, no-c-format
-msgid ""
-"Otherwise, you might not need cascade at all. But if you think that you will
"
-"often be working with the parent and children together in the same "
-"transaction, and you want to save yourself some typing, consider using "
-"<literal>cascade=\"persist,merge,save-update\"</literal>."
-msgstr ""
-"其他情况,你可根本不需要级联(cascade)。但是如果你认为你会经常在某个事务中同时"
-"用到父对象与子对象,并且你希望少打点儿字,可以考虑使用<literal>cascade="
-"\"persist,merge,save-update\"</literal>。"
+msgid "Otherwise, you might not need cascade at all. But if you think that you will
often be working with the parent and children together in the same transaction, and you
want to save yourself some typing, consider using
<literal>cascade=\"persist,merge,save-update\"</literal>."
+msgstr "其他情况,你可根本不需要级联(cascade)。但是如果你认为你会经常在某个事务中同时用到父对象与子对象,并且你希望少打点儿字,可以考虑使用
<literal>cascade=\"persist,merge,save-update\"</literal>。"
#. Tag: para
-#: session_api.xml:996
#, no-c-format
-msgid ""
-"Mapping an association (either a single valued association, or a collection)
"
-"with <literal>cascade=\"all\"</literal> marks the association
as a "
-"<emphasis>parent/child</emphasis> style relationship where
save/update/"
-"delete of the parent results in save/update/delete of the child or children."
-msgstr ""
-"可以使用<literal>cascade=\"all\"</literal>将一个关联关系(无论是对值对象的关"
-"联,或者对一个集合的关联)标记为<emphasis>父/子</emphasis>关系的关联。 这样对"
-"父对象进行save/update/delete操作就会导致子对象也进行save/update/delete操作。"
+msgid "Mapping an association (either a single valued association, or a collection)
with <literal>cascade=\"all\"</literal> marks the association as a
<emphasis>parent/child</emphasis> style relationship where save/update/delete
of the parent results in save/update/delete of the child or children."
+msgstr "可以使用 <literal>cascade=\"all\"</literal>
将一个关联关系(无论是对值对象的关联,或者对一个集合的关联)标记为<emphasis>父/子</emphasis>关系的关联。 这样对父对象进行
save/update/delete 操作就会导致子对象也进行 save/update/delete 操作。"
#. Tag: para
-#: session_api.xml:1002
-#, fuzzy, no-c-format
-msgid ""
-"Furthermore, a mere reference to a child from a persistent parent will "
-"result in save/update of the child. This metaphor is incomplete, however. A "
-"child which becomes unreferenced by its parent is
<emphasis>not</emphasis> "
-"automatically deleted, except in the case of a
<literal><one-to-many></"
-"literal> association mapped with
<literal>cascade=\"delete-orphan\"</"
-"literal>. The precise semantics of cascading operations for a parent/child
"
-"relationship are as follows:"
-msgstr ""
-"此外,一个持久的父对象对子对象的浅引用(mere reference)会导致子对象被同步save/"
-"update。 不过,这个隐喻(metaphor)的说法并不完整。除非关联是<literal><one-"
-"to-many></literal>关联并且被标记为<literal>cascade=\"delete-orphan\"</"
-"literal>, 否则父对象失去对某个子对象的引用<emphasis>不会</emphasis>导致该子"
-"对象被自动删除。 父子关系的级联(cascading)操作准确语义如下:"
+#, no-c-format
+msgid "Furthermore, a mere reference to a child from a persistent parent will result
in save/update of the child. This metaphor is incomplete, however. A child which becomes
unreferenced by its parent is <emphasis>not</emphasis> automatically deleted,
except in the case of a <literal><one-to-many></literal>
association mapped with
<literal>cascade=\"delete-orphan\"</literal>. The precise semantics
of cascading operations for a parent/child relationship are as follows:"
+msgstr "此外,一个持久的父对象对子对象的浅引用(mere reference)会导致子对象被同步
save/update。不过,这个隐喻(metaphor)的说法并不完整。除非关联是
<literal><one-to-many></literal> 关联并且被标记为
<literal>cascade=\"delete-orphan\"</literal>,否则父对象失去对某个子对象的引用<emphasis>不会</emphasis>导致该子对象被自动删除。父子关系的级联(cascading)操作准确语义如下:
"
#. Tag: para
-#: session_api.xml:1013
#, no-c-format
-msgid ""
-"If a parent is passed to <literal>persist()</literal>, all children are
"
-"passed to <literal>persist()</literal>"
-msgstr ""
-"如果父对象被<literal>persist()</literal>,那么所有子对象也会被"
-"<literal>persist()</literal>"
+msgid "If a parent is passed to <literal>persist()</literal>, all
children are passed to <literal>persist()</literal>"
+msgstr "如果父对象被 <literal>persist()</literal>,那么所有子对象也会被
<literal>persist()</literal>"
#. Tag: para
-#: session_api.xml:1019
#, no-c-format
-msgid ""
-"If a parent is passed to <literal>merge()</literal>, all children are
passed "
-"to <literal>merge()</literal>"
-msgstr ""
-"如果父对象被<literal>merge()</literal>,那么所有子对象也会被<literal>merge()"
-"</literal>"
+msgid "If a parent is passed to <literal>merge()</literal>, all children
are passed to <literal>merge()</literal>"
+msgstr "如果父对象被 <literal>merge()</literal>,那么所有子对象也会被
<literal>merge()</literal>"
#. Tag: para
-#: session_api.xml:1025
#, no-c-format
-msgid ""
-"If a parent is passed to <literal>save()</literal>,
<literal>update()</"
-"literal> or <literal>saveOrUpdate()</literal>, all children are
passed to "
-"<literal>saveOrUpdate()</literal>"
-msgstr ""
-"如果父对象被<literal>save()</literal>,<literal>update()</literal>或
"
-"<literal>saveOrUpdate()</literal>,那么所有子对象则会被<literal>saveOrUpdate"
-"()</literal>"
+msgid "If a parent is passed to <literal>save()</literal>,
<literal>update()</literal> or <literal>saveOrUpdate()</literal>,
all children are passed to <literal>saveOrUpdate()</literal>"
+msgstr "如果父对象被
<literal>save()</literal>,<literal>update()</literal> 或
<literal>saveOrUpdate()</literal>,那么所有子对象则会被
<literal>saveOrUpdate()</literal>"
#. Tag: para
-#: session_api.xml:1031
#, no-c-format
-msgid ""
-"If a transient or detached child becomes referenced by a persistent parent, "
-"it is passed to <literal>saveOrUpdate()</literal>"
-msgstr ""
-"如果某个持久的父对象引用了瞬时(transient)或者脱管(detached)的子对象,那么子对"
-"象将会被<literal>saveOrUpdate()</literal>"
+msgid "If a transient or detached child becomes referenced by a persistent parent,
it is passed to <literal>saveOrUpdate()</literal>"
+msgstr "如果某个持久的父对象引用了瞬时(transient)或者脱管(detached)的子对象,那么子对象将会被
<literal>saveOrUpdate()</literal>"
#. Tag: para
-#: session_api.xml:1037
#, no-c-format
-msgid ""
-"If a parent is deleted, all children are passed to
<literal>delete()</"
-"literal>"
-msgstr "如果父对象被删除,那么所有子对象也会被<literal>delete()</literal>"
+msgid "If a parent is deleted, all children are passed to
<literal>delete()</literal>"
+msgstr "如果父对象被删除,那么所有子对象也会被 <literal>delete()</literal>"
#. Tag: para
-#: session_api.xml:1042
#, no-c-format
-msgid ""
-"If a child is dereferenced by a persistent parent, <emphasis>nothing special
"
-"happens</emphasis> - the application should explicitly delete the child if
"
-"necessary - unless
<literal>cascade=\"delete-orphan\"</literal>, in which "
-"case the \"orphaned\" child is deleted."
-msgstr ""
-"除非被标记为<literal>cascade=\"delete-orphan\"</literal>(删除“孤儿”模式,此"
-"时不被任何一个父对象引用的子对象会被删除), 否则子对象失掉父对象对其的引用"
-"时,<emphasis>什么事也不会发生</emphasis>。 如果有特殊需要,应用程序可通过显"
-"式调用delete()删除子对象。"
+msgid "If a child is dereferenced by a persistent parent, <emphasis>nothing
special happens</emphasis> - the application should explicitly delete the child if
necessary - unless <literal>cascade=\"delete-orphan\"</literal>, in
which case the \"orphaned\" child is deleted."
+msgstr "除非被标记为
<literal>cascade=\"delete-orphan\"</literal>(删除“孤儿”模式,此时不被任何一个父对象引用的子对象会被删除),否则子对象失掉父对象对其的引用时,<emphasis>什么事也不会发生</emphasis>。如果有特殊需要,应用程序可通过显式调用
delete() 删除子对象。"
#. Tag: para
-#: session_api.xml:1051
-#, fuzzy, no-c-format
-msgid ""
-"Finally, note that cascading of operations can be applied to an object graph
"
-"at <emphasis>call time</emphasis> or at <emphasis>flush
time</emphasis>. All "
-"operations, if enabled, are cascaded to associated entities reachable when "
-"the operation is executed. However, <literal>save-update</literal> and
"
-"<literal>delete-orphan</literal> are transitive for all associated
entities "
-"reachable during flush of the <literal>Session</literal>."
-msgstr ""
-"最后,注意操作的级联可能是在<emphasis>调用期(call time)</emphasis>或者"
-"<emphasis>写入期(flush time)</emphasis>作用到对象图上的。所有的操作,如果允"
-"许,都在操作被执行的时候级联到可触及的关联实体上。然而,<literal>save-upate</"
-"literal>和<literal>delete-orphan</literal>是在<literal>Session</literal>
"
-"flush的时候才作用到所有可触及的被关联对象上的。"
+#, no-c-format
+msgid "Finally, note that cascading of operations can be applied to an object graph
at <emphasis>call time</emphasis> or at <emphasis>flush
time</emphasis>. All operations, if enabled, are cascaded to associated entities
reachable when the operation is executed. However,
<literal>save-update</literal> and
<literal>delete-orphan</literal> are transitive for all associated entities
reachable during flush of the <literal>Session</literal>."
+msgstr "最后,注意操作的级联可能是在<emphasis>调用期(call
time)</emphasis>或者<emphasis>写入期(flush
time)</emphasis>作用到对象图上的。所有的操作,如果允许,都在操作被执行的时候级联到可触及的关联实体上。然而,<literal>save-upate</literal>
和 <literal>delete-orphan</literal> 是在<literal>Session</literal>
flush 的时候才作用到所有可触及的被关联对象上的。 "
#. Tag: title
-#: session_api.xml:1063
#, no-c-format
msgid "Using metadata"
msgstr "使用元数据"
#. Tag: para
-#: session_api.xml:1065
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate requires a rich meta-level model of all entity and value types. "
-"This model can be useful to the application itself. For example, the "
-"application might use Hibernate's metadata to implement a \"smart\"
deep-"
-"copy algorithm that understands which objects should be copied (eg. mutable "
-"value types) and which objects that should not (e.g. immutable value types "
-"and, possibly, associated entities)."
-msgstr ""
-"Hibernate中有一个非常丰富的元级别(meta-level)的模型,含有所有的实体和值类型数"
-"据的元数据。 有时这个模型对应用程序本身也会非常有用。 比如说,应用程序可能在"
-"实现一种“智能”的深度拷贝算法时, 通过使用Hibernate的元数据来了解哪些对象应该"
-"被拷贝(比如,可变的值类型数据), 那些不应该(不可变的值类型数据,也许还有某"
-"些被关联的实体)。"
+#, no-c-format
+msgid "Hibernate requires a rich meta-level model of all entity and value types.
This model can be useful to the application itself. For example, the application might use
Hibernate's metadata to implement a \"smart\" deep-copy algorithm that
understands which objects should be copied (eg. mutable value types) and which objects
that should not (e.g. immutable value types and, possibly, associated entities)."
+msgstr "Hibernate 中有一个非常丰富的元级别(meta-level)的模型,含有所有的实体和值类型数据的元数据。
有时这个模型对应用程序本身也会非常有用。比如说,应用程序可能在实现一种“智能”的深度拷贝算法时,通过使用 Hibernate
的元数据来了解哪些对象应该被拷贝(比如,可变的值类型数据),那些不应该(不可变的值类型数据,也许还有某些被关联的实体)。 "
#. Tag: para
-#: session_api.xml:1072
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate exposes metadata via the <literal>ClassMetadata</literal> and
"
-"<literal>CollectionMetadata</literal> interfaces and the
<literal>Type</"
-"literal> hierarchy. Instances of the metadata interfaces can be obtained "
-"from the <literal>SessionFactory</literal>."
-msgstr ""
-"Hibernate提供了<literal>ClassMetadata</literal>接口,"
-"<literal>CollectionMetadata</literal>接口和<literal>Type</literal>层次体系来"
-"访问元数据。 可以通过<literal>SessionFactory</literal>获取元数据接口的实例。"
-
-#. Tag: programlisting
-#: session_api.xml:1079
#, no-c-format
-msgid ""
-"<![CDATA[Cat fritz = ......;\n"
-"ClassMetadata catMeta = sessionfactory.getClassMetadata(Cat.class);\n"
-"\n"
-"Object[] propertyValues = catMeta.getPropertyValues(fritz);\n"
-"String[] propertyNames = catMeta.getPropertyNames();\n"
-"Type[] propertyTypes = catMeta.getPropertyTypes();\n"
-"\n"
-"// get a Map of all properties which are not collections or associations\n"
-"Map namedValues = new HashMap();\n"
-"for ( int i=0; i<propertyNames.length; i++ ) {\n"
-" if ( !propertyTypes[i].isEntityType() && !propertyTypes[i]."
-"isCollectionType() ) {\n"
-" namedValues.put( propertyNames[i], propertyValues[i] );\n"
-" }\n"
-"}]]>"
-msgstr ""
+msgid "Hibernate exposes metadata via the
<literal>ClassMetadata</literal> and
<literal>CollectionMetadata</literal> interfaces and the
<literal>Type</literal> hierarchy. Instances of the metadata interfaces can be
obtained from the <literal>SessionFactory</literal>."
+msgstr "Hibernate 提供了 <literal>ClassMetadata</literal>
接口,<literal>CollectionMetadata</literal> 接口和
<literal>Type</literal> 层次体系来访问元数据。可以通过
<literal>SessionFactory</literal> 获取元数据接口的实例。 "
-#~ msgid "UPDATE"
-#~ msgstr "UPDATE"
+#~ msgid ""
+#~ "<![CDATA[DomesticCat fritz = new DomesticCat();\n"
+#~ "fritz.setColor(Color.GINGER);\n"
+#~ "fritz.setSex('M');\n"
+#~ "fritz.setName(\"Fritz\");\n"
+#~ "Long generatedId = (Long) sess.save(fritz);]]>"
+#~ msgstr ""
+#~ "<![CDATA[DomesticCat fritz = new DomesticCat();\n"
+#~ "fritz.setColor(Color.GINGER);\n"
+#~ "fritz.setSex('M');\n"
+#~ "fritz.setName(\"Fritz\");\n"
+#~ "Long generatedId = (Long) sess.save(fritz);]]>"
+#~ msgid ""
+#~ "<![CDATA[DomesticCat pk = new DomesticCat();\n"
+#~ "pk.setColor(Color.TABBY);\n"
+#~ "pk.setSex('F');\n"
+#~ "pk.setName(\"PK\");\n"
+#~ "pk.setKittens( new HashSet() );\n"
+#~ "pk.addKitten(fritz);\n"
+#~ "sess.save( pk, new Long(1234) );]]>"
+#~ msgstr ""
+#~ "<![CDATA[DomesticCat pk = new DomesticCat();\n"
+#~ "pk.setColor(Color.TABBY);\n"
+#~ "pk.setSex('F');\n"
+#~ "pk.setName(\"PK\");\n"
+#~ "pk.setKittens( new HashSet() );\n"
+#~ "pk.addKitten(fritz);\n"
+#~ "sess.save( pk, new Long(1234) );]]>"
+#~ msgid "<![CDATA[Cat fritz = (Cat) sess.load(Cat.class,
generatedId);]]>"
+#~ msgstr "<![CDATA[Cat fritz = (Cat) sess.load(Cat.class,
generatedId);]]>"
+#~ msgid ""
+#~ "<![CDATA[// you need to wrap primitive identifiers\n"
+#~ "long id = 1234;\n"
+#~ "DomesticCat pk = (DomesticCat) sess.load( DomesticCat.class, new Long"
+#~ "(id) );]]>"
+#~ msgstr ""
+#~ "<![CDATA[// you need to wrap primitive identifiers\n"
+#~ "long id = 1234;\n"
+#~ "DomesticCat pk = (DomesticCat) sess.load( DomesticCat.class, new Long"
+#~ "(id) );]]>"
+#~ msgid ""
+#~ "<![CDATA[Cat cat = new DomesticCat();\n"
+#~ "// load pk's state into cat\n"
+#~ "sess.load( cat, new Long(pkId) );\n"
+#~ "Set kittens = cat.getKittens();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Cat cat = new DomesticCat();\n"
+#~ "// load pk's state into cat\n"
+#~ "sess.load( cat, new Long(pkId) );\n"
+#~ "Set kittens = cat.getKittens();]]>"
+#~ msgid ""
+#~ "<![CDATA[Cat cat = (Cat) sess.get(Cat.class, id);\n"
+#~ "if (cat==null) {\n"
+#~ " cat = new Cat();\n"
+#~ " sess.save(cat, id);\n"
+#~ "}\n"
+#~ "return cat;]]>"
+#~ msgstr ""
+#~ "<![CDATA[Cat cat = (Cat) sess.get(Cat.class, id);\n"
+#~ "if (cat==null) {\n"
+#~ " cat = new Cat();\n"
+#~ " sess.save(cat, id);\n"
+#~ "}\n"
+#~ "return cat;]]>"
+#~ msgid ""
+#~ "<![CDATA[Cat cat = (Cat) sess.get(Cat.class, id,
LockMode.UPGRADE);]]>"
+#~ msgstr ""
+#~ "<![CDATA[Cat cat = (Cat) sess.get(Cat.class, id,
LockMode.UPGRADE);]]>"
+#~ msgid ""
+#~ "<![CDATA[sess.save(cat);\n"
+#~ "sess.flush(); //force the SQL INSERT\n"
+#~ "sess.refresh(cat); //re-read the state (after the trigger executes)]]>"
+#~ msgstr ""
+#~ "<![CDATA[sess.save(cat);\n"
+#~ "sess.flush(); //force the SQL INSERT\n"
+#~ "sess.refresh(cat); //re-read the state (after the trigger executes)]]>"
+#~ msgid ""
+#~ "<![CDATA[List cats = session.createQuery(\n"
+#~ " \"from Cat as cat where cat.birthdate < ?\")\n"
+#~ " .setDate(0, date)\n"
+#~ " .list();\n"
+#~ "\n"
+#~ "List mothers = session.createQuery(\n"
+#~ " \"select mother from Cat as cat join cat.mother as mother where
cat."
+#~ "name = ?\")\n"
+#~ " .setString(0, name)\n"
+#~ " .list();\n"
+#~ "\n"
+#~ "List kittens = session.createQuery(\n"
+#~ " \"from Cat as cat where cat.mother = ?\")\n"
+#~ " .setEntity(0, pk)\n"
+#~ " .list();\n"
+#~ "\n"
+#~ "Cat mother = (Cat) session.createQuery(\n"
+#~ " \"select cat.mother from Cat as cat where cat = ?\")\n"
+#~ " .setEntity(0, izi)\n"
+#~ " .uniqueResult();]]\n"
+#~ "\n"
+#~ "Query mothersWithKittens = (Cat) session.createQuery(\n"
+#~ " \"select mother from Cat as mother left join fetch
mother.kittens"
+#~ "\");\n"
+#~ "Set uniqueMothers = new HashSet(mothersWithKittens.list());]]>"
+#~ msgstr ""
+#~ "<![CDATA[List cats = session.createQuery(\n"
+#~ " \"from Cat as cat where cat.birthdate < ?\")\n"
+#~ " .setDate(0, date)\n"
+#~ " .list();\n"
+#~ "\n"
+#~ "List mothers = session.createQuery(\n"
+#~ " \"select mother from Cat as cat join cat.mother as mother where
cat."
+#~ "name = ?\")\n"
+#~ " .setString(0, name)\n"
+#~ " .list();\n"
+#~ "\n"
+#~ "List kittens = session.createQuery(\n"
+#~ " \"from Cat as cat where cat.mother = ?\")\n"
+#~ " .setEntity(0, pk)\n"
+#~ " .list();\n"
+#~ "\n"
+#~ "Cat mother = (Cat) session.createQuery(\n"
+#~ " \"select cat.mother from Cat as cat where cat = ?\")\n"
+#~ " .setEntity(0, izi)\n"
+#~ " .uniqueResult();]]\n"
+#~ "\n"
+#~ "Query mothersWithKittens = (Cat) session.createQuery(\n"
+#~ " \"select mother from Cat as mother left join fetch
mother.kittens"
+#~ "\");\n"
+#~ "Set uniqueMothers = new HashSet(mothersWithKittens.list());]]>"
+#~ msgid ""
+#~ "<![CDATA[// fetch ids\n"
+#~ "Iterator iter = sess.createQuery(\"from eg.Qux q order by
q.likeliness\")."
+#~ "iterate();\n"
+#~ "while ( iter.hasNext() ) {\n"
+#~ " Qux qux = (Qux) iter.next(); // fetch the object\n"
+#~ " // something we couldnt express in the query\n"
+#~ " if ( qux.calculateComplicatedAlgorithm() ) {\n"
+#~ " // delete the current instance\n"
+#~ " iter.remove();\n"
+#~ " // dont need to process the rest\n"
+#~ " break;\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[// fetch ids\n"
+#~ "Iterator iter = sess.createQuery(\"from eg.Qux q order by
q.likeliness\")."
+#~ "iterate();\n"
+#~ "while ( iter.hasNext() ) {\n"
+#~ " Qux qux = (Qux) iter.next(); // fetch the object\n"
+#~ " // something we couldnt express in the query\n"
+#~ " if ( qux.calculateComplicatedAlgorithm() ) {\n"
+#~ " // delete the current instance\n"
+#~ " iter.remove();\n"
+#~ " // dont need to process the rest\n"
+#~ " break;\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[Iterator kittensAndMothers = sess.createQuery(\n"
+#~ " \"select kitten, mother from Cat kitten join kitten.mother
"
+#~ "mother\")\n"
+#~ " .list()\n"
+#~ " .iterator();\n"
+#~ "\n"
+#~ "while ( kittensAndMothers.hasNext() ) {\n"
+#~ " Object[] tuple = (Object[]) kittensAndMothers.next();\n"
+#~ " Cat kitten = (Cat) tuple[0];\n"
+#~ " Cat mother = (Cat) tuple[1];\n"
+#~ " ....\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[Iterator kittensAndMothers = sess.createQuery(\n"
+#~ " \"select kitten, mother from Cat kitten join kitten.mother
"
+#~ "mother\")\n"
+#~ " .list()\n"
+#~ " .iterator();\n"
+#~ "\n"
+#~ "while ( kittensAndMothers.hasNext() ) {\n"
+#~ " Object[] tuple = (Object[]) kittensAndMothers.next();\n"
+#~ " Cat kitten = (Cat) tuple[0];\n"
+#~ " Cat mother = (Cat) tuple[1];\n"
+#~ " ....\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[Iterator results = sess.createQuery(\n"
+#~ " \"select cat.color, min(cat.birthdate), count(cat) from Cat cat
"
+#~ "\" +\n"
+#~ " \"group by cat.color\")\n"
+#~ " .list()\n"
+#~ " .iterator();\n"
+#~ "\n"
+#~ "while ( results.hasNext() ) {\n"
+#~ " Object[] row = (Object[]) results.next();\n"
+#~ " Color type = (Color) row[0];\n"
+#~ " Date oldest = (Date) row[1];\n"
+#~ " Integer count = (Integer) row[2];\n"
+#~ " .....\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[Iterator results = sess.createQuery(\n"
+#~ " \"select cat.color, min(cat.birthdate), count(cat) from Cat cat
"
+#~ "\" +\n"
+#~ " \"group by cat.color\")\n"
+#~ " .list()\n"
+#~ " .iterator();\n"
+#~ "\n"
+#~ "while ( results.hasNext() ) {\n"
+#~ " Object[] row = (Object[]) results.next();\n"
+#~ " Color type = (Color) row[0];\n"
+#~ " Date oldest = (Date) row[1];\n"
+#~ " Integer count = (Integer) row[2];\n"
+#~ " .....\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[//named parameter (preferred)\n"
+#~ "Query q = sess.createQuery(\"from DomesticCat cat where cat.name =
:name"
+#~ "\");\n"
+#~ "q.setString(\"name\", \"Fritz\");\n"
+#~ "Iterator cats = q.iterate();]]>"
+#~ msgstr ""
+#~ "<![CDATA[//named parameter (preferred)\n"
+#~ "Query q = sess.createQuery(\"from DomesticCat cat where cat.name =
:name"
+#~ "\");\n"
+#~ "q.setString(\"name\", \"Fritz\");\n"
+#~ "Iterator cats = q.iterate();]]>"
+#~ msgid ""
+#~ "<![CDATA[//positional parameter\n"
+#~ "Query q = sess.createQuery(\"from DomesticCat cat where cat.name =
?\");\n"
+#~ "q.setString(0, \"Izi\");\n"
+#~ "Iterator cats = q.iterate();]]>"
+#~ msgstr ""
+#~ "<![CDATA[//positional parameter\n"
+#~ "Query q = sess.createQuery(\"from DomesticCat cat where cat.name =
?\");\n"
+#~ "q.setString(0, \"Izi\");\n"
+#~ "Iterator cats = q.iterate();]]>"
+#~ msgid ""
+#~ "<![CDATA[//named parameter list\n"
+#~ "List names = new ArrayList();\n"
+#~ "names.add(\"Izi\");\n"
+#~ "names.add(\"Fritz\");\n"
+#~ "Query q = sess.createQuery(\"from DomesticCat cat where cat.name in
(:"
+#~ "namesList)\");\n"
+#~ "q.setParameterList(\"namesList\", names);\n"
+#~ "List cats = q.list();]]>"
+#~ msgstr ""
+#~ "<![CDATA[//named parameter list\n"
+#~ "List names = new ArrayList();\n"
+#~ "names.add(\"Izi\");\n"
+#~ "names.add(\"Fritz\");\n"
+#~ "Query q = sess.createQuery(\"from DomesticCat cat where cat.name in
(:"
+#~ "namesList)\");\n"
+#~ "q.setParameterList(\"namesList\", names);\n"
+#~ "List cats = q.list();]]>"
+#~ msgid ""
+#~ "<![CDATA[Query q = sess.createQuery(\"from DomesticCat
cat\");\n"
+#~ "q.setFirstResult(20);\n"
+#~ "q.setMaxResults(10);\n"
+#~ "List cats = q.list();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Query q = sess.createQuery(\"from DomesticCat
cat\");\n"
+#~ "q.setFirstResult(20);\n"
+#~ "q.setMaxResults(10);\n"
+#~ "List cats = q.list();]]>"
+#~ msgid ""
+#~ "<![CDATA[Query q = sess.createQuery(\"select cat.name, cat from "
+#~ "DomesticCat cat \" +\n"
+#~ " \"order by cat.name\");\n"
+#~ "ScrollableResults cats = q.scroll();\n"
+#~ "if ( cats.first() ) {\n"
+#~ "\n"
+#~ " // find the first name on each page of an alphabetical list of cats "
+#~ "by name\n"
+#~ " firstNamesOfPages = new ArrayList();\n"
+#~ " do {\n"
+#~ " String name = cats.getString(0);\n"
+#~ " firstNamesOfPages.add(name);\n"
+#~ " }\n"
+#~ " while ( cats.scroll(PAGE_SIZE) );\n"
+#~ "\n"
+#~ " // Now get the first page of cats\n"
+#~ " pageOfCats = new ArrayList();\n"
+#~ " cats.beforeFirst();\n"
+#~ " int i=0;\n"
+#~ " while( ( PAGE_SIZE > i++ ) && cats.next() ) pageOfCats.add(
cats.get"
+#~ "(1) );\n"
+#~ "\n"
+#~ "}\n"
+#~ "cats.close()]]>"
+#~ msgstr ""
+#~ "<![CDATA[Query q = sess.createQuery(\"select cat.name, cat from "
+#~ "DomesticCat cat \" +\n"
+#~ " \"order by cat.name\");\n"
+#~ "ScrollableResults cats = q.scroll();\n"
+#~ "if ( cats.first() ) {\n"
+#~ "\n"
+#~ " // find the first name on each page of an alphabetical list of cats "
+#~ "by name\n"
+#~ " firstNamesOfPages = new ArrayList();\n"
+#~ " do {\n"
+#~ " String name = cats.getString(0);\n"
+#~ " firstNamesOfPages.add(name);\n"
+#~ " }\n"
+#~ " while ( cats.scroll(PAGE_SIZE) );\n"
+#~ "\n"
+#~ " // Now get the first page of cats\n"
+#~ " pageOfCats = new ArrayList();\n"
+#~ " cats.beforeFirst();\n"
+#~ " int i=0;\n"
+#~ " while( ( PAGE_SIZE > i++ ) && cats.next() ) pageOfCats.add(
cats.get"
+#~ "(1) );\n"
+#~ "\n"
+#~ "}\n"
+#~ "cats.close()]]>"
+#~ msgid ""
+#~ "<![CDATA[<query
name=\"ByNameAndMaximumWeight\"><![CDATA[\n"
+#~ " from eg.DomesticCat as cat\n"
+#~ " where cat.name = ?\n"
+#~ " and cat.weight > ?\n"
+#~ "] ]></query>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<query
name=\"ByNameAndMaximumWeight\"><![CDATA[\n"
+#~ " from eg.DomesticCat as cat\n"
+#~ " where cat.name = ?\n"
+#~ " and cat.weight > ?\n"
+#~ "] ]></query>]]>"
+#~ msgid ""
+#~ "<![CDATA[Query q =
sess.getNamedQuery(\"ByNameAndMaximumWeight\");\n"
+#~ "q.setString(0, name);\n"
+#~ "q.setInt(1, minWeight);\n"
+#~ "List cats = q.list();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Query q =
sess.getNamedQuery(\"ByNameAndMaximumWeight\");\n"
+#~ "q.setString(0, name);\n"
+#~ "q.setInt(1, minWeight);\n"
+#~ "List cats = q.list();]]>"
+#~ msgid ""
+#~ "<![CDATA[Collection blackKittens = session.createFilter(\n"
+#~ " pk.getKittens(), \n"
+#~ " \"where this.color = ?\")\n"
+#~ " .setParameter( Color.BLACK, Hibernate.custom(ColorUserType.class) )\n"
+#~ " .list()\n"
+#~ ");]]>"
+#~ msgstr ""
+#~ "<![CDATA[Collection blackKittens = session.createFilter(\n"
+#~ " pk.getKittens(), \n"
+#~ " \"where this.color = ?\")\n"
+#~ " .setParameter( Color.BLACK, Hibernate.custom(ColorUserType.class) )\n"
+#~ " .list()\n"
+#~ ");]]>"
+#~ msgid ""
+#~ "<![CDATA[Collection blackKittenMates = session.createFilter(\n"
+#~ " pk.getKittens(), \n"
+#~ " \"select this.mate where this.color =
eg.Color.BLACK.intValue\")\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Collection blackKittenMates = session.createFilter(\n"
+#~ " pk.getKittens(), \n"
+#~ " \"select this.mate where this.color =
eg.Color.BLACK.intValue\")\n"
+#~ " .list();]]>"
+#~ msgid ""
+#~ "<![CDATA[Collection tenKittens = session.createFilter(\n"
+#~ " mother.getKittens(), \"\")\n"
+#~ " .setFirstResult(0).setMaxResults(10)\n"
+#~ " .list();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Collection tenKittens = session.createFilter(\n"
+#~ " mother.getKittens(), \"\")\n"
+#~ " .setFirstResult(0).setMaxResults(10)\n"
+#~ " .list();]]>"
+#~ msgid ""
+#~ "<![CDATA[Criteria crit = session.createCriteria(Cat.class);\n"
+#~ "crit.add( Restrictions.eq( \"color\", eg.Color.BLACK ) );\n"
+#~ "crit.setMaxResults(10);\n"
+#~ "List cats = crit.list();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Criteria crit = session.createCriteria(Cat.class);\n"
+#~ "crit.add( Restrictions.eq( \"color\", eg.Color.BLACK ) );\n"
+#~ "crit.setMaxResults(10);\n"
+#~ "List cats = crit.list();]]>"
+#~ msgid ""
+#~ "<![CDATA[List cats = session.createSQLQuery(\"SELECT {cat.*} FROM CAT
"
+#~ "{cat} WHERE ROWNUM<10\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ ".list();]]>"
+#~ msgstr ""
+#~ "<![CDATA[List cats = session.createSQLQuery(\"SELECT {cat.*} FROM CAT
"
+#~ "{cat} WHERE ROWNUM<10\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ ".list();]]>"
+#~ msgid ""
+#~ "<![CDATA[List cats = session.createSQLQuery(\n"
+#~ " \"SELECT {cat}.ID AS {cat.id}, {cat}.SEX AS {cat.sex}, \"
+\n"
+#~ " \"{cat}.MATE AS {cat.mate}, {cat}.SUBCLASS AS {cat.class}, ...
"
+#~ "\" +\n"
+#~ " \"FROM CAT {cat} WHERE ROWNUM<10\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ ".list()]]>"
+#~ msgstr ""
+#~ "<![CDATA[List cats = session.createSQLQuery(\n"
+#~ " \"SELECT {cat}.ID AS {cat.id}, {cat}.SEX AS {cat.sex}, \"
+\n"
+#~ " \"{cat}.MATE AS {cat.mate}, {cat}.SUBCLASS AS {cat.class}, ...
"
+#~ "\" +\n"
+#~ " \"FROM CAT {cat} WHERE ROWNUM<10\")\n"
+#~ " .addEntity(\"cat\", Cat.class)\n"
+#~ ".list()]]>"
+#~ msgid ""
+#~ "<![CDATA[DomesticCat cat = (DomesticCat) sess.load( Cat.class, new
Long"
+#~ "(69) );\n"
+#~ "cat.setName(\"PK\");\n"
+#~ "sess.flush(); // changes to cat are automatically detected and "
+#~ "persisted]]>"
+#~ msgstr ""
+#~ "<![CDATA[DomesticCat cat = (DomesticCat) sess.load( Cat.class, new
Long"
+#~ "(69) );\n"
+#~ "cat.setName(\"PK\");\n"
+#~ "sess.flush(); // changes to cat are automatically detected and "
+#~ "persisted]]>"
+#~ msgid ""
+#~ "<![CDATA[// in the first session\n"
+#~ "Cat cat = (Cat) firstSession.load(Cat.class, catId);\n"
+#~ "Cat potentialMate = new Cat();\n"
+#~ "firstSession.save(potentialMate);\n"
+#~ "\n"
+#~ "// in a higher layer of the application\n"
+#~ "cat.setMate(potentialMate);\n"
+#~ "\n"
+#~ "// later, in a new session\n"
+#~ "secondSession.update(cat); // update cat\n"
+#~ "secondSession.update(mate); // update mate]]>"
+#~ msgstr ""
+#~ "<![CDATA[// in the first session\n"
+#~ "Cat cat = (Cat) firstSession.load(Cat.class, catId);\n"
+#~ "Cat potentialMate = new Cat();\n"
+#~ "firstSession.save(potentialMate);\n"
+#~ "\n"
+#~ "// in a higher layer of the application\n"
+#~ "cat.setMate(potentialMate);\n"
+#~ "\n"
+#~ "// later, in a new session\n"
+#~ "secondSession.update(cat); // update cat\n"
+#~ "secondSession.update(mate); // update mate]]>"
+#~ msgid ""
+#~ "<![CDATA[//just reassociate:\n"
+#~ "sess.lock(fritz, LockMode.NONE);\n"
+#~ "//do a version check, then reassociate:\n"
+#~ "sess.lock(izi, LockMode.READ);\n"
+#~ "//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n"
+#~ "sess.lock(pk, LockMode.UPGRADE);]]>"
+#~ msgstr ""
+#~ "<![CDATA[//just reassociate:\n"
+#~ "sess.lock(fritz, LockMode.NONE);\n"
+#~ "//do a version check, then reassociate:\n"
+#~ "sess.lock(izi, LockMode.READ);\n"
+#~ "//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n"
+#~ "sess.lock(pk, LockMode.UPGRADE);]]>"
+#~ msgid ""
+#~ "<![CDATA[// in the first session\n"
+#~ "Cat cat = (Cat) firstSession.load(Cat.class, catID);\n"
+#~ "\n"
+#~ "// in a higher tier of the application\n"
+#~ "Cat mate = new Cat();\n"
+#~ "cat.setMate(mate);\n"
+#~ "\n"
+#~ "// later, in a new session\n"
+#~ "secondSession.saveOrUpdate(cat); // update existing state (cat has a "
+#~ "non-null id)\n"
+#~ "secondSession.saveOrUpdate(mate); // save the new instance (mate has a "
+#~ "null id)]]>"
+#~ msgstr ""
+#~ "<![CDATA[// in the first session\n"
+#~ "Cat cat = (Cat) firstSession.load(Cat.class, catID);\n"
+#~ "\n"
+#~ "// in a higher tier of the application\n"
+#~ "Cat mate = new Cat();\n"
+#~ "cat.setMate(mate);\n"
+#~ "\n"
+#~ "// later, in a new session\n"
+#~ "secondSession.saveOrUpdate(cat); // update existing state (cat has a "
+#~ "non-null id)\n"
+#~ "secondSession.saveOrUpdate(mate); // save the new instance (mate has a "
+#~ "null id)]]>"
+#~ msgid "<![CDATA[sess.delete(cat);]]>"
+#~ msgstr "<![CDATA[sess.delete(cat);]]>"
+#~ msgid ""
+#~ "<![CDATA[//retrieve a cat from one database\n"
+#~ "Session session1 = factory1.openSession();\n"
+#~ "Transaction tx1 = session1.beginTransaction();\n"
+#~ "Cat cat = session1.get(Cat.class, catId);\n"
+#~ "tx1.commit();\n"
+#~ "session1.close();\n"
+#~ "\n"
+#~ "//reconcile with a second database\n"
+#~ "Session session2 = factory2.openSession();\n"
+#~ "Transaction tx2 = session2.beginTransaction();\n"
+#~ "session2.replicate(cat, ReplicationMode.LATEST_VERSION);\n"
+#~ "tx2.commit();\n"
+#~ "session2.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[//retrieve a cat from one database\n"
+#~ "Session session1 = factory1.openSession();\n"
+#~ "Transaction tx1 = session1.beginTransaction();\n"
+#~ "Cat cat = session1.get(Cat.class, catId);\n"
+#~ "tx1.commit();\n"
+#~ "session1.close();\n"
+#~ "\n"
+#~ "//reconcile with a second database\n"
+#~ "Session session2 = factory2.openSession();\n"
+#~ "Transaction tx2 = session2.beginTransaction();\n"
+#~ "session2.replicate(cat, ReplicationMode.LATEST_VERSION);\n"
+#~ "tx2.commit();\n"
+#~ "session2.close();]]>"
+#~ msgid ""
+#~ "<![CDATA[sess = sf.openSession();\n"
+#~ "Transaction tx = sess.beginTransaction();\n"
+#~ "sess.setFlushMode(FlushMode.COMMIT); // allow queries to return stale "
+#~ "state\n"
+#~ "\n"
+#~ "Cat izi = (Cat) sess.load(Cat.class, id);\n"
+#~ "izi.setName(iznizi);\n"
+#~ "\n"
+#~ "// might return stale data\n"
+#~ "sess.find(\"from Cat as cat left outer join cat.kittens
kitten\");\n"
+#~ "\n"
+#~ "// change to izi is not flushed!\n"
+#~ "...\n"
+#~ "tx.commit(); // flush occurs\n"
+#~ "sess.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[sess = sf.openSession();\n"
+#~ "Transaction tx = sess.beginTransaction();\n"
+#~ "sess.setFlushMode(FlushMode.COMMIT); // allow queries to return stale "
+#~ "state\n"
+#~ "\n"
+#~ "Cat izi = (Cat) sess.load(Cat.class, id);\n"
+#~ "izi.setName(iznizi);\n"
+#~ "\n"
+#~ "// might return stale data\n"
+#~ "sess.find(\"from Cat as cat left outer join cat.kittens
kitten\");\n"
+#~ "\n"
+#~ "// change to izi is not flushed!\n"
+#~ "...\n"
+#~ "tx.commit(); // flush occurs\n"
+#~ "sess.close();]]>"
+#~ msgid "<![CDATA[<one-to-one name=\"person\"
cascade=\"persist\"/>]]>"
+#~ msgstr "<![CDATA[<one-to-one name=\"person\"
cascade=\"persist\"/>]]>"
+#~ msgid ""
+#~ "<![CDATA[<one-to-one name=\"person\"
cascade=\"persist,delete,lock\"/>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<one-to-one name=\"person\"
cascade=\"persist,delete,lock\"/>]]>"
+#~ msgid ""
+#~ "<![CDATA[Cat fritz = ......;\n"
+#~ "ClassMetadata catMeta = sessionfactory.getClassMetadata(Cat.class);\n"
+#~ "\n"
+#~ "Object[] propertyValues = catMeta.getPropertyValues(fritz);\n"
+#~ "String[] propertyNames = catMeta.getPropertyNames();\n"
+#~ "Type[] propertyTypes = catMeta.getPropertyTypes();\n"
+#~ "\n"
+#~ "// get a Map of all properties which are not collections or
associations\n"
+#~ "Map namedValues = new HashMap();\n"
+#~ "for ( int i=0; i<propertyNames.length; i++ ) {\n"
+#~ " if ( !propertyTypes[i].isEntityType() && !propertyTypes[i]."
+#~ "isCollectionType() ) {\n"
+#~ " namedValues.put( propertyNames[i], propertyValues[i] );\n"
+#~ " }\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[Cat fritz = ......;\n"
+#~ "ClassMetadata catMeta = sessionfactory.getClassMetadata(Cat.class);\n"
+#~ "\n"
+#~ "Object[] propertyValues = catMeta.getPropertyValues(fritz);\n"
+#~ "String[] propertyNames = catMeta.getPropertyNames();\n"
+#~ "Type[] propertyTypes = catMeta.getPropertyTypes();\n"
+#~ "\n"
+#~ "// get a Map of all properties which are not collections or
associations\n"
+#~ "Map namedValues = new HashMap();\n"
+#~ "for ( int i=0; i<propertyNames.length; i++ ) {\n"
+#~ " if ( !propertyTypes[i].isEntityType() && !propertyTypes[i]."
+#~ "isCollectionType() ) {\n"
+#~ " namedValues.put( propertyNames[i], propertyValues[i] );\n"
+#~ " }\n"
+#~ "}]]>"
-#~ msgid "DELETE"
-#~ msgstr "DELETE"
-
-#~ msgid "state management"
-#~ msgstr "状态管理(state management)"
-
-#~ msgid "statements"
-#~ msgstr "语句(statements)"
-
-#~ msgid "Connection"
-#~ msgstr "session.connection()"
-
-#~ msgid "session.connection()"
-#~ msgstr "Connection"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/toolset_guide.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/toolset_guide.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/toolset_guide.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,57 +1,57 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2010-01-08T04:07:20\n"
+"PO-Revision-Date: 2009-12-04 15:04+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: toolset_guide.xml:29
#, no-c-format
msgid "Toolset Guide"
msgstr "工具箱指南"
#. Tag: para
-#: toolset_guide.xml:31
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Roundtrip engineering with Hibernate is possible using a set of Eclipse "
"plugins, commandline tools, and Ant tasks."
msgstr ""
-"可以通过一系列Eclipse插件、命令行工具和Ant任务来进行与Hibernate关联的转换。"
+"可以通过一系列 Eclipse 插件、命令行工具和 Ant 任务来进行与 Hibernate 关联的转"
+"换。 "
#. Tag: para
-#: toolset_guide.xml:36
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<emphasis>Hibernate Tools</emphasis> currently include plugins for the
"
"Eclipse IDE as well as Ant tasks for reverse engineering of existing "
"databases:"
msgstr ""
-"除了Ant任务外,当前的<emphasis>Hibernate Tools</emphasis>也包含了Eclipse IDE"
-"的插件,用于与现存数据库的逆向工程。"
+"除了 Ant 任务外,当前的 <emphasis>Hibernate Tools</emphasis> 也包含了 "
+"Eclipse IDE 的插件,用于与现存数据库的逆向工程。 "
#. Tag: para
-#: toolset_guide.xml:42
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<emphasis>Mapping Editor:</emphasis> an editor for Hibernate XML
mapping "
"files that supports auto-completion and syntax highlighting. It also "
"supports semantic auto-completion for class names and property/field names, "
"making it more versatile than a normal XML editor."
msgstr ""
-"<emphasis>Mapping Editor:</emphasis> Hibernate XML映射文件的编辑器,支持自动"
-"完成和语法高亮。它也支持对类名和属性/字段名的语义自动完成,比通常的XML编辑器"
-"方便得多。"
+"<emphasis>Mapping Editor:</emphasis> Hibernate XML 映射文件的编辑器,支持自动"
+"完成和语法高亮。它也支持对类名和属性/字段名的语义自动完成,比通常的 XML 编辑"
+"器方便得多。 "
#. Tag: para
-#: toolset_guide.xml:47
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<emphasis>Console:</emphasis> the console is a new view in Eclipse. In
"
"addition to a tree overview of your console configurations, you are also "
@@ -59,13 +59,12 @@
"relationships. The console allows you to execute HQL queries against your "
"database and browse the result directly in Eclipse."
msgstr ""
-"<emphasis>Console:</emphasis> Console是Eclipse的一个新视图。除了对你的console"
-"配置的树状概览,你还可以获得对你持久化类及其关联的交互式视图。Console允许你对"
-"数据库执行HQL查询,并直接在Eclipse中浏览结果。"
+"<emphasis>Console:</emphasis> Console 是 Eclipse 的一个新视图。除了对你的 "
+"console 配置的树状概览,你还可以获得对你持久化类及其关联的交互式视图。"
+"Console 允许你对数据库执行 HQL 查询,并直接在 Eclipse 中浏览结果。 "
#. Tag: para
-#: toolset_guide.xml:54
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<emphasis>Development Wizards:</emphasis> several wizards are provided
with "
"the Hibernate Eclipse tools. You can use a wizard to quickly generate "
@@ -73,442 +72,295 @@
"database schema into POJO source files and Hibernate mapping files. The "
"reverse engineering wizard supports customizable templates."
msgstr ""
-"<emphasis>Development Wizards:</emphasis> 在Hibernate Eclipse
tools中还提供了"
-"几个向导;你可以用向导快速生成Hibernate 配置文件(cfg.xml),你甚至还可以同现"
-"存的数据库schema中反向工程出POJO源代码与Hibernate 映射文件。反向工程支持可定"
-"制的模版。"
+"<emphasis>Development Wizards:</emphasis> 在 Hibernate Eclipse tools
中还提供"
+"了几个向导;你可以用向导快速生成 Hibernate 配置文件(cfg.xml),你甚至还可以"
+"同现存的数据库 schema 中反向工程出 POJO 源代码与 Hibernate 映射文件。反向工程"
+"支持可定制的模版。 "
#. Tag: para
-#: toolset_guide.xml:67
-#, fuzzy, no-c-format
+#, no-c-format
+msgid "<!-- <emphasis>Ant Tasks:</emphasis> -->"
+msgstr "<!-- <emphasis>Ant Tasks:</emphasis> -->"
+
+#. Tag: para
+#, no-c-format
msgid ""
"Please refer to the <emphasis>Hibernate Tools</emphasis> package
"
"documentation for more information."
msgstr ""
-"要得到更多信息,请查阅 <emphasis>Hibernate Tools</emphasis> 包及其文档。"
+"要得到更多信息,请查阅 <emphasis>Hibernate Tools</emphasis> 包及其文档。 "
#. Tag: para
-#: toolset_guide.xml:72
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"However, the Hibernate main package comes bundled with an integrated tool : "
"<emphasis>SchemaExport</emphasis> aka
<literal>hbm2ddl</literal>.It can even "
"be used from \"inside\" Hibernate."
msgstr ""
-"同时,Hibernate主发行包还附带了一个集成的工具(它甚至可以在Hibernate“内部”快"
-"速运行)<emphasis>SchemaExport</emphasis> ,也就是
<literal>hbm2ddl</"
-"literal>。"
+"同时,Hibernate 主发行包还附带了一个集成的工具(它甚至可以在 Hibernate“内"
+"部”快速运行)<emphasis>SchemaExport</emphasis> ,也就是
<literal>hbm2ddl</"
+"literal>。 "
#. Tag: title
-#: toolset_guide.xml:79
#, no-c-format
msgid "Automatic schema generation"
-msgstr "Schema自动生成(Automatic schema generation)"
+msgstr "Schema 自动生成(Automatic schema generation)"
#. Tag: para
-#: toolset_guide.xml:81
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"DDL can be generated from your mapping files by a Hibernate utility. The "
"generated schema includes referential integrity constraints, primary and "
"foreign keys, for entity and collection tables. Tables and sequences are "
"also created for mapped identifier generators."
msgstr ""
-"可以从你的映射文件使用一个Hibernate工具生成DDL。 生成的schema包含有对实体和集"
-"合类表的完整性引用约束(主键和外键)。涉及到的标示符生成器所需的表和sequence"
-"也会同时生成。"
+"可以从你的映射文件使用一个 Hibernate 工具生成 DDL。生成的 schema 包含有对实体"
+"和集合类表的完整性引用约束(主键和外键)。涉及到的标示符生成器所需的表和 "
+"sequence 也会同时生成。 "
#. Tag: para
-#: toolset_guide.xml:88
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"You <emphasis>must</emphasis> specify a SQL
<literal>Dialect</literal> via "
"the <literal>hibernate.dialect</literal> property when using this tool,
as "
"DDL is highly vendor-specific."
msgstr ""
-"在使用这个工具的时候,你<emphasis>必须</emphasis> 通过<literal>hibernate."
-"dialet</literal>属性指定一个SQL<literal>方言(Dialet)</literal>,因为DDL是与供"
-"应商高度相关的。"
+"在使用这个工具的时候,你<emphasis>必须</emphasis> 通过 <literal>hibernate."
+"dialet</literal> 属性指定一个 SQL<literal> 方言(Dialet)</literal>,因为
"
+"DDL 是与供应商高度相关的。 "
#. Tag: para
-#: toolset_guide.xml:94
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"First, you must customize your mapping files to improve the generated "
"schema. The next section covers schema customization."
-msgstr "首先,要定制你的映射文件,来改善生成的schema。"
+msgstr ""
+"首先,要定制你的映射文件,来改善生成的 schema。下章将涵盖 schema 定制。"
#. Tag: title
-#: toolset_guide.xml:99
#, no-c-format
msgid "Customizing the schema"
-msgstr "对schema定制化(Customizing the schema)"
+msgstr "对 schema 定制化(Customizing the schema)"
#. Tag: para
-#: toolset_guide.xml:101
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Many Hibernate mapping elements define optional attributes named "
"<literal>length</literal>, <literal>precision</literal> and
<literal>scale</"
"literal>. You can set the length, precision and scale of a column with this
"
"attribute."
msgstr ""
-"很多Hibernate映射元素定义了可选的<literal>length</literal>、"
-"<literal>precision</literal> 或者
<literal>scale</literal>属性。你可以通过这"
-"个属性设置字段的长度、精度、小数点位数。"
+"很多 Hibernate 映射元素定义了可选的 <literal>length</literal>、"
+"<literal>precision</literal> 或者 <literal>scale</literal>
属性。你可以通过这"
+"个属性设置字段的长度、精度、小数点位数。 "
-#. Tag: programlisting
-#: toolset_guide.xml:108
-#, no-c-format
-msgid "<![CDATA[<property name=\"zip\"
length=\"5\"/>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: toolset_guide.xml:109
-#, no-c-format
-msgid "<![CDATA[<property name=\"balance\"
precision=\"12\" scale=\"2\"/>]]>"
-msgstr ""
-
#. Tag: para
-#: toolset_guide.xml:111
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Some tags also accept a <literal>not-null</literal> attribute for
generating "
"a <literal>NOT NULL</literal> constraint on table columns, and a
"
"<literal>unique</literal> attribute for generating
<literal>UNIQUE</literal> "
"constraint on table columns."
msgstr ""
-"有些tag还接受<literal>not-null</literal>属性(用来在表字段上生成<literal>NOT
"
-"NULL</literal>约束)和<literal>unique</literal>属性(用来在表字段上生成"
-"<literal>UNIQUE</literal>约束)。"
+"有些 tag 还接受 <literal>not-null</literal> 属性(用来在表字段上生成 "
+"<literal>NOT NULL</literal> 约束)和 <literal>unique</literal>
属性(用来在表"
+"字段上生成 <literal>UNIQUE</literal> 约束)。 "
-#. Tag: programlisting
-#: toolset_guide.xml:117
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<many-to-one name=\"bar\" column=\"barId\"
not-null=\"true\"/>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: toolset_guide.xml:119
-#, no-c-format
-msgid ""
-"<![CDATA[<element column=\"serialNumber\" type=\"long\"
not-null=\"true\" "
-"unique=\"true\"/>]]>"
-msgstr ""
-
-#. Tag: para
-#: toolset_guide.xml:121
-#, fuzzy, no-c-format
-msgid ""
"A <literal>unique-key</literal> attribute can be used to group columns
in a "
"single, unique key constraint. Currently, the specified value of the "
"<literal>unique-key</literal> attribute is
<emphasis>not</emphasis> used to "
"name the constraint in the generated DDL. It is only used to group the "
"columns in the mapping file."
msgstr ""
-"<literal>unique-key</literal>属性可以对成组的字段指定一个唯一键约束(unique "
-"key constraint)。目前,<literal>unique-key</literal>属性指定的值在生成DDL时"
-"<emphasis>并不会</emphasis>被当作这个约束的名字,它们只是在用来在映射文件内部"
-"用作区分的。"
+"<literal>unique-key</literal> 属性可以对成组的字段指定一个唯一键约束(unique "
+"key constraint)。目前,<literal>unique-key</literal> 属性指定的值在生成 DDL "
+"时<emphasis>并不会</emphasis>被当作这个约束的名字,它们只是在用来在映射文件内"
+"部用作区分的。 "
-#. Tag: programlisting
-#: toolset_guide.xml:129
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<many-to-one name=\"org\" column=\"orgId\"
unique-key="
-"\"OrgEmployeeId\"/>\n"
-"<property name=\"employeeId\"
unique-key=\"OrgEmployee\"/>]]>"
-msgstr ""
-
-#. Tag: para
-#: toolset_guide.xml:131
-#, fuzzy, no-c-format
-msgid ""
"An <literal>index</literal> attribute specifies the name of an index
that "
"will be created using the mapped column or columns. Multiple columns can be "
"grouped into the same index by simply specifying the same index name."
msgstr ""
-"<literal>index</literal>属性会用对应的字段(一个或多个)生成一个index,它指出"
-"了这个index的名字。如果多个字段对应的index名字相同,就会生成包含这些字段的"
-"index。"
+"<literal>index</literal> 属性会用对应的字段(一个或多个)生成一个 index,它指"
+"出了这个 index 的名字。如果多个字段对应的 index 名字相同,就会生成包含这些字"
+"段的 index。 "
-#. Tag: programlisting
-#: toolset_guide.xml:137
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<property name=\"lastName\"
index=\"CustName\"/>\n"
-"<property name=\"firstName\"
index=\"CustName\"/>]]>"
-msgstr ""
-
-#. Tag: para
-#: toolset_guide.xml:139
-#, fuzzy, no-c-format
-msgid ""
"A <literal>foreign-key</literal> attribute can be used to override the
name "
"of any generated foreign key constraint."
msgstr ""
-"<literal>foreign-key</literal>属性可以用来覆盖任何生成的外键约束的名字。"
+"<literal>foreign-key</literal> 属性可以用来覆盖任何生成的外键约束的名字。 "
-#. Tag: programlisting
-#: toolset_guide.xml:144
-#, no-c-format
-msgid ""
-"<![CDATA[<many-to-one name=\"bar\" column=\"barId\"
foreign-key=\"FKFooBar\"/"
-">]]>"
-msgstr ""
-
#. Tag: para
-#: toolset_guide.xml:146
#, no-c-format
msgid ""
"Many mapping elements also accept a child
<literal><column></literal> "
"element. This is particularly useful for mapping multi-column types:"
msgstr ""
-"很多映射元素还接受<literal><column></literal>子元素。这在定义跨越多字段"
-"的类型时特别有用。"
+"很多映射元素还接受 <literal><column></literal> 子元素。这在定义跨越多字"
+"段的类型时特别有用。"
-#. Tag: programlisting
-#: toolset_guide.xml:151
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<property name=\"name\"
type=\"my.customtypes.Name\"/>\n"
-" <column name=\"last\" not-null=\"true\"
index=\"bar_idx\" length=\"30\"/"
-">\n"
-" <column name=\"first\" not-null=\"true\"
index=\"bar_idx\" length=\"20\"/"
-">\n"
-" <column name=\"initial\"/>\n"
-"</property>]]>"
-msgstr ""
-
-#. Tag: para
-#: toolset_guide.xml:153
-#, fuzzy, no-c-format
-msgid ""
"The <literal>default</literal> attribute allows you to specify a
default "
"value for a column.You should assign the same value to the mapped property "
"before saving a new instance of the mapped class."
msgstr ""
-"<literal>default</literal>属性为字段指定一个默认值 (在保存被映射的类的新实例"
-"之前,你应该将同样的值赋于对应的属性)。"
+"<literal>default</literal> 属性为字段指定一个默认值(在保存被映射的类的新实例"
+"之前,你应该将同样的值赋于对应的属性)。"
-#. Tag: programlisting
-#: toolset_guide.xml:159
-#, no-c-format
-msgid ""
-"<![CDATA[<property name=\"credits\" type=\"integer\"
insert=\"false\">\n"
-" <column name=\"credits\" default=\"10\"/>\n"
-"</property>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: toolset_guide.xml:161
-#, no-c-format
-msgid ""
-"<![CDATA[<version name=\"version\" type=\"integer\"
insert=\"false\">\n"
-" <column name=\"version\" default=\"0\"/>\n"
-"</property>]]>"
-msgstr ""
-
#. Tag: para
-#: toolset_guide.xml:163
#, no-c-format
msgid ""
"The <literal>sql-type</literal> attribute allows the user to override
the "
"default mapping of a Hibernate type to SQL datatype."
msgstr ""
-"<literal>sql-type</literal>属性允许用户覆盖默认的Hibernate类型到SQL数据类型的"
-"映射。"
+"<literal>sql-type</literal> 属性允许用户覆盖默认的 Hibernate 类型到 SQL 数据"
+"类型的映射。"
-#. Tag: programlisting
-#: toolset_guide.xml:168
-#, no-c-format
-msgid ""
-"<![CDATA[<property name=\"balance\"
type=\"float\">\n"
-" <column name=\"balance\"
sql-type=\"decimal(13,3)\"/>\n"
-"</property>]]>"
-msgstr ""
-
#. Tag: para
-#: toolset_guide.xml:170
#, no-c-format
msgid ""
"The <literal>check</literal> attribute allows you to specify a check
"
"constraint."
-msgstr "<literal>check</literal>属性允许用户指定一个约束检查。"
+msgstr "<literal>check</literal> 属性允许用户指定一个约束检查。"
-#. Tag: programlisting
-#: toolset_guide.xml:174
-#, no-c-format
-msgid ""
-"<![CDATA[<property name=\"foo\"
type=\"integer\">\n"
-" <column name=\"foo\" check=\"foo > 10\"/>\n"
-"</property>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: toolset_guide.xml:176
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Foo\" table=\"foos\"
check=\"bar < 100.0\">\n"
-" ...\n"
-" <property name=\"bar\" type=\"float\"/>\n"
-"</class>]]>"
-msgstr ""
-
#. Tag: para
-#: toolset_guide.xml:179
#, no-c-format
msgid "The following table summarizes these optional attributes."
-msgstr ""
+msgstr "下表总结了这些可选属性:"
#. Tag: title
-#: toolset_guide.xml:182
#, no-c-format
msgid "Summary"
-msgstr "Summary"
+msgstr "总结"
-#. Tag: entry
-#: toolset_guide.xml:189
+#. Tag: para
#, no-c-format
msgid "Attribute"
-msgstr "属性(Attribute)"
+msgstr "属性(Attribute)"
-#. Tag: entry
-#: toolset_guide.xml:190
+#. Tag: para
#, no-c-format
msgid "Values"
msgstr "值(Values)"
-#. Tag: entry
-#: toolset_guide.xml:191
+#. Tag: para
#, no-c-format
msgid "Interpretation"
msgstr "解释(Interpretation)"
-#. Tag: literal
-#: toolset_guide.xml:196
+#. Tag: para
#, no-c-format
-msgid "length"
-msgstr "length"
+msgid "<literal>length</literal>"
+msgstr "<literal>length</literal>"
-#. Tag: entry
-#: toolset_guide.xml:197 toolset_guide.xml:202 toolset_guide.xml:207
+#. Tag: para
#, no-c-format
msgid "number"
msgstr "数字"
-#. Tag: entry
-#: toolset_guide.xml:198
+#. Tag: para
#, no-c-format
msgid "column length"
msgstr "字段长度"
-#. Tag: literal
-#: toolset_guide.xml:201
+#. Tag: para
#, no-c-format
-msgid "precision"
-msgstr "precision"
+msgid "<literal>precision</literal>"
+msgstr "<literal>precision</literal>"
-#. Tag: entry
-#: toolset_guide.xml:203
+#. Tag: para
#, no-c-format
msgid "column decimal precision"
-msgstr "精度(decimal precision)"
+msgstr "精度(decimal precision)"
-#. Tag: literal
-#: toolset_guide.xml:206
+#. Tag: para
#, no-c-format
-msgid "scale"
-msgstr "scale"
+msgid "<literal>scale</literal>"
+msgstr "<literal>scale</literal>"
-#. Tag: entry
-#: toolset_guide.xml:208
+#. Tag: para
#, no-c-format
msgid "column decimal scale"
-msgstr "小数点位数(decimal scale)"
+msgstr "小数点位数(decimal scale)"
-#. Tag: literal
-#: toolset_guide.xml:211
+#. Tag: para
#, no-c-format
-msgid "not-null"
-msgstr "not-null"
+msgid "<literal>not-null</literal>"
+msgstr "<literal>not-null</literal>"
-#. Tag: literal
-#: toolset_guide.xml:212 toolset_guide.xml:217
+#. Tag: para
#, no-c-format
-msgid "true|false"
-msgstr "true|false"
+msgid "<literal>true|false</literal>"
+msgstr "<literal>true|false</literal>"
-#. Tag: entry
-#: toolset_guide.xml:213
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "specifies that the column should be non-nullable"
-msgstr "指明字段是否应该是非空的"
+msgstr "指明字段是否应该是非空的 "
-#. Tag: literal
-#: toolset_guide.xml:216
+#. Tag: para
#, no-c-format
-msgid "unique"
-msgstr "unique"
+msgid "<literal>unique</literal>"
+msgstr "<literal>unique</literal>"
-#. Tag: entry
-#: toolset_guide.xml:218
+#. Tag: para
#, no-c-format
msgid "specifies that the column should have a unique constraint"
msgstr "指明是否该字段具有惟一约束"
-#. Tag: literal
-#: toolset_guide.xml:221
+#. Tag: para
#, no-c-format
-msgid "index"
-msgstr "index"
+msgid "<literal>index</literal>"
+msgstr "<literal>index</literal>"
-#. Tag: literal
-#: toolset_guide.xml:222
+#. Tag: para
#, no-c-format
-msgid "index_name"
-msgstr "index_name"
+msgid "<literal>index_name</literal>"
+msgstr "<literal>index_name</literal>"
-#. Tag: entry
-#: toolset_guide.xml:223
+#. Tag: para
#, no-c-format
msgid "specifies the name of a (multi-column) index"
-msgstr "指明一个(多字段)的索引(index)的名字"
+msgstr "指明一个(多字段)的索引(index)的名字"
-#. Tag: literal
-#: toolset_guide.xml:226
+#. Tag: para
#, no-c-format
-msgid "unique-key"
-msgstr "unique-key"
+msgid "<literal>unique-key</literal>"
+msgstr "<literal>unique-key</literal>"
-#. Tag: literal
-#: toolset_guide.xml:227
+#. Tag: para
#, no-c-format
-msgid "unique_key_name"
-msgstr "unique_key_name"
+msgid "<literal>unique_key_name</literal>"
+msgstr "<literal>unique_key_name</literal>"
-#. Tag: entry
-#: toolset_guide.xml:228
+#. Tag: para
#, no-c-format
msgid "specifies the name of a multi-column unique constraint"
msgstr "指明多字段惟一约束的名字(参见上面的说明)"
-#. Tag: literal
-#: toolset_guide.xml:231
+#. Tag: para
#, no-c-format
-msgid "foreign-key"
-msgstr "foreign-key"
+msgid "<literal>foreign-key</literal>"
+msgstr "<literal>foreign-key</literal>"
-#. Tag: literal
-#: toolset_guide.xml:232
+#. Tag: para
#, no-c-format
-msgid "foreign_key_name"
-msgstr "foreign_key_name"
+msgid "<literal>foreign_key_name</literal>"
+msgstr "<literal>foreign_key_name</literal>"
-#. Tag: entry
-#: toolset_guide.xml:233
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid ""
"specifies the name of the foreign key constraint generated for an "
"association, for a <literal><one-to-one></literal>,
<literal><many-"
@@ -516,555 +368,393 @@
"to-many></literal> mapping element. Note that
<literal>inverse=\"true\"</"
"literal> sides will not be considered by
<literal>SchemaExport</literal>."
msgstr ""
-"指明一个外键的名字,它是为关联生成的,或者<placeholder-1/>,<placeholder-2/"
-">, <placeholder-3/>,
或者<placeholder-4/>映射元素。注意<placeholder-5/>在"
-"<placeholder-6/>时会被忽略。"
+"指明一个外键的名字,它是为关联生成的,或者是为 <literal><one-to-one></"
+"literal>, <literal><many-to-one></literal>,
<literal><key></"
+"literal>, or <literal><many-to-many></literal> 映射元素。注意
"
+"<literal>inverse=\"true\"</literal> 会被
<literal>SchemaExport</literal> 忽"
+"略。"
-#. Tag: literal
-#: toolset_guide.xml:243
+#. Tag: para
#, no-c-format
-msgid "sql-type"
-msgstr "sql-type"
+msgid "<literal>sql-type</literal>"
+msgstr "<literal>sql-type</literal>"
-#. Tag: literal
-#: toolset_guide.xml:244
+#. Tag: para
#, no-c-format
-msgid "SQL column type"
-msgstr "SQL 字段类型"
+msgid "<literal>SQL column type</literal>"
+msgstr "<literal>SQL column type</literal>"
-#. Tag: entry
-#: toolset_guide.xml:245
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid ""
"overrides the default column type (attribute of
<literal><column></"
"literal> element only)"
-msgstr "覆盖默认的字段类型(只能用于<placeholder-1/>属性)"
+msgstr "覆盖默认的字段类型(只能用于 <literal><column></literal>
属性)"
-#. Tag: literal
-#: toolset_guide.xml:251
+#. Tag: para
#, no-c-format
-msgid "default"
-msgstr "default"
+msgid "<literal>default</literal>"
+msgstr "<literal>default</literal>"
-#. Tag: entry
-#: toolset_guide.xml:252 toolset_guide.xml:259
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "SQL expression"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"SQL表达式\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"SQL 表达式"
+msgstr "SQL 表达式"
-#. Tag: entry
-#: toolset_guide.xml:253
+#. Tag: para
#, no-c-format
msgid "specify a default value for the column"
msgstr "为字段指定默认值"
-#. Tag: literal
-#: toolset_guide.xml:258
+#. Tag: para
#, no-c-format
-msgid "check"
-msgstr "check"
+msgid "<literal>check</literal>"
+msgstr "<literal>check</literal>"
-#. Tag: entry
-#: toolset_guide.xml:260
+#. Tag: para
#, no-c-format
msgid "create an SQL check constraint on either column or table"
-msgstr "对字段或表加入SQL约束检查"
+msgstr "对字段或表加入 SQL 约束检查"
#. Tag: para
-#: toolset_guide.xml:268
#, no-c-format
msgid ""
"The <literal><comment></literal> element allows you to
specify "
"comments for the generated schema."
msgstr ""
-"<literal><comment></literal>元素可以让你在生成的schema中加入注释。"
+"<literal><comment></literal> 元素可以让你在生成的 schema
中加入注释。"
-#. Tag: programlisting
-#: toolset_guide.xml:273
+#. Tag: para
#, no-c-format
msgid ""
-"<![CDATA[<class name=\"Customer\"
table=\"CurCust\">\n"
-" <comment>Current customers only</comment>\n"
-" ...\n"
-"</class>]]>"
-msgstr ""
-
-#. Tag: programlisting
-#: toolset_guide.xml:275
-#, no-c-format
-msgid ""
-"<![CDATA[<property name=\"balance\">\n"
-" <column name=\"bal\">\n"
-" <comment>Balance in USD</comment>\n"
-" </column>\n"
-"</property>]]>"
-msgstr ""
-
-#. Tag: para
-#: toolset_guide.xml:277
-#, fuzzy, no-c-format
-msgid ""
"This results in a <literal>comment on table</literal> or
<literal>comment on "
"column</literal> statement in the generated DDL where supported."
msgstr ""
-"结果是在生成的DDL中包含<literal>comment on table</literal> 或者 "
-"<literal>comment on column</literal>语句(假若支持的话)。"
+"结果是在生成的 DDL 中包含 <literal>comment on table</literal> 或者 "
+"<literal>comment on column</literal> 语句(假若支持的话)。 "
#. Tag: title
-#: toolset_guide.xml:286
#, no-c-format
msgid "Running the tool"
msgstr "运行该工具"
#. Tag: para
-#: toolset_guide.xml:288
#, no-c-format
msgid ""
"The <literal>SchemaExport</literal> tool writes a DDL script to
standard out "
"and/or executes the DDL statements."
msgstr ""
-"<literal>SchemaExport</literal>工具把DDL脚本写到标准输出,同时/或者执行DDL语"
-"句。"
+"<literal>SchemaExport</literal> 工具把 DDL 脚本写到标准输出,同时/或者执行 "
+"DDL 语句。"
#. Tag: para
-#: toolset_guide.xml:293
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The following table displays the <literal>SchemaExport</literal>
command "
"line options"
-msgstr "<literal>SchemaExport</literal>命令行选项"
+msgstr "下表显示了 <literal>SchemaExport</literal> 命令行选项"
#. Tag: para
-#: toolset_guide.xml:295
#, no-c-format
msgid ""
"<literal>java -cp
</literal><emphasis>hibernate_classpaths</emphasis> "
"<literal>org.hibernate.tool.hbm2ddl.SchemaExport</literal>
<emphasis>options "
"mapping_files</emphasis>"
msgstr ""
+"<literal>java -cp
</literal><emphasis>hibernate_classpaths</emphasis> "
+"<literal>org.hibernate.tool.hbm2ddl.SchemaExport</literal>
<emphasis>options "
+"mapping_files</emphasis>"
#. Tag: title
-#: toolset_guide.xml:301
#, no-c-format
msgid "<literal>SchemaExport</literal> Command Line Options"
-msgstr "<literal>SchemaExport</literal>命令行选项"
+msgstr "<literal>SchemaExport</literal> 命令行选项"
-#. Tag: entry
-#: toolset_guide.xml:307 toolset_guide.xml:457 toolset_guide.xml:526
+#. Tag: para
#, no-c-format
msgid "Option"
msgstr "选项"
-#. Tag: entry
-#: toolset_guide.xml:308 toolset_guide.xml:395 toolset_guide.xml:458
-#: toolset_guide.xml:527
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "Description"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"说明\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"说明\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"说明\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"描述"
+msgstr "描述"
-#. Tag: literal
-#: toolset_guide.xml:313 toolset_guide.xml:463
+#. Tag: para
#, no-c-format
-msgid "--quiet"
-msgstr "--quiet"
+msgid "<literal>--quiet</literal>"
+msgstr "<literal>--quiet</literal>"
-#. Tag: entry
-#: toolset_guide.xml:314 toolset_guide.xml:464
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "do not output the script to stdout"
-msgstr "不要把脚本输出到stdout"
+msgstr "不要把脚本输出到 stdout "
-#. Tag: literal
-#: toolset_guide.xml:317
+#. Tag: para
#, no-c-format
-msgid "--drop"
-msgstr "--drop"
+msgid "<literal>--drop</literal>"
+msgstr "<literal>--drop</literal>"
-#. Tag: entry
-#: toolset_guide.xml:318
+#. Tag: para
#, no-c-format
msgid "only drop the tables"
-msgstr "只进行drop tables的步骤"
+msgstr "只进行 drop tables 的步骤"
-#. Tag: literal
-#: toolset_guide.xml:321
+#. Tag: para
#, no-c-format
-msgid "--create"
-msgstr "--create"
+msgid "<literal>--create</literal>"
+msgstr "<literal>--create</literal>"
-#. Tag: entry
-#: toolset_guide.xml:322
+#. Tag: para
#, no-c-format
msgid "only create the tables"
msgstr "只创建表"
-#. Tag: literal
-#: toolset_guide.xml:325 toolset_guide.xml:467
+#. Tag: para
#, no-c-format
-msgid "--text"
-msgstr "--text"
+msgid "<literal>--text</literal>"
+msgstr "<literal>--text</literal>"
-#. Tag: entry
-#: toolset_guide.xml:326
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "do not export to the database"
-msgstr "不执行在数据库中运行的步骤"
+msgstr "不执行在数据库中运行的步骤 "
-#. Tag: literal
-#: toolset_guide.xml:329
+#. Tag: para
#, no-c-format
-msgid "--output=my_schema.ddl"
-msgstr "--output=my_schema.ddl"
+msgid "<literal>--output=my_schema.ddl</literal>"
+msgstr "<literal>--output=my_schema.ddl</literal>"
-#. Tag: entry
-#: toolset_guide.xml:330
+#. Tag: para
#, no-c-format
msgid "output the ddl script to a file"
-msgstr "把输出的ddl脚本输出到一个文件"
+msgstr "把输出的 ddl 脚本输出到一个文件"
-#. Tag: literal
-#: toolset_guide.xml:333 toolset_guide.xml:471 toolset_guide.xml:532
+#. Tag: para
#, no-c-format
-msgid "--naming=eg.MyNamingStrategy"
-msgstr "--naming=eg.MyNamingStrategy"
+msgid "<literal>--naming=eg.MyNamingStrategy</literal>"
+msgstr "<literal>--naming=eg.MyNamingStrategy</literal>"
-#. Tag: entry
-#: toolset_guide.xml:334 toolset_guide.xml:472 toolset_guide.xml:533
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "select a <literal>NamingStrategy</literal>"
-msgstr "在<literal>hibernate.properties</literal>文件中"
+msgstr "选择 <literal>NamingStrategy</literal>"
-#. Tag: literal
-#: toolset_guide.xml:337 toolset_guide.xml:479 toolset_guide.xml:540
+#. Tag: para
#, no-c-format
-msgid "--config=hibernate.cfg.xml"
-msgstr "--config=hibernate.cfg.xml"
+msgid "<literal>--config=hibernate.cfg.xml</literal>"
+msgstr "<literal>--config=hibernate.cfg.xml</literal>"
-#. Tag: entry
-#: toolset_guide.xml:338
+#. Tag: para
#, no-c-format
msgid "read Hibernate configuration from an XML file"
-msgstr "从XML文件读入Hibernate配置"
+msgstr "从 XML 文件读入 Hibernate 配置"
-#. Tag: literal
-#: toolset_guide.xml:341 toolset_guide.xml:475 toolset_guide.xml:536
+#. Tag: para
#, no-c-format
-msgid "--properties=hibernate.properties"
-msgstr "--properties=hibernate.properties"
+msgid "<literal>--properties=hibernate.properties</literal>"
+msgstr "<literal>--properties=hibernate.properties</literal>"
-#. Tag: entry
-#: toolset_guide.xml:342 toolset_guide.xml:476 toolset_guide.xml:537
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "read database properties from a file"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"从文件读入数据库属性\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"从指定文件读入数据库属性\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"从文件中读取数据库属性"
+msgstr "从文件读入数据库属性"
-#. Tag: literal
-#: toolset_guide.xml:345
+#. Tag: para
#, no-c-format
-msgid "--format"
-msgstr "--format"
+msgid "<literal>--format</literal>"
+msgstr "<literal>--format</literal>"
-#. Tag: entry
-#: toolset_guide.xml:346
+#. Tag: para
#, no-c-format
msgid "format the generated SQL nicely in the script"
-msgstr "把脚本中的SQL语句对齐和美化"
+msgstr "把脚本中的 SQL 语句对齐和美化"
-#. Tag: literal
-#: toolset_guide.xml:349
+#. Tag: para
#, no-c-format
-msgid "--delimiter=;"
-msgstr "--delimiter=;"
+msgid "<literal>--delimiter=;</literal>"
+msgstr "<literal>--delimiter=;</literal>"
-#. Tag: entry
-#: toolset_guide.xml:350
+#. Tag: para
#, no-c-format
msgid "set an end of line delimiter for the script"
msgstr "为脚本设置行结束符"
#. Tag: para
-#: toolset_guide.xml:356
-#, fuzzy, no-c-format
+#, no-c-format
msgid "You can even embed <literal>SchemaExport</literal> in your
application:"
-msgstr "你甚至可以在你的应用程序中嵌入<literal>SchemaExport</literal>工具:"
+msgstr "你甚至可以在你的应用程序中嵌入 <literal>SchemaExport</literal> 工具: "
-#. Tag: programlisting
-#: toolset_guide.xml:360
-#, no-c-format
-msgid ""
-"<![CDATA[Configuration cfg = ....;\n"
-"new SchemaExport(cfg).create(false, true);]]>"
-msgstr ""
-
#. Tag: title
-#: toolset_guide.xml:365
#, no-c-format
msgid "Properties"
-msgstr "属性(Properties)"
+msgstr "属性(Properties)"
#. Tag: para
-#: toolset_guide.xml:367
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Database properties can be specified:"
-msgstr "可以通过如下方式指定数据库属性:"
+msgstr "可以通过如下方式指定数据库属性: "
#. Tag: para
-#: toolset_guide.xml:373
#, no-c-format
msgid ""
"as system properties with
<literal>-D</literal><emphasis><property></"
"emphasis>"
-msgstr
"通过<literal>-D</literal><emphasis><property></emphasis>系统参数"
+msgstr ""
+"通过
<literal>-D</literal><emphasis><property></emphasis>
系统参数"
#. Tag: para
-#: toolset_guide.xml:376
#, no-c-format
msgid "in <literal>hibernate.properties</literal>"
-msgstr "在<literal>hibernate.properties</literal>文件中"
+msgstr "在 <literal>hibernate.properties</literal> 文件中"
#. Tag: para
-#: toolset_guide.xml:379
#, no-c-format
msgid "in a named properties file with
<literal>--properties</literal>"
msgstr ""
-"位于一个其它名字的properties文件中,然后用 <literal>--properties</literal>参数"
-"指定"
+"位于一个其它名字的 properties 文件中,然后用 <literal>--properties</literal> "
+"参数指定"
#. Tag: para
-#: toolset_guide.xml:383
#, no-c-format
msgid "The needed properties are:"
-msgstr "所需的参数包括:"
+msgstr "所需的参数包括:"
#. Tag: title
-#: toolset_guide.xml:388
#, no-c-format
msgid "SchemaExport Connection Properties"
msgstr "SchemaExport 连接属性"
-#. Tag: entry
-#: toolset_guide.xml:394
+#. Tag: para
#, no-c-format
msgid "Property Name"
msgstr "属性名"
-#. Tag: literal
-#: toolset_guide.xml:400
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.driver_class"
-msgstr "hibernate.connection.driver_class"
+msgid "<literal>hibernate.connection.driver_class</literal>"
+msgstr "<literal>hibernate.connection.driver_class</literal>"
-#. Tag: entry
-#: toolset_guide.xml:401
+#. Tag: para
#, no-c-format
msgid "jdbc driver class"
msgstr "jdbc driver class"
-#. Tag: literal
-#: toolset_guide.xml:404
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.url"
-msgstr "hibernate.connection.url"
+msgid "<literal>hibernate.connection.url</literal>"
+msgstr "<literal>hibernate.connection.url</literal>"
-#. Tag: entry
-#: toolset_guide.xml:405
+#. Tag: para
#, no-c-format
msgid "jdbc url"
msgstr "jdbc url"
-#. Tag: literal
-#: toolset_guide.xml:408
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.username"
-msgstr "hibernate.connection.username"
+msgid "<literal>hibernate.connection.username</literal>"
+msgstr "<literal>hibernate.connection.username</literal>"
-#. Tag: entry
-#: toolset_guide.xml:409
+#. Tag: para
#, no-c-format
msgid "database user"
msgstr "database user"
-#. Tag: literal
-#: toolset_guide.xml:412
+#. Tag: para
#, no-c-format
-msgid "hibernate.connection.password"
-msgstr "hibernate.connection.password"
+msgid "<literal>hibernate.connection.password</literal>"
+msgstr "<literal>hibernate.connection.password</literal>"
-#. Tag: entry
-#: toolset_guide.xml:413
+#. Tag: para
#, no-c-format
msgid "user password"
msgstr "user password"
-#. Tag: literal
-#: toolset_guide.xml:416
+#. Tag: para
#, no-c-format
-msgid "hibernate.dialect"
-msgstr "hibernate.dialect"
+msgid "<literal>hibernate.dialect</literal>"
+msgstr "<literal>hibernate.dialect</literal>"
-#. Tag: entry
-#: toolset_guide.xml:417
+#. Tag: para
#, no-c-format
msgid "dialect"
-msgstr "方言(dialect)"
+msgstr "方言(dialect)"
#. Tag: title
-#: toolset_guide.xml:426
#, no-c-format
msgid "Using Ant"
-msgstr "使用Ant(Using Ant)"
+msgstr "使用 Ant(Using Ant)"
#. Tag: para
-#: toolset_guide.xml:428
#, no-c-format
msgid ""
"You can call <literal>SchemaExport</literal> from your Ant build
script:"
-msgstr "你可以在你的Ant build脚本中调用<literal>SchemaExport</literal>:"
+msgstr "你可以在你的 Ant build 脚本中调用 <literal>SchemaExport</literal>:"
-#. Tag: programlisting
-#: toolset_guide.xml:432
-#, no-c-format
-msgid ""
-"<![CDATA[<target name=\"schemaexport\">\n"
-" <taskdef name=\"schemaexport\"\n"
-"
classname=\"org.hibernate.tool.hbm2ddl.SchemaExportTask\"\n"
-" classpathref=\"class.path\"/>\n"
-" \n"
-" <schemaexport\n"
-" properties=\"hibernate.properties\"\n"
-" quiet=\"no\"\n"
-" text=\"no\"\n"
-" drop=\"no\"\n"
-" delimiter=\";\"\n"
-" output=\"schema-export.sql\">\n"
-" <fileset dir=\"src\">\n"
-" <include name=\"**/*.hbm.xml\"/>\n"
-" </fileset>\n"
-" </schemaexport>\n"
-"</target>]]>"
-msgstr ""
-
#. Tag: title
-#: toolset_guide.xml:437
#, no-c-format
msgid "Incremental schema updates"
-msgstr "对schema的增量更新(Incremental schema updates)"
+msgstr "对 schema 的增量更新(Incremental schema updates)"
#. Tag: para
-#: toolset_guide.xml:439
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The <literal>SchemaUpdate</literal> tool will update an existing schema
with "
"\"incremental\" changes. The <literal>SchemaUpdate</literal>
depends upon "
"the JDBC metadata API and, as such, will not work with all JDBC drivers."
msgstr ""
-"<literal>SchemaUpdate</literal>工具对已存在的schema采用\"增量\"方式进行更新。"
-"注意<literal>SchemaUpdate</literal>严重依赖于JDBC metadata API,所以它并非对所"
-"有JDBC驱动都有效。"
+"<literal>SchemaUpdate</literal> 工具对已存在的 schema
采用\"增量\"方式进行更"
+"新。注意 <literal>SchemaUpdate</literal> 严重依赖于 JDBC metadata API,所以它"
+"并非对所有 JDBC 驱动都有效。 "
#. Tag: para
-#: toolset_guide.xml:445
#, no-c-format
msgid ""
"<literal>java -cp
</literal><emphasis>hibernate_classpaths</emphasis> "
"<literal>org.hibernate.tool.hbm2ddl.SchemaUpdate</literal>
<emphasis>options "
"mapping_files</emphasis>"
msgstr ""
+"<literal>java -cp
</literal><emphasis>hibernate_classpaths</emphasis> "
+"<literal>org.hibernate.tool.hbm2ddl.SchemaUpdate</literal>
<emphasis>options "
+"mapping_files</emphasis>"
#. Tag: title
-#: toolset_guide.xml:451
#, no-c-format
msgid "<literal>SchemaUpdate</literal> Command Line Options"
-msgstr "<literal>SchemaUpdate</literal>命令行选项"
+msgstr "<literal>SchemaUpdate</literal> 命令行选项"
-#. Tag: entry
-#: toolset_guide.xml:468
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "do not export the script to the database"
-msgstr "不把脚本输出到数据库"
+msgstr "不把脚本输出到数据库 "
-#. Tag: entry
-#: toolset_guide.xml:480 toolset_guide.xml:541
-#, fuzzy, no-c-format
+#. Tag: para
+#, no-c-format
msgid "specify a <literal>.cfg.xml</literal> file"
-msgstr ""
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"指定一个 <placeholder-1/>文件\n"
-"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-"指定一个<placeholder-1/>文件"
+msgstr "指定一个 <literal>.cfg.xml</literal> 文件"
#. Tag: para
-#: toolset_guide.xml:486
-#, fuzzy, no-c-format
+#, no-c-format
msgid "You can embed <literal>SchemaUpdate</literal> in your
application:"
-msgstr "你可以在你的应用程序中嵌入<literal>SchemaUpdate</literal>工具:"
+msgstr "你可以在你的应用程序中嵌入 <literal>SchemaUpdate</literal> 工具: "
-#. Tag: programlisting
-#: toolset_guide.xml:490
-#, no-c-format
-msgid ""
-"<![CDATA[Configuration cfg = ....;\n"
-"new SchemaUpdate(cfg).execute(false);]]>"
-msgstr ""
-
#. Tag: title
-#: toolset_guide.xml:495
#, no-c-format
msgid "Using Ant for incremental schema updates"
-msgstr "用Ant来增量更新schema(Using Ant for incremental schema updates)"
+msgstr "用 Ant 来增量更新 schema(Using Ant for incremental schema updates)"
#. Tag: para
-#: toolset_guide.xml:497
#, no-c-format
msgid "You can call <literal>SchemaUpdate</literal> from the Ant
script:"
-msgstr "你可以在Ant脚本中调用<literal>SchemaUpdate</literal>:"
+msgstr "你可以在 Ant 脚本中调用 <literal>SchemaUpdate</literal>:"
-#. Tag: programlisting
-#: toolset_guide.xml:501
-#, no-c-format
-msgid ""
-"<![CDATA[<target name=\"schemaupdate\">\n"
-" <taskdef name=\"schemaupdate\"\n"
-"
classname=\"org.hibernate.tool.hbm2ddl.SchemaUpdateTask\"\n"
-" classpathref=\"class.path\"/>\n"
-" \n"
-" <schemaupdate\n"
-" properties=\"hibernate.properties\"\n"
-" quiet=\"no\">\n"
-" <fileset dir=\"src\">\n"
-" <include name=\"**/*.hbm.xml\"/>\n"
-" </fileset>\n"
-" </schemaupdate>\n"
-"</target>]]>"
-msgstr ""
-
#. Tag: title
-#: toolset_guide.xml:506
#, no-c-format
msgid "Schema validation"
msgstr "Schema 校验"
#. Tag: para
-#: toolset_guide.xml:508
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The <literal>SchemaValidator</literal> tool will validate that the
existing "
"database schema \"matches\" your mapping documents. The "
@@ -1072,123 +762,384 @@
"API and, as such, will not work with all JDBC drivers. This tool is "
"extremely useful for testing."
msgstr ""
-"<literal>SchemaValidator</literal>工具会比较数据库现状是否与映射文档“匹配”。"
-"注意,<literal>SchemaValidator</literal> 严重依赖于JDBC的metadata API,因此不"
-"是对所有的JDBC驱动都适用。这一工具在测试的时候特别有用。"
+"<literal>SchemaValidator</literal> 工具会比较数据库现状是否与映射文档“匹配”。"
+"注意,<literal>SchemaValidator</literal> 严重依赖于 JDBC 的 metadata
API,因"
+"此不是对所有的 JDBC 驱动都适用。这一工具在测试的时候特别有用。 "
#. Tag: para
-#: toolset_guide.xml:514
#, no-c-format
msgid ""
"<literal>java -cp
</literal><emphasis>hibernate_classpaths</emphasis> "
"<literal>org.hibernate.tool.hbm2ddl.SchemaValidator</literal> "
"<emphasis>options mapping_files</emphasis>"
msgstr ""
+"<literal>java -cp
</literal><emphasis>hibernate_classpaths</emphasis> "
+"<literal>org.hibernate.tool.hbm2ddl.SchemaValidator</literal> "
+"<emphasis>options mapping_files</emphasis>"
+#. Tag: para
+#, no-c-format
+msgid ""
+"The following table displays the <literal>SchemaValidator</literal>
command "
+"line options:"
+msgstr "下表显示了 <literal>SchemaValidator</literal> 命令行参数:"
+
#. Tag: title
-#: toolset_guide.xml:520
#, no-c-format
msgid "<literal>SchemaValidator</literal> Command Line Options"
-msgstr "<literal>SchemaValidator</literal>命令行参数"
+msgstr "<literal>SchemaValidator</literal> 命令行参数"
#. Tag: para
-#: toolset_guide.xml:547
-#, fuzzy, no-c-format
+#, no-c-format
msgid "You can embed <literal>SchemaValidator</literal> in your
application:"
-msgstr "你可以在你的应用程序中嵌入<literal>SchemaValidator</literal>:"
+msgstr "你可以在你的应用程序中嵌入 <literal>SchemaValidator</literal>: "
-#. Tag: programlisting
-#: toolset_guide.xml:551
-#, no-c-format
-msgid ""
-"<![CDATA[Configuration cfg = ....;\n"
-"new SchemaValidator(cfg).validate();]]>"
-msgstr ""
-
#. Tag: title
-#: toolset_guide.xml:556
#, no-c-format
msgid "Using Ant for schema validation"
-msgstr "使用Ant进行schema校验"
+msgstr "使用 Ant 进行 schema 校验"
#. Tag: para
-#: toolset_guide.xml:558
#, no-c-format
msgid "You can call <literal>SchemaValidator</literal> from the Ant
script:"
-msgstr "你可以在Ant脚本中调用<literal>SchemaValidator</literal>:"
+msgstr "你可以在 Ant 脚本中调用 <literal>SchemaValidator</literal>:"
-#. Tag: programlisting
-#: toolset_guide.xml:562
-#, no-c-format
-msgid ""
-"<![CDATA[<target name=\"schemavalidate\">\n"
-" <taskdef name=\"schemavalidator\"\n"
-"
classname=\"org.hibernate.tool.hbm2ddl.SchemaValidatorTask\"\n"
-" classpathref=\"class.path\"/>\n"
-" \n"
-" <schemavalidator\n"
-" properties=\"hibernate.properties\">\n"
-" <fileset dir=\"src\">\n"
-" <include name=\"**/*.hbm.xml\"/>\n"
-" </fileset>\n"
-" </schemavalidator>\n"
-"</target>]]>"
-msgstr ""
+#, fuzzy
+#~ msgid "<![CDATA[<property name=\"zip\"
length=\"5\"/>]]>"
+#~ msgstr "<property name=\"zip\"
length=\"5\"/>"
-#~ msgid "Ant Tasks:"
-#~ msgstr "Ant Tasks:"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<property name=\"balance\" precision=\"12\"
scale=\"2\"/>]]>"
+#~ msgstr "<property name=\"balance\" precision=\"12\"
scale=\"2\"/>"
-#~ msgid "<one-to-one>"
-#~ msgstr "<one-to-one>"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"bar\" column=\"barId\"
not-null=\"true\"/>]]>"
+#~ msgstr ""
+#~ "<many-to-one name=\"bar\" column=\"barId\"
not-null=\"true\"/>"
-#~ msgid "<many-to-one>"
-#~ msgstr "<many-to-one>"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<element column=\"serialNumber\"
type=\"long\" not-null=\"true\" "
+#~ "unique=\"true\"/>]]>"
+#~ msgstr ""
+#~ "<element column=\"serialNumber\" type=\"long\"
not-null=\"true\" "
+#~ "unique=\"true\"/>"
-#~ msgid "<key>"
-#~ msgstr "<key>"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"org\" column=\"orgId\"
unique-key="
+#~ "\"OrgEmployeeId\"/>\n"
+#~ "<property name=\"employeeId\"
unique-key=\"OrgEmployee\"/>]]>"
+#~ msgstr ""
+#~ "<many-to-one name=\"org\" column=\"orgId\"
unique-key=\"OrgEmployeeId"
+#~ "\"/>\n"
+#~ "<property name=\"employeeId\"
unique-key=\"OrgEmployee\"/>"
-#~ msgid "<many-to-many>"
-#~ msgstr "<many-to-many>"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<property name=\"lastName\"
index=\"CustName\"/>\n"
+#~ "<property name=\"firstName\"
index=\"CustName\"/>]]>"
+#~ msgstr ""
+#~ "<property name=\"lastName\"
index=\"CustName\"/>\n"
+#~ "<property name=\"firstName\"
index=\"CustName\"/>"
-#~ msgid "inverse=\"true\""
-#~ msgstr "inverse=\"true\""
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<many-to-one name=\"bar\" column=\"barId\"
foreign-key=\"FKFooBar"
+#~ "\"/>]]>"
+#~ msgstr ""
+#~ "<many-to-one name=\"bar\" column=\"barId\"
foreign-key=\"FKFooBar\"/"
+#~ ">"
-#~ msgid "SchemaExport"
-#~ msgstr "SchemaExport"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<property name=\"name\"
type=\"my.customtypes.Name\"/>\n"
+#~ " <column name=\"last\" not-null=\"true\"
index=\"bar_idx\" length=\"30"
+#~ "\"/>\n"
+#~ " <column name=\"first\" not-null=\"true\"
index=\"bar_idx\" length=\"20"
+#~ "\"/>\n"
+#~ " <column name=\"initial\"/>\n"
+#~ "</property>]]>"
+#~ msgstr ""
+#~ "<property name=\"name\"
type=\"my.customtypes.Name\"/>\n"
+#~ " <column name=\"last\" not-null=\"true\"
index=\"bar_idx\" length="
+#~ "\"30\"/>\n"
+#~ " <column name=\"first\" not-null=\"true\"
index=\"bar_idx\" length="
+#~ "\"20\"/>\n"
+#~ " <column name=\"initial\"/>\n"
+#~ "</property>"
-#~ msgid "<column>"
-#~ msgstr "<column>"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<property name=\"credits\" type=\"integer\"
insert=\"false\">\n"
+#~ " <column name=\"credits\" default=\"10\"/>\n"
+#~ "</property>]]>"
+#~ msgstr ""
+#~ "<property name=\"credits\" type=\"integer\"
insert=\"false\">\n"
+#~ " <column name=\"credits\"
default=\"10\"/>\n"
+#~ "</property>"
-#~ msgid "java -cp"
-#~ msgstr "java -cp"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<version name=\"version\" type=\"integer\"
insert=\"false\">\n"
+#~ " <column name=\"version\" default=\"0\"/>\n"
+#~ "</property>]]>"
+#~ msgstr ""
+#~ "<version name=\"version\" type=\"integer\"
insert=\"false\">\n"
+#~ " <column name=\"version\"
default=\"0\"/>\n"
+#~ "</property>"
-#~ msgid "hibernate_classpaths"
-#~ msgstr "hibernate_classpaths"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<property name=\"balance\"
type=\"float\">\n"
+#~ " <column name=\"balance\"
sql-type=\"decimal(13,3)\"/>\n"
+#~ "</property>]]>"
+#~ msgstr ""
+#~ "<property name=\"balance\"
type=\"float\">\n"
+#~ " <column name=\"balance\"
sql-type=\"decimal(13,3)\"/>\n"
+#~ "</property>"
-#~ msgid "org.hibernate.tool.hbm2ddl.SchemaExport"
-#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaExport"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<property name=\"foo\"
type=\"integer\">\n"
+#~ " <column name=\"foo\" check=\"foo >
10\"/>\n"
+#~ "</property>]]>"
+#~ msgstr ""
+#~ "<property name=\"foo\"
type=\"integer\">\n"
+#~ " <column name=\"foo\" check=\"foo >
10\"/>\n"
+#~ "</property>"
-#~ msgid "options mapping_files"
-#~ msgstr "options mapping_files"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Foo\" table=\"foos\"
check=\"bar < 100.0\">\n"
+#~ " ...\n"
+#~ " <property name=\"bar\" type=\"float\"/>\n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<class name=\"Foo\" table=\"foos\" check=\"bar
< 100.0\">\n"
+#~ " ...\n"
+#~ " <property name=\"bar\"
type=\"float\"/>\n"
+#~ "</class>"
-#~ msgid "NamingStrategy"
-#~ msgstr "NamingStrategy"
+#~ msgid "length"
+#~ msgstr "length"
+#~ msgid "precision"
+#~ msgstr "precision"
+
+#~ msgid "scale"
+#~ msgstr "scale"
+
+#~ msgid "not-null"
+#~ msgstr "not-null"
+
+#~ msgid "true|false"
+#~ msgstr "true|false"
+
+#~ msgid "unique"
+#~ msgstr "unique"
+
+#~ msgid "index"
+#~ msgstr "index"
+
+#~ msgid "index_name"
+#~ msgstr "index_name"
+
+#~ msgid "unique-key"
+#~ msgstr "unique-key"
+
+#~ msgid "unique_key_name"
+#~ msgstr "unique_key_name"
+
+#~ msgid "foreign-key"
+#~ msgstr "foreign-key"
+
+#~ msgid "sql-type"
+#~ msgstr "sql-type"
+
+#~ msgid "default"
+#~ msgstr "default"
+
+#~ msgid "check"
+#~ msgstr "check"
+
#, fuzzy
-#~ msgid "select a <placeholder-1/>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Customer\"
table=\"CurCust\">\n"
+#~ " <comment>Current customers only</comment>\n"
+#~ " ...\n"
+#~ "</class>]]>"
#~ msgstr ""
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "选择一个命名策略(<placeholder-1/>)\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "选择一个命名策略 (<placeholder-1/>)\n"
-#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n"
-#~ "选择一个命名策略 (<placeholder-1/>)"
+#~ "<class name=\"Customer\"
table=\"CurCust\">\n"
+#~ " <comment>Current customers
only</comment>\n"
+#~ " ...\n"
+#~ "</class>"
-#~ msgid "org.hibernate.tool.hbm2ddl.SchemaUpdate"
-#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaUpdate"
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<property name=\"balance\">\n"
+#~ " <column name=\"bal\">\n"
+#~ " <comment>Balance in USD</comment>\n"
+#~ " </column>\n"
+#~ "</property>]]>"
+#~ msgstr ""
+#~ "<property name=\"balance\">\n"
+#~ " <column name=\"bal\">\n"
+#~ " <comment>Balance in USD</comment>\n"
+#~ " </column>\n"
+#~ "</property>"
-#~ msgid ".cfg.xml"
-#~ msgstr ".cfg.xml"
+#~ msgid "--quiet"
+#~ msgstr "--quiet"
-#~ msgid "org.hibernate.tool.hbm2ddl.SchemaValidator"
-#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaValidator"
+#~ msgid "--drop"
+#~ msgstr "--drop"
+
+#~ msgid "--create"
+#~ msgstr "--create"
+
+#~ msgid "--text"
+#~ msgstr "--text"
+
+#~ msgid "--properties=hibernate.properties"
+#~ msgstr "--properties=hibernate.properties"
+
+#~ msgid "--format"
+#~ msgstr "--format"
+
+#~ msgid "--delimiter=;"
+#~ msgstr "--delimiter=;"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[Configuration cfg = ....;\n"
+#~ "new SchemaExport(cfg).create(false, true);]]>"
+#~ msgstr ""
+#~ "Configuration cfg = ....;\n"
+#~ "new SchemaExport(cfg).create(false, true);"
+
+#~ msgid "hibernate.connection.url"
+#~ msgstr "hibernate.connection.url"
+
+#~ msgid "hibernate.connection.username"
+#~ msgstr "hibernate.connection.username"
+
+#~ msgid "hibernate.connection.password"
+#~ msgstr "hibernate.connection.password"
+
+#~ msgid "hibernate.dialect"
+#~ msgstr "hibernate.dialect"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<target name=\"schemaexport\">\n"
+#~ " <taskdef name=\"schemaexport\"\n"
+#~ "
classname=\"org.hibernate.tool.hbm2ddl.SchemaExportTask\"\n"
+#~ " classpathref=\"class.path\"/>\n"
+#~ " \n"
+#~ " <schemaexport\n"
+#~ " properties=\"hibernate.properties\"\n"
+#~ " quiet=\"no\"\n"
+#~ " text=\"no\"\n"
+#~ " drop=\"no\"\n"
+#~ " delimiter=\";\"\n"
+#~ " output=\"schema-export.sql\">\n"
+#~ " <fileset dir=\"src\">\n"
+#~ " <include name=\"**/*.hbm.xml\"/>\n"
+#~ " </fileset>\n"
+#~ " </schemaexport>\n"
+#~ "</target>]]>"
+#~ msgstr ""
+#~ "<target name=\"schemaexport\">\n"
+#~ " <taskdef name=\"schemaexport\"\n"
+#~ "
classname=\"org.hibernate.tool.hbm2ddl.SchemaExportTask\"\n"
+#~ " classpathref=\"class.path\"/>\n"
+#~ " \n"
+#~ " <schemaexport\n"
+#~ " properties=\"hibernate.properties\"\n"
+#~ " quiet=\"no\"\n"
+#~ " text=\"no\"\n"
+#~ " drop=\"no\"\n"
+#~ " delimiter=\";\"\n"
+#~ " output=\"schema-export.sql\">\n"
+#~ " <fileset dir=\"src\">\n"
+#~ " <include name=\"**/*.hbm.xml\"/>\n"
+#~ " </fileset>\n"
+#~ " </schemaexport>\n"
+#~ "</target>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[Configuration cfg = ....;\n"
+#~ "new SchemaUpdate(cfg).execute(false);]]>"
+#~ msgstr ""
+#~ "Configuration cfg = ....;\n"
+#~ "new SchemaUpdate(cfg).execute(false);"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<target name=\"schemaupdate\">\n"
+#~ " <taskdef name=\"schemaupdate\"\n"
+#~ "
classname=\"org.hibernate.tool.hbm2ddl.SchemaUpdateTask\"\n"
+#~ " classpathref=\"class.path\"/>\n"
+#~ " \n"
+#~ " <schemaupdate\n"
+#~ " properties=\"hibernate.properties\"\n"
+#~ " quiet=\"no\">\n"
+#~ " <fileset dir=\"src\">\n"
+#~ " <include name=\"**/*.hbm.xml\"/>\n"
+#~ " </fileset>\n"
+#~ " </schemaupdate>\n"
+#~ "</target>]]>"
+#~ msgstr ""
+#~ "<target name=\"schemaupdate\">\n"
+#~ " <taskdef name=\"schemaupdate\"\n"
+#~ "
classname=\"org.hibernate.tool.hbm2ddl.SchemaUpdateTask\"\n"
+#~ " classpathref=\"class.path\"/>\n"
+#~ " \n"
+#~ " <schemaupdate\n"
+#~ " properties=\"hibernate.properties\"\n"
+#~ " quiet=\"no\">\n"
+#~ " <fileset dir=\"src\">\n"
+#~ " <include name=\"**/*.hbm.xml\"/>\n"
+#~ " </fileset>\n"
+#~ " </schemaupdate>\n"
+#~ "</target>"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[Configuration cfg = ....;\n"
+#~ "new SchemaValidator(cfg).validate();]]>"
+#~ msgstr ""
+#~ "Configuration cfg = ....;\n"
+#~ "new SchemaValidator(cfg).validate();"
+
+#, fuzzy
+#~ msgid ""
+#~ "<![CDATA[<target name=\"schemavalidate\">\n"
+#~ " <taskdef name=\"schemavalidator\"\n"
+#~ "
classname=\"org.hibernate.tool.hbm2ddl.SchemaValidatorTask\"\n"
+#~ " classpathref=\"class.path\"/>\n"
+#~ " \n"
+#~ " <schemavalidator\n"
+#~ " properties=\"hibernate.properties\">\n"
+#~ " <fileset dir=\"src\">\n"
+#~ " <include name=\"**/*.hbm.xml\"/>\n"
+#~ " </fileset>\n"
+#~ " </schemavalidator>\n"
+#~ "</target>]]>"
+#~ msgstr ""
+#~ "<target name=\"schemavalidate\">\n"
+#~ " <taskdef name=\"schemavalidator\"\n"
+#~ "
classname=\"org.hibernate.tool.hbm2ddl.SchemaValidatorTask\"\n"
+#~ " classpathref=\"class.path\"/>\n"
+#~ " \n"
+#~ " <schemavalidator\n"
+#~ " properties=\"hibernate.properties\">\n"
+#~ " <fileset dir=\"src\">\n"
+#~ " <include name=\"**/*.hbm.xml\"/>\n"
+#~ " </fileset>\n"
+#~ " </schemaupdate>\n"
+#~ "</target>"
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/transactions.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/transactions.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/transactions.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,1945 +1,922 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2010-01-08T04:07:20\n"
+"PO-Revision-Date: 2010-01-11 10:41+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: transactions.xml:29
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Transactions and Concurrency"
-msgstr "事务和并发"
+msgstr "事务和并发 "
#. Tag: para
-#: transactions.xml:31
-#, fuzzy, no-c-format
-msgid ""
-"The most important point about Hibernate and concurrency control is that it "
-"is easy to understand. Hibernate directly uses JDBC connections and JTA "
-"resources without adding any additional locking behavior. It is recommended "
-"that you spend some time with the JDBC, ANSI, and transaction isolation "
-"specification of your database management system."
-msgstr ""
-"Hibernate的事务和并发控制很容易掌握。Hibernate直接使用JDBC连接和JTA资源,不添"
-"加任何附加锁定 行为。我们强烈推荐你花点时间了解JDBC编程,ANSI SQL查询语言和你"
-"使用 的数据库系统的事务隔离规范。"
+#, no-c-format
+msgid "The most important point about Hibernate and concurrency control is that it
is easy to understand. Hibernate directly uses JDBC connections and JTA resources without
adding any additional locking behavior. It is recommended that you spend some time with
the JDBC, ANSI, and transaction isolation specification of your database management
system."
+msgstr "Hibernate 的事务和并发控制很容易掌握。Hibernate 直接使用 JDBC 连接和 JTA
资源,不添加任何附加锁定行为。我们强烈推荐你花点时间了解 JDBC 编程,ANSI SQL 查询语言和你使用的数据库系统的事务隔离规范。 "
#. Tag: para
-#: transactions.xml:38
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate does not lock objects in memory. Your application can expect the "
-"behavior as defined by the isolation level of your database transactions. "
-"Through <literal>Session</literal>, which is also a transaction-scoped
"
-"cache, Hibernate provides repeatable reads for lookup by identifier and "
-"entity queries and not reporting queries that return scalar values."
-msgstr ""
-"Hibernate不锁定内存中的对象。你的应用程序会按照你的数据库事务的隔离级别规定的"
-"那样运作。幸亏有了<literal>Session</literal>,使得Hibernate通过标识符查找,和"
-"实体查询(不是返回标量值的报表查询)提供了可重复的读取(Repeatable reads)功"
-"能,<literal>Session</literal>同时也是事务范围内的缓存(cache)。"
+#, no-c-format
+msgid "Hibernate does not lock objects in memory. Your application can expect the
behavior as defined by the isolation level of your database transactions. Through
<literal>Session</literal>, which is also a transaction-scoped cache,
Hibernate provides repeatable reads for lookup by identifier and entity queries and not
reporting queries that return scalar values."
+msgstr "Hibernate 不锁定内存中的对象。你的应用程序会按照你的数据库事务的隔离级别规定的那样运作。幸亏有了
<literal>Session</literal>,使得 Hibernate
通过标识符查找,和实体查询(不是返回标量值的报表查询)提供了可重复的读取(Repeatable
reads)功能,<literal>Session</literal> 同时也是事务范围内的缓存(cache)。 "
#. Tag: para
-#: transactions.xml:46
-#, fuzzy, no-c-format
-msgid ""
-"In addition to versioning for automatic optimistic concurrency control, "
-"Hibernate also offers, using the <literal>SELECT FOR UPDATE</literal>
"
-"syntax, a (minor) API for pessimistic locking of rows. Optimistic "
-"concurrency control and this API are discussed later in this chapter."
-msgstr ""
-"除了对自动乐观并发控制提供版本管理,针对行级悲观锁定,Hibernate也提供了辅助的"
-"(较小的)API,它使用了 <literal>SELECT FOR UPDATE</literal>的SQL语法。本章后"
-"面会讨论乐观并发控制和这个API。"
+#, no-c-format
+msgid "In addition to versioning for automatic optimistic concurrency control,
Hibernate also offers, using the <literal>SELECT FOR UPDATE</literal> syntax,
a (minor) API for pessimistic locking of rows. Optimistic concurrency control and this API
are discussed later in this chapter."
+msgstr "除了对自动乐观并发控制提供版本管理,针对行级悲观锁定,Hibernate 也提供了辅助的(较小的)API,它使用了
<literal>SELECT FOR UPDATE</literal> 的 SQL 语法。本章后面会讨论乐观并发控制和这个API。 "
#. Tag: para
-#: transactions.xml:53
-#, fuzzy, no-c-format
-msgid ""
-"The discussion of concurrency control in Hibernate begins with the "
-"granularity of <literal>Configuration</literal>,
<literal>SessionFactory</"
-"literal>, and <literal>Session</literal>, as well as database
transactions "
-"and long conversations."
-msgstr ""
-"我们从<literal>Configuration</literal>层、<literal>SessionFactory</literal>"
-"层, 和 <literal>Session</literal>层开始讨论Hibernate的并行控制、数据库事务和"
-"应用 程序的长事务。"
+#, no-c-format
+msgid "The discussion of concurrency control in Hibernate begins with the
granularity of <literal>Configuration</literal>,
<literal>SessionFactory</literal>, and <literal>Session</literal>,
as well as database transactions and long conversations."
+msgstr "我们从
<literal>Configuration</literal>层、<literal>SessionFactory</literal>
层,和 <literal>Session</literal> 层开始讨论 Hibernate 的并行控制、数据库事务和应用程序的长事务。 "
#. Tag: title
-#: transactions.xml:60
#, no-c-format
msgid "Session and transaction scopes"
-msgstr "Session和事务范围(transaction scope)"
+msgstr "Session 和事务范围(transaction scope)"
#. Tag: para
-#: transactions.xml:62
-#, fuzzy, no-c-format
-msgid ""
-"A <literal>SessionFactory</literal> is an expensive-to-create,
threadsafe "
-"object, intended to be shared by all application threads. It is created "
-"once, usually on application startup, from a
<literal>Configuration</"
-"literal> instance."
-msgstr ""
-"<literal>SessionFactory</literal>对象的创建代价很昂贵,它是线程安全的对象,它"
-"为所有的应用程序线程所共享。它只创建一次,通常是在应用程序启动的时候,由一个"
-"<literal>Configuraion</literal>的实例来创建。"
+#, no-c-format
+msgid "A <literal>SessionFactory</literal> is an expensive-to-create,
threadsafe object, intended to be shared by all application threads. It is created once,
usually on application startup, from a <literal>Configuration</literal>
instance."
+msgstr "<literal>SessionFactory</literal>
对象的创建代价很昂贵,它是线程安全的对象,它为所有的应用程序线程所共享。它只创建一次,通常是在应用程序启动的时候,由一个
<literal>Configuraion</literal> 的实例来创建。 "
#. Tag: para
-#: transactions.xml:68
-#, fuzzy, no-c-format
-msgid ""
-"A <literal>Session</literal> is an inexpensive, non-threadsafe object
that "
-"should be used once and then discarded for: a single request, a conversation
"
-"or a single unit of work. A <literal>Session</literal> will not obtain
a "
-"JDBC <literal>Connection</literal>, or a
<literal>Datasource</literal>, "
-"unless it is needed. It will not consume any resources until used."
-msgstr ""
-"<literal>Session</literal>对象的创建代价比较小,是非线程安全的,对于单个请"
-"求,单个会话、单个的 工作单元而言,它只被使用一次,然后就丢弃。只有在需要的时"
-"候,一个<literal>Session</literal>对象 才会获取一个JDBC的"
-"<literal>Connection</literal>(或一个<literal>Datasource</literal>)
对象,因"
-"此假若不使用的时候它不消费任何资源。"
+#, no-c-format
+msgid "A <literal>Session</literal> is an inexpensive, non-threadsafe
object that should be used once and then discarded for: a single request, a conversation
or a single unit of work. A <literal>Session</literal> will not obtain a JDBC
<literal>Connection</literal>, or a <literal>Datasource</literal>,
unless it is needed. It will not consume any resources until used."
+msgstr "<literal>Session</literal> 对象的创建代价比较小,是非线程安全的,对于单个请求,单个会话、单个的
工作单元而言,它只被使用一次,然后就丢弃。只有在需要的时候,一个 <literal>Session</literal> 对象 才会获取一个 JDBC 的
<literal>Connection</literal>(或一个<literal>Datasource</literal>)对象,因此假若不使用的时候它不消费任何资源。
"
#. Tag: para
-#: transactions.xml:76
-#, fuzzy, no-c-format
-msgid ""
-"In order to reduce lock contention in the database, a database transaction "
-"has to be as short as possible. Long database transactions will prevent your
"
-"application from scaling to a highly concurrent load. It is not recommended "
-"that you hold a database transaction open during user think time until the "
-"unit of work is complete."
-msgstr ""
-"此外我们还要考虑数据库事务。数据库事务应该尽可能的短,降低数据库中的锁争用。 "
-"数据库长事务会阻止你的应用程序扩展到高的并发负载。因此,假若在用户思考期间让"
-"数据库事务开着,直到整个工作单元完成才关闭这个事务,这绝不是一个好的设计。"
+#, no-c-format
+msgid "In order to reduce lock contention in the database, a database transaction
has to be as short as possible. Long database transactions will prevent your application
from scaling to a highly concurrent load. It is not recommended that you hold a database
transaction open during user think time until the unit of work is complete."
+msgstr
"此外我们还要考虑数据库事务。数据库事务应该尽可能的短,降低数据库中的锁争用。数据库长事务会阻止你的应用程序扩展到高的并发负载。因此,假若在用户思考期间让数据库事务开着,直到整个工作单元完成才关闭这个事务,这绝不是一个好的设计。
"
#. Tag: para
-#: transactions.xml:84
-#, fuzzy, no-c-format
-msgid ""
-"What is the scope of a unit of work? Can a single Hibernate "
-"<literal>Session</literal> span several database transactions, or is
this a "
-"one-to-one relationship of scopes? When should you open and close a "
-"<literal>Session</literal> and how do you demarcate the database
transaction "
-"boundaries? These questions are addressed in the following sections."
-msgstr ""
-"一个操作单元(Unit of work)的范围是多大?单个的Hibernate <literal>Session</"
-"literal>能跨越多个 数据库事务吗?还是一个<literal>Session</literal>的作用范围"
-"对应一个数据库事务的范围?应该何时打开 <literal>Session</literal>,何时关闭"
-"<literal>Session</literal>?,你又如何划分数据库事务的边界呢?"
+#, no-c-format
+msgid "What is the scope of a unit of work? Can a single Hibernate
<literal>Session</literal> span several database transactions, or is this a
one-to-one relationship of scopes? When should you open and close a
<literal>Session</literal> and how do you demarcate the database transaction
boundaries? These questions are addressed in the following sections."
+msgstr "一个操作单元(Unit of work)的范围是多大?单个的 Hibernate
<literal>Session</literal> 能跨越多个数据库事务吗?还是一个
<literal>Session</literal> 的作用范围对应一个数据库事务的范围?应该何时打开
<literal>Session</literal>,何时关闭
<literal>Session</literal>,你又如何划分数据库事务的边界呢?我们将在后续章节解决这些问题。"
#. Tag: title
-#: transactions.xml:92
#, no-c-format
msgid "Unit of work"
-msgstr "操作单元(Unit of work)"
+msgstr "操作单元(Unit of work)"
#. Tag: para
-#: transactions.xml:94
#, no-c-format
-msgid ""
-"First, let's define a unit of work. A unit of work is a design pattern "
-"described by Martin Fowler as <quote> [maintaining] a list of objects "
-"affected by a business transaction and coordinates the writing out of "
-"changes and the resolution of concurrency problems.
</quote><citation>PoEAA</"
-"citation> In other words, its a series of operations we wish to carry out
"
-"against the database together. Basically, it is a transaction, though "
-"fulfilling a unit of work will often span multiple physical database "
-"transactions (see <xref linkend=\"transactions-basics-apptx\"/>).
So really "
-"we are talking about a more abstract notion of a transaction. The term "
-"\"business transaction\" is also sometimes used in lieu of unit of
work."
-msgstr ""
+msgid "First, let's define a unit of work. A unit of work is a design pattern
described by Martin Fowler as <quote> [maintaining] a list of objects affected by a
business transaction and coordinates the writing out of changes and the resolution of
concurrency problems. </quote><citation>PoEAA</citation> In other words,
its a series of operations we wish to carry out against the database together. Basically,
it is a transaction, though fulfilling a unit of work will often span multiple physical
database transactions (see <xref linkend=\"transactions-basics-apptx\"
/>). So really we are talking about a more abstract notion of a transaction. The term
\"business transaction\" is also sometimes used in lieu of unit of work."
+msgstr "首先,让我们定义一个工作单元(unit of work)。工作单元是一个设计模式,Martin Fowler 把它描述为 <quote>
[maintaining] a list of objects affected by a business transaction and coordinates the
writing out of changes and the resolution of concurrency problems.
</quote><citation>PoEAA</citation>
换句话说,它是我们希望对数据库执行的一系列操作。基本上,它是一个事务,虽然完成一个工作单元经常将跨越多个物理数据库事务(请参考 <xref
linkend=\"transactions-basics-apptx\"/>)。所以,实际上我们在讨论一个更抽象的事务概念。术语
\"business transaction\" 有时也和工作单元一起使用。 "
#. Tag: para
-#: transactions.xml:111
-#, fuzzy, no-c-format
-msgid ""
-"Do not use the <emphasis>session-per-operation</emphasis> antipattern:
do "
-"not open and close a <literal>Session</literal> for every simple
database "
-"call in a single thread. The same is true for database transactions. "
-"Database calls in an application are made using a planned sequence; they are
"
-"grouped into atomic units of work. This also means that auto-commit after "
-"every single SQL statement is useless in an application as this mode is "
-"intended for ad-hoc SQL console work. Hibernate disables, or expects the "
-"application server to disable, auto-commit mode immediately. Database "
-"transactions are never optional. All communication with a database has to "
-"occur inside a transaction. Auto-commit behavior for reading data should be "
-"avoided, as many small transactions are unlikely to perform better than one "
-"clearly defined unit of work. The latter is also more maintainable and "
-"extensible."
-msgstr ""
-"首先,别用<emphasis>session-per-operation</emphasis>这种反模式了,也就是说,"
-"在单个线程中, 不要因为一次简单的数据库调用,就打开和关闭一次"
-"<literal>Session</literal>!数据库事务也是如此。 应用程序中的数据库调用是按照"
-"计划好的次序,分组为原子的操作单元。(注意,这也意味着,应用程 序中,在单个的"
-"SQL语句发送之后,自动事务提交(auto-commit)模式失效了。这种模式专门为SQL控制台"
-"操作设计的。 Hibernate禁止立即自动事务提交模式,或者期望应用服务器禁止立即自"
-"动事务提交模式。)数据库事务绝不是可有可无的,任何与数据库之间的通讯都必须在"
-"某个事务中进行,不管你是在读还是在写数据。对读数据而言,应该避免auto-commit行"
-"为,因为很多小的事务比一个清晰定义的工作单元性能差。后者也更容易维护和扩展。"
+#, no-c-format
+msgid "Do not use the <emphasis>session-per-operation</emphasis>
antipattern: do not open and close a <literal>Session</literal> for every
simple database call in a single thread. The same is true for database transactions.
Database calls in an application are made using a planned sequence; they are grouped into
atomic units of work. This also means that auto-commit after every single SQL statement is
useless in an application as this mode is intended for ad-hoc SQL console work. Hibernate
disables, or expects the application server to disable, auto-commit mode immediately.
Database transactions are never optional. All communication with a database has to occur
inside a transaction. Auto-commit behavior for reading data should be avoided, as many
small transactions are unlikely to perform better than one clearly defined unit of work.
The latter is also more maintainable and extensible."
+msgstr "首先,别用 <emphasis>session-per-operation</emphasis>
这种反模式了,也就是说,在单个线程中, 不要因为一次简单的数据库调用,就打开和关闭一次
<literal>Session</literal>!数据库事务也是如此。
应用程序中的数据库调用是按照计划好的次序,分组为原子的操作单元。(注意,这也意味着,应用程 序中,在单个的 SQL
语句发送之后,自动事务提交(auto-commit)模式失效了。这种模式专门为SQL控制台操作设计的。 Hibernate
禁止立即自动事务提交模式,或者期望应用服务器禁止立即自动事务提交模式。)数据库事务绝不是可有可无的,任何与数据库之间的通讯都必须在某个事务中进行,不管你是在读还是在写数据。对读数据而言,应该避免
auto-commit 行为,因为很多小的事务比一个清晰定义的工作单元性能差。后者也更容易维护和扩展。 "
#. Tag: para
-#: transactions.xml:126
-#, fuzzy, no-c-format
-msgid ""
-"The most common pattern in a multi-user client/server application is "
-"<emphasis>session-per-request</emphasis>. In this model, a request from
the "
-"client is sent to the server, where the Hibernate persistence layer runs. A "
-"new Hibernate <literal>Session</literal> is opened, and all database
"
-"operations are executed in this unit of work. On completion of the work, and
"
-"once the response for the client has been prepared, the session is flushed "
-"and closed. Use a single database transaction to serve the clients request, "
-"starting and committing it when you open and close the
<literal>Session</"
-"literal>. The relationship between the two is one-to-one and this model is a
"
-"perfect fit for many applications."
-msgstr ""
-"在多用户的client/server应用程序中,最常用的模式是 <emphasis>每个请求一个会话"
-"(session-per-request)</emphasis>。 在这种模式下,来自客户端的请求被发送到服务"
-"器端(即Hibernate持久化层运行的地方),一 个新的Hibernate <literal>Session</"
-"literal>被打开,并且执行这个操作单元中所有的数据库操作。 一旦操作完成(同时对"
-"客户端的响应也准备就绪),session被同步,然后关闭。你也可以使用单 个数据库事"
-"务来处理客户端请求,在你打开<literal>Session</literal>之后启动事务,在你关闭 "
-"<literal>Session</literal>之前提交事务。会话和请求之间的关系是一对一的关系,"
-"这种模式对 于大多数应用程序来说是很棒的。"
+#, no-c-format
+msgid "The most common pattern in a multi-user client/server application is
<emphasis>session-per-request</emphasis>. In this model, a request from the
client is sent to the server, where the Hibernate persistence layer runs. A new Hibernate
<literal>Session</literal> is opened, and all database operations are executed
in this unit of work. On completion of the work, and once the response for the client has
been prepared, the session is flushed and closed. Use a single database transaction to
serve the clients request, starting and committing it when you open and close the
<literal>Session</literal>. The relationship between the two is one-to-one and
this model is a perfect fit for many applications."
+msgstr "在多用户的 client/server 应用程序中,最常用的模式是
<emphasis>每个请求一个会话(session-per-request)</emphasis>。 在这种模式下,来自客户端的请求被发送到服务器端(即
Hibernate 持久化层运行的地方),一个新的 Hibernate <literal>Session</literal>
被打开,并且执行这个操作单元中所有的数据库操作。一旦操作完成(同时对客户端的响应也准备就绪),session 被同步,然后关闭。你也可以使用单
个数据库事务来处理客户端请求,在你打开 <literal>Session</literal> 之后启动事务,在你关闭
<literal>Session</literal> 之前提交事务。会话和请求之间的关系是一对一的关系,这种模式对 于大多数应用程序来说是很棒的。
"
#. Tag: para
-#: transactions.xml:138
-#, fuzzy, no-c-format
-msgid ""
-"The challenge lies in the implementation. Hibernate provides built-in "
-"management of the \"current session\" to simplify this pattern. Start a
"
-"transaction when a server request has to be processed, and end the "
-"transaction before the response is sent to the client. Common solutions are "
-"<literal>ServletFilter</literal>, AOP interceptor with a pointcut on
the "
-"service methods, or a proxy/interception container. An EJB container is a "
-"standardized way to implement cross-cutting aspects such as transaction "
-"demarcation on EJB session beans, declaratively with CMT. If you use "
-"programmatic transaction demarcation, for ease of use and code portability "
-"use the Hibernate <literal>Transaction</literal> API shown later in
this "
-"chapter."
-msgstr ""
-"实现才是真正的挑战。Hibernate内置了对\"当前session(current session)\" 的管"
-"理,用于简化此模式。你要做的一切就是在服务器端要处理请求的时候,开启事务,在"
-"响应发送给客户之前结束事务。你可以用任何方式来完成这一操作,通常的方案有"
-"<literal>ServletFilter</literal>,在service方法中进行pointcut的AOP拦截器,或"
-"者proxy/interception容器。EJB容器是实现横切诸如EJB session bean上的事务分界,"
-"用CMT对事务进行声明等方面的标准手段。假若你决定使用编程式的事务分界,请参考本"
-"章后面讲到的Hibernate <literal>Transaction</literal> API,这对易用性和代码可"
-"移植性都有好处。"
+#, no-c-format
+msgid "The challenge lies in the implementation. Hibernate provides built-in
management of the \"current session\" to simplify this pattern. Start a
transaction when a server request has to be processed, and end the transaction before the
response is sent to the client. Common solutions are
<literal>ServletFilter</literal>, AOP interceptor with a pointcut on the
service methods, or a proxy/interception container. An EJB container is a standardized way
to implement cross-cutting aspects such as transaction demarcation on EJB session beans,
declaratively with CMT. If you use programmatic transaction demarcation, for ease of use
and code portability use the Hibernate <literal>Transaction</literal> API
shown later in this chapter."
+msgstr "实现才是真正的挑战。Hibernate 内置了对\"当前 session(current session)\"
的管理,用于简化此模式。你要做的一切就是在服务器端要处理请求的时候,开启事务,在响应发送给客户之前结束事务。你可以用任何方式来完成这一操作,通常的方案有
<literal>ServletFilter</literal>,在 service 方法中进行 pointcut 的 AOP 拦截器,或者
proxy/interception 容器。EJB 容器是实现横切诸如 EJB session bean 上的事务分界,用 CMT
对事务进行声明等方面的标准手段。假若你决定使用编程式的事务分界,请参考本章后面讲到的 Hibernate
<literal>Transaction</literal> API,这对易用性和代码可移植性都有好处。 "
#. Tag: para
-#: transactions.xml:150
-#, fuzzy, no-c-format
-msgid ""
-"Your application code can access a \"current session\" to process the
"
-"request by calling
<literal>sessionFactory.getCurrentSession()</literal>. "
-"You will always get a <literal>Session</literal> scoped to the current
"
-"database transaction. This has to be configured for either resource-local or
"
-"JTA environments, see <xref
linkend=\"architecture-current-session\"/>."
-msgstr ""
-"在任何时间,任何地方,你的应用代码可以通过简单的调用<literal>sessionFactory."
-"getCurrentSession()</literal>来访问\"当前session\",用于处理请求。你总是会得"
-"到当前数据库事务范围内的<literal>Session</literal>。在使用本地资源或JTA环境"
-"时,必须配置它,请参见<xref linkend=\"architecture-current-session\"/>。"
+#, no-c-format
+msgid "Your application code can access a \"current session\" to process
the request by calling <literal>sessionFactory.getCurrentSession()</literal>.
You will always get a <literal>Session</literal> scoped to the current
database transaction. This has to be configured for either resource-local or JTA
environments, see <xref linkend=\"architecture-current-session\"
/>."
+msgstr
"在任何时间,任何地方,你的应用代码可以通过简单的调用<literal>sessionFactory.getCurrentSession()</literal>
来访问\"当前 session\",用于处理请求。你总是会得到当前数据库事务范围内的
<literal>Session</literal>。在使用本地资源或 JTA 环境时,必须配置它,请参见 <xref
linkend=\"architecture-current-session\"/>。 "
#. Tag: para
-#: transactions.xml:158
-#, fuzzy, no-c-format
-msgid ""
-"You can extend the scope of a <literal>Session</literal> and database
"
-"transaction until the \"view has been rendered\". This is especially
useful "
-"in servlet applications that utilize a separate rendering phase after the "
-"request has been processed. Extending the database transaction until view "
-"rendering, is achieved by implementing your own interceptor. However, this "
-"will be difficult if you rely on EJBs with container-managed transactions. A
"
-"transaction will be completed when an EJB method returns, before rendering "
-"of any view can start. See the Hibernate website and forum for tips and "
-"examples relating to this <emphasis>Open Session in View</emphasis>
pattern."
-msgstr ""
-"有时,将<literal>Session</literal>和数据库事务的边界延伸到\"展示层被渲染后"
-"\"会带来便利。有些serlvet应用程序在对请求进行处理后,有个单独的渲染期,这种延"
-"伸对这种程序特别有用。假若你实现你自己的拦截器,把事务边界延伸到展示层渲染结"
-"束后非常容易。然而,假若你依赖有容器管理事务的EJB,这就不太容易了,因为事务会"
-"在EJB方法返回后结束,而那是在任何展示层渲染开始之前。请访问Hibernate网站和论"
-"坛,你可以找到<emphasis>Open Session in View</emphasis>这一模式的提示和示例。"
+#, no-c-format
+msgid "You can extend the scope of a <literal>Session</literal> and
database transaction until the \"view has been rendered\". This is especially
useful in servlet applications that utilize a separate rendering phase after the request
has been processed. Extending the database transaction until view rendering, is achieved
by implementing your own interceptor. However, this will be difficult if you rely on EJBs
with container-managed transactions. A transaction will be completed when an EJB method
returns, before rendering of any view can start. See the Hibernate website and forum for
tips and examples relating to this <emphasis>Open Session in View</emphasis>
pattern."
+msgstr "有时,将 <literal>Session</literal>
和数据库事务的边界延伸到\"展示层被渲染后\"会带来便利。有些 serlvet
应用程序在对请求进行处理后,有个单独的渲染期,这种延伸对这种程序特别有用。假若你实现你自己的拦截器,把事务边界延伸到展示层渲染结束后非常容易。然而,假若你依赖有容器管理事务的
EJB,这就不太容易了,因为事务会在 EJB 方法返回后结束,而那是在任何展示层渲染开始之前。请访问 Hibernate 网站和论坛,你可以找到
<emphasis>Open Session in View</emphasis> 这一模式的提示和示例。 "
#. Tag: title
-#: transactions.xml:173
#, no-c-format
msgid "Long conversations"
msgstr "长对话"
#. Tag: para
-#: transactions.xml:175
-#, fuzzy, no-c-format
-msgid ""
-"The session-per-request pattern is not the only way of designing units of "
-"work. Many business processes require a whole series of interactions with "
-"the user that are interleaved with database accesses. In web and enterprise "
-"applications, it is not acceptable for a database transaction to span a user
"
-"interaction. Consider the following example:"
-msgstr ""
-"session-per-request模式不仅仅是一个可以用来设计操作单元的有用概念。很多业务处"
-"理都需 要一系列完整的与用户之间的交互,而这些用户是指对数据库有交叉访问的用"
-"户。在基于web的应用和企业 应用中,跨用户交互的数据库事务是无法接受的。考虑下"
-"面的例子:"
+#, no-c-format
+msgid "The session-per-request pattern is not the only way of designing units of
work. Many business processes require a whole series of interactions with the user that
are interleaved with database accesses. In web and enterprise applications, it is not
acceptable for a database transaction to span a user interaction. Consider the following
example:"
+msgstr "session-per-request 模式不仅仅是一个可以用来设计操作单元的有用概念。很多业务处理都需
要一系列完整的与用户之间的交互,而这些用户是指对数据库有交叉访问的用户。在基于 web 的应用和企业应用中,跨用户交互的数据库事务是无法接受的。考虑下面的例子: "
#. Tag: para
-#: transactions.xml:185
-#, fuzzy, no-c-format
-msgid ""
-"The first screen of a dialog opens. The data seen by the user has been "
-"loaded in a particular <literal>Session</literal> and database
transaction. "
-"The user is free to modify the objects."
-msgstr ""
-"在界面的第一屏,打开对话框,用户所看到的数据是被一个特定的 <literal>Session</"
-"literal> 和数据 库事务载入(load)的。用户可以随意修改对话框中的数据对象。"
+#, no-c-format
+msgid "The first screen of a dialog opens. The data seen by the user has been loaded
in a particular <literal>Session</literal> and database transaction. The user
is free to modify the objects."
+msgstr "在界面的第一屏,打开对话框,用户所看到的数据是被一个特定的 <literal>Session</literal> 和数据
库事务载入(load)的。用户可以随意修改对话框中的数据对象。 "
#. Tag: para
-#: transactions.xml:192
-#, fuzzy, no-c-format
-msgid ""
-"The user clicks \"Save\" after 5 minutes and expects their modifications
to "
-"be made persistent. The user also expects that they were the only person "
-"editing this information and that no conflicting modification has occurred."
-msgstr ""
-"5分钟后,用户点击“保存”,期望所做出的修改被持久化;同时他也期望自己是唯一修改"
-"这个信息的人,不会出现 修改冲突。"
+#, no-c-format
+msgid "The user clicks \"Save\" after 5 minutes and expects their
modifications to be made persistent. The user also expects that they were the only person
editing this information and that no conflicting modification has occurred."
+msgstr "5 分钟后,用户点击“保存”,期望所做出的修改被持久化;同时他也期望自己是唯一修改这个信息的人,不会出现修改冲突。 "
#. Tag: para
-#: transactions.xml:200
-#, fuzzy, no-c-format
-msgid ""
-"From the point of view of the user, we call this unit of work a long-running
"
-"<emphasis>conversation</emphasis> or <emphasis>application
transaction</"
-"emphasis>. There are many ways to implement this in your application."
-msgstr ""
-"从用户的角度来看,我们把这个操作单元称为长时间运行的<emphasis>对话</emphasis>"
-"(conversation),或者(or <emphasis>应用事务</emphasis>,application "
-"transaction)。 在你的应用程序中,可以有很多种方法来实现它。"
+#, no-c-format
+msgid "From the point of view of the user, we call this unit of work a long-running
<emphasis>conversation</emphasis> or <emphasis>application
transaction</emphasis>. There are many ways to implement this in your
application."
+msgstr
"从用户的角度来看,我们把这个操作单元称为长时间运行的<emphasis>对话</emphasis>(conversation),或者<emphasis>应用事务</emphasis>(application
transaction)。在你的应用程序中,可以有很多种方法来实现它。"
#. Tag: para
-#: transactions.xml:206
-#, fuzzy, no-c-format
-msgid ""
-"A first naive implementation might keep the <literal>Session</literal>
and "
-"database transaction open during user think time, with locks held in the "
-"database to prevent concurrent modification and to guarantee isolation and "
-"atomicity. This is an anti-pattern, since lock contention would not allow "
-"the application to scale with the number of concurrent users."
-msgstr ""
-"头一个幼稚的做法是,在用户思考的过程中,保持<literal>Session</literal>和数据"
-"库事务是打开的, 保持数据库锁定,以阻止并发修改,从而保证数据库事务隔离级别和"
-"原子操作。这种方式当然是一个反模式, 因为锁争用会导致应用程序无法扩展并发用户"
-"的数目。"
+#, no-c-format
+msgid "A first naive implementation might keep the
<literal>Session</literal> and database transaction open during user think
time, with locks held in the database to prevent concurrent modification and to guarantee
isolation and atomicity. This is an anti-pattern, since lock contention would not allow
the application to scale with the number of concurrent users."
+msgstr "头一个幼稚的做法是,在用户思考的过程中,保持 <literal>Session</literal>
和数据库事务是打开的,保持数据库锁定,以阻止并发修改,从而保证数据库事务隔离级别和原子操作。这种方式当然是一个反模式,因为锁争用会导致应用程序无法扩展并发用户的数目。
"
#. Tag: para
-#: transactions.xml:214
-#, fuzzy, no-c-format
-msgid ""
-"You have to use several database transactions to implement the conversation.
"
-"In this case, maintaining isolation of business processes becomes the "
-"partial responsibility of the application tier. A single conversation "
-"usually spans several database transactions. It will be atomic if only one "
-"of these database transactions (the last one) stores the updated data. All "
-"others simply read data (for example, in a wizard-style dialog spanning "
-"several request/response cycles). This is easier to implement than it might "
-"sound, especially if you utilize some of Hibernate's features:"
-msgstr ""
-"很明显,我们必须使用多个数据库事务来实现这个对话。在这个例子中,维护业务处理"
-"的 事务隔离变成了应用程序层的部分责任。一个对话通常跨越多个数据库事务。如果仅"
-"仅只有一 个数据库事务(最后的那个事务)保存更新过的数据,而所有其他事务只是单"
-"纯的读取数据(例如在一 个跨越多个请求/响应周期的向导风格的对话框中),那么应"
-"用程序事务将保证其原子性。这种方式比听 起来还要容易实现,特别是当你使用了"
-"Hibernate的下述特性的时候:"
+#, no-c-format
+msgid "You have to use several database transactions to implement the conversation.
In this case, maintaining isolation of business processes becomes the partial
responsibility of the application tier. A single conversation usually spans several
database transactions. It will be atomic if only one of these database transactions (the
last one) stores the updated data. All others simply read data (for example, in a
wizard-style dialog spanning several request/response cycles). This is easier to implement
than it might sound, especially if you utilize some of Hibernate's features:"
+msgstr "很明显,我们必须使用多个数据库事务来实现这个对话。在这个例子中,维护业务处理的
事务隔离变成了应用程序层的部分责任。一个对话通常跨越多个数据库事务。如果仅仅只有一个数据库事务(最后的那个事务)保存更新过的数据,而所有其他事务只是单纯的读取数据(例如在一个跨越多个请求/响应周期的向导风格的对话框中),那么应用程序事务将保证其原子性。这种方式比听起来还要容易实现,特别是当你使用了
Hibernate 的下述特性的时候: "
#. Tag: para
-#: transactions.xml:227
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Automatic Versioning</emphasis>: Hibernate can perform
automatic "
-"optimistic concurrency control for you. It can automatically detect if a "
-"concurrent modification occurred during user think time. Check for this at "
-"the end of the conversation."
-msgstr ""
-"<emphasis>自动版本化</emphasis> - Hibernate能够自动进行乐观并发控制 ,如果在"
-"用户思考 的过程中发生并发修改,Hibernate能够自动检测到。一般我们只在对话结束"
-"时才检查。"
+#, no-c-format
+msgid "<emphasis>Automatic Versioning</emphasis>: Hibernate can perform
automatic optimistic concurrency control for you. It can automatically detect if a
concurrent modification occurred during user think time. Check for this at the end of the
conversation."
+msgstr "<emphasis>自动版本化</emphasis>:Hibernate
能够自动进行乐观并发控制,如果在用户思考的过程中发生并发修改,Hibernate 能够自动检测到。一般我们只在对话结束时才检查。"
#. Tag: para
-#: transactions.xml:235
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Detached Objects</emphasis>: if you decide to use the "
-"<emphasis>session-per-request</emphasis> pattern, all loaded instances
will "
-"be in the detached state during user think time. Hibernate allows you to "
-"reattach the objects and persist the modifications. The pattern is called "
-"<emphasis>session-per-request-with-detached-objects</emphasis>.
Automatic "
-"versioning is used to isolate concurrent modifications."
-msgstr ""
-"<emphasis>脱管对象</emphasis>(Detached Objects)- 如果你决定采用前面已经讨论"
-"过的 <emphasis>session-per-request</emphasis>模式,所有载入的实例在用户思考的"
-"过程 中都处于与Session脱离的状态。Hibernate允许你把与Session脱离的对象重新关"
-"联到Session 上,并且对修改进行持久化,这种模式被称为 <emphasis>session-per-"
-"request-with-detached-objects</emphasis>。自动版本化被用来隔离并发修改。"
+#, no-c-format
+msgid "<emphasis>Detached Objects</emphasis>: if you decide to use the
<emphasis>session-per-request</emphasis> pattern, all loaded instances will be
in the detached state during user think time. Hibernate allows you to reattach the objects
and persist the modifications. The pattern is called
<emphasis>session-per-request-with-detached-objects</emphasis>. Automatic
versioning is used to isolate concurrent modifications."
+msgstr "<emphasis>脱管对象</emphasis>(Detached Objects):如果你决定采用前面已经讨论过的
<emphasis>session-per-request</emphasis> 模式,所有载入的实例在用户思考的过程中都处于与 Session
脱离的状态。Hibernate 允许你把与 Session 脱离的对象重新关联到 Session 上,并且对修改进行持久化,这种模式被称为
<emphasis>session-per-request-with-detached-objects</emphasis>。自动版本化被用来隔离并发修改。"
#. Tag: para
-#: transactions.xml:245
-#, fuzzy, no-c-format
-msgid ""
-"<emphasis>Extended (or Long) Session</emphasis>: the Hibernate "
-"<literal>Session</literal> can be disconnected from the underlying JDBC
"
-"connection after the database transaction has been committed and reconnected
"
-"when a new client request occurs. This pattern is known as
<emphasis>session-"
-"per-conversation</emphasis> and makes even reattachment unnecessary. "
-"Automatic versioning is used to isolate concurrent modifications and the "
-"<literal>Session</literal> will not be allowed to be flushed
automatically, "
-"but explicitly."
-msgstr ""
-"<emphasis>Extended (or Long) Session</emphasis> - Hibernate 的"
-"<literal>Session</literal> 可以在数据库事务提交之后和底层的JDBC连接断开,当一"
-"个新的客户端请求到来的时候,它又重新连接上底层的 JDBC连接。这种模式被称之为"
-"<emphasis>session-per-conversation</emphasis>,这种情况可 能会造成不必要的"
-"Session和JDBC连接的重新关联。自动版本化被用来隔离并发修改, <literal>Session</"
-"literal>通常不允许自动flush,而是明确flush。"
+#, no-c-format
+msgid "<emphasis>Extended (or Long) Session</emphasis>: the Hibernate
<literal>Session</literal> can be disconnected from the underlying JDBC
connection after the database transaction has been committed and reconnected when a new
client request occurs. This pattern is known as
<emphasis>session-per-conversation</emphasis> and makes even reattachment
unnecessary. Automatic versioning is used to isolate concurrent modifications and the
<literal>Session</literal> will not be allowed to be flushed automatically,
but explicitly."
+msgstr "<emphasis>Extended (or Long) Session</emphasis>:Hibernate 的
<literal>Session</literal> 可以在数据库事务提交之后和底层的 JDBC
连接断开,当一个新的客户端请求到来的时候,它又重新连接上底层的 JDBC
连接。这种模式被称之为<emphasis>session-per-conversation</emphasis>,这种情况可 能会造成不必要的
Session 和 JDBC 连接的重新关联。自动版本化被用来隔离并发修改,<literal>Session</literal> 通常不允许自动
flush,而是显性地 flush。 "
#. Tag: para
-#: transactions.xml:258
-#, fuzzy, no-c-format
-msgid ""
-"Both <emphasis>session-per-request-with-detached-objects</emphasis> and
"
-"<emphasis>session-per-conversation</emphasis> have advantages and
"
-"disadvantages. These disadvantages are discussed later in this chapter in "
-"the context of optimistic concurrency control."
-msgstr ""
-"<emphasis>session-per-request-with-detached-objects</emphasis> 和
"
-"<emphasis>session-per-conversation</emphasis> 各有优缺点,我们在本章后面乐观"
-"并发 控制那部分再进行讨论。"
+#, no-c-format
+msgid "Both
<emphasis>session-per-request-with-detached-objects</emphasis> and
<emphasis>session-per-conversation</emphasis> have advantages and
disadvantages. These disadvantages are discussed later in this chapter in the context of
optimistic concurrency control."
+msgstr "<emphasis>session-per-request-with-detached-objects</emphasis> 和
<emphasis>session-per-conversation</emphasis> 各有优缺点,我们在本章后面乐观并发控制那部分再进行讨论。
"
#. Tag: title
-#: transactions.xml:267
#, no-c-format
msgid "Considering object identity"
-msgstr "关注对象标识(Considering object identity)"
+msgstr "关注对象标识(Considering object identity)"
#. Tag: para
-#: transactions.xml:269
-#, fuzzy, no-c-format
-msgid ""
-"An application can concurrently access the same persistent state in two "
-"different <literal>Session</literal>s. However, an instance of a
persistent "
-"class is never shared between two <literal>Session</literal> instances.
It "
-"is for this reason that there are two different notions of identity:"
-msgstr ""
-"应用程序可能在两个不同的<literal>Session</literal>中并发访问同一持久化状态,"
-"但是, 一个持久化类的实例无法在两个 <literal>Session</literal>中共享。因此有"
-"两种不同的标识语义:"
+#, no-c-format
+msgid "An application can concurrently access the same persistent state in two
different <literal>Session</literal>s. However, an instance of a persistent
class is never shared between two <literal>Session</literal> instances. It is
for this reason that there are two different notions of identity:"
+msgstr "应用程序可能在两个不同的 <literal>Session</literal>
中并发访问同一持久化状态,但是,一个持久化类的实例无法在两个 <literal>Session</literal> 中共享。因此有两种不同的标识语义:
"
#. Tag: term
-#: transactions.xml:278
#, no-c-format
msgid "Database Identity"
msgstr "数据库标识"
-#. Tag: literal
-#: transactions.xml:281
+#. Tag: para
#, no-c-format
-msgid "foo.getId().equals( bar.getId() )"
-msgstr "foo.getId().equals( bar.getId() )"
+msgid "<literal>foo.getId().equals( bar.getId() )</literal>"
+msgstr "<literal>foo.getId().equals( bar.getId() )</literal>"
#. Tag: term
-#: transactions.xml:286
#, no-c-format
msgid "JVM Identity"
msgstr "JVM 标识"
-#. Tag: literal
-#: transactions.xml:289
+#. Tag: para
#, no-c-format
-msgid "foo==bar"
-msgstr "foo==bar"
+msgid "<literal>foo==bar</literal>"
+msgstr "<literal>foo==bar</literal>"
#. Tag: para
-#: transactions.xml:295
-#, fuzzy, no-c-format
-msgid ""
-"For objects attached to a <emphasis>particular</emphasis>
<literal>Session</"
-"literal> (i.e., in the scope of a <literal>Session</literal>), the
two "
-"notions are equivalent and JVM identity for database identity is guaranteed "
-"by Hibernate. While the application might concurrently access the
\"same"
-"\" (persistent identity) business object in two different sessions, the two
"
-"instances will actually be \"different\" (JVM identity). Conflicts are
"
-"resolved using an optimistic approach and automatic versioning at flush/"
-"commit time."
-msgstr ""
-"对于那些关联到 <emphasis>特定</emphasis><literal>Session</literal>
(也就是在"
-"单个<literal>Session</literal>的范围内)上的对象来说,这 两种标识的语义是等价"
-"的,与数据库标识对应的JVM标识是由Hibernate来保 证的。不过,当应用程序在两个不"
-"同的session中并发访问具有同一持久化标 识的业务对象实例的时候,这个业务对象的"
-"两个实例事实上是不相同的(从 JVM识别来看)。这种冲突可以通过在同步和提交的时"
-"候使用自动版本化和乐 观锁定方法来解决。"
+#, no-c-format
+msgid "For objects attached to a <emphasis>particular</emphasis>
<literal>Session</literal> (i.e., in the scope of a
<literal>Session</literal>), the two notions are equivalent and JVM identity
for database identity is guaranteed by Hibernate. While the application might concurrently
access the \"same\" (persistent identity) business object in two different
sessions, the two instances will actually be \"different\" (JVM identity).
Conflicts are resolved using an optimistic approach and automatic versioning at
flush/commit time."
+msgstr "对于那些关联到 <emphasis>特定</emphasis>
<literal>Session</literal>(也就是在单个 <literal>Session</literal>
的范围内)上的对象来说,这两种标识的语义是等价的,与数据库标识对应的 JVM 标识是由 Hibernate 来保证的。不过,当应用程序在两个不同的 session
中并发访问具有同一持久化标识的业务对象实例的时候,这个业务对象的两个实例事实上是不相同的(从 JVM
识别来看)。这种冲突可以通过在同步和提交的时候使用自动版本化和乐观锁定方法来解决。 "
#. Tag: para
-#: transactions.xml:304
-#, fuzzy, no-c-format
-msgid ""
-"This approach leaves Hibernate and the database to worry about concurrency. "
-"It also provides the best scalability, since guaranteeing identity in
single-"
-"threaded units of work means that it does not need expensive locking or "
-"other means of synchronization. The application does not need to synchronize
"
-"on any business object, as long as it maintains a single thread per "
-"<literal>Session</literal>. Within a
<literal>Session</literal> the "
-"application can safely use <literal>==</literal> to compare
objects."
-msgstr ""
-"这种方式把关于并发的头疼问题留给了Hibernate和数据库;由于在单个线程内,操作单"
-"元中的对象识别不 需要代价昂贵的锁定或其他意义上的同步,因此它同时可以提供最好"
-"的可伸缩性。只要在单个线程只持有一个 <literal>Session</literal>,应用程序就不"
-"需要同步任何业务对象。在<literal>Session</literal> 的范围内,应用程序可以放心"
-"的使用<literal>==</literal>进行对象比较。"
+#, no-c-format
+msgid "This approach leaves Hibernate and the database to worry about concurrency.
It also provides the best scalability, since guaranteeing identity in single-threaded
units of work means that it does not need expensive locking or other means of
synchronization. The application does not need to synchronize on any business object, as
long as it maintains a single thread per <literal>Session</literal>. Within a
<literal>Session</literal> the application can safely use
<literal>==</literal> to compare objects."
+msgstr "这种方式把关于并发的头疼问题留给了 Hibernate 和数据库;由于在单个线程内,操作单元中的对象识别不
需要代价昂贵的锁定或其他意义上的同步,因此它同时可以提供最好的可伸缩性。只要在单个线程只持有一个
<literal>Session</literal>,应用程序就不需要同步任何业务对象。在
<literal>Session</literal> 的范围内,应用程序可以放心的使用 <literal>==</literal>
进行对象比较。 "
#. Tag: para
-#: transactions.xml:313
-#, fuzzy, no-c-format
-msgid ""
-"However, an application that uses <literal>==</literal> outside of a
"
-"<literal>Session</literal> might produce unexpected results. This might
"
-"occur even in some unexpected places. For example, if you put two detached "
-"instances into the same <literal>Set</literal>, both might have the
same "
-"database identity (i.e., they represent the same row). JVM identity, "
-"however, is by definition not guaranteed for instances in a detached state. "
-"The developer has to override the <literal>equals()</literal> and
"
-"<literal>hashCode()</literal> methods in persistent classes and
implement "
-"their own notion of object equality. There is one caveat: never use the "
-"database identifier to implement equality. Use a business key that is a "
-"combination of unique, usually immutable, attributes. The database "
-"identifier will change if a transient object is made persistent. If the "
-"transient instance (usually together with detached instances) is held in a "
-"<literal>Set</literal>, changing the hashcode breaks the contract of
the "
-"<literal>Set</literal>. Attributes for business keys do not have to be
as "
-"stable as database primary keys; you only have to guarantee stability as "
-"long as the objects are in the same <literal>Set</literal>. See the
"
-"Hibernate website for a more thorough discussion of this issue. Please note "
-"that this is not a Hibernate issue, but simply how Java object identity and "
-"equality has to be implemented."
-msgstr ""
-"不过,应用程序在<literal>Session</literal>的外面使用<literal>==</literal>进行"
-"对象比较可能会 导致无法预期的结果。在一些无法预料的场合,例如,如果你把两个脱"
-"管对象实例放进同一个 <literal>Set</literal>的时候,就可能发生。这两个对象实例"
-"可能有同一个数据库标识(也就是说, 他们代表了表的同一行数据),从JVM标识的定"
-"义上来说,对脱管的对象而言,Hibernate无法保证他们 的的JVM标识一致。开发人员必"
-"须覆盖持久化类的<literal>equals()</literal>方法和
<literal>hashCode()</"
-"literal> 方法,从而实现自定义的对象相等语义。警告:不要使用数据库标识 来实现"
-"对象相等,应该使用业务键值,由唯一的,通常不变的属性组成。当一个瞬时对象被持"
-"久化的时 候,它的数据库标识会发生改变。如果一个瞬时对象(通常也包括脱管对象实"
-"例)被放入一 个<literal>Set</literal>,改变它的hashcode会导致与这个"
-"<literal>Set</literal>的关系中断。虽 然业务键值的属性不象数据库主键那样稳定不"
-"变,但是你只需要保证在同一个<literal>Set</literal> 中的对象属性的稳定性就足够"
-"了。请到Hibernate网站去寻求这个问题更多的详细的讨论。请注意,这不是一 个有关"
-"Hibernate的问题,而仅仅是一个关于Java对象标识和判等行为如何实现的问题。"
+#, no-c-format
+msgid "However, an application that uses <literal>==</literal> outside
of a <literal>Session</literal> might produce unexpected results. This might
occur even in some unexpected places. For example, if you put two detached instances into
the same <literal>Set</literal>, both might have the same database identity
(i.e., they represent the same row). JVM identity, however, is by definition not
guaranteed for instances in a detached state. The developer has to override the
<literal>equals()</literal> and <literal>hashCode()</literal>
methods in persistent classes and implement their own notion of object equality. There is
one caveat: never use the database identifier to implement equality. Use a business key
that is a combination of unique, usually immutable, attributes. The database identifier
will change if a transient object is made persistent. If the transient instance (usually
together with detached instances) is held in a <literal>Set</literal>,
changing the hashcode bre!
aks the contract of the <literal>Set</literal>. Attributes for business keys
do not have to be as stable as database primary keys; you only have to guarantee stability
as long as the objects are in the same <literal>Set</literal>. See the
Hibernate website for a more thorough discussion of this issue. Please note that this is
not a Hibernate issue, but simply how Java object identity and equality has to be
implemented."
+msgstr "不过,应用程序在 <literal>Session</literal> 的外面使用
<literal>==</literal> 进行对象比较可能会 导致无法预期的结果。在一些无法预料的场合,例如,如果你把两个脱管对象实例放进同一个
<literal>Set</literal> 的时候,就可能发生。这两个对象实例可能有同一个数据库标识(也就是说, 他们代表了表的同一行数据),从 JVM
标识的定义上来说,对脱管的对象而言,Hibernate 无法保证他们 的的 JVM 标识一致。开发人员必须覆盖持久化类的
<literal>equals()</literal> 方法和 <literal>hashCode()</literal>
方法,从而实现自定义的对象相等语义。警告:不要使用数据库标识来实现对象相等,应该使用业务键值,由唯一的,通常不变的属性组成。当一个瞬时对象被持久化的时候,它的数据库标识会发生改变。如果一个瞬时对象(通常也包括脱管对象实例)被放入�!
��个 <literal>Set</literal>,改变它的 hashcode 会导致与这个
<literal>Set</literal> 的关系中断。虽 然业务键值的属性不象数据库主键那样稳定不变,但是你只需要保证在同一个
<literal>Set</literal> 中的对象属性的稳定性就足够了。请到 Hibernate
网站去寻求这个问题更多的详细的讨论。请注意,这不是一个有关 Hibernate 的问题,而仅仅是一个关于 Java 对象标识和判等行为如何实现的问题。 "
#. Tag: title
-#: transactions.xml:334
#, no-c-format
msgid "Common issues"
msgstr "常见问题"
#. Tag: para
-#: transactions.xml:336
-#, fuzzy, no-c-format
-msgid ""
-"Do not use the anti-patterns
<emphasis>session-per-user-session</emphasis> "
-"or <emphasis>session-per-application</emphasis> (there are, however,
rare "
-"exceptions to this rule). Some of the following issues might also arise "
-"within the recommended patterns, so ensure that you understand the "
-"implications before making a design decision:"
-msgstr ""
-"决不要使用反模式<emphasis>session-per-user-session</emphasis>或者<emphasis>
"
-"session-per-application</emphasis>(当然,这个规定几乎没有例外)。请注意, 下"
-"述一些问题可能也会出现在我们推荐的模式中,在你作出某个设计决定之前,请务必理"
-"解该模式的应用前提。"
+#, no-c-format
+msgid "Do not use the anti-patterns
<emphasis>session-per-user-session</emphasis> or
<emphasis>session-per-application</emphasis> (there are, however, rare
exceptions to this rule). Some of the following issues might also arise within the
recommended patterns, so ensure that you understand the implications before making a
design decision:"
+msgstr "决不要使用反模式 <emphasis>session-per-user-session</emphasis> 或者
<emphasis>
session-per-application</emphasis>(当然,这个规定几乎没有例外)。请注意,下述一些问题可能也会出现在我们推荐的模式中,在你作出某个设计决定之前,请务必理解该模式的应用前提。
"
#. Tag: para
-#: transactions.xml:345
-#, fuzzy, no-c-format
-msgid ""
-"A <literal>Session</literal> is not thread-safe. Things that work
"
-"concurrently, like HTTP requests, session beans, or Swing workers, will "
-"cause race conditions if a <literal>Session</literal> instance is
shared. If "
-"you keep your Hibernate <literal>Session</literal> in your "
-"<literal>HttpSession</literal> (this is discussed later in the
chapter), you "
-"should consider synchronizing access to your Http session. Otherwise, a user
"
-"that clicks reload fast enough can use the same
<literal>Session</literal> "
-"in two concurrently running threads."
-msgstr ""
-"<literal>Session</literal>
对象是非线程安全的。如果一个<literal>Session</"
-"literal> 实例允许共享的话,那些支持并发运行的东东,例如HTTP request,session "
-"beans,或者是 Swing workers,将会导致出现资源争用(race condition)。如果在"
-"<literal>HttpSession</literal>中有 Hibernate
的<literal>Session</literal>的话"
-"(稍后讨论),你应该考虑同步访问你的Http session。 否则,只要用户足够快的点击"
-"浏览器的“刷新”,就会导致两个并发运行线程使用同一个 <literal>Session</"
-"literal>。"
+#, no-c-format
+msgid "A <literal>Session</literal> is not thread-safe. Things that work
concurrently, like HTTP requests, session beans, or Swing workers, will cause race
conditions if a <literal>Session</literal> instance is shared. If you keep
your Hibernate <literal>Session</literal> in your
<literal>HttpSession</literal> (this is discussed later in the chapter), you
should consider synchronizing access to your Http session. Otherwise, a user that clicks
reload fast enough can use the same <literal>Session</literal> in two
concurrently running threads."
+msgstr "<literal>Session</literal> 对象是非线程安全的。如果一个
<literal>Session</literal> 实例允许共享的话,那些支持并发运行的东东,例如 HTTP request,session beans
或者是 Swing workers,将会导致出现资源争用(race condition)。如果在
<literal>HttpSession</literal> 中有 Hibernate 的
<literal>Session</literal> 的话(稍后讨论),你应该考虑同步访问你的 Http session。
否则,只要用户足够快的点击浏览器的“刷新”,就会导致两个并发运行线程使用同一个 <literal>Session</literal>。 "
#. Tag: para
-#: transactions.xml:356
-#, fuzzy, no-c-format
-msgid ""
-"An exception thrown by Hibernate means you have to rollback your database "
-"transaction and close the <literal>Session</literal> immediately (this
is "
-"discussed in more detail later in the chapter). If your
<literal>Session</"
-"literal> is bound to the application, you have to stop the application. "
-"Rolling back the database transaction does not put your business objects "
-"back into the state they were at the start of the transaction. This means "
-"that the database state and the business objects will be out of sync. "
-"Usually this is not a problem, because exceptions are not recoverable and "
-"you will have to start over after rollback anyway."
-msgstr ""
-"一个由Hibernate抛出的异常意味着你必须立即回滚数据库事务,并立即关闭"
-"<literal>Session</literal>
(稍后会展开讨论)。如果你的<literal>Session</"
-"literal>绑定到一个应用程序上,你必 须停止该应用程序。回滚数据库事务并不会把你"
-"的业务对象退回到事务启动时候的状态。这 意味着数据库状态和业务对象状态不同步。"
-"通常情况下,这不是什么问题,因为异常是不可 恢复的,你必须在回滚之后重新开始执"
-"行。"
+#, no-c-format
+msgid "An exception thrown by Hibernate means you have to rollback your database
transaction and close the <literal>Session</literal> immediately (this is
discussed in more detail later in the chapter). If your
<literal>Session</literal> is bound to the application, you have to stop the
application. Rolling back the database transaction does not put your business objects back
into the state they were at the start of the transaction. This means that the database
state and the business objects will be out of sync. Usually this is not a problem, because
exceptions are not recoverable and you will have to start over after rollback
anyway."
+msgstr "一个由 Hibernate 抛出的异常意味着你必须立即回滚数据库事务,并立即关闭
<literal>Session</literal>(稍后会展开讨论)。如果你的
<literal>Session</literal>
绑定到一个应用程序上,你必须停止该应用程序。回滚数据库事务并不会把你的业务对象退回到事务启动时候的状态。这意味着数据库状态和业务对象状态不同步。通常情况下,这不是什么问题,因为异常是不可恢复的,你必须在回滚之后重新开始执行。
"
#. Tag: para
-#: transactions.xml:368
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>Session</literal> caches every object that is in a
persistent "
-"state (watched and checked for dirty state by Hibernate). If you keep it "
-"open for a long time or simply load too much data, it will grow endlessly "
-"until you get an OutOfMemoryException. One solution is to call
<literal>clear"
-"()</literal> and <literal>evict()</literal> to manage the
<literal>Session</"
-"literal> cache, but you should consider a Stored Procedure if you need mass
"
-"data operations. Some solutions are shown in <xref
linkend=\"batch\"/>. "
-"Keeping a <literal>Session</literal> open for the duration of a user
session "
-"also means a higher probability of stale data."
-msgstr ""
-"<literal>Session</literal> 缓存了处于持久化状态的每个对象(Hibernate会监视和"
-"检查脏数据)。 这意味着,如果你让<literal>Session</literal>打开很长一段时间,"
-"或是仅仅载入了过多的数据, <literal>Session</literal>占用的内存会一直增长,直"
-"到抛出OutOfMemoryException异常。这个 问题的一个解决方法是调用<literal>clear()"
-"</literal> 和<literal>evict()</literal>来管理
<literal>Session</literal>的缓"
-"存,但是如果你需要大批量数据操作的话,最好考虑 使用存储过程。在<xref linkend="
-"\"batch\"/>中有一些解决方案。在用户会话期间一直保持 <literal>Session</"
-"literal>打开也意味着出现脏数据的可能性很高。"
+#, no-c-format
+msgid "The <literal>Session</literal> caches every object that is in a
persistent state (watched and checked for dirty state by Hibernate). If you keep it open
for a long time or simply load too much data, it will grow endlessly until you get an
OutOfMemoryException. One solution is to call <literal>clear()</literal> and
<literal>evict()</literal> to manage the
<literal>Session</literal> cache, but you should consider a Stored Procedure
if you need mass data operations. Some solutions are shown in <xref
linkend=\"batch\" />. Keeping a <literal>Session</literal> open
for the duration of a user session also means a higher probability of stale data."
+msgstr "<literal>Session</literal> 缓存了处于持久化状态的每个对象(Hibernate 会监视和检查脏数据)。
这意味着,如果你让 <literal>Session</literal> 打开很长一段时间,或是仅仅载入了过多的数据,
<literal>Session</literal> 占用的内存会一直增长,直到抛出 OutOfMemoryException 异常。这个
问题的一个解决方法是调用 <literal>clear()</literal> 和
<literal>evict()</literal> 来管理 <literal>Session</literal>
的缓存,但是如果你需要大批量数据操作的话,最好考虑使用存储过程。在<xref
linkend=\"batch\"/>中有一些解决方案。在用户会话期间一直保持
<literal>Session</literal> 打开也意味着出现脏数据的可能性很高。 "
#. Tag: title
-#: transactions.xml:386
#, no-c-format
msgid "Database transaction demarcation"
msgstr "数据库事务声明"
#. Tag: para
-#: transactions.xml:388
-#, fuzzy, no-c-format
-msgid ""
-"Database, or system, transaction boundaries are always necessary. No "
-"communication with the database can occur outside of a database transaction "
-"(this seems to confuse many developers who are used to the auto-commit "
-"mode). Always use clear transaction boundaries, even for read-only "
-"operations. Depending on your isolation level and database capabilities this
"
-"might not be required, but there is no downside if you always demarcate "
-"transactions explicitly. Certainly, a single database transaction is going "
-"to perform better than many small transactions, even for reading data."
-msgstr ""
-"数据库(或者系统)事务的声明总是必须的。在数据库事务之外,就无法和数据库通讯"
-"(这可能会让那些习惯于 自动提交事务模式的开发人员感到迷惑)。永远使用清晰的事"
-"务声明,即使只读操作也是如此。进行 显式的事务声明并不总是需要的,这取决于你的"
-"事务隔离级别和数据库的能力,但不管怎么说,声明事务总归有益无害。当然,一个单"
-"独的数据库事务总是比很多琐碎的事务性能更好,即时对读数据而言也是一样。"
+#, no-c-format
+msgid "Database, or system, transaction boundaries are always necessary. No
communication with the database can occur outside of a database transaction (this seems to
confuse many developers who are used to the auto-commit mode). Always use clear
transaction boundaries, even for read-only operations. Depending on your isolation level
and database capabilities this might not be required, but there is no downside if you
always demarcate transactions explicitly. Certainly, a single database transaction is
going to perform better than many small transactions, even for reading data."
+msgstr
"数据库(或者系统)事务的声明总是必须的。在数据库事务之外,就无法和数据库通讯(这可能会让那些习惯于自动提交事务模式的开发人员感到迷惑)。永远使用清晰的事务声明,即使只读操作也是如此。进行
显式的事务声明并不总是需要的,这取决于你的事务隔离级别和数据库的能力,但不管怎么说,声明事务总归有益无害。当然,一个单独的数据库事务总是比很多琐碎的事务性能更好,即时对读数据而言也是一样。
"
#. Tag: para
-#: transactions.xml:398
-#, fuzzy, no-c-format
-msgid ""
-"A Hibernate application can run in non-managed (i.e., standalone, simple "
-"Web- or Swing applications) and managed J2EE environments. In a non-managed "
-"environment, Hibernate is usually responsible for its own database "
-"connection pool. The application developer has to manually set transaction "
-"boundaries (begin, commit, or rollback database transactions) themselves. A "
-"managed environment usually provides container-managed transactions (CMT), "
-"with the transaction assembly defined declaratively (in deployment "
-"descriptors of EJB session beans, for example). Programmatic transaction "
-"demarcation is then no longer necessary."
-msgstr ""
-"一个Hibernate应用程序可以运行在非托管环境中(也就是独立运行的应用程序,简单"
-"Web应用程序, 或者Swing图形桌面应用程序),也可以运行在托管的J2EE环境中。在一"
-"个非托管环境中,Hibernate 通常自己负责管理数据库连接池。应用程序开发人员必须"
-"手工设置事务声明,换句话说,就是手工启 动,提交,或者回滚数据库事务。一个托管"
-"的环境通常提供了容器管理事务(CMT),例如事务装配通过可声 明的方式定义在EJB "
-"session beans的部署描述符中。可编程式事务声明不再需要,即使是 "
-"<literal>Session</literal> 的同步也可以自动完成。"
+#, no-c-format
+msgid "A Hibernate application can run in non-managed (i.e., standalone, simple Web-
or Swing applications) and managed J2EE environments. In a non-managed environment,
Hibernate is usually responsible for its own database connection pool. The application
developer has to manually set transaction boundaries (begin, commit, or rollback database
transactions) themselves. A managed environment usually provides container-managed
transactions (CMT), with the transaction assembly defined declaratively (in deployment
descriptors of EJB session beans, for example). Programmatic transaction demarcation is
then no longer necessary."
+msgstr "一个 Hibernate 应用程序可以运行在非托管环境中(也就是独立运行的应用程序,简单 Web
应用程序,或者Swing图形桌面应用程序),也可以运行在托管的 J2EE 环境中。在一个非托管环境中,Hibernate
通常自己负责管理数据库连接池。应用程序开发人员必须手工设置事务声明,换句话说,就是手工启
动,提交,或者回滚数据库事务。一个托管的环境通常提供了容器管理事务(CMT),例如事务装配通过可声明的方式定义在 EJB session beans
的部署描述符中。可编程式事务声明不再需要,即使是 <literal>Session</literal> 的同步也可以自动完成。 "
#. Tag: para
-#: transactions.xml:408
-#, fuzzy, no-c-format
-msgid ""
-"However, it is often desirable to keep your persistence layer portable "
-"between non-managed resource-local environments, and systems that can rely "
-"on JTA but use BMT instead of CMT. In both cases use programmatic "
-"transaction demarcation. Hibernate offers a wrapper API called "
-"<literal>Transaction</literal> that translates into the native
transaction "
-"system of your deployment environment. This API is actually optional, but we
"
-"strongly encourage its use unless you are in a CMT session bean."
-msgstr ""
-"让持久层具备可移植性是人们的理想,这种移植发生在非托管的本地资源环境,与依赖"
-"JTA但是使用BMT而非CMT的系统之间。在两种情况下你都可以使用编程式的事务管理。"
-"Hibernate提供了一套称为<literal>Transaction</literal>的封装API, 用来把你的部"
-"署环境中的本地事务管理系统转换到Hibernate事务上。这个API是可选的,但是我们强"
-"烈 推荐你使用,除非你用CMT session bean。"
+#, no-c-format
+msgid "However, it is often desirable to keep your persistence layer portable
between non-managed resource-local environments, and systems that can rely on JTA but use
BMT instead of CMT. In both cases use programmatic transaction demarcation. Hibernate
offers a wrapper API called <literal>Transaction</literal> that translates
into the native transaction system of your deployment environment. This API is actually
optional, but we strongly encourage its use unless you are in a CMT session bean."
+msgstr "让持久层具备可移植性是人们的理想,这种移植发生在非托管的本地资源环境,与依赖 JTA 但是使用 BMT 而非 CMT
的系统之间。在两种情况下你都可以使用编程式的事务管理。Hibernate 提供了一套称为 <literal>Transaction</literal>
的封装 API, 用来把你的部署环境中的本地事务管理系统转换到 Hibernate 事务上。这个 API 是可选的,但是我们强烈推荐你使用,除非你用 CMT session
bean。 "
#. Tag: para
-#: transactions.xml:417
-#, fuzzy, no-c-format
-msgid ""
-"Ending a <literal>Session</literal> usually involves four distinct
phases:"
-msgstr "通常情况下,结束 <literal>Session</literal> 包含了四个不同的阶段:"
+#, no-c-format
+msgid "Ending a <literal>Session</literal> usually involves four
distinct phases:"
+msgstr "通常情况下,结束 <literal>Session</literal> 包含了四个不同的阶段: "
#. Tag: para
-#: transactions.xml:423
#, no-c-format
msgid "flush the session"
-msgstr "同步session(flush,刷出到磁盘)"
+msgstr "同步 session(flush,刷出到磁盘)"
#. Tag: para
-#: transactions.xml:428
#, no-c-format
msgid "commit the transaction"
msgstr "提交事务"
#. Tag: para
-#: transactions.xml:433
#, no-c-format
msgid "close the session"
-msgstr "关闭session"
+msgstr "关闭 session"
#. Tag: para
-#: transactions.xml:438
#, no-c-format
msgid "handle exceptions"
msgstr "处理异常"
#. Tag: para
-#: transactions.xml:444
-#, fuzzy, no-c-format
-msgid ""
-"We discussed Flushing the session earlier, so we will now have a closer look
"
-"at transaction demarcation and exception handling in both managed and non-"
-"managed environments."
-msgstr ""
-"session的同步(flush,刷出)前面已经讨论过了,我们现在进一步考察在托管和非托管"
-"环境下的事务声明和异常处理。"
+#, no-c-format
+msgid "We discussed Flushing the session earlier, so we will now have a closer look
at transaction demarcation and exception handling in both managed and non-managed
environments."
+msgstr "session 的同步(flush,刷出)前面已经讨论过了,我们现在进一步考察在托管和非托管环境下的事务声明和异常处理。 "
#. Tag: title
-#: transactions.xml:451
#, no-c-format
msgid "Non-managed environment"
msgstr "非托管环境"
#. Tag: para
-#: transactions.xml:453
-#, fuzzy, no-c-format
-msgid ""
-"If a Hibernate persistence layer runs in a non-managed environment, database
"
-"connections are usually handled by simple (i.e., non-DataSource) connection "
-"pools from which Hibernate obtains connections as needed. The session/"
-"transaction handling idiom looks like this:"
-msgstr ""
-"如果Hibernat持久层运行在一个非托管环境中,数据库连接通常由Hibernate的简单(即"
-"非DataSource)连接池机制 来处理。session/transaction处理方式如下所示:"
-
-#. Tag: programlisting
-#: transactions.xml:460
#, no-c-format
-msgid ""
-"<![CDATA[// Non-managed environment idiom\n"
-"Session sess = factory.openSession();\n"
-"Transaction tx = null;\n"
-"try {\n"
-" tx = sess.beginTransaction();\n"
-"\n"
-" // do some work\n"
-" ...\n"
-"\n"
-" tx.commit();\n"
-"}\n"
-"catch (RuntimeException e) {\n"
-" if (tx != null) tx.rollback();\n"
-" throw e; // or display error message\n"
-"}\n"
-"finally {\n"
-" sess.close();\n"
-"}]]>"
-msgstr ""
+msgid "If a Hibernate persistence layer runs in a non-managed environment, database
connections are usually handled by simple (i.e., non-DataSource) connection pools from
which Hibernate obtains connections as needed. The session/transaction handling idiom
looks like this:"
+msgstr "如果 Hibernat 持久层运行在一个非托管环境中,数据库连接通常由 Hibernate 的简单(即非 DataSource)连接池机制
来处理。session/transaction 处理方式如下所示: "
#. Tag: para
-#: transactions.xml:462
-#, fuzzy, no-c-format
-msgid ""
-"You do not have to <literal>flush()</literal> the
<literal>Session</literal> "
-"explicitly: the call to <literal>commit()</literal> automatically
triggers "
-"the synchronization depending on the <link
linkend=\"objectstate-flushing"
-"\">FlushMode</link> for the session. A call to
<literal>close()</literal> "
-"marks the end of a session. The main implication of
<literal>close()</"
-"literal> is that the JDBC connection will be relinquished by the session.
"
-"This Java code is portable and runs in both non-managed and JTA
environments."
-msgstr ""
-"你不需要显式<literal>flush()</literal><literal>Session</literal>
- 对"
-"<literal>commit()</literal>的调用会自动触发session的同步(取决于session的"
-"<xref linkend=\"objectstate-flushing\">FlushMode</xref>)。调用
<literal>close"
-"()</literal>
标志session的结束。<literal>close()</literal>方法重要的暗示是,"
-"<literal>session</literal>释放了JDBC连接。这段Java代码在非托管环境下和JTA环境"
-"下都可以运行。"
+#, no-c-format
+msgid "You do not have to <literal>flush()</literal> the
<literal>Session</literal> explicitly: the call to
<literal>commit()</literal> automatically triggers the synchronization
depending on the FlushMode for the session (see <xref
linkend=\"objectstate-flushing\" />). A call to
<literal>close()</literal> marks the end of a session. The main implication of
<literal>close()</literal> is that the JDBC connection will be relinquished by
the session. This Java code is portable and runs in both non-managed and JTA
environments."
+msgstr "你不需要显式 <literal>flush()</literal>
<literal>Session</literal> — 对 <literal>commit()</literal>
的调用会自动触发 session 的同步(取决于 session 的 <xref linkend=\"objectstate-flushing\"
/>)。调用 <literal>close()</literal> 标志 session
的结束。<literal>close()</literal> 方法重要的暗示是,<literal>session</literal>
释放了 JDBC 连接。这段 Java 代码在非托管环境下和 JTA 环境下都可以运行。"
#. Tag: para
-#: transactions.xml:471
-#, fuzzy, no-c-format
-msgid ""
-"As outlined earlier, a much more flexible solution is Hibernate's built-in
"
-"\"current session\" context management:"
-msgstr ""
-"更加灵活的方案是Hibernate内置的\"current session\"上下文管理,前文已经讲过:"
-
-#. Tag: programlisting
-#: transactions.xml:476
#, no-c-format
-msgid ""
-"<![CDATA[// Non-managed environment idiom with getCurrentSession()\n"
-"try {\n"
-" factory.getCurrentSession().beginTransaction();\n"
-"\n"
-" // do some work\n"
-" ...\n"
-"\n"
-" factory.getCurrentSession().getTransaction().commit();\n"
-"}\n"
-"catch (RuntimeException e) {\n"
-" factory.getCurrentSession().getTransaction().rollback();\n"
-" throw e; // or display error message\n"
-"}]]>"
-msgstr ""
+msgid "As outlined earlier, a much more flexible solution is Hibernate's
built-in \"current session\" context management:"
+msgstr "更加灵活的方案是 Hibernate 内置的 \"current session\" 上下文管理,前文已经讲过: "
#. Tag: para
-#: transactions.xml:478
-#, fuzzy, no-c-format
-msgid ""
-"You will not see these code snippets in a regular application; fatal "
-"(system) exceptions should always be caught at the \"top\". In other
words, "
-"the code that executes Hibernate calls in the persistence layer, and the "
-"code that handles <literal>RuntimeException</literal> (and usually can
only "
-"clean up and exit), are in different layers. The current context management "
-"by Hibernate can significantly simplify this design by accessing a "
-"<literal>SessionFactory</literal>. Exception handling is discussed
later in "
-"this chapter."
-msgstr ""
-"你很可能从未在一个通常的应用程序的业务代码中见过这样的代码片断:致命的(系"
-"统)异常应该总是 在应用程序“顶层”被捕获。换句话说,执行Hibernate调用的代码"
-"(在持久层)和处理 <literal>RuntimeException</literal>异常的代码(通常只能清"
-"理和退出应用程序)应该在不同 的应用程序逻辑层。Hibernate的当前上下文管理可以"
-"极大地简化这一设计,你所有的一切就是<literal>SessionFactory</literal>。 异常"
-"处理将在本章稍后进行讨论。"
+#, no-c-format
+msgid "You will not see these code snippets in a regular application; fatal (system)
exceptions should always be caught at the \"top\". In other words, the code that
executes Hibernate calls in the persistence layer, and the code that handles
<literal>RuntimeException</literal> (and usually can only clean up and exit),
are in different layers. The current context management by Hibernate can significantly
simplify this design by accessing a <literal>SessionFactory</literal>.
Exception handling is discussed later in this chapter."
+msgstr "你很可能从未在一个通常的应用程序的业务代码中见过这样的代码片断:致命的(系统)异常应该总是 在应用程序“顶层”被捕获。换句话说,执行 Hibernate
调用的代码(在持久层)和处理 <literal>RuntimeException</literal> 异常的代码(通常只能清理和退出应用程序)应该在不同
的应用程序逻辑层。Hibernate 的当前上下文管理可以极大地简化这一设计,你所有的一切就是
<literal>SessionFactory</literal>。异常处理将在本章稍后进行讨论。 "
#. Tag: para
-#: transactions.xml:488
-#, fuzzy, no-c-format
-msgid ""
-"You should select
<literal>org.hibernate.transaction.JDBCTransactionFactory</"
-"literal>, which is the default, and for the second example select
<literal>"
-"\"thread\"</literal> as your <literal>hibernate."
-"current_session_context_class</literal>."
-msgstr ""
-"请注意,你应该选择 <literal>org.hibernate.transaction."
-"JDBCTransactionFactory</literal> (这是默认选项),对第二个例子来说,"
-"<literal>hibernate.current_session_context_class</literal>应该是<literal>"
-"\"thread\"</literal>"
+#, no-c-format
+msgid "You should select
<literal>org.hibernate.transaction.JDBCTransactionFactory</literal>, which is
the default, and for the second example select
<literal>\"thread\"</literal> as your
<literal>hibernate.current_session_context_class</literal>."
+msgstr "请注意,你应该选择
<literal>org.hibernate.transaction.JDBCTransactionFactory</literal>
(这是默认选项),对第二个例子来说,<literal>hibernate.current_session_context_class</literal>应该是
<literal>\"thread\"</literal>。"
#. Tag: title
-#: transactions.xml:497
#, no-c-format
msgid "Using JTA"
-msgstr "使用JTA"
+msgstr "使用 JTA"
#. Tag: para
-#: transactions.xml:499
-#, fuzzy, no-c-format
-msgid ""
-"If your persistence layer runs in an application server (for example, behind
"
-"EJB session beans), every datasource connection obtained by Hibernate will "
-"automatically be part of the global JTA transaction. You can also install a "
-"standalone JTA implementation and use it without EJB. Hibernate offers two "
-"strategies for JTA integration."
-msgstr ""
-"如果你的持久层运行在一个应用服务器中(例如,在EJB session beans的后面),"
-"Hibernate获取 的每个数据源连接将自动成为全局JTA事务的一部分。 你可以安装一个"
-"独立的JTA实现,使用它而不使用EJB。Hibernate提供了两种策略进行JTA集成。"
+#, no-c-format
+msgid "If your persistence layer runs in an application server (for example, behind
EJB session beans), every datasource connection obtained by Hibernate will automatically
be part of the global JTA transaction. You can also install a standalone JTA
implementation and use it without EJB. Hibernate offers two strategies for JTA
integration."
+msgstr "如果你的持久层运行在一个应用服务器中(例如,在 EJB session beans 的后面),Hibernate 获取的每个数据源连接将自动成为全局
JTA 事务的一部分。你可以安装一个独立的 JTA 实现,使用它而不使用 EJB。Hibernate 提供了两种策略进行 JTA 集成。 "
#. Tag: para
-#: transactions.xml:506
-#, fuzzy, no-c-format
-msgid ""
-"If you use bean-managed transactions (BMT), Hibernate will tell the "
-"application server to start and end a BMT transaction if you use the "
-"<literal>Transaction</literal> API. The transaction management code is
"
-"identical to the non-managed environment."
-msgstr ""
-"如果你使用bean管理事务(BMT),可以通过使用Hibernate的 <literal>Transaction</"
-"literal> API来告诉 应用服务器启动和结束BMT事务。因此,事务管理代码和在非托管"
-"环境下是一样的。"
-
-#. Tag: programlisting
-#: transactions.xml:512
#, no-c-format
-msgid ""
-"<![CDATA[// BMT idiom\n"
-"Session sess = factory.openSession();\n"
-"Transaction tx = null;\n"
-"try {\n"
-" tx = sess.beginTransaction();\n"
-"\n"
-" // do some work\n"
-" ...\n"
-"\n"
-" tx.commit();\n"
-"}\n"
-"catch (RuntimeException e) {\n"
-" if (tx != null) tx.rollback();\n"
-" throw e; // or display error message\n"
-"}\n"
-"finally {\n"
-" sess.close();\n"
-"}]]>"
-msgstr ""
+msgid "If you use bean-managed transactions (BMT), Hibernate will tell the
application server to start and end a BMT transaction if you use the
<literal>Transaction</literal> API. The transaction management code is
identical to the non-managed environment."
+msgstr "如果你使用 bean 管理事务(BMT),可以通过使用 Hibernate 的
<literal>Transaction</literal> API 来告诉应用服务器启动和结束 BMT 事务。因此,事务管理代码和在非托管环境下是一样的。
"
#. Tag: para
-#: transactions.xml:514
-#, fuzzy, no-c-format
-msgid ""
-"If you want to use a transaction-bound <literal>Session</literal>, that
is, "
-"the <literal>getCurrentSession()</literal> functionality for easy
context "
-"propagation, use the JTA <literal>UserTransaction</literal> API
directly:"
-msgstr ""
-"如果你希望使用与事务绑定的<literal>Session</literal>,也就是使用"
-"<literal>getCurrentSession()</literal>来简化上下文管理,你将不得不直接使用"
-"JTA <literal>UserTransaction</literal>API。"
-
-#. Tag: programlisting
-#: transactions.xml:520
#, no-c-format
-msgid ""
-"<![CDATA[// BMT idiom with getCurrentSession()\n"
-"try {\n"
-" UserTransaction tx = (UserTransaction)new InitialContext()\n"
-"
.lookup(\"java:comp/UserTransaction\");\n"
-"\n"
-" tx.begin();\n"
-"\n"
-" // Do some work on Session bound to transaction\n"
-" factory.getCurrentSession().load(...);\n"
-" factory.getCurrentSession().persist(...);\n"
-"\n"
-" tx.commit();\n"
-"}\n"
-"catch (RuntimeException e) {\n"
-" tx.rollback();\n"
-" throw e; // or display error message\n"
-"}]]>"
-msgstr ""
+msgid "If you want to use a transaction-bound
<literal>Session</literal>, that is, the
<literal>getCurrentSession()</literal> functionality for easy context
propagation, use the JTA <literal>UserTransaction</literal> API
directly:"
+msgstr "如果你希望使用与事务绑定的 <literal>Session</literal>,也就是使用
<literal>getCurrentSession()</literal> 来简化上下文管理,你将不得不直接使用 JTA
<literal>UserTransaction</literal> API。 "
#. Tag: para
-#: transactions.xml:522
-#, fuzzy, no-c-format
-msgid ""
-"With CMT, transaction demarcation is completed in session bean deployment "
-"descriptors, not programmatically. The code is reduced to:"
-msgstr ""
-"在CMT方式下,事务声明是在session bean的部署描述符中,而不需要编程。 因此,代"
-"码被简化为:"
-
-#. Tag: programlisting
-#: transactions.xml:527
#, no-c-format
-msgid ""
-"<![CDATA[// CMT idiom\n"
-" Session sess = factory.getCurrentSession();\n"
-"\n"
-" // do some work\n"
-" ...\n"
-"]]>"
-msgstr ""
+msgid "With CMT, transaction demarcation is completed in session bean deployment
descriptors, not programmatically. The code is reduced to:"
+msgstr "在 CMT 方式下,事务声明是在 session bean 的部署描述符中,而不需要编程。因此,代码被简化为:"
#. Tag: para
-#: transactions.xml:529
-#, fuzzy, no-c-format
-msgid ""
-"In a CMT/EJB, even rollback happens automatically. An unhandled "
-"<literal>RuntimeException</literal> thrown by a session bean method
tells "
-"the container to set the global transaction to rollback. <emphasis>You do
"
-"not need to use the Hibernate <literal>Transaction</literal> API at all
with "
-"BMT or CMT, and you get automatic propagation of the \"current\" Session
"
-"bound to the transaction.</emphasis>"
-msgstr ""
-"在CMT/EJB中甚至会自动rollback,因为假若有未捕获的<literal>RuntimeException</"
-"literal>从session bean方法中抛出,这就会通知容器把全局事务回滚。<emphasis>这"
-"就意味着,在BMT或者CMT中,你根本就不需要使用Hibernate <literal>Transaction</"
-"literal> API ,你自动得到了绑定到事务的“当前”Session。 </emphasis>"
+#, no-c-format
+msgid "In a CMT/EJB, even rollback happens automatically. An unhandled
<literal>RuntimeException</literal> thrown by a session bean method tells the
container to set the global transaction to rollback. <emphasis>You do not need to
use the Hibernate <literal>Transaction</literal> API at all with BMT or CMT,
and you get automatic propagation of the \"current\" Session bound to the
transaction.</emphasis>"
+msgstr "在 CMT/EJB 中甚至会自动 rollback,因为假若有未捕获的
<literal>RuntimeException</literal> 从 session bean
方法中抛出,这就会通知容器把全局事务回滚。<emphasis>这就意味着,在 BMT 或者 CMT 中,你根本就不需要使用 Hibernate
<literal>Transaction</literal> API,你自动得到了绑定到事务的“当前”
Session。</emphasis>"
#. Tag: para
-#: transactions.xml:537
-#, fuzzy, no-c-format
-msgid ""
-"When configuring Hibernate's transaction factory, choose
<literal>org."
-"hibernate.transaction.JTATransactionFactory</literal> if you use JTA "
-"directly (BMT), and <literal>org.hibernate.transaction."
-"CMTTransactionFactory</literal> in a CMT session bean. Remember to also set
"
-"<literal>hibernate.transaction.manager_lookup_class</literal>. Ensure
that "
-"your <literal>hibernate.current_session_context_class</literal> is
either "
-"unset (backwards compatibility), or is set to
<literal>\"jta\"</literal>."
-msgstr ""
-"注意,当你配置Hibernate的transaction factory的时候,在直接使用JTA的时候"
-"(BMT),你应该选择<literal>org.hibernate.transaction.JTATransactionFactory</"
-"literal>,在CMT session bean中选择<literal>org.hibernate.transaction."
-"CMTTransactionFactory</literal>。记得也要设置<literal>hibernate.transaction."
-"manager_lookup_class</literal>。还有,确认你的<literal>hibernate."
-"current_session_context_class</literal>未设置(为了向下兼容),或者设置为"
-"<literal>\"jta\"</literal>。"
+#, no-c-format
+msgid "When configuring Hibernate's transaction factory, choose
<literal>org.hibernate.transaction.JTATransactionFactory</literal> if you use
JTA directly (BMT), and
<literal>org.hibernate.transaction.CMTTransactionFactory</literal> in a CMT
session bean. Remember to also set
<literal>hibernate.transaction.manager_lookup_class</literal>. Ensure that
your <literal>hibernate.current_session_context_class</literal> is either
unset (backwards compatibility), or is set to
<literal>\"jta\"</literal>."
+msgstr "注意,当你配置 Hibernate 的 transaction factory 的时候,在直接使用 JTA 的时候(BMT),你应该选择
<literal>org.hibernate.transaction.JTATransactionFactory</literal>,在 CMT
session bean 中选择
<literal>org.hibernate.transaction.CMTTransactionFactory</literal>。记得也要设置
<literal>hibernate.transaction.manager_lookup_class</literal>。还有,确认你的
<literal>hibernate.current_session_context_class</literal> 未设置(为了向下兼容),或者设置为
<literal>\"jta\"</literal>。 "
#. Tag: para
-#: transactions.xml:546
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>getCurrentSession()</literal> operation has one downside
in a "
-"JTA environment. There is one caveat to the use of
<literal>after_statement</"
-"literal> connection release mode, which is then used by default. Due to a
"
-"limitation of the JTA spec, it is not possible for Hibernate to "
-"automatically clean up any unclosed
<literal>ScrollableResults</literal> or "
-"<literal>Iterator</literal> instances returned by
<literal>scroll()</"
-"literal> or <literal>iterate()</literal>. You
<emphasis>must</emphasis> "
-"release the underlying database cursor by calling
<literal>ScrollableResults."
-"close()</literal> or <literal>Hibernate.close(Iterator)</literal>
explicitly "
-"from a <literal>finally</literal> block. Most applications can easily
avoid "
-"using <literal>scroll()</literal> or
<literal>iterate()</literal> from the "
-"JTA or CMT code.)"
-msgstr ""
-"<literal>getCurrentSession()</literal>在JTA环境中有一个弊端。对"
-"<literal>after_statement</literal>连接释放方式有一个警告,这是被默认使用的。"
-"因为JTA规范的一个很愚蠢的限制,Hibernate不可能自动清理任何未关闭的"
-"<literal>ScrollableResults</literal>
或者<literal>Iterator</literal>,它们是"
-"由<literal>scroll()</literal>或<literal>iterate()</literal>产生的。你"
-"<emphasis>must</emphasis>通过在<literal>finally</literal>块中,显式调用"
-"<literal>ScrollableResults.close()</literal>或者<literal>Hibernate.close"
-"(Iterator)</literal>方法来释放底层数据库游标。(当然,大部分程序完全可以很容易"
-"的避免在JTA或CMT代码中出现<literal>scroll()</literal>或<literal>iterate()</"
-"literal>。)"
+#, no-c-format
+msgid "The <literal>getCurrentSession()</literal> operation has one
downside in a JTA environment. There is one caveat to the use of
<literal>after_statement</literal> connection release mode, which is then used
by default. Due to a limitation of the JTA spec, it is not possible for Hibernate to
automatically clean up any unclosed <literal>ScrollableResults</literal> or
<literal>Iterator</literal> instances returned by
<literal>scroll()</literal> or <literal>iterate()</literal>. You
<emphasis>must</emphasis> release the underlying database cursor by calling
<literal>ScrollableResults.close()</literal> or
<literal>Hibernate.close(Iterator)</literal> explicitly from a
<literal>finally</literal> block. Most applications can easily avoid using
<literal>scroll()</literal> or <literal>iterate()</literal> from
the JTA or CMT code.)"
+msgstr "<literal>getCurrentSession()</literal>在 JTA 环境中有一个弊端。对
<literal>after_statement</literal> 连接释放方式有一个警告,这是被默认使用的。因为 JTA
规范的一个很愚蠢的限制,Hibernate 不可能自动清理任何未关闭的 <literal>ScrollableResults</literal>
或者<literal>Iterator</literal>,它们是由 <literal>scroll()</literal> 或
<literal>iterate()</literal> 产生的。你 <emphasis>must</emphasis> 通过在
<literal>finally</literal> 块中,显式调用
<literal>ScrollableResults.close()</literal> 或者
<literal>Hibernate.close(Iterator)</literal> 方法来释放底层数据库游标。(当然,大部分程序完全可以很容易的避免在
JTA 或 CMT 代码中出现 <literal>scroll()</literal> 或
<literal>iterate()</literal>。) "
#. Tag: title
-#: transactions.xml:562
#, no-c-format
msgid "Exception handling"
msgstr "异常处理"
#. Tag: para
-#: transactions.xml:564
-#, fuzzy, no-c-format
-msgid ""
-"If the <literal>Session</literal> throws an exception, including any
"
-"<literal>SQLException</literal>, immediately rollback the database
"
-"transaction, call <literal>Session.close()</literal> and discard the
"
-"<literal>Session</literal> instance. Certain methods of
<literal>Session</"
-"literal> will <emphasis>not</emphasis> leave the session in a
consistent "
-"state. No exception thrown by Hibernate can be treated as recoverable. "
-"Ensure that the <literal>Session</literal> will be closed by calling
"
-"<literal>close()</literal> in a <literal>finally</literal>
block."
-msgstr ""
-"如果 <literal>Session</literal> 抛出异常
(包括任何<literal>SQLException</"
-"literal>), 你应该立即回滚数据库事务,调用 <literal>Session.close()</"
-"literal> ,丢弃该
<literal>Session</literal>实例。<literal>Session</literal>"
-"的某些方法可能会导致session 处于不一致的状态。所有由Hibernate抛出的异常都视为"
-"不可以恢复的。确保在 <literal>finally</literal>
代码块中调用<literal>close()"
-"</literal>方法,以关闭掉 <literal>Session</literal>。"
+#, no-c-format
+msgid "If the <literal>Session</literal> throws an exception, including
any <literal>SQLException</literal>, immediately rollback the database
transaction, call <literal>Session.close()</literal> and discard the
<literal>Session</literal> instance. Certain methods of
<literal>Session</literal> will <emphasis>not</emphasis> leave the
session in a consistent state. No exception thrown by Hibernate can be treated as
recoverable. Ensure that the <literal>Session</literal> will be closed by
calling <literal>close()</literal> in a <literal>finally</literal>
block."
+msgstr "如果 <literal>Session</literal> 抛出异常(包括任何
<literal>SQLException</literal>),你应该立即回滚数据库事务,调用
<literal>Session.close()</literal> ,丢弃该
<literal>Session</literal> 实例。<literal>Session</literal>
的某些方法可能会导致 session 处于不一致的状态。所有由 Hibernate 抛出的异常都视为不可以恢复的。确保在
<literal>finally</literal> 代码块中调用 <literal>close()</literal>
方法,以关闭掉 <literal>Session</literal>。"
#. Tag: para
-#: transactions.xml:575
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>HibernateException</literal>, which wraps most of the
errors "
-"that can occur in a Hibernate persistence layer, is an unchecked exception. "
-"It was not in older versions of Hibernate. In our opinion, we should not "
-"force the application developer to catch an unrecoverable exception at a low
"
-"layer. In most systems, unchecked and fatal exceptions are handled in one of
"
-"the first frames of the method call stack (i.e., in higher layers) and "
-"either an error message is presented to the application user or some other "
-"appropriate action is taken. Note that Hibernate might also throw other "
-"unchecked exceptions that are not a
<literal>HibernateException</literal>. "
-"These are not recoverable and appropriate action should be taken."
-msgstr ""
-"<literal>HibernateException</literal>是一个非检查期异常(这不同于Hibernate老"
-"的版本), 它封装了Hibernate持久层可能出现的大多数错误。我们的观点是,不应该"
-"强迫应用程序开发人员 在底层捕获无法恢复的异常。在大多数软件系统中,非检查期异"
-"常和致命异常都是在相应方法调用 的堆栈的顶层被处理的(也就是说,在软件上面的逻"
-"辑层),并且提供一个错误信息给应用软件的用户 (或者采取其他某些相应的操作)。"
-"请注意,Hibernate也有可能抛出其他并不属于 <literal>HibernateException</"
-"literal>的非检查期异常。这些异常同样也是无法恢复的,应该 采取某些相应的操作去"
-"处理。"
+#, no-c-format
+msgid "The <literal>HibernateException</literal>, which wraps most of
the errors that can occur in a Hibernate persistence layer, is an unchecked exception. It
was not in older versions of Hibernate. In our opinion, we should not force the
application developer to catch an unrecoverable exception at a low layer. In most systems,
unchecked and fatal exceptions are handled in one of the first frames of the method call
stack (i.e., in higher layers) and either an error message is presented to the application
user or some other appropriate action is taken. Note that Hibernate might also throw other
unchecked exceptions that are not a <literal>HibernateException</literal>.
These are not recoverable and appropriate action should be taken."
+msgstr "<literal>HibernateException</literal> 是一个非检查期异常(这不同于 Hibernate
老的版本),它封装了 Hibernate 持久层可能出现的大多数错误。我们的观点是,不应该强迫应用程序开发人员
在底层捕获无法恢复的异常。在大多数软件系统中,非检查期异常和致命异常都是在相应方法调用 的堆栈的顶层被处理的(也就是说,在软件上面的逻辑层),并且提供一个错误信息给应用软件的用户
(或者采取其他某些相应的操作)。请注意,Hibernate 也有可能抛出其他并不属于
<literal>HibernateException</literal> 的非检查期异常。这些异常同样也是无法恢复的,应该
采取某些相应的操作去处理。"
#. Tag: para
-#: transactions.xml:587
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate wraps <literal>SQLException</literal>s thrown while
interacting "
-"with the database in a <literal>JDBCException</literal>. In fact,
Hibernate "
-"will attempt to convert the exception into a more meaningful subclass of "
-"<literal>JDBCException</literal>. The underlying
<literal>SQLException</"
-"literal> is always available via
<literal>JDBCException.getCause()</"
-"literal>. Hibernate converts the <literal>SQLException</literal>
into an "
-"appropriate <literal>JDBCException</literal> subclass using the "
-"<literal>SQLExceptionConverter</literal> attached to the "
-"<literal>SessionFactory</literal>. By default, the "
-"<literal>SQLExceptionConverter</literal> is defined by the configured
"
-"dialect. However, it is also possible to plug in a custom implementation. "
-"See the javadocs for the
<literal>SQLExceptionConverterFactory</literal> "
-"class for details. The standard <literal>JDBCException</literal>
subtypes "
-"are:"
-msgstr ""
-"在和数据库进行交互时,Hibernate把捕获的<literal>SQLException</literal>封装为"
-"Hibernate的 <literal>JDBCException</literal>。事实上,Hibernate尝试把异常转换"
-"为更有实际含义 的<literal>JDBCException</literal>异常的子类。底层的"
-"<literal>SQLException</literal>可以
通过<literal>JDBCException.getCause()</"
-"literal>来得到。Hibernate通过使用关联到
<literal>SessionFactory</literal>上的"
-"<literal>SQLExceptionConverter</literal>来
把<literal>SQLException</literal>"
-"转换为一个对应的<literal>JDBCException</literal> 异常的子类。默认情况下,"
-"<literal>SQLExceptionConverter</literal>可以通过配置dialect 选项指定;此外,"
-"也可以使用用户自定义的实现类(参考javadocs "
-"<literal>SQLExceptionConverterFactory</literal>类来了解详情)。标准的 "
-"<literal>JDBCException</literal>子类型是:"
+#, no-c-format
+msgid "Hibernate wraps <literal>SQLException</literal>s thrown while
interacting with the database in a <literal>JDBCException</literal>. In fact,
Hibernate will attempt to convert the exception into a more meaningful subclass of
<literal>JDBCException</literal>. The underlying
<literal>SQLException</literal> is always available via
<literal>JDBCException.getCause()</literal>. Hibernate converts the
<literal>SQLException</literal> into an appropriate
<literal>JDBCException</literal> subclass using the
<literal>SQLExceptionConverter</literal> attached to the
<literal>SessionFactory</literal>. By default, the
<literal>SQLExceptionConverter</literal> is defined by the configured dialect.
However, it is also possible to plug in a custom implementation. See the javadocs for the
<literal>SQLExceptionConverterFactory</literal> class for details. The
standard <literal>JDBCException</literal> subtypes are:"
+msgstr "在和数据库进行交互时,Hibernate 把捕获的 <literal>SQLException</literal> 封装为
Hibernate 的 <literal>JDBCException</literal>。事实上,Hibernate 尝试把异常转换为更有实际含义的
<literal>JDBCException</literal> 异常的子类。底层的
<literal>SQLException</literal> 可以通过
<literal>JDBCException.getCause()</literal> 来得到。Hibernate 通过使用关联到
<literal>SessionFactory</literal> 上的
<literal>SQLExceptionConverter</literal> 来把
<literal>SQLException</literal> 转换为一个对应的
<literal>JDBCException</literal>
异常的子类。默认情况下,<literal>SQLExceptionConverter</literal> 可以通过配置 dialect
选项指定;此外,也可以使用用户自定义的实现类(参考 javadocs
<literal>SQLExceptionConverterFactory</literal> 类来了解详情)。标准的
<literal>JDBCException</literal> 子类型是: "
#. Tag: para
-#: transactions.xml:603
-#, fuzzy, no-c-format
-msgid ""
-"<literal>JDBCConnectionException</literal>: indicates an error with the
"
-"underlying JDBC communication."
-msgstr ""
-"<literal>JDBCConnectionException</literal> - 指明底层的JDBC通讯出现错误"
+#, no-c-format
+msgid "<literal>JDBCConnectionException</literal>: indicates an error
with the underlying JDBC communication."
+msgstr "<literal>JDBCConnectionException</literal>:指明底层的 JDBC
通讯出现错误。"
#. Tag: para
-#: transactions.xml:609
-#, fuzzy, no-c-format
-msgid ""
-"<literal>SQLGrammarException</literal>: indicates a grammar or syntax
"
-"problem with the issued SQL."
-msgstr ""
-"<literal>SQLGrammarException</literal> - 指明发送的SQL语句的语法或者格式错误"
+#, no-c-format
+msgid "<literal>SQLGrammarException</literal>: indicates a grammar or
syntax problem with the issued SQL."
+msgstr "<literal>SQLGrammarException</literal>:指明发送的 SQL
语句的语法或者格式错误。"
#. Tag: para
-#: transactions.xml:615
-#, fuzzy, no-c-format
-msgid ""
-"<literal>ConstraintViolationException</literal>: indicates some form of
"
-"integrity constraint violation."
-msgstr ""
-"<literal>ConstraintViolationException</literal> - 指明某种类型的约束违例错误"
+#, no-c-format
+msgid "<literal>ConstraintViolationException</literal>: indicates some
form of integrity constraint violation."
+msgstr
"<literal>ConstraintViolationException</literal>:指明某种类型的约束违例错误"
#. Tag: para
-#: transactions.xml:621
-#, fuzzy, no-c-format
-msgid ""
-"<literal>LockAcquisitionException</literal>: indicates an error
acquiring a "
-"lock level necessary to perform the requested operation."
-msgstr ""
-"<literal>LockAcquisitionException</literal> - 指明了在执行请求操作时,获取 所"
-"需的锁级别时出现的错误。"
+#, no-c-format
+msgid "<literal>LockAcquisitionException</literal>: indicates an error
acquiring a lock level necessary to perform the requested operation."
+msgstr
"<literal>LockAcquisitionException</literal>:指明了在执行请求操作时,获取所需的锁级别时出现的错误。"
#. Tag: para
-#: transactions.xml:627
-#, fuzzy, no-c-format
-msgid ""
-"<literal>GenericJDBCException</literal>: a generic exception which did
not "
-"fall into any of the other categories."
-msgstr "<literal>GenericJDBCException</literal> - 不属于任何其他种类的原生异常"
+#, no-c-format
+msgid "<literal>GenericJDBCException</literal>: a generic exception
which did not fall into any of the other categories."
+msgstr "<literal>GenericJDBCException</literal>:不属于任何其他种类的原生异常。"
#. Tag: title
-#: transactions.xml:637
#, no-c-format
msgid "Transaction timeout"
msgstr "事务超时"
#. Tag: para
-#: transactions.xml:639
-#, fuzzy, no-c-format
-msgid ""
-"An important feature provided by a managed environment like EJB, that is "
-"never provided for non-managed code, is transaction timeout. Transaction "
-"timeouts ensure that no misbehaving transaction can indefinitely tie up "
-"resources while returning no response to the user. Outside a managed (JTA) "
-"environment, Hibernate cannot fully provide this functionality. However, "
-"Hibernate can at least control data access operations, ensuring that "
-"database level deadlocks and queries with huge result sets are limited by a "
-"defined timeout. In a managed environment, Hibernate can delegate "
-"transaction timeout to JTA. This functionality is abstracted by the "
-"Hibernate <literal>Transaction</literal> object."
-msgstr ""
-"EJB这样的托管环境有一项极为重要的特性,而它从未在非托管环境中提供过,那就是事"
-"务超时。在出现错误的事务行为的时候,超时可以确保不会无限挂起资源、对用户没有"
-"交代。在托管(JTA)环境之外,Hibernate无法完全提供这一功能。但是,Hiberante至少"
-"可以控制数据访问,确保数据库级别的死锁,和返回巨大结果集的查询被限定在一个规"
-"定的时间内。在托管环境中,Hibernate会把事务超时转交给JTA。这一功能通过"
-"Hibernate <literal>Transaction</literal>对象进行抽象。"
-
-#. Tag: programlisting
-#: transactions.xml:652
#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"Session sess = factory.openSession();\n"
-"try {\n"
-" //set transaction timeout to 3 seconds\n"
-" sess.getTransaction().setTimeout(3);\n"
-" sess.getTransaction().begin();\n"
-"\n"
-" // do some work\n"
-" ...\n"
-"\n"
-" sess.getTransaction().commit()\n"
-"}\n"
-"catch (RuntimeException e) {\n"
-" sess.getTransaction().rollback();\n"
-" throw e; // or display error message\n"
-"}\n"
-"finally {\n"
-" sess.close();\n"
-"}]]>"
-msgstr ""
+msgid "An important feature provided by a managed environment like EJB, that is
never provided for non-managed code, is transaction timeout. Transaction timeouts ensure
that no misbehaving transaction can indefinitely tie up resources while returning no
response to the user. Outside a managed (JTA) environment, Hibernate cannot fully provide
this functionality. However, Hibernate can at least control data access operations,
ensuring that database level deadlocks and queries with huge result sets are limited by a
defined timeout. In a managed environment, Hibernate can delegate transaction timeout to
JTA. This functionality is abstracted by the Hibernate
<literal>Transaction</literal> object."
+msgstr "EJB
这样的托管环境有一项极为重要的特性,而它从未在非托管环境中提供过,那就是事务超时。在出现错误的事务行为的时候,超时可以确保不会无限挂起资源、对用户没有交代。在托管(JTA)环境之外,Hibernate
无法完全提供这一功能。但是,Hiberante 至少可以控制数据访问,确保数据库级别的死锁,和返回巨大结果集的查询被限定在一个规定的时间内。在托管环境中,Hibernate
会把事务超时转交给 JTA。这一功能通过 Hibernate <literal>Transaction</literal> 对象进行抽象。 "
#. Tag: para
-#: transactions.xml:654
-#, fuzzy, no-c-format
-msgid ""
-"<literal>setTimeout()</literal> cannot be called in a CMT bean, where
"
-"transaction timeouts must be defined declaratively."
-msgstr ""
-"注意<literal>setTimeout()</literal>不应该在CMT bean中调用,此时事务超时值应该"
-"是被声明式定义的。"
+#, no-c-format
+msgid "<literal>setTimeout()</literal> cannot be called in a CMT bean,
where transaction timeouts must be defined declaratively."
+msgstr "注意 <literal>setTimeout()</literal> 不应该在 CMT bean
中调用,此时事务超时值应该是被声明式定义的。 "
#. Tag: title
-#: transactions.xml:664
#, no-c-format
msgid "Optimistic concurrency control"
-msgstr "乐观并发控制(Optimistic concurrency control)"
+msgstr "乐观并发控制(Optimistic concurrency control)"
#. Tag: para
-#: transactions.xml:666
-#, fuzzy, no-c-format
-msgid ""
-"The only approach that is consistent with high concurrency and high "
-"scalability, is optimistic concurrency control with versioning. Version "
-"checking uses version numbers, or timestamps, to detect conflicting updates "
-"and to prevent lost updates. Hibernate provides three possible approaches to
"
-"writing application code that uses optimistic concurrency. The use cases we "
-"discuss are in the context of long conversations, but version checking also "
-"has the benefit of preventing lost updates in single database transactions."
-msgstr ""
-"唯一能够同时保持高并发和高可伸缩性的方法就是使用带版本化的乐观并发控制。版本"
-"检查使用版本号、 或者时间戳来检测更新冲突(并且防止更新丢失)。Hibernate为使"
-"用乐观并发控制的代码提供了三种可 能的方法,应用程序在编写这些代码时,可以采用"
-"它们。我们已经在前面应用程序对话那部分展示了 乐观并发控制的应用场景,此外,在"
-"单个数据库事务范围内,版本检查也提供了防止更新丢失的好处。"
+#, no-c-format
+msgid "The only approach that is consistent with high concurrency and high
scalability, is optimistic concurrency control with versioning. Version checking uses
version numbers, or timestamps, to detect conflicting updates and to prevent lost updates.
Hibernate provides three possible approaches to writing application code that uses
optimistic concurrency. The use cases we discuss are in the context of long conversations,
but version checking also has the benefit of preventing lost updates in single database
transactions."
+msgstr "唯一能够同时保持高并发和高可伸缩性的方法就是使用带版本化的乐观并发控制。版本检查使用版本号、
或者时间戳来检测更新冲突(并且防止更新丢失)。Hibernate 为使用乐观并发控制的代码提供了三种可
能的方法,应用程序在编写这些代码时,可以采用它们。我们已经在前面应用程序对话那部分展示了 乐观并发控制的应用场景,此外,在单个数据库事务范围内,版本检查也提供了防止更新丢失的好处。
"
#. Tag: title
-#: transactions.xml:677
#, no-c-format
msgid "Application version checking"
-msgstr "应用程序级别的版本检查(Application version checking)"
+msgstr "应用程序级别的版本检查(Application version checking)"
#. Tag: para
-#: transactions.xml:679
-#, fuzzy, no-c-format
-msgid ""
-"In an implementation without much help from Hibernate, each interaction with
"
-"the database occurs in a new <literal>Session</literal> and the
developer is "
-"responsible for reloading all persistent instances from the database before "
-"manipulating them. The application is forced to carry out its own version "
-"checking to ensure conversation transaction isolation. This approach is the "
-"least efficient in terms of database access. It is the approach most similar
"
-"to entity EJBs."
-msgstr ""
-"未能充分利用Hibernate功能的实现代码中,每次和数据库交互都需要一个新的 "
-"<literal>Session</literal>,而且开发人员必须在显示数据之前从数据库中重 新载入"
-"所有的持久化对象实例。这种方式迫使应用程序自己实现版本检查来确保 对话事务的隔"
-"离,从数据访问的角度来说是最低效的。这种使用方式和 entity EJB最相似。"
-
-#. Tag: programlisting
-#: transactions.xml:688
#, no-c-format
-msgid ""
-"<![CDATA[// foo is an instance loaded by a previous Session\n"
-"session = factory.openSession();\n"
-"Transaction t = session.beginTransaction();\n"
-"\n"
-"int oldVersion = foo.getVersion();\n"
-"session.load( foo, foo.getKey() ); // load the current state\n"
-"if ( oldVersion != foo.getVersion() ) throw new StaleObjectStateException"
-"();\n"
-"foo.setProperty(\"bar\");\n"
-"\n"
-"t.commit();\n"
-"session.close();]]>"
-msgstr ""
+msgid "In an implementation without much help from Hibernate, each interaction with
the database occurs in a new <literal>Session</literal> and the developer is
responsible for reloading all persistent instances from the database before manipulating
them. The application is forced to carry out its own version checking to ensure
conversation transaction isolation. This approach is the least efficient in terms of
database access. It is the approach most similar to entity EJBs."
+msgstr "未能充分利用 Hibernate 功能的实现代码中,每次和数据库交互都需要一个新的
<literal>Session</literal>,而且开发人员必须在显示数据之前从数据库中重新载入所有的持久化对象实例。这种方式迫使应用程序自己实现版本检查来确保对话事务的隔离,从数据访问的角度来说是最低效的。这种使用方式和
entity EJB 最相似。 "
#. Tag: para
-#: transactions.xml:690
#, no-c-format
-msgid ""
-"The <literal>version</literal> property is mapped using
<literal><"
-"version></literal>, and Hibernate will automatically increment it
during "
-"flush if the entity is dirty."
-msgstr ""
-"<literal>version</literal> 属性使用
<literal><version></literal>来映"
-"射,如果对象 是脏数据,在同步的时候,Hibernate会自动增加版本号。"
+msgid "The <literal>version</literal> property is mapped using
<literal><version></literal>, and Hibernate will automatically
increment it during flush if the entity is dirty."
+msgstr "<literal>version</literal> 属性使用
<literal><version></literal> 来映射,如果对象是脏数据,在同步的时候,Hibernate
会自动增加版本号。"
#. Tag: para
-#: transactions.xml:696
-#, fuzzy, no-c-format
-msgid ""
-"If you are operating in a low-data-concurrency environment, and do not "
-"require version checking, you can use this approach and skip the version "
-"check. In this case, <emphasis>last commit wins</emphasis> is the
default "
-"strategy for long conversations. Be aware that this might confuse the users "
-"of the application, as they might experience lost updates without error "
-"messages or a chance to merge conflicting changes."
-msgstr ""
-"当然,如果你的应用是在一个低数据并发环境下,并不需要版本检查的话,你照样可以"
-"使用 这种方式,只不过跳过版本检查就是了。在这种情况下,<emphasis>最晚提交生效"
-"</emphasis> (<emphasis>last commit
wins</emphasis>)就是你的长对话的默认处理"
-"策略。 请记住这种策略可能会让应用软件的用户感到困惑,因为他们有可能会碰上更新"
-"丢失掉却没 有出错信息,或者需要合并更改冲突的情况。"
+#, no-c-format
+msgid "If you are operating in a low-data-concurrency environment, and do not
require version checking, you can use this approach and skip the version check. In this
case, <emphasis>last commit wins</emphasis> is the default strategy for long
conversations. Be aware that this might confuse the users of the application, as they
might experience lost updates without error messages or a chance to merge conflicting
changes."
+msgstr
"当然,如果你的应用是在一个低数据并发环境下,并不需要版本检查的话,你照样可以使用这种方式,只不过跳过版本检查就是了。在这种情况下,<emphasis>最晚提交生效</emphasis>
(<emphasis>last commit
wins</emphasis>)就是你的长对话的默认处理策略。请记住这种策略可能会让应用软件的用户感到困惑,因为他们有可能会碰上更新丢失掉却没有出错信息,或者需要合并更改冲突的情况。
"
#. Tag: para
-#: transactions.xml:705
-#, fuzzy, no-c-format
-msgid ""
-"Manual version checking is only feasible in trivial circumstances and not "
-"practical for most applications. Often not only single instances, but "
-"complete graphs of modified objects, have to be checked. Hibernate offers "
-"automatic version checking with either an extended
<literal>Session</"
-"literal> or detached instances as the design paradigm."
-msgstr ""
-"很明显,手工进行版本检查只适合于某些软件规模非常小的应用场景,对于大多数软件"
-"应用场景 来说并不现实。通常情况下,不仅是单个对象实例需要进行版本检查,整个被"
-"修改过的关 联对象图也都需要进行版本检查。作为标准设计范例,Hibernate使用扩展"
-"周期的 <literal>Session</literal>的方式,或者脱管对象实例的方式来提供自动版本"
-"检查。"
+#, no-c-format
+msgid "Manual version checking is only feasible in trivial circumstances and not
practical for most applications. Often not only single instances, but complete graphs of
modified objects, have to be checked. Hibernate offers automatic version checking with
either an extended <literal>Session</literal> or detached instances as the
design paradigm."
+msgstr
"很明显,手工进行版本检查只适合于某些软件规模非常小的应用场景,对于大多数软件应用场景来说并不现实。通常情况下,不仅是单个对象实例需要进行版本检查,整个被修改过的关联对象图也都需要进行版本检查。作为标准设计范例,Hibernate
使用扩展周期的 <literal>Session</literal> 的方式,或者脱管对象实例的方式来提供自动版本检查。 "
#. Tag: title
-#: transactions.xml:716
#, no-c-format
msgid "Extended session and automatic versioning"
-msgstr "扩展周期的session和自动版本化"
+msgstr "扩展周期的 session 和自动版本化"
#. Tag: para
-#: transactions.xml:718
-#, fuzzy, no-c-format
-msgid ""
-"A single <literal>Session</literal> instance and its persistent
instances "
-"that are used for the whole conversation are known as
<emphasis>session-per-"
-"conversation</emphasis>. Hibernate checks instance versions at flush time,
"
-"throwing an exception if concurrent modification is detected. It is up to "
-"the developer to catch and handle this exception. Common options are the "
-"opportunity for the user to merge changes or to restart the business "
-"conversation with non-stale data."
-msgstr ""
-"单个 <literal>Session</literal>实例和它所关联的所有持久化对象实例都被用于整"
-"个
对话,这被称为<emphasis>session-per-conversation</emphasis>。Hibernate在同"
-"步的时候进行对象实例的版本检查,如果检测到并发修 改则抛出异常。由开发人员来决"
-"定是否需要捕获和处理这个异常(通常的抉择是给用户 提供一个合并更改,或者在无脏"
-"数据情况下重新进行业务对话的机会)。"
+#, no-c-format
+msgid "A single <literal>Session</literal> instance and its persistent
instances that are used for the whole conversation are known as
<emphasis>session-per-conversation</emphasis>. Hibernate checks instance
versions at flush time, throwing an exception if concurrent modification is detected. It
is up to the developer to catch and handle this exception. Common options are the
opportunity for the user to merge changes or to restart the business conversation with
non-stale data."
+msgstr "单个 <literal>Session</literal> 实例和它所关联的所有持久化对象实例都被用于整个对话,这被称为
<emphasis>session-per-conversation</emphasis>。Hibernate
在同步的时候进行对象实例的版本检查,如果检测到并发修改则抛出异常。由开发人员来决定是否需要捕获和处理这个异常(通常的抉择是给用户
提供一个合并更改,或者在无脏数据情况下重新进行业务对话的机会)。 "
#. Tag: para
-#: transactions.xml:727
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>Session</literal> is disconnected from any underlying JDBC
"
-"connection when waiting for user interaction. This approach is the most "
-"efficient in terms of database access. The application does not version "
-"check or reattach detached instances, nor does it have to reload instances "
-"in every database transaction."
-msgstr ""
-"在等待用户交互的时候, <literal>Session</literal> 断开底层的JDBC连接。这种方"
-"式 以数据库访问的角度来说是最高效的方式。应用程序不需要关心版本检查或脱管对象"
-"实例 的重新关联,在每个数据库事务中,应用程序也不需要载入读取对象实例。"
-
-#. Tag: programlisting
-#: transactions.xml:735
#, no-c-format
-msgid ""
-"<![CDATA[// foo is an instance loaded earlier by the old session\n"
-"Transaction t = session.beginTransaction(); // Obtain a new JDBC connection,
"
-"start transaction\n"
-"\n"
-"foo.setProperty(\"bar\");\n"
-"\n"
-"session.flush(); // Only for last transaction in conversation\n"
-"t.commit(); // Also return JDBC connection\n"
-"session.close(); // Only for last transaction in conversation]]>"
-msgstr ""
+msgid "The <literal>Session</literal> is disconnected from any
underlying JDBC connection when waiting for user interaction. This approach is the most
efficient in terms of database access. The application does not version check or reattach
detached instances, nor does it have to reload instances in every database
transaction."
+msgstr "在等待用户交互的时候, <literal>Session</literal> 断开底层的 JDBC
连接。这种方式以数据库访问的角度来说是最高效的方式。应用程序不需要关心版本检查或脱管对象实例的重新关联,在每个数据库事务中,应用程序也不需要载入读取对象实例。 "
#. Tag: para
-#: transactions.xml:736
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>foo</literal> object knows which
<literal>Session</literal> it "
-"was loaded in. Beginning a new database transaction on an old session "
-"obtains a new connection and resumes the session. Committing a database "
-"transaction disconnects a session from the JDBC connection and returns the "
-"connection to the pool. After reconnection, to force a version check on data
"
-"you are not updating, you can call <literal>Session.lock()</literal>
with "
-"<literal>LockMode.READ</literal> on any objects that might have been
updated "
-"by another transaction. You do not need to lock any data that you "
-"<emphasis>are</emphasis> updating. Usually you would set
<literal>FlushMode."
-"MANUAL</literal> on an extended <literal>Session</literal>, so
that only the "
-"last database transaction cycle is allowed to actually persist all "
-"modifications made in this conversation. Only this last database transaction
"
-"will include the <literal>flush()</literal> operation, and then "
-"<literal>close()</literal> the session to end the conversation."
-msgstr ""
-"<literal>foo</literal>对象知道它是在哪个<literal>Session</literal>中被装入"
-"的。在一个旧session中开启一个新的数据库事务,会导致session获取一个新的连接,"
-"并恢复session的功能。将数据库事务提交,使得session从JDBC连接断开,并将此连接"
-"交还给连接池。在重新连接之后,要强制对你没有更新的数据进行一次版本检查,你可"
-"以对所有可能被其他事务修改过的对象,使用参数<literal>LockMode.READ</literal>"
-"来调用<literal>Session.lock()</literal>。你不用lock任何你<emphasis>正在</"
-"emphasis>更新的数据。一般你会在扩展的<literal>Session</literal>上设置"
-"<literal>FlushMode.MANUAL</literal>,因此只有最后一个数据库事务循环才会真正的"
-"吧整个对话中发生的修改发送到数据库。因此,只有这最后一次数据库事务才会包含"
-"<literal>flush()</literal>操作,然后在整个对话结束后,还要<literal>close()</"
-"literal>这个session。"
+#, no-c-format
+msgid "The <literal>foo</literal> object knows which
<literal>Session</literal> it was loaded in. Beginning a new database
transaction on an old session obtains a new connection and resumes the session. Committing
a database transaction disconnects a session from the JDBC connection and returns the
connection to the pool. After reconnection, to force a version check on data you are not
updating, you can call <literal>Session.lock()</literal> with
<literal>LockMode.READ</literal> on any objects that might have been updated
by another transaction. You do not need to lock any data that you
<emphasis>are</emphasis> updating. Usually you would set
<literal>FlushMode.MANUAL</literal> on an extended
<literal>Session</literal>, so that only the last database transaction cycle
is allowed to actually persist all modifications made in this conversation. Only this last
database transaction will include the <literal>flush()</literal> operation,
and then <literal>close()</literal> the se!
ssion to end the conversation."
+msgstr "<literal>foo</literal> 对象知道它是在哪个
<literal>Session</literal> 中被装入的。在一个旧 session 中开启一个新的数据库事务,会导致 session
获取一个新的连接,并恢复 session 的功能。将数据库事务提交,使得 session 从 JDBC
连接断开,并将此连接交还给连接池。在重新连接之后,要强制对你没有更新的数据进行一次版本检查,你可以对所有可能被其他事务修改过的对象,使用参数
<literal>LockMode.READ</literal> 来调用
<literal>Session.lock()</literal>。你不用 lock
任何你<emphasis>正在</emphasis>更新的数据。一般你会在扩展的
<literal>Session</literal> 上设置
<literal>FlushMode.NEVER</literal>,因此只有最后一个数据库事务循环才会真正的把整个对话中发生的修改发送到数据库。因此,只有这最后一次数据库事务才会包含
<literal>flush()</literal> 操作,然后在整个对话结束后�!
�还要 <literal>close()</literal> 这个 session。 "
#. Tag: para
-#: transactions.xml:751
-#, fuzzy, no-c-format
-msgid ""
-"This pattern is problematic if the <literal>Session</literal> is too
big to "
-"be stored during user think time (for example, an
<literal>HttpSession</"
-"literal> should be kept as small as possible). As the
<literal>Session</"
-"literal> is also the first-level cache and contains all loaded objects, we
"
-"can probably use this strategy only for a few request/response cycles. Use a
"
-"<literal>Session</literal> only for a single conversation as it will
soon "
-"have stale data."
-msgstr ""
-"如果在用户思考的过程中,<literal>Session</literal>因为太大了而不能保存,那么"
-"这种模式是有 问题的。举例来说,一个<literal>HttpSession</literal>应该尽可能的"
-"小。由于 <literal>Session</literal>是一级缓存,并且保持了所有被载入过的对象,"
-"因此 我们只应该在那些少量的request/response情况下使用这种策略。你应该只把一个"
-"<literal>Session</literal>用于单个对话,因为它很快就会出现脏数据。"
+#, no-c-format
+msgid "This pattern is problematic if the <literal>Session</literal> is
too big to be stored during user think time (for example, an
<literal>HttpSession</literal> should be kept as small as possible). As the
<literal>Session</literal> is also the first-level cache and contains all
loaded objects, we can probably use this strategy only for a few request/response cycles.
Use a <literal>Session</literal> only for a single conversation as it will
soon have stale data."
+msgstr "如果在用户思考的过程中,<literal>Session</literal>
因为太大了而不能保存,那么这种模式是有问题的。举例来说,一个 <literal>HttpSession</literal> 应该尽可能的小。由于
<literal>Session</literal> 是一级缓存,并且保持了所有被载入过的对象,因此我们只应该在那些少量的 request/response
情况下使用这种策略。你应该只把一个 <literal>Session</literal> 用于单个对话,因为它很快就会出现脏数据。 "
#. Tag: title
-#: transactions.xml:762
#, no-c-format
msgid "Note"
-msgstr ""
+msgstr "注意"
#. Tag: para
-#: transactions.xml:763
-#, fuzzy, no-c-format
-msgid ""
-"Earlier versions of Hibernate required explicit disconnection and "
-"reconnection of a <literal>Session</literal>. These methods are
deprecated, "
-"as beginning and ending a transaction has the same effect."
-msgstr ""
-"(注意,早期的Hibernate版本需要明确的对<literal>Session</literal>进行"
-"disconnec和reconnect。这些方法现在已经过时了,打开事务和关闭事务会起到同样的"
-"效果。)"
+#, no-c-format
+msgid "Earlier versions of Hibernate required explicit disconnection and
reconnection of a <literal>Session</literal>. These methods are deprecated, as
beginning and ending a transaction has the same effect."
+msgstr "注意,早期的 Hibernate 版本需要明确的对 <literal>Session</literal> 进行
disconnect 和 reconnect。这些方法现在已经过时了,打开事务和关闭事务会起到同样的效果。"
#. Tag: para
-#: transactions.xml:769
-#, fuzzy, no-c-format
-msgid ""
-"Keep the disconnected <literal>Session</literal> close to the
persistence "
-"layer. Use an EJB stateful session bean to hold the
<literal>Session</"
-"literal> in a three-tier environment. Do not transfer it to the web layer,
"
-"or even serialize it to a separate tier, to store it in the "
-"<literal>HttpSession</literal>."
-msgstr ""
-"此外,也请注意,你应该让与数据库连接断开的<literal>Session</literal>对持久层"
-"保持 关闭状态。换句话说,在三层环境中,使用有状态的EJB session bean来持有"
-"<literal>Session</literal>, 而不要把它传递到web层(甚至把它序列化到一个单独"
-"的层),保存在<literal>HttpSession</literal>中。"
+#, no-c-format
+msgid "Keep the disconnected <literal>Session</literal> close to the
persistence layer. Use an EJB stateful session bean to hold the
<literal>Session</literal> in a three-tier environment. Do not transfer it to
the web layer, or even serialize it to a separate tier, to store it in the
<literal>HttpSession</literal>."
+msgstr "此外,也请注意,你应该让与数据库连接断开的 <literal>Session</literal>
对持久层保持关闭状态。换句话说,在三层环境中,使用有状态的 EJB session bean 来持 有<literal>Session</literal>,
而不要把它传递到 web 层(甚至把它序列化到一个单独的层),保存在 <literal>HttpSession</literal> 中。 "
#. Tag: para
-#: transactions.xml:777
-#, fuzzy, no-c-format
-msgid ""
-"The extended session pattern, or
<emphasis>session-per-conversation</"
-"emphasis>, is more difficult to implement with automatic current session "
-"context management. You need to supply your own implementation of the "
-"<literal>CurrentSessionContext</literal> for this. See the Hibernate
Wiki "
-"for examples."
-msgstr ""
-"扩展session模式,或者被称为<emphasis>每次对话一个session(session-per-"
-"conversation)</emphasis>, 在与自动管理当前session上下文联用的时候会更困难。你"
-"需要提供你自己的<literal>CurrentSessionContext</literal>实现。请参阅"
-"Hibernate Wiki以获得示例。"
+#, no-c-format
+msgid "The extended session pattern, or
<emphasis>session-per-conversation</emphasis>, is more difficult to implement
with automatic current session context management. You need to supply your own
implementation of the <literal>CurrentSessionContext</literal> for this. See
the Hibernate Wiki for examples."
+msgstr "扩展 session
模式,或者被称为<emphasis>每次对话一个session(session-per-conversation)</emphasis>,自动管理当前
session 上下文联用的时候会更困难。你需要提供你自己的 <literal>CurrentSessionContext</literal> 实现。请参阅
Hibernate Wiki 以获得示例。 "
#. Tag: title
-#: transactions.xml:787
#, no-c-format
msgid "Detached objects and automatic versioning"
-msgstr "脱管对象(deatched object)和自动版本化"
+msgstr "脱管对象(deatched object)和自动版本化"
#. Tag: para
-#: transactions.xml:789
#, no-c-format
-msgid ""
-"Each interaction with the persistent store occurs in a new
<literal>Session</"
-"literal>. However, the same persistent instances are reused for each "
-"interaction with the database. The application manipulates the state of "
-"detached instances originally loaded in another
<literal>Session</literal> "
-"and then reattaches them using <literal>Session.update()</literal>,
"
-"<literal>Session.saveOrUpdate()</literal>, or
<literal>Session.merge()</"
-"literal>."
-msgstr ""
-"这种方式下,与持久化存储的每次交互都发生在一个新的<literal>Session</literal>"
-"中。 然而,同一持久化对象实例可以在多次与数据库的交互中重用。应用程序操纵脱管"
-"对象实例 的状态,这个脱管对象实例最初是在另一个<literal>Session</literal> 中"
-"载入的,然后 调用
<literal>Session.update()</literal>,<literal>Session."
-"saveOrUpdate()</literal>, 或者 <literal>Session.merge()</literal>
来重新关联"
-"该对象实例。"
+msgid "Each interaction with the persistent store occurs in a new
<literal>Session</literal>. However, the same persistent instances are reused
for each interaction with the database. The application manipulates the state of detached
instances originally loaded in another <literal>Session</literal> and then
reattaches them using <literal>Session.update()</literal>,
<literal>Session.saveOrUpdate()</literal>, or
<literal>Session.merge()</literal>."
+msgstr "这种方式下,与持久化存储的每次交互都发生在一个新的 <literal>Session</literal>
中。然而,同一持久化对象实例可以在多次与数据库的交互中重用。应用程序操纵脱管对象实例 的状态,这个脱管对象实例最初是在另一个
<literal>Session</literal> 中载入的,然后调用
<literal>Session.update()</literal>,<literal>Session.saveOrUpdate()</literal>,或者
<literal>Session.merge()</literal> 来重新关联该对象实例。"
-#. Tag: programlisting
-#: transactions.xml:797
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[// foo is an instance loaded by a previous Session\n"
-"foo.setProperty(\"bar\");\n"
-"session = factory.openSession();\n"
-"Transaction t = session.beginTransaction();\n"
-"session.saveOrUpdate(foo); // Use merge() if \"foo\" might have been
loaded "
-"already\n"
-"t.commit();\n"
-"session.close();]]>"
-msgstr ""
+msgid "Again, Hibernate will check instance versions during flush, throwing an
exception if conflicting updates occurred."
+msgstr "Hibernate 会再一次在同步的时候检查对象实例的版本,如果发生更新冲突,就抛出异常。 "
#. Tag: para
-#: transactions.xml:799
-#, fuzzy, no-c-format
-msgid ""
-"Again, Hibernate will check instance versions during flush, throwing an "
-"exception if conflicting updates occurred."
-msgstr ""
-"Hibernate会再一次在同步的时候检查对象实例的版本,如果发生更新冲突,就抛出异"
-"常。"
+#, no-c-format
+msgid "You can also call <literal>lock()</literal> instead of
<literal>update()</literal>, and use
<literal>LockMode.READ</literal> (performing a version check and bypassing all
caches) if you are sure that the object has not been modified."
+msgstr "如果你确信对象没有被修改过,你也可以调用 <literal>lock()</literal> 来设置
<literal>LockMode.READ</literal>(绕过所有的缓存,执行版本检查),从而取代
<literal>update()</literal> 操作。 "
-#. Tag: para
-#: transactions.xml:804
-#, fuzzy, no-c-format
-msgid ""
-"You can also call <literal>lock()</literal> instead of
<literal>update()</"
-"literal>, and use <literal>LockMode.READ</literal> (performing a
version "
-"check and bypassing all caches) if you are sure that the object has not been
"
-"modified."
-msgstr ""
-"如果你确信对象没有被修改过,你也可以调用<literal>lock()</literal> 来设置 "
-"<literal>LockMode.READ</literal>(绕过所有的缓存,执行版本检查),从而取 代 "
-"<literal>update()</literal>操作。"
-
#. Tag: title
-#: transactions.xml:813
#, no-c-format
msgid "Customizing automatic versioning"
msgstr "定制自动版本化行为"
#. Tag: para
-#: transactions.xml:815
-#, fuzzy, no-c-format
-msgid ""
-"You can disable Hibernate's automatic version increment for particular "
-"properties and collections by setting the
<literal>optimistic-lock</literal> "
-"mapping attribute to <literal>false</literal>. Hibernate will then no
longer "
-"increment versions if the property is dirty."
-msgstr ""
-"对于特定的属性和集合,通过为它们设置映射属性<literal>optimistic-lock</"
-"literal>的值 为<literal>false</literal>,来禁止Hibernate的版本自动增加。这样"
-"的话,如果该属性 脏数据,Hibernate将不再增加版本号。"
+#, no-c-format
+msgid "You can disable Hibernate's automatic version increment for particular
properties and collections by setting the <literal>optimistic-lock</literal>
mapping attribute to <literal>false</literal>. Hibernate will then no longer
increment versions if the property is dirty."
+msgstr "对于特定的属性和集合,通过为它们设置映射属性 <literal>optimistic-lock</literal> 的值为
<literal>false</literal>,来禁止 Hibernate 的版本自动增加。这样的话,如果该属性脏数据,Hibernate
将不再增加版本号。 "
#. Tag: para
-#: transactions.xml:822
-#, fuzzy, no-c-format
-msgid ""
-"Legacy database schemas are often static and cannot be modified. Or, other "
-"applications might access the same database and will not know how to handle "
-"version numbers or even timestamps. In both cases, versioning cannot rely on
"
-"a particular column in a table. To force a version check with a comparison "
-"of the state of all fields in a row but without a version or timestamp "
-"property mapping, turn on
<literal>optimistic-lock=\"all\"</literal> in the "
-"<literal><class></literal> mapping. This conceptually
only works if "
-"Hibernate can compare the old and the new state (i.e., if you use a single "
-"long <literal>Session</literal> and not
session-per-request-with-detached-"
-"objects)."
-msgstr ""
-"遗留系统的数据库Schema通常是静态的,不可修改的。或者,其他应用程序也可能访问"
-"同一数据 库,根本无法得知如何处理版本号,甚至时间戳。在以上的所有场景中,实现"
-"版本化不能依靠 数据库表的某个特定列。在<literal><class></literal>的映射"
-"中设置
<literal>optimistic-lock=\"all\"</literal>可以在没有版本或者时间戳属性"
-"映射的情况下实现 版本检查,此时Hibernate将比较一行记录的每个字段的状态。请注"
-"意,只有当Hibernate能够比 较新旧状态的情况下,这种方式才能生效,也就是说, 你"
-"必须使用单个长生命周期<literal>Session</literal>模式,而不能使用 session-per-"
-"request-with-detached-objects模式。"
+#, no-c-format
+msgid "Legacy database schemas are often static and cannot be modified. Or, other
applications might access the same database and will not know how to handle version
numbers or even timestamps. In both cases, versioning cannot rely on a particular column
in a table. To force a version check with a comparison of the state of all fields in a row
but without a version or timestamp property mapping, turn on
<literal>optimistic-lock=\"all\"</literal> in the
<literal><class></literal> mapping. This conceptually only works
if Hibernate can compare the old and the new state (i.e., if you use a single long
<literal>Session</literal> and not
session-per-request-with-detached-objects)."
+msgstr "遗留系统的数据库 Schema
通常是静态的,不可修改的。或者,其他应用程序也可能访问同一数据库,根本无法得知如何处理版本号,甚至时间戳。在以上的所有场景中,实现版本化不能依靠数据库表的某个特定列。在
<literal><class></literal> 的映射中设置
<literal>optimistic-lock=\"all\"</literal>
可以在没有版本或者时间戳属性映射的情况下实现版本检查,此时 Hibernate 将比较一行记录的每个字段的状态。请注意,只有当 Hibernate
能够比较新旧状态的情况下,这种方式才能生效,也就是说,你必须使用单个长生命周期 <literal>Session</literal> 模式,而不能使用
session-per-request-with-detached-objects 模式。 "
#. Tag: para
-#: transactions.xml:834
-#, fuzzy, no-c-format
-msgid ""
-"Concurrent modification can be permitted in instances where the changes that
"
-"have been made do not overlap. If you set
<literal>optimistic-lock=\"dirty"
-"\"</literal> when mapping the
<literal><class></literal>, Hibernate "
-"will only compare dirty fields during flush."
-msgstr ""
-"有些情况下,只要更改不发生交错,并发修改也是允许的。当你在<literal><"
-"class></literal>
的映射中设置<literal>optimistic-lock=\"dirty\"</"
-"literal>,Hibernate在同步的时候将只比较有脏 数据的字段。"
+#, no-c-format
+msgid "Concurrent modification can be permitted in instances where the changes that
have been made do not overlap. If you set
<literal>optimistic-lock=\"dirty\"</literal> when mapping the
<literal><class></literal>, Hibernate will only compare dirty
fields during flush."
+msgstr "有些情况下,只要更改不发生交错,并发修改也是允许的。当你在
<literal><class></literal> 的映射中设置
<literal>optimistic-lock=\"dirty\"</literal>,Hibernate
在同步的时候将只比较有脏数据的字段。 "
#. Tag: para
-#: transactions.xml:840
-#, fuzzy, no-c-format
-msgid ""
-"In both cases, with dedicated version/timestamp columns or with a full/dirty
"
-"field comparison, Hibernate uses a single <literal>UPDATE</literal>
"
-"statement, with an appropriate <literal>WHERE</literal> clause, per
entity "
-"to execute the version check and update the information. If you use "
-"transitive persistence to cascade reattachment to associated entities, "
-"Hibernate may execute unnecessary updates. This is usually not a problem, "
-"but <emphasis>on update</emphasis> triggers in the database might be
"
-"executed even when no changes have been made to detached instances. You can "
-"customize this behavior by setting
<literal>select-before-update=\"true\"</"
-"literal> in the <literal><class></literal> mapping,
forcing Hibernate "
-"to <literal>SELECT</literal> the instance to ensure that changes did
occur "
-"before updating the row."
-msgstr ""
-"在以上所有场景中,不管是专门设置一个版本/时间戳列,还是进行全部字段/脏数据字"
-"段比较, Hibernate都会针对每个实体对象发送一条<literal>UPDATE</literal>(带有"
-"相应的 <literal>WHERE</literal>语句 )的SQL语句来执行版本检查和数据更新。如果"
-"你对关联实体 设置级联关系使用传播性持久化(transitive persistence),那么"
-"Hibernate可能会执行不必 要的update语句。这通常不是个问题,但是数据库里面对"
-"<emphasis>on update</emphasis>点火 的触发器可能在脱管对象没有任何更改的情况下"
-"被触发。因此,你可以在 <literal><class></literal>的映射中,通过设置"
-"<literal>select-before-update=\"true\"</literal>
来定制这一行为,强制"
-"Hibernate <literal>SELECT</literal>这个对象实例,从而保证, 在更新记录之前,"
-"对象的确是被修改过。"
+#, no-c-format
+msgid "In both cases, with dedicated version/timestamp columns or with a full/dirty
field comparison, Hibernate uses a single <literal>UPDATE</literal> statement,
with an appropriate <literal>WHERE</literal> clause, per entity to execute the
version check and update the information. If you use transitive persistence to cascade
reattachment to associated entities, Hibernate may execute unnecessary updates. This is
usually not a problem, but <emphasis>on update</emphasis> triggers in the
database might be executed even when no changes have been made to detached instances. You
can customize this behavior by setting
<literal>select-before-update=\"true\"</literal> in the
<literal><class></literal> mapping, forcing Hibernate to
<literal>SELECT</literal> the instance to ensure that changes did occur before
updating the row."
+msgstr "在以上所有场景中,不管是专门设置一个版本/时间戳列,还是进行全部字段/脏数据字段比较,Hibernate 都会针对每个实体对象发送一条
<literal>UPDATE</literal>(带有相应的 <literal>WHERE</literal> 语句 )的 SQL
语句来执行版本检查和数据更新。如果你对关联实体 设置级联关系使用传播性持久化(transitive persistence),那么 Hibernate 可能会执行不必
要的update语句。这通常不是个问题,但是数据库里面对 <emphasis>on update</emphasis> 点火
的触发器可能在脱管对象没有任何更改的情况下被触发。因此,你可以在 <literal><class></literal>
的映射中,通过设置<literal>select-before-update=\"true\"</literal> 来定制这一行为,强制
Hibernate <literal>SELECT</literal> 这个对象实例,从而保证,在更新记录之前,对象的确是被修改过。 "
#. Tag: title
-#: transactions.xml:858
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Pessimistic locking"
-msgstr "悲观锁定(Pessimistic Locking)"
+msgstr "悲观锁定(Pessimistic Locking) "
#. Tag: para
-#: transactions.xml:860
-#, fuzzy, no-c-format
-msgid ""
-"It is not intended that users spend much time worrying about locking "
-"strategies. It is usually enough to specify an isolation level for the JDBC "
-"connections and then simply let the database do all the work. However, "
-"advanced users may wish to obtain exclusive pessimistic locks or re-obtain "
-"locks at the start of a new transaction."
-msgstr ""
-"用户其实并不需要花很多精力去担心锁定策略的问题。通常情况下,只要为JDBC连接指"
-"定一下隔 离级别,然后让数据库去搞定一切就够了。然而,高级用户有时候希望进行一"
-"个排它的悲观锁定, 或者在一个新的事务启动的时候,重新进行锁定。"
+#, no-c-format
+msgid "It is not intended that users spend much time worrying about locking
strategies. It is usually enough to specify an isolation level for the JDBC connections
and then simply let the database do all the work. However, advanced users may wish to
obtain exclusive pessimistic locks or re-obtain locks at the start of a new
transaction."
+msgstr "用户其实并不需要花很多精力去担心锁定策略的问题。通常情况下,只要为 JDBC
连接指定一下隔离级别,然后让数据库去搞定一切就够了。然而,高级用户有时候希望进行一个排它的悲观锁定,或者在一个新的事务启动的时候,重新进行锁定。 "
#. Tag: para
-#: transactions.xml:867
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate will always use the locking mechanism of the database; it never "
-"lock objects in memory."
-msgstr "Hibernate总是使用数据库的锁定机制,从不在内存中锁定对象!"
+#, no-c-format
+msgid "Hibernate will always use the locking mechanism of the database; it never
lock objects in memory."
+msgstr "Hibernate 总是使用数据库的锁定机制,从不在内存中锁定对象。"
#. Tag: para
-#: transactions.xml:872
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>LockMode</literal> class defines the different lock levels
that "
-"can be acquired by Hibernate. A lock is obtained by the following
mechanisms:"
-msgstr ""
-"类<literal>LockMode</literal> 定义了Hibernate所需的不同的锁定级别。一个锁定 "
-"可以通过以下的机制来设置:"
+#, no-c-format
+msgid "The <literal>LockMode</literal> class defines the different lock
levels that can be acquired by Hibernate. A lock is obtained by the following
mechanisms:"
+msgstr "类 <literal>LockMode</literal> 定义了 Hibernate
所需的不同的锁定级别。一个锁定可以通过以下的机制来设置:"
#. Tag: para
-#: transactions.xml:879
#, no-c-format
-msgid ""
-"<literal>LockMode.WRITE</literal> is acquired automatically when
Hibernate "
-"updates or inserts a row."
-msgstr ""
-"当Hibernate更新或者插入一行记录的时候,锁定级别自动设置为<literal>LockMode."
-"WRITE</literal>。"
+msgid "<literal>LockMode.WRITE</literal> is acquired automatically when
Hibernate updates or inserts a row."
+msgstr "当 Hibernate 更新或者插入一行记录的时候,锁定级别自动设置为
<literal>LockMode.WRITE</literal>。"
#. Tag: para
-#: transactions.xml:885
-#, fuzzy, no-c-format
-msgid ""
-"<literal>LockMode.UPGRADE</literal> can be acquired upon explicit user
"
-"request using <literal>SELECT ... FOR UPDATE</literal> on databases
which "
-"support that syntax."
-msgstr ""
-"当用户显式的使用数据库支持的SQL格式<literal>SELECT ... FOR UPDATE</literal> "
-"发送SQL的时候,锁定级别设置为<literal>LockMode.UPGRADE</literal>"
+#, no-c-format
+msgid "<literal>LockMode.UPGRADE</literal> can be acquired upon explicit
user request using <literal>SELECT ... FOR UPDATE</literal> on databases which
support that syntax."
+msgstr "当用户显式的使用数据库支持的 SQL 格式 <literal>SELECT ... FOR UPDATE</literal>
发送 SQL 的时候,锁定级别设置为 <literal>LockMode.UPGRADE</literal>。 "
#. Tag: para
-#: transactions.xml:891
-#, fuzzy, no-c-format
-msgid ""
-"<literal>LockMode.UPGRADE_NOWAIT</literal> can be acquired upon
explicit "
-"user request using a <literal>SELECT ... FOR UPDATE NOWAIT</literal>
under "
-"Oracle."
-msgstr ""
-"当用户显式的使用Oracle数据库的SQL语句<literal>SELECT ... FOR UPDATE NOWAIT</"
-"literal> 的时候,锁定级别设置<literal>LockMode.UPGRADE_NOWAIT</literal>"
+#, no-c-format
+msgid "<literal>LockMode.UPGRADE_NOWAIT</literal> can be acquired upon
explicit user request using a <literal>SELECT ... FOR UPDATE NOWAIT</literal>
under Oracle."
+msgstr "当用户显式的使用 Oracle 数据库的 SQL 语句 <literal>SELECT ... FOR UPDATE
NOWAIT</literal> 的时候,锁定级别设置 <literal>LockMode.UPGRADE_NOWAIT</literal>。
"
#. Tag: para
-#: transactions.xml:897
-#, fuzzy, no-c-format
-msgid ""
-"<literal>LockMode.READ</literal> is acquired automatically when
Hibernate "
-"reads data under Repeatable Read or Serializable isolation level. It can be "
-"re-acquired by explicit user request."
-msgstr ""
-"当Hibernate在“可重复读”或者是“序列化”数据库隔离级别下读取数据的时候,锁定模"
-"式 自动设置为<literal>LockMode.READ</literal>。这种模式也可以通过用户显式指定"
-"进行设置。"
+#, no-c-format
+msgid "<literal>LockMode.READ</literal> is acquired automatically when
Hibernate reads data under Repeatable Read or Serializable isolation level. It can be
re-acquired by explicit user request."
+msgstr "当 Hibernate 在“可重复读”或者是“序列化”数据库隔离级别下读取数据的时候,锁定模式自动设置为
<literal>LockMode.READ</literal>。这种模式也可以通过用户显式指定进行设置。 "
#. Tag: para
-#: transactions.xml:904
#, no-c-format
-msgid ""
-"<literal>LockMode.NONE</literal> represents the absence of a lock. All
"
-"objects switch to this lock mode at the end of a
<literal>Transaction</"
-"literal>. Objects associated with the session via a call to
<literal>update()"
-"</literal> or <literal>saveOrUpdate()</literal> also start out in
this lock "
-"mode."
-msgstr ""
-"<literal>LockMode.NONE</literal>
代表无需锁定。在<literal>Transaction</"
-"literal>结束时, 所有的对象都切换到该模式上来。与session相关联的对象通过调用"
-"<literal>update()</literal>
或者<literal>saveOrUpdate()</literal>脱离该模式。"
+msgid "<literal>LockMode.NONE</literal> represents the absence of a
lock. All objects switch to this lock mode at the end of a
<literal>Transaction</literal>. Objects associated with the session via a call
to <literal>update()</literal> or
<literal>saveOrUpdate()</literal> also start out in this lock mode."
+msgstr "<literal>LockMode.NONE</literal> 代表无需锁定。在
<literal>Transaction</literal> 结束时, 所有的对象都切换到该模式上来。与 session 相关联的对象通过调用
<literal>update()</literal> 或者 <literal>saveOrUpdate()</literal>
脱离该模式。"
#. Tag: para
-#: transactions.xml:913
#, no-c-format
-msgid ""
-"The \"explicit user request\" is expressed in one of the following
ways:"
-msgstr "\"显式的用户指定\"可以通过以下几种方式之一来表示:"
+msgid "The \"explicit user request\" is expressed in one of the following
ways:"
+msgstr "\"显式的用户指定\"可以通过以下几种方式之一来表示:"
#. Tag: para
-#: transactions.xml:919
#, no-c-format
-msgid ""
-"A call to <literal>Session.load()</literal>, specifying a
<literal>LockMode</"
-"literal>."
-msgstr ""
-"调用
<literal>Session.load()</literal>的时候指定<literal>锁定模式(LockMode)</"
-"literal>。"
+msgid "A call to <literal>Session.load()</literal>, specifying a
<literal>LockMode</literal>."
+msgstr "调用 <literal>Session.load()</literal>
的时候指定<literal>锁定模式(LockMode)</literal>。"
#. Tag: para
-#: transactions.xml:924
#, no-c-format
msgid "A call to <literal>Session.lock()</literal>."
-msgstr "调用<literal>Session.lock()</literal>。"
+msgstr "调用 <literal>Session.lock()</literal>。"
#. Tag: para
-#: transactions.xml:929
#, no-c-format
msgid "A call to <literal>Query.setLockMode()</literal>."
-msgstr "调用<literal>Query.setLockMode()</literal>。"
+msgstr "调用 <literal>Query.setLockMode()</literal>。"
#. Tag: para
-#: transactions.xml:935
#, no-c-format
-msgid ""
-"If <literal>Session.load()</literal> is called with
<literal>UPGRADE</"
-"literal> or <literal>UPGRADE_NOWAIT</literal>, and the requested
object was "
-"not yet loaded by the session, the object is loaded using "
-"<literal>SELECT ... FOR UPDATE</literal>. If
<literal>load()</literal> is "
-"called for an object that is already loaded with a less restrictive lock "
-"than the one requested, Hibernate calls <literal>lock()</literal> for
that "
-"object."
-msgstr ""
-"如果在<literal>UPGRADE</literal>或者<literal>UPGRADE_NOWAIT</literal>锁定模式"
-"下调 用<literal>Session.load()</literal>,并且要读取的对象尚未被session载入"
-"过,那么对象 通过<literal>SELECT ... FOR UPDATE</literal>这样的SQL语句被载"
-"入。如果为一个对象调用 <literal>load()</literal>方法时,该对象已经在另一个较"
-"少限制的锁定模式下被载入了,那 么Hibernate就对该对象调用<literal>lock()</"
-"literal> 方法。"
+msgid "If <literal>Session.load()</literal> is called with
<literal>UPGRADE</literal> or <literal>UPGRADE_NOWAIT</literal>,
and the requested object was not yet loaded by the session, the object is loaded using
<literal>SELECT ... FOR UPDATE</literal>. If
<literal>load()</literal> is called for an object that is already loaded with
a less restrictive lock than the one requested, Hibernate calls
<literal>lock()</literal> for that object."
+msgstr "如果在 <literal>UPGRADE</literal> 或者
<literal>UPGRADE_NOWAIT</literal> 锁定模式下调用
<literal>Session.load()</literal>,并且要读取的对象尚未被 session 载入过,那么对象通过
<literal>SELECT ... FOR UPDATE</literal> 这样的 SQL 语句被载入。如果为一个对象调用
<literal>load()</literal> 方法时,该对象已经在另一个较少限制的锁定模式下被载入了,那么 Hibernate 就对该对象调用
<literal>lock()</literal> 方法。"
#. Tag: para
-#: transactions.xml:944
-#, fuzzy, no-c-format
-msgid ""
-"<literal>Session.lock()</literal> performs a version number check if
the "
-"specified lock mode is <literal>READ</literal>,
<literal>UPGRADE</literal> "
-"or <literal>UPGRADE_NOWAIT</literal>. In the case of
<literal>UPGRADE</"
-"literal> or <literal>UPGRADE_NOWAIT</literal>, <literal>SELECT
... FOR "
-"UPDATE</literal> is used."
-msgstr ""
-"如果指定的锁定模式是<literal>READ</literal>,
<literal>UPGRADE</literal> 或 "
-"<literal>UPGRADE_NOWAIT</literal>,那么<literal>Session.lock()</literal>就
执"
-"行版本号检查。(在<literal>UPGRADE</literal>
或者<literal>UPGRADE_NOWAIT</"
-"literal> 锁定模式下,执行<literal>SELECT ... FOR
UPDATE</literal>这样的SQL语"
-"句。)"
+#, no-c-format
+msgid "<literal>Session.lock()</literal> performs a version number check
if the specified lock mode is <literal>READ</literal>,
<literal>UPGRADE</literal> or <literal>UPGRADE_NOWAIT</literal>.
In the case of <literal>UPGRADE</literal> or
<literal>UPGRADE_NOWAIT</literal>, <literal>SELECT ... FOR
UPDATE</literal> is used."
+msgstr "如果指定的锁定模式是
<literal>READ</literal>,<literal>UPGRADE</literal> 或
<literal>UPGRADE_NOWAIT</literal>,那么
<literal>Session.lock()</literal> 就执行版本号检查。(在
<literal>UPGRADE</literal> 或者 <literal>UPGRADE_NOWAIT</literal>
锁定模式下,执行 <literal>SELECT ... FOR UPDATE</literal>这样的SQL语句。)"
#. Tag: para
-#: transactions.xml:951
-#, fuzzy, no-c-format
-msgid ""
-"If the requested lock mode is not supported by the database, Hibernate uses "
-"an appropriate alternate mode instead of throwing an exception. This ensures
"
-"that applications are portable."
-msgstr ""
-"如果数据库不支持用户设置的锁定模式,Hibernate将使用适当的替代模式(而不是扔出"
-"异常)。 这一点可以确保应用程序的可移植性。"
+#, no-c-format
+msgid "If the requested lock mode is not supported by the database, Hibernate uses
an appropriate alternate mode instead of throwing an exception. This ensures that
applications are portable."
+msgstr "如果数据库不支持用户设置的锁定模式,Hibernate 将使用适当的替代模式(而不是扔出异常)。这一点可以确保应用程序的可移植性。 "
#. Tag: title
-#: transactions.xml:960
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Connection release modes"
-msgstr "连接释放模式(Connection Release Modes)"
+msgstr "连接释放模式(Connection Release Modes) "
#. Tag: para
-#: transactions.xml:962
-#, fuzzy, no-c-format
-msgid ""
-"One of the legacies of Hibernate 2.x JDBC connection management meant that a
"
-"<literal>Session</literal> would obtain a connection when it was first
"
-"required and then maintain that connection until the session was closed. "
-"Hibernate 3.x introduced the notion of connection release modes that would "
-"instruct a session how to handle its JDBC connections. The following "
-"discussion is pertinent only to connections provided through a configured "
-"<literal>ConnectionProvider</literal>. User-supplied connections are
outside "
-"the breadth of this discussion. The different release modes are identified "
-"by the enumerated values of
<literal>org.hibernate.ConnectionReleaseMode</"
-"literal>:"
-msgstr ""
-"Hibernate关于JDBC连接管理的旧(2.x)行为是,<literal>Session</literal>在第一次"
-"需要的时候获取一个连接,在session关闭之前一直会持有这个连接。Hibernate引入了"
-"连接释放的概念,来告诉session如何处理它的JDBC连接。注意,下面的讨论只适用于采"
-"用配置<literal>ConnectionProvider</literal>来提供连接的情况,用户自己提供的连"
-"接与这里的讨论无关。通过<literal>org.hibernate.ConnectionReleaseMode</"
-"literal>的不同枚举值来使用不用的释放模式:"
+#, no-c-format
+msgid "One of the legacies of Hibernate 2.x JDBC connection management meant that a
<literal>Session</literal> would obtain a connection when it was first
required and then maintain that connection until the session was closed. Hibernate 3.x
introduced the notion of connection release modes that would instruct a session how to
handle its JDBC connections. The following discussion is pertinent only to connections
provided through a configured <literal>ConnectionProvider</literal>.
User-supplied connections are outside the breadth of this discussion. The different
release modes are identified by the enumerated values of
<literal>org.hibernate.ConnectionReleaseMode</literal>:"
+msgstr "Hibernate 关于 JDBC 连接管理的旧(2.x)行为是,<literal>Session</literal>
在第一次需要的时候获取一个连接,在 session 关闭之前一直会持有这个连接。Hibernate 引入了连接释放的概念,来告诉 session 如何处理它的 JDBC
连接。注意,下面的讨论只适用于采用配置 <literal>ConnectionProvider</literal>
来提供连接的情况,用户自己提供的连接与这里的讨论无关。通过
<literal>org.hibernate.ConnectionReleaseMode</literal>
的不同枚举值来使用不用的释放模式:"
#. Tag: para
-#: transactions.xml:976
-#, fuzzy, no-c-format
-msgid ""
-"<literal>ON_CLOSE</literal>: is the legacy behavior described above.
The "
-"Hibernate session obtains a connection when it first needs to perform some "
-"JDBC access and maintains that connection until the session is closed."
-msgstr ""
-"<literal>ON_CLOSE</literal> - 基本上就是上面提到的老式行为。Hibernate session"
-"在第一次需要进行JDBC操作的时候获取连接,然后持有它,直到session关闭。"
+#, no-c-format
+msgid "<literal>ON_CLOSE</literal>: is the legacy behavior described
above. The Hibernate session obtains a connection when it first needs to perform some JDBC
access and maintains that connection until the session is closed."
+msgstr "<literal>ON_CLOSE</literal>:基本上就是上面提到的老式行为。Hibernate session
在第一次需要进行 JDBC 操作的时候获取连接,然后持有它,直到 session 关闭。"
#. Tag: para
-#: transactions.xml:983
-#, fuzzy, no-c-format
-msgid ""
-"<literal>AFTER_TRANSACTION</literal>: releases connections after a
"
-"<literal>org.hibernate.Transaction</literal> has been completed."
-msgstr ""
-"<literal>AFTER_TRANSACTION</literal> -
在<literal>org.hibernate.Transaction</"
-"literal>结束后释放连接。"
+#, no-c-format
+msgid "<literal>AFTER_TRANSACTION</literal>: releases connections after
a <literal>org.hibernate.Transaction</literal> has been completed."
+msgstr "<literal>AFTER_TRANSACTION</literal>:在
<literal>org.hibernate.Transaction</literal> 结束后释放连接。"
#. Tag: para
-#: transactions.xml:989
-#, fuzzy, no-c-format
-msgid ""
-"<literal>AFTER_STATEMENT</literal> (also referred to as aggressive
release): "
-"releases connections after every statement execution. This aggressive "
-"releasing is skipped if that statement leaves open resources associated with
"
-"the given session. Currently the only situation where this occurs is through
"
-"the use of <literal>org.hibernate.ScrollableResults</literal>."
-msgstr ""
-"<literal>AFTER_STATEMENT</literal> (也被称做积极释放) - 在每一条语句被执行后"
-"就释放连接。但假若语句留下了与session相关的资源,那就不会被释放。目前唯一的这"
-"种情形就是使用<literal>org.hibernate.ScrollableResults</literal>。"
+#, no-c-format
+msgid "<literal>AFTER_STATEMENT</literal> (also referred to as
aggressive release): releases connections after every statement execution. This aggressive
releasing is skipped if that statement leaves open resources associated with the given
session. Currently the only situation where this occurs is through the use of
<literal>org.hibernate.ScrollableResults</literal>."
+msgstr
"<literal>AFTER_STATEMENT</literal>(也被称做积极释放):在每一条语句被执行后就释放连接。但假若语句留下了与
session 相关的资源,那就不会被释放。目前唯一的这种情形就是使用
<literal>org.hibernate.ScrollableResults</literal>。"
#. Tag: para
-#: transactions.xml:999
-#, fuzzy, no-c-format
-msgid ""
-"The configuration parameter
<literal>hibernate.connection.release_mode</"
-"literal> is used to specify which release mode to use. The possible values
"
-"are as follows:"
-msgstr ""
-"<literal>hibernate.connection.release_mode</literal>配置参数用来指定使用哪一"
-"种释放模式。可能的值有:"
+#, no-c-format
+msgid "The configuration parameter
<literal>hibernate.connection.release_mode</literal> is used to specify which
release mode to use. The possible values are as follows:"
+msgstr "<literal>hibernate.connection.release_mode</literal>
配置参数用来指定使用哪一种释放模式。可能的值有: "
#. Tag: para
-#: transactions.xml:1006
-#, fuzzy, no-c-format
-msgid ""
-"<literal>auto</literal> (the default): this choice delegates to the
release "
-"mode returned by the
<literal>org.hibernate.transaction.TransactionFactory."
-"getDefaultReleaseMode()</literal> method. For JTATransactionFactory, this
"
-"returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, "
-"this returns ConnectionReleaseMode.AFTER_TRANSACTION. Do not change this "
-"default behavior as failures due to the value of this setting tend to "
-"indicate bugs and/or invalid assumptions in user code."
-msgstr ""
-"<literal>auto</literal>(默认) - 这一选择把释放模式委派给<literal>org."
-"hibernate.transaction.TransactionFactory.getDefaultReleaseMode()</literal>方"
-"法。对JTATransactionFactory来说,它会返回ConnectionReleaseMode."
-"AFTER_STATEMENT;对JDBCTransactionFactory来说,则是ConnectionReleaseMode."
-"AFTER_TRANSACTION。很少需要修改这一默认行为,因为假若设置不当,就会带来bug,"
-"或者给用户代码带来误导。"
+#, no-c-format
+msgid "<literal>auto</literal> (the default): this choice delegates to
the release mode returned by the
<literal>org.hibernate.transaction.TransactionFactory.getDefaultReleaseMode()</literal>
method. For JTATransactionFactory, this returns ConnectionReleaseMode.AFTER_STATEMENT; for
JDBCTransactionFactory, this returns ConnectionReleaseMode.AFTER_TRANSACTION. Do not
change this default behavior as failures due to the value of this setting tend to indicate
bugs and/or invalid assumptions in user code."
+msgstr "<literal>auto</literal>(默认):这一选择把释放模式委派给
<literal>org.hibernate.transaction.TransactionFactory.getDefaultReleaseMode()</literal>
方法。对 JTATransactionFactory 来说,它会返回
ConnectionReleaseMode.AFTER_STATEMENT;对 JDBCTransactionFactory 来说,则是ConnectionReleaseMode.AFTER_TRANSACTION。很少需要修改这一默认行为,因为假若设置不当,就会带来
bug,或者给用户代码带来误导。"
#. Tag: para
-#: transactions.xml:1016
-#, fuzzy, no-c-format
-msgid ""
-"<literal>on_close</literal>: uses ConnectionReleaseMode.ON_CLOSE. This
"
-"setting is left for backwards compatibility, but its use is discouraged."
-msgstr ""
-"<literal>on_close</literal> - 使用 ConnectionReleaseMode.ON_CLOSE.
这种方式是"
-"为了向下兼容的,但是已经完全不被鼓励使用了。"
+#, no-c-format
+msgid "<literal>on_close</literal>: uses ConnectionReleaseMode.ON_CLOSE.
This setting is left for backwards compatibility, but its use is discouraged."
+msgstr "<literal>on_close</literal>:使用
ConnectionReleaseMode.ON_CLOSE。这种方式是为了向下兼容的,但是已经完全不被鼓励使用了。"
#. Tag: para
-#: transactions.xml:1022
-#, fuzzy, no-c-format
-msgid ""
-"<literal>after_transaction</literal>: uses
ConnectionReleaseMode."
-"AFTER_TRANSACTION. This setting should not be used in JTA environments. Also
"
-"note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is "
-"considered to be in auto-commit mode, connections will be released as if the
"
-"release mode were AFTER_STATEMENT."
-msgstr ""
-"<literal>after_transaction</literal> - 使用ConnectionReleaseMode."
-"AFTER_TRANSACTION。这一设置不应该在JTA环境下使用。也要注意,使用"
-"ConnectionReleaseMode.AFTER_TRANSACTION的时候,假若session 处于auto-commit状"
-"态,连接会像AFTER_STATEMENT那样被释放。"
+#, no-c-format
+msgid "<literal>after_transaction</literal>: uses
ConnectionReleaseMode.AFTER_TRANSACTION. This setting should not be used in JTA
environments. Also note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is
considered to be in auto-commit mode, connections will be released as if the release mode
were AFTER_STATEMENT."
+msgstr "<literal>after_transaction</literal>:使用
ConnectionReleaseMode.AFTER_TRANSACTION。这一设置不应该在 JTA 环境下使用。也要注意,使用
ConnectionReleaseMode.AFTER_TRANSACTION 的时候,假若session 处于 auto-commit 状态,连接会像
AFTER_STATEMENT 那样被释放。"
#. Tag: para
-#: transactions.xml:1030
-#, fuzzy, no-c-format
-msgid ""
-"<literal>after_statement</literal>: uses ConnectionReleaseMode."
-"AFTER_STATEMENT. Additionally, the configured
<literal>ConnectionProvider</"
-"literal> is consulted to see if it supports this setting "
-"(<literal>supportsAggressiveRelease()</literal>). If not, the release
mode "
-"is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only "
-"safe in environments where we can either re-acquire the same underlying JDBC
"
-"connection each time you make a call into <literal>ConnectionProvider."
-"getConnection()</literal> or in auto-commit environments where it does not
"
-"matter if we re-establish the same connection."
-msgstr ""
-"<literal>after_statement</literal> - 使用ConnectionReleaseMode."
-"AFTER_STATEMENT。除此之外,会查询配置的<literal>ConnectionProvider</"
-"literal>,是否它支持这一设置((<literal>supportsAggressiveRelease()</"
-"literal>))。假若不支持,释放模式会被设置为ConnectionReleaseMode."
-"AFTER_TRANSACTION。只有在你每次调用<literal>ConnectionProvider.getConnection"
-"()</literal>获取底层JDBC连接的时候,都可以确信获得同一个连接的时候,这一设置"
-"才是安全的;或者在auto-commit环境中,你可以不管是否每次都获得同一个连接的时"
-"候,这才是安全的。"
+#, no-c-format
+msgid "<literal>after_statement</literal>: uses
ConnectionReleaseMode.AFTER_STATEMENT. Additionally, the configured
<literal>ConnectionProvider</literal> is consulted to see if it supports this
setting (<literal>supportsAggressiveRelease()</literal>). If not, the release
mode is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only safe in
environments where we can either re-acquire the same underlying JDBC connection each time
you make a call into <literal>ConnectionProvider.getConnection()</literal> or
in auto-commit environments where it does not matter if we re-establish the same
connection."
+msgstr "<literal>after_statement</literal>:使用
ConnectionReleaseMode.AFTER_STATEMENT。除此之外,会查询配置的
<literal>ConnectionProvider</literal>,是否它支持这一设置(<literal>supportsAggressiveRelease()</literal>)。假若不支持,释放模式会被设置为
ConnectionReleaseMode.AFTER_TRANSACTION。只有在你每次调用
<literal>ConnectionProvider.getConnection()</literal> 获取底层 JDBC
连接的时候,都可以确信获得同一个连接的时候,这一设置才是安全的;或者在 auto-commit 环境中,你可以不管是否每次都获得同一个连接的时候,这才是安全的。"
+
+#~ msgid "foo==bar"
+#~ msgstr "foo==bar"
+#~ msgid ""
+#~ "<![CDATA[// Non-managed environment idiom\n"
+#~ "Session sess = factory.openSession();\n"
+#~ "Transaction tx = null;\n"
+#~ "try {\n"
+#~ " tx = sess.beginTransaction();\n"
+#~ "\n"
+#~ " // do some work\n"
+#~ " ...\n"
+#~ "\n"
+#~ " tx.commit();\n"
+#~ "}\n"
+#~ "catch (RuntimeException e) {\n"
+#~ " if (tx != null) tx.rollback();\n"
+#~ " throw e; // or display error message\n"
+#~ "}\n"
+#~ "finally {\n"
+#~ " sess.close();\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[// Non-managed environment idiom\n"
+#~ "Session sess = factory.openSession();\n"
+#~ "Transaction tx = null;\n"
+#~ "try {\n"
+#~ " tx = sess.beginTransaction();\n"
+#~ "\n"
+#~ " // do some work\n"
+#~ " ...\n"
+#~ "\n"
+#~ " tx.commit();\n"
+#~ "}\n"
+#~ "catch (RuntimeException e) {\n"
+#~ " if (tx != null) tx.rollback();\n"
+#~ " throw e; // or display error message\n"
+#~ "}\n"
+#~ "finally {\n"
+#~ " sess.close();\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[// Non-managed environment idiom with getCurrentSession()\n"
+#~ "try {\n"
+#~ " factory.getCurrentSession().beginTransaction();\n"
+#~ "\n"
+#~ " // do some work\n"
+#~ " ...\n"
+#~ "\n"
+#~ " factory.getCurrentSession().getTransaction().commit();\n"
+#~ "}\n"
+#~ "catch (RuntimeException e) {\n"
+#~ " factory.getCurrentSession().getTransaction().rollback();\n"
+#~ " throw e; // or display error message\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[// Non-managed environment idiom with getCurrentSession()\n"
+#~ "try {\n"
+#~ " factory.getCurrentSession().beginTransaction();\n"
+#~ "\n"
+#~ " // do some work\n"
+#~ " ...\n"
+#~ "\n"
+#~ " factory.getCurrentSession().getTransaction().commit();\n"
+#~ "}\n"
+#~ "catch (RuntimeException e) {\n"
+#~ " factory.getCurrentSession().getTransaction().rollback();\n"
+#~ " throw e; // or display error message\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[// BMT idiom\n"
+#~ "Session sess = factory.openSession();\n"
+#~ "Transaction tx = null;\n"
+#~ "try {\n"
+#~ " tx = sess.beginTransaction();\n"
+#~ "\n"
+#~ " // do some work\n"
+#~ " ...\n"
+#~ "\n"
+#~ " tx.commit();\n"
+#~ "}\n"
+#~ "catch (RuntimeException e) {\n"
+#~ " if (tx != null) tx.rollback();\n"
+#~ " throw e; // or display error message\n"
+#~ "}\n"
+#~ "finally {\n"
+#~ " sess.close();\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[// BMT idiom\n"
+#~ "Session sess = factory.openSession();\n"
+#~ "Transaction tx = null;\n"
+#~ "try {\n"
+#~ " tx = sess.beginTransaction();\n"
+#~ "\n"
+#~ " // do some work\n"
+#~ " ...\n"
+#~ "\n"
+#~ " tx.commit();\n"
+#~ "}\n"
+#~ "catch (RuntimeException e) {\n"
+#~ " if (tx != null) tx.rollback();\n"
+#~ " throw e; // or display error message\n"
+#~ "}\n"
+#~ "finally {\n"
+#~ " sess.close();\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[// BMT idiom with getCurrentSession()\n"
+#~ "try {\n"
+#~ " UserTransaction tx = (UserTransaction)new InitialContext()\n"
+#~ "
.lookup(\"java:comp/UserTransaction\");\n"
+#~ "\n"
+#~ " tx.begin();\n"
+#~ "\n"
+#~ " // Do some work on Session bound to transaction\n"
+#~ " factory.getCurrentSession().load(...);\n"
+#~ " factory.getCurrentSession().persist(...);\n"
+#~ "\n"
+#~ " tx.commit();\n"
+#~ "}\n"
+#~ "catch (RuntimeException e) {\n"
+#~ " tx.rollback();\n"
+#~ " throw e; // or display error message\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[// BMT idiom with getCurrentSession()\n"
+#~ "try {\n"
+#~ " UserTransaction tx = (UserTransaction)new InitialContext()\n"
+#~ "
.lookup(\"java:comp/UserTransaction\");\n"
+#~ "\n"
+#~ " tx.begin();\n"
+#~ "\n"
+#~ " // Do some work on Session bound to transaction\n"
+#~ " factory.getCurrentSession().load(...);\n"
+#~ " factory.getCurrentSession().persist(...);\n"
+#~ "\n"
+#~ " tx.commit();\n"
+#~ "}\n"
+#~ "catch (RuntimeException e) {\n"
+#~ " tx.rollback();\n"
+#~ " throw e; // or display error message\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[// CMT idiom\n"
+#~ " Session sess = factory.getCurrentSession();\n"
+#~ "\n"
+#~ " // do some work\n"
+#~ " ...\n"
+#~ "]]>"
+#~ msgstr ""
+#~ "<![CDATA[// CMT idiom\n"
+#~ " Session sess = factory.getCurrentSession();\n"
+#~ "\n"
+#~ " // do some work\n"
+#~ " ...\n"
+#~ "]]>"
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "Session sess = factory.openSession();\n"
+#~ "try {\n"
+#~ " //set transaction timeout to 3 seconds\n"
+#~ " sess.getTransaction().setTimeout(3);\n"
+#~ " sess.getTransaction().begin();\n"
+#~ "\n"
+#~ " // do some work\n"
+#~ " ...\n"
+#~ "\n"
+#~ " sess.getTransaction().commit()\n"
+#~ "}\n"
+#~ "catch (RuntimeException e) {\n"
+#~ " sess.getTransaction().rollback();\n"
+#~ " throw e; // or display error message\n"
+#~ "}\n"
+#~ "finally {\n"
+#~ " sess.close();\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "Session sess = factory.openSession();\n"
+#~ "try {\n"
+#~ " //set transaction timeout to 3 seconds\n"
+#~ " sess.getTransaction().setTimeout(3);\n"
+#~ " sess.getTransaction().begin();\n"
+#~ "\n"
+#~ " // do some work\n"
+#~ " ...\n"
+#~ "\n"
+#~ " sess.getTransaction().commit()\n"
+#~ "}\n"
+#~ "catch (RuntimeException e) {\n"
+#~ " sess.getTransaction().rollback();\n"
+#~ " throw e; // or display error message\n"
+#~ "}\n"
+#~ "finally {\n"
+#~ " sess.close();\n"
+#~ "}]]>"
+#~ msgid ""
+#~ "<![CDATA[// foo is an instance loaded by a previous Session\n"
+#~ "session = factory.openSession();\n"
+#~ "Transaction t = session.beginTransaction();\n"
+#~ "\n"
+#~ "int oldVersion = foo.getVersion();\n"
+#~ "session.load( foo, foo.getKey() ); // load the current state\n"
+#~ "if ( oldVersion != foo.getVersion() ) throw new StaleObjectStateException"
+#~ "();\n"
+#~ "foo.setProperty(\"bar\");\n"
+#~ "\n"
+#~ "t.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[// foo is an instance loaded by a previous Session\n"
+#~ "session = factory.openSession();\n"
+#~ "Transaction t = session.beginTransaction();\n"
+#~ "\n"
+#~ "int oldVersion = foo.getVersion();\n"
+#~ "session.load( foo, foo.getKey() ); // load the current state\n"
+#~ "if ( oldVersion != foo.getVersion() ) throw new StaleObjectStateException"
+#~ "();\n"
+#~ "foo.setProperty(\"bar\");\n"
+#~ "\n"
+#~ "t.commit();\n"
+#~ "session.close();]]>"
+#~ msgid ""
+#~ "<![CDATA[// foo is an instance loaded earlier by the old session\n"
+#~ "Transaction t = session.beginTransaction(); // Obtain a new JDBC "
+#~ "connection, start transaction\n"
+#~ "\n"
+#~ "foo.setProperty(\"bar\");\n"
+#~ "\n"
+#~ "session.flush(); // Only for last transaction in conversation\n"
+#~ "t.commit(); // Also return JDBC connection\n"
+#~ "session.close(); // Only for last transaction in conversation]]>"
+#~ msgstr ""
+#~ "<![CDATA[// foo is an instance loaded earlier by the old session\n"
+#~ "Transaction t = session.beginTransaction(); // Obtain a new JDBC "
+#~ "connection, start transaction\n"
+#~ "\n"
+#~ "foo.setProperty(\"bar\");\n"
+#~ "\n"
+#~ "session.flush(); // Only for last transaction in conversation\n"
+#~ "t.commit(); // Also return JDBC connection\n"
+#~ "session.close(); // Only for last transaction in conversation]]>"
+#~ msgid ""
+#~ "<![CDATA[// foo is an instance loaded by a previous Session\n"
+#~ "foo.setProperty(\"bar\");\n"
+#~ "session = factory.openSession();\n"
+#~ "Transaction t = session.beginTransaction();\n"
+#~ "session.saveOrUpdate(foo); // Use merge() if \"foo\" might have been
"
+#~ "loaded already\n"
+#~ "t.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[// foo is an instance loaded by a previous Session\n"
+#~ "foo.setProperty(\"bar\");\n"
+#~ "session = factory.openSession();\n"
+#~ "Transaction t = session.beginTransaction();\n"
+#~ "session.saveOrUpdate(foo); // Use merge() if \"foo\" might have been
"
+#~ "loaded already\n"
+#~ "t.commit();\n"
+#~ "session.close();]]>"
+
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/tutorial.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/tutorial.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/tutorial.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,2809 +1,1965 @@
+# translation of tutorial.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007, 2009.
+# translation of Collection_Mapping.po to
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: tutorial\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-23 18:41+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2010-01-08T04:07:20\n"
+"PO-Revision-Date: 2010-01-11 10:56+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: tutorial.xml:31
#, no-c-format
msgid "Tutorial"
-msgstr ""
+msgstr "教程"
#. Tag: para
-#: tutorial.xml:33
#, no-c-format
-msgid ""
-"Intended for new users, this chapter provides an step-by-step introduction "
-"to Hibernate, starting with a simple application using an in-memory "
-"database. The tutorial is based on an earlier tutorial developed by Michael "
-"Gloegl. All code is contained in the <filename>tutorials/web</filename>
"
-"directory of the project source."
-msgstr ""
+msgid "Intended for new users, this chapter provides an step-by-step introduction to
Hibernate, starting with a simple application using an in-memory database. The tutorial is
based on an earlier tutorial developed by Michael Gloegl. All code is contained in the
<filename>tutorials/web</filename> directory of the project source."
+msgstr "面向新用户,从一个简单的使用内存数据库的例子开始,本章提供对 Hibernate 的逐步介绍。本教程基于 Michael Gloegl
早期编写的手册。所有代码都包含在 <filename>tutorials/web</filename> 目录下。"
#. Tag: para
-#: tutorial.xml:42
#, no-c-format
-msgid ""
-"This tutorial expects the user have knowledge of both Java and SQL. If you "
-"have a limited knowledge of JAVA or SQL, it is advised that you start with a
"
-"good introduction to that technology prior to attempting to learn Hibernate."
-msgstr ""
+msgid "This tutorial expects the user have knowledge of both Java and SQL. If you
have a limited knowledge of JAVA or SQL, it is advised that you start with a good
introduction to that technology prior to attempting to learn Hibernate."
+msgstr "本教程期望用户具备 Java 和 SQL 知识。如果你这方面的知识有限,我们建议你在学习 Hibernate 之前先好好了解这些技术。"
#. Tag: para
-#: tutorial.xml:51
#, no-c-format
-msgid ""
-"The distribution contains another example application under the "
-"<filename>tutorial/eg</filename> project source directory."
-msgstr ""
+msgid "The distribution contains another example application under the
<filename>tutorial/eg</filename> project source directory."
+msgstr "本版本在源代码目录 <filename>tutorial/eg</filename> 下还包含另外一个例程。"
#. Tag: title
-#: tutorial.xml:59
#, no-c-format
msgid "Part 1 - The first Hibernate Application"
-msgstr "第一部分 - 第一个Hibernate应用程序"
+msgstr "第一部分 - 第一个 Hibernate 应用程序"
#. Tag: para
-#: tutorial.xml:61
-#, fuzzy, no-c-format
-msgid ""
-"For this example, we will set up a small database application that can store
"
-"events we want to attend and information about the host(s) of these events."
-msgstr ""
-"假设我们希望有一个小应用程序可以保存我们希望参加的活动(events)和这些活动主"
-"办方的相关信息。 (译者注:在本教程的后面部分,我们将直接使用event而不是它的"
-"中文翻译“活动”,以免混淆。)"
+#, no-c-format
+msgid "For this example, we will set up a small database application that can store
events we want to attend and information about the host(s) of these events."
+msgstr "在这个例子里,我们将设立一个小应用程序可以保存我们希望参加的活动(events)和这些活动主办方的相关信息。(译者注:在本教程的后面部分,我们将直接使用
event 而不是它的中文翻译“活动”,以免混淆。)"
#. Tag: para
-#: tutorial.xml:67
#, no-c-format
-msgid ""
-"Although you can use whatever database you feel comfortable using, we will "
-"use <ulink
url=\"http://hsqldb.org/\">HSQLDB</ulink> (an
in-memory, Java "
-"database) to avoid describing installation/setup of any particular database "
-"servers."
-msgstr ""
+msgid "Although you can use whatever database you feel comfortable using, we will
use <ulink
url=\"http://hsqldb.org/\">HSQLDB</ulink> (an in-memory,
Java database) to avoid describing installation/setup of any particular database
servers."
+msgstr "虽然你可以使用任何数据库,我们还是用 <ulink
url=\"http://hsqldb.org/\">HSQLDB</ulink>(一个用 Java
编写的内存数据库)来避免花费篇章对数据库服务器的安装/配置进行解释。"
#. Tag: title
-#: tutorial.xml:76
#, no-c-format
msgid "Setup"
-msgstr ""
+msgstr "设置"
#. Tag: para
-#: tutorial.xml:78
#, no-c-format
-msgid ""
-"The first thing we need to do is to set up the development environment. We "
-"will be using the \"standard layout\" advocated by alot of build tools
such "
-"as <ulink url=\"http://maven.org\">Maven</ulink>. Maven, in
particular, has "
-"a good resource describing this <ulink
url=\"http://maven.apache.org/guides/"
-"introduction/introduction-to-the-standard-directory-layout.html\">layout</"
-"ulink>. As this tutorial is to be a web application, we will be creating and
"
-"making use of <filename>src/main/java</filename>,
<filename>src/main/"
-"resources</filename> and <filename>src/main/webapp</filename>
directories."
-msgstr ""
+msgid "The first thing we need to do is to set up the development environment. We
will be using the \"standard layout\" advocated by alot of build tools such as
<ulink url=\"http://maven.org\">Maven</ulink>. Maven, in particular,
has a good resource describing this <ulink
url=\"http://maven.apache.org/guides/introduction/introduction-to-th...;.
As this tutorial is to be a web application, we will be creating and making use of
<filename>src/main/java</filename>,
<filename>src/main/resources</filename> and
<filename>src/main/webapp</filename> directories."
+msgstr "我们需要做的第一件事情是设置开发环境。我们将使用许多构建工具如 <ulink
url=\"http://maven.org\">Maven</ulink> 所鼓吹的“标准格式”。特别是
Maven,它的资源对这个<ulink
url=\"http://maven.apache.org/guides/introduction/introduction-to-th...
web 应用程序,我么将创建和使用
<filename>src/main/java</filename>、<filename>src/main/resources</filename>
和 <filename>src/main/webapp</filename> 目录。"
#. Tag: para
-#: tutorial.xml:88
#, no-c-format
-msgid ""
-"We will be using Maven in this tutorial, taking advantage of its transitive "
-"dependency management capabilities as well as the ability of many IDEs to "
-"automatically set up a project for us based on the maven descriptor."
-msgstr ""
+msgid "We will be using Maven in this tutorial, taking advantage of its transitive
dependency management capabilities as well as the ability of many IDEs to automatically
set up a project for us based on the maven descriptor."
+msgstr "在本教程里我们将使用 Maven,利用其 transitive dependency 管理以及根据 Maven 描述符用 IDE
自动设置项目的能力。"
-#. Tag: programlisting
-#: tutorial.xml:94
-#, no-c-format
-msgid ""
-"<![CDATA[<project
xmlns=\"http://maven.apache.org/POM/4.0.0\"\n"
-"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-"
xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0
http://maven."
-"apache.org/xsd/maven-4.0.0.xsd\">\n"
-"\n"
-" <modelVersion>4.0.0</modelVersion>\n"
-"\n"
-" <groupId>org.hibernate.tutorials</groupId>\n"
-" <artifactId>hibernate-tutorial</artifactId>\n"
-" <version>1.0.0-SNAPSHOT</version>\n"
-" <name>First Hibernate Tutorial</name>\n"
-"\n"
-" <build>\n"
-" <!-- we dont want the version to be part of the generated war file
"
-"name -->\n"
-" <finalName>${artifactId}</finalName>\n"
-" </build>\n"
-"\n"
-" <dependencies>\n"
-" <dependency>\n"
-" <groupId>org.hibernate</groupId>\n"
-" <artifactId>hibernate-core</artifactId>\n"
-" </dependency>\n"
-"\n"
-" <!-- Because this is a web app, we also have a dependency on the "
-"servlet api. -->\n"
-" <dependency>\n"
-" <groupId>javax.servlet</groupId>\n"
-" <artifactId>servlet-api</artifactId>\n"
-" </dependency>\n"
-"\n"
-" <!-- Hibernate uses slf4j for logging, for our purposes here use the
"
-"simple backend -->\n"
-" <dependency>\n"
-" <groupId>org.slf4j</groupId>\n"
-" <artifactId>slf4j-simple</artifactId>\n"
-" </dependency>\n"
-"\n"
-" <!-- Hibernate gives you a choice of bytecode providers between "
-"cglib and javassist -->\n"
-" <dependency>\n"
-" <groupId>javassist</groupId>\n"
-" <artifactId>javassist</artifactId>\n"
-" </dependency>\n"
-" </dependencies>\n"
-"\n"
-"</project>]]>"
-msgstr ""
-
#. Tag: para
-#: tutorial.xml:97
#, no-c-format
-msgid ""
-"It is not a requirement to use Maven. If you wish to use something else to "
-"build this tutoial (such as Ant), the layout will remain the same. The only "
-"change is that you will need to manually account for all the needed "
-"dependencies. If you use something like <ulink
url=\"http://ant.apache.org/"
-"ivy/\">Ivy</ulink> providing transitive dependency management you
would "
-"still use the dependencies mentioned below. Otherwise, you'd need to grab
"
-"<emphasis>all</emphasis> dependencies, both explicit and transitive,
and add "
-"them to the project's classpath. If working from the Hibernate distribution
"
-"bundle, this would mean <filename>hibernate3.jar</filename>, all
artifacts "
-"in the <filename>lib/required</filename> directory and all files from
either "
-"the <filename>lib/bytecode/cglib</filename> or
<filename>lib/bytecode/"
-"javassist</filename> directory; additionally you will need both the
servlet-"
-"api jar and one of the slf4j logging backends."
-msgstr ""
+msgid "It is not a requirement to use Maven. If you wish to use another technology
to build this tutorial (such as Ant), the layout will remain the same. The only change is
that you will need to manually account for all the needed dependencies. If you use
<ulink
url=\"http://ant.apache.org/ivy/\">Ivy</ulink> to provide
transitive dependency management you would still use the dependencies mentioned below.
Otherwise, you will need to find all the dependencies, both explicit and transitive, and
add them to the projects classpath. If working from the Hibernate distribution bundle,
this would mean <filename>hibernate3.jar</filename>, all artifacts in the
<filename>lib/required</filename> directory and all files from either the
<filename>lib/bytecode/cglib</filename> or
<filename>lib/bytecode/javassist</filename> directory; additionally you will
need both the servlet-api jar and one of the slf4j logging backends."
+msgstr "Maven 并不要求这样。如果你希望使用其他技术来构建这个教程(如 Ant),格式将保持不变。唯一的改变是你将需要手工管理所有的依赖关系。如果你使用
<ulink
url=\"http://ant.apache.org/ivy/\">Ivy</ulink> 来提供 transitive
dependency 管理,你将仍然下面提到的依赖关系。否则,你将需要找到所有的依赖关系(显性的和过渡的)并把它们添加到项目的 classpath 里。如果使用 Hibernate
捆绑版本,这意味着
<filename>hibernate3.jar</filename>、<filename>lib/required</filename>
目录下的所有 artifact 和 <filename>lib/bytecode/cglib</filename> 或
<filename>lib/bytecode/javassist</filename> 下的所有文件,此外你将需要 servlet-api jar 和一个
slf4j 日志后台文件。 "
#. Tag: para
-#: tutorial.xml:114
#, no-c-format
-msgid ""
-"Save this file as <filename>pom.xml</filename> in the project root
directory."
-msgstr ""
+msgid "Save this file as <filename>pom.xml</filename> in the project
root directory."
+msgstr "把这个文件保存为项目根目录下的 <filename>pom.xml</filename>。"
#. Tag: title
-#: tutorial.xml:121
#, no-c-format
msgid "The first class"
-msgstr "第一个class"
+msgstr "第一个 class"
#. Tag: para
-#: tutorial.xml:123
-#, fuzzy, no-c-format
-msgid ""
-"Next, we create a class that represents the event we want to store in the "
-"database; it is a simple JavaBean class with some properties:"
-msgstr "接下来我们创建一个类,用来代表那些我们希望储存在数据库里的event。"
-
-#. Tag: programlisting
-#: tutorial.xml:128
#, no-c-format
-msgid ""
-"<![CDATA[package org.hibernate.tutorial.domain;\n"
-"\n"
-"import java.util.Date;\n"
-"\n"
-"public class Event {\n"
-" private Long id;\n"
-"\n"
-" private String title;\n"
-" private Date date;\n"
-"\n"
-" public Event() {}\n"
-"\n"
-" public Long getId() {\n"
-" return id;\n"
-" }\n"
-"\n"
-" private void setId(Long id) {\n"
-" this.id = id;\n"
-" }\n"
-"\n"
-" public Date getDate() {\n"
-" return date;\n"
-" }\n"
-"\n"
-" public void setDate(Date date) {\n"
-" this.date = date;\n"
-" }\n"
-"\n"
-" public String getTitle() {\n"
-" return title;\n"
-" }\n"
-"\n"
-" public void setTitle(String title) {\n"
-" this.title = title;\n"
-" }\n"
-"}]]>"
-msgstr ""
+msgid "Next, we create a class that represents the event we want to store in the
database; it is a simple JavaBean class with some properties:"
+msgstr "接下来我们创建一个类,用来代表那些我们希望储存在数据库里的 event,这是一个具有一些属性的简单 JavaBean 类:"
#. Tag: para
-#: tutorial.xml:130
-#, fuzzy, no-c-format
-msgid ""
-"This class uses standard JavaBean naming conventions for property getter and
"
-"setter methods, as well as private visibility for the fields. Although this "
-"is the recommended design, it is not required. Hibernate can also access "
-"fields directly, the benefit of accessor methods is robustness for "
-"refactoring."
-msgstr ""
-"你可以看到这个类对属性的存取方法(getter and setter method)使用了标准"
-"JavaBean命名约定,同时把类属性(field)的访问级别设成私有的(private)。这是"
-"推荐的设计,但并不是必须的。Hibernate也可以直接访问这些field,而使用访问方法"
-"(accessor method)的好处是提供了重构时的健壮性(robustness)。为了通过反射机"
-"制(Reflection)来实例化这个类的对象,我们需要提供一个无参的构造器(no-"
-"argument constructor)。"
+#, no-c-format
+msgid "This class uses standard JavaBean naming conventions for property getter and
setter methods, as well as private visibility for the fields. Although this is the
recommended design, it is not required. Hibernate can also access fields directly, the
benefit of accessor methods is robustness for refactoring."
+msgstr "你可以看到这个类对属性的存取方法(getter and setter method)使用了标准 JavaBean
命名约定,同时把类属性(field)的访问级别设成私有的(private)。这是推荐的设计,但并不是必须的。Hibernate 也可以直接访问这些
field,而使用访问方法(accessor method)的好处是提供了重构时的健壮性(robustness)。"
#. Tag: para
-#: tutorial.xml:138
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>id</literal> property holds a unique identifier value for
a "
-"particular event. All persistent entity classes (there are less important "
-"dependent classes as well) will need such an identifier property if we want "
-"to use the full feature set of Hibernate. In fact, most applications, "
-"especially web applications, need to distinguish objects by identifier, so "
-"you should consider this a feature rather than a limitation. However, we "
-"usually do not manipulate the identity of an object, hence the setter method
"
-"should be private. Only Hibernate will assign identifiers when an object is "
-"saved. Hibernate can access public, private, and protected accessor methods,
"
-"as well as public, private and protected fields directly. The choice is up "
-"to you and you can match it to fit your application design."
-msgstr ""
-"对一特定的event, <literal>id</literal> 属性持有唯一的标识符(identifier)的"
-"值。如果我们希望使用Hibernate提供的所有特性,那么所有的持久化实体"
-"(persistent entity)类(这里也包括一些次要依赖类)都需要一个这样的标识符属"
-"性。而事实上,大多数应用程序(特别是web应用程序)都需要通过标识符来区别对象,"
-"所以你应该考虑使用标识符属性而不是把它当作一种限制。然而,我们通常不会操作对"
-"象的标识(identity),因此它的setter方法的访问级别应该声明private。这样当对象"
-"被保存的时候,只有Hibernate可以为它分配标识符值。你可看到Hibernate可以直接访"
-"问public,private和protected的访问方法和field。所以选择哪种方式完全取决于你,"
-"你可以使你的选择与你的应用程序设计相吻合。"
+#, no-c-format
+msgid "The <literal>id</literal> property holds a unique identifier
value for a particular event. All persistent entity classes (there are less important
dependent classes as well) will need such an identifier property if we want to use the
full feature set of Hibernate. In fact, most applications, especially web applications,
need to distinguish objects by identifier, so you should consider this a feature rather
than a limitation. However, we usually do not manipulate the identity of an object, hence
the setter method should be private. Only Hibernate will assign identifiers when an object
is saved. Hibernate can access public, private, and protected accessor methods, as well as
public, private and protected fields directly. The choice is up to you and you can match
it to fit your application design."
+msgstr "对一特定的 event, <literal>id</literal>
属性持有唯一的标识符(identifier)的值。如果我们希望使用 Hibernate 提供的所有特性,那么所有的持久化实体(persistent
entity)类(这里也包括一些次要依赖类)都需要一个这样的标识符属性。而事实上,大多数应用程序(特别是 web
应用程序)都需要通过标识符来区别对象,所以你应该考虑使用标识符属性而不是把它当作一种限制。然而,我们通常不会操作对象的标识(identity),因此它的 setter
方法的访问级别应该声明 private。这样当对象被保存的时候,只有 Hibernate 可以为它分配标识符值。你可看到Hibernate可以直接访问 public,private
和 protected 的访问方法和 field。所以选择哪种方式完全取决于你,你可以使你的选择与你的应用程序设计相吻合。 "
#. Tag: para
-#: tutorial.xml:153
-#, fuzzy, no-c-format
-msgid ""
-"The no-argument constructor is a requirement for all persistent classes; "
-"Hibernate has to create objects for you, using Java Reflection. The "
-"constructor can be private, however package or public visibility is required
"
-"for runtime proxy generation and efficient data retrieval without bytecode "
-"instrumentation."
-msgstr ""
-"所有的持久化类(persistent classes)都要求有无参的构造器,因为Hibernate必须使"
-"用Java反射机制来为你创建对象。构造器(constructor)的访问级别可以是private,"
-"然而当生成运行时代理(runtime proxy)的时候则要求使用至少是package 级别的访问"
-"控制,这样在没有字节码指令(bytecode instrumentation)的情况下,从持久化类里"
-"获取数据会更有效率。"
+#, no-c-format
+msgid "The no-argument constructor is a requirement for all persistent classes;
Hibernate has to create objects for you, using Java Reflection. The constructor can be
private, however package or public visibility is required for runtime proxy generation and
efficient data retrieval without bytecode instrumentation."
+msgstr "所有的持久化类(persistent classes)都要求有无参的构造器,因为 Hibernate 必须使用 Java
反射机制来为你创建对象。构造器(constructor)的访问级别可以是 private,然而当生成运行时代理(runtime proxy)的时候则要求使用至少是 package
级别的访问控制,这样在没有字节码指令(bytecode instrumentation)的情况下,从持久化类里获取数据会更有效率。 "
#. Tag: para
-#: tutorial.xml:161
#, no-c-format
-msgid ""
-"Save this file to the
<filename>src/main/java/org/hibernate/tutorial/domain</"
-"filename> directory."
-msgstr ""
+msgid "Save this file to the
<filename>src/main/java/org/hibernate/tutorial/domain</filename>
directory."
+msgstr "把这个文件保存到
<filename>src/main/java/org/hibernate/tutorial/domain</filename> 目录下。"
#. Tag: title
-#: tutorial.xml:168
#, no-c-format
msgid "The mapping file"
msgstr "映射文件"
#. Tag: para
-#: tutorial.xml:170
#, no-c-format
-msgid ""
-"Hibernate needs to know how to load and store objects of the persistent "
-"class. This is where the Hibernate mapping file comes into play. The mapping
"
-"file tells Hibernate what table in the database it has to access, and what "
-"columns in that table it should use."
-msgstr ""
-"Hibernate需要知道怎样去加载(load)和存储(store)持久化类的对象。这正是"
-"Hibernate映射文件发挥作用的地方。映射文件告诉Hibernate它,应该访问数据库"
-"(database)里面的哪个表(table)及应该使用表里面的哪些字段(column)。"
+msgid "Hibernate needs to know how to load and store objects of the persistent
class. This is where the Hibernate mapping file comes into play. The mapping file tells
Hibernate what table in the database it has to access, and what columns in that table it
should use."
+msgstr "Hibernate 需要知道怎样去加载(load)和存储(store)持久化类的对象。这正是 Hibernate 映射文件发挥作用的地方。映射文件告诉
Hibernate 它应该访问数据库(database)里面的哪个表(table)及应该使用表里面的哪些字段(column)。"
#. Tag: para
-#: tutorial.xml:178
#, no-c-format
msgid "The basic structure of a mapping file looks like this:"
msgstr "一个映射文件的基本结构看起来像这样:"
-#. Tag: programlisting
-#: tutorial.xml:182
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<?xml version=\"1.0\"?>\n"
-"<!DOCTYPE hibernate-mapping PUBLIC\n"
-" \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
-"
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
-"\n"
-"<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
-"[...]\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "Hibernate DTD is sophisticated. You can use it for auto-completion of XML
mapping elements and attributes in your editor or IDE. Opening up the DTD file in your
text editor is the easiest way to get an overview of all elements and attributes, and to
view the defaults, as well as some comments. Hibernate will not load the DTD file from the
web, but first look it up from the classpath of the application. The DTD file is included
in <filename>hibernate-core.jar</filename> (it is also included in the
<filename>hibernate3.jar</filename>, if using the distribution bundle)."
+msgstr "注意 Hibernate 的 DTD 是非常复杂的。你的编辑器或者 IDE 里使用它来自动完成那些用来映射的 XML
元素(element)和属性(attribute)。你也可以在文本编辑器里打开 DTD — 这是最简单的方式来概览所有的元素和 attribute,并查看它们的缺省值以及注释。注意
Hibernate 不会从 web 加载 DTD 文件,但它会首先在应用程序的 classpath 中查找。DTD 文件已包括在
<literal>hibernate3.jar</literal> 里,同时也在 Hibernate 发布包的
<literal>src/</literal> 目录下。 "
#. Tag: para
-#: tutorial.xml:184
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate DTD is sophisticated. You can use it for auto-completion of XML "
-"mapping elements and attributes in your editor or IDE. Opening up the DTD "
-"file in your text editor is the easiest way to get an overview of all "
-"elements and attributes, and to view the defaults, as well as some comments.
"
-"Hibernate will not load the DTD file from the web, but first look it up from
"
-"the classpath of the application. The DTD file is included in "
-"<filename>hibernate-core.jar</filename> (it is also included in the
"
-"<filename>hibernate3.jar</filename>, if using the distribution
bundle)."
-msgstr ""
-"注意Hibernate的DTD是非常复杂的。你的编辑器或者IDE里使用它来自动完成那些用来映"
-"射的XML元素(element)和属性(attribute)。你也可以在文本编辑器里打开DTD-这"
-"是最简单的方式来概览所有的元素和attribute,并查看它们的缺省值以及注释。注意"
-"Hibernate不会从web加载DTD文件,但它会首先在应用程序的classpath中查找。DTD文件"
-"已包括在<literal>hibernate3.jar</literal>里,同时也在Hibernate发布包的"
-"<literal>src/</literal>目录下。"
+#, no-c-format
+msgid "We will omit the DTD declaration in future examples to shorten the code. It
is, of course, not optional."
+msgstr "为缩短代码长度,在以后的例子里我们会省略 DTD 的声明。当然,在实际的应用程序中,DTD 声明是必需的。 "
#. Tag: para
-#: tutorial.xml:197
-#, fuzzy, no-c-format
-msgid ""
-"We will omit the DTD declaration in future examples to shorten the code. It "
-"is, of course, not optional."
-msgstr ""
-"为缩短代码长度,在以后的例子里我们会省略DTD的声明。当然,在实际的应用程序中,"
-"DTD声明是必须的。"
+#, no-c-format
+msgid "Between the two <literal>hibernate-mapping</literal> tags,
include a <literal>class</literal> element. All persistent entity classes
(again, there might be dependent classes later on, which are not first-class entities)
need a mapping to a table in the SQL database:"
+msgstr "在 <literal>hibernate-mapping</literal> 标签(tag)之间, 含有一个
<literal>class</literal>
元素。所有的持久化实体类(再次声明,或许接下来会有依赖类,就是那些次要的实体)都需要一个这样的映射,来把类对象映射到 SQL 数据库里的表:"
#. Tag: para
-#: tutorial.xml:203
-#, fuzzy, no-c-format
-msgid ""
-"Between the two <literal>hibernate-mapping</literal> tags, include a
"
-"<literal>class</literal> element. All persistent entity classes (again,
"
-"there might be dependent classes later on, which are not first-class "
-"entities) need a mapping to a table in the SQL database:"
-msgstr ""
-"在<literal>hibernate-mapping</literal>标签(tag)之间, 含有一个"
-"<literal>class</literal>元素。所有的持久化实体类(再次声明,或许接下来会有依"
-"赖类,就是那些次要的实体)都需要一个这样的映射,来把类对象映射到SQL数据库里的"
-"表。"
-
-#. Tag: programlisting
-#: tutorial.xml:210
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
-"\n"
-" <class name=\"Event\" table=\"EVENTS\">\n"
-"\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "So far we have told Hibernate how to persist and load object of class
<literal>Event</literal> to the table <literal>EVENTS</literal>.
Each instance is now represented by a row in that table. Now we can continue by mapping
the unique identifier property to the tables primary key. As we do not want to care about
handling this identifier, we configure Hibernate's identifier generation strategy for
a surrogate primary key column:"
+msgstr "到目前为止,我们告诉了 Hibernate 怎样把 <literal>Events</literal> 类的对象持久化到数据库的
<literal>EVENTS</literal> 表里,以及怎样从 <literal>EVENTS</literal> 表加载到
<literal>Events</literal>
类的对象。每个实例对应着数据库表中的一行。现在我们将继续讨论有关唯一标识符属性到数据库表的映射。另外,由于我们不关心怎样处理这个标识符,我们就配置由 Hibernate
的标识符生成策略来产生代理主键字段:"
#. Tag: para
-#: tutorial.xml:212
-#, fuzzy, no-c-format
-msgid ""
-"So far we have told Hibernate how to persist and load object of class "
-"<literal>Event</literal> to the table
<literal>EVENTS</literal>. Each "
-"instance is now represented by a row in that table. Now we can continue by "
-"mapping the unique identifier property to the tables primary key. As we do "
-"not want to care about handling this identifier, we configure Hibernate's
"
-"identifier generation strategy for a surrogate primary key column:"
-msgstr ""
-"到目前为止,我们告诉了Hibernate怎样把<literal>Events</literal>类的对象持久化"
-"到数据库的<literal>EVENTS</literal>表里,以及怎样从<literal>EVENTS</literal>"
-"表加载到<literal>Events</literal>类的对象。每个实例对应着数据库表中的一行。现"
-"在我们将继续讨论有关唯一标识符属性到数据库表的映射。另外,由于我们不关心怎样"
-"处理这个标识符,我们就配置由Hibernate的标识符生成策略来产生代理主键字段。"
-
-#. Tag: programlisting
-#: tutorial.xml:222
#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
-"\n"
-" <class name=\"Event\" table=\"EVENTS\">\n"
-" <id name=\"id\" column=\"EVENT_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "The <literal>id</literal> element is the declaration of the
identifier property. The <literal>name=\"id\"</literal> mapping
attribute declares the name of the JavaBean property and tells Hibernate to use the
<literal>getId()</literal> and <literal>setId()</literal> methods
to access the property. The column attribute tells Hibernate which column of the
<literal>EVENTS</literal> table holds the primary key value."
+msgstr "<literal>id</literal> 元素是对 identifier
属性的声明。<literal>name=\"id\"</literal> 映射属性声明了 JavaBean 属性的名称并告诉
Hibernate 使用 <literal>getId()</literal> 和
<literal>setId()</literal> 方法来访问这个属性。column 属性告诉 Hibernate
<literal>EVENTS</literal> 表的哪个字段持有主键值。"
#. Tag: para
-#: tutorial.xml:224
#, no-c-format
-msgid ""
-"The <literal>id</literal> element is the declaration of the identifier
"
-"property. The <literal>name=\"id\"</literal> mapping
attribute declares the "
-"name of the JavaBean property and tells Hibernate to use the
<literal>getId()"
-"</literal> and <literal>setId()</literal> methods to access the
property. "
-"The column attribute tells Hibernate which column of the
<literal>EVENTS</"
-"literal> table holds the primary key value."
-msgstr ""
+msgid "The nested <literal>generator</literal> element specifies the
identifier generation strategy (aka how are identifier values generated?). In this case we
choose <literal>native</literal>, which offers a level of portability
depending on the configured database dialect. Hibernate supports database generated,
globally unique, as well as application assigned, identifiers. Identifier value generation
is also one of Hibernate's many extension points and you can plugin in your own
strategy."
+msgstr "嵌套的 <literal>generator</literal>
元素指定标识符的生成策略(也就是标识符值是怎么产生的)。在这个例子里,我们选择
<literal>native</literal>,它提供了取决于数据库方言的可移植性。Hibernate
数据库生成的、全局性唯一的以及应用程序分配的标识符。标识符值的生成也是 Hibernate 的扩展功能之一,你可以插入自己的策略。"
#. Tag: para
-#: tutorial.xml:234
#, no-c-format
-msgid ""
-"The nested <literal>generator</literal> element specifies the
identifier "
-"generation strategy (aka how are identifier values generated?). In this case
"
-"we choose <literal>native</literal>, which offers a level of
portability "
-"depending on the configured database dialect. Hibernate supports database "
-"generated, globally unique, as well as application assigned, identifiers. "
-"Identifier value generation is also one of Hibernate's many extension points
"
-"and you can plugin in your own strategy."
-msgstr ""
+msgid "<literal>native</literal> is no longer considered the best
strategy in terms of portability. for further discussion, see <xref
linkend=\"portability-idgen\" />"
+msgstr "从移植性来说,<literal>native</literal> 不再被认为是最好的策略。进一步的讨论,请参考 <xref
linkend=\"portability-idgen\" />。"
#. Tag: para
-#: tutorial.xml:246
#, no-c-format
-msgid ""
-"<literal>native</literal> is no longer consider the best strategy in
terms "
-"of portability. for further discussion, see"
-msgstr ""
+msgid "Lastly, we need to tell Hibernate about the remaining entity class
properties. By default, no properties of the class are considered persistent:"
+msgstr "最后我们在映射文件里面包含需要持久化属性的声明。默认情况下,类里面的属性都被视为非持久化的: "
#. Tag: para
-#: tutorial.xml:252
-#, fuzzy, no-c-format
-msgid ""
-"Lastly, we need to tell Hibernate about the remaining entity class "
-"properties. By default, no properties of the class are considered
persistent:"
-msgstr ""
-"最后我们在映射文件里面包含需要持久化属性的声明。默认情况下,类里面的属性都被"
-"视为非持久化的:"
-
-#. Tag: programlisting
-#: tutorial.xml:258
#, no-c-format
-msgid ""
-"<![CDATA[\n"
-"<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
-"\n"
-" <class name=\"Event\" table=\"EVENTS\">\n"
-" <id name=\"id\" column=\"EVENT_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"date\" type=\"timestamp\"
column=\"EVENT_DATE\"/>\n"
-" <property name=\"title\"/>\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
+msgid "Similar to the <literal>id</literal> element, the
<literal>name</literal> attribute of the
<literal>property</literal> element tells Hibernate which getter and setter
methods to use. In this case, Hibernate will search for
<literal>getDate()</literal>, <literal>setDate()</literal>,
<literal>getTitle()</literal> and <literal>setTitle()</literal>
methods."
+msgstr "和 <literal>id</literal>
元素一样,<literal>property</literal> 元素的 <literal>name</literal> 属性告诉
Hibernate 使用哪个 getter 和 setter 方法。在此例中,Hibernate 会寻找
<literal>getDate()</literal>、<literal>setDate()</literal>、<literal>getTitle()</literal>
和 <literal>setTitle()</literal> 方法。 "
#. Tag: para
-#: tutorial.xml:260
-#, fuzzy, no-c-format
-msgid ""
-"Similar to the <literal>id</literal> element, the
<literal>name</literal> "
-"attribute of the <literal>property</literal> element tells Hibernate
which "
-"getter and setter methods to use. In this case, Hibernate will search for "
-"<literal>getDate()</literal>, <literal>setDate()</literal>,
<literal>getTitle"
-"()</literal> and <literal>setTitle()</literal> methods."
-msgstr ""
-"和<literal>id</literal>元素一样,<literal>property</literal>元素的"
-"<literal>name</literal>属性告诉Hibernate使用哪个getter和setter方法。在此例"
-"中,Hibernate会寻找<literal>getDate()/setDate()</literal>, 以及"
-"<literal>getTitle()/setTitle()</literal>。"
+#, no-c-format
+msgid "Why does the <literal>date</literal> property mapping include the
<literal>column</literal> attribute, but the
<literal>title</literal> does not? Without the
<literal>column</literal> attribute, Hibernate by default uses the property
name as the column name. This works for <literal>title</literal>, however,
<literal>date</literal> is a reserved keyword in most databases so you will
need to map it to a different name."
+msgstr "为什么 <literal>date</literal> 属性的映射含有
<literal>column</literal> attribute,而 <literal>title</literal>
却没有?当没有设定 <literal>column</literal> attribute 的时候,Hibernate 缺省地使用 JavaBean
的属性名作为字段名。对于
<literal>title</literal>,这样工作得很好。然而,<literal>date</literal>
在多数的数据库里,是一个保留关键字,所以我们最好把它映射成一个不同的名字。 "
#. Tag: para
-#: tutorial.xml:271
-#, fuzzy, no-c-format
-msgid ""
-"Why does the <literal>date</literal> property mapping include the
"
-"<literal>column</literal> attribute, but the
<literal>title</literal> does "
-"not? Without the <literal>column</literal> attribute, Hibernate by
default "
-"uses the property name as the column name. This works for
<literal>title</"
-"literal>, however, <literal>date</literal> is a reserved keyword in
most "
-"databases so you will need to map it to a different name."
-msgstr ""
-"为什么<literal>date</literal>属性的映射含有<literal>column</literal>
"
-"attribute,而<literal>title</literal>却没有?当没有设定<literal>column</"
-"literal> attribute 的时候,Hibernate缺省地使用JavaBean的属性名作为字段名。对"
-"于<literal>title</literal>,这样工作得很好。然而,<literal>date</literal>在多"
-"数的数据库里,是一个保留关键字,所以我们最好把它映射成一个不同的名字。"
+#, no-c-format
+msgid "The <literal>title</literal> mapping also lacks a
<literal>type</literal> attribute. The types declared and used in the mapping
files are not Java data types; they are not SQL database types either. These types are
called <emphasis>Hibernate mapping types</emphasis>, converters which can
translate from Java to SQL data types and vice versa. Again, Hibernate will try to
determine the correct conversion and mapping type itself if the
<literal>type</literal> attribute is not present in the mapping. In some cases
this automatic detection using Reflection on the Java class might not have the default you
expect or need. This is the case with the <literal>date</literal> property.
Hibernate cannot know if the property, which is of
<literal>java.util.Date</literal>, should map to a SQL
<literal>date</literal>, <literal>timestamp</literal>, or
<literal>time</literal> column. Full date and time information is preserved by
mapping the property with a <literal>timestamp</literal>!
converter."
+msgstr "另一有趣的事情是 <literal>title</literal> 属性缺少一个
<literal>type</literal> attribute。我们在映射文件里声明并使用的类型,却不是我们期望的那样,是 Java
数据类型,同时也不是 SQL 数据库的数据类型。这些类型就是所谓的 Hibernate 映射类型<emphasis>(mapping
types)</emphasis>,它们能把 Java 数据类型转换到 SQL 数据类型,反之亦然。再次重申,如果在映射文件中没有设置
<literal>type</literal> 属性的话,Hibernate 会自己试着去确定正确的转换类型和它的映射类型。在某些情况下这个自动检测机制(在
Java 类上使用反射机制)不会产生你所期待或需要的缺省值。<literal>date</literal> 属性就是个很好的例子,Hibernate
无法知道这个属性(<literal>java.util.Date</literal> 类型的)应该被映射成:SQL
<literal>date</literal>,或 <literal>timestamp</literal>,还是
<literal>time</litera!
l> 字段。在此例中,把这个属性映射成 <literal>timestamp</literal> 转换器,这样我们预留了日期和时间的全部信息。
"
#. Tag: para
-#: tutorial.xml:281
-#, fuzzy, no-c-format
-msgid ""
-"The <literal>title</literal> mapping also lacks a
<literal>type</literal> "
-"attribute. The types declared and used in the mapping files are not Java "
-"data types; they are not SQL database types either. These types are called "
-"<emphasis>Hibernate mapping types</emphasis>, converters which can
translate "
-"from Java to SQL data types and vice versa. Again, Hibernate will try to "
-"determine the correct conversion and mapping type itself if the "
-"<literal>type</literal> attribute is not present in the mapping. In
some "
-"cases this automatic detection using Reflection on the Java class might not "
-"have the default you expect or need. This is the case with the "
-"<literal>date</literal> property. Hibernate cannot know if the
property, "
-"which is of <literal>java.util.Date</literal>, should map to a SQL
"
-"<literal>date</literal>, <literal>timestamp</literal>, or
<literal>time</"
-"literal> column. Full date and time information is preserved by mapping the
"
-"property with a <literal>timestamp</literal> converter."
-msgstr ""
-"另一有趣的事情是<literal>title</literal>属性缺少一个<literal>type</literal>
"
-"attribute。我们在映射文件里声明并使用的类型,却不是我们期望的那样,是Java数据"
-"类型,同时也不是SQL数据库的数据类型。这些类型就是所谓的Hibernate 映射类型"
-"<emphasis>(mapping types)</emphasis>,它们能把Java数据类型转换到SQL数据类"
-"型,反之亦然。再次重申,如果在映射文件中没有设置<literal>type</literal>属性的"
-"话,Hibernate会自己试着去确定正确的转换类型和它的映射类型。在某些情况下这个自"
-"动检测机制(在Java 类上使用反射机制)不会产生你所期待或需要的缺省值。"
-"<literal>date</literal>属性就是个很好的例子,Hibernate无法知道这个属性"
-"(<literal>java.util.Date</literal>类型的)应该被映射成:SQL
<literal>date</"
-"literal>,或<literal>timestamp</literal>,还是<literal>time</literal>
字段。"
-"在此例中,把这个属性映射成<literal>timestamp</literal> 转换器,这样我们预留了"
-"日期和时间的全部信息。"
-
-#. Tag: para
-#: tutorial.xml:297
#, no-c-format
-msgid ""
-"Hibernate makes this mapping type determination using reflection when the "
-"mapping files are processed. This can take time and resources, so if startup
"
-"performance is important you should consider explicitly defining the type to
"
-"use."
-msgstr ""
+msgid "Hibernate makes this mapping type determination using reflection when the
mapping files are processed. This can take time and resources, so if startup performance
is important you should consider explicitly defining the type to use."
+msgstr "当处理映射文件时,Hibernate
用反射(reflection)来决定这个映射类型。这需要时间和资源,所以如果你注重启动性能,你应该考虑显性地定义所用的类型。"
#. Tag: para
-#: tutorial.xml:304
#, no-c-format
-msgid ""
-"Save this mapping file as <filename>src/main/resources/org/hibernate/"
-"tutorial/domain/Event.hbm.xml</filename>."
-msgstr ""
+msgid "Save this mapping file as
<filename>src/main/resources/org/hibernate/tutorial/domain/Event.hbm.xml</filename>."
+msgstr "把这个映射文件保存为
<filename>src/main/resources/org/hibernate/tutorial/domain/Event.hbm.xml</filename>。"
#. Tag: title
-#: tutorial.xml:312
#, no-c-format
msgid "Hibernate configuration"
-msgstr "Hibernate配置"
+msgstr "Hibernate 配置"
#. Tag: para
-#: tutorial.xml:314
#, no-c-format
-msgid ""
-"At this point, you should have the persistent class and its mapping file in "
-"place. It is now time to configure Hibernate. First let's set up HSQLDB to
"
-"run in \"server mode\""
-msgstr ""
+msgid "At this point, you should have the persistent class and its mapping file in
place. It is now time to configure Hibernate. First let's set up HSQLDB to run in
\"server mode\""
+msgstr "此时,你应该有了持久化类和它的映射文件。现在是配置 Hibernate 的时候了。首先让我们设立 HSQLDB 使其运行在“服务器模式”。"
#. Tag: para
-#: tutorial.xml:321
#, no-c-format
-msgid "We do this do that the data remains between runs."
-msgstr ""
+msgid "We do this so that the data remains between runs."
+msgstr "数据在程序运行期间需要保持有效。"
#. Tag: para
-#: tutorial.xml:326
-#, fuzzy, no-c-format
-msgid ""
-"We will utilize the Maven exec plugin to launch the HSQLDB server by "
-"running: <command> mvn exec:java
-Dexec.mainClass=\"org.hsqldb.Server\" -"
-"Dexec.args=\"-database.0 file:target/data/tutorial\"</command> You
will see "
-"it start up and bind to a TCP/IP socket; this is where our application will "
-"connect later. If you want to start with a fresh database during this "
-"tutorial, shutdown HSQLDB, delete all files in the
<filename>target/data</"
-"filename> directory, and start HSQLDB again."
-msgstr ""
-"在开发的根目录下创建一个<literal>data</literal>目录 - 这是HSQL DB存储数据文"
-"件的地方。此时在data目录中运行<literal>java -classpath ../lib/hsqldb.jar org."
-"hsqldb.Server</literal>就可启动数据库。你可以在log中看到它的启动,及绑定到"
-"TCP/IP套结字,这正是我们的应用程序稍后会连接的地方。如果你希望在本例中运行一"
-"个全新的数据库,就在窗口中按下<literal>CTRL + C</literal>来关闭HSQL数据库,并"
-"删除<literal>data/</literal>目录下的所有文件,再重新启动HSQL数据库。"
+#, no-c-format
+msgid "We will utilize the Maven exec plugin to launch the HSQLDB server by running:
<command> mvn exec:java -Dexec.mainClass=\"org.hsqldb.Server\"
-Dexec.args=\"-database.0 file:target/data/tutorial\"</command> You will
see it start up and bind to a TCP/IP socket; this is where our application will connect
later. If you want to start with a fresh database during this tutorial, shutdown HSQLDB,
delete all files in the <filename>target/data</filename> directory, and start
HSQLDB again."
+msgstr "在开发的根目录下创建一个 <literal>data</literal> 目录 - 这是 HSQL DB
存储数据文件的地方。此时在 data 目录中运行 <literal>java -classpath ../lib/hsqldb.jar
org.hsqldb.Server</literal> 就可启动数据库。你可以在 log 中看到它的启动,及绑定到 TCP/IP
套接字,这正是我们的应用程序稍后会连接的地方。如果你希望在本例中运行一个全新的数据库,就在窗口中按下 <literal>CTRL + C</literal>
来关闭 HSQL 数据库,并删除 <literal>data/</literal> 目录下的所有文件,再重新启动 HSQL 数据库。 "
#. Tag: para
-#: tutorial.xml:337
#, no-c-format
-msgid ""
-"Hibernate will be connecting to the database on behalf of your application, "
-"so it needs to know how to obtain connections. For this tutorial we will be "
-"using a standalone connection pool (as opposed to a
<interfacename>javax.sql."
-"DataSource</interfacename>). Hibernate comes with support for two
third-"
-"party open source JDBC connection pools: <ulink
url=\"https://sourceforge."
-"net/projects/c3p0\">c3p0</ulink> and <ulink
url=\"http://proxool.sourceforge."
-"net/\">proxool</ulink>. However, we will be using the Hibernate
built-in "
-"connection pool for this tutorial."
-msgstr ""
+msgid "Hibernate will be connecting to the database on behalf of your application,
so it needs to know how to obtain connections. For this tutorial we will be using a
standalone connection pool (as opposed to a
<interfacename>javax.sql.DataSource</interfacename>). Hibernate comes with
support for two third-party open source JDBC connection pools: <ulink
url=\"https://sourceforge.net/projects/c3p0\">c3p0</ulink... and
<ulink
url=\"http://proxool.sourceforge.net/\">proxool</ulink>.
However, we will be using the Hibernate built-in connection pool for this tutorial."
+msgstr "Hibernate 将为你的应用程序连接到数据库,所以它需要知道如何获取连接。在这个教程里,我们使用一个独立连接池(和
<interfacename>javax.sql.DataSource</interfacename> 相反)。Hibernate 支持两个第三方的开源
JDBC 连接池:<ulink
url=\"https://sourceforge.net/projects/c3p0\">c3p0</ulink... 和 <ulink
url=\"http://proxool.sourceforge.net/\">proxool</ulink>...
Hibernate 内置的连接池。"
#. Tag: para
-#: tutorial.xml:348
#, no-c-format
-msgid ""
-"The built-in Hibernate connection pool is in no way intended for production "
-"use. It lacks several features found on any decent connection pool."
-msgstr ""
+msgid "The built-in Hibernate connection pool is not intended for production
use."
+msgstr "嵌入的 Hibernate 连接池不用于产品环境。"
#. Tag: para
-#: tutorial.xml:354
-#, fuzzy, no-c-format
-msgid ""
-"For Hibernate's configuration, we can use a simple
<literal>hibernate."
-"properties</literal> file, a more sophisticated
<literal>hibernate.cfg.xml</"
-"literal> file, or even complete programmatic setup. Most users prefer the
"
-"XML configuration file:"
-msgstr ""
-"为了保存Hibernate的配置,我们可以使用一个简单的<literal>hibernate."
-"properties</literal>文件,或者一个稍微复杂的<literal>hibernate.cfg.xml</"
-"literal>,甚至可以完全使用程序来配置Hibernate。多数用户更喜欢使用XML配置文"
-"件:"
-
-#. Tag: programlisting
-#: tutorial.xml:360
#, no-c-format
-msgid ""
-"<![CDATA[<?xml version='1.0' encoding='utf-8'?>\n"
-"<!DOCTYPE hibernate-configuration PUBLIC\n"
-" \"-//Hibernate/Hibernate Configuration DTD 3.0//EN\"\n"
-"
\"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"
-"\">\n"
-"\n"
-"<hibernate-configuration>\n"
-"\n"
-" <session-factory>\n"
-"\n"
-" <!-- Database connection settings -->\n"
-" <property
name=\"connection.driver_class\">org.hsqldb.jdbcDriver</"
-"property>\n"
-" <property
name=\"connection.url\">jdbc:hsqldb:hsql://localhost</"
-"property>\n"
-" <property
name=\"connection.username\">sa</property>\n"
-" <property
name=\"connection.password\"></property>\n"
-"\n"
-" <!-- JDBC connection pool (use the built-in) -->\n"
-" <property
name=\"connection.pool_size\">1</property>\n"
-"\n"
-" <!-- SQL dialect -->\n"
-" <property
name=\"dialect\">org.hibernate.dialect.HSQLDialect</"
-"property>\n"
-"\n"
-" <!-- Enable Hibernate's automatic session context management
-->\n"
-" <property
name=\"current_session_context_class\">thread</property>\n"
-"\n"
-" <!-- Disable the second-level cache -->\n"
-" <property
name=\"cache.provider_class\">org.hibernate.cache."
-"NoCacheProvider</property>\n"
-"\n"
-" <!-- Echo all executed SQL to stdout -->\n"
-" <property name=\"show_sql\">true</property>\n"
-"\n"
-" <!-- Drop and re-create the database schema on startup -->\n"
-" <property
name=\"hbm2ddl.auto\">update</property>\n"
-"\n"
-" <mapping
resource=\"org/hibernate/tutorial/domain/Event.hbm.xml\"/>\n"
-"\n"
-" </session-factory>\n"
-"\n"
-"</hibernate-configuration>]]>"
-msgstr ""
+msgid "For Hibernate's configuration, we can use a simple
<literal>hibernate.properties</literal> file, a more sophisticated
<literal>hibernate.cfg.xml</literal> file, or even complete programmatic
setup. Most users prefer the XML configuration file:"
+msgstr "为了保存 Hibernate 的配置,我们可以使用一个简单的
<literal>hibernate.properties</literal> 文件,或者一个稍微复杂的
<literal>hibernate.cfg.xml</literal>,甚至可以完全使用程序来配置 Hibernate。多数用户更喜欢使用 XML
配置文件: "
#. Tag: para
-#: tutorial.xml:363
#, no-c-format
msgid "Notice that this configuration file specifies a different DTD"
-msgstr ""
+msgstr "请注意,这个配置文件指定了一个不同的 DTD。"
#. Tag: para
-#: tutorial.xml:366
-#, fuzzy, no-c-format
-msgid ""
-"You configure Hibernate's <literal>SessionFactory</literal>.
SessionFactory "
-"is a global factory responsible for a particular database. If you have "
-"several databases, for easier startup you should use several
<literal><"
-"session-factory></literal> configurations in several configuration
files."
-msgstr ""
-"注意这个XML配置使用了一个不同的DTD。在这里,我们配置了Hibernate的"
-"<literal>SessionFactory</literal>-一个关联于特定数据库全局的工厂"
-"(factory)。如果你要使用多个数据库,就要用多个的<literal><session-"
-"factory></literal>,通常把它们放在多个配置文件中(为了更容易启动)。"
+#, no-c-format
+msgid "You configure Hibernate's <literal>SessionFactory</literal>.
SessionFactory is a global factory responsible for a particular database. If you have
several databases, for easier startup you should use several
<literal><session-factory></literal> configurations in several
configuration files."
+msgstr "注意这个 XML 配置使用了一个不同的 DTD。在这里,我们配置了 Hibernate
的<literal>SessionFactory</literal> —
一个关联于特定数据库全局的工厂(factory)。如果你要使用多个数据库,就要用多个的
<literal><session-factory></literal>,通常把它们放在多个配置文件中(为了更容易启动)。
"
#. Tag: para
-#: tutorial.xml:373
#, no-c-format
-msgid ""
-"The first four <literal>property</literal> elements contain the
necessary "
-"configuration for the JDBC connection. The dialect
<literal>property</"
-"literal> element specifies the particular SQL variant Hibernate
generates."
-msgstr ""
+msgid "The first four <literal>property</literal> elements contain the
necessary configuration for the JDBC connection. The dialect
<literal>property</literal> element specifies the particular SQL variant
Hibernate generates."
+msgstr "签名 4 个 <literal>property</literal> 元素包含了 JDBC 连接所必需的配置。方言
<literal>property</literal> 元素指定了 Hibernate 生成的特定 SQL 语句。"
#. Tag: para
-#: tutorial.xml:380
#, no-c-format
-msgid ""
-"In most cases, Hibernate is able to properly determine which dialect to use.
"
-"See <xref linkend=\"portability-dialectresolver\"/> for more
information."
-msgstr ""
+msgid "Hibernate is able to correctly determine which dialect to use in most cases.
See <xref linkend=\"portability-dialectresolver\" /> for more
information."
+msgstr "在大多数情况下,Hibernate 都能够正确地决定所使用的方言。更多信息请参考 <xref
linkend=\"portability-dialectresolver\" />。"
#. Tag: para
-#: tutorial.xml:386
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate's automatic session management for persistence contexts is "
-"particularly useful in this context. The
<literal>hbm2ddl.auto</literal> "
-"option turns on automatic generation of database schemas directly into the "
-"database. This can also be turned off by removing the configuration option, "
-"or redirected to a file with the help of the
<literal>SchemaExport</literal> "
-"Ant task. Finally, add the mapping file(s) for persistent classes to the "
-"configuration."
-msgstr ""
-"最开始的4个<literal>property</literal>元素包含必要的JDBC连接信息。方言"
-"(dialect)的<literal>property</literal>元素指明Hibernate 生成的特定SQL变量。"
-"你很快会看到,Hibernate对持久化上下文的自动session管理就会派上用场。 打开"
-"<literal>hbm2ddl.auto</literal>选项将自动生成数据库模式(schema)- 直接加入"
-"数据库中。当然这个选项也可以被关闭(通过去除这个配置选项)或者通过Ant任务"
-"<literal>SchemaExport</literal>的帮助来把数据库schema重定向到文件中。最后,在"
-"配置中为持久化类加入映射文件。"
+#, no-c-format
+msgid "Hibernate's automatic session management for persistence contexts is
particularly useful in this context. The <literal>hbm2ddl.auto</literal>
option turns on automatic generation of database schemas directly into the database. This
can also be turned off by removing the configuration option, or redirected to a file with
the help of the <literal>SchemaExport</literal> Ant task. Finally, add the
mapping file(s) for persistent classes to the configuration."
+msgstr "最开始的 4 个 <literal>property</literal> 元素包含必要的 JDBC
连接信息。方言(dialect)的 <literal>property</literal> 元素指明 Hibernate 生成的特定 SQL
变量。你很快会看到,Hibernate 对持久化上下文的自动 session 管理就会派上用场。 打开
<literal>hbm2ddl.auto</literal> 选项将自动生成数据库模式(schema)-
直接加入数据库中。当然这个选项也可以被关闭(通过去除这个配置选项)或者通过 Ant 任务 <literal>SchemaExport</literal>
的帮助来把数据库 schema 重定向到文件中。最后,在配置中为持久化类加入映射文件。 "
#. Tag: para
-#: tutorial.xml:395
#, no-c-format
-msgid ""
-"Save this file as <filename>hibernate.cfg.xml</filename> into the
"
-"<filename>src/main/resources</filename> directory."
-msgstr ""
+msgid "Save this file as <filename>hibernate.cfg.xml</filename> into the
<filename>src/main/resources</filename> directory."
+msgstr "把这个文件保存为 <filename>src/main/resources</filename> 目录下的
<filename>hibernate.cfg.xml</filename>。"
#. Tag: title
-#: tutorial.xml:403
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Building with Maven"
-msgstr "用Ant构建"
+msgstr "用 Maven 构建 "
#. Tag: para
-#: tutorial.xml:405
#, no-c-format
-msgid ""
-"We will now build the tutorial with Maven. You will need to have Maven "
-"installed; it is available from the <ulink
url=\"http://maven.apache.org/"
-"download.html\">Maven download page</ulink>. Maven will read the
<filename>/"
-"pom.xml</filename> file we created earlier and know how to perform some
"
-"basic project tasks. First, lets run the <literal>compile</literal>
goal to "
-"make sure we can compile everything so far:"
-msgstr ""
+msgid "We will now build the tutorial with Maven. You will need to have Maven
installed; it is available from the <ulink
url=\"http://maven.apache.org/download.html\">Maven download
page</ulink>. Maven will read the <filename>/pom.xml</filename> file we
created earlier and know how to perform some basic project tasks. First, lets run the
<literal>compile</literal> goal to make sure we can compile everything so
far:"
+msgstr "我们将用 Maven 构建这个教程。你将需要安装 Maven;你可以从 <ulink
url=\"http://maven.apache.org/download.html\">Maven 下载页面</ulink>获得
Maven。Maen 将读取我们先前创建的 <filename>/pom.xml</filename> 并知道执行基本的项目任务。首先,让我们运行
<literal>compile</literal> 目标来确保我们可以编译到目前为止的所有程序:"
-#. Tag: programlisting
-#: tutorial.xml:415
-#, no-c-format
-msgid ""
-"<![CDATA[[hibernateTutorial]$ mvn compile\n"
-"[INFO] Scanning for projects...\n"
-"[INFO] "
-"------------------------------------------------------------------------\n"
-"[INFO] Building First Hibernate Tutorial\n"
-"[INFO] task-segment: [compile]\n"
-"[INFO] "
-"------------------------------------------------------------------------\n"
-"[INFO] [resources:resources]\n"
-"[INFO] Using default encoding to copy filtered resources.\n"
-"[INFO] [compiler:compile]\n"
-"[INFO] Compiling 1 source file to /home/steve/projects/sandbox/"
-"hibernateTutorial/target/classes\n"
-"[INFO] "
-"------------------------------------------------------------------------\n"
-"[INFO] BUILD SUCCESSFUL\n"
-"[INFO] "
-"------------------------------------------------------------------------\n"
-"[INFO] Total time: 2 seconds\n"
-"[INFO] Finished at: Tue Jun 09 12:25:25 CDT 2009\n"
-"[INFO] Final Memory: 5M/547M\n"
-"[INFO] "
-"------------------------------------------------------------------------]]>"
-msgstr ""
-
#. Tag: title
-#: tutorial.xml:420
#, no-c-format
msgid "Startup and helpers"
msgstr "启动和辅助类"
#. Tag: para
-#: tutorial.xml:422
-#, fuzzy, no-c-format
-msgid ""
-"It is time to load and store some <literal>Event</literal> objects, but
"
-"first you have to complete the setup with some infrastructure code. You have
"
-"to startup Hibernate by building a global
<interfacename>org.hibernate."
-"SessionFactory</interfacename> object and storing it somewhere for easy
"
-"access in application code. A
<interfacename>org.hibernate.SessionFactory</"
-"interfacename> is used to obtain
<interfacename>org.hibernate.Session</"
-"interfacename> instances. A
<interfacename>org.hibernate.Session</"
-"interfacename> represents a single-threaded unit of work. The "
-"<interfacename>org.hibernate.SessionFactory</interfacename> is a
thread-safe "
-"global object that is instantiated once."
-msgstr ""
-"是时候来加载和储存一些<literal>Event</literal>对象了,但首先我们得编写一些基"
-"础的代码以完成设置。我们必须启动Hibernate,此过程包括创建一个全局的"
-"<literal>SessoinFactory</literal>,并把它储存在应用程序代码容易访问的地方。"
-"<literal>SessionFactory</literal>可以创建并打开新的<literal>Session</"
-"literal>。一个<literal>Session</literal>代表一个单线程的单元操作,"
-"<literal>SessionFactory</literal>则是个线程安全的全局对象,只需要被实例化一"
-"次。"
+#, no-c-format
+msgid "It is time to load and store some <literal>Event</literal>
objects, but first you have to complete the setup with some infrastructure code. You have
to startup Hibernate by building a global
<interfacename>org.hibernate.SessionFactory</interfacename> object and storing
it somewhere for easy access in application code. A
<interfacename>org.hibernate.SessionFactory</interfacename> is used to obtain
<interfacename>org.hibernate.Session</interfacename> instances. A
<interfacename>org.hibernate.Session</interfacename> represents a
single-threaded unit of work. The
<interfacename>org.hibernate.SessionFactory</interfacename> is a thread-safe
global object that is instantiated once."
+msgstr "是时候来加载和储存一些 <literal>Event</literal>
对象了,但首先我们得编写一些基础的代码以完成设置。我们必须启动 Hibernate,此过程包括创建一个全局的
<literal>SessoinFactory</literal>,并把它储存在应用程序代码容易访问的地方。<literal>SessionFactory</literal>
可以创建并打开新的 <literal>Session</literal>。一个 <literal>Session</literal>
代表一个单线程的单元操作,<interfacename>org.hibernate.SessionFactory</interfacename>
则是个线程安全的全局对象,只需要被实例化一次。 "
#. Tag: para
-#: tutorial.xml:436
-#, fuzzy, no-c-format
-msgid ""
-"We will create a <literal>HibernateUtil</literal> helper class that
takes "
-"care of startup and makes accessing the <interfacename>org.hibernate."
-"SessionFactory</interfacename> more convenient."
-msgstr ""
-"我们将创建一个<literal>HibernateUtil</literal>辅助类(helper class)来负责启"
-"动Hibernate和更方便地操作<literal>SessionFactory</literal>。让我们来看一下它"
-"的实现:"
-
-#. Tag: programlisting
-#: tutorial.xml:442
#, no-c-format
-msgid ""
-"<![CDATA[package org.hibernate.tutorial.util;\n"
-"\n"
-"import org.hibernate.SessionFactory;\n"
-"import org.hibernate.cfg.Configuration;\n"
-"\n"
-"public class HibernateUtil {\n"
-"\n"
-" private static final SessionFactory sessionFactory = buildSessionFactory"
-"();\n"
-"\n"
-" private static SessionFactory buildSessionFactory() {\n"
-" try {\n"
-" // Create the SessionFactory from hibernate.cfg.xml\n"
-" return new Configuration().configure().buildSessionFactory();\n"
-" }\n"
-" catch (Throwable ex) {\n"
-" // Make sure you log the exception, as it might be swallowed\n"
-" System.err.println(\"Initial SessionFactory creation
failed.\" + "
-"ex);\n"
-" throw new ExceptionInInitializerError(ex);\n"
-" }\n"
-" }\n"
-"\n"
-" public static SessionFactory getSessionFactory() {\n"
-" return sessionFactory;\n"
-" }\n"
-"\n"
-"}]]>"
-msgstr ""
+msgid "We will create a <literal>HibernateUtil</literal> helper class
that takes care of startup and makes accessing the
<interfacename>org.hibernate.SessionFactory</interfacename> more
convenient."
+msgstr "我们将创建一个 <literal>HibernateUtil</literal> 辅助类(helper class)来负责启动
Hibernate 和更方便地操作
<interfacename>org.hibernate.SessionFactory</interfacename>。让我们来看一下它的实现:"
#. Tag: para
-#: tutorial.xml:444
#, no-c-format
-msgid ""
-"Save this code as <filename>src/main/java/org/hibernate/tutorial/util/"
-"HibernateUtil.java</filename>"
-msgstr ""
+msgid "Save this code as
<filename>src/main/java/org/hibernate/tutorial/util/HibernateUtil.java</filename>"
+msgstr "把这段代码保存为
<filename>src/main/java/org/hibernate/tutorial/util/HibernateUtil.java</filename>。"
#. Tag: para
-#: tutorial.xml:449
-#, fuzzy, no-c-format
-msgid ""
-"This class not only produces the global <interfacename>org.hibernate."
-"SessionFactory</interfacename> reference in its static initializer; it also
"
-"hides the fact that it uses a static singleton. We might just as well have "
-"looked up the
<interfacename>org.hibernate.SessionFactory</interfacename> "
-"reference from JNDI in an application server or any other location for that "
-"matter."
-msgstr ""
-"这个类不但在它的静态初始化过程(仅当加载这个类的时候被JVM执行一次)中产生全局"
-"的<literal>SessionFactory</literal>,而且隐藏了它使用了静态singleton的事实。"
-"它也可能在应用程序服务器中的JNDI查找<literal>SessionFactory</literal>。"
+#, no-c-format
+msgid "This class not only produces the global
<interfacename>org.hibernate.SessionFactory</interfacename> reference in its
static initializer; it also hides the fact that it uses a static singleton. We might just
as well have looked up the
<interfacename>org.hibernate.SessionFactory</interfacename> reference from
JNDI in an application server or any other location for that matter."
+msgstr "这个类不但在它的静态初始化过程(仅当加载这个类的时候被 JVM 执行一次)中产生全局的
<interfacename>org.hibernate.SessionFactory</interfacename>,而且隐藏了它使用了静态
singleton 的事实。它也可能在应用程序服务器中的 JNDI 查找
<interfacename>org.hibernate.SessionFactory</interfacename>。"
#. Tag: para
-#: tutorial.xml:458
-#, fuzzy, no-c-format
-msgid ""
-"If you give the
<interfacename>org.hibernate.SessionFactory</interfacename> "
-"a name in your configuration, Hibernate will try to bind it to JNDI under "
-"that name after it has been built. Another, better option is to use a JMX "
-"deployment and let the JMX-capable container instantiate and bind a "
-"<literal>HibernateService</literal> to JNDI. Such advanced options are
"
-"discussed later."
-msgstr ""
-"如果你在配置文件中给<literal>SessionFactory</literal>一个名字,在"
-"<literal>SessionFactory</literal>创建后,Hibernate会试着把它绑定到JNDI。要完"
-"全避免这样的代码,你也可以使用JMX部署,让具有JMX能力的容器来实例化"
-"<literal>HibernateService</literal>并把它绑定到JNDI。这些高级可选项在后面的章"
-"节中会讨论到。"
+#, no-c-format
+msgid "If you give the
<interfacename>org.hibernate.SessionFactory</interfacename> a name in your
configuration, Hibernate will try to bind it to JNDI under that name after it has been
built. Another, better option is to use a JMX deployment and let the JMX-capable container
instantiate and bind a <literal>HibernateService</literal> to JNDI. Such
advanced options are discussed later."
+msgstr "如果你在配置文件中给
<interfacename>org.hibernate.SessionFactory</interfacename> 一个名字,在
它创建后,Hibernate 会试着把它绑定到 JNDI。要完全避免这样的代码,你也可以使用 JMX 部署,让具有 JMX 能力的容器来实例化
<literal>HibernateService</literal> 并把它绑定到 JNDI。这些高级可选项在后面的章节中会讨论到。"
#. Tag: para
-#: tutorial.xml:467
-#, fuzzy, no-c-format
-msgid ""
-"You now need to configure a logging system. Hibernate uses commons logging "
-"and provides two choices: Log4j and JDK 1.4 logging. Most developers prefer "
-"Log4j: copy <literal>log4j.properties</literal> from the Hibernate
"
-"distribution in the <literal>etc/</literal> directory to your
<literal>src</"
-"literal> directory, next to <literal>hibernate.cfg.xml</literal>. If
you "
-"prefer to have more verbose output than that provided in the example "
-"configuration, you can change the settings. By default, only the Hibernate "
-"startup message is shown on stdout."
-msgstr ""
-"再次编译这个应用程序应该不会有问题。最后我们需要配置一个日志(logging)系统 "
-"- Hibernate使用通用日志接口,允许你在Log4j和JDK 1.4 日志之间进行选择。多数开"
-"发者更喜欢Log4j:从Hibernate的发布包中(它在<literal>etc/</literal>目录下)拷"
-"贝<literal>log4j.properties</literal>到你的<literal>src</literal>目录,与"
-"<literal>hibernate.cfg.xml</literal>.放在一起。看一下配置示例,如果你希望看到"
-"更加详细的输出信息,你可以修改配置。默认情况下,只有Hibernate的启动信息才会显"
-"示在标准输出上。"
+#, no-c-format
+msgid "You now need to configure a logging system. Hibernate uses commons logging
and provides two choices: Log4j and JDK 1.4 logging. Most developers prefer Log4j: copy
<literal>log4j.properties</literal> from the Hibernate distribution in the
<literal>etc/</literal> directory to your <literal>src</literal>
directory, next to <literal>hibernate.cfg.xml</literal>. If you prefer to have
more verbose output than that provided in the example configuration, you can change the
settings. By default, only the Hibernate startup message is shown on stdout."
+msgstr "再次编译这个应用程序应该不会有问题。最后我们需要配置一个日志(logging)系统 — Hibernate 使用通用日志接口,允许你在 Log4j 和
JDK 1.4 日志之间进行选择。多数开发者更喜欢 Log4j:从 Hibernate 的发布包中(它在 <literal>etc/</literal>
目录下)拷贝 <literal>log4j.properties</literal> 到你的
<literal>src</literal> 目录,与 <literal>hibernate.cfg.xml</literal>
放在一起。看一下配置示例,如果你希望看到更加详细的输出信息,你可以修改配置。默认情况下,只有 Hibernate 的启动信息才会显示在标准输出上。 "
#. Tag: para
-#: tutorial.xml:477
-#, fuzzy, no-c-format
-msgid ""
-"The tutorial infrastructure is complete and you are now ready to do some "
-"real work with Hibernate."
-msgstr "示例的基本框架完成了 - 现在我们可以用Hibernate来做些真正的工作。"
+#, no-c-format
+msgid "The tutorial infrastructure is complete and you are now ready to do some real
work with Hibernate."
+msgstr "示例的基本框架完成了 — 现在我们可以用 Hibernate 来做些真正的工作。 "
#. Tag: title
-#: tutorial.xml:485
#, no-c-format
msgid "Loading and storing objects"
msgstr "加载并存储对象"
#. Tag: para
-#: tutorial.xml:487
-#, fuzzy, no-c-format
-msgid ""
-"We are now ready to start doing some real worjk with Hibernate. Let's start
"
-"by writing an <literal>EventManager</literal> class with a
<literal>main()</"
-"literal> method:"
-msgstr ""
-"我们终于可以使用Hibernate来加载和存储对象了,编写一个带有<literal>main()</"
-"literal>方法的<literal>EventManager</literal>类:"
-
-#. Tag: programlisting
-#: tutorial.xml:493
#, no-c-format
-msgid ""
-"<![CDATA[package org.hibernate.tutorial;\n"
-"\n"
-"import org.hibernate.Session;\n"
-"\n"
-"import java.util.*;\n"
-"\n"
-"import org.hibernate.tutorial.domain.Event;\n"
-"import org.hibernate.tutorial.util.HibernateUtil;\n"
-"\n"
-"public class EventManager {\n"
-"\n"
-" public static void main(String[] args) {\n"
-" EventManager mgr = new EventManager();\n"
-"\n"
-" if (args[0].equals(\"store\")) {\n"
-" mgr.createAndStoreEvent(\"My Event\", new Date());\n"
-" }\n"
-"\n"
-" HibernateUtil.getSessionFactory().close();\n"
-" }\n"
-"\n"
-" private void createAndStoreEvent(String title, Date theDate) {\n"
-" Session session =
HibernateUtil.getSessionFactory().getCurrentSession"
-"();\n"
-" session.beginTransaction();\n"
-"\n"
-" Event theEvent = new Event();\n"
-" theEvent.setTitle(title);\n"
-" theEvent.setDate(theDate);\n"
-" session.save(theEvent);\n"
-"\n"
-" session.getTransaction().commit();\n"
-" }\n"
-"\n"
-"}]]>"
-msgstr ""
+msgid "We are now ready to start doing some real worjk with Hibernate. Let's
start by writing an <literal>EventManager</literal> class with a
<literal>main()</literal> method:"
+msgstr "我们终于可以使用 Hibernate 来加载和存储对象了,编写一个带有 <literal>main()</literal>
方法的 <literal>EventManager</literal> 类: "
#. Tag: para
-#: tutorial.xml:495
-#, fuzzy, no-c-format
-msgid ""
-"In <literal>createAndStoreEvent()</literal> we created a new
<literal>Event</"
-"literal> object and handed it over to Hibernate. At that point, Hibernate
"
-"takes care of the SQL and executes an <literal>INSERT</literal> on the
"
-"database."
-msgstr ""
-"我们创建了个新的<literal>Event</literal>对象并把它传递给Hibernate。现在"
-"Hibernate负责与SQL打交道,并把<literal>INSERT</literal>命令传给数据库。在运行"
-"之前,让我们看一下处理<literal>Session</literal>和<literal>Transaction</"
-"literal>的代码。"
+#, no-c-format
+msgid "In <literal>createAndStoreEvent()</literal> we created a new
<literal>Event</literal> object and handed it over to Hibernate. At that
point, Hibernate takes care of the SQL and executes an
<literal>INSERT</literal> on the database."
+msgstr "在 <literal>createAndStoreEvent()</literal> 来里我们创建了一个新的
<literal>Event</literal> 对象并把它传递给 Hibernate。现在 Hibernate 负责与 SQL 打交道,并把
<literal>INSERT</literal> 命令传给数据库。"
#. Tag: para
-#: tutorial.xml:502
-#, fuzzy, no-c-format
-msgid ""
-"A <interface>org.hibernate.Session</interface> is designed to represent
a "
-"single unit of work (a single atmoic piece of work to be performed). For now
"
-"we will keep things simple and assume a one-to-one granularity between a "
-"Hibernate <interface>org.hibernate.Session</interface> and a database
"
-"transaction. To shield our code from the actual underlying transaction "
-"system we use the Hibernate
<interfacename>org.hibernate.Transaction</"
-"interfacename> API. In this particular case we are using JDBC-based "
-"transactional semantics, but it could also run with JTA."
-msgstr ""
-"一个<literal>Session</literal>就是个单一的工作单元。我们暂时让事情简单一些,"
-"并假设Hibernate<literal>Session</literal>和数据库事务是一一对应的。为了让我们"
-"的代码从底层的事务系统中脱离出来(此例中是JDBC,但也可能是JTA),我们使用"
-"Hibernate
<literal>Session</literal>中的<literal>Transaction</literal>
API。"
+#, no-c-format
+msgid "A <interface>org.hibernate.Session</interface> is designed to
represent a single unit of work (a single atmoic piece of work to be performed). For now
we will keep things simple and assume a one-to-one granularity between a Hibernate
<interface>org.hibernate.Session</interface> and a database transaction. To
shield our code from the actual underlying transaction system we use the Hibernate
<interfacename>org.hibernate.Transaction</interfacename> API. In this
particular case we are using JDBC-based transactional semantics, but it could also run
with JTA."
+msgstr "一个 <interface>org.hibernate.Session</interface>
就是个单一的工作单元。我们暂时让事情简单一些,并假设 Hibernate
<interface>org.hibernate.Session</interface>
和数据库事务是一一对应的。为了让我们的代码从底层的事务系统中脱离出来(此例中是 JDBC,但也可能是 JTA),我们使用
<interfacename>org.hibernate.Transaction</interfacename> API。在这个例子里我们使用基于 JDBC
的事务性 semantic,但它也可以和 JTA 一起运行。"
#. Tag: para
-#: tutorial.xml:515
-#, fuzzy, no-c-format
-msgid ""
-"What does <literal>sessionFactory.getCurrentSession()</literal> do?
First, "
-"you can call it as many times and anywhere you like once you get hold of "
-"your <interfacename>org.hibernate.SessionFactory</interfacename>. The
"
-"<literal>getCurrentSession()</literal> method always returns the
\"current\" "
-"unit of work. Remember that we switched the configuration option for this "
-"mechanism to \"thread\" in our
<filename>src/main/resources/hibernate.cfg."
-"xml</filename>? Due to that setting, the context of a current unit of work
"
-"is bound to the current Java thread that executes the application."
-msgstr ""
-"<literal>sessionFactory.getCurrentSession()</literal>是干什么的呢?首先,只要"
-"你持有<literal>SessionFactory</literal>(幸亏我们有<literal>HibernateUtil</"
-"literal>,可以随时获得),大可在任何时候、任何地点调用这个方法。"
-"<literal>getCurrentSession()</literal>方法总会返回“当前的”工作单元。记得我们"
-"在<literal>hibernate.cfg.xml</literal>中把这一配置选项调整为\"thread\"了吗?"
-"因此,因此,当前工作单元被绑定到当前执行我们应用程序的Java线程。但是,这并非"
-"是完全准确的,你还得考虑工作单元的生命周期范围 (scope),它何时开始,又何时结束."
+#, no-c-format
+msgid "What does <literal>sessionFactory.getCurrentSession()</literal>
do? First, you can call it as many times and anywhere you like once you get hold of your
<interfacename>org.hibernate.SessionFactory</interfacename>. The
<literal>getCurrentSession()</literal> method always returns the
\"current\" unit of work. Remember that we switched the configuration option for
this mechanism to \"thread\" in our
<filename>src/main/resources/hibernate.cfg.xml</filename>? Due to that
setting, the context of a current unit of work is bound to the current Java thread that
executes the application."
+msgstr "<literal>sessionFactory.getCurrentSession()</literal>
是干什么的呢?首先,只要你持有
<interfacename>org.hibernate.SessionFactory</interfacename>,大可在任何时候、任何地点调用这个方法。<literal>getCurrentSession()</literal>
方法总会返回“当前的”工作单元。记得我们在
<filename>src/main/resources/hibernate.cfg.xml</filename> 中把这一配置选项调整为
\"thread\" 了吗?因此,因此,当前工作单元被绑定到当前执行我们应用程序的 Java
线程。但是,这并非是完全准确的,你还得考虑工作单元的生命周期范围(scope),它何时开始,又何时结束。"
#. Tag: para
-#: tutorial.xml:529
#, no-c-format
-msgid ""
-"Hibernate offers three methods of current session tracking. The
\"thread\" "
-"based method is not intended for production use; it is merely useful for "
-"prototyping and tutorials such as this one. Current session tracking is "
-"discussed in more detail later on."
-msgstr ""
+msgid "Hibernate offers three methods of current session tracking. The
\"thread\" based method is not intended for production use; it is merely useful
for prototyping and tutorials such as this one. Current session tracking is discussed in
more detail later on."
+msgstr "Hibernate 提供三种跟踪当前会话的方法。基于“线程”的方法不适合于产品环境,它仅用于 prototyping
和教学用途。后面将更详细地讨论会话跟踪。"
#. Tag: para
-#: tutorial.xml:538
-#, fuzzy, no-c-format
-msgid ""
-"A <interface>org.hibernate.Session</interface> begins when the first
call to "
-"<literal>getCurrentSession()</literal> is made for the current thread.
It is "
-"then bound by Hibernate to the current thread. When the transaction ends, "
-"either through commit or rollback, Hibernate automatically unbinds the "
-"<interface>org.hibernate.Session</interface> from the thread and closes
it "
-"for you. If you call <literal>getCurrentSession()</literal> again, you
get a "
-"new <interface>org.hibernate.Session</interface> and can start a new
unit of "
-"work."
-msgstr ""
-"<literal>Session</literal>在第一次被使用的时候,即第一次调用"
-"<literal>getCurrentSession()</literal>的时候,其生命周期就开始。然后它被"
-"Hibernate绑定到当前线程。当事务结束的时候,不管是提交还是回滚,Hibernate会自"
-"动把<literal>Session</literal>从当前线程剥离,并且关闭它。假若你再次调用"
-"<literal>getCurrentSession()</literal>,你会得到一个新的<literal>Session</"
-"literal>,并且开始一个新的工作单元。这种<emphasis>线程绑定(thread-bound)</"
-"emphasis>的编程模型(model)是使用Hibernate的最广泛的方式,因为它支持对你的代"
-"码灵活分层(事务划分可以和你的数据访问代码分离开来,在本教程的后面部分就会这么"
-"做)。"
+#, no-c-format
+msgid "A <interface>org.hibernate.Session</interface> begins when the
first call to <literal>getCurrentSession()</literal> is made for the current
thread. It is then bound by Hibernate to the current thread. When the transaction ends,
either through commit or rollback, Hibernate automatically unbinds the
<interface>org.hibernate.Session</interface> from the thread and closes it for
you. If you call <literal>getCurrentSession()</literal> again, you get a new
<interface>org.hibernate.Session</interface> and can start a new unit of
work."
+msgstr "<interface>org.hibernate.Session</interface> 在第一次被使用的时候,即第一次调用
<literal>getCurrentSession()</literal> 的时候,其生命周期就开始。然后它被 Hibernate
绑定到当前线程。当事务结束的时候,不管是提交还是回滚,Hibernate 会自动把
<interface>org.hibernate.Session</interface> 从当前线程剥离,并且关闭它。假若你再次调用
<literal>getCurrentSession()</literal>,你会得到一个新的
<interface>org.hibernate.Session</interface>,并且开始一个新的工作单元。"
#. Tag: para
-#: tutorial.xml:551
-#, fuzzy, no-c-format
-msgid ""
-"Related to the unit of work scope, should the Hibernate
<interface>org."
-"hibernate.Session</interface> be used to execute one or several database
"
-"operations? The above example uses one
<interface>org.hibernate.Session</"
-"interface> for one operation. However this is pure coincidence; the example
"
-"is just not complex enough to show any other approach. The scope of a "
-"Hibernate <interface>org.hibernate.Session</interface> is flexible but
you "
-"should never design your application to use a new Hibernate
<interface>org."
-"hibernate.Session</interface> for <emphasis>every</emphasis>
database "
-"operation. Even though it is used in the following examples, consider "
-"<emphasis>session-per-operation</emphasis> an anti-pattern. A real web
"
-"application is shown later in the tutorial which will help illustrate this."
-msgstr ""
-"和工作单元的生命周期这个话题相关,Hibernate <literal>Session</literal>是否被"
-"应该用来执行多次数据库操作?上面的例子对每一次操作使用了一个"
-"<literal>Session</literal>,这完全是巧合,这个例子不是很复杂,无法展示其他方"
-"式。Hibernate <literal>Session</literal>的生命周期可以很灵活,但是你绝不要把"
-"你的应用程序设计成为<emphasis>每一次</emphasis>数据库操作都用一个新的"
-"Hibernate <literal>Session</literal>。因此就算下面的例子(它们都很简单)中你"
-"可以看到这种用法,记住<emphasis>每次操作一个session</emphasis>是一个反模式。"
-"在本教程的后面会展示一个真正的(web)程序。"
+#, no-c-format
+msgid "Related to the unit of work scope, should the Hibernate
<interface>org.hibernate.Session</interface> be used to execute one or several
database operations? The above example uses one
<interface>org.hibernate.Session</interface> for one operation. However this
is pure coincidence; the example is just not complex enough to show any other approach.
The scope of a Hibernate <interface>org.hibernate.Session</interface> is
flexible but you should never design your application to use a new Hibernate
<interface>org.hibernate.Session</interface> for
<emphasis>every</emphasis> database operation. Even though it is used in the
following examples, consider <emphasis>session-per-operation</emphasis> an
anti-pattern. A real web application is shown later in the tutorial which will help
illustrate this."
+msgstr "和工作单元的生命周期这个话题相关,Hibernate
<interface>org.hibernate.Session</interface> 是否被应该用来执行多次数据库操作?上面的例子对每一次操作使用了一个
<interface>org.hibernate.Session</interface>,这完全是巧合,这个例子不是很复杂,无法展示其他方式。Hibernate
<interface>org.hibernate.Session</interface>
的生命周期可以很灵活,但是你绝不要把你的应用程序设计成为<emphasis>每一次</emphasis>数据库操作都用一个新的 Hibernate
<interface>org.hibernate.Session</interface>。因此就算下面的例子(它们都很简单)中你可以看到这种用法,记住<emphasis>每次操作一个
session</emphasis> 是一个反模式。在本教程的后面会展示一个真正的(web)程序。"
#. Tag: para
-#: tutorial.xml:568
-#, fuzzy, no-c-format
-msgid ""
-"See <xref linkend=\"transactions\"/> for more information about
transaction "
-"handling and demarcation. The previous example also skipped any error "
-"handling and rollback."
-msgstr ""
-"关于事务处理及事务边界界定的详细信息,请参看<xref linkend=\"transactions\"/"
-">。在上面的例子中,我们也忽略了所有的错误与回滚的处理。"
+#, no-c-format
+msgid "See <xref linkend=\"transactions\" /> for more information
about transaction handling and demarcation. The previous example also skipped any error
handling and rollback."
+msgstr "关于事务处理及事务边界界定的详细信息,请参看 <xref linkend=\"transactions\" />
。在上面的例子中,我们也忽略了所有的错误与回滚的处理。"
#. Tag: para
-#: tutorial.xml:574
#, no-c-format
-msgid ""
-"To run this, we will make use of the Maven exec plugin to call our class "
-"with the necessary classpath setup: <command>mvn exec:java
-Dexec.mainClass="
-"\"org.hibernate.tutorial.EventManager\"
-Dexec.args=\"store\"</command>"
-msgstr ""
+msgid "To run this, we will make use of the Maven exec plugin to call our class with
the necessary classpath setup: <command>mvn exec:java
-Dexec.mainClass=\"org.hibernate.tutorial.EventManager\"
-Dexec.args=\"store\"</command>"
+msgstr "要运行它,我们将使用 Maven exec 插件以及必要的 classpath 设置来进行调用:<command>mvn exec:java
-Dexec.mainClass=\"org.hibernate.tutorial.EventManager\"
-Dexec.args=\"store\"</command>。"
#. Tag: para
-#: tutorial.xml:581
#, no-c-format
msgid "You may need to perform <command>mvn compile</command>
first."
-msgstr ""
+msgstr "你可能需要先执行 <command>mvn compile</command>。"
#. Tag: para
-#: tutorial.xml:586
-#, fuzzy, no-c-format
-msgid ""
-"You should see Hibernate starting up and, depending on your configuration, "
-"lots of log output. Towards the end, the following line will be displayed:"
-msgstr ""
-"你应该会看到,编译以后,Hibernate根据你的配置启动,并产生一大堆的输出日志。在"
-"日志最后你会看到下面这行:"
-
-#. Tag: programlisting
-#: tutorial.xml:591
#, no-c-format
-msgid ""
-"<![CDATA[[java] Hibernate: insert into EVENTS (EVENT_DATE, title, EVENT_ID)
"
-"values (?, ?, ?)]]>"
-msgstr ""
+msgid "You should see Hibernate starting up and, depending on your configuration,
lots of log output. Towards the end, the following line will be displayed:"
+msgstr "你应该会看到,编译以后,Hibernate 根据你的配置启动,并产生一大堆的输出日志。在日志最后你会看到下面这行: "
#. Tag: para
-#: tutorial.xml:593
#, no-c-format
msgid "This is the <literal>INSERT</literal> executed by
Hibernate."
-msgstr ""
+msgstr "执行 HQL <literal>INSERT</literal> 语句的例子如下: "
#. Tag: para
-#: tutorial.xml:597
-#, fuzzy, no-c-format
+#, no-c-format
msgid "To list stored events an option is added to the main method:"
-msgstr ""
-"我们想要列出所有已经被存储的events,就要增加一个条件分支选项到main方法中去。"
+msgstr "我们想要列出所有已经被存储的 events,就要增加一个条件分支选项到 main 方法中:"
-#. Tag: programlisting
-#: tutorial.xml:601
-#, no-c-format
-msgid ""
-"<![CDATA[ if (args[0].equals(\"store\")) {\n"
-" mgr.createAndStoreEvent(\"My Event\", new Date());\n"
-" }\n"
-" else if (args[0].equals(\"list\")) {\n"
-" List events = mgr.listEvents();\n"
-" for (int i = 0; i < events.size(); i++) {\n"
-" Event theEvent = (Event) events.get(i);\n"
-" System.out.println(\n"
-" \"Event: \" + theEvent.getTitle() + \" Time:
\" + "
-"theEvent.getDate()\n"
-" );\n"
-" }\n"
-" }]]>"
-msgstr ""
-
#. Tag: para
-#: tutorial.xml:603
-#, fuzzy, no-c-format
+#, no-c-format
msgid "A new <literal>listEvents() method is also
added</literal>:"
-msgstr "我们也增加一个新的<literal>listEvents()</literal>方法:"
+msgstr "我们也增加一个新的 <literal>listEvents()</literal> 方法: "
-#. Tag: programlisting
-#: tutorial.xml:607
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[ private List listEvents() {\n"
-" Session session =
HibernateUtil.getSessionFactory().getCurrentSession"
-"();\n"
-" session.beginTransaction();\n"
-" List result = session.createQuery(\"from
Event\").list();\n"
-" session.getTransaction().commit();\n"
-" return result;\n"
-" }]]>"
-msgstr ""
+msgid "Here, we are using a Hibernate Query Language (HQL) query to load all
existing <literal>Event</literal> objects from the database. Hibernate will
generate the appropriate SQL, send it to the database and populate
<literal>Event</literal> objects with the data. You can create more complex
queries with HQL. See <xref linkend=\"queryhql\" /> for more
information."
+msgstr "我们在这里是用一个 HQL(Hibernate Query Language-Hibernate查询语言)查询语句来从数据库中加载所有存在的
<literal>Event</literal> 对象。Hibernate 会生成适当的 SQL,把它发送到数据库,并操作从查询得到数据的
<literal>Event</literal> 对象。当然,你可以使用 HQL 来创建更加复杂的查询。更多信息请参考 <xref
linkend=\"queryhql\"/>。"
#. Tag: para
-#: tutorial.xml:609
-#, fuzzy, no-c-format
-msgid ""
-"Here, we are using a Hibernate Query Language (HQL) query to load all "
-"existing <literal>Event</literal> objects from the database. Hibernate
will "
-"generate the appropriate SQL, send it to the database and populate "
-"<literal>Event</literal> objects with the data. You can create more
complex "
-"queries with HQL. See <xref linkend=\"queryhql\"/> for more
information."
-msgstr ""
-"我们在这里是用一个HQL(Hibernate Query Language-Hibernate查询语言)查询语句"
-"来从数据库中加载所有存在的<literal>Event</literal>对象。Hibernate会生成适当的"
-"SQL,把它发送到数据库,并操作从查询得到数据的<literal>Event</literal>对象。当"
-"然,你可以使用HQL来创建更加复杂的查询。"
-
-#. Tag: para
-#: tutorial.xml:617
#, no-c-format
-msgid ""
-"Now we can call our new functionality, again using the Maven exec plugin: "
-"<command>mvn exec:java
-Dexec.mainClass=\"org.hibernate.tutorial.EventManager"
-"\" -Dexec.args=\"list\"</command>"
-msgstr ""
+msgid "Now we can call our new functionality, again using the Maven exec plugin:
<command>mvn exec:java
-Dexec.mainClass=\"org.hibernate.tutorial.EventManager\"
-Dexec.args=\"list\"</command>"
+msgstr "现在我们可以再次用 Maven exec plugin - <command>mvn exec:java
-Dexec.mainClass=\"org.hibernate.tutorial.EventManager\"
-Dexec.args=\"list\"</command> 调用新的功能了。"
#. Tag: title
-#: tutorial.xml:627
#, no-c-format
msgid "Part 2 - Mapping associations"
msgstr "第二部分 - 关联映射"
#. Tag: para
-#: tutorial.xml:629
-#, fuzzy, no-c-format
-msgid ""
-"So far we have mapped a single persistent entity class to a table in "
-"isolation. Let's expand on that a bit and add some class associations. We
"
-"will add people to the application and store a list of events in which they "
-"participate."
-msgstr ""
-"我们已经映射了一个持久化实体类到表上。让我们在这个基础上增加一些类之间的关"
-"联。首先我们往应用程序里增加人(people)的概念,并存储他们所参与的一个Event列"
-"表。(译者注:与Event一样,我们在后面将直接使用person来表示“人”而不是它的中文"
-"翻译)"
+#, no-c-format
+msgid "So far we have mapped a single persistent entity class to a table in
isolation. Let's expand on that a bit and add some class associations. We will add
people to the application and store a list of events in which they participate."
+msgstr "我们已经映射了一个持久化实体类到表上。让我们在这个基础上增加一些类之间的关联。首先我们往应用程序里增加人(people)的概念,并存储他们所参与的一个
Event 列表。(译者注:与 Event 一样,我们在后面将直接使用 person 来表示“人”而不是它的中文翻译) "
#. Tag: title
-#: tutorial.xml:637
#, no-c-format
msgid "Mapping the Person class"
-msgstr "映射Person类"
+msgstr "映射 Person 类"
#. Tag: para
-#: tutorial.xml:639
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The first cut of the <literal>Person</literal> class looks like
this:"
-msgstr "最初简单的<literal>Person</literal>类:"
+msgstr "最初简单的 <literal>Person</literal> 类: "
-#. Tag: programlisting
-#: tutorial.xml:643
-#, no-c-format
-msgid ""
-"<![CDATA[package org.hibernate.tutorial.domain;\n"
-"\n"
-"public class Person {\n"
-"\n"
-" private Long id;\n"
-" private int age;\n"
-" private String firstname;\n"
-" private String lastname;\n"
-"\n"
-" public Person() {}\n"
-"\n"
-" // Accessor methods for all properties, private setter for
'id'\n"
-"\n"
-"}]]>"
-msgstr ""
-
#. Tag: para
-#: tutorial.xml:645
#, no-c-format
-msgid ""
-"Save this to a file named
<filename>src/main/java/org/hibernate/tutorial/"
-"domain/Person.java</filename>"
-msgstr ""
+msgid "Save this to a file named
<filename>src/main/java/org/hibernate/tutorial/domain/Person.java</filename>"
+msgstr "把它保存为文件
<filename>src/main/java/org/hibernate/tutorial/domain/Person.java</filename>。"
#. Tag: para
-#: tutorial.xml:650
#, no-c-format
-msgid ""
-"Next, create the new mapping file as <filename>src/main/resources/org/"
-"hibernate/tutorial/domain/Person.hbm.xml</filename>"
-msgstr ""
+msgid "Next, create the new mapping file as
<filename>src/main/resources/org/hibernate/tutorial/domain/Person.hbm.xml</filename>"
+msgstr "然后,创建新的映射文件
<filename>src/main/resources/org/hibernate/tutorial/domain/Person.hbm.xml</filename>。"
-#. Tag: programlisting
-#: tutorial.xml:655
-#, no-c-format
-msgid ""
-"<![CDATA[<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
-"\n"
-" <class name=\"Person\" table=\"PERSON\">\n"
-" <id name=\"id\" column=\"PERSON_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"age\"/>\n"
-" <property name=\"firstname\"/>\n"
-" <property name=\"lastname\"/>\n"
-" </class>\n"
-"\n"
-"</hibernate-mapping>]]>"
-msgstr ""
-
#. Tag: para
-#: tutorial.xml:657
#, no-c-format
msgid "Finally, add the new mapping to Hibernate's configuration:"
-msgstr "最后,把新的映射加入到Hibernate的配置中:"
+msgstr "最后,把新的映射加入到 Hibernate 的配置中:"
-#. Tag: programlisting
-#: tutorial.xml:661
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<mapping resource=\"events/Event.hbm.xml\"/>\n"
-"<mapping resource=\"events/Person.hbm.xml\"/>]]>"
-msgstr ""
+msgid "Create an association between these two entities. Persons can participate in
events, and events have participants. The design questions you have to deal with are:
directionality, multiplicity, and collection behavior."
+msgstr "现在我们在这两个实体之间创建一个关联。显然,persons 可以参与一系列 events,而 events
也有不同的参加者(persons)。我们需要处理的设计问题是关联方向(directionality),阶数(multiplicity)和集合(collection)的行为。
"
-#. Tag: para
-#: tutorial.xml:663
-#, fuzzy, no-c-format
-msgid ""
-"Create an association between these two entities. Persons can participate in
"
-"events, and events have participants. The design questions you have to deal "
-"with are: directionality, multiplicity, and collection behavior."
-msgstr ""
-"现在我们在这两个实体之间创建一个关联。显然,persons可以参与一系列events,而"
-"events也有不同的参加者(persons)。我们需要处理的设计问题是关联方向"
-"(directionality),阶数(multiplicity)和集合(collection)的行为。"
-
#. Tag: title
-#: tutorial.xml:673
#, no-c-format
msgid "A unidirectional Set-based association"
-msgstr "单向Set-based的关联"
+msgstr "单向 Set-based 的关联"
#. Tag: para
-#: tutorial.xml:675
-#, fuzzy, no-c-format
-msgid ""
-"By adding a collection of events to the <literal>Person</literal>
class, you "
-"can easily navigate to the events for a particular person, without executing
"
-"an explicit query - by calling <literal>Person#getEvents</literal>.
Multi-"
-"valued associations are represented in Hibernate by one of the Java "
-"Collection Framework contracts; here we choose a
<interfacename>java.util."
-"Set</interfacename> because the collection will not contain duplicate "
-"elements and the ordering is not relevant to our examples:"
-msgstr ""
-"我们将向<literal>Person</literal>类增加一连串的events。那样,通过调用"
-"<literal>aPerson.getEvents()</literal>,就可以轻松地导航到特定person所参与的"
-"events,而不用去执行一个显式的查询。我们使用Java的集合类(collection):"
-"<literal>Set</literal>,因为set 不包含重复的元素及与我们无关的排序。"
-
-#. Tag: programlisting
-#: tutorial.xml:686
#, no-c-format
-msgid ""
-"<![CDATA[public class Person {\n"
-"\n"
-" private Set events = new HashSet();\n"
-"\n"
-" public Set getEvents() {\n"
-" return events;\n"
-" }\n"
-"\n"
-" public void setEvents(Set events) {\n"
-" this.events = events;\n"
-" }\n"
-"}]]>"
-msgstr ""
+msgid "By adding a collection of events to the <literal>Person</literal>
class, you can easily navigate to the events for a particular person, without executing an
explicit query - by calling <literal>Person#getEvents</literal>. Multi-valued
associations are represented in Hibernate by one of the Java Collection Framework
contracts; here we choose a <interfacename>java.util.Set</interfacename>
because the collection will not contain duplicate elements and the ordering is not
relevant to our examples:"
+msgstr "我们将向 <literal>Person</literal> 类增加一连串的 events。那样,通过调用
<literal>aPerson.getEvents()</literal>,就可以轻松地导航到特定 person 所参与的
events,而不用去执行一个显式的查询。我们使用 Java 的集合类(collection):<literal>Set</literal>,因为 set
不包含重复的元素及与我们无关的排序。 "
#. Tag: para
-#: tutorial.xml:688
-#, fuzzy, no-c-format
-msgid ""
-"Before mapping this association, let's consider the other side. We could
"
-"just keep this unidirectional or create another collection on the "
-"<literal>Event</literal>, if we wanted to be able to navigate it from
both "
-"directions. This is not necessary, from a functional perspective. You can "
-"always execute an explicit query to retrieve the participants for a "
-"particular event. This is a design choice left to you, but what is clear "
-"from this discussion is the multiplicity of the association: \"many\"
valued "
-"on both sides is called a <emphasis>many-to-many</emphasis>
association. "
-"Hence, we use Hibernate's many-to-many mapping:"
-msgstr ""
-"在映射这个关联之前,先考虑一下此关联的另外一端。很显然,我们可以保持这个关联"
-"是单向的。或者,我们可以在<literal>Event</literal>里创建另外一个集合,如果希"
-"望能够双向地导航,如:<literal>anEvent.getParticipants()</literal>。从功能的"
-"角度来说,这并不是必须的。因为你总可以显式地执行一个查询,以获得某个特定event"
-"的所有参与者。这是个在设计时需要做出的选择,完全由你来决定,但此讨论中关于关"
-"联的阶数是清楚的:即两端都是“多”值的,我们把它叫做<emphasis>多对多(many-to-"
-"many)</emphasis>关联。因而,我们使用Hibernate的多对多映射:"
-
-#. Tag: programlisting
-#: tutorial.xml:701
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Person\"
table=\"PERSON\">\n"
-" <id name=\"id\" column=\"PERSON_ID\">\n"
-" <generator class=\"native\"/>\n"
-" </id>\n"
-" <property name=\"age\"/>\n"
-" <property name=\"firstname\"/>\n"
-" <property name=\"lastname\"/>\n"
-"\n"
-" <set name=\"events\" table=\"PERSON_EVENT\">\n"
-" <key column=\"PERSON_ID\"/>\n"
-" <many-to-many column=\"EVENT_ID\"
class=\"Event\"/>\n"
-" </set>\n"
-"\n"
-"</class>]]>"
-msgstr ""
+msgid "Before mapping this association, let's consider the other side. We could
just keep this unidirectional or create another collection on the
<literal>Event</literal>, if we wanted to be able to navigate it from both
directions. This is not necessary, from a functional perspective. You can always execute
an explicit query to retrieve the participants for a particular event. This is a design
choice left to you, but what is clear from this discussion is the multiplicity of the
association: \"many\" valued on both sides is called a
<emphasis>many-to-many</emphasis> association. Hence, we use Hibernate's
many-to-many mapping:"
+msgstr "在映射这个关联之前,先考虑一下此关联的另外一端。很显然,我们可以保持这个关联是单向的。或者,我们可以在
<literal>Event</literal>
里创建另外一个集合,如果希望能够双向地导航,如:<literal>anEvent.getParticipants()</literal>。从功能的角度来说,这并不是必须的。因为你总可以显式地执行一个查询,以获得某个特定
event
的所有参与者。这是个在设计时需要做出的选择,完全由你来决定,但此讨论中关于关联的阶数是清楚的:即两端都是“多”值的,我们把它叫做<emphasis>多对多(many-to-many)</emphasis>关联。因而,我们使用
Hibernate 的多对多映射: "
#. Tag: para
-#: tutorial.xml:703
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate supports a broad range of collection mappings, a
<literal>set</"
-"literal> being most common. For a many-to-many association, or
<emphasis>n:"
-"m</emphasis> entity relationship, an association table is required. Each row
"
-"in this table represents a link between a person and an event. The table "
-"name is decalred using the <literal>table</literal> attribute of the
"
-"<literal>set</literal> element. The identifier column name in the
"
-"association, for the person side, is defined with the
<literal>key</literal> "
-"element, the column name for the event's side with the
<literal>column</"
-"literal> attribute of the <literal>many-to-many</literal>. You also
have to "
-"tell Hibernate the class of the objects in your collection (the class on the
"
-"other side of the collection of references)."
-msgstr ""
-"Hibernate支持各种各样的集合映射,<literal><set></literal>使用的最为普"
-"遍。对于多对多关联(或叫<emphasis>n:m</emphasis>实体关系), 需要一个关联表"
-"(association table)。<literal>表</literal>里面的每一行代表从person到event的"
-"一个关联。表名是由<literal>set</literal>元素的<literal>table</literal>属性配"
-"置的。关联里面的标识符字段名,对于person的一端,是由<literal><key></"
-"literal>元素定义,而event一端的字段名是由<literal><many-to-many></"
-"literal>元素的<literal>column</literal>属性定义。你也必须告诉Hibernate集合中"
-"对象的类(也就是位于这个集合所代表的关联另外一端的类)。"
+#, no-c-format
+msgid "Hibernate supports a broad range of collection mappings, a
<literal>set</literal> being most common. For a many-to-many association, or
<emphasis>n:m</emphasis> entity relationship, an association table is
required. Each row in this table represents a link between a person and an event. The
table name is decalred using the <literal>table</literal> attribute of the
<literal>set</literal> element. The identifier column name in the association,
for the person side, is defined with the <literal>key</literal> element, the
column name for the event's side with the <literal>column</literal>
attribute of the <literal>many-to-many</literal>. You also have to tell
Hibernate the class of the objects in your collection (the class on the other side of the
collection of references)."
+msgstr "Hibernate 支持各种各样的集合映射,<literal><set></literal>
使用的最为普遍。对于多对多关联(或叫 <emphasis>n:m</emphasis> 实体关系), 需要一个关联表(association
table)。<literal>表</literal>里面的每一行代表从 person 到 event 的一个关联。表名是由
<literal>set</literal> 元素的 <literal>table</literal>
属性配置的。关联里面的标识符字段名,对于 person 的一端,是由 <literal><key></literal>
元素定义,而 event 一端的字段名是由 <literal><many-to-many></literal> 元素的
<literal>column</literal> 属性定义。你也必须告诉 Hibernate
集合中对象的类(也就是位于这个集合所代表的关联另外一端的类)。 "
#. Tag: para
-#: tutorial.xml:719
#, no-c-format
msgid "The database schema for this mapping is therefore:"
-msgstr "因而这个映射的数据库schema是:"
+msgstr "因而这个映射的数据库 schema 是:"
-#. Tag: programlisting
-#: tutorial.xml:723
-#, no-c-format
-msgid ""
-"<![CDATA[\n"
-" _____________ __________________\n"
-" | | | | _____________\n"
-" | EVENTS | | PERSON_EVENT | | |\n"
-" |_____________| |__________________| | PERSON |\n"
-" | | | | |_____________|\n"
-" | *EVENT_ID | <--> | *EVENT_ID | | |\n"
-" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n"
-" | TITLE | |__________________| | AGE |\n"
-" |_____________| | FIRSTNAME |\n"
-" | LASTNAME |\n"
-" |_____________|\n"
-" ]]>"
-msgstr ""
-
#. Tag: title
-#: tutorial.xml:728
#, no-c-format
msgid "Working the association"
msgstr "使关联工作"
#. Tag: para
-#: tutorial.xml:730
-#, fuzzy, no-c-format
-msgid ""
-"Now we will bring some people and events together in a new method in "
-"<literal>EventManager</literal>:"
-msgstr ""
-"我们把一些people和events 一起放到<literal>EventManager</literal>的新方法中:"
-
-#. Tag: programlisting
-#: tutorial.xml:734
#, no-c-format
-msgid ""
-"<![CDATA[ private void addPersonToEvent(Long personId, Long eventId)
{\n"
-" Session session =
HibernateUtil.getSessionFactory().getCurrentSession"
-"();\n"
-" session.beginTransaction();\n"
-"\n"
-" Person aPerson = (Person) session.load(Person.class, personId);\n"
-" Event anEvent = (Event) session.load(Event.class, eventId);\n"
-" aPerson.getEvents().add(anEvent);\n"
-"\n"
-" session.getTransaction().commit();\n"
-" }]]>"
-msgstr ""
+msgid "Now we will bring some people and events together in a new method in
<literal>EventManager</literal>:"
+msgstr "我们把一些 people 和 events 一起放到 <literal>EventManager</literal>
的新方法中: "
#. Tag: para
-#: tutorial.xml:736
-#, fuzzy, no-c-format
-msgid ""
-"After loading a <literal>Person</literal> and an
<literal>Event</literal>, "
-"simply modify the collection using the normal collection methods. There is "
-"no explicit call to <literal>update()</literal> or
<literal>save()</"
-"literal>; Hibernate automatically detects that the collection has been "
-"modified and needs to be updated. This is called <emphasis>automatic dirty
"
-"checking</emphasis>. You can also try it by modifying the name or the date
"
-"property of any of your objects. As long as they are in "
-"<emphasis>persistent</emphasis> state, that is, bound to a particular
"
-"Hibernate <interfacename>org.hibernate.Session</interfacename>,
Hibernate "
-"monitors any changes and executes SQL in a write-behind fashion. The process
"
-"of synchronizing the memory state with the database, usually only at the end
"
-"of a unit of work, is called <emphasis>flushing</emphasis>. In our
code, the "
-"unit of work ends with a commit, or rollback, of the database transaction."
-msgstr ""
-"在加载一<literal>Person</literal>和<literal>Event</literal>后,使用普通的集合"
-"方法就可容易地修改我们定义的集合。如你所见,没有显式的<literal>update()</"
-"literal>或<literal>save()</literal>,Hibernate会自动检测到集合已经被修改并需"
-"要更新回数据库。这叫做自动脏检查(<emphasis>automatic dirty checking</"
-"emphasis>),你也可以尝试修改任何对象的name或者date属性,只要他们处于"
-"<emphasis>持久化</emphasis>状态,也就是被绑定到某个Hibernate 的"
-"<literal>Session</literal>上(如:他们刚刚在一个单元操作被加载或者保存),"
-"Hibernate监视任何改变并在后台隐式写的方式执行SQL。同步内存状态和数据库的过"
-"程,通常只在单元操作结束的时候发生,称此过程为清理缓存<emphasis>(flushing)"
-"</emphasis>。在我们的代码中,工作单元由数据库事务的提交(或者回滚)来结束——这"
-"是由<literal>CurrentSessionContext</literal>类的<literal>thread</literal>配置"
-"选项定义的。"
+#, no-c-format
+msgid "After loading a <literal>Person</literal> and an
<literal>Event</literal>, simply modify the collection using the normal
collection methods. There is no explicit call to <literal>update()</literal>
or <literal>save()</literal>; Hibernate automatically detects that the
collection has been modified and needs to be updated. This is called
<emphasis>automatic dirty checking</emphasis>. You can also try it by
modifying the name or the date property of any of your objects. As long as they are in
<emphasis>persistent</emphasis> state, that is, bound to a particular
Hibernate <interfacename>org.hibernate.Session</interfacename>, Hibernate
monitors any changes and executes SQL in a write-behind fashion. The process of
synchronizing the memory state with the database, usually only at the end of a unit of
work, is called <emphasis>flushing</emphasis>. In our code, the unit of work
ends with a commit, or rollback, of the database transaction."
+msgstr "在加载一 <literal>Person</literal> 和
<literal>Event</literal> 后,使用普通的集合方法就可容易地修改我们定义的集合。如你所见,没有显式的
<literal>update()</literal> 或 <literal>save()</literal>,Hibernate
会自动检测到集合已经被修改并需要更新回数据库。这叫做自动脏检查(<emphasis>automatic dirty
checking</emphasis>),你也可以尝试修改任何对象的 name 或者 date
属性,只要他们处于<emphasis>持久化</emphasis>状态,也就是被绑定到某个 Hibernate 的
<literal>Session</literal> 上(如:他们刚刚在一个单元操作被加载或者保存),Hibernate
监视任何改变并在后台隐式写的方式执行
SQL。同步内存状态和数据库的过程,通常只在单元操作结束的时候发生,称此过程为清理缓存<emphasis>(flushing)</emphasis>。在我们的代码中,工作单元由数据库事务的提交(或者回滚)来结束——!
这是由 <literal>CurrentSessionContext</literal> 类的
<literal>thread</literal> 配置选项定义的。 "
#. Tag: para
-#: tutorial.xml:755
-#, fuzzy, no-c-format
-msgid ""
-"You can load person and event in different units of work. Or you can modify "
-"an object outside of a
<interfacename>org.hibernate.Session</interfacename>, "
-"when it is not in persistent state (if it was persistent before, this state "
-"is called <emphasis>detached</emphasis>). You can even modify a
collection "
-"when it is detached:"
-msgstr ""
-"当然,你也可以在不同的单元操作里面加载person和event。或在<literal>Session</"
-"literal>以外修改不是处在持久化(persistent)状态下的对象(如果该对象以前曾经"
-"被持久化,那么我们称这个状态为<emphasis>脱管(detached)</emphasis>)。你甚至"
-"可以在一个集合被脱管时修改它:"
-
-#. Tag: programlisting
-#: tutorial.xml:764
#, no-c-format
-msgid ""
-"<![CDATA[ private void addPersonToEvent(Long personId, Long eventId)
{\n"
-" Session session =
HibernateUtil.getSessionFactory().getCurrentSession"
-"();\n"
-" session.beginTransaction();\n"
-"\n"
-" Person aPerson = (Person) session\n"
-" .createQuery(\"select p from Person p left join fetch
p."
-"events where p.id = :pid\")\n"
-" .setParameter(\"pid\", personId)\n"
-" .uniqueResult(); // Eager fetch the collection so we can use
"
-"it detached\n"
-" Event anEvent = (Event) session.load(Event.class, eventId);\n"
-"\n"
-" session.getTransaction().commit();\n"
-"\n"
-" // End of first unit of work\n"
-"\n"
-" aPerson.getEvents().add(anEvent); // aPerson (and its collection) is
"
-"detached\n"
-"\n"
-" // Begin second unit of work\n"
-"\n"
-" Session session2 = HibernateUtil.getSessionFactory()."
-"getCurrentSession();\n"
-" session2.beginTransaction();\n"
-" session2.update(aPerson); // Reattachment of aPerson\n"
-"\n"
-" session2.getTransaction().commit();\n"
-" }]]>"
-msgstr ""
+msgid "You can load person and event in different units of work. Or you can modify
an object outside of a <interfacename>org.hibernate.Session</interfacename>,
when it is not in persistent state (if it was persistent before, this state is called
<emphasis>detached</emphasis>). You can even modify a collection when it is
detached:"
+msgstr "当然,你也可以在不同的单元操作里面加载 person 和 event。或在 <literal>Session</literal>
以外修改不是处在持久化(persistent)状态下的对象(如果该对象以前曾经被持久化,那么我们称这个状态为<emphasis>脱管(detached)</emphasis>)。你甚至可以在一个集合被脱管时修改它:
"
#. Tag: para
-#: tutorial.xml:766
-#, fuzzy, no-c-format
-msgid ""
-"The call to <literal>update</literal> makes a detached object
persistent "
-"again by binding it to a new unit of work, so any modifications you made to "
-"it while detached can be saved to the database. This includes any "
-"modifications (additions/deletions) you made to a collection of that entity "
-"object."
-msgstr ""
-"对<literal>update</literal>的调用使一个脱管对象重新持久化,你可以说它被绑定到"
-"一个新的单元操作上,所以在脱管状态下对它所做的任何修改都会被保存到数据库里。"
-"这也包括你对这个实体对象的集合所作的任何改动(增加/删除)。"
+#, no-c-format
+msgid "The call to <literal>update</literal> makes a detached object
persistent again by binding it to a new unit of work, so any modifications you made to it
while detached can be saved to the database. This includes any modifications
(additions/deletions) you made to a collection of that entity object."
+msgstr "对 <literal>update</literal>
的调用使一个脱管对象重新持久化,你可以说它被绑定到一个新的单元操作上,所以在脱管状态下对它所做的任何修改都会被保存到数据库里。这也包括你对这个实体对象的集合所作的任何改动(增加/删除)。
"
#. Tag: para
-#: tutorial.xml:775
-#, fuzzy, no-c-format
-msgid ""
-"This is not much use in our example, but it is an important concept you can "
-"incorporate into your own application. Complete this exercise by adding a "
-"new action to the main method of the <literal>EventManager</literal>
and "
-"call it from the command line. If you need the identifiers of a person and "
-"an event - the <literal>save()</literal> method returns it (you might
have "
-"to modify some of the previous methods to return that identifier):"
-msgstr ""
-"这对我们当前的情形不是很有用,但它是非常重要的概念,你可以把它融入到你自己的"
-"应用程序设计中。在<literal>EventManager</literal>的main方法中添加一个新的动"
-"作,并从命令行运行它来完成我们所做的练习。如果你需要person及event的标识符 — "
-"那就用<literal>save()</literal>方法返回它(你可能需要修改前面的一些方法来返回"
-"那个标识符):"
-
-#. Tag: programlisting
-#: tutorial.xml:783
#, no-c-format
-msgid ""
-"<![CDATA[ else if (args[0].equals(\"addpersontoevent\"))
{\n"
-" Long eventId = mgr.createAndStoreEvent(\"My Event\", new
Date"
-"());\n"
-" Long personId = mgr.createAndStorePerson(\"Foo\",
\"Bar\");\n"
-" mgr.addPersonToEvent(personId, eventId);\n"
-" System.out.println(\"Added person \" + personId + \" to
event \" "
-"+ eventId);\n"
-" }]]>"
-msgstr ""
+msgid "This is not much use in our example, but it is an important concept you can
incorporate into your own application. Complete this exercise by adding a new action to
the main method of the <literal>EventManager</literal> and call it from the
command line. If you need the identifiers of a person and an event - the
<literal>save()</literal> method returns it (you might have to modify some of
the previous methods to return that identifier):"
+msgstr
"这对我们当前的情形不是很有用,但它是非常重要的概念,你可以把它融入到你自己的应用程序设计中。在<literal>EventManager</literal>的
main 方法中添加一个新的动作,并从命令行运行它来完成我们所做的练习。如果你需要 person 及 event 的标识符 — 那就用
<literal>save()</literal> 方法返回它(你可能需要修改前面的一些方法来返回那个标识符): "
#. Tag: para
-#: tutorial.xml:785
-#, fuzzy, no-c-format
-msgid ""
-"This is an example of an association between two equally important classes :
"
-"two entities. As mentioned earlier, there are other classes and types in a "
-"typical model, usually \"less important\". Some you have already seen,
like "
-"an <literal>int</literal> or a
<classname>java.lang.String</classname>. We "
-"call these classes <emphasis>value types</emphasis>, and their
instances "
-"<emphasis>depend</emphasis> on a particular entity. Instances of these
types "
-"do not have their own identity, nor are they shared between entities. Two "
-"persons do not reference the same <literal>firstname</literal> object,
even "
-"if they have the same first name. Value types cannot only be found in the "
-"JDK , but you can also write dependent classes yourself such as an "
-"<literal>Address</literal> or
<literal>MonetaryAmount</literal> class. In "
-"fact, in a Hibernate application all JDK classes are considered value types."
-msgstr ""
-"上面是个关于两个同等重要的实体类间关联的例子。像前面所提到的那样,在特定的模"
-"型中也存在其它的类和类型,这些类和类型通常是“次要的”。你已看到过其中的一些,"
-"像<literal>int</literal>或<literal>String</literal>。我们称这些类为<emphasis>"
-"值类型(value type)</emphasis>,它们的实例<emphasis>依赖(depend)</"
-"emphasis>在某个特定的实体上。这些类型的实例没有它们自己的标识(identity),也"
-"不能在实体间被共享(比如,两个person不能引用同一个<literal>firstname</"
-"literal>对象,即使他们有相同的first name)。当然,值类型并不仅仅在JDK中存在"
-"(事实上,在一个Hibernate应用程序中,所有的JDK类都被视为值类型),而且你也可"
-"以编写你自己的依赖类,例如<literal>Address</literal>,"
-"<literal>MonetaryAmount</literal>。"
+#, no-c-format
+msgid "This is an example of an association between two equally important classes :
two entities. As mentioned earlier, there are other classes and types in a typical model,
usually \"less important\". Some you have already seen, like an
<literal>int</literal> or a
<classname>java.lang.String</classname>. We call these classes
<emphasis>value types</emphasis>, and their instances
<emphasis>depend</emphasis> on a particular entity. Instances of these types
do not have their own identity, nor are they shared between entities. Two persons do not
reference the same <literal>firstname</literal> object, even if they have the
same first name. Value types cannot only be found in the JDK , but you can also write
dependent classes yourself such as an <literal>Address</literal> or
<literal>MonetaryAmount</literal> class. In fact, in a Hibernate application
all JDK classes are considered value types."
+msgstr
"上面是个关于两个同等重要的实体类间关联的例子。像前面所提到的那样,在特定的模型中也存在其它的类和类型,这些类和类型通常是“次要的”。你已看到过其中的一些,像
<literal>int</literal> 或
<literal>String</literal>。我们称这些类为<emphasis>值类型(value
type)</emphasis>,它们的实例<emphasis>依赖(depend)</emphasis>在某个特定的实体上。这些类型的实例没有它们自己的标识(identity),也不能在实体间被共享(比如,两个
person 不能引用同一个 <literal>firstname</literal> 对象,即使他们有相同的 first
name)。当然,值类型并不仅仅在 JDK 中存在(事实上,在一个 Hibernate 应用程序中,所有的 JDK 类都被视为值类型),而且你也可以编写你自己的依赖类,例如
<literal>Address</literal>,<literal>MonetaryAmount</literal>。
"
#. Tag: para
-#: tutorial.xml:803
-#, fuzzy, no-c-format
-msgid ""
-"You can also design a collection of value types. This is conceptually "
-"different from a collection of references to other entities, but looks "
-"almost the same in Java."
-msgstr ""
-"你也可以设计一个值类型的集合,这在概念上与引用其它实体的集合有很大的不同,但"
-"是在Java里面看起来几乎是一样的。"
+#, no-c-format
+msgid "You can also design a collection of value types. This is conceptually
different from a collection of references to other entities, but looks almost the same in
Java."
+msgstr "你也可以设计一个值类型的集合,这在概念上与引用其它实体的集合有很大的不同,但是在 Java 里面看起来几乎是一样的。 "
#. Tag: title
-#: tutorial.xml:812
#, no-c-format
msgid "Collection of values"
msgstr "值类型的集合"
#. Tag: para
-#: tutorial.xml:814
#, no-c-format
-msgid ""
-"Let's add a collection of email addresses to the
<literal>Person</literal> "
-"entity. This will be represented as a
<interfacename>java.util.Set</"
-"interfacename> of <classname>java.lang.String</classname>
instances:"
-msgstr ""
+msgid "Let's add a collection of email addresses to the
<literal>Person</literal> entity. This will be represented as a
<interfacename>java.util.Set</interfacename> of
<classname>java.lang.String</classname> instances:"
+msgstr "让我们在 <literal>Person</literal> 实体里添加一个电子邮件的集合。这将以
<classname>java.lang.String</classname> 实例的
<interfacename>java.util.Set</interfacename> 出现:"
-#. Tag: programlisting
-#: tutorial.xml:820
-#, no-c-format
-msgid ""
-"<![CDATA[ private Set emailAddresses = new HashSet();\n"
-"\n"
-" public Set getEmailAddresses() {\n"
-" return emailAddresses;\n"
-" }\n"
-"\n"
-" public void setEmailAddresses(Set emailAddresses) {\n"
-" this.emailAddresses = emailAddresses;\n"
-" }]]>"
-msgstr ""
-
#. Tag: para
-#: tutorial.xml:822
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The mapping of this <literal>Set</literal> is as follows:"
-msgstr "这个<literal>Set</literal>的映射"
+msgstr "这个 <literal>Set</literal> 的映射如下:"
-#. Tag: programlisting
-#: tutorial.xml:826
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[ <set name=\"emailAddresses\"
table=\"PERSON_EMAIL_ADDR\">\n"
-" <key column=\"PERSON_ID\"/>\n"
-" <element type=\"string\"
column=\"EMAIL_ADDR\"/>\n"
-" </set>]]>"
-msgstr ""
+msgid "The difference compared with the earlier mapping is the use of the
<literal>element</literal> part which tells Hibernate that the collection does
not contain references to another entity, but is rather a collection whose elements are
values types, here specifically of type <literal>string</literal>. The
lowercase name tells you it is a Hibernate mapping type/converter. Again the
<literal>table</literal> attribute of the <literal>set</literal>
element determines the table name for the collection. The
<literal>key</literal> element defines the foreign-key column name in the
collection table. The <literal>column</literal> attribute in the
<literal>element</literal> element defines the column name where the email
address values will actually be stored."
+msgstr "比较这次和此前映射的差别,主要在于 <literal>element</literal>
部分,这次并没有包含对其它实体引用的集合,而是元素类型为 <literal>String</literal>
的集合(在映射中使用小写的名字”string“是向你表明它是一个 Hibernate
的映射类型或者类型转换器)。和之前一样,<literal>set</literal> 元素的
<literal>table</literal> 属性决定了用于集合的表名。<literal>key</literal>
元素定义了在集合表中外键的字段名。<literal>element</literal> 元素的
<literal>column</literal> 属性定义用于实际保存 <literal>String</literal>
值的字段名。 "
#. Tag: para
-#: tutorial.xml:828
-#, fuzzy, no-c-format
-msgid ""
-"The difference compared with the earlier mapping is the use of the "
-"<literal>element</literal> part which tells Hibernate that the
collection "
-"does not contain references to another entity, but is rather a collection "
-"whose elements are values types, here specifically of type
<literal>string</"
-"literal>. The lowercase name tells you it is a Hibernate mapping type/"
-"converter. Again the <literal>table</literal> attribute of the
<literal>set</"
-"literal> element determines the table name for the collection. The "
-"<literal>key</literal> element defines the foreign-key column name in
the "
-"collection table. The <literal>column</literal> attribute in the
"
-"<literal>element</literal> element defines the column name where the
email "
-"address values will actually be stored."
-msgstr ""
-"比较这次和此前映射的差别,主要在于<literal>element</literal>部分,这次并没有"
-"包含对其它实体引用的集合,而是元素类型为<literal>String</literal>的集合(在映"
-"射中使用小写的名字”string“是向你表明它是一个Hibernate的映射类型或者类型转换"
-"器)。和之前一样,<literal>set</literal>元素的<literal>table</literal>属性决"
-"定了用于集合的表名。<literal>key</literal>元素定义了在集合表中外键的字段名。"
-"<literal>element</literal>元素的<literal>column</literal>属性定义用于实际保存"
-"<literal>String</literal>值的字段名。"
-
-#. Tag: para
-#: tutorial.xml:844
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Here is the updated schema:"
-msgstr "看一下修改后的数据库schema。"
+msgstr "看一下修改后的数据库 schema。 "
-#. Tag: programlisting
-#: tutorial.xml:848
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[\n"
-" _____________ __________________\n"
-" | | | | _____________\n"
-" | EVENTS | | PERSON_EVENT | | | "
-"___________________\n"
-" |_____________| |__________________| | PERSON | "
-"| |\n"
-" | | | | |_____________| | "
-"PERSON_EMAIL_ADDR |\n"
-" | *EVENT_ID | <--> | *EVENT_ID | | | |"
-"___________________|\n"
-" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--> |
"
-"*PERSON_ID |\n"
-" | TITLE | |__________________| | AGE | | "
-"*EMAIL_ADDR |\n"
-" |_____________| | FIRSTNAME | |"
-"___________________|\n"
-" | LASTNAME |\n"
-" |_____________|\n"
-" ]]>"
-msgstr ""
+msgid "You can see that the primary key of the collection table is in fact a
composite key that uses both columns. This also implies that there cannot be duplicate
email addresses per person, which is exactly the semantics we need for a set in
Java."
+msgstr "你可以看到集合表的主键实际上是个复合主键,同时使用了两个字段。这也暗示了对于同一个 person 不能有重复的 email 地址,这正是 Java
里面使用 Set 时候所需要的语义(Set 里元素不能重复)。"
#. Tag: para
-#: tutorial.xml:850
-#, fuzzy, no-c-format
-msgid ""
-"You can see that the primary key of the collection table is in fact a "
-"composite key that uses both columns. This also implies that there cannot be
"
-"duplicate email addresses per person, which is exactly the semantics we need
"
-"for a set in Java."
-msgstr ""
-"你可以看到集合表的主键实际上是个复合主键,同时使用了2个字段。这也暗示了对于同"
-"一个person不能有重复的email地址,这正是Java里面使用Set时候所需要的语义(Set里"
-"元素不能重复)。"
+#, no-c-format
+msgid "You can now try to add elements to this collection, just like we did before
by linking persons and events. It is the same code in Java:"
+msgstr "你现在可以试着把元素加入到这个集合,就像我们在之前关联 person 和 event 的那样。其实现的 Java 代码是相同的: "
#. Tag: para
-#: tutorial.xml:856
-#, fuzzy, no-c-format
-msgid ""
-"You can now try to add elements to this collection, just like we did before "
-"by linking persons and events. It is the same code in Java:"
-msgstr ""
-"你现在可以试着把元素加入到这个集合,就像我们在之前关联person和event的那样。其"
-"实现的Java代码是相同的:"
-
-#. Tag: programlisting
-#: tutorial.xml:861
#, no-c-format
-msgid ""
-"<![CDATA[ private void addEmailToPerson(Long personId, String "
-"emailAddress) {\n"
-" Session session =
HibernateUtil.getSessionFactory().getCurrentSession"
-"();\n"
-" session.beginTransaction();\n"
-"\n"
-" Person aPerson = (Person) session.load(Person.class, personId);\n"
-" // adding to the emailAddress collection might trigger a lazy load "
-"of the collection\n"
-" aPerson.getEmailAddresses().add(emailAddress);\n"
-"\n"
-" session.getTransaction().commit();\n"
-" }]]>"
-msgstr ""
+msgid "This time we did not use a <emphasis>fetch</emphasis> query to
initialize the collection. Monitor the SQL log and try to optimize this with an eager
fetch."
+msgstr "这次我们没有使用 <emphasis>fetch</emphasis> 查询来初始化集合。因此,调用其 getter
方法会触发另一附加的 select 来初始化集合,这样我们才能把元素添加进去。检查 SQL log,试着通过预先抓取来优化它。 "
-#. Tag: para
-#: tutorial.xml:863
-#, fuzzy, no-c-format
-msgid ""
-"This time we did not use a <emphasis>fetch</emphasis> query to
initialize "
-"the collection. Monitor the SQL log and try to optimize this with an eager "
-"fetch."
-msgstr ""
-"这次我们没有使用<emphasis>fetch</emphasis>查询来初始化集合。因此,调用其"
-"getter方法会触发另一附加的select来初始化集合,这样我们才能把元素添加进去。检"
-"查SQL log,试着通过预先抓取来优化它。"
-
#. Tag: title
-#: tutorial.xml:872
#, no-c-format
msgid "Bi-directional associations"
msgstr "双向关联"
#. Tag: para
-#: tutorial.xml:874
-#, fuzzy, no-c-format
-msgid ""
-"Next you will map a bi-directional association. You will make the "
-"association between person and event work from both sides in Java. The "
-"database schema does not change, so you will still have many-to-many "
-"multiplicity."
-msgstr ""
-"接下来我们将映射双向关联(bi-directional association)- 在Java里让person和"
-"event可以从关联的任何一端访问另一端。当然,数据库schema没有改变,我们仍然需要"
-"多对多的阶数。一个关系型数据库要比网络编程语言 更加灵活,所以它并不需要任何像"
-"导航方向(navigation direction)的东西 - 数据可以用任何可能的方式进行查看和"
-"获取。"
+#, no-c-format
+msgid "Next you will map a bi-directional association. You will make the association
between person and event work from both sides in Java. The database schema does not
change, so you will still have many-to-many multiplicity."
+msgstr "接下来我们将映射双向关联(bi-directional association)— 在 Java 里让 person 和 event
可以从关联的任何一端访问另一端。当然,数据库 schema
没有改变,我们仍然需要多对多的阶数。一个关系型数据库要比网络编程语言更加灵活,所以它并不需要任何像导航方向(navigation direction)的东西 —
数据可以用任何可能的方式进行查看和获取。 "
#. Tag: para
-#: tutorial.xml:882
#, no-c-format
-msgid ""
-"A relational database is more flexible than a network programming language, "
-"in that it does not need a navigation direction; data can be viewed and "
-"retrieved in any possible way."
-msgstr ""
+msgid "A relational database is more flexible than a network programming language,
in that it does not need a navigation direction; data can be viewed and retrieved in any
possible way."
+msgstr "关系型数据库比网络编程语言更为灵活,因为它不需要方向导航,其数据可以用任何可能的方式进行查看和提取。"
#. Tag: para
-#: tutorial.xml:890
-#, fuzzy, no-c-format
-msgid ""
-"First, add a collection of participants to the <literal>Event</literal>
"
-"class:"
-msgstr "首先,把一个参与者(person)的集合加入<literal>Event</literal>类中:"
-
-#. Tag: programlisting
-#: tutorial.xml:895
#, no-c-format
-msgid ""
-"<![CDATA[ private Set participants = new HashSet();\n"
-"\n"
-" public Set getParticipants() {\n"
-" return participants;\n"
-" }\n"
-"\n"
-" public void setParticipants(Set participants) {\n"
-" this.participants = participants;\n"
-" }]]>"
-msgstr ""
+msgid "First, add a collection of participants to the
<literal>Event</literal> class:"
+msgstr "首先,把一个参与者(person)的集合加入 <literal>Event</literal> 类中: "
#. Tag: para
-#: tutorial.xml:897
-#, fuzzy, no-c-format
-msgid ""
-"Now map this side of the association in
<literal>Event.hbm.xml</literal>."
-msgstr "在<literal>Event.hbm.xml</literal>里面也映射这个关联。"
-
-#. Tag: programlisting
-#: tutorial.xml:901
#, no-c-format
-msgid ""
-"<![CDATA[ <set name=\"participants\"
table=\"PERSON_EVENT\" inverse="
-"\"true\">\n"
-" <key column=\"EVENT_ID\"/>\n"
-" <many-to-many column=\"PERSON_ID\"
class=\"events.Person\"/>\n"
-" </set>]]>"
-msgstr ""
+msgid "Now map this side of the association in
<literal>Event.hbm.xml</literal>."
+msgstr "在 <literal>Event.hbm.xml</literal> 里面也映射这个关联。 "
#. Tag: para
-#: tutorial.xml:903
-#, fuzzy, no-c-format
-msgid ""
-"These are normal <literal>set</literal> mappings in both mapping
documents. "
-"Notice that the column names in <literal>key</literal> and
<literal>many-to-"
-"many</literal> swap in both mapping documents. The most important addition
"
-"here is the <literal>inverse=\"true\"</literal> attribute in
the "
-"<literal>set</literal> element of the
<literal>Event</literal>'s collection "
-"mapping."
-msgstr ""
-"如你所见,两个映射文件里都有普通的<literal>set</literal>映射。注意在两个映射"
-"文件中,互换了<literal>key</literal>和<literal>many-to-many</literal>的字段"
-"名。这里最重要的是<literal>Event</literal>映射文件里增加了<literal>set</"
-"literal>元素的<literal>inverse=\"true\"</literal>属性。"
+#, no-c-format
+msgid "These are normal <literal>set</literal> mappings in both mapping
documents. Notice that the column names in <literal>key</literal> and
<literal>many-to-many</literal> swap in both mapping documents. The most
important addition here is the <literal>inverse=\"true\"</literal>
attribute in the <literal>set</literal> element of the
<literal>Event</literal>'s collection mapping."
+msgstr "如你所见,两个映射文件里都有普通的 <literal>set</literal> 映射。注意在两个映射文件中,互换了
<literal>key</literal> 和 <literal>many-to-many</literal>
的字段名。这里最重要的是 <literal>Event</literal> 映射文件里增加了
<literal>set</literal> 元素的
<literal>inverse=\"true\"</literal> 属性。 "
#. Tag: para
-#: tutorial.xml:911
-#, fuzzy, no-c-format
-msgid ""
-"What this means is that Hibernate should take the other side, the "
-"<literal>Person</literal> class, when it needs to find out information
about "
-"the link between the two. This will be a lot easier to understand once you "
-"see how the bi-directional link between our two entities is created."
-msgstr ""
-"这意味着在需要的时候,Hibernate能在关联的另一端 - <literal>Person</literal>"
-"类得到两个实体间关联的信息。这将会极大地帮助你理解双向关联是如何在两个实体间"
-"被创建的。"
+#, no-c-format
+msgid "What this means is that Hibernate should take the other side, the
<literal>Person</literal> class, when it needs to find out information about
the link between the two. This will be a lot easier to understand once you see how the
bi-directional link between our two entities is created."
+msgstr "这意味着在需要的时候,Hibernate 能在关联的另一端 — <literal>Person</literal>
类得到两个实体间关联的信息。这将会极大地帮助你理解双向关联是如何在两个实体间被创建的。 "
#. Tag: title
-#: tutorial.xml:920
#, no-c-format
msgid "Working bi-directional links"
msgstr "使双向连起来"
#. Tag: para
-#: tutorial.xml:922
-#, fuzzy, no-c-format
-msgid ""
-"First, keep in mind that Hibernate does not affect normal Java semantics. "
-"How did we create a link between a <literal>Person</literal> and an
"
-"<literal>Event</literal> in the unidirectional example? You add an
instance "
-"of <literal>Event</literal> to the collection of event references, of
an "
-"instance of <literal>Person</literal>. If you want to make this link
bi-"
-"directional, you have to do the same on the other side by adding a "
-"<literal>Person</literal> reference to the collection in an
<literal>Event</"
-"literal>. This process of \"setting the link on both sides\" is
absolutely "
-"necessary with bi-directional links."
-msgstr ""
-"首先请记住,Hibernate并不影响通常的Java语义。 在单向关联的例子中,我们是怎样"
-"在<literal>Person</literal>和<literal>Event</literal>之间创建联系的?我们把"
-"<literal>Event</literal>实例添加到<literal>Person</literal>实例内的event引用"
-"集合里。因此很显然,如果我们要让这个关联可以双向地工作,我们需要在另外一端做"
-"同样的事情 -
把<literal>Person</literal>实例加入<literal>Event</literal>类内"
-"的Person引用集合。这“在关联的两端设置联系”是完全必要的而且你都得这么做。"
+#, no-c-format
+msgid "First, keep in mind that Hibernate does not affect normal Java semantics. How
did we create a link between a <literal>Person</literal> and an
<literal>Event</literal> in the unidirectional example? You add an instance of
<literal>Event</literal> to the collection of event references, of an instance
of <literal>Person</literal>. If you want to make this link bi-directional,
you have to do the same on the other side by adding a
<literal>Person</literal> reference to the collection in an
<literal>Event</literal>. This process of \"setting the link on both
sides\" is absolutely necessary with bi-directional links."
+msgstr "首先请记住,Hibernate 并不影响通常的 Java 语义。 在单向关联的例子中,我们是怎样在
<literal>Person</literal> 和 <literal>Event</literal> 之间创建联系的?我们把
<literal>Event</literal> 实例添加到 <literal>Person</literal> 实例内的
event 引用集合里。因此很显然,如果我们要让这个关联可以双向地工作,我们需要在另外一端做同样的事情 - 把
<literal>Person</literal> 实例加入 <literal>Event</literal> 类内的 Person
引用集合。这“在关联的两端设置联系”是完全必要的而且你都得这么做。 "
#. Tag: para
-#: tutorial.xml:932
-#, fuzzy, no-c-format
-msgid ""
-"Many developers program defensively and create link management methods to "
-"correctly set both sides (for example, in
<literal>Person</literal>):"
-msgstr ""
-"许多开发人员防御式地编程,创建管理关联的方法来保证正确的设置了关联的两端,比"
-"如在<literal>Person</literal>里:"
-
-#. Tag: programlisting
-#: tutorial.xml:937
#, no-c-format
-msgid ""
-"<![CDATA[ protected Set getEvents() {\n"
-" return events;\n"
-" }\n"
-"\n"
-" protected void setEvents(Set events) {\n"
-" this.events = events;\n"
-" }\n"
-"\n"
-" public void addToEvent(Event event) {\n"
-" this.getEvents().add(event);\n"
-" event.getParticipants().add(this);\n"
-" }\n"
-"\n"
-" public void removeFromEvent(Event event) {\n"
-" this.getEvents().remove(event);\n"
-" event.getParticipants().remove(this);\n"
-" }]]>"
-msgstr ""
+msgid "Many developers program defensively and create link management methods to
correctly set both sides (for example, in <literal>Person</literal>):"
+msgstr "许多开发人员防御式地编程,创建管理关联的方法来保证正确的设置了关联的两端,比如在
<literal>Person</literal> 里: "
#. Tag: para
-#: tutorial.xml:939
-#, fuzzy, no-c-format
-msgid ""
-"The get and set methods for the collection are now protected. This allows "
-"classes in the same package and subclasses to still access the methods, but "
-"prevents everybody else from altering the collections directly. Repeat the "
-"steps for the collection on the other side."
-msgstr ""
-"注意现在对于集合的get和set方法的访问级别是protected - 这允许在位于同一个包"
-"(package)中的类以及继承自这个类的子类可以访问这些方法,但禁止其他任何人的直"
-"接访问,避免了集合内容的混乱。你应尽可能地在另一端也把集合的访问级别设成"
-"protected。"
+#, no-c-format
+msgid "The get and set methods for the collection are now protected. This allows
classes in the same package and subclasses to still access the methods, but prevents
everybody else from altering the collections directly. Repeat the steps for the collection
on the other side."
+msgstr "注意现在对于集合的 get 和 set 方法的访问级别是 protected —
这允许在位于同一个包(package)中的类以及继承自这个类的子类可以访问这些方法,但禁止其他任何人的直接访问,避免了集合内容的混乱。你应尽可能地在另一端也把集合的访问级别设成
protected。 "
#. Tag: para
-#: tutorial.xml:946
-#, fuzzy, no-c-format
-msgid ""
-"What about the <literal>inverse</literal> mapping attribute? For you,
and "
-"for Java, a bi-directional link is simply a matter of setting the references
"
-"on both sides correctly. Hibernate, however, does not have enough "
-"information to correctly arrange SQL <literal>INSERT</literal> and
"
-"<literal>UPDATE</literal> statements (to avoid constraint violations).
"
-"Making one side of the association <literal>inverse</literal> tells
"
-"Hibernate to consider it a <emphasis>mirror</emphasis> of the other
side. "
-"That is all that is necessary for Hibernate to resolve any issues that arise
"
-"when transforming a directional navigation model to a SQL database schema. "
-"The rules are straightforward: all bi-directional associations need one side
"
-"as <literal>inverse</literal>. In a one-to-many association it has to
be the "
-"many-side, and in many-to-many association you can select either side."
-msgstr ""
-"<literal>inverse</literal>映射属性究竟表示什么呢?对于你和Java来说,一个双向"
-"关联仅仅是在两端简单地正确设置引用。然而,Hibernate并没有足够的信息去正确地执"
-"行<literal>INSERT</literal>和<literal>UPDATE</literal>语句(以避免违反数据库"
-"约束),所以它需要一些帮助来正确的处理双向关联。把关联的一端设置为"
-"<literal>inverse</literal>将告诉Hibernate忽略关联的这一端,把这端看成是另外一"
-"端的一个<emphasis>镜象(mirror)</emphasis>。这就是所需的全部信息,Hibernate"
-"利用这些信息来处理把一个有向导航模型转移到数据库schema时的所有问题。你只需要"
-"记住这个直观的规则:所有的双向关联需要有一端被设置为<literal>inverse</"
-"literal>。在一对多关联中它必须是代表多(many)的那端。而在多对多(many-to-"
-"many)关联中,你可以任意选取一端,因为两端之间并没有差别。"
+#, no-c-format
+msgid "What about the <literal>inverse</literal> mapping attribute? For
you, and for Java, a bi-directional link is simply a matter of setting the references on
both sides correctly. Hibernate, however, does not have enough information to correctly
arrange SQL <literal>INSERT</literal> and
<literal>UPDATE</literal> statements (to avoid constraint violations). Making
one side of the association <literal>inverse</literal> tells Hibernate to
consider it a <emphasis>mirror</emphasis> of the other side. That is all that
is necessary for Hibernate to resolve any issues that arise when transforming a
directional navigation model to a SQL database schema. The rules are straightforward: all
bi-directional associations need one side as <literal>inverse</literal>. In a
one-to-many association it has to be the many-side, and in many-to-many association you
can select either side."
+msgstr "<literal>inverse</literal> 映射属性究竟表示什么呢?对于你和 Java
来说,一个双向关联仅仅是在两端简单地正确设置引用。然而,Hibernate 并没有足够的信息去正确地执行 <literal>INSERT</literal>
和 <literal>UPDATE</literal> 语句(以避免违反数据库约束),所以它需要一些帮助来正确的处理双向关联。把关联的一端设置为
<literal>inverse</literal> 将告诉 Hibernate
忽略关联的这一端,把这端看成是另外一端的一个<emphasis>镜象(mirror)</emphasis>。这就是所需的全部信息,Hibernate
利用这些信息来处理把一个有向导航模型转移到数据库 schema 时的所有问题。你只需要记住这个直观的规则:所有的双向关联需要有一端被设置为
<literal>inverse</literal>。在一对多关联中它必须是代表多(many)的那端。而在多对多(many-to-many)关联中,你可以任意选取一端,因为两端之!
间并没有差别。 "
#. Tag: title
-#: tutorial.xml:962
#, no-c-format
msgid "Part 3 - The EventManager web application"
-msgstr "第三部分 - EventManager web应用程序"
+msgstr "第三部分 - EventManager web 应用程序"
#. Tag: para
-#: tutorial.xml:964
-#, fuzzy, no-c-format
-msgid ""
-"A Hibernate web application uses <literal>Session</literal> and "
-"<literal>Transaction</literal> almost like a standalone application.
"
-"However, some common patterns are useful. You can now write an "
-"<literal>EventManagerServlet</literal>. This servlet can list all
events "
-"stored in the database, and it provides an HTML form to enter new events."
-msgstr ""
-"Hibernate web应用程序使用<literal>Session</literal>
和<literal>Transaction</"
-"literal>的方式几乎和独立应用程序是一样的。但是,有一些常见的模式(pattern)非"
-"常有用。现在我们编写一个<literal>EventManagerServlet</literal>。这个servlet可"
-"以列出数据库中保存的所有的events,还提供一个HTML表单来增加新的events。"
+#, no-c-format
+msgid "A Hibernate web application uses <literal>Session</literal> and
<literal>Transaction</literal> almost like a standalone application. However,
some common patterns are useful. You can now write an
<literal>EventManagerServlet</literal>. This servlet can list all events
stored in the database, and it provides an HTML form to enter new events."
+msgstr "Hibernate web 应用程序使用 <literal>Session</literal> 和
<literal>Transaction</literal>
的方式几乎和独立应用程序是一样的。但是,有一些常见的模式(pattern)非常有用。现在我们编写一个
<literal>EventManagerServlet</literal>。这个 servlet 可以列出数据库中保存的所有的 events,还提供一个
HTML 表单来增加新的 events。 "
#. Tag: title
-#: tutorial.xml:972
#, no-c-format
msgid "Writing the basic servlet"
-msgstr "编写基本的servlet"
+msgstr "编写基本的 servlet"
#. Tag: para
-#: tutorial.xml:974
-#, fuzzy, no-c-format
-msgid ""
-"First we need create our basic processing servlet. Since our servlet only "
-"handles HTTP <literal>GET</literal> requests, we will only implement
the "
-"<literal>doGet()</literal> method:"
-msgstr ""
-"我们后面会用到<literal>dateFormatter</literal> 的工具,
它把<literal>Date</"
-"literal>对象转换为字符串。只要一个formatter作为servlet的成员就可以了。"
-
-#. Tag: programlisting
-#: tutorial.xml:980
#, no-c-format
-msgid ""
-"<![CDATA[package org.hibernate.tutorial.web;\n"
-"\n"
-"// Imports\n"
-"\n"
-"public class EventManagerServlet extends HttpServlet {\n"
-"\n"
-" protected void doGet(\n"
-" HttpServletRequest request,\n"
-" HttpServletResponse response) throws ServletException, "
-"IOException {\n"
-"\n"
-" SimpleDateFormat dateFormatter = new SimpleDateFormat(
\"dd.MM.yyyy"
-"\" );\n"
-"\n"
-" try {\n"
-" // Begin unit of work\n"
-" HibernateUtil.getSessionFactory().getCurrentSession()."
-"beginTransaction();\n"
-"\n"
-" // Process request and render page...\n"
-"\n"
-" // End unit of work\n"
-" HibernateUtil.getSessionFactory().getCurrentSession()."
-"getTransaction().commit();\n"
-" }\n"
-" catch (Exception ex) {\n"
-" HibernateUtil.getSessionFactory().getCurrentSession()."
-"getTransaction().rollback();\n"
-" if ( ServletException.class.isInstance( ex ) ) {\n"
-" throw ( ServletException ) ex;\n"
-" }\n"
-" else {\n"
-" throw new ServletException( ex );\n"
-" }\n"
-" }\n"
-" }\n"
-"\n"
-"}]]>"
-msgstr ""
+msgid "First we need create our basic processing servlet. Since our servlet only
handles HTTP <literal>GET</literal> requests, we will only implement the
<literal>doGet()</literal> method:"
+msgstr "这个 servlet 只处理 HTTP <literal>GET</literal> 请求,因此,我们要实现的是
<literal>doGet()</literal> 方法: "
#. Tag: para
-#: tutorial.xml:982
#, no-c-format
-msgid ""
-"Save this servlet as
<filename>src/main/java/org/hibernate/tutorial/web/"
-"EventManagerServlet.java</filename>"
-msgstr ""
+msgid "Save this servlet as
<filename>src/main/java/org/hibernate/tutorial/web/EventManagerServlet.java</filename>"
+msgstr "把这个 servlet 保存为
<filename>src/main/java/org/hibernate/tutorial/web/EventManagerServlet.java</filename>。"
#. Tag: para
-#: tutorial.xml:987
-#, fuzzy, no-c-format
-msgid ""
-"The pattern applied here is called
<emphasis>session-per-request</emphasis>. "
-"When a request hits the servlet, a new Hibernate
<literal>Session</literal> "
-"is opened through the first call to
<literal>getCurrentSession()</literal> "
-"on the <literal>SessionFactory</literal>. A database transaction is
then "
-"started. All data access occurs inside a transaction irrespective of whether
"
-"the data is read or written. Do not use the auto-commit mode in
applications."
-msgstr ""
-"这个servlet只处理 HTTP <literal>GET</literal> 请求,因此,我们要实现的是"
-"<literal>doGet()</literal>方法:"
+#, no-c-format
+msgid "The pattern applied here is called
<emphasis>session-per-request</emphasis>. When a request hits the servlet, a
new Hibernate <literal>Session</literal> is opened through the first call to
<literal>getCurrentSession()</literal> on the
<literal>SessionFactory</literal>. A database transaction is then started. All
data access occurs inside a transaction irrespective of whether the data is read or
written. Do not use the auto-commit mode in applications."
+msgstr "我们称这里应用的模式为每次请求一个
session<emphasis>(session-per-request)</emphasis>。当有请求到达这个 servlet 的时候,通过对
<literal>SessionFactory</literal> 的第一次调用,打开一个新的 Hibernate
<literal>Session</literal>。然后启动一个数据库事务 — 所有的数据访问都是在事务中进行,不管是读还是写(我们在应用程序中不使用
auto-commit 模式)。 "
#. Tag: para
-#: tutorial.xml:996
#, no-c-format
-msgid ""
-"Do <emphasis>not</emphasis> use a new Hibernate
<literal>Session</literal> "
-"for every database operation. Use one Hibernate
<literal>Session</literal> "
-"that is scoped to the whole request. Use
<literal>getCurrentSession()</"
-"literal>, so that it is automatically bound to the current Java thread."
-msgstr ""
-"我们称这里应用的模式为每次请求一个session<emphasis>(session-per-request)</"
-"emphasis>。当有请求到达这个servlet的时候,通过对<literal>SessionFactory</"
-"literal>的第一次调用,打开一个新的Hibernate <literal>Session</literal>。然后"
-"启动一个数据库事务—所有的数据访问都是在事务中进行,不管是读还是写(我们"
-"在应用程序中不使用auto-commit模式)。"
+msgid "Do <emphasis>not</emphasis> use a new Hibernate
<literal>Session</literal> for every database operation. Use one Hibernate
<literal>Session</literal> that is scoped to the whole request. Use
<literal>getCurrentSession()</literal>, so that it is automatically bound to
the current Java thread."
+msgstr "<emphasis>不要</emphasis>为每次数据库操作都使用一个新的 Hibernate
<literal>Session</literal>。将 Hibernate <literal>Session</literal>
的范围设置为整个请求。要用 <literal>getCurrentSession()</literal>,这样它自动会绑定到当前 Java
线程。"
#. Tag: para
-#: tutorial.xml:1003
-#, fuzzy, no-c-format
-msgid ""
-"Next, the possible actions of the request are processed and the response "
-"HTML is rendered. We will get to that part soon."
-msgstr ""
-"<emphasis>不要</emphasis>为每次数据库操作都使用一个新的Hibernate "
-"<literal>Session</literal>。将Hibernate
<literal>Session</literal>的范围设置"
-"为整个请求。要用<literal>getCurrentSession()</literal>,这样它自动会绑定到当"
-"前Java线程。"
+#, no-c-format
+msgid "Next, the possible actions of the request are processed and the response HTML
is rendered. We will get to that part soon."
+msgstr "下一步,对请求的可能动作进行处理,渲染出反馈的 HTML。我们很快就会涉及到那部分。 "
#. Tag: para
-#: tutorial.xml:1008
-#, fuzzy, no-c-format
-msgid ""
-"Finally, the unit of work ends when processing and rendering are complete. "
-"If any problems occurred during processing or rendering, an exception will "
-"be thrown and the database transaction rolled back. This completes the "
-"<literal>session-per-request</literal> pattern. Instead of the
transaction "
-"demarcation code in every servlet, you could also write a servlet filter. "
-"See the Hibernate website and Wiki for more information about this pattern "
-"called <emphasis>Open Session in View</emphasis>. You will need it as
soon "
-"as you consider rendering your view in JSP, not in a servlet."
-msgstr ""
-"下一步,对请求的可能动作进行处理,渲染出反馈的HTML。我们很快就会涉及到那部"
-"分。"
+#, no-c-format
+msgid "Finally, the unit of work ends when processing and rendering are complete. If
any problems occurred during processing or rendering, an exception will be thrown and the
database transaction rolled back. This completes the
<literal>session-per-request</literal> pattern. Instead of the transaction
demarcation code in every servlet, you could also write a servlet filter. See the
Hibernate website and Wiki for more information about this pattern called
<emphasis>Open Session in View</emphasis>. You will need it as soon as you
consider rendering your view in JSP, not in a servlet."
+msgstr
"最后,当处理与渲染都结束的时候,这个工作单元就结束了。假若在处理或渲染的时候有任何错误发生,会抛出一个异常,回滚数据库事务。这样,<literal>session-per-request</literal>
模式就完成了。为了避免在每个 servlet 中都编写事务边界界定的代码,可以考虑写一个 servlet 过滤器(filter)来更好地解决。关于这一模式的更多信息,请参阅
Hibernate 网站和 Wiki,这一模式叫做 <emphasis>Open Session in View</emphasis> —
只要你考虑用JSP来渲染你的视图(view),而不是在servlet中,你就会很快用到它。 "
#. Tag: title
-#: tutorial.xml:1022
#, no-c-format
msgid "Processing and rendering"
-msgstr ""
-"最后,当处理与渲染都结束的时候,这个工作单元就结束了。假若在处理或渲染的时候"
-"有任何错误发生,会抛出一个异常,回滚数据库事务。这样,<literal>session-per-"
-"request</literal>模式就完成了。为了避免在每个servlet中都编写事务边界界定的代"
-"码,可以考虑写一个servlet 过滤器(filter)来更好地解决。关于这一模式的更多信"
-"息,请参阅Hibernate网站和Wiki,这一模式叫做<emphasis>Open Session in View</"
-"emphasis>—只要你考虑用JSP来渲染你的视图(view),而不是在servlet中,你"
-"就会很快用到它。"
-
-#. Tag: para
-#: tutorial.xml:1024
-#, fuzzy, no-c-format
-msgid ""
-"Now you can implement the processing of the request and the rendering of the
"
-"page."
msgstr "处理与渲染"
-#. Tag: programlisting
-#: tutorial.xml:1028
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[ // Write HTML header\n"
-" PrintWriter out = response.getWriter();\n"
-" out.println(\"<html><head><title>Event
Manager</title></head><body>"
-"\");\n"
-"\n"
-" // Handle actions\n"
-" if ( \"store\".equals(request.getParameter(\"action\"))
) {\n"
-"\n"
-" String eventTitle =
request.getParameter(\"eventTitle\");\n"
-" String eventDate =
request.getParameter(\"eventDate\");\n"
-"\n"
-" if ( \"\".equals(eventTitle) ||
\"\".equals(eventDate) ) {\n"
-" out.println(\"<b><i>Please enter event title and
date.</i></"
-"b>\");\n"
-" }\n"
-" else {\n"
-" createAndStoreEvent(eventTitle, dateFormatter.parse"
-"(eventDate));\n"
-" out.println(\"<b><i>Added
event.</i></b>\");\n"
-" }\n"
-" }\n"
-"\n"
-" // Print page\n"
-" printEventForm(out);\n"
-" listEvents(out, dateFormatter);\n"
-"\n"
-" // Write HTML footer\n"
-" out.println(\"</body></html>\");\n"
-" out.flush();\n"
-" out.close();]]>"
-msgstr ""
+msgid "Now you can implement the processing of the request and the rendering of the
page."
+msgstr "我们来实现处理请求以及渲染页面的工作。 "
#. Tag: para
-#: tutorial.xml:1030
-#, fuzzy, no-c-format
-msgid ""
-"This coding style, with a mix of Java and HTML, would not scale in a more "
-"complex application—keep in mind that we are only illustrating basic
"
-"Hibernate concepts in this tutorial. The code prints an HTML header and a "
-"footer. Inside this page, an HTML form for event entry and a list of all "
-"events in the database are printed. The first method is trivial and only "
-"outputs HTML:"
-msgstr "我们来实现处理请求以及渲染页面的工作。"
-
-#. Tag: programlisting
-#: tutorial.xml:1039
#, no-c-format
-msgid ""
-"<![CDATA[ private void printEventForm(PrintWriter out) {\n"
-" out.println(\"<h2>Add new event:</h2>\");\n"
-" out.println(\"<form>\");\n"
-" out.println(\"Title: <input name='eventTitle'
length='50'/><br/>"
-"\");\n"
-" out.println(\"Date (e.g. 24.12.2009): <input
name='eventDate' "
-"length='10'/><br/>\");\n"
-" out.println(\"<input type='submit' name='action'
value='store'/>"
-"\");\n"
-" out.println(\"</form>\");\n"
-" }]]>"
-msgstr ""
+msgid "This coding style, with a mix of Java and HTML, would not scale in a more
complex application—keep in mind that we are only illustrating basic Hibernate
concepts in this tutorial. The code prints an HTML header and a footer. Inside this page,
an HTML form for event entry and a list of all events in the database are printed. The
first method is trivial and only outputs HTML:"
+msgstr "必须承认,这种编码风格把 Java 和 HTML 混在一起,在更复杂的应用程序里不应该大量使用 — 记住,在本章里我们仅仅是展示了 Hibernate
的基本概念。这段代码打印出了 HTML 页眉和页脚,在这个页面里,还打印了一个输入 events 条目的表单单并列出了数据库里的有的 events。第一个方法微不足道,仅仅是输出
HTML:"
#. Tag: para
-#: tutorial.xml:1041
#, no-c-format
-msgid ""
-"The <literal>listEvents()</literal> method uses the Hibernate "
-"<literal>Session</literal> bound to the current thread to execute a
query:"
-msgstr ""
-"<literal>listEvents()</literal>方法使用绑定到当前线程的Hibernate "
-"<literal>Session</literal>来执行查询:"
+msgid "The <literal>listEvents()</literal> method uses the Hibernate
<literal>Session</literal> bound to the current thread to execute a
query:"
+msgstr "<literal>listEvents()</literal> 方法使用绑定到当前线程的 Hibernate
<literal>Session</literal> 来执行查询:"
-#. Tag: programlisting
-#: tutorial.xml:1047
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[ private void listEvents(PrintWriter out, SimpleDateFormat "
-"dateFormatter) {\n"
-"\n"
-" List result = HibernateUtil.getSessionFactory()\n"
-" .getCurrentSession().createCriteria(Event.class).list();\n"
-" if (result.size() > 0) {\n"
-" out.println(\"<h2>Events in
database:</h2>\");\n"
-" out.println(\"<table border='1'>\");\n"
-" out.println(\"<tr>\");\n"
-" out.println(\"<th>Event title</th>\");\n"
-" out.println(\"<th>Event date</th>\");\n"
-" out.println(\"</tr>\");\n"
-" Iterator it = result.iterator();\n"
-" while (it.hasNext()) {\n"
-" Event event = (Event) it.next();\n"
-" out.println(\"<tr>\");\n"
-" out.println(\"<td>\" + event.getTitle() +
\"</td>\");\n"
-" out.println(\"<td>\" +
dateFormatter.format(event.getDate()) "
-"+ \"</td>\");\n"
-" out.println(\"</tr>\");\n"
-" }\n"
-" out.println(\"</table>\");\n"
-" }\n"
-" }]]>"
-msgstr ""
+msgid "Finally, the <literal>store</literal> action is dispatched to the
<literal>createAndStoreEvent()</literal> method, which also uses the
<literal>Session</literal> of the current thread:"
+msgstr "最后,<literal>store</literal> 动作会被导向到
<literal>createAndStoreEvent()</literal> 方法,它也使用当前线程的
<literal>Session</literal>:"
#. Tag: para
-#: tutorial.xml:1049
#, no-c-format
-msgid ""
-"Finally, the <literal>store</literal> action is dispatched to the
"
-"<literal>createAndStoreEvent()</literal> method, which also uses the
"
-"<literal>Session</literal> of the current thread:"
-msgstr ""
-"最后,<literal>store</literal>动作会被导向到<literal>createAndStoreEvent()</"
-"literal>方法,它也使用当前线程的<literal>Session</literal>:"
+msgid "The servlet is now complete. A request to the servlet will be processed in a
single <literal>Session</literal> and
<literal>Transaction</literal>. As earlier in the standalone application,
Hibernate can automatically bind these objects to the current thread of execution. This
gives you the freedom to layer your code and access the
<literal>SessionFactory</literal> in any way you like. Usually you would use a
more sophisticated design and move the data access code into data access objects (the DAO
pattern). See the Hibernate Wiki for more examples."
+msgstr "大功告成,这个 servlet 写完了。Hibernate 会在单一的 <literal>Session</literal> 和
<literal>Transaction</literal> 中处理到达的 servlet 请求。如同在前面的独立应用程序中那样,Hibernate
可以自动的把这些对象绑定到当前运行的线程中。这给了你用任何你喜欢的方式来对代码分层及访问 <literal>SessionFactory</literal>
的自由。通常,你会用更加完备的设计,把数据访问代码转移到数据访问对象中(DAO 模式)。请参见 Hibernate Wiki,那里有更多的例子。 "
-#. Tag: programlisting
-#: tutorial.xml:1055
-#, no-c-format
-msgid ""
-"<![CDATA[ protected void createAndStoreEvent(String title, Date theDate)
"
-"{\n"
-" Event theEvent = new Event();\n"
-" theEvent.setTitle(title);\n"
-" theEvent.setDate(theDate);\n"
-"\n"
-" HibernateUtil.getSessionFactory()\n"
-" .getCurrentSession().save(theEvent);\n"
-" }]]>"
-msgstr ""
-
-#. Tag: para
-#: tutorial.xml:1057
-#, fuzzy, no-c-format
-msgid ""
-"The servlet is now complete. A request to the servlet will be processed in a
"
-"single <literal>Session</literal> and
<literal>Transaction</literal>. As "
-"earlier in the standalone application, Hibernate can automatically bind "
-"these objects to the current thread of execution. This gives you the freedom
"
-"to layer your code and access the <literal>SessionFactory</literal> in
any "
-"way you like. Usually you would use a more sophisticated design and move the
"
-"data access code into data access objects (the DAO pattern). See the "
-"Hibernate Wiki for more examples."
-msgstr ""
-"大功告成,这个servlet写完了。Hibernate会在单一的<literal>Session</literal> 和"
-"<literal>Transaction</literal>中处理到达的servlet请求。如同在前面的独立应用程"
-"序中那样,Hibernate可以自动的把这些对象绑定到当前运行的线程中。这给了你用任何"
-"你喜欢的方式来对代码分层及访问<literal>SessionFactory</literal>的自由。通常,"
-"你会用更加完备的设计,把数据访问代码转移到数据访问对象中(DAO模式)。请参见"
-"Hibernate Wiki,那里有更多的例子。"
-
#. Tag: title
-#: tutorial.xml:1071
#, no-c-format
msgid "Deploying and testing"
msgstr "部署与测试"
#. Tag: para
-#: tutorial.xml:1073
#, no-c-format
-msgid ""
-"To deploy this application for testing we must create a Web ARchive (WAR). "
-"First we must define the WAR descriptor as
<filename>src/main/webapp/WEB-INF/"
-"web.xml</filename>"
-msgstr ""
+msgid "To deploy this application for testing we must create a Web ARchive (WAR).
First we must define the WAR descriptor as
<filename>src/main/webapp/WEB-INF/web.xml</filename>"
+msgstr "要部署这个应用程序以进行测试,我们必须出具一个 Web ARchive (WAR)。首先我们必须定义 WAR 描述符为
<filename>src/main/webapp/WEB-INF/web.xml</filename>。"
-#. Tag: programlisting
-#: tutorial.xml:1079
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<?xml version=\"1.0\"
encoding=\"UTF-8\"?>\n"
-"<web-app version=\"2.4\"\n"
-"
xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n"
-"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-"
xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee
http://java.sun.com/"
-"xml/ns/j2ee/web-app_2_4.xsd\">\n"
-"\n"
-" <servlet>\n"
-" <servlet-name>Event Manager</servlet-name>\n"
-"
<servlet-class>org.hibernate.tutorial.web.EventManagerServlet</"
-"servlet-class>\n"
-" </servlet>\n"
-"\n"
-" <servlet-mapping>\n"
-" <servlet-name>Event Manager</servlet-name>\n"
-" <url-pattern>/eventmanager</url-pattern>\n"
-" </servlet-mapping>\n"
-"</web-app>]]>"
-msgstr ""
+msgid "To build and deploy call <literal>mvn package</literal> in your
project directory and copy the <filename>hibernate-tutorial.war</filename>
file into your Tomcat <filename>webapps</filename> directory."
+msgstr "在你的开发目录中,调用 <literal>ant war</literal> 来构建、打包,然后把
<literal>hibernate-tutorial.war</literal> 文件拷贝到你的 tomcat 的
<literal>webapps</literal> 目录下。假若你还没安装 Tomcat,就去下载一个,按照指南来安装。对此应用的发布,你不需要修改任何
Tomcat 的配置。 "
#. Tag: para
-#: tutorial.xml:1081
-#, fuzzy, no-c-format
-msgid ""
-"To build and deploy call <literal>mvn package</literal> in your project
"
-"directory and copy the <filename>hibernate-tutorial.war</filename> file
into "
-"your Tomcat <filename>webapps</filename> directory."
-msgstr ""
-"在你的开发目录中,调用<literal>ant war</literal>来构建、打包,然后把"
-"<literal>hibernate-tutorial.war</literal>文件拷贝到你的tomcat的"
-"<literal>webapps</literal>目录下。假若你还没安装Tomcat,就去下载一个,按照指"
-"南来安装。对此应用的发布,你不需要修改任何Tomcat的配置。"
-
-#. Tag: para
-#: tutorial.xml:1088
#, no-c-format
-msgid ""
-"If you do not have Tomcat installed, download it from <ulink
url=\"http://"
-"tomcat.apache.org/\"></ulink> and follow the installation
instructions. Our "
-"application requires no changes to the standard Tomcat configuration."
-msgstr ""
+msgid "If you do not have Tomcat installed, download it from <ulink
url=\"http://tomcat.apache.org/\" /> and follow the installation
instructions. Our application requires no changes to the standard Tomcat
configuration."
+msgstr "如果你还没有安装 Tomcat,请从 <ulink
url=\"http://tomcat.apache.org/\"
/> 下载并按照安装说明进行安装。我们的应用程序不需要对标准的 Tomcat 配置进行修改。"
#. Tag: para
-#: tutorial.xml:1096
#, no-c-format
-msgid ""
-"Once deployed and Tomcat is running, access the application at "
-"<literal>http://localhost:8080/hibernate-tutorial/eventmanager</literal>.
"
-"Make sure you watch the Tomcat log to see Hibernate initialize when the "
-"first request hits your servlet (the static initializer in "
-"<literal>HibernateUtil</literal> is called) and to get the detailed
output "
-"if any exceptions occurs."
-msgstr ""
-"在部署完,启动Tomcat之后,通过<literal>http://localhost:8080/hibernate-"
-"tutorial/eventmanager</literal>进行访问你的应用,在第一次servlet 请求发生时,"
-"请在Tomcat log中确认你看到Hibernate被初始化了(<literal>HibernateUtil</"
-"literal>的静态初始化器被调用),假若有任何异常抛出,也可以看到详细的输出。"
+msgid "Once deployed and Tomcat is running, access the application at
<literal>http://localhost:8080/hibernate-tutorial/eventmanager</literal>. Make
sure you watch the Tomcat log to see Hibernate initialize when the first request hits your
servlet (the static initializer in <literal>HibernateUtil</literal> is called)
and to get the detailed output if any exceptions occurs."
+msgstr "在部署完,启动 Tomcat 之后,通过
<literal>http://localhost:8080/hibernate-tutorial/eventmanager</literal>
进行访问你的应用,在第一次 servlet 请求发生时,请在 Tomcat log 中确认你看到 Hibernate
被初始化了(<literal>HibernateUtil</literal>
的静态初始化器被调用),假若有任何异常抛出,也可以看到详细的输出。"
#. Tag: title
-#: tutorial.xml:1109
#, no-c-format
msgid "Summary"
msgstr "总结"
#. Tag: para
-#: tutorial.xml:1111
-#, fuzzy, no-c-format
-msgid ""
-"This tutorial covered the basics of writing a simple standalone Hibernate "
-"application and a small web application. More tutorials are available from "
-"the Hibernate <ulink
url=\"http://hibernate.org\">website</ulink>."
-msgstr ""
-"本章覆盖了如何编写一个简单独立的Hibernate命令行应用程序及小型的Hibernate web"
-"应用程序的基本要素。"
+#, no-c-format
+msgid "This tutorial covered the basics of writing a simple standalone Hibernate
application and a small web application. More tutorials are available from the Hibernate
<ulink url=\"http://hibernate.org\">website</ulink>."
+msgstr "本章覆盖了如何编写一个简单独立的 Hibernate 命令行应用程序及小型的 Hibernate web 应用程序的基本要素。更多的教程可以在
<ulink url=\"http://hibernate.org\">website</ulink> 上找到。"
-#~ msgid "Introduction to Hibernate"
-#~ msgstr "Hibernate入门"
-
-#~ msgid "Preface"
-#~ msgstr "前言"
-
#~ msgid ""
-#~ "This chapter is an introductory tutorial for new users of Hibernate. We "
-#~ "start with a simple command line application using an in-memory database "
-#~ "and develop it in easy to understand steps."
+#~ "<![CDATA[<project
xmlns=\"http://maven.apache.org/POM/4.0.0\"\n"
+#~ "
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+#~ "
xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0
http://"
+#~ "maven.apache.org/xsd/maven-4.0.0.xsd\">\n"
+#~ "\n"
+#~ " <modelVersion>4.0.0</modelVersion>\n"
+#~ "\n"
+#~ " <groupId>org.hibernate.tutorials</groupId>\n"
+#~ " <artifactId>hibernate-tutorial</artifactId>\n"
+#~ " <version>1.0.0-SNAPSHOT</version>\n"
+#~ " <name>First Hibernate Tutorial</name>\n"
+#~ "\n"
+#~ " <build>\n"
+#~ " <!-- we dont want the version to be part of the generated war
"
+#~ "file name -->\n"
+#~ " <finalName>${artifactId}</finalName>\n"
+#~ " </build>\n"
+#~ "\n"
+#~ " <dependencies>\n"
+#~ " <dependency>\n"
+#~ " <groupId>org.hibernate</groupId>\n"
+#~ " <artifactId>hibernate-core</artifactId>\n"
+#~ " </dependency>\n"
+#~ "\n"
+#~ " <!-- Because this is a web app, we also have a dependency on the
"
+#~ "servlet api. -->\n"
+#~ " <dependency>\n"
+#~ " <groupId>javax.servlet</groupId>\n"
+#~ " <artifactId>servlet-api</artifactId>\n"
+#~ " </dependency>\n"
+#~ "\n"
+#~ " <!-- Hibernate uses slf4j for logging, for our purposes here use
"
+#~ "the simple backend -->\n"
+#~ " <dependency>\n"
+#~ " <groupId>org.slf4j</groupId>\n"
+#~ " <artifactId>slf4j-simple</artifactId>\n"
+#~ " </dependency>\n"
+#~ "\n"
+#~ " <!-- Hibernate gives you a choice of bytecode providers between
"
+#~ "cglib and javassist -->\n"
+#~ " <dependency>\n"
+#~ " <groupId>javassist</groupId>\n"
+#~ " <artifactId>javassist</artifactId>\n"
+#~ " </dependency>\n"
+#~ " </dependencies>\n"
+#~ "\n"
+#~ "</project>]]>"
#~ msgstr ""
-#~ "本章是面向Hibernate初学者的一个入门教程。我们从一个使用驻留内存式(in-"
-#~ "memory)数据库的简单命令行应用程序开始, 用易于理解的方式逐步开发。"
-
+#~ "<![CDATA[<project
xmlns=\"http://maven.apache.org/POM/4.0.0\"\n"
+#~ "
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+#~ "
xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0
http://"
+#~ "maven.apache.org/xsd/maven-4.0.0.xsd\">\n"
+#~ "\n"
+#~ " <modelVersion>4.0.0</modelVersion>\n"
+#~ "\n"
+#~ " <groupId>org.hibernate.tutorials</groupId>\n"
+#~ " <artifactId>hibernate-tutorial</artifactId>\n"
+#~ " <version>1.0.0-SNAPSHOT</version>\n"
+#~ " <name>First Hibernate Tutorial</name>\n"
+#~ "\n"
+#~ " <build>\n"
+#~ " <!-- we dont want the version to be part of the generated war
"
+#~ "file name -->\n"
+#~ " <finalName>${artifactId}</finalName>\n"
+#~ " </build>\n"
+#~ "\n"
+#~ " <dependencies>\n"
+#~ " <dependency>\n"
+#~ " <groupId>org.hibernate</groupId>\n"
+#~ " <artifactId>hibernate-core</artifactId>\n"
+#~ " </dependency>\n"
+#~ "\n"
+#~ " <!-- Because this is a web app, we also have a dependency on the
"
+#~ "servlet api. -->\n"
+#~ " <dependency>\n"
+#~ " <groupId>javax.servlet</groupId>\n"
+#~ " <artifactId>servlet-api</artifactId>\n"
+#~ " </dependency>\n"
+#~ "\n"
+#~ " <!-- Hibernate uses slf4j for logging, for our purposes here use
"
+#~ "the simple backend -->\n"
+#~ " <dependency>\n"
+#~ " <groupId>org.slf4j</groupId>\n"
+#~ " <artifactId>slf4j-simple</artifactId>\n"
+#~ " </dependency>\n"
+#~ "\n"
+#~ " <!-- Hibernate gives you a choice of bytecode providers between
"
+#~ "cglib and javassist -->\n"
+#~ " <dependency>\n"
+#~ " <groupId>javassist</groupId>\n"
+#~ " <artifactId>javassist</artifactId>\n"
+#~ " </dependency>\n"
+#~ " </dependencies>\n"
+#~ "\n"
+#~ "</project>]]>"
#~ msgid ""
-#~ "This tutorial is intended for new users of Hibernate but requires Java "
-#~ "and SQL knowledge. It is based on a tutorial by Michael Gloegl, the
third-"
-#~ "party libraries we name are for JDK 1.4 and 5.0. You might need others "
-#~ "for JDK 1.3."
+#~ "<![CDATA[package org.hibernate.tutorial.domain;\n"
+#~ "\n"
+#~ "import java.util.Date;\n"
+#~ "\n"
+#~ "public class Event {\n"
+#~ " private Long id;\n"
+#~ "\n"
+#~ " private String title;\n"
+#~ " private Date date;\n"
+#~ "\n"
+#~ " public Event() {}\n"
+#~ "\n"
+#~ " public Long getId() {\n"
+#~ " return id;\n"
+#~ " }\n"
+#~ "\n"
+#~ " private void setId(Long id) {\n"
+#~ " this.id = id;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public Date getDate() {\n"
+#~ " return date;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void setDate(Date date) {\n"
+#~ " this.date = date;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public String getTitle() {\n"
+#~ " return title;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void setTitle(String title) {\n"
+#~ " this.title = title;\n"
+#~ " }\n"
+#~ "}]]>"
#~ msgstr ""
-#~ "本章面向Hibernate初学者,但需要Java和SQL知识。它是在Michael Goegl所写的指"
-#~ "南的基础上完成的。在这里,我们称第三方库文件是指JDK 1.4和5.0。若使用"
-#~ "JDK1.3,你可能需要其它的库文件。"
-
+#~ "<![CDATA[package org.hibernate.tutorial.domain;\n"
+#~ "\n"
+#~ "import java.util.Date;\n"
+#~ "\n"
+#~ "public class Event {\n"
+#~ " private Long id;\n"
+#~ "\n"
+#~ " private String title;\n"
+#~ " private Date date;\n"
+#~ "\n"
+#~ " public Event() {}\n"
+#~ "\n"
+#~ " public Long getId() {\n"
+#~ " return id;\n"
+#~ " }\n"
+#~ "\n"
+#~ " private void setId(Long id) {\n"
+#~ " this.id = id;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public Date getDate() {\n"
+#~ " return date;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void setDate(Date date) {\n"
+#~ " this.date = date;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public String getTitle() {\n"
+#~ " return title;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void setTitle(String title) {\n"
+#~ " this.title = title;\n"
+#~ " }\n"
+#~ "}]]>"
#~ msgid ""
-#~ "The source code for the tutorial is included in the distribution in the "
-#~ "<literal>doc/reference/tutorial/</literal> directory."
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+#~ "\n"
+#~ "<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
+#~ "[...]\n"
+#~ "</hibernate-mapping>]]>"
#~ msgstr ""
-#~ "本章的源代码已包含在发布包中,位于<literal>doc/reference/tutorial/</"
-#~ "literal>目录下。"
-
+#~ "<![CDATA[<?xml version=\"1.0\"?>\n"
+#~ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+#~ "\n"
+#~ "<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
+#~ "[...]\n"
+#~ "</hibernate-mapping>]]>"
#~ msgid ""
-#~ "First, we'll create a simple console-based Hibernate application. We use
"
-#~ "an Java database (HSQL DB), so we do not have to install any database "
-#~ "server."
+#~ "<![CDATA[<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
+#~ "\n"
+#~ " <class name=\"Event\" table=\"EVENTS\">\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
#~ msgstr ""
-#~ "首先我们将创建一个简单的基于控制台的(console-based)Hibernate应用程序。由于"
-#~ "我们使用Java数据库(HSQL DB),所以不必安装任何数据库服务器。"
-
+#~ "<![CDATA[<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
+#~ "\n"
+#~ " <class name=\"Event\" table=\"EVENTS\">\n"
+#~ "\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
#~ msgid ""
-#~ "The first thing we do, is set up our development directory and put all "
-#~ "the Java libraries we need into it. Download the Hibernate distribution "
-#~ "from the Hibernate website. Extract the package and place all required "
-#~ "libraries found in <literal>/lib</literal> into into the
<literal>/lib</"
-#~ "literal> directory of your new development working directory. It should
"
-#~ "look like this:"
+#~ "<![CDATA[<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
+#~ "\n"
+#~ " <class name=\"Event\" table=\"EVENTS\">\n"
+#~ " <id name=\"id\" column=\"EVENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
#~ msgstr ""
-#~ "我们所做的第一件事就是创建我们的开发目录,并且把所有需要用到的Java库文件放"
-#~ "进去。解压缩从Hibernate网站下载的Hibernate发布包,并把<literal>/lib</"
-#~ "literal>目录下所有需要的库文件拷到我们新建开发目录下的<literal>/lib</"
-#~ "literal>目录下。看起来就像这样:"
+#~ "<![CDATA[<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
+#~ "\n"
+#~ " <class name=\"Event\" table=\"EVENTS\">\n"
+#~ " <id name=\"id\" column=\"EVENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgid ""
+#~ "<![CDATA[\n"
+#~ "<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
+#~ "\n"
+#~ " <class name=\"Event\" table=\"EVENTS\">\n"
+#~ " <id name=\"id\" column=\"EVENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"date\" type=\"timestamp\"
column=\"EVENT_DATE\"/"
+#~ ">\n"
+#~ " <property name=\"title\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgstr ""
+#~ "<![CDATA[\n"
+#~ "<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
+#~ "\n"
+#~ " <class name=\"Event\" table=\"EVENTS\">\n"
+#~ " <id name=\"id\" column=\"EVENT_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"date\" type=\"timestamp\"
column=\"EVENT_DATE\"/"
+#~ ">\n"
+#~ " <property name=\"title\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
+#~ msgid ""
+#~ "<![CDATA[<?xml version='1.0'
encoding='utf-8'?>\n"
+#~ "<!DOCTYPE hibernate-configuration PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Configuration DTD 3.0//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"
+#~ "\">\n"
+#~ "\n"
+#~ "<hibernate-configuration>\n"
+#~ "\n"
+#~ " <session-factory>\n"
+#~ "\n"
+#~ " <!-- Database connection settings -->\n"
+#~ " <property
name=\"connection.driver_class\">org.hsqldb.jdbcDriver</"
+#~ "property>\n"
+#~ " <property
name=\"connection.url\">jdbc:hsqldb:hsql://localhost</"
+#~ "property>\n"
+#~ " <property
name=\"connection.username\">sa</property>\n"
+#~ " <property
name=\"connection.password\"></property>\n"
+#~ "\n"
+#~ " <!-- JDBC connection pool (use the built-in) -->\n"
+#~ " <property
name=\"connection.pool_size\">1</property>\n"
+#~ "\n"
+#~ " <!-- SQL dialect -->\n"
+#~ " <property
name=\"dialect\">org.hibernate.dialect.HSQLDialect</"
+#~ "property>\n"
+#~ "\n"
+#~ " <!-- Enable Hibernate's automatic session context management
-->\n"
+#~ " <property
name=\"current_session_context_class\">thread</"
+#~ "property>\n"
+#~ "\n"
+#~ " <!-- Disable the second-level cache -->\n"
+#~ " <property
name=\"cache.provider_class\">org.hibernate.cache."
+#~ "NoCacheProvider</property>\n"
+#~ "\n"
+#~ " <!-- Echo all executed SQL to stdout -->\n"
+#~ " <property
name=\"show_sql\">true</property>\n"
+#~ "\n"
+#~ " <!-- Drop and re-create the database schema on startup
-->\n"
+#~ " <property
name=\"hbm2ddl.auto\">update</property>\n"
+#~ "\n"
+#~ " <mapping
resource=\"org/hibernate/tutorial/domain/Event.hbm.xml\"/"
+#~ ">\n"
+#~ "\n"
+#~ " </session-factory>\n"
+#~ "\n"
+#~ "</hibernate-configuration>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<?xml version='1.0'
encoding='utf-8'?>\n"
+#~ "<!DOCTYPE hibernate-configuration PUBLIC\n"
+#~ " \"-//Hibernate/Hibernate Configuration DTD 3.0//EN\"\n"
+#~ "
\"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"
+#~ "\">\n"
+#~ "\n"
+#~ "<hibernate-configuration>\n"
+#~ "\n"
+#~ " <session-factory>\n"
+#~ "\n"
+#~ " <!-- Database connection settings -->\n"
+#~ " <property
name=\"connection.driver_class\">org.hsqldb.jdbcDriver</"
+#~ "property>\n"
+#~ " <property
name=\"connection.url\">jdbc:hsqldb:hsql://localhost</"
+#~ "property>\n"
+#~ " <property
name=\"connection.username\">sa</property>\n"
+#~ " <property
name=\"connection.password\"></property>\n"
+#~ "\n"
+#~ " <!-- JDBC connection pool (use the built-in) -->\n"
+#~ " <property
name=\"connection.pool_size\">1</property>\n"
+#~ "\n"
+#~ " <!-- SQL dialect -->\n"
+#~ " <property
name=\"dialect\">org.hibernate.dialect.HSQLDialect</"
+#~ "property>\n"
+#~ "\n"
+#~ " <!-- Enable Hibernate's automatic session context management
-->\n"
+#~ " <property
name=\"current_session_context_class\">thread</"
+#~ "property>\n"
+#~ "\n"
+#~ " <!-- Disable the second-level cache -->\n"
+#~ " <property
name=\"cache.provider_class\">org.hibernate.cache."
+#~ "NoCacheProvider</property>\n"
+#~ "\n"
+#~ " <!-- Echo all executed SQL to stdout -->\n"
+#~ " <property
name=\"show_sql\">true</property>\n"
+#~ "\n"
+#~ " <!-- Drop and re-create the database schema on startup
-->\n"
+#~ " <property
name=\"hbm2ddl.auto\">update</property>\n"
+#~ "\n"
+#~ " <mapping
resource=\"org/hibernate/tutorial/domain/Event.hbm.xml\"/"
+#~ ">\n"
+#~ "\n"
+#~ " </session-factory>\n"
+#~ "\n"
+#~ "</hibernate-configuration>]]>"
+#, fuzzy
#~ msgid ""
-#~ "This is the minimum set of required libraries (note that we also copied "
-#~ "hibernate3.jar, the main archive) for Hibernate <emphasis>at the time of
"
-#~ "writing</emphasis>. The Hibernate release you are using might require
"
-#~ "more or less libraries. See the <literal>README.txt</literal> file
in the "
-#~ "<literal>lib/</literal> directory of the Hibernate distribution for
more "
-#~ "information about required and optional third-party libraries. (Actually,
"
-#~ "Log4j is not required but preferred by many developers.)"
+#~ "<![CDATA[package org.hibernate.tutorial.util;\n"
+#~ "\n"
+#~ "import org.hibernate.SessionFactory;\n"
+#~ "import org.hibernate.cfg.Configuration;\n"
+#~ "\n"
+#~ "public class HibernateUtil {\n"
+#~ "\n"
+#~ " private static final SessionFactory sessionFactory = "
+#~ "buildSessionFactory();\n"
+#~ "\n"
+#~ " private static SessionFactory buildSessionFactory() {\n"
+#~ " try {\n"
+#~ " // Create the SessionFactory from hibernate.cfg.xml\n"
+#~ " return new Configuration().configure().buildSessionFactory"
+#~ "();\n"
+#~ " }\n"
+#~ " catch (Throwable ex) {\n"
+#~ " // Make sure you log the exception, as it might be
swallowed\n"
+#~ " System.err.println(\"Initial SessionFactory creation
failed."
+#~ "\" + ex);\n"
+#~ " throw new ExceptionInInitializerError(ex);\n"
+#~ " }\n"
+#~ " }\n"
+#~ "\n"
+#~ " public static SessionFactory getSessionFactory() {\n"
+#~ " return sessionFactory;\n"
+#~ " }\n"
+#~ "\n"
+#~ "}]]>"
#~ msgstr ""
-#~ "<emphasis>到编写本文时为止</emphasis>,这些是Hibernate运行所需要的最小库文"
-#~ "件集合(注意我们也拷贝了 Hibernate3.jar,这个是最主要的文件)。你正使用的"
-#~ "Hibernate版本可能需要比这更多或少一些的库文件。请参见发布包中的"
-#~
"<literal>lib/</literal>目录下的<literal>README.txt</literal>,以获取更多关"
-#~ "于所需和可选的第三方库文件信息(事实上,Log4j并不是必须的库文件,但被许多"
-#~ "开发者所喜欢)。"
+#~ "package util;\n"
+#~ "\n"
+#~ "import org.hibernate.*;\n"
+#~ "import org.hibernate.cfg.*;\n"
+#~ "\n"
+#~ "public class HibernateUtil {\n"
+#~ "\n"
+#~ " private static final SessionFactory sessionFactory;\n"
+#~ "\n"
+#~ " static {\n"
+#~ " try {\n"
+#~ " // Create the SessionFactory from hibernate.cfg.xml\n"
+#~ " sessionFactory = new Configuration().configure()."
+#~ "buildSessionFactory();\n"
+#~ " } catch (Throwable ex) {\n"
+#~ " // Make sure you log the exception, as it might be
swallowed\n"
+#~ " System.err.println(\"Initial SessionFactory creation
failed."
+#~ "\" + ex);\n"
+#~ " throw new ExceptionInInitializerError(ex);\n"
+#~ " }\n"
+#~ " }\n"
+#~ "\n"
+#~ " public static SessionFactory getSessionFactory() {\n"
+#~ " return sessionFactory;\n"
+#~ " }\n"
+#~ "\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "Our first persistent class is a simple JavaBean class with some "
-#~ "properties:"
+#~ "<![CDATA[package org.hibernate.tutorial;\n"
+#~ "\n"
+#~ "import org.hibernate.Session;\n"
+#~ "\n"
+#~ "import java.util.*;\n"
+#~ "\n"
+#~ "import org.hibernate.tutorial.domain.Event;\n"
+#~ "import org.hibernate.tutorial.util.HibernateUtil;\n"
+#~ "\n"
+#~ "public class EventManager {\n"
+#~ "\n"
+#~ " public static void main(String[] args) {\n"
+#~ " EventManager mgr = new EventManager();\n"
+#~ "\n"
+#~ " if (args[0].equals(\"store\")) {\n"
+#~ " mgr.createAndStoreEvent(\"My Event\", new
Date());\n"
+#~ " }\n"
+#~ "\n"
+#~ " HibernateUtil.getSessionFactory().close();\n"
+#~ " }\n"
+#~ "\n"
+#~ " private void createAndStoreEvent(String title, Date theDate) {\n"
+#~ " Session session = HibernateUtil.getSessionFactory()."
+#~ "getCurrentSession();\n"
+#~ " session.beginTransaction();\n"
+#~ "\n"
+#~ " Event theEvent = new Event();\n"
+#~ " theEvent.setTitle(title);\n"
+#~ " theEvent.setDate(theDate);\n"
+#~ " session.save(theEvent);\n"
+#~ "\n"
+#~ " session.getTransaction().commit();\n"
+#~ " }\n"
+#~ "\n"
+#~ "}]]>"
#~ msgstr ""
-#~ "我们的第一个持久化类是一个带有一些属性(property)的简单JavaBean类:"
+#~ "package events;\n"
+#~ "import org.hibernate.Session;\n"
+#~ "\n"
+#~ "import java.util.Date;\n"
+#~ "\n"
+#~ "import util.HibernateUtil;\n"
+#~ "\n"
+#~ "public class EventManager {\n"
+#~ "\n"
+#~ " public static void main(String[] args) {\n"
+#~ " EventManager mgr = new EventManager();\n"
+#~ "\n"
+#~ " if (args[0].equals(\"store\")) {\n"
+#~ " mgr.createAndStoreEvent(\"My Event\", new
Date());\n"
+#~ " }\n"
+#~ "\n"
+#~ " HibernateUtil.getSessionFactory().close();\n"
+#~ " }\n"
+#~ "\n"
+#~ " private void createAndStoreEvent(String title, Date theDate) {\n"
+#~ "\n"
+#~ " Session session = HibernateUtil.getSessionFactory()."
+#~ "getCurrentSession();\n"
+#~ "\n"
+#~ " session.beginTransaction();\n"
+#~ "\n"
+#~ " Event theEvent = new Event();\n"
+#~ " theEvent.setTitle(title);\n"
+#~ " theEvent.setDate(theDate);\n"
+#~ "\n"
+#~ " session.save(theEvent);\n"
+#~ "\n"
+#~ " session.getTransaction().commit();\n"
+#~ " }\n"
+#~ "\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "Place this Java source file in a directory called
<literal>src</literal> "
-#~ "in the development folder, and in its correct package. The directory "
-#~ "should now look like this:"
+#~ "<![CDATA[[java] Hibernate: insert into EVENTS (EVENT_DATE, title, "
+#~ "EVENT_ID) values (?, ?, ?)]]>"
#~ msgstr ""
-#~ "把这个Java源代码文件放到开发目录下的<literal>src</literal>目录里,注意包位"
-#~ "置要正确。 现在这个目录看起来应该像这样:"
+#~ "[java] Hibernate: insert into EVENTS (EVENT_DATE, title, EVENT_ID) values
"
+#~ "(?, ?, ?)"
-#~ msgid "In the next step, we tell Hibernate about this persistent class."
-#~ msgstr "下一步,我们把这个持久化类的信息告诉Hibernate。"
-
+#, fuzzy
#~ msgid ""
-#~ "The <literal>id</literal> element is the declaration of the
identifer "
-#~ "property, <literal>name=\"id\"</literal> declares the name
of the Java "
-#~ "property - Hibernate will use the getter and setter methods to access the
"
-#~ "property. The column attribute tells Hibernate which column of the "
-#~ "<literal>EVENTS</literal> table we use for this primary key. The
nested "
-#~ "<literal>generator</literal> element specifies the identifier
generation "
-#~ "strategy, in this case we used <literal>native</literal>, which
picks the "
-#~ "best strategy depending on the configured database (dialect). Hibernate "
-#~ "supports database generated, globally unique, as well as application "
-#~ "assigned identifiers (or any strategy you have written an extension for)."
+#~ "<![CDATA[ if (args[0].equals(\"store\")) {\n"
+#~ " mgr.createAndStoreEvent(\"My Event\", new
Date());\n"
+#~ " }\n"
+#~ " else if (args[0].equals(\"list\")) {\n"
+#~ " List events = mgr.listEvents();\n"
+#~ " for (int i = 0; i < events.size(); i++) {\n"
+#~ " Event theEvent = (Event) events.get(i);\n"
+#~ " System.out.println(\n"
+#~ " \"Event: \" + theEvent.getTitle() + \"
Time: \" + "
+#~ "theEvent.getDate()\n"
+#~ " );\n"
+#~ " }\n"
+#~ " }]]>"
#~ msgstr ""
-#~
"<literal>id</literal>元素是标识符属性的声明,<literal>name=\"id\"</"
-#~ "literal> 声明了Java属性的名字 -
Hibernate会使用<literal>getId()</literal>"
-#~ "和<literal>setId()</literal>来访问它。
<literal>column</literal>属性则告诉"
-#~ "Hibernate, 我们使用<literal>EVENTS</literal>表的哪个字段作为主键。嵌套的"
-#~ "<literal>generator</literal>元素指定了标识符生成策略,在这里我们指定"
-#~ "<literal>native</literal>,它根据已配置的数据库(方言)自动选择最佳的标识"
-#~ "符生成策略。Hibernate支持由数据库生成,全局唯一性(globally unique)和应用"
-#~ "程序指定(或者你自己为任何已有策略所写的扩展)这些策略来生成标识符。"
+#~ "if (args[0].equals(\"store\")) {\n"
+#~ " mgr.createAndStoreEvent(\"My Event\", new Date());\n"
+#~ "}\n"
+#~ "else if (args[0].equals(\"list\")) {\n"
+#~ " List events = mgr.listEvents();\n"
+#~ " for (int i = 0; i < events.size(); i++) {\n"
+#~ " Event theEvent = (Event) events.get(i);\n"
+#~ " System.out.println(\"Event: \" + theEvent.getTitle()
+\n"
+#~ " \" Time: \" + theEvent.getDate());\n"
+#~ " }\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "This mapping file should be saved as
<literal>Event.hbm.xml</literal>, "
-#~ "right in the directory next to the <literal>Event</literal> Java
class "
-#~ "source file. The naming of mapping files can be arbitrary, however the "
-#~ "<literal>hbm.xml</literal> suffix is a convention in the Hibernate
"
-#~ "developer community. The directory structure should now look like this:"
+#~ "<![CDATA[ private List listEvents() {\n"
+#~ " Session session = HibernateUtil.getSessionFactory()."
+#~ "getCurrentSession();\n"
+#~ " session.beginTransaction();\n"
+#~ " List result = session.createQuery(\"from
Event\").list();\n"
+#~ " session.getTransaction().commit();\n"
+#~ " return result;\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "应该把这个映射文件保存为<literal>Event.hbm.xml</literal>,且就在"
-#~ "<literal>Event</literal>Java类的源文件目录下。映射文件可随意地命名,但"
-#~ "<literal>hbm.xml</literal>的后缀已成为Hibernate开发者社区的约定。现在目录"
-#~ "结构看起来应该像这样:"
+#~ "private List listEvents() {\n"
+#~ "\n"
+#~ " Session session = HibernateUtil.getSessionFactory().getCurrentSession"
+#~ "();\n"
+#~ "\n"
+#~ " session.beginTransaction();\n"
+#~ "\n"
+#~ " List result = session.createQuery(\"from Event\").list();\n"
+#~ "\n"
+#~ " session.getTransaction().commit();\n"
+#~ "\n"
+#~ " return result;\n"
+#~ "}"
-#~ msgid "We continue with the main configuration of Hibernate."
-#~ msgstr "我们继续进行Hibernate的主要配置。"
-
+#, fuzzy
#~ msgid ""
-#~ "We now have a persistent class and its mapping file in place. It is time "
-#~ "to configure Hibernate. Before we do this, we will need a database. HSQL "
-#~ "DB, a java-based SQL DBMS, can be downloaded from the HSQL DB website"
-#~ "(http://hsqldb.org/). Actually, you only need the
<literal>hsqldb.jar</"
-#~ "literal> from this download. Place this file in the
<literal>lib/</"
-#~ "literal> directory of the development folder."
+#~ "<![CDATA[package org.hibernate.tutorial.domain;\n"
+#~ "\n"
+#~ "public class Person {\n"
+#~ "\n"
+#~ " private Long id;\n"
+#~ " private int age;\n"
+#~ " private String firstname;\n"
+#~ " private String lastname;\n"
+#~ "\n"
+#~ " public Person() {}\n"
+#~ "\n"
+#~ " // Accessor methods for all properties, private setter for
'id'\n"
+#~ "\n"
+#~ "}]]>"
#~ msgstr ""
-#~ "现在我们已经有了一个持久化类和它的映射文件,该是配置Hibernate的时候了。在"
-#~ "此之前,我们需要一个数据库。 HSQL DB是种基于Java 的SQL数据库管理系统"
-#~ "(DBMS),可以从HSQL DB的网站上下载。实际上,你只需下载的包中的"
-#~ "<literal>hsqldb.jar</literal>文件,并把这个文件放在开发文件夹的"
-#~ "<literal>lib/</literal>目录下即可。"
+#~ "package events;\n"
+#~ "\n"
+#~ "public class Person {\n"
+#~ "\n"
+#~ " private Long id;\n"
+#~ " private int age;\n"
+#~ " private String firstname;\n"
+#~ " private String lastname;\n"
+#~ "\n"
+#~ " public Person() {}\n"
+#~ "\n"
+#~ " // Accessor methods for all properties, private setter for
'id'\n"
+#~ "\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "Hibernate is the layer in your application which connects to this "
-#~ "database, so it needs connection information. The connections are made "
-#~ "through a JDBC connection pool, which we also have to configure. The "
-#~ "Hibernate distribution contains several open source JDBC connection "
-#~ "pooling tools, but will use the Hibernate built-in connection pool for "
-#~ "this tutorial. Note that you have to copy the required library into your "
-#~ "classpath and use different connection pooling settings if you want to "
-#~ "use a production-quality third party JDBC pooling software."
+#~ "<![CDATA[<hibernate-mapping
package=\"org.hibernate.tutorial.domain\">\n"
+#~ "\n"
+#~ " <class name=\"Person\" table=\"PERSON\">\n"
+#~ " <id name=\"id\" column=\"PERSON_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"age\"/>\n"
+#~ " <property name=\"firstname\"/>\n"
+#~ " <property name=\"lastname\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>]]>"
#~ msgstr ""
-#~ "Hibernate是你的应用程序里连接数据库的那层,所以它需要连接用的信息。连接"
-#~ "(connection)是通过一个也由我们配置的JDBC连接池(connection pool)来完成"
-#~ "的。Hibernate的发布包里包含了许多开源的(open source)连接池,但在我们例子"
-#~ "中使用Hibernate内置的连接池。注意,如果你希望使用一个产品级(production-"
-#~ "quality)的第三方连接池软件,你必须拷贝所需的库文件到你的classpath下,并使"
-#~ "用不同的连接池设置。"
+#~ "<hibernate-mapping>\n"
+#~ "\n"
+#~ " <class name=\"events.Person\"
table=\"PERSON\">\n"
+#~ " <id name=\"id\"
column=\"PERSON_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"age\"/>\n"
+#~ " <property name=\"firstname\"/>\n"
+#~ " <property name=\"lastname\"/>\n"
+#~ " </class>\n"
+#~ "\n"
+#~ "</hibernate-mapping>"
+#, fuzzy
#~ msgid ""
-#~ "Copy this file into the source directory, so it will end up in the root "
-#~ "of the classpath. Hibernate automatically looks for a file called "
-#~ "<literal>hibernate.cfg.xml</literal> in the root of the classpath,
on "
-#~ "startup."
+#~ "<![CDATA[<mapping
resource=\"events/Event.hbm.xml\"/>\n"
+#~ "<mapping resource=\"events/Person.hbm.xml\"/>]]>"
#~ msgstr ""
-#~ "把这个文件拷贝到源代码目录下面,这样它就位于classpath的根目录的最后。"
-#~ "Hibernate在启动时会自动在classpath的根目录查找名为<literal>hibernate.cfg."
-#~ "xml</literal>的配置文件。"
+#~ "<mapping resource=\"events/Event.hbm.xml\"/>\n"
+#~ "<mapping resource=\"events/Person.hbm.xml\"/>"
+#, fuzzy
#~ msgid ""
-#~ "We'll now build the tutorial with Ant. You will need to have Ant "
-#~ "installed - get it from the <ulink
url=\"http://ant.apache.org/"
-#~ "bindownload.cgi\">Ant download page</ulink>. How to install Ant
will not "
-#~ "be covered here. Please refer to the <ulink
url=\"http://ant.apache.org/"
-#~ "manual/index.html\">Ant manual</ulink>. After you have installed
Ant, we "
-#~ "can start to create the buildfile. It will be called
<literal>build.xml</"
-#~ "literal> and placed directly in the development directory."
+#~ "<![CDATA[public class Person {\n"
+#~ "\n"
+#~ " private Set events = new HashSet();\n"
+#~ "\n"
+#~ " public Set getEvents() {\n"
+#~ " return events;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void setEvents(Set events) {\n"
+#~ " this.events = events;\n"
+#~ " }\n"
+#~ "}]]>"
#~ msgstr ""
-#~ "现在我们用Ant来构建应用程序。你必须先安装Ant-可以从<ulink url=\"http://"
-#~ "ant.apache.org/bindownload.cgi\">Ant
下载页面</ulink>得到它。怎样安装Ant就"
-#~ "不在这里介绍了,请参考<ulink
url=\"http://ant.apache.org/manual/index.html"
-#~ "\">Ant 用户手册</ulink>。当你安装完了Ant,就可以开始创建<literal>build."
-#~ "xml</literal>文件,把它直接放在开发目录下面。"
+#~ "public class Person {\n"
+#~ "\n"
+#~ " private Set events = new HashSet();\n"
+#~ "\n"
+#~ " public Set getEvents() {\n"
+#~ " return events;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void setEvents(Set events) {\n"
+#~ " this.events = events;\n"
+#~ " }\n"
+#~ "}"
-#~ msgid "A basic build file looks like this:"
-#~ msgstr "一个简单的build文件看起来像这样:"
-
+#, fuzzy
#~ msgid ""
-#~ "This will tell Ant to add all files in the lib directory ending with "
-#~ "<literal>.jar</literal> to the classpath used for compilation. It
will "
-#~ "also copy all non-Java source files to the target directory, e.g. "
-#~ "configuration and Hibernate mapping files. If you now run Ant, you should
"
-#~ "get this output:"
+#~ "<![CDATA[<class name=\"Person\"
table=\"PERSON\">\n"
+#~ " <id name=\"id\" column=\"PERSON_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"age\"/>\n"
+#~ " <property name=\"firstname\"/>\n"
+#~ " <property name=\"lastname\"/>\n"
+#~ "\n"
+#~ " <set name=\"events\"
table=\"PERSON_EVENT\">\n"
+#~ " <key column=\"PERSON_ID\"/>\n"
+#~ " <many-to-many column=\"EVENT_ID\"
class=\"Event\"/>\n"
+#~ " </set>\n"
+#~ "\n"
+#~ "</class>]]>"
#~ msgstr ""
-#~ "这将告诉Ant把所有在lib目录下以<literal>.jar</literal>结尾的文件拷贝到"
-#~ "classpath中以供编译之用。它也把所有的非Java源代码文件,例如配置和Hibernate"
-#~ "映射文件,拷贝到目标目录。如果你现在运行Ant,会得到以下输出:"
+#~ "<class name=\"events.Person\"
table=\"PERSON\">\n"
+#~ " <id name=\"id\"
column=\"PERSON_ID\">\n"
+#~ " <generator class=\"native\"/>\n"
+#~ " </id>\n"
+#~ " <property name=\"age\"/>\n"
+#~ " <property name=\"firstname\"/>\n"
+#~ " <property name=\"lastname\"/>\n"
+#~ "\n"
+#~ " <set name=\"events\"
table=\"PERSON_EVENT\">\n"
+#~ " <key column=\"PERSON_ID\"/>\n"
+#~ " <many-to-many column=\"EVENT_ID\"
class=\"events.Event\"/>\n"
+#~ " </set>\n"
+#~ "\n"
+#~ "</class>"
+#, fuzzy
#~ msgid ""
-#~ "Place <literal>HibernateUtil.java</literal> in the development
source "
-#~ "directory, in a package next to <literal>events</literal>:"
+#~ "<![CDATA[\n"
+#~ " _____________ __________________\n"
+#~ " | | | | _____________\n"
+#~ " | EVENTS | | PERSON_EVENT | | |\n"
+#~ " |_____________| |__________________| | PERSON |\n"
+#~ " | | | | |_____________|\n"
+#~ " | *EVENT_ID | <--> | *EVENT_ID | | |\n"
+#~ " | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n"
+#~ " | TITLE | |__________________| | AGE |\n"
+#~ " |_____________| | FIRSTNAME |\n"
+#~ " | LASTNAME |\n"
+#~ " |_____________|\n"
+#~ " ]]>"
#~ msgstr ""
-#~ "把<literal>HibernateUtil.java</literal>放在开发目录的源代码路径下,与放"
-#~ "<literal>events</literal>的包并列:"
+#~ "_____________ __________________\n"
+#~ " | | | | _____________\n"
+#~ " | EVENTS | | PERSON_EVENT | | |\n"
+#~ " |_____________| |__________________| | PERSON |\n"
+#~ " | | | | |_____________|\n"
+#~ " | *EVENT_ID | <--> | *EVENT_ID | |
|\n"
+#~ " | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID
|\n"
+#~ " | TITLE | |__________________| | AGE |\n"
+#~ " |_____________| | FIRSTNAME |\n"
+#~ " | LASTNAME |\n"
+#~ " |_____________|"
+#, fuzzy
#~ msgid ""
-#~ "To run this first routine we have to add a callable target to the Ant "
-#~ "build file:"
+#~ "<![CDATA[ private void addPersonToEvent(Long personId, Long eventId)
"
+#~ "{\n"
+#~ " Session session = HibernateUtil.getSessionFactory()."
+#~ "getCurrentSession();\n"
+#~ " session.beginTransaction();\n"
+#~ "\n"
+#~ " Person aPerson = (Person) session.load(Person.class, personId);\n"
+#~ " Event anEvent = (Event) session.load(Event.class, eventId);\n"
+#~ " aPerson.getEvents().add(anEvent);\n"
+#~ "\n"
+#~ " session.getTransaction().commit();\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "为第一次运行我们的程序,我们得在Ant的build文件中增加一个可以调用得到的"
-#~ "target。"
+#~ "private void addPersonToEvent(Long personId, Long eventId) {\n"
+#~ "\n"
+#~ " Session session = HibernateUtil.getSessionFactory().getCurrentSession"
+#~ "();\n"
+#~ " session.beginTransaction();\n"
+#~ "\n"
+#~ " Person aPerson = (Person) session.load(Person.class, personId);\n"
+#~ " Event anEvent = (Event) session.load(Event.class, eventId);\n"
+#~ "\n"
+#~ " aPerson.getEvents().add(anEvent);\n"
+#~ "\n"
+#~ " session.getTransaction().commit();\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "The value of the <literal>action</literal> argument is set on the
command "
-#~ "line when calling the target:"
+#~ "<![CDATA[ private void addPersonToEvent(Long personId, Long eventId)
"
+#~ "{\n"
+#~ " Session session = HibernateUtil.getSessionFactory()."
+#~ "getCurrentSession();\n"
+#~ " session.beginTransaction();\n"
+#~ "\n"
+#~ " Person aPerson = (Person) session\n"
+#~ " .createQuery(\"select p from Person p left join fetch
p."
+#~ "events where p.id = :pid\")\n"
+#~ " .setParameter(\"pid\", personId)\n"
+#~ " .uniqueResult(); // Eager fetch the collection so we can "
+#~ "use it detached\n"
+#~ " Event anEvent = (Event) session.load(Event.class, eventId);\n"
+#~ "\n"
+#~ " session.getTransaction().commit();\n"
+#~ "\n"
+#~ " // End of first unit of work\n"
+#~ "\n"
+#~ " aPerson.getEvents().add(anEvent); // aPerson (and its collection)
"
+#~ "is detached\n"
+#~ "\n"
+#~ " // Begin second unit of work\n"
+#~ "\n"
+#~ " Session session2 = HibernateUtil.getSessionFactory()."
+#~ "getCurrentSession();\n"
+#~ " session2.beginTransaction();\n"
+#~ " session2.update(aPerson); // Reattachment of aPerson\n"
+#~ "\n"
+#~ " session2.getTransaction().commit();\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "<literal>action</literal>参数(argument)的值是通过命令行调用这个target的"
-#~ "时候设置的:"
+#~ "private void addPersonToEvent(Long personId, Long eventId) {\n"
+#~ "\n"
+#~ " Session session = HibernateUtil.getSessionFactory().getCurrentSession"
+#~ "();\n"
+#~ " session.beginTransaction();\n"
+#~ "\n"
+#~ " Person aPerson = (Person) session\n"
+#~ " .createQuery(\"select p from Person p left join fetch p."
+#~ "events where p.id = :pid\")\n"
+#~ " .setParameter(\"pid\", personId)\n"
+#~ " .uniqueResult(); // Eager fetch the collection so we can use "
+#~ "it detached\n"
+#~ "\n"
+#~ " Event anEvent = (Event) session.load(Event.class, eventId);\n"
+#~ "\n"
+#~ " session.getTransaction().commit();\n"
+#~ "\n"
+#~ " // End of first unit of work\n"
+#~ "\n"
+#~ " aPerson.getEvents().add(anEvent); // aPerson (and its collection) is "
+#~ "detached\n"
+#~ "\n"
+#~ " // Begin second unit of work\n"
+#~ "\n"
+#~ " Session session2 =
HibernateUtil.getSessionFactory().getCurrentSession"
+#~ "();\n"
+#~ " session2.beginTransaction();\n"
+#~ "\n"
+#~ " session2.update(aPerson); // Reattachment of aPerson\n"
+#~ "\n"
+#~ " session2.getTransaction().commit();\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "This is the <literal>INSERT</literal> executed by Hibernate, the
question "
-#~ "marks represent JDBC bind parameters. To see the values bound as "
-#~ "arguments, or to reduce the verbosity of the log, check your "
-#~ "<literal>log4j.properties</literal>."
+#~ "<![CDATA[ else if (args[0].equals(\"addpersontoevent\"))
{\n"
+#~ " Long eventId = mgr.createAndStoreEvent(\"My Event\", new
Date"
+#~ "());\n"
+#~ " Long personId = mgr.createAndStorePerson(\"Foo\",
\"Bar\");\n"
+#~ " mgr.addPersonToEvent(personId, eventId);\n"
+#~ " System.out.println(\"Added person \" + personId + \"
to event "
+#~ "\" + eventId);\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "这是Hibernate执行的<literal>INSERT</literal>命令,问号代表JDBC的绑定参数。"
-#~ "如果想要看到绑定参数的值或者减少日志的长度,就要调整你在<literal>log4j."
-#~ "properties</literal>文件里的设置。"
+#~ "else if (args[0].equals(\"addpersontoevent\")) {\n"
+#~ " Long eventId = mgr.createAndStoreEvent(\"My Event\", new
Date());\n"
+#~ " Long personId = mgr.createAndStorePerson(\"Foo\",
\"Bar\");\n"
+#~ " mgr.addPersonToEvent(personId, eventId);\n"
+#~ " System.out.println(\"Added person \" + personId + \" to event
\" + "
+#~ "eventId);\n"
+#~ "}"
-#~ msgid "Now, to execute and test all of this, follow these steps:"
-#~ msgstr "现在,根据以下步骤来执行并测试以上各项:"
-
+#, fuzzy
#~ msgid ""
-#~ "Run <literal>ant run -Daction=store</literal> to store something
into the "
-#~ "database and, of course, to generate the database schema before through "
-#~ "hbm2ddl."
+#~ "<![CDATA[ private Set emailAddresses = new HashSet();\n"
+#~ "\n"
+#~ " public Set getEmailAddresses() {\n"
+#~ " return emailAddresses;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void setEmailAddresses(Set emailAddresses) {\n"
+#~ " this.emailAddresses = emailAddresses;\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "运行<literal>ant run -Daction=store</literal>来保存一些内容到数据库。当"
-#~ "然,先得用hbm2ddl来生成数据库schema。"
+#~ "private Set emailAddresses = new HashSet();\n"
+#~ "\n"
+#~ "public Set getEmailAddresses() {\n"
+#~ " return emailAddresses;\n"
+#~ "}\n"
+#~ "\n"
+#~ "public void setEmailAddresses(Set emailAddresses) {\n"
+#~ " this.emailAddresses = emailAddresses;\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "Now disable hbm2ddl by commenting out the property in your "
-#~ "<literal>hibernate.cfg.xml</literal> file. Usually you only leave it
"
-#~ "turned on in continous unit testing, but another run of hbm2ddl would "
-#~ "<emphasis>drop</emphasis> everything you have stored - the "
-#~ "<literal>create</literal> configuration setting actually translates
into "
-#~ "\"drop all tables from the schema, then re-create all tables, when the
"
-#~ "SessionFactory is build\"."
+#~ "<![CDATA[ <set name=\"emailAddresses\"
table=\"PERSON_EMAIL_ADDR"
+#~ "\">\n"
+#~ " <key column=\"PERSON_ID\"/>\n"
+#~ " <element type=\"string\"
column=\"EMAIL_ADDR\"/>\n"
+#~ " </set>]]>"
#~ msgstr ""
-#~ "现在把<literal>hibernate.cfg.xml</literal>文件中hbm2ddl属性注释掉,这样我"
-#~ "们就取消了在启动时用hbm2ddl来生成数据库schema。通常只有在不断重复进行单元"
-#~ "测试的时候才需要打开它,但再次运行hbm2ddl会把你保存的一切都删掉"
-#~
"(<emphasis>drop</emphasis>)——<literal>create</literal>配置的真实含义"
-#~ "是:“在创建SessionFactory的时候,从schema 中drop 掉所有的表,再重新创建它"
-#~ "们”。"
+#~ "<set name=\"emailAddresses\"
table=\"PERSON_EMAIL_ADDR\">\n"
+#~ " <key column=\"PERSON_ID\"/>\n"
+#~ " <element type=\"string\"
column=\"EMAIL_ADDR\"/>\n"
+#~ "</set>"
+#, fuzzy
#~ msgid ""
-#~ "If you now call Ant with <literal>-Daction=list</literal>, you
should see "
-#~ "the events you have stored so far. You can of course also call the "
-#~ "<literal>store</literal> action a few times more."
+#~ "<![CDATA[\n"
+#~ " _____________ __________________\n"
+#~ " | | | | _____________\n"
+#~ " | EVENTS | | PERSON_EVENT | | | "
+#~ "___________________\n"
+#~ " |_____________| |__________________| | PERSON | "
+#~ "| |\n"
+#~ " | | | | |_____________| | "
+#~ "PERSON_EMAIL_ADDR |\n"
+#~ " | *EVENT_ID | <--> | *EVENT_ID | | |
|"
+#~ "___________________|\n"
+#~ " | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <-->
| "
+#~ "*PERSON_ID |\n"
+#~ " | TITLE | |__________________| | AGE | | "
+#~ "*EMAIL_ADDR |\n"
+#~ " |_____________| | FIRSTNAME | |"
+#~ "___________________|\n"
+#~ " | LASTNAME |\n"
+#~ " |_____________|\n"
+#~ " ]]>"
#~ msgstr ""
-#~ "如果你现在使用命令行参数<literal>-Daction=list</literal>运行Ant,你会看到"
-#~ "那些至今为止我们所储存的events。当然,你也可以多调用几次<literal>store</"
-#~ "literal>以保存更多的envents。"
+#~ "_____________ __________________\n"
+#~ " | | | | _____________\n"
+#~ " | EVENTS | | PERSON_EVENT | | | "
+#~ "___________________\n"
+#~ " |_____________| |__________________| | PERSON | "
+#~ "| |\n"
+#~ " | | | | |_____________| | "
+#~ "PERSON_EMAIL_ADDR |\n"
+#~ " | *EVENT_ID | <--> | *EVENT_ID | |
"
+#~ "| |___________________|\n"
+#~ " | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |
"
+#~ "<--> | *PERSON_ID |\n"
+#~ " | TITLE | |__________________| | AGE | | "
+#~ "*EMAIL_ADDR |\n"
+#~ " |_____________| | FIRSTNAME | |"
+#~ "___________________|\n"
+#~ " | LASTNAME |\n"
+#~ " |_____________|"
+#, fuzzy
#~ msgid ""
-#~ "Note: Most new Hibernate users fail at this point and we see questions "
-#~ "about <emphasis>Table not found</emphasis> error messages regularly.
"
-#~ "However, if you follow the steps outlined above you will not have this "
-#~ "problem, as hbm2ddl creates the database schema on the first run, and "
-#~ "subsequent application restarts will use this schema. If you change the "
-#~ "mapping and/or database schema, you have to re-enable hbm2ddl once again."
+#~ "<![CDATA[ private void addEmailToPerson(Long personId, String "
+#~ "emailAddress) {\n"
+#~ " Session session = HibernateUtil.getSessionFactory()."
+#~ "getCurrentSession();\n"
+#~ " session.beginTransaction();\n"
+#~ "\n"
+#~ " Person aPerson = (Person) session.load(Person.class, personId);\n"
+#~ " // adding to the emailAddress collection might trigger a lazy "
+#~ "load of the collection\n"
+#~ " aPerson.getEmailAddresses().add(emailAddress);\n"
+#~ "\n"
+#~ " session.getTransaction().commit();\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "注意,很多Hibernate新手在这一步会失败,我们不时看到关于<emphasis>Table "
-#~ "not found</emphasis>错误信息的提问。但是,只要你根据上面描述的步骤来执行,"
-#~ "就不会有这个问题,因为hbm2ddl会在第一次运行的时候创建数据库schema,后继的"
-#~ "应用程序重起后还能继续使用这个schema。假若你修改了映射,或者修改了数据库"
-#~ "schema,你必须把hbm2ddl重新打开一次。"
+#~ "private void addEmailToPerson(Long personId, String emailAddress) {\n"
+#~ "\n"
+#~ " Session session = HibernateUtil.getSessionFactory().getCurrentSession"
+#~ "();\n"
+#~ " session.beginTransaction();\n"
+#~ "\n"
+#~ " Person aPerson = (Person) session.load(Person.class, personId);\n"
+#~ "\n"
+#~ " // The getEmailAddresses() might trigger a lazy load of the "
+#~ "collection\n"
+#~ " aPerson.getEmailAddresses().add(emailAddress);\n"
+#~ "\n"
+#~ " session.getTransaction().commit();\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "Create a new mapping file called <literal>Person.hbm.xml</literal>
(don't "
-#~ "forget the DTD reference at the top):"
+#~ "<![CDATA[ private Set participants = new HashSet();\n"
+#~ "\n"
+#~ " public Set getParticipants() {\n"
+#~ " return participants;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void setParticipants(Set participants) {\n"
+#~ " this.participants = participants;\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "创建一个名为<literal>Person.hbm.xml</literal>的新映射文件(别忘了最上面的"
-#~ "DTD引用):"
+#~ "private Set participants = new HashSet();\n"
+#~ "\n"
+#~ "public Set getParticipants() {\n"
+#~ " return participants;\n"
+#~ "}\n"
+#~ "\n"
+#~ "public void setParticipants(Set participants) {\n"
+#~ " this.participants = participants;\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "We need a unidirectional, many-valued associations, implemented with a "
-#~ "<literal>Set</literal>. Let's write the code for this in the
Java classes "
-#~ "and then map it:"
+#~ "<![CDATA[ <set name=\"participants\"
table=\"PERSON_EVENT\" "
+#~ "inverse=\"true\">\n"
+#~ " <key column=\"EVENT_ID\"/>\n"
+#~ " <many-to-many column=\"PERSON_ID\"
class=\"events.Person\"/>\n"
+#~ " </set>]]>"
#~ msgstr ""
-#~ "我们需要用set 实现一个单向多值关联。让我们在Java类里为这个关联编码,接着映"
-#~ "射它:"
+#~ "<set name=\"participants\" table=\"PERSON_EVENT\"
inverse=\"true"
+#~ "\">\n"
+#~ " <key column=\"EVENT_ID\"/>\n"
+#~ " <many-to-many column=\"PERSON_ID\"
class=\"events.Person\"/>\n"
+#~ "</set>"
+#, fuzzy
#~ msgid ""
-#~ "We add a collection of value typed objects to the
<literal>Person</"
-#~ "literal> entity. We want to store email addresses, so the type we use is
"
-#~ "<literal>String</literal>, and the collection is again a
<literal>Set</"
-#~ "literal>:"
+#~ "<![CDATA[ protected Set getEvents() {\n"
+#~ " return events;\n"
+#~ " }\n"
+#~ "\n"
+#~ " protected void setEvents(Set events) {\n"
+#~ " this.events = events;\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void addToEvent(Event event) {\n"
+#~ " this.getEvents().add(event);\n"
+#~ " event.getParticipants().add(this);\n"
+#~ " }\n"
+#~ "\n"
+#~ " public void removeFromEvent(Event event) {\n"
+#~ " this.getEvents().remove(event);\n"
+#~ " event.getParticipants().remove(this);\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "我们把一个值类型对象的集合加入<literal>Person</literal>实体中。我们希望保"
-#~ "存email地址,所以使用<literal>String</literal>类型,而且这次的集合类型又是"
-#~ "<literal>Set</literal>:"
+#~ "protected Set getEvents() {\n"
+#~ " return events;\n"
+#~ "}\n"
+#~ "\n"
+#~ "protected void setEvents(Set events) {\n"
+#~ " this.events = events;\n"
+#~ "}\n"
+#~ "\n"
+#~ "public void addToEvent(Event event) {\n"
+#~ " this.getEvents().add(event);\n"
+#~ " event.getParticipants().add(this);\n"
+#~ "}\n"
+#~ "\n"
+#~ "public void removeFromEvent(Event event) {\n"
+#~ " this.getEvents().remove(event);\n"
+#~ " event.getParticipants().remove(this);\n"
+#~ "}"
-#~ msgid "Let's turn this into a small web application."
-#~ msgstr "让我们把进入一个小型的web应用程序。"
-
+#, fuzzy
#~ msgid ""
-#~ "Create a new class in your source directory, in the
<literal>events</"
-#~ "literal> package:"
-#~ msgstr "在你的源代码目录的<literal>events</literal>包中创建一个新的类:"
+#~ "<![CDATA[package org.hibernate.tutorial.web;\n"
+#~ "\n"
+#~ "// Imports\n"
+#~ "\n"
+#~ "public class EventManagerServlet extends HttpServlet {\n"
+#~ "\n"
+#~ " protected void doGet(\n"
+#~ " HttpServletRequest request,\n"
+#~ " HttpServletResponse response) throws ServletException, "
+#~ "IOException {\n"
+#~ "\n"
+#~ " SimpleDateFormat dateFormatter = new SimpleDateFormat(
\"dd.MM."
+#~ "yyyy\" );\n"
+#~ "\n"
+#~ " try {\n"
+#~ " // Begin unit of work\n"
+#~ " HibernateUtil.getSessionFactory().getCurrentSession()."
+#~ "beginTransaction();\n"
+#~ "\n"
+#~ " // Process request and render page...\n"
+#~ "\n"
+#~ " // End unit of work\n"
+#~ " HibernateUtil.getSessionFactory().getCurrentSession()."
+#~ "getTransaction().commit();\n"
+#~ " }\n"
+#~ " catch (Exception ex) {\n"
+#~ " HibernateUtil.getSessionFactory().getCurrentSession()."
+#~ "getTransaction().rollback();\n"
+#~ " if ( ServletException.class.isInstance( ex ) ) {\n"
+#~ " throw ( ServletException ) ex;\n"
+#~ " }\n"
+#~ " else {\n"
+#~ " throw new ServletException( ex );\n"
+#~ " }\n"
+#~ " }\n"
+#~ " }\n"
+#~ "\n"
+#~ "}]]>"
+#~ msgstr ""
+#~ "protected void doGet(HttpServletRequest request,\n"
+#~ " HttpServletResponse response)\n"
+#~ " throws ServletException, IOException {\n"
+#~ "\n"
+#~ " SimpleDateFormat dateFormatter = new
SimpleDateFormat(\"dd.MM.yyyy"
+#~ "\");\n"
+#~ "\n"
+#~ " try {\n"
+#~ " // Begin unit of work\n"
+#~ " HibernateUtil.getSessionFactory()\n"
+#~ " .getCurrentSession().beginTransaction();\n"
+#~ "\n"
+#~ " // Process request and render page...\n"
+#~ "\n"
+#~ " // End unit of work\n"
+#~ " HibernateUtil.getSessionFactory()\n"
+#~ " .getCurrentSession().getTransaction().commit();\n"
+#~ "\n"
+#~ " } catch (Exception ex) {\n"
+#~ " HibernateUtil.getSessionFactory()\n"
+#~ " .getCurrentSession().getTransaction().rollback();\n"
+#~ " throw new ServletException(ex);\n"
+#~ " }\n"
+#~ "\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "To deploy this application you have to create a web archive, a WAR. Add "
-#~ "the following Ant target to your
<literal>build.xml</literal>:"
+#~ "<![CDATA[ // Write HTML header\n"
+#~ " PrintWriter out = response.getWriter();\n"
+#~ " out.println(\"<html><head><title>Event
Manager</title></"
+#~ "head><body>\");\n"
+#~ "\n"
+#~ " // Handle actions\n"
+#~ " if (
\"store\".equals(request.getParameter(\"action\")) ) {\n"
+#~ "\n"
+#~ " String eventTitle =
request.getParameter(\"eventTitle\");\n"
+#~ " String eventDate =
request.getParameter(\"eventDate\");\n"
+#~ "\n"
+#~ " if ( \"\".equals(eventTitle) ||
\"\".equals(eventDate) ) {\n"
+#~ " out.println(\"<b><i>Please enter event title
and date.</"
+#~ "i></b>\");\n"
+#~ " }\n"
+#~ " else {\n"
+#~ " createAndStoreEvent(eventTitle, dateFormatter.parse"
+#~ "(eventDate));\n"
+#~ " out.println(\"<b><i>Added
event.</i></b>\");\n"
+#~ " }\n"
+#~ " }\n"
+#~ "\n"
+#~ " // Print page\n"
+#~ " printEventForm(out);\n"
+#~ " listEvents(out, dateFormatter);\n"
+#~ "\n"
+#~ " // Write HTML footer\n"
+#~ " out.println(\"</body></html>\");\n"
+#~ " out.flush();\n"
+#~ " out.close();]]>"
#~ msgstr ""
-#~ "要发布这个程序,你得把它打成web发布包:WAR文件。把下面的脚本加入到你的"
-#~ "<literal>build.xml</literal>中:"
+#~ "// Write HTML header\n"
+#~ "PrintWriter out = response.getWriter();\n"
+#~
"out.println(\"<html><head><title>Event
Manager</"
+#~ "title></head><body>\");\n"
+#~ "\n"
+#~ "// Handle actions\n"
+#~ "if ( \"store\".equals(request.getParameter(\"action\")) )
{\n"
+#~ "\n"
+#~ " String eventTitle = request.getParameter(\"eventTitle\");\n"
+#~ " String eventDate = request.getParameter(\"eventDate\");\n"
+#~ "\n"
+#~ " if ( \"\".equals(eventTitle) || \"\".equals(eventDate) )
{\n"
+#~ " out.println(\"<b><i>Please enter event
title and date."
+#~ "</i></b>\");\n"
+#~ " } else {\n"
+#~ " createAndStoreEvent(eventTitle,
dateFormatter.parse(eventDate));\n"
+#~ " out.println(\"<b><i>Added
event.</i></b>"
+#~ "\");\n"
+#~ " }\n"
+#~ "}\n"
+#~ "\n"
+#~ "// Print page\n"
+#~ "printEventForm(out);\n"
+#~ "listEvents(out, dateFormatter);\n"
+#~ "\n"
+#~ "// Write HTML footer\n"
+#~ "out.println(\"</body></html>\");\n"
+#~ "out.flush();\n"
+#~ "out.close();"
+#, fuzzy
#~ msgid ""
-#~ "This target creates a file called
<literal>hibernate-tutorial.war</"
-#~ "literal> in your project directory. It packages all libraries and the "
-#~ "<literal>web.xml</literal> descriptor, which is expected in the base
"
-#~ "directory of your project:"
+#~ "<![CDATA[ private void printEventForm(PrintWriter out) {\n"
+#~ " out.println(\"<h2>Add new event:</h2>\");\n"
+#~ " out.println(\"<form>\");\n"
+#~ " out.println(\"Title: <input name='eventTitle'
length='50'/><br/>"
+#~ "\");\n"
+#~ " out.println(\"Date (e.g. 24.12.2009): <input
name='eventDate' "
+#~ "length='10'/><br/>\");\n"
+#~ " out.println(\"<input type='submit' name='action'
value='store'/>"
+#~ "\");\n"
+#~ " out.println(\"</form>\");\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "这段代码在你的开发目录中创建一个<literal>hibernate-tutorial.war</literal>"
-#~ "的文件。它把所有的类库和<literal>web.xml</literal>描述文件都打包进去,web."
-#~ "xml 文件应该位于你的开发根目录中:"
+#~ "private void printEventForm(PrintWriter out) {\n"
+#~ " out.println(\"<h2>Add new
event:</h2>\");\n"
+#~ " out.println(\"<form>\");\n"
+#~ " out.println(\"Title: <input name='eventTitle'
length='50'/><"
+#~ "br/>\");\n"
+#~ " out.println(\"Date (e.g. 24.12.2009): <input
name='eventDate' "
+#~ "length='10'/><br/>\");\n"
+#~ " out.println(\"<input type='submit' name='action'
value='store'/>"
+#~ "\");\n"
+#~ " out.println(\"</form>\");\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "Before you compile and deploy the web application, note that an "
-#~ "additional library is required: <literal>jsdk.jar</literal>. This is
the "
-#~ "Java servlet development kit, if you don't have this library already, get
"
-#~ "it from the Sun website and copy it to your library directory. However, "
-#~ "it will be only used for compliation and excluded from the WAR package."
+#~ "<![CDATA[ private void listEvents(PrintWriter out, SimpleDateFormat
"
+#~ "dateFormatter) {\n"
+#~ "\n"
+#~ " List result = HibernateUtil.getSessionFactory()\n"
+#~ "
.getCurrentSession().createCriteria(Event.class).list();\n"
+#~ " if (result.size() > 0) {\n"
+#~ " out.println(\"<h2>Events in
database:</h2>\");\n"
+#~ " out.println(\"<table
border='1'>\");\n"
+#~ " out.println(\"<tr>\");\n"
+#~ " out.println(\"<th>Event
title</th>\");\n"
+#~ " out.println(\"<th>Event date</th>\");\n"
+#~ " out.println(\"</tr>\");\n"
+#~ " Iterator it = result.iterator();\n"
+#~ " while (it.hasNext()) {\n"
+#~ " Event event = (Event) it.next();\n"
+#~ " out.println(\"<tr>\");\n"
+#~ " out.println(\"<td>\" + event.getTitle() +
\"</td>\");\n"
+#~ " out.println(\"<td>\" +
dateFormatter.format(event.getDate"
+#~ "()) + \"</td>\");\n"
+#~ " out.println(\"</tr>\");\n"
+#~ " }\n"
+#~ " out.println(\"</table>\");\n"
+#~ " }\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "请注意在你编译和部署web应用程之前,需要一个附加的类库:<literal>jsdk.jar</"
-#~ "literal>。这是Java Servlet开发包,假若你还没有,可以从Sun网站上下载,把它"
-#~ "copy到你的lib目录。但是,它仅仅是在编译时需要,不会被打入WAR包。"
+#~ "private void listEvents(PrintWriter out, SimpleDateFormat dateFormatter) "
+#~ "{\n"
+#~ "\n"
+#~ " List result = HibernateUtil.getSessionFactory()\n"
+#~ " .getCurrentSession().createCriteria(Event.class).list"
+#~ "();\n"
+#~ " if (result.size() > 0) {\n"
+#~ " out.println(\"<h2>Events in
database:</h2>\");\n"
+#~ " out.println(\"<table
border='1'>\");\n"
+#~ " out.println(\"<tr>\");\n"
+#~ " out.println(\"<th>Event
title</th>\");\n"
+#~ " out.println(\"<th>Event
date</th>\");\n"
+#~ " out.println(\"</tr>\");\n"
+#~ " for (Iterator it = result.iterator(); it.hasNext();) {\n"
+#~ " Event event = (Event) it.next();\n"
+#~ " out.println(\"<tr>\");\n"
+#~ " out.println(\"<td>\" + event.getTitle() +
\"</td>"
+#~ "\");\n"
+#~ " out.println(\"<td>\" +
dateFormatter.format(event."
+#~ "getDate()) + \"</td>\");\n"
+#~ " out.println(\"</tr>\");\n"
+#~ " }\n"
+#~ " out.println(\"</table>\");\n"
+#~ " }\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "If you already feel confident with Hibernate, continue browsing through "
-#~ "the reference documentation table of contents for topics you find "
-#~ "interesting - most asked are transactional processing (<xref linkend="
-#~ "\"transactions\"/>), fetch performance (<xref
linkend=\"performance\"/>), "
-#~ "or the usage of the API (<xref linkend=\"objectstate\"/>) and
the query "
-#~ "features (<xref linkend=\"objectstate-querying\"/>)."
+#~ "<![CDATA[ protected void createAndStoreEvent(String title, Date "
+#~ "theDate) {\n"
+#~ " Event theEvent = new Event();\n"
+#~ " theEvent.setTitle(title);\n"
+#~ " theEvent.setDate(theDate);\n"
+#~ "\n"
+#~ " HibernateUtil.getSessionFactory()\n"
+#~ " .getCurrentSession().save(theEvent);\n"
+#~ " }]]>"
#~ msgstr ""
-#~ "如果你已经对Hibernate感到自信,通过开发指南目录,继续浏览你感兴趣的内容-"
-#~ "那些会被问到的问题大多是事务处理 (<xref linkend=\"transactions\"/>),抓取"
-#~ "(fetch)的效率 (<xref linkend=\"performance\"/>),或者API的使用 (<xref
"
-#~ "linkend=\"objectstate\"/>)和查询的特性(<xref
linkend=\"objectstate-"
-#~ "querying\"/>)。"
+#~ "protected void createAndStoreEvent(String title, Date theDate) {\n"
+#~ " Event theEvent = new Event();\n"
+#~ " theEvent.setTitle(title);\n"
+#~ " theEvent.setDate(theDate);\n"
+#~ "\n"
+#~ " HibernateUtil.getSessionFactory()\n"
+#~ " .getCurrentSession().save(theEvent);\n"
+#~ "}"
+#, fuzzy
#~ msgid ""
-#~ "Don't forget to check the Hibernate website for more (specialized) "
-#~ "tutorials."
-#~ msgstr "别忘了去Hibernate的网站查看更多(有针对性的)示例。"
+#~ "<![CDATA[<?xml version=\"1.0\"
encoding=\"UTF-8\"?>\n"
+#~ "<web-app version=\"2.4\"\n"
+#~ "
xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n"
+#~ "
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+#~ "
xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee
http://java.sun."
+#~ "com/xml/ns/j2ee/web-app_2_4.xsd\">\n"
+#~ "\n"
+#~ " <servlet>\n"
+#~ " <servlet-name>Event Manager</servlet-name>\n"
+#~ "
<servlet-class>org.hibernate.tutorial.web.EventManagerServlet</"
+#~ "servlet-class>\n"
+#~ " </servlet>\n"
+#~ "\n"
+#~ " <servlet-mapping>\n"
+#~ " <servlet-name>Event Manager</servlet-name>\n"
+#~ " <url-pattern>/eventmanager</url-pattern>\n"
+#~ " </servlet-mapping>\n"
+#~ "</web-app>]]>"
+#~ msgstr ""
+#~ "<?xml version=\"1.0\"
encoding=\"UTF-8\"?>\n"
+#~ "<web-app version=\"2.4\"\n"
+#~ "
xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n"
+#~ "
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+#~ "
xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee\n"
+#~ "
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\">\n"
+#~ "\n"
+#~ " <servlet>\n"
+#~ " <servlet-name>Event
Manager</servlet-name>\n"
+#~ "
<servlet-class>events.EventManagerServlet</servlet-"
+#~ "class>\n"
+#~ " </servlet>\n"
+#~ "\n"
+#~ " <servlet-mapping>\n"
+#~ " <servlet-name>Event
Manager</servlet-name>\n"
+#~ "
<url-pattern>/eventmanager</url-pattern>\n"
+#~ " </servlet-mapping>\n"
+#~ "</web-app>"
+
Modified:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/xml.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/xml.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/content/xml.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,432 +1,441 @@
+# translation of Collection_Mapping.po to
+# Xi Huang <xhuang(a)redhat.com>, 2006.
+# Xi HUANG <xhuang(a)redhat.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-10 21:02+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
+"POT-Creation-Date: 2009-12-03T00:15:27\n"
+"PO-Revision-Date: 2009-12-07 21:18+1000\n"
+"Last-Translator: Xi HUANG <xhuang(a)redhat.com>\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
-#: xml.xml:29
#, no-c-format
msgid "XML Mapping"
-msgstr "XML映射"
+msgstr "XML 映射"
-#. Tag: emphasis
-#: xml.xml:31
-#, fuzzy, no-c-format
-msgid ""
-"XML Mapping is an experimental feature in Hibernate 3.0 and is currently "
-"under active development."
-msgstr "注意这是Hibernate 3.0的一个实验性的特性。这一特性仍在积极开发中。"
+#. Tag: para
+#, no-c-format
+msgid "<emphasis> XML Mapping is an experimental feature in Hibernate 3.0 and
is currently under active development. </emphasis>"
+msgstr "<emphasis>注意 XML 映射只是 Hibernate 3.0
的一个实验性的特性。这一特性仍在积极开发中。</emphasis>"
#. Tag: title
-#: xml.xml:37
#, no-c-format
msgid "Working with XML data"
-msgstr "用XML数据进行工作"
+msgstr "用 XML 数据进行工作"
#. Tag: para
-#: xml.xml:39
-#, fuzzy, no-c-format
-msgid ""
-"Hibernate allows you to work with persistent XML data in much the same way "
-"you work with persistent POJOs. A parsed XML tree can be thought of as "
-"another way of representing the relational data at the object level, instead
"
-"of POJOs."
-msgstr ""
-"Hibernate使得你可以用XML数据来进行工作,恰如你用持久化的POJO进行工作那样。解"
-"析过的XML树 可以被认为是代替POJO的另外一种在对象层面上表示关系型数据的途径."
+#, no-c-format
+msgid "Hibernate allows you to work with persistent XML data in much the same way
you work with persistent POJOs. A parsed XML tree can be thought of as another way of
representing the relational data at the object level, instead of POJOs."
+msgstr "Hibernate 使得你可以用 XML 数据来进行工作,恰如你用持久化的 POJO 进行工作那样。解析过的 XML 树 可以被认为是代替 POJO
的另外一种在对象层面上表示关系型数据的途径。"
#. Tag: para
-#: xml.xml:46
#, no-c-format
-msgid ""
-"Hibernate supports dom4j as API for manipulating XML trees. You can write "
-"queries that retrieve dom4j trees from the database and have any "
-"modification you make to the tree automatically synchronized to the "
-"database. You can even take an XML document, parse it using dom4j, and write
"
-"it to the database with any of Hibernate's basic operations:
<literal>persist"
-"(), saveOrUpdate(), merge(), delete(), replicate()</literal> (merging is not
"
-"yet supported)."
-msgstr ""
-"Hibernate支持采用dom4j作为操作XML树的API。你可以写一些查询从数据库中检索出 "
-"dom4j树,随后你对这颗树做的任何修改都将自动同步回数据库。你甚至可以用dom4j解"
-"析 一篇XML文档,然后使用Hibernate的任一基本操作将它写入数据库: "
-"<literal>persist(), saveOrUpdate(), merge(), delete(),
replicate()</literal> "
-"(合并操作merge()目前还不支持)。"
+msgid "Hibernate supports dom4j as API for manipulating XML trees. You can write
queries that retrieve dom4j trees from the database and have any modification you make to
the tree automatically synchronized to the database. You can even take an XML document,
parse it using dom4j, and write it to the database with any of Hibernate's basic
operations: <literal>persist(), saveOrUpdate(), merge(), delete(),
replicate()</literal> (merging is not yet supported)."
+msgstr "Hibernate 支持采用 dom4j 作为操作 XML 树的 API。你可以写一些查询从数据库中检索出 dom4j
树,随后你对这颗树做的任何修改都将自动同步回数据库。你甚至可以用 dom4j 解析 一篇 XML 文档,然后使用 Hibernate
的任一基本操作将它写入数据库:<literal>persist(),saveOrUpdate(),merge(),delete(),replicate()</literal>
(合并操作merge()目前还不支持)。"
#. Tag: para
-#: xml.xml:56
#, no-c-format
-msgid ""
-"This feature has many applications including data import/export, "
-"externalization of entity data via JMS or SOAP and XSLT-based reporting."
-msgstr ""
-"这一特性可以应用在很多场合,包括数据导入导出,通过JMS或SOAP具体化实体数据以"
-"及 基于XSLT的报表。"
+msgid "This feature has many applications including data import/export,
externalization of entity data via JMS or SOAP and XSLT-based reporting."
+msgstr "这一特性可以应用在很多场合,包括数据导入导出,通过 JMS 或 SOAP 具体化实体数据以及 基于 XSLT 的报表。"
#. Tag: para
-#: xml.xml:61
-#, fuzzy, no-c-format
-msgid ""
-"A single mapping can be used to simultaneously map properties of a class and
"
-"nodes of an XML document to the database, or, if there is no class to map, "
-"it can be used to map just the XML."
-msgstr ""
-"一个单一的映射就可以将类的属性和XML文档的节点同时映射到数据库。如果不需要映射"
-"类, 它也可以用来只映射XML文档。"
+#, no-c-format
+msgid "A single mapping can be used to simultaneously map properties of a class and
nodes of an XML document to the database, or, if there is no class to map, it can be used
to map just the XML."
+msgstr "一个单一的映射就可以将类的属性和 XML 文档的节点同时映射到数据库。如果不需要映射类,它也可以用来只映射 XML 文档。 "
#. Tag: title
-#: xml.xml:68
#, no-c-format
msgid "Specifying XML and class mapping together"
-msgstr "指定同时映射XML和类"
+msgstr "指定同时映射 XML 和类"
#. Tag: para
-#: xml.xml:70
#, no-c-format
msgid "Here is an example of mapping a POJO and XML simultaneously:"
-msgstr "这是一个同时映射POJO和XML的例子:"
+msgstr "这是一个同时映射 POJO 和 XML 的例子:"
-#. Tag: programlisting
-#: xml.xml:74
-#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Account\" \n"
-" table=\"ACCOUNTS\" \n"
-" node=\"account\">\n"
-" \n"
-" <id name=\"accountId\" \n"
-" column=\"ACCOUNT_ID\" \n"
-" node=\"@id\"/>\n"
-" \n"
-" <many-to-one name=\"customer\" \n"
-" column=\"CUSTOMER_ID\" \n"
-" node=\"customer/@id\" \n"
-" embed-xml=\"false\"/>\n"
-" \n"
-" <property name=\"balance\" \n"
-" column=\"BALANCE\" \n"
-" node=\"balance\"/>\n"
-" \n"
-" ...\n"
-" \n"
-"</class>]]>"
-msgstr ""
-
#. Tag: title
-#: xml.xml:78
#, no-c-format
msgid "Specifying only an XML mapping"
-msgstr "只定义XML映射"
+msgstr "只定义 XML 映射"
#. Tag: para
-#: xml.xml:80
#, no-c-format
msgid "Here is an example where there is no POJO class:"
-msgstr "这是一个不映射POJO的例子:"
+msgstr "这是一个不映射 POJO 的例子:"
-#. Tag: programlisting
-#: xml.xml:84
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[<class entity-name=\"Account\" \n"
-" table=\"ACCOUNTS\" \n"
-" node=\"account\">\n"
-" \n"
-" <id name=\"id\" \n"
-" column=\"ACCOUNT_ID\" \n"
-" node=\"@id\" \n"
-" type=\"string\"/>\n"
-" \n"
-" <many-to-one name=\"customerId\" \n"
-" column=\"CUSTOMER_ID\" \n"
-" node=\"customer/@id\" \n"
-" embed-xml=\"false\" \n"
-" entity-name=\"Customer\"/>\n"
-" \n"
-" <property name=\"balance\" \n"
-" column=\"BALANCE\" \n"
-" node=\"balance\" \n"
-" type=\"big_decimal\"/>\n"
-" \n"
-" ...\n"
-" \n"
-"</class>]]>"
-msgstr ""
+msgid "This mapping allows you to access the data as a dom4j tree, or as a graph of
property name/value pairs or java <literal>Map</literal>s. The property names
are purely logical constructs that can be referred to in HQL queries."
+msgstr "这个映射使得你既可以把数据作为一棵 dom4j 树那样访问,又可以作为由属性键值对(java
<literal>Map</literal>)组成的图那样访问。属性名字纯粹是逻辑上的结构,你可以在 HQL 查询中引用它。"
-#. Tag: para
-#: xml.xml:86
-#, fuzzy, no-c-format
-msgid ""
-"This mapping allows you to access the data as a dom4j tree, or as a graph of
"
-"property name/value pairs or java <literal>Map</literal>s. The property
"
-"names are purely logical constructs that can be referred to in HQL queries."
-msgstr ""
-"这个映射使得你既可以把数据作为一棵dom4j树那样访问,又可以作为由属性键值对"
-"(java <literal>Map</literal>s) 组成的图那样访问。属性名字纯粹是逻辑上的结构,"
-"你可以在HQL查询中引用它。"
-
#. Tag: title
-#: xml.xml:97
#, no-c-format
msgid "XML mapping metadata"
-msgstr "XML映射元数据"
+msgstr "XML 映射元数据"
#. Tag: para
-#: xml.xml:99
-#, fuzzy, no-c-format
-msgid ""
-"A range of Hibernate mapping elements accept the
<literal>node</literal> "
-"attribute. This lets you specify the name of an XML attribute or element "
-"that holds the property or entity data. The format of the
<literal>node</"
-"literal> attribute must be one of the following:"
-msgstr ""
-"许多Hibernate映射元素具有<literal>node</literal>属性。这使你可以指定用来保存 "
-"属性或实体数据的XML属性或元素。<literal>node</literal>属性必须是下列格式之"
-"一:"
+#, no-c-format
+msgid "A range of Hibernate mapping elements accept the
<literal>node</literal> attribute. This lets you specify the name of an XML
attribute or element that holds the property or entity data. The format of the
<literal>node</literal> attribute must be one of the following:"
+msgstr "许多 Hibernate 映射元素具有 <literal>node</literal> 属性。这使你可以指定用来保存
属性或实体数据的 XML 属性或元素。<literal>node</literal> 属性必须是下列格式之一: "
#. Tag: para
-#: xml.xml:108
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>\"element-name\"</literal>: map to the named
XML element"
-msgstr "<literal>\"element-name\"</literal> -
映射为指定的XML元素"
+msgstr "<literal>\"element-name\"</literal>:映射为指定的 XML
元素"
#. Tag: para
-#: xml.xml:111
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>\"@attribute-name\"</literal>: map to the
named XML attribute"
-msgstr "<literal>\"@attribute-name\"</literal> -
映射为指定的XML属性"
+msgstr "<literal>\"@attribute-name\"</literal>:映射为指定的 XML
属性"
#. Tag: para
-#: xml.xml:114
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>\".\"</literal>: map to the parent
element"
-msgstr "<literal>\".\"</literal> - 映射为父元素"
+msgstr "<literal>\".\"</literal>:映射为父元素"
#. Tag: para
-#: xml.xml:117
-#, fuzzy, no-c-format
-msgid ""
-"<literal>\"element-name/@attribute-name\"</literal>: map to
the named "
-"attribute of the named element"
-msgstr ""
-"<literal>\"element-name/@attribute-name\"</literal> -
映射为指定元素的指定属"
-"性"
+#, no-c-format
+msgid "<literal>\"element-name/@attribute-name\"</literal>:
map to the named attribute of the named element"
+msgstr
"<literal>\"element-name/@attribute-name\"</literal>:映射为指定元素的指定属性"
#. Tag: para
-#: xml.xml:124
-#, fuzzy, no-c-format
-msgid ""
-"For collections and single valued associations, there is an additional "
-"<literal>embed-xml</literal> attribute. If
<literal>embed-xml=\"true\"</"
-"literal>, the default, the XML tree for the associated entity (or collection
"
-"of value type) will be embedded directly in the XML tree for the entity that
"
-"owns the association. Otherwise, if
<literal>embed-xml=\"false\"</literal>, "
-"then only the referenced identifier value will appear in the XML for single "
-"point associations and collections will not appear at all."
-msgstr ""
-"对于集合和单值的关联,有一个额外的<literal>embed-xml</literal>属性可用。 这个"
-"属性的缺省值是真(<literal>embed-xml=\"true\"</literal>)。如果<literal>embed-"
-"xml=\"true\"</literal>, 则对应于被关联实体或值类型的集合的XML树将直接嵌入拥"
-"有这些关联的实体的XML树中。 否则,如果<literal>embed-xml=\"false\"</"
-"literal>,那么对于单值的关联,仅被引用的实体的标识符出现在 XML树中(被引用实体"
-"本身不出现),而集合则根本不出现。"
+#, no-c-format
+msgid "For collections and single valued associations, there is an additional
<literal>embed-xml</literal> attribute. If
<literal>embed-xml=\"true\"</literal>, the default, the XML tree for
the associated entity (or collection of value type) will be embedded directly in the XML
tree for the entity that owns the association. Otherwise, if
<literal>embed-xml=\"false\"</literal>, then only the referenced
identifier value will appear in the XML for single point associations and collections will
not appear at all."
+msgstr "对于集合和单值的关联,有一个额外的 <literal>embed-xml</literal>
属性可用。这个属性的缺省值是真(<literal>embed-xml=\"true\"</literal>)。如果
<literal>embed-xml=\"true\"</literal>,则对应于被关联实体或值类型的集合的XML树将直接嵌入拥有这些关联的实体的
XML 树中。否则,如果
<literal>embed-xml=\"false\"</literal>,那么对于单值的关联,仅被引用的实体的标识符出现在 XML
树中(被引用实体本身不出现),而集合则根本不出现。"
#. Tag: para
-#: xml.xml:134
-#, fuzzy, no-c-format
-msgid ""
-"Do not leave <literal>embed-xml=\"true\"</literal> for too
many "
-"associations, since XML does not deal well with circularity."
-msgstr ""
-"你应该小心,不要让太多关联的embed-xml属性为真(<literal>embed-xml=\"true\"</"
-"literal>),因为XML不能很好地处理 循环引用!"
-
-#. Tag: programlisting
-#: xml.xml:139
#, no-c-format
-msgid ""
-"<![CDATA[<class name=\"Customer\" \n"
-" table=\"CUSTOMER\" \n"
-" node=\"customer\">\n"
-" \n"
-" <id name=\"id\" \n"
-" column=\"CUST_ID\" \n"
-" node=\"@id\"/>\n"
-" \n"
-" <map name=\"accounts\" \n"
-" node=\".\" \n"
-" embed-xml=\"true\">\n"
-" <key column=\"CUSTOMER_ID\" \n"
-" not-null=\"true\"/>\n"
-" <map-key column=\"SHORT_DESC\" \n"
-" node=\"@short-desc\" \n"
-" type=\"string\"/>\n"
-" <one-to-many entity-name=\"Account\"\n"
-" embed-xml=\"false\" \n"
-" node=\"account\"/>\n"
-" </map>\n"
-" \n"
-" <component name=\"name\" \n"
-" node=\"name\">\n"
-" <property name=\"firstName\" \n"
-" node=\"first-name\"/>\n"
-" <property name=\"initial\" \n"
-" node=\"initial\"/>\n"
-" <property name=\"lastName\" \n"
-" node=\"last-name\"/>\n"
-" </component>\n"
-" \n"
-" ...\n"
-" \n"
-"</class>]]>"
-msgstr ""
+msgid "Do not leave <literal>embed-xml=\"true\"</literal> for
too many associations, since XML does not deal well with circularity."
+msgstr "你应该小心,不要让太多关联的 embed-xml
属性为真(<literal>embed-xml=\"true\"</literal>),因为 XML
不能很好地处理循环引用。"
#. Tag: para
-#: xml.xml:141
-#, fuzzy, no-c-format
-msgid ""
-"In this case, the collection of account ids is embedded, but not the actual "
-"account data. The following HQL query:"
-msgstr ""
-"在这个例子中,我们决定嵌入帐目号码(account id)的集合,但不嵌入实际的帐目数"
-"据。下面的HQL查询:"
-
-#. Tag: programlisting
-#: xml.xml:146
#, no-c-format
-msgid ""
-"<![CDATA[from Customer c left join fetch c.accounts where c.lastName like
:"
-"lastName]]>"
-msgstr ""
+msgid "In this case, the collection of account ids is embedded, but not the actual
account data. The following HQL query:"
+msgstr "在这个例子中,我们决定嵌入帐目号码(account id)的集合,但不嵌入实际的帐目数据。下面的 HQL 查询: "
#. Tag: para
-#: xml.xml:148
-#, fuzzy, no-c-format
+#, no-c-format
msgid "would return datasets such as this:"
-msgstr "返回的数据集将是这样:"
+msgstr "返回的数据集将是这样: "
-#. Tag: programlisting
-#: xml.xml:152
-#, no-c-format
-msgid ""
-"<![CDATA[<customer id=\"123456789\">\n"
-" <account
short-desc=\"Savings\">987632567</account>\n"
-" <account short-desc=\"Credit
Card\">985612323</account>\n"
-" <name>\n"
-" <first-name>Gavin</first-name>\n"
-" <initial>A</initial>\n"
-" <last-name>King</last-name>\n"
-" </name>\n"
-" ...\n"
-"</customer>]]>"
-msgstr ""
-
#. Tag: para
-#: xml.xml:154
#, no-c-format
-msgid ""
-"If you set <literal>embed-xml=\"true\"</literal> on the
<literal><one-to-"
-"many></literal> mapping, the data might look more like this:"
-msgstr ""
-"如果你把一对多映射<literal><one-to-many></literal>的embed-xml属性置为真"
-"(<literal>embed-xml=\"true\"</literal>), 则数据看上去就像这样:"
+msgid "If you set <literal>embed-xml=\"true\"</literal> on the
<literal><one-to-many></literal> mapping, the data might look
more like this:"
+msgstr "如果你把一对多映射 <literal><one-to-many></literal> 的
embed-xml
属性置为真(<literal>embed-xml=\"true\"</literal>),则数据看上去就像这样:"
-#. Tag: programlisting
-#: xml.xml:159
-#, no-c-format
-msgid ""
-"<![CDATA[<customer id=\"123456789\">\n"
-" <account id=\"987632567\"
short-desc=\"Savings\">\n"
-" <customer id=\"123456789\"/>\n"
-" <balance>100.29</balance>\n"
-" </account>\n"
-" <account id=\"985612323\" short-desc=\"Credit
Card\">\n"
-" <customer id=\"123456789\"/>\n"
-" <balance>-2370.34</balance>\n"
-" </account>\n"
-" <name>\n"
-" <first-name>Gavin</first-name>\n"
-" <initial>A</initial>\n"
-" <last-name>King</last-name>\n"
-" </name>\n"
-" ...\n"
-"</customer>]]>"
-msgstr ""
-
#. Tag: title
-#: xml.xml:165
#, no-c-format
msgid "Manipulating XML data"
-msgstr "操作XML数据"
+msgstr "操作 XML 数据"
#. Tag: para
-#: xml.xml:167
-#, fuzzy, no-c-format
-msgid ""
-"You can also re-read and update XML documents in the application. You can do
"
-"this by obtaining a dom4j session:"
-msgstr ""
-"让我们来读入和更新应用程序中的XML文档。通过获取一个dom4j会话可以做到这一点:"
-
-#. Tag: programlisting
-#: xml.xml:172
#, no-c-format
-msgid ""
-"<![CDATA[Document doc = ....;\n"
-" \n"
-"Session session = factory.openSession();\n"
-"Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
-"Transaction tx = session.beginTransaction();\n"
-"\n"
-"List results = dom4jSession\n"
-" .createQuery(\"from Customer c left join fetch c.accounts where c."
-"lastName like :lastName\")\n"
-" .list();\n"
-"for ( int i=0; i<results.size(); i++ ) {\n"
-" //add the customer data to the XML document\n"
-" Element customer = (Element) results.get(i);\n"
-" doc.add(customer);\n"
-"}\n"
-"\n"
-"tx.commit();\n"
-"session.close();]]>"
-msgstr ""
+msgid "You can also re-read and update XML documents in the application. You can do
this by obtaining a dom4j session:"
+msgstr "你也可以重新读入和更新应用程序中的 XML 文档。通过获取一个 dom4j 会话可以做到这一点:"
-#. Tag: programlisting
-#: xml.xml:174
+#. Tag: para
#, no-c-format
-msgid ""
-"<![CDATA[Session session = factory.openSession();\n"
-"Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
-"Transaction tx = session.beginTransaction();\n"
-"\n"
-"Element cust = (Element) dom4jSession.get(\"Customer\",
customerId);\n"
-"for ( int i=0; i<results.size(); i++ ) {\n"
-" Element customer = (Element) results.get(i);\n"
-" //change the customer name in the XML and database\n"
-" Element name = customer.element(\"name\");\n"
-" name.element(\"first-name\").setText(firstName);\n"
-" name.element(\"initial\").setText(initial);\n"
-" name.element(\"last-name\").setText(lastName);\n"
-"}\n"
-"\n"
-"tx.commit();\n"
-"session.close();]]>"
-msgstr ""
+msgid "When implementing XML-based data import/export, it is useful to combine this
feature with Hibernate's <literal>replicate()</literal> operation."
+msgstr "将这一特色与 Hibernate 的 <literal>replicate()</literal> 操作结合起来对于实现的基于
XML 的数据导入/导出将非常有用。"
-#. Tag: para
-#: xml.xml:176
-#, fuzzy, no-c-format
-msgid ""
-"When implementing XML-based data import/export, it is useful to combine this
"
-"feature with Hibernate's <literal>replicate()</literal>
operation."
-msgstr ""
-"将这一特色与Hibernate的<literal>replicate()</literal>操作结合起来对于实现的基"
-"于XML的数据导入/导出将非常有用."
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Account\" \n"
+#~ " table=\"ACCOUNTS\" \n"
+#~ " node=\"account\">\n"
+#~ " \n"
+#~ " <id name=\"accountId\" \n"
+#~ " column=\"ACCOUNT_ID\" \n"
+#~ " node=\"@id\"/>\n"
+#~ " \n"
+#~ " <many-to-one name=\"customer\" \n"
+#~ " column=\"CUSTOMER_ID\" \n"
+#~ " node=\"customer/@id\" \n"
+#~ " embed-xml=\"false\"/>\n"
+#~ " \n"
+#~ " <property name=\"balance\" \n"
+#~ " column=\"BALANCE\" \n"
+#~ " node=\"balance\"/>\n"
+#~ " \n"
+#~ " ...\n"
+#~ " \n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Account\" \n"
+#~ " table=\"ACCOUNTS\" \n"
+#~ " node=\"account\">\n"
+#~ " \n"
+#~ " <id name=\"accountId\" \n"
+#~ " column=\"ACCOUNT_ID\" \n"
+#~ " node=\"@id\"/>\n"
+#~ " \n"
+#~ " <many-to-one name=\"customer\" \n"
+#~ " column=\"CUSTOMER_ID\" \n"
+#~ " node=\"customer/@id\" \n"
+#~ " embed-xml=\"false\"/>\n"
+#~ " \n"
+#~ " <property name=\"balance\" \n"
+#~ " column=\"BALANCE\" \n"
+#~ " node=\"balance\"/>\n"
+#~ " \n"
+#~ " ...\n"
+#~ " \n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<class entity-name=\"Account\" \n"
+#~ " table=\"ACCOUNTS\" \n"
+#~ " node=\"account\">\n"
+#~ " \n"
+#~ " <id name=\"id\" \n"
+#~ " column=\"ACCOUNT_ID\" \n"
+#~ " node=\"@id\" \n"
+#~ " type=\"string\"/>\n"
+#~ " \n"
+#~ " <many-to-one name=\"customerId\" \n"
+#~ " column=\"CUSTOMER_ID\" \n"
+#~ " node=\"customer/@id\" \n"
+#~ " embed-xml=\"false\" \n"
+#~ " entity-name=\"Customer\"/>\n"
+#~ " \n"
+#~ " <property name=\"balance\" \n"
+#~ " column=\"BALANCE\" \n"
+#~ " node=\"balance\" \n"
+#~ " type=\"big_decimal\"/>\n"
+#~ " \n"
+#~ " ...\n"
+#~ " \n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class entity-name=\"Account\" \n"
+#~ " table=\"ACCOUNTS\" \n"
+#~ " node=\"account\">\n"
+#~ " \n"
+#~ " <id name=\"id\" \n"
+#~ " column=\"ACCOUNT_ID\" \n"
+#~ " node=\"@id\" \n"
+#~ " type=\"string\"/>\n"
+#~ " \n"
+#~ " <many-to-one name=\"customerId\" \n"
+#~ " column=\"CUSTOMER_ID\" \n"
+#~ " node=\"customer/@id\" \n"
+#~ " embed-xml=\"false\" \n"
+#~ " entity-name=\"Customer\"/>\n"
+#~ " \n"
+#~ " <property name=\"balance\" \n"
+#~ " column=\"BALANCE\" \n"
+#~ " node=\"balance\" \n"
+#~ " type=\"big_decimal\"/>\n"
+#~ " \n"
+#~ " ...\n"
+#~ " \n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[<class name=\"Customer\" \n"
+#~ " table=\"CUSTOMER\" \n"
+#~ " node=\"customer\">\n"
+#~ " \n"
+#~ " <id name=\"id\" \n"
+#~ " column=\"CUST_ID\" \n"
+#~ " node=\"@id\"/>\n"
+#~ " \n"
+#~ " <map name=\"accounts\" \n"
+#~ " node=\".\" \n"
+#~ " embed-xml=\"true\">\n"
+#~ " <key column=\"CUSTOMER_ID\" \n"
+#~ " not-null=\"true\"/>\n"
+#~ " <map-key column=\"SHORT_DESC\" \n"
+#~ " node=\"@short-desc\" \n"
+#~ " type=\"string\"/>\n"
+#~ " <one-to-many entity-name=\"Account\"\n"
+#~ " embed-xml=\"false\" \n"
+#~ " node=\"account\"/>\n"
+#~ " </map>\n"
+#~ " \n"
+#~ " <component name=\"name\" \n"
+#~ " node=\"name\">\n"
+#~ " <property name=\"firstName\" \n"
+#~ " node=\"first-name\"/>\n"
+#~ " <property name=\"initial\" \n"
+#~ " node=\"initial\"/>\n"
+#~ " <property name=\"lastName\" \n"
+#~ " node=\"last-name\"/>\n"
+#~ " </component>\n"
+#~ " \n"
+#~ " ...\n"
+#~ " \n"
+#~ "</class>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<class name=\"Customer\" \n"
+#~ " table=\"CUSTOMER\" \n"
+#~ " node=\"customer\">\n"
+#~ " \n"
+#~ " <id name=\"id\" \n"
+#~ " column=\"CUST_ID\" \n"
+#~ " node=\"@id\"/>\n"
+#~ " \n"
+#~ " <map name=\"accounts\" \n"
+#~ " node=\".\" \n"
+#~ " embed-xml=\"true\">\n"
+#~ " <key column=\"CUSTOMER_ID\" \n"
+#~ " not-null=\"true\"/>\n"
+#~ " <map-key column=\"SHORT_DESC\" \n"
+#~ " node=\"@short-desc\" \n"
+#~ " type=\"string\"/>\n"
+#~ " <one-to-many entity-name=\"Account\"\n"
+#~ " embed-xml=\"false\" \n"
+#~ " node=\"account\"/>\n"
+#~ " </map>\n"
+#~ " \n"
+#~ " <component name=\"name\" \n"
+#~ " node=\"name\">\n"
+#~ " <property name=\"firstName\" \n"
+#~ " node=\"first-name\"/>\n"
+#~ " <property name=\"initial\" \n"
+#~ " node=\"initial\"/>\n"
+#~ " <property name=\"lastName\" \n"
+#~ " node=\"last-name\"/>\n"
+#~ " </component>\n"
+#~ " \n"
+#~ " ...\n"
+#~ " \n"
+#~ "</class>]]>"
+#~ msgid ""
+#~ "<![CDATA[from Customer c left join fetch c.accounts where c.lastName "
+#~ "like :lastName]]>"
+#~ msgstr ""
+#~ "<![CDATA[from Customer c left join fetch c.accounts where c.lastName "
+#~ "like :lastName]]>"
+#~ msgid ""
+#~ "<![CDATA[<customer id=\"123456789\">\n"
+#~ " <account
short-desc=\"Savings\">987632567</account>\n"
+#~ " <account short-desc=\"Credit
Card\">985612323</account>\n"
+#~ " <name>\n"
+#~ " <first-name>Gavin</first-name>\n"
+#~ " <initial>A</initial>\n"
+#~ " <last-name>King</last-name>\n"
+#~ " </name>\n"
+#~ " ...\n"
+#~ "</customer>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<customer id=\"123456789\">\n"
+#~ " <account
short-desc=\"Savings\">987632567</account>\n"
+#~ " <account short-desc=\"Credit
Card\">985612323</account>\n"
+#~ " <name>\n"
+#~ " <first-name>Gavin</first-name>\n"
+#~ " <initial>A</initial>\n"
+#~ " <last-name>King</last-name>\n"
+#~ " </name>\n"
+#~ " ...\n"
+#~ "</customer>]]>"
+#~ msgid ""
+#~ "<![CDATA[<customer id=\"123456789\">\n"
+#~ " <account id=\"987632567\"
short-desc=\"Savings\">\n"
+#~ " <customer id=\"123456789\"/>\n"
+#~ " <balance>100.29</balance>\n"
+#~ " </account>\n"
+#~ " <account id=\"985612323\" short-desc=\"Credit
Card\">\n"
+#~ " <customer id=\"123456789\"/>\n"
+#~ " <balance>-2370.34</balance>\n"
+#~ " </account>\n"
+#~ " <name>\n"
+#~ " <first-name>Gavin</first-name>\n"
+#~ " <initial>A</initial>\n"
+#~ " <last-name>King</last-name>\n"
+#~ " </name>\n"
+#~ " ...\n"
+#~ "</customer>]]>"
+#~ msgstr ""
+#~ "<![CDATA[<customer id=\"123456789\">\n"
+#~ " <account id=\"987632567\"
short-desc=\"Savings\">\n"
+#~ " <customer id=\"123456789\"/>\n"
+#~ " <balance>100.29</balance>\n"
+#~ " </account>\n"
+#~ " <account id=\"985612323\" short-desc=\"Credit
Card\">\n"
+#~ " <customer id=\"123456789\"/>\n"
+#~ " <balance>-2370.34</balance>\n"
+#~ " </account>\n"
+#~ " <name>\n"
+#~ " <first-name>Gavin</first-name>\n"
+#~ " <initial>A</initial>\n"
+#~ " <last-name>King</last-name>\n"
+#~ " </name>\n"
+#~ " ...\n"
+#~ "</customer>]]>"
+#~ msgid ""
+#~ "<![CDATA[Document doc = ....;\n"
+#~ " \n"
+#~ "Session session = factory.openSession();\n"
+#~ "Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "\n"
+#~ "List results = dom4jSession\n"
+#~ " .createQuery(\"from Customer c left join fetch c.accounts where
c."
+#~ "lastName like :lastName\")\n"
+#~ " .list();\n"
+#~ "for ( int i=0; i<results.size(); i++ ) {\n"
+#~ " //add the customer data to the XML document\n"
+#~ " Element customer = (Element) results.get(i);\n"
+#~ " doc.add(customer);\n"
+#~ "}\n"
+#~ "\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Document doc = ....;\n"
+#~ " \n"
+#~ "Session session = factory.openSession();\n"
+#~ "Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "\n"
+#~ "List results = dom4jSession\n"
+#~ " .createQuery(\"from Customer c left join fetch c.accounts where
c."
+#~ "lastName like :lastName\")\n"
+#~ " .list();\n"
+#~ "for ( int i=0; i<results.size(); i++ ) {\n"
+#~ " //add the customer data to the XML document\n"
+#~ " Element customer = (Element) results.get(i);\n"
+#~ " doc.add(customer);\n"
+#~ "}\n"
+#~ "\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgid ""
+#~ "<![CDATA[Session session = factory.openSession();\n"
+#~ "Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "\n"
+#~ "Element cust = (Element) dom4jSession.get(\"Customer\",
customerId);\n"
+#~ "for ( int i=0; i<results.size(); i++ ) {\n"
+#~ " Element customer = (Element) results.get(i);\n"
+#~ " //change the customer name in the XML and database\n"
+#~ " Element name = customer.element(\"name\");\n"
+#~ " name.element(\"first-name\").setText(firstName);\n"
+#~ " name.element(\"initial\").setText(initial);\n"
+#~ " name.element(\"last-name\").setText(lastName);\n"
+#~ "}\n"
+#~ "\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+#~ msgstr ""
+#~ "<![CDATA[Session session = factory.openSession();\n"
+#~ "Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
+#~ "Transaction tx = session.beginTransaction();\n"
+#~ "\n"
+#~ "Element cust = (Element) dom4jSession.get(\"Customer\",
customerId);\n"
+#~ "for ( int i=0; i<results.size(); i++ ) {\n"
+#~ " Element customer = (Element) results.get(i);\n"
+#~ " //change the customer name in the XML and database\n"
+#~ " Element name = customer.element(\"name\");\n"
+#~ " name.element(\"first-name\").setText(firstName);\n"
+#~ " name.element(\"initial\").setText(initial);\n"
+#~ " name.element(\"last-name\").setText(lastName);\n"
+#~ "}\n"
+#~ "\n"
+#~ "tx.commit();\n"
+#~ "session.close();]]>"
+
Added:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Conventions.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Conventions.po
(rev 0)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Conventions.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -0,0 +1,214 @@
+#
+# AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0\n"
+"POT-Creation-Date: 2009-12-11T05:07:40\n"
+"PO-Revision-Date: 2009-12-11T05:07:40\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: None\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-publican; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#, no-c-format
+msgid "Document Conventions"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "This manual uses several conventions to highlight certain words and phrases
and draw attention to specific pieces of information."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "In PDF and paper editions, this manual uses typefaces drawn from the
<ulink
url=\"https://fedorahosted.org/liberation-fonts/\">Liberation
Fonts</ulink> set. The Liberation Fonts set is also used in HTML editions if the set
is installed on your system. If not, alternative but equivalent typefaces are displayed.
Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by
default."
+msgstr ""
+
+#. Tag: title
+#, no-c-format
+msgid "Typographic Conventions"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Four typographic conventions are used to call attention to specific words and
phrases. These conventions, and the circumstances they apply to, are as follows."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "<literal>Mono-spaced Bold</literal>"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Used to highlight system input, including shell commands, file names and
paths. Also used to highlight keycaps and key combinations. For example:"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "To see the contents of the file
<filename>my_next_bestselling_novel</filename> in your current working
directory, enter the <command>cat my_next_bestselling_novel</command> command
at the shell prompt and press <keycap>Enter</keycap> to execute the
command."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "The above includes a file name, a shell command and a keycap, all presented
in mono-spaced bold and all distinguishable thanks to context."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Key combinations can be distinguished from keycaps by the hyphen connecting
each part of a key combination. For example:"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Press <keycap>Enter</keycap> to execute the command."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Press
<keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>F1</keycap></keycombo>
to switch to the first virtual terminal. Press
<keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>F7</keycap></keycombo>
to return to your X-Windows session."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "The first paragraph highlights the particular keycap to press. The second
highlights two key combinations (each a set of three keycaps with each set pressed
simultaneously)."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "If source code is discussed, class names, methods, functions, variable names
and returned values mentioned within a paragraph will be presented as above, in
<literal>mono-spaced bold</literal>. For example:"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "File-related classes include <classname>filesystem</classname>
for file systems, <classname>file</classname> for files, and
<classname>dir</classname> for directories. Each class has its own associated
set of permissions."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "<application>Proportional Bold</application>"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "This denotes words or phrases encountered on a system, including application
names; dialog box text; labeled buttons; check-box and radio button labels; menu titles
and sub-menu titles. For example:"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Choose
<menuchoice><guimenu>System</guimenu><guisubmenu>Preferences</guisubmenu><guimenuitem>Mouse</guimenuitem></menuchoice>
from the main menu bar to launch <application>Mouse Preferences</application>.
In the <guilabel>Buttons</guilabel> tab, click the <guilabel>Left-handed
mouse</guilabel> check box and click <guibutton>Close</guibutton> to
switch the primary mouse button from the left to the right (making the mouse suitable for
use in the left hand)."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "To insert a special character into a
<application>gedit</application> file, choose
<menuchoice><guimenu>Applications</guimenu><guisubmenu>Accessories</guisubmenu><guimenuitem>Character
Map</guimenuitem></menuchoice> from the main menu bar. Next, choose
<menuchoice><guimenu>Search</guimenu><guimenuitem>Find…</guimenuitem></menuchoice>
from the <application>Character Map</application> menu bar, type the name of
the character in the <guilabel>Search</guilabel> field and click
<guibutton>Next</guibutton>. The character you sought will be highlighted in
the <guilabel>Character Table</guilabel>. Double-click this highlighted
character to place it in the <guilabel>Text to copy</guilabel> field and then
click the <guibutton>Copy</guibutton> button. Now switch back to your document
and choose
<menuchoice><guimenu>Edit</guimenu><guimenuitem>Paste</guimenuitem></menuchoice>
from the <application>gedit</application> menu bar."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "The above text includes application names; system-wide menu names and items;
application-specific menu names; and buttons and text found within a GUI interface, all
presented in proportional bold and all distinguishable by context."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "<command><replaceable>Mono-spaced Bold
Italic</replaceable></command> or
<application><replaceable>Proportional Bold
Italic</replaceable></application>"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Whether mono-spaced bold or proportional bold, the addition of italics
indicates replaceable or variable text. Italics denotes text you do not input literally or
displayed text that changes depending on circumstance. For example:"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "To connect to a remote machine using ssh, type <command>ssh
<replaceable>username</replaceable>(a)<replaceable>domain.name</replaceable></command>
at a shell prompt. If the remote machine is <filename>example.com</filename>
and your username on that machine is john, type <command>ssh
john(a)example.com</command>."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "The <command>mount -o remount
<replaceable>file-system</replaceable></command> command remounts the
named file system. For example, to remount the <filename>/home</filename> file
system, the command is <command>mount -o remount /home</command>."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "To see the version of a currently installed package, use the
<command>rpm -q <replaceable>package</replaceable></command>
command. It will return a result as follows:
<command><replaceable>package-version-release</replaceable></command>."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Note the words in bold italics above — username, domain.name,
file-system, package, version and release. Each word is a placeholder, either for text you
enter when issuing a command or for text displayed by the system."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Aside from standard usage for presenting the title of a work, italics denotes
the first use of a new and important term. For example:"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Publican is a <firstterm>DocBook</firstterm> publishing
system."
+msgstr ""
+
+#. Tag: title
+#, no-c-format
+msgid "Pull-quote Conventions"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Terminal output and source code listings are set off visually from the
surrounding text."
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Output sent to a terminal is set in <computeroutput>mono-spaced
roman</computeroutput> and presented thus:"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Source-code listings are also set in <computeroutput>mono-spaced
roman</computeroutput> but add syntax highlighting as follows:"
+msgstr ""
+
+#. Tag: title
+#, no-c-format
+msgid "Notes and Warnings"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Finally, we use three visual styles to draw attention to information that
might otherwise be overlooked."
+msgstr ""
+
+#. Tag: title
+#, no-c-format
+msgid "Note"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Notes are tips, shortcuts or alternative approaches to the task at hand.
Ignoring a note should have no negative consequences, but you might miss out on a trick
that makes your life easier."
+msgstr ""
+
+#. Tag: title
+#, no-c-format
+msgid "Important"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Important boxes detail things that are easily missed: configuration changes
that only apply to the current session, or services that need restarting before an update
will apply. Ignoring a box labeled 'Important' won't cause data loss but may
cause irritation and frustration."
+msgstr ""
+
+#. Tag: title
+#, no-c-format
+msgid "Warning"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "Warnings should not be ignored. Ignoring warnings will most likely cause data
loss."
+msgstr ""
+
Added:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Feedback.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Feedback.po
(rev 0)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Feedback.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -0,0 +1,34 @@
+#
+# AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0\n"
+"POT-Creation-Date: 2009-12-11T05:07:40\n"
+"PO-Revision-Date: 2009-12-11T05:07:40\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: None\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-publican; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#, no-c-format
+msgid "We Need Feedback!"
+msgstr ""
+
+#. Tag: primary
+#, no-c-format
+msgid "feedback"
+msgstr ""
+
+#. Tag: secondary
+#, no-c-format
+msgid "contact information for this manual"
+msgstr ""
+
+#. Tag: para
+#, no-c-format
+msgid "You should over ride this by creating your own local Feedback.xml
file."
+msgstr ""
+
Added:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Legal_Notice.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Legal_Notice.po
(rev 0)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/fallback_content/Legal_Notice.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -0,0 +1,19 @@
+#
+# AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0\n"
+"POT-Creation-Date: 2009-12-11T05:07:40\n"
+"PO-Revision-Date: 2009-12-11T05:07:40\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: None\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-publican; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: para
+#, no-c-format
+msgid "Copyright <trademark class=\"copyright\"></trademark>
&YEAR; &HOLDER; This material may only be distributed subject to the terms and
conditions set forth in the GNU Free Documentation License (GFDL), V1.2 or later (the
latest version is presently available at <ulink
url=\"http://www.gnu.org/licenses/fdl.txt\">http://www.gnu.o...
+msgstr ""
+
Deleted:
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/legal_notice.po
===================================================================
---
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/legal_notice.po 2010-02-08
06:25:06 UTC (rev 18724)
+++
core/branches/Branch_3_3/documentation/manual/src/main/docbook/zh-CN/legal_notice.po 2010-02-08
06:30:52 UTC (rev 18725)
@@ -1,84 +0,0 @@
-#, fuzzy
-msgid ""
-msgstr ""
-"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-06-16 18:47+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-
-#. Tag: title
-#: legal_notice.xml:28
-#, no-c-format
-msgid "Legal Notice"
-msgstr "Legal Notice"
-
-#. Tag: address
-#: legal_notice.xml:30
-#, no-c-format
-msgid ""
-"<street>1801 Varsity Drive</street> <city>Raleigh</city>,
<state>NC</"
-"state><postcode>27606-2072</postcode><country>USA</country>
<phone>Phone: +1 "
-"919 754 3700</phone> <phone>Phone: 888 733 4281</phone>
<fax>Fax: +1 919 754 "
-"3701</fax> <pob>PO Box 13588</pob><city>Research Triangle
Park</city>, "
-"<state>NC</state><postcode>27709</postcode><country>USA</country>"
-msgstr ""
-"<street>1801 Varsity Drive</street> <city>Raleigh</city>,
<state>NC</"
-"state><postcode>27606-2072</postcode><country>USA</country>
<phone>Phone: +1 "
-"919 754 3700</phone> <phone>Phone: 888 733 4281</phone>
<fax>Fax: +1 919 754 "
-"3701</fax> <pob>PO Box 13588</pob><city>Research Triangle
Park</city>, "
-"<state>NC</state><postcode>27709</postcode><country>USA</country>"
-
-#. Tag: para
-#: legal_notice.xml:39
-#, fuzzy, no-c-format
-msgid ""
-"Copyright <trademark class=\"copyright\"></trademark> 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 <ulink
url=\"http://www.gnu.org/licenses/lgpl-2.1.html\">Lesser
General "
-"Public License</ulink>, as published by the Free Software Foundation."
-msgstr ""
-"Copyright <trademark class=\"copyright\"></trademark> 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 <ulink
url=\"http://www.gnu.org/licenses/lgpl-2.1.html\">Lesser
General "
-"Public License</ulink>, as published by the Free Software Foundation."
-
-#. Tag: para
-#: legal_notice.xml:45
-#, 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."
-
-#. Tag: para
-#: legal_notice.xml:48
-#, 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
-#: legal_notice.xml:51
-#, no-c-format
-msgid "The GPG fingerprint of the security(a)redhat.com key is:"
-msgstr "The GPG fingerprint of the security(a)redhat.com key is:"
-
-#. Tag: para
-#: legal_notice.xml:54
-#, no-c-format
-msgid "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E"
-msgstr "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E"
-
-#~ msgid "ROLES_OF_TRANSLATORS"
-#~ msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"
-
-#~ msgid "CREDIT_FOR_TRANSLATORS"
-#~ msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"