1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.submitted.sqlprovider;
17
18 import java.util.List;
19 import java.util.Map;
20
21 import org.apache.ibatis.annotations.DeleteProvider;
22 import org.apache.ibatis.annotations.InsertProvider;
23 import org.apache.ibatis.annotations.Param;
24 import org.apache.ibatis.annotations.SelectProvider;
25 import org.apache.ibatis.annotations.UpdateProvider;
26
27 @BaseMapper.Meta(tableName = "users")
28 public interface Mapper extends BaseMapper<User> {
29 @SelectProvider(type = OurSqlBuilder.class, method = "buildGetUsersQuery")
30 List<User> getUsers(List<Integer> allFilterIds);
31
32 @SelectProvider(type = OurSqlBuilder.class, method = "buildGetUserQuery")
33 User getUser(Integer userId);
34
35 @SelectProvider(type = OurSqlBuilder.class, method = "buildGetAllUsersQuery")
36 List<User> getAllUsers();
37
38 @SelectProvider(type = OurSqlBuilder.class, method = "buildGetUsersByCriteriaQuery")
39 List<User> getUsersByCriteria(User criteria);
40
41 @SelectProvider(type = OurSqlBuilder.class, method = "buildGetUsersByCriteriaMapQuery")
42 List<User> getUsersByCriteriaMap(Map<String, Object> criteria);
43
44 @SelectProvider(type = OurSqlBuilder.class, method = "buildGetUsersByCriteriaMapWithParamQuery")
45 List<User> getUsersByCriteriaMapWithParam(Map<String, Object> criteria);
46
47 @SelectProvider(type = OurSqlBuilder.class, method = "buildGetUsersByNameQuery")
48 List<User> getUsersByName(String name, String orderByColumn);
49
50 @SelectProvider(type = OurSqlBuilder.class, method = "buildGetUsersByNameUsingMap")
51 List<User> getUsersByNameUsingMap(String name, String orderByColumn);
52
53 @SelectProvider(type = OurSqlBuilder.class, method = "buildGetUsersByNameWithParamNameAndOrderByQuery")
54 List<User> getUsersByNameWithParamNameAndOrderBy(@Param("name") String name,
55 @Param("orderByColumn") String orderByColumn);
56
57 @SelectProvider(type = OurSqlBuilder.class, method = "buildGetUsersByNameWithParamNameQuery")
58 List<User> getUsersByNameWithParamName(@Param("name") String name);
59
60 @InsertProvider(type = OurSqlBuilder.class, method = "buildInsert")
61 void insert(User user);
62
63 @UpdateProvider(type = OurSqlBuilder.class, method = "buildUpdate")
64 void update(User user);
65
66 @DeleteProvider(type = OurSqlBuilder.class, method = "buildDelete")
67 void delete(Integer id);
68
69 }