KeyValueReferenceMapper.xml 11.7 KB
Newer Older
1 2 3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.dao.KeyValueReferenceMapper">
4
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.KeyValueReference">
5 6 7 8
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
9 10 11 12 13 14 15
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="key_value_config_id" jdbcType="VARCHAR" property="keyValueConfigId" />
    <result column="scope" jdbcType="INTEGER" property="scope" />
    <result column="cell_template_id" jdbcType="BIGINT" property="cellTemplateId" />
    <result column="model_id" jdbcType="VARCHAR" property="modelId" />
    <result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
    <result column="industry_id" jdbcType="VARCHAR" property="industryId" />
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
44
            </foreach>
45
          </trim>
46
        </if>
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
79
        </if>
80 81 82 83 84 85 86 87
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
88
    id, key_value_config_id, scope, cell_template_id, model_id, organization_id, industry_id
89
  </sql>
90
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.KeyValueReferenceExample" resultMap="BaseResultMap">
91 92 93 94 95 96 97 98 99
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
gary's avatar
gary committed
100
    from key_value_reference
101 102 103 104 105 106 107 108 109 110 111 112 113 114
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
gary's avatar
gary committed
115 116
    from key_value_reference
    where id = #{id,jdbcType=VARCHAR}
117 118 119 120 121 122
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
123 124
    delete from key_value_reference
    where id = #{id,jdbcType=VARCHAR}
125
  </delete>
126
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.KeyValueReferenceExample">
127 128 129 130
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
131
    delete from key_value_reference
132 133 134 135
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
136
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.KeyValueReference">
137 138 139 140
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
141 142 143 144 145 146
    insert into key_value_reference (id, key_value_config_id, scope, 
      cell_template_id, model_id, organization_id, 
      industry_id)
    values (#{id,jdbcType=VARCHAR}, #{keyValueConfigId,jdbcType=VARCHAR}, #{scope,jdbcType=INTEGER}, 
      #{cellTemplateId,jdbcType=BIGINT}, #{modelId,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR}, 
      #{industryId,jdbcType=VARCHAR})
147
  </insert>
148
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.KeyValueReference">
149 150 151 152
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
153
    insert into key_value_reference
154
    <trim prefix="(" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
155 156
      <if test="id != null">
        id,
157
      </if>
gary's avatar
gary committed
158 159
      <if test="keyValueConfigId != null">
        key_value_config_id,
160 161
      </if>
      <if test="scope != null">
gary's avatar
gary committed
162
        scope,
163
      </if>
gary's avatar
gary committed
164 165
      <if test="cellTemplateId != null">
        cell_template_id,
166
      </if>
gary's avatar
gary committed
167 168
      <if test="modelId != null">
        model_id,
169
      </if>
gary's avatar
gary committed
170 171
      <if test="organizationId != null">
        organization_id,
172
      </if>
gary's avatar
gary committed
173 174
      <if test="industryId != null">
        industry_id,
175 176 177
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
178 179
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
180
      </if>
gary's avatar
gary committed
181 182
      <if test="keyValueConfigId != null">
        #{keyValueConfigId,jdbcType=VARCHAR},
183 184
      </if>
      <if test="scope != null">
gary's avatar
gary committed
185
        #{scope,jdbcType=INTEGER},
186
      </if>
gary's avatar
gary committed
187 188
      <if test="cellTemplateId != null">
        #{cellTemplateId,jdbcType=BIGINT},
189
      </if>
gary's avatar
gary committed
190 191
      <if test="modelId != null">
        #{modelId,jdbcType=VARCHAR},
192
      </if>
gary's avatar
gary committed
193 194
      <if test="organizationId != null">
        #{organizationId,jdbcType=VARCHAR},
195
      </if>
gary's avatar
gary committed
196 197
      <if test="industryId != null">
        #{industryId,jdbcType=VARCHAR},
198 199 200
      </if>
    </trim>
  </insert>
201
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.KeyValueReferenceExample" resultType="java.lang.Long">
202 203 204 205
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
206
    select count(*) from key_value_reference
207 208 209 210 211 212 213 214 215
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
216
    update key_value_reference
217
    <set>
gary's avatar
gary committed
218 219
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
220
      </if>
gary's avatar
gary committed
221 222
      <if test="record.keyValueConfigId != null">
        key_value_config_id = #{record.keyValueConfigId,jdbcType=VARCHAR},
223 224
      </if>
      <if test="record.scope != null">
gary's avatar
gary committed
225
        scope = #{record.scope,jdbcType=INTEGER},
226
      </if>
gary's avatar
gary committed
227 228
      <if test="record.cellTemplateId != null">
        cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT},
229
      </if>
gary's avatar
gary committed
230 231
      <if test="record.modelId != null">
        model_id = #{record.modelId,jdbcType=VARCHAR},
232
      </if>
gary's avatar
gary committed
233 234
      <if test="record.organizationId != null">
        organization_id = #{record.organizationId,jdbcType=VARCHAR},
235
      </if>
gary's avatar
gary committed
236 237
      <if test="record.industryId != null">
        industry_id = #{record.industryId,jdbcType=VARCHAR},
238 239 240 241 242 243 244 245 246 247 248
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
249 250 251 252 253 254 255 256
    update key_value_reference
    set id = #{record.id,jdbcType=VARCHAR},
      key_value_config_id = #{record.keyValueConfigId,jdbcType=VARCHAR},
      scope = #{record.scope,jdbcType=INTEGER},
      cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT},
      model_id = #{record.modelId,jdbcType=VARCHAR},
      organization_id = #{record.organizationId,jdbcType=VARCHAR},
      industry_id = #{record.industryId,jdbcType=VARCHAR}
257 258 259 260
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
261
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.KeyValueReference">
262 263 264 265
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
266
    update key_value_reference
267
    <set>
gary's avatar
gary committed
268 269
      <if test="keyValueConfigId != null">
        key_value_config_id = #{keyValueConfigId,jdbcType=VARCHAR},
270 271
      </if>
      <if test="scope != null">
gary's avatar
gary committed
272
        scope = #{scope,jdbcType=INTEGER},
273
      </if>
gary's avatar
gary committed
274 275
      <if test="cellTemplateId != null">
        cell_template_id = #{cellTemplateId,jdbcType=BIGINT},
276
      </if>
gary's avatar
gary committed
277 278
      <if test="modelId != null">
        model_id = #{modelId,jdbcType=VARCHAR},
279
      </if>
gary's avatar
gary committed
280 281
      <if test="organizationId != null">
        organization_id = #{organizationId,jdbcType=VARCHAR},
282
      </if>
gary's avatar
gary committed
283 284
      <if test="industryId != null">
        industry_id = #{industryId,jdbcType=VARCHAR},
285 286
      </if>
    </set>
gary's avatar
gary committed
287
    where id = #{id,jdbcType=VARCHAR}
288
  </update>
289
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.KeyValueReference">
290 291 292 293
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
294 295 296 297 298 299 300 301
    update key_value_reference
    set key_value_config_id = #{keyValueConfigId,jdbcType=VARCHAR},
      scope = #{scope,jdbcType=INTEGER},
      cell_template_id = #{cellTemplateId,jdbcType=BIGINT},
      model_id = #{modelId,jdbcType=VARCHAR},
      organization_id = #{organizationId,jdbcType=VARCHAR},
      industry_id = #{industryId,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
302
  </update>
303
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.KeyValueReferenceExample" resultMap="BaseResultMap">
304 305 306 307 308 309 310 311 312
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
gary's avatar
gary committed
313
    from key_value_reference
314 315 316 317 318 319 320
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
321
</mapper>