summaryrefslogtreecommitdiffstats
path: root/ONAP-REST/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'ONAP-REST/src/main/java')
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RainyDayTreatments.java87
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RemoteCatalogValues.java47
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RiskType.java97
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RuleAlgorithms.java76
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SafePolicyWarning.java58
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SecurityZone.java47
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ServiceList.java94
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SystemLogDb.java (renamed from ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SystemLogDB.java)113
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/TermList.java190
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/UserInfo.java38
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VarbindDictionary.java104
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VmType.java (renamed from ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VMType.java)49
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VnfType.java (renamed from ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VNFType.java)101
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VsclAction.java (renamed from ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VSCLAction.java)100
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/WatchPolicyNotificationTable.java75
-rw-r--r--ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Zone.java47
16 files changed, 364 insertions, 959 deletions
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RainyDayTreatments.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RainyDayTreatments.java
index fd1a6b73b..4b1c810af 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RainyDayTreatments.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RainyDayTreatments.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,99 +21,45 @@
package org.onap.policy.rest.jpa;
+import java.io.Serializable;
+
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
-
import javax.persistence.NamedQuery;
import javax.persistence.OrderBy;
import javax.persistence.Table;
-import java.io.Serializable;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
/**
* The persistent class for the RainyDayTreatment database table.
- *
*/
@Entity
-@Table(name="RainyDayTreatments")
-@NamedQuery(name="RainyDayTreatments.findAll", query="SELECT e FROM RainyDayTreatments e")
+@Table(name = "RainyDayTreatments")
+@NamedQuery(name = "RainyDayTreatments.findAll", query = "SELECT e FROM RainyDayTreatments e")
+@Getter
+@Setter
+@NoArgsConstructor
public class RainyDayTreatments implements Serializable {
- /**
- *
- */
private static final long serialVersionUID = -2491410352490381323L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="bbid", nullable=false, length=255)
+ @Column(name = "bbid", nullable = false, length = 255)
@OrderBy("asc")
private String bbid;
- @Column(name="workstep", nullable=true, length=255)
+ @Column(name = "workstep", nullable = true, length = 255)
private String workstep;
- @Column(name="treatments", nullable=true, length=1028)
+ @Column(name = "treatments", nullable = true, length = 1028)
private String treatments;
-
- public RainyDayTreatments() {
- // Empty constructor
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- /**
- * @return the bbid
- */
- public String getBbid() {
- return bbid;
- }
-
- /**
- * @param bbid the bbid to set
- */
- public void setBbid(String bbid) {
- this.bbid = bbid;
- }
-
- /**
- * @return the workstep
- */
- public String getWorkstep() {
- return workstep;
- }
-
- /**
- * @param workstep the workstep to set
- */
- public void setWorkstep(String workstep) {
- this.workstep = workstep;
- }
-
- /**
- * @return the treatments
- */
- public String getTreatments() {
- return treatments;
- }
-
- /**
- * @param treatments the treatments to set
- */
- public void setTreatments(String treatments) {
- this.treatments = treatments;
- }
-
-
} \ No newline at end of file
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RemoteCatalogValues.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RemoteCatalogValues.java
index 0cb339adf..b7662539c 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RemoteCatalogValues.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RemoteCatalogValues.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,8 +20,7 @@
*/
package org.onap.policy.rest.jpa;
-/*
- */
+
import java.io.Serializable;
import javax.persistence.Column;
@@ -32,47 +32,26 @@ import javax.persistence.NamedQuery;
import javax.persistence.OrderBy;
import javax.persistence.Table;
+import lombok.Getter;
+import lombok.Setter;
@Entity
-@Table(name="RemoteCatalogValues")
-@NamedQuery(name="RemoteCatalogValues.findAll", query="SELECT e FROM RemoteCatalogValues e ")
+@Table(name = "RemoteCatalogValues")
+@NamedQuery(name = "RemoteCatalogValues.findAll", query = "SELECT e FROM RemoteCatalogValues e ")
+@Getter
+@Setter
public class RemoteCatalogValues implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="name", nullable=false)
+ @Column(name = "name", nullable = false)
@OrderBy("asc")
private String name;
- @Column(name="value")
+ @Column(name = "value")
private String value;
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
-
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RiskType.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RiskType.java
index 8239d4ef8..3f7c89ec0 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RiskType.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RiskType.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,8 +20,7 @@
*/
package org.onap.policy.rest.jpa;
-/*
- */
+
import java.io.Serializable;
import java.util.Date;
@@ -39,106 +39,63 @@ import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
+import lombok.Getter;
+import lombok.Setter;
+/**
+ * The Class RiskType.
+ */
@Entity
-@Table(name="RiskType")
-@NamedQuery(name="RiskType.findAll", query="SELECT e FROM RiskType e ")
+@Table(name = "RiskType")
+@NamedQuery(name = "RiskType.findAll", query = "SELECT e FROM RiskType e ")
+@Getter
+@Setter
public class RiskType implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="name", nullable=false, unique=true)
+ @Column(name = "name", nullable = false, unique = true)
@OrderBy("asc")
private String name;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
+ @Column(name = "created_date", updatable = false)
private Date createdDate;
- @Column(name="description", nullable=true, length=2048)
+ @Column(name = "description", nullable = true, length = 2048)
private String description;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
+ @Column(name = "modified_date", nullable = false)
private Date modifiedDate;
@ManyToOne(optional = false)
- @JoinColumn(name="created_by")
+ @JoinColumn(name = "created_by")
private UserInfo userCreatedBy;
@ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
+ @JoinColumn(name = "modified_by")
private UserInfo userModifiedBy;
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
+ /**
+ * Pre persist.
+ */
@PrePersist
- public void prePersist() {
+ public void prePersist() {
Date date = new Date();
this.createdDate = date;
this.modifiedDate = date;
}
+ /**
+ * Pre update.
+ */
@PreUpdate
public void preUpdate() {
this.modifiedDate = new Date();
}
- public String getRiskName() {
- return this.name;
- }
-
- public void setRiskName(String riskName) {
- this.name = riskName;
-
- }
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RuleAlgorithms.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RuleAlgorithms.java
index 905648d5c..aa2ae75bc 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RuleAlgorithms.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RuleAlgorithms.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,8 +18,11 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.rest.jpa;
+import com.att.research.xacml.api.Identifier;
+
import java.io.Serializable;
import javax.persistence.Column;
@@ -30,11 +34,17 @@ import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
-import com.att.research.xacml.api.Identifier;
+import lombok.Getter;
+import lombok.Setter;
+/**
+ * The Class RuleAlgorithms.
+ */
@Entity
-@Table(name="RuleAlgorithms")
-@NamedQuery(name="RuleAlgorithms.findAll", query="SELECT d FROM RuleAlgorithms d")
+@Table(name = "RuleAlgorithms")
+@NamedQuery(name = "RuleAlgorithms.findAll", query = "SELECT d FROM RuleAlgorithms d")
+@Getter
+@Setter
public class RuleAlgorithms implements Serializable {
private static final long serialVersionUID = 1L;
@@ -43,48 +53,47 @@ public class RuleAlgorithms implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="is_standard", nullable=false)
+ @Column(name = "is_standard", nullable = false)
private char isStandard;
- @Column(name="xacml_id", nullable=false, unique=true, length=255)
+ @Column(name = "xacml_id", nullable = false, unique = true, length = 255)
private String xacmlId;
- @Column(name="short_name", nullable=false, length=64)
+ @Column(name = "short_name", nullable = false, length = 64)
private String shortName;
+ /**
+ * Instantiates a new rule algorithms.
+ *
+ * @param id the id
+ * @param standard the standard
+ */
public RuleAlgorithms(Identifier id, char standard) {
if (id != null) {
this.xacmlId = id.stringValue();
}
this.isStandard = standard;
}
+
+ /**
+ * Instantiates a new rule algorithms.
+ *
+ * @param id the id
+ */
public RuleAlgorithms(Identifier id) {
this(id, RuleAlgorithms.STANDARD);
}
+ /**
+ * Instantiates a new rule algorithms.
+ */
public RuleAlgorithms() {
this(null, RuleAlgorithms.STANDARD);
}
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public char getIsStandard() {
- return this.isStandard;
- }
-
- public void setIsStandard(char isStandard) {
- this.isStandard = isStandard;
- }
-
@Transient
public boolean isStandard() {
return this.isStandard == RuleAlgorithms.STANDARD;
@@ -94,21 +103,4 @@ public class RuleAlgorithms implements Serializable {
public boolean isCustom() {
return this.isStandard == RuleAlgorithms.CUSTOM;
}
-
- public String getXacmlId() {
- return this.xacmlId;
- }
-
- public void setXacmlId(String xacmlId) {
- this.xacmlId = xacmlId;
- }
-
- public String getShortName() {
- return shortName;
- }
-
- public void setShortName(String shortName) {
- this.shortName = shortName;
- }
-
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SafePolicyWarning.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SafePolicyWarning.java
index adc61506b..9663fd954 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SafePolicyWarning.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SafePolicyWarning.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,8 +20,7 @@
*/
package org.onap.policy.rest.jpa;
-/*
- */
+
import java.io.Serializable;
import javax.persistence.Column;
@@ -32,55 +32,29 @@ import javax.persistence.NamedQuery;
import javax.persistence.OrderBy;
import javax.persistence.Table;
+import lombok.Getter;
+import lombok.Setter;
@Entity
-@Table(name="SafePolicyWarning")
-@NamedQuery(name="SafePolicyWarning.findAll", query="SELECT e FROM SafePolicyWarning e ")
+@Table(name = "SafePolicyWarning")
+@NamedQuery(name = "SafePolicyWarning.findAll", query = "SELECT e FROM SafePolicyWarning e ")
+@Getter
+@Setter
public class SafePolicyWarning implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="name", nullable=false)
+ @Column(name = "name", nullable = false)
@OrderBy("asc")
private String name;
- @Column(name="message")
- private String message ;
-
- @Column(name="riskType")
- private String riskType ;
-
- public String getRiskType() {
- return riskType;
- }
- public void setRiskType(String riskType) {
- this.riskType = riskType;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public String getMessage() {
- return message;
- }
- public void setMessage(String message) {
- this.message = message;
- }
- public void setName(String name) {
- this.name = name;
-
- }
+ @Column(name = "message")
+ private String message;
+ @Column(name = "riskType")
+ private String riskType;
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SecurityZone.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SecurityZone.java
index c1d6c0174..fe1c6ac4c 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SecurityZone.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SecurityZone.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,8 +20,7 @@
*/
package org.onap.policy.rest.jpa;
-/*
- */
+
import java.io.Serializable;
import javax.persistence.Column;
@@ -32,45 +32,26 @@ import javax.persistence.NamedQuery;
import javax.persistence.OrderBy;
import javax.persistence.Table;
+import lombok.Getter;
+import lombok.Setter;
+
@Entity
-@Table(name="securityzone")
-@NamedQuery(name="SecurityZone.findAll", query="SELECT e FROM SecurityZone e ")
+@Table(name = "securityzone")
+@NamedQuery(name = "SecurityZone.findAll", query = "SELECT e FROM SecurityZone e ")
+@Getter
+@Setter
public class SecurityZone implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="name", nullable=false)
+ @Column(name = "name", nullable = false)
@OrderBy("asc")
private String zoneName;
- @Column(name="value")
+ @Column(name = "value")
private String zoneValue;
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getZoneName() {
- return this.zoneName;
- }
-
- public void setZoneName(String zoneName) {
- this.zoneName = zoneName;
-
- }
- public String getZoneValue() {
- return this.zoneValue;
- }
-
- public void setZoneValue(String zoneValue) {
- this.zoneValue = zoneValue;
- }
-
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ServiceList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ServiceList.java
index 33243b0a5..9be6b2ebf 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ServiceList.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ServiceList.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,8 +20,7 @@
*/
package org.onap.policy.rest.jpa;
-/*
- */
+
import java.io.Serializable;
import javax.persistence.Column;
@@ -32,92 +32,38 @@ import javax.persistence.NamedQuery;
import javax.persistence.OrderBy;
import javax.persistence.Table;
+import lombok.Getter;
+import lombok.Setter;
+
@Entity
-@Table(name="servicegroup")
-@NamedQuery(name="ServiceList.findAll", query="SELECT e FROM ServiceList e ")
+@Table(name = "servicegroup")
+@NamedQuery(name = "ServiceList.findAll", query = "SELECT e FROM ServiceList e ")
+@Getter
+@Setter
public class ServiceList implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="name", nullable=false)
+ @Column(name = "name", nullable = false)
@OrderBy("asc")
private String serviceName;
- @Column(name="description")
- private String serviceDesc;
+ @Column(name = "description")
+ private String serviceDescription;
- @Column(name="type")
+ @Column(name = "type")
private String serviceType;
- @Column(name="transportprotocol")
- private String serviceTrasProtocol;
+ @Column(name = "transportprotocol")
+ private String serviceTransportProtocol;
- @Column(name="appprotocol ")
+ @Column(name = "appprotocol ")
private String serviceAppProtocol;
- @Column(name="ports")
+ @Column(name = "ports")
private String servicePorts;
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getServiceName() {
- return this.serviceName;
- }
-
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
-
- }
-
- public String getServiceDescription() {
- return this.serviceDesc;
- }
-
- public void setServiceDescription(String serviceDesc) {
- this.serviceDesc = serviceDesc;
-
- }
-
- public String getServiceType() {
- return this.serviceType;
- }
-
- public void setServiceType(String serviceType) {
- this.serviceType = serviceType;
- }
-
- public String getServiceTransProtocol() {
- return this.serviceTrasProtocol;
- }
-
- public void setServiceTransProtocol(String serviceTrasProtocol) {
- this.serviceTrasProtocol = serviceTrasProtocol;
-
- }
-
- public String getServiceAppProtocol() {
- return this.serviceAppProtocol;
- }
-
- public void setServiceAppProtocol(String serviceAppProtocol) {
- this.serviceAppProtocol = serviceAppProtocol;
-
- }
- public String getServicePorts() {
- return this.servicePorts;
- }
-
- public void setServicePorts(String servicePorts) {
- this.servicePorts = servicePorts;
-
- }
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SystemLogDB.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SystemLogDb.java
index 9dbfc52ee..9b8845fea 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SystemLogDB.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SystemLogDb.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,6 +18,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.rest.jpa;
import java.io.Serializable;
@@ -32,47 +34,62 @@ import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
+import lombok.Getter;
+import lombok.Setter;
+
/**
- * The persistent class for the system log database table.
- *
-*/
+ * The persistent class for the system log database table.
+ */
@Entity
-@Table(name="SystemLogDB")
-@NamedQuery(name="SystemLogDB.findAll", query="SELECT o FROM SystemLogDB o")
-public class SystemLogDB implements Serializable {
+@Table(name = "SystemLogDb")
+@NamedQuery(name = "SystemLogDb.findAll", query = "SELECT o FROM SystemLogDb o")
+@Getter
+@Setter
+public class SystemLogDb implements Serializable {
private static final long serialVersionUID = 1L;
-
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="type", nullable=false)
+ @Column(name = "type", nullable = false)
private String type;
- @Column(name="system", nullable=false, length=255)
+ @Column(name = "system", nullable = false, length = 255)
private String system;
- @Column(name="description", nullable=true, length=2048)
+ @Column(name = "description", nullable = true, length = 2048)
private String description;
- @Column(name="remote", nullable=false, length=255)
+ @Column(name = "remote", nullable = false, length = 255)
private String remote;
- @Column(name="logtype", nullable=false, length=255)
+ @Column(name = "logtype", nullable = false, length = 255)
private String logtype;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="date", nullable=false, updatable=false)
+ @Column(name = "date", nullable = false, updatable = false)
private Date date;
- public SystemLogDB() {
+ /**
+ * Instantiates a new system log db.
+ */
+ public SystemLogDb() {
super();
}
- public SystemLogDB(int id, String system, String description, String remote,
- String type, String logtype) {
+ /**
+ * Instantiates a new system log db.
+ *
+ * @param id the id
+ * @param system the system
+ * @param description the description
+ * @param remote the remote
+ * @param type the type
+ * @param logtype the logtype
+ */
+ public SystemLogDb(int id, String system, String description, String remote, String type, String logtype) {
this.id = id;
this.system = system;
this.description = description;
@@ -80,62 +97,4 @@ public class SystemLogDB implements Serializable {
this.type = type;
this.logtype = logtype;
}
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public Date getDate(){
- return this.date;
- }
-
- public void setDate(Date date){
- this.date = date;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getType() {
- return this.type;
- }
-
- public void setType(String type) {
- this.type = type;
-
- }
-
- public String getSystem() {
- return this.system;
- }
-
- public void setSystem(String system) {
- this.system = system;
- }
-
- public String getRemote() {
- return this.remote;
- }
-
- public void setRemote(String remote) {
- this.remote = remote;
-
- }
- public String getLogtype() {
- return this.logtype;
- }
-
- public void setLogtype(String logtype) {
- this.logtype = logtype;
-
- }
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/TermList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/TermList.java
index a87cf2a6b..63dce9390 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/TermList.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/TermList.java
@@ -3,6 +3,7 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +23,7 @@ package org.onap.policy.rest.jpa;
import java.io.Serializable;
import java.util.Date;
+
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@@ -37,209 +39,97 @@ import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
+import lombok.Getter;
+import lombok.Setter;
+/**
+ * The Class TermList.
+ */
@Entity
-@Table(name="TERM")
-@NamedQuery(name="TermList.findAll", query="SELECT e FROM TermList e")
+@Table(name = "TERM")
+@NamedQuery(name = "TermList.findAll", query = "SELECT e FROM TermList e")
+@Getter
+@Setter
public class TermList implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="termName", nullable=false)
+ @Column(name = "termName", nullable = false)
@OrderBy("asc")
private String termName;
- @Column(name="description")
- private String termDescription;
+ @Column(name = "description")
+ private String description;
- @Column(name="fromzone")
+ @Column(name = "fromzone")
private String fromZone;
- @Column(name="tozone")
+ @Column(name = "tozone")
private String toZone;
- @Column(name="srcIPList")
- private String srcIPList;
+ @Column(name = "srcIPList")
+ private String srcIpList;
- @Column(name="destIPList")
- private String destIPList;
+ @Column(name = "destIPList")
+ private String destIpList;
- @Column(name="protocolList")
+ @Column(name = "protocolList")
private String protocolList;
- @Column(name="portList")
+ @Column(name = "portList")
private String portList;
- @Column(name="srcPortList")
+ @Column(name = "srcPortList")
private String srcPortList;
- @Column(name="destPortList")
+ @Column(name = "destPortList")
private String destPortList;
- @Column(name="action")
+ @Column(name = "action")
private String action;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
+ @Column(name = "created_date", updatable = false)
private Date createdDate;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
+ @Column(name = "modified_date", nullable = false)
private Date modifiedDate;
@ManyToOne(optional = false)
- @JoinColumn(name="created_by")
+ @JoinColumn(name = "created_by")
private UserInfo userCreatedBy;
@ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
+ @JoinColumn(name = "modified_by")
private UserInfo userModifiedBy;
+ /**
+ * Instantiates a new term list.
+ */
public TermList() {
this.modifiedDate = new Date();
}
- public Date getCreatedDate() {
- return this.createdDate;
- }
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
+ /**
+ * Pre persist.
+ */
@PrePersist
- public void prePersist() {
+ public void prePersist() {
Date date = new Date();
this.createdDate = date;
this.modifiedDate = date;
}
+ /**
+ * Pre update.
+ */
@PreUpdate
public void preUpdate() {
this.modifiedDate = new Date();
}
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getTermName() {
- return this.termName;
- }
-
- public void setTermName(String termName) {
- this.termName = termName;
- }
-
- public String getTermDescription() {
- return this.termDescription;
- }
-
- public void setDescription(String termDescription) {
- this.termDescription = termDescription;
- }
-
- public String getFromZone() {
- return this.fromZone;
- }
-
- public void setFromZones(String fromZone) {
- this.fromZone = fromZone;
- }
-
- public String getToZone() {
- return this.toZone;
- }
-
- public void setToZones(String toZone) {
- this.toZone = toZone;
- }
-
- public String getSrcIPList() {
- return this.srcIPList;
- }
-
- public void setSrcIPList(String srcIPList) {
- this.srcIPList = srcIPList;
- }
-
- public String getDestIPList() {
- return this.destIPList;
- }
-
- public void setDestIPList(String destIPList) {
- this.destIPList = destIPList;
- }
-
- public String getProtocolList() {
- return this.protocolList;
- }
-
- public void setProtocolList(String protocolList) {
- this.protocolList = protocolList;
- }
-
- public String getPortList() {
- return this.portList;
- }
-
- public void setPortList(String portList) {
- this.portList = portList;
- }
-
- public String getSrcPortList() {
- return this.srcPortList;
- }
-
- public void setSrcPortList(String srcPortList) {
- this.srcPortList = srcPortList;
- }
-
- public String getDestPortList() {
- return this.destPortList;
- }
-
- public void setDestPortList(String destPortList) {
- this.destPortList = destPortList;
- }
-
-
- public String getAction() {
- return this.action;
- }
-
- public void setAction(String action) {
- this.action = action;
- }
-
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/UserInfo.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/UserInfo.java
index da1438010..38d14f848 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/UserInfo.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/UserInfo.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,6 +21,10 @@
package org.onap.policy.rest.jpa;
+import com.att.research.xacml.api.Identifier;
+import com.att.research.xacml.std.IdentifierImpl;
+import com.fasterxml.jackson.annotation.JsonBackReference;
+
import java.io.Serializable;
import javax.persistence.Column;
@@ -29,44 +34,29 @@ import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
-import com.att.research.xacml.api.Identifier;
-import com.att.research.xacml.std.IdentifierImpl;
-import com.fasterxml.jackson.annotation.JsonBackReference;
+import lombok.Getter;
+import lombok.Setter;
@Entity
@Table(name = "UserInfo")
-@NamedQuery(name="UserInfo.findAll", query="SELECT u FROM UserInfo u ")
+@NamedQuery(name = "UserInfo.findAll", query = "SELECT u FROM UserInfo u ")
+@Getter
+@Setter
public class UserInfo implements Serializable {
private static final long serialVersionUID = 1L;
@Id
- @Column(name="loginid", nullable=false, length=45)
+ @Column(name = "loginid", nullable = false, length = 45)
private String userLoginId;
@Column(name = "name", nullable = false, unique = true)
private String userName;
- public UserInfo(){
+ public UserInfo() {
this.userLoginId = userName;
}
- public String getUserLoginId() {
- return userLoginId;
- }
-
- public void setUserLoginId(String loginid) {
- this.userLoginId = loginid;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
@Transient
@JsonBackReference
public Identifier getIdentiferByUserId() {
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VarbindDictionary.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VarbindDictionary.java
index aee187e6f..070cf7a56 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VarbindDictionary.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VarbindDictionary.java
@@ -3,6 +3,7 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +23,7 @@ package org.onap.policy.rest.jpa;
import java.io.Serializable;
import java.util.Date;
+
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@@ -37,10 +39,18 @@ import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * The Class VarbindDictionary.
+ */
@Entity
-@Table(name="VarbindDictionary")
+@Table(name = "VarbindDictionary")
@NamedQuery(name = "VarbindDictionary.findAll", query = "Select v FROM VarbindDictionary v")
-public class VarbindDictionary implements Serializable{
+@Getter
+@Setter
+public class VarbindDictionary implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@@ -48,7 +58,7 @@ public class VarbindDictionary implements Serializable{
@Column(name = "Id")
private int id;
- @Column(name ="varbind_Name", nullable = false, unique = true)
+ @Column(name = "varbind_Name", nullable = false, unique = true)
@OrderBy("asc")
private String varbindName;
@@ -56,104 +66,46 @@ public class VarbindDictionary implements Serializable{
private String varbindDescription;
@Column(name = "varbind_oid", nullable = false)
- private String varbindOID;
+ private String varbindOid;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
+ @Column(name = "created_date", updatable = false)
private Date createdDate;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
+ @Column(name = "modified_date", nullable = false)
private Date modifiedDate;
@ManyToOne(optional = false)
- @JoinColumn(name="created_by")
+ @JoinColumn(name = "created_by")
private UserInfo userCreatedBy;
@ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
+ @JoinColumn(name = "modified_by")
private UserInfo userModifiedBy;
+ /**
+ * Instantiates a new varbind dictionary.
+ */
public VarbindDictionary() {
this.setModifiedDate(new Date());
}
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
+ /**
+ * Pre persist.
+ */
@PrePersist
- public void prePersist() {
+ public void prePersist() {
Date date = new Date();
this.createdDate = date;
this.modifiedDate = date;
}
+ /**
+ * Pre update.
+ */
@PreUpdate
public void preUpdate() {
this.modifiedDate = new Date();
}
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getVarbindName() {
- return varbindName;
- }
-
- public void setVarbindName(String varbindName) {
- this.varbindName = varbindName;
- }
-
- public String getVarbindDescription() {
- return varbindDescription;
- }
-
- public void setVarbindDescription(String varbindDescription) {
- this.varbindDescription = varbindDescription;
- }
-
- public String getVarbindOID() {
- return varbindOID;
- }
-
- public void setVarbindOID(String varbindOID) {
- this.varbindOID = varbindOID;
- }
-
- public Date getCreatedDate() {
- return createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
-
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VMType.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VmType.java
index 463e51709..51c3f657d 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VMType.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VmType.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,8 +20,7 @@
*/
package org.onap.policy.rest.jpa;
-/*
- */
+
import java.io.Serializable;
import javax.persistence.Column;
@@ -32,47 +32,26 @@ import javax.persistence.NamedQuery;
import javax.persistence.OrderBy;
import javax.persistence.Table;
+import lombok.Getter;
+import lombok.Setter;
@Entity
-@Table(name="VMType")
-@NamedQuery(name="VMType.findAll", query="SELECT e FROM VMType e ")
-public class VMType implements Serializable {
+@Table(name = "VmType")
+@NamedQuery(name = "VmType.findAll", query = "SELECT e FROM VmType e ")
+@Getter
+@Setter
+public class VmType implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="name", nullable=false)
+ @Column(name = "name", nullable = false)
@OrderBy("asc")
private String name;
- @Column(name="description")
+ @Column(name = "description")
private String description;
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
-
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VNFType.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VnfType.java
index 3d7c7f67b..1a5c679af 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VNFType.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VnfType.java
@@ -3,6 +3,7 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +23,7 @@ package org.onap.policy.rest.jpa;
import java.io.Serializable;
import java.util.Date;
+
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@@ -37,111 +39,70 @@ import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
+import lombok.Getter;
+import lombok.Setter;
-
+/**
+ * The Class VnfType.
+ */
@Entity
-@Table(name="VNFType")
-@NamedQuery(name="VNFType.findAll", query="SELECT v FROM VNFType v ")
-public class VNFType implements Serializable {
+@Table(name = "VnfType")
+@NamedQuery(name = "VnfType.findAll", query = "SELECT v FROM VnfType v ")
+@Getter
+@Setter
+public class VnfType implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="vnf_type", nullable=false, unique=true)
+ @Column(name = "vnf_type", nullable = false, unique = true)
@OrderBy("asc")
- private String vnftype;
+ private String type;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
+ @Column(name = "created_date", updatable = false)
private Date createdDate;
- @Column(name="description", nullable=true, length=2048)
+ @Column(name = "description", nullable = true, length = 2048)
private String description;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
+ @Column(name = "modified_date", nullable = false)
private Date modifiedDate;
@ManyToOne(optional = false)
- @JoinColumn(name="created_by")
+ @JoinColumn(name = "created_by")
private UserInfo userCreatedBy;
@ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
+ @JoinColumn(name = "modified_by")
private UserInfo userModifiedBy;
- public VNFType() {
+ /**
+ * Instantiates a new VNF type.
+ */
+ public VnfType() {
this.modifiedDate = new Date();
}
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- public String getVnftype() {
- return vnftype;
- }
-
- public void setVnftype(String vnftype) {
- this.vnftype = vnftype;
- }
-
+ /**
+ * Pre persist.
+ */
@PrePersist
- public void prePersist() {
+ public void prePersist() {
Date date = new Date();
this.createdDate = date;
this.modifiedDate = date;
}
+ /**
+ * Pre update.
+ */
@PreUpdate
public void preUpdate() {
this.modifiedDate = new Date();
}
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VSCLAction.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VsclAction.java
index e5aac971d..5506bc5b3 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VSCLAction.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VsclAction.java
@@ -3,6 +3,7 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +23,7 @@ package org.onap.policy.rest.jpa;
import java.io.Serializable;
import java.util.Date;
+
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@@ -37,111 +39,71 @@ import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
+import lombok.Getter;
+import lombok.Setter;
+/**
+ * The Class VsclAction.
+ */
@Entity
-@Table(name="VSCLAction")
-@NamedQuery(name="VSCLAction.findAll", query="SELECT v FROM VSCLAction v ")
-public class VSCLAction implements Serializable {
+@Table(name = "VsclAction")
+@NamedQuery(name = "VsclAction.findAll", query = "SELECT v FROM VsclAction v ")
+@Getter
+@Setter
+public class VsclAction implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="vscl_action", nullable=false, unique=true)
+ @Column(name = "vscl_action", nullable = false, unique = true)
@OrderBy("asc")
- private String vsclaction;
+ private String action;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
+ @Column(name = "created_date", updatable = false)
private Date createdDate;
- @Column(name="description", nullable=true, length=2048)
+ @Column(name = "description", nullable = true, length = 2048)
private String description;
@Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
+ @Column(name = "modified_date", nullable = false)
private Date modifiedDate;
@ManyToOne(optional = false)
- @JoinColumn(name="created_by")
+ @JoinColumn(name = "created_by")
private UserInfo userCreatedBy;
@ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
+ @JoinColumn(name = "modified_by")
private UserInfo userModifiedBy;
- public VSCLAction() {
+ /**
+ * Instantiates a new vscl action.
+ */
+ public VsclAction() {
this.setModifiedDate(new Date());
}
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
+ /**
+ * Pre persist.
+ */
@PrePersist
- public void prePersist() {
+ public void prePersist() {
Date date = new Date();
this.createdDate = date;
this.modifiedDate = date;
}
+ /**
+ * Pre update.
+ */
@PreUpdate
public void preUpdate() {
this.modifiedDate = new Date();
}
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getVsclaction() {
- return vsclaction;
- }
-
- public void setVsclaction(String vsclaction) {
- this.vsclaction = vsclaction;
- }
-
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/WatchPolicyNotificationTable.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/WatchPolicyNotificationTable.java
index 9f2cbfdf1..5c288a8a6 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/WatchPolicyNotificationTable.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/WatchPolicyNotificationTable.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,13 +20,8 @@
*/
package org.onap.policy.rest.jpa;
-/*
- *
- *
- * */
import java.io.Serializable;
-import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
@@ -36,70 +32,29 @@ import javax.persistence.NamedQuery;
import javax.persistence.OrderBy;
import javax.persistence.Table;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
@Entity
@Table(name = "WatchPolicyNotificationTable")
-@NamedQuery(name="WatchPolicyNotificationTable.findAll", query="SELECT e FROM WatchPolicyNotificationTable e ")
-public class WatchPolicyNotificationTable implements Serializable{
+@NamedQuery(name = "WatchPolicyNotificationTable.findAll", query = "SELECT e FROM WatchPolicyNotificationTable e ")
+@Getter
+@Setter
+@EqualsAndHashCode
+public class WatchPolicyNotificationTable implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="policyName", nullable=false, unique=true)
+ @Column(name = "policyName", nullable = false, unique = true)
@OrderBy("asc")
private String policyName;
- @Column(name="loginIds", nullable=false, unique=true)
+ @Column(name = "loginIds", nullable = false, unique = true)
@OrderBy("asc")
private String loginIds;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getPolicyName() {
- return policyName;
- }
-
- public void setPolicyName(String policyName) {
- this.policyName = policyName;
- }
-
- public String getLoginIds() {
- return loginIds;
- }
-
- public void setLoginIds(String loginIds) {
- this.loginIds = loginIds;
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, policyName, loginIds);
- }
-
- @Override
- public boolean equals(Object obj) {
- if(obj == null){
- return false;
- }
- if(obj == this){
- return true;
- }
- if(!(obj instanceof WatchPolicyNotificationTable)){
- return false;
- }
-
- return id == ((WatchPolicyNotificationTable)obj).id &&
- policyName.equals(((WatchPolicyNotificationTable)obj).policyName) &&
- loginIds.equals(((WatchPolicyNotificationTable)obj).loginIds);
- }
-
-
}
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Zone.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Zone.java
index 58c1a275a..71252ed05 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Zone.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Zone.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,8 +20,7 @@
*/
package org.onap.policy.rest.jpa;
-/*
- */
+
import java.io.Serializable;
import javax.persistence.Column;
@@ -32,45 +32,26 @@ import javax.persistence.NamedQuery;
import javax.persistence.OrderBy;
import javax.persistence.Table;
+import lombok.Getter;
+import lombok.Setter;
+
@Entity
-@Table(name="zone")
-@NamedQuery(name="Zone.findAll", query="SELECT e FROM Zone e ")
+@Table(name = "zone")
+@NamedQuery(name = "Zone.findAll", query = "SELECT e FROM Zone e ")
+@Getter
+@Setter
public class Zone implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
+ @Column(name = "id")
private int id;
- @Column(name="zonename", nullable=false)
+ @Column(name = "zonename", nullable = false)
@OrderBy("asc")
private String zoneName;
- @Column(name="zonevalue")
+ @Column(name = "zonevalue")
private String zoneValue;
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getZoneName() {
- return this.zoneName;
- }
-
- public void setZoneName(String zoneName) {
- this.zoneName = zoneName;
-
- }
- public String getZoneValue() {
- return this.zoneValue;
- }
-
- public void setZoneValue(String zoneValue) {
- this.zoneValue = zoneValue;
- }
-
}