summaryrefslogtreecommitdiffstats
path: root/ResmanagementService/service/src/main/resources/mybatis/mysql/VirtualLinkMapper.xml
diff options
context:
space:
mode:
Diffstat (limited to 'ResmanagementService/service/src/main/resources/mybatis/mysql/VirtualLinkMapper.xml')
-rw-r--r--ResmanagementService/service/src/main/resources/mybatis/mysql/VirtualLinkMapper.xml273
1 files changed, 273 insertions, 0 deletions
diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/VirtualLinkMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/VirtualLinkMapper.xml
new file mode 100644
index 0000000..b4d2394
--- /dev/null
+++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/VirtualLinkMapper.xml
@@ -0,0 +1,273 @@
+<?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.openo.nfvo.resmanagement.service.mapper.VirtualLinkMapper" >
+ <resultMap id="BaseResultMap" type="org.openo.nfvo.resmanagement.service.entity.VirtualLinkEntity" >
+ <id column="id" property="id" jdbcType="VARCHAR" />
+ <result column="name" property="name" jdbcType="VARCHAR" />
+ <result column="backend_id" property="backendId" jdbcType="VARCHAR" />
+ <result column="is_public" property="isPublic" jdbcType="VARCHAR" />
+ <result column="dc_name" property="dcName" jdbcType="VARCHAR" />
+ <result column="vim_id" property="vimId" jdbcType="VARCHAR" />
+ <result column="vim_name" property="vimName" jdbcType="VARCHAR" />
+ <result column="physicial_net" property="physicialNet" jdbcType="VARCHAR" />
+ <result column="ns_id" property="nsId" jdbcType="VARCHAR" />
+ <result column="ns_name" property="nsName" jdbcType="VARCHAR" />
+ <result column="description" property="description" jdbcType="VARCHAR" />
+ <result column="network_type" property="networkType" jdbcType="VARCHAR" />
+ <result column="segmentation" property="segmentation" jdbcType="VARCHAR" />
+ <result column="mtu" property="mtu" jdbcType="VARCHAR" />
+ <result column="vlan_transparent" property="vlanTransparent" jdbcType="VARCHAR" />
+ <result column="router_external" property="routerExternal" jdbcType="VARCHAR" />
+ <result column="resource_provider_type" property="resourceProviderType" jdbcType="VARCHAR" />
+ <result column="resource_provider_id" property="resourceProviderId" jdbcType="VARCHAR" />
+ </resultMap>
+ <sql id="Base_Column_List" >
+ id, name, backend_id, is_public, dc_name, vim_id, vim_name, physicial_net, ns_id,
+ ns_name, description, network_type, segmentation, mtu, vlan_transparent, router_external,
+ resource_provider_type, resource_provider_id
+ </sql>
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+ select
+ <include refid="Base_Column_List" />
+ from vl
+ where id = #{id,jdbcType=VARCHAR}
+ </select>
+ <select id="getVls" resultMap="BaseResultMap" parameterType="java.util.Map">
+ select
+ <include refid="Base_Column_List" />
+ from vl
+ <where>
+ <if test="id != null">
+ AND ID = #{id,jdbcType=VARCHAR}
+ </if>
+ </where>
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+ delete from vl
+ where id = #{id,jdbcType=VARCHAR}
+ </delete>
+ <insert id="insert" parameterType="org.openo.nfvo.resmanagement.service.entity.VirtualLinkEntity" >
+ insert into vl (id, name, backend_id,
+ is_public, dc_name, vim_id,
+ vim_name, physicial_net, ns_id,
+ ns_name, description, network_type,
+ segmentation, mtu, vlan_transparent,
+ router_external, resource_provider_type, resource_provider_id
+ )
+ values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{backendId,jdbcType=VARCHAR},
+ #{isPublic,jdbcType=VARCHAR}, #{dcName,jdbcType=VARCHAR}, #{vimId,jdbcType=VARCHAR},
+ #{vimName,jdbcType=VARCHAR}, #{physicialNet,jdbcType=VARCHAR}, #{nsId,jdbcType=VARCHAR},
+ #{nsName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{networkType,jdbcType=VARCHAR},
+ #{segmentation,jdbcType=VARCHAR}, #{mtu,jdbcType=VARCHAR}, #{vlanTransparent,jdbcType=VARCHAR},
+ #{routerExternal,jdbcType=VARCHAR}, #{resourceProviderType,jdbcType=VARCHAR}, #{resourceProviderId,jdbcType=VARCHAR}
+ )
+ </insert>
+ <insert id="insertSelective" parameterType="org.openo.nfvo.resmanagement.service.entity.VirtualLinkEntity" >
+ insert into vl
+ <trim prefix="(" suffix=")" suffixOverrides="," >
+ <if test="id != null" >
+ id,
+ </if>
+ <if test="name != null" >
+ name,
+ </if>
+ <if test="backendId != null" >
+ backend_id,
+ </if>
+ <if test="isPublic != null" >
+ is_public,
+ </if>
+ <if test="dcName != null" >
+ dc_name,
+ </if>
+ <if test="vimId != null" >
+ vim_id,
+ </if>
+ <if test="vimName != null" >
+ vim_name,
+ </if>
+ <if test="physicialNet != null" >
+ physicial_net,
+ </if>
+ <if test="nsId != null" >
+ ns_id,
+ </if>
+ <if test="nsName != null" >
+ ns_name,
+ </if>
+ <if test="description != null" >
+ description,
+ </if>
+ <if test="networkType != null" >
+ network_type,
+ </if>
+ <if test="segmentation != null" >
+ segmentation,
+ </if>
+ <if test="mtu != null" >
+ mtu,
+ </if>
+ <if test="vlanTransparent != null" >
+ vlan_transparent,
+ </if>
+ <if test="routerExternal != null" >
+ router_external,
+ </if>
+ <if test="resourceProviderType != null" >
+ resource_provider_type,
+ </if>
+ <if test="resourceProviderId != null" >
+ resource_provider_id,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
+ <if test="id != null" >
+ #{id,jdbcType=VARCHAR},
+ </if>
+ <if test="name != null" >
+ #{name,jdbcType=VARCHAR},
+ </if>
+ <if test="backendId != null" >
+ #{backendId,jdbcType=VARCHAR},
+ </if>
+ <if test="isPublic != null" >
+ #{isPublic,jdbcType=VARCHAR},
+ </if>
+ <if test="dcName != null" >
+ #{dcName,jdbcType=VARCHAR},
+ </if>
+ <if test="vimId != null" >
+ #{vimId,jdbcType=VARCHAR},
+ </if>
+ <if test="vimName != null" >
+ #{vimName,jdbcType=VARCHAR},
+ </if>
+ <if test="physicialNet != null" >
+ #{physicialNet,jdbcType=VARCHAR},
+ </if>
+ <if test="nsId != null" >
+ #{nsId,jdbcType=VARCHAR},
+ </if>
+ <if test="nsName != null" >
+ #{nsName,jdbcType=VARCHAR},
+ </if>
+ <if test="description != null" >
+ #{description,jdbcType=VARCHAR},
+ </if>
+ <if test="networkType != null" >
+ #{networkType,jdbcType=VARCHAR},
+ </if>
+ <if test="segmentation != null" >
+ #{segmentation,jdbcType=VARCHAR},
+ </if>
+ <if test="mtu != null" >
+ #{mtu,jdbcType=VARCHAR},
+ </if>
+ <if test="vlanTransparent != null" >
+ #{vlanTransparent,jdbcType=VARCHAR},
+ </if>
+ <if test="routerExternal != null" >
+ #{routerExternal,jdbcType=VARCHAR},
+ </if>
+ <if test="resourceProviderType != null" >
+ #{resourceProviderType,jdbcType=VARCHAR},
+ </if>
+ <if test="resourceProviderId != null" >
+ #{resourceProviderId,jdbcType=VARCHAR},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="org.openo.nfvo.resmanagement.service.entity.VirtualLinkEntity" >
+ update vl
+ <set >
+ <if test="name != null" >
+ name = #{name,jdbcType=VARCHAR},
+ </if>
+ <if test="backendId != null" >
+ backend_id = #{backendId,jdbcType=VARCHAR},
+ </if>
+ <if test="isPublic != null" >
+ is_public = #{isPublic,jdbcType=VARCHAR},
+ </if>
+ <if test="dcName != null" >
+ dc_name = #{dcName,jdbcType=VARCHAR},
+ </if>
+ <if test="vimId != null" >
+ vim_id = #{vimId,jdbcType=VARCHAR},
+ </if>
+ <if test="vimName != null" >
+ vim_name = #{vimName,jdbcType=VARCHAR},
+ </if>
+ <if test="physicialNet != null" >
+ physicial_net = #{physicialNet,jdbcType=VARCHAR},
+ </if>
+ <if test="nsId != null" >
+ ns_id = #{nsId,jdbcType=VARCHAR},
+ </if>
+ <if test="nsName != null" >
+ ns_name = #{nsName,jdbcType=VARCHAR},
+ </if>
+ <if test="description != null" >
+ description = #{description,jdbcType=VARCHAR},
+ </if>
+ <if test="networkType != null" >
+ network_type = #{networkType,jdbcType=VARCHAR},
+ </if>
+ <if test="segmentation != null" >
+ segmentation = #{segmentation,jdbcType=VARCHAR},
+ </if>
+ <if test="mtu != null" >
+ mtu = #{mtu,jdbcType=VARCHAR},
+ </if>
+ <if test="vlanTransparent != null" >
+ vlan_transparent = #{vlanTransparent,jdbcType=VARCHAR},
+ </if>
+ <if test="routerExternal != null" >
+ router_external = #{routerExternal,jdbcType=VARCHAR},
+ </if>
+ <if test="resourceProviderType != null" >
+ resource_provider_type = #{resourceProviderType,jdbcType=VARCHAR},
+ </if>
+ <if test="resourceProviderId != null" >
+ resource_provider_id = #{resourceProviderId,jdbcType=VARCHAR},
+ </if>
+ </set>
+ where id = #{id,jdbcType=VARCHAR}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="org.openo.nfvo.resmanagement.service.entity.VirtualLinkEntity" >
+ update vl
+ set name = #{name,jdbcType=VARCHAR},
+ backend_id = #{backendId,jdbcType=VARCHAR},
+ is_public = #{isPublic,jdbcType=VARCHAR},
+ dc_name = #{dcName,jdbcType=VARCHAR},
+ vim_id = #{vimId,jdbcType=VARCHAR},
+ vim_name = #{vimName,jdbcType=VARCHAR},
+ physicial_net = #{physicialNet,jdbcType=VARCHAR},
+ ns_id = #{nsId,jdbcType=VARCHAR},
+ ns_name = #{nsName,jdbcType=VARCHAR},
+ description = #{description,jdbcType=VARCHAR},
+ network_type = #{networkType,jdbcType=VARCHAR},
+ segmentation = #{segmentation,jdbcType=VARCHAR},
+ mtu = #{mtu,jdbcType=VARCHAR},
+ vlan_transparent = #{vlanTransparent,jdbcType=VARCHAR},
+ router_external = #{routerExternal,jdbcType=VARCHAR},
+ resource_provider_type = #{resourceProviderType,jdbcType=VARCHAR},
+ resource_provider_id = #{resourceProviderId,jdbcType=VARCHAR}
+ where id = #{id,jdbcType=VARCHAR}
+ </update>
+</mapper> \ No newline at end of file