public void setDescription(String description) {
this
}
public Set<Person> getPersons() {
return persons;
}
public void setPersons(Set<Person> persons) {
this
}
public Long getId() {
return id;
}
public void setId(Long id) {
this
}
@Override
public int hashCode() {
int hash =
hash += (id != null ? id
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning
if (!(object instanceof Department)) {
return false;
}
Department other = (Department) object;
if ((this
return false;
}
return true;
}
@Override
public String toString() {
return
}
}
[
From:http://tw.wingwit.com/Article/program/Java/ky/201311/29045.html