From 1ed7bc42993b3d23d92dfc38dfd34026a4619ae7 Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Mon, 05 Dec 2016 15:23:22 +0000
Subject: [PATCH] #3410 #3411 fix - Fixed user roles and organizations and Pack date fields on saving action
---
securis/src/main/java/net/curisit/securis/db/LicenseType.java | 185 ++++++++++++++++++++++-----------------------
1 files changed, 91 insertions(+), 94 deletions(-)
diff --git a/securis/src/main/java/net/curisit/securis/db/LicenseType.java b/securis/src/main/java/net/curisit/securis/db/LicenseType.java
index cfaef9d..a34e3ef 100644
--- a/securis/src/main/java/net/curisit/securis/db/LicenseType.java
+++ b/securis/src/main/java/net/curisit/securis/db/LicenseType.java
@@ -37,125 +37,122 @@
@JsonIgnoreProperties(ignoreUnknown = true)
@Entity
@Table(name = "license_type")
-@NamedQueries({
- @NamedQuery(name = "list-license_types", query = "SELECT lt FROM LicenseType lt"),
- @NamedQuery(name = "list-application-license_types", query = "SELECT lt FROM LicenseType lt where lt.application.id = :appId")
-})
+@NamedQueries({ @NamedQuery(name = "list-license_types", query = "SELECT lt FROM LicenseType lt"),
+ @NamedQuery(name = "list-application-license_types", query = "SELECT lt FROM LicenseType lt where lt.application.id = :appId") })
public class LicenseType implements Serializable {
- @SuppressWarnings("unused")
- private static final Logger LOG = LogManager.getLogger(LicenseType.class);
- private static final long serialVersionUID = 1L;
+ @SuppressWarnings("unused")
+ private static final Logger LOG = LogManager.getLogger(LicenseType.class);
+ private static final long serialVersionUID = 1L;
- @Id
- @GeneratedValue
- private Integer id;
+ @Id
+ @GeneratedValue
+ private Integer id;
- private String code;
- private String name;
- private String description;
+ private String code;
+ private String name;
+ private String description;
- @Column(name = "creation_timestamp")
- @JsonProperty("creation_timestamp")
- private Date creationTimestamp;
+ @Column(name = "creation_timestamp")
+ @JsonProperty("creation_timestamp")
+ private Date creationTimestamp;
- @JsonIgnore
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "application_id")
- private Application application;
+ @JsonIgnore
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "application_id")
+ private Application application;
- @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "licenseType")
- @JsonManagedReference
- private Set<LicenseTypeMetadata> metadata;
+ @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "licenseType")
+ @JsonManagedReference
+ private Set<LicenseTypeMetadata> metadata;
- public Set<LicenseTypeMetadata> getMetadata() {
- return metadata;
- }
+ public Set<LicenseTypeMetadata> getMetadata() {
+ return metadata;
+ }
- public void setMetadata(Set<LicenseTypeMetadata> metadata) {
- this.metadata = metadata;
- }
+ public void setMetadata(Set<LicenseTypeMetadata> metadata) {
+ this.metadata = metadata;
+ }
- public Integer getId() {
- return id;
- }
+ public Integer getId() {
+ return id;
+ }
- public void setId(Integer id) {
- this.id = id;
- }
+ public void setId(Integer id) {
+ this.id = id;
+ }
- public String getName() {
- return name;
- }
+ public String getName() {
+ return name;
+ }
- public void setName(String name) {
- this.name = name;
- }
+ public void setName(String name) {
+ this.name = name;
+ }
- public String getDescription() {
- return description;
- }
+ public String getDescription() {
+ return description;
+ }
- public void setDescription(String description) {
- this.description = description;
- }
+ public void setDescription(String description) {
+ this.description = description;
+ }
- public String getCode() {
- return code;
- }
+ public String getCode() {
+ return code;
+ }
- public void setCode(String code) {
- this.code = code;
- }
+ public void setCode(String code) {
+ this.code = code;
+ }
- public Application getApplication() {
- LOG.info("Getting APP from LicType");
- return application;
- }
+ public Application getApplication() {
+ return application;
+ }
- @JsonProperty("application_name")
- public String getApplicationName() {
- return application == null ? null : application.getName();
- }
+ @JsonProperty("application_name")
+ public String getApplicationName() {
+ return application == null ? null : application.getName();
+ }
- @JsonProperty("application_id")
- public Integer getApplicationId() {
- return application == null ? null : application.getId();
- }
+ @JsonProperty("application_id")
+ public Integer getApplicationId() {
+ return application == null ? null : application.getId();
+ }
- @JsonProperty("application_id")
- public void setApplicationId(Integer appId) {
- if (appId == null) {
- application = null;
- } else {
- application = new Application();
- application.setId(appId);
- }
- }
+ @JsonProperty("application_id")
+ public void setApplicationId(Integer appId) {
+ if (appId == null) {
+ application = null;
+ } else {
+ application = new Application();
+ application.setId(appId);
+ }
+ }
- public void setApplication(Application application) {
- this.application = application;
- }
+ public void setApplication(Application application) {
+ this.application = application;
+ }
- public Date getCreationTimestamp() {
- return creationTimestamp;
- }
+ public Date getCreationTimestamp() {
+ return creationTimestamp;
+ }
- public void setCreationTimestamp(Date creationTimestamp) {
- this.creationTimestamp = creationTimestamp;
- }
+ public void setCreationTimestamp(Date creationTimestamp) {
+ this.creationTimestamp = creationTimestamp;
+ }
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof LicenseType))
- return false;
- LicenseType other = (LicenseType) obj;
- return id.equals(other.id);
- }
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof LicenseType))
+ return false;
+ LicenseType other = (LicenseType) obj;
+ return id.equals(other.id);
+ }
- @Override
- public int hashCode() {
+ @Override
+ public int hashCode() {
- return (id == null ? 0 : id.hashCode());
- }
+ return (id == null ? 0 : id.hashCode());
+ }
}
--
Gitblit v1.3.2