| .. | .. |
|---|
| 22 | 22 | import com.fasterxml.jackson.annotation.JsonIgnore; |
|---|
| 23 | 23 | import com.fasterxml.jackson.annotation.JsonInclude; |
|---|
| 24 | 24 | import com.fasterxml.jackson.annotation.JsonInclude.Include; |
|---|
| 25 | +import com.fasterxml.jackson.annotation.JsonManagedReference; |
|---|
| 25 | 26 | import com.fasterxml.jackson.annotation.JsonProperty; |
|---|
| 26 | 27 | |
|---|
| 27 | 28 | /** |
|---|
| .. | .. |
|---|
| 56 | 57 | @JsonProperty("creation_timestamp") |
|---|
| 57 | 58 | private Date creationTimestamp; |
|---|
| 58 | 59 | |
|---|
| 59 | | - @JsonIgnore |
|---|
| 60 | 60 | // We don't include the referenced entities to limit the size of each row at |
|---|
| 61 | | - // the listing |
|---|
| 61 | + // // the listing |
|---|
| 62 | + @JsonIgnore |
|---|
| 62 | 63 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "application") |
|---|
| 63 | 64 | private Set<LicenseType> licenseTypes; |
|---|
| 64 | 65 | |
|---|
| 65 | 66 | @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "application") |
|---|
| 67 | + @JsonManagedReference |
|---|
| 66 | 68 | private Set<ApplicationMetadata> metadata; |
|---|
| 67 | 69 | |
|---|
| 68 | 70 | public Integer getId() { |
|---|
| .. | .. |
|---|
| 90 | 92 | } |
|---|
| 91 | 93 | |
|---|
| 92 | 94 | public Date getCreationTimestamp() { |
|---|
| 93 | | - LOG.info("APP {} TS: {}", this.id, this.creationTimestamp); |
|---|
| 94 | 95 | return creationTimestamp; |
|---|
| 95 | 96 | } |
|---|
| 96 | 97 | |
|---|
| .. | .. |
|---|
| 98 | 99 | this.creationTimestamp = creationTimestamp; |
|---|
| 99 | 100 | } |
|---|
| 100 | 101 | |
|---|
| 101 | | - public Set<LicenseType> getLicenseTypes() { |
|---|
| 102 | | - return licenseTypes; |
|---|
| 103 | | - } |
|---|
| 104 | | - |
|---|
| 105 | | - public void setLicenseTypes(Set<LicenseType> licenseTypes) { |
|---|
| 106 | | - this.licenseTypes = licenseTypes; |
|---|
| 107 | | - } |
|---|
| 108 | | - |
|---|
| 109 | 102 | @JsonProperty("metadata") |
|---|
| 110 | 103 | public Set<ApplicationMetadata> getApplicationMetadata() { |
|---|
| 104 | + LOG.info("Getting metadata from app: {}", metadata); |
|---|
| 111 | 105 | return metadata; |
|---|
| 112 | 106 | } |
|---|
| 113 | 107 | |
|---|
| .. | .. |
|---|
| 137 | 131 | public void setLicenseFilename(String licenseFilename) { |
|---|
| 138 | 132 | this.licenseFilename = licenseFilename; |
|---|
| 139 | 133 | } |
|---|
| 134 | + |
|---|
| 135 | + public Set<LicenseType> getLicenseTypes() { |
|---|
| 136 | + LOG.info("Getting list license types!!!!"); |
|---|
| 137 | + return licenseTypes; |
|---|
| 138 | + } |
|---|
| 139 | + |
|---|
| 140 | + public void setLicenseTypes(Set<LicenseType> licenseTypes) { |
|---|
| 141 | + this.licenseTypes = licenseTypes; |
|---|
| 142 | + } |
|---|
| 140 | 143 | } |
|---|