<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" 
	"http://www.ibatis.com/dtd/sql-map-2.dtd">
	
<sqlMap namespace="BapBusinessDay">
	<statement id="selectListCount" resultClass="java.lang.Integer">
		SELECT 	COUNT(*) AS "TotalCount"
		FROM $schemaId$.TSEAIBE03
    	<dynamic prepend="WHERE">
		    <isNotEmpty prepend="AND" property="likeBaseDT">
				BASE_DT LIKE #likeBaseDT#
			</isNotEmpty>  
		</dynamic>  			
	</statement>	  
    
	<statement id="update" resultClass="java.lang.Integer">
		UPDATE $schemaId$.TSEAIBE03 
		SET
			LRCL_DT = #LRCL_DT# , 
			LPMN_YN = #LPMN_YN# , 
			HOLDAY_CD = #HOLDAY_CD# 
		WHERE BASE_DT   = #BASE_DT#
	</statement>
	
	<statement id="insert" resultClass="java.lang.Integer">
		INSERT INTO $schemaId$.TSEAIBE03 (
	 		BASE_DT, 
			LRCL_DT, 
			LPMN_YN, 
			HOLDAY_CD
		)
		VALUES (
	 		#BASE_DT#, 
			#LRCL_DT#, 
			#LPMN_YN#, 
			#HOLDAY_CD#
		)
	</statement>

	<statement id="delete" resultClass="java.lang.Integer">
		DELETE 	FROM $schemaId$.TSEAIBE03 
        WHERE BASE_DT = #BASE_DT#
	</statement>

	<!--  Check count -->
    <statement id="checkCount" resultClass="java.lang.Integer">
        SELECT COUNT(BASE_DT)
        FROM   $schemaId$.TSEAIBE03
        WHERE BASE_DT = #BASE_DT#
    </statement>
    
</sqlMap>