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

mappers.StreamTransformEntityMapper.xml Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements. See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership. The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); 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.apache.inlong.manager.dao.mapper.StreamTransformEntityMapper">
    <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.StreamTransformEntity">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="inlong_group_id" jdbcType="VARCHAR" property="inlongGroupId"/>
        <result column="inlong_stream_id" jdbcType="VARCHAR" property="inlongStreamId"/>
        <result column="transform_name" jdbcType="VARCHAR" property="transformName"/>
        <result column="transform_type" jdbcType="VARCHAR" property="transformType"/>
        <result column="pre_node_names" jdbcType="VARCHAR" property="preNodeNames"/>
        <result column="post_node_names" jdbcType="VARCHAR" property="postNodeNames"/>
        <result column="transform_definition" jdbcType="VARCHAR" property="transformDefinition"/>
        <result column="version" jdbcType="INTEGER" property="version"/>
        <result column="is_deleted" jdbcType="INTEGER" property="isDeleted"/>
        <result column="creator" jdbcType="VARCHAR" property="creator"/>
        <result column="modifier" jdbcType="VARCHAR" property="modifier"/>
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
        <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/>
    </resultMap>
    <sql id="Base_Column_List">
        id, inlong_group_id, inlong_stream_id, transform_name, transform_type, pre_node_names, post_node_names,
        transform_definition, version, is_deleted, creator, modifier, create_time, modify_time
    </sql>
    <select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from stream_transform
        where id = #{id,jdbcType=INTEGER}
    </select>
    <select id="selectByRelatedId" resultType="org.apache.inlong.manager.dao.entity.StreamTransformEntity">
        select
        <include refid="Base_Column_List"/>
        from stream_transform
        <where>
            is_deleted = 0
            and inlong_group_id = #{groupId, jdbcType=VARCHAR}
            <if test="streamId != null and streamId != ''">
                and inlong_stream_id = #{streamId, jdbcType=VARCHAR}
            </if>
            <if test="transformName != null and transformName != ''">
                and transform_name = #{transformName, jdbcType=VARCHAR}
            </if>
        </where>
    </select>
    <delete id="deleteById" parameterType="java.lang.Integer">
        delete
        from stream_transform
        where id = #{id,jdbcType=INTEGER}
    </delete>
    <insert id="insert" useGeneratedKeys="true" keyProperty="id"
            parameterType="org.apache.inlong.manager.dao.entity.StreamTransformEntity">
        insert into stream_transform (id, inlong_group_id, inlong_stream_id,
                                      transform_name, transform_type, pre_node_names,
                                      post_node_names, transform_definition, version,
                                      is_deleted, creator, modifier,
                                      create_time, modify_time)
        values (#{id,jdbcType=INTEGER}, #{inlongGroupId,jdbcType=VARCHAR}, #{inlongStreamId,jdbcType=VARCHAR},
                #{transformName,jdbcType=VARCHAR}, #{transformType,jdbcType=VARCHAR}, #{preNodeNames,jdbcType=VARCHAR},
                #{postNodeNames,jdbcType=VARCHAR}, #{transformDefinition,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER},
                #{isDeleted,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR}, #{modifier,jdbcType=VARCHAR},
                #{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id"
            parameterType="org.apache.inlong.manager.dao.entity.StreamTransformEntity">
        insert into stream_transform
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="inlongGroupId != null">
                inlong_group_id,
            </if>
            <if test="inlongStreamId != null">
                inlong_stream_id,
            </if>
            <if test="transformName != null">
                transform_name,
            </if>
            <if test="transformType != null">
                transform_type,
            </if>
            <if test="preNodeNames != null">
                pre_node_names,
            </if>
            <if test="postNodeNames != null">
                post_node_names,
            </if>
            <if test="transformDefinition != null">
                transform_definition,
            </if>
            <if test="version != null">
                version,
            </if>
            <if test="isDeleted != null">
                is_deleted,
            </if>
            <if test="creator != null">
                creator,
            </if>
            <if test="modifier != null">
                modifier,
            </if>
            <if test="createTime != null">
                create_time,
            </if>
            <if test="modifyTime != null">
                modify_time,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=INTEGER},
            </if>
            <if test="inlongGroupId != null">
                #{inlongGroupId,jdbcType=VARCHAR},
            </if>
            <if test="inlongStreamId != null">
                #{inlongStreamId,jdbcType=VARCHAR},
            </if>
            <if test="transformName != null">
                #{transformName,jdbcType=VARCHAR},
            </if>
            <if test="transformType != null">
                #{transformType,jdbcType=VARCHAR},
            </if>
            <if test="preNodeNames != null">
                #{preNodeNames,jdbcType=VARCHAR},
            </if>
            <if test="postNodeNames != null">
                #{postNodeNames,jdbcType=VARCHAR},
            </if>
            <if test="transformDefinition != null">
                #{transformDefinition,jdbcType=VARCHAR},
            </if>
            <if test="version != null">
                #{version,jdbcType=INTEGER},
            </if>
            <if test="isDeleted != null">
                #{isDeleted,jdbcType=INTEGER},
            </if>
            <if test="creator != null">
                #{creator,jdbcType=VARCHAR},
            </if>
            <if test="modifier != null">
                #{modifier,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="modifyTime != null">
                #{modifyTime,jdbcType=TIMESTAMP},
            </if>
        </trim>
    </insert>
    <update id="updateByIdSelective" parameterType="org.apache.inlong.manager.dao.entity.StreamTransformEntity">
        update stream_transform
        <set>
            <if test="inlongGroupId != null">
                inlong_group_id = #{inlongGroupId,jdbcType=VARCHAR},
            </if>
            <if test="inlongStreamId != null">
                inlong_stream_id = #{inlongStreamId,jdbcType=VARCHAR},
            </if>
            <if test="transformName != null">
                transform_name = #{transformName,jdbcType=VARCHAR},
            </if>
            <if test="transformType != null">
                transform_type = #{transformType,jdbcType=VARCHAR},
            </if>
            <if test="preNodeNames != null">
                pre_node_names = #{preNodeNames,jdbcType=VARCHAR},
            </if>
            <if test="postNodeNames != null">
                post_node_names = #{postNodeNames,jdbcType=VARCHAR},
            </if>
            <if test="transformDefinition != null">
                transform_definition = #{transformDefinition,jdbcType=VARCHAR},
            </if>
            <if test="version != null">
                version = #{version,jdbcType=INTEGER},
            </if>
            <if test="isDeleted != null">
                is_deleted = #{isDeleted,jdbcType=INTEGER},
            </if>
            <if test="creator != null">
                creator = #{creator,jdbcType=VARCHAR},
            </if>
            <if test="modifier != null">
                modifier = #{modifier,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                create_time = #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="modifyTime != null">
                modify_time = #{modifyTime,jdbcType=TIMESTAMP},
            </if>
        </set>
        where id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateById" parameterType="org.apache.inlong.manager.dao.entity.StreamTransformEntity">
        update stream_transform
        set inlong_group_id      = #{inlongGroupId,jdbcType=VARCHAR},
            inlong_stream_id     = #{inlongStreamId,jdbcType=VARCHAR},
            transform_name       = #{transformName,jdbcType=VARCHAR},
            transform_type       = #{transformType,jdbcType=VARCHAR},
            pre_node_names       = #{preNodeNames,jdbcType=VARCHAR},
            post_node_names      = #{postNodeNames,jdbcType=VARCHAR},
            transform_definition = #{transformDefinition,jdbcType=VARCHAR},
            version              = #{version,jdbcType=INTEGER},
            is_deleted           = #{isDeleted,jdbcType=INTEGER},
            creator              = #{creator,jdbcType=VARCHAR},
            modifier             = #{modifier,jdbcType=VARCHAR},
            create_time          = #{createTime,jdbcType=TIMESTAMP},
            modify_time          = #{modifyTime,jdbcType=TIMESTAMP}
        where id = #{id,jdbcType=INTEGER}
    </update>
</mapper>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy