diff --git a/src/main/java/org/apache/ibatis/annotations/Arg.java b/src/main/java/org/apache/ibatis/annotations/Arg.java index d5a505cee1c..3cea44307b4 100644 --- a/src/main/java/org/apache/ibatis/annotations/Arg.java +++ b/src/main/java/org/apache/ibatis/annotations/Arg.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -30,6 +30,7 @@ * The annotation that specify a mapping definition for the constructor argument. * * @see ConstructorArgs + * * @author Clinton Begin */ @Documented @@ -91,6 +92,7 @@ * Returns the parameter name for applying this mapping. * * @return the parameter name + * * @since 3.4.3 */ String name() default ""; @@ -99,6 +101,7 @@ * Returns the column prefix that use when applying {@link #resultMap()}. * * @return the column prefix + * * @since 3.5.0 */ String columnPrefix() default ""; diff --git a/src/main/java/org/apache/ibatis/annotations/AutomapConstructor.java b/src/main/java/org/apache/ibatis/annotations/AutomapConstructor.java index b09fa0c5ed3..91742b147a4 100644 --- a/src/main/java/org/apache/ibatis/annotations/AutomapConstructor.java +++ b/src/main/java/org/apache/ibatis/annotations/AutomapConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -23,7 +23,6 @@ /** * The marker annotation that indicate a constructor for automatic mapping. - * *
* How to use: * @@ -47,6 +46,7 @@ * * * @author Tim Chen + * * @since 3.4.3 */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/CacheNamespace.java b/src/main/java/org/apache/ibatis/annotations/CacheNamespace.java index 8e1f22ebea0..a7358a8ce13 100644 --- a/src/main/java/org/apache/ibatis/annotations/CacheNamespace.java +++ b/src/main/java/org/apache/ibatis/annotations/CacheNamespace.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -27,7 +27,6 @@ /** * The annotation that specify to use cache on namespace(e.g. mapper interface). - * *
* How to use: * @@ -96,6 +95,7 @@ * Returns property values for a implementation object. * * @return property values + * * @since 3.4.2 */ Property[] properties() default {}; diff --git a/src/main/java/org/apache/ibatis/annotations/CacheNamespaceRef.java b/src/main/java/org/apache/ibatis/annotations/CacheNamespaceRef.java index 2eace78dbe5..319f66a8785 100644 --- a/src/main/java/org/apache/ibatis/annotations/CacheNamespaceRef.java +++ b/src/main/java/org/apache/ibatis/annotations/CacheNamespaceRef.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -23,9 +23,8 @@ /** * The annotation that reference a cache. - * - *
If you use this annotation, should be specified either {@link #value()} or {@link #name()} attribute. - * + *
+ * If you use this annotation, should be specified either {@link #value()} or {@link #name()} attribute. *
* How to use: * @@ -55,6 +54,7 @@ * Returns the namespace name to reference a cache. * * @return the namespace name + * * @since 3.4.2 */ String name() default ""; diff --git a/src/main/java/org/apache/ibatis/annotations/Case.java b/src/main/java/org/apache/ibatis/annotations/Case.java index e3b285c81d8..186c3096ddc 100644 --- a/src/main/java/org/apache/ibatis/annotations/Case.java +++ b/src/main/java/org/apache/ibatis/annotations/Case.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -28,6 +28,7 @@ * @see Arg * @see Results * @see ConstructorArgs + * * @author Clinton Begin */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java b/src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java index 0ad301a6bd4..b3cc6bb888d 100644 --- a/src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java +++ b/src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -23,7 +23,6 @@ /** * The annotation that be grouping mapping definitions for constructor. - * *
* How to use: * diff --git a/src/main/java/org/apache/ibatis/annotations/Delete.java b/src/main/java/org/apache/ibatis/annotations/Delete.java index 8546a2bf93e..8396669a5fb 100644 --- a/src/main/java/org/apache/ibatis/annotations/Delete.java +++ b/src/main/java/org/apache/ibatis/annotations/Delete.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,7 +24,6 @@ /** * The annotation that specify an SQL for deleting record(s). - * *
* How to use: * @@ -51,13 +50,16 @@ /** * @return A database id that correspond this statement + * * @since 3.5.5 */ String databaseId() default ""; /** * The container annotation for {@link Delete}. + * * @author Kazuki Shimizu + * * @since 3.5.5 */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/DeleteProvider.java b/src/main/java/org/apache/ibatis/annotations/DeleteProvider.java index e7f49852e4b..5ae9043875a 100644 --- a/src/main/java/org/apache/ibatis/annotations/DeleteProvider.java +++ b/src/main/java/org/apache/ibatis/annotations/DeleteProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,7 +24,6 @@ /** * The annotation that specify a method that provide an SQL for deleting record(s). - * *
* How to use: * @@ -55,7 +54,9 @@ * Specify a type that implements an SQL provider method. * * @return a type that implements an SQL provider method + * * @since 3.5.2 + * * @see #type() */ Class> value() default void.class; @@ -67,13 +68,13 @@ *
* * @return a type that implements an SQL provider method + * * @see #value() */ Class> type() default void.class; /** * Specify a method for providing an SQL. - * ** Since 3.5.1, this attribute can omit. * If this attribute omit, the MyBatis will call a method that decide by following rules. @@ -95,13 +96,16 @@ /** * @return A database id that correspond this provider + * * @since 3.5.5 */ String databaseId() default ""; /** * The container annotation for {@link DeleteProvider}. + * * @author Kazuki Shimizu + * * @since 3.5.5 */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/Flush.java b/src/main/java/org/apache/ibatis/annotations/Flush.java index e08bdc0d3a2..2063d77297d 100644 --- a/src/main/java/org/apache/ibatis/annotations/Flush.java +++ b/src/main/java/org/apache/ibatis/annotations/Flush.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -23,7 +23,6 @@ /** * The maker annotation that invoke a flush statements via Mapper interface. - * *
* How to use: * @@ -35,6 +34,7 @@ * * * @since 3.3.0 + * * @author Kazuki Shimizu */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/Insert.java b/src/main/java/org/apache/ibatis/annotations/Insert.java index 458dd7d13ac..9b6bb56b944 100644 --- a/src/main/java/org/apache/ibatis/annotations/Insert.java +++ b/src/main/java/org/apache/ibatis/annotations/Insert.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,7 +24,6 @@ /** * The annotation that specify an SQL for inserting record(s). - * *
* How to use: * @@ -51,13 +50,16 @@ /** * @return A database id that correspond this statement + * * @since 3.5.5 */ String databaseId() default ""; /** * The container annotation for {@link Insert}. + * * @author Kazuki Shimizu + * * @since 3.5.5 */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/InsertProvider.java b/src/main/java/org/apache/ibatis/annotations/InsertProvider.java index 9c2b025ddac..71c8b5406ee 100644 --- a/src/main/java/org/apache/ibatis/annotations/InsertProvider.java +++ b/src/main/java/org/apache/ibatis/annotations/InsertProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,7 +24,6 @@ /** * The annotation that specify a method that provide an SQL for inserting record(s). - * *
* How to use: * @@ -55,7 +54,9 @@ * Specify a type that implements an SQL provider method. * * @return a type that implements an SQL provider method + * * @since 3.5.2 + * * @see #type() */ Class> value() default void.class; @@ -67,13 +68,13 @@ *
* * @return a type that implements an SQL provider method + * * @see #value() */ Class> type() default void.class; /** * Specify a method for providing an SQL. - * ** Since 3.5.1, this attribute can omit. * If this attribute omit, the MyBatis will call a method that decide by following rules. @@ -95,13 +96,16 @@ /** * @return A database id that correspond this provider + * * @since 3.5.5 */ String databaseId() default ""; /** * The container annotation for {@link InsertProvider}. + * * @author Kazuki Shimizu + * * @since 3.5.5 */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/Lang.java b/src/main/java/org/apache/ibatis/annotations/Lang.java index bcbb6ed76f4..371a87287f3 100644 --- a/src/main/java/org/apache/ibatis/annotations/Lang.java +++ b/src/main/java/org/apache/ibatis/annotations/Lang.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -25,7 +25,6 @@ /** * The annotation that specify a {@link LanguageDriver} to use. - * *
* How to use: * diff --git a/src/main/java/org/apache/ibatis/annotations/Many.java b/src/main/java/org/apache/ibatis/annotations/Many.java index bc028e7ec82..066f4a31c9a 100644 --- a/src/main/java/org/apache/ibatis/annotations/Many.java +++ b/src/main/java/org/apache/ibatis/annotations/Many.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -27,6 +27,7 @@ * * @see Result * @see Results + * * @author Clinton Begin */ @Documented @@ -37,6 +38,7 @@ * Returns the columnPrefix. * * @return the columnPrefix. + * * @since 3.5.5 */ String columnPrefix() default ""; @@ -45,6 +47,7 @@ * Returns the result map id used to map collection. * * @return the result map id + * * @since 3.5.5 */ String resultMap() default ""; diff --git a/src/main/java/org/apache/ibatis/annotations/MapKey.java b/src/main/java/org/apache/ibatis/annotations/MapKey.java index 09a61fa5fd3..b51edf44350 100644 --- a/src/main/java/org/apache/ibatis/annotations/MapKey.java +++ b/src/main/java/org/apache/ibatis/annotations/MapKey.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -23,7 +23,6 @@ /** * The annotation that specify the property name(or column name) for a key value of {@link java.util.Map}. - * *
* How to use: * diff --git a/src/main/java/org/apache/ibatis/annotations/Mapper.java b/src/main/java/org/apache/ibatis/annotations/Mapper.java index 28c62159f9d..9467cb7319d 100644 --- a/src/main/java/org/apache/ibatis/annotations/Mapper.java +++ b/src/main/java/org/apache/ibatis/annotations/Mapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,7 +24,6 @@ /** * Marker interface for MyBatis mappers. - * *
* How to use: * diff --git a/src/main/java/org/apache/ibatis/annotations/One.java b/src/main/java/org/apache/ibatis/annotations/One.java index dae873a65cf..fb60375d6fb 100644 --- a/src/main/java/org/apache/ibatis/annotations/One.java +++ b/src/main/java/org/apache/ibatis/annotations/One.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -27,6 +27,7 @@ * * @see Result * @see Results + * * @author Clinton Begin */ @Documented @@ -37,6 +38,7 @@ * Returns the columnPrefix. * * @return the columnPrefix. + * * @since 3.5.5 */ String columnPrefix() default ""; @@ -45,6 +47,7 @@ * Returns the result map id used to map single object. * * @return the result map id + * * @since 3.5.5 */ String resultMap() default ""; diff --git a/src/main/java/org/apache/ibatis/annotations/Options.java b/src/main/java/org/apache/ibatis/annotations/Options.java index 35f96e4be36..12d80c20bf7 100644 --- a/src/main/java/org/apache/ibatis/annotations/Options.java +++ b/src/main/java/org/apache/ibatis/annotations/Options.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -27,7 +27,6 @@ /** * The annotation that specify options for customizing default behaviors. - * *
* How to use:
*
@@ -47,8 +46,7 @@
@Repeatable(Options.List.class)
public @interface Options {
/**
- * The options for the {@link Options#flushCache()}.
- * The default is {@link FlushCachePolicy#DEFAULT}
+ * The options for the {@link Options#flushCache()}. The default is {@link FlushCachePolicy#DEFAULT}
*/
enum FlushCachePolicy {
/** false
for select statement; true
for insert/update/delete statement. */
@@ -140,13 +138,16 @@ enum FlushCachePolicy {
/**
* @return A database id that correspond this options
+ *
* @since 3.5.5
*/
String databaseId() default "";
/**
* The container annotation for {@link Options}.
+ *
* @author Kazuki Shimizu
+ *
* @since 3.5.5
*/
@Documented
diff --git a/src/main/java/org/apache/ibatis/annotations/Param.java b/src/main/java/org/apache/ibatis/annotations/Param.java
index d1f8f1886f5..b69689e6d66 100644
--- a/src/main/java/org/apache/ibatis/annotations/Param.java
+++ b/src/main/java/org/apache/ibatis/annotations/Param.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2022 the original author or authors.
+ * Copyright 2009-2023 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.
@@ -23,7 +23,6 @@
/**
* The annotation that specify the parameter name.
- *
*
* How to use: * diff --git a/src/main/java/org/apache/ibatis/annotations/Property.java b/src/main/java/org/apache/ibatis/annotations/Property.java index 15caca2819e..5e684d50b75 100644 --- a/src/main/java/org/apache/ibatis/annotations/Property.java +++ b/src/main/java/org/apache/ibatis/annotations/Property.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,7 +24,9 @@ * The annotation that inject a property value. * * @since 3.4.2 + * * @author Kazuki Shimizu + * * @see CacheNamespace */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/Result.java b/src/main/java/org/apache/ibatis/annotations/Result.java index 8abb15be171..48cce78e741 100644 --- a/src/main/java/org/apache/ibatis/annotations/Result.java +++ b/src/main/java/org/apache/ibatis/annotations/Result.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -30,6 +30,7 @@ * The annotation that specify a mapping definition for the property. * * @see Results + * * @author Clinton Begin */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/ResultMap.java b/src/main/java/org/apache/ibatis/annotations/ResultMap.java index 56fd697032b..36c650864b8 100644 --- a/src/main/java/org/apache/ibatis/annotations/ResultMap.java +++ b/src/main/java/org/apache/ibatis/annotations/ResultMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -23,7 +23,6 @@ /** * The annotation that specify result map names to use. - * *
* How to use:
* Mapper interface:
@@ -39,7 +38,9 @@
* User selectByEmail(String email);
* }
*
+ *
* Mapper XML:
+ *
*
{@code ** * @since 3.2.0 + * * @author Jeff Butler */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/Results.java b/src/main/java/org/apache/ibatis/annotations/Results.java index 84f9b10156a..2fe865f4acc 100644 --- a/src/main/java/org/apache/ibatis/annotations/Results.java +++ b/src/main/java/org/apache/ibatis/annotations/Results.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -23,7 +23,6 @@ /** * The annotation that be grouping mapping definitions for property. - * ** diff --git a/src/main/java/org/apache/ibatis/annotations/ResultType.java b/src/main/java/org/apache/ibatis/annotations/ResultType.java index eaab7252934..5d9e0761acd 100644 --- a/src/main/java/org/apache/ibatis/annotations/ResultType.java +++ b/src/main/java/org/apache/ibatis/annotations/ResultType.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -22,11 +22,8 @@ import java.lang.annotation.Target; /** - * This annotation can be used when a @Select method is using a - * ResultHandler. Those methods must have void return type, so - * this annotation can be used to tell MyBatis what kind of object - * it should build for each row. - * + * This annotation can be used when a @Select method is using a ResultHandler. Those methods must have void return type, + * so this annotation can be used to tell MyBatis what kind of object it should build for each row. * * How to use: * @@ -39,6 +36,7 @@ *
* How to use: * diff --git a/src/main/java/org/apache/ibatis/annotations/Select.java b/src/main/java/org/apache/ibatis/annotations/Select.java index 3796871090c..e3256380bd8 100644 --- a/src/main/java/org/apache/ibatis/annotations/Select.java +++ b/src/main/java/org/apache/ibatis/annotations/Select.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,7 +24,6 @@ /** * The annotation that specify an SQL for retrieving record(s). - * *
* How to use: * @@ -51,6 +50,7 @@ /** * @return A database id that correspond this statement + * * @since 3.5.5 */ String databaseId() default ""; @@ -60,13 +60,16 @@ * e.g. RETURNING of PostgreSQL or OUTPUT of MS SQL Server. * * @return {@code true} if this select affects DB data; {@code false} if otherwise + * * @since 3.5.12 */ boolean affectData() default false; /** * The container annotation for {@link Select}. + * * @author Kazuki Shimizu + * * @since 3.5.5 */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/SelectKey.java b/src/main/java/org/apache/ibatis/annotations/SelectKey.java index 5715135df1d..1b1848abb11 100644 --- a/src/main/java/org/apache/ibatis/annotations/SelectKey.java +++ b/src/main/java/org/apache/ibatis/annotations/SelectKey.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -26,7 +26,6 @@ /** * The annotation that specify an SQL for retrieving a key value. - * *
* How to use: * @@ -95,13 +94,16 @@ /** * @return A database id that correspond this select key + * * @since 3.5.5 */ String databaseId() default ""; /** * The container annotation for {@link SelectKey}. + * * @author Kazuki Shimizu + * * @since 3.5.5 */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/SelectProvider.java b/src/main/java/org/apache/ibatis/annotations/SelectProvider.java index 282374c6459..d23077e7b2d 100644 --- a/src/main/java/org/apache/ibatis/annotations/SelectProvider.java +++ b/src/main/java/org/apache/ibatis/annotations/SelectProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,7 +24,6 @@ /** * The annotation that specify a method that provide an SQL for retrieving record(s). - * *
* How to use: * @@ -55,7 +54,9 @@ * Specify a type that implements an SQL provider method. * * @return a type that implements an SQL provider method + * * @since 3.5.2 + * * @see #type() */ Class> value() default void.class; @@ -67,13 +68,13 @@ *
* * @return a type that implements an SQL provider method + * * @see #value() */ Class> type() default void.class; /** * Specify a method for providing an SQL. - * ** Since 3.5.1, this attribute can omit. * If this attribute omit, the MyBatis will call a method that decide by following rules. @@ -95,6 +96,7 @@ /** * @return A database id that correspond this provider + * * @since 3.5.5 */ String databaseId() default ""; @@ -104,13 +106,16 @@ * e.g. RETURNING of PostgreSQL or OUTPUT of MS SQL Server. * * @return {@code true} if this select affects DB data; {@code false} if otherwise + * * @since 3.5.12 */ boolean affectData() default false; /** * The container annotation for {@link SelectProvider}. + * * @author Kazuki Shimizu + * * @since 3.5.5 */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java b/src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java index 74043cd9ea3..cdbd38536ae 100644 --- a/src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java +++ b/src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -27,7 +27,6 @@ /** * The annotation that be grouping conditional mapping definitions. - * *
* How to use: * diff --git a/src/main/java/org/apache/ibatis/annotations/Update.java b/src/main/java/org/apache/ibatis/annotations/Update.java index deba99b9d2b..9de9f9782f8 100644 --- a/src/main/java/org/apache/ibatis/annotations/Update.java +++ b/src/main/java/org/apache/ibatis/annotations/Update.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,7 +24,6 @@ /** * The annotation that specify an SQL for updating record(s). - * *
* How to use: * @@ -51,13 +50,16 @@ /** * @return A database id that correspond this statement + * * @since 3.5.5 */ String databaseId() default ""; /** * The container annotation for {@link Update}. + * * @author Kazuki Shimizu + * * @since 3.5.5 */ @Documented diff --git a/src/main/java/org/apache/ibatis/annotations/UpdateProvider.java b/src/main/java/org/apache/ibatis/annotations/UpdateProvider.java index b5adf72ad7c..a3c20796abd 100644 --- a/src/main/java/org/apache/ibatis/annotations/UpdateProvider.java +++ b/src/main/java/org/apache/ibatis/annotations/UpdateProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,7 +24,6 @@ /** * The annotation that specify a method that provide an SQL for updating record(s). - * *
* How to use: * @@ -55,7 +54,9 @@ * Specify a type that implements an SQL provider method. * * @return a type that implements an SQL provider method + * * @since 3.5.2 + * * @see #type() */ Class> value() default void.class; @@ -67,6 +68,7 @@ *
* * @return a type that implements an SQL provider method + * * @see #value() */ Class> type() default void.class; @@ -95,13 +97,16 @@ /** * @return A database id that correspond this provider + * * @since 3.5.5 */ String databaseId() default ""; /** * The container annotation for {@link UpdateProvider}. + * * @author Kazuki Shimizu + * * @since 3.5.5 */ @Documented diff --git a/src/main/java/org/apache/ibatis/binding/MapperMethod.java b/src/main/java/org/apache/ibatis/binding/MapperMethod.java index 17b6cd9f863..67857ac0b21 100644 --- a/src/main/java/org/apache/ibatis/binding/MapperMethod.java +++ b/src/main/java/org/apache/ibatis/binding/MapperMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -85,8 +85,7 @@ public Object execute(SqlSession sqlSession, Object[] args) { } else { Object param = method.convertArgsToSqlCommandParam(args); result = sqlSession.selectOne(command.getName(), param); - if (method.returnsOptional() - && (result == null || !method.getReturnType().equals(result.getClass()))) { + if (method.returnsOptional() && (result == null || !method.getReturnType().equals(result.getClass()))) { result = Optional.ofNullable(result); } } @@ -115,7 +114,8 @@ private Object rowCountResult(int rowCount) { } else if (Boolean.class.equals(method.getReturnType()) || Boolean.TYPE.equals(method.getReturnType())) { result = rowCount > 0; } else { - throw new BindingException("Mapper method '" + command.getName() + "' has an unsupported return type: " + method.getReturnType()); + throw new BindingException( + "Mapper method '" + command.getName() + "' has an unsupported return type: " + method.getReturnType()); } return result; } @@ -124,9 +124,9 @@ private void executeWithResultHandler(SqlSession sqlSession, Object[] args) { MappedStatement ms = sqlSession.getConfiguration().getMappedStatement(command.getName()); if (!StatementType.CALLABLE.equals(ms.getStatementType()) && void.class.equals(ms.getResultMaps().get(0).getType())) { - throw new BindingException("method " + command.getName() - + " needs either a @ResultMap annotation, a @ResultType annotation," - + " or a resultType attribute in XML so a ResultHandler can be used as a parameter."); + throw new BindingException( + "method " + command.getName() + " needs either a @ResultMap annotation, a @ResultType annotation," + + " or a resultType attribute in XML so a ResultHandler can be used as a parameter."); } Object param = method.convertArgsToSqlCommandParam(args); if (method.hasRowBounds()) { @@ -224,15 +224,14 @@ public static class SqlCommand { public SqlCommand(Configuration configuration, Class> mapperInterface, Method method) { final String methodName = method.getName(); final Class> declaringClass = method.getDeclaringClass(); - MappedStatement ms = resolveMappedStatement(mapperInterface, methodName, declaringClass, - configuration); + MappedStatement ms = resolveMappedStatement(mapperInterface, methodName, declaringClass, configuration); if (ms == null) { if (method.getAnnotation(Flush.class) != null) { name = null; type = SqlCommandType.FLUSH; } else { - throw new BindingException("Invalid bound statement (not found): " - + mapperInterface.getName() + "." + methodName); + throw new BindingException( + "Invalid bound statement (not found): " + mapperInterface.getName() + "." + methodName); } } else { name = ms.getId(); @@ -251,8 +250,8 @@ public SqlCommandType getType() { return type; } - private MappedStatement resolveMappedStatement(Class> mapperInterface, String methodName, - Class> declaringClass, Configuration configuration) { + private MappedStatement resolveMappedStatement(Class> mapperInterface, String methodName, Class> declaringClass, + Configuration configuration) { String statementId = mapperInterface.getName() + "." + methodName; if (configuration.hasStatement(statementId)) { return configuration.getMappedStatement(statementId); @@ -261,8 +260,7 @@ private MappedStatement resolveMappedStatement(Class> mapperInterface, String } for (Class> superInterface : mapperInterface.getInterfaces()) { if (declaringClass.isAssignableFrom(superInterface)) { - MappedStatement ms = resolveMappedStatement(superInterface, methodName, - declaringClass, configuration); + MappedStatement ms = resolveMappedStatement(superInterface, methodName, declaringClass, configuration); if (ms != null) { return ms; } @@ -349,6 +347,7 @@ public boolean returnsCursor() { * return whether return type is {@code java.util.Optional}. * * @return return {@code true}, if return type is {@code java.util.Optional} + * * @since 3.5.0 */ public boolean returnsOptional() { @@ -363,7 +362,8 @@ private Integer getUniqueParamIndex(Method method, Class> paramType) { if (index == null) { index = i; } else { - throw new BindingException(method.getName() + " cannot have multiple " + paramType.getSimpleName() + " parameters"); + throw new BindingException( + method.getName() + " cannot have multiple " + paramType.getSimpleName() + " parameters"); } } } diff --git a/src/main/java/org/apache/ibatis/binding/MapperRegistry.java b/src/main/java/org/apache/ibatis/binding/MapperRegistry.java index 0bce6fc1f43..f3484ac64b2 100644 --- a/src/main/java/org/apache/ibatis/binding/MapperRegistry.java +++ b/src/main/java/org/apache/ibatis/binding/MapperRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -83,6 +83,7 @@ publicThis interface need to implements at an SQL provider class and - * it need to define the default constructor for creating a new instance. + *
+ * This interface need to implements at an SQL provider class and it need to define the default constructor for creating + * a new instance. * * @since 3.5.1 + * * @author Kazuki Shimizu */ public interface ProviderMethodResolver { /** * Resolve an SQL provider method. - * - *
The default implementation return a method that matches following conditions. + *
+ * The default implementation return a method that matches following conditions. *
Simple blocking decorator - * - *
Simple and inefficient version of EhCache's BlockingCache decorator. - * It sets a lock over a cache key when the element is not found in cache. - * This way, other threads will wait until this element is filled instead of hitting the database. - * - *
By its nature, this implementation can cause deadlock when used incorrectly. + *
+ * Simple blocking decorator + *
+ * Simple and inefficient version of EhCache's BlockingCache decorator. It sets a lock over a cache key when the element + * is not found in cache. This way, other threads will wait until this element is filled instead of hitting the + * database. + *
+ * By its nature, this implementation can cause deadlock when used incorrectly. * * @author Eduardo Macarron - * */ public class BlockingCache implements Cache { diff --git a/src/main/java/org/apache/ibatis/cache/decorators/SoftCache.java b/src/main/java/org/apache/ibatis/cache/decorators/SoftCache.java index 8e6ba0ad351..daef435e890 100644 --- a/src/main/java/org/apache/ibatis/cache/decorators/SoftCache.java +++ b/src/main/java/org/apache/ibatis/cache/decorators/SoftCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -23,7 +23,8 @@ import org.apache.ibatis.cache.Cache; /** - * Soft Reference cache decorator + * Soft Reference cache decorator. + *
* Thanks to Dr. Heinz Kabutz for his guidance here. * * @author Clinton Begin diff --git a/src/main/java/org/apache/ibatis/cache/decorators/TransactionalCache.java b/src/main/java/org/apache/ibatis/cache/decorators/TransactionalCache.java index 1a71a50f110..914c72a5cd6 100644 --- a/src/main/java/org/apache/ibatis/cache/decorators/TransactionalCache.java +++ b/src/main/java/org/apache/ibatis/cache/decorators/TransactionalCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -27,10 +27,10 @@ /** * The 2nd level cache transactional buffer. *
- * This class holds all cache entries that are to be added to the 2nd level cache during a Session. - * Entries are sent to the cache when commit is called or discarded if the Session is rolled back. - * Blocking cache support has been added. Therefore any get() that returns a cache miss - * will be followed by a put() so any lock associated with the key can be released. + * This class holds all cache entries that are to be added to the 2nd level cache during a Session. Entries are sent to + * the cache when commit is called or discarded if the Session is rolled back. Blocking cache support has been added. + * Therefore any get() that returns a cache miss will be followed by a put() so any lock associated with the key can be + * released. * * @author Clinton Begin * @author Eduardo Macarron diff --git a/src/main/java/org/apache/ibatis/cache/decorators/WeakCache.java b/src/main/java/org/apache/ibatis/cache/decorators/WeakCache.java index 1b161a8d80b..8af6f1d0b5a 100644 --- a/src/main/java/org/apache/ibatis/cache/decorators/WeakCache.java +++ b/src/main/java/org/apache/ibatis/cache/decorators/WeakCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2023 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. @@ -24,6 +24,7 @@ /** * Weak Reference cache decorator. + *
* Thanks to Dr. Heinz Kabutz for his guidance here.
*
* @author Clinton Begin
diff --git a/src/main/java/org/apache/ibatis/cursor/Cursor.java b/src/main/java/org/apache/ibatis/cursor/Cursor.java
index 84bf296514a..4fa26a68c12 100644
--- a/src/main/java/org/apache/ibatis/cursor/Cursor.java
+++ b/src/main/java/org/apache/ibatis/cursor/Cursor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2022 the original author or authors.
+ * Copyright 2009-2023 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.
@@ -18,10 +18,9 @@
import java.io.Closeable;
/**
- * Cursor contract to handle fetching items lazily using an Iterator.
- * Cursors are a perfect fit to handle millions of items queries that would not normally fit in memory.
- * If you use collections in resultMaps then cursor SQL queries must be ordered (resultOrdered="true")
- * using the id columns of the resultMap.
+ * Cursor contract to handle fetching items lazily using an Iterator. Cursors are a perfect fit to handle millions of
+ * items queries that would not normally fit in memory. If you use collections in resultMaps then cursor SQL queries
+ * must be ordered (resultOrdered="true") using the id columns of the resultMap.
*
* @author Guillaume Darmont / guillaume@dropinocean.com
*/
@@ -33,7 +32,6 @@ public interface CursorStatement
+ *
* @since 3.4.0
+ *
* @see StatementUtil#applyTransactionTimeout(Statement, Integer, Integer)
*/
protected void applyTransactionTimeout(Statement statement) throws SQLException {
diff --git a/src/main/java/org/apache/ibatis/executor/BatchExecutor.java b/src/main/java/org/apache/ibatis/executor/BatchExecutor.java
index f40e08e7b3f..c14bd9760f4 100644
--- a/src/main/java/org/apache/ibatis/executor/BatchExecutor.java
+++ b/src/main/java/org/apache/ibatis/executor/BatchExecutor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2022 the original author or authors.
+ * Copyright 2009-2023 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.
@@ -68,7 +68,7 @@ public int doUpdate(MappedStatement ms, Object parameterObject) throws SQLExcept
} else {
Connection connection = getConnection(ms.getStatementLog());
stmt = handler.prepare(connection, transaction.getTimeout());
- handler.parameterize(stmt); // fix Issues 322
+ handler.parameterize(stmt); // fix Issues 322
currentSql = sql;
currentStatement = ms;
statementList.add(stmt);
diff --git a/src/main/java/org/apache/ibatis/executor/ResultExtractor.java b/src/main/java/org/apache/ibatis/executor/ResultExtractor.java
index 290bcb6defd..3bd96312427 100644
--- a/src/main/java/org/apache/ibatis/executor/ResultExtractor.java
+++ b/src/main/java/org/apache/ibatis/executor/ResultExtractor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2022 the original author or authors.
+ * Copyright 2009-2023 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.
@@ -51,7 +51,7 @@ public Object extractObjectFromList(List