1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+ <mapper namespace =" org.apache.ibatis.submitted.awful_table.AwfulTableMapper" >
4
+ <resultMap id =" BaseResultMap" type =" org.apache.ibatis.submitted.awful_table.AwfulTable" >
5
+ <id column =" A_CuStOmEr iD" property =" customerId" jdbcType =" INTEGER" />
6
+ <result column =" A_first name" property =" firstFirstName" jdbcType =" VARCHAR" />
7
+ <result column =" A_FIRST_NAME" property =" secondFirstName" jdbcType =" VARCHAR" />
8
+ <result column =" A_FIRSTNAME" property =" thirdFirstName" jdbcType =" VARCHAR" />
9
+ <result column =" A_last name" property =" lastName" jdbcType =" VARCHAR" />
10
+ <result column =" A_E_MAIL" property =" eMail" jdbcType =" VARCHAR" />
11
+ <result column =" A__id1" property =" id1" jdbcType =" INTEGER" />
12
+ <result column =" A_$id2" property =" id2" jdbcType =" INTEGER" />
13
+ <result column =" A_id5_" property =" id5" jdbcType =" INTEGER" />
14
+ <result column =" A_id6$" property =" id6" jdbcType =" INTEGER" />
15
+ <result column =" A_id7$$" property =" id7" jdbcType =" INTEGER" />
16
+ <result column =" A_EMAILADDRESS" property =" emailaddress" jdbcType =" VARCHAR" />
17
+ <result column =" A_from" property =" from" jdbcType =" VARCHAR" />
18
+ <result column =" A_ACTIVE" property =" active" jdbcType =" BIT" />
19
+ </resultMap >
20
+ <sql id =" Base_Column_List" >
21
+ A."CuStOmEr iD" as "A_CuStOmEr iD", A."first name" as "A_first name", A.FIRST_NAME as A_FIRST_NAME,
22
+ A.FIRSTNAME as A_FIRSTNAME, A."last name" as "A_last name", A.E_MAIL as A_E_MAIL,
23
+ A."_id1" as "A__id1", A."$id2" as "A_$id2", A."id5_" as "A_id5_", A."id6$" as "A_id6$",
24
+ A."id7$$" as "A_id7$$", A.EMAILADDRESS as A_EMAILADDRESS, A."from" as "A_from", A.ACTIVE as A_ACTIVE
25
+ </sql >
26
+ <select id =" selectByPrimaryKey" resultMap =" BaseResultMap" parameterType =" java.lang.Integer" >
27
+ select
28
+ <include refid =" Base_Column_List" />
29
+ from "awful table" A
30
+ where A."CuStOmEr iD" = #{customerId,jdbcType=INTEGER}
31
+ </select >
32
+ <delete id =" deleteByPrimaryKey" parameterType =" java.lang.Integer" >
33
+ delete from "awful table"
34
+ where "CuStOmEr iD" = #{customerId,jdbcType=INTEGER}
35
+ </delete >
36
+ <insert id =" insert" parameterType =" org.apache.ibatis.submitted.awful_table.AwfulTable" useGeneratedKeys =" true" keyProperty =" customerId" >
37
+ insert into "awful table" ("first name", FIRST_NAME,
38
+ FIRSTNAME, "last name", E_MAIL,
39
+ "_id1", "$id2", "id5_", "id6$",
40
+ "id7$$", EMAILADDRESS, "from",
41
+ ACTIVE)
42
+ values (#{firstFirstName,jdbcType=VARCHAR}, #{secondFirstName,jdbcType=VARCHAR},
43
+ #{thirdFirstName,jdbcType=VARCHAR}, #{lastName,jdbcType=VARCHAR}, #{eMail,jdbcType=VARCHAR},
44
+ #{id1,jdbcType=INTEGER}, #{id2,jdbcType=INTEGER}, #{id5,jdbcType=INTEGER}, #{id6,jdbcType=INTEGER},
45
+ #{id7,jdbcType=INTEGER}, #{emailaddress,jdbcType=VARCHAR}, #{from,jdbcType=VARCHAR},
46
+ #{active,jdbcType=BIT})
47
+ </insert >
48
+ <insert id =" insertSelective" parameterType =" org.apache.ibatis.submitted.awful_table.AwfulTable" useGeneratedKeys =" true" keyProperty =" customerId" >
49
+ insert into "awful table"
50
+ <trim prefix =" (" suffix =" )" suffixOverrides =" ," >
51
+ <if test =" firstFirstName != null" >
52
+ "first name",
53
+ </if >
54
+ <if test =" secondFirstName != null" >
55
+ FIRST_NAME,
56
+ </if >
57
+ <if test =" thirdFirstName != null" >
58
+ FIRSTNAME,
59
+ </if >
60
+ <if test =" lastName != null" >
61
+ "last name",
62
+ </if >
63
+ <if test =" eMail != null" >
64
+ E_MAIL,
65
+ </if >
66
+ <if test =" id1 != null" >
67
+ "_id1",
68
+ </if >
69
+ <if test =" id2 != null" >
70
+ "$id2",
71
+ </if >
72
+ <if test =" id5 != null" >
73
+ "id5_",
74
+ </if >
75
+ <if test =" id6 != null" >
76
+ "id6$",
77
+ </if >
78
+ <if test =" id7 != null" >
79
+ "id7$$",
80
+ </if >
81
+ <if test =" emailaddress != null" >
82
+ EMAILADDRESS,
83
+ </if >
84
+ <if test =" from != null" >
85
+ "from",
86
+ </if >
87
+ ACTIVE,
88
+ </trim >
89
+ <trim prefix =" values (" suffix =" )" suffixOverrides =" ," >
90
+ <if test =" firstFirstName != null" >
91
+ #{firstFirstName,jdbcType=VARCHAR},
92
+ </if >
93
+ <if test =" secondFirstName != null" >
94
+ #{secondFirstName,jdbcType=VARCHAR},
95
+ </if >
96
+ <if test =" thirdFirstName != null" >
97
+ #{thirdFirstName,jdbcType=VARCHAR},
98
+ </if >
99
+ <if test =" lastName != null" >
100
+ #{lastName,jdbcType=VARCHAR},
101
+ </if >
102
+ <if test =" eMail != null" >
103
+ #{eMail,jdbcType=VARCHAR},
104
+ </if >
105
+ <if test =" id1 != null" >
106
+ #{id1,jdbcType=INTEGER},
107
+ </if >
108
+ <if test =" id2 != null" >
109
+ #{id2,jdbcType=INTEGER},
110
+ </if >
111
+ <if test =" id5 != null" >
112
+ #{id5,jdbcType=INTEGER},
113
+ </if >
114
+ <if test =" id6 != null" >
115
+ #{id6,jdbcType=INTEGER},
116
+ </if >
117
+ <if test =" id7 != null" >
118
+ #{id7,jdbcType=INTEGER},
119
+ </if >
120
+ <if test =" emailaddress != null" >
121
+ #{emailaddress,jdbcType=VARCHAR},
122
+ </if >
123
+ <if test =" from != null" >
124
+ #{from,jdbcType=VARCHAR},
125
+ </if >
126
+ #{active,jdbcType=BIT},
127
+ </trim >
128
+ </insert >
129
+ <update id =" updateByPrimaryKeySelective" parameterType =" org.apache.ibatis.submitted.awful_table.AwfulTable" >
130
+ update "awful table"
131
+ <set >
132
+ <if test =" firstFirstName != null" >
133
+ "first name" = #{firstFirstName,jdbcType=VARCHAR},
134
+ </if >
135
+ <if test =" secondFirstName != null" >
136
+ FIRST_NAME = #{secondFirstName,jdbcType=VARCHAR},
137
+ </if >
138
+ <if test =" thirdFirstName != null" >
139
+ FIRSTNAME = #{thirdFirstName,jdbcType=VARCHAR},
140
+ </if >
141
+ <if test =" lastName != null" >
142
+ "last name" = #{lastName,jdbcType=VARCHAR},
143
+ </if >
144
+ <if test =" eMail != null" >
145
+ E_MAIL = #{eMail,jdbcType=VARCHAR},
146
+ </if >
147
+ <if test =" id1 != null" >
148
+ "_id1" = #{id1,jdbcType=INTEGER},
149
+ </if >
150
+ <if test =" id2 != null" >
151
+ "$id2" = #{id2,jdbcType=INTEGER},
152
+ </if >
153
+ <if test =" id5 != null" >
154
+ "id5_" = #{id5,jdbcType=INTEGER},
155
+ </if >
156
+ <if test =" id6 != null" >
157
+ "id6$" = #{id6,jdbcType=INTEGER},
158
+ </if >
159
+ <if test =" id7 != null" >
160
+ "id7$$" = #{id7,jdbcType=INTEGER},
161
+ </if >
162
+ <if test =" emailaddress != null" >
163
+ EMAILADDRESS = #{emailaddress,jdbcType=VARCHAR},
164
+ </if >
165
+ <if test =" from != null" >
166
+ "from" = #{from,jdbcType=VARCHAR},
167
+ </if >
168
+ <if test =" active != null" >
169
+ ACTIVE = #{active,jdbcType=BIT},
170
+ </if >
171
+ </set >
172
+ where "CuStOmEr iD" = #{customerId,jdbcType=INTEGER}
173
+ </update >
174
+ <update id =" updateByPrimaryKey" parameterType =" org.apache.ibatis.submitted.awful_table.AwfulTable" >
175
+ update "awful table"
176
+ set "first name" = #{firstFirstName,jdbcType=VARCHAR},
177
+ FIRST_NAME = #{secondFirstName,jdbcType=VARCHAR},
178
+ FIRSTNAME = #{thirdFirstName,jdbcType=VARCHAR},
179
+ "last name" = #{lastName,jdbcType=VARCHAR},
180
+ E_MAIL = #{eMail,jdbcType=VARCHAR},
181
+ "_id1" = #{id1,jdbcType=INTEGER},
182
+ "$id2" = #{id2,jdbcType=INTEGER},
183
+ "id5_" = #{id5,jdbcType=INTEGER},
184
+ "id6$" = #{id6,jdbcType=INTEGER},
185
+ "id7$$" = #{id7,jdbcType=INTEGER},
186
+ EMAILADDRESS = #{emailaddress,jdbcType=VARCHAR},
187
+ "from" = #{from,jdbcType=VARCHAR},
188
+ ACTIVE = #{active,jdbcType=BIT}
189
+ where "CuStOmEr iD" = #{customerId,jdbcType=INTEGER}
190
+ </update >
191
+ </mapper >
0 commit comments