Clover Coverage Report - perfectjpattern(Aggregated)
Coverage timestamp: Sat Feb 28 2009 14:35:07 CET
../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
8   127   8   1
0   48   1   8
8     1  
1    
 
  Person       Line # 30 8 0% 8 0 100% 1.0
 
  (15)
 
1    //----------------------------------------------------------------------
2    //
3    // PerfectJPattern: "Design patterns are good but components are better!"
4    // Person.java Copyright (c) 2009 Giovanni Azua Garcia
5    // bravegag@hotmail.com
6    //
7    // This program is free software; you can redistribute it and/or
8    // modify it under the terms of the GNU General Public License
9    // as published by the Free Software Foundation; either version 3
10    // of the License, or (at your option) any later version.
11    //
12    // This program is distributed in the hope that it will be useful,
13    // but WITHOUT ANY WARRANTY; without even the implied warranty of
14    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15    // GNU General Public License for more details.
16    //
17    // You should have received a copy of the GNU General Public License
18    // along with this program; if not, see <http://www.gnu.org/licenses/>.
19    //
20    //----------------------------------------------------------------------
21    package org.perfectjpattern.example.datamodel;
22   
23    /**
24    * Person Data Model type
25    *
26    * @author <a href="mailto:bravegag@hotmail.com">Giovanni Azua</a>
27    * @version $Revision: 1.0 $ $Date: Nov 30, 2007 6:30:38 PM $
28    */
29    public
 
30    class Person
31    {
32    //------------------------------------------------------------------------
33    // public
34    //------------------------------------------------------------------------
 
35  20 toggle public
36    Person()
37    {
38    // do nothing
39    }
40   
41    //------------------------------------------------------------------------
 
42  20 toggle public
43    Person(String aName, int anAge)
44    {
45  20 theName = aName;
46  20 theAge = anAge;
47    }
48   
49    //------------------------------------------------------------------------
50    /**
51    * Returns the id
52    *
53    * @return the id
54    */
 
55  138 toggle public Long
56    getId()
57    {
58  138 return theId;
59    }
60   
61    //------------------------------------------------------------------------
62    /**
63    * Sets the id of the person
64    *
65    * @param anId the id to set
66    */
 
67  17 toggle public void
68    setId(Long anId)
69    {
70  17 theId = anId;
71    }
72   
73    //------------------------------------------------------------------------
74    /**
75    * Returns the name
76    *
77    * @return the name
78    */
 
79  165 toggle public String
80    getName()
81    {
82  165 return theName;
83    }
84   
85    //------------------------------------------------------------------------
86    /**
87    * Sets the name of the person
88    *
89    * @param anName the name to set
90    */
 
91  3 toggle public void
92    setName(String anName)
93    {
94  3 theName = anName;
95    }
96   
97    //------------------------------------------------------------------------
98    /**
99    * Returns the age
100    *
101    * @return the age
102    */
 
103  163 toggle public int
104    getAge()
105    {
106  163 return theAge;
107    }
108   
109    //------------------------------------------------------------------------
110    /**
111    * Sets the age of the person
112    *
113    * @param anAge the age to set
114    */
 
115  7 toggle public void
116    setAge(int anAge)
117    {
118  7 theAge = anAge;
119    }
120   
121    //------------------------------------------------------------------------
122    // members
123    //------------------------------------------------------------------------
124    private Long theId;
125    private String theName;
126    private int theAge;
127    }