aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/IntentInstanceMapper.xml
blob: 3534e78aa12e455d1373d9894a70f4eab88c9f07 (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
<?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.IntentInstanceMapper">
    <insert id="insertIntentInstance">
        insert into  intent_instance(intent_instance_id,intent_id)
        values (#{intentInstance.intentInstanceId},#{intentInstance.intentId});
    </insert>

    <select id="selectIntentInstanceByIntentId" resultType="java.lang.String">
        select intent_instance_id from intent_instance
        where intent_id = #{intentId}
    </select>

    <delete id="deleteIntentInstances">
        delete from intent_instance where intent_id = #{intentId}
    </delete>

    <select id="selectIntentInstance"
            resultType="org.onap.usecaseui.intentanalysis.bean.models.IntentInstance">
        select intent_instance_id intentInstanceId,intent_id intentId from intent_instance
        where intent_instance_id = #{intentInstanceId}
    </select>
</mapper>