Clover.NET coverage report - Coverage

Coverage timestamp: Friday, May 20, 2005 9:17:00 PM

File Stats: LOC: 115   Methods: 7
NCLOC: 47 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Configuration\ResultMapping\SubMap.cs - 66.7 % 71.4 % 69.2 %
coverage coverage
1  
2   #region Apache Notice
3   /*****************************************************************************
4   * $Header: $
5   * $Revision: $
6   * $Date: $
7   * Author : Gilles Bayon
8   * iBATIS.NET Data Mapper
9   * Copyright (C) 2004 - Apache Fondation
10   *
11   *
12   * Licensed under the Apache License, Version 2.0 (the "License");
13   * you may not use this file except in compliance with the License.
14   * You may obtain a copy of the License at
15   *
16   * http://www.apache.org/licenses/LICENSE-2.0
17   *
18   * Unless required by applicable law or agreed to in writing, software
19   * distributed under the License is distributed on an "AS IS" BASIS,
20   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21   * See the License for the specific language governing permissions and
22   * limitations under the License.
23   *
24   ********************************************************************************/
25   #endregion
26  
27   #region Using
28  
29   using System;
30   using System.Xml.Serialization;
31  
32   #endregion
33  
34   namespace IBatisNet.DataMapper.Configuration.ResultMapping
35   {
36   /// <summary>
37   /// Summary description for SubMap.
38   /// </summary>
39   [Serializable]
40   [XmlRoot("subMap")]
41   public class SubMap
42   {
43   // <resultMap id="document" class="Document">
44   // <result property="Id" column="Document_ID"/>
45   // <result property="Title" column="Document_Title"/>
46   // <discriminator column="Document_Type" [formula="CustomFormula, AssemblyName"] />
47   // -- attribute column (not used if discriminator use a custom formula)
48   // -- attribute formula (not required will used the DefaultFormula) calculate the discriminator value (DefaultFormula is default), else used an aliasType wich implement IDiscriminatorFormula),
49   // <subMap value="Book" -- discriminator value
50   // resultMapping="book" />
51   // </resultMap>
52   //
53   // <resultMap
54   // id="book"
55   // class="Book"
56   // extend="document">
57   // ...
58   // </resultMap>
59  
60   #region Fields
61   [NonSerialized]
62   private string _discriminatorValue = string.Empty;
63   [NonSerialized]
64   private string _resultMapName = string.Empty;
65   [NonSerialized]
66   private ResultMap _resultMap = null;
67   #endregion
68  
69   #region Properties
70  
71   /// <summary>
72   /// Discriminator value
73   /// </summary>
74   [XmlAttribute("value")]
75   public string DiscriminatorValue
76   {
77 680 get { return _discriminatorValue; }
78 680 set { _discriminatorValue = value; }
79   }
80  
81   /// <summary>
82   /// The name of the ResultMap used if the column value is = to the Discriminator Value
83   /// </summary>
84   [XmlAttribute("resultMapping")]
85   public string ResultMapName
86   {
87 1360 get { return _resultMapName; }
88 1360 set { _resultMapName = value; }
89   }
90  
91   /// <summary>
92   /// The resultMap used if the column value is = to the Discriminator Value
93   /// </summary>
94 0 [XmlIgnore]
95   public ResultMap ResultMap
96   {
97   get { return _resultMap; }
98   set { _resultMap = value; }
99   }
100  
101   #endregion
102  
103   #region Constructor
104  
105   /// <summary>
106   /// Constructor
107   /// </summary>
108 680 public SubMap()
109   {
110   }
111   #endregion
112  
113   }
114   }
115