aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
diff options
context:
space:
mode:
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml')
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml15
1 files changed, 14 insertions, 1 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
index b158eb2..1c8b513 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
@@ -13,7 +13,7 @@
</if>
</insert>
- <select id="selectIntentExpectationObjectByExpectationId" resultType="org.onap.usecaseui.intentanalysis.bean.models.ExpectationObject">
+ <select id="selectExpectationObject" resultType="org.onap.usecaseui.intentanalysis.bean.models.ExpectationObject">
select object_type objectType, object_instance objectInstance
from expectation_object
where expectation_id = #{expectationId}
@@ -25,4 +25,17 @@
where expectation_id = #{expectationId}
</select>
+ <update id="updateExpectationObject">
+ update expectation_object
+ <trim prefix="set" suffixOverrides=",">
+ <if test="expectationObject.objectType != null">object_type = #{expectationObject.objectType},</if>
+ <if test="expectationObject.objectInstance != null">object_instance = #{expectationObject.objectInstance},</if>
+ </trim>
+ where expectation_id = #{expectationId}
+ </update>
+
+ <delete id="deleteExpectationObject">
+ delete from expectation_object
+ where expectation_id = #{expectationId}
+ </delete>
</mapper>