View Javadoc
1   /*
2    * Created on Jun 8, 2005
3    *
4    * A person in the domain model.
5    */
6   package net.sf.mindoro.model;
7   
8   /***
9    * A person in the domain model.
10   * 
11   * @author aisrael
12   * @hibernate.class table = "person"
13   */
14  public class Person {
15  
16      private Long id;
17  
18      private String email;
19  
20      private String firstName;
21  
22      private String middleName;
23  
24      private String lastName;
25  
26      private SystemUser systemUser;
27  
28      /***
29       * @return Returns the id.
30       * @hibernate.id column="id" generator-class="native"
31       */
32      public final Long getId() {
33          return this.id;
34      }
35  
36      /***
37       * @param id
38       *            The id to set.
39       */
40      public final void setId(final Long id) {
41          this.id = id;
42      }
43  
44      /***
45       * @return Returns the email.
46       * @hibernate.property column="email" length="80" unique="false"
47       *                     not-null="true"
48       */
49      public final String getEmail() {
50          return this.email;
51      }
52  
53      /***
54       * @param email
55       *            The email to set.
56       */
57      public final void setEmail(final String email) {
58          this.email = email;
59      }
60  
61      /***
62       * @return Returns the firstName.
63       * @hibernate.property column="firstName" length="64" unique="false"
64       *                     not-null="false"
65       */
66      public final String getFirstName() {
67          return this.firstName;
68      }
69  
70      /***
71       * @param firstName
72       *            The firstName to set.
73       */
74      public final void setFirstName(final String firstName) {
75          this.firstName = firstName;
76      }
77  
78      /***
79       * @return Returns the middleName.
80       * @hibernate.property column="middleName" length="64" unique="false"
81       *                     not-null="false"
82       */
83      public final String getMiddleName() {
84          return this.middleName;
85      }
86  
87      /***
88       * @param middleName
89       *            The middleName to set.
90       */
91      public final void setMiddleName(final String middleName) {
92          this.middleName = middleName;
93      }
94  
95      /***
96       * @return Returns the lastName.
97       * @hibernate.property column="lastName" length="64" unique="false"
98       *                     not-null="false"
99       */
100     public final String getLastName() {
101         return this.lastName;
102     }
103 
104     /***
105      * @param lastName
106      *            The lastName to set.
107      */
108     public final void setLastName(final String lastName) {
109         this.lastName = lastName;
110     }
111 
112     /***
113      * @return firstName + middleName + lastName
114      */
115     public final String getDisplayName() {
116         final StringBuffer sb = new StringBuffer();
117         sb.append(firstName);
118         if (null != middleName) {
119             sb.append(' ').append(middleName);
120         }
121         if (null != lastName) {
122             sb.append(' ').append(lastName);
123         }
124         return sb.toString();
125     }
126 
127     /***
128      * @return Returns the systemUser.
129      * @hibernate.one-to-one class="net.sf.mindoro.model.SystemUser"
130      */
131     public final SystemUser getSystemUser() {
132         return this.systemUser;
133     }
134 
135     /***
136      * @param systemUser
137      *            The systemUser to set.
138      */
139     public final void setSystemUser(final SystemUser systemUser) {
140         this.systemUser = systemUser;
141     }
142 
143 }