All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.camunda.bpm.engine.impl.mapping.entity.CaseSentryPart.xml Maven / Gradle / Ivy

Go to download

The Camunda BPMN engine + configurable support for GraalVM and support for CockroachDB.

The newest version!
<?xml version="1.0" encoding="UTF-8" ?>
<!--

    Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
    under one or more contributor license agreements. See the NOTICE file
    distributed with this work for additional information regarding copyright
    ownership. Camunda licenses this file to you under the Apache License,
    Version 2.0; you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 

<mapper namespace="org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseSentryPartEntity">

  <!-- CASE SENTRY PART INSERT -->

  <insert id="insertCaseSentryPart" parameterType="org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseSentryPartEntity">
    insert into ${prefix}ACT_RU_CASE_SENTRY_PART
    (
      ID_,
      REV_,
      CASE_INST_ID_,
      CASE_EXEC_ID_,
      SENTRY_ID_,
      TYPE_,
      STANDARD_EVENT_,
      SATISFIED_,
      SOURCE_,
      VARIABLE_EVENT_,
      VARIABLE_NAME_,
      TENANT_ID_
    )
    values
    (
      #{id, jdbcType=VARCHAR},
      (1),
      #{caseInstanceId, jdbcType=VARCHAR},
      #{caseExecutionId, jdbcType=VARCHAR},
      #{sentryId, jdbcType=VARCHAR},
      #{type, jdbcType=VARCHAR},
      #{standardEvent, jdbcType=VARCHAR},
      #{satisfied, jdbcType=BOOLEAN},
      #{source, jdbcType=VARCHAR},
      #{variableEvent, jdbcType=VARCHAR},
      #{variableName, jdbcType=VARCHAR},
      #{tenantId, jdbcType=VARCHAR}
    )
  </insert>

  <!-- CASE SENTRY PART UPDATE -->

  <update id="updateCaseSentryPart" parameterType="org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseSentryPartEntity">
    update ${prefix}ACT_RU_CASE_SENTRY_PART set
      REV_ = #{revisionNext, jdbcType=INTEGER},
      SATISFIED_ = #{satisfied, jdbcType=BOOLEAN}
    where ID_ = #{id, jdbcType=VARCHAR}
      and REV_ = #{revision, jdbcType=INTEGER}
  </update>

  <!-- CASE SENTRY PART DELETE -->

  <delete id="deleteCaseSentryPart" parameterType="org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseSentryPartEntity">
    delete from ${prefix}ACT_RU_CASE_SENTRY_PART where ID_ = #{id} and REV_ = #{revision}
  </delete>

  <!-- CASE SENTRY PART RESULTMAP -->

  <resultMap id="caseSentryPartResultMap" type="org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseSentryPartEntity">
    <id property="id" column="ID_" jdbcType="VARCHAR" />
    <result property="revision" column="REV_" jdbcType="INTEGER" />
    <result property="caseInstanceId" column="CASE_INST_ID_" jdbcType="VARCHAR" />
    <result property="caseExecutionId" column="CASE_EXEC_ID_" jdbcType="VARCHAR" />
    <result property="sentryId" column="SENTRY_ID_" jdbcType="VARCHAR" />
    <result property="type" column="TYPE_" jdbcType="VARCHAR" />
    <result property="sourceCaseExecutionId" column="SOURCE_CASE_EXEC_ID_" jdbcType="VARCHAR" />
    <result property="standardEvent" column="STANDARD_EVENT_" jdbcType="VARCHAR" />
    <result property="source" column="SOURCE_" jdbcType="VARCHAR" />
    <result property="variableEvent" column="VARIABLE_EVENT_" jdbcType="VARCHAR" />
    <result property="variableName" column="VARIABLE_NAME_" jdbcType="VARCHAR" />
    <result property="satisfied" column="SATISFIED_" jdbcType="BOOLEAN" />
    <result property="tenantId" column="TENANT_ID_" jdbcType="VARCHAR"/>
  </resultMap>

  <!-- CASE SENTRY PART SELECT -->

  <select id="selectCaseSentryPart" parameterType="string" resultMap="caseSentryPartResultMap">
    select * from ${prefix}ACT_RU_CASE_SENTRY_PART
    where ID_ = #{id}
  </select>

  <select id="selectCaseSentryPartsByCaseExecutionId" parameterType="org.camunda.bpm.engine.impl.db.ListQueryParameterObject" resultMap="caseSentryPartResultMap">
    select * from ${prefix}ACT_RU_CASE_SENTRY_PART
    where CASE_EXEC_ID_ = #{parameter}
  </select>

  <select id="selectCaseSentryPartsByQueryCriteria" parameterType="org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseSentryPartQueryImpl" resultMap="caseSentryPartResultMap">
    <include refid="org.camunda.bpm.engine.impl.persistence.entity.Commons.bindOrderBy"/>
    ${limitBefore}
    select ${distinct} RES.* 
    ${limitBetween}
    <include refid="selectCaseSentryPartsByQueryCriteriaSql"/>
    ${orderBy}
    ${limitAfter}
  </select>

  <select id="selectCaseSentryPartsCountByQueryCriteria" parameterType="org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseSentryPartQueryImpl" resultType="long">
    ${countDistinctBeforeStart} RES.ID_ ${countDistinctBeforeEnd}
    <include refid="selectCaseSentryPartsByQueryCriteriaSql"/>
    ${countDistinctAfterEnd}
  </select>

  <sql id="selectCaseSentryPartsByQueryCriteriaSql">
    from ${prefix}ACT_RU_CASE_SENTRY_PART RES
    <where>
      <!-- id -->
      <if test="id != null">
        RES.ID_ = #{id}
      </if>

      <!-- caseInstanceId -->
      <if test="caseInstanceId != null">
        and RES.CASE_INST_ID_ = #{caseInstanceId}
      </if>

      <!-- caseExecutionId -->
      <if test="caseExecutionId != null">
        and RES.CASE_EXEC_ID_ = #{caseExecutionId}
      </if>

      <!-- sentryId -->
      <if test="sentryId != null">
        and RES.SENTRY_ID_ = #{sentryId}
      </if>

      <!-- type -->
      <if test="type != null">
        and RES.TYPE_ = #{type}
      </if>

      <!-- sourceCaseExecutionId -->
      <if test="sourceCaseExecutionId != null">
        and RES.SOURCE_CASE_EXEC_ID_ = #{sourceCaseExecutionId}
      </if>

      <!-- standardEvent -->
      <if test="standardEvent != null">
        and RES.STANDARD_EVENT_ = #{standardEvent}
      </if>

      <!-- variableEvent -->
      <if test="variableEvent != null">
        and RES.VARIABLE_EVENT_ = #{variableEvent}
      </if>

      <!-- variableName -->
      <if test="variableName != null">
        and RES.VARIABLE_NAME_ = #{variableName}
      </if>

      <!-- satisfied -->
      <if test="satisfied">
        and RES.SATISFIED_ = ${trueConstant}
      </if>

    </where>
  </sql>

</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy