| .. | .. |
|---|
| 55 | 55 | @Table(name = "license") |
|---|
| 56 | 56 | @JsonIgnoreProperties(ignoreUnknown = true) |
|---|
| 57 | 57 | @NamedQueries({ |
|---|
| 58 | + @NamedQuery(name = "license-by-code", query = "SELECT l FROM License l where l.code = :code"), |
|---|
| 59 | + @NamedQuery(name = "last-code-suffix-used-in-pack", query = "SELECT max(l.codeSuffix) FROM License l where l.pack.id = :packId"), |
|---|
| 58 | 60 | @NamedQuery(name = "list-licenses-by-pack", query = "SELECT l FROM License l where l.pack.id = :packId"), |
|---|
| 59 | 61 | @NamedQuery(name = "list-licenses-by-req-data", query = "SELECT l FROM License l where l.reqDataHash = :hash"), |
|---|
| 60 | 62 | @NamedQuery(name = "list-active-licenses-by-req-data", query = "SELECT l FROM License l where l.reqDataHash = :hash and l.status in ('AC', 'PA')") |
|---|
| .. | .. |
|---|
| 70 | 72 | private int id; |
|---|
| 71 | 73 | |
|---|
| 72 | 74 | private String code; |
|---|
| 75 | + |
|---|
| 76 | + @Column(name = "code_suffix") |
|---|
| 77 | + @JsonProperty("code_suffix") |
|---|
| 78 | + private Integer codeSuffix; |
|---|
| 73 | 79 | |
|---|
| 74 | 80 | @JsonIgnore |
|---|
| 75 | 81 | @ManyToOne |
|---|
| .. | .. |
|---|
| 372 | 378 | } |
|---|
| 373 | 379 | } |
|---|
| 374 | 380 | |
|---|
| 381 | + public Integer getCodeSuffix() { |
|---|
| 382 | + return codeSuffix; |
|---|
| 383 | + } |
|---|
| 384 | + |
|---|
| 385 | + public void setCodeSuffix(Integer codeSuffix) { |
|---|
| 386 | + this.codeSuffix = codeSuffix; |
|---|
| 387 | + } |
|---|
| 388 | + |
|---|
| 375 | 389 | } |
|---|