blob: bf93c95bd1522d838908c6bb3b5e8907cd6c6182 (
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
|
<?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">
<if test="objectInstances != null and objectInstances.size>0">
insert into object_instance(parent_id, object_instance)
values
<foreach collection="objectInstances" index="index" item="item" separator=",">
(#{parentId}, #{item})
</foreach>
</if>
</insert>
<select id="getObjectInstances" resultType="java.lang.String">
select object_instance from object_instance where parent_id = #{parentId}
</select>
<delete id="deleteObjectInstances">
delete from object_instance where parent_id = #{parentId}
</delete>
<select id="queryAllObjectInstances" resultType="java.lang.String">
select object_instance
from object_instance
</select>
<select id="getParentIdByInstance" resultType="java.lang.String">
select parent_id from object_instance where object_instance = #{objectInstance}
</select>
</mapper>
|