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

📄 performance.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 5 页
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2007-10-25 07:47+0000\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. Tag: title#: performance.xml:5#, no-c-formatmsgid "Improving performance"msgstr "パフォーマンスの改善"#. Tag: title#: performance.xml:8#, no-c-formatmsgid "Fetching strategies"msgstr "フェッチ戦略"#. Tag: para#: performance.xml:10#, no-c-formatmsgid """A <emphasis>fetching strategy</emphasis> is the strategy Hibernate will use ""for retrieving associated objects if the application needs to navigate the ""association. Fetch strategies may be declared in the O/R mapping metadata, ""or over-ridden by a particular HQL or <literal>Criteria</literal> query."msgstr """<emphasis>フェッチ戦略</emphasis> は、アプリケーションが関連をナビゲートする""必要がある ときに、Hibernateが関連オブジェクトを復元するために使用する戦略で""す。フェッチ戦略はO/Rマッピングの メタデータに宣言するか、特定のHQL、 ""<literal>Criteria</literal> クエリでオーバーライドします。"#. Tag: para#: performance.xml:17#, no-c-formatmsgid "Hibernate3 defines the following fetching strategies:"msgstr "Hibernate3は次に示すフェッチ戦略を定義しています。"#. Tag: para#: performance.xml:23#, no-c-formatmsgid """<emphasis>Join fetching</emphasis> - Hibernate retrieves the associated ""instance or collection in the same <literal>SELECT</literal>, using an ""<literal>OUTER JOIN</literal>."msgstr """<emphasis>結合フェッチ</emphasis> - Hibernateは <literal>OUTER JOIN</""literal> を使って、 関連するインスタンスやコレクションを1つの ""<literal>SELECT</literal> で復元します。"#. Tag: para#: performance.xml:30#, no-c-formatmsgid """<emphasis>Select fetching</emphasis> - a second <literal>SELECT</literal> is ""used to retrieve the associated entity or collection. Unless you explicitly ""disable lazy fetching by specifying <literal>lazy=\"false\"</literal>, this ""second select will only be executed when you actually access the association."msgstr """<emphasis>セレクトフェッチ</emphasis> - 2回目の <literal>SELECT</literal> で""関連するエンティティやコレクションを復元します。 <literal>lazy=\"false\"</""literal> で明示的に遅延フェッチを無効にしなければ、この2回目のselectは実際に ""関連にアクセスしたときのみ実行されるでしょう。"#. Tag: para#: performance.xml:39#, no-c-formatmsgid """<emphasis>Subselect fetching</emphasis> - a second <literal>SELECT</literal> ""is used to retrieve the associated collections for all entities retrieved in ""a previous query or fetch. Unless you explicitly disable lazy fetching by ""specifying <literal>lazy=\"false\"</literal>, this second select will only ""be executed when you actually access the association."msgstr """<emphasis>サブセレクトフェッチ</emphasis> - 2回目の <literal>SELECT</""literal> で、直前のクエリやフェッチで復元したすべての要素に関連するコレクショ""ンを 復元します。 <literal>lazy=\"false\"</literal> で明示的に遅延フェッチを""無効にしなければ、この2回目のselectは実際に 関連にアクセスしたときのみ実行さ""れるでしょう。"#. Tag: para#: performance.xml:48#, no-c-formatmsgid """<emphasis>Batch fetching</emphasis> - an optimization strategy for select ""fetching - Hibernate retrieves a batch of entity instances or collections in ""a single <literal>SELECT</literal>, by specifying a list of primary keys or ""foreign keys."msgstr """<emphasis>バッチフェッチ</emphasis> - セレクトフェッチのための最適化された戦""略 - Hibernateはエンティティのインスタンスやコレクションの一群を1回の ""<literal>SELECT</literal> で復元します。これは主キーや外部キーのリストを指定""することに により行います。"#. Tag: para#: performance.xml:57#, no-c-formatmsgid "Hibernate also distinguishes between:"msgstr "Hibernateは次に示す戦略とも区別をします。"#. Tag: para#: performance.xml:63#, no-c-formatmsgid """<emphasis>Immediate fetching</emphasis> - an association, collection or ""attribute is fetched immediately, when the owner is loaded."msgstr """<emphasis>即時フェッチ</emphasis> - 所有者のオブジェクトがロードされたとき""に、 関連、コレクションは即時にフェッチされます。"#. Tag: para#: performance.xml:69#, no-c-formatmsgid """<emphasis>Lazy collection fetching</emphasis> - a collection is fetched when ""the application invokes an operation upon that collection. (This is the ""default for collections.)"msgstr """<emphasis>遅延コレクションフェッチ</emphasis> - アプリケーションがコレクショ""ンに 対して操作を行ったときにコレクションをフェッチします。 (これはコレクショ""ンに対するデフォルトの動作です)"#. Tag: para#: performance.xml:76#, no-c-formatmsgid """<emphasis>\"Extra-lazy\" collection fetching</emphasis> - individual ""elements of the collection are accessed from the database as needed. ""Hibernate tries not to fetch the whole collection into memory unless ""absolutely needed (suitable for very large collections)"msgstr """<emphasis>\"特別な遅延\"コレクションフェッチ</emphasis> - コレクションの要素 ""1つ1つが独立して、必要なときにデータベースから取得されます。 Hibernateは必""要ないならば、コレクション全体をメモリにフェッチすることは 避けます(とても大""きなコレクションに適しています)。"#. Tag: para#: performance.xml:84#, no-c-formatmsgid """<emphasis>Proxy fetching</emphasis> - a single-valued association is fetched ""when a method other than the identifier getter is invoked upon the ""associated object."msgstr """<emphasis>プロキシフェッチ</emphasis> - 単一値関連は、識別子のgetter以外の メ""ソッドが関連オブジェクトで呼び出されるときにフェッチされます。"#. Tag: para#: performance.xml:91#, no-c-formatmsgid """<emphasis>\"No-proxy\" fetching</emphasis> - a single-valued association is ""fetched when the instance variable is accessed. Compared to proxy fetching, ""this approach is less lazy (the association is fetched even when only the ""identifier is accessed) but more transparent, since no proxy is visible to ""the application. This approach requires buildtime bytecode instrumentation ""and is rarely necessary."msgstr """<emphasis>\"プロキシなし\"フェッチ</emphasis> - 単一値関連は、インスタンス変""数に アクセスされたときにフェッチされます。プロキシフェッチと比較すると、この""方法は 遅延の度合いが少ない(関連は識別子にアクセスしただけでもフェッチされま""す) ですが、より透過的で、アプリケーションにプロキシが存在しないように見せま""す。 この方法はビルド時のバイトコード組み込みが必要になり、使う場面はまれで""す。"#. Tag: para#: performance.xml:101#, no-c-formatmsgid """<emphasis>Lazy attribute fetching</emphasis> - an attribute or single valued ""association is fetched when the instance variable is accessed. This approach ""requires buildtime bytecode instrumentation and is rarely necessary."msgstr """<emphasis>遅延属性フェッチ</emphasis> - 属性や単一値関連は、インスタンス変数""にアクセスした ときにフェッチされます。この方法はビルド時のバイトコード組み込""みが必要になり、 使う場面はまれです。"#. Tag: para#: performance.xml:110#, no-c-formatmsgid """We have two orthogonal notions here: <emphasis>when</emphasis> is the ""association fetched, and <emphasis>how</emphasis> is it fetched (what SQL is ""used). Don't confuse them! We use <literal>fetch</literal> to tune ""performance. We may use <literal>lazy</literal> to define a contract for ""what data is always available in any detached instance of a particular class."msgstr """二つの直行する概念があります: <emphasis>いつ</emphasis> 関連をフェッチする""か、 そして、 <emphasis>どうやって</emphasis> フェッチするか(どんなSQLを使っ""て)。 これらを混同しないでください! <literal>fetch</literal> はパフォーマン""スチューニングに使います。 <literal>lazy</literal> はあるクラスの分離されたイ""ンスタンスのうち、どのデータを常に 使用可能にするかの取り決めを定義します。"#. Tag: title#: performance.xml:119#, no-c-formatmsgid "Working with lazy associations"msgstr "遅延関連の働き"#. Tag: para#: performance.xml:121#, no-c-formatmsgid """By default, Hibernate3 uses lazy select fetching for collections and lazy ""proxy fetching for single-valued associations. These defaults make sense for ""almost all associations in almost all applications."msgstr """デフォルトでは、Hibernate3はコレクションに対しては遅延セレクトフェッチを使""い、 単一値関連には遅延プロキシフェッチを使います。これらのデフォルト動作はほ""ぼすべての アプリケーションのほぼすべての関連で意味があります。"#. Tag: para#: performance.xml:127#, no-c-formatmsgid """<emphasis>Note:</emphasis> if you set <literal>hibernate.""default_batch_fetch_size</literal>, Hibernate will use the batch fetch ""optimization for lazy fetching (this optimization may also be enabled at a ""more granular level)."msgstr """<emphasis>注:</emphasis><literal>hibernate.default_batch_fetch_size</""literal> をセットしたときは、Hibernateは 遅延フェッチのためのバッチフェッチ最""適化を使うでしょう (この最適化はより細かいレベルで有効にすることも出来ま""す)。"#. Tag: para#: performance.xml:134#, no-c-formatmsgid """However, lazy fetching poses one problem that you must be aware of. Access ""to a lazy association outside of the context of an open Hibernate session ""will result in an exception. For example:"msgstr """しかし、遅延フェッチは知っておかなければならない一つの問題があります。 ""Hibernateのsessionをオープンしているコンテキストの外から遅延関連にアクセスす""ると、 例外が発生します。例:"#. Tag: programlisting#: performance.xml:140#, no-c-formatmsgid """<![CDATA[s = sessions.openSession();\n""Transaction tx = s.beginTransaction();\n""            \n""User u = (User) s.createQuery(\"from User u where u.name=:userName\")\n""    .setString(\"userName\", userName).uniqueResult();\n""Map permissions = u.getPermissions();\n""\n""tx.commit();\n""s.close();\n""\n""Integer accessLevel = (Integer) permissions.get(\"accounts\");  // Error!]]>"msgstr ""#. Tag: para#: performance.xml:142#, no-c-formatmsgid """Since the permissions collection was not initialized when the ""<literal>Session</literal> was closed, the collection will not be able to ""load its state. <emphasis>Hibernate does not support lazy initialization for ""detached objects</emphasis>. The fix is to move the code that reads from the ""collection to just before the transaction is committed."msgstr """<literal>Session</literal> がクローズされたとき、permissionsコレクションは 初""期化されていないため、このコレクションは自身の状態をロードできません。 ""<emphasis>Hibernateは切り離されたオブジェクトの遅延初期化はサポート していま""せん</emphasis> 。修正方法として、コレクションから読み込みを行うコードを トラ""ンザクションをコミットする直前に移動させます。"#. Tag: para#: performance.xml:150#, no-c-formatmsgid """Alternatively, we could use a non-lazy collection or association, by ""specifying <literal>lazy=\"false\"</literal> for the association mapping. ""However, it is intended that lazy initialization be used for almost all ""collections and associations. If you define too many non-lazy associations ""in your object model, Hibernate will end up needing to fetch the entire ""database into memory in every transaction!"msgstr """一方で、 <literal>lazy=\"false\"</literal> を関連マッピングに指定すること""で、 遅延処理をしないコレクションや関連を使うことが出来ます。 しかしながら、""遅延初期化はほぼすべてのコレクションや関連で使われることを 意図しています。も""しあなたのオブジェクトモデルの中に遅延処理をしない関連を 多く定義してしまう""と、Hibernateは最終的にはトランザクション毎に ほぼ完全なデータベースをメモリ""の中にフェッチすることになるでしょう!"#. Tag: para#: performance.xml:159#, no-c-formatmsgid """On the other hand, we often want to choose join fetching (which is non-lazy ""by nature) instead of select fetching in a particular transaction. We'll now ""see how to customize the fetching strategy. In Hibernate3, the mechanisms ""for choosing a fetch strategy are identical for single-valued associations ""and collections."msgstr """他方では、特定のトランザクションにおいてセレクトフェッチの代わりに 結合フェッ""チ(当然これは遅延処理ではなくなります)を選択したいことが 時々あります。これ""からフェッチ戦略をカスタマイズする方法をお見せします。 Hibernate3では、フェッ""チ戦略を選択する仕組みは単一値関連とコレクションで 変わりはありません。"#. Tag: title#: performance.xml:170

⌨️ 快捷键说明

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