Skip to content

Commit 32d7872

Browse files
committed
[ci] formatting
1 parent adcdebe commit 32d7872

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

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

Lines changed: 27 additions & 24 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.
@@ -26,33 +26,33 @@
2626
* The annotation that specify an SQL for retrieving record(s).
2727
* <p>
2828
* <b>How to use:</b>
29-
* <br/>
29+
* <p>
3030
* <ul>
31-
* <li>
32-
* Simple:
33-
* <pre>
34-
* public interface UserMapper {
35-
* &#064;Select("SELECT id, name FROM users WHERE id = #{id}")
36-
* User selectById(int id);
37-
* }
38-
* </pre>
39-
* </li>
40-
* <li>
41-
* Dynamic SQL:
42-
* <pre>
43-
* public interface UserMapper {
44-
* &#064;Select({"&lt;script>",
45-
* "select * from users",
46-
* "where name = #{name}",
47-
* "&lt;if test=\"age != null\"> age = #{age} &lt;/if>",
48-
* "&lt;/script>"})
49-
* User select(@NotNull String name, @Nullable Intger age);
50-
* }
51-
* </pre>
52-
* </li>
31+
* <li>Simple:
32+
*
33+
* <pre>{@code
34+
* public interface UserMapper {
35+
* @Select("SELECT id, name FROM users WHERE id = #{id}")
36+
* User selectById(int id);
37+
* }
38+
* }</pre>
39+
*
40+
* </li>
41+
* <li>Dynamic SQL:
42+
*
43+
* <pre>{@code
44+
* public interface UserMapper {
45+
* @Select({ "<script>", "select * from users", "where name = #{name}",
46+
* "<if test=\"age != null\"> age = #{age} </if>", "</script>" })
47+
* User select(@NotNull String name, @Nullable Intger age);
48+
* }
49+
* }</pre>
50+
*
51+
* </li>
5352
* </ul>
5453
*
5554
* @author Clinton Begin
55+
*
5656
* @see <a href="https://mybatis.org/mybatis-3/dynamic-sql.html">How to use Dynamic SQL</a>
5757
*/
5858
@Documented
@@ -69,6 +69,7 @@
6969

7070
/**
7171
* @return A database id that correspond this statement
72+
*
7273
* @since 3.5.5
7374
*/
7475
String databaseId() default "";
@@ -78,6 +79,7 @@
7879
* e.g. RETURNING of PostgreSQL or OUTPUT of MS SQL Server.
7980
*
8081
* @return {@code true} if this select affects DB data; {@code false} if otherwise
82+
*
8183
* @since 3.5.12
8284
*/
8385
boolean affectData() default false;
@@ -86,6 +88,7 @@
8688
* The container annotation for {@link Select}.
8789
*
8890
* @author Kazuki Shimizu
91+
*
8992
* @since 3.5.5
9093
*/
9194
@Documented

0 commit comments

Comments
 (0)