/* ================================================================== * User.java - Dec 11, 2009 8:27:28 PM * * Copyright 2007-2009 SolarNetwork.net Dev Team * * 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 2 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, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * ================================================================== */ package net.solarnetwork.central.user.domain; import java.util.Set; import net.solarnetwork.central.domain.BaseEntity; import net.solarnetwork.util.SerializeIgnore; import com.fasterxml.jackson.annotation.JsonIgnore; /** * A user domain object. * * @author matt * @version 1.3 */ public class User extends BaseEntity { private static final long serialVersionUID = 6097286382174148175L; private String name; private String email; private String password; private Boolean enabled; private Set<String> roles; /** * Default constructor. */ public User() { super(); } /** * Construct with values. * * @param userId * the user ID * @param email * the email */ public User(Long userId, String email) { super(); setId(userId); setEmail(email); } @Override public String toString() { return "User{email=" + email + '}'; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } @JsonIgnore @SerializeIgnore public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Boolean getEnabled() { return enabled; } public void setEnabled(Boolean enabled) { this.enabled = enabled; } public Set<String> getRoles() { return roles; } public void setRoles(Set<String> roles) { this.roles = roles; } }