<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fuxi.ws.data.dao.WShowsetlineMapper">
	<resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.WShowsetline">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		<id column="ShowSetID" property="showsetid" jdbcType="SMALLINT" />
		<id column="LineID" property="lineid" jdbcType="TINYINT" />
		<result column="LineIndex" property="lineindex" jdbcType="TINYINT" />
		<result column="ShowStyle" property="showstyle" jdbcType="SMALLINT" />
	</resultMap>
	<sql id="Example_Where_Clause">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		<where>
			<foreach collection="oredCriteria" item="criteria" separator="or">
				<if test="criteria.valid">
					<trim prefix="(" suffix=")" prefixOverrides="and">
						<foreach collection="criteria.criteria" item="criterion">
							<choose>
								<when test="criterion.noValue">
									and ${criterion.condition}
								</when>
								<when test="criterion.singleValue">
									and ${criterion.condition} #{criterion.value}
								</when>
								<when test="criterion.betweenValue">
									and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
								</when>
								<when test="criterion.listValue">
									and ${criterion.condition}
									<foreach collection="criterion.value" item="listItem" open="(" close=")" separator=",">
										#{listItem}
									</foreach>
								</when>
							</choose>
						</foreach>
					</trim>
				</if>
			</foreach>
		</where>
	</sql>
	<sql id="Base_Column_List">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		ShowSetID, LineID, LineIndex, ShowStyle
	</sql>
	<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.fuxi.ws.data.entity.WShowsetlineExample">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		select
		<if test="distinct">
			distinct
		</if>
		'false' as QUERYID,
		<include refid="Base_Column_List" />
		from W_ShowSetLine
		<if test="_parameter != null">
			<include refid="Example_Where_Clause" />
		</if>
		<if test="orderByClause != null">
			order by ${orderByClause}
		</if>
	</select>
	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.fuxi.ws.data.entity.WShowsetlineKey">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		select
		<include refid="Base_Column_List" />
		from W_ShowSetLine
		where ShowSetID = #{showsetid,jdbcType=SMALLINT}
		and LineID = #{lineid,jdbcType=TINYINT}
	</select>
	<delete id="deleteByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WShowsetlineKey">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		delete from W_ShowSetLine
		where ShowSetID = #{showsetid,jdbcType=SMALLINT}
		and LineID = #{lineid,jdbcType=TINYINT}
	</delete>
	<insert id="insert" parameterType="com.fuxi.ws.data.entity.WShowsetline">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		insert into W_ShowSetLine (ShowSetID, LineID, LineIndex,
		ShowStyle)
		values (#{showsetid,jdbcType=SMALLINT}, #{lineid,jdbcType=TINYINT}, #{lineindex,jdbcType=TINYINT},
		#{showstyle,jdbcType=SMALLINT})
	</insert>
	<insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.WShowsetline">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		insert into W_ShowSetLine
		<trim prefix="(" suffix=")" suffixOverrides=",">
			<if test="showsetid != null">
				ShowSetID,
			</if>
			<if test="lineid != null">
				LineID,
			</if>
			<if test="lineindex != null">
				LineIndex,
			</if>
			<if test="showstyle != null">
				ShowStyle,
			</if>
		</trim>
		<trim prefix="values (" suffix=")" suffixOverrides=",">
			<if test="showsetid != null">
				#{showsetid,jdbcType=SMALLINT},
			</if>
			<if test="lineid != null">
				#{lineid,jdbcType=TINYINT},
			</if>
			<if test="lineindex != null">
				#{lineindex,jdbcType=TINYINT},
			</if>
			<if test="showstyle != null">
				#{showstyle,jdbcType=SMALLINT},
			</if>
		</trim>
	</insert>
	<select id="countByExample" parameterType="com.fuxi.ws.data.entity.WShowsetlineExample" resultType="java.lang.Integer">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		select count(*) from W_ShowSetLine
		<if test="_parameter != null">
			<include refid="Example_Where_Clause" />
		</if>
	</select>
	<update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.WShowsetline">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		update W_ShowSetLine
		<set>
			<if test="lineindex != null">
				LineIndex = #{lineindex,jdbcType=TINYINT},
			</if>
			<if test="showstyle != null">
				ShowStyle = #{showstyle,jdbcType=SMALLINT},
			</if>
		</set>
		where ShowSetID = #{showsetid,jdbcType=SMALLINT}
		and LineID = #{lineid,jdbcType=TINYINT}
	</update>
	<update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WShowsetline">
		<!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 23 12:45:29 CST 2014. -->
		update W_ShowSetLine
		set LineIndex = #{lineindex,jdbcType=TINYINT},
		ShowStyle = #{showstyle,jdbcType=SMALLINT}
		where ShowSetID = #{showsetid,jdbcType=SMALLINT}
		and LineID = #{lineid,jdbcType=TINYINT}
	</update>
	
	
	<delete id="deleteByShowSetId" parameterType="java.lang.Short">
		delete from W_ShowSetLine
		where ShowSetID = #{showsetid,jdbcType=SMALLINT}
	</delete>		
</mapper>