aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/ObjectInstanceMapper.xml
blob: 8cf9b3c655ec928decef56d6e0fd701c6756f47b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?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.ObjectInstanceMapper">

    <insert id="insertObjectInstanceList">
        insert into object_instance(parent_id, object_instance)
        values
        <foreach collection="objectInstances" index="index" item="item" separator=",">
            (#{parentId}, #{item})
        </foreach>
    </insert>

    <select id="getObjectInstances" resultType="java.lang.String">
        select object_instance from object_instance where parent_id = #{parentId}
    </select>
</mapper>