aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
blob: b158eb24d44cbc19402f9abcc0daa2b27d9bd43b (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
<?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.ExpectationObjectMapper">


    <insert id="insertExpectationObject">
        <if test="expectationObject != null">
            insert into expectation_object(object_type, object_instance, expectation_id)
            values
            (#{expectationObject.objectType}, #{expectationObject.objectInstance}, #{expectationId})
        </if>
    </insert>

    <select id="selectIntentExpectationObjectByExpectationId" resultType="org.onap.usecaseui.intentanalysis.bean.models.ExpectationObject">
        select object_type objectType, object_instance objectInstance
        from expectation_object
        where expectation_id = #{expectationId}
    </select>

    <select id="selectExpectationObjectId" resultType="java.lang.String">
        select object_id
        from expectation_object
        where expectation_id = #{expectationId}
    </select>

</mapper>