Merge "Added Junis for Policy ONAP-REST"
[policy/engine.git] / ONAP-REST / src / main / java / org / onap / policy / rest / jpa / PolicyVersion.java
index bc6ad99..6af607f 100644 (file)
@@ -21,8 +21,6 @@
 package org.onap.policy.rest.jpa;
 
 import java.io.Serializable;
-//import java.sql.Clob;
-import java.sql.Timestamp;
 import java.util.Date;
 import java.util.Objects;
 
@@ -109,7 +107,7 @@ public class PolicyVersion implements Serializable {
        }
        
        public PolicyVersion(){
-               
+               // Empty constructor
        }
        
        @PrePersist
@@ -122,14 +120,6 @@ public class PolicyVersion implements Serializable {
        @PreUpdate
        public void preUpdate() {
                this.modifiedDate =  new Date();
-               /*
-                * The modifiedBy must be set via the setModifiedBy() method since PolicyVersion
-                * has been moved to XACML-REST module for access from the XACML-PAP-REST module
-                
-                  String userid = ((XacmlAdminUI) UI.getCurrent()).getLoginUserId();
-                  this.modifiedBy =userid;
-                * 
-                */
        }
        
        public int getId() {
@@ -152,7 +142,7 @@ public class PolicyVersion implements Serializable {
                return createdDate;
        }
 
-       public void setCreatedDate(Timestamp createdDate) {
+       public void setCreatedDate(Date createdDate) {
                this.createdDate = createdDate;
        }
 
@@ -168,7 +158,7 @@ public class PolicyVersion implements Serializable {
                return modifiedDate;
        }
 
-       public void setModifiedDate(Timestamp modifiedDate) {
+       public void setModifiedDate(Date modifiedDate) {
                this.modifiedDate = modifiedDate;
        }
 
@@ -200,16 +190,14 @@ public class PolicyVersion implements Serializable {
 
                PolicyVersion p = (PolicyVersion) obj;
                
-               return (
-                               id == p.id &&
+               return id == p.id &&
                                policyName.equals(p.policyName) &&
                                activeVersion == p.activeVersion &&
                                higherVersion == p.higherVersion &&
                                createdDate.equals(p.createdDate) &&
                                createdBy.equals(p.createdBy) &&
                                modifiedDate.equals(p.modifiedDate) &&
-                               modifiedBy.equals(p.modifiedBy)
-                               );
+                               modifiedBy.equals(p.modifiedBy);
        }
 
 }