Skip to content

Commit 7a58062

Browse files
committed
Japanese translation of the recent doc updates.
1 parent 0443b44 commit 7a58062

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

src/site/ja/xdoc/dynamic-sql.xml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ AND title like ‘someTitle’]]></source>
165165
<p>XML 設定ファイルと XML Mapper ファイルについての説明はここまでになります。次の章では、Java API について詳しく見ていきます。</p>
166166
</subsection>
167167
<subsection name="bind">
168-
<p>The <code>bind</code> element lets you create a variable out of an OGNL expression and bind it to the context. For example:</p>
168+
<p><code>bind</code> 要素を使うと、OGNL 式の結果を変数に格納し、その変数を SQL 文中で使用することができます。</p>
169169
<source><![CDATA[
170170
<select id="selectBlogsLike" parameterType="Blog" resultType="Blog">
171171
<bind name="pattern" value="'%' + _parameter.getTitle() + '%'" />
172172
SELECT * FROM BLOG
173-
WHERE title LIKE #{pattern}
173+
WHERE title LIKE #{pattern}
174174
</select>]]></source>
175175
</subsection>
176176
<subsection name="複数データベースのサポート">
@@ -190,29 +190,26 @@ AND title like ‘someTitle’]]></source>
190190
</subsection>
191191
<subsection name="ダイナミック SQL 記述言語">
192192
<p>バージョン 3.2 以降、ダイナミック SQL の記述言語が Pluggable になりました。言語ドライバーを記述することで、任意の言語でダイナミック SQL を記述することができます。</p>
193-
<p>機能の詳細については今後記述を追加する予定です。</p>
194-
<p>There are two built-in languages:</p>
193+
<p>標準では次の2つの言語が用意されています。</p>
195194
<ul>
196195
<li>xml</li>
197196
<li>raw</li>
198197
</ul>
199-
<p>The <code>xml</code> language is the default one. It is able to execute all the dynamic tags we saw in the previous sections.</p>
200-
<p>The <code>raw</code> language is in fact the absence of language. When using this setting MyBatis just performs the
201-
parameter substitution and passes the statement to the database driver. As you may guess, the <code>raw</code> language
202-
is faster than the <code>xml</code> language.
198+
<p><code>xml</code> はデフォルトの SQL 記述言語で、これまでのセクションで説明した全ての機能を利用することができます。</p>
199+
<p><code>raw</code> というのは、実際には言語を使用しない場合に指定します。この場合、MyBatis がステートメントをデータベースドライバーに渡す前に行うのは引数の置換処理のみです。当然、 <code>xml</code> よりも <code>raw</code> を指定した場合の方が処理は高速です。
203200
</p>
204-
<p>You can specify the language you want to use in an statement adding the <code>lang</code> attribute as follows:
201+
<p>言語の指定は、ステートメント要素に <code>lang</code> 属性を追加することで行います。
205202
</p>
206203
<source><![CDATA[<select id="selectBlog" lang="raw">
207204
SELECT * FROM BLOG
208205
</select>]]></source>
209-
<p>Or, in the case you are using mappers, using the <code>@Lang</code> annotation:</p>
206+
<p>Mapper インターフェイスを使っている場合は <code>@Lang</code> アノテーションを使います。</p>
210207
<source><![CDATA[public interface Mapper {
211208
@Lang(RawLanguageDriver.class)
212209
@Select("SELECT * FROM BLOG")
213210
List<Blog> selectBlog();
214211
}]]></source>
215-
<p>You can also implement your own language driver by implementing the following interface:</p>
212+
<p>LanguageDriver インターフェイスを実装することで、カスタムの言語ドライバーを作成することもできます。</p>
216213
<source><![CDATA[public interface LanguageDriver {
217214
public ParameterHandler createParameterHandler(MappedStatement mappedStatement, Object parameterObject, BoundSql boundSql);
218215
public SqlSource createSqlSource(Configuration configuration, XNode script, Class<?> parameterType);

src/site/ja/xdoc/java-api.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,15 @@ void rollback(boolean force)</source>
246246
<p>最も重要なのは、オープンした session は必ずクローズする必要があるということです。そのためには次のようなパターンでコードを書くのが最も確実です。</p>
247247
<source>SqlSession session = sqlSessionFactory.openSession();
248248
try {
249-
// following 3 lines pseudocod for "doing some work"
249+
// following 3 lines pseudocode for "doing some work"
250250
session.insert(...);
251251
session.update(...);
252252
session.delete(...);
253253
session.commit();
254254
} finally {
255255
session.close();
256256
}</source>
257-
<p>Or, If you are using jdk 1.7+ and MyBatis 3.2+, you can use the try-with-resources statement:</p>
257+
<p>MyBatis 3.2 からは Java 1.7 で導入された try-with-resources 構文を使ってクローズ処理を省略することもできます。</p>
258258
<source>
259259
try (SqlSession session = sqlSessionFactory.openSession()) {
260260
// following 3 lines pseudocode for "doing some work"

0 commit comments

Comments
 (0)