Clover.NET coverage report - Coverage for s2dao.net

Coverage timestamp: 2006年5月30日 11:48:56

File Stats: LOC: 106   Methods: 13
NCLOC: 73 Classes: 1
 
Source File Conditionals Statements Methods TOTAL
Seasar.Dao.Attrs\AttributeUtil.cs - 100.0% 92.3% 96.0%
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  
22   namespace Seasar.Dao.Attrs
23   {
24   /// <summary>
25   /// AttributeUtil の概要の説明です。
26   /// </summary>
27   public sealed class AttributeUtil
28   {
29 0 private AttributeUtil()
30   {
31   }
32  
33 334 public static ColumnAttribute GetColumnAttribute(PropertyInfo pi)
34   {
35 334 return Attribute.GetCustomAttribute(pi,
36   typeof(ColumnAttribute)) as ColumnAttribute;
37   }
38  
39 62 public static TableAttribute GetTableAttribute(Type type)
40   {
41 62 return Attribute.GetCustomAttribute(type,
42   typeof(TableAttribute)) as TableAttribute;
43   }
44  
45 62 public static VersionNoPropertyAttribute GetVersionNoPropertyAttribute(Type type)
46   {
47 62 return Attribute.GetCustomAttribute(type,
48   typeof(VersionNoPropertyAttribute)) as VersionNoPropertyAttribute;
49   }
50  
51 62 public static TimestampPropertyAttribute GetTimestampPropertyAttribute(Type type)
52   {
53 62 return Attribute.GetCustomAttribute(type,
54   typeof(TimestampPropertyAttribute)) as TimestampPropertyAttribute;
55   }
56  
57 354 public static RelnoAttribute GetRelnoAttribute(PropertyInfo pi)
58   {
59 354 return Attribute.GetCustomAttribute(pi,
60   typeof(RelnoAttribute)) as RelnoAttribute;
61   }
62  
63 351 public static IDAttribute GetIDAttribute(PropertyInfo pi)
64   {
65 351 return Attribute.GetCustomAttribute(pi,
66   typeof(IDAttribute)) as IDAttribute;
67   }
68  
69 136 public static NoPersistentPropsAttribute GetNoPersistentPropsAttribute(MemberInfo mi)
70   {
71 136 return Attribute.GetCustomAttribute(mi,
72   typeof(NoPersistentPropsAttribute)) as NoPersistentPropsAttribute;
73   }
74  
75 20 public static RelkeysAttribute GetRelkeysAttribute(PropertyInfo pi)
76   {
77 20 return Attribute.GetCustomAttribute(pi,
78   typeof(RelkeysAttribute)) as RelkeysAttribute;
79   }
80  
81 24 public static BeanAttribute GetBeanAttribute(Type type)
82   {
83 24 return Attribute.GetCustomAttribute(type,
84   typeof(BeanAttribute)) as BeanAttribute;
85   }
86  
87 159 public static SqlAttribute[] GetSqlAttributes(MethodInfo mi)
88   {
89 159 return Attribute.GetCustomAttributes(mi,
90   typeof(SqlAttribute)) as SqlAttribute[];
91   }
92  
93 50 public static QueryAttribute GetQueryAttribute(MethodInfo mi)
94   {
95 50 return Attribute.GetCustomAttribute(mi,
96   typeof(QueryAttribute)) as QueryAttribute;
97   }
98  
99 60 public static PersistentPropsAttribute GetPersistentPropsAttribute(MethodInfo mi)
100   {
101 60 return Attribute.GetCustomAttribute(mi,
102   typeof(PersistentPropsAttribute)) as PersistentPropsAttribute;
103   }
104   }
105   }
106