Use lombok annotations for objects in models-interaction/models-impl module
[policy/models.git] / models-interactions / model-impl / aai / src / main / java / org / onap / policy / aai / PnfInstance.java
index 74e69be..6a7ad83 100644 (file)
 package org.onap.policy.aai;
 
 import java.io.Serializable;
+import lombok.Data;
+import lombok.NoArgsConstructor;
 
+@Data
+@NoArgsConstructor
 public class PnfInstance implements Serializable {
 
     private static final long serialVersionUID = -3694152433472165034L;
@@ -32,10 +36,6 @@ public class PnfInstance implements Serializable {
     private PnfType pnfType;
     private String pnfSerial;
 
-    public PnfInstance() {
-
-    }
-
     /**
      * Create an instance from a given instance.
      *
@@ -50,89 +50,4 @@ public class PnfInstance implements Serializable {
         this.pnfType = instance.pnfType;
         this.pnfSerial = instance.pnfSerial;
     }
-
-    public String getPnfName() {
-        return pnfName;
-    }
-
-    public void setPnfName(String pnfName) {
-        this.pnfName = pnfName;
-    }
-
-    public String getPnfInstanceName() {
-        return pnfInstanceName;
-    }
-
-    public void setPnfInstanceName(String pnfInstanceName) {
-        this.pnfInstanceName = pnfInstanceName;
-    }
-
-    public PnfType getPnfType() {
-        return pnfType;
-    }
-
-    public void setPnfType(PnfType pnfType) {
-        this.pnfType = pnfType;
-    }
-
-    public String getPnfSerial() {
-        return pnfSerial;
-    }
-
-    public void setPnfSerial(String pnfSerial) {
-        this.pnfSerial = pnfSerial;
-    }
-
-    @Override
-    public String toString() {
-        return "PNFInstance [PNFName=" + pnfName + ", PNFInstanceName=" + pnfInstanceName + ", PNFType=" + pnfType
-                + ", PNFSerial=" + pnfSerial + "]";
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((pnfInstanceName == null) ? 0 : pnfInstanceName.hashCode());
-        result = prime * result + ((pnfName == null) ? 0 : pnfName.hashCode());
-        result = prime * result + ((pnfSerial == null) ? 0 : pnfSerial.hashCode());
-        result = prime * result + ((pnfType == null) ? 0 : pnfType.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        PnfInstance other = (PnfInstance) obj;
-        if (pnfInstanceName == null) {
-            if (other.pnfInstanceName != null) {
-                return false;
-            }
-        } else if (!pnfInstanceName.equals(other.pnfInstanceName)) {
-            return false;
-        }
-        if (pnfName == null) {
-            if (other.pnfName != null) {
-                return false;
-            }
-        } else if (!pnfName.equals(other.pnfName)) {
-            return false;
-        }
-        if (pnfSerial == null) {
-            if (other.pnfSerial != null) {
-                return false;
-            }
-        } else if (!pnfSerial.equals(other.pnfSerial)) {
-            return false;
-        }
-        return pnfType == other.pnfType;
-    }
 }