summaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml
diff options
context:
space:
mode:
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml')
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml34
1 files changed, 34 insertions, 0 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml
new file mode 100644
index 0000000..5aa65c5
--- /dev/null
+++ b/intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml
@@ -0,0 +1,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.FulfillmentInfoMapper">
+
+
+ <insert id="insertFulfillmentInfo">
+ insert into fulfillment_info(fulfillment_info_id, fulfillment_info_status, not_fulfilled_state, not_fulfilled_reason)
+ values (#{parentId}, #{fulfillmentInfo.fulfillmentStatus}, #{fulfillmentInfo.notFulfilledState}, #{fulfillmentInfo.notFulfilledReason})
+ </insert>
+
+ <select id="selectFulfillmentInfo" resultType="org.onap.usecaseui.intentanalysis.bean.models.FulfillmentInfo">
+ select fulfillment_info_status fulfillmentStatus, not_fulfilled_state notFulfilledState,
+ not_fulfilled_reason notFulfilledReason
+ from fulfillment_info
+ where fulfillment_info_id = #{parentId}
+ </select>
+
+ <update id="updateFulfillmentInfo">
+ update fulfillment_info
+ <trim prefix="set" suffixOverrides=",">
+ <if test="fulfillmentInfo.fulfillmentStatus != null">fulfillment_info_status = #{fulfillmentInfo.fulfillmentStatus},</if>
+ <if test="fulfillmentInfo.notFulfilledState != null">not_fulfilled_state = #{fulfillmentInfo.notFulfilledState},</if>
+ <if test="fulfillmentInfo.notFulfilledReason != null">not_fulfilled_reason = #{fulfillmentInfo.notFulfilledReason},</if>
+ </trim>
+ where fulfillment_info_id = #{parentId}
+ </update>
+
+ <delete id="deleteFulfillmentInfo" parameterType="string">
+ delete from fulfillment_info
+ where fulfillment_info_id = #{parentId}
+ </delete>
+</mapper>