|
The Hibernate xml.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-02-10T07:25:35\n"
"PO-Revision-Date: 2010-03-16 10:02+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
#, no-c-format
msgid "XML Mapping"
msgstr "XML æ˜ å°„"
#. Tag: para
#, no-c-format
msgid "<emphasis> XML Mapping is an experimental feature in Hibernate 3.0 and is currently under active development. "
msgstr "<emphasis>æ³¨æ„ XML æ˜ å°„åªæ˜¯ Hibernate 3.0 的一个实验性的特性。这一特性ä»åœ¨ç§¯æžå¼€å‘ä¸ã€‚ "
#. Tag: title
#, no-c-format
msgid "Working with XML data"
msgstr "用 XML æ•°æ®è¿›è¡Œå·¥ä½œ"
#. Tag: para
#, 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
#, 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() (merging is not yet supported)."
msgstr "Hibernate 支æŒé‡‡ç”¨ dom4j 作为æ“作 XML æ ‘çš„ APIã€‚ä½ å¯ä»¥å†™ä¸€äº›æŸ¥è¯¢ä»Žæ•°æ®åº“ä¸æ£€ç´¢å‡º dom4j æ ‘ï¼ŒéšåŽä½ å¯¹è¿™é¢—æ ‘åšçš„任何修改都将自动åŒæ¥å›žæ•°æ®åº“ã€‚ä½ ç”šè‡³å¯ä»¥ç”¨ dom4j è§£æž ä¸€ç¯‡ XML 文档,然åŽä½¿ç”¨ Hibernate 的任一基本æ“作将它写入数æ®åº“:<literal>persist(),saveOrUpdate(),merge(),delete(),replicate() (åˆå¹¶æ“作merge()ç›®å‰è¿˜ä¸æ”¯æŒï¼‰ã€‚"
#. Tag: para
#, 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 的报表。"
#. Tag: para
#, 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
#, no-c-format
msgid "Specifying XML and class mapping together"
msgstr "指定åŒæ—¶æ˜ å°„ XML 和类"
#. Tag: para
#, no-c-format
msgid "Here is an example of mapping a POJO and XML simultaneously:"
msgstr "这是一个åŒæ—¶æ˜ å°„ POJO å’Œ XML 的例å:"
#. Tag: title
#, no-c-format
msgid "Specifying only an XML mapping"
msgstr "åªå®šä¹‰ XML æ˜ å°„"
#. Tag: para
#, no-c-format
msgid "Here is an example where there is no POJO class:"
msgstr "这是一个ä¸æ˜ å°„ POJO 的例å:"
#. Tag: para
#, 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>Maps. The property names are purely logical constructs that can be referred to in HQL queries."
msgstr "è¿™ä¸ªæ˜ å°„ä½¿å¾—ä½ æ—¢å¯ä»¥æŠŠæ•°æ®ä½œä¸ºä¸€æ£µ dom4j æ ‘é‚£æ ·è®¿é—®ï¼Œåˆå¯ä»¥ä½œä¸ºç”±å±žæ€§é”®å€¼å¯¹ï¼ˆjava <literal>Map)组æˆçš„å›¾é‚£æ ·è®¿é—®ã€‚å±žæ€§åå—çº¯ç²¹æ˜¯é€»è¾‘ä¸Šçš„ç»“æž„ï¼Œä½ å¯ä»¥åœ¨ HQL 查询ä¸å¼•ç”¨å®ƒã€‚"
#. Tag: title
#, no-c-format
msgid "XML mapping metadata"
msgstr "XML æ˜ å°„å…ƒæ•°æ®"
#. Tag: para
#, no-c-format
msgid "A range of Hibernate mapping elements accept the <literal>node attribute. This lets you specify the name of an XML attribute or element that holds the property or entity data. The format of the node attribute must be one of the following:"
msgstr "许多 Hibernate æ˜ å°„å…ƒç´ å…·æœ‰ <literal>node å±žæ€§ã€‚è¿™ä½¿ä½ å¯ä»¥æŒ‡å®šç”¨æ¥ä¿å˜ 属性或实体数æ®çš„ XML å±žæ€§æˆ–å…ƒç´ ã€‚node å±žæ€§å¿…é¡»æ˜¯ä¸‹åˆ—æ ¼å¼ä¹‹ä¸€ï¼š "
#. Tag: para
#, no-c-format
msgid "<literal>\"element-name\": map to the named XML element"
msgstr "<literal>\"element-name\"ï¼šæ˜ å°„ä¸ºæŒ‡å®šçš„ XML å…ƒç´ "
#. Tag: para
#, no-c-format
msgid "<literal>\"@attribute-name\": map to the named XML attribute"
msgstr "<literal>\"@attribute-name\"ï¼šæ˜ å°„ä¸ºæŒ‡å®šçš„ XML 属性"
#. Tag: para
#, no-c-format
msgid "<literal>\".\": map to the parent element"
msgstr "<literal>\".\"ï¼šæ˜ å°„ä¸ºçˆ¶å…ƒç´ "
#. Tag: para
#, no-c-format
msgid "<literal>\"element-name/@attribute-name\": map to the named attribute of the named element"
msgstr "<literal>\"element-name/@attribute-name\"ï¼šæ˜ å°„ä¸ºæŒ‡å®šå…ƒç´ çš„æŒ‡å®šå±žæ€§"
#. Tag: para
#, no-c-format
msgid "For collections and single valued associations, there is an additional <literal>embed-xml attribute. If embed-xml=\"true\", 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 embed-xml=\"false\", 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 属性å¯ç”¨ã€‚这个属性的缺çœå€¼æ˜¯çœŸï¼ˆembed-xml=\"true\")。如果 embed-xml=\"true\",则对应于被关è”实体或值类型的集åˆçš„XMLæ ‘å°†ç›´æŽ¥åµŒå…¥æ‹¥æœ‰è¿™äº›å…³è”的实体的 XML æ ‘ä¸ã€‚å¦åˆ™ï¼Œå¦‚æžœ embed-xml=\"false\",那么对于å•å€¼çš„å…³è”ï¼Œä»…è¢«å¼•ç”¨çš„å®žä½“çš„æ ‡è¯†ç¬¦å‡ºçŽ°åœ¨ XML æ ‘ä¸ï¼ˆè¢«å¼•ç”¨å®žä½“本身ä¸å‡ºçŽ°ï¼‰ï¼Œè€Œé›†åˆåˆ™æ ¹æœ¬ä¸å‡ºçŽ°ã€‚"
#. Tag: para
#, no-c-format
msgid "Do not leave <literal>embed-xml=\"true\" for too many associations, since XML does not deal well with circularity."
msgstr "ä½ åº”è¯¥å°å¿ƒï¼Œä¸è¦è®©å¤ªå¤šå…³è”çš„ embed-xml 属性为真(<literal>embed-xml=\"true\"ï¼‰ï¼Œå› ä¸º XML ä¸èƒ½å¾ˆå¥½åœ°å¤„ç†å¾ªçŽ¯å¼•ç”¨ã€‚"
#. Tag: para
#, 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: para
#, no-c-format
msgid "would return datasets such as this:"
msgstr "返回的数æ®é›†å°†æ˜¯è¿™æ ·ï¼š "
#. Tag: para
#, no-c-format
msgid "If you set <literal>embed-xml=\"true\" on the <one-to-many> mapping, the data might look more like this:"
msgstr "å¦‚æžœä½ æŠŠä¸€å¯¹å¤šæ˜ å°„ <literal><one-to-many> çš„ embed-xml 属性置为真(embed-xml=\"true\"),则数æ®çœ‹ä¸ŠåŽ»å°±åƒè¿™æ ·ï¼š"
#. Tag: title
#, no-c-format
msgid "Manipulating XML data"
msgstr "æ“作 XML æ•°æ®"
#. Tag: para
#, 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: para
#, no-c-format
msgid "When implementing XML-based data import/export, it is useful to combine this feature with Hibernate's <literal>replicate() operation."
msgstr "将这一特色与 Hibernate çš„ <literal>replicate() æ“作结åˆèµ·æ¥å¯¹äºŽå®žçŽ°çš„基于 XML çš„æ•°æ®å¯¼å…¥/导出将éžå¸¸æœ‰ç”¨ã€‚"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ 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[\n"
#~ " <account short-desc=\"Credit Card\">985612323\n"
#~ " <name>\n"
#~ " <first-name>Gavin\n"
#~ " <initial>A\n"
#~ " <last-name>King\n"
#~ " </name>\n"
#~ " ...\n"
#~ "</customer>]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ " <account short-desc=\"Credit Card\">985612323\n"
#~ " <name>\n"
#~ " <first-name>Gavin\n"
#~ " <initial>A\n"
#~ " <last-name>King\n"
#~ " </name>\n"
#~ " ...\n"
#~ "</customer>]]>"
#~ msgid ""
#~ "<![CDATA[\n"
#~ " </account>\n"
#~ " <account id=\"985612323\" short-desc=\"Credit Card\">\n"
#~ " <customer id=\"123456789\"/>\n"
#~ " <balance>-2370.34\n"
#~ " </account>\n"
#~ " <name>\n"
#~ " <first-name>Gavin\n"
#~ " <initial>A\n"
#~ " <last-name>King\n"
#~ " </name>\n"
#~ " ...\n"
#~ "</customer>]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ " </account>\n"
#~ " <account id=\"985612323\" short-desc=\"Credit Card\">\n"
#~ " <customer id=\"123456789\"/>\n"
#~ " <balance>-2370.34\n"
#~ " </account>\n"
#~ " <name>\n"
#~ " <first-name>Gavin\n"
#~ " <initial>A\n"
#~ " <last-name>King\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();]]>"
Other Hibernate examples (source code examples)
Here is a short list of links related to this Hibernate xml.po source code file:
|