| .. | .. |
|---|
| 17 | 17 | |
|---|
| 18 | 18 | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
|---|
| 19 | 19 | import com.fasterxml.jackson.annotation.JsonBackReference; |
|---|
| 20 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|---|
| 20 | 21 | import com.fasterxml.jackson.annotation.JsonInclude; |
|---|
| 21 | 22 | import com.fasterxml.jackson.annotation.JsonInclude.Include; |
|---|
| 22 | 23 | import com.fasterxml.jackson.annotation.JsonProperty; |
|---|
| .. | .. |
|---|
| 29 | 30 | @JsonInclude(Include.NON_NULL) |
|---|
| 30 | 31 | @Entity |
|---|
| 31 | 32 | @Table(name = "application_metadata") |
|---|
| 32 | | -@NamedQueries({ |
|---|
| 33 | | - @NamedQuery(name = "list-application-metadata", query = "SELECT a FROM ApplicationMetadata a where a.application.id = :applicationId") |
|---|
| 34 | | -}) |
|---|
| 33 | +@JsonIgnoreProperties(value = { "readonly" }) |
|---|
| 34 | +@NamedQueries({ @NamedQuery(name = "list-application-metadata", query = "SELECT a FROM ApplicationMetadata a where a.application.id = :applicationId") }) |
|---|
| 35 | 35 | public class ApplicationMetadata implements Serializable { |
|---|
| 36 | 36 | |
|---|
| 37 | | - private static final Logger LOG = LogManager.getLogger(ApplicationMetadata.class); |
|---|
| 37 | + private static final Logger LOG = LogManager.getLogger(ApplicationMetadata.class); |
|---|
| 38 | 38 | |
|---|
| 39 | | - private static final long serialVersionUID = 1L; |
|---|
| 39 | + private static final long serialVersionUID = 1L; |
|---|
| 40 | 40 | |
|---|
| 41 | | - @Id |
|---|
| 42 | | - @ManyToOne |
|---|
| 43 | | - @JoinColumn(name = "application_id") |
|---|
| 44 | | - @JsonBackReference |
|---|
| 45 | | - private Application application; |
|---|
| 41 | + @Id |
|---|
| 42 | + @ManyToOne |
|---|
| 43 | + @JoinColumn(name = "application_id") |
|---|
| 44 | + @JsonBackReference |
|---|
| 45 | + private Application application; |
|---|
| 46 | 46 | |
|---|
| 47 | | - @Id |
|---|
| 48 | | - @Column(name = "\"key\"") |
|---|
| 49 | | - private String key; |
|---|
| 47 | + @Id |
|---|
| 48 | + @Column(name = "\"key\"") |
|---|
| 49 | + private String key; |
|---|
| 50 | 50 | |
|---|
| 51 | | - private String value; |
|---|
| 51 | + private String value; |
|---|
| 52 | 52 | |
|---|
| 53 | | - private boolean mandatory; |
|---|
| 53 | + private boolean mandatory; |
|---|
| 54 | 54 | |
|---|
| 55 | | - @Column(name = "creation_timestamp") |
|---|
| 56 | | - @JsonProperty("creation_timestamp") |
|---|
| 57 | | - private Date creationTimestamp; |
|---|
| 55 | + @Column(name = "creation_timestamp") |
|---|
| 56 | + @JsonProperty("creation_timestamp") |
|---|
| 57 | + private Date creationTimestamp; |
|---|
| 58 | 58 | |
|---|
| 59 | | - public String getKey() { |
|---|
| 60 | | - return key; |
|---|
| 61 | | - } |
|---|
| 59 | + public String getKey() { |
|---|
| 60 | + return key; |
|---|
| 61 | + } |
|---|
| 62 | 62 | |
|---|
| 63 | | - public void setKey(String key) { |
|---|
| 64 | | - this.key = key; |
|---|
| 65 | | - } |
|---|
| 63 | + public void setKey(String key) { |
|---|
| 64 | + this.key = key; |
|---|
| 65 | + } |
|---|
| 66 | 66 | |
|---|
| 67 | | - public Application getApplication() { |
|---|
| 68 | | - LOG.info("Getting application from app metadata: {}", application); |
|---|
| 69 | | - return application; |
|---|
| 70 | | - } |
|---|
| 67 | + public Application getApplication() { |
|---|
| 68 | + LOG.info("Getting application from app metadata: {}", application); |
|---|
| 69 | + return application; |
|---|
| 70 | + } |
|---|
| 71 | 71 | |
|---|
| 72 | | - public void setApplication(Application application) { |
|---|
| 73 | | - this.application = application; |
|---|
| 74 | | - } |
|---|
| 72 | + public void setApplication(Application application) { |
|---|
| 73 | + this.application = application; |
|---|
| 74 | + } |
|---|
| 75 | 75 | |
|---|
| 76 | | - public Date getCreationTimestamp() { |
|---|
| 77 | | - return creationTimestamp; |
|---|
| 78 | | - } |
|---|
| 76 | + public Date getCreationTimestamp() { |
|---|
| 77 | + return creationTimestamp; |
|---|
| 78 | + } |
|---|
| 79 | 79 | |
|---|
| 80 | | - public void setCreationTimestamp(Date creationTimestamp) { |
|---|
| 81 | | - this.creationTimestamp = creationTimestamp; |
|---|
| 82 | | - } |
|---|
| 80 | + public void setCreationTimestamp(Date creationTimestamp) { |
|---|
| 81 | + this.creationTimestamp = creationTimestamp; |
|---|
| 82 | + } |
|---|
| 83 | 83 | |
|---|
| 84 | | - public String getValue() { |
|---|
| 85 | | - return value; |
|---|
| 86 | | - } |
|---|
| 84 | + public String getValue() { |
|---|
| 85 | + return value; |
|---|
| 86 | + } |
|---|
| 87 | 87 | |
|---|
| 88 | | - public void setValue(String value) { |
|---|
| 89 | | - this.value = value; |
|---|
| 90 | | - } |
|---|
| 88 | + public void setValue(String value) { |
|---|
| 89 | + this.value = value; |
|---|
| 90 | + } |
|---|
| 91 | 91 | |
|---|
| 92 | | - public boolean isMandatory() { |
|---|
| 93 | | - return mandatory; |
|---|
| 94 | | - } |
|---|
| 92 | + public boolean isMandatory() { |
|---|
| 93 | + return mandatory; |
|---|
| 94 | + } |
|---|
| 95 | 95 | |
|---|
| 96 | | - public void setMandatory(boolean mandatory) { |
|---|
| 97 | | - this.mandatory = mandatory; |
|---|
| 98 | | - } |
|---|
| 96 | + public void setMandatory(boolean mandatory) { |
|---|
| 97 | + this.mandatory = mandatory; |
|---|
| 98 | + } |
|---|
| 99 | 99 | |
|---|
| 100 | | - @Override |
|---|
| 101 | | - public String toString() { |
|---|
| 100 | + @Override |
|---|
| 101 | + public String toString() { |
|---|
| 102 | 102 | |
|---|
| 103 | | - return String.format("ApplicationMetadata (%s)", this.key); |
|---|
| 104 | | - } |
|---|
| 103 | + return String.format("ApplicationMetadata (%s)", this.key); |
|---|
| 104 | + } |
|---|
| 105 | 105 | |
|---|
| 106 | 106 | } |
|---|