/*
|
* Nutzerverwaltung - User and role management in your browser
|
* Copyright (C) 2011, 2012 Ulrich Hilger, http://uhilger.de
|
*
|
* This program is free software: you can redistribute it and/or modify
|
* it under the terms of the GNU General Public License as published by
|
* the Free Software Foundation, either version 3 of the License, or
|
* (at your option) any later version.
|
*
|
* This program is distributed in the hope that it will be useful,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* GNU General Public License for more details.
|
*
|
* You should have received a copy of the GNU General Public License
|
* along with this program. If not, see http://www.gnu.org/licenses/
|
*/
|
|
package de.uhilger.um.daten;
|
|
import java.io.Serializable;
|
|
import de.uhilger.baselink.DBColumn;
|
import de.uhilger.baselink.DBPrimaryKey;
|
import de.uhilger.baselink.DBTable;
|
|
|
@DBTable(name="app.users")
|
@DBPrimaryKey({"user_name"})
|
public class User implements Serializable {
|
|
private static final long serialVersionUID = 8274601049628620767L;
|
private String id;
|
private String pw;
|
private String firstName;
|
private String lastName;
|
private String email;
|
|
public User() {
|
super();
|
}
|
|
@DBColumn(name = "user_name")
|
public String getId() {
|
return id;
|
}
|
|
public void setId(String id) {
|
this.id = id;
|
}
|
|
@DBColumn(name = "user_pass")
|
public String getPw() {
|
return pw;
|
}
|
|
public void setPw(String pw) {
|
this.pw = pw;
|
}
|
|
@DBColumn(name = "user_first")
|
public String getFirstName() {
|
return firstName;
|
}
|
|
public void setFirstName(String firstName) {
|
this.firstName = firstName;
|
}
|
|
@DBColumn(name = "user_last")
|
public String getLastName() {
|
return lastName;
|
}
|
|
public void setLastName(String lastName) {
|
this.lastName = lastName;
|
}
|
|
@DBColumn(name = "user_email")
|
public String getEmail() {
|
return email;
|
}
|
|
public void setEmail(String email) {
|
this.email = email;
|
}
|
|
@Override
|
public boolean equals(Object obj) {
|
boolean isEqual = false;
|
if(obj != null && obj instanceof User) {
|
User other = (User) obj;
|
isEqual = other.getId().equals(this.getId());
|
}
|
return isEqual;
|
}
|
}
|