/*
* Copyright 2014-2016 CyberVision, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kaaproject.kaa.common.dto.admin;
import java.io.Serializable;
public class UserProfileUpdateDto implements Serializable {
private static final long serialVersionUID = 8016870008519720555L;
private String firstName;
private String lastName;
private String mail;
/**
* Instantiates the UserProfileUpdateDto.
*/
public UserProfileUpdateDto(String firstName, String lastName, String mail) {
this.firstName = firstName;
this.lastName = lastName;
this.mail = mail;
}
/**
* Instantiates the UserProfileUpdateDto.
*/
public UserProfileUpdateDto(UserDto userDto) {
this.firstName = userDto.getFirstName();
this.lastName = userDto.getLastName();
this.mail = userDto.getMail();
}
public UserProfileUpdateDto() {
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getMail() {
return mail;
}
public void setMail(String mail) {
this.mail = mail;
}
@Override
public boolean equals(Object obj) {
if (this
== obj) {
return true;
}
if (obj
== null
|| getClass()
!= obj.getClass()) {
return false;
}
UserProfileUpdateDto that = (UserProfileUpdateDto) obj;
if (!firstName.equals(that.firstName)) {
return false;
}
if (!lastName.equals(that.lastName)) {
return false;
}
return mail.equals(that.mail);
}
@Override
public int hashCode() {
int result = firstName.hashCode();
result = 31 * result + lastName.hashCode();
result = 31 * result + mail.hashCode();
return result;
}
@Override
public String toString() {
return "UserProfileUpdateDto{"
+ "firstName='" + firstName + '\''
+ ", lastName='" + lastName + '\''
+ ", mail='" + mail + '\''
+ '}';
}
}