insert into state(state_id, state_name, expectation_id, is_satisfied, condition)
values
(#{item.stateId}, #{item.stateName}, #{expectationId}, #{item.isSatisfied}, #{item.condition})
delete from state
where expectation_id = #{expectationId}
insert into state(state_id, state_name, expectation_id, is_satisfied, condition)
values (#{state.stateId}, #{state.stateName}, #{expectationId}, #{state.isSatisfied}, #{state.condition})
update state
state_name = #{stateName},
is_satisfied = #{isSatisfied},
condition = #{condition},
where state_id = #{stateId}
delete
from state
where state_id = #{stateId}