Added the new property supervisorInterest to the methods equals, hashcode and toString.
This commit is contained in:
parent
e6490d31a3
commit
abed050e41
@ -33,7 +33,7 @@ public class ProjectIdea extends DomainObject {
|
||||
|
||||
@Embedded
|
||||
@AssociationOverride(name="supervisorInterest", joinTable=@JoinTable(name="projectIdea_Employee"))
|
||||
private SupervisorInterest supervisorInterest = new SupervisorInterest();
|
||||
private SupervisorInterest supervisorInterest; // the object is set in the application code
|
||||
|
||||
@ManyToMany
|
||||
private List<Student> authors = new ArrayList<Student>();
|
||||
@ -177,7 +177,7 @@ public class ProjectIdea extends DomainObject {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ProjectIdea [id=" + (id != null ? id : "") + ", projectClass=" + (projectClass != null ? projectClass : "")
|
||||
return "ProjectIdea [id=" + (id != null ? id : "") + ", projectClass=" + (projectClass != null ? projectClass : "") + ", supervisorInterest=" + (supervisorInterest != null ? supervisorInterest : "")
|
||||
+ ", authors=" + (authors != null ? authors : "") + ", preferredSupervisor=" + (preferredSupervisor != null ? preferredSupervisor : "")
|
||||
+ ", externalSupervisorInfo=" + (externalSupervisorInfo != null ? externalSupervisorInfo : "") + ", keywords=" + (keywords != null ? keywords : "")
|
||||
+ ", title="+ (title != null ? title : "") + ", watson=" + (watson != null ? watson : "")
|
||||
@ -207,6 +207,9 @@ public class ProjectIdea extends DomainObject {
|
||||
result =
|
||||
prime * result
|
||||
+ ((projectClass == null) ? 0 : projectClass.hashCode());
|
||||
result =
|
||||
prime * result
|
||||
+ ((supervisorInterest == null) ? 0 : supervisorInterest.hashCode());
|
||||
result = prime * result + ((title == null) ? 0 : title.hashCode());
|
||||
result = prime * result + ((watson == null) ? 0 : watson.hashCode());
|
||||
return result;
|
||||
@ -255,6 +258,11 @@ public class ProjectIdea extends DomainObject {
|
||||
return false;
|
||||
} else if (!projectClass.equals(other.projectClass))
|
||||
return false;
|
||||
if (supervisorInterest == null) {
|
||||
if (other.supervisorInterest != null)
|
||||
return false;
|
||||
} else if (!supervisorInterest.equals(other.supervisorInterest))
|
||||
return false;
|
||||
if (title == null) {
|
||||
if (other.title != null)
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user