blob: 58391c5d596c73122c287149608ba1bf2508e3a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
<?xml version="1.0" encoding="utf-8"?>
<sqlMap namespace="Enumeration" >
<resultMaps>
<resultMap id="enumeration-result" class="Enumeration" >
<result property="Id" column="Enum_ID"/>
<result property="Day" column="Enum_Day"/>
<result property="Color" column="Enum_Color"/>
<result property="Month" column="Enum_Month" nullValue="All"/>
</resultMap>
</resultMaps>
<statements>
<select id="GetEnumerationNullValue"
parameterClass="Integer"
resultMap="enumeration-result">
select
Enum_ID,
Enum_Day,
Enum_Color,
Enum_Month
from Enumerations
where Enum_ID = #value#
</select>
<select id="GetEnumeration" parameterClass="Integer" resultClass="Enumeration">
select
Enum_ID as Id,
Enum_Day as Day,
Enum_Color as Color,
Enum_Month as Month
from Enumerations
where Enum_ID = #value#
</select>
<insert id="InsertEnumViaParameterMap" parameterMap="insert-params" >
insert into Enumerations
(Enum_ID, Enum_Day, Enum_Color, Enum_Month)
values
(?, ?, ?, ?)
</insert>
</statements>
<parameterMaps>
<parameterMap id="insert-params">
<parameter property="Id" column="Enum_ID" />
<parameter property="Day" column="Enum_Day"/>
<parameter property="Color" column="Enum_Color" />
<parameter property="Month" column="Enum_Month" nullValue="All"/>
</parameterMap>
</parameterMaps>
</sqlMap>
|