|
Hibernate example source code file (portability.po)
This example Hibernate source code file (portability.po) is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.
The Hibernate portability.po source code
# translation of Collection_Mapping.po to
# Xi Huang <xhuang@redhat.com>, 2006.
# Xi HUANG <xhuang@redhat.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-03-25 06:26+0000\n"
"PO-Revision-Date: 2010-03-16 10:10+1000\n"
"Last-Translator: Xi HUANG <xhuang@redhat.com>\n"
"Language-Team: <en@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:31
#, no-c-format
msgid "Database Portability Considerations"
msgstr "æ•°æ®åº“移æ¤æ€§è€ƒé‡"
#. Tag: title
#: portability.xml:34
#, no-c-format
msgid "Portability Basics"
msgstr "移æ¤æ€§åŸºç¡€"
#. Tag: para
#: portability.xml:36
#, 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 ""
"Hibernate(实际上是整个 Object/Relational Mapping)的一个å–点是数æ®åº“的移æ¤"
"性。这æ„味ç€å†…部的 IT 用户å¯ä»¥æ”¹å˜æ•°æ®åº“供应商,或者å¯éƒ¨ç½²çš„应用程åº/框架使"
"用 Hibernate æ¥åŒæ—¶ä½¿ç”¨å¤šä¸ªæ•°æ®åº“产å“。ä¸è€ƒè™‘具体的应用情景,这里的基本概念"
"是 Hibernate å¯å¸®åŠ©ä½ è¿è¡Œå¤šç§æ•°æ®åº“è€Œæ— éœ€ä¿®æ”¹ä½ çš„ä»£ç ,ç†æƒ³æƒ…况下甚至ä¸ç”¨ä¿®æ”¹"
"æ˜ å°„å…ƒæ•°æ®ã€‚"
#. Tag: title
#: portability.xml:47
#, no-c-format
msgid "Dialect"
msgstr "Dialect"
#. Tag: para
#: portability.xml:49
#, 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 "
"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:60
#, no-c-format
msgid "Dialect resolution"
msgstr "方言的使用"
#. Tag: para
#: portability.xml:62
#, 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 ""
"最开始,Hibernate 总是è¦æ±‚用户指定所使用的方言(dialect)。在用户希望åŒæ—¶ä½¿ç”¨"
"多个数æ®åº“时就会出现问题。通常这è¦æ±‚用户é…ç½® Hibernate 方言或者定义自己设置这"
"个值的方法。"
#. Tag: para
#: portability.xml:69
#, 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 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>java.sql.DatabaseMetaData。这是一个更好的方"
"案,但它局é™äºŽ Hibernate 已知的数æ®åº“ä¸”æ— æ³•è¿›è¡Œé…置和覆盖。"
#. Tag: para
#: portability.xml:77
#, fuzzy, 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 role=\"JAVA\"> constant on org.hibernate."
"cfg.Environment</classname>)."
msgstr ""
"这些解æžè€…最棒的功能是用户也å¯ä»¥æ³¨å†Œè‡ªå®šä¹‰çš„解æžè€…,它们将在内置的解æžè€…之å‰"
"被调用。在许多情况下这å¯èƒ½å¾ˆæœ‰ç”¨ï¼šå®ƒå¯ä»¥è½»æ˜“地集æˆå†…置方言之外的方言的自动检"
"æµ‹ï¼›å®ƒè®©ä½ å¯ä»¥ä½¿ç”¨è‡ªå®šä¹‰çš„方言ç‰ã€‚è¦æ³¨å†Œä¸€ä¸ªæˆ–多个解æžè€…,åªè¦ç”¨ 'hibernate."
"dialect_resolvers' é…置设置指定它们(由逗å·ã€åˆ¶è¡¨ç¬¦æˆ–ç©ºæ ¼éš”å¼€ï¼‰å°±å¯ä»¥äº†ï¼ˆè¯·å‚"
"考 <classname>org.hibernate.cfg.Environment 上的 "
"<constant>DIALECT_RESOLVERS)。"
#. Tag: title
#: portability.xml:103
#, no-c-format
msgid "Identifier generation"
msgstr "æ ‡è¯†ç¬¦çš„ç”Ÿæˆ"
#. Tag: para
#: portability.xml:105
#, fuzzy, 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 generator for this "
"purpose, which was intended to select between a <emphasis>sequenceidentity, or table "
"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 generation and some "
"which do not. <emphasis>identity 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> 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> The underlying issue is that the actual "
"semanctics of the application itself changes in these cases."
msgstr ""
"当考虑数æ®åº“的移æ¤æ€§æ—¶ï¼Œå¦å¤–一个é‡è¦çš„考é‡æ˜¯é€‰æ‹©æ ‡è¯†ç¬¦ç”Ÿæˆç–略。Hibernate 原"
"å…ˆæ供的 <emphasis>native 生æˆå™¨çš„ç›®çš„æ˜¯æ ¹æ®åº•å±‚æ•°æ®åº“的能力在 "
"<emphasis>sequenceã€identity 或 "
"<emphasis>table ç–略间进行选择。然而,这个方法一个潜在的问题是有些"
"æ•°æ®åº“支æŒ<emphasis>æ ‡è¯†ç¬¦ï¼ˆidentity)生æˆè€Œæœ‰äº›åˆ™ä¸æ”¯æŒã€‚"
"<emphasis>æ ‡è¯†ç¬¦ï¼ˆidentity) 生æˆä¾èµ–于管ç†æ ‡è¯†ç¬¦å€¼çš„ IDENTITY"
"(或 auto-increment)å—段的 SQL 定义。它也æˆä¸º post-insert 生æˆç–ç•¥ï¼Œå› ä¸º "
"insert 必须在知é“æ ‡è¯†ç¬¦å€¼åŽæ‰èƒ½å®žé™…å‘ç”Ÿã€‚å› ä¸º Hibernate ä¾èµ–äºŽè¿™ä¸ªæ ‡è¯†ç¬¦å€¼æ¥"
"唯一地引用æŒä¹…性上下文里的实体,当用户请求和会è¯ç›¸å…³è”的实体时(如通过 save"
"()),它必须立å³æ‰§è¡Œ insert è¯å¥è€Œä¸ç®¡å½“å‰çš„事务性è¯ä¹‰ã€‚"
#. Tag: para
#: portability.xml:130
#, 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> There are "
"specifically 2 bundled <emphasis>enhancedgenerators: "
"<itemizedlist> org.hibernate.id.enhanced."
"SequenceStyleGenerator</classname> "
"<classname>org.hibernate.id.enhanced.TableGenerator 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 ""
#. Tag: title
#: portability.xml:159
#, no-c-format
msgid "Database functions"
msgstr "æ•°æ®åº“函数"
#. Tag: para
#: portability.xml:162
#, 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 ""
"这是 Hibernate 需è¦æ高的一个领域。从å¯ç§»æ¤æ€§æ¥è¯´ï¼Œè¿™ä¸ªåŠŸèƒ½å¯ä»¥å¾ˆå¥½åœ°å¤„ç† "
"HQL 的内容,但在其他方é¢å°±æœ‰æ‰€æ¬ 缺。"
#. Tag: para
#: portability.xml:169
#, 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 function name to a delegate which "
"knows how to render that particular function, perhaps even using a totally "
"different physical function call."
msgstr ""
"用户å¯ä»¥ä»¥å¤šç§æ–¹å¼å¼•ç”¨ SQL 函数。然而,ä¸æ˜¯æ‰€æœ‰çš„æ•°æ®åº“都支æŒç›¸åŒçš„函数集。"
"Hibernate æ供了一ç§æ˜ å°„<emphasis>逻辑函数å到代ç†çš„方法,这个代ç†"
"知é“如何解æžç‰¹å®šçš„函数,甚至å¯èƒ½ä½¿ç”¨å®Œå…¨ä¸åŒçš„物ç†å‡½æ•°è°ƒç”¨ã€‚ "
#. Tag: para
#: portability.xml:175
#, 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 ""
"从技术上æ¥è®²ï¼Œè¿™ä¸ªå‡½æ•°æ³¨å†Œæ˜¯é€šè¿‡ <classname>org.hibernate.dialect.function."
"SQLFunctionRegistry</classname> 类进行处ç†çš„,它的目的是å…许用户æ供自定义的"
"å‡½æ•°å®šä¹‰è€Œæ— éœ€æ供自定义的方言。这ç§ç‰¹æ®Šçš„行为目å‰è¿˜æœªå…¨éƒ¨å¼€å‘完毕。"
#. Tag: para
#: portability.xml:182
#, no-c-format
msgid ""
"It is sort of implemented such that users can programatically register "
"functions with the <classname>org.hibernate.cfg.Configuration "
"and those functions will be recognized for HQL."
msgstr ""
"å…¶ä¸ä¸€äº›åŠŸèƒ½å·²ç»å®žçŽ°ï¼Œå¦‚用户å¯ä»¥åœ¨ç¨‹åºé‡Œç”¨ <classname>org.hibernate.cfg."
"Configuration</classname> 注册函数且这些函数å¯è¢« HQL 识别。"
#. Tag: title
#: portability.xml:192
#, no-c-format
msgid "Type mappings"
msgstr "ç±»åž‹æ˜ å°„"
#. Tag: para
#: portability.xml:194
#, no-c-format
msgid "This section scheduled for completion at a later date..."
msgstr "本节内容ä»æœªå®Œæˆ..."
#~ msgid ""
#~ "Hibernate was changed slightly once the implication of this was better "
#~ "understood so that the insert is delayed in cases where that is feasible."
#~ msgstr "Hibernate å·²ç»è¿›è¡Œäº†è½»å¾®æ”¹è¿›ï¼Œæ‰€ä»¥åœ¨å¯è¡Œæ—¶è¿™ç§æ’入会被延迟。"
#~ msgid ""
#~ "The underlying issue is that the actual semanctics of the application "
#~ "itself changes in these cases."
#~ msgstr "底层的问题是这些例å里应用程åºè‡ªèº«çš„实际模å¼çš„改å˜ã€‚"
#~ 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> æ ‡è¯†ç¬¦ç”Ÿæˆå™¨ï¼Œå®ƒä»¥å¾ˆä¸åŒçš„æ–¹å¼å®žçŽ°ç§»æ¤æ€§ã€‚"
#~ msgid ""
#~ "There are specifically 2 bundled <emphasis>enhancedgenerators:"
#~ msgstr "特别是两个æ†ç»‘çš„ <emphasis>enhanced 生æˆå™¨ï¼š"
#~ msgid ""
#~ "<classname>org.hibernate.id.enhanced.SequenceStyleGenerator"
#~ msgstr ""
#~ "<classname>org.hibernate.id.enhanced.SequenceStyleGenerator"
#~ msgid "<classname>org.hibernate.id.enhanced.TableGenerator"
#~ msgstr "<classname>org.hibernate.id.enhanced.TableGenerator"
#~ 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 "
#~ "mimics the behavior of a sequence on databases which do not support "
#~ "sequences by using a table."
#~ msgstr ""
#~ "这些生æˆå™¨èƒŒåŽçš„æ¦‚å¿µæ˜¯æŠŠæ ‡è¯†ç¬¦å€¼ç”Ÿæˆçš„实际情景移æ¤åˆ°ä¸åŒçš„æ•°æ®åº“里。例如,"
#~ "<classname>org.hibernate.id.enhanced.SequenceStyleGenerator 通"
#~ "过使用表æ¥æ¨¡æ‹Ÿä¸æ”¯æŒåºåˆ—(sequences)的数æ®åº“上的åºåˆ—行为。"
#~ msgid ""
#~ "This is a new area in Hibernate and as such it is not as mature as the "
#~ "overall Hibernate experience."
#~ msgstr "这是 Hibernate 的一个新的领域,暂时还ä¸å¦‚ Hibernate 总体那么æˆç†Ÿã€‚"
Other Hibernate examples (source code examples)
Here is a short list of links related to this Hibernate portability.po source code file:
|