Hibernate example source code file (batch.po)
This example Hibernate source code file (batch.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 batch.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-02-11T05:38:15\n"
"PO-Revision-Date: 2010-01-13 15:16+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
#, no-c-format
msgid "Batch processing"
msgstr "ãƒãƒƒãƒå‡¦ç†"
#. Tag: para
#, no-c-format
msgid ""
"A naive approach to inserting 100,000 rows in the database using Hibernate "
"might look like this:"
msgstr ""
"Hibernate を使ã£ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«100,000行を挿入ã™ã‚‹æ„šç›´ãªæ–¹æ³•ã¯ã€ã“ã®ã‚ˆã†ãªã‚‚"
"ã®ã§ã™ï¼š"
#. Tag: para
#, no-c-format
msgid ""
"This would fall over with an <literal>OutOfMemoryException "
"somewhere around the 50,000th row. That is because Hibernate caches all the "
"newly inserted <literal>Customer instances in the session-level "
"cache. In this chapter we will show you how to avoid this problem."
msgstr ""
"ã“ã‚Œã¯50,000番目ã®è¡Œã®ã‚ãŸã‚Šã§ <literal>OutOfMemoryException ã§å¤±æ•—"
"ã™ã‚‹ã§ã—ょã†ã€‚ Hibernate ãŒã‚»ãƒƒã‚·ãƒ§ãƒ³ãƒ¬ãƒ™ãƒ«ã‚ャッシュã§ã€æ–°ã—ã挿入ã•ã‚ŒãŸã™ã¹"
"ã¦ã® <literal>Customer インスタンスをã‚ャッシュã™ã‚‹ã‹ã‚‰ã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"If you are undertaking batch processing you will need to enable the use of "
"JDBC batching. This is absolutely essential if you want to achieve optimal "
"performance. Set the JDBC batch size to a reasonable number (10-50, for "
"example):"
msgstr ""
"ã“ã®ç« ã§ã¯ã€ã“ã®å•é¡Œã‚’回é¿ã™ã‚‹æ–¹æ³•ã‚’紹介ã—ã¾ã™ã€‚ã—ã‹ã—ãƒãƒƒãƒå‡¦ç†ã‚’ã™ã‚‹ãªã‚‰ã€ "
"JDBC ãƒãƒƒãƒãŒä½¿ç”¨å¯èƒ½ã§ã‚ã‚‹ã“ã¨ãŒéžå¸¸ã«é‡è¦ã§ã™ã€‚ãã†ã§ãªã‘ã‚Œã°æ‰‹é ƒãªãƒ‘フォー"
"マンスãŒå¾—られã¾ã›ã‚“。 JDBC ãƒãƒƒãƒã‚µã‚¤ã‚ºã‚’æ‰‹é ƒãªæ•°å€¤ï¼ˆä¾‹ãˆã°ã€10ã‹ã‚‰50)ã«è¨"
"定ã—ã¦ãã ã•ã„:"
#. Tag: para
#, no-c-format
msgid ""
"Hibernate disables insert batching at the JDBC level transparently if you "
"use an <literal>identity identifier generator."
msgstr ""
"<literal>identiy è˜åˆ¥å生æˆã‚’使ã†å ´åˆã¯ã€Hibernate 㯠JDBC レベルã§"
"インサートãƒãƒƒãƒãƒ³ã‚°ã‚’無効ã«ã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。"
#. Tag: para
#, no-c-format
msgid ""
"You can also do this kind of work in a process where interaction with the "
"second-level cache is completely disabled:"
msgstr ""
"ã¾ãŸäºŒæ¬¡ã‚ャッシュãŒå…¨ã効ã‹ãªã„プãƒã‚»ã‚¹ã§ã€ã“ã®ã‚ˆã†ãªä½œæ¥ã‚’ã—ãŸã„ã¨æ€ã†ã‹ã‚‚"
"ã—ã‚Œã¾ã›ã‚“:"
#. Tag: para
#, no-c-format
msgid ""
"However, this is not absolutely necessary, since we can explicitly set the "
"<literal>CacheMode to disable interaction with the second-level "
"cache."
msgstr ""
"ã—ã‹ã—ã€ã“ã‚Œã¯çµ¶å¯¾ã«å¿…è¦ã¨ã„ã†ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ãªãœãªã‚‰æ˜Žç¤ºçš„ã« "
"<literal>CacheMode ã‚’è¨å®šã—ã¦ã€äºŒæ¬¡ã‚ャッシュã¨ã®ç›¸äº’作用を無効ã«ã™"
"ã‚‹ã“ã¨ãŒã§ãã‚‹ã‹ã‚‰ã§ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "Batch inserts"
msgstr "ãƒãƒƒãƒæŒ¿å…¥"
#. Tag: para
#, no-c-format
msgid ""
"When making new objects persistent <literal>flush() and then "
"<literal>clear() the session regularly in order to control the "
"size of the first-level cache."
msgstr ""
"æ–°ã—ã„オブジェクトを永続化ã™ã‚‹ã¨ãã€ä¸€æ¬¡ã‚ャッシュã®ã‚µã‚¤ã‚ºã‚’制é™ã™ã‚‹ãŸã‚ã€"
"セッションを <literal>flush() ã—㦠clear() ã—ãª"
"ã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。"
#. Tag: title
#, no-c-format
msgid "Batch updates"
msgstr "ãƒãƒƒãƒæ›´æ–°"
#. Tag: para
#, no-c-format
msgid ""
"For retrieving and updating data, the same ideas apply. In addition, you "
"need to use <literal>scroll() to take advantage of server-side "
"cursors for queries that return many rows of data."
msgstr ""
"データを復元ã—ãŸã‚Šæ›´æ–°ã—ãŸã‚Šã™ã‚‹ã«ã¯åŒã˜ã‚¢ã‚¤ãƒ‡ã‚£ã‚¢ã‚’é©ç”¨ã—ã¾ã™ã€‚ãã‚Œã«åŠ ãˆ"
"ã¦ã€ãƒ‡ãƒ¼ã‚¿ã®è¡Œã‚’多ãè¿”ã™ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦æœ‰åŠ¹ãªã‚µãƒ¼ãƒãƒ¼ã‚µã‚¤ãƒ‰ã®ã‚«ãƒ¼ã‚½ãƒ«ã®åˆ©ç‚¹ã‚’"
"生ã‹ã—ãŸã‘れ㰠<literal>scroll() を使ã†å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "The StatelessSession interface"
msgstr "StatelessSession インターフェース"
#. Tag: para
#, no-c-format
msgid ""
"Alternatively, Hibernate provides a command-oriented API that can be used "
"for streaming data to and from the database in the form of detached objects. "
"A <literal>StatelessSession has no persistence context associated "
"with it and does not provide many of the higher-level life cycle semantics. "
"In particular, a stateless session does not implement a first-level cache "
"nor interact with any second-level or query cache. It does not implement "
"transactional write-behind or automatic dirty checking. Operations performed "
"using a stateless session never cascade to associated instances. Collections "
"are ignored by a stateless session. Operations performed via a stateless "
"session bypass Hibernate's event model and interceptors. Due to the lack of "
"a first-level cache, Stateless sessions are vulnerable to data aliasing "
"effects. A stateless session is a lower-level abstraction that is much "
"closer to the underlying JDBC."
msgstr ""
"ã¾ãŸåˆ¥ã®æ–¹æ³•ã¨ã—ã¦ã€ Hibernate ã¯ã‚³ãƒžãƒ³ãƒ‰æŒ‡å‘ã® API を用æ„ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯"
"分離オブジェクトã®å½¢ã§ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒ ã®ã‚„ã‚Šå–ã‚Šã«ä½¿ã†ã“ã¨"
"ãŒã§ãã¾ã™ã€‚ <literal>StatelessSession ã¯é–¢é€£ã™ã‚‹æ°¸ç¶šã‚³ãƒ³ãƒ†ã‚ストを"
"æŒãŸãšã€é«˜ãƒ¬ãƒ™ãƒ«ã®ãƒ©ã‚¤ãƒ•ã‚µã‚¤ã‚¯ãƒ«ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã®å¤šãã‚’æä¾›ã—ã¾ã›ã‚“。特ã«ã‚¹"
"テートレスセッションã¯ã€ä¸€æ¬¡ã‚ャッシュを実装ã›ãšã€ã¾ãŸã©ã®ã‚ˆã†ãªäºŒæ¬¡ã‚ャッ"
"シュやクエリã‚ャッシュã¨ã‚‚相互作用ã—ã¾ã›ã‚“。トランザクショナル㪠write-"
"behind や自動ダーティãƒã‚§ãƒƒã‚¯ã‚‚実装ã—ã¾ã›ã‚“。ステートレスセッションを使ã£ã¦è¡Œ"
"ã‚れるæ“作ãŒã€é–¢é€£ã™ã‚‹ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¸ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã“ã¨ã¯æ±ºã—ã¦ã‚ã‚Šã¾ã›ã‚“。"
"コレクションã¯ã€ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¬ã‚¹ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‹ã‚‰ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ステートレスセッ"
"ションを通ã—ã¦è¡Œã‚れるæ“作ã¯ã€ Hibernate ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ¢ãƒ‡ãƒ«ã‚„インターセプタã®å½±"
"響をå—ã‘ã¾ã›ã‚“。一次ã‚ャッシュをæŒãŸãªã„ãŸã‚ã€ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¬ã‚¹ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯åˆ¥åã‚’"
"æŒã¤ãƒ‡ãƒ¼ã‚¿ã«ä¸Šæ‰‹ã対処ã§ãã¾ã›ã‚“。ステートレスセッションã¯ä½Žãƒ¬ãƒ™ãƒ«ã®æŠ½è±¡åŒ–ã§"
"ã‚り〠JDBC ã«éžå¸¸ã«ã‚ˆãä¼¼ã¦ã„ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"In this code example, the <literal>Customer instances returned by "
"the query are immediately detached. They are never associated with any "
"persistence context."
msgstr ""
"ã“ã®ã‚³ãƒ¼ãƒ‰ä¾‹ã§ã¯ã€ã‚¯ã‚¨ãƒªãŒè¿”ã™ <literal>Customer インスタンスã¯å³åº§"
"㫠(セッションã‹ã‚‰ï¼‰ 分離ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã€ã©ã®ã‚ˆã†ãªæ°¸"
"続コンテã‚ストã¨ã‚‚決ã—ã¦é–¢é€£ã—ã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"The <literal>insert(), update() and delete() "
"operations defined by the <literal>StatelessSession interface are "
"considered to be direct database row-level operations. They result in the "
"immediate execution of a SQL <literal>INSERT, UPDATE or "
"<literal>DELETE respectively. They have different semantics to the "
"<literal>save(), saveOrUpdate() and delete() "
"operations defined by the <literal>Session interface."
msgstr ""
"<literal>StatelessSession インターフェースã§å®šç¾©ã•ã‚Œã¦ã„ã‚‹ "
"<literal>insert(), update() 㨠delete() ã®æ“作"
"ã¯ã€ä½Žãƒ¬ãƒ™ãƒ«ã®ç›´æŽ¥çš„ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹æ“作ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚çµæžœã¨ã—ã¦ã€ SQL ã® "
"<literal>INSERT, UPDATE ã¾ãŸã¯ DELETE ãŒãã‚Œãžã‚Œ"
"å³åº§ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ã“ã®ã‚ˆã†ã«ã€ã“れら㯠<literal>Session インター"
"フェースã§å®šç¾©ã•ã‚Œã¦ã„ã‚‹ <literal>save(), saveOrUpdate() 㨠"
"<literal>delete() ã¨ã¯éžå¸¸ã«ç•°ãªã‚‹æ„味をæŒã¡ã¾ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "DML-style operations"
msgstr "DML スタイルã®æ“作"
#. Tag: para
#, fuzzy, no-c-format
msgid ""
"As already discussed, automatic and transparent object/relational mapping is "
"concerned with the management of the object state. The object state is "
"available in memory. This means that manipulating data directly in the "
"database (using the SQL <literal>Data Manipulation Language (DML) "
"the statements: <literal>INSERT, UPDATE , "
"<literal>DELETE) will not affect in-memory state. However, "
"Hibernate provides methods for bulk SQL-style DML statement execution that "
"is performed through the Hibernate Query Language (<link linkend=\"queryhql"
"\">HQL</link>)."
msgstr ""
"ã™ã§ã«è°è«–ã—ãŸã‚ˆã†ã«ã€è‡ªå‹•çš„ã‹ã¤é€éŽçš„ãªã‚ªãƒ–ジェクト/リレーショナルマッピング"
"ã¯ã€ã‚ªãƒ–ジェクトã®çŠ¶æ…‹ã®ç®¡ç†ã§ã‚ã‚‹ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ãƒ¡ãƒ¢ãƒªå†…ã®ã‚ªãƒ–ジェク"
"トã®çŠ¶æ…‹ã‚’利用ã§ãã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ãã®ãŸã‚ (SQLã® <literal>データæ“作言語"
"</literal> (DML) 文: INSERT 〠UPDATEDELETE を使ã£ã¦ï¼‰ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ãƒ‡ãƒ¼ã‚¿ã‚’直接æ“"
"作ã—ã¦ã‚‚ã€ãƒ¡ãƒ¢ãƒªå†…ã®çŠ¶æ…‹ã«ã¯å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。ã—ã‹ã— Hibernate ã¯ã€ãƒãƒ«ã‚¯ "
"SQL スタイル㮠DML 文実行ã«å¯¾å¿œã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’用æ„ã—ã¦ã„ã¾ã™ã€‚ã“れ㯠"
"Hibernate クエリ言語 (<xref linkend=\"queryhql\"/> HQL) を通ã—ã¦å®Ÿè¡Œã•ã‚Œã¾"
"ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"The pseudo-syntax for <literal>UPDATE and DELETE( UPDATE | DELETE ) FROM? EntityName (WHERE "
"where_conditions)?</literal>."
msgstr ""
"<literal>UPDATE 㨠DELETE æ–‡ã®ç–‘似構文ã¯ï¼š "
"<literal>( UPDATE | DELETE ) FROM? エンティティå (WHERE æ¡ä»¶ç¯€)? "
"ã§ã™ã€‚注æ„ã™ã¹ã点ãŒã„ãã¤ã‹ã‚ã‚Šã¾ã™ï¼š"
#. Tag: para
#, no-c-format
msgid "Some points to note:"
msgstr ""
#. Tag: para
#, no-c-format
msgid "In the from-clause, the FROM keyword is optional"
msgstr "from 節ã«ãŠã„ã¦ã€ FROM ã‚ーワードã¯ã‚ªãƒ—ションã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"There can only be a single entity named in the from-clause. It can, however, "
"be aliased. If the entity name is aliased, then any property references must "
"be qualified using that alias. If the entity name is not aliased, then it is "
"illegal for any property references to be qualified."
msgstr ""
"from 節ã§ã¯å˜ä¸€ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£åã ã‘ãŒå¯èƒ½ã§ã€ä»»æ„ã§åˆ¥åを付ã‘ã‚‹ã“ã¨ãŒã§ãã¾"
"ã™ã€‚エンティティåã«åˆ¥åãŒä¸Žãˆã‚‰ã‚Œã‚‹ã¨ã€ã©ã®ã‚ˆã†ãªãƒ—ãƒãƒ‘ティå‚照もã€ãã®åˆ¥å"
"を使ã£ã¦ä¿®é£¾ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。もã—エンティティåã«åˆ¥åãŒä¸Žãˆã‚‰ã‚Œãªã‘ã‚Œ"
"ã°ã€ã©ã®ã‚ˆã†ãªãƒ—ãƒãƒ‘ティå‚照も修飾ã—ã¦ã¯ãªã‚Šã¾ã›ã‚“。"
#. Tag: para
#, fuzzy, no-c-format
msgid ""
"No <link linkend=\"queryhql-joins-forms\">joins, either implicit or "
"explicit, can be specified in a bulk HQL query. Sub-queries can be used in "
"the where-clause, where the subqueries themselves may contain joins."
msgstr ""
"(暗黙的ã§ã‚れ明示的ã§ã‚れ) <xref linkend=\"queryhql-joins-forms\"/> çµåˆã‚’"
"ãƒãƒ«ã‚¯ HQL クエリ内ã§æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。サブクエリ㯠where 節ã§ä½¿ã†ã“"
"ã¨ãŒã§ãã¾ã™ã€‚サブクエリãã®ã‚‚ã®ã¯ã€çµåˆã‚’å«ã‚られã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid "The where-clause is also optional."
msgstr "where 節ã¯ã‚ªãƒ—ションã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"As an example, to execute an HQL <literal>UPDATE, use the "
"<literal>Query.executeUpdate() method. The method is named for "
"those familiar with JDBC's <literal>PreparedStatement.executeUpdate() を実行ã™ã‚‹ã«ã¯ã€ Query."
"executeUpdate()</literal> メソッドを使ã£ã¦ãã ã•ã„。(ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãŠãªã˜ã¿"
"ã® JDBC <literal>PreparedStatement.executeUpdate() ã‹ã‚‰å付ã‘られã¾"
"ã—ãŸï¼‰ï¼š"
#. Tag: para
#, fuzzy, no-c-format
msgid ""
"In keeping with the EJB3 specification, HQL <literal>UPDATE "
"statements, by default, do not effect the <link linkend=\"mapping-"
"declaration-version\">version</link> or the property values for the affected "
"entities. However, you can force Hibernate to reset the <literal>versiontimestamp property values through the use of "
"a <literal>versioned update. This is achieved by adding the "
"<literal>VERSIONED keyword after the UPDATE "
"keyword."
msgstr ""
"HQL ã® <literal>UPDATE æ–‡ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã€ä½œç”¨ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£"
"ã® <xref linkend=\"mapping-declaration-version\"/> ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚„ " タイムスタンプã®ãƒ—ãƒãƒ‘ティã®å€¤ã«"="" "ã¯å½±éŸ¿ã—ã¾ã›ã‚“。ã“ã‚Œã¯="" ejb3="" ã®ä»•æ§˜ã«ã‚‚å—ã‘継ãŒã‚Œã¦ã„ã¾ã™ã€‚ã—ã‹ã—="" "<literal>versioned="" update<="" literal=""> を使ã£ã¦ã€ version ã‚„ "
"<literal>timestamp プãƒãƒ‘ティã®å€¤ã‚’強制的ã«ãƒªã‚»ãƒƒãƒˆã•ã›ã‚‹ã“ã¨ãŒã§ã"
"ã¾ã™ã€‚ã“れ㯠<literal>UPDATE ã‚ーワードã®å¾Œã« VERSIONEDupdate versionedupdate versioned æ–‡ã¨ä¸€ç·’ã«ä½¿ãˆãªã„ã“ã¨ã«æ³¨æ„"
"ã—ã¦ãã ã•ã„。"
#. Tag: para
#, no-c-format
msgid ""
"To execute an HQL <literal>DELETE, use the same Query."
"executeUpdate()</literal> method:"
msgstr ""
"HQL ã® <literal>DELETE を実行ã™ã‚‹ã«ã¯ã€åŒã˜ Query."
"executeUpdate()</literal> メソッドを使ã£ã¦ãã ã•ã„:"
#. Tag: para
#, no-c-format
msgid ""
"The <literal>int value returned by the Query.executeUpdate"
"()</literal> method indicates the number of entities effected by the "
"operation. This may or may not correlate to the number of rows effected in "
"the database. An HQL bulk operation might result in multiple actual SQL "
"statements being executed (for joined-subclass, for example). The returned "
"number indicates the number of actual entities affected by the statement. "
"Going back to the example of joined-subclass, a delete against one of the "
"subclasses may actually result in deletes against not just the table to "
"which that subclass is mapped, but also the \"root\" table and potentially "
"joined-subclass tables further down the inheritance hierarchy."
msgstr ""
"<literal>Query.executeUpdate() メソッドãŒè¿”ã™ int statements is: "
"<literal>INSERT INTO EntityName properties_list select_statement . "
"Some points to note:"
msgstr ""
"<literal>INSERT æ–‡ã®ç–‘似構文ã¯ï¼š INSERT INTO エンティティ"
"åプãƒãƒ‘ティリスト select æ–‡</literal> ã§ã™ã€‚注æ„ã™ã¹ã点ãŒã„ãã¤ã‹ã‚ã‚Šã¾ã™ï¼š"
#. Tag: para
#, no-c-format
msgid ""
"Only the INSERT INTO ... SELECT ... form is supported; not the INSERT "
"INTO ... VALUES ... form."
msgstr ""
"INSERT INTO ... SELECT ... ã®å½¢å¼ã ã‘ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ INSERT "
"INTO ... VALUES ... ã®å½¢å¼ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"The properties_list is analogous to the <literal>column specificationINSERT statement. For entities "
"involved in mapped inheritance, only properties directly defined on that "
"given class-level can be used in the properties_list. Superclass properties "
"are not allowed and subclass properties do not make sense. In other words, "
"<literal>INSERT statements are inherently non-polymorphic."
msgstr ""
"プãƒãƒ‘ティリストã¯ã€ SQL ã® <literal>INSERT æ–‡ã«ãŠã‘ã‚‹ ã‚«"
"ラムã®ä»•æ§˜</literal> ã«é¡žä¼¼ã—ã¦ã„ã¾ã™ã€‚継承ã®ãƒžãƒƒãƒ”ングã«å«ã¾ã‚Œã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£"
"ã«å¯¾ã—ã¦ã€ã‚¯ãƒ©ã‚¹ãƒ¬ãƒ™ãƒ«ã§ç›´æŽ¥å®šç¾©ã•ã‚ŒãŸãƒ—ãƒãƒ‘ティã ã‘ãŒã€ãƒ—ãƒãƒ‘ティリストã«ä½¿"
"ãˆã¾ã™ã€‚スーパークラスã®ãƒ—ãƒãƒ‘ティã¯èªã‚られãšã€ã‚µãƒ–クラスã®ãƒ—ãƒãƒ‘ティã¯åŠ¹æžœ"
"ãŒã‚ã‚Šã¾ã›ã‚“。言ã„æ›ãˆã‚‹ã¨ <literal>INSERT æ–‡ã¯ã€æœ¬è³ªçš„ã«ãƒãƒªãƒ¢ãƒ¼"
"フィックã§ã¯ã‚ã‚Šã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"select_statement can be any valid HQL select query, with the caveat that the "
"return types must match the types expected by the insert. Currently, this is "
"checked during query compilation rather than allowing the check to relegate "
"to the database. This might, however, cause problems between Hibernate "
"<literal>Types which are equivalent as "
"opposed to <emphasis>equal. This might cause issues with "
"mismatches between a property defined as a <literal>org.hibernate.type."
"DateType</literal> and a property defined as a org.hibernate.type."
"TimestampType</literal>, even though the database might not make a "
"distinction or might be able to handle the conversion."
msgstr ""
"select æ–‡ã®è¿”り値ã®åž‹ãŒ insert æ–‡ãŒæœŸå¾…ã™ã‚‹åž‹ã¨ãƒžãƒƒãƒã—ã¦ã„ã‚Œã°ã€ãã® select "
"æ–‡ã¯å¦¥å½“㪠HQL select クエリã¨ãªã‚Šãˆã¾ã™ã€‚ç¾åœ¨ã“ã®ãƒã‚§ãƒƒã‚¯ã‚’データベースã¸ä»»"
"ã›ã‚‹ã®ã§ã¯ãªãã€ã‚¯ã‚¨ãƒªã®ã‚³ãƒ³ãƒ‘イル時ã«ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ã“ã®ã“ã¨ã¯ã€ "
"<emphasis>equal ã¨ã¯é•ã„〠Hibernate ã® Type é–“"
"ã® <emphasis>equivalent ã«é–¢ã™ã‚‹å•é¡Œã‚’引ãèµ·ã“ã™ã“ã¨ã«æ³¨æ„ã—ã¦ãã "
"ã•ã„。ã“れ㯠<literal>org.hibernate.type.DateType ã¨ã—ã¦å®šç¾©ã•ã‚ŒãŸ"
"プãƒãƒ‘ティã¨ã€ <literal>org.hibernate.type.TimestampType ã¨ã—ã¦å®šç¾©"
"ã•ã‚ŒãŸãƒ—ãƒãƒ‘ティã®é–“ã®ãƒŸã‚¹ãƒžãƒƒãƒã®å•é¡Œã‚’引ãèµ·ã“ã—ã¾ã™ã€‚データベースãŒãれら"
"を区別ã§ããªãã¦ã‚‚ã€å¤‰æ›ã™ã‚‹ã“ã¨ãŒã§ãã¦ã‚‚ã€ã“ã®å•é¡Œã¯ç™ºç”Ÿã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"For the id property, the insert statement gives you two options. You can "
"either explicitly specify the id property in the properties_list, in which "
"case its value is taken from the corresponding select expression, or omit it "
"from the properties_list, in which case a generated value is used. This "
"latter option is only available when using id generators that operate in the "
"database; attempting to use this option with any \"in memory\" type "
"generators will cause an exception during parsing. For the purposes of this "
"discussion, in-database generators are considered to be <literal>org."
"hibernate.id.SequenceGenerator</literal> (and its subclasses) and any "
"implementers of <literal>org.hibernate.id.PostInsertIdentifierGeneratororg.hibernate.id."
"TableHiLoGenerator</literal>, which cannot be used because it does not "
"expose a selectable way to get its values."
msgstr ""
"id プãƒãƒ‘ティã«å¯¾ã—ã¦ã€ insert æ–‡ã«ã¯äºŒã¤ã®é¸æŠžè‚¢ãŒã‚ã‚Šã¾ã™ã€‚プãƒãƒ‘ティリスト"
"ã§æ˜Žç¤ºçš„ã« id プãƒãƒ‘ティを指定ã™ã‚‹ã‹ (ã“ã®å ´åˆã€å¯¾å¿œã™ã‚‹ select å¼ã‹ã‚‰å€¤ãŒå–"
"られã¾ã™ï¼‰ã€ãƒ—ãƒãƒ‘ティリストã‹ã‚‰ãれを除外ã™ã‚‹ã‹ã®ã„ãšã‚Œã‹ã§ã™ (ã“ã®å ´åˆã€ç”Ÿ"
"æˆã•ã‚Œã‚‹å€¤ãŒä½¿ã‚ã‚Œã¾ã™)。 後者ã®é¸æŠžè‚¢ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã‚’æ“作ã™ã‚‹ id ジェãƒ"
"レータを使ã†ã¨ãã®ã¿ã€åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ã“ã®é¸æŠžè‚¢ã‚’æŽ¡ã‚‹å ´åˆã€ã€Œã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã€åž‹ã®"
"ジェãƒãƒ¬ãƒ¼ã‚¿ã‚’使ã†ã¨ã€æ§‹æ–‡è§£æžæ™‚ã«ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ã“ã®è°è«–ã§ã¯ã€ã‚¤ãƒ³ãƒ‡ãƒ¼ã‚¿"
"ベース型ジェãƒãƒ¬ãƒ¼ã‚¿ã¯ <literal>org.hibernate.id.SequenceGenerator "
"(ã¨ãã®ã‚µãƒ–クラス) ã¨ã€ <literal>org.hibernate.id."
"PostInsertIdentifierGenerator</literal> ã®å®Ÿè£…ã§ã‚ã‚‹ã¨è€ƒãˆã¦ã„ã¾ã™ã€‚ã“ã“ã§æœ€"
"も注æ„ã™ã¹ã例外ã¯ã€ <literal>org.hibernate.id.TableHiLoGenerator "
"ã§ã™ã€‚値をå–å¾—ã™ã‚‹é¸æŠžå¯èƒ½ãªæ–¹æ³•ãŒãªã„ãŸã‚ã€ã“ã®ã‚¸ã‚§ãƒãƒ¬ãƒ¼ã‚¿ã‚’使ã†ã“ã¨ã¯ã§ã"
"ã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"For properties mapped as either <literal>version or "
"<literal>timestamp, the insert statement gives you two options. "
"You can either specify the property in the properties_list, in which case "
"its value is taken from the corresponding select expressions, or omit it "
"from the properties_list, in which case the <literal>seed value "
"defined by the <literal>org.hibernate.type.VersionType is used."
msgstr ""
"<literal>version ã‚„ timestamp ã¨ã—ã¦ãƒžãƒƒãƒ”ングã•"
"れるプãƒãƒ‘ティã«å¯¾ã—ã¦ã€ insert æ–‡ã«ã¯äºŒã¤ã®é¸æŠžè‚¢ãŒã‚ã‚Šã¾ã™ã€‚プãƒãƒ‘ティリス"
"トã§æ˜Žç¤ºçš„ã«ãƒ—ãƒãƒ‘ティを指定ã™ã‚‹ã‹ï¼ˆã“ã®å ´åˆã€å¯¾å¿œã™ã‚‹ select å¼ã‹ã‚‰å€¤ãŒå–ら"
"ã‚Œã¾ã™ï¼‰ã€ãƒ—ãƒãƒ‘ティリストã‹ã‚‰é™¤å¤–ã™ã‚‹ã‹ï¼ˆã“ã®å ´åˆã€ <literal>org.hibernate."
"type.VersionType</literal> ã§å®šç¾©ã•ã‚ŒãŸ シード値 ãŒä½¿ã‚ã‚Œ"
"ã¾ã™ï¼‰ã®ã„ãšã‚Œã‹ã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"The following is an example of an HQL <literal>INSERT statement "
"execution:"
msgstr "HQL ã® <literal>INSERT æ–‡ã®å®Ÿè¡Œä¾‹ã§ã™ï¼š"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ "for ( int i=0; i<100000; i++ ) {\n"
#~ " Customer customer = new Customer(.....);\n"
#~ " session.save(customer);\n"
#~ "}\n"
#~ "tx.commit();\n"
#~ "session.close();]]>"
#~ msgstr ""
#~ "Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ "for ( int i=0; i<100000; i++ ) {\n"
#~ " Customer customer = new Customer(.....);\n"
#~ " session.save(customer);\n"
#~ "}\n"
#~ "tx.commit();\n"
#~ "session.close();"
#, fuzzy
#~ msgid "<![CDATA[hibernate.jdbc.batch_size 20]]>"
#~ msgstr "hibernate.jdbc.batch_size 20"
#, fuzzy
#~ msgid "<![CDATA[hibernate.cache.use_second_level_cache false]]>"
#~ msgstr "hibernate.cache.use_second_level_cache false"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ " \n"
#~ "for ( int i=0; i<100000; i++ ) {\n"
#~ " Customer customer = new Customer(.....);\n"
#~ " session.save(customer);\n"
#~ " if ( i % 20 == 0 ) { //20, same as the JDBC batch size\n"
#~ " //flush a batch of inserts and release memory:\n"
#~ " session.flush();\n"
#~ " session.clear();\n"
#~ " }\n"
#~ "}\n"
#~ " \n"
#~ "tx.commit();\n"
#~ "session.close();]]>"
#~ msgstr ""
#~ "Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ " \n"
#~ "for ( int i=0; i<100000; i++ ) {\n"
#~ " Customer customer = new Customer(.....);\n"
#~ " session.save(customer);\n"
#~ " if ( i % 20 == 0 ) { //20, same as the JDBC batch size\n"
#~ " //flush a batch of inserts and release memory:\n"
#~ " session.flush();\n"
#~ " session.clear();\n"
#~ " }\n"
#~ "}\n"
#~ " \n"
#~ "tx.commit();\n"
#~ "session.close();"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ " \n"
#~ "ScrollableResults customers = session.getNamedQuery(\"GetCustomers\")\n"
#~ " .setCacheMode(CacheMode.IGNORE)\n"
#~ " .scroll(ScrollMode.FORWARD_ONLY);\n"
#~ "int count=0;\n"
#~ "while ( customers.next() ) {\n"
#~ " Customer customer = (Customer) customers.get(0);\n"
#~ " customer.updateStuff(...);\n"
#~ " if ( ++count % 20 == 0 ) {\n"
#~ " //flush a batch of updates and release memory:\n"
#~ " session.flush();\n"
#~ " session.clear();\n"
#~ " }\n"
#~ "}\n"
#~ " \n"
#~ "tx.commit();\n"
#~ "session.close();]]>"
#~ msgstr ""
#~ "Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ " \n"
#~ "ScrollableResults customers = session.getNamedQuery(\"GetCustomers\")\n"
#~ " .setCacheMode(CacheMode.IGNORE)\n"
#~ " .scroll(ScrollMode.FORWARD_ONLY);\n"
#~ "int count=0;\n"
#~ "while ( customers.next() ) {\n"
#~ " Customer customer = (Customer) customers.get(0);\n"
#~ " customer.updateStuff(...);\n"
#~ " if ( ++count % 20 == 0 ) {\n"
#~ " //flush a batch of updates and release memory:\n"
#~ " session.flush();\n"
#~ " session.clear();\n"
#~ " }\n"
#~ "}\n"
#~ " \n"
#~ "tx.commit();\n"
#~ "session.close();"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[StatelessSession session = sessionFactory.openStatelessSession"
#~ "();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ " \n"
#~ "ScrollableResults customers = session.getNamedQuery(\"GetCustomers\")\n"
#~ " .scroll(ScrollMode.FORWARD_ONLY);\n"
#~ "while ( customers.next() ) {\n"
#~ " Customer customer = (Customer) customers.get(0);\n"
#~ " customer.updateStuff(...);\n"
#~ " session.update(customer);\n"
#~ "}\n"
#~ " \n"
#~ "tx.commit();\n"
#~ "session.close();]]>"
#~ msgstr ""
#~ "StatelessSession session = sessionFactory.openStatelessSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ " \n"
#~ "ScrollableResults customers = session.getNamedQuery(\"GetCustomers\")\n"
#~ " .scroll(ScrollMode.FORWARD_ONLY);\n"
#~ "while ( customers.next() ) {\n"
#~ " Customer customer = (Customer) customers.get(0);\n"
#~ " customer.updateStuff(...);\n"
#~ " session.update(customer);\n"
#~ "}\n"
#~ " \n"
#~ "tx.commit();\n"
#~ "session.close();"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ "\n"
#~ "String hqlUpdate = \"update Customer c set c.name = :newName where c.name "
#~ "= :oldName\";\n"
#~ "// or String hqlUpdate = \"update Customer set name = :newName where name "
#~ "= :oldName\";\n"
#~ "int updatedEntities = s.createQuery( hqlUpdate )\n"
#~ " .setString( \"newName\", newName )\n"
#~ " .setString( \"oldName\", oldName )\n"
#~ " .executeUpdate();\n"
#~ "tx.commit();\n"
#~ "session.close();]]>"
#~ msgstr ""
#~ "Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ "\n"
#~ "String hqlUpdate = \"update Customer c set c.name = :newName where c.name "
#~ "= :oldName\";\n"
#~ "// or String hqlUpdate = \"update Customer set name = :newName where name "
#~ "= :oldName\";\n"
#~ "int updatedEntities = s.createQuery( hqlUpdate )\n"
#~ " .setString( \"newName\", newName )\n"
#~ " .setString( \"oldName\", oldName )\n"
#~ " .executeUpdate();\n"
#~ "tx.commit();\n"
#~ "session.close();"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ "String hqlVersionedUpdate = \"update versioned Customer set name = :"
#~ "newName where name = :oldName\";\n"
#~ "int updatedEntities = s.createQuery( hqlUpdate )\n"
#~ " .setString( \"newName\", newName )\n"
#~ " .setString( \"oldName\", oldName )\n"
#~ " .executeUpdate();\n"
#~ "tx.commit();\n"
#~ "session.close();]]>"
#~ msgstr ""
#~ "Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ "String hqlVersionedUpdate = \"update versioned Customer set name = :"
#~ "newName where name = :oldName\";\n"
#~ "int updatedEntities = s.createQuery( hqlUpdate )\n"
#~ " .setString( \"newName\", newName )\n"
#~ " .setString( \"oldName\", oldName )\n"
#~ " .executeUpdate();\n"
#~ "tx.commit();\n"
#~ "session.close();"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ "\n"
#~ "String hqlDelete = \"delete Customer c where c.name = :oldName\";\n"
#~ "// or String hqlDelete = \"delete Customer where name = :oldName\";\n"
#~ "int deletedEntities = s.createQuery( hqlDelete )\n"
#~ " .setString( \"oldName\", oldName )\n"
#~ " .executeUpdate();\n"
#~ "tx.commit();\n"
#~ "session.close();]]>"
#~ msgstr ""
#~ "Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ "\n"
#~ "String hqlDelete = \"delete Customer c where c.name = :oldName\";\n"
#~ "// or String hqlDelete = \"delete Customer where name = :oldName\";\n"
#~ "int deletedEntities = s.createQuery( hqlDelete )\n"
#~ " .setString( \"oldName\", oldName )\n"
#~ " .executeUpdate();\n"
#~ "tx.commit();\n"
#~ "session.close();"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ "\n"
#~ "String hqlInsert = \"insert into DelinquentAccount (id, name) select c."
#~ "id, c.name from Customer c where ...\";\n"
#~ "int createdEntities = s.createQuery( hqlInsert )\n"
#~ " .executeUpdate();\n"
#~ "tx.commit();\n"
#~ "session.close();]]>"
#~ msgstr ""
#~ "Session session = sessionFactory.openSession();\n"
#~ "Transaction tx = session.beginTransaction();\n"
#~ "\n"
#~ "String hqlInsert = \"insert into DelinquentAccount (id, name) select c."
#~ "id, c.name from Customer \n"
#~ " c where ...\";\n"
#~ "int createdEntities = s.createQuery( hqlInsert )\n"
#~ " .executeUpdate();\n"
#~ "tx.commit();\n"
#~ "session.close();"
Other Hibernate examples (source code examples)
Here is a short list of links related to this Hibernate batch.po source code file: