@@ -10,18 +10,18 @@ MyBatis is very good at mapping result sets to objects - this is one of its prim
10
10
that you predefine the mappings for every possibility. This presents a challenge if you want very dynamic column lists
11
11
in a query. This library provides a generalized MyBatis mapper that can assist with that problem.
12
12
13
- The general mapper is ` org.mybatis.dynamic.sql.util.mybatis3.GeneralMapper ` . This mapper can be injected into a MyBatis configuration
13
+ The general mapper is ` org.mybatis.dynamic.sql.util.mybatis3.CommonSelectMapper ` . This mapper can be injected into a MyBatis configuration
14
14
as is, or it can be extended by an existing mapper. If you are using MyBatis Spring support and auto scanning for mappers,
15
15
you can create an extension in your application's mapper package as follows:
16
16
17
17
``` java
18
18
package foo.mapper ;
19
19
20
20
import org.apache.ibatis.annotations.Mapper ;
21
- import org.mybatis.dynamic.sql.util.mybatis3.GeneralMapper ;
21
+ import org.mybatis.dynamic.sql.util.mybatis3.CommonSelectMapper ;
22
22
23
23
@Mapper
24
- public interface MyGeneralMapper extends GeneralMapper {
24
+ public interface MyGeneralMapper extends CommonSelectMapper {
25
25
}
26
26
```
27
27
@@ -45,11 +45,11 @@ import java.util.List;
45
45
import java.util.Map ;
46
46
import org.mybatis.dynamic.sql.render.RenderingStrategies ;
47
47
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider ;
48
- import org.mybatis.dynamic.sql.util.mybatis3.GeneralMapper ;
48
+ import org.mybatis.dynamic.sql.util.mybatis3.CommonSelectMapper ;
49
49
50
50
public class MyService {
51
51
public List<Map<String ,Object > > generalSearch () {
52
- GeneralMapper mapper = getGeneralMapper(); // not shown
52
+ CommonSelectMapper mapper = getGeneralMapper(); // not shown
53
53
54
54
SelectStatementProvider selectStatement = select(id, description)
55
55
.from(foo)
@@ -76,11 +76,11 @@ import static org.mybatis.dynamic.sql.SqlBuilder.*;
76
76
import java.util.List ;
77
77
import org.mybatis.dynamic.sql.render.RenderingStrategies ;
78
78
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider ;
79
- import org.mybatis.dynamic.sql.util.mybatis3.GeneralMapper ;
79
+ import org.mybatis.dynamic.sql.util.mybatis3.CommonSelectMapper ;
80
80
81
81
public class MyService {
82
82
public List<TableCode > generalSearch () {
83
- GeneralMapper mapper = getGeneralMapper(); // not shown
83
+ CommonSelectMapper mapper = getGeneralMapper(); // not shown
84
84
85
85
SelectStatementProvider selectStatement = select(id, description)
86
86
.from(foo)
@@ -108,11 +108,11 @@ import static org.mybatis.dynamic.sql.SqlBuilder.*;
108
108
109
109
import org.mybatis.dynamic.sql.render.RenderingStrategies ;
110
110
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider ;
111
- import org.mybatis.dynamic.sql.util.mybatis3.GeneralMapper ;
111
+ import org.mybatis.dynamic.sql.util.mybatis3.CommonSelectMapper ;
112
112
113
113
public class MyService {
114
114
public Long getCount () {
115
- GeneralMapper mapper = getGeneralMapper(); // not shown
115
+ CommonSelectMapper mapper = getGeneralMapper(); // not shown
116
116
117
117
SelectStatementProvider selectStatement = countFrom(foo)
118
118
.where(description. isLike(" %bar%" ))
0 commit comments