| .. | .. |
|---|
| 2 | 2 | |
|---|
| 3 | 3 | import java.io.Serializable; |
|---|
| 4 | 4 | import java.util.Date; |
|---|
| 5 | +import java.util.Objects; |
|---|
| 5 | 6 | |
|---|
| 6 | 7 | import javax.persistence.Column; |
|---|
| 7 | 8 | import javax.persistence.Entity; |
|---|
| .. | .. |
|---|
| 22 | 23 | import com.fasterxml.jackson.annotation.JsonInclude.Include; |
|---|
| 23 | 24 | import com.fasterxml.jackson.annotation.JsonProperty; |
|---|
| 24 | 25 | |
|---|
| 26 | +import net.curisit.securis.db.common.Metadata; |
|---|
| 27 | + |
|---|
| 25 | 28 | /** |
|---|
| 26 | 29 | * Entity implementation class for Entity: application_metadata |
|---|
| 27 | 30 | * |
|---|
| .. | .. |
|---|
| 32 | 35 | @Table(name = "application_metadata") |
|---|
| 33 | 36 | @JsonIgnoreProperties(ignoreUnknown = true) |
|---|
| 34 | 37 | @NamedQueries({ @NamedQuery(name = "list-application-metadata", query = "SELECT a FROM ApplicationMetadata a where a.application.id = :applicationId") }) |
|---|
| 35 | | -public class ApplicationMetadata implements Serializable { |
|---|
| 38 | +public class ApplicationMetadata implements Serializable, Metadata { |
|---|
| 36 | 39 | |
|---|
| 37 | 40 | private static final Logger LOG = LogManager.getLogger(ApplicationMetadata.class); |
|---|
| 38 | 41 | |
|---|
| .. | .. |
|---|
| 100 | 103 | @Override |
|---|
| 101 | 104 | public String toString() { |
|---|
| 102 | 105 | |
|---|
| 103 | | - return String.format("ApplicationMetadata (%s)", this.key); |
|---|
| 106 | + return String.format("AppMd (%s: %s)", this.key, value); |
|---|
| 107 | + } |
|---|
| 108 | + |
|---|
| 109 | + @Override |
|---|
| 110 | + public boolean equals(Object obj) { |
|---|
| 111 | + if (!(obj instanceof ApplicationMetadata)) |
|---|
| 112 | + return false; |
|---|
| 113 | + ApplicationMetadata other = (ApplicationMetadata) obj; |
|---|
| 114 | + return Objects.equals(key, other.key) && Objects.equals(application, other.application); |
|---|
| 115 | + } |
|---|
| 116 | + |
|---|
| 117 | + @Override |
|---|
| 118 | + public int hashCode() { |
|---|
| 119 | + return Objects.hash(key, application); |
|---|
| 104 | 120 | } |
|---|
| 105 | 121 | |
|---|
| 106 | 122 | } |
|---|