Skip to content

Commit 958b042

Browse files
Add JavaDoc to org.seasar.doma.jdbc.query package (#1328)
* Add JavaDoc to org.seasar.doma.jdbc.query package * Add JavaDoc comments to more classes in org.seasar.doma.jdbc.query package Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to AutoFunctionQuery, AutoModuleQuery, and AutoProcedureQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to BlobCreateQuery, ClobCreateQuery, and NClobCreateQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SQLXMLCreateQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to CountQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlFileSelectQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlFileScriptQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to InsertRow Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to QueryOperandPair Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix whitespace in QueryOperandPair Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to QueryUtil Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to ReturningPropertyNames Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix whitespace in ReturningPropertyNames Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to DuplicateKeyType Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix whitespace in DuplicateKeyType Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlDeleteQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlInsertQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix whitespace in SqlInsertQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlUpdateQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlModifyQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix whitespace in SqlModifyQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlSelectQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlFileDeleteQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix whitespace in SqlFileDeleteQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlFileInsertQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix whitespace in SqlFileInsertQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlFileUpdateQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix whitespace in SqlFileUpdateQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlFileModifyQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix whitespace in SqlFileModifyQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to ArrayCreateQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add comprehensive JavaDoc to query package-info.java Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix whitespace in ArrayCreateQuery Co-Authored-By: Toshihiro Nakamura <[email protected]> * Fix JavaDoc comments for ReturningProperties * Add JavaDoc comments to SqlFileBatch query classes Co-Authored-By: Toshihiro Nakamura <[email protected]> * Add JavaDoc comments to SqlBatch query classes Co-Authored-By: Toshihiro Nakamura <[email protected]> * Remove wrong `@throws NullPointerException` annotations. * Add JavaDoc comments to query classes * Format JavaDoc comments --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent cd8ff76 commit 958b042

File tree

73 files changed

+4029
-5
lines changed

Some content is hidden

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

73 files changed

+4029
-5
lines changed

doma-core/src/main/java/org/seasar/doma/jdbc/query/AbstractCreateQuery.java

+11
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,30 @@
1717

1818
import org.seasar.doma.jdbc.Sql;
1919

20+
/**
21+
* An abstract base class for queries that create database resources.
22+
*
23+
* <p>This class provides a skeletal implementation of the {@link CreateQuery} interface, reducing
24+
* the effort required to implement resource creation queries.
25+
*
26+
* @param <RESULT> the type of the resource to be created
27+
*/
2028
public abstract class AbstractCreateQuery<RESULT> extends AbstractQuery
2129
implements CreateQuery<RESULT> {
2230

31+
/** {@inheritDoc} */
2332
@Override
2433
public int getQueryTimeout() {
2534
return -1;
2635
}
2736

37+
/** {@inheritDoc} */
2838
@Override
2939
public Sql<?> getSql() {
3040
return null;
3141
}
3242

43+
/** {@inheritDoc} */
3344
@Override
3445
public void complete() {}
3546
}

doma-core/src/main/java/org/seasar/doma/jdbc/query/AbstractQuery.java

+50
Original file line numberDiff line numberDiff line change
@@ -21,79 +21,129 @@
2121
import org.seasar.doma.jdbc.CommentContext;
2222
import org.seasar.doma.jdbc.Config;
2323

24+
/**
25+
* The base abstract class for all query implementations.
26+
*
27+
* <p>This class provides common functionality for all query types.
28+
*/
2429
public abstract class AbstractQuery implements Query {
2530

31+
/** The class name of the caller. */
2632
protected String callerClassName;
2733

34+
/** The method name of the caller. */
2835
protected String callerMethodName;
2936

37+
/** The configuration. */
3038
protected Config config;
3139

40+
/** The method that defines the query. */
3241
protected Method method;
3342

43+
/** The query timeout in seconds. */
3444
protected int queryTimeout;
3545

46+
/** The message to be included in SQL comments. */
3647
protected String message;
3748

49+
/** The context for SQL comments. */
3850
private CommentContext commentContext;
3951

52+
/** Creates a new instance. */
4053
protected AbstractQuery() {}
4154

55+
/** {@inheritDoc} */
4256
@Override
4357
public String getClassName() {
4458
return callerClassName;
4559
}
4660

61+
/**
62+
* Sets the class name of the caller.
63+
*
64+
* @param callerClassName the class name
65+
*/
4766
public void setCallerClassName(String callerClassName) {
4867
this.callerClassName = callerClassName;
4968
}
5069

70+
/** {@inheritDoc} */
5171
@Override
5272
public String getMethodName() {
5373
return callerMethodName;
5474
}
5575

76+
/**
77+
* Sets the method name of the caller.
78+
*
79+
* @param callerMethodName the method name
80+
*/
5681
public void setCallerMethodName(String callerMethodName) {
5782
this.callerMethodName = callerMethodName;
5883
}
5984

85+
/** {@inheritDoc} */
6086
@Override
6187
public Config getConfig() {
6288
return config;
6389
}
6490

91+
/**
92+
* Sets the configuration.
93+
*
94+
* @param config the configuration
95+
*/
6596
public void setConfig(Config config) {
6697
this.config = config;
6798
}
6899

100+
/** {@inheritDoc} */
69101
@Override
70102
public Method getMethod() {
71103
return method;
72104
}
73105

106+
/**
107+
* Sets the method that defines the query.
108+
*
109+
* @param method the method
110+
*/
74111
public void setMethod(Method method) {
75112
this.method = method;
76113
}
77114

115+
/** {@inheritDoc} */
78116
@Override
79117
public int getQueryTimeout() {
80118
return queryTimeout;
81119
}
82120

121+
/**
122+
* Sets the query timeout in seconds.
123+
*
124+
* @param queryTimeout the query timeout
125+
*/
83126
public void setQueryTimeout(int queryTimeout) {
84127
this.queryTimeout = queryTimeout;
85128
}
86129

130+
/**
131+
* Sets the message to be included in SQL comments.
132+
*
133+
* @param message the message
134+
*/
87135
public void setMessage(String message) {
88136
this.message = message;
89137
}
90138

139+
/** {@inheritDoc} */
91140
@Override
92141
public void prepare() {
93142
assertNotNull(callerClassName, callerMethodName, config);
94143
commentContext = new CommentContext(callerClassName, callerMethodName, config, method, message);
95144
}
96145

146+
/** {@inheritDoc} */
97147
@Override
98148
public String comment(String sql) {
99149
assertNotNull(sql, config, commentContext);

0 commit comments

Comments
 (0)