|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Customer | Line # 32 | 8 | 0% | 8 | 0 | 100% |
1.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
(4) | |||
Result | |||
1.0
|
org.perfectjpattern.jee.integration.dao.spring.TestExample.testSpringGenericDao
![]() |
1 PASS | |
1.0
|
org.perfectjpattern.jee.integration.dao.hibernate.TestExample.testHibernateGenericDao
![]() |
1 PASS | |
0.1875
|
org.perfectjpattern.jee.integration.dao.jpa.TestExample.testJpaCmpGenericDao
![]() |
1 PASS | |
0.0625
|
org.perfectjpattern.example.datamodel.TestProduct.testEquals
![]() |
1 PASS | |
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 |
![]() |
38 | Customer() | |
39 | { | |
40 | // do nothing | |
41 | } | |
42 | ||
43 | //------------------------------------------------------------------------ | |
44 | 3 |
![]() |
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 |
![]() |
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 |
![]() |
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 |
![]() |
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 |
![]() |
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 |
![]() |
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 |
![]() |
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 | } |
|