|
Hibernate example source code file (session_api.po)
This example Hibernate source code file (session_api.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 session_api.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-21 05:43+0000\n"
"PO-Revision-Date: 2010-01-07 14:56+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
#: session_api.xml:31
#, no-c-format
msgid "Working with objects"
msgstr "オブジェクトを扱ã†"
#. Tag: para
#: session_api.xml:33
#, no-c-format
msgid ""
"Hibernate is a full object/relational mapping solution that not only shields "
"the developer from the details of the underlying database management system, "
"but also offers <emphasis>state management of objects. This is, "
"contrary to the management of SQL <literal>statements in common "
"JDBC/SQL persistence layers, a natural object-oriented view of persistence "
"in Java applications."
msgstr ""
"Hibernate ã¯å®Œå…¨ãªã‚ªãƒ–ジェクト/リレーショナルマッピングソリューションã§ã‚ã‚Šã€"
"データベース管ç†ã‚·ã‚¹ãƒ†ãƒ ã®è©³ç´°ã‚’開発者ã‹ã‚‰éš 蔽ã™ã‚‹ã ã‘ã§ãªãã€ã‚ªãƒ–ジェクト㮠"
"<emphasis>çŠ¶æ…‹ç®¡ç† ã‚‚è¡Œã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ JDBC/SQL 永続層ã¨åŒã˜ã‚ˆã†"
"㪠SQL <literal>statements ã®ç®¡ç†ã¨ã¯ç•°ãªã‚Šã€ Java アプリケーション"
"ã«ãŠã‘る永続化ã«å¯¾ã™ã‚‹ã€ã¨ã¦ã‚‚自然ãªã‚ªãƒ–ジェクト指å‘ã®è€ƒãˆæ–¹ã‚’æä¾›ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:40
#, no-c-format
msgid ""
"In other words, Hibernate application developers should always think about "
"the <emphasis>state of their objects, and not necessarily about "
"the execution of SQL statements. This part is taken care of by Hibernate and "
"is only relevant for the application developer when tuning the performance "
"of the system."
msgstr ""
"言ã„ã‹ãˆã‚Œã°ã€ Hibernate を用ã„るアプリケーション開発者ã¯ã€ã‚ªãƒ–ジェクト㮠"
"<emphasis>状態 ã«ã¤ã„ã¦ã¯å¸¸ã«æ„è˜ã™ã¹ãã§ã‚り〠SQL æ–‡ã®å®Ÿè¡Œã«ã¤ã„"
"ã¦ã¯å¿…ãšã—ã‚‚ãã†ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®éƒ¨åˆ†ã¯ã€é€šå¸¸ã€ Hibernate ãŒå‡¦ç†ã—ã€ã‚·ã‚¹ãƒ†"
"ムã®ãƒ‘フォーマンスをãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°ã™ã‚‹ã¨ãã«ã ã‘ã€å•é¡Œã«ãªã£ã¦ãã¾ã™ã€‚"
#. Tag: title
#: session_api.xml:47
#, no-c-format
msgid "Hibernate object states"
msgstr "Hibernate ã«ãŠã‘るオブジェクトã®çŠ¶æ…‹"
#. Tag: para
#: session_api.xml:49
#, no-c-format
msgid "Hibernate defines and supports the following object states:"
msgstr "Hibernate ã¯æ¬¡ã®ã‚ˆã†ãªã‚ªãƒ–ジェクトã®çŠ¶æ…‹ã‚’定義ã—ã€ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™:"
#. Tag: para
#: session_api.xml:53
#, no-c-format
msgid ""
"<emphasis>Transient - an object is transient if it has just been "
"instantiated using the <literal>new operator, and it is not "
"associated with a Hibernate <literal>Session. It has no persistent "
"representation in the database and no identifier value has been assigned. "
"Transient instances will be destroyed by the garbage collector if the "
"application does not hold a reference anymore. Use the Hibernate "
"<literal>Session to make an object persistent (and let Hibernate "
"take care of the SQL statements that need to be executed for this "
"transition)."
msgstr ""
"<emphasis>Transient - new 演算åを使ã£ã¦ã‚¤ãƒ³ã‚¹"
"タンス化ã•ã‚ŒãŸã ã‘ã§ã€ Hibernate ã® <literal>Session ã«é–¢é€£ä»˜ã‘られ"
"ã¦ã„ãªã„オブジェクトã¯ã€ transient ã§ã™ã€‚ãã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æ°¸ç¶šçš„ãªè¡¨ç¾ã‚’"
"æŒãŸãšã€è˜åˆ¥åã¨ãªã‚‹å€¤ã¯å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã›ã‚“。 Transient インスタンスã¯ã€ã‚¢"
"プリケーションãŒãã®å‚照をã©ã“ã«ã‚‚ä¿æŒã—ãªã„å ´åˆã«ã€ã‚¬ãƒ™ãƒ¼ã‚¸ã‚³ãƒ¬ã‚¯ã‚¿ã«ã‚ˆã£ã¦"
"ç ´æ£„ã•ã‚Œã¾ã™ã€‚オブジェクトを永続的 (persistent) ãªçŠ¶æ…‹ã«ã™ã‚‹ãŸã‚ã«ã¯ã€ "
"Hibernate ã® <literal>Session を使ã„ã¾ã—ょã†ï¼ˆã“ã®çŠ¶æ…‹é·ç§»ã«å¿…è¦ã¨"
"ãªã‚‹ SQL æ–‡ã®ç™ºè¡Œã¯ã€ Hibernate ã«ä»»ã›ã¾ã—ょã†ï¼‰ã€‚"
#. Tag: para
#: session_api.xml:65
#, no-c-format
msgid ""
"<emphasis>Persistent - a persistent instance has a representation "
"in the database and an identifier value. It might just have been saved or "
"loaded, however, it is by definition in the scope of a <literal>Session "
"statements, or <literal>DELETE statements when an object should be "
"made transient."
msgstr ""
"<emphasis>永続的 (Persistent) - 永続的ãªã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹"
"ã«æ°¸ç¶šçš„ãªè¡¨ç¾ã‚’æŒã¡ã€è˜åˆ¥åã¨ãªã‚‹å€¤ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ãã‚Œã¯ã€ã‚»ãƒ¼ãƒ–ã•ã‚ŒãŸã‚Šã€"
"ãƒãƒ¼ãƒ‰ã•ã‚ŒãŸã‚Šã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€å®šç¾©ä¸Šã¯ã€ <literal>Session ã®"
"スコープã®ä¸ã«å˜åœ¨ã—ã¦ã„ã¾ã™ã€‚ Hibernate ã¯ã€ä½œæ¥å˜ä½ï¼ˆUnit of Work)ãŒå®Œäº†ã—"
"ãŸã¨ãã«ã€æ°¸ç¶šçŠ¶æ…‹ã®ã‚ªãƒ–ジェクトã«åŠ ãˆã‚‰ã‚ŒãŸå¤‰æ›´ã‚’検出ã—ã€ã‚ªãƒ–ジェクトã®çŠ¶æ…‹"
"ã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’åŒæœŸã—ã¾ã™ã€‚オブジェクトを transient ã«ã™ã‚‹ã¨ãã¯ã€é–‹ç™ºè€…ã¯ã€"
"手作æ¥ã§ <literal>UPDATE 文や DELETE 文を実行ã—"
"ã¾ã›ã‚“。"
#. Tag: para
#: session_api.xml:77
#, no-c-format
msgid ""
"<emphasis>Detached - a detached instance is an object that has "
"been persistent, but its <literal>Session has been closed. The "
"reference to the object is still valid, of course, and the detached instance "
"might even be modified in this state. A detached instance can be reattached "
"to a new <literal>Session at a later point in time, making it (and "
"all the modifications) persistent again. This feature enables a programming "
"model for long running units of work that require user think-time. We call "
"them <emphasis>application transactions, i.e., a unit of work "
"from the point of view of the user."
msgstr ""
"<emphasis>Detached - detached インスタンスã¨ã¯ã€æ°¸ç¶šåŒ–ã•ã‚Œã¦ã„ã‚‹"
"ãŒã€ãã‚Œã¨é–¢é€£ä»˜ã„ã¦ã„㟠<literal>Session ãŒã‚¯ãƒãƒ¼ã‚ºã•ã‚Œã¦ã„るオブ"
"ジェクトã®ã“ã¨ã§ã™ã€‚ãã®ã‚ªãƒ–ジェクトã¸ã®å‚ç…§ã¯ã€ä¾ç„¶ã¨ã—ã¦æœ‰åŠ¹ã§ã™ã€‚ãã—ã¦ã€"
"ã‚‚ã¡ã‚ã‚“ã€detached インスタンスã¯ã“ã®çŠ¶æ…‹ã«ä¿®æ£ã™ã‚‹ã“ã¨ã•ãˆã§ãã¾ã™ã€‚ "
"detached インスタンスã¯ã€ã‚‚ã†ä¸€åº¦æ°¸ç¶šåŒ–ã—ãŸã„(ãã—ã¦ã€ã™ã¹ã¦ã®å¤‰æ›´ã‚’永続化ã—"
"ãŸã„)ã¨ãã«ã€æ–°ã—ã„ <literal>Session ã«å†è¿½åŠ ã§ãã¾ã™ã€‚ã“ã®æ©Ÿèƒ½"
"ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè€ƒãˆã‚‹æ™‚é–“ã‚’å¿…è¦ã¨ã™ã‚‹ã‚ˆã†ãªã€é•·æœŸé–“ã«åŠã¶ä½œæ¥å˜ä½ã«å¯¾ã™ã‚‹ãƒ—ãƒ"
"グラミングモデルをå¯èƒ½ã«ã—ã¾ã™ã€‚我々ã¯ã€ã“れを <emphasis>アプリケーションã®ãƒˆ"
"ランザクション(application transactions)</emphasis> ã¨å‘¼ã‚“ã§ã„ã¾ã™ã€‚ã™ãªã‚"
"ã¡ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰è¦‹ãŸä½œæ¥å˜ä½ã ã¨ã„ã†ã“ã¨ã§ã™ã€‚"
#. Tag: para
#: session_api.xml:90
#, no-c-format
msgid ""
"We will now discuss the states and state transitions (and the Hibernate "
"methods that trigger a transition) in more detail."
msgstr ""
"ã“ã‚Œã‹ã‚‰ã€çŠ¶æ…‹ã¨çŠ¶æ…‹é·ç§»ï¼ˆãã—ã¦ã€é·ç§»ã®ãã£ã‹ã‘ã¨ãªã‚‹ Hibernate ã®ãƒ¡ã‚½ãƒƒãƒ‰ï¼‰"
"ã«ã¤ã„ã¦ã€è©³ç´°ã«è¿°ã¹ã¾ã™ã€‚"
#. Tag: title
#: session_api.xml:95
#, no-c-format
msgid "Making objects persistent"
msgstr "オブジェクトを永続状態ã«ã™ã‚‹"
#. Tag: para
#: session_api.xml:97
#, fuzzy, no-c-format
msgid ""
"Newly instantiated instances of a persistent class are considered "
"<emphasis>transient by Hibernate. We can make a transient "
"instance <emphasis>persistent by associating it with a session:"
msgstr ""
"æ–°ã—ãインスタンス化ã•ã‚ŒãŸæ°¸ç¶šã‚¯ãƒ©ã‚¹ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã€ Hibernate ã§ã¯ "
"<emphasis>transient ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚以下ã®ã‚ˆã†ã«ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¨é–¢é€£"
"ã¥ã‘ã‚‹ã“ã¨ã§ã€ transient インスタンスを <emphasis>永続状態 (persistent) has a generated identifier, the identifier is "
"generated and assigned to the <literal>cat when save()Cat has an assigned instance before calling save()persist() instead of "
"<literal>save(), with the semantics defined in the EJB3 early "
"draft."
msgstr ""
"<literal>Cat クラスã®è˜åˆ¥åãŒè‡ªå‹•ç”Ÿæˆã•ã‚Œã‚‹ã®ã§ã‚ã‚Œã°ã€ "
"<literal>save() ãŒå‘¼ã°ã‚Œã‚‹ã¨ãã«ã€è˜åˆ¥åãŒç”Ÿæˆã•ã‚Œã€ catCat ã®è˜åˆ¥å㌠"
"<literal>assigned è˜åˆ¥åã‚’æŒã¤ã‹ã€è¤‡åˆã‚ーã§ã‚ã‚‹ãªã‚‰ã€ "
"<literal>save() を呼ã³å‡ºã™å‰ã«ã€è˜åˆ¥åã‚’ cat イ"
"ンスタンスを割り当ã¦ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 <literal>save() ã®ä»£ã‚ã‚Š"
"ã«ã€ EJB3 ã®åˆæœŸãƒ‰ãƒ©ãƒ•ãƒˆã§å®šç¾©ã•ã‚ŒãŸ <literal>persist() を使ã†ã“ã¨"
"ã‚‚å¯èƒ½ã§ã™ã€‚"
#. Tag: para
#: session_api.xml:115
#, no-c-format
msgid ""
"<literal>persist() makes a transient instance persistent. However, "
"it does not guarantee that the identifier value will be assigned to the "
"persistent instance immediately, the assignment might happen at flush time. "
"<literal>persist() also guarantees that it will not execute an "
"<literal>INSERT statement if it is called outside of transaction "
"boundaries. This is useful in long-running conversations with an extended "
"Session/persistence context."
msgstr ""
#. Tag: para
#: session_api.xml:126
#, no-c-format
msgid ""
"<literal>save() does guarantee to return an identifier. If an "
"INSERT has to be executed to get the identifier ( e.g. \"identity\" "
"generator, not \"sequence\"), this INSERT happens immediately, no matter if "
"you are inside or outside of a transaction. This is problematic in a long-"
"running conversation with an extended Session/persistence context."
msgstr ""
#. Tag: para
#: session_api.xml:135
#, fuzzy, no-c-format
msgid ""
"Alternatively, you can assign the identifier using an overloaded version of "
"<literal>save()."
msgstr ""
"代ã‚ã‚Šã«ã€è˜åˆ¥åを引数ã«ã¨ã‚‹ <literal>save() メソッドを使ã£ã¦ã€è˜åˆ¥"
"åを割り当ã¦ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:138
#, fuzzy, no-c-format
msgid ""
"DomesticCat pk = new DomesticCat();\n"
"pk.setColor(Color.TABBY);\n"
"pk.setSex('F');\n"
"pk.setName(\"PK\");\n"
"pk.setKittens( new HashSet() );\n"
"pk.addKitten(fritz);\n"
"sess.save( pk, new Long(1234) );"
msgstr ""
"DomesticCat pk = new DomesticCat();\n"
"pk.setColor(Color.TABBY);\n"
"pk.setSex('F');\n"
"pk.setName(\"PK\");\n"
"pk.setKittens( new HashSet() );\n"
"pk.addKitten(fritz);\n"
"sess.save( pk, new Long(1234) );"
#. Tag: para
#: session_api.xml:140
#, no-c-format
msgid ""
"If the object you make persistent has associated objects (e.g. the "
"<literal>kittens collection in the previous example), these "
"objects can be made persistent in any order you like unless you have a "
"<literal>NOT NULL constraint upon a foreign key column. There is "
"never a risk of violating foreign key constraints. However, you might "
"violate a <literal>NOT NULL constraint if you save() コレクションã®ã‚ˆã†ã«ï¼‰ã€å¤–部ã‚ーカラムã«ã€ "
"<literal>NOT NULL 制約をã¤ã‘ãªã„é™ã‚Šã¯ã€ã“れらã®ä¸€é€£ã®ã‚ªãƒ–ジェクト"
"ã‚’ã©ã‚“ãªé †ç•ªã§æ°¸ç¶šåŒ–ã—ã¦ã‚‚ã‹ã¾ã„ã¾ã›ã‚“。外部ã‚ー制約をé•åã™ã‚‹æã‚Œã¯ã‚ã‚Šã¾ã›"
"ん。ã—ã‹ã—〠<literal>NOT NULL 制約ãŒã‚ã‚‹å ´åˆã€é–“é•ã£ãŸé †ç•ªã§ã‚ªãƒ–"
"ジェクトを <literal>save() ã—ã¦ã—ã¾ã†ã¨ã€åˆ¶ç´„ã«é•åã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›"
"ん。"
#. Tag: para
#: session_api.xml:148
#, no-c-format
msgid ""
"Usually you do not bother with this detail, as you will normally use "
"Hibernate's <emphasis>transitive persistence feature to save the "
"associated objects automatically. Then, even <literal>NOT NULL "
"constraint violations do not occur - Hibernate will take care of everything. "
"Transitive persistence is discussed later in this chapter."
msgstr ""
"関連ã™ã‚‹ã‚ªãƒ–ジェクトを自動的ã«ä¿å˜ã™ã‚‹ã€ Hibernate ã® <emphasis>é·ç§»çš„ãªæ°¸ç¶š"
"化 (transitive persistence)</emphasis> 機能を使ã†ã¤ã‚‚ã‚Šãªã‚‰ã°ã€ãã®ã‚ˆã†ãªè©³ç´°"
"ã‚’æ°—ã«ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。ãã—ã¦ã€ <literal>NOT NULL 制約ã®é•åã™"
"ら起ã“ã‚Šã¾ã›ã‚“。 Hibernate ãŒã™ã¹ã¦é¢å€’ã‚’ã¿ã¦ãã‚Œã¾ã™ã€‚é·ç§»çš„ãªæ°¸ç¶šåŒ–ã¯ã€ã“ã®"
"ç« ã®å¾ŒåŠã«æ›¸ã‹ã‚Œã¦ã„ã¾ã™ã€‚"
#. Tag: title
#: session_api.xml:157
#, no-c-format
msgid "Loading an object"
msgstr "オブジェクトã®ãƒãƒ¼ãƒ‰"
#. Tag: para
#: session_api.xml:159
#, no-c-format
msgid ""
"The <literal>load() methods of Session provide "
"a way of retrieving a persistent instance if you know its identifier. "
"<literal>load() takes a class object and loads the state into a "
"newly instantiated instance of that class in a persistent state."
msgstr ""
"永続化ã•ã‚ŒãŸã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®è˜åˆ¥åãŒã‚らã‹ã˜ã‚分ã‹ã£ã¦ã„ã‚‹ãªã‚‰ã€ "
"<literal>Session ã® load() メソッドを使ã£ã¦ã€å¾©"
"å…ƒã§ãã¾ã™ã€‚ <literal>load() ã¯ã€ Class オブジェクトを引数ã«ã¨ã‚Šã€"
"ãã®ã‚¯ãƒ©ã‚¹ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’æ–°ãŸã«ç”Ÿæˆã—ã€çŠ¶æ…‹ã‚’ãƒãƒ¼ãƒ‰ã—ã¾ã™ã€‚ãã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹"
"ã®çŠ¶æ…‹ã¯ã€æ°¸ç¶š (persistent) 状態ã§ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:165
#, fuzzy, no-c-format
msgid "Cat fritz = (Cat) sess.load(Cat.class, generatedId);"
msgstr "Cat fritz = (Cat) sess.load(Cat.class, generatedId);"
#. Tag: programlisting
#: session_api.xml:167
#, fuzzy, no-c-format
msgid ""
"// you need to wrap primitive identifiers\n"
"long id = 1234;\n"
"DomesticCat pk = (DomesticCat) sess.load( DomesticCat.class, new Long(id) );"
msgstr ""
"// you need to wrap primitive identifiers\n"
"long id = 1234;\n"
"DomesticCat pk = (DomesticCat) sess.load( DomesticCat.class, new Long(id) );"
#. Tag: para
#: session_api.xml:169
#, no-c-format
msgid "Alternatively, you can load state into a given instance:"
msgstr ""
"ã‚ã‚‹ã„ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã€æ—¢å˜ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«çŠ¶æ…‹ã‚’ãƒãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™:"
#. Tag: programlisting
#: session_api.xml:171
#, fuzzy, no-c-format
msgid ""
"Cat cat = new DomesticCat();\n"
"// load pk's state into cat\n"
"sess.load( cat, new Long(pkId) );\n"
"Set kittens = cat.getKittens();"
msgstr ""
"Cat cat = new DomesticCat();\n"
"// load pk's state into cat\n"
"sess.load( cat, new Long(pkId) );\n"
"Set kittens = cat.getKittens();"
#. Tag: para
#: session_api.xml:173
#, no-c-format
msgid ""
"Be aware that <literal>load() will throw an unrecoverable "
"exception if there is no matching database row. If the class is mapped with "
"a proxy, <literal>load() just returns an uninitialized proxy and "
"does not actually hit the database until you invoke a method of the proxy. "
"This is useful if you wish to create an association to an object without "
"actually loading it from the database. It also allows multiple instances to "
"be loaded as a batch if <literal>batch-size is defined for the "
"class mapping."
msgstr ""
"DB ã«è©²å½“ã™ã‚‹è¡ŒãŒç„¡ã„å ´åˆã€ <literal>load() ã¯å›žå¾©ä¸å¯èƒ½ãªä¾‹å¤–を投"
"ã’ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¾ã—ょã†ã€‚ãã®ã‚¯ãƒ©ã‚¹ãŒãƒ—ãƒã‚シを使ã£ã¦ãƒžãƒƒãƒ”ングã•ã‚Œã¦ã„ã‚‹å ´"
"åˆã€ <literal>load() ã¯åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„プãƒã‚ã‚·ã‚’è¿”ã—ã€ãƒ—ãƒã‚ã‚·ã®"
"メソッドãŒå‘¼ã°ã‚Œã‚‹ã¾ã§å®Ÿéš›ã«ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã›ã‚“。もã—ã€å®Ÿéš›ã«"
"データベースã‹ã‚‰ãƒãƒ¼ãƒ‰ã›ãšã«ã€ã‚ªãƒ–ジェクトã«å¯¾ã™ã‚‹é–¢é€£ã‚’作りãŸã„å ´åˆã€ã“ã®æŒ¯"
"る舞ã„ã¯ã¨ã¦ã‚‚役立ã¡ã¾ã™ã€‚ <literal>batch-size ãŒã‚¯ãƒ©ã‚¹ãƒžãƒƒãƒ”ングã«"
"定義ã•ã‚Œã¦ã„ã‚‹ãªã‚‰ã°ã€è¤‡æ•°ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’一括ã§ãƒãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚"
#. Tag: para
#: session_api.xml:182
#, no-c-format
msgid ""
"If you are not certain that a matching row exists, you should use the "
"<literal>get() method which hits the database immediately and "
"returns null if there is no matching row."
msgstr ""
"該当ã™ã‚‹è¡ŒãŒå˜åœ¨ã™ã‚‹ã“ã¨ã‚’確信ã§ããªã„å ´åˆã¯ã€ <literal>get() メ"
"ソッドを使ã†ã¹ãã§ã™ã€‚ãã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã™ãã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã€è©²å½“ã™ã‚‹è¡ŒãŒç„¡"
"ã„å ´åˆã¯ null ã‚’è¿”ã—ã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:186
#, fuzzy, no-c-format
msgid ""
"Cat cat = (Cat) sess.get(Cat.class, id);\n"
"if (cat==null) {\n"
" cat = new Cat();\n"
" sess.save(cat, id);\n"
"}\n"
"return cat;"
msgstr ""
"Cat cat = (Cat) sess.get(Cat.class, id);\n"
"if (cat==null) {\n"
" cat = new Cat();\n"
" sess.save(cat, id);\n"
"}\n"
"return cat;"
#. Tag: para
#: session_api.xml:188
#, no-c-format
msgid ""
"You can even load an object using an SQL <literal>SELECT ... FOR UPDATELockMode. See the API documentation for "
"more information."
msgstr ""
"<literal>LockMode を使ãˆã°ã€ SELECT ... FOR UPDATEFOR UPDATE, unless you decide to "
"specify <literal>lock or all as a cascade style "
"for the association."
msgstr ""
"関連ã«å¯¾ã™ã‚‹ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰æ–¹æ³•ã¨ã—㦠<literal>lock ã‚„ all ã§å¾©å…ƒ ã•ã‚Œãªã„ ã“ã¨ã«æ³¨æ„"
"ã—ã¾ã—ょã†ã€‚"
#. Tag: para
#: session_api.xml:199
#, no-c-format
msgid ""
"It is possible to re-load an object and all its collections at any time, "
"using the <literal>refresh() method. This is useful when database "
"triggers are used to initialize some of the properties of the object."
msgstr ""
"<literal>refresh() メソッドを使ã†ã“ã¨ã§ã€ã©ã‚“ãªã¨ãã§ã‚‚ã€ã‚ªãƒ–ジェク"
"トやãã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’リãƒãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚データベースã®ãƒˆãƒªã‚¬ãŒãƒ†ãƒ¼"
"ブルを更新ã—ãŸéš›ã«ã€ãã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトã®ãƒ—ãƒãƒ‘ティをåŒæœŸã™ã‚‹"
"å ´åˆã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå½¹ã«ç«‹ã¡ã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:204
#, fuzzy, no-c-format
msgid ""
"sess.save(cat);\n"
"sess.flush(); //force the SQL INSERT\n"
"sess.refresh(cat); //re-read the state (after the trigger executes)"
msgstr ""
"sess.save(cat);\n"
"sess.flush(); //force the SQL INSERT\n"
"sess.refresh(cat); //re-read the state (after the trigger executes)"
#. Tag: para
#: session_api.xml:206
#, fuzzy, no-c-format
msgid ""
"How much does Hibernate load from the database and how many SQL "
"<literal>SELECTs will it use? This depends on the "
"<emphasis>fetching strategy. This is explained in æ–‡ãŒä½¿ã‚れるã®ã‹ã§ã™ã€‚ã“ã‚Œã¯ã€ フェッãƒã®"
"戦略</emphasis> ã«ã‚ˆã‚Šã¾ã™ã€‚ã“ã‚Œã«ã¤ã„ã¦ã¯ã€ using the current Session ã®ã‚¤"
"ンスタンスã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ã“ã®ã‚¤ãƒ³ã‚¿ãƒ•ã‚§ãƒ¼ã‚¹ã¯ã€ãƒ‘ラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°"
"ã‚„ ResultSet ã®ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°ã‚„クエリã®å®Ÿè¡Œã‚’è¡Œã†ãƒ¡ã‚½ãƒƒãƒ‰ã‚’用æ„ã—ã¦ã„ã¾ã™ã€‚通"
"常〠<literal>Query ã¯ã€ä»¥ä¸‹ã«ç¤ºã™ã‚ˆã†ã«ã€ãã®æ™‚点㮠"
"<literal>Session を使ã£ã¦å–å¾—ã—ã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:232
#, fuzzy, no-c-format
msgid ""
"List cats = session.createQuery(\n"
" \"from Cat as cat where cat.birthdate < ?\")\n"
" .setDate(0, date)\n"
" .list();\n"
"\n"
"List mothers = session.createQuery(\n"
" \"select mother from Cat as cat join cat.mother as mother where cat.name "
"= ?\")\n"
" .setString(0, name)\n"
" .list();\n"
"\n"
"List kittens = session.createQuery(\n"
" \"from Cat as cat where cat.mother = ?\")\n"
" .setEntity(0, pk)\n"
" .list();\n"
"\n"
"Cat mother = (Cat) session.createQuery(\n"
" \"select cat.mother from Cat as cat where cat = ?\")\n"
" .setEntity(0, izi)\n"
" .uniqueResult();]]\n"
"\n"
"Query mothersWithKittens = (Cat) session.createQuery(\n"
" \"select mother from Cat as mother left join fetch mother.kittens\");\n"
"Set uniqueMothers = new HashSet(mothersWithKittens.list());"
msgstr ""
"List cats = session.createQuery(\n"
" \"from Cat as cat where cat.birthdate < ?\")\n"
" .setDate(0, date)\n"
" .list();\n"
"\n"
"List mothers = session.createQuery(\n"
" \"select mother from Cat as cat join cat.mother as mother where cat.name "
"= ?\")\n"
" .setString(0, name)\n"
" .list();\n"
"\n"
"List kittens = session.createQuery(\n"
" \"from Cat as cat where cat.mother = ?\")\n"
" .setEntity(0, pk)\n"
" .list();\n"
"\n"
"Cat mother = (Cat) session.createQuery(\n"
" \"select cat.mother from Cat as cat where cat = ?\")\n"
" .setEntity(0, izi)\n"
" .uniqueResult();]]\n"
"\n"
"Query mothersWithKittens = (Cat) session.createQuery(\n"
" \"select mother from Cat as mother left join fetch mother.kittens\");\n"
"Set uniqueMothers = new HashSet(mothersWithKittens.list());"
#. Tag: para
#: session_api.xml:234
#, no-c-format
msgid ""
"A query is usually executed by invoking <literal>list(). The "
"result of the query will be loaded completely into a collection in memory. "
"Entity instances retrieved by a query are in a persistent state. The "
"<literal>uniqueResult() method offers a shortcut if you know your "
"query will only return a single object. Queries that make use of eager "
"fetching of collections usually return duplicates of the root objects, but "
"with their collections initialized. You can filter these duplicates through "
"a <literal>Set."
msgstr ""
"クエリã¯ã€æ™®é€šã€ <literal>list() を呼ã³å‡ºã™ã“ã¨ã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã¾"
"ã™ã€‚クエリã®çµæžœã¯ã€ãƒ¡ãƒ¢ãƒªä¸Šã«ã‚るコレクションã«ã™ã¹ã¦ãƒãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚クエリ"
"ã«ã‚ˆã£ã¦å¾©å…ƒã•ã‚ŒãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã€æ°¸ç¶šçŠ¶æ…‹ã§ã™ã€‚ã‚‚ã—ã€ã‚¯ã‚¨ãƒªãŒ"
"ãŸã£ãŸ1個ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’è¿”ã™ã¨åˆ†ã‹ã£ã¦ã„ã‚‹ãªã‚‰ã€ <literal>uniqueResult() を使ã£ã¦å–り除ãã“ã¨ãŒã§ãã¾ã™ã€‚"
#. Tag: title
#: session_api.xml:244
#, no-c-format
msgid "Iterating results"
msgstr "çµæžœã‚’イテレートã™ã‚‹"
#. Tag: para
#: session_api.xml:246
#, no-c-format
msgid ""
"Occasionally, you might be able to achieve better performance by executing "
"the query using the <literal>iterate() method. This will usually "
"be the case if you expect that the actual entity instances returned by the "
"query will already be in the session or second-level cache. If they are not "
"already cached, <literal>iterate() will be slower than "
"<literal>list() and might require many database hits for a simple "
"query, usually <emphasis>1 for the initial select which only "
"returns identifiers, and <emphasis>n additional selects to "
"initialize the actual instances."
msgstr ""
"時々〠<literal>iterate() メソッドを使ã£ã¦ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã§ã€"
"より良ã„パフォーマンスを得るã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€é€šå¸¸ã€ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦å¾—ら"
"ã‚ŒãŸå®Ÿéš›ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒã€ã™ã§ã«ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¾ãŸã¯äºŒæ¬¡ã‚ャッシュ"
"ã«å˜åœ¨ã™ã‚‹ã“ã¨ãŒæœŸå¾…ã§ãã‚‹å ´åˆã ã‘ã§ã™ã€‚ãれらãŒã€ã¾ã ã‚ャッシュã•ã‚Œã¦ã„ãªã„"
"ãªã‚‰ã€ <literal>iterate() ã¯ã€ list() よりもé…"
"ãã€ç°¡å˜ãªã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ã‚‚多ãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¢ã‚¯ã‚»ã‚¹ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ãã®ã‚¢ã‚¯"
"セスã¨ã¯ã€è˜åˆ¥åã ã‘ã‚’å–å¾—ã™ã‚‹ãŸã‚ã®æœ€åˆã® select <emphasis>1回 "
"ã¨ã€å®Ÿéš›ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’åˆæœŸåŒ–ã™ã‚‹ãŸã‚ã«å¾Œã‹ã‚‰è¡Œã† <emphasis>n回 "
"ã® select ã®ã“ã¨ã§ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:257
#, fuzzy, no-c-format
msgid ""
"// fetch ids\n"
"Iterator iter = sess.createQuery(\"from eg.Qux q order by q.likeliness\")."
"iterate();\n"
"while ( iter.hasNext() ) {\n"
" Qux qux = (Qux) iter.next(); // fetch the object\n"
" // something we couldnt express in the query\n"
" if ( qux.calculateComplicatedAlgorithm() ) {\n"
" // delete the current instance\n"
" iter.remove();\n"
" // dont need to process the rest\n"
" break;\n"
" }\n"
"}"
msgstr ""
"// fetch ids\n"
"Iterator iter = sess.createQuery(\"from eg.Qux q order by q.likeliness\")."
"iterate();\n"
"while ( iter.hasNext() ) {\n"
" Qux qux = (Qux) iter.next(); // fetch the object\n"
" // something we couldnt express in the query\n"
" if ( qux.calculateComplicatedAlgorithm() ) {\n"
" // delete the current instance\n"
" iter.remove();\n"
" // dont need to process the rest\n"
" break;\n"
" }\n"
"}"
#. Tag: title
#: session_api.xml:261
#, no-c-format
msgid "Queries that return tuples"
msgstr "オブジェクトã®çµ„(tuple)を返ã™ã‚¯ã‚¨ãƒª"
#. Tag: para
#: session_api.xml:263
#, no-c-format
msgid ""
"Hibernate queries sometimes return tuples of objects. Each tuple is returned "
"as an array:"
msgstr ""
"Hibernate ã®ã‚¯ã‚¨ãƒªã§ã¯ã€æ™‚々ã€ã‚ªãƒ–ジェクトã®çµ„ã‚’è¿”ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ãã®å ´åˆ"
"ã¯ã€å„タプルã¯é…列ã¨ã—ã¦è¿”ã•ã‚Œã¾ã™:"
#. Tag: programlisting
#: session_api.xml:266
#, fuzzy, no-c-format
msgid ""
"Iterator kittensAndMothers = sess.createQuery(\n"
" \"select kitten, mother from Cat kitten join kitten.mother mother"
"\")\n"
" .list()\n"
" .iterator();\n"
"\n"
"while ( kittensAndMothers.hasNext() ) {\n"
" Object[] tuple = (Object[]) kittensAndMothers.next();\n"
" Cat kitten = (Cat) tuple[0];\n"
" Cat mother = (Cat) tuple[1];\n"
" ....\n"
"}"
msgstr ""
"Iterator kittensAndMothers = sess.createQuery(\n"
" \"select kitten, mother from Cat kitten join kitten.mother mother"
"\")\n"
" .list()\n"
" .iterator();\n"
"\n"
"while ( kittensAndMothers.hasNext() ) {\n"
" Object[] tuple = (Object[]) kittensAndMothers.next();\n"
" Cat kitten = tuple[0];\n"
" Cat mother = tuple[1];\n"
" ....\n"
"}"
#. Tag: title
#: session_api.xml:270
#, no-c-format
msgid "Scalar results"
msgstr "スカラーã®çµæžœ"
#. Tag: para
#: session_api.xml:272
#, no-c-format
msgid ""
"Queries can specify a property of a class in the <literal>select "
"clause. They can even call SQL aggregate functions. Properties or aggregates "
"are considered \"scalar\" results and not entities in persistent state."
msgstr ""
"クエリã§ã¯ã€ <literal>select 節ã§ã‚¯ãƒ©ã‚¹ã®ãƒ—ãƒãƒ‘ティを指定ã§ãã¾"
"ã™ã€‚ SQL ã®é›†åˆé–¢æ•°ã‚’呼ã¶ã“ã¨ã‚‚ã§ãã¾ã™ã€‚プãƒãƒ‘ティや集åˆé–¢æ•°ã¯ã€ï¼ˆæ°¸ç¶šçŠ¶æ…‹ã®"
"エンティティã§ã¯ãªã)「スカラー値ã€ã§ã‚ã‚‹ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:277
#, fuzzy, no-c-format
msgid ""
"Iterator results = sess.createQuery(\n"
" \"select cat.color, min(cat.birthdate), count(cat) from Cat cat \" "
"+\n"
" \"group by cat.color\")\n"
" .list()\n"
" .iterator();\n"
"\n"
"while ( results.hasNext() ) {\n"
" Object[] row = (Object[]) results.next();\n"
" Color type = (Color) row[0];\n"
" Date oldest = (Date) row[1];\n"
" Integer count = (Integer) row[2];\n"
" .....\n"
"}"
msgstr ""
"Iterator results = sess.createQuery(\n"
" \"select cat.color, min(cat.birthdate), count(cat) from Cat cat \" "
"+\n"
" \"group by cat.color\")\n"
" .list()\n"
" .iterator();\n"
"\n"
"while ( results.hasNext() ) {\n"
" Object[] row = (Object[]) results.next();\n"
" Color type = (Color) row[0];\n"
" Date oldest = (Date) row[1];\n"
" Integer count = (Integer) row[2];\n"
" .....\n"
"}"
#. Tag: title
#: session_api.xml:281
#, no-c-format
msgid "Bind parameters"
msgstr "パラメータã®ãƒã‚¤ãƒ³ãƒ‰"
#. Tag: para
#: session_api.xml:283
#, no-c-format
msgid ""
"Methods on <literal>Query are provided for binding values to named "
"parameters or JDBC-style <literal>? parameters. Contrary "
"to JDBC, Hibernate numbers parameters from zero.</emphasis> Named parameters "
"are identifiers of the form <literal>:name in the query string. "
"The advantages of named parameters are as follows:"
msgstr ""
"<literal>Query ã¯ã€åå‰ä»˜ãã®ãƒ‘ラメータや JDBC スタイル㮠"
"<literal>? パラメータã«å€¤ã‚’ãƒã‚¤ãƒ³ãƒ‰ã™ã‚‹ãŸã‚ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’æŒã£ã¦ã„ã¾"
"ã™ã€‚ <emphasis> JDBC ã¨ã¯é•ã„〠Hibernate ã¯ãƒ‘ラメータã«ã‚¼ãƒã‹ã‚‰ç•ªå·ã‚’振ã£ã¦"
"ã„ãã¾ã™ã€‚</emphasis>åå‰ä»˜ãã®ãƒ‘ラメータã¨ã¯ã€ã‚¯ã‚¨ãƒªæ–‡å—列ã®ãªã‹ã«ã‚ã‚‹ "
"<literal>:name å½¢å¼ã®è˜åˆ¥åã§ã™ã€‚åå‰ä»˜ãパラメータã®åˆ©ç‚¹ã¯æ¬¡ã®é€šã‚Š"
"ã§ã™ã€‚"
#. Tag: para
#: session_api.xml:292
#, no-c-format
msgid ""
"named parameters are insensitive to the order they occur in the query string"
msgstr "åå‰ä»˜ãパラメータã¯ã€ã‚¯ã‚¨ãƒªæ–‡å—列ã«ç™»å ´ã™ã‚‹é †ç•ªã¨ç„¡é–¢ä¿‚ã§ã™"
#. Tag: para
#: session_api.xml:297
#, no-c-format
msgid "they can occur multiple times in the same query"
msgstr "åŒã˜ã‚¯ã‚¨ãƒªå†…ã«è¤‡æ•°å›žç™»å ´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™"
#. Tag: para
#: session_api.xml:301
#, no-c-format
msgid "they are self-documenting"
msgstr "自分自身を説明ã—ã¾ã™"
#. Tag: programlisting
#: session_api.xml:305
#, fuzzy, no-c-format
msgid ""
"//named parameter (preferred)\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name = :name"
"\");\n"
"q.setString(\"name\", \"Fritz\");\n"
"Iterator cats = q.iterate();"
msgstr ""
"//named parameter (preferred)\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name = :name"
"\");\n"
"q.setString(\"name\", \"Fritz\");\n"
"Iterator cats = q.iterate();"
#. Tag: programlisting
#: session_api.xml:307
#, fuzzy, no-c-format
msgid ""
"//positional parameter\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name = ?\");\n"
"q.setString(0, \"Izi\");\n"
"Iterator cats = q.iterate();"
msgstr ""
"//positional parameter\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name = ?\");\n"
"q.setString(0, \"Izi\");\n"
"Iterator cats = q.iterate();"
#. Tag: programlisting
#: session_api.xml:309
#, fuzzy, no-c-format
msgid ""
"//named parameter list\n"
"List names = new ArrayList();\n"
"names.add(\"Izi\");\n"
"names.add(\"Fritz\");\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name in (:"
"namesList)\");\n"
"q.setParameterList(\"namesList\", names);\n"
"List cats = q.list();"
msgstr ""
"//named parameter list\n"
"List names = new ArrayList();\n"
"names.add(\"Izi\");\n"
"names.add(\"Fritz\");\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name in (:"
"namesList)\");\n"
"q.setParameterList(\"namesList\", names);\n"
"List cats = q.list();"
#. Tag: title
#: session_api.xml:313
#, no-c-format
msgid "Pagination"
msgstr "ページ分ã‘"
#. Tag: para
#: session_api.xml:315
#, no-c-format
msgid ""
"If you need to specify bounds upon your result set, that is, the maximum "
"number of rows you want to retrieve and/or the first row you want to "
"retrieve, you can use methods of the <literal>Query interface:"
msgstr ""
"ResultSet ã«åˆ¶é™ï¼ˆå¾©å…ƒã—ãŸã„最大行数や復元ã—ãŸã„最åˆã®è¡Œï¼‰ã‚’åŠ ãˆã‚‹å¿…è¦ãŒã‚ã‚Œ"
"ã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã€ <literal>Query インターフェースã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使ã„"
"ã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:320
#, fuzzy, no-c-format
msgid ""
"Query q = sess.createQuery(\"from DomesticCat cat\");\n"
"q.setFirstResult(20);\n"
"q.setMaxResults(10);\n"
"List cats = q.list();"
msgstr ""
"Query q = sess.createQuery(\"from DomesticCat cat\");\n"
"q.setFirstResult(20);\n"
"q.setMaxResults(10);\n"
"List cats = q.list();"
#. Tag: para
#: session_api.xml:322
#, no-c-format
msgid ""
"Hibernate knows how to translate this limit query into the native SQL of "
"your DBMS."
msgstr ""
"制é™ä»˜ãã®ã‚¯ã‚¨ãƒªã‚’ DBMS ã®ãƒã‚¤ãƒ†ã‚£ãƒ–㪠SQL ã«å¤‰æ›ã™ã‚‹æ–¹æ³•ã‚’〠Hibernate ã¯"
"知ã£ã¦ã„ã¾ã™ã€‚"
#. Tag: title
#: session_api.xml:327
#, no-c-format
msgid "Scrollable iteration"
msgstr "スクãƒãƒ¼ãƒ«å¯èƒ½ãªã‚¤ãƒ†ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³"
#. Tag: para
#: session_api.xml:329
#, no-c-format
msgid ""
"If your JDBC driver supports scrollable <literal>ResultSets, the "
"<literal>Query interface can be used to obtain a "
"<literal>ScrollableResults object that allows flexible navigation "
"of the query results."
msgstr ""
"JDBC ドライãƒãŒã‚¹ã‚¯ãƒãƒ¼ãƒ«å¯èƒ½ãª <literal>ResultSet をサãƒãƒ¼ãƒˆã—ã¦ã„"
"ã‚Œã°ã€ <literal>Query インターフェースを使ã£ã¦ã€ "
"<literal>ScrollableResults オブジェクトをå–å¾—ã§ãã¾ã™ã€‚ãれを使ã†"
"ã¨ã€ã‚¯ã‚¨ãƒªã®çµæžœã«å¯¾ã—ã¦æŸ”軟ã«ãƒŠãƒ“ゲーションã§ãã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:334
#, fuzzy, no-c-format
msgid ""
"Query q = sess.createQuery(\"select cat.name, cat from DomesticCat cat \" +\n"
" \"order by cat.name\");\n"
"ScrollableResults cats = q.scroll();\n"
"if ( cats.first() ) {\n"
"\n"
" // find the first name on each page of an alphabetical list of cats by "
"name\n"
" firstNamesOfPages = new ArrayList();\n"
" do {\n"
" String name = cats.getString(0);\n"
" firstNamesOfPages.add(name);\n"
" }\n"
" while ( cats.scroll(PAGE_SIZE) );\n"
"\n"
" // Now get the first page of cats\n"
" pageOfCats = new ArrayList();\n"
" cats.beforeFirst();\n"
" int i=0;\n"
" while( ( PAGE_SIZE > i++ ) && cats.next() ) pageOfCats.add"
"( cats.get(1) );\n"
"\n"
"}\n"
"cats.close()"
msgstr ""
"Query q = sess.createQuery(\"select cat.name, cat from DomesticCat cat \" +\n"
" \"order by cat.name\");\n"
"ScrollableResults cats = q.scroll();\n"
"if ( cats.first() ) {\n"
"\n"
" // find the first name on each page of an alphabetical list of cats by "
"name\n"
" firstNamesOfPages = new ArrayList();\n"
" do {\n"
" String name = cats.getString(0);\n"
" firstNamesOfPages.add(name);\n"
" }\n"
" while ( cats.scroll(PAGE_SIZE) );\n"
"\n"
" // Now get the first page of cats\n"
" pageOfCats = new ArrayList();\n"
" cats.beforeFirst();\n"
" int i=0;\n"
" while( ( PAGE_SIZE > i++ ) && cats.next() ) pageOfCats.add"
"( cats.get(1) );\n"
"\n"
"}\n"
"cats.close()"
#. Tag: para
#: session_api.xml:336
#, no-c-format
msgid ""
"Note that an open database connection and cursor is required for this "
"functionality. Use <literal>setMaxResult()/setFirstResult"
"()</literal> if you need offline pagination functionality."
msgstr ""
"ã“ã®æ©Ÿèƒ½ã«ã¯ã‚ªãƒ¼ãƒ—ン状態ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ãŒå¿…è¦ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦"
"ãã ã•ã„。もã—ã€ã‚ªãƒ•ãƒ©ã‚¤ãƒ³ã®ãƒšãƒ¼ã‚¸åˆ†ã‘機能ãŒå¿…è¦ã§ã‚ã‚Œã°ã€ "
"<literal>setMaxResult() / setFirstResult() を使"
"ã„ã¾ã—ょã†ã€‚"
#. Tag: title
#: session_api.xml:343
#, no-c-format
msgid "Externalizing named queries"
msgstr "åå‰ä»˜ãクエリã®å¤–出ã—"
#. Tag: para
#: session_api.xml:345
#, no-c-format
msgid ""
"Queries can also be configured as so called named queries using annotations "
"or Hibernate mapping documents. <literal>@NamedQuery and "
"<literal>@NamedQueries can be defined at the class level as seen "
"in <xref linkend=\"example-named-query-annotation\"/> . However their "
"definitions are global to the session factory/entity manager factory scope. "
"A named query is defined by its name and the actual query string."
msgstr ""
#. Tag: title
#: session_api.xml:355
#, no-c-format
msgid "Defining a named query using <classname>@NamedQuery"
msgstr ""
#. Tag: programlisting
#: session_api.xml:358
#, no-c-format
msgid ""
"@Entity\n"
"@NamedQuery(name=\"night.moreRecentThan\", query=\"select n from Night n "
"where n.date >= :date\")\n"
"public class Night {\n"
" ...\n"
"}\n"
"\n"
"public class MyDao {\n"
" doStuff() {\n"
" Query q = s.getNamedQuery(\"night.moreRecentThan\");\n"
" q.setDate( \"date\", aMonthAgo );\n"
" List results = q.list();\n"
" ...\n"
" }\n"
" ...\n"
"}"
msgstr ""
#. Tag: para
#: session_api.xml:361
#, fuzzy, no-c-format
msgid ""
"Using a mapping document can be configured using the <literal><query>CDATA section if your "
"query contains characters that could be interpreted as markup."
msgstr ""
"マッピングドã‚ュメントã«åå‰ä»˜ãã®ã‚¯ã‚¨ãƒªã‚’定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚(マーク"
"アップã¨è§£é‡ˆã•ã‚Œã‚‹æ–‡å—ãŒã‚¯ã‚¨ãƒªã«å«ã¾ã‚Œã‚‹ãªã‚‰ã€ <literal>CDATA セク"
"ションを使ã†ã“ã¨ã‚’忘れãªã„よã†ã«ã—ã¾ã—ょã†ã€‚)"
#. Tag: title
#: session_api.xml:367
#, no-c-format
msgid "Defining a named query using <literal><query>"
msgstr ""
#. Tag: programlisting
#: session_api.xml:370
#, fuzzy, no-c-format
msgid ""
"<query name=\"ByNameAndMaximumWeight\"><![CDATA[\n"
" from eg.DomesticCat as cat\n"
" where cat.name = ?\n"
" and cat.weight > ?\n"
"] ]></query>"
msgstr ""
"<query name=\"ByNameAndMaximumWeight\"><![CDATA[\n"
" from eg.DomesticCat as cat\n"
" where cat.name = ?\n"
" and cat.weight > ?\n"
"] ]></query>"
#. Tag: para
#: session_api.xml:373
#, fuzzy, no-c-format
msgid ""
"Parameter binding and executing is done programatically as seen in <xref "
"linkend=\"example-parameter-binding-named-query\"/>."
msgstr ""
"パラメータã®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã¨å®Ÿè¡Œã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ—ãƒã‚°ãƒ©ãƒ ã§è¡Œã‚ã‚Œã¾ã™:"
#. Tag: title
#: session_api.xml:377
#, no-c-format
msgid "Parameter binding of a named query"
msgstr ""
#. Tag: programlisting
#: session_api.xml:379
#, fuzzy, no-c-format
msgid ""
"Query q = sess.getNamedQuery(\"ByNameAndMaximumWeight\");\n"
"q.setString(0, name);\n"
"q.setInt(1, minWeight);\n"
"List cats = q.list();"
msgstr ""
"Query q = sess.getNamedQuery(\"ByNameAndMaximumWeight\");\n"
"q.setString(0, name);\n"
"q.setInt(1, minWeight);\n"
"List cats = q.list();"
#. Tag: para
#: session_api.xml:382
#, no-c-format
msgid ""
"The actual program code is independent of the query language that is used. "
"You can also define native SQL queries in metadata, or migrate existing "
"queries to Hibernate by placing them in mapping files."
msgstr ""
"実際ã®ãƒ—ãƒã‚°ãƒ©ãƒ コードã¯ã€ä½¿ã‚れるクエリ言語ã«ä¾å˜ã—ã¦ã„ãªã„ã“ã¨ã«æ³¨æ„ã—ã¾"
"ã—ょã†ã€‚メタデータã«ã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ– SQL クエリを定義ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã¾ãŸã€"
"æ—¢å˜ã®ã‚¯ã‚¨ãƒªã‚’マッピングファイルã«ç§»ã™ã“ã¨ã§ã€ Hibernate ã«ç§»è¡Œã™ã‚‹ã“ã¨ã‚‚ã§ã"
"ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:387
#, no-c-format
msgid ""
"Also note that a query declaration inside a <literal><hibernate-"
"mapping></literal> element requires a global unique name for the query, "
"while a query declaration inside a <literal><class> element "
"is made unique automatically by prepending the fully qualified name of the "
"class. For example <literal>eg.Cat.ByNameAndMaximumWeight."
msgstr ""
"<literal><hibernate-mapping> è¦ç´ ã®ä¸ã®ã‚¯ã‚¨ãƒªå®šç¾©ã¯ã€ã‚¯ã‚¨ãƒªã«"
"対ã™ã‚‹ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªåå‰ãŒå¿…è¦ãªã“ã¨ã«ã‚‚注æ„ã—ã¦ãã ã•ã„。ãã‚Œã«å¯¾ã—ã¦ã€ "
"<literal><class> è¦ç´ ã®ä¸ã®ã‚¯ã‚¨ãƒªå®šç¾©ã¯ã€ã‚¯ãƒ©ã‚¹ã®å®Œå…¨é™å®šåãŒ"
"å‰ã«ä»˜ã‘られるã®ã§ã€è‡ªå‹•çš„ã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªåå‰ã«ãªã‚Šã¾ã™ã€‚例: <literal>eg.Cat."
"ByNameAndMaximumWeight</literal>"
#. Tag: title
#: session_api.xml:397
#, no-c-format
msgid "Filtering collections"
msgstr "フィルタリングコレクション"
#. Tag: para
#: session_api.xml:399
#, no-c-format
msgid ""
"A collection <emphasis>filter is a special type of query that can "
"be applied to a persistent collection or array. The query string can refer "
"to <literal>this, meaning the current collection element."
msgstr ""
"コレクション <emphasis>フィルタ ã¯ã€æ°¸ç¶šåŒ–ã•ã‚Œã¦ã„るコレクションや"
"é…列ã«é©ç”¨ã•ã‚Œã‚‹ç‰¹æ®Šãªã‚¿ã‚¤ãƒ—ã®ã‚¯ã‚¨ãƒªã§ã™ã€‚ãã®ã‚¯ã‚¨ãƒªæ–‡å—列ã§ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³"
"ã®ãã®æ™‚点ã§ã®è¦ç´ ã‚’æ„味ã™ã‚‹ <literal>this を使ã„ã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:404
#, fuzzy, no-c-format
msgid ""
"Collection blackKittens = session.createFilter(\n"
" pk.getKittens(), \n"
" \"where this.color = ?\")\n"
" .setParameter( Color.BLACK, Hibernate.custom(ColorUserType.class) )\n"
" .list()\n"
");"
msgstr ""
"Collection blackKittens = session.createFilter(\n"
" pk.getKittens(), \n"
" \"where this.color = ?\")\n"
" .setParameter( Color.BLACK, Hibernate.custom(ColorUserType.class) )\n"
" .list()\n"
");"
#. Tag: para
#: session_api.xml:406
#, no-c-format
msgid ""
"The returned collection is considered a bag that is a copy of the given "
"collection. The original collection is not modified. This is contrary to the "
"implication of the name \"filter\", but consistent with expected behavior."
msgstr ""
"è¿”ã•ã‚Œã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ Bag ã¨ã¿ãªã•ã‚Œã¾ã™ã€‚ãã—ã¦ã€ãã‚Œã¯ã‚‚ã¨ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®"
"コピーã«ãªã‚Šã¾ã™ã€‚å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ä¿®æ£ã•ã‚Œã¾ã›ã‚“(ã“ã‚Œã¯ã€ \"filter\" ã¨ã„"
"ã†åå‰ã®æ„味ã¨ã¯ç•°ãªã‚Šã¾ã™ãŒã€æœŸå¾…ã•ã‚Œã‚‹å‹•ãã¨ã¯ä¸€è‡´ã—ã¦ã„ã¾ã™ï¼‰ã€‚"
#. Tag: para
#: session_api.xml:411
#, no-c-format
msgid ""
"Observe that filters do not require a <literal>from clause, "
"although they can have one if required. Filters are not limited to returning "
"the collection elements themselves."
msgstr ""
"フィルタã«ã¯ <literal>from 節ãŒä¸è¦ã§ã‚ã‚‹ã“ã¨ã«æ°—ã¥ãã§ã—ょã†ï¼ˆå¿…è¦"
"ãªã‚‰ã€æŒã¤ã“ã¨ã‚‚å¯èƒ½ã§ã™ãŒï¼‰ã€‚フィルタã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ 自体を返ã—ã¦æ§‹ã„"
"ã¾ã›ã‚“。"
#. Tag: programlisting
#: session_api.xml:415
#, fuzzy, no-c-format
msgid ""
"Collection blackKittenMates = session.createFilter(\n"
" pk.getKittens(), \n"
" \"select this.mate where this.color = eg.Color.BLACK.intValue\")\n"
" .list();"
msgstr ""
"Collection blackKittenMates = session.createFilter(\n"
" pk.getKittens(), \n"
" \"select this.mate where this.color = eg.Color.BLACK.intValue\")\n"
" .list();"
#. Tag: para
#: session_api.xml:417
#, no-c-format
msgid ""
"Even an empty filter query is useful, e.g. to load a subset of elements in a "
"large collection:"
msgstr ""
"クエリをå«ã¾ãªã„フィルタも役ã«ç«‹ã¡ã¾ã™ã€‚例ãˆã°ã€éžå¸¸ã«å¤§ããªã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®éƒ¨"
"分集åˆã‚’ãƒãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã«ä½¿ãˆã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:420
#, fuzzy, no-c-format
msgid ""
"Collection tenKittens = session.createFilter(\n"
" mother.getKittens(), \"\")\n"
" .setFirstResult(0).setMaxResults(10)\n"
" .list();"
msgstr ""
"Collection tenKittens = session.createFilter(\n"
" mother.getKittens(), \"\")\n"
" .setFirstResult(0).setMaxResults(10)\n"
" .list();"
#. Tag: title
#: session_api.xml:424
#, no-c-format
msgid "Criteria queries"
msgstr "クライテリアã®ã‚¯ã‚¨ãƒª"
#. Tag: para
#: session_api.xml:426
#, no-c-format
msgid ""
"HQL is extremely powerful, but some developers prefer to build queries "
"dynamically using an object-oriented API, rather than building query "
"strings. Hibernate provides an intuitive <literal>Criteria query "
"API for these cases:"
msgstr ""
"HQL ã¯éžå¸¸ã«å¼·åŠ›ã§ã™ãŒã€ã‚¯ã‚¨ãƒªæ–‡å—列を作るよりもã€ã‚ªãƒ–ジェクト指å‘ã® API ã‚’"
"使ã£ã¦å‹•çš„ã«ã‚¯ã‚¨ãƒªã‚’作る方を好む開発者もã„ã¾ã™ã€‚ã“ã†ã„ã£ãŸå ´åˆã®ãŸã‚ã«ã€ "
"Hibernate ã¯ç›´æ„Ÿçš„㪠<literal>Criteria クエリ API ã‚’æä¾›ã—ã¦ã„ã¾"
"ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:431
#, fuzzy, no-c-format
msgid ""
"Criteria crit = session.createCriteria(Cat.class);\n"
"crit.add( Restrictions.eq( \"color\", eg.Color.BLACK ) );\n"
"crit.setMaxResults(10);\n"
"List cats = crit.list();"
msgstr ""
"Criteria crit = session.createCriteria(Cat.class);\n"
"crit.add( Expression.eq( \"color\", eg.Color.BLACK ) );\n"
"crit.setMaxResults(10);\n"
"List cats = crit.list();"
#. Tag: para
#: session_api.xml:433
#, fuzzy, no-c-format
msgid ""
"The <literal>Criteria and the associated Example 㨠Example API ã®è©³ç´°ã¯ã€ "
"<xref linkend=\"querycriteria\"/> ã«è¿°ã¹ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚"
#. Tag: title
#: session_api.xml:439
#, no-c-format
msgid "Queries in native SQL"
msgstr "ãƒã‚¤ãƒ†ã‚£ãƒ– SQL ã®ã‚¯ã‚¨ãƒª"
#. Tag: para
#: session_api.xml:441
#, no-c-format
msgid ""
"You can express a query in SQL, using <literal>createSQLQuery() "
"and let Hibernate manage the mapping from result sets to objects. You can at "
"any time call <literal>session.connection() and use the JDBC "
"<literal>Connection directly. If you choose to use the Hibernate "
"API, you must enclose SQL aliases in braces:"
msgstr ""
"<literal>createSQLQuery() を使ã£ã¦ã€ SQL ã§ã‚¯ã‚¨ãƒªã‚’表ç¾ã™ã‚‹ã“ã¨ã‚‚ã§"
"ãã¾ã™ã€‚ãã—ã¦ã€ Hibernate ã«ã€ ResultSet ã‹ã‚‰ã‚ªãƒ–ジェクトã¸ã®ãƒžãƒƒãƒ”ングをã¾"
"ã‹ã›ã¾ã™ã€‚ <literal>session.connection() を呼ã¹ã°ã©ã‚“ãªã¨ãã§ã‚‚ã€ç›´"
"接〠JDBC <literal>Connection を使用ã§ãã‚‹ã“ã¨ã‚’覚ãˆã¦ãŠãã¾ã—ょ"
"ã†ã€‚ã‚‚ã—〠Hibernate API を使ã†ã®ã§ã‚ã‚Œã°ã€ä¸‹è¨˜ã®ã‚ˆã†ã« SQL ã®åˆ¥åを括弧ã§ã"
"ãらãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。"
#. Tag: programlisting
#: session_api.xml:448
#, fuzzy, no-c-format
msgid ""
"List cats = session.createSQLQuery(\"SELECT {cat.*} FROM CAT {cat} WHERE "
"ROWNUM<10\")\n"
" .addEntity(\"cat\", Cat.class)\n"
".list();"
msgstr ""
"List cats = session.createSQLQuery(\n"
" \"SELECT {cat.*} FROM CAT {cat} WHERE ROWNUM<10\",\n"
" \"cat\",\n"
" Cat.class\n"
").list();"
#. Tag: programlisting
#: session_api.xml:450
#, fuzzy, no-c-format
msgid ""
"List cats = session.createSQLQuery(\n"
" \"SELECT {cat}.ID AS {cat.id}, {cat}.SEX AS {cat.sex}, \" +\n"
" \"{cat}.MATE AS {cat.mate}, {cat}.SUBCLASS AS {cat.class}, ... \" "
"+\n"
" \"FROM CAT {cat} WHERE ROWNUM<10\")\n"
" .addEntity(\"cat\", Cat.class)\n"
".list()"
msgstr ""
"List cats = session.createSQLQuery(\n"
" \"SELECT {cat}.ID AS {cat.id}, {cat}.SEX AS {cat.sex}, \" +\n"
" \"{cat}.MATE AS {cat.mate}, {cat}.SUBCLASS AS {cat.class}, ... \" "
"+\n"
" \"FROM CAT {cat} WHERE ROWNUM<10\",\n"
" \"cat\",\n"
" Cat.class\n"
").list()"
#. Tag: para
#: session_api.xml:452
#, fuzzy, no-c-format
msgid ""
"SQL queries can contain named and positional parameters, just like Hibernate "
"queries. More information about native SQL queries in Hibernate can be found "
"in <xref linkend=\"querysql\"/>."
msgstr ""
"SQL クエリã¯ã€ Hibernate クエリã¨åŒã˜ã‚ˆã†ã«ã€åå‰ä»˜ãã®ãƒ‘ラメータã¨ä½ç½®ãƒ‘ラ"
"メータをæŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ Hibernate ã«ãŠã‘ã‚‹ãƒã‚¤ãƒ†ã‚£ãƒ–㪠SQL クエリã®è©³ç´°"
"ã«ã¤ã„ã¦ã¯ã€ <xref linkend=\"querysql\"/> ã‚’å‚ç…§ã—ã¦ãã ã•ã„。"
#. Tag: title
#: session_api.xml:459
#, no-c-format
msgid "Modifying persistent objects"
msgstr "永続オブジェクトã®ä¿®æ£"
#. Tag: para
#: session_api.xml:461
#, no-c-format
msgid ""
"<emphasis>Transactional persistent instances (i.e. objects "
"loaded, saved, created or queried by the <literal>Session) can be "
"manipulated by the application, and any changes to persistent state will be "
"persisted when the <literal>Session is flushed, which has a different "
"purpose) to make your modifications persistent. The most straightforward way "
"to update the state of an object is to <literal>load() it and then "
"manipulate it directly while the <literal>Session is open:"
msgstr ""
"<emphasis>処ç†ä¸ã®æ°¸ç¶šã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ (例: Sessionフラッシュ ã•ã‚Œã‚‹ã¨ãã«ã€æ°¸ç¶šåŒ–ã•ã‚Œã¾ã™ï¼ˆã“"
"ã‚Œã¯ã€ã“ã®ç« ã®å¾ŒåŠã§è¿°ã¹ã¦ã„ã¾ã™ï¼‰ã€‚変更を永続化ã™ã‚‹ãŸã‚ã«ã€ç‰¹æ®Šãªãƒ¡ã‚½ãƒƒãƒ‰"
"( <literal>update() ã®ã‚ˆã†ãªã‚‚ã®ã€‚ã“ã‚Œã¯ã€åˆ¥ã®ç›®çš„ã§ä½¿ç”¨ã—ã¾ã™ï¼‰ã‚’"
"呼ã¶å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。オブジェクトã®çŠ¶æ…‹ã‚’æ›´æ–°ã™ã‚‹ä¸€ç•ªç°¡å˜ãªæ–¹æ³•ã¯ã€ã‚ªãƒ–ジェ"
"クトを <literal>load() ã—〠Session をオープンã«"
"ã—ã¦ã„ã‚‹é–“ã«ã€ç›´æŽ¥æ“作ã™ã‚‹ã“ã¨ã§ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:473
#, fuzzy, no-c-format
msgid ""
"DomesticCat cat = (DomesticCat) sess.load( Cat.class, new Long(69) );\n"
"cat.setName(\"PK\");\n"
"sess.flush(); // changes to cat are automatically detected and persisted"
msgstr ""
"DomesticCat cat = (DomesticCat) sess.load( Cat.class, new Long(69) );\n"
"cat.setName(\"PK\");\n"
"sess.flush(); // changes to cat are automatically detected and persisted"
#. Tag: para
#: session_api.xml:475
#, no-c-format
msgid ""
"Sometimes this programming model is inefficient, as it requires in the same "
"session both an SQL <literal>SELECT to load an object and an SQL "
"<literal>UPDATE to persist its updated state. Hibernate offers an "
"alternate approach by using detached instances."
msgstr ""
"(オブジェクトをãƒãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã®ï¼‰ SQL ã® <literal>SELECT ã¨ï¼ˆæ›´æ–°"
"ã•ã‚ŒãŸçŠ¶æ…‹ã‚’永続化ã™ã‚‹ãŸã‚ã®ï¼‰ SQL ã® <literal>UPDATE ãŒåŒã˜ã‚»ãƒƒ"
"ションã§å¿…è¦ã¨ãªã‚‹ã®ã§ã€ã“ã®ãƒ—ãƒã‚°ãƒ©ãƒŸãƒ³ã‚°ãƒ¢ãƒ‡ãƒ«ã¯ã€åŠ¹çŽ‡ãŒæ‚ªããªã‚‹å ´åˆãŒã‚ã‚Š"
"ã¾ã™ã€‚ãã®ãŸã‚〠Hibernate ã¯åˆ¥ã®æ–¹æ³•ã‚’用æ„ã—ã¦ã„ã¾ã™ã€‚ãã‚Œã¯ã€ detached イン"
"スタンスを使用ã™ã‚‹æ–¹æ³•ã§ã™ã€‚"
#. Tag: title
#: session_api.xml:483
#, no-c-format
msgid "Modifying detached objects"
msgstr "detached オブジェクトã®ä¿®æ£"
#. Tag: para
#: session_api.xml:485
#, no-c-format
msgid ""
"Many applications need to retrieve an object in one transaction, send it to "
"the UI layer for manipulation, then save the changes in a new transaction. "
"Applications that use this kind of approach in a high-concurrency "
"environment usually use versioned data to ensure isolation for the \"long\" "
"unit of work."
msgstr ""
"多ãã®ã‚¢ãƒ—リケーションã§ã¯æ¬¡ã®ã“ã¨ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ãã‚Œã¯ã€ã‚るトランザク"
"ションã§ã‚ªãƒ–ジェクトを復元ã—ã€æ“作ã™ã‚‹ãŸã‚ã«ãれを UI 層ã«é€ã‚Šã€ãã®å¾Œã«ã€æ–°"
"ã—ã„トランザクションã§å¤‰æ›´ã‚’セーブã™ã‚‹ã¨ã„ã£ãŸã“ã¨ã§ã™ã€‚並行性ã®é«˜ã„環境ã§ã€"
"ã“ã®ã‚¿ã‚¤ãƒ—ã®ã‚¢ãƒ—ãƒãƒ¼ãƒã‚’使ã†ã‚¢ãƒ—リケーションã§ã¯ã€ã€ŒæœŸé–“ã®é•·ã„ã€ä½œæ¥å˜ä½ã®éš”"
"離性をä¿è¨¼ã™ã‚‹ãŸã‚ã«ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒ‡ãƒ¼ã‚¿ãŒé€šå¸¸ä½¿ã‚ã‚Œã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:491
#, no-c-format
msgid ""
"Hibernate supports this model by providing for reattachment of detached "
"instances using the <literal>Session.update() or Session."
"merge()</literal> methods:"
msgstr ""
"Hibernate ã¯ã€ <literal>Session.update() ã‚„ Session.merge"
"()</literal> メソッドを使ã£ã¦ã€ detached インスタンスをå†è¿½åŠ ã™ã‚‹ã“ã¨ã§ã€ã“ã®"
"モデルã«å¯¾å¿œã—ã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:495
#, fuzzy, no-c-format
msgid ""
"// in the first session\n"
"Cat cat = (Cat) firstSession.load(Cat.class, catId);\n"
"Cat potentialMate = new Cat();\n"
"firstSession.save(potentialMate);\n"
"\n"
"// in a higher layer of the application\n"
"cat.setMate(potentialMate);\n"
"\n"
"// later, in a new session\n"
"secondSession.update(cat); // update cat\n"
"secondSession.update(mate); // update mate"
msgstr ""
"// in the first session\n"
"Cat cat = (Cat) firstSession.load(Cat.class, catId);\n"
"Cat potentialMate = new Cat();\n"
"firstSession.save(potentialMate);\n"
"\n"
"// in a higher layer of the application\n"
"cat.setMate(potentialMate);\n"
"\n"
"// later, in a new session\n"
"secondSession.update(cat); // update cat\n"
"secondSession.update(mate); // update mate"
#. Tag: para
#: session_api.xml:497
#, no-c-format
msgid ""
"If the <literal>Cat with identifier catId had "
"already been loaded by <literal>secondSession when the application "
"tried to reattach it, an exception would have been thrown."
msgstr ""
"è˜åˆ¥å <literal>catId ã‚’æŒã¤ Cat ãŒã€æ—¢ã« "
"<literal>secondSession ã§ãƒãƒ¼ãƒ‰ã•ã‚Œã¦ã„ãŸå ´åˆã¯ã€å†è¿½åŠ ã—よã†ã¨ã—ãŸ"
"ã¨ãã«ã€ä¾‹å¤–ãŒæŠ•ã’られã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:502
#, no-c-format
msgid ""
"Use <literal>update() if you are certain that the session does not "
"contain an already persistent instance with the same identifier. Use "
"<literal>merge() if you want to merge your modifications at any "
"time without consideration of the state of the session. In other words, "
"<literal>update() is usually the first method you would call in a "
"fresh session, ensuring that the reattachment of your detached instances is "
"the first operation that is executed."
msgstr ""
"åŒã˜è˜åˆ¥åã‚’æŒã¤æ°¸ç¶šã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’セッションãŒæ—¢ã«ä¿æŒã—ã¦ã„ãªã„ã“ã¨ã‚’確信ã§"
"ãã‚‹ãªã‚‰ <literal>update() を使ã„ã¾ã™ã€‚ãã—ã¦ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®çŠ¶æ…‹ã‚’考"
"ãˆãšã«ã€ã©ã‚“ãªå ´åˆã§ã‚‚変更をマージã—ãŸã„å ´åˆã¯ã€ <literal>merge() "
"を使ã„ã¾ã™ã€‚ã™ãªã‚ã¡ã€ detached インスタンスã®å†è¿½åŠ æ“作ãŒã€æœ€åˆã«å®Ÿè¡Œã•ã‚Œã‚‹"
"ã“ã¨ã‚’確実ã«ã™ã‚‹ãŸã‚ã«ã€é€šå¸¸ã¯ <literal>update() ãŒæ–°ã—ã„セッション"
"ã®ãªã‹ã§æœ€åˆã«å‘¼ã°ã‚Œã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã«ãªã‚Šã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:510
#, fuzzy, no-c-format
msgid ""
"The application should individually <literal>update() detached "
"instances that are reachable from the given detached instance "
"<emphasis>only if it wants their state to be updated. This can be "
"automated using <emphasis>transitive persistence. See " for="" more="" information."="" msgstr="" ""="" "detached="" インスタンスã‹ã‚‰åˆ°é”å¯èƒ½ãªã€="" detached="" インスタンスをアプリケーション"="" "ã¯å€‹åˆ¥ã«="" <literal>update()<="" literal=""> ã™ã¹ãã§ã™ã€‚ãã‚Œã¯ã€ãã®çŠ¶æ…‹ã‚’æ›´æ–°ã—ãŸã„"
"å ´åˆã« <emphasis>é™ã‚Šã¾ã™ã€‚ é·ç§»çš„ãªæ°¸ç¶šåŒ– "
"を使ãˆã°ã€ã‚‚ã¡ã‚ん自動化ã§ãã¾ã™ã€‚<xref linkend=\"objectstate-transitive\"/> "
"ã‚’å‚ç…§ã—ã¦ãã ã•ã„。"
#. Tag: para
#: session_api.xml:516
#, no-c-format
msgid ""
"The <literal>lock() method also allows an application to "
"reassociate an object with a new session. However, the detached instance has "
"to be unmodified."
msgstr ""
"<literal>lock() メソッドã§ã‚‚ã¾ãŸã€æ–°ã—ã„セッションã«ã‚ªãƒ–ジェクトを"
"å†é–¢é€£ä»˜ã‘ã§ãã¾ã™ã€‚ã—ã‹ã—〠detached インスタンスã¯ç„¡ä¿®æ£ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›"
"ん。"
#. Tag: programlisting
#: session_api.xml:520
#, fuzzy, no-c-format
msgid ""
"//just reassociate:\n"
"sess.lock(fritz, LockMode.NONE);\n"
"//do a version check, then reassociate:\n"
"sess.lock(izi, LockMode.READ);\n"
"//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n"
"sess.lock(pk, LockMode.UPGRADE);"
msgstr ""
"//just reassociate:\n"
"sess.lock(fritz, LockMode.NONE);\n"
"//do a version check, then reassociate:\n"
"sess.lock(izi, LockMode.READ);\n"
"//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n"
"sess.lock(pk, LockMode.UPGRADE);"
#. Tag: para
#: session_api.xml:522
#, no-c-format
msgid ""
"Note that <literal>lock() can be used with various "
"<literal>LockModes. See the API documentation and the chapter on "
"transaction handling for more information. Reattachment is not the only "
"usecase for <literal>lock()."
msgstr ""
"<literal>lock() ã¯ã€ã•ã¾ã–ã¾ãª LockMode ã¨ã¨ã‚‚ã«"
"使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ã¯ã€ API ドã‚ュメントã¨ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç†ã®ç« ã‚’å‚ç…§"
"ã—ã¦ãã ã•ã„。å†è¿½åŠ ã®ã¨ãã«ã ã‘〠<literal>lock() ãŒä½¿ã‚れるã‚ã‘ã§"
"ã¯ã‚ã‚Šã¾ã›ã‚“。"
#. Tag: para
#: session_api.xml:527
#, fuzzy, no-c-format
msgid ""
"Other models for long units of work are discussed in <xref linkend="
"\"transactions-optimistic\"/>."
msgstr ""
"期間ã®é•·ã„作æ¥å˜ä½ã®ã€ãã®ä»–ã®ãƒ¢ãƒ‡ãƒ«ã¯ã€ <xref linkend=\"transactions-"
"optimistic\"/> ã§è¿°ã¹ã¦ã„ã¾ã™ã€‚"
#. Tag: title
#: session_api.xml:532
#, no-c-format
msgid "Automatic state detection"
msgstr "自動的ãªçŠ¶æ…‹æ¤œå‡º"
#. Tag: para
#: session_api.xml:534
#, no-c-format
msgid ""
"Hibernate users have requested a general purpose method that either saves a "
"transient instance by generating a new identifier or updates/reattaches the "
"detached instances associated with its current identifier. The "
"<literal>saveOrUpdate() method implements this functionality."
msgstr ""
"Hibernate ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ¬¡ã®2ã¤ã®ã‚±ãƒ¼ã‚¹ã®ã©ã¡ã‚‰ã«ã‚‚使ãˆã‚‹æ±Žç”¨çš„ãªãƒ¡ã‚½ãƒƒãƒ‰ã‚’è¦æ±‚"
"ã—ã¦ã„ã¾ã—ãŸã€‚ãã‚Œã¯ã€æ–°ã—ã„è˜åˆ¥åを生æˆã—㦠transient インスタンスをセーブã™"
"ã‚‹ã“ã¨ã¨ã€ãã®æ™‚点ã®è˜åˆ¥åã¨é–¢é€£ã¥ã„ã¦ã„ã‚‹ detached インスタンスを更新/å†è¿½åŠ "
"ã™ã‚‹ã“ã¨ã®ã§ãるメソッドã§ã™ã€‚ <literal>saveOrUpdate() ã¯ã“ã®ã‚ˆã†ãª"
"機能を実ç¾ã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:540
#, fuzzy, no-c-format
msgid ""
"// in the first session\n"
"Cat cat = (Cat) firstSession.load(Cat.class, catID);\n"
"\n"
"// in a higher tier of the application\n"
"Cat mate = new Cat();\n"
"cat.setMate(mate);\n"
"\n"
"// later, in a new session\n"
"secondSession.saveOrUpdate(cat); // update existing state (cat has a non-"
"null id)\n"
"secondSession.saveOrUpdate(mate); // save the new instance (mate has a null "
"id)"
msgstr ""
"// in the first session\n"
"Cat cat = (Cat) firstSession.load(Cat.class, catID);\n"
"\n"
"// in a higher tier of the application\n"
"Cat mate = new Cat();\n"
"cat.setMate(mate);\n"
"\n"
"// later, in a new session\n"
"secondSession.saveOrUpdate(cat); // update existing state (cat has a non-"
"null id)\n"
"secondSession.saveOrUpdate(mate); // save the new instance (mate has a null "
"id)"
#. Tag: para
#: session_api.xml:542
#, no-c-format
msgid ""
"The usage and semantics of <literal>saveOrUpdate() seems to be "
"confusing for new users. Firstly, so long as you are not trying to use "
"instances from one session in another new session, you should not need to "
"use <literal>update(), saveOrUpdate(), or "
"<literal>merge(). Some whole applications will never use either of "
"these methods."
msgstr ""
"<literal>saveOrUpdate() ã®ä½¿ç”¨æ–¹æ³•ã¨æ„味ã¯ã€æ–°ã—ã„ユーザーã«ã¨ã£ã¦"
"混乱を招ãã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã¾ãšç¬¬ä¸€ã«ã€ã‚るセッションã§ä½¿ç”¨ã—ãŸã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’"
"別ã®æ–°ã—ã„セッションã§ä½¿ãŠã†ã¨ã—ãªã„é™ã‚Šã€ <literal>update() ã‚„ "
"<literal>saveOrUpdate() ã‚„ merge() を使ã†å¿…è¦ã¯"
"ã‚ã‚Šã¾ã›ã‚“。アプリケーション全体を通ã˜ã¦ã€ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å…¨ã使ã‚ãªã„ã“ã¨"
"ã‚‚ã‚ã‚Šã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:549
#, no-c-format
msgid ""
"Usually <literal>update() or saveOrUpdate() are "
"used in the following scenario:"
msgstr ""
"通常〠<literal>update() ã‚„ saveOrUpdate() ã¯æ¬¡"
"ã®ã‚·ãƒŠãƒªã‚ªã§ä½¿ã‚ã‚Œã¾ã™:"
#. Tag: para
#: session_api.xml:555
#, no-c-format
msgid "the application loads an object in the first session"
msgstr "アプリケーションãŒæœ€åˆã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ã‚ªãƒ–ジェクトをãƒãƒ¼ãƒ‰ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:559
#, no-c-format
msgid "the object is passed up to the UI tier"
msgstr "オブジェクト㌠UI 層ã«é€ã‚‰ã‚Œã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:563
#, no-c-format
msgid "some modifications are made to the object"
msgstr "オブジェクトã«å¯¾ã—ã¦å¤‰æ›´ãŒåŠ ãˆã‚‰ã‚Œã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:567
#, no-c-format
msgid "the object is passed back down to the business logic tier"
msgstr "オブジェクトãŒãƒ“ジãƒã‚¹ãƒã‚¸ãƒƒã‚¯å±¤ã«é€ã‚‰ã‚Œã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:571
#, no-c-format
msgid ""
"the application persists these modifications by calling <literal>update() を呼ã¶ã“"
"ã¨ã§ã€ã“れらã®å¤‰æ›´ã‚’永続化ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:576
#, no-c-format
msgid "<literal>saveOrUpdate() does the following:"
msgstr "<literal>saveOrUpdate() ã¯ä»¥ä¸‹ã®ã“ã¨ã‚’è¡Œã„ã¾ã™:"
#. Tag: para
#: session_api.xml:580
#, no-c-format
msgid "if the object is already persistent in this session, do nothing"
msgstr ""
"オブジェクトãŒã“ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ã€ã™ã§ã«æ°¸ç¶šåŒ–ã•ã‚Œã¦ã„ã‚Œã°ã€ä½•ã‚‚ã—ã¾ã›ã‚“。"
#. Tag: para
#: session_api.xml:585
#, no-c-format
msgid ""
"if another object associated with the session has the same identifier, throw "
"an exception"
msgstr ""
"ãã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«é–¢é€£ã¥ã„ã¦ã„る別ã®ã‚ªãƒ–ジェクトãŒåŒã˜è˜åˆ¥åã‚’æŒã£ã¦ã„ã‚‹ãªã‚‰ã€"
"例外を投ã’ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:590
#, no-c-format
msgid "if the object has no identifier property, <literal>save() it"
msgstr ""
"オブジェクトã®è˜åˆ¥åãŒå€¤ã‚’æŒãŸãªã„ãªã‚‰ã°ã€ <literal>save() ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:595
#, no-c-format
msgid ""
"if the object's identifier has the value assigned to a newly instantiated "
"object, <literal>save() it"
msgstr ""
"オブジェクトã®è˜åˆ¥åãŒå€¤ã‚’æŒã¡ã€ãã®å€¤ãŒæ–°ãŸã«ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•ã‚ŒãŸã‚ªãƒ–ジェク"
"トã®ãŸã‚ã®å€¤ã§ã‚ã‚‹å ´åˆã€ãã®ã‚ªãƒ–ジェクトを <literal>save() ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:600
#, no-c-format
msgid ""
"if the object is versioned by a <literal><version> or "
"<literal><timestamp>, and the version property value is the "
"same value assigned to a newly instantiated object, <literal>save() ã‚„ <"
"timestamp></literal> ã«ã‚ˆã£ã¦ï¼‰ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¥ã‘ã•ã‚Œã¦ã„ã¦ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ—ãƒ"
"パティãŒå€¤ã‚’æŒã¡ã€ãã®å€¤ãŒæ–°ã—ãインスタンス化ã•ã‚ŒãŸã‚ªãƒ–ジェクトã®ãŸã‚ã®å€¤ã§"
"ã‚ã‚‹å ´åˆã€ãã®ã‚ªãƒ–ジェクトを <literal>save() ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:608
#, no-c-format
msgid "otherwise <literal>update() the object"
msgstr ""
"ãã†ã§ãªã„å ´åˆã¯ã€ãã®ã‚ªãƒ–ジェクトを <literal>update() ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:612
#, no-c-format
msgid "and <literal>merge() is very different:"
msgstr "ãã—ã¦ã€ <literal>merge() ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«éžå¸¸ã«ç•°ãªã‚Šã¾ã™:"
#. Tag: para
#: session_api.xml:616
#, no-c-format
msgid ""
"if there is a persistent instance with the same identifier currently "
"associated with the session, copy the state of the given object onto the "
"persistent instance"
msgstr ""
"åŒã˜è˜åˆ¥åã‚’æŒã¤æ°¸ç¶šåŒ–インスタンスãŒãã®æ™‚点ã§ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¨é–¢é€£ä»˜ã„ã¦ã„ã‚‹ãªã‚‰"
"ã°ã€å¼•æ•°ã§å—ã‘å–ã£ãŸã‚ªãƒ–ジェクトã®çŠ¶æ…‹ã‚’永続化インスタンスã«ã‚³ãƒ”ーã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:622
#, no-c-format
msgid ""
"if there is no persistent instance currently associated with the session, "
"try to load it from the database, or create a new persistent instance"
msgstr ""
"永続化インスタンスãŒãã®æ™‚点ã§ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«é–¢é€£ä»˜ã„ã¦ã„ãªã„ãªã‚‰ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹"
"ã‹ã‚‰ãれをãƒãƒ¼ãƒ‰ã™ã‚‹ã‹ã€ã‚ã‚‹ã„ã¯ã€æ–°ã—ã„永続化インスタンスを作æˆã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:628
#, no-c-format
msgid "the persistent instance is returned"
msgstr "永続化インスタンスãŒè¿”ã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:632
#, no-c-format
msgid ""
"the given instance does not become associated with the session, it remains "
"detached"
msgstr ""
"引数ã¨ã—ã¦ä¸ŽãˆãŸã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¨é–¢é€£ã‚’æŒã¡ã¾ã›ã‚“。ãã‚Œã¯ã€åˆ†é›¢çŠ¶æ…‹"
"ã®ã¾ã¾ã§ã™ã€‚"
#. Tag: title
#: session_api.xml:639
#, no-c-format
msgid "Deleting persistent objects"
msgstr "永続オブジェクトã®å‰Šé™¤"
#. Tag: para
#: session_api.xml:641
#, no-c-format
msgid ""
"<literal>Session.delete() will remove an object's state from the "
"database. Your application, however, can still hold a reference to a deleted "
"object. It is best to think of <literal>delete() as making a "
"persistent instance, transient."
msgstr ""
"<literal>Session.delete() ã¯ã‚ªãƒ–ジェクトã®çŠ¶æ…‹ã‚’データベースã‹ã‚‰å‰Š"
"除ã—ã¾ã™ã€‚ã‚‚ã¡ã‚ã‚“ã€å‰Šé™¤ã—ãŸã‚ªãƒ–ジェクトをアプリケーションãŒä¿æŒã—ãŸã¾ã¾ã§ã‚‚"
"よã„ã§ã™ã€‚ãã®ãŸã‚〠<literal>delete() ã¯æ°¸ç¶šã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’ "
"transient ã«ã™ã‚‹ã‚‚ã®ã¨è€ƒãˆã‚‹ã®ãŒä¸€ç•ªã§ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:646
#, fuzzy, no-c-format
msgid "sess.delete(cat);"
msgstr "sess.delete(cat);"
#. Tag: para
#: session_api.xml:648
#, no-c-format
msgid ""
"You can delete objects in any order, without risk of foreign key constraint "
"violations. It is still possible to violate a <literal>NOT NULL "
"constraint on a foreign key column by deleting objects in the wrong order, e."
"g. if you delete the parent, but forget to delete the children."
msgstr ""
"外部ã‚ー制約ã«é•åã™ã‚‹ãƒªã‚¹ã‚¯ã‚‚ãªãã€å¥½ããªé †ç•ªã§ã‚ªãƒ–ジェクトを削除ã™ã‚‹ã“ã¨ãŒ"
"ã§ãã¾ã™ã€‚ãŸã ã—ã€é–“é•ã£ãŸé †ç•ªã§ã‚ªãƒ–ジェクトを削除ã™ã‚‹ã¨ã€å¤–部ã‚ーカラム㮠"
"<literal>NOT NULL 制約ã«é•åã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€è¦ªã‚ªãƒ–"
"ジェクトを削除ã—ãŸã¨ãã«ã€å供オブジェクトを削除ã—忘れãŸå ´åˆã§ã™ã€‚"
#. Tag: title
#: session_api.xml:656
#, no-c-format
msgid "Replicating object between two different datastores"
msgstr "ç•°ãªã‚‹äºŒã¤ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢é–“ã§ã®ã‚ªãƒ–ジェクトã®ãƒ¬ãƒ—リケーション"
#. Tag: para
#: session_api.xml:658
#, no-c-format
msgid ""
"It is sometimes useful to be able to take a graph of persistent instances "
"and make them persistent in a different datastore, without regenerating "
"identifier values."
msgstr ""
"永続インスタンスã®ã‚°ãƒ©ãƒ•ã‚’別ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«æ°¸ç¶šåŒ–ã™ã‚‹å ´åˆã«ã€è˜åˆ¥åã®å€¤ã‚’å†"
"生æˆã›ãšã«ã™ã‚€ã¨ä¾¿åˆ©ãªå ´åˆãŒã‚ã‚Šã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:662
#, fuzzy, no-c-format
msgid ""
"//retrieve a cat from one database\n"
"Session session1 = factory1.openSession();\n"
"Transaction tx1 = session1.beginTransaction();\n"
"Cat cat = session1.get(Cat.class, catId);\n"
"tx1.commit();\n"
"session1.close();\n"
"\n"
"//reconcile with a second database\n"
"Session session2 = factory2.openSession();\n"
"Transaction tx2 = session2.beginTransaction();\n"
"session2.replicate(cat, ReplicationMode.LATEST_VERSION);\n"
"tx2.commit();\n"
"session2.close();"
msgstr ""
"//retrieve a cat from one database\n"
"Session session1 = factory1.openSession();\n"
"Transaction tx1 = session1.beginTransaction();\n"
"Cat cat = session1.get(Cat.class, catId);\n"
"tx1.commit();\n"
"session1.close();\n"
"\n"
"//reconcile with a second database\n"
"Session session2 = factory2.openSession();\n"
"Transaction tx2 = session2.beginTransaction();\n"
"session2.replicate(cat, ReplicationMode.LATEST_VERSION);\n"
"tx2.commit();\n"
"session2.close();"
#. Tag: para
#: session_api.xml:664
#, no-c-format
msgid ""
"The <literal>ReplicationMode determines how replicate()ReplicationMode ã§æŒ‡å®š"
"ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:670
#, no-c-format
msgid ""
"<literal>ReplicationMode.IGNORE: ignores the object when there is "
"an existing database row with the same identifier"
msgstr ""
"<literal>ReplicationMode.IGNORE - åŒã˜è˜åˆ¥åã‚’æŒã¤è¡ŒãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹"
"ã«å˜åœ¨ã™ã‚‹ãªã‚‰ã€ãã®ã‚ªãƒ–ジェクトを無視ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:675
#, no-c-format
msgid ""
"<literal>ReplicationMode.OVERWRITE: overwrites any existing "
"database row with the same identifier"
msgstr ""
"<literal>ReplicationMode.OVERWRITE - åŒã˜è˜åˆ¥åã‚’æŒã¤æ—¢å˜ã®è¡Œã‚’ã™ã¹"
"ã¦ä¸Šæ›¸ãã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:680
#, no-c-format
msgid ""
"<literal>ReplicationMode.EXCEPTION: throws an exception if there "
"is an existing database row with the same identifier"
msgstr ""
"<literal>ReplicationMode.EXCEPTION - åŒã˜è˜åˆ¥åã‚’æŒã¤è¡ŒãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼"
"スã«å˜åœ¨ã™ã‚‹ãªã‚‰ã€ä¾‹å¤–を投ã’ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:686
#, no-c-format
msgid ""
"<literal>ReplicationMode.LATEST_VERSION: overwrites the row if its "
"version number is earlier than the version number of the object, or ignore "
"the object otherwise"
msgstr ""
"<literal>ReplicationMode.LATEST_VERSION - è¡Œã«ä¿å˜ã•ã‚Œã¦ã„ã‚‹ãƒãƒ¼"
"ジョン番å·ãŒã€å¼•æ•°ã®ã‚ªãƒ–ジェクトã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚ˆã‚Šå¤ã„ãªã‚‰ã°ã€ãã®è¡Œã‚’上書"
"ãã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:692
#, no-c-format
msgid ""
"Usecases for this feature include reconciling data entered into different "
"database instances, upgrading system configuration information during "
"product upgrades, rolling back changes made during non-ACID transactions and "
"more."
msgstr ""
"次ã®ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã§ã€ã“ã®æ©Ÿèƒ½ã‚’使用ã—ã¾ã™ã€‚ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«å…¥"
"れられãŸãƒ‡ãƒ¼ã‚¿ã®åŒæœŸã€è£½å“更新時ã«ãŠã‘るシステムè¨å®šæƒ…å ±ã®æ›´æ–°ã€éž ACID トラ"
"ンザクションã®ãªã‹ã§åŠ ãˆã‚‰ã‚ŒãŸå¤‰æ›´ã®ãƒãƒ¼ãƒ«ãƒãƒƒã‚¯ãªã©ã§ã™ã€‚"
#. Tag: title
#: session_api.xml:699
#, no-c-format
msgid "Flushing the Session"
msgstr "セッションã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥"
#. Tag: para
#: session_api.xml:701
#, no-c-format
msgid ""
"Sometimes the <literal>Session will execute the SQL statements "
"needed to synchronize the JDBC connection's state with the state of objects "
"held in memory. This process, called <emphasis>flush, occurs by "
"default at the following points:"
msgstr ""
"JDBC コãƒã‚¯ã‚·ãƒ§ãƒ³ã®çŠ¶æ…‹ã¨ãƒ¡ãƒ¢ãƒªä¸Šã®ã‚ªãƒ–ジェクトã®çŠ¶æ…‹ã‚’åŒæœŸã•ã›ã‚‹ãŸã‚ã«å¿…è¦"
"㪠SQL 文を <literal>Session ãŒå®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã¨ãã©ãã‚ã‚Šã¾ã™ã€‚ã“ã®"
"å‡¦ç† <emphasis>flush ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯æ¬¡ã®ã¨ãã«èµ·ã“ã‚Šã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:709
#, no-c-format
msgid "before some query executions"
msgstr "クエリを実行ã™ã‚‹å‰"
#. Tag: para
#: session_api.xml:713
#, no-c-format
msgid "from <literal>org.hibernate.Transaction.commit()"
msgstr "<literal>org.hibernate.Transaction.commit() を実行ã—ãŸã¨ã"
#. Tag: para
#: session_api.xml:718
#, no-c-format
msgid "from <literal>Session.flush()"
msgstr "<literal>Session.flush() を実行ã—ãŸã¨ã"
#. Tag: para
#: session_api.xml:722
#, no-c-format
msgid "The SQL statements are issued in the following order:"
msgstr "SQL æ–‡ã¯ä»¥ä¸‹ã®é †ç•ªã§ç™ºè¡Œã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:726
#, no-c-format
msgid ""
"all entity insertions in the same order the corresponding objects were saved "
"using <literal>Session.save()"
msgstr ""
"ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æŒ¿å…¥ã€‚ã“ã‚Œã¯ã€ <literal>Session.save() を使ã£"
"ã¦ã‚»ãƒ¼ãƒ–ã—ãŸã‚ªãƒ–ジェクトã®é †ã«å®Ÿè¡Œã—ã¦ã„ãã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:731
#, no-c-format
msgid "all entity updates"
msgstr "ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æ›´æ–°"
#. Tag: para
#: session_api.xml:735
#, no-c-format
msgid "all collection deletions"
msgstr "ã™ã¹ã¦ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å‰Šé™¤"
#. Tag: para
#: session_api.xml:739
#, no-c-format
msgid "all collection element deletions, updates and insertions"
msgstr "ã™ã¹ã¦ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ ã«å¯¾ã™ã‚‹å‰Šé™¤ã€æ›´æ–°ã€æŒ¿å…¥"
#. Tag: para
#: session_api.xml:743
#, no-c-format
msgid "all collection insertions"
msgstr "ã™ã¹ã¦ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æŒ¿å…¥"
#. Tag: para
#: session_api.xml:747
#, no-c-format
msgid ""
"all entity deletions in the same order the corresponding objects were "
"deleted using <literal>Session.delete()"
msgstr ""
"ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å‰Šé™¤ã€‚ã“ã‚Œã¯ã€ <literal>Session.delete() ã‚’"
"使ã£ã¦å‰Šé™¤ã—ãŸã‚ªãƒ–ジェクトã®é †ã«å®Ÿè¡Œã—ã¦ã„ãã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:752
#, no-c-format
msgid ""
"An exception is that objects using <literal>native ID generation "
"are inserted when they are saved."
msgstr ""
"(1ã¤ä¾‹å¤–ãŒã‚ã‚Šã¾ã™ã€‚ <literal>native ID 生æˆã‚’使ã£ãŸã‚ªãƒ–ジェクト"
"ã¯ã€ãれらãŒã‚»ãƒ¼ãƒ–ã•ã‚ŒãŸã¨ãã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚)"
#. Tag: para
#: session_api.xml:755
#, no-c-format
msgid ""
"Except when you explicitly <literal>flush(), there are absolutely "
"no guarantees about <emphasis>when the Session "
"executes the JDBC calls, only the <emphasis>order in which they "
"are executed. However, Hibernate does guarantee that the <literal>Query.list"
"(..)</literal> will never return stale or incorrect data."
msgstr ""
"明示的㫠<literal>flush() ã™ã‚‹ã¨ãを除ã„ã¦ã€ ã„ã¤Session ㌠JDBC をコールã™ã‚‹ã®ã‹ã«ã¤ã„ã¦çµ¶å¯¾çš„ãª"
"ä¿è¨¼ã¯ã‚ã‚Šã¾ã›ã‚“。ãŸã ã—ã€ãれらãŒå®Ÿè¡Œã•ã‚Œã‚‹ <emphasis>é †ç•ª ã ã‘ã¯"
"ä¿è¨¼ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€ Hibernate ã¯ã€ <literal>Query.list(..) ãŒå¤ã„"
"データや間é•ã£ãŸãƒ‡ãƒ¼ã‚¿è¿”ã•ãªã„ã“ã¨ã‚’ä¿è¨¼ã—ã¦ã„ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:762
#, fuzzy, no-c-format
msgid ""
"It is possible to change the default behavior so that flush occurs less "
"frequently. The <literal>FlushMode class defines three different "
"modes: only flush at commit time when the Hibernate <literal>Transaction is called explicitly. The last "
"mode is useful for long running units of work, where a <literal>Session クラスã¯3ã¤ã®ç•°ãªã‚‹ãƒ¢ãƒ¼ãƒ‰ã‚’定義ã—ã¾ã™ã€‚ãã‚Œ"
"ã¯ã€ã‚³ãƒŸãƒƒãƒˆæ™‚ã«ã ã‘フラッシュã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ï¼ˆHibernate ã® <literal>Transaction ãŒæ˜Žç¤ºçš„ã«å‘¼ã°ã‚Œãªã„é™ã‚Šãƒ•"
"ラッシュã—ãªã„モードã®ï¼“ã¤ã§ã™ã€‚最後ã®ãƒ¢ãƒ¼ãƒ‰ã¯ã€ä½œæ¥å˜ä½ãŒé•·æœŸé–“ã«åŠã¶å ´åˆã«"
"å½¹ã«ç«‹ã¡ã¾ã™ ( <xref linkend=\"transactions-optimistic-longsession\"/> ã‚’å‚ç…§"
"ã—ã¦ãã ã•ã„)。"
#. Tag: programlisting
#: session_api.xml:772
#, fuzzy, no-c-format
msgid ""
"sess = sf.openSession();\n"
"Transaction tx = sess.beginTransaction();\n"
"sess.setFlushMode(FlushMode.COMMIT); // allow queries to return stale state\n"
"\n"
"Cat izi = (Cat) sess.load(Cat.class, id);\n"
"izi.setName(iznizi);\n"
"\n"
"// might return stale data\n"
"sess.find(\"from Cat as cat left outer join cat.kittens kitten\");\n"
"\n"
"// change to izi is not flushed!\n"
"...\n"
"tx.commit(); // flush occurs\n"
"sess.close();"
msgstr ""
"sess = sf.openSession();\n"
"Transaction tx = sess.beginTransaction();\n"
"sess.setFlushMode(FlushMode.COMMIT); // allow queries to return stale state\n"
"\n"
"Cat izi = (Cat) sess.load(Cat.class, id);\n"
"izi.setName(iznizi);\n"
"\n"
"// might return stale data\n"
"sess.find(\"from Cat as cat left outer join cat.kittens kitten\");\n"
"\n"
"// change to izi is not flushed!\n"
"...\n"
"tx.commit(); // flush occurs\n"
"sess.close();"
#. Tag: para
#: session_api.xml:774
#, fuzzy, no-c-format
msgid ""
"During flush, an exception might occur (e.g. if a DML operation violates a "
"constraint). Since handling exceptions involves some understanding of "
"Hibernate's transactional behavior, we discuss it in <xref linkend="
"\"transactions\"/>."
msgstr ""
"フラッシュã®ã¨ãã€ä¾‹å¤–ãŒç™ºç”Ÿã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“(例ãˆã°ã€ DML æ“作ãŒåˆ¶ç´„ã‚’é•å"
"ã™ã‚‹ã‚ˆã†ãªå ´åˆã§ã™ï¼‰ã€‚例外処ç†ã‚’ç†è§£ã™ã‚‹ãŸã‚ã«ã¯ã€ Hibernate ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§"
"ンã®æŒ¯ã‚‹èˆžã„ã‚’ç†è§£ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚〠<xref linkend=\"transactions\"/> ã§èª¬"
"明ã—ã¾ã™ã€‚"
#. Tag: title
#: session_api.xml:781
#, no-c-format
msgid "Transitive persistence"
msgstr "連鎖的ãªæ°¸ç¶šåŒ–"
#. Tag: para
#: session_api.xml:783
#, no-c-format
msgid ""
"It is quite cumbersome to save, delete, or reattach individual objects, "
"especially if you deal with a graph of associated objects. A common case is "
"a parent/child relationship. Consider the following example:"
msgstr ""
"個々ã®ã‚ªãƒ–ジェクトをセーブã—ãŸã‚Šã€å‰Šé™¤ã—ãŸã‚Šã€å†è¿½åŠ ã—ãŸã‚Šã™ã‚‹ã“ã¨ã¯ã‹ãªã‚Šé¢"
"倒ã§ã™ã€‚特ã«ã€é–¢é€£ã™ã‚‹ã‚ªãƒ–ジェクトを扱ã†ã‚ˆã†ãªå ´åˆã«ã¯éš›ç«‹ã¡ã¾ã™ã€‚よãã‚ã‚‹ã®"
"ã¯ã€è¦ªå関係を扱ã†ã‚±ãƒ¼ã‚¹ã§ã™ã€‚以下ã®ä¾‹ã‚’考ãˆã¦ã¿ã¾ã—ょã†:"
#. Tag: para
#: session_api.xml:788
#, no-c-format
msgid ""
"If the children in a parent/child relationship would be value typed (e.g. a "
"collection of addresses or strings), their life cycle would depend on the "
"parent and no further action would be required for convenient \"cascading\" "
"of state changes. When the parent is saved, the value-typed child objects "
"are saved and when the parent is deleted, the children will be deleted, etc. "
"This works for operations such as the removal of a child from the "
"collection. Since value-typed objects cannot have shared references, "
"Hibernate will detect this and delete the child from the database."
msgstr ""
"ã‚‚ã—ã€è¦ªå関係ã®åãŒå€¤åž‹ãªã‚‰ï¼ˆä¾‹ãˆã°ã€ä½æ‰€ã‚„æ–‡å—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ï¼‰ã€ãれらã®"
"ライフサイクルã¯è¦ªã«ä¾å˜ã—ã¦ãŠã‚Šã€ä¾¿åˆ©ãªçŠ¶æ…‹å¤‰åŒ–ã®ã€Œã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã€ã‚’使ã†ãŸã‚"
"ã«ã€è¿½åŠ ã®ä½œæ¥ã¯å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。親ãŒã‚»ãƒ¼ãƒ–ã•ã‚ŒãŸã¨ãã€å€¤åž‹ã®åオブジェクト"
"ã‚‚åŒã˜ã‚ˆã†ã«ã‚»ãƒ¼ãƒ–ã•ã‚Œã¾ã™ã—ã€è¦ªãŒå‰Šé™¤ã•ã‚ŒãŸã¨ãã¯ã€åも削除ã•ã‚Œã¾ã™ã€‚ãã®ä»–"
"ã®æ“作もåŒã˜ã§ã™ã€‚コレクションã‹ã‚‰1ã¤ã®åを削除ã™ã‚‹ã‚ˆã†ãªæ“作ã§ã‚‚ã†ã¾ãã„ãã¾"
"ã™ã€‚ã™ãªã‚ã¡ã€ Hibernate ã¯ã“ã®å‰Šé™¤æ“作を検出ã™ã‚‹ã¨ã€å€¤åž‹ã®ã‚ªãƒ–ジェクトã¯å‚ç…§"
"を共有ã§ããªã„ã®ã§ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ãã®å供を削除ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:798
#, no-c-format
msgid ""
"Now consider the same scenario with parent and child objects being entities, "
"not value-types (e.g. categories and items, or parent and child cats). "
"Entities have their own life cycle and support shared references. Removing "
"an entity from the collection does not mean it can be deleted), and there is "
"by default no cascading of state from one entity to any other associated "
"entities. Hibernate does not implement <emphasis>persistence by "
"reachability</emphasis> by default."
msgstr ""
"ã“ã“ã§ã€è¦ªã¨åãŒå€¤åž‹ã§ãªãエンティティã§ã‚ã‚‹ã¨ã—ã¦åŒã˜ã‚·ãƒŠãƒªã‚ªã‚’考ãˆã¦ã¿ã¾"
"ã—ょã†ã€‚(例ãˆã°ã€ã‚«ãƒ†ã‚´ãƒªãƒ¼ã¨å“ç›®ã®é–¢ä¿‚や親ã¨åã®çŒ«ã®é–¢ä¿‚ã§ã™ã€‚)エンティ"
"ティã¯ã€ãれ自身ãŒãƒ©ã‚¤ãƒ•ã‚µã‚¤ã‚¯ãƒ«ã‚’æŒã¡ã€å‚ç…§ã®å…±æœ‰ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚(ãã®ãŸ"
"ã‚ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’削除ã™ã‚‹ã“ã¨ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£è‡ªèº«ã®å‰Šé™¤ã‚’æ„"
"味ã—ã¾ã›ã‚“。)ã¾ãŸã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã€é–¢é€£ã™ã‚‹ä»–ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£"
"ã¸çŠ¶æ…‹ã‚’カスケードã™ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。 Hibernate 㯠<emphasis>到é”å¯èƒ½æ€§ã«"
"よる永続化</emphasis> をデフォルトã§ã¯å®Ÿè¡Œã—ã¾ã›ã‚“。"
#. Tag: para
#: session_api.xml:806
#, no-c-format
msgid ""
"For each basic operation of the Hibernate session - including "
"<literal>persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), "
"evict(), replicate()</literal> - there is a corresponding cascade style. "
"Respectively, the cascade styles are named <literal>create, merge, save-"
"update, delete, lock, refresh, evict, replicate</literal>. If you want an "
"operation to be cascaded along an association, you must indicate that in the "
"mapping document. For example:"
msgstr ""
"Hibernate ã® Session ã®åŸºæœ¬æ“作( <literal>persist(), merge(), saveOrUpdate"
"(), delete(), lock(), refresh(), evict(), replicate()</literal> ãŒå«ã¾ã‚Œã¾"
"ã™ï¼‰ã«å¯¾ã—ã¦ã€ãã‚Œãžã‚Œã«å¯¾å¿œã™ã‚‹ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã‚¹ã‚¿ã‚¤ãƒ«ãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œãžã‚Œã®ã‚«ã‚¹"
"ケードスタイルã«ã¯ã€ <literal>create, merge, save-update, delete, lock, "
"refresh, evict, replicate</literal> ã¨ã„ã†åå‰ãŒã¤ã„ã¦ã„ã¾ã™ã€‚ã‚‚ã—ã€é–¢é€£ã«"
"沿ã£ã¦ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã•ã›ãŸã„æ“作ãŒã‚ã‚‹ãªã‚‰ã€ãƒžãƒƒãƒ”ングファイルã«ãã†æŒ‡å®šã—ãªã‘ã‚Œ"
"ã°ãªã‚Šã¾ã›ã‚“。例ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã—ã¾ã™:"
#. Tag: programlisting
#: session_api.xml:814
#, fuzzy, no-c-format
msgid "<one-to-one name=\"person\" cascade=\"persist\"/>"
msgstr "<one-to-one name=\"person\" cascade=\"persist\"/>"
#. Tag: para
#: session_api.xml:816
#, no-c-format
msgid "Cascade styles my be combined:"
msgstr "カスケードスタイルã¯ã€çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™:"
#. Tag: programlisting
#: session_api.xml:818
#, fuzzy, no-c-format
msgid "<one-to-one name=\"person\" cascade=\"persist,delete,lock\"/>"
msgstr "<one-to-one name=\"person\" cascade=\"persist,delete,lock\"/>"
#. Tag: para
#: session_api.xml:820
#, no-c-format
msgid ""
"You can even use <literal>cascade=\"all\" to specify that "
"<emphasis>all operations should be cascaded along the "
"association. The default <literal>cascade=\"none\" specifies that "
"no operations are to be cascaded."
msgstr ""
"<emphasis>ã™ã¹ã¦ã® æ“作を関連ã«æ²¿ã£ã¦ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã™ã‚‹ã‚ˆã†æŒ‡å®šã™ã‚‹ã¨"
"ãã¯ã€ <literal>cascade=\"all\" を使ã„ã¾ã™ã€‚デフォルト㮠"
"<literal>cascade=\"none\" ã¯ã€ã©ã®æ“作もカスケードã—ãªã„ã“ã¨ã‚’æ„味"
"ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:825
#, no-c-format
msgid ""
"In case you are using annotatons you probably have noticed the "
"<literal>cascade attribute taking an array of "
"<classname>CascadeType as a value. The cascade concept in JPA is "
"very is similar to the transitive persistence and cascading of operations as "
"described above, but with slightly different semantics and cascading types:"
msgstr ""
#. Tag: para
#: session_api.xml:834
#, no-c-format
msgid ""
"<literal>CascadeType.PERSIST: cascades the persist (create) "
"operation to associated entities persist() is called or if the entity is "
"managed"
msgstr ""
#. Tag: para
#: session_api.xml:840
#, no-c-format
msgid ""
"<literal>CascadeType.MERGE: cascades the merge operation to "
"associated entities if merge() is called or if the entity is managed"
msgstr ""
#. Tag: para
#: session_api.xml:846
#, no-c-format
msgid ""
"<literal>CascadeType.REMOVE: cascades the remove operation to "
"associated entities if delete() is called"
msgstr ""
#. Tag: para
#: session_api.xml:851
#, no-c-format
msgid ""
"<literal>CascadeType.REFRESH: cascades the refresh operation to "
"associated entities if refresh() is called"
msgstr ""
#. Tag: para
#: session_api.xml:856
#, no-c-format
msgid ""
"<literal>CascadeType.DETACH: cascades the detach operation to "
"associated entities if detach() is called"
msgstr ""
#. Tag: para
#: session_api.xml:861
#, fuzzy, no-c-format
msgid "<literal>CascadeType.ALL: all of the above"
msgstr "<literal>saveOrUpdate() ã¯ä»¥ä¸‹ã®ã“ã¨ã‚’è¡Œã„ã¾ã™:"
#. Tag: para
#: session_api.xml:866
#, no-c-format
msgid ""
"CascadeType.ALL also covers Hibernate specific operations like save-update, "
"lock etc..."
msgstr ""
#. Tag: para
#: session_api.xml:870
#, no-c-format
msgid ""
"A special cascade style, <literal>delete-orphan, applies only to "
"one-to-many associations, and indicates that the <literal>delete() "
"operation should be applied to any child object that is removed from the "
"association. Using annotations there is no <literal>CascadeType.DELETE-"
"ORPHAN</literal> equivalent. Instead you can use the attribute "
"<literal>orphanRemoval as seen in collection or an associated entity is "
"dereferenced from a <classname>@OneToOne association, this "
"associated entity can be marked for deletion if <literal>orphanRemoval with orphanRemoval"
msgstr ""
#. Tag: programlisting
#: session_api.xml:886
#, no-c-format
msgid ""
"@Entity \n"
"public class Customer {\n"
" private Set<Order> orders;\n"
"\n"
" @OneToMany(cascade=CascadeType.ALL, orphanRemoval=true) \n"
" public Set<Order> getOrders() { return orders; }\n"
"\n"
" public void setOrders(Set<Order> orders) { this.orders = orders; }\n"
"\n"
" [...]\n"
"}\n"
"\n"
"@Entity \n"
"public class Order { ... }\n"
"\n"
"Customer customer = em.find(Customer.class, 1l);\n"
"Order order = em.find(Order.class, 1l);\n"
"customer.getOrders().remove(order); //order will be deleted by cascade"
msgstr ""
#. Tag: para
#: session_api.xml:889
#, no-c-format
msgid "Recommendations:"
msgstr "ãŠã™ã™ã‚:"
#. Tag: para
#: session_api.xml:893
#, fuzzy, no-c-format
msgid ""
"It does not usually make sense to enable cascade on a many-to-one or many-to-"
"many association. In fact the <literal>@ManyToOne and "
"<literal>@ManyToMany don't even offer a orphanRemoval ã‚„ <many-to-"
"many></literal> 関連ã«å¯¾ã—ã¦ã¯ã€ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã‚’è¨å®šã™ã‚‹æ„味ã¯ã‚ã‚Šã¾ã›ã‚“。 "
"<literal><one-to-one> 㨠<one-to-many> by specifying "
"<literal>cascade=\"all,delete-orphan\"(@OneToMany"
"(cascade=CascadeType.ALL, orphanRemoval=true)</literal>)."
msgstr ""
"å供オブジェクトã®å¯¿å‘½ãŒè¦ªã‚ªãƒ–ジェクトã®å¯¿å‘½ã«åˆ¶é™ã‚’å—ã‘ã‚‹ãªã‚‰ã°ã€ "
"<literal>cascade=\"all,delete-orphan\" を指定ã—ã€å供オブジェクト"
"ã‚’ <emphasis>ライフサイクルオブジェクト ã«ã—ã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:909
#, no-c-format
msgid ""
"Otherwise, you might not need cascade at all. But if you think that you will "
"often be working with the parent and children together in the same "
"transaction, and you want to save yourself some typing, consider using "
"<literal>cascade=\"persist,merge,save-update\"."
msgstr ""
"ãれ以外ã®å ´åˆã¯ã€ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã¯ã»ã¨ã‚“ã©å¿…è¦ãªã„ã§ã—ょã†ã€‚ã—ã‹ã—ã€åŒã˜ãƒˆãƒ©ãƒ³ã‚¶"
"クションã®ãªã‹ã§è¦ªã¨åãŒä¸€ç·’ã«å‹•ä½œã™ã‚‹ã“ã¨ãŒå¤šã„ã¨æ€ã„ã€ã„ãらã‹ã®ã‚³ãƒ¼ãƒ‰ã‚’書"
"ã手間をçœããŸã„ã®ã§ã‚ã‚Œã°ã€ <literal>cascade=\"persist,merge,save-update\" marks the association as a "
"<emphasis>parent/child style relationship where save/update/"
"delete of the parent results in save/update/delete of the child or children."
msgstr ""
"<literal>cascade=\"all\" ã§ãƒžãƒƒãƒ”ングã—ãŸé–¢é€£ï¼ˆå˜å€¤é–¢é€£ã‚„コレクショ"
"ン)ã¯ã€ <emphasis>親å スタイルã®é–¢é€£ã¨ãƒžãƒ¼ã‚¯ã•ã‚Œã¾ã™ã€‚ãã‚Œã¯ã€è¦ª"
"ã®ã‚»ãƒ¼ãƒ–/æ›´æ–°/削除ãŒã€åã®ã‚»ãƒ¼ãƒ–/æ›´æ–°/削除を引ãèµ·ã“ã™é–¢ä¿‚ã®ã“ã¨ã§ã™ã€‚"
#. Tag: para
#: session_api.xml:923
#, fuzzy, no-c-format
msgid ""
"Furthermore, a mere reference to a child from a persistent parent will "
"result in save/update of the child. This metaphor is incomplete, however. A "
"child which becomes unreferenced by its parent is <emphasis>not "
"automatically deleted, except in the case of a one-to-many association "
"mapped with <literal>cascade=\"delete-orphan\". The precise "
"semantics of cascading operations for a parent/child relationship are as "
"follows:"
msgstr ""
"ã•ã‚‰ã«ã€æ°¸ç¶šåŒ–ã•ã‚ŒãŸè¦ªãŒåã‚’å˜ã«å‚ç…§ã—ã¦ã„ã‚‹ã ã‘ã§ã€åã®ã‚»ãƒ¼ãƒ–/更新を引ãèµ·ã“"
"ã—ã¾ã™ã€‚ã—ã‹ã—ã€ã“ã®ãƒ¡ã‚¿ãƒ•ã‚¡ãƒ¼ã¯ä¸å®Œå…¨ã§ã™ã€‚親ã‹ã‚‰å‚ç…§ã•ã‚Œãªããªã£ãŸåã¯ã€è‡ª"
"å‹•çš„ã«å‰Šé™¤ <emphasis>ã•ã‚Œã¾ã›ã‚“ 。ãŸã ã—〠cascade="
"\"delete-orphan\"</literal> ã§ãƒžãƒƒãƒ”ングã•ã‚ŒãŸ <one-to-many>, all children are "
"passed to <literal>persist()"
msgstr ""
"親㌠<literal>persist() ã«æ¸¡ã•ã‚ŒãŸãªã‚‰ã°ã€ã™ã¹ã¦ã®å㯠"
"<literal>persist() ã«æ¸¡ã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:939
#, no-c-format
msgid ""
"If a parent is passed to <literal>merge(), all children are passed "
"to <literal>merge()"
msgstr ""
"<literal>merge() ã«æ¸¡ã•ã‚ŒãŸãªã‚‰ã°ã€ã™ã¹ã¦ã®å㯠merge(), update()saveOrUpdate(), all children are passed to "
"<literal>saveOrUpdate()"
msgstr ""
"親㌠<literal>save() 〠update() 〠"
"<literal>saveOrUpdate() ã«æ¸¡ã•ã‚ŒãŸãªã‚‰ã°ã€ã™ã¹ã¦ã®å㯠"
"<literal>saveOrUpdate() ã«æ¸¡ã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:950
#, no-c-format
msgid ""
"If a transient or detached child becomes referenced by a persistent parent, "
"it is passed to <literal>saveOrUpdate()"
msgstr ""
"transient ã¾ãŸã¯ detached ã®åãŒã€æ°¸ç¶šåŒ–ã•ã‚ŒãŸè¦ªã«å‚ç…§ã•ã‚ŒãŸãªã‚‰ã°ã€ "
"<literal>saveOrUpdate() ã«æ¸¡ã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:956
#, no-c-format
msgid ""
"If a parent is deleted, all children are passed to <literal>delete() ã«æ¸¡ã•ã‚Œã¾"
"ã™ã€‚"
#. Tag: para
#: session_api.xml:961
#, no-c-format
msgid ""
"If a child is dereferenced by a persistent parent, <emphasis>nothing special "
"happens</emphasis> - the application should explicitly delete the child if "
"necessary - unless <literal>cascade=\"delete-orphan\", in which "
"case the \"orphaned\" child is deleted."
msgstr ""
"åãŒæ°¸ç¶šåŒ–ã•ã‚ŒãŸè¦ªã‹ã‚‰å‚ç…§ã•ã‚Œãªããªã£ãŸã¨ãã¯ã€ <emphasis>特ã«ä½•ã‚‚èµ·ã“ã‚Šã¾ã›"
"ã‚“</emphasis> 。よã£ã¦ã€ã‚¢ãƒ—リケーションãŒå¿…è¦ã§ã‚ã‚Œã°ã€æ˜Žç¤ºçš„ã«å‰Šé™¤ã™ã‚‹å¿…è¦"
"ãŒã‚ã‚Šã¾ã™ã€‚ãŸã ã—〠<literal>cascade=\"delete-orphan\" ã®å ´åˆã‚’除"
"ãã¾ã™ã€‚ã“ã®å ´åˆã€ã€Œè¦ªã®ãªã„ã€åã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#: session_api.xml:969
#, no-c-format
msgid ""
"Finally, note that cascading of operations can be applied to an object graph "
"at <emphasis>call time or at flush time. All "
"operations, if enabled, are cascaded to associated entities reachable when "
"the operation is executed. However, <literal>save-update and "
"<literal>delete-orphan are transitive for all associated entities "
"reachable during flush of the <literal>Session."
msgstr ""
"最後ã«ã€æ“作ã®ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ãŒã‚ªãƒ–ジェクトグラフã«é©ç”¨ã•ã‚Œã‚‹ã®ã¯ã€ <emphasis>コー"
"ルã—ãŸæ™‚</emphasis> ã‚ã‚‹ã„ã¯ã€ flushã—ãŸæ™‚ ã§ã‚ã‚‹ã“ã¨ã«"
"注æ„ã—ã¦ãã ã•ã„。ã™ã¹ã¦ã®æ“作ã¯ã€ãã®æ“作ãŒå®Ÿè¡Œã•ã‚ŒãŸã¨ãã«ã€åˆ°é”å¯èƒ½ãªé–¢é€£"
"ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã—ã¦ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ãŒå¯èƒ½ãªã‚‰ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ã—ã‹ã—〠"
"<literal>save-upate 㨠delete-orphan ã¯ã€ "
"<literal>Session ㌠flush ã—ã¦ã„ã‚‹é–“ã«ã€ã™ã¹ã¦ã®åˆ°é”å¯èƒ½ãªé–¢é€£ã™ã‚‹"
"エンティティã«ä¼æ’ã—ã¾ã™ã€‚"
#. Tag: title
#: session_api.xml:979
#, no-c-format
msgid "Using metadata"
msgstr "メタデータã®ä½¿ç”¨"
#. Tag: para
#: session_api.xml:981
#, no-c-format
msgid ""
"Hibernate requires a rich meta-level model of all entity and value types. "
"This model can be useful to the application itself. For example, the "
"application might use Hibernate's metadata to implement a \"smart\" deep-"
"copy algorithm that understands which objects should be copied (eg. mutable "
"value types) and which objects that should not (e.g. immutable value types "
"and, possibly, associated entities)."
msgstr ""
"Hibernate ã¯ã€ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨å€¤åž‹ã®éžå¸¸ã«ãƒªãƒƒãƒãªãƒ¡ã‚¿ãƒ¬ãƒ™ãƒ«ã®ãƒ¢ãƒ‡ãƒ«ã‚’"
"å¿…è¦ã¨ã—ã¾ã™ã€‚ã¨ãã©ãã€ã“ã®ãƒ¢ãƒ‡ãƒ«ã¯ã‚¢ãƒ—リケーションã«ã¨ã£ã¦ã¨ã¦ã‚‚å½¹ã«ç«‹ã¡ã¾"
"ã™ã€‚例ãˆã°ã€ã‚¢ãƒ—リケーションã¯ã€ Hibernate ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’使ã£ã¦ã€ã€Œè³¢ã„ã€"
"ディープコピーアルゴリズムを実装ã§ãã‚‹ã‹ã‚‚ã—ã¾ã›ã‚“。ãã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¨ã¯ã€ã©"
"ã®ã‚ªãƒ–ジェクトãŒã‚³ãƒ”ーã•ã‚Œã‚‹ã¹ãã‹ï¼ˆä¾‹ï¼šå¯å¤‰ã®å€¤åž‹ï¼‰ã‚„ã©ã®ã‚ªãƒ–ジェクトã¯ã‚³"
"ピーã•ã‚Œãªã„ã¹ãã‹ï¼ˆä¾‹ï¼šä¸å¤‰ãªå€¤åž‹ã‚„å¯èƒ½ãªã‚‰é–¢é€£ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ï¼‰ã‚’判æ–ã§ã"
"ã‚‹ã‚‚ã®ã§ã™ã€‚"
#. Tag: para
#: session_api.xml:988
#, no-c-format
msgid ""
"Hibernate exposes metadata via the <literal>ClassMetadata and "
"<literal>CollectionMetadata interfaces and the Type."
msgstr ""
"Hibernate 㯠<literal>ClassMetadata 㨠"
"<literal>CollectionMetadata インタフェース㨠Type ã‹ã‚‰å¾—られã¾ã™ã€‚"
#. Tag: programlisting
#: session_api.xml:993
#, fuzzy, no-c-format
msgid ""
"Cat fritz = ......;\n"
"ClassMetadata catMeta = sessionfactory.getClassMetadata(Cat.class);\n"
"\n"
"Object[] propertyValues = catMeta.getPropertyValues(fritz);\n"
"String[] propertyNames = catMeta.getPropertyNames();\n"
"Type[] propertyTypes = catMeta.getPropertyTypes();\n"
"\n"
"// get a Map of all properties which are not collections or associations\n"
"Map namedValues = new HashMap();\n"
"for ( int i=0; i<propertyNames.length; i++ ) {\n"
" if ( !propertyTypes[i].isEntityType() && !propertyTypes[i]."
"isCollectionType() ) {\n"
" namedValues.put( propertyNames[i], propertyValues[i] );\n"
" }\n"
"}"
msgstr ""
"Cat fritz = ......;\n"
"ClassMetadata catMeta = sessionfactory.getClassMetadata(Cat.class);\n"
"\n"
"Object[] propertyValues = catMeta.getPropertyValues(fritz);\n"
"String[] propertyNames = catMeta.getPropertyNames();\n"
"Type[] propertyTypes = catMeta.getPropertyTypes();\n"
"\n"
"// get a Map of all properties which are not collections or associations\n"
"Map namedValues = new HashMap();\n"
"for ( int i=0; i<propertyNames.length; i++ ) {\n"
" if ( !propertyTypes[i].isEntityType() && !propertyTypes[i]."
"isCollectionType() ) {\n"
" namedValues.put( propertyNames[i], propertyValues[i] );\n"
" }\n"
"}"
#, fuzzy
#~ msgid ""
#~ "Hibernate does not offer its own API for direct execution of "
#~ "<literal>UPDATE or DELETE statements. "
#~ "Hibernate is a <emphasis>state management service, you do not "
#~ "have to think in <emphasis>statements to use it. JDBC is a "
#~ "perfect API for executing SQL statements, you can get a JDBC "
#~ "<literal>Connection at any time by calling session."
#~ "connection()</literal>. Furthermore, the notion of mass operations "
#~ "conflicts with object/relational mapping for online transaction "
#~ "processing-oriented applications. Future versions of Hibernate can, "
#~ "however, provide special mass operation functions. See <xref linkend="
#~ "\"batch\"/> for some possible batch operation tricks."
#~ msgstr ""
#~ "Hibernate ã¯ã€ <literal>UPDATE 文や DELETE æ–‡"
#~ "を直接実行ã™ã‚‹ API を用æ„ã—ã¦ã„ã¾ã›ã‚“。 Hibernate ã¯ã€ <emphasis>ステート"
#~ "マãƒãƒ¼ã‚¸ãƒ¡ãƒ³ãƒˆ</emphasis> サービスã§ã‚ã‚Šã€ãれを使ã†ã®ã« ステー"
#~ "トメント</emphasis> ã®ã“ã¨ã‚’開発者ãŒè€ƒãˆã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 JDBC 㯠SQL "
#~ "文を実行ã™ã‚‹å®Œç’§ãª API ã§ã‚り〠<literal>session.connection() ã‚’"
#~ "呼ã¶ã“ã¨ã§ã„ã¤ã§ã‚‚〠JDBC <literal>Connection を開発者ã¯å–å¾—ã§ã"
#~ "ã¾ã™ã€‚ã•ã‚‰ã«ã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿æ“作ã®è€ƒãˆæ–¹ã¯ã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç†å‘"
#~ "ãアプリケーションã®ã‚ªãƒ–ジェクト/リレーショナルマッピングã¨è¡çªã—ã¾ã™ã€‚ã—"
#~ "ã‹ã—〠Hibernate ã®ä»Šå¾Œã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ã€å¤§é‡ãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã™ã‚‹ç‰¹åˆ¥ãªæ©Ÿèƒ½ã‚’"
#~ "æä¾›ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ãƒãƒƒãƒæ“作ã«åˆ©ç”¨ã§ãã‚‹ã„ãã¤ã‹ã®å·¥å¤«ã«ã¤ã„ã¦ã¯ã€ "
#~ "<xref linkend=\"batch\"/> ã‚’å‚ç…§ã—ã¦ãã ã•ã„。"
#~ msgid ""
#~ "A special cascade style, <literal>delete-orphan, applies only "
#~ "to one-to-many associations, and indicates that the <literal>delete() ã¯ã€ä¸€å¯¾å¤šé–¢é€£ã«"
#~ "ã ã‘é©ç”¨ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€é–¢é€£ã‹ã‚‰å‰Šé™¤ã•ã‚ŒãŸåä¾›ã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã€ "
#~ "<literal>delete() æ“作ãŒé©ç”¨ã•ã‚Œã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚"
Other Hibernate examples (source code examples)
Here is a short list of links related to this Hibernate session_api.po source code file:
|