aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/IMFRegInfoMapper.xml
blob: aaca817bac28707df30c1ade8c808ca43694356c (plain)
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
<?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="org.onap.usecaseui.intentanalysis.mapper.IMFRegInfoMapper">

    <insert id="insertIMFRegInfoRegInfo">
        insert into intent_management_function_reg_info(imfr_info_id,imfr_info_description,support_area,support_model,support_interfaces,handle_name,intent_function_type)
        values
            (#{imf.id}, #{imf.description},#{imf.supportArea} , #{imf.supportModel},#{imf.supportInterfaces},#{imf.handleName},#{imf.intentFunctionType})
    </insert>

    <select id="getImfRegInfoList" resultType="org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo">
        select imfr_info_id id,imfr_info_description description,support_area supportArea, support_model supportModel,
               support_interfaces supportInterfaces,handle_name handleName,intent_function_type intentFunctionType
        from intent_management_function_reg_info
    </select>

    <delete id="deleteFunctionManageById">
        delete from intent_management_function_reg_info
        where imfr_info_id = #{id}
    </delete>


    <update id="updateIntentManageById" parameterType="org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo">
        update intent_management_function_reg_info
        <trim prefix="set" suffixOverrides=",">
            <if test="imf.description != null">imfr_info_description = #{imf.description},</if>
            <if test="imf.supportArea != null">support_area = #{imf.supportArea},</if>
            <if test="imf.supportModel != null">support_model = #{imf.supportModel},</if>
            <if test="imf.supportInterfaces != null">support_interfaces = #{imf.supportInterfaces},</if>
            <if test="imf.handleName != null">handle_name = #{imf.handleName},</if>
            <if test="imf.intentFunctionType!= null">intent_function_type = #{imf.intentFunctionType},</if>
        </trim>
        where imfr_info_id = #{imf.id}
    </update>

</mapper>