Skip to content

Cleanup javadoc issues #3368

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 3 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 7 additions & 9 deletions src/main/java/org/apache/ibatis/annotations/CacheNamespace.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,16 @@
/**
* The annotation that specify to use cache on namespace(e.g. mapper interface).
* <p>
* <b>How to use:</b> <code>
* <pre>
* &#064;CacheNamespace(implementation = CustomCache.class, properties = {
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
* &#064;Property(name = "port", value = "${mybatis.cache.port}"),
* &#064;Property(name = "name", value = "usersCache")
* })
* <b>How to use:</b>
*
* <pre>{@code
* @CacheNamespace(implementation = CustomCache.class, properties = {
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
* &#064;Property(name = "port", value = "${mybatis.cache.port}"), &#064;Property(name = "name", value = "usersCache") })
* public interface UserMapper {
* // ...
* }
* </pre>
* </code>
* }</pre>
*
* @author Clinton Begin
* @author Kazuki Shimizu
Expand Down
16 changes: 7 additions & 9 deletions src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,17 @@
/**
* The annotation that be grouping mapping definitions for constructor.
* <p>
* <b>How to use:</b> <code>
* <pre>
* <b>How to use:</b>
*
* <pre>{@code
* public interface UserMapper {
* &#064;ConstructorArgs({
* &#064;Arg(column = "id", javaType = int.class, id = true),
* &#064;Arg(column = "name", javaType = String.class),
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id")
* })
* @ConstructorArgs({ &#064;Arg(column = "id", javaType = int.class, id = true),
* &#064;Arg(column = "name", javaType = String.class),
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") })
* &#064;Select("SELECT id, name FROM users WHERE id = #{id}")
* User selectById(int id);
* }
* </pre>
* </code>
* }</pre>
*
* @author Clinton Begin
*/
Expand Down
33 changes: 14 additions & 19 deletions src/main/java/org/apache/ibatis/annotations/DeleteProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
/**
* The annotation that specify a method that provide an SQL for deleting record(s).
* <p>
* <b>How to use:</b> <code>
* <pre>
* <b>How to use:</b>
*
* <pre>{@code
* public interface UserMapper {
*
* &#064;DeleteProvider(type = SqlProvider.class, method = "deleteById")
* @DeleteProvider(type = SqlProvider.class, method = "deleteById")
* boolean deleteById(int id);
*
* public static class SqlProvider {
Expand All @@ -39,8 +40,7 @@
* }
*
* }
* </pre>
* </code>
* }</pre>
*
* @author Clinton Begin
*/
Expand Down Expand Up @@ -77,20 +77,15 @@
* <p>
* Since 3.5.1, this attribute can omit.
* <p>
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
* <ul>
* <li>
* If class that specified the {@link #type()} attribute implements the
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
* the MyBatis use a method that returned by it
* </li>
* <li>
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
* (= not implement it or it was returned {@code null}), the MyBatis will search
* and use a fallback method that named {@code provideSql} from specified type
* </li>
* </ul>
* </code>
* If this attribute omit, the MyBatis will call a method that decide by following rules.
* <ul>
* <li>If class that specified the {@link #type()} attribute implements the
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it
* </li>
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
* <code>provideSql</code> from specified type</li>
* </ul>
*
* @return a method name of method for providing an SQL
*/
Expand Down
33 changes: 14 additions & 19 deletions src/main/java/org/apache/ibatis/annotations/InsertProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
/**
* The annotation that specify a method that provide an SQL for inserting record(s).
* <p>
* <b>How to use:</b> <code>
* <pre>
* <b>How to use:</b>
*
* <pre>{@code
* public interface UserMapper {
*
* &#064;InsertProvider(type = SqlProvider.class, method = "insert")
* @InsertProvider(type = SqlProvider.class, method = "insert")
* void insert(User user);
*
* public static class SqlProvider {
Expand All @@ -39,8 +40,7 @@
* }
*
* }
* </pre>
* </code>
* }</pre>
*
* @author Clinton Begin
*/
Expand Down Expand Up @@ -77,20 +77,15 @@
* <p>
* Since 3.5.1, this attribute can omit.
* <p>
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
* <ul>
* <li>
* If class that specified the {@link #type()} attribute implements the
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
* the MyBatis use a method that returned by it
* </li>
* <li>
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
* (= not implement it or it was returned {@code null}), the MyBatis will search
* and use a fallback method that named {@code provideSql} from specified type
* </li>
* </ul>
* </code>
* If this attribute omit, the MyBatis will call a method that decide by following rules.
* <ul>
* <li>If class that specified the {@link #type()} attribute implements the
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it
* </li>
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
* <code>provideSql</code> from specified type</li>
* </ul>
*
* @return a method name of method for providing an SQL
*/
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/org/apache/ibatis/annotations/Options.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2023 the original author or authors.
* Copyright 2009-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -110,7 +110,6 @@ enum FlushCachePolicy {
* Returns property names that holds a key value.
* <p>
* If you specify multiple property, please separate using comma(',').
* </p>
*
* @return property names that separate with comma(',')
*/
Expand All @@ -120,7 +119,6 @@ enum FlushCachePolicy {
* Returns column names that retrieves a key value.
* <p>
* If you specify multiple column, please separate using comma(',').
* </p>
*
* @return column names that separate with comma(',')
*/
Expand All @@ -130,7 +128,6 @@ enum FlushCachePolicy {
* Returns result set names.
* <p>
* If you specify multiple result set, please separate using comma(',').
* </p>
*
* @return result set names that separate with comma(',')
*/
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/apache/ibatis/annotations/Select.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
* The annotation that specify an SQL for retrieving record(s).
* <p>
* <b>How to use:</b>
* <p>
* <ul>
* <li>Simple:
*
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/apache/ibatis/annotations/SelectKey.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2023 the original author or authors.
* Copyright 2009-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -55,7 +55,6 @@
* Returns property names that holds a key value.
* <p>
* If you specify multiple property, please separate using comma(',').
* </p>
*
* @return property names that separate with comma(',')
*/
Expand All @@ -65,7 +64,6 @@
* Returns column names that retrieves a key value.
* <p>
* If you specify multiple column, please separate using comma(',').
* </p>
*
* @return column names that separate with comma(',')
*/
Expand Down
33 changes: 14 additions & 19 deletions src/main/java/org/apache/ibatis/annotations/SelectProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
/**
* The annotation that specify a method that provide an SQL for retrieving record(s).
* <p>
* <b>How to use:</b> <code>
* <pre>
* <b>How to use:</b>
*
* <pre>{@code
* public interface UserMapper {
*
* &#064;SelectProvider(type = SqlProvider.class, method = "selectById")
* @SelectProvider(type = SqlProvider.class, method = "selectById")
* User selectById(int id);
*
* public static class SqlProvider {
Expand All @@ -39,8 +40,7 @@
* }
*
* }
* </pre>
* </code>
* }</pre>
*
* @author Clinton Begin
*/
Expand Down Expand Up @@ -77,20 +77,15 @@
* <p>
* Since 3.5.1, this attribute can omit.
* <p>
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
* <ul>
* <li>
* If class that specified the {@link #type()} attribute implements the
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
* the MyBatis use a method that returned by it.
* </li>
* <li>
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
* (= not implement it or it was returned {@code null}), the MyBatis will search
* and use a fallback method that named {@code provideSql} from specified type.
* </li>
* </ul>
* </code>
* If this attribute omit, the MyBatis will call a method that decide by following rules.
* <ul>
* <li>If class that specified the {@link #type()} attribute implements the
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it.
* </li>
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
* <code>provideSql</code> from specified type.</li>
* </ul>
*
* @return a method name of method for providing an SQL
*/
Expand Down
20 changes: 7 additions & 13 deletions src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,17 @@
/**
* The annotation that be grouping conditional mapping definitions.
* <p>
* <b>How to use:</b> <code>
* <pre>
* <b>How to use:</b>
*
* <pre>{@code
* public interface UserMapper {
* &#064;Select("SELECT id, name, type FROM users ORDER BY id")
* &#064;TypeDiscriminator(
* column = "type",
* javaType = String.class,
* cases = {
* &#064;Case(value = "1", type = PremiumUser.class),
* &#064;Case(value = "2", type = GeneralUser.class),
* &#064;Case(value = "3", type = TemporaryUser.class)
* }
* )
* &#064;TypeDiscriminator(column = "type", javaType = String.class, cases = {
* &#064;Case(value = "1", type = PremiumUser.class), &#064;Case(value = "2", type = GeneralUser.class),
* &#064;Case(value = "3", type = TemporaryUser.class) })
* List&lt;User&gt; selectAll();
* }
* </pre>
* </code>
* }</pre>
*
* @author Clinton Begin
*/
Expand Down
32 changes: 13 additions & 19 deletions src/main/java/org/apache/ibatis/annotations/UpdateProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
/**
* The annotation that specify a method that provide an SQL for updating record(s).
* <p>
* <b>How to use:</b> <code>
* <b>How to use:</b>
*
* <pre>
* <pre>{@code
* public interface UserMapper {
*
* &#064;UpdateProvider(type = SqlProvider.class, method = "update")
* @UpdateProvider(type = SqlProvider.class, method = "update")
* boolean update(User user);
*
* public static class SqlProvider {
Expand All @@ -40,9 +40,7 @@
* }
*
* }
* </pre>
*
* <code>
* }</pre>
*
* @author Clinton Begin
*/
Expand Down Expand Up @@ -78,19 +76,15 @@
* Specify a method for providing an SQL.
* <p>
* Since 3.5.1, this attribute can omit. If this attribute omit, the MyBatis will call a method that decide by
* following rules. <code>
* <ul>
* <li>
* If class that specified the {@link #type()} attribute implements the
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
* the MyBatis use a method that returned by it
* </li>
* <li>
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
* (= not implement it or it was returned {@code null}), the MyBatis will search and use a fallback method
* that named {@code provideSql} from specified type</li>
* </ul>
* </code>
* following rules.
* <ul>
* <li>If class that specified the {@link #type()} attribute implements the
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it
* </li>
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
* <code>provideSql</code> from specified type</li>
* </ul>
*
* @return a method name of method for providing an SQL
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2023 the original author or authors.
* Copyright 2009-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,7 +28,6 @@ public interface InitializingObject {
* Initialize an instance.
* <p>
* This method will be invoked after it has set all properties.
* </p>
*
* @throws Exception
* in the event of misconfiguration (such as failure to set an essential property) or if initialization
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2023 the original author or authors.
* Copyright 2009-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,7 +35,6 @@ private StatementUtil() {
* Apply a transaction timeout.
* <p>
* Update a query timeout to apply a transaction timeout.
* </p>
*
* @param statement
* a target statement
Expand Down
Loading
Loading