package de.forsthaus.webui.testControllers;
import java.io.Serializable;
/**
* Person Test Bean.<br>
*
* @author sgerth sge(at)forsthaus(dot)de
*
*/
public class Person implements Serializable {
private static final long serialVersionUID = -4591732272301777879L;
private int id = 0;
private String firstName = "";
private String lastName = "";
private String city = "";
private String street = "";
private String phone = "";
private String fax = "";
public Person() {
}
public Person(int id, String firstName, String lastName, String city, String street, String phone, String fax) {
this.setId(id);
this.firstName = firstName;
this.lastName = lastName;
this.city = city;
this.street = street;
this.phone = phone;
this.fax = fax;
}
public void setId(int id) {
this.id = id;
}
public int getId() {
return id;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getFirstName() {
return firstName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getLastName() {
return lastName;
}
public void setCity(String city) {
this.city = city;
}
public String getCity() {
return city;
}
public void setStreet(String street) {
this.street = street;
}
public String getStreet() {
return street;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPhone() {
return phone;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getFax() {
return fax;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((city == null) ? 0 : city.hashCode());
result = prime * result + ((fax == null) ? 0 : fax.hashCode());
result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
result = prime * result + id;
result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
result = prime * result + ((phone == null) ? 0 : phone.hashCode());
result = prime * result + ((street == null) ? 0 : street.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Person other = (Person) obj;
if (city == null) {
if (other.city != null)
return false;
} else if (!city.equals(other.city))
return false;
if (fax == null) {
if (other.fax != null)
return false;
} else if (!fax.equals(other.fax))
return false;
if (firstName == null) {
if (other.firstName != null)
return false;
} else if (!firstName.equals(other.firstName))
return false;
if (id != other.id)
return false;
if (lastName == null) {
if (other.lastName != null)
return false;
} else if (!lastName.equals(other.lastName))
return false;
if (phone == null) {
if (other.phone != null)
return false;
} else if (!phone.equals(other.phone))
return false;
if (street == null) {
if (other.street != null)
return false;
} else if (!street.equals(other.street))
return false;
return true;
}
}