Skip to content

Add JavaDoc to org.seasar.doma.jdbc.query package #1328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
14aed3e
Add JavaDoc to org.seasar.doma.jdbc.query package
nakamura-to May 6, 2025
7ddb995
Add JavaDoc comments to more classes in org.seasar.doma.jdbc.query pa…
devin-ai-integration[bot] May 6, 2025
cb7d731
Add JavaDoc comments to AutoFunctionQuery, AutoModuleQuery, and AutoP…
devin-ai-integration[bot] May 6, 2025
841b122
Add JavaDoc comments to BlobCreateQuery, ClobCreateQuery, and NClobCr…
devin-ai-integration[bot] May 6, 2025
4f9fa29
Add JavaDoc comments to SQLXMLCreateQuery
devin-ai-integration[bot] May 6, 2025
0411a54
Add JavaDoc comments to CountQuery
devin-ai-integration[bot] May 6, 2025
9a78b15
Add JavaDoc comments to SqlFileSelectQuery
devin-ai-integration[bot] May 6, 2025
5d12096
Add JavaDoc comments to SqlFileScriptQuery
devin-ai-integration[bot] May 6, 2025
a1f22d3
Add JavaDoc comments to InsertRow
devin-ai-integration[bot] May 6, 2025
9dfa677
Add JavaDoc comments to QueryOperandPair
devin-ai-integration[bot] May 6, 2025
1223267
Fix whitespace in QueryOperandPair
devin-ai-integration[bot] May 6, 2025
1a97ca7
Add JavaDoc comments to QueryUtil
devin-ai-integration[bot] May 6, 2025
d3c0860
Add JavaDoc comments to ReturningPropertyNames
devin-ai-integration[bot] May 6, 2025
c023b66
Fix whitespace in ReturningPropertyNames
devin-ai-integration[bot] May 6, 2025
1815bb2
Add JavaDoc comments to DuplicateKeyType
devin-ai-integration[bot] May 6, 2025
01ce2c0
Fix whitespace in DuplicateKeyType
devin-ai-integration[bot] May 6, 2025
86ce293
Add JavaDoc comments to SqlDeleteQuery
devin-ai-integration[bot] May 6, 2025
d8b85fb
Add JavaDoc comments to SqlInsertQuery
devin-ai-integration[bot] May 6, 2025
eaed4a5
Fix whitespace in SqlInsertQuery
devin-ai-integration[bot] May 6, 2025
7feb8f9
Add JavaDoc comments to SqlUpdateQuery
devin-ai-integration[bot] May 6, 2025
ad1608f
Add JavaDoc comments to SqlModifyQuery
devin-ai-integration[bot] May 6, 2025
38d55b3
Fix whitespace in SqlModifyQuery
devin-ai-integration[bot] May 6, 2025
4e9ca37
Add JavaDoc comments to SqlSelectQuery
devin-ai-integration[bot] May 6, 2025
7a84635
Add JavaDoc comments to SqlFileDeleteQuery
devin-ai-integration[bot] May 6, 2025
ac77bfc
Fix whitespace in SqlFileDeleteQuery
devin-ai-integration[bot] May 6, 2025
dfe10cc
Add JavaDoc comments to SqlFileInsertQuery
devin-ai-integration[bot] May 6, 2025
bf2dc94
Fix whitespace in SqlFileInsertQuery
devin-ai-integration[bot] May 6, 2025
7970a48
Add JavaDoc comments to SqlFileUpdateQuery
devin-ai-integration[bot] May 6, 2025
1e1e6aa
Fix whitespace in SqlFileUpdateQuery
devin-ai-integration[bot] May 6, 2025
4ee2d68
Add JavaDoc comments to SqlFileModifyQuery
devin-ai-integration[bot] May 6, 2025
fb38446
Fix whitespace in SqlFileModifyQuery
devin-ai-integration[bot] May 6, 2025
8952558
Add JavaDoc comments to ArrayCreateQuery
devin-ai-integration[bot] May 6, 2025
3036652
Add comprehensive JavaDoc to query package-info.java
devin-ai-integration[bot] May 6, 2025
3a25fc3
Fix whitespace in ArrayCreateQuery
devin-ai-integration[bot] May 6, 2025
3ce9176
Fix JavaDoc comments for ReturningProperties
nakamura-to May 6, 2025
87e7c02
Add JavaDoc comments to SqlFileBatch query classes
devin-ai-integration[bot] May 6, 2025
d99d92d
Add JavaDoc comments to SqlBatch query classes
devin-ai-integration[bot] May 6, 2025
fffe494
Remove wrong `@throws NullPointerException` annotations.
nakamura-to May 7, 2025
0689d24
Add JavaDoc comments to query classes
nakamura-to May 7, 2025
3e96fd5
Format JavaDoc comments
nakamura-to May 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,30 @@

import org.seasar.doma.jdbc.Sql;

/**
* An abstract base class for queries that create database resources.
*
* <p>This class provides a skeletal implementation of the {@link CreateQuery} interface, reducing
* the effort required to implement resource creation queries.
*
* @param <RESULT> the type of the resource to be created
*/
public abstract class AbstractCreateQuery<RESULT> extends AbstractQuery
implements CreateQuery<RESULT> {

/** {@inheritDoc} */
@Override
public int getQueryTimeout() {
return -1;
}

/** {@inheritDoc} */
@Override
public Sql<?> getSql() {
return null;
}

/** {@inheritDoc} */
@Override
public void complete() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,79 +21,129 @@
import org.seasar.doma.jdbc.CommentContext;
import org.seasar.doma.jdbc.Config;

/**
* The base abstract class for all query implementations.
*
* <p>This class provides common functionality for all query types.
*/
public abstract class AbstractQuery implements Query {

/** The class name of the caller. */
protected String callerClassName;

/** The method name of the caller. */
protected String callerMethodName;

/** The configuration. */
protected Config config;

/** The method that defines the query. */
protected Method method;

/** The query timeout in seconds. */
protected int queryTimeout;

/** The message to be included in SQL comments. */
protected String message;

/** The context for SQL comments. */
private CommentContext commentContext;

/** Creates a new instance. */
protected AbstractQuery() {}

/** {@inheritDoc} */
@Override
public String getClassName() {
return callerClassName;
}

/**
* Sets the class name of the caller.
*
* @param callerClassName the class name
*/
public void setCallerClassName(String callerClassName) {
this.callerClassName = callerClassName;
}

/** {@inheritDoc} */
@Override
public String getMethodName() {
return callerMethodName;
}

/**
* Sets the method name of the caller.
*
* @param callerMethodName the method name
*/
public void setCallerMethodName(String callerMethodName) {
this.callerMethodName = callerMethodName;
}

/** {@inheritDoc} */
@Override
public Config getConfig() {
return config;
}

/**
* Sets the configuration.
*
* @param config the configuration
*/
public void setConfig(Config config) {
this.config = config;
}

/** {@inheritDoc} */
@Override
public Method getMethod() {
return method;
}

/**
* Sets the method that defines the query.
*
* @param method the method
*/
public void setMethod(Method method) {
this.method = method;
}

/** {@inheritDoc} */
@Override
public int getQueryTimeout() {
return queryTimeout;
}

/**
* Sets the query timeout in seconds.
*
* @param queryTimeout the query timeout
*/
public void setQueryTimeout(int queryTimeout) {
this.queryTimeout = queryTimeout;
}

/**
* Sets the message to be included in SQL comments.
*
* @param message the message
*/
public void setMessage(String message) {
this.message = message;
}

/** {@inheritDoc} */
@Override
public void prepare() {
assertNotNull(callerClassName, callerMethodName, config);
commentContext = new CommentContext(callerClassName, callerMethodName, config, method, message);
}

/** {@inheritDoc} */
@Override
public String comment(String sql) {
assertNotNull(sql, config, commentContext);
Expand Down
Loading
Loading