2 * Copyright 2007, 2008, 2009, 2010 Electronic Business Systems Ltd.
4 * This file is part of GSS.
6 * GSS is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GSS. If not, see <http://www.gnu.org/licenses/>.
19 package gr.ebs.gss.server.domain.dto;
21 import java.io.Serializable;
22 import java.util.Date;
27 public class UserDTO implements Serializable {
29 * The serial version UID.
31 private static final long serialVersionUID = 1L;
34 * The persistence ID of the object.
39 * The first name of the user.
41 private String firstname;
44 * The last name of the user.
46 private String lastname;
49 * The full name of the user.
54 * The username of the user.
56 private String username;
59 * The e-mail address of the user.
63 private Boolean active;
65 private Date lastLoginDate;
67 private Date currentLoginDate;
70 * The user class to which this user belongs.
72 private UserClassDTO userClass;
82 * @param newId the id to set
84 public void setId(final Long newId) {
89 * @return the firstname
91 public String getFirstname() {
96 * @param newFirstname the firstname to set
98 public void setFirstname(final String newFirstname) {
99 firstname = newFirstname;
103 * @return the lastname
105 public String getLastname() {
110 * @param newLastname the lastname to set
112 public void setLastname(final String newLastname) {
113 lastname = newLastname;
119 public String getName() {
124 * @param newName the name to set
126 public void setName(final String newName) {
133 public String getEmail() {
138 * @param newEmail the email to set
140 public void setEmail(final String newEmail) {
145 * Retrieve the username.
147 * @return the username
149 public String getUsername() {
154 * Modify the username.
156 * @param newUsername the username to set
158 public void setUsername(String newUsername) {
159 username = newUsername;
162 public UserClassDTO getUserClass() {
166 public void setUserClass(UserClassDTO aUserClass) {
167 userClass = aUserClass;
170 public Boolean isActive() {
174 public void setActive(Boolean isActive) {
179 * Retrieve the lastLoginDate.
181 * @return the lastLoginDate
183 public Date getLastLoginDate() {
184 return lastLoginDate;
188 * Modify the lastLoginDate.
190 * @param aLlastLoginDate the lastLoginDate to set
192 public void setLastLoginDate(Date aLlastLoginDate) {
193 lastLoginDate = aLlastLoginDate;
197 public UserDTO cloneUser(){
198 final UserDTO u = new UserDTO();
201 u.setLastname(lastname);
202 u.setFirstname(firstname);
204 u.setUsername(username);
205 u.setActive(isActive());
207 u.setUserClass(userClass);
208 u.setLastLoginDate(lastLoginDate);
213 * Modify the currentLoginDate.
215 * @param _currentLoginDate the currentLoginDate to set
217 public void setCurrentLoginDate(Date _currentLoginDate) {
218 this.currentLoginDate = _currentLoginDate;
222 * Retrieve the currentLoginDate.
224 * @return the currentLoginDate
226 public Date getCurrentLoginDate() {
227 return currentLoginDate;