📄 batch.po
字号:
msgid """As already discussed, automatic and transparent object/relational mapping is ""concerned with the management of object state. This implies that the object ""state is available in memory, 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 (<link ""linkend=\"queryhql\">HQL</link>)."msgstr """Como ya se ha discutido, el mapeo objeto/relacional automático y ""transparente se refiere al manejo de estado de objetos. Esto implica que el ""estado del objeto está disponible en memoria, por lo tanto actualizar o ""borrar (usando <literal>UPDATE</literal> y <literal>DELETE</literal> de SQL) ""datos directamente en la base de datos no afectará el estado en memoria. Sin ""embargo, Hibernate provee métodos para la ejecución de sentencias del estilo ""de <literal>UPDATE</literal> y <literal>DELETE</literal> de SQL que se ""realizan a través del Lenguaje de Consulta de Hibernate (Hibernate Query ""Language o <xref linkend=\"queryhql\"/>HQL)."#: index.docbook:122msgid """The pseudo-syntax for <literal>UPDATE</literal> and <literal>DELETE</""literal> statements is: <literal>( UPDATE | DELETE ) FROM? EntityName (WHERE ""where_conditions)?</literal>. Some points to note:"msgstr """La pseudo-sintáxis para sentencias <literal>UPDATE</literal> y ""<literal>DELETE</literal> es: <literal>( UPDATE | DELETE ) FROM? ClassName ""(WHERE WHERE_CONDITIONS)?</literal>. Algunos puntos a tener en cuenta:"#: index.docbook:130msgid "In the from-clause, the FROM keyword is optional"msgstr "En la cláusula-from, la palabra clave FROM es opcional"#: index.docbook:135msgid """There can only be a single entity named in the from-clause; it can ""optionally 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 """There can only be a single entity named in the from-clause; it can ""optionally 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."#: index.docbook:143msgid """No <link linkend=\"queryhql-joins-forms\">joins</link> (either implicit or ""explicit) can be specified in a bulk HQL query. Sub-queries may be used in ""the where-clause; the subqueries, themselves, may contain joins."msgstr """No <link linkend=\"queryhql-joins-forms\">joins</link> (either implicit or ""explicit) can be specified in a bulk HQL query. Sub-queries may be used in ""the where-clause; the subqueries, themselves, may contain joins."#: index.docbook:150msgid "The where-clause is also optional."msgstr "La cláusula-where es también opcional."#: index.docbook:156msgid """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 """Como un ejemplo, para ejecutar un <literal>UPDATE</literal> HQL, usa el ""método <literal>Query.executeUpdate()</literal>(the method is named for ""those familiar with JDBC's <literal>PreparedStatement.executeUpdate()</""literal>):"#: index.docbook:162msgid """<![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();]]>"#: index.docbook:164msgid """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; this is in keeping with the EJB3 specification. However, ""you can force Hibernate to properly 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> 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; this is in keeping with the EJB3 specification. However, ""you can force Hibernate to properly 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."#: index.docbook:174msgid """<![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();]]>"#: index.docbook:176msgid """Note that custom version types (<literal>org.hibernate.usertype.""UserVersionType</literal>) are not allowed in conjunction with a ""<literal>update versioned</literal> statement."msgstr """Note that custom version types (<literal>org.hibernate.usertype.""UserVersionType</literal>) are not allowed in conjunction with a ""<literal>update versioned</literal> statement."#: index.docbook:181msgid """To execute an HQL <literal>DELETE</literal>, use the same <literal>Query.""executeUpdate()</literal> method:"msgstr """Para ejecutar un <literal>DELETE</literal> HQL, usa el mismo método ""<literal>Query.executeUpdate()</literal>:"#: index.docbook:186msgid """<![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 where name = :oldName\";\n"" int deletedEntities = s.createQuery( hqlDelete )\n"" .setString( \"oldName\", oldName )\n"" .executeUpdate();\n"" tx.commit();\n"" session.close();]]>"#: index.docbook:188msgid """The <literal>int</literal> value returned by the <literal>Query.executeUpdate""()</literal> method indicate the number of entities effected by the ""operation. Consider 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 inheritence hierarchy."msgstr """El valor <literal>int</literal> devuelto por el método <literal>Query.""executeUpdate()</literal> indica el número de entidades afectadas por la ""operación. Considera que esto puede o no correlacionarse al número de filas ""afectadas en la base de datos. Una operación masiva HQL podría resultar en ""que se ejecuten múltiples sentencias de SQL reales, para joined-subclass, ""por ejemplo. El número devuelto indica el número de entidades reales ""afectadas por la sentencia. Volviendo al ejemplo de joined-subclass, un ""borrado contra una de las subclases puede resultar realmente en borrados ""contra no sólo la tabla a la que está mapeada esa subclase, sino también la ""tabla \"raíz\" y potencialmente tablas de joined-subclass más debajo en la ""jerarquía de herencia."#: index.docbook:199msgid """The pseudo-syntax for <literal>INSERT</literal> statements is: ""<literal>INSERT INTO EntityName properties_list select_statement</literal>. ""Some points to note:"msgstr """Ten en cuenta que existen actualmente unas pocas limitaciones con las ""operaciones HQL masivas, que serán atendidas en lanzamientos futuros; ""consulta la hoja de ruta de JIRA para más detalles."#: index.docbook:207msgid """Only the INSERT INTO ... SELECT ... form is supported; not the INSERT ""INTO ... VALUES ... form."msgstr ""#: index.docbook:210msgid """The properties_list is analogous to the <literal>column speficiation</""literal> in the SQL <literal>INSERT</literal> statement. For entities ""involved in mapped inheritence, 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 ""#: index.docbook:220msgid """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. Note however that this might 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 ""#: index.docbook:232msgid """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 ""later 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. Note that for the ""purposes of this discussion, in-database generators are considered to be ""<literal>org.hibernate.id.SequenceGenerator</literal> (and its subclasses) ""and any implementors 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 ""#: index.docbook:247msgid """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 ""#: index.docbook:257msgid "An example HQL <literal>INSERT</literal> statement execution:"msgstr ""#: index.docbook:261msgid """<![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 ""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 + -