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   129   8   1
0   49   1   8
8     1  
1    
 
  Customer       Line # 32 8 0% 8 0 100% 1.0
 
  (4)
 
1    //----------------------------------------------------------------------
2    //
3    // PerfectJPattern: "Design patterns are good but components are better!"
4    // Customer.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    import java.util.*;
24   
25    /**
26    * Customer Data model object
27    *
28    * @author <a href="mailto:bravegag@hotmail.com">Giovanni Azua</a>
29    * @version $ $Date: Dec 5, 2008 2:59:04 AM $
30    */
31    public
 
32    class Customer
33    {
34    //------------------------------------------------------------------------
35    // public
36    //------------------------------------------------------------------------
 
37  8 toggle public
38    Customer()
39    {
40    // do nothing
41    }
42   
43    //------------------------------------------------------------------------
 
44  3 toggle public
45    Customer(String aName)
46    {
47  3 theName = aName;
48  3 theOrders = new ArrayList<Order>();
49    }
50   
51    //------------------------------------------------------------------------
52    /**
53    * Returns the id
54    *
55    * @return the id
56    */
 
57  23 toggle public Long
58    getId()
59    {
60  23 return theId;
61    }
62   
63    //------------------------------------------------------------------------
64    /**
65    * Sets the id of the person
66    *
67    * @param anId the id to set
68    */
 
69  5 toggle public void
70    setId(Long anId)
71    {
72  5 theId = anId;
73    }
74   
75    //------------------------------------------------------------------------
76    /**
77    * Returns the name
78    *
79    * @return the name
80    */
 
81  14 toggle public String
82    getName()
83    {
84  14 return theName;
85    }
86   
87    //------------------------------------------------------------------------
88    /**
89    * Sets the name of the person
90    *
91    * @param aName the name to set
92    */
 
93  5 toggle public void
94    setName(String aName)
95    {
96  5 theName = aName;
97    }
98   
99    //------------------------------------------------------------------------
100    /**
101    * Returns the orders
102    *
103    * @return the orders
104    */
 
105  31 toggle public List<Order>
106    getOrders()
107    {
108  31 return theOrders;
109    }
110   
111    //------------------------------------------------------------------------
112    /**
113    * Sets the orders
114    *
115    * @param anOrders the orders to set
116    */
 
117  5 toggle public void
118    setOrders(List<Order> anOrders)
119    {
120  5 theOrders = anOrders;
121    }
122   
123    //------------------------------------------------------------------------
124    // members
125    //------------------------------------------------------------------------
126    private Long theId;
127    private String theName;
128    private List<Order> theOrders;
129    }