Added equals implementations on model classes.
This commit is contained in:
@@ -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" }
|
||||
}
|
||||
|
Reference in New Issue
Block a user