dynamic removeFirstPrepend

[언어] JAVA/Java 2015. 2. 20. 15:24

<select id="gcmDAO.selectGcmList" parameterClass="searchVO" resultClass="egovMap">

        SELECT

               PA_ID, SENDER_ID, APP_NAME, API_KEY, PKG_NAME

          FROM GCM

        <dynamic prepend=" WHERE ">

        <isEqual removeFirstPrepend="true" property="searchCondition" compareValue="0">

            <isNotEmpty prepend=" AND " property="searchKeyword">

              PA_ID = #searchKeyword#

            </isNotEmpty>

        </isEqual>

            <isEqual removeFirstPrepend="true" property="searchCondition" compareValue="1">

                <isNotEmpty prepend=" AND " property="searchKeyword">

            SENDER_ID = #searchKeyword#

                </isNotEmpty>

        </isEqual>

        <isEqual removeFirstPrepend="true" property="searchCondition" compareValue="2">

                <isNotEmpty prepend=" AND " property="searchKeyword">

APP_NAME LIKE CONCAT('%', #searchKeyword#, '%')

                </isNotEmpty>

        </isEqual>

        <isEqual removeFirstPrepend="true" property="searchCondition" compareValue="3">

            <isNotEmpty prepend=" AND " property="searchKeyword">

            API_KEY LIKE CONCAT('%', #searchKeyword#, '%')

                </isNotEmpty>

        </isEqual>

        <isEqual removeFirstPrepend="true" property="searchCondition" compareValue="4">

            <isNotEmpty prepend=" AND " property="searchKeyword">

PKG_NAME LIKE CONCAT('%', #searchKeyword#, '%')

                </isNotEmpty>

        </isEqual>

  </dynamic>

         ORDER BY PA_ID DESC

         LIMIT #firstIndex#, #recordCountPerPage#

    </select>

'[언어] JAVA > Java' 카테고리의 다른 글

JDK 1.7 Ant FTP전송 에러  (0) 2015.02.20
Templete  (0) 2015.02.20
e.printStackTrace() 을 String 으로 변환  (0) 2015.02.20
javax.servlet.jsp.tagext.SimpleTagSupport  (0) 2015.02.20
줄바꿈 처리 CR/LF  (0) 2015.02.20
: