Skip to content

Commit

Permalink
Fixup javadoc issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hazendaz committed Dec 31, 2024
1 parent 78098db commit ccd5c5a
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 95 deletions.
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
20 changes: 11 additions & 9 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,7 +77,9 @@
* <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>
* If this attribute omit, the MyBatis will call a method that decide by following rules.
*
* <pre>
* <ul>
* <li>
* If class that specified the {@link #type()} attribute implements the
Expand All @@ -86,11 +88,11 @@
* </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
* (= 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>
* </code>
* </pre>
*
* @return a method name of method for providing an SQL
*/
Expand Down
20 changes: 11 additions & 9 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,7 +77,9 @@
* <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>
* If this attribute omit, the MyBatis will call a method that decide by following rules.
*
* <pre>
* <ul>
* <li>
* If class that specified the {@link #type()} attribute implements the
Expand All @@ -86,11 +88,11 @@
* </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
* (= 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>
* </code>
* </pre>
*
* @return a method name of method for providing an SQL
*/
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/org/apache/ibatis/annotations/Options.java
Original file line number Diff line number Diff line change
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
2 changes: 0 additions & 2 deletions src/main/java/org/apache/ibatis/annotations/SelectKey.java
Original file line number Diff line number Diff line change
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
20 changes: 11 additions & 9 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,7 +77,9 @@
* <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>
* If this attribute omit, the MyBatis will call a method that decide by following rules.
*
* <pre>
* <ul>
* <li>
* If class that specified the {@link #type()} attribute implements the
Expand All @@ -86,11 +88,11 @@
* </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.
* (= 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>
* </code>
* </pre>
*
* @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
20 changes: 10 additions & 10 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,7 +76,9 @@
* 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>
* following rules.
*
* <pre>
* <ul>
* <li>
* If class that specified the {@link #type()} attribute implements the
Expand All @@ -87,10 +87,10 @@
* </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>
* (= 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>
* </code>
* </pre>
*
* @return a method name of method for providing an SQL
*/
Expand Down
Original file line number Diff line number Diff line change
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
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
2 changes: 0 additions & 2 deletions src/main/java/org/apache/ibatis/lang/UsesJava7.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
import java.lang.annotation.Target;

/**
* <p>
* Indicates that the element uses Java 7 API.
* </p>
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/apache/ibatis/lang/UsesJava8.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
import java.lang.annotation.Target;

/**
* <p>
* Indicates that the element uses Java 8 API.
* </p>
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/apache/ibatis/parsing/PropertyParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public class PropertyParser {
* <p>
* The default value is {@code false} (indicate disable a default value on placeholder) If you specify the
* {@code true}, you can specify key and default value on placeholder (e.g. {@code ${db.username:postgres}}).
* </p>
*
* @since 3.4.2
*/
Expand All @@ -39,7 +38,6 @@ public class PropertyParser {
* The special property key that specify a separator for key and default value on placeholder.
* <p>
* The default separator is {@code ":"}.
* </p>
*
* @since 3.4.2
*/
Expand Down
Loading

0 comments on commit ccd5c5a

Please sign in to comment.