~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/routineDataValue.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="routineDataValue">
 
8
        
 
9
    <!-- TypeAlias -->
 
10
 
 
11
    <typeAlias alias="routineDataValue" type="org.hisp.dhis.importexport.dhis14.object.Dhis14RoutineDataValue"/>
 
12
        
 
13
    <!-- ResultMap -->
 
14
        
 
15
    <resultMap class="routineDataValue" id="routineDataValueResultMap">
 
16
        <result property="dataElementId" column="DataElementID"/>
 
17
        <result property="periodId" column="DataPeriodID"/>
 
18
        <result property="organisationUnitId" column="OrgUnitID"/>
 
19
        <result property="value" column="EntryNumber" nullValue="0"/>
 
20
        <result property="storedBy" column="lastUserID"/>
 
21
        <result property="comment" column="Comment"/>
 
22
    </resultMap>
 
23
        
 
24
    <!-- Statement -->
 
25
        
 
26
    <select id="getRoutineDataValues" resultMap="routineDataValueResultMap">
 
27
        SELECT * FROM RoutineData
 
28
    </select>
 
29
 
 
30
    <select id="getRoutineDataValuesLastUpdated" parameterClass="java.util.Date" resultMap="routineDataValueResultMap">
 
31
        SELECT * FROM RoutineData WHERE LastUpdated > #value#
 
32
    </select>
 
33
 
 
34
    <select id="getDistinctPeriodIdentifiers" resultClass="java.lang.Integer">
 
35
        SELECT DISTINCT DataPeriodID FROM RoutineData
 
36
    </select>
 
37
 
 
38
</sqlMap>