|
Hibernate example source code file (performance.po)
This example Hibernate source code file (performance.po) is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.
The Hibernate performance.po source code
# translation of Collection_Mapping.po to
# Xi HUANG <xhuang@redhat.com>, 2007, 2010.
msgid ""
msgstr ""
"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-07-20 21:02+0000\n"
"PO-Revision-Date: 2010-01-20 14:25+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
#: performance.xml:31
#, no-c-format
msgid "Improving performance"
msgstr "パフォーマンスã®æ”¹å–„"
#. Tag: title
#: performance.xml:34
#, no-c-format
msgid "Fetching strategies"
msgstr "フェッãƒæˆ¦ç•¥"
#. Tag: para
#: performance.xml:36
#, no-c-format
msgid ""
"Hibernate uses a <emphasis>fetching strategy to retrieve "
"associated objects if the application needs to navigate the association. "
"Fetch strategies can be declared in the O/R mapping metadata, or over-ridden "
"by a particular HQL or <literal>Criteria query."
msgstr ""
"<emphasis>フェッãƒæˆ¦ç•¥ ã¯ã€ã‚¢ãƒ—リケーションãŒé–¢é€£ã‚’ナビゲートã™ã‚‹"
"å¿…è¦ãŒã‚ã‚‹ã¨ãã«ã€ Hibernate ãŒé–¢é€£ã‚ªãƒ–ジェクトを復元ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹æˆ¦ç•¥ã§"
"ã™ã€‚フェッãƒæˆ¦ç•¥ã¯ O/R マッピングã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«å®£è¨€ã™ã‚‹ã‹ã€ç‰¹å®šã® HQL 〠"
"<literal>Criteria クエリã§ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã—ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:42
#, no-c-format
msgid "Hibernate3 defines the following fetching strategies:"
msgstr "Hibernate3 ã¯æ¬¡ã«ç¤ºã™ãƒ•ã‚§ãƒƒãƒæˆ¦ç•¥ã‚’定義ã—ã¦ã„ã¾ã™:"
#. Tag: para
#: performance.xml:46
#, no-c-format
msgid ""
"<emphasis>Join fetching: Hibernate retrieves the associated "
"instance or collection in the same <literal>SELECT, using an "
"<literal>OUTER JOIN."
msgstr ""
"<emphasis>çµåˆãƒ•ã‚§ãƒƒãƒ - Hibernate 㯠OUTER JOIN ã§å¾©å…ƒã—ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:53
#, no-c-format
msgid ""
"<emphasis>Select fetching: a second SELECT is "
"used to retrieve the associated entity or collection. Unless you explicitly "
"disable lazy fetching by specifying <literal>lazy=\"false\", this "
"second select will only be executed when you access the association."
msgstr ""
"<emphasis>セレクトフェッム- 2回目㮠SELECT ã§"
"関連ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚„コレクションを復元ã—ã¾ã™ã€‚ <literal>lazy=\"false\": a second SELECT "
"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\", this second select will only "
"be executed when you access the association."
msgstr ""
"<emphasis>サブセレクトフェッム- 2回目㮠SELECT ã§æ˜Žç¤ºçš„ã«é…延フェッãƒã‚’ç„¡"
"効ã«ã—ãªã‘ã‚Œã°ã€ã“ã®2回目㮠select ã¯å®Ÿéš›ã«é–¢é€£ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã¨ãã®ã¿å®Ÿè¡Œã•ã‚Œ"
"ã‚‹ã§ã—ょã†ã€‚"
#. Tag: para
#: performance.xml:70
#, no-c-format
msgid ""
"<emphasis>Batch fetching: an optimization strategy for select "
"fetching. Hibernate retrieves a batch of entity instances or collections in "
"a single <literal>SELECT by specifying a list of primary or "
"foreign keys."
msgstr ""
"<emphasis>ãƒãƒƒãƒãƒ•ã‚§ãƒƒãƒ - セレクトフェッãƒã®ãŸã‚ã®æœ€é©åŒ–ã•ã‚ŒãŸæˆ¦"
"ç•¥ - Hibernate ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚„コレクションã®ä¸€ç¾¤ã‚’1回㮠"
"<literal>SELECT ã§å¾©å…ƒã—ã¾ã™ã€‚ã“ã‚Œã¯ä¸»ã‚ーや外部ã‚ーã®ãƒªã‚¹ãƒˆã‚’指定"
"ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šè¡Œã„ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:77
#, no-c-format
msgid "Hibernate also distinguishes between:"
msgstr "Hibernate ã¯æ¬¡ã«ç¤ºã™æˆ¦ç•¥ã¨ã‚‚区別をã—ã¾ã™: "
#. Tag: para
#: performance.xml:81
#, no-c-format
msgid ""
"<emphasis>Immediate fetching: an association, collection or "
"attribute is fetched immediately when the owner is loaded."
msgstr ""
"<emphasis>å³æ™‚フェッム- 所有者ã®ã‚ªãƒ–ジェクトãŒãƒãƒ¼ãƒ‰ã•ã‚ŒãŸã¨ã"
"ã«ã€é–¢é€£ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯å³æ™‚ã«ãƒ•ã‚§ãƒƒãƒã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#: performance.xml:87
#, no-c-format
msgid ""
"<emphasis>Lazy collection fetching: a collection is fetched when "
"the application invokes an operation upon that collection. This is the "
"default for collections."
msgstr ""
"<emphasis>é…延コレクションフェッム- アプリケーションãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§"
"ンã«å¯¾ã—ã¦æ“作を行ã£ãŸã¨ãã«ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’フェッãƒã—ã¾ã™ã€‚(ã“ã‚Œã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³"
"ã«å¯¾ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å‹•ä½œã§ã™)"
#. Tag: para
#: performance.xml:93
#, no-c-format
msgid ""
"<emphasis>\"Extra-lazy\" collection fetching: 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. It "
"is suitable for large collections."
msgstr ""
"<emphasis>「特別ãªé…延ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒ•ã‚§ãƒƒãƒ - コレクションã®è¦ç´ "
"1ã¤ï¼‘ã¤ãŒç‹¬ç«‹ã—ã¦ã€å¿…è¦ãªã¨ãã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰å–å¾—ã•ã‚Œã¾ã™ã€‚ Hibernate ã¯å¿…"
"è¦ãªã„ãªã‚‰ã°ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“をメモリã«ãƒ•ã‚§ãƒƒãƒã™ã‚‹ã“ã¨ã¯é¿ã‘ã¾ã™ï¼ˆã¨ã¦ã‚‚大"
"ããªã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«é©ã—ã¦ã„ã¾ã™ï¼‰ã€‚"
#. Tag: para
#: performance.xml:101
#, no-c-format
msgid ""
"<emphasis>Proxy fetching: a single-valued association is fetched "
"when a method other than the identifier getter is invoked upon the "
"associated object."
msgstr ""
"<emphasis>プãƒã‚シフェッム- å˜ä¸€å€¤é–¢é€£ã¯ã€è˜åˆ¥åã® getter 以外ã®"
"メソッドãŒé–¢é€£ã‚ªãƒ–ジェクトã§å‘¼ã³å‡ºã•ã‚Œã‚‹ã¨ãã«ãƒ•ã‚§ãƒƒãƒã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#: performance.xml:107
#, no-c-format
msgid ""
"<emphasis>\"No-proxy\" fetching: 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. It is also more transparent, since no proxy is "
"visible to the application. This approach requires buildtime bytecode "
"instrumentation and is rarely necessary."
msgstr ""
"<emphasis>「プãƒã‚ã‚·ãªã—ã€ãƒ•ã‚§ãƒƒãƒ - å˜ä¸€å€¤é–¢é€£ã¯ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å¤‰"
"æ•°ã«ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚ŒãŸã¨ãã«ãƒ•ã‚§ãƒƒãƒã•ã‚Œã¾ã™ã€‚プãƒã‚シフェッãƒã¨æ¯”較ã™ã‚‹ã¨ã€ã“ã®"
"方法ã¯é…延ã®åº¦åˆã„ãŒå°‘ãªã„(関連ã¯è˜åˆ¥åã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã ã‘ã§ã‚‚フェッãƒã•ã‚Œã¾"
"ã™ï¼‰ã§ã™ãŒã€ã‚ˆã‚Šé€éŽçš„ã§ã€ã‚¢ãƒ—リケーションã«ãƒ—ãƒã‚ã‚·ãŒå˜åœ¨ã—ãªã„よã†ã«è¦‹ã›ã¾"
"ã™ã€‚ã“ã®æ–¹æ³•ã¯ãƒ“ルド時ã®ãƒã‚¤ãƒˆã‚³ãƒ¼ãƒ‰çµ„ã¿è¾¼ã¿ãŒå¿…è¦ã«ãªã‚Šã€ä½¿ã†å ´é¢ã¯ã¾ã‚Œã§"
"ã™ã€‚"
#. Tag: para
#: performance.xml:117
#, no-c-format
msgid ""
"<emphasis>Lazy attribute fetching: 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>é…延属性フェッム- 属性やå˜ä¸€å€¤é–¢é€£ã¯ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å¤‰æ•°"
"ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã¨ãã«ãƒ•ã‚§ãƒƒãƒã•ã‚Œã¾ã™ã€‚ã“ã®æ–¹æ³•ã¯ãƒ“ルド時ã®ãƒã‚¤ãƒˆã‚³ãƒ¼ãƒ‰çµ„ã¿è¾¼"
"ã¿ãŒå¿…è¦ã«ãªã‚Šã€ä½¿ã†å ´é¢ã¯ã¾ã‚Œã§ã™ã€‚"
#. Tag: para
#: performance.xml:124
#, no-c-format
msgid ""
"We have two orthogonal notions here: <emphasis>when is the "
"association fetched and <emphasis>how is it fetched. It is "
"important that you do not confuse them. We use <literal>fetch to "
"tune performance. We can use <literal>lazy to define a contract "
"for what data is always available in any detached instance of a particular "
"class."
msgstr ""
"二ã¤ã®ç›´è¡Œã™ã‚‹æ¦‚念ãŒã‚ã‚Šã¾ã™: <emphasis>ã„㤠関連をフェッãƒã™ã‚‹"
"ã‹ã€ãã—ã¦ã€ <emphasis>ã©ã†ã‚„ã£ã¦ フェッãƒã™ã‚‹ã‹ï¼ˆã©ã‚“㪠SQL ã‚’"
"使ã£ã¦ï¼‰ã€‚ã“れらを混åŒã—ãªã„ã§ãã ã•ã„。 <literal>fetch ã¯ãƒ‘フォー"
"マンスãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°ã«ä½¿ã„ã¾ã™ã€‚ <literal>lazy ã¯ã‚るクラスã®åˆ†é›¢ã•ã‚Œ"
"ãŸã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®ã†ã¡ã€ã©ã®ãƒ‡ãƒ¼ã‚¿ã‚’常ã«ä½¿ç”¨å¯èƒ½ã«ã™ã‚‹ã‹ã®å–り決ã‚を定義ã—ã¾"
"ã™ã€‚"
#. Tag: title
#: performance.xml:132
#, no-c-format
msgid "Working with lazy associations"
msgstr "é…延関連ã®åƒã"
#. Tag: para
#: performance.xml:134
#, no-c-format
msgid ""
"By default, Hibernate3 uses lazy select fetching for collections and lazy "
"proxy fetching for single-valued associations. These defaults make sense for "
"most associations in the majority of applications."
msgstr ""
"デフォルトã§ã¯ã€ Hibernate3 ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã—ã¦ã¯é…延セレクトフェッãƒã‚’使"
"ã„ã€å˜ä¸€å€¤é–¢é€£ã«ã¯é…延プãƒã‚シフェッãƒã‚’使ã„ã¾ã™ã€‚ã“れらã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå‹•ä½œã¯ã»"
"ã¼ã™ã¹ã¦ã®ã‚¢ãƒ—リケーションã®ã»ã¼ã™ã¹ã¦ã®é–¢é€£ã§æ„味ãŒã‚ã‚Šã¾ã™ã€‚"
#. Tag: para
#: performance.xml:138
#, no-c-format
msgid ""
"If you set <literal>hibernate.default_batch_fetch_size, Hibernate "
"will use the batch fetch optimization for lazy fetching. This optimization "
"can also be enabled at a more granular level."
msgstr ""
"<emphasis>注:hibernate.default_batch_fetch_size was closed, the collection will not be able to "
"load its state. <emphasis>Hibernate does not support lazy initialization for "
"detached objects</emphasis>. This can be fixed by moving the code that reads "
"from the collection to just before the transaction is committed."
msgstr ""
"<literal>Session ãŒã‚¯ãƒãƒ¼ã‚ºã•ã‚ŒãŸã¨ã〠permissions コレクションã¯"
"åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ã“ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯è‡ªèº«ã®çŠ¶æ…‹ã‚’ãƒãƒ¼ãƒ‰ã§ãã¾ã›ã‚“。 "
"<emphasis>Hibernate ã¯åˆ‡ã‚Šé›¢ã•ã‚ŒãŸã‚ªãƒ–ジェクトã®é…延åˆæœŸåŒ–ã¯ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾"
"ã›ã‚“</emphasis> 。修æ£æ–¹æ³•ã¨ã—ã¦ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰èªã¿è¾¼ã¿ã‚’è¡Œã†ã‚³ãƒ¼ãƒ‰ã‚’トラ"
"ンザクションをコミットã™ã‚‹ç›´å‰ã«ç§»å‹•ã•ã›ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:155
#, no-c-format
msgid ""
"Alternatively, you can use a non-lazy collection or association, by "
"specifying <literal>lazy=\"false\" 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 fetch the entire database into memory "
"in every transaction."
msgstr ""
"一方ã§ã€ <literal>lazy=\"false\" を関連マッピングã«æŒ‡å®šã™ã‚‹ã“ã¨ã§ã€"
"é…延処ç†ã‚’ã—ãªã„コレクションや関連を使ã†ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚ã—ã‹ã—ãªãŒã‚‰ã€é…延åˆ"
"期化ã¯ã»ã¼ã™ã¹ã¦ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚„関連ã§ä½¿ã‚れるã“ã¨ã‚’æ„図ã—ã¦ã„ã¾ã™ã€‚ã‚‚ã—ã‚ãª"
"ãŸã®ã‚ªãƒ–ジェクトモデルã®ä¸ã«é…延処ç†ã‚’ã—ãªã„関連を多ã定義ã—ã¦ã—ã¾ã†ã¨ã€ "
"Hibernate ã¯æœ€çµ‚çš„ã«ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³æ¯Žã«ã»ã¼å®Œå…¨ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’メモリã®ä¸"
"ã«ãƒ•ã‚§ãƒƒãƒã™ã‚‹ã“ã¨ã«ãªã‚‹ã§ã—ょã†ã€‚"
#. Tag: para
#: performance.xml:162
#, no-c-format
msgid ""
"On the other hand, you can use join fetching, which is non-lazy by nature, "
"instead of select fetching in a particular transaction. We will now explain "
"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
#, no-c-format
msgid "Tuning fetch strategies"
msgstr "フェッãƒæˆ¦ç•¥ã®ãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°"
#. Tag: para
#: performance.xml:172
#, no-c-format
msgid ""
"Select fetching (the default) is extremely vulnerable to N+1 selects "
"problems, so we might want to enable join fetching in the mapping document:"
msgstr ""
"セレクトフェッãƒï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ã¯ N+1 セレクトå•é¡Œã¨ã„ã†å¤§ããªå¼±ç‚¹ãŒã‚ã‚‹ãŸã‚ã€"
"マッピング定義ã§çµåˆãƒ•ã‚§ãƒƒãƒã‚’有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™:"
#. Tag: programlisting
#: performance.xml:176
#, fuzzy, no-c-format
msgid ""
"<set name=\"permissions\"\n"
" fetch=\"join\">\n"
" <key column=\"userId\"/>\n"
" <one-to-many class=\"Permission\"/>\n"
"</set"
msgstr ""
"<set name=\"permissions\" \n"
" fetch=\"join\">\n"
" <key column=\"userId\"/>\n"
" <one-to-many class=\"Permission\"/>\n"
"</set"
#. Tag: programlisting
#: performance.xml:178
#, fuzzy, no-c-format
msgid "<many-to-one name=\"mother\" class=\"Cat\" fetch=\"join\"/>"
msgstr "<many-to-one name=\"mother\" class=\"Cat\" fetch=\"join\"/>"
#. Tag: para
#: performance.xml:180
#, no-c-format
msgid ""
"The <literal>fetch strategy defined in the mapping document "
"affects:"
msgstr ""
"マッピング定義ã§å®šç¾©ã—㟠<literal>フェッム戦略ã¯æ¬¡ã®ã‚‚ã®ã«å½±éŸ¿ã—ã¾"
"ã™:"
#. Tag: para
#: performance.xml:185
#, no-c-format
msgid "retrieval via <literal>get() or load()"
msgstr "<literal>get() ã‚„ load() ã«ã‚ˆã‚‹å¾©å…ƒ"
#. Tag: para
#: performance.xml:190
#, no-c-format
msgid "retrieval that happens implicitly when an association is navigated"
msgstr "関連ã«ãƒŠãƒ“ゲートã—ãŸã¨ãã«ç™ºç”Ÿã™ã‚‹æš—黙的ãªå¾©å…ƒ"
#. Tag: para
#: performance.xml:195
#, no-c-format
msgid "<literal>Criteria queries"
msgstr "<literal>Criteria クエリ"
#. Tag: para
#: performance.xml:199
#, no-c-format
msgid "HQL queries if <literal>subselect fetching is used"
msgstr "<literal>サブセレクト フェッãƒã‚’使ㆠHQL クエリ"
#. Tag: para
#: performance.xml:204
#, no-c-format
msgid ""
"Irrespective of the fetching strategy you use, the defined non-lazy graph is "
"guaranteed to be loaded into memory. This might, however, result in several "
"immediate selects being used to execute a particular HQL query."
msgstr ""
"ãŸã¨ãˆã©ã‚“ãªãƒ•ã‚§ãƒƒãƒæˆ¦ç•¥ã‚’使ã£ãŸã¨ã—ã¦ã‚‚ã€é…延ã§ã¯ãªã„グラフã¯ãƒ¡ãƒ¢ãƒªã«èªã¿è¾¼"
"ã¾ã‚Œã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€ç‰¹å®šã® HQL クエリを実行ã™ã‚‹ãŸã‚ã«ã„ãã¤ã‹"
"ã® SELECT æ–‡ãŒå³æ™‚実行ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚‹ã®ã§æ³¨æ„ã—ã¦ãã ã•ã„。"
#. Tag: para
#: performance.xml:209
#, no-c-format
msgid ""
"Usually, the mapping document is not used to customize fetching. Instead, we "
"keep the default behavior, and override it for a particular transaction, "
"using <literal>left join fetch in HQL. This tells Hibernate to "
"fetch the association eagerly in the first select, using an outer join. In "
"the <literal>Criteria query API, you would use "
"<literal>setFetchMode(FetchMode.JOIN)."
msgstr ""
"通常ã¯ã€ãƒžãƒƒãƒ”ング定義ã§ãƒ•ã‚§ãƒƒãƒã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã¯è¡Œã„ã¾ã›ã‚“。代ã‚ã‚Šã«ã€ãƒ‡ãƒ•ã‚©"
"ルトã®å‹•ä½œã®ã¾ã¾ã«ã—ã¦ãŠã„ã¦ã€ HQL 㧠<literal>left join fetch を指"
"定ã™ã‚‹ã“ã¨ã§ç‰¹å®šã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã§å‹•ä½œã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã—ã¾ã™ã€‚ã“れ㯠"
"Hibernate ã«åˆå›žã®ã‚»ãƒ¬ã‚¯ãƒˆã§å¤–部çµåˆã‚’使ã£ã¦é–¢é€£ã‚’å…ˆã«ãƒ•ã‚§ãƒƒãƒã™ã‚‹ã‚ˆã†ã«æŒ‡å®š"
"ã—ã¦ã„ã¾ã™ã€‚ <literal>Criteria クエリ㮠API ã§ã¯ã€ "
"<literal>setFetchMode(FetchMode.JOIN) を使ã†ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:216
#, no-c-format
msgid ""
"If you want to change the fetching strategy used by <literal>get() "
"or <literal>load(), you can use a Criteria "
"query. For example:"
msgstr ""
"ã‚‚ã— <literal>get() ã‚„ load() ã§ä½¿ã‚れるフェッãƒ"
"戦略を変ãˆãŸã„ã¨æ„Ÿã˜ãŸã¨ãã«ã¯ã€å˜ç´”ã« <literal>Criteria クエリを"
"使ã£ã¦ãã ã•ã„。例:"
#. Tag: programlisting
#: performance.xml:220
#, fuzzy, no-c-format
msgid ""
"User user = (User) session.createCriteria(User.class)\n"
" .setFetchMode(\"permissions\", FetchMode.JOIN)\n"
" .add( Restrictions.idEq(userId) )\n"
" .uniqueResult();"
msgstr ""
"User user = (User) session.createCriteria(User.class)\n"
" .setFetchMode(\"permissions\", FetchMode.JOIN)\n"
" .add( Restrictions.idEq(userId) )\n"
" .uniqueResult();"
#. Tag: para
#: performance.xml:222
#, no-c-format
msgid ""
"This is Hibernate's equivalent of what some ORM solutions call a \"fetch plan"
"\"."
msgstr ""
"(ã“ã‚Œã¯ã„ãã¤ã‹ã® ORM ソリューション㌠\"fetch plan\" ã¨å‘¼ã‚“ã§ã„ã‚‹ã‚‚ã®ã¨åŒã˜"
"ã§ã™ã€‚)"
#. Tag: para
#: performance.xml:225
#, no-c-format
msgid ""
"A completely different approach to problems with N+1 selects is to use the "
"second-level cache."
msgstr ""
"N+1 セレクトå•é¡Œã‚’é¿ã‘ã‚‹ãŸã‚ã®ã¾ã£ãŸãé•ã†æ–¹æ³•ã¯ã€ç¬¬2レベルã‚ャッシュを使ã†ã“"
"ã¨ã§ã™ã€‚"
#. Tag: title
#: performance.xml:230
#, no-c-format
msgid "Single-ended association proxies"
msgstr "å˜ä¸€ç«¯é–¢é€£ãƒ—ãƒã‚ã‚·"
#. Tag: para
#: performance.xml:232
#, no-c-format
msgid ""
"Lazy fetching for collections is implemented using Hibernate's own "
"implementation of persistent collections. However, a different mechanism is "
"needed for lazy behavior in single-ended associations. The target entity of "
"the association must be proxied. Hibernate implements lazy initializing "
"proxies for persistent objects using runtime bytecode enhancement which is "
"accessed via the CGLIB library."
msgstr ""
"コレクションã®é…延フェッãƒã¯ã€ Hibernate 自身ã®å®Ÿè£…ã«ã‚ˆã‚‹æ°¸ç¶šã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’"
"使ã£ã¦å®Ÿç¾ã—ã¦ã„ã¾ã™ã€‚ã—ã‹ã—ã€å˜ä¸€ç«¯é–¢é€£ã«ãŠã‘ã‚‹é…延処ç†ã§ã¯ã€é•ã†ä»•çµ„ã¿ãŒå¿…"
"è¦ã§ã™ã€‚対象ã®é–¢é€£ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ—ãƒã‚ã‚·ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 Hibernate ã¯"
"(ã™ã°ã‚‰ã—ã„ CGLIB ライブラリã«ã‚ˆã‚‹ï¼‰å®Ÿè¡Œæ™‚ã®ãƒã‚¤ãƒˆã‚³ãƒ¼ãƒ‰æ‹¡å¼µã‚’使ã£ã¦æ°¸ç¶šã‚ªãƒ–"
"ジェクトã®é…延åˆæœŸåŒ–プãƒã‚シを実ç¾ã—ã¦ã„ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:239
#, no-c-format
msgid ""
"At startup, Hibernate3 generates proxies by default for all persistent "
"classes and uses them to enable lazy fetching of <literal>many-to-oneone-to-one associations."
msgstr ""
"デフォルトã§ã¯ã€ Hibernate3 ã¯ï¼ˆé–‹å§‹æ™‚ã«ï¼‰ã™ã¹ã¦ã®æ°¸ç¶šã‚¯ãƒ©ã‚¹ã®ãƒ—ãƒã‚シを生æˆ"
"ã—ã€ãれらを使ã£ã¦ã€ <literal>many-to-one ã‚„ one-to-one attribute. By default, "
"Hibernate uses a subclass of the class. <emphasis>The proxied class must "
"implement a default constructor with at least package visibility. This "
"constructor is recommended for all persistent classes</emphasis>."
msgstr ""
"マッピングファイル㧠<literal>proxy 属性ã«ã‚ˆã£ã¦ã€ã‚¯ãƒ©ã‚¹ã®ãƒ—ãƒã‚ã‚·"
"インターフェースã¨ã—ã¦ä½¿ã†ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’宣言ã§ãã¾ã™ã€‚デフォルトã§ã¯ã€ "
"Hibernate ã¯ãã®ã‚¯ãƒ©ã‚¹ã®ã‚µãƒ–クラスを使ã„ã¾ã™ã€‚ <emphasis>プãƒã‚シクラスã¯å°‘ãª"
"ãã¨ã‚‚パッケージå¯è¦–ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã‚’実装ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ã“ã¨ã«"
"注æ„ã—ã¦ãã ã•ã„。ã™ã¹ã¦ã®æ°¸ç¶šã‚¯ãƒ©ã‚¹ã«ã“ã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã‚’推奨ã—ã¾ã™ã€‚</"
"emphasis>"
#. Tag: para
#: performance.xml:251
#, no-c-format
msgid ""
"There are potential problems to note when extending this approach to "
"polymorphic classes.For example:"
msgstr ""
"ãƒãƒªãƒ¢ãƒ¼ãƒ•ã‚£ã‚ºãƒ ã®ã‚¯ãƒ©ã‚¹ã«å¯¾ã—ã¦ã“ã®æ–¹æ³•ã‚’é©ç”¨ã™ã‚‹ã¨ãã«ã„ãã¤ã‹è€ƒæ…®ã™ã‚‹ã“ã¨"
"ãŒã‚ã‚Šã¾ã™ã€‚例:"
#. Tag: programlisting
#: performance.xml:254
#, fuzzy, no-c-format
msgid ""
"<class name=\"Cat\" proxy=\"Cat\">\n"
" ......\n"
" <subclass name=\"DomesticCat\">\n"
" .....\n"
" </subclass>\n"
"</class>"
msgstr ""
"<class name=\"Cat\" proxy=\"Cat\">\n"
" ......\n"
" <subclass name=\"DomesticCat\">\n"
" .....\n"
" </subclass>\n"
"</class>"
#. Tag: para
#: performance.xml:256
#, no-c-format
msgid ""
"Firstly, instances of <literal>Cat will never be castable to "
"<literal>DomesticCat, even if the underlying instance is an "
"instance of <literal>DomesticCat:"
msgstr ""
"第一ã«ã€ <literal>Cat ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ DomesticCat ã§ã‚ã£ãŸã¨ã—ã¦ã‚‚ã§ã™:"
#. Tag: programlisting
#: performance.xml:260
#, fuzzy, no-c-format
msgid ""
"Cat cat = (Cat) session.load(Cat.class, id); // instantiate a proxy (does "
"not hit the db)\n"
"if ( cat.isDomesticCat() ) { // hit the db to initialize "
"the proxy\n"
" DomesticCat dc = (DomesticCat) cat; // Error!\n"
" ....\n"
"}"
msgstr ""
"Cat cat = (Cat) session.load(Cat.class, id); // instantiate a proxy (does "
"not hit the db)\n"
"if ( cat.isDomesticCat() ) { // hit the db to initialize "
"the proxy\n"
" DomesticCat dc = (DomesticCat) cat; // Error!\n"
" ....\n"
"}"
#. Tag: para
#: performance.xml:262
#, no-c-format
msgid "Secondly, it is possible to break proxy <literal>==:"
msgstr "第二ã«ã€ãƒ—ãƒã‚ã‚·ã® <literal>== ã¯æˆç«‹ã—ãªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚"
#. Tag: programlisting
#: performance.xml:265
#, fuzzy, no-c-format
msgid ""
"Cat cat = (Cat) session.load(Cat.class, id); // instantiate a Cat "
"proxy\n"
"DomesticCat dc = \n"
" (DomesticCat) session.load(DomesticCat.class, id); // acquire new "
"DomesticCat proxy!\n"
"System.out.println(cat==dc); // false"
msgstr ""
"Cat cat = (Cat) session.load(Cat.class, id); // instantiate a Cat "
"proxy\n"
"DomesticCat dc = \n"
" (DomesticCat) session.load(DomesticCat.class, id); // acquire new "
"DomesticCat proxy!\n"
"System.out.println(cat==dc); // false"
#. Tag: para
#: performance.xml:267
#, no-c-format
msgid ""
"However, the situation is not quite as bad as it looks. Even though we now "
"have two references to different proxy objects, the underlying instance will "
"still be the same object:"
msgstr ""
"ã—ã‹ã—ã€ã“ã‚Œã¯è¦‹ã‹ã‘ã»ã©æ‚ªã„状æ³ã¨ã„ã†ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ãŸã¨ãˆç•°ãªã£ãŸãƒ—ãƒ"
"ã‚シオブジェクトã¸ã®äºŒã¤ã®å‚ç…§ãŒã‚ã£ãŸã¨ã—ã¦ã‚‚ã€åŸºã¨ãªã‚‹ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯åŒã˜ã‚ª"
"ブジェクトã§ã™:"
#. Tag: programlisting
#: performance.xml:271
#, fuzzy, no-c-format
msgid ""
"cat.setWeight(11.0); // hit the db to initialize the proxy\n"
"System.out.println( dc.getWeight() ); // 11.0"
msgstr ""
"cat.setWeight(11.0); // hit the db to initialize the proxy\n"
"System.out.println( dc.getWeight() ); // 11.0"
#. Tag: para
#: performance.xml:273
#, no-c-format
msgid ""
"Third, you cannot use a CGLIB proxy for a <literal>final class or "
"a class with any <literal>final methods."
msgstr ""
"第三ã«ã€ <literal>final クラスや final メソッド"
"ã‚’æŒã¤ã‚¯ãƒ©ã‚¹ã« CGLIB プãƒã‚シを使ãˆã¾ã›ã‚“。"
#. Tag: para
#: performance.xml:276
#, no-c-format
msgid ""
"Finally, if your persistent object acquires any resources upon instantiation "
"(e.g. in initializers or default constructor), then those resources will "
"also be acquired by the proxy. The proxy class is an actual subclass of the "
"persistent class."
msgstr ""
"最後ã«ã€ã‚‚ã—永続オブジェクトã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–時 (例ãˆã°ã€åˆæœŸåŒ–処ç†ã‚„デフォル"
"トコンストラクタã®ä¸ã§) ã«ãªã‚“らã‹ã®ãƒªã‚½ãƒ¼ã‚¹ãŒå¿…è¦ã¨ãªã‚‹ãªã‚‰ã€ãã®ãƒªã‚½ãƒ¼ã‚¹ã‚‚"
"ã¾ãŸãƒ—ãƒã‚シを通ã—ã¦å–å¾—ã•ã‚Œã¾ã™ã€‚実際ã«ã¯ã€ãƒ—ãƒã‚シクラスã¯æ°¸ç¶šã‚¯ãƒ©ã‚¹ã®ã‚µãƒ–"
"クラスã§ã™ã€‚"
#. Tag: para
#: performance.xml:281
#, no-c-format
msgid ""
"These problems are all due to fundamental limitations in Java's single "
"inheritance model. To avoid these problems your persistent classes must each "
"implement an interface that declares its business methods. You should "
"specify these interfaces in the mapping file where <literal>CatImplCat and "
"<literal>DomesticCatImpl implements the interface "
"<literal>DomesticCat. For example:"
msgstr ""
"ã“れらã®å•é¡Œã¯ Java ã®å˜ä¸€ç¶™æ‰¿ãƒ¢ãƒ‡ãƒ«ã®åŽŸç†ä¸Šã®åˆ¶é™ã®ãŸã‚ã§ã™ã€‚ã‚‚ã—ã“れらã®å•"
"題をé¿ã‘ãŸã„ã®ãªã‚‰ã€ãƒ“ジãƒã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’宣言ã—ãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’ãã‚Œãžã‚Œæ°¸ç¶š"
"クラスã§å®Ÿè£…ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。マッピングファイルã§ã“れらã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼"
"スを指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例:"
#. Tag: programlisting
#: performance.xml:289
#, fuzzy, no-c-format
msgid ""
"<class name=\"CatImpl\" proxy=\"Cat\">\n"
" ......\n"
" <subclass name=\"DomesticCatImpl\" proxy=\"DomesticCat\">\n"
" .....\n"
" </subclass>\n"
"</class>"
msgstr ""
"<class name=\"CatImpl\" proxy=\"Cat\">\n"
" ......\n"
" <subclass name=\"DomesticCatImpl\" proxy=\"DomesticCat\">\n"
" .....\n"
" </subclass>\n"
"</class>"
#. Tag: para
#: performance.xml:291
#, fuzzy, no-c-format
msgid ""
"Then proxies for instances of <literal>Cat and "
"<literal>DomesticCat can be returned by load() "
"or <literal>iterate()."
msgstr ""
"第一ã«ã€ <literal>Cat ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ DomesticCat ã§ã‚ã£ãŸã¨ã—ã¦ã‚‚ã§ã™:"
#. Tag: programlisting
#: performance.xml:295
#, fuzzy, no-c-format
msgid ""
"Cat cat = (Cat) session.load(CatImpl.class, catid);\n"
"Iterator iter = session.createQuery(\"from CatImpl as cat where cat."
"name='fritz'\").iterate();\n"
"Cat fritz = (Cat) iter.next();"
msgstr ""
"Cat cat = (Cat) session.load(CatImpl.class, catid);\n"
"Iterator iter = session.iterate(\"from CatImpl as cat where cat."
"name='fritz'\");\n"
"Cat fritz = (Cat) iter.next();"
#. Tag: title
#: performance.xml:298
#, no-c-format
msgid "Note"
msgstr ""
#. Tag: para
#: performance.xml:300
#, fuzzy, no-c-format
msgid "<literal>list() does not usually return proxies."
msgstr "<literal>full join (ãŸã„ã¦ã„ã®å ´åˆä½¿ã„ã¥ã‚‰ã„)"
#. Tag: para
#: performance.xml:304
#, no-c-format
msgid ""
"Relationships are also lazily initialized. This means you must declare any "
"properties to be of type <literal>Cat, not CatImpl åž‹ã§å®£è¨€"
"ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ <literal>CatImpl ã§ã¯ã‚ã‚Šã¾ã›"
"ん。"
#. Tag: para
#: performance.xml:308
#, no-c-format
msgid ""
"Certain operations do <emphasis>not require proxy initialization:"
msgstr ""
"プãƒã‚ã‚·ã®åˆæœŸåŒ–ã‚’ <emphasis>å¿…è¦ã¨ã—ãªã„ æ“作もå˜åœ¨ã—ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:313
#, no-c-format
msgid ""
"<literal>equals(): if the persistent class does not override "
"<literal>equals()"
msgstr ""
"<literal>equals() (永続クラス㌠equals() をオー"
"ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã—ãªã„ã¨ã)"
#. Tag: para
#: performance.xml:318
#, no-c-format
msgid ""
"<literal>hashCode(): if the persistent class does not override "
"<literal>hashCode()"
msgstr ""
"<literal>hashCode() (永続クラス㌠hashCode() を"
"オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã—ãªã„ã¨ã)"
#. Tag: para
#: performance.xml:323
#, no-c-format
msgid "The identifier getter method"
msgstr "è˜åˆ¥åã® getter メソッド"
#. Tag: para
#: performance.xml:327
#, no-c-format
msgid ""
"Hibernate will detect persistent classes that override <literal>equals()hashCode()."
msgstr ""
"Hibernate 㯠<literal>equals() や hashCode() を"
"オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã—ãŸæ°¸ç¶šã‚¯ãƒ©ã‚¹ã‚’検出ã—ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:330
#, no-c-format
msgid ""
"By choosing <literal>lazy=\"no-proxy\" instead of the default "
"<literal>lazy=\"proxy\", you can avoid problems associated with "
"typecasting. However, buildtime bytecode instrumentation is required, and "
"all operations will result in immediate proxy initialization."
msgstr ""
"デフォルト㮠<literal>lazy=\"proxy\" ã®ä»£ã‚ã‚Šã«ã€ lazy="
"\"no-proxy\"</literal> ã‚’é¸ã‚“ã ã“ã¨ã§ã€åž‹å¤‰æ›ã«é–¢é€£ã™ã‚‹å•é¡Œã‚’回é¿ã™ã‚‹ã“ã¨ãŒå‡º"
"æ¥ã¾ã™ã€‚ã—ã‹ã—ã€ãƒ“ルド時ã®ãƒã‚¤ãƒˆã‚³ãƒ¼ãƒ‰çµ„ã¿è¾¼ã¿ãŒå¿…è¦ã«ãªã‚Šã€ã©ã®ã‚ˆã†ãªæ“作ã§"
"ã‚ã£ã¦ã‚‚ã€ãŸã ã¡ã«ãƒ—ãƒã‚ã‚·ã®åˆæœŸåŒ–ã‚’è¡Œã†ã“ã¨ã«ãªã‚‹ã§ã—ょã†ã€‚"
#. Tag: title
#: performance.xml:338
#, no-c-format
msgid "Initializing collections and proxies"
msgstr "コレクションã¨ãƒ—ãƒã‚ã‚·ã®åˆæœŸåŒ–"
#. Tag: para
#: performance.xml:340
#, no-c-format
msgid ""
"A <literal>LazyInitializationException will be thrown by Hibernate "
"if an uninitialized collection or proxy is accessed outside of the scope of "
"the <literal>Session, i.e., when the entity owning the collection "
"or having the reference to the proxy is in the detached state."
msgstr ""
"<literal>LazyInitializationException ã¯ã€ Session. You can force initialization by calling "
"<literal>cat.getSex() or cat.getKittens().size() をクãƒãƒ¼ã‚ºã™ã‚‹å‰ã«ãƒ—ãƒã‚シやコレクションã®åˆæœŸåŒ–ã‚’"
"確実ã«è¡Œã„ãŸã„ã¨ããŒã‚ã‚Šã¾ã™ã€‚ã‚‚ã¡ã‚ん〠<literal>cat.getSex() ã‚„ "
"<literal>cat.getKittens().size() ãªã©ã‚’常ã«å‘¼ã³å‡ºã™ã“ã¨ã§åˆæœŸåŒ–ã‚’å¼·"
"制ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ã€‚ã—ã‹ã—ã“ã‚Œã¯ã‚³ãƒ¼ãƒ‰ã‚’èªã‚€äººã‚’æ··ä¹±ã•ã›ã€æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‰ã¨"
"ã„ã†ç‚¹ã‹ã‚‰ã‚‚ä¸ä¾¿ã§ã™ã€‚"
#. Tag: para
#: performance.xml:353
#, no-c-format
msgid ""
"The static methods <literal>Hibernate.initialize() and "
"<literal>Hibernate.isInitialized(), provide the application with a "
"convenient way of working with lazily initialized collections or proxies. "
"<literal>Hibernate.initialize(cat) will force the initialization "
"of a proxy, <literal>cat, as long as its SessionHibernate.initialize( cat.getKittens() ) ã‚„ "
"<literal>Hibernate.isInitialized() ã¯é…延åˆæœŸåŒ–ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚„プãƒ"
"ã‚シを扱ã†ã¨ãã«ä¾¿åˆ©ãªæ–¹æ³•ã‚’アプリケーションã«æä¾›ã—ã¾ã™ã€‚ "
"<literal>Hibernate.initialize(cat) ã¯ã€ Session "
"ãŒã‚ªãƒ¼ãƒ—ンã—ã¦ã„ã‚‹é™ã‚Šã¯ <literal>cat プãƒã‚シを強制的ã«åˆæœŸåŒ–ã—ã¾"
"ã™ã€‚ <literal>Hibernate.initialize( cat.getKittens() ) 㯠kittens "
"コレクションã«å¯¾ã—ã¦åŒæ§˜ã®åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚"
#. Tag: para
#: performance.xml:362
#, no-c-format
msgid ""
"Another option is to keep the <literal>Session open until all "
"required collections and proxies have been loaded. In some application "
"architectures, particularly where the code that accesses data using "
"Hibernate, and the code that uses it are in different application layers or "
"different physical processes, it can be a problem to ensure that the "
"<literal>Session is open when a collection is initialized. There "
"are two basic ways to deal with this issue:"
msgstr ""
"別ã®é¸æŠžè‚¢ã¨ã—ã¦ã€å¿…è¦ãªã™ã¹ã¦ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚„プãƒã‚ã‚·ãŒãƒãƒ¼ãƒ‰ã•ã‚Œã‚‹ã¾ã§ "
"<literal>Session をオープンã«ã—ã¦ãŠã方法ãŒã‚ã‚Šã¾ã™ã€‚ã„ãã¤ã‹ã®ã‚¢ãƒ—"
"リケーションã®ã‚¢ãƒ¼ã‚テクãƒãƒ£ã§ã¯ã€ç‰¹ã« Hibernate ã«ã‚ˆã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã‚’è¡Œã†"
"コードã¨ã€ãれを使ã†ã‚³ãƒ¼ãƒ‰ãŒç•°ãªã‚‹ã‚¢ãƒ—リケーションã®ãƒ¬ã‚¤ãƒ¤ãƒ¼ã‚„ã€ç‰©ç†çš„ã«ç•°ãª"
"るプãƒã‚»ãƒƒã‚µã®ã¨ãã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒåˆæœŸåŒ–ã•ã‚Œã‚‹ã¨ãã« <literal>Session only at the end of a user request, once the "
"rendering of the view is complete (the <emphasis>Open Session in View is closed and the transaction "
"ended before returning to the user, even when an exception occurs during "
"rendering of the view. See the Hibernate Wiki for examples of this \"Open "
"Session in View\" pattern."
msgstr ""
"Web ベースã®ã‚¢ãƒ—リケーションã§ã¯ã€ãƒ“ューã®ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ãŒå®Œäº†ã—ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒ"
"終ã‚る一番最後㧠<literal>Session をクãƒãƒ¼ã‚ºã™ã‚‹ãŸã‚ã«ã€ã‚µãƒ¼ãƒ–レッ"
"トフィルタを使ã†ã“ã¨ãŒã§ãã¾ã™ï¼ˆ <emphasis>Open Session in View パ"
"ターンã§ã™ï¼‰ã€‚ã‚‚ã¡ã‚ã‚“ã€ã‚¢ãƒ—リケーション基盤ã®ä¾‹å¤–処ç†ã®æ£ç¢ºæ€§ãŒéžå¸¸ã«é‡è¦ã«"
"ãªã‚Šã¾ã™ã€‚ビューã®ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ä¸ã«ä¾‹å¤–ãŒç™ºç”Ÿã—ãŸã¨ãã§ã•ãˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å‡¦ç†ãŒ"
"戻るå‰ã« <literal>Session ã®ã‚¯ãƒãƒ¼ã‚ºã¨ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®çµ‚了を行ã†"
"ã“ã¨ãŒä¸å¯æ¬ ã«ãªã‚Šã¾ã™ã€‚ Hibernate ã® Wiki ã«è¼‰ã£ã¦ã„ã‚‹ \"Open Session in "
"View\" パターンã®ä¾‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。"
#. Tag: para
#: performance.xml:385
#, no-c-format
msgid ""
"In an application with a separate business tier, the business logic must "
"\"prepare\" all collections that the web tier needs before returning. This "
"means that the business tier should load all the data and return all the "
"data already initialized to the presentation/web tier that is required for a "
"particular use case. Usually, the application calls <literal>Hibernate."
"initialize()</literal> for each collection that will be needed in the web "
"tier (this call must occur before the session is closed) or retrieves the "
"collection eagerly using a Hibernate query with a <literal>FETCH "
"clause or a <literal>FetchMode.JOIN in CriteriaCommandSession Facade."
msgstr ""
"ビジãƒã‚¹å±¤ãŒåˆ†é›¢ã—ã¦ã„るアプリケーションã§ã¯ã€ãƒ“ジãƒã‚¹ãƒã‚¸ãƒƒã‚¯ã¯ Web 層ã§å¿…è¦"
"ã«ãªã‚‹ã™ã¹ã¦ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’事å‰ã«ã€Œæº–å‚™ã€ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ç‰¹å®šã®"
"ユースケースã§å¿…è¦ã¨ãªã‚‹ãƒ—レゼンテーション/ Web 層ã«å¯¾ã—ã€ãƒ“ジãƒã‚¹å±¤ãŒã™ã¹ã¦"
"ã®ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒ¼ãƒ‰ã—ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’åˆæœŸåŒ–ã—ã¦è¿”ã™ã¹ãã¨ã„ã†ã“ã¨ã‚’æ„味ã—ã¦ã„"
"ã¾ã™ã€‚通常ã¯ã€ã‚¢ãƒ—リケーション㯠Web 層ã§å¿…è¦ãªã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãã‚Œãžã‚Œã«å¯¾ã—㦠"
"<literal>Hibernate.initialize() を呼ã³å‡ºã™ã‹ï¼ˆã“ã®å‘¼ã³å‡ºã—ã¯ã‚»ãƒƒ"
"ションをクãƒãƒ¼ã‚ºã™ã‚‹å‰ã«è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ã€ Hibernate クエリ㮠"
"<literal>FETCH 節や Criteria 㮠"
"<literal>FetchMode.JOIN を使ã£ã¦ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å…ˆã«å¾©å…ƒã—ã¾ã™ã€‚普通"
"㯠<emphasis>Session Facade パターンã®ä»£ã‚ã‚Šã« Commandmerge() or lock() before "
"accessing uninitialized collections or other proxies. Hibernate does not, "
"and certainly <emphasis>should not, do this automatically since "
"it would introduce impromptu transaction semantics."
msgstr ""
"åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„コレクション(もã—ãã¯ä»–ã®ãƒ—ãƒã‚シ)ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å‰ã«ã€ "
"<literal>merge() ã‚„ lock() を使ã£ã¦æ–°ã—ã„ "
"<literal>Session ã«ä»¥å‰ã«ãƒãƒ¼ãƒ‰ã•ã‚ŒãŸã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’è¿½åŠ ã™ã‚‹ã“ã¨ã‚‚出"
"æ¥ã¾ã™ã€‚アドホックãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã‚’å°Žå…¥ã—ãŸã®ã§ã€ "
"Hibernate ã¯ã“れを自動的ã«è¡Œã‚ãšã€ <emphasis>è¡Œã†ã¹ãã§ã‚‚ã‚ã‚Šã¾ã›ã‚“ method is also used to efficiently "
"retrieve subsets of a collection without needing to initialize the whole "
"collection:"
msgstr ""
"<literal>createFilter() メソッドã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“ã‚’åˆæœŸåŒ–ã™ã‚‹å¿…"
"è¦ãªã—ã«ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚µãƒ–セットを復元ã™ã‚‹ãŸã‚ã«åŠ¹æžœçš„ã«ä½¿ãˆã¾ã™:"
#. Tag: programlisting
#: performance.xml:423
#, fuzzy, no-c-format
msgid ""
"s.createFilter( lazyCollection, \"\").setFirstResult(0).setMaxResults(10)."
"list();"
msgstr ""
"s.createFilter( lazyCollection, \"\").setFirstResult(0).setMaxResults(10)."
"list();"
#. Tag: title
#: performance.xml:427
#, no-c-format
msgid "Using batch fetching"
msgstr "ãƒãƒƒãƒãƒ•ã‚§ãƒƒãƒã®ä½¿ç”¨"
#. Tag: para
#: performance.xml:429
#, no-c-format
msgid ""
"Using batch fetching, Hibernate can load several uninitialized proxies if "
"one proxy is accessed. Batch fetching is an optimization of the lazy select "
"fetching strategy. There are two ways you can configure batch fetching: on "
"the class level and the collection level."
msgstr ""
"Hibernate ã¯ãƒãƒƒãƒãƒ•ã‚§ãƒƒãƒã‚’効率的ã«ä½¿ç”¨ã§ãã¾ã™ã€‚一ã¤ã®ãƒ—ãƒã‚シ(もã—ãã¯ã‚³"
"レクション)ãŒã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã‚‹ã¨ã€ Hibernate ã¯ã„ãã¤ã‹ã®åˆæœŸåŒ–ã—ã¦ã„ãªã„プãƒã‚"
"ã‚·ã‚’ãƒãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãƒãƒƒãƒãƒ•ã‚§ãƒƒãƒã¯é…延セレクトフェッãƒæˆ¦ç•¥ã«å¯¾ã™"
"る最é©åŒ–ã§ã™ã€‚ãƒãƒƒãƒãƒ•ã‚§ãƒƒãƒã®èª¿æ•´ã«ã¯ï¼’ã¤ã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚クラスレベルã¨ã‚³"
"レクションレベルã§ã™ã€‚"
#. Tag: para
#: performance.xml:434
#, no-c-format
msgid ""
"Batch fetching for classes/entities is easier to understand. Consider the "
"following example: at runtime you have 25 <literal>Cat instances "
"loaded in a <literal>Session, and each Cat has "
"a reference to its <literal>owner, a Person. "
"The <literal>Person class is mapped with a proxy, lazy="
"\"true\"</literal>. If you now iterate through all cats and call "
"<literal>getOwner() on each, Hibernate will, by default, execute "
"25 <literal>SELECT statements to retrieve the proxied owners. You "
"can tune this behavior by specifying a <literal>batch-size in the "
"mapping of <literal>Person:"
msgstr ""
"クラスã€è¦ç´ ã®ãƒãƒƒãƒãƒ•ã‚§ãƒƒãƒã¯ç†è§£ãŒç°¡å˜ã§ã™ã€‚実行時ã®æ¬¡ã®å ´é¢ã‚’想åƒã—ã¦ãã "
"ã•ã„。 <literal>Session ã«ãƒãƒ¼ãƒ‰ã•ã‚ŒãŸ25個㮠CatCat 㯠"
"<literal>owner ã§ã‚ã‚‹ Person ã¸ã®é–¢é€£ã‚’æŒã¡ã¾"
"ã™ã€‚ <literal>Person クラス㯠lazy=\"true\" ã®ãƒ—"
"ãƒã‚ã‚·ã§ãƒžãƒƒãƒ”ングã•ã‚Œã¦ã„ã¾ã™ã€‚ã‚‚ã—今ã™ã¹ã¦ã® Cat ã«å¯¾ã—ã¦ç¹°ã‚Šè¿”ã— "
"<literal>getOwner() を呼ã³å‡ºã™ã¨ã€ Hibernate ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯25回"
"ã® <literal>SELECT を実ã—〠owner プãƒã‚ã‚·ã®å¾©å…ƒã‚’ã—ã¾ã™ã€‚ã“ã®æŒ¯ã‚‹"
"舞ã„ã‚’ <literal>Person ã®ãƒžãƒƒãƒ”ング㮠batch-size has a lazy collection of Cats, "
"and 10 persons are currently loaded in the <literal>Session, "
"iterating through all persons will generate 10 <literal>SELECTs, "
"one for every call to <literal>getCats(). If you enable batch "
"fetching for the <literal>cats collection in the mapping of "
"<literal>Person, Hibernate can pre-fetch collections:"
msgstr ""
"コレクションã®ãƒãƒƒãƒãƒ•ã‚§ãƒƒãƒã‚‚有効ã«ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚例ã¨ã—ã¦ã€ãã‚Œãžã‚Œã® "
"<literal>Person ㌠Cat ã®é…延コレクションをæŒã£"
"ã¦ãŠã‚Šã€ 10 個㮠Person ㌠<literal>Sesssion ã«ãƒãƒ¼ãƒ‰ã•ã‚ŒãŸã¨ã™ã‚‹"
"ã¨ã€ã™ã¹ã¦ã® Person ã«å¯¾ã—ã¦ç¹°ã‚Šè¿”ã— <literal>getCats() を呼ã³å‡ºã™"
"ã“ã¨ã§ã€è¨ˆ10回㮠<literal>SELECT ãŒç™ºç”Ÿã—ã¾ã™ã€‚ã‚‚ã— "
"<literal>Person ã®ãƒžãƒƒãƒ”ング㧠cats コレクション"
"ã®ãƒãƒƒãƒãƒ•ã‚§ãƒƒãƒã‚’有効ã«ã™ã‚Œã°ã€ Hibernate ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®äº‹å‰ãƒ•ã‚§ãƒƒãƒãŒå‡ºæ¥"
"ã¾ã™ã€‚"
#. Tag: programlisting
#: performance.xml:461
#, fuzzy, no-c-format
msgid ""
"<class name=\"Person\">\n"
" <set name=\"cats\" batch-size=\"3\">\n"
" ...\n"
" </set>\n"
"</class>"
msgstr ""
"<class name=\"Person\">\n"
" <set name=\"cats\" batch-size=\"3\">\n"
" ...\n"
" </set>\n"
"</class>"
#. Tag: para
#: performance.xml:463
#, no-c-format
msgid ""
"With a <literal>batch-size of 3, Hibernate will load 3, 3, 3, 1 "
"collections in four <literal>SELECTs. Again, the value of the "
"attribute depends on the expected number of uninitialized collections in a "
"particular <literal>Session."
msgstr ""
"<literal>batch-size ㌠3 ãªã®ã§ã€ Hibernate 㯠4 回㮠"
"<literal>SELECT 㧠3 個〠3 個〠3 個〠1 個をãƒãƒ¼ãƒ‰ã—ã¾ã™ã€‚ç¹°ã‚Šè¿”"
"ã™ã¨ã€å±žæ€§ã®å€¤ã¯ç‰¹å®šã® <literal>Session ã®ä¸ã®åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„コ"
"レクションã®æœŸå¾…æ•°ã«ä¾å˜ã—ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:468
#, no-c-format
msgid ""
"Batch fetching of collections is particularly useful if you have a nested "
"tree of items, i.e. the typical bill-of-materials pattern. However, a "
"<emphasis>nested set or a materialized path "
"might be a better option for read-mostly trees."
msgstr ""
"コレクションã®ãƒãƒƒãƒãƒ•ã‚§ãƒƒãƒã¯ã‚¢ã‚¤ãƒ†ãƒ ã®ãƒã‚¹ãƒˆã—ãŸãƒ„リーã€ã™ãªã‚ã¡ã€ä»£è¡¨çš„ãª"
"部å“表ã®ãƒ‘ターンãŒã‚ã‚‹å ´åˆã«ç‰¹ã«æœ‰ç”¨ã§ã™ã€‚(ã—ã‹ã—ã€èªã¿è¾¼ã¿ãŒå¤šã„ツリーã§ã¯ "
"<emphasis>ãƒã‚¹ãƒˆã—㟠set ã‚„ 具体化ã—ãŸãƒ‘ス ãŒ"
"よりよã„é¸æŠžã«ãªã‚Šã¾ã™ã€‚)"
#. Tag: title
#: performance.xml:475
#, no-c-format
msgid "Using subselect fetching"
msgstr "サブセレクトフェッãƒã®ä½¿ç”¨"
#. Tag: para
#: performance.xml:477
#, no-c-format
msgid ""
"If one lazy collection or single-valued proxy has to be fetched, Hibernate "
"will load all of them, re-running the original query in a subselect. This "
"works in the same way as batch-fetching but without the piecemeal loading."
msgstr ""
"一ã¤ã®é…延コレクションやå˜ä¸€å€¤ãƒ—ãƒã‚ã‚·ãŒãƒ•ã‚§ãƒƒãƒã•ã‚Œãªã‘ã‚Œã°ã„ã‘ãªã„ã¨ã〠"
"Hibernate ã¯ãれらã™ã¹ã¦ã‚’ãƒãƒ¼ãƒ‰ã—ã€ã‚µãƒ–セレクトã®ã‚ªãƒªã‚¸ãƒŠãƒ«ã‚¯ã‚¨ãƒªãŒå†åº¦å®Ÿè¡Œ"
"ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ãƒãƒƒãƒãƒ•ã‚§ãƒƒãƒã¨åŒã˜æ–¹æ³•ã§å‹•ãã€å°‘ã—ãšã¤ã®ãƒãƒ¼ãƒ‰ã¯è¡Œã„ã¾ã›"
"ん。"
#. Tag: title
#: performance.xml:486
#, fuzzy, no-c-format
msgid "Fetch profiles"
msgstr "フェッãƒæˆ¦ç•¥"
#. Tag: para
#: performance.xml:488
#, no-c-format
msgid ""
"Another way to affect the fetching strategy for loading associated objects "
"is through something called a fetch profile, which is a named configuration "
"associated with the <interfacename>org.hibernate.SessionFactoryorg.hibernate."
"Session</interfacename>. Once enabled on a org.hibernate."
"Session</interfacename>, the fetch profile will be in affect for that "
"<interfacename>org.hibernate.Session until it is explicitly "
"disabled."
msgstr ""
#. Tag: para
#: performance.xml:498
#, no-c-format
msgid ""
"So what does that mean? Well lets explain that by way of an example which "
"show the different available approaches to configure a fetch profile:"
msgstr ""
#. Tag: title
#: performance.xml:503
#, no-c-format
msgid "Specifying a fetch profile using <classname>@FetchProfile"
msgstr ""
#. Tag: programlisting
#: performance.xml:506
#, no-c-format
msgid ""
"@Entity\n"
"@FetchProfile(name = \"customer-with-orders\", fetchOverrides = {\n"
" @FetchProfile.FetchOverride(entity = Customer.class, association = "
"\"orders\", mode = FetchMode.JOIN)\n"
"})\n"
"public class Customer {\n"
" @Id\n"
" @GeneratedValue\n"
" private long id;\n"
"\n"
" private String name;\n"
"\n"
" private long customerNumber;\n"
"\n"
" @OneToMany\n"
" private Set<Order> orders;\n"
"\n"
" // standard getter/setter\n"
" ...\n"
"}"
msgstr ""
#. Tag: title
#: performance.xml:510
#, no-c-format
msgid ""
"Specifying a fetch profile using <literal><fetch-profile> "
"outside <literal><class> node"
msgstr ""
#. Tag: programlisting
#: performance.xml:514
#, no-c-format
msgid ""
"<hibernate-mapping>\n"
" <class name=\"Customer\">\n"
" ...\n"
" <set name=\"orders\" inverse=\"true\">\n"
" <key column=\"cust_id\"/>\n"
" <one-to-many class=\"Order\"/>\n"
" </set>\n"
" </class>\n"
" <class name=\"Order\">\n"
" ...\n"
" </class>\n"
" <fetch-profile name=\"customer-with-orders\">\n"
" <fetch entity=\"Customer\" association=\"orders\" style=\"join\"/"
">\n"
" </fetch-profile>\n"
"</hibernate-mapping>"
msgstr ""
#. Tag: title
#: performance.xml:518
#, no-c-format
msgid ""
"Specifying a fetch profile using <literal><fetch-profile> "
"inside <literal><class> node"
msgstr ""
#. Tag: programlisting
#: performance.xml:522
#, no-c-format
msgid ""
"<hibernate-mapping>\n"
" <class name=\"Customer\">\n"
" ...\n"
" <set name=\"orders\" inverse=\"true\">\n"
" <key column=\"cust_id\"/>\n"
" <one-to-many class=\"Order\"/>\n"
" </set>\n"
" <fetch-profile name=\"customer-with-orders\">\n"
" <fetch association=\"orders\" style=\"join\"/>\n"
" </fetch-profile>\n"
" </class>\n"
" <class name=\"Order\">\n"
" ...\n"
" </class>\n"
"</hibernate-mapping>"
msgstr ""
#. Tag: para
#: performance.xml:525
#, no-c-format
msgid ""
"Now normally when you get a reference to a particular customer, that "
"customer's set of orders will be lazy meaning we will not yet have loaded "
"those orders from the database. Normally this is a good thing. Now lets say "
"that you have a certain use case where it is more efficient to load the "
"customer and their orders together. One way certainly is to use \"dynamic "
"fetching\" strategies via an HQL or criteria queries. But another option is "
"to use a fetch profile to achieve that. The following code will load both "
"the customer <emphasis>andtheir orders:"
msgstr ""
#. Tag: title
#: performance.xml:536
#, no-c-format
msgid "Activating a fetch profile for a given <classname>Session"
msgstr ""
#. Tag: programlisting
#: performance.xml:539
#, no-c-format
msgid ""
"Session session = ...;\n"
"session.enableFetchProfile( \"customer-with-orders\" ); // name matches "
"from mapping\n"
"Customer customer = (Customer) session.get( Customer.class, customerId );"
msgstr ""
#. Tag: para
#: performance.xml:543
#, no-c-format
msgid ""
"<classname>@FetchProfile definitions are global and it does not "
"matter on which class you place them. You can place the "
"<classname>@FetchProfile annotation either onto a class or "
"package (package-info.java). In order to define multiple fetch profiles for "
"the same class or package <classname>@FetchProfiles can be used."
msgstr ""
#. Tag: para
#: performance.xml:551
#, no-c-format
msgid ""
"Currently only join style fetch profiles are supported, but they plan is to "
"support additional styles. See <ulink url=\"http://opensource.atlassian.com/"
"projects/hibernate/browse/HHH-3414\">HHH-3414</ulink> for details."
msgstr ""
#. Tag: title
#: performance.xml:558
#, no-c-format
msgid "Using lazy property fetching"
msgstr "é…延プãƒãƒ‘ティフェッãƒã®ä½¿ç”¨"
#. Tag: para
#: performance.xml:560
#, no-c-format
msgid ""
"Hibernate3 supports the lazy fetching of individual properties. This "
"optimization technique is also known as <emphasis>fetch groups. "
"Please note that this is mostly a marketing feature; optimizing row reads is "
"much more important than optimization of column reads. However, only loading "
"some properties of a class could be useful in extreme cases. For example, "
"when legacy tables have hundreds of columns and the data model cannot be "
"improved."
msgstr ""
"Hibernate3 ã¯ãƒ—ãƒãƒ‘ティã”ã¨ã®é…延フェッãƒã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã®æœ€é©åŒ–手法"
"㯠<emphasis>グループã®ãƒ•ã‚§ãƒƒãƒ ã¨ã—ã¦ã‚‚知られã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã»ã¨"
"ã‚“ã©è¦æœ›ã‹ã‚‰å‡ºãŸæ©Ÿèƒ½ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。実際ã«ã¯åˆ—èªã¿è¾¼ã¿ã®æœ€é©åŒ–"
"よりもã€è¡Œèªã¿è¾¼ã¿ã®æœ€é©åŒ–ãŒéžå¸¸ã«é‡è¦ã§ã™ã€‚ã—ã‹ã—ã€ã‚¯ãƒ©ã‚¹ã®ã„ãã¤ã‹ã®ãƒ—ãƒãƒ‘"
"ティã ã‘ã‚’èªã¿è¾¼ã‚€ã“ã¨ã¯ã€æ—¢å˜ã®ãƒ†ãƒ¼ãƒ–ルãŒä½•ç™¾ã‚‚ã®åˆ—ã‚’æŒã¡ã€ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã‚’改"
"å–„ã§ããªã„ãªã©ã®æ¥µç«¯ãªå ´åˆã«ã¯æœ‰ç”¨ã§ã™ã€‚"
#. Tag: para
#: performance.xml:568
#, no-c-format
msgid ""
"To enable lazy property loading, set the <literal>lazy attribute "
"on your particular property mappings:"
msgstr ""
"é…延プãƒãƒ‘ティèªã¿è¾¼ã¿ã‚’有効ã«ã™ã‚‹ã«ã¯ã€å¯¾è±¡ã®ãƒ—ãƒãƒ‘ティã®ãƒžãƒƒãƒ”ング㧠"
"<literal>lazy 属性をセットã—ã¦ãã ã•ã„:"
#. Tag: programlisting
#: performance.xml:571
#, fuzzy, no-c-format
msgid ""
"<class name=\"Document\">\n"
" <id name=\"id\">\n"
" <generator class=\"native\"/>\n"
" </id>\n"
" <property name=\"name\" not-null=\"true\" length=\"50\"/>\n"
" <property name=\"summary\" not-null=\"true\" length=\"200\" lazy="
"\"true\"/>\n"
" <property name=\"text\" not-null=\"true\" length=\"2000\" lazy=\"true"
"\"/>\n"
"</class>"
msgstr ""
"<class name=\"Document\">\n"
" <id name=\"id\">\n"
" <generator class=\"native\"/>\n"
" </id>\n"
" <property name=\"name\" not-null=\"true\" length=\"50\"/>\n"
" <property name=\"summary\" not-null=\"true\" length=\"200\" lazy="
"\"true\"/>\n"
" <property name=\"text\" not-null=\"true\" length=\"2000\" lazy=\"true"
"\"/>\n"
"</class>"
#. Tag: para
#: performance.xml:573
#, no-c-format
msgid ""
"Lazy property loading requires buildtime bytecode instrumentation. If your "
"persistent classes are not enhanced, Hibernate will ignore lazy property "
"settings and return to immediate fetching."
msgstr ""
"é…延プãƒãƒ‘ティèªã¿è¾¼ã¿ã¯ãƒ“ルド時ã®ãƒã‚¤ãƒˆã‚³ãƒ¼ãƒ‰çµ„ã¿è¾¼ã¿ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ã‚‚ã—æ°¸"
"続クラスã«çµ„ã¿è¾¼ã¿ãŒã•ã‚Œã¦ã„ãªã„ãªã‚‰ã€ Hibernate ã¯é»™ã£ã¦é…延プãƒãƒ‘ティã®è¨å®š"
"を無視ã—ã¦ã€å³æ™‚フェッãƒã«æˆ»ã—ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:577
#, no-c-format
msgid "For bytecode instrumentation, use the following Ant task:"
msgstr "ãƒã‚¤ãƒˆã‚³ãƒ¼ãƒ‰çµ„ã¿è¾¼ã¿ã¯ä»¥ä¸‹ã® Ant タスクを使ã£ã¦ãã ã•ã„: "
#. Tag: programlisting
#: performance.xml:579
#, fuzzy, no-c-format
msgid ""
"<target name=\"instrument\" depends=\"compile\">\n"
" <taskdef name=\"instrument\" classname=\"org.hibernate.tool."
"instrument.InstrumentTask\">\n"
" <classpath path=\"${jar.path}\"/>\n"
" <classpath path=\"${classes.dir}\"/>\n"
" <classpath refid=\"lib.class.path\"/>\n"
" </taskdef>\n"
"\n"
" <instrument verbose=\"true\">\n"
" <fileset dir=\"${testclasses.dir}/org/hibernate/auction/model"
"\">\n"
" <include name=\"*.class\"/>\n"
" </fileset>\n"
" </instrument>\n"
"</target>"
msgstr ""
"<target name=\"instrument\" depends=\"compile\">\n"
" <taskdef name=\"instrument\" classname=\"org.hibernate.tool."
"instrument.InstrumentTask\">\n"
" <classpath path=\"${jar.path}\"/>\n"
" <classpath path=\"${classes.dir}\"/>\n"
" <classpath refid=\"lib.class.path\"/>\n"
" </taskdef>\n"
"\n"
" <instrument verbose=\"true\">\n"
" <fileset dir=\"${testclasses.dir}/org/hibernate/auction/model"
"\">\n"
" <include name=\"*.class\"/>\n"
" </fileset>\n"
" </instrument>\n"
"</target>"
#. Tag: para
#: performance.xml:581
#, no-c-format
msgid ""
"A different way of avoiding unnecessary column reads, at least for read-only "
"transactions, is to use the projection features of HQL or Criteria queries. "
"This avoids the need for buildtime bytecode processing and is certainly a "
"preferred solution."
msgstr ""
"ä¸è¦ãªåˆ—ã‚’èªã¿è¾¼ã¾ãªã„ãŸã‚ã®ã€åˆ¥ã®ï¼ˆã‚ˆã‚Šã‚ˆã„?)方法ã¯ã€å°‘ãªãã¨ã‚‚èªã¿è¾¼ã¿ã®"
"ã¿ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã«ãŠã„ã¦ã¯ã€ HQL ã‚„ Criteria クエリã®å°„影機能を使ã†ã“ã¨ã§"
"ã™ã€‚ã“ã®æ–¹æ³•ã¯ãƒ“ルド時ã®ãƒã‚¤ãƒˆã‚³ãƒ¼ãƒ‰çµ„ã¿è¾¼ã¿ãŒä¸è¦ã«ãªã‚Šã€ã‚ˆã‚Šè‰¯ã„解決方法ã§"
"ã™ã€‚"
#. Tag: para
#: performance.xml:586
#, no-c-format
msgid ""
"You can force the usual eager fetching of properties using <literal>fetch "
"all properties</literal> in HQL."
msgstr ""
"HQL 㧠<literal>fetch all properties を使ã†ã“ã¨ã§ã€æ™®é€šã©ãŠã‚Šã®ãƒ—ãƒ"
"パティã®å³æ™‚フェッãƒãƒ³ã‚°ã‚’強制ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚"
#. Tag: title
#: performance.xml:592
#, no-c-format
msgid "The Second Level Cache"
msgstr "第2レベルã‚ャッシュ"
#. Tag: para
#: performance.xml:594
#, no-c-format
msgid ""
"A Hibernate <literal>Session is a transaction-level cache of "
"persistent data. It is possible to configure a cluster or JVM-level "
"(<literal>SessionFactory-level) cache on a class-by-class and "
"collection-by-collection basis. You can even plug in a clustered cache. Be "
"aware that caches are not aware of changes made to the persistent store by "
"another application. They can, however, be configured to regularly expire "
"cached data."
msgstr ""
"Hibernate ã® <literal>Session ã¯æ°¸ç¶šãƒ‡ãƒ¼ã‚¿ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãƒ¬ãƒ™ãƒ«"
"ã®ã‚ャッシュã§ã™ã€‚ class-by-class 㨠collection-by-collection ã”ã¨ã®ã€ã‚¯ãƒ©ã‚¹"
"タレベルや JVM レベル ( <literal>SessionFactory レベル)ã®ã‚ャッ"
"シュをè¨å®šã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚クラスタ化ã•ã‚ŒãŸã‚ャッシュã«ã¤ãªãã“ã¨ã•ãˆå‡ºæ¥"
"ã¾ã™ã€‚ã—ã‹ã—注æ„ã—ã¦ãã ã•ã„。ã‚ャッシュã¯ä»–ã®ã‚¢ãƒ—リケーションã«ã‚ˆã‚‹æ°¸ç¶šå±¤ã®"
"変更を考慮ã—ã¾ã›ã‚“(ã‚ャッシュデータを定期的ã«æœŸé™åˆ‡ã‚Œã«ã™ã‚‹è¨å®šã¯å‡ºæ¥ã¾"
"ã™ï¼‰ã€‚"
#. Tag: para
#: performance.xml:602
#, fuzzy, no-c-format
msgid ""
"You have the option to tell Hibernate which caching implementation to use by "
"specifying the name of a class that implements <literal>org.hibernate.cache."
"CacheProvider</literal> using the property hibernate.cache."
"provider_class</literal>. Hibernate is bundled with a number of built-in "
"integrations with the open-source cache providers that are listed in <xref "
"linkend=\"cacheproviders\"/>. You can also implement your own and plug it in "
"as outlined above. Note that versions prior to Hibernate 3.2 use EhCache as "
"the default cache provider."
msgstr ""
"Hibernate ãŒä½¿ç”¨ã™ã‚‹ã‚ャッシュ実装ã¯ã€ <literal>hibernate.cache."
"provider_class</literal> プãƒãƒ‘ティ㫠org.hibernate.cache."
"CacheProvider</literal> を実装ã—ãŸã‚¯ãƒ©ã‚¹åを指定ã™ã‚‹ã“ã¨ã§å¤‰æ›´ã§ãã¾ã™ã€‚ "
"Hibernate ã¯å¤šãã®ã‚ªãƒ¼ãƒ—ンソースã®ã‚ャッシュプãƒãƒã‚¤ãƒ€ã‚’ビルトイン実装ã§æŒã£"
"ã¦ã„ã¾ã™ï¼ˆå¾Œã«ãƒªã‚¹ãƒˆãŒã‚ã‚Šã¾ã™ï¼‰ã€‚åŠ ãˆã¦ã€å‰ã«èª¬æ˜Žã—ãŸã‚ˆã†ã«ã€ã‚ãªãŸè‡ªèº«ãŒç‹¬"
"自ã®å®Ÿè£…ã‚’ã—ã¦ã€ãれを組ã¿è¾¼ã‚€ã“ã¨ã‚‚出æ¥ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³3.2よりå‰ã§ã¯ "
"EhCache ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚ャッシュプãƒãƒã‚¤ãƒ€ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ãƒãƒ¼"
"ジョン3.2ã§ã¯ã“ã‚Œã¯å½“ã¦ã¯ã¾ã‚Šã¾ã›ã‚“。"
#. Tag: title
#: performance.xml:613
#, no-c-format
msgid "Cache Providers"
msgstr "ã‚ャッシュプãƒãƒã‚¤ãƒ€"
#. Tag: entry
#: performance.xml:628 performance.xml:976
#, no-c-format
msgid "Cache"
msgstr "ã‚ャッシュ"
#. Tag: entry
#: performance.xml:630
#, no-c-format
msgid "Provider class"
msgstr "プãƒãƒã‚¤ãƒ€ã‚¯ãƒ©ã‚¹"
#. Tag: entry
#: performance.xml:632
#, no-c-format
msgid "Type"
msgstr "タイプ"
#. Tag: entry
#: performance.xml:634
#, no-c-format
msgid "Cluster Safe"
msgstr "クラスタセーフ"
#. Tag: entry
#: performance.xml:636
#, no-c-format
msgid "Query Cache Supported"
msgstr "クエリã‚ャッシュã®ã‚µãƒãƒ¼ãƒˆ"
#. Tag: entry
#: performance.xml:642 performance.xml:990
#, no-c-format
msgid "Hashtable (not intended for production use)"
msgstr "Hashtable(製å“用ã¨ã—ã¦æ„図ã—ã¦ã„ã¾ã›ã‚“)"
#. Tag: literal
#: performance.xml:644
#, fuzzy, no-c-format
msgid "org.hibernate.cache.HashtableCacheProvider"
msgstr "<literal>org.hibernate.cache.HashtableCacheProvider"
#. Tag: entry
#: performance.xml:646
#, no-c-format
msgid "memory"
msgstr "メモリ"
#. Tag: entry
#: performance.xml:650 performance.xml:662 performance.xml:674
#: performance.xml:992 performance.xml:994 performance.xml:996
#: performance.xml:1004 performance.xml:1006 performance.xml:1008
#: performance.xml:1016 performance.xml:1018 performance.xml:1020
#: performance.xml:1028 performance.xml:1030 performance.xml:1040
#: performance.xml:1046 performance.xml:1052 performance.xml:1058
#, no-c-format
msgid "<entry>yes"
msgstr "<entry>yes"
#. Tag: entry
#: performance.xml:654 performance.xml:1002
#, no-c-format
msgid "EHCache"
msgstr "EHCache"
#. Tag: literal
#: performance.xml:656
#, fuzzy, no-c-format
msgid "org.hibernate.cache.EhCacheProvider"
msgstr "<literal>org.hibernate.cache.EhCacheProvider"
#. Tag: entry
#: performance.xml:658 performance.xml:670
#, no-c-format
msgid "memory, disk"
msgstr "メモリã€ãƒ‡ã‚£ã‚¹ã‚¯"
#. Tag: entry
#: performance.xml:666 performance.xml:1014
#, no-c-format
msgid "OSCache"
msgstr "OSCache"
#. Tag: literal
#: performance.xml:668
#, fuzzy, no-c-format
msgid "org.hibernate.cache.OSCacheProvider"
msgstr "<literal>org.hibernate.cache.OSCacheProvider"
#. Tag: entry
#: performance.xml:678 performance.xml:1026
#, no-c-format
msgid "SwarmCache"
msgstr "SwarmCache"
#. Tag: literal
#: performance.xml:680
#, fuzzy, no-c-format
msgid "org.hibernate.cache.SwarmCacheProvider"
msgstr "<literal>org.hibernate.cache.SwarmCacheProvider"
#. Tag: entry
#: performance.xml:682
#, no-c-format
msgid "clustered (ip multicast)"
msgstr "クラスタ(ip マルãƒã‚ャスト)"
#. Tag: entry
#: performance.xml:684
#, no-c-format
msgid "yes (clustered invalidation)"
msgstr "yes(クラスタ無効化)"
#. Tag: entry
#: performance.xml:690 performance.xml:1038
#, no-c-format
msgid "JBoss Cache 1.x"
msgstr ""
#. Tag: literal
#: performance.xml:692
#, fuzzy, no-c-format
msgid "org.hibernate.cache.TreeCacheProvider"
msgstr "<literal>org.hibernate.cache.TreeCacheProvider"
#. Tag: entry
#: performance.xml:694 performance.xml:706
#, no-c-format
msgid "clustered (ip multicast), transactional"
msgstr "クラスタ(ip マルãƒã‚ャスト)ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒŠãƒ«"
#. Tag: entry
#: performance.xml:696
#, no-c-format
msgid "yes (replication)"
msgstr "yes(複製)"
#. Tag: entry
#: performance.xml:698 performance.xml:710
#, no-c-format
msgid "yes (clock sync req.)"
msgstr "yes(時刻åŒæœŸãŒå¿…è¦ï¼‰"
#. Tag: entry
#: performance.xml:702 performance.xml:1050
#, no-c-format
msgid "JBoss Cache 2"
msgstr ""
#. Tag: literal
#: performance.xml:704
#, fuzzy, no-c-format
msgid "org.hibernate.cache.jbc.JBossCacheRegionFactory"
msgstr "<literal>org.hibernate.cache.jbc2.JBossCacheRegionFactory"
#. Tag: entry
#: performance.xml:708
#, fuzzy, no-c-format
msgid "yes (replication or invalidation)"
msgstr "yes(クラスタ無効化)"
#. Tag: title
#: performance.xml:717
#, no-c-format
msgid "Cache mappings"
msgstr "ã‚ャッシュã®ãƒžãƒƒãƒ”ング"
#. Tag: para
#: performance.xml:719
#, no-c-format
msgid ""
"As we have done in previous chapters we are looking at the two different "
"possibiltites to configure caching. First configuration via annotations and "
"then via Hibernate mapping files."
msgstr ""
#. Tag: para
#: performance.xml:723
#, no-c-format
msgid ""
"By default, entities are not part of the second level cache and we recommend "
"you to stick to this setting. However, you can override this by setting the "
"<literal>shared-cache-mode element in your persistence."
"xml</filename> file or by using the javax.persistence.sharedCache."
"mode </literal>property in your configuration. The following values are "
"possible:"
msgstr ""
#. Tag: para
#: performance.xml:732
#, no-c-format
msgid ""
"<literal>ENABLE_SELECTIVE (Default and recommended value): "
"entities are not cached unless explicitly marked as cacheable."
msgstr ""
#. Tag: para
#: performance.xml:738
#, no-c-format
msgid ""
"<literal>DISABLE_SELECTIVE: entities are cached unless explicitly "
"marked as not cacheable."
msgstr ""
#. Tag: para
#: performance.xml:743
#, no-c-format
msgid ""
"<literal>ALL: all entities are always cached even if marked as non "
"cacheable."
msgstr ""
#. Tag: para
#: performance.xml:748
#, no-c-format
msgid ""
"<literal>NONE: no entity are cached even if marked as cacheable. "
"This option can make sense to disable second-level cache altogether."
msgstr ""
#. Tag: para
#: performance.xml:754
#, no-c-format
msgid ""
"The cache concurrency strategy used by default can be set globaly via the "
"<literal>hibernate.cache.default_cache_concurrency_strategy "
"configuration property. The values for this property are:"
msgstr ""
#. Tag: literal
#: performance.xml:761
#, fuzzy, no-c-format
msgid "<literal>read-only"
msgstr "<literal>Criteria クエリ"
#. Tag: literal
#: performance.xml:765
#, fuzzy, no-c-format
msgid "<literal>read-write"
msgstr "<literal>Criteria クエリ"
#. Tag: literal
#: performance.xml:769
#, fuzzy, no-c-format
msgid "<literal>nonstrict-read-write"
msgstr "厳密ã§ã¯ãªã„ read-write"
#. Tag: literal
#: performance.xml:773
#, fuzzy, no-c-format
msgid "<literal>transactional"
msgstr "<literal>Criteria クエリ"
#. Tag: para
#: performance.xml:778
#, no-c-format
msgid ""
"It is recommended to define the cache concurrency strategy per entity rather "
"than using a global one. Use the <classname>@org.hibernate.annotations."
"Cache</classname> annotation for that."
msgstr ""
#. Tag: title
#: performance.xml:785
#, no-c-format
msgid ""
"Definition of cache concurrency strategy via <classname>@Cache"
msgstr ""
#. Tag: programlisting
#: performance.xml:788
#, no-c-format
msgid ""
"@Entity \n"
"@Cacheable\n"
"@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)\n"
"public class Forest { ... }"
msgstr ""
#. Tag: para
#: performance.xml:791
#, no-c-format
msgid ""
"Hibernate also let's you cache the content of a collection or the "
"identifiers if the collection contains other entities. Use the "
"<classname>@Cache annotation on the collection property."
msgstr ""
#. Tag: title
#: performance.xml:797
#, fuzzy, no-c-format
msgid "Caching collections using annotations"
msgstr "コレクションã¨ãƒ—ãƒã‚ã‚·ã®åˆæœŸåŒ–"
#. Tag: programlisting
#: performance.xml:799
#, no-c-format
msgid ""
"@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER)\n"
"@JoinColumn(name=\"CUST_ID\")\n"
"@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)\n"
"public SortedSet<Ticket> getTickets() {\n"
" return tickets;\n"
"}"
msgstr ""
#. Tag: para
#: performance.xml:802
#, no-c-format
msgid ""
"shows the<literal> @org.hibernate.annotations.Cache annotations "
"with its attributes. It allows you to define the caching strategy and region "
"of a given second level cache."
msgstr ""
#. Tag: title
#: performance.xml:808
#, no-c-format
msgid "<classname>@Cache annotation with attributes"
msgstr ""
#. Tag: programlisting
#: performance.xml:820
#, no-c-format
msgid ""
"@Cache(\n"
" CacheConcurrencyStrategy usage();\n"
" String region() default \"\";\n"
" String include() default \"all\";\n"
")"
msgstr ""
#. Tag: para
#: performance.xml:824
#, no-c-format
msgid ""
"usage: the given cache concurrency strategy (NONE, READ_ONLY, "
"NONSTRICT_READ_WRITE, READ_WRITE, TRANSACTIONAL)"
msgstr ""
#. Tag: para
#: performance.xml:830
#, no-c-format
msgid ""
"region (optional): the cache region (default to the fqcn of the class or the "
"fq role name of the collection)"
msgstr ""
#. Tag: para
#: performance.xml:835
#, no-c-format
msgid ""
"<literal>include (optional): all to include all properties, non-"
"lazy to only include non lazy properties (default all)."
msgstr ""
#. Tag: para
#: performance.xml:843
#, no-c-format
msgid ""
"Let's now take a look at Hibernate mapping files. There the <literal><"
"cache></literal> element of a class or collection mapping is used to "
"configure the second level cache. Looking at <xref linkend=\"example-"
"hibernate-cache-mapping-element\"/> the parallels to anotations is obvious."
msgstr ""
#. Tag: title
#: performance.xml:850
#, no-c-format
msgid "The Hibernate <literal><cache> mapping element"
msgstr ""
#. Tag: programlisting
#: performance.xml:862
#, fuzzy, no-c-format
msgid ""
"<cache\n"
" usage=\"transactional|read-write|nonstrict-read-write|read-only\"\n"
" region=\"RegionName\"\n"
" include=\"all|non-lazy\"\n"
"/>"
msgstr ""
"<cache \n"
" usage=\"transactional|read-write|nonstrict-read-write|read-only\"\n"
" region=\"RegionName\"\n"
" include=\"all|non-lazy\"\n"
"/>"
#. Tag: para
#: performance.xml:866
#, no-c-format
msgid ""
"<literal>usage (required) specifies the caching strategy: "
"<literal>transactional, read-write, "
"<literal>nonstrict-read-write or read-only"
msgstr ""
"<literal>usage (å¿…é ˆ) ã‚ャッシング戦略を指定ã—ã¾ã™ï¼š "
"<literal>transactional〠read-write〠"
"<literal>nonstrict-read-write ã¾ãŸã¯ read-only"
#. Tag: para
#: performance.xml:874
#, no-c-format
msgid ""
"<literal>region (optional: defaults to the class or collection "
"role name): specifies the name of the second level cache region"
msgstr ""
"<literal>region (オプションã€ã‚¯ãƒ©ã‚¹ã¾ãŸã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒãƒ¼ãƒ«ãƒãƒ¼ãƒ "
"ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ) 2次レベルã®ã‚ãƒ£ãƒƒã‚·ãƒ¥é ˜åŸŸã®åå‰ã‚’指定ã—ã¾ã™"
#. Tag: para
#: performance.xml:880
#, no-c-format
msgid ""
"<literal>include (optional: defaults to all) "
"<literal>non-lazy: specifies that properties of the entity mapped "
"with <literal>lazy=\"true\" cannot be cached when attribute-level "
"lazy fetching is enabled"
msgstr ""
"<literal>include (オプション〠all ã«å¯¾ã—ã¦ãƒ‡"
"フォルト) <literal>non-lazy ã¯ã€ 属性レベル㮠lazy フェãƒãŒæœ‰åŠ¹ã«"
"ãªã£ã¦ã„ã‚‹å ´åˆ <literal>lazy=\"true\" ã§ãƒžãƒƒãƒ”ングã•ã‚Œã‚‹ã‚¨ãƒ³ãƒ†ã‚£"
"ティã®ãƒ—ãƒãƒ‘ティã¯ã‚ャッシュã•ã‚Œãªãã¦ã‚‚よã„ã“ã¨ã‚’指定ã—ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:890
#, fuzzy, no-c-format
msgid ""
"Alternatively to <literal><cache>, you can use <"
"class-cache></literal> and <collection-cache> "
"elements in <literal>hibernate.cfg.xml."
msgstr ""
"ã¾ãŸã¯ï¼ˆã‚ˆã‚Šã‚ˆã„方法ã¨ã—ã¦ï¼Ÿï¼‰ã€ <literal>hibernate.cfg.xml ã« "
"<literal><class-cache> 㨠<collection-cache> cache can be used. This is the "
"simplest and optimal performing strategy. It is even safe for use in a "
"cluster."
msgstr ""
"ã‚‚ã—アプリケーションãŒèªã¿è¾¼ã¿ã®ã¿å¿…è¦ã§ã€æ°¸ç¶šã‚¯ãƒ©ã‚¹ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’変更ã—ãª"
"ã„ãªã‚‰ã€ <literal>read-only ã‚ャッシュを使ã†ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚ã“ã‚Œã¯"
"ã‚‚ã£ã¨ã‚‚å˜ç´”ã§ã‚‚ã£ã¨ã‚‚パフォーマンスã®è‰¯ã„戦略ã§ã™ã€‚クラスタã§ã®ä½¿ç”¨ã‚‚完全ã«"
"安全ã§ã™ã€‚"
#. Tag: title
#: performance.xml:909
#, no-c-format
msgid "Strategy: read/write"
msgstr "read/write 戦略"
#. Tag: para
#: performance.xml:911
#, no-c-format
msgid ""
"If the application needs to update data, a <literal>read-write "
"cache might be appropriate. This cache strategy should never be used if "
"serializable transaction isolation level is required. If the cache is used "
"in a JTA environment, you must specify the property <literal>hibernate."
"transaction.manager_lookup_class</literal> and naming a strategy for "
"obtaining the JTA <literal>TransactionManager. In other "
"environments, you should ensure that the transaction is completed when "
"<literal>Session.close() or Session.disconnect() support locking."
msgstr ""
"アプリケーションãŒãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãªã‚‰ã€ <literal>read-write ã‚’å–å¾—ã™ã‚‹ãŸã‚ã®æ–¹æ³•ã‚’示㙠"
"<literal>hibernate.transaction.manager_lookup_class プãƒãƒ‘ティを指"
"定ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。他ã®ç’°å¢ƒã§ã¯ã€ <literal>Session.close() ã‚„ "
"<literal>Session.disconnect() ãŒå‘¼ã°ã‚ŒãŸã¨ãã«ã€ç¢ºå®Ÿã«ãƒˆãƒ©ãƒ³ã‚¶ã‚¯"
"ションãŒå®Œäº†ã—ã¦ã„ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。もã—クラスタã§ã“ã®æˆ¦ç•¥ã‚’使ã„ãŸã„ãªã‚‰ã€"
"基ã¨ãªã‚‹ã‚ャッシュã®å®Ÿè£…ãŒãƒãƒƒã‚¯ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ãªã‘ã‚Œã°ãªã‚Šã¾"
"ã›ã‚“。組ã¿è¾¼ã¿ã®ã‚ャッシュプãƒãƒã‚¤ãƒ€ã¯ <emphasis>サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“ cache might be appropriate. If the "
"cache is used in a JTA environment, you must specify <literal>hibernate."
"transaction.manager_lookup_class</literal>. In other environments, you "
"should ensure that the transaction is completed when <literal>Session.close()"
"</literal> or Session.disconnect() is called."
msgstr ""
"アプリケーションãŒãŸã¾ã«ã—ã‹ãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã™ã‚‹å¿…è¦ã¯ãªã(ã™ãªã‚ã¡äºŒã¤ã®ãƒˆãƒ©ãƒ³"
"ザクションãŒåŒæ™‚ã«åŒã˜ã‚¢ã‚¤ãƒ†ãƒ ã‚’æ›´æ–°ã—よã†ã¨ã™ã‚‹ã“ã¨ã¯ã»ã¨ã‚“ã©èµ·ã“らãªã„)ã€"
"厳密ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³åˆ†é›¢ãŒè¦æ±‚ã•ã‚Œãªã„ãªã‚‰ã€ <literal>nonstrict-read-"
"write</literal> ã‚ャッシュãŒé©å½“ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。もã—ã‚ャッシュ㌠JTA 環境ã§ä½¿"
"ã‚れるãªã‚‰ã€ <literal>hibernate.transaction.manager_lookup_class ã‚’"
"指定ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。他ã®ç’°å¢ƒã§ã¯ã€ <literal>Session.close() "
"ã‚„ <literal>Session.disconnect() ãŒå‘¼ã°ã‚ŒãŸã¨ãã«ã€ç¢ºå®Ÿã«ãƒˆãƒ©ãƒ³ã‚¶ã‚¯"
"ションãŒå®Œäº†ã—ã¦ã„ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。"
#. Tag: title
#: performance.xml:941
#, no-c-format
msgid "Strategy: transactional"
msgstr "transactional 戦略"
#. Tag: para
#: performance.xml:943
#, no-c-format
msgid ""
"The <literal>transactional cache strategy provides support for "
"fully transactional cache providers such as JBoss TreeCache. Such a cache "
"can only be used in a JTA environment and you must specify "
"<literal>hibernate.transaction.manager_lookup_class."
msgstr ""
"<literal>transactional ã‚ャッシュ戦略㯠JBoss TreeCache ã®ã‚ˆã†ãªå®Œ"
"å…¨ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒŠãƒ«ã‚ャッシュプãƒãƒã‚¤ãƒ€ã®ã‚µãƒãƒ¼ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®ã‚ˆã†ãª"
"ã‚ャッシュ㯠JTA 環境ã§ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã€ <literal>hibernate.transaction."
"manager_lookup_class</literal> を指定ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。"
#. Tag: title
#: performance.xml:950
#, fuzzy, no-c-format
msgid "Cache-provider/concurrency-strategy compatibility"
msgstr "åŒæ™‚並行性ã‚ャッシュ戦略ã®ã‚µãƒãƒ¼ãƒˆ"
#. Tag: para
#: performance.xml:953
#, no-c-format
msgid ""
"None of the cache providers support all of the cache concurrency strategies."
msgstr ""
"ã™ã¹ã¦ã®åŒæ™‚並行性ã‚ャッシュ戦略をサãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ã‚ャッシュプãƒãƒã‚¤ãƒ€ã¯ã‚ã‚Š"
"ã¾ã›ã‚“。"
#. Tag: para
#: performance.xml:957
#, no-c-format
msgid ""
"The following table shows which providers are compatible with which "
"concurrency strategies."
msgstr ""
"以下ã®è¡¨ã¯ã©ã®ãƒ—ãƒãƒã‚¤ãƒ€ãŒã©ã®åŒæ™‚並列性戦略ã«å¯¾å¿œã™ã‚‹ã‹ã‚’表ã—ã¦ã„ã¾ã™ã€‚"
#. Tag: title
#: performance.xml:961
#, no-c-format
msgid "Cache Concurrency Strategy Support"
msgstr "åŒæ™‚並行性ã‚ャッシュ戦略ã®ã‚µãƒãƒ¼ãƒˆ"
#. Tag: entry
#: performance.xml:978
#, fuzzy, no-c-format
msgid "<entry>read-only"
msgstr "<entry>yes"
#. Tag: entry
#: performance.xml:980
#, fuzzy, no-c-format
msgid "<entry>nonstrict-read-write"
msgstr "厳密ã§ã¯ãªã„ read-write"
#. Tag: entry
#: performance.xml:982
#, fuzzy, no-c-format
msgid "<entry>read-write"
msgstr "<entry>yes"
#. Tag: entry
#: performance.xml:984
#, fuzzy, no-c-format
msgid "<entry>transactional"
msgstr "<entry>yes"
#. Tag: title
#: performance.xml:1067
#, no-c-format
msgid "Managing the caches"
msgstr "ã‚ャッシュã®ç®¡ç†"
#. Tag: para
#: performance.xml:1069
#, no-c-format
msgid ""
"Whenever you pass an object to <literal>save(), update()saveOrUpdate(), and whenever you retrieve an "
"object using <literal>load(), get(), "
"<literal>list(), iterate() or scroll()"
"</literal>, that object is added to the internal cache of the "
"<literal>Session."
msgstr ""
"オブジェクトを <literal>save() 〠update() 〠"
"<literal>saveOrUpdate() ã«æ¸¡ã™ã¨ãã€ãã—㦠load()get() 〠list() 〠"
"<literal>iterate() 〠scroll() を使ã£ã¦ã‚ªãƒ–ジェ"
"クトを復元ã™ã‚‹ã¨ãã«ã¯å¸¸ã«ã€ãã®ã‚ªãƒ–ジェクト㯠<literal>Session ã®"
"内部ã‚ャッシュã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1076
#, no-c-format
msgid ""
"When <literal>flush() is subsequently called, the state of that "
"object will be synchronized with the database. If you do not want this "
"synchronization to occur, or if you are processing a huge number of objects "
"and need to manage memory efficiently, the <literal>evict() method "
"can be used to remove the object and its collections from the first-level "
"cache."
msgstr ""
"次㫠<literal>flush() ãŒå‘¼ã°ã‚Œã‚‹ã¨ã€ã‚ªãƒ–ジェクトã®çŠ¶æ…‹ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼"
"スã¨åŒæœŸåŒ–ã•ã‚Œã¾ã™ã€‚ã‚‚ã—ã“ã®åŒæœŸãŒèµ·ã“ã‚‹ã“ã¨ã‚’望ã¾ãªã„ã¨ãã‚„ã€è†¨å¤§ãªæ•°ã®ã‚ªãƒ–"
"ジェクトを処ç†ã—ã¦ã„ã¦ãƒ¡ãƒ¢ãƒªã‚’効率的ã«æ‰±ã†å¿…è¦ãŒã‚ã‚‹ã¨ãã¯ã€ <literal>evict()"
"</literal> メソッドを使ã£ã¦ä¸€æ¬¡ã‚ャッシュã‹ã‚‰ã‚ªãƒ–ジェクトやコレクションを削除"
"ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚"
#. Tag: title
#: performance.xml:1084
#, no-c-format
msgid ""
"Explcitly evicting a cached instance from the first level cache using "
"<methodname>Session.evict()"
msgstr ""
#. Tag: programlisting
#: performance.xml:1087
#, fuzzy, no-c-format
msgid ""
"ScrollableResult cats = sess.createQuery(\"from Cat as cat\").scroll(); //a "
"huge result set\n"
"while ( cats.next() ) {\n"
" Cat cat = (Cat) cats.get(0);\n"
" doSomethingWithACat(cat);\n"
" sess.evict(cat);\n"
"}"
msgstr ""
"ScrollableResult cats = sess.createQuery(\"from Cat as cat\").scroll(); //a "
"huge result set\n"
"while ( cats.next() ) {\n"
" Cat cat = (Cat) cats.get(0);\n"
" doSomethingWithACat(cat);\n"
" sess.evict(cat);\n"
"}"
#. Tag: para
#: performance.xml:1090
#, no-c-format
msgid ""
"The <literal>Session also provides a contains() "
"method to determine if an instance belongs to the session cache."
msgstr ""
"<literal>Session ã¯ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚ャッシュã«å«ã¾ã‚Œã‚‹ã‹ã©"
"ã†ã‹ã‚’判æ–ã™ã‚‹ãŸã‚ã® <literal>contains() メソッドもæä¾›ã—ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1094
#, no-c-format
msgid ""
"To evict all objects from the session cache, call <literal>Session.clear() を呼ã³å‡ºã—ã¦ãã ã•ã„。"
#. Tag: para
#: performance.xml:1097
#, no-c-format
msgid ""
"For the second-level cache, there are methods defined on "
"<literal>SessionFactory for evicting the cached state of an "
"instance, entire class, collection instance or entire collection role."
msgstr ""
"二次ã‚ャッシュã®ãŸã‚ã«ã€ <literal>SessionFactory ã«ã¯ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã€"
"クラス全体ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“ã‚’ã‚ャッシュã‹ã‚‰å‰Šé™¤"
"ã™ã‚‹ãŸã‚ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒãã‚Œãžã‚Œå®šç¾©ã•ã‚Œã¦ã„ã¾ã™ã€‚"
#. Tag: title
#: performance.xml:1103
#, no-c-format
msgid ""
"Second-level cache eviction via <methodname>SessionFactoty.evict() SessionFacyory.evictCollection()"
msgstr ""
#. Tag: programlisting
#: performance.xml:1107
#, fuzzy, no-c-format
msgid ""
"sessionFactory.evict(Cat.class, catId); //evict a particular Cat\n"
"sessionFactory.evict(Cat.class); //evict all Cats\n"
"sessionFactory.evictCollection(\"Cat.kittens\", catId); //evict a particular "
"collection of kittens\n"
"sessionFactory.evictCollection(\"Cat.kittens\"); //evict all kitten "
"collections"
msgstr ""
"sessionFactory.evict(Cat.class, catId); //evict a particular Cat\n"
"sessionFactory.evict(Cat.class); //evict all Cats\n"
"sessionFactory.evictCollection(\"Cat.kittens\", catId); //evict a particular "
"collection of kittens\n"
"sessionFactory.evictCollection(\"Cat.kittens\"); //evict all kitten "
"collections"
#. Tag: para
#: performance.xml:1110
#, no-c-format
msgid ""
"The <literal>CacheMode controls how a particular session interacts "
"with the second-level cache:"
msgstr ""
"<literal>CacheMode ã¯ç‰¹å®šã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒäºŒæ¬¡ã‚ャッシュã¨ã©ã®ã‚ˆã†ã«ç›¸"
"互作用ã™ã‚‹ã‹ã‚’指定ã—ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1115
#, no-c-format
msgid ""
"<literal>CacheMode.NORMAL: will read items from and write items to "
"the second-level cache"
msgstr ""
"<literal>CacheMode.NORMAL - アイテムã®èªã¿è¾¼ã¿ã¨æ›¸ãè¾¼ã¿ã§äºŒæ¬¡"
"ã‚ャッシュを使ã„ã¾ã™"
#. Tag: para
#: performance.xml:1120
#, no-c-format
msgid ""
"<literal>CacheMode.GET: will read items from the second-level "
"cache. Do not write to the second-level cache except when updating data"
msgstr ""
"<literal>CacheMode.GET - èªã¿è¾¼ã¿ã¯äºŒæ¬¡ã‚ャッシュã‹ã‚‰è¡Œã„ã¾ã™ãŒã€"
"データを更新ã—ãŸå ´åˆã‚’除ã„ã¦äºŒæ¬¡ã‚ャッシュã«æ›¸ãè¾¼ã¿ã‚’ã—ã¾ã›ã‚“。"
#. Tag: para
#: performance.xml:1126
#, no-c-format
msgid ""
"<literal>CacheMode.PUT: will write items to the second-level "
"cache. Do not read from the second-level cache"
msgstr ""
"<literal>CacheMode.PUT - 二次ã‚ャッシュã«ã‚¢ã‚¤ãƒ†ãƒ を書ãè¾¼ã¿ã¾ã™ãŒã€"
"èªã¿è¾¼ã¿ã«ã¯äºŒæ¬¡ã‚ャッシュを使ã„ã¾ã›ã‚“。"
#. Tag: para
#: performance.xml:1131
#, no-c-format
msgid ""
"<literal>CacheMode.REFRESH: will write items to the second-level "
"cache. Do not read from the second-level cache. Bypass the effect of "
"<literal>hibernate.cache.use_minimal_puts forcing a refresh of the "
"second-level cache for all items read from the database"
msgstr ""
"<literal>CacheMode.REFRESH - 二次ã‚ャッシュã«ã‚¢ã‚¤ãƒ†ãƒ を書ãè¾¼ã¿ã¾ã™"
"ãŒã€èªã¿è¾¼ã¿ã«ã¯äºŒæ¬¡ã‚ャッシュを使ã‚ãšã€ <literal>hibernate.cache."
"use_minimal_puts</literal> ã®å½±éŸ¿ã‚’å—ã‘ãšã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰èªã¿è¾¼ã‚€ã™ã¹ã¦ã®"
"アイテムã®äºŒæ¬¡ã‚ャッシュを強制的ã«ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1139
#, no-c-format
msgid ""
"To browse the contents of a second-level or query cache region, use the "
"<literal>Statistics API:"
msgstr ""
"二次ã‚ャッシュã®å†…容やクエリã‚ãƒ£ãƒƒã‚·ãƒ¥é ˜åŸŸã‚’è¦‹ã‚‹ãŸã‚ã«ã€ "
"<literal>Statistics API を使ã£ã¦ãã ã•ã„:"
#. Tag: title
#: performance.xml:1143
#, fuzzy, no-c-format
msgid ""
"Browsing the second-level cache entries via the <classname>Statistics API を使ã£ã¦ãã ã•ã„:"
#. Tag: programlisting
#: performance.xml:1146
#, fuzzy, no-c-format
msgid ""
"Map cacheEntries = sessionFactory.getStatistics()\n"
" .getSecondLevelCacheStatistics(regionName)\n"
" .getEntries();"
msgstr ""
"Map cacheEntries = sessionFactory.getStatistics()\n"
" .getSecondLevelCacheStatistics(regionName)\n"
" .getEntries();"
#. Tag: para
#: performance.xml:1149
#, no-c-format
msgid ""
"You will need to enable statistics and, optionally, force Hibernate to keep "
"the cache entries in a more readable format:"
msgstr ""
"çµ±è¨ˆæƒ…å ±ã‚’æœ‰åŠ¹ã«ã—ã¦ã€ã•ã‚‰ã«ã‚ªãƒ—ションã¨ã—ã¦ã€ã‚ャッシュエントリを人ãŒã‚ˆã‚Šç†"
"解å¯èƒ½ãªå½¢å¼ã§ä¿æŒã™ã‚‹ã“ã¨ã‚’ Hibernate ã«å¼·åˆ¶ã—ã¾ã™:"
#. Tag: title
#: performance.xml:1153
#, no-c-format
msgid "Enabling Hibernate statistics"
msgstr ""
#. Tag: programlisting
#: performance.xml:1155
#, fuzzy, no-c-format
msgid ""
"hibernate.generate_statistics true\n"
"hibernate.cache.use_structured_entries true"
msgstr ""
"hibernate.generate_statistics true\n"
"hibernate.cache.use_structured_entries true"
#. Tag: title
#: performance.xml:1160
#, no-c-format
msgid "The Query Cache"
msgstr "クエリã‚ャッシュ"
#. Tag: para
#: performance.xml:1162
#, fuzzy, no-c-format
msgid ""
"Query result sets can also be cached. This is only useful for queries that "
"are run frequently with the same parameters."
msgstr ""
"クエリã®ãƒªã‚¶ãƒ«ãƒˆã‚»ãƒƒãƒˆã‚‚ã‚ャッシュ出æ¥ã¾ã™ã€‚ã“ã‚Œã¯åŒã˜ãƒ‘ラメータã§ä½•åº¦ã‚‚実行"
"ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ã®ã¿æœ‰ç”¨ã§ã™ã€‚クエリã‚ャッシュを使ã†ã«ã¯ã€ã¾ãšè¨å®šã§æœ‰åŠ¹"
"ã«ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“:"
#. Tag: title
#: performance.xml:1166
#, no-c-format
msgid "Enabling query caching"
msgstr ""
#. Tag: para
#: performance.xml:1168
#, no-c-format
msgid ""
"Caching of query results introduces some overhead in terms of your "
"applications normal transactional processing. For example, if you cache "
"results of a query against Person Hibernate will need to keep track of when "
"those results should be invalidated because changes have been committed "
"against Person. That, coupled with the fact that most applications simply "
"gain no benefit from caching query results, leads Hibernate to disable "
"caching of query results by default. To use query caching, you will first "
"need to enable the query cache:"
msgstr ""
#. Tag: programlisting
#: performance.xml:1177
#, fuzzy, no-c-format
msgid "hibernate.cache.use_query_cache true"
msgstr "hibernate.cache.use_query_cache true"
#. Tag: para
#: performance.xml:1179
#, no-c-format
msgid "This setting creates two new cache regions:"
msgstr ""
#. Tag: para
#: performance.xml:1181
#, no-c-format
msgid ""
"<classname>org.hibernate.cache.StandardQueryCache, holding the "
"cached query results"
msgstr ""
#. Tag: para
#: performance.xml:1186
#, no-c-format
msgid ""
"<classname>org.hibernate.cache.UpdateTimestampsCache, holding "
"timestamps of the most recent updates to queryable tables. These are used to "
"validate the results as they are served from the query cache."
msgstr ""
#. Tag: para
#: performance.xml:1194
#, no-c-format
msgid ""
"If you configure your underlying cache implementation to use expiry or "
"timeouts is very important that the cache timeout of the underlying cache "
"region for the UpdateTimestampsCache be set to a higher value than the "
"timeouts of any of the query caches. In fact, we recommend that the the "
"UpdateTimestampsCache region not be configured for expiry at all. Note, in "
"particular, that an LRU cache expiry policy is never appropriate."
msgstr ""
#. Tag: para
#: performance.xml:1203
#, fuzzy, no-c-format
msgid ""
"As mentioned above, most queries do not benefit from caching or their "
"results. So by default, individual queries are not cached even after "
"enabling query caching. To enable results caching for a particular query, "
"call <literal>org.hibernate.Query.setCacheable(true). This call "
"allows the query to look for existing cache results or add its results to "
"the cache when it is executed."
msgstr ""
"ã»ã¨ã‚“ã©ã®ã‚¯ã‚¨ãƒªã¯ã‚ャッシュã®æ©æµã‚’å—ã‘ãªã„ã®ã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã‚¯ã‚¨ãƒªã¯"
"ã‚ャッシュã•ã‚Œã¾ã›ã‚“。ã‚ャッシュを有効ã«ã™ã‚‹ã«ã¯ã€ <literal>Query."
"setCacheable(true)</literal> を呼ã³å‡ºã—ã¦ãã ã•ã„。ãã†ã™ã‚Œã°ã‚¯ã‚¨ãƒªãŒæ—¢å˜ã®"
"ã‚ャッシュçµæžœã‚’探ã—ã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œæ™‚ã«ãã®çµæžœã‚’ã‚ャッシュã«è¿½åŠ ã™ã‚‹ã‚ˆã†ã«ãªã‚Š"
"ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1211
#, no-c-format
msgid ""
"The query cache does not cache the state of the actual entities in the "
"cache; it caches only identifier values and results of value type. For this "
"reaso, the query cache should always be used in conjunction with the second-"
"level cache for those entities expected to be cached as part of a query "
"result cache (just as with collection caching)."
msgstr ""
#. Tag: title
#: performance.xml:1221
#, fuzzy, no-c-format
msgid "Query cache regions"
msgstr "クエリã‚ャッシュã®ã‚µãƒãƒ¼ãƒˆ"
#. Tag: para
#: performance.xml:1223
#, no-c-format
msgid ""
"If you require fine-grained control over query cache expiration policies, "
"you can specify a named cache region for a particular query by calling "
"<literal>Query.setCacheRegion()."
msgstr ""
"クエリã‚ャッシュã®ç ´æ£„ãƒãƒªã‚·ãƒ¼ã‚’ç´°ã‹ã制御ã—ãŸã„ã¨ãã¯ã€ <literal>Query."
"setCacheRegion()</literal> を呼ã³å‡ºã—ã¦ç‰¹å®šã®ã‚¯ã‚¨ãƒªã«å¯¾ã™ã‚‹ã‚ãƒ£ãƒƒã‚·ãƒ¥é ˜åŸŸã‚’æŒ‡"
"定ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚"
#. Tag: programlisting
#: performance.xml:1227
#, fuzzy, no-c-format
msgid ""
"List blogs = sess.createQuery(\"from Blog blog where blog.blogger = :blogger"
"\")\n"
" .setEntity(\"blogger\", blogger)\n"
" .setMaxResults(15)\n"
" .setCacheable(true)\n"
" .setCacheRegion(\"frontpages\")\n"
" .list();"
msgstr ""
"List blogs = sess.createQuery(\"from Blog blog where blog.blogger = :blogger"
"\")\n"
" .setEntity(\"blogger\", blogger)\n"
" .setMaxResults(15)\n"
" .setCacheable(true)\n"
" .setCacheRegion(\"frontpages\")\n"
" .list();"
#. Tag: para
#: performance.xml:1229
#, fuzzy, no-c-format
msgid ""
"If you want to force the query cache to refresh one of its regions "
"(disregard any cached results it finds there) you can use <literal>org."
"hibernate.Query.setCacheMode(CacheMode.REFRESH)</literal>. In conjunction "
"with the region you have defined for the given query, Hibernate will "
"selectively force the results cached in that particular region to be "
"refreshed. This is particularly useful in cases where underlying data may "
"have been updated via a separate process and is a far more efficient "
"alternative to bulk eviction of the region via <literal>org.hibernate."
"SessionFactory.evictQueries()</literal>."
msgstr ""
"クエリãŒè‡ªèº«ã®ã‚¯ã‚¨ãƒªã‚ãƒ£ãƒƒã‚·ãƒ¥é ˜åŸŸã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã‚’強制ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ãª"
"ら〠<literal>Query.setCacheMode(CacheMode.REFRESH) を呼ã³å‡ºã™ã¹ã"
"ã§ã™ã€‚ã“ã‚Œã¯å…ƒã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãŒåˆ¥ã®ãƒ—ãƒã‚»ã‚¹ã«ã‚ˆã£ã¦æ›´æ–°ã•ã‚ŒãŸã‚Šï¼ˆã™ãªã‚ã¡ "
"Hibernate を通ã˜ã¦æ›´æ–°ã•ã‚Œãªã„)ã€ã‚¢ãƒ—リケーションã«ç‰¹å®šã®ã‚¯ã‚¨ãƒªãƒªã‚¶ãƒ«ãƒˆã‚»ãƒƒ"
"トをé¸æŠžã—ã¦ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã•ã›ã‚‹å ´åˆã«ç‰¹ã«æœ‰ç”¨ã§ã™ã€‚ã•ã‚‰ã«æœ‰ç”¨ãªã‚‚ã†ä¸€ã¤ã®æ–¹æ³•"
"ã¯ã€ <literal>SessionFactory.evictQueries() ã«ã‚ˆã£ã¦ã‚¯ã‚¨ãƒªã‚ャッ"
"ã‚·ãƒ¥é ˜åŸŸã‚’æ¶ˆåŽ»ã™ã‚‹ã“ã¨ã§ã™ã€‚"
#. Tag: title
#: performance.xml:1242
#, no-c-format
msgid "Understanding Collection performance"
msgstr "コレクションã®ãƒ‘フォーマンスã®ç†è§£"
#. Tag: para
#: performance.xml:1244
#, no-c-format
msgid ""
"In the previous sections we have covered collections and their applications. "
"In this section we explore some more issues in relation to collections at "
"runtime."
msgstr ""
#. Tag: title
#: performance.xml:1249
#, no-c-format
msgid "Taxonomy"
msgstr "分類"
#. Tag: para
#: performance.xml:1251
#, no-c-format
msgid "Hibernate defines three basic kinds of collections:"
msgstr "Hibernate ã¯3ã¤ã®åŸºæœ¬çš„ãªã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ç¨®é¡žã‚’定義ã—ã¦ã„ã¾ã™:"
#. Tag: para
#: performance.xml:1255
#, no-c-format
msgid "collections of values"
msgstr "値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³"
#. Tag: para
#: performance.xml:1259
#, no-c-format
msgid "one-to-many associations"
msgstr "一対多関連"
#. Tag: para
#: performance.xml:1263
#, no-c-format
msgid "many-to-many associations"
msgstr "多対多関連"
#. Tag: para
#: performance.xml:1267
#, no-c-format
msgid ""
"This classification distinguishes the various table and foreign key "
"relationships but does not tell us quite everything we need to know about "
"the relational model. To fully understand the relational structure and "
"performance characteristics, we must also consider the structure of the "
"primary key that is used by Hibernate to update or delete collection rows. "
"This suggests the following classification:"
msgstr ""
"ã“ã®åˆ†é¡žã¯ã•ã¾ã–ã¾ãªãƒ†ãƒ¼ãƒ–ルや外部ã‚ー関連を区別ã—ã¾ã™ãŒã€ç§ãŸã¡ãŒçŸ¥ã‚‹å¿…è¦ã®"
"ã‚る関連モデルã«ã¤ã„ã¦ã»ã¨ã‚“ã©ãªã«ã‚‚æ•™ãˆã¦ãã‚Œã¾ã›ã‚“ã€‚é–¢é€£æ§‹é€ ã‚„ãƒ‘ãƒ•ã‚©ãƒ¼ãƒžãƒ³"
"スã®ç‰¹å¾´ã‚’完全ã«ç†è§£ã™ã‚‹ã«ã¯ã€ Hibernate ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¡Œã‚’æ›´æ–°ã€å‰Šé™¤ã™ã‚‹ãŸ"
"ã‚ã«ä½¿ã†ä¸»ã‚ーã®æ§‹é€ ã‚‚ã¾ãŸè€ƒãˆãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã“ã‚Œã¯ä»¥ä¸‹ã®åˆ†é¡žã‚’æ示ã—ã¾"
"ã™ã€‚"
#. Tag: para
#: performance.xml:1276
#, no-c-format
msgid "indexed collections"
msgstr "インデックス付ãコレクション"
#. Tag: para
#: performance.xml:1280
#, no-c-format
msgid "sets"
msgstr "set"
#. Tag: para
#: performance.xml:1284
#, no-c-format
msgid "bags"
msgstr "bag"
#. Tag: para
#: performance.xml:1288
#, no-c-format
msgid ""
"All indexed collections (maps, lists, and arrays) have a primary key "
"consisting of the <literal><key> and <index> 㨠<index> カラムã‹ã‚‰"
"ãªã‚‹ä¸»ã‚ーをæŒã£ã¦ã„ã¾ã™ã€‚ã“ã®å ´åˆã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æ›´æ–°ã¯éžå¸¸ã«åŠ¹çŽ‡çš„ã§ã™ã€‚主"
"ã‚ーã¯æœ‰ç”¨ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ãªã‚Šã€ Hibernate ãŒç‰¹å®šã®è¡Œã‚’æ›´æ–°ã¾ãŸã¯å‰Šé™¤ã™ã‚‹ã¨ã"
"ã«ã€ãã®è¡Œã‚’効率的ã«è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1295
#, no-c-format
msgid ""
"Sets have a primary key consisting of <literal><key> and "
"element columns. This can be less efficient for some types of collection "
"element, particularly composite elements or large text or binary fields, as "
"the database may not be able to index a complex primary key as efficiently. "
"However, for one-to-many or many-to-many associations, particularly in the "
"case of synthetic identifiers, it is likely to be just as efficient. If you "
"want <literal>SchemaExport to actually create the primary key of a "
"<literal><set>, you must declare all columns as not-"
"null=\"true\"</literal>."
msgstr ""
"set 㯠<literal><key> ã‹ã‚‰ãªã‚‹ä¸»ã‚ーã¨è¦ç´ ã®ã‚«ãƒ©ãƒ ã‚’æŒã£ã¦ã„"
"ã¾ã™ã€‚ã“ã‚Œã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®ã„ãã¤ã‹ã®åž‹ã«ã¤ã„ã¦ã¯åŠ¹çŽ‡çš„ã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾"
"ã›ã‚“。特ã«è¤‡åˆè¦ç´ ã€å¤§ããªãƒ†ã‚ストã€ãƒã‚¤ãƒŠãƒªãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã§ã¯éžåŠ¹çŽ‡ã§ã™ã€‚データ"
"ベースã¯è¤‡åˆä¸»ã‚ーã«åŠ¹çŽ‡çš„ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’付ã‘ã‚‹ã“ã¨ãŒã§ããªã„ã‹ã‚‰ã§ã™ã€‚一"
"æ–¹ã€ä¸€å¯¾å¤šã‚„多対多関連ã«ãŠã„ã¦ã€ç‰¹ã«äººå·¥è˜åˆ¥åã®å ´åˆã¯åŒã˜ãらã„効率的ã§ã™ã€‚"
"(余談: <literal>SchemaExport ã§å®Ÿéš›ã« <set>not-null=\"true"
"\"</literal> を宣言ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。)"
#. Tag: para
#: performance.xml:1306
#, no-c-format
msgid ""
"<literal><idbag> mappings define a surrogate key, so they "
"are efficient to update. In fact, they are the best case."
msgstr ""
"<literal><idbag> マッピングã¯ä»£ç†ã‚ーを定義ã—ã¾ã™ã€‚ãã®ãŸã‚æ›´"
"æ–°ã¯å¸¸ã«éžå¸¸ã«åŠ¹çŽ‡çš„ã§ã™ã€‚事実上ã€ã“ã‚Œã¯æœ€å–„ã®ã‚±ãƒ¼ã‚¹ã§ã™ã€‚"
#. Tag: para
#: performance.xml:1309
#, no-c-format
msgid ""
"Bags are the worst case since they permit duplicate element values and, as "
"they have no index column, no primary key can be defined. Hibernate has no "
"way of distinguishing between duplicate rows. Hibernate resolves this "
"problem by completely removing in a single <literal>DELETE and "
"recreating the collection whenever it changes. This can be inefficient."
msgstr ""
"bag ã¯æœ€æ‚ªã®ã‚±ãƒ¼ã‚¹ã§ã™ã€‚ bag ã¯è¦ç´ ã®å€¤ã®é‡è¤‡ãŒå¯èƒ½ã§ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚«ãƒ©ãƒ ã‚’æŒ"
"ãŸãªã„ãŸã‚ã€ä¸»ã‚ーã¯å®šç¾©ã•ã‚Œãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 Hibernate ã«ã¯é‡è¤‡ã—ãŸè¡Œã‚’区"
"別ã™ã‚‹æ–¹æ³•ãŒã‚ã‚Šã¾ã›ã‚“。 Hibernate ã¯ã“ã®å•é¡Œã®è§£æ±ºã®ãŸã‚ã«ã€å¤‰æ›´ãŒã‚ã£ãŸã¨ã"
"ã«ã¯å¸¸ã«å®Œå…¨ãªå‰Šé™¤ï¼ˆä¸€ã¤ã® <literal>DELETE ã«ã‚ˆã‚‹ï¼‰ã‚’è¡Œã„ã€ã‚³ãƒ¬ã‚¯"
"ションã®å†ä½œæˆã‚’è¡Œã„ã¾ã™ã€‚ã“ã‚Œã¯éžå¸¸ã«éžåŠ¹çŽ‡çš„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。"
#. Tag: para
#: performance.xml:1316
#, no-c-format
msgid ""
"For a one-to-many association, the \"primary key\" may not be the physical "
"primary key of the database table. Even in this case, the above "
"classification is still useful. It reflects how Hibernate \"locates\" "
"individual rows of the collection."
msgstr ""
"一対多関連ã§ã¯ã€ã€Œä¸»ã‚ーã€ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ†ãƒ¼ãƒ–ルã®ç‰©ç†çš„ãªä¸»ã‚ーã§ã¯ãªã„ã‹"
"ã‚‚ã—ã‚Œãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã—ã‹ã—ã“ã®å ´åˆã§ã•ãˆã€ä¸Šè¨˜ã®åˆ†é¡žã¯ã¾ã 有用"
"ã§ã™ã€‚(HibernateãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å€‹ã€…ã®è¡Œã‚’ã©ã†ã‚„ã£ã¦ã€Œè¦‹ã¤ã‘ã‚‹ã‹ã€ã‚’表ã—ã¦ã„"
"ã¾ã™ã€‚)"
#. Tag: title
#: performance.xml:1323
#, no-c-format
msgid ""
"Lists, maps, idbags and sets are the most efficient collections to update"
msgstr "æ›´æ–°ã«ã‚‚ã£ã¨ã‚‚効率的ãªã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ listã€mapã€idbagã€set"
#. Tag: para
#: performance.xml:1326
#, no-c-format
msgid ""
"From the discussion above, it should be clear that indexed collections and "
"sets allow the most efficient operation in terms of adding, removing and "
"updating elements."
msgstr ""
"上ã§ã®è°è«–ã‹ã‚‰ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä»˜ãコレクションã¨ï¼ˆæ™®é€šã®ï¼‰ set ã¯è¦ç´ ã®è¿½åŠ ã€å‰Š"
"除ã€æ›´æ–°ã§ã‚‚ã£ã¨ã‚‚効率的ãªæ“作ãŒå‡ºæ¥ã‚‹ã“ã¨ã¯æ˜Žã‚‰ã‹ã§ã™ã€‚"
#. Tag: para
#: performance.xml:1330
#, no-c-format
msgid ""
"There is, arguably, one more advantage that indexed collections have over "
"sets for many-to-many associations or collections of values. Because of the "
"structure of a <literal>Set, Hibernate does not UPDATESetINSERT and DELETE ã¯"
"ãã®æ§‹é€ ã®ãŸã‚ã«ã€ Hibernate ã¯è¦ç´ ãŒã€Œå¤‰æ›´ã€ã•ã‚ŒãŸã¨ãã«è¡Œã‚’決ã—㦠"
"<literal>UPDATE ã—ã¾ã›ã‚“。 Set ã¸ã®å¤‰æ›´ã¯å¸¸ã«"
"(個々ã®è¡Œã®ï¼‰ <literal>INSERT 㨠DELETE ã«ã‚ˆã£"
"ã¦è¡Œã„ã¾ã™ã€‚ç¹°ã‚Šè¿”ã—ã¾ã™ãŒã€ã“ã‚Œã¯ä¸€å¯¾å¤šé–¢é€£ã«ã¯å½“ã¦ã¯ã¾ã‚Šã¾ã›ã‚“。"
#. Tag: para
#: performance.xml:1338
#, no-c-format
msgid ""
"After observing that arrays cannot be lazy, you can conclude that lists, "
"maps and idbags are the most performant (non-inverse) collection types, with "
"sets not far behind. You can expect sets to be the most common kind of "
"collection in Hibernate applications. This is because the \"set\" semantics "
"are most natural in the relational model."
msgstr ""
"é…列ã¯é…延処ç†ãŒã§ããªã„ã¨ã„ã†æ±ºã¾ã‚Šãªã®ã§ã€çµè«–ã¨ã—ã¦ã€listã€mapã€idbag ãŒ"
"ã‚‚ã£ã¨ã‚‚パフォーマンスã®è‰¯ã„(inverse ã§ã¯ãªã„)コレクションタイプã¨ãªã‚Šã¾"
"ã™ã€‚ set ã‚‚ãã‚Œã»ã©é•ã„ã¯ã‚ã‚Šã¾ã›ã‚“。 Hibernate ã®ã‚¢ãƒ—リケーションã§ã¯ã€ set "
"ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚‚ã£ã¨ã‚‚共通ã®ç¨®é¡žã¨ã—ã¦æœŸå¾…ã•ã‚Œã¾ã™ã€‚ \"set\" ã®è¡¨ç¾ã¯é–¢é€£ãƒ¢"
"デルã§ã¯ã‚‚ã£ã¨ã‚‚自然ã ã‹ã‚‰ã§ã™ã€‚"
#. Tag: para
#: performance.xml:1344
#, no-c-format
msgid ""
"However, in well-designed Hibernate domain models, most collections are in "
"fact one-to-many associations with <literal>inverse=\"true\". For "
"these associations, the update is handled by the many-to-one end of the "
"association, and so considerations of collection update performance simply "
"do not apply."
msgstr ""
"ã—ã‹ã—ã€ã‚ˆãデザインã•ã‚ŒãŸ Hibernate ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ãƒ¢ãƒ‡ãƒ«ã§ã¯ã€é€šå¸¸ã‚‚ã£ã¨ã‚‚多ã„コ"
"レクションã¯äº‹å®Ÿä¸Š <literal>inverse=\"true\" を指定ã—ãŸä¸€å¯¾å¤šé–¢é€£ã§"
"ã™ã€‚ã“れらã®é–¢é€£ã§ã¯ã€æ›´æ–°ã¯å¤šå¯¾ä¸€ã®é–¢é€£ç«¯ã§æ‰±ã‚ã‚Œã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æ›´æ–°ãƒ‘"
"フォーマンスã®å•é¡Œã¯å½“ã¦ã¯ã¾ã‚Šã¾ã›ã‚“。"
#. Tag: title
#: performance.xml:1352
#, no-c-format
msgid "Bags and lists are the most efficient inverse collections"
msgstr "inverse コレクションã«ã‚‚ã£ã¨ã‚‚最é©ãª bag 㨠list"
#. Tag: para
#: performance.xml:1354
#, no-c-format
msgid ""
"There is a particular case, however, in which bags, and also lists, are much "
"more performant than sets. For a collection with <literal>inverse=\"true\", "
"<literal>Collection.add() or Collection.addAll()List. This "
"can make the following common code much faster:"
msgstr ""
"bag を見放ã—ã¦ã—ã¾ã†å‰ã«ã€ bag (ãã—㦠list も)㌠set よりもãšã£ã¨ãƒ‘フォー"
"マンスãŒè‰¯ã„特別ãªã‚±ãƒ¼ã‚¹ã‚’紹介ã—ã¾ã™ã€‚ <literal>inverse=\"true\" ã®"
"コレクション(一般的ãªä¸€å¯¾å¤šé–¢é€£ã®ä½¿ã„æ–¹ãªã©ï¼‰ã§ã€ bag ã®è¦ç´ ã‚’åˆæœŸåŒ–(フェッ"
"ãƒï¼‰ã™ã‚‹å¿…è¦ãªã bag ã‚„ list ã«è¦ç´ ã‚’è¿½åŠ ã§ãã¾ã™ã€‚ã“れ㯠"
"<literal>Collection.add() ã‚„ Collection.addAll()List ã§ã¯å¸¸ã« true ã‚’è¿”ã•ãªã‘ã‚Œã°ãªã‚‰ãª"
"ã„ã‹ã‚‰ã§ã™ ( <literal>Set ã¨ã¯ç•°ãªã‚Šã¾ã™ï¼‰ã€‚ã“ã‚Œã¯ä»¥ä¸‹ã®å…±é€šå‡¦ç†ã‚’"
"より速ãã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
#. Tag: programlisting
#: performance.xml:1365
#, fuzzy, no-c-format
msgid ""
"Parent p = (Parent) sess.load(Parent.class, id);\n"
"Child c = new Child();\n"
"c.setParent(p);\n"
"p.getChildren().add(c); //no need to fetch the collection!\n"
"sess.flush();"
msgstr ""
"Parent p = (Parent) sess.load(Parent.class, id);\n"
"Child c = new Child();\n"
"c.setParent(p);\n"
"p.getChildren().add(c); //no need to fetch the collection!\n"
"sess.flush();"
#. Tag: title
#: performance.xml:1369
#, no-c-format
msgid "One shot delete"
msgstr "一括削除"
#. Tag: para
#: performance.xml:1371
#, no-c-format
msgid ""
"Deleting collection elements one by one can sometimes be extremely "
"inefficient. Hibernate knows not to do that in the case of an newly-empty "
"collection (if you called <literal>list.clear(), for example). In "
"this case, Hibernate will issue a single <literal>DELETE."
msgstr ""
"時々ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ を一ã¤ä¸€ã¤å‰Šé™¤ã™ã‚‹ã“ã¨ã¯æ¥µã‚ã¦éžåŠ¹çŽ‡çš„ã«ãªã‚‹ã“ã¨ãŒã‚"
"ã‚Šã¾ã™ã€‚ Hibernate ã¯æ„šã‹ã§ã¯ãªã„ã®ã§ã€æ–°ã—ã„空ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å ´åˆ"
"( <literal>list.clear() を呼ã³å‡ºã—ãŸå ´åˆãªã©ï¼‰ã§ã¯ã“れをã™ã¹ãã§ãª"
"ã„ã“ã¨ã‚’知ã£ã¦ã„ã¾ã™ã€‚ã“ã®å ´åˆã¯ã€ Hibernate 㯠<literal>DELETE ã‚’"
"一回発行ã—ã¦ã€ãã‚Œã§ã™ã¹ã¦çµ‚ã‚ã‚Šã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1377
#, no-c-format
msgid ""
"Suppose you added a single element to a collection of size twenty and then "
"remove two elements. Hibernate will issue one <literal>INSERT "
"statement and two <literal>DELETE statements, unless the "
"collection is a bag. This is certainly desirable."
msgstr ""
"サイズ20ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ä¸€ã¤ã®è¦ç´ ã‚’è¿½åŠ ã—ã€ãã‚Œã‹ã‚‰äºŒã¤ã®è¦ç´ を削除ã™ã‚‹ã¨ã—"
"ã¾ã™ã€‚ Hibernate ã¯ä¸€ã¤ã® <literal>INSERT æ–‡ã¨äºŒã¤ã® "
"<literal>DELETE 文を発行ã—ã¾ã™ (コレクション㌠bag ã§ãªã‘ã‚Œã°ï¼‰ã€‚"
"ã“ã‚Œã¯ç¢ºã‹ã«æœ›ã¾ã—ã„動作ã§ã™ã€‚"
#. Tag: para
#: performance.xml:1383
#, no-c-format
msgid ""
"However, suppose that we remove eighteen elements, leaving two and then add "
"thee new elements. There are two possible ways to proceed"
msgstr ""
"ã—ã‹ã—ã€18個ã®è¦ç´ を削除ã—ã¦2ã¤ã‚’残ã—ã€ãã‚Œã‹ã‚‰3ã¤æ–°ã—ã„è¦ç´ ã‚’è¿½åŠ ã™ã‚‹ã¨ã—ã¾"
"ã™ã€‚ã“ã®ã¨ã二ã¤ã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1389
#, no-c-format
msgid "delete eighteen rows one by one and then insert three rows"
msgstr "18行を一ã¤ä¸€ã¤å‰Šé™¤ã—ã¦ã€3è¡Œã‚’è¿½åŠ ã™ã‚‹"
#. Tag: para
#: performance.xml:1394
#, no-c-format
msgid ""
"remove the whole collection in one SQL <literal>DELETE and insert "
"all five current elements one by one"
msgstr ""
"コレクション全体を削除( <literal>DELETE ã® SQL を一回)ã—ã€ãã—ã¦5"
"ã¤ã®è¦ç´ ã™ã¹ã¦ã‚’(一ã¤ãšã¤ï¼‰è¿½åŠ ã™ã‚‹"
#. Tag: para
#: performance.xml:1400
#, no-c-format
msgid ""
"Hibernate cannot know that the second option is probably quicker. It would "
"probably be undesirable for Hibernate to be that intuitive as such behavior "
"might confuse database triggers, etc."
msgstr ""
"Hibernate ã¯ã“ã®å ´åˆã«2番目ã®æ–¹æ³•ãŒã‚ˆã‚Šé€Ÿã„ã ã‚ã†ã¨ã‚ã‹ã‚‹ã»ã©è³¢ãã¯ã‚ã‚Šã¾ã›"
"ん。(ãã—㦠Hibernate ãŒã“ã®ã‚ˆã†ã«è³¢ã„ã“ã¨ã‚‚望ã¾ã—ããªã„ã§ã—ょã†ã€‚ã“ã®ã‚ˆã†ãª"
"振る舞ã„ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒˆãƒªã‚¬ãªã©ã‚’æ··ä¹±ã•ã›ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。)"
#. Tag: para
#: performance.xml:1404
#, no-c-format
msgid ""
"Fortunately, you can force this behavior (i.e. the second strategy) at any "
"time by discarding (i.e. dereferencing) the original collection and "
"returning a newly instantiated collection with all the current elements."
msgstr ""
"幸ã„ã«ã‚‚ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’æ¨ã¦ï¼ˆã¤ã¾ã‚Šå‚照をやã‚ã¦ï¼‰ã€ç¾åœ¨ã®è¦ç´ ã‚’ã™ã¹ã¦æŒ"
"ã¤æ–°ã—ã„コレクションã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’è¿”ã™ã“ã¨ã§ã€ã„ã¤ã§ã‚‚ã“ã®æŒ¯ã‚‹èˆžã„(2番目ã®"
"戦略)を強制ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚時ã«ã“ã‚Œã¯ã¨ã¦ã‚‚便利ã§å¼·åŠ›ã§ã™ã€‚"
#. Tag: para
#: performance.xml:1409
#, no-c-format
msgid ""
"One-shot-delete does not apply to collections mapped <literal>inverse=\"true"
"\"</literal>."
msgstr ""
"ã‚‚ã¡ã‚ã‚“ã€ä¸€æ‹¬å‰Šé™¤ã¯ <literal>inverse=\"true\" を指定ã—ãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§"
"ンã«ã¯è¡Œã„ã¾ã›ã‚“。"
#. Tag: title
#: performance.xml:1415
#, no-c-format
msgid "Monitoring performance"
msgstr "パフォーマンスã®ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°"
#. Tag: para
#: performance.xml:1417
#, no-c-format
msgid ""
"Optimization is not much use without monitoring and access to performance "
"numbers. Hibernate provides a full range of figures about its internal "
"operations. Statistics in Hibernate are available per "
"<literal>SessionFactory."
msgstr ""
"最é©åŒ–ã¯ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°ã‚„パフォーマンスを示ã™æ•°å€¤ãŒãªã‘ã‚Œã°å分ã«è¡Œãˆã¾ã›ã‚“。 "
"Hibernate ã¯å†…部処ç†ã®ã™ã¹ã¦ã®ç¯„囲ã®æ•°å€¤ã‚’æä¾›ã—ã¾ã™ã€‚ Hibernate ã®çµ±è¨ˆæƒ…å ±"
"㯠<literal>SessionFactory å˜ä½ã§å–å¾—å¯èƒ½ã§ã™ã€‚"
#. Tag: title
#: performance.xml:1423
#, no-c-format
msgid "Monitoring a SessionFactory"
msgstr "SessionFactory ã®ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°"
#. Tag: para
#: performance.xml:1425
#, no-c-format
msgid ""
"You can access <literal>SessionFactory metrics in two ways. Your "
"first option is to call <literal>sessionFactory.getStatistics() "
"and read or display the <literal>Statistics yourself."
msgstr ""
"<literal>SessionFactory ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯2ã¤ã®æ–¹æ³•ãŒã‚"
"ã‚Šã¾ã™ã€‚最åˆã®æ–¹æ³•ã¯ã€ <literal>sessionFactory.getStatistics() を呼"
"ã³å‡ºã—ã€è‡ªåˆ†ã§ <literal>Statistics ã®èªã¿è¾¼ã¿ã‚„表示を行ã„ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1430
#, no-c-format
msgid ""
"Hibernate can also use JMX to publish metrics if you enable the "
"<literal>StatisticsService MBean. You can enable a single MBean "
"for all your <literal>SessionFactory or one per factory. See the "
"following code for minimalistic configuration examples:"
msgstr ""
"<literal>StatisticsService MBean を有効ã«ã—ã¦ã„ã‚Œã°ã€ Hibernate 㯠"
"JMX を使ã£ã¦ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’発行ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚1ã¤ã® MBean ã‚’ã™ã¹ã¦ã® "
"<literal>SessionFactory ã«å¯¾ã—ã¦æœ‰åŠ¹ã«ã™ã‚‹ã‹ã€ SessionFactory ã”ã¨"
"ã«ä¸€ã¤ã® MBean を有効ã«ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚最å°é™ã®è¨å®šä¾‹ã§ã‚る以下ã®ã‚³ãƒ¼ãƒ‰ã‚’"
"見ã¦ãã ã•ã„:"
#. Tag: programlisting
#: performance.xml:1435
#, fuzzy, no-c-format
msgid ""
"// MBean service registration for a specific SessionFactory\n"
"Hashtable tb = new Hashtable();\n"
"tb.put(\"type\", \"statistics\");\n"
"tb.put(\"sessionFactory\", \"myFinancialApp\");\n"
"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
"\n"
"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
"stats.setSessionFactory(sessionFactory); // Bind the stats to a "
"SessionFactory\n"
"server.registerMBean(stats, on); // Register the Mbean on the server"
msgstr ""
"// MBean service registration for a specific SessionFactory\n"
"Hashtable tb = new Hashtable();\n"
"tb.put(\"type\", \"statistics\");\n"
"tb.put(\"sessionFactory\", \"myFinancialApp\");\n"
"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
"\n"
"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
"stats.setSessionFactory(sessionFactory); // Bind the stats to a "
"SessionFactory\n"
"server.registerMBean(stats, on); // Register the Mbean on the server"
#. Tag: programlisting
#: performance.xml:1437
#, fuzzy, no-c-format
msgid ""
"// MBean service registration for all SessionFactory's\n"
"Hashtable tb = new Hashtable();\n"
"tb.put(\"type\", \"statistics\");\n"
"tb.put(\"sessionFactory\", \"all\");\n"
"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
"\n"
"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
"server.registerMBean(stats, on); // Register the MBean on the server"
msgstr ""
"// MBean service registration for all SessionFactory's\n"
"Hashtable tb = new Hashtable();\n"
"tb.put(\"type\", \"statistics\");\n"
"tb.put(\"sessionFactory\", \"all\");\n"
"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
"\n"
"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
"server.registerMBean(stats, on); // Register the MBean on the server"
#. Tag: para
#: performance.xml:1439
#, no-c-format
msgid ""
"You can activate and deactivate the monitoring for a "
"<literal>SessionFactory:"
msgstr ""
"<literal>SessionFactory ã«å¯¾ã—ã¦ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°ã®é–‹å§‹ï¼ˆçµ‚了)を行ã†ã“"
"ã¨ãŒå‡ºæ¥ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1444
#, no-c-format
msgid ""
"at configuration time, set <literal>hibernate.generate_statistics "
"to <literal>false"
msgstr ""
"è¨å®šæ™‚ã«ã¯ã€ <literal>hibernate.generate_statistics ã‚’ "
"<literal>false ã«ã—ã¾ã™"
#. Tag: para
#: performance.xml:1452
#, no-c-format
msgid ""
"at runtime: <literal>sf.getStatistics().setStatisticsEnabled(true) "
"or <literal>hibernateStatsBean.setStatisticsEnabled(true)"
msgstr ""
"実行時ã«ã€ <literal>sf.getStatistics().setStatisticsEnabled(true) "
"ã¾ãŸã¯ <literal>hibernateStatsBean.setStatisticsEnabled(true) を呼"
"ã³å‡ºã—ã¾ã™"
#. Tag: para
#: performance.xml:1458
#, no-c-format
msgid ""
"Statistics can be reset programmatically using the <literal>clear() method."
msgstr ""
"統計㯠<literal>clear() メソッドを使ã£ã¦æ‰‹å‹•ã§ãƒªã‚»ãƒƒãƒˆã™ã‚‹ã“ã¨ãŒå‡º"
"æ¥ã¾ã™ã€‚サマリ㯠<literal>logSummary() メソッドを使ã£ã¦ logger ã«é€"
"ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ï¼ˆinfo レベルã§ã™ï¼‰ã€‚"
#. Tag: title
#: performance.xml:1464
#, no-c-format
msgid "Metrics"
msgstr "メトリクス"
#. Tag: para
#: performance.xml:1466
#, no-c-format
msgid ""
"Hibernate provides a number of metrics, from basic information to more "
"specialized information that is only relevant in certain scenarios. All "
"available counters are described in the <literal>Statistics "
"interface API, in three categories:"
msgstr ""
"多ãã®ã‚‚ã®ãŒã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®ä½¿ç”¨å¯èƒ½ãªã‚«ã‚¦ãƒ³ã‚¿ã¯ <literal>Statistics usage, such as "
"number of open sessions, retrieved JDBC connections, etc."
msgstr ""
"メトリクスã¯ä¸€èˆ¬çš„㪠<literal>Session ã®ä½¿ã„æ–¹ã¨é–¢ä¿‚ã—ã¦ã„ã¾ã™ã€‚"
"オープンã—ãŸã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æ•°ãŒ JDBC コãƒã‚¯ã‚·ãƒ§ãƒ³ã¨é–¢é€£ã—ã¦ã„ã‚‹ã®ã¨åŒã˜ã§ã™ã€‚"
#. Tag: para
#: performance.xml:1479
#, no-c-format
msgid ""
"Metrics related to the entities, collections, queries, and caches as a whole "
"(aka global metrics)."
msgstr ""
"メトリクスã¯è¦ç´ ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚¯ã‚¨ãƒªã‚„ã‚ャッシュãªã©å…¨ä½“ã«é–¢ä¿‚ã—ã¦ã„ã¾ã™"
"(別åã¯ã‚°ãƒãƒ¼ãƒãƒ«ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã™ï¼‰ã€‚"
#. Tag: para
#: performance.xml:1484
#, no-c-format
msgid ""
"Detailed metrics related to a particular entity, collection, query or cache "
"region."
msgstr ""
"メトリクスã®è©³ç´°ã¯ç‰¹å®šã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚¯ã‚¨ãƒªã€ã‚ãƒ£ãƒƒã‚·ãƒ¥é ˜åŸŸã«"
"関係ã—ã¦ã„ã¾ã™ã€‚"
#. Tag: para
#: performance.xml:1489
#, no-c-format
msgid ""
"For example, you can check the cache hit, miss, and put ratio of entities, "
"collections and queries, and the average time a query needs. Be aware that "
"the number of milliseconds is subject to approximation in Java. Hibernate is "
"tied to the JVM precision and on some platforms this might only be accurate "
"to 10 seconds."
msgstr ""
"例ã¨ã—ã¦ã€ã‚ャッシュã®ãƒ’ットã€ãƒ’ットミスやã€è¦ç´ ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚¯ã‚¨ãƒªã®å‰²"
"åˆã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã«å¿…è¦ãªå¹³å‡æ™‚間を確èªã§ãã¾ã™ã€‚ミリ秒ã®æ•°å€¤ã¯ Java ã®è¿‘似を"
"å—ã‘ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 Hibernate 㯠JVM ã®ç²¾åº¦ã«åˆ¶é™ã•ã‚Œã€ãƒ—ラット"
"フォームã«ã‚ˆã£ã¦ã¯10秒å˜ä½ã§ã—ã‹æ£ç¢ºã§ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。"
#. Tag: para
#: performance.xml:1495
#, no-c-format
msgid ""
"Simple getters are used to access the global metrics (i.e. not tied to a "
"particular entity, collection, cache region, etc.). You can access the "
"metrics of a particular entity, collection or cache region through its name, "
"and through its HQL or SQL representation for queries. Please refer to the "
"<literal>Statistics, EntityStatistics, "
"<literal>CollectionStatistics, "
"<literal>SecondLevelCacheStatistics, and QueryStatistics 〠EntityStatistics 〠"
"<literal>CollectionStatistics 〠"
"<literal>SecondLevelCacheStatistics 〠QueryStatistics, "
"<literal>getEntityNames(), getCollectionRoleNames()getSecondLevelCacheRegionNames()."
msgstr ""
"ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚¯ã‚¨ãƒªã€ã‚ãƒ£ãƒƒã‚·ãƒ¥é ˜åŸŸã«å¯¾ã—ã¦è¡Œã†å ´åˆ"
"ã¯ã€ <literal>getQueries() 〠getEntityNames()getCollectionRoleNames() 〠"
"<literal>getSecondLevelCacheRegionNames() メソッドã§ãã‚Œãžã‚Œã®åå‰"
"ã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚"
#~ msgid ""
#~ "The <literal><cache> element of a class or collection "
#~ "mapping has the following form:"
#~ msgstr ""
#~ "クラスやコレクションã®ãƒžãƒƒãƒ”ング㮠<literal><cache> è¦ç´ ã¯"
#~ "以下ã®å½¢å¼ã§ã™ã€‚"
#~ msgid ""
#~ "The <literal>usage attribute specifies a cache "
#~ "concurrency strategy</emphasis>."
#~ msgstr ""
#~ "<literal>usage 属性㯠ã‚ャッシュã®ä¸¦åˆ—性戦略), "
#~ "the other holding timestamps of the most recent updates to queryable "
#~ "tables (<literal>org.hibernate.cache.UpdateTimestampsCache). "
#~ "Note that the query cache does not cache the state of the actual entities "
#~ "in the result set; it caches only identifier values and results of value "
#~ "type. The query cache should always be used in conjunction with the "
#~ "second-level cache."
#~ msgstr ""
#~ "ã“ã®è¨å®šã¯æ–°ãŸã«äºŒã¤ã®ã‚ãƒ£ãƒƒã‚·ãƒ¥é ˜åŸŸã®ä½œæˆã‚’è¡Œã„ã¾ã™ã€‚一ã¤ã¯ã‚¯ã‚¨ãƒªã®ãƒªã‚¶ãƒ«"
#~ "トセットã®ã‚ャッシュ( <literal>org.hibernate.cache.StandardQueryCache )を"
#~ "ä¿æŒã—ã¾ã™ã€‚クエリã‚ャッシュã¯ãƒªã‚¶ãƒ«ãƒˆã‚»ãƒƒãƒˆã®å®Ÿéš›ã®è¦ç´ ã®çŠ¶æ…‹ã¯ã‚ャッシュ"
#~ "ã—ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã‚ャッシュã™ã‚‹ã®ã¯è˜åˆ¥åã®å€¤ã¨ã€å€¤åž‹ã®çµæžœã®"
#~ "ã¿ã§ã™ã€‚ãã®ãŸã‚ã€ã‚¯ã‚¨ãƒªã‚ャッシュã¯å¸¸ã«äºŒæ¬¡ã‚ャッシュã¨ä¸€ç·’ã«ä½¿ã†ã¹ãã§"
#~ "ã™ã€‚"
#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"eg.Immutable\" mutable=\"false\">\n"
#~ " <cache usage=\"read-only\"/>\n"
#~ " ....\n"
#~ "</class>"
#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"eg.Cat\" .... >\n"
#~ " <cache usage=\"read-write\"/>\n"
#~ " ....\n"
#~ " <set name=\"kittens\" ... >\n"
#~ " <cache usage=\"read-write\"/>\n"
#~ " ....\n"
#~ " </set>\n"
#~ "</class>"
Other Hibernate examples (source code examples)
Here is a short list of links related to this Hibernate performance.po source code file:
|