Skip to content

Commit 96a0b8f

Browse files
authored
Merge pull request #3368 from hazendaz/pom-cleanup
Cleanup javadoc issues
2 parents 78098db + 08c197e commit 96a0b8f

18 files changed

+88
-141
lines changed

src/main/java/org/apache/ibatis/annotations/CacheNamespace.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,16 @@
2828
/**
2929
* The annotation that specify to use cache on namespace(e.g. mapper interface).
3030
* <p>
31-
* <b>How to use:</b> <code>
32-
* <pre>
33-
* &#064;CacheNamespace(implementation = CustomCache.class, properties = {
34-
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
35-
* &#064;Property(name = "port", value = "${mybatis.cache.port}"),
36-
* &#064;Property(name = "name", value = "usersCache")
37-
* })
31+
* <b>How to use:</b>
32+
*
33+
* <pre>{@code
34+
* @CacheNamespace(implementation = CustomCache.class, properties = {
35+
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
36+
* &#064;Property(name = "port", value = "${mybatis.cache.port}"), &#064;Property(name = "name", value = "usersCache") })
3837
* public interface UserMapper {
3938
* // ...
4039
* }
41-
* </pre>
42-
* </code>
40+
* }</pre>
4341
*
4442
* @author Clinton Begin
4543
* @author Kazuki Shimizu

src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,17 @@
2424
/**
2525
* The annotation that be grouping mapping definitions for constructor.
2626
* <p>
27-
* <b>How to use:</b> <code>
28-
* <pre>
27+
* <b>How to use:</b>
28+
*
29+
* <pre>{@code
2930
* public interface UserMapper {
30-
* &#064;ConstructorArgs({
31-
* &#064;Arg(column = "id", javaType = int.class, id = true),
32-
* &#064;Arg(column = "name", javaType = String.class),
33-
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id")
34-
* })
31+
* @ConstructorArgs({ &#064;Arg(column = "id", javaType = int.class, id = true),
32+
* &#064;Arg(column = "name", javaType = String.class),
33+
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") })
3534
* &#064;Select("SELECT id, name FROM users WHERE id = #{id}")
3635
* User selectById(int id);
3736
* }
38-
* </pre>
39-
* </code>
37+
* }</pre>
4038
*
4139
* @author Clinton Begin
4240
*/

src/main/java/org/apache/ibatis/annotations/DeleteProvider.java

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for deleting record(s).
2727
* <p>
28-
* <b>How to use:</b> <code>
29-
* <pre>
28+
* <b>How to use:</b>
29+
*
30+
* <pre>{@code
3031
* public interface UserMapper {
3132
*
32-
* &#064;DeleteProvider(type = SqlProvider.class, method = "deleteById")
33+
* @DeleteProvider(type = SqlProvider.class, method = "deleteById")
3334
* boolean deleteById(int id);
3435
*
3536
* public static class SqlProvider {
@@ -39,8 +40,7 @@
3940
* }
4041
*
4142
* }
42-
* </pre>
43-
* </code>
43+
* }</pre>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -77,20 +77,15 @@
7777
* <p>
7878
* Since 3.5.1, this attribute can omit.
7979
* <p>
80-
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
81-
* <ul>
82-
* <li>
83-
* If class that specified the {@link #type()} attribute implements the
84-
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
85-
* the MyBatis use a method that returned by it
86-
* </li>
87-
* <li>
88-
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
89-
* (= not implement it or it was returned {@code null}), the MyBatis will search
90-
* and use a fallback method that named {@code provideSql} from specified type
91-
* </li>
92-
* </ul>
93-
* </code>
80+
* If this attribute omit, the MyBatis will call a method that decide by following rules.
81+
* <ul>
82+
* <li>If class that specified the {@link #type()} attribute implements the
83+
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it
84+
* </li>
85+
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
86+
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
87+
* <code>provideSql</code> from specified type</li>
88+
* </ul>
9489
*
9590
* @return a method name of method for providing an SQL
9691
*/

src/main/java/org/apache/ibatis/annotations/InsertProvider.java

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for inserting record(s).
2727
* <p>
28-
* <b>How to use:</b> <code>
29-
* <pre>
28+
* <b>How to use:</b>
29+
*
30+
* <pre>{@code
3031
* public interface UserMapper {
3132
*
32-
* &#064;InsertProvider(type = SqlProvider.class, method = "insert")
33+
* @InsertProvider(type = SqlProvider.class, method = "insert")
3334
* void insert(User user);
3435
*
3536
* public static class SqlProvider {
@@ -39,8 +40,7 @@
3940
* }
4041
*
4142
* }
42-
* </pre>
43-
* </code>
43+
* }</pre>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -77,20 +77,15 @@
7777
* <p>
7878
* Since 3.5.1, this attribute can omit.
7979
* <p>
80-
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
81-
* <ul>
82-
* <li>
83-
* If class that specified the {@link #type()} attribute implements the
84-
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
85-
* the MyBatis use a method that returned by it
86-
* </li>
87-
* <li>
88-
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
89-
* (= not implement it or it was returned {@code null}), the MyBatis will search
90-
* and use a fallback method that named {@code provideSql} from specified type
91-
* </li>
92-
* </ul>
93-
* </code>
80+
* If this attribute omit, the MyBatis will call a method that decide by following rules.
81+
* <ul>
82+
* <li>If class that specified the {@link #type()} attribute implements the
83+
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it
84+
* </li>
85+
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
86+
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
87+
* <code>provideSql</code> from specified type</li>
88+
* </ul>
9489
*
9590
* @return a method name of method for providing an SQL
9691
*/

src/main/java/org/apache/ibatis/annotations/Options.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -110,7 +110,6 @@ enum FlushCachePolicy {
110110
* Returns property names that holds a key value.
111111
* <p>
112112
* If you specify multiple property, please separate using comma(',').
113-
* </p>
114113
*
115114
* @return property names that separate with comma(',')
116115
*/
@@ -120,7 +119,6 @@ enum FlushCachePolicy {
120119
* Returns column names that retrieves a key value.
121120
* <p>
122121
* If you specify multiple column, please separate using comma(',').
123-
* </p>
124122
*
125123
* @return column names that separate with comma(',')
126124
*/
@@ -130,7 +128,6 @@ enum FlushCachePolicy {
130128
* Returns result set names.
131129
* <p>
132130
* If you specify multiple result set, please separate using comma(',').
133-
* </p>
134131
*
135132
* @return result set names that separate with comma(',')
136133
*/

src/main/java/org/apache/ibatis/annotations/Select.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
* The annotation that specify an SQL for retrieving record(s).
2727
* <p>
2828
* <b>How to use:</b>
29-
* <p>
3029
* <ul>
3130
* <li>Simple:
3231
*

src/main/java/org/apache/ibatis/annotations/SelectKey.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -55,7 +55,6 @@
5555
* Returns property names that holds a key value.
5656
* <p>
5757
* If you specify multiple property, please separate using comma(',').
58-
* </p>
5958
*
6059
* @return property names that separate with comma(',')
6160
*/
@@ -65,7 +64,6 @@
6564
* Returns column names that retrieves a key value.
6665
* <p>
6766
* If you specify multiple column, please separate using comma(',').
68-
* </p>
6967
*
7068
* @return column names that separate with comma(',')
7169
*/

src/main/java/org/apache/ibatis/annotations/SelectProvider.java

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for retrieving record(s).
2727
* <p>
28-
* <b>How to use:</b> <code>
29-
* <pre>
28+
* <b>How to use:</b>
29+
*
30+
* <pre>{@code
3031
* public interface UserMapper {
3132
*
32-
* &#064;SelectProvider(type = SqlProvider.class, method = "selectById")
33+
* @SelectProvider(type = SqlProvider.class, method = "selectById")
3334
* User selectById(int id);
3435
*
3536
* public static class SqlProvider {
@@ -39,8 +40,7 @@
3940
* }
4041
*
4142
* }
42-
* </pre>
43-
* </code>
43+
* }</pre>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -77,20 +77,15 @@
7777
* <p>
7878
* Since 3.5.1, this attribute can omit.
7979
* <p>
80-
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
81-
* <ul>
82-
* <li>
83-
* If class that specified the {@link #type()} attribute implements the
84-
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
85-
* the MyBatis use a method that returned by it.
86-
* </li>
87-
* <li>
88-
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
89-
* (= not implement it or it was returned {@code null}), the MyBatis will search
90-
* and use a fallback method that named {@code provideSql} from specified type.
91-
* </li>
92-
* </ul>
93-
* </code>
80+
* If this attribute omit, the MyBatis will call a method that decide by following rules.
81+
* <ul>
82+
* <li>If class that specified the {@link #type()} attribute implements the
83+
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it.
84+
* </li>
85+
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
86+
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
87+
* <code>provideSql</code> from specified type.</li>
88+
* </ul>
9489
*
9590
* @return a method name of method for providing an SQL
9691
*/

src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,17 @@
2828
/**
2929
* The annotation that be grouping conditional mapping definitions.
3030
* <p>
31-
* <b>How to use:</b> <code>
32-
* <pre>
31+
* <b>How to use:</b>
32+
*
33+
* <pre>{@code
3334
* public interface UserMapper {
3435
* &#064;Select("SELECT id, name, type FROM users ORDER BY id")
35-
* &#064;TypeDiscriminator(
36-
* column = "type",
37-
* javaType = String.class,
38-
* cases = {
39-
* &#064;Case(value = "1", type = PremiumUser.class),
40-
* &#064;Case(value = "2", type = GeneralUser.class),
41-
* &#064;Case(value = "3", type = TemporaryUser.class)
42-
* }
43-
* )
36+
* &#064;TypeDiscriminator(column = "type", javaType = String.class, cases = {
37+
* &#064;Case(value = "1", type = PremiumUser.class), &#064;Case(value = "2", type = GeneralUser.class),
38+
* &#064;Case(value = "3", type = TemporaryUser.class) })
4439
* List&lt;User&gt; selectAll();
4540
* }
46-
* </pre>
47-
* </code>
41+
* }</pre>
4842
*
4943
* @author Clinton Begin
5044
*/

src/main/java/org/apache/ibatis/annotations/UpdateProvider.java

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for updating record(s).
2727
* <p>
28-
* <b>How to use:</b> <code>
28+
* <b>How to use:</b>
2929
*
30-
* <pre>
30+
* <pre>{@code
3131
* public interface UserMapper {
3232
*
33-
* &#064;UpdateProvider(type = SqlProvider.class, method = "update")
33+
* @UpdateProvider(type = SqlProvider.class, method = "update")
3434
* boolean update(User user);
3535
*
3636
* public static class SqlProvider {
@@ -40,9 +40,7 @@
4040
* }
4141
*
4242
* }
43-
* </pre>
44-
*
45-
* <code>
43+
* }</pre>
4644
*
4745
* @author Clinton Begin
4846
*/
@@ -78,19 +76,15 @@
7876
* Specify a method for providing an SQL.
7977
* <p>
8078
* Since 3.5.1, this attribute can omit. If this attribute omit, the MyBatis will call a method that decide by
81-
* following rules. <code>
82-
* <ul>
83-
* <li>
84-
* If class that specified the {@link #type()} attribute implements the
85-
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
86-
* the MyBatis use a method that returned by it
87-
* </li>
88-
* <li>
89-
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
90-
* (= not implement it or it was returned {@code null}), the MyBatis will search and use a fallback method
91-
* that named {@code provideSql} from specified type</li>
92-
* </ul>
93-
* </code>
79+
* following rules.
80+
* <ul>
81+
* <li>If class that specified the {@link #type()} attribute implements the
82+
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it
83+
* </li>
84+
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
85+
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
86+
* <code>provideSql</code> from specified type</li>
87+
* </ul>
9488
*
9589
* @return a method name of method for providing an SQL
9690
*/

src/main/java/org/apache/ibatis/builder/InitializingObject.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,7 +28,6 @@ public interface InitializingObject {
2828
* Initialize an instance.
2929
* <p>
3030
* This method will be invoked after it has set all properties.
31-
* </p>
3231
*
3332
* @throws Exception
3433
* in the event of misconfiguration (such as failure to set an essential property) or if initialization

src/main/java/org/apache/ibatis/executor/statement/StatementUtil.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,7 +35,6 @@ private StatementUtil() {
3535
* Apply a transaction timeout.
3636
* <p>
3737
* Update a query timeout to apply a transaction timeout.
38-
* </p>
3938
*
4039
* @param statement
4140
* a target statement

0 commit comments

Comments
 (0)