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

org.camunda.bpm.engine.impl.mapping.entity.Property.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.persistence.entity.PropertyEntity">

  <!-- PROPERTY INSERT -->
  
  <insert id="insertProperty" parameterType="org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity">
      insert into ${prefix}ACT_GE_PROPERTY (
        NAME_,
        VALUE_,
        REV_
      ) values (
        #{name ,jdbcType=VARCHAR},
        #{value, jdbcType=VARCHAR},
        1
      )
  </insert>

  <!-- PROPERTY UPDATE -->
  
  <update id="updateProperty" parameterType="org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity">
    update ${prefix}ACT_GE_PROPERTY
    <set>
      REV_ = #{revisionNext, jdbcType=INTEGER},
      VALUE_ = #{value, jdbcType=VARCHAR}
    </set>
    where NAME_ = #{name, jdbcType=VARCHAR}
      and REV_ = #{revision, jdbcType=INTEGER}
  </update>

  <!-- PROPERTY DELETE -->
  
  <delete id="deleteProperty" parameterType="org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity">
    delete from ${prefix}ACT_GE_PROPERTY where NAME_ = #{name} and REV_ = #{revision}
  </delete>


  <!-- PROPERTY SELECT -->
  
  <resultMap id="propertyResultMap" type="org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity">
    <id property="name" column="NAME_" jdbcType="VARCHAR" />
    <result property="value" column="VALUE_" jdbcType="VARCHAR" />
    <result property="revision" column="REV_" jdbcType="INTEGER" />
  </resultMap>
  
  <select id="selectDbSchemaVersion" resultType="string">
    select VALUE_ from ${prefix}ACT_GE_PROPERTY where NAME_ = 'schema.version'
  </select>

  <select id="selectProperty" parameterType="string" resultMap="propertyResultMap" flushCache="true">
    select * from ${prefix}ACT_GE_PROPERTY where NAME_ = #{name}
  </select>
  
  <select id="selectProperties" resultMap="propertyResultMap">
    select * from ${prefix}ACT_GE_PROPERTY
  </select>

  <select id="lockDeploymentLockProperty" resultType="string">
    SELECT VALUE_ FROM ${prefix}ACT_GE_PROPERTY WHERE NAME_ = 'deployment.lock' ${constant_for_update}
  </select>

  <select id="lockDeploymentLockProperty_mssql" resultType="string">
    SELECT VALUE_ FROM ${prefix}ACT_GE_PROPERTY WITH (XLOCK, ROWLOCK) WHERE NAME_ = 'deployment.lock'
  </select>

  <select id="lockHistoryCleanupJobLockProperty" resultType="string">
    SELECT VALUE_ FROM ${prefix}ACT_GE_PROPERTY WHERE NAME_ = 'history.cleanup.job.lock' ${constant_for_update}
  </select>

  <select id="lockHistoryCleanupJobLockProperty_mssql" resultType="string">
    SELECT VALUE_ FROM ${prefix}ACT_GE_PROPERTY WITH (XLOCK, ROWLOCK) WHERE NAME_ = 'history.cleanup.job.lock'
  </select>

  <select id="lockStartupLockProperty" resultType="string">
    SELECT VALUE_ FROM ${prefix}ACT_GE_PROPERTY WHERE NAME_ = 'startup.lock' ${constant_for_update}
  </select>

  <select id="lockStartupLockProperty_mssql" resultType="string">
    SELECT VALUE_ FROM ${prefix}ACT_GE_PROPERTY WITH (XLOCK, ROWLOCK) WHERE NAME_ = 'startup.lock'
  </select>

</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy