File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
src/main/java/org/apache/ibatis Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 20
20
import java .lang .annotation .RetentionPolicy ;
21
21
import java .lang .annotation .Target ;
22
22
23
- import org .apache .ibatis .mapping .Loading ;
23
+ import org .apache .ibatis .mapping .FetchType ;
24
24
25
25
@ Retention (RetentionPolicy .RUNTIME )
26
26
@ Target (ElementType .METHOD )
27
27
public @interface Many {
28
28
String select () default "" ;
29
29
30
- Loading lazy () default Loading .DEFAULT ;
30
+ FetchType lazy () default FetchType .DEFAULT ;
31
31
32
32
}
Original file line number Diff line number Diff line change 20
20
import java .lang .annotation .RetentionPolicy ;
21
21
import java .lang .annotation .Target ;
22
22
23
- import org .apache .ibatis .mapping .Loading ;
23
+ import org .apache .ibatis .mapping .FetchType ;
24
24
25
25
@ Retention (RetentionPolicy .RUNTIME )
26
26
@ Target (ElementType .METHOD )
27
27
public @interface One {
28
28
String select () default "" ;
29
29
30
- Loading lazy () default Loading .DEFAULT ;
30
+ FetchType lazy () default FetchType .DEFAULT ;
31
31
32
32
}
Original file line number Diff line number Diff line change 67
67
import org .apache .ibatis .executor .keygen .SelectKeyGenerator ;
68
68
import org .apache .ibatis .io .Resources ;
69
69
import org .apache .ibatis .mapping .Discriminator ;
70
- import org .apache .ibatis .mapping .Loading ;
70
+ import org .apache .ibatis .mapping .FetchType ;
71
71
import org .apache .ibatis .mapping .MappedStatement ;
72
72
import org .apache .ibatis .mapping .ResultFlag ;
73
73
import org .apache .ibatis .mapping .ResultMapping ;
@@ -497,12 +497,12 @@ private String nestedSelectId(Result result) {
497
497
498
498
private boolean isLazy (Result result ) {
499
499
Boolean isLazy = null ;
500
- if (Loading .DEFAULT != result .one ().lazy ()) {
501
- isLazy = (result .one ().lazy () == Loading .LAZY );
500
+ if (FetchType .DEFAULT != result .one ().lazy ()) {
501
+ isLazy = (result .one ().lazy () == FetchType .LAZY );
502
502
}
503
- if (Loading .DEFAULT != result .many ().lazy ()) {
503
+ if (FetchType .DEFAULT != result .many ().lazy ()) {
504
504
if (isLazy == null ) {
505
- isLazy = (result .many ().lazy () == Loading .LAZY );
505
+ isLazy = (result .many ().lazy () == FetchType .LAZY );
506
506
} else {
507
507
throw new BuilderException ("Cannot use both @One and @Many annotations in the same @Result" );
508
508
}
Original file line number Diff line number Diff line change 15
15
*/
16
16
package org .apache .ibatis .mapping ;
17
17
18
- public enum Loading {
18
+ public enum FetchType {
19
19
LAZY , EAGER , DEFAULT
20
20
}
You can’t perform that action at this time.
0 commit comments