~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/onChangePeriod.sqlmap.xml

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8" ?>
 
2
 
 
3
<!DOCTYPE sqlMap
 
4
        PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
 
5
        "http://ibatis.apache.org/dtd/sql-map-2.dtd">
 
6
 
 
7
<sqlMap namespace="onChangePeriod">
 
8
        
 
9
        <!-- TypeAlias -->
 
10
        
 
11
        <typeAlias alias="period" type="org.hisp.dhis.period.Period"/>
 
12
        <typeAlias alias="dateTypeHandler" type="org.hisp.dhis.importexport.dhis14.file.typehandler.DateTypeHandler"/>
 
13
        
 
14
        <!-- ResultMap -->
 
15
        
 
16
        <resultMap class="period" id="onChangePeriodResultMap">
 
17
            <result property="periodType" column="DataPeriodTypeID" typeHandler="periodTypeTypeHandler"/>
 
18
                <result property="startDate" column="ValidFrom" typeHandler="dateTypeHandler"/>
 
19
                <result property="endDate" column="ValidTo" typeHandler="dateTypeHandler"/>
 
20
        </resultMap>
 
21
        
 
22
        <!-- Statement -->
 
23
        
 
24
        <select id="getOnChangePeriods" resultMap="onChangePeriodResultMap">
 
25
                SELECT SemiPermanentData.ValidFrom, SemiPermanentData.ValidTo, DataElement.DataPeriodTypeID 
 
26
                FROM SemiPermanentData, DataElement
 
27
                WHERE SemiPermanentData.DataElementID = DataElement.DataElementID
 
28
        </select>
 
29
                
 
30
</sqlMap>