Added equals implementations on model classes.

This commit is contained in:
Jonathan Bernard
2015-03-07 14:16:52 -06:00
parent f55cabe242
commit 66cd8f579a
5 changed files with 67 additions and 1 deletions

View File

@@ -10,4 +10,22 @@ public class Performance implements Serializable {
String drummer
String guitarist
String leader
@Override public boolean equals(Object thatObj) {
if (thatObj == null) return false
if (!(thatObj instanceof Performance)) return false
Performance that = (Performance) thatObj
return (this.serviceId == that.serviceId &&
this.songId == that.songId &&
this.pianist == that.pianist &&
this.organist == that.organist &&
this.bassist == that.bassist &&
this.drummer == that.drummer &&
this.guitarist == that.guitarist &&
this.leader == that.leader) }
@Override String toString() {
return "($serviceId, $songId): $leader - $pianist" }
}