Skip to content

Commit e191976

Browse files
committed
Translate faq.rst
1 parent fe76254 commit e191976

File tree

2 files changed

+81
-86
lines changed

2 files changed

+81
-86
lines changed

docs/build.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ Build with IntelliJ IDEA
5959

6060
See :ref:`idea-annotation-processor`.
6161

62+
.. _build-with-gradle:
63+
6264
Build with Gradle
6365
=================
6466

docs/faq.rst

Lines changed: 79 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,135 +1,128 @@
1-
==================
2-
FAQ
3-
==================
1+
==========================
2+
Frequently Asked Questions
3+
==========================
44

5-
.. contents:: 目次
5+
.. contents::
66
:depth: 3
77

8-
一般的な質問
9-
============
8+
General Questions
9+
=================
1010

11-
Domaとはどのような意味ですか?
11+
What does Doma stand for?
12+
-------------------------
13+
14+
Doma stands for the **D** ao **O** riented database **MA** pping framework.
15+
16+
What is annotation processing?
1217
------------------------------
1318

14-
**D** AO **O** riented Database **MA** pping Framework の略です。
19+
Annotation processing, that is introduced in Java 6,
20+
allows us to validate and generate source codes at compile time.
1521

16-
注釈処理とはなんですか?
17-
------------------------
22+
We use annotation processing to do followings:
1823

19-
Java 6 で導入された Pluggable Annotation Processing API を利用した処理で、
20-
コンパイル時のソースコード検証や、ソースコード生成が可能です。
24+
- Generating meta classes from the classes annotated with ``@Entity`` and ``@Domain``
25+
- Generating implementation classes of the interfaces annotated with ``@Dao``
26+
- Validating SQL statements
2127

22-
Domaでは、注釈処理を使用して以下のことを実現しています。
28+
Runtime environment
29+
===================
2330

24-
* エンティティクラスやドメインクラスのメタ情報の生成
25-
* Daoのインタフェースから実装クラスの生成
26-
* SQLファイルのバリデーション
31+
Which version of JRE does Doma support?
32+
---------------------------------------
2733

28-
動作環境に関する質問
29-
====================
34+
JRE 8、9、10 and 11.
3035

31-
どのバージョンのJREをサポートしていますか?
32-
-------------------------------------------
36+
What libraries are required to work Doma?
37+
--------------------------------------
3338

34-
JRE 8、9、10、11 をサポートしています。
39+
Nothing.
3540

36-
Domaを動作させるのに必要なライブラリは何ですか?
37-
------------------------------------------------
41+
Doma has no dependencies to other libraries.
3842

39-
何もありません。
40-
DomaはJRE以外のどんなライブラリにも依存していません。
43+
Development environment
44+
=======================
4145

42-
開発環境に関する質問
43-
====================
46+
Which version of JDK does Doma support?
47+
---------------------------------------
4448

45-
どのバージョンのJDKをサポートしていますか?
46-
-------------------------------------------
49+
JDK 8、9、10 and 11.
4750

48-
JDK 8、9、10、11 をサポートしています。
51+
Which IDE do you recommend?
52+
---------------------------
4953

50-
推奨されたIDE(統合開発環境)はありますか?
51-
-------------------------------------------
54+
We recommend Eclipse and IntelliJ IDEA.
5255

53-
Eclipse と IntelliJ IDEA です。
56+
In Eclipse, the jar file of Doma is added to the Java Build Path but annotation processing doesn't run.
57+
-------------------------------------------------------------------------------------------------------
5458

55-
DomaのjarをEclipseのビルドパスに設定しましたが注釈処理が実行されません。
56-
------------------------------------------------------------------------
59+
Enable annotation processing and add the jar file to the Factory Path too.
60+
See also :ref:`eclipse-build`.
5761

58-
Factory PathにもDomaのjarファイルを登録してください。
62+
Where are generated source files in annotation processing?
63+
----------------------------------------------------------
5964

60-
Factory Pathの設定画面は、プロジェクトのプロパティ設定画面から、
61-
Java - Compiler - Annotation Processing - Factory Path と辿れます。
62-
Annotation ProcessingとFactory Pathの画面では、
63-
「Enable project specific settings」のチェックボックスをチェックしてください。
65+
In Eclipse, they are found in the .apt_generated directory.
6466

65-
注釈処理で生成されたコードはどこに出力されますか?
67+
In Eclipse, where is the .apt_generated directory?
6668
--------------------------------------------------
6769

68-
Eclipseを利用している場合、
69-
デフォルトではプロジェクト直下の ``.apt_generated`` ディレクトリに出力されます。
70+
You can find it in the Nivigator view.
7071

71-
Eclipseを使用していますが、.apt_generated ディレクトリがみつかりません。
72-
----------------------------------------------------------------------------------------
72+
I get the message that the sql file is not found, but it exists.
73+
----------------------------------------------------------------
7374

74-
単にPackage Explorerビュー上に ``.apt_generated``
75-
ディレクトリが表示されていないだけかもしれません。
76-
``.apt_generated`` は、名称が ``.`` で始まっているために、
77-
Package Explorerビューで表示対象外になります。
78-
対応方法としては以下のいずれかを選択してください。
75+
You may get the following message, though the file exists:
7976

80-
* Nivigatorビューから ``.apt_generated`` ディレクトリを確認する
81-
* Package Explorerビューのフィルタリングの設定を変更し ``.apt_generated`` ディレクトリを表示させる
82-
* 出力先ディレクトリを変更し名称が ``.`` で始まらないようにする
77+
.. code-block:: sh
8378
84-
SQLファイルが見つかりません。
85-
-----------------------------
79+
[DOMA4019] The file[META-INF/../select.sql] is not found from the classpath
8680
87-
SQLファイルが存在するにも関わらず、次のエラーメッセージが出力されることがあります。
88-
::
81+
When you use Eclipse, check that the location of the output folder of resources is
82+
same as the one of class files in the Java Build Path dialog.
8983

90-
[DOMA4019] SQLファイル[META-INF/../select.sql]がクラスパスから見つかりませんでした
84+
When you use Gradle, check that the resource files are copied to ``compileJava.destinationDir``
85+
in advance of the compileJava task. See also :ref:`build-with-gradle`.
9186

92-
SQLファイルはクラスの出力ディレクトリから検索されます。
93-
SQLファイルの出力ディレクトリとクラスの出力ディレクトリが同じであることを確認してください。
9487

95-
Eclipseの場合、プロジェクトのプロパティの「Java Build Path」の設定画面で、
96-
ソースフォルダごとに出力先ディレクトリを変更可能になっています。
88+
Features as the database access library
89+
=======================================
9790

98-
DBアクセスライブラリとしての機能に関する質問
99-
============================================
91+
Does Doma generate SQL statements?
92+
----------------------------------
10093

101-
SQLを自動生成する機能はありますか?
102-
-----------------------------------
94+
Yes, Doma generates following statements:
10395

104-
はい。
96+
- INSERT
97+
- DELETE
98+
- UPDATE
99+
- stored procedure call
100+
- stored function call
105101

106-
更新系SQL、ストアドプロシージャー/ファンクション呼び出しについてはSQLを自動で生成できます。
107-
検索系のSQLについては、自動生成機能はありませんが、ファイルに外部化したSQLを実行し、
108-
その結果をJavaのオブジェクトにマッピングする機能があります。
102+
Doma doesn't generate SELECT statements
103+
but executes arbitrary SELECT statements and maps the results to the Java objects.
109104

110-
詳しくは :doc:`query/index` を参照してください。
105+
See also :doc:`query/index` for detail information.
111106

112-
条件が動的に変わるSQLはどのように実行できますか?
113-
-------------------------------------------------
107+
How dynamic SQL statements are executed?
108+
----------------------------------------
114109

115-
SQLファイルに、SQLコメントを使って条件を指定できます。
116-
SQLコメントは実行時に解析され、条件によって異なるSQLが生成されます。
110+
The dynamic SQL statements are built by directives that are represented as the SQL comments.
117111

118-
詳しくは :doc:`sql` を参照してください。
112+
See also :doc:`sql` for detail information.
119113

120-
1対1 や 1対n などデータベース上のリレーションシップをJavaオブジェクトにマッピングできますか?
121-
---------------------------------------------------------------------------------------------
114+
Does Doma map database relationships such as one-to-one and one-to-many to Java objects?
115+
----------------------------------------------------------------------------------------
122116

123-
いいえ、できません。
117+
No.
124118

125-
Domaでは、SQLの結果セットの1行をそのまま1つのエンティティのインスタンスにマッピングします。
126-
このほうがシンプルでわかりやすいと考えているためです。
119+
Doma only maps each row of the SQL result set to a Java entity instance.
127120

128-
コネクションプーリングの機能はありますか?
129-
------------------------------------------
121+
Does Doma provide a JDBC connection pooling feature?
122+
----------------------------------------------------
130123

131-
いいえ、Domaでは提供していません。
124+
No.
132125

133-
コネクションプーリング機能をもつアプリケーションサーバー、フレームワーク、
134-
ライブラリ等と組み合わせて使用してください。
126+
Use Doma together with
127+
the JDBC connection pool library such as `HikariCP <https://github.com/brettwooldridge/HikariCP>`_.
135128

0 commit comments

Comments
 (0)