1:package is346; 2: 3:import java.io.Serializable; 4: 5:public class ArtistDto 6: implements Serializable { 7: private Integer id; 8: private String name; 9: public Integer getId() { 10: return id; 11: } 12: 13: public void setId(Integer id) { 14: this.id = id; 15: } 16: 17: public String getName() { 18: return name; 19: } 20: 21: public void setName(String name) { 22: this.name = name; 23: } 24: 25: public boolean equals(Object obj) { 26: if (this == obj) 27: return true; 28: if (! (obj instanceof ArtistDto)) 29: return false; 30: ArtistDto that = (ArtistDto) obj; 31: if (! (that.id == null ? this.id == null : that.id.equals(this.id))) 32: return false; 33: if (! (that.name == null ? this.name == null : that.name.equals(this.name))) 34: return false; 35: return true; 36: } 37: 38: public int hashCode() { 39: int result = 17; 40: result = 37 * result + this.id.hashCode(); 41: result = 37 * result + this.name.hashCode(); 42: return result; 43: } 44: 45: public String toString() { 46: String returnString = ""; 47: returnString += id; 48: returnString += ", " + name; 49: return returnString; 50: } 51:}