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 public
36 Person()
37 {
38 // do nothing
39 }
40
41 //------------------------------------------------------------------------
42 public
43 Person(String aName, int anAge)
44 {
45 theName = aName;
46 theAge = anAge;
47 }
48
49 //------------------------------------------------------------------------
50 /**
51 * Returns the id
52 *
53 * @return the id
54 */
55 public Long
56 getId()
57 {
58 return theId;
59 }
60
61 //------------------------------------------------------------------------
62 /**
63 * Sets the id of the person
64 *
65 * @param anId the id to set
66 */
67 public void
68 setId(Long anId)
69 {
70 theId = anId;
71 }
72
73 //------------------------------------------------------------------------
74 /**
75 * Returns the name
76 *
77 * @return the name
78 */
79 public String
80 getName()
81 {
82 return theName;
83 }
84
85 //------------------------------------------------------------------------
86 /**
87 * Sets the name of the person
88 *
89 * @param anName the name to set
90 */
91 public void
92 setName(String anName)
93 {
94 theName = anName;
95 }
96
97 //------------------------------------------------------------------------
98 /**
99 * Returns the age
100 *
101 * @return the age
102 */
103 public int
104 getAge()
105 {
106 return theAge;
107 }
108
109 //------------------------------------------------------------------------
110 /**
111 * Sets the age of the person
112 *
113 * @param anAge the age to set
114 */
115 public void
116 setAge(int anAge)
117 {
118 theAge = anAge;
119 }
120
121 //------------------------------------------------------------------------
122 // members
123 //------------------------------------------------------------------------
124 private Long theId;
125 private String theName;
126 private int theAge;
127 }