1 package org.musicontroller.core;
2
3
4
5
6
7
8
9
10
11 public class AIRelation {
12 private long instrument_id;
13 private long artist_id;
14
15
16
17
18
19 public long getArtist_id() {
20 return artist_id;
21 }
22
23
24
25
26
27 public void setArtist_id(long artist_id) {
28 this.artist_id = artist_id;
29 }
30
31
32
33
34
35 public long getInstrument_id() {
36 return instrument_id;
37 }
38
39
40
41
42
43 public void setInstrument_id(long instrument_id) {
44 this.instrument_id = instrument_id;
45 }
46
47
48
49
50
51
52
53 public boolean equals(Object o) {
54 if (o==null) return false;
55
56 if (o instanceof AIRelation) {
57 AIRelation check = (AIRelation) o;
58 return check.getArtist_id()==artist_id && check.getInstrument_id()==instrument_id;
59 } else {
60 return false;
61 }
62 }
63
64 public int hashCode() {
65 return Long.valueOf(artist_id + 17 * instrument_id).hashCode();
66 }
67
68 public String toString() {
69 return "Artist - Instrument relation between artist id:"+artist_id+" and instrument id:"+instrument_id+".";
70 }
71 }