<?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="ClassInfo">
	<statement id="list"  resultClass="java.util.HashMap">
		SELECT
		   TELGMCLSNAME,
			TELGMCLSDESC,
		   ROWNO
		 FROM(
		 SELECT
		   TELGMCLSNAME,
			TELGMCLSDESC,
		   @NO := @NO + 1 AS ROWNO
		 FROM $schemaId$.TSEAIBR01,  (SELECT @NO := 0) R
		 <isNotEmpty prepend="WHERE" property="searchTelgmClsName">
			TelgmClsName LIKE CONCAT('%' , #searchTelgmClsName# , '%')
		 </isNotEmpty>
			ORDER BY TelgmClsName
		) TMP
		WHERE ROWNO BETWEEN #startNum# AND #endNum#
			
	</statement>	

	<statement id="count"  resultClass="java.lang.Integer">
		SELECT 	COUNT(*) AS "TotalCount"
		FROM $schemaId$.TSEAIBR01
	    <isNotEmpty prepend="WHERE" property="searchTelgmClsName">
			TelgmClsName LIKE  CONCAT('%' , #searchTelgmClsName# , '%')
		</isNotEmpty> 			
	</statement>	
 
</sqlMap>