⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 batch.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 2 页
字号:
msgid """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 """<literal>UPDATE</literal> と <literal>DELETE</literal> 文の疑似構文は: ""<literal>( UPDATE | DELETE ) FROM? エンティティ名 (WHERE 条件節)?</literal> ""です。 注意すべき点がいくつかあります:"#. Tag: para#: batch.xml:130#, no-c-formatmsgid "In the from-clause, the FROM keyword is optional"msgstr "from節において、FROMキーワードはオプションです。"#. Tag: para#: batch.xml:135#, no-c-formatmsgid """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 """from節では単一のエンティティ名だけが可能で、 任意で別名を付けることができま""す。 エンティティ名に別名が与えられると、どのようなプロパティ参照も、 その別""名を使って修飾しなければなりません。 もしエンティティ名に別名が与えられなけれ""ば、 どのようなプロパティ参照も修飾してはなりません。"#. Tag: para#: batch.xml:143#, no-c-formatmsgid """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 """(暗黙的であれ明示的であれ)<xref linkend=\"queryhql-joins-forms\">結合</""xref> をバルクHQLクエリ内で指定することはできません。 サブクエリはwhere節で使""うことができます サブクエリそのものは、結合を含められます。"#. Tag: para#: batch.xml:150#, no-c-formatmsgid "The where-clause is also optional."msgstr "where節はオプションです。"#. Tag: para#: batch.xml:156#, no-c-formatmsgid """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 """例として、HQLの <literal>UPDATE</literal> を実行するには、 <literal>Query.""executeUpdate()</literal> メソッドを使ってください。 (このメソッドはおなじみ""のJDBC <literal>PreparedStatement.executeUpdate()</literal> から名付けられま""した): d"#. Tag: programlisting#: batch.xml:162#, no-c-formatmsgid """<![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 ""#. Tag: para#: batch.xml:164#, no-c-formatmsgid """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> 文は、デフォルトでは、作用するエンティティの ""<xref linkend=\"mapping-declaration-version\">version</xref> や <xref ""linkend=\"mapping-declaration-timestamp\">timestamp</xref> プロパティの値には""影響しません。 これはEJB3の仕様にも受け継がれています。 しかし ""<literal>versioned update</literal> を使って、 <literal>version</literal> や ""<literal>timestamp</literal> プロパティの値を強制的にリセットさせることができ""ます。 これは <literal>UPDATE</literal> キーワードの後に <literal>VERSIONED</""literal> キーワードを追加することで行えます。"#. Tag: programlisting#: batch.xml:174#, no-c-formatmsgid """<![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 ""#. Tag: para#: batch.xml:176#, no-c-formatmsgid """Note that 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:181#, no-c-formatmsgid """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:186#, no-c-formatmsgid """<![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 ""#. Tag: para#: batch.xml:188#, no-c-formatmsgid """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 """<literal>Query.executeUpdate()</literal> メソッドが返す <literal>int</""literal> の値は、この操作が影響を及ぼしたエンティティの数です。 これが影響す""るデータベース内の行数と、相互に関係するかどうかを考えてみてください。 HQLバ""ルク操作は、結果として、実際のSQL文が複数実行されることになります。 例えば""joined-subclassです。 返される数は、その文によって影響された実際のエンティ""ティの数を示します。 joined-subclassの例に戻ると、サブクラスの一つに対する削""除は、 そのサブクラスがマッピングされたテーブルだけではなく、 「ルート」テー""ブルと継承階層をさらに下ったjoined-subclassのテーブルの削除になります。"#. Tag: para#: batch.xml:199#, no-c-formatmsgid """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 エンティティ""名 プロパティリスト select文</literal> です。 注意すべき点がいくつかありま""す:"#. Tag: para#: batch.xml:207#, no-c-formatmsgid """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:210#, no-c-formatmsgid """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 """プロパティリストは、SQLの <literal>INSERT</literal> 文における <literal>カラ""ムの仕様</literal> に類似しています。 継承のマッピングに含まれるエンティティ""に対して、 クラスレベルで直接定義されたプロパティだけが、プロパティリストに使""えます。 スーパークラスのプロパティは認められず、サブクラスのプロパティは効果""がありません。 言い換えると <literal>INSERT</literal> 文は、本質的にポリモー""フィックではありません。"#. Tag: para#: batch.xml:220#, no-c-formatmsgid """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 """select文の返り値の型がinsert文が期待する型とマッチしていれば、 そのselect文は""妥当なHQL selectクエリとなりえます。 現在このチェックをデータベースへ任せるの""ではなく、クエリのコンパイル時にチェックします。 このことは、""<emphasis>equal</emphasis>とは違い、 Hibernateの <literal>Type</literal> 間""の <emphasis>equivalent</emphasis> に関する 問題を引き起こすことに注意してく""ださい。 これは <literal>org.hibernate.type.DataType</literal> として定義され""たプロパティと、 <literal>org.hibernate.type.TimestampType</literal> として定""義されたプロパティの間のミスマッチの問題を引き起こします。 データベースがそれ""らを区別できなくても、変換することができても、この問題は発生します。"#. Tag: para#: batch.xml:232#, no-c-formatmsgid """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 """idプロパティに対して、insert文には二つの選択肢があります。 プロパティリストで""明示的にidプロパティを指定するか (この場合、対応するselect式から値が取られま""す)、 プロパティリストから除外するか (この場合、生成される値が使われます)""のいずれかです。 後者の選択肢は、データベース内を操作するidジェネレータを使う""ときのみ、利用可能です。 この選択肢を採る場合、「インメモリ」型のジェネレータ""を使うと、構文解析時に例外が発生します。 この議論では、インデータベース型ジェ""ネレータは <literal>org.hibernate.id.SequenceGenerator</literal> (とそのサブ""クラス)と、<literal>org.hibernate.id.PostInsertIdentifierGenerator</""literal> の実装であると考えています。 ここで最も注意すべき例外は、""<literal>org.hibernate.id.TableHiLoGenerator</literal> です。 値を取得する選""択可能な方法がないため、このジェネレータを使うことはできません。"#. Tag: para#: batch.xml:247#, no-c-formatmsgid """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文には二つの選択肢があります。 プロパティリス""トで明示的にプロパティを指定するか (この場合、対応するselect式から値が取られ""ます)、 プロパティリストから除外するか (この場合、<literal>org.hibernate.""type.VersionType</literal> で定義された <literal>シード値</literal> が使われ""ます)のいずれかです。"#. Tag: para#: batch.xml:257#, no-c-formatmsgid "An example HQL <literal>INSERT</literal> statement execution:"msgstr "HQLの <literal>INSERT</literal> 文の実行例です:"#. Tag: programlisting#: batch.xml:261#, no-c-formatmsgid """<![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 ""

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -