| .. | .. |
|---|
| 32 | 32 | private static final long serialVersionUID = 1L; |
|---|
| 33 | 33 | |
|---|
| 34 | 34 | @Id |
|---|
| 35 | | - @GeneratedValue |
|---|
| 36 | | - private int id; |
|---|
| 37 | | - |
|---|
| 38 | | - private String key; |
|---|
| 39 | | - |
|---|
| 40 | | - private String value; |
|---|
| 41 | | - |
|---|
| 42 | 35 | @JsonIgnore |
|---|
| 43 | 36 | @ManyToOne |
|---|
| 44 | 37 | @JoinColumn(name = "license_type_id") |
|---|
| 45 | 38 | private LicenseType licenseType; |
|---|
| 46 | 39 | |
|---|
| 47 | | - public int getId() { |
|---|
| 48 | | - return id; |
|---|
| 49 | | - } |
|---|
| 40 | + @Id |
|---|
| 41 | + private String key; |
|---|
| 50 | 42 | |
|---|
| 51 | | - public void setId(int id) { |
|---|
| 52 | | - this.id = id; |
|---|
| 53 | | - } |
|---|
| 43 | + private String value; |
|---|
| 54 | 44 | |
|---|
| 55 | 45 | @JsonProperty("licensetype_id") |
|---|
| 56 | 46 | public Integer getLicenseTypeId() { |
|---|
| .. | .. |
|---|
| 91 | 81 | this.key = key; |
|---|
| 92 | 82 | } |
|---|
| 93 | 83 | |
|---|
| 84 | + @Override |
|---|
| 85 | + public boolean equals(Object obj) { |
|---|
| 86 | + if (!(obj instanceof LicenseTypeMetadata)) |
|---|
| 87 | + return false; |
|---|
| 88 | + LicenseTypeMetadata other = (LicenseTypeMetadata)obj; |
|---|
| 89 | + return key.equals(other.key) && (licenseType == null || licenseType.equals(other.licenseType)); |
|---|
| 90 | + } |
|---|
| 91 | + |
|---|
| 92 | + @Override |
|---|
| 93 | + public int hashCode() { |
|---|
| 94 | + |
|---|
| 95 | + return key.hashCode() + (licenseType == null ? 0 : licenseType.hashCode()); |
|---|
| 96 | + } |
|---|
| 94 | 97 | } |
|---|