| .. | .. |
|---|
| 1 | 1 | package net.curisit.securis.db; |
|---|
| 2 | 2 | |
|---|
| 3 | 3 | import java.io.Serializable; |
|---|
| 4 | +import java.util.Objects; |
|---|
| 4 | 5 | |
|---|
| 5 | 6 | import javax.persistence.Column; |
|---|
| 6 | 7 | import javax.persistence.Entity; |
|---|
| .. | .. |
|---|
| 17 | 18 | import com.fasterxml.jackson.annotation.JsonInclude; |
|---|
| 18 | 19 | import com.fasterxml.jackson.annotation.JsonInclude.Include; |
|---|
| 19 | 20 | |
|---|
| 21 | +import net.curisit.securis.db.common.Metadata; |
|---|
| 22 | + |
|---|
| 20 | 23 | /** |
|---|
| 21 | 24 | * Entity implementation class for Entity: licensetype_metadata |
|---|
| 22 | 25 | * |
|---|
| .. | .. |
|---|
| 27 | 30 | @Table(name = "licensetype_metadata") |
|---|
| 28 | 31 | @JsonIgnoreProperties(ignoreUnknown = true) |
|---|
| 29 | 32 | @NamedQueries({ @NamedQuery(name = "list-licensetype-metadata", query = "SELECT a FROM LicenseTypeMetadata a where a.licenseType.id = :licenseTypeId") }) |
|---|
| 30 | | -public class LicenseTypeMetadata implements Serializable { |
|---|
| 33 | +public class LicenseTypeMetadata implements Serializable, Metadata { |
|---|
| 31 | 34 | |
|---|
| 32 | 35 | private static final long serialVersionUID = 1L; |
|---|
| 33 | 36 | |
|---|
| .. | .. |
|---|
| 76 | 79 | public void setMandatory(boolean mandatory) { |
|---|
| 77 | 80 | this.mandatory = mandatory; |
|---|
| 78 | 81 | } |
|---|
| 82 | + |
|---|
| 83 | + @Override |
|---|
| 84 | + public boolean equals(Object obj) { |
|---|
| 85 | + if (!(obj instanceof LicenseTypeMetadata)) |
|---|
| 86 | + return false; |
|---|
| 87 | + LicenseTypeMetadata other = (LicenseTypeMetadata) obj; |
|---|
| 88 | + return Objects.equals(key, other.key) && Objects.equals(licenseType, other.licenseType); |
|---|
| 89 | + } |
|---|
| 90 | + |
|---|
| 91 | + @Override |
|---|
| 92 | + public int hashCode() { |
|---|
| 93 | + return Objects.hash(key, licenseType); |
|---|
| 94 | + } |
|---|
| 95 | + |
|---|
| 96 | + @Override |
|---|
| 97 | + public String toString() { |
|---|
| 98 | + return String.format("LTMD (%s: %s)", key, value); |
|---|
| 99 | + } |
|---|
| 79 | 100 | } |
|---|