1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
44
45
46
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2016-2017, Huawei Technologies Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="org.onap.vfc.nfvo.resmanagement.service.mapper.VnfInfoMapper" >
<resultMap id="BaseResultMap" type="org.onap.vfc.nfvo.resmanagement.service.entity.VnfInfoEntity" >
<id column="vnf_instance_id" property="vnfInstanceId" jdbcType="VARCHAR" />
<result column="ns_id" property="nsId" jdbcType="VARCHAR" />
<result column="vnfm_id" property="vnfmId" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
vnf_instance_id, ns_id, vnfm_id
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from vnfinfo
where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR}
</select>
<select id="getVnfInfos" resultMap="BaseResultMap" parameterType="java.util.Map">
select
<include refid="Base_Column_List" />
from vnf
<where>
<if test="vnfInstanceId != null">
AND vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR}
</if>
</where>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from vnfinfo
where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="org.onap.vfc.nfvo.resmanagement.service.entity.VnfInfoEntity" >
insert into vnfinfo (vnf_instance_id, ns_id, vnfm_id
)
values (#{vnfInstanceId,jdbcType=VARCHAR}, #{nsId,jdbcType=VARCHAR}, #{vnfmId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="org.onap.vfc.nfvo.resmanagement.service.entity.VnfInfoEntity" >
insert into vnfinfo
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="vnfInstanceId != null" >
vnf_instance_id,
</if>
<if test="nsId != null" >
ns_id,
</if>
<if test="vnfmId != null" >
vnfm_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="vnfInstanceId != null" >
#{vnfInstanceId,jdbcType=VARCHAR},
</if>
<if test="nsId != null" >
#{nsId,jdbcType=VARCHAR},
</if>
<if test="vnfmId != null" >
#{vnfmId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="org.onap.vfc.nfvo.resmanagement.service.entity.VnfInfoEntity" >
update vnfinfo
<set >
<if test="nsId != null" >
ns_id = #{nsId,jdbcType=VARCHAR},
</if>
<if test="vnfmId != null" >
vnfm_id = #{vnfmId,jdbcType=VARCHAR},
</if>
</set>
where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="org.onap.vfc.nfvo.resmanagement.service.entity.VnfInfoEntity" >
update vnfinfo
set ns_id = #{nsId,jdbcType=VARCHAR},
vnfm_id = #{vnfmId,jdbcType=VARCHAR}
where vnf_instance_id = #{vnfInstanceId,jdbcType=VARCHAR}
</update>
</mapper>
|