1 <?xml version="1.0" encoding="UTF-8" ?>
3 Copyright 2016-2017 Huawei Technologies Co., Ltd.
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
18 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
20 namespace="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.mapper.JujuVnfmInfoMapper">
21 <resultMap id="BaseResultMap"
22 type="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfo">
23 <id column="ID" property="id" jdbcType="VARCHAR" />
24 <result column="VNFM_ID" property="vnfmId" jdbcType="VARCHAR" />
25 <result column="VNF_ID" property="vnfId" jdbcType="VARCHAR" />
26 <result column="APP_NAME" property="appName" jdbcType="VARCHAR" />
27 <result column="JOB_ID" property="jobId" jdbcType="VARCHAR" />
28 <result column="STATUS" property="status" jdbcType="INTEGER" />
29 <result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
30 <result column="MODIFY_TIME" property="modifyTime" jdbcType="TIMESTAMP" />
31 <result column="DELETE_TIME" property="deleteTime" jdbcType="TIMESTAMP" />
33 <resultMap id="ResultMapWithBLOBs"
34 type="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfo"
35 extends="BaseResultMap">
36 <result column="EXTEND" property="extend" jdbcType="LONGVARCHAR" />
38 <sql id="Example_Where_Clause">
40 <foreach collection="oredCriteria" item="criteria" separator="or">
41 <if test="criteria.valid">
42 <trim prefix="(" suffix=")" prefixOverrides="and">
43 <foreach collection="criteria.criteria" item="criterion">
45 <when test="criterion.noValue">
46 and ${criterion.condition}
48 <when test="criterion.singleValue">
49 and ${criterion.condition} #{criterion.value}
51 <when test="criterion.betweenValue">
52 and ${criterion.condition} #{criterion.value} and
53 #{criterion.secondValue}
55 <when test="criterion.listValue">
56 and ${criterion.condition}
57 <foreach collection="criterion.value" item="listItem"
58 open="(" close=")" separator=",">
69 <sql id="Update_By_Example_Where_Clause">
71 <foreach collection="example.oredCriteria" item="criteria"
73 <if test="criteria.valid">
74 <trim prefix="(" suffix=")" prefixOverrides="and">
75 <foreach collection="criteria.criteria" item="criterion">
77 <when test="criterion.noValue">
78 and ${criterion.condition}
80 <when test="criterion.singleValue">
81 and ${criterion.condition} #{criterion.value}
83 <when test="criterion.betweenValue">
84 and ${criterion.condition} #{criterion.value} and
85 #{criterion.secondValue}
87 <when test="criterion.listValue">
88 and ${criterion.condition}
89 <foreach collection="criterion.value" item="listItem"
90 open="(" close=")" separator=",">
101 <sql id="Base_Column_List">
102 ID, VNFM_ID, VNF_ID, APP_NAME, JOB_ID, STATUS, CREATE_TIME, MODIFY_TIME,
105 <sql id="Blob_Column_List">
108 <select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs"
109 parameterType="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfoExample">
114 <include refid="Base_Column_List" />
116 <include refid="Blob_Column_List" />
118 <if test="_parameter != null">
119 <include refid="Example_Where_Clause" />
121 <if test="orderByClause != null">
122 order by ${orderByClause}
125 <select id="selectByExample" resultMap="BaseResultMap"
126 parameterType="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfoExample">
131 <include refid="Base_Column_List" />
133 <if test="_parameter != null">
134 <include refid="Example_Where_Clause" />
136 <if test="orderByClause != null">
137 order by ${orderByClause}
139 <if test="limitStart >= 0">
140 limit ${limitStart} , ${limitEnd}
143 <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs"
144 parameterType="java.lang.String">
146 <include refid="Base_Column_List" />
148 <include refid="Blob_Column_List" />
150 where ID = #{id,jdbcType=VARCHAR}
152 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
154 where ID = #{id,jdbcType=VARCHAR}
156 <delete id="deleteByExample"
157 parameterType="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfoExample">
159 <if test="_parameter != null">
160 <include refid="Example_Where_Clause" />
164 parameterType="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfo">
165 insert into jujuvnfm (ID, VNFM_ID, VNF_ID,
166 APP_NAME, JOB_ID, STATUS,
167 CREATE_TIME, MODIFY_TIME, DELETE_TIME,
169 values (#{id,jdbcType=VARCHAR}, #{vnfmId,jdbcType=VARCHAR},
170 #{vnfId,jdbcType=VARCHAR},
171 #{appName,jdbcType=VARCHAR}, #{jobId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
172 #{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP},
173 #{deleteTime,jdbcType=TIMESTAMP},
174 #{extend,jdbcType=LONGVARCHAR})
176 <insert id="insertSelective"
177 parameterType="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfo">
179 <trim prefix="(" suffix=")" suffixOverrides=",">
180 <if test="id != null">
183 <if test="vnfmId != null">
186 <if test="vnfId != null">
189 <if test="appName != null">
192 <if test="jobId != null">
195 <if test="status != null">
198 <if test="createTime != null">
201 <if test="modifyTime != null">
204 <if test="deleteTime != null">
207 <if test="extend != null">
211 <trim prefix="values (" suffix=")" suffixOverrides=",">
212 <if test="id != null">
213 #{id,jdbcType=VARCHAR},
215 <if test="vnfmId != null">
216 #{vnfmId,jdbcType=VARCHAR},
218 <if test="vnfId != null">
219 #{vnfId,jdbcType=VARCHAR},
221 <if test="appName != null">
222 #{appName,jdbcType=VARCHAR},
224 <if test="jobId != null">
225 #{jobId,jdbcType=VARCHAR},
227 <if test="status != null">
228 #{status,jdbcType=INTEGER},
230 <if test="createTime != null">
231 #{createTime,jdbcType=TIMESTAMP},
233 <if test="modifyTime != null">
234 #{modifyTime,jdbcType=TIMESTAMP},
236 <if test="deleteTime != null">
237 #{deleteTime,jdbcType=TIMESTAMP},
239 <if test="extend != null">
240 #{extend,jdbcType=LONGVARCHAR},
244 <select id="countByExample"
245 parameterType="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfoExample"
246 resultType="java.lang.Integer">
247 select count(*) from jujuvnfm
248 <if test="_parameter != null">
249 <include refid="Example_Where_Clause" />
252 <update id="updateByExampleSelective" parameterType="map">
255 <if test="record.id != null">
256 ID = #{record.id,jdbcType=VARCHAR},
258 <if test="record.vnfmId != null">
259 VNFM_ID = #{record.vnfmId,jdbcType=VARCHAR},
261 <if test="record.vnfId != null">
262 VNF_ID = #{record.vnfId,jdbcType=VARCHAR},
264 <if test="record.appName != null">
265 APP_NAME = #{record.appName,jdbcType=VARCHAR},
267 <if test="record.jobId != null">
268 JOB_ID = #{record.jobId,jdbcType=VARCHAR},
270 <if test="record.status != null">
271 STATUS = #{record.status,jdbcType=INTEGER},
273 <if test="record.createTime != null">
274 CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
276 <if test="record.modifyTime != null">
277 MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP},
279 <if test="record.deleteTime != null">
280 DELETE_TIME = #{record.deleteTime,jdbcType=TIMESTAMP},
282 <if test="record.extend != null">
283 EXTEND = #{record.extend,jdbcType=LONGVARCHAR},
286 <if test="_parameter != null">
287 <include refid="Update_By_Example_Where_Clause" />
290 <update id="updateByExampleWithBLOBs" parameterType="map">
292 set ID = #{record.id,jdbcType=VARCHAR},
293 VNFM_ID = #{record.vnfmId,jdbcType=VARCHAR},
294 VNF_ID = #{record.vnfId,jdbcType=VARCHAR},
295 APP_NAME = #{record.appName,jdbcType=VARCHAR},
296 JOB_ID = #{record.jobId,jdbcType=VARCHAR},
297 STATUS = #{record.status,jdbcType=INTEGER},
298 CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
299 MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP},
300 DELETE_TIME = #{record.deleteTime,jdbcType=TIMESTAMP},
301 EXTEND = #{record.extend,jdbcType=LONGVARCHAR}
302 <if test="_parameter != null">
303 <include refid="Update_By_Example_Where_Clause" />
306 <update id="updateByExample" parameterType="map">
308 set ID = #{record.id,jdbcType=VARCHAR},
309 VNFM_ID = #{record.vnfmId,jdbcType=VARCHAR},
310 VNF_ID = #{record.vnfId,jdbcType=VARCHAR},
311 APP_NAME = #{record.appName,jdbcType=VARCHAR},
312 JOB_ID = #{record.jobId,jdbcType=VARCHAR},
313 STATUS = #{record.status,jdbcType=INTEGER},
314 CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
315 MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP},
316 DELETE_TIME = #{record.deleteTime,jdbcType=TIMESTAMP}
317 <if test="_parameter != null">
318 <include refid="Update_By_Example_Where_Clause" />
321 <update id="updateByPrimaryKeySelective"
322 parameterType="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfo">
325 <if test="vnfmId != null">
326 VNFM_ID = #{vnfmId,jdbcType=VARCHAR},
328 <if test="vnfId != null">
329 VNF_ID = #{vnfId,jdbcType=VARCHAR},
331 <if test="appName != null">
332 APP_NAME = #{appName,jdbcType=VARCHAR},
334 <if test="jobId != null">
335 JOB_ID = #{jobId,jdbcType=VARCHAR},
337 <if test="status != null">
338 STATUS = #{status,jdbcType=INTEGER},
340 <if test="createTime != null">
341 CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
343 <if test="modifyTime != null">
344 MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP},
346 <if test="deleteTime != null">
347 DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
349 <if test="extend != null">
350 EXTEND = #{extend,jdbcType=LONGVARCHAR},
353 where ID = #{id,jdbcType=VARCHAR}
355 <update id="updateByPrimaryKeyWithBLOBs"
356 parameterType="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfo">
358 set VNFM_ID = #{vnfmId,jdbcType=VARCHAR},
359 VNF_ID = #{vnfId,jdbcType=VARCHAR},
360 APP_NAME = #{appName,jdbcType=VARCHAR},
361 JOB_ID = #{jobId,jdbcType=VARCHAR},
362 STATUS = #{status,jdbcType=INTEGER},
363 CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
364 MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP},
365 DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
366 EXTEND = #{extend,jdbcType=LONGVARCHAR}
367 where ID = #{id,jdbcType=VARCHAR}
369 <update id="updateByPrimaryKey"
370 parameterType="org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.entity.JujuVnfmInfo">
372 set VNFM_ID = #{vnfmId,jdbcType=VARCHAR},
373 VNF_ID = #{vnfId,jdbcType=VARCHAR},
374 APP_NAME = #{appName,jdbcType=VARCHAR},
375 JOB_ID = #{jobId,jdbcType=VARCHAR},
376 STATUS = #{status,jdbcType=INTEGER},
377 CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
378 MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP},
379 DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP}
380 where ID = #{id,jdbcType=VARCHAR}