Skip to content

Commit 97a1cf5

Browse files
authored
Merge pull request #845 from kazuki43zoo/improve-annotation-target
Remove unnecessary target from some annotations
2 parents 53ce5fa + 000fd4c commit 97a1cf5

File tree

11 files changed

+31
-36
lines changed

11 files changed

+31
-36
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package org.apache.ibatis.annotations;
1717

1818
import java.lang.annotation.Documented;
19-
import java.lang.annotation.ElementType;
2019
import java.lang.annotation.Retention;
2120
import java.lang.annotation.RetentionPolicy;
2221
import java.lang.annotation.Target;
@@ -30,7 +29,7 @@
3029
*/
3130
@Documented
3231
@Retention(RetentionPolicy.RUNTIME)
33-
@Target(ElementType.METHOD)
32+
@Target({})
3433
public @interface Arg {
3534
boolean id() default false;
3635

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package org.apache.ibatis.annotations;
1717

1818
import java.lang.annotation.Documented;
19-
import java.lang.annotation.ElementType;
2019
import java.lang.annotation.Retention;
2120
import java.lang.annotation.RetentionPolicy;
2221
import java.lang.annotation.Target;
@@ -26,7 +25,7 @@
2625
*/
2726
@Documented
2827
@Retention(RetentionPolicy.RUNTIME)
29-
@Target(ElementType.METHOD)
28+
@Target({})
3029
public @interface Case {
3130
String value();
3231

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package org.apache.ibatis.annotations;
1717

1818
import java.lang.annotation.Documented;
19-
import java.lang.annotation.ElementType;
2019
import java.lang.annotation.Retention;
2120
import java.lang.annotation.RetentionPolicy;
2221
import java.lang.annotation.Target;
@@ -28,7 +27,7 @@
2827
*/
2928
@Documented
3029
@Retention(RetentionPolicy.RUNTIME)
31-
@Target(ElementType.METHOD)
30+
@Target({})
3231
public @interface Many {
3332
String select() default "";
3433

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package org.apache.ibatis.annotations;
1717

1818
import java.lang.annotation.Documented;
19-
import java.lang.annotation.ElementType;
2019
import java.lang.annotation.Retention;
2120
import java.lang.annotation.RetentionPolicy;
2221
import java.lang.annotation.Target;
@@ -28,7 +27,7 @@
2827
*/
2928
@Documented
3029
@Retention(RetentionPolicy.RUNTIME)
31-
@Target(ElementType.METHOD)
30+
@Target({})
3231
public @interface One {
3332
String select() default "";
3433

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package org.apache.ibatis.annotations;
1717

1818
import java.lang.annotation.Documented;
19-
import java.lang.annotation.ElementType;
2019
import java.lang.annotation.Retention;
2120
import java.lang.annotation.RetentionPolicy;
2221
import java.lang.annotation.Target;
@@ -30,7 +29,7 @@
3029
*/
3130
@Documented
3231
@Retention(RetentionPolicy.RUNTIME)
33-
@Target(ElementType.METHOD)
32+
@Target({})
3433
public @interface Result {
3534
boolean id() default false;
3635

src/main/java/org/apache/ibatis/plugin/Signature.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
@Documented
2828
@Retention(RetentionPolicy.RUNTIME)
29-
@Target(ElementType.TYPE)
29+
@Target({})
3030
public @interface Signature {
3131
Class<?> type();
3232

src/site/es/xdoc/java-api.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
335335
</tr>
336336
<tr>
337337
<td><code>@Arg</code></td>
338-
<td><code>Method</code></td>
338+
<td>N/A</td>
339339
<td>
340340
<ul>
341341
<li><code>&lt;arg&gt;</code></li>
@@ -352,7 +352,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
352352
</tr>
353353
<tr>
354354
<td><code>@Case</code></td>
355-
<td><code>Method</code></td>
355+
<td>N/A</td>
356356
<td><code>&lt;case&gt;</code></td>
357357
<td>Un caso concreto y su mapeo correspondiente. Atributos: value, type, results. El atributo results es un array de Results, por tanto esta anotación Case es similar a un ResultMap, que se especifica mediante la anotación Results a continuación.</td>
358358
</tr>
@@ -364,7 +364,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
364364
</tr>
365365
<tr>
366366
<td><code>@Result</code></td>
367-
<td><code>Method</code></td>
367+
<td>N/A</td>
368368
<td>
369369
<ul>
370370
<li><code>&lt;result&gt;</code></li>
@@ -375,7 +375,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
375375
</tr>
376376
<tr>
377377
<td><code>@One</code></td>
378-
<td><code>Method</code></td>
378+
<td>N/A</td>
379379
<td><code>&lt;association&gt;</code></td>
380380
<td>
381381
Un mapeo a una propiedad que contiene un tipo complejo. Atributos: select, que contiene el nombre completamente cualificado de un mapped statement (o un método de mapper) que puede cargar la instancia del tipo indicado,
@@ -384,7 +384,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
384384
</tr>
385385
<tr>
386386
<td><code>@Many</code></td>
387-
<td><code>Method</code></td>
387+
<td>N/A</td>
388388
<td><code>&lt;collection&gt;</code></td>
389389
<td>Un mapeo a una propiedad que contiene una colección de tipos complejos. Atributos: select, que contiene el nombre completamente cualificado de un mapped statement (o un método de mapper) que puede cargar la instancia del tipo indicado,
390390
<code>fetchType</code>, que sobrescribe el parámetro global de configuración <code>lazyLoadingEnabled</code> para este mapeo.

src/site/ja/xdoc/java-api.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
343343
</tr>
344344
<tr>
345345
<td><code>@Arg</code></td>
346-
<td><code>Method</code></td>
346+
<td>N/A</td>
347347
<td>
348348
<ul>
349349
<li><code>&lt;arg&gt;</code></li>
@@ -363,7 +363,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
363363
</tr>
364364
<tr>
365365
<td><code>@Case</code></td>
366-
<td><code>Method</code></td>
366+
<td>N/A</td>
367367
<td><code>&lt;case&gt;</code></td>
368368
<td>値と対応するマッピングを含む個々の判定条件です。属性: <code>value</code>, <code>type</code>,
369369
<code>results</code>. results は Result の配列を値に取るので、この Case アノテーションは次に挙げる <code>Results</code> アノテーションによって定義される実際の resultMap に近いものです。</td>
@@ -376,7 +376,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
376376
</tr>
377377
<tr>
378378
<td><code>@Result</code></td>
379-
<td><code>Method</code></td>
379+
<td>N/A</td>
380380
<td>
381381
<ul>
382382
<li><code>&lt;result&gt;</code></li>
@@ -389,15 +389,15 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
389389
</tr>
390390
<tr>
391391
<td><code>@One</code></td>
392-
<td><code>Method</code></td>
392+
<td>N/A</td>
393393
<td><code>&lt;association&gt;</code></td>
394394
<td>複雑型のプロパティのマッピング情報を定義します。属性: <code>select</code>, <code>fetchType</code>. select は適切な型を読み込むことができるマップドステートメント(Mapper メソッド)の完全修飾名です。
395395
fetchType はグローバルな設定 <code>lazyLoadingEnabled</code> をオーバーライドする場合に指定します。
396396
<span class="label important">NOTE</span> アノテーション API では結合マッピングがサポートされていません。これは Java アノテーションでは循環参照が許可されないためです。</td>
397397
</tr>
398398
<tr>
399399
<td><code>@Many</code></td>
400-
<td><code>Method</code></td>
400+
<td>N/A</td>
401401
<td><code>&lt;collection&gt;</code></td>
402402
<td>複雑型のプロパティのマッピング情報を定義します。属性: <code>select</code>, <code>fetchType</code>. select は適切な型のコレクションを読み込むことができるマップドステートメント(Mapper メソッド)の完全修飾名です。
403403
fetchType はグローバルな設定 <code>lazyLoadingEnabled</code> をオーバーライドする場合に指定します。

src/site/ko/xdoc/java-api.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
434434
</tr>
435435
<tr>
436436
<td><code>@Arg</code></td>
437-
<td><code>Method</code></td>
437+
<td>N/A</td>
438438
<td>
439439
<ul>
440440
<li><code>&lt;arg&gt;</code></li>
@@ -456,7 +456,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
456456
</tr>
457457
<tr>
458458
<td><code>@Case</code></td>
459-
<td><code>Method</code></td>
459+
<td>N/A</td>
460460
<td><code>&lt;case&gt;</code></td>
461461
<td>case 의 값과 매핑
462462
사용가능한 속성들 : value, type, results.
@@ -472,7 +472,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
472472
</tr>
473473
<tr>
474474
<td><code>@Result</code></td>
475-
<td><code>Method</code></td>
475+
<td>N/A</td>
476476
<td>
477477
<ul>
478478
<li><code>&lt;result&gt;</code></li>
@@ -488,7 +488,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
488488
</tr>
489489
<tr>
490490
<td><code>@One</code></td>
491-
<td><code>Method</code></td>
491+
<td>N/A</td>
492492
<td><code>&lt;association&gt;</code></td>
493493
<td>복잡한 타입의 한개의 프로퍼티를 위한 매핑이다.
494494
사용가능한 속성들 : select(매핑 구문의 이름, 예를들어 매퍼 메소드)
@@ -497,7 +497,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
497497
</tr>
498498
<tr>
499499
<td><code>@Many</code></td>
500-
<td><code>Method</code></td>
500+
<td>N/A</td>
501501
<td><code>&lt;collection&gt;</code></td>
502502
<td>복잡한 타입의 collection 프로퍼티를 위한 매핑이다.
503503
사용가능한 속성들 : select(매핑 구문의 이름, 예를들어 매퍼 메소드)

src/site/xdoc/java-api.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
352352
</tr>
353353
<tr>
354354
<td><code>@Arg</code></td>
355-
<td><code>Method</code></td>
355+
<td>N/A</td>
356356
<td>
357357
<ul>
358358
<li><code>&lt;arg&gt;</code></li>
@@ -373,7 +373,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
373373
</tr>
374374
<tr>
375375
<td><code>@Case</code></td>
376-
<td><code>Method</code></td>
376+
<td>N/A</td>
377377
<td><code>&lt;case&gt;</code></td>
378378
<td>A single case of a value and its corresponding mappings. Attributes: <code>value</code>, <code>type</code>,
379379
<code>results</code>. The results attribute is an array of Results, thus this <code>Case</code> Annotation is
@@ -388,7 +388,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
388388
</tr>
389389
<tr>
390390
<td><code>@Result</code></td>
391-
<td><code>Method</code></td>
391+
<td>N/A</td>
392392
<td>
393393
<ul>
394394
<li><code>&lt;result&gt;</code></li>
@@ -404,7 +404,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
404404
</tr>
405405
<tr>
406406
<td><code>@One</code></td>
407-
<td><code>Method</code></td>
407+
<td>N/A</td>
408408
<td><code>&lt;association&gt;</code></td>
409409
<td>A mapping to a single property value of a complex type. Attributes: <code>select</code>, which is the fully
410410
qualified name of a mapped statement (i.e. mapper method) that can load an instance of the appropriate type,
@@ -415,7 +415,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
415415
</tr>
416416
<tr>
417417
<td><code>@Many</code></td>
418-
<td><code>Method</code></td>
418+
<td>N/A</td>
419419
<td><code>&lt;collection&gt;</code></td>
420420
<td>A mapping to a collection property of a complex type. Attributes: <code>select</code>, which is the fully
421421
qualified name of a mapped statement (i.e. mapper method) that can load a collection of instances of the appropriate

0 commit comments

Comments
 (0)