<?xml version="1.0" encoding="gbk" standalone="no"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="RH_demoName">
<!-- 	<typeAlias alias="RH_demoNamebean" type="cn.vp.XXX.model.RH_demoNameBean"/> -->
	
	<sql id="condition_RH_demoName">
		where 1=1
		RH_conditionList		
	</sql>
	
	<!-- add object -->
	<insert id="insert_RH_demoName" parameterClass="java.util.Map">
		insert into 
		RH_TABLENAME(
		<dynamic prepend=" ">  
			RH_insertFieldNameList
		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			RH_insertParamNameList
		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_RH_demoName" parameterClass="java.util.Map">
		update RH_TABLENAME 
		<dynamic prepend="set ">   
			RH_updateFieldNameList
		</dynamic>
		where 1=1 
			RH_updateParamNameList
	</update>
	
	<!-- delete object -->
	<delete id="delete_RH_demoName" parameterClass="java.util.Map">
		delete from RH_TABLENAME 
		<include refid="condition_RH_demoName"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_RH_demoName" parameterClass="java.util.Map">
		delete from RH_TABLENAME 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_RH_demoName" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			RH_selectFieldNameList			
		from RH_TABLENAME 
		<include refid="condition_RH_demoName"/>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_RH_demoName" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from RH_TABLENAME 
		<include refid="condition_RH_demoName"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_RH_demoName" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into RH_TABLENAME(
			 <![CDATA[ 
				RH_batchInsert_FieldNameList
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
					RH_batchInsert_ParaNameList
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











