package net.wicp.tams.app.duckula.controller.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import net.wicp.tams.app.duckula.controller.bean.models.RtdwFlinktask;
import net.wicp.tams.app.duckula.controller.bean.models.RtdwFlinktaskExample;

public interface RtdwFlinktaskMapper  extends BaseMapper<RtdwFlinktask>{

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	long countByExample(RtdwFlinktaskExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	int deleteByExample(RtdwFlinktaskExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	@Delete({ "delete from rtdw_flinktask", "where id = #{id,jdbcType=BIGINT}" })
	int deleteByPrimaryKey(Long id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	@Insert({ "insert into rtdw_flinktask (id, name, ", "slot, base_img, namespace, ", "user_jar_path, entry_class, ",
			"main_args, flink_config)", "values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ",
			"#{slot,jdbcType=INTEGER}, #{baseImg,jdbcType=BIGINT}, #{namespace,jdbcType=VARCHAR}, ",
			"#{userJarPath,jdbcType=VARCHAR}, #{entryClass,jdbcType=VARCHAR}, ",
			"#{mainArgs,jdbcType=VARCHAR}, #{flinkConfig,jdbcType=VARCHAR})" })
	int insert(RtdwFlinktask record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	int insertSelective(RtdwFlinktask record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	List<RtdwFlinktask> selectByExample(RtdwFlinktaskExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	@Select({ "select", "id, name, slot, base_img, namespace, user_jar_path, entry_class, main_args, ", "flink_config",
			"from rtdw_flinktask", "where id = #{id,jdbcType=BIGINT}" })
	@ResultMap("net.wicp.tams.app.duckula.controller.dao.RtdwFlinktaskMapper.BaseResultMap")
	RtdwFlinktask selectByPrimaryKey(Long id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	int updateByExampleSelective(@Param("record") RtdwFlinktask record, @Param("example") RtdwFlinktaskExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	int updateByExample(@Param("record") RtdwFlinktask record, @Param("example") RtdwFlinktaskExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	int updateByPrimaryKeySelective(RtdwFlinktask record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table rtdw_flinktask
	 * @mbg.generated
	 */
	@Update({ "update rtdw_flinktask", "set name = #{name,jdbcType=VARCHAR},", "slot = #{slot,jdbcType=INTEGER},",
			"base_img = #{baseImg,jdbcType=BIGINT},", "namespace = #{namespace,jdbcType=VARCHAR},",
			"user_jar_path = #{userJarPath,jdbcType=VARCHAR},", "entry_class = #{entryClass,jdbcType=VARCHAR},",
			"main_args = #{mainArgs,jdbcType=VARCHAR},", "flink_config = #{flinkConfig,jdbcType=VARCHAR}",
			"where id = #{id,jdbcType=BIGINT}" })
	int updateByPrimaryKey(RtdwFlinktask record);
}