Skip to content

Commit 3eed6db

Browse files
committed
replace with English javadoc
1 parent 56f1ec9 commit 3eed6db

File tree

9 files changed

+152
-110
lines changed

9 files changed

+152
-110
lines changed

src/main/java/org/codelibs/core/security/MessageDigestUtil.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@
2525
import org.codelibs.core.exception.NoSuchAlgorithmRuntimeException;
2626

2727
/**
28-
* {@link MessageDigest}を扱うユーティリティです。
28+
* Utility for handling {@link MessageDigest}.
2929
*
3030
* @author higa
3131
* @author shinsuke
3232
*/
3333
public abstract class MessageDigestUtil {
3434

3535
/**
36-
* {@link MessageDigest#getInstance(String)}の例外処理をラップします。
36+
* Wraps the exception handling of {@link MessageDigest#getInstance(String)}.
3737
*
3838
* @param algorithm
39-
* アルゴリズム (利用可能なアルゴリズムは{@link MessageDigest}のJavadoc等を参照してください)。
40-
* {@literal null}や空文字列であってはいけません
39+
* The algorithm (refer to the Javadoc of {@link MessageDigest} for available algorithms).
40+
* Must not be {@literal null} or an empty string.
4141
* @return {@link MessageDigest}
4242
* @throws RuntimeException
43-
* {@link NoSuchAlgorithmException}が発生した場合
43+
* If a {@link NoSuchAlgorithmException} occurs
4444
*/
4545
public static MessageDigest getInstance(final String algorithm) {
4646
assertArgumentNotEmpty("algorithm", algorithm);
@@ -53,13 +53,13 @@ public static MessageDigest getInstance(final String algorithm) {
5353
}
5454

5555
/**
56-
* 指定されたアルゴリズムでテキストをハッシュ化して文字列にします。
56+
* Hashes the specified text using the given algorithm and converts it to a string.
5757
*
5858
* @param algorithm
59-
* アルゴリズム。{@literal null}や空文字列であってはいけません
59+
* The algorithm. Must not be {@literal null} or an empty string.
6060
* @param text
61-
* ハッシュ化する文字列
62-
* @return ハッシュ化された文字列
61+
* The string to be hashed.
62+
* @return The hashed string.
6363
*/
6464
public static String digest(final String algorithm, final String text) {
6565
assertArgumentNotEmpty("algorithm", algorithm);

src/main/java/org/codelibs/core/sql/DriverManagerUtil.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@
2727
import org.codelibs.core.lang.ClassUtil;
2828

2929
/**
30-
* {@link java.sql.DriverManager}のためのユーティリティクラスです。
30+
* Utility class for {@link java.sql.DriverManager}.
3131
*
3232
* @author koichik
3333
*/
3434
public abstract class DriverManagerUtil {
3535

3636
/**
37-
* JDBCドライバを登録します。
37+
* Registers a JDBC driver.
3838
*
3939
* @param driverClassName
40-
* 登録するJDBCドライバのクラス名。{@literal null}や空文字列であってはいけません
40+
* The class name of the JDBC driver to register. Must not be {@literal null} or an empty string.
4141
*/
4242
public static void registerDriver(final String driverClassName) {
4343
assertArgumentNotEmpty("driverClassName", driverClassName);
@@ -47,21 +47,21 @@ public static void registerDriver(final String driverClassName) {
4747
}
4848

4949
/**
50-
* JDBCドライバを登録します。
50+
* Registers a JDBC driver.
5151
*
5252
* @param driverClass
53-
* 登録するJDBCドライバのクラス。{@literal null}であってはいけません
53+
* The class of the JDBC driver to register. Must not be {@literal null}.
5454
*/
5555
public static void registerDriver(final Class<Driver> driverClass) {
5656
assertArgumentNotNull("driverClass", driverClass);
5757
registerDriver(ClassUtil.newInstance(driverClass));
5858
}
5959

6060
/**
61-
* JDBCドライバを登録します。
61+
* Registers a JDBC driver.
6262
*
6363
* @param driver
64-
* 登録するJDBCドライバ。{@literal null}であってはいけません
64+
* The JDBC driver to register. Must not be {@literal null}.
6565
*/
6666
public static void registerDriver(final Driver driver) {
6767
assertArgumentNotNull("driver", driver);
@@ -74,10 +74,10 @@ public static void registerDriver(final Driver driver) {
7474
}
7575

7676
/**
77-
* JDBCドライバを登録解除します。
77+
* Deregisters a JDBC driver.
7878
*
7979
* @param driver
80-
* 登録解除するJDBCドライバ。{@literal null}であってはいけません
80+
* The JDBC driver to deregister. Must not be {@literal null}.
8181
*/
8282
public static void deregisterDriver(final Driver driver) {
8383
assertArgumentNotNull("driver", driver);
@@ -90,7 +90,7 @@ public static void deregisterDriver(final Driver driver) {
9090
}
9191

9292
/**
93-
* 現在のクラスローダに結びつけられている全てのJDBCドライバを登録解除します。
93+
* Deregisters all JDBC drivers associated with the current class loader.
9494
*/
9595
public static synchronized void deregisterAllDrivers() {
9696
for (final Enumeration<Driver> e = DriverManager.getDrivers(); e.hasMoreElements();) {

src/main/java/org/codelibs/core/sql/PreparedStatementUtil.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@
2424
import org.codelibs.core.exception.SQLRuntimeException;
2525

2626
/**
27-
* {@link PreparedStatement}用のユーティリティクラスです。
27+
* Utility class for {@link PreparedStatement}.
2828
*
2929
* @author higa
3030
*/
3131
public abstract class PreparedStatementUtil {
3232

3333
/**
34-
* クエリを実行します。
34+
* Executes the query.
3535
*
3636
* @param ps
37-
* {@link PreparedStatement}{@literal null}であってはいけません
37+
* {@link PreparedStatement}. Must not be {@literal null}.
3838
* @return {@link ResultSet}
3939
* @throws SQLRuntimeException
40-
* {@link SQLException}が発生した場合
40+
* If a {@link SQLException} occurs.
4141
*/
4242
public static ResultSet executeQuery(final PreparedStatement ps) throws SQLRuntimeException {
4343
assertArgumentNotNull("ps", ps);
@@ -50,13 +50,13 @@ public static ResultSet executeQuery(final PreparedStatement ps) throws SQLRunti
5050
}
5151

5252
/**
53-
* 更新を実行します。
53+
* Executes the update.
5454
*
5555
* @param ps
56-
* {@link PreparedStatement}{@literal null}であってはいけません
57-
* @return 更新した結果の行数
56+
* {@link PreparedStatement}. Must not be {@literal null}.
57+
* @return The number of rows affected by the update.
5858
* @throws SQLRuntimeException
59-
* {@link SQLException}が発生した場合
59+
* If a {@link SQLException} occurs.
6060
*/
6161
public static int executeUpdate(final PreparedStatement ps) throws SQLRuntimeException {
6262
assertArgumentNotNull("ps", ps);
@@ -69,13 +69,13 @@ public static int executeUpdate(final PreparedStatement ps) throws SQLRuntimeExc
6969
}
7070

7171
/**
72-
* 実行します。
72+
* Executes the statement.
7373
*
7474
* @param ps
75-
* {@link PreparedStatement}{@literal null}であってはいけません
76-
* @return 結果セットを返すかどうか
75+
* {@link PreparedStatement}. Must not be {@literal null}.
76+
* @return Whether the result is a {@link ResultSet}.
7777
* @throws SQLRuntimeException
78-
* {@link SQLException}が発生した場合
78+
* If a {@link SQLException} occurs.
7979
* @see PreparedStatement#execute()
8080
*/
8181
public static boolean execute(final PreparedStatement ps) throws SQLRuntimeException {
@@ -89,13 +89,13 @@ public static boolean execute(final PreparedStatement ps) throws SQLRuntimeExcep
8989
}
9090

9191
/**
92-
* バッチ更新を行ないます。
92+
* Executes a batch update.
9393
*
9494
* @param ps
95-
* {@link PreparedStatement}{@literal null}であってはいけません
96-
* @return 更新した結果の行数の配列
95+
* {@link PreparedStatement}. Must not be {@literal null}.
96+
* @return An array of the number of rows affected by each command in the batch.
9797
* @throws SQLRuntimeException
98-
* {@link SQLException}が発生した場合
98+
* If a {@link SQLException} occurs.
9999
*/
100100
public static int[] executeBatch(final PreparedStatement ps) throws SQLRuntimeException {
101101
assertArgumentNotNull("ps", ps);
@@ -108,12 +108,12 @@ public static int[] executeBatch(final PreparedStatement ps) throws SQLRuntimeEx
108108
}
109109

110110
/**
111-
* バッチを追加します。
111+
* Adds a batch.
112112
*
113113
* @param ps
114-
* {@link PreparedStatement}{@literal null}であってはいけません
114+
* {@link PreparedStatement}. Must not be {@literal null}.
115115
* @throws SQLRuntimeException
116-
* {@link SQLException}が発生した場合
116+
* If a {@link SQLException} occurs.
117117
*/
118118
public static void addBatch(final PreparedStatement ps) throws SQLRuntimeException {
119119
assertArgumentNotNull("ps", ps);

src/main/java/org/codelibs/core/sql/ResultSetUtil.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.codelibs.core.log.Logger;
2626

2727
/**
28-
* {@link ResultSet}のためのユーティリティクラスです。
28+
* Utility class for {@link ResultSet}.
2929
*
3030
* @author higa
3131
*/
@@ -34,13 +34,13 @@ public abstract class ResultSetUtil {
3434
private static final Logger logger = Logger.getLogger(ResultSetUtil.class);
3535

3636
/**
37-
* 結果セットを閉じます。
37+
* Closes the result set.
3838
* <p>
39-
* {@link ResultSet#close()}が例外をスローした場合はログにエラーメッセージを出力します。 例外は再スローされません。
39+
* If {@link ResultSet#close()} throws an exception, an error message is logged. The exception is not rethrown.
4040
* </p>
4141
*
4242
* @param resultSet
43-
* 結果セット
43+
* The result set
4444
*/
4545
public static void close(final ResultSet resultSet) {
4646
if (resultSet == null) {
@@ -54,11 +54,11 @@ public static void close(final ResultSet resultSet) {
5454
}
5555

5656
/**
57-
* 結果セットを次に進めます。
57+
* Moves the result set to the next position.
5858
*
5959
* @param resultSet
60-
* 結果セット。{@literal null}であってはいけません
61-
* @return 次に進めたかどうか
60+
* The result set. Must not be {@literal null}.
61+
* @return Whether the result set successfully moved to the next position.
6262
*/
6363
public static boolean next(final ResultSet resultSet) {
6464
assertArgumentNotNull("resultSet", resultSet);
@@ -71,15 +71,15 @@ public static boolean next(final ResultSet resultSet) {
7171
}
7272

7373
/**
74-
* カーソルを指定した位置まで進めます。
74+
* Moves the cursor to the specified position.
7575
*
7676
* @param resultSet
77-
* 結果セット。{@literal null}であってはいけません
77+
* The result set. Must not be {@literal null}.
7878
* @param index
79-
* 位置
80-
* @return 指定した位置まで進めたかどうか
79+
* The position.
80+
* @return Whether the cursor successfully moved to the specified position.
8181
* @throws SQLRuntimeException
82-
* SQL例外が起こった場合。
82+
* If an SQL exception occurs.
8383
*/
8484
public static boolean absolute(final ResultSet resultSet, final int index) throws SQLRuntimeException {
8585
assertArgumentNotNull("resultSet", resultSet);

src/main/java/org/codelibs/core/sql/StatementUtil.java

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.codelibs.core.log.Logger;
2828

2929
/**
30-
* {@link Statement}用のユーティリティクラスです。
30+
* Utility class for {@link Statement}.
3131
*
3232
* @author higa
3333
*/
@@ -36,13 +36,13 @@ public abstract class StatementUtil {
3636
private static final Logger logger = Logger.getLogger(StatementUtil.class);
3737

3838
/**
39-
* SQLを実行します。
39+
* Executes the SQL.
4040
*
4141
* @param statement
42-
* {@link Statement}{@literal null}であってはいけません
42+
* {@link Statement}. Must not be {@literal null}.
4343
* @param sql
44-
* SQL文字列。{@literal null}や空文字列であってはいけません
45-
* @return 実行した結果
44+
* SQL string. Must not be {@literal null} or empty.
45+
* @return The result of the execution.
4646
* @see Statement#execute(String)
4747
*/
4848
public static boolean execute(final Statement statement, final String sql) {
@@ -57,12 +57,12 @@ public static boolean execute(final Statement statement, final String sql) {
5757
}
5858

5959
/**
60-
* フェッチサイズを設定します。
60+
* Sets the fetch size.
6161
*
6262
* @param statement
63-
* {@link Statement}{@literal null}であってはいけません
63+
* {@link Statement}. Must not be {@literal null}.
6464
* @param fetchSize
65-
* フェッチサイズ
65+
* Fetch size.
6666
* @see Statement#setFetchSize(int)
6767
*/
6868
public static void setFetchSize(final Statement statement, final int fetchSize) {
@@ -76,12 +76,12 @@ public static void setFetchSize(final Statement statement, final int fetchSize)
7676
}
7777

7878
/**
79-
* 最大行数を設定します。
79+
* Sets the maximum number of rows.
8080
*
8181
* @param statement
82-
* {@link Statement}{@literal null}であってはいけません
82+
* {@link Statement}. Must not be {@literal null}.
8383
* @param maxRows
84-
* 最大の行数
84+
* Maximum number of rows.
8585
* @see Statement#setMaxRows(int)
8686
*/
8787
public static void setMaxRows(final Statement statement, final int maxRows) {
@@ -95,12 +95,12 @@ public static void setMaxRows(final Statement statement, final int maxRows) {
9595
}
9696

9797
/**
98-
* クエリタイムアウトを設定します。
98+
* Sets the query timeout.
9999
*
100100
* @param statement
101-
* {@link Statement}{@literal null}であってはいけません
101+
* {@link Statement}. Must not be {@literal null}.
102102
* @param queryTimeout
103-
* クエリタイムアウト
103+
* Query timeout.
104104
* @see Statement#setQueryTimeout(int)
105105
*/
106106
public static void setQueryTimeout(final Statement statement, final int queryTimeout) {
@@ -114,9 +114,9 @@ public static void setQueryTimeout(final Statement statement, final int queryTim
114114
}
115115

116116
/**
117-
* {@link Statement}を閉じます。
117+
* Closes the {@link Statement}.
118118
* <p>
119-
* {@link Statement#close()}が例外をスローした場合はログにエラーメッセージを出力します。 例外は再スローされません。
119+
* If {@link Statement#close()} throws an exception, an error message is logged. The exception is not rethrown.
120120
* </p>
121121
*
122122
* @param statement
@@ -135,11 +135,11 @@ public static void close(final Statement statement) {
135135
}
136136

137137
/**
138-
* 結果セットを返します。
138+
* Returns the result set.
139139
*
140140
* @param statement
141-
* {@link Statement}{@literal null}であってはいけません
142-
* @return 結果セット
141+
* {@link Statement}. Must not be {@literal null}.
142+
* @return The result set.
143143
*/
144144
public static ResultSet getResultSet(final Statement statement) {
145145
assertArgumentNotNull("statement", statement);
@@ -152,11 +152,11 @@ public static ResultSet getResultSet(final Statement statement) {
152152
}
153153

154154
/**
155-
* 更新カウントを返します。
155+
* Returns the update count.
156156
*
157157
* @param statement
158-
* {@link Statement}{@literal null}であってはいけません
159-
* @return 更新カウント
158+
* {@link Statement}. Must not be {@literal null}.
159+
* @return The update count.
160160
*/
161161
public static int getUpdateCount(final Statement statement) {
162162
assertArgumentNotNull("statement", statement);

0 commit comments

Comments
 (0)