Clover.NET coverage report - Coverage for s2container.net

Coverage timestamp: 2006年5月30日 11:21:29

File Stats: LOC: 136   Methods: 14
NCLOC: 95 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Extension.ADO\Impl\PropertyTypeImpl.cs - 73.7% 50.0% 63.6%
coverage coverage
1   #region Copyright
2   /*
3   * Copyright 2005 the Seasar Foundation and the Others.
4   *
5   * Licensed under the Apache License, Version 2.0 (the "License");
6   * you may not use this file except in compliance with the License.
7   * You may obtain a copy of the License at
8   *
9   * http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14   * either express or implied. See the License for the specific language
15   * governing permissions and limitations under the License.
16   */
17   #endregion
18  
19   using System;
20   using System.Reflection;
21   using Seasar.Extension.ADO.Types;
22  
23   namespace Seasar.Extension.ADO.Impl
24   {
25   public class PropertyTypeImpl : IPropertyType
26   {
27   private PropertyInfo propertyInfo;
28   private string propertyName;
29   private string columnName;
30   private IValueType valueType;
31   private bool primaryKey = false;
32   private bool persistent = true;
33   private Type propertyType;
34  
35 0 public PropertyTypeImpl(PropertyInfo propertyInfo)
36   : this(propertyInfo, ValueTypes.OBJECT, propertyInfo.Name)
37   {
38   }
39  
40 0 public PropertyTypeImpl(PropertyInfo propertyInfo, IValueType valueType)
41   : this(propertyInfo, valueType, propertyInfo.Name)
42   {
43   }
44  
45 20 public PropertyTypeImpl(PropertyInfo propertyInfo, IValueType valueType,
46   string columnName)
47   {
48 20 this.propertyInfo = propertyInfo;
49 20 this.propertyName = propertyInfo.Name;
50 20 this.valueType = valueType;
51 20 this.columnName = columnName;
52 20 this.propertyType = propertyInfo.PropertyType;
53   }
54  
55 136 public PropertyTypeImpl(string propertyName, IValueType valueType, Type propertyType)
56   {
57 136 this.propertyName = propertyName;
58 136 this.valueType = valueType;
59 136 this.columnName = propertyName;
60 136 this.propertyType = propertyType;
61   }
62  
63   #region IPropertyType メンバ
64  
65   public System.Reflection.PropertyInfo PropertyInfo
66   {
67 137 get
68   {
69 137 return propertyInfo;
70   }
71   }
72  
73   public IValueType ValueType
74   {
75 606 get
76   {
77 606 return valueType;
78   }
79   }
80  
81   public string PropertyName
82   {
83 249 get
84   {
85 249 return propertyName;
86   }
87   }
88  
89   public string ColumnName
90   {
91 137 get
92   {
93 137 return columnName;
94   }
95 0 set
96   {
97   columnName = value;
98   }
99   }
100  
101 0 public bool IsPrimaryKey
102   {
103   get
104   {
105   return primaryKey;
106   }
107   set
108   {
109   primaryKey = value;
110   }
111   }
112  
113 0 public bool IsPersistent
114   {
115   get
116   {
117   return persistent;
118   }
119   set
120   {
121   persistent = value;
122   }
123   }
124  
125   public Type PropertyType
126   {
127 376 get
128   {
129 376 return propertyType;
130   }
131   }
132  
133   #endregion
134   }
135   }
136