📄 xml.po
字号:
" 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>]]>"#: index.docbook:117msgid """in this case, we have decided to embed the collection of account ids, but ""not the actual account data. The following HQL query:"msgstr """en este caso, hemos decidido embeber la colección de ids de cuenta, pero no ""los datos reales de cuenta. La siguiente consulta HQL:"#: index.docbook:122msgid """<![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]]>"#: index.docbook:124msgid "Would return datasets such as this:"msgstr "devolvería conjuntos de datos como estos:"#: index.docbook:128msgid """<![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>]]>"#: index.docbook:130msgid """If you set <literal>embed-xml=\"true\"</literal> on the <literal><one-to-""many></literal> mapping, the data might look more like this:"msgstr """Si estableces <literal>embed-xml=\"true\"</literal> en el mapeo <literal><""one-to-many></literal>, los datos podrían verse así:"#: index.docbook:135msgid """<![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>]]>"#: index.docbook:141msgid "Manipulating XML data"msgstr "Manipulando datos XML"#: index.docbook:143msgid """Let's rearead and update XML documents in the application. We do this by ""obtaining a dom4j session:"msgstr """Vamos a releer y actualizar documentos XML en la aplicación. Hacemos esto ""obteniendo una sesión dom4j:"#: index.docbook:148msgid """<![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();]]>"#: index.docbook:150msgid """<![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();]]>"#: index.docbook:152msgid """It is extremely useful to combine this feature with Hibernate's ""<literal>replicate()</literal> operation to implement XML-based data import/""export."msgstr """Es extremadamente útil combinar esta funcionalidad con la operación ""<literal>replicate()</literal> de Hibernate para implementar la importación/""exportación de datos basada en XML."msgid "ROLES_OF_TRANSLATORS"msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"msgid "CREDIT_FOR_TRANSLATORS"msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -