Skip to content

Remove a few formatter off/on and correct related javadocs #3355

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 1 commit 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
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 All @@ -25,12 +25,10 @@
import org.apache.ibatis.cache.decorators.LruCache;
import org.apache.ibatis.cache.impl.PerpetualCache;

// @formatter:off
/**
* The annotation that specify to use cache on namespace(e.g. mapper interface).
* <p>
* <b>How to use:</b>
*
* <b>How to use:</b> <code>
* <pre>
* &#064;CacheNamespace(implementation = CustomCache.class, properties = {
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
Expand All @@ -41,11 +39,11 @@
* // ...
* }
* </pre>
* </code>
*
* @author Clinton Begin
* @author Kazuki Shimizu
*/
// @formatter:on
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
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 All @@ -21,12 +21,10 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

// @formatter:off
/**
* The annotation that be grouping mapping definitions for constructor.
* <p>
* <b>How to use:</b>
*
* <b>How to use:</b> <code>
* <pre>
* public interface UserMapper {
* &#064;ConstructorArgs({
Expand All @@ -38,10 +36,10 @@
* User selectById(int id);
* }
* </pre>
* </code>
*
* @author Clinton Begin
*/
// @formatter:on
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
Expand Down
37 changes: 19 additions & 18 deletions src/main/java/org/apache/ibatis/annotations/DeleteProvider.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 All @@ -25,8 +25,7 @@
/**
* The annotation that specify a method that provide an SQL for deleting record(s).
* <p>
* <b>How to use:</b>
*
* <b>How to use:</b> <code>
* <pre>
* public interface UserMapper {
*
Expand All @@ -41,6 +40,7 @@
*
* }
* </pre>
* </code>
*
* @author Clinton Begin
*/
Expand All @@ -65,36 +65,37 @@
* Specify a type that implements an SQL provider method.
* <p>
* This attribute is alias of {@link #value()}.
* </p>
*
* @return a type that implements an SQL provider method
*
* @see #value()
*/
Class<?> type() default void.class;

// @formatter:off
/**
* Specify a method for providing an SQL.
* <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.
* <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>
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
* <pre>
* <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>
* </pre>
* </code>
*
* @return a method name of method for providing an SQL
*/
// @formatter:on
String method() default "";

/**
Expand Down
37 changes: 19 additions & 18 deletions src/main/java/org/apache/ibatis/annotations/InsertProvider.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 All @@ -25,8 +25,7 @@
/**
* The annotation that specify a method that provide an SQL for inserting record(s).
* <p>
* <b>How to use:</b>
*
* <b>How to use:</b> <code>
* <pre>
* public interface UserMapper {
*
Expand All @@ -41,6 +40,7 @@
*
* }
* </pre>
* </code>
*
* @author Clinton Begin
*/
Expand All @@ -65,36 +65,37 @@
* Specify a type that implements an SQL provider method.
* <p>
* This attribute is alias of {@link #value()}.
* </p>
*
* @return a type that implements an SQL provider method
*
* @see #value()
*/
Class<?> type() default void.class;

// @formatter:off
/**
* Specify a method for providing an SQL.
* <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.
* <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>
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
* <pre>
* <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>
* </pre>
* </code>
*
* @return a method name of method for providing an SQL
*/
// @formatter:on
String method() default "";

/**
Expand Down
39 changes: 19 additions & 20 deletions src/main/java/org/apache/ibatis/annotations/SelectProvider.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 All @@ -25,8 +25,7 @@
/**
* The annotation that specify a method that provide an SQL for retrieving record(s).
* <p>
* <b>How to use:</b>
*
* <b>How to use:</b> <code>
* <pre>
* public interface UserMapper {
*
Expand All @@ -41,6 +40,7 @@
*
* }
* </pre>
* </code>
*
* @author Clinton Begin
*/
Expand Down Expand Up @@ -72,31 +72,30 @@
*/
Class<?> type() default void.class;

// @formatter:off
/**
* Specify a method for providing an SQL.
* <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.
*
* <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>
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
* <pre>
* <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>
* </pre>
* </code>
*
* @return a method name of method for providing an SQL
*/
// @formatter:on
String method() default "";

/**
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 All @@ -25,12 +25,10 @@
import org.apache.ibatis.type.TypeHandler;
import org.apache.ibatis.type.UnknownTypeHandler;

// @formatter:off
/**
* The annotation that be grouping conditional mapping definitions.
* <p>
* <b>How to use:</b>
*
* <b>How to use:</b> <code>
* <pre>
* public interface UserMapper {
* &#064;Select("SELECT id, name, type FROM users ORDER BY id")
Expand All @@ -46,10 +44,10 @@
* List&lt;User&gt; selectAll();
* }
* </pre>
* </code>
*
* @author Clinton Begin
*/
// @formatter:on
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
Expand Down
Loading
Loading