Skip to content
Snippets Groups Projects
Commit ad06f213 authored by srosse's avatar srosse
Browse files

no-jira: add equals / hashCode to CourseVO

parent 78f92879
No related branches found
No related tags found
No related merge requests found
...@@ -239,4 +239,21 @@ public class CourseVO { ...@@ -239,4 +239,21 @@ public class CourseVO {
public void setLifecycle(RepositoryEntryLifecycleVO lifecycle) { public void setLifecycle(RepositoryEntryLifecycleVO lifecycle) {
this.lifecycle = lifecycle; this.lifecycle = lifecycle;
} }
@Override
public int hashCode() {
return key == null ? 24348 : key.hashCode();
}
@Override
public boolean equals(Object obj) {
if(obj == this) {
return true;
}
if(obj instanceof CourseVO) {
CourseVO course = (CourseVO)obj;
return key != null && key.equals(course.getKey());
}
return super.equals(obj);
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment