Skip to content

Commit 940b0ce

Browse files
committed
Translate Javadoc comments from Japanese to English
1 parent 8c68317 commit 940b0ce

File tree

361 files changed

+3345
-6800
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

361 files changed

+3345
-6800
lines changed

src/main/java/org/seasar/doma/AccessLevel.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
package org.seasar.doma;
22

3-
/**
4-
* Javaのアクセスレベルを表します。
5-
*
6-
* @author nakamura-to
7-
* @since 2.0.0
8-
*/
3+
/** Defines access levels in The Java Language. */
94
public enum AccessLevel {
105

116
/** {@code public} */
@@ -14,20 +9,16 @@ public enum AccessLevel {
149
/** {@code protected} */
1510
PROTECTED("protected"),
1611

17-
/** パッケージプライベート */
12+
/** package private */
1813
PACKAGE("");
1914

2015
private final String modifier;
2116

22-
private AccessLevel(String modifier) {
17+
AccessLevel(String modifier) {
2318
this.modifier = modifier;
2419
}
2520

26-
/**
27-
* 修飾子を返します。
28-
*
29-
* @return 修飾子
30-
*/
21+
/** @return the modifier's name */
3122
public String getModifier() {
3223
return modifier;
3324
}

src/main/java/org/seasar/doma/AnnotateWith.java

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,56 @@
44
import java.lang.annotation.Retention;
55
import java.lang.annotation.RetentionPolicy;
66
import java.lang.annotation.Target;
7+
import org.seasar.doma.jdbc.Config;
78

89
/**
9-
* Daoインタフェースの実装クラスのソースコードにアノテーションを注釈することを示します。
10+
* Indicates that a generated code that implements the annotated interface is annotated with some
11+
* annotations.
1012
*
11-
* <p>このアノテーションには2種類の使い方があります
13+
* <p>This annotation is mainly intended to inject a {@link Config} instance to a DAO
14+
* implementation's constructor. Don't use {@link Dao#config()} with this annotation.
15+
*
16+
* <p>There are 2 ways to use this annotation:
1217
*
1318
* <ul>
14-
* <li>Daoインタフェースに直接的に注釈する方法。
15-
* <li>Daoインタフェースに間接的に注釈する方法。この方法では、任意のアノテーションに{@code AnnotateWith}
16-
* を注釈し、そのアノテーションをDaoインタフェースに注釈する。
19+
* <li>annotate directly
20+
* <li>annotate indirectly
1721
* </ul>
1822
*
19-
* <p>このアノテーションを直接的であれ間接的であれDaoインタフェースに注釈する場合、{@link Dao#config()} に値を設定してはいけません。
23+
* <p>annotate directly:
24+
*
25+
* <pre>
26+
* &#64;Dao
27+
* &#64;AnnotateWith(annotations = {
28+
* &#64;Annotation(target = AnnotationTarget.CONSTRUCTOR, type = javax.inject.Inject.class),
29+
* &#64;Annotation(target = AnnotationTarget.CONSTRUCTOR_PARAMETER, type = javax.inject.Named.class, elements = "\"config\"") })
30+
* public interface EmployeeDao {
31+
* ...
32+
* }
33+
* </pre>
34+
*
35+
* annotate indirectly:
36+
*
37+
* <pre>
38+
* &#64;AnnotateWith(annotations = {
39+
* &#64;Annotation(target = AnnotationTarget.CONSTRUCTOR, type = javax.inject.Inject.class),
40+
* &#64;Annotation(target = AnnotationTarget.CONSTRUCTOR_PARAMETER, type = javax.inject.Named.class, elements = "\"config\"") })
41+
* public @interface InjectConfig {
42+
* }
43+
* </pre>
2044
*
21-
* @author taedium
45+
* <pre>
46+
* &#64;Dao
47+
* &#64;InjectConfig
48+
* public interface EmployeeDao {
49+
* ...
50+
* }
51+
* </pre>
2252
*/
2353
@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
2454
@Retention(RetentionPolicy.RUNTIME)
2555
public @interface AnnotateWith {
2656

27-
/**
28-
* アノテーションの配列を返します。
29-
*
30-
* @return アノテーションの配列
31-
*/
57+
/** @return the {@link Annotation} array. */
3258
Annotation[] annotations();
3359
}

src/main/java/org/seasar/doma/Annotation.java

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,28 @@
44
import java.lang.annotation.RetentionPolicy;
55

66
/**
7-
* アノテーションを示します。
8-
*
9-
* @author taedium
10-
* @see AnnotateWith
7+
* Used in conjunction with the {@link AnnotateWith} annotation to indicate which kind of annotation
8+
* is specified for generated code.
119
*/
1210
@Retention(RetentionPolicy.RUNTIME)
1311
public @interface Annotation {
1412

15-
/**
16-
* 注釈する対象を返します。
17-
*
18-
* @return 注釈する対象
19-
*/
13+
/** @return the location where the annotation is specified. */
2014
AnnotationTarget target();
2115

22-
/**
23-
* アノテーションの型を返します。
24-
*
25-
* @return アノテーションの型
26-
*/
16+
/** @return the annotation class that this annotation represents. */
2717
Class<? extends java.lang.annotation.Annotation> type();
2818

2919
/**
30-
* アノテーションの要素を返します。
20+
* The annotation elements as a set of key-value pair.
21+
*
22+
* <p>Represented in CSV format:
3123
*
32-
* <p>「要素名 = 値」 形式で文字列を記述します。 複数存在する場合はカンマで区切ります。
24+
* <pre>
25+
* elementName1=value1, elementName2=value2
26+
* </pre>
3327
*
34-
* @return アノテーションの要素
28+
* @return the annotation elements
3529
*/
3630
String elements() default "";
3731
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
package org.seasar.doma;
22

33
/**
4-
* アノテーションを注釈する対象です。
4+
* Defines the locations where annotations may appear.
55
*
6-
* @author taedium
76
* @see Annotation
87
*/
98
public enum AnnotationTarget {
109

11-
/** クラス */
10+
/** Class */
1211
CLASS,
1312

14-
/** コンストラクタ */
13+
/** Constructor */
1514
CONSTRUCTOR,
1615

17-
/** コンストラクターのパラメータ */
16+
/** Constructor's parameter */
1817
CONSTRUCTOR_PARAMETER,
1918
}

src/main/java/org/seasar/doma/ArrayFactory.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
import org.seasar.doma.jdbc.JdbcException;
1010

1111
/**
12-
* {@link Array} のインスタンスを生成することを示します。
12+
* Indicates to create an {@link Array} instance.
1313
*
14-
* <p>このアノテーションが注釈されるメソッドは、 Daoインタフェースのメンバでなければいけません。
15-
*
16-
* <h3>例:</h3>
14+
* <p>The annotated method must be a member of a {@link Dao} annotated interface.
1715
*
1816
* <pre>
1917
* &#064;Dao(config = AppConfig.class)
@@ -24,14 +22,13 @@
2422
* }
2523
* </pre>
2624
*
27-
* 注釈されるメソッドは、次の例外をスローすることがあります。
25+
* The method may throw following exceptions:
2826
*
2927
* <ul>
30-
* <li>{@link DomaNullPointerException} パラメータに {@code null}を渡した場合
31-
* <li>{@link JdbcException} JDBCに関する例外が発生した場合
28+
* <li>{@link DomaNullPointerException} if any of the method parameters are {@code null}
29+
* <li>{@link JdbcException} if a JDBC related error occurs
3230
* </ul>
3331
*
34-
* @author taedium
3532
* @see Connection#createArrayOf(String, Object[])
3633
*/
3734
@Target(ElementType.METHOD)
@@ -40,11 +37,12 @@
4037
public @interface ArrayFactory {
4138

4239
/**
43-
* 配列の要素がマッピングされる型のSQL名を返します。。
40+
* The SQL name of the type the elements of the array map to.
4441
*
45-
* <p>この値は、 {@link Connection#createArrayOf(String, Object[])} の最初のパラメータに渡されます。
42+
* <p>The value is passed as the first argument to {@link Connection#createArrayOf(String,
43+
* Object[])}.
4644
*
47-
* @return 配列の要素がマッピングされる型のSQL名
45+
* @return the type name
4846
*/
4947
String typeName();
5048
}

src/main/java/org/seasar/doma/BatchDelete.java

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313
import org.seasar.doma.jdbc.SqlLogType;
1414

1515
/**
16-
* バッチ削除処理を示します。
16+
* Indicates a batch delete.
1717
*
18-
* <p>このアノテーションが注釈されるメソッドは、 Daoインタフェースのメンバでなければいけません。
19-
*
20-
* <h3>例:</h3>
18+
* <p>The annotated method must be a member of a {@link Dao} annotated interface.
2119
*
2220
* <pre>
2321
* &#064;Entity
@@ -33,77 +31,66 @@
3331
* }
3432
* </pre>
3533
*
36-
* 注釈されるメソッドは、次の例外をスローすることがあります。
34+
* The method may throw following exceptions:
3735
*
3836
* <ul>
39-
* <li>{@link DomaNullPointerException} パラメータに {@code null} を渡した場合
40-
* <li>{@link OptimisticLockException} 楽観的排他制御が有効なで更新件数が0件の場合
41-
* <li>{@link SqlFileNotFoundException} {@code sqlFile} 要素の値が {@code true} で、SQLファイルが見つからなかった場合
42-
* <li>{@link JdbcException} 上記以外でJDBCに関する例外が発生した場合
37+
* <li>{@link DomaNullPointerException} if any of the method parameters are {@code null}
38+
* <li>{@link OptimisticLockException} if optimistic locking is enabled and an update count is 0
39+
* for each entity
40+
* <li>{@link SqlFileNotFoundException} if {@code sqlFile} is {@code true} and the SQL file is not
41+
* found
42+
* <li>{@link JdbcException} if a JDBC related error occurs
4343
* </ul>
44-
*
45-
* @author taedium
4644
*/
4745
@Target(ElementType.METHOD)
4846
@Retention(RetentionPolicy.RUNTIME)
4947
@DaoMethod
5048
public @interface BatchDelete {
5149

52-
/**
53-
* SQLファイルにマッピングするかどうかを返します。
54-
*
55-
* @return SQLファイルにマッピングするかどうか
56-
*/
50+
/** @return whether the annotated method is mapped to an SQL file. */
5751
boolean sqlFile() default false;
5852

5953
/**
60-
* クエリタイムアウト(秒)を返します。
54+
* The query timeout in seconds.
6155
*
62-
* <p>指定しない場合、{@link Config#getQueryTimeout()}が使用されます。
56+
* <p>If not specified, {@link Config#getQueryTimeout()} is used.
6357
*
64-
* @return クエリタイムアウト
58+
* @return the query timeout
6559
* @see Statement#setQueryTimeout(int)
6660
*/
6761
int queryTimeout() default -1;
6862

6963
/**
70-
* バッチサイズを返します。
64+
* The batch size.
7165
*
72-
* <p>指定しない場合、{@link Config#getBatchSize()}が使用されます。
66+
* <p>If not specified, {@link Config#getBatchSize()} is used.
7367
*
74-
* <p>{@link PreparedStatement#executeBatch()} を実行する際のバッチサイズです。 バッチ対象の数がバッチサイズを上回る場合、バッチサイズの数だけ
75-
* {@link PreparedStatement#addBatch()} を呼び出し、 {@link PreparedStatement#executeBatch()}
76-
* を実行するということを繰り返します。
68+
* <p>This value is used when {@link PreparedStatement#executeBatch()} is executed.
7769
*
78-
* @return バッチサイズ
70+
* @return the batch size
7971
* @see PreparedStatement#addBatch()
80-
* @since 1.21.0
8172
*/
8273
int batchSize() default -1;
8374

8475
/**
85-
* 楽観的排他制御用のバージョン番号を無視するかどうかを返します。
76+
* Whether the version property is ignored.
8677
*
87-
* <p>{@code true} の場合、削除条件にバージョン番号を含めません。
78+
* <p>If {@code true}, the column that mapped to the version property is excluded from SQL DELETE
79+
* statements.
8880
*
89-
* @return 楽観的排他制御用のバージョン番号を無視するかどうか
81+
* @return whether the version property is ignored
9082
*/
9183
boolean ignoreVersion() default false;
9284

9385
/**
94-
* 削除結果が1件でない場合にスローされる {@link OptimisticLockException} を抑制するかどうかを返します。
86+
* Whether {@link OptimisticLockException} is suppressed.
9587
*
96-
* <p>この要素に対する指定は、{@link #sqlFile()} {@code false} の場合にのみ有効です。
88+
* <p>Only if {@link #sqlFile()} is {@code false}, this element value is used.
9789
*
98-
* @return {@link OptimisticLockException}を抑制するかどうか
90+
* @return whether {@link OptimisticLockException} is suppressed
9991
*/
10092
boolean suppressOptimisticLockException() default false;
10193

102-
/**
103-
* SQLのログの出力形式を返します。
104-
*
105-
* @return SQLログの出力形式
106-
* @since 2.0.0
107-
*/
94+
/** @return the output format of SQL logs. */
10895
SqlLogType sqlLog() default SqlLogType.FORMATTED;
10996
}

0 commit comments

Comments
 (0)