rsanchez
2017-03-20 1a0491f2462d2c309bd8e310b22c11019a79ce1e
securis/src/main/java/net/curisit/securis/db/PackMetadata.java
....@@ -13,6 +13,7 @@
1313
1414 import com.fasterxml.jackson.annotation.JsonAutoDetect;
1515 import com.fasterxml.jackson.annotation.JsonIgnore;
16
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
1617 import com.fasterxml.jackson.annotation.JsonInclude;
1718 import com.fasterxml.jackson.annotation.JsonInclude.Include;
1819 import com.fasterxml.jackson.annotation.JsonProperty;
....@@ -25,82 +26,81 @@
2526 @JsonInclude(Include.NON_NULL)
2627 @Entity
2728 @Table(name = "pack_metadata")
28
-@NamedQueries({
29
- @NamedQuery(name = "list-pack-metadata", query = "SELECT a FROM PackMetadata a where a.pack.id = :packId")
30
-})
29
+@JsonIgnoreProperties(value = { "readonly" })
30
+@NamedQueries({ @NamedQuery(name = "list-pack-metadata", query = "SELECT a FROM PackMetadata a where a.pack.id = :packId") })
3131 public class PackMetadata implements Serializable {
3232
33
- private static final long serialVersionUID = 1L;
33
+ private static final long serialVersionUID = 1L;
3434
35
- @Id
36
- @JsonIgnore
37
- @ManyToOne
38
- @JoinColumn(name = "pack_id")
39
- private Pack pack;
35
+ @Id
36
+ @JsonIgnore
37
+ @ManyToOne
38
+ @JoinColumn(name = "pack_id")
39
+ private Pack pack;
4040
41
- @Id
42
- @Column(name = "\"key\"")
43
- private String key;
41
+ @Id
42
+ @Column(name = "\"key\"")
43
+ private String key;
4444
45
- private String value;
45
+ private String value;
4646
47
- private boolean readonly;
47
+ private boolean readonly;
4848
49
- private boolean mandatory;
49
+ private boolean mandatory;
5050
51
- @JsonProperty("pack_id")
52
- public Integer getPackId() {
53
- return pack == null ? null : pack.getId();
54
- }
51
+ @JsonProperty("pack_id")
52
+ public Integer getPackId() {
53
+ return pack == null ? null : pack.getId();
54
+ }
5555
56
- @JsonProperty("pack_id")
57
- public void setLicenseTypeId(Integer idPack) {
58
- if (idPack == null) {
59
- pack = null;
60
- } else {
61
- pack = new Pack();
62
- pack.setId(idPack);
63
- }
64
- }
56
+ @JsonProperty("pack_id")
57
+ public void setLicenseTypeId(Integer idPack) {
58
+ if (idPack == null) {
59
+ pack = null;
60
+ } else {
61
+ pack = new Pack();
62
+ pack.setId(idPack);
63
+ }
64
+ }
6565
66
- public Pack getPack() {
67
- return pack;
68
- }
66
+ public Pack getPack() {
67
+ return pack;
68
+ }
6969
70
- public void setPack(Pack pack) {
71
- this.pack = pack;
72
- }
70
+ public void setPack(Pack pack) {
71
+ this.pack = pack;
72
+ }
7373
74
- public String getValue() {
75
- return value;
76
- }
74
+ public String getValue() {
75
+ return value;
76
+ }
7777
78
- public void setValue(String value) {
79
- this.value = value;
80
- }
78
+ public void setValue(String value) {
79
+ this.value = value;
80
+ }
8181
82
- public String getKey() {
83
- return key;
84
- }
82
+ public String getKey() {
83
+ return key;
84
+ }
8585
86
- public void setKey(String key) {
87
- this.key = key;
88
- }
86
+ public void setKey(String key) {
87
+ this.key = key;
88
+ }
8989
90
- public boolean isReadonly() {
91
- return readonly;
92
- }
90
+ public boolean isReadonly() {
91
+ return readonly;
92
+ }
9393
94
- public void setReadonly(boolean readonly) {
95
- this.readonly = readonly;
96
- }
94
+ public void setReadonly(boolean readonly) {
95
+ this.readonly = readonly;
96
+ }
9797
98
- public boolean isMandatory() {
99
- return mandatory;
100
- }
98
+ public boolean isMandatory() {
99
+ return mandatory;
100
+ }
101101
102
- public void setMandatory(boolean mandatory) {
103
- this.mandatory = mandatory;
104
- }
102
+ public void setMandatory(boolean mandatory) {
103
+ this.mandatory = mandatory;
104
+ }
105105
106106 }