ulrich@undisclosed
2020-05-12 14cc29f3e69c002c11b674e018a1106a632f5a81
commit | author | age
c65695 1 /*
U 2  *  Nutzerverwaltung - User and role management in your browser
51c9e3 3  *  Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de
c65695 4  *
U 5  *  This program is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation, either version 3 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program.  If not, see http://www.gnu.org/licenses/
17  */
18
19 package de.uhilger.um.daten;
20
21 import java.io.Serializable;
22
23 import de.uhilger.baselink.DBColumn;
24 import de.uhilger.baselink.DBPrimaryKey;
25 import de.uhilger.baselink.DBTable;
26
27
28 @DBTable(name="app.users")
29 @DBPrimaryKey({"user_name"})
30 public class UserData implements Serializable {
31
32   private static final long serialVersionUID = 8274601049628620767L;
33   private String id;
34   private String firstName;
35   private String lastName;
36   private String email;
37
38   public UserData() {
39     super();
40   }
41
42   @DBColumn(name = "user_name")
43   public String getId() {
44     return id;
45   }
46
47   public void setId(String id) {
48     this.id = id;
49   }
50
51   @DBColumn(name = "user_first")
52   public String getFirstName() {
53     return firstName;
54   }
55
56   public void setFirstName(String firstName) {
57     this.firstName = firstName;
58   }
59
60   @DBColumn(name = "user_last")
61   public String getLastName() {
62     return lastName;
63   }
64
65   public void setLastName(String lastName) {
66     this.lastName = lastName;
67   }
68
69   @DBColumn(name = "user_email")
70   public String getEmail() {
71     return email;
72   }
73
74   public void setEmail(String email) {
75     this.email = email;
76   }
77
78   @Override
79   public boolean equals(Object obj) {
80     boolean isEqual = false;
81     if(obj != null && obj instanceof User) {
82       User other = (User) obj;
83       isEqual = other.getId().equals(this.getId());
84     }
85     return isEqual;
86   }
87 }