'ibatis'에 해당되는 글 1건

  1. 2007.12.07 iBATIS 백업...

iBATIS 백업...

etc 2007.12.07 13:41

configuration...
<sqlMapConfig>

  <properties resource="database.properties"/>
  <settings useStatementNamespaces='true'/>

  <transactionManager type="JDBC" commitRequired="false">
    <dataSource type="SIMPLE">
      <property name="JDBC.Driver" value="${driver}"/>
      <property name="JDBC.ConnectionURL" value="${url}"/>
      <property name="JDBC.Username" value="${username}"/>
      <property name="JDBC.Password" value="${password}"/>
    </dataSource>
  </transactionManager>

  <sqlMap resource="sqlMap/Calander.xml"/>
  <sqlMap resource="sqlMap/User.xml"/>
  <sqlMap resource="sqlMap/Group.xml"/>
  <sqlMap resource="sqlMap/Common.xml"/>

</sqlMapConfig>

Calander
<select id="getGroupMemberSchedule"
          parameterClass="software.project.moim.schedule.actionform.ScheduleValidateForm"
          resultClass="software.project.moim.schedule.actionform.ScheduleForm">
    select concat(startYear, '.', startMonth, '.', startDay) as startKey, sch_key,
           startYear, startMonth, startDay, endYear, endMonth, endDay, startTime, endTime, subject, memo, status, period, user_key, startDate, endDate
    from    schedule_tbl
    where    (startYear = #year:INTEGER#
             AND startMonth = #month:INTEGER#
             AND startDay = #day:INTEGER#)
            AND
            (
             (group_key = #group_key:INTEGER#
              OR user_key in (select user_key
                             from user_group_tbl
                             where group_key = #group_key:INETGER#))
            OR
              (group_key in (select group_key from user_group_tbl
                            where user_key in (select user_key
                                               from user_group_tbl
                                               where group_key = #group_key:INETGER#
                                               )
                           )
             ))
  </select>

Posted by HiKi
TAG ,