AAI-common sonar fixes
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / domain / model / AAIResource.java
index ddeabf0..7e446fb 100644 (file)
@@ -23,6 +23,7 @@ package org.onap.aai.domain.model;
 import com.google.common.collect.Multimap;
 
 import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 
 public class AAIResource {
@@ -42,29 +43,29 @@ public class AAIResource {
     private String relationshipListClass;
     private String relationshipUtils;
 
-    private Map<String, String> PropertyDataTypeMap;
-    private Multimap<String, String> NodeMapIndexedProps;
-    private Multimap<String, String> NodeAltKey1Props;
-    private Multimap<String, String> NodeDependencies;
-    private Multimap<String, String> NodeKeyProps;
-    private Multimap<String, String> NodeReqProps;
-    private Multimap<String, String> NodeNameProps;
-    private Multimap<String, String> NodeUniqueProps;
+    private Map<String, String> propertyDataTypeMap;
+    private Multimap<String, String> nodeMapIndexedProps;
+    private Multimap<String, String> nodeAltKey1Props;
+    private Multimap<String, String> nodeDependencies;
+    private Multimap<String, String> nodeKeyProps;
+    private Multimap<String, String> nodeReqProps;
+    private Multimap<String, String> nodeNameProps;
+    private Multimap<String, String> nodeUniqueProps;
 
     // if new dataTypes are added - make sure to update getAllFields() method below
-    private ArrayList<String> stringFields;
-    private ArrayList<String> stringListFields;
-    private ArrayList<String> longFields;
-    private ArrayList<String> intFields;
-    private ArrayList<String> shortFields;
-    private ArrayList<String> booleanFields;
-
-    private ArrayList<String> requiredFields;
-    private ArrayList<String> orderedFields;
+    private List<String> stringFields;
+    private List<String> stringListFields;
+    private List<String> longFields;
+    private List<String> intFields;
+    private List<String> shortFields;
+    private List<String> booleanFields;
+
+    private List<String> requiredFields;
+    private List<String> orderedFields;
     private AAIResource recurseToResource;
     private boolean allowDirectWrite;
     private boolean allowDirectRead;
-    private ArrayList<String> autoGenUuidFields;
+    private List<String> autoGenUuidFields;
 
     /**
      * Gets the parent.
@@ -222,7 +223,7 @@ public class AAIResource {
      * @return the property data type map
      */
     public Map<String, String> getPropertyDataTypeMap() {
-        return PropertyDataTypeMap;
+        return propertyDataTypeMap;
     }
 
     /**
@@ -231,7 +232,7 @@ public class AAIResource {
      * @param propertyDataTypeMap the property data type map
      */
     public void setPropertyDataTypeMap(Map<String, String> propertyDataTypeMap) {
-        PropertyDataTypeMap = propertyDataTypeMap;
+        this.propertyDataTypeMap = propertyDataTypeMap;
     }
 
     /**
@@ -240,7 +241,7 @@ public class AAIResource {
      * @return the node map indexed props
      */
     public Multimap<String, String> getNodeMapIndexedProps() {
-        return NodeMapIndexedProps;
+        return nodeMapIndexedProps;
     }
 
     /**
@@ -249,7 +250,7 @@ public class AAIResource {
      * @param nodeMapIndexedProps the node map indexed props
      */
     public void setNodeMapIndexedProps(Multimap<String, String> nodeMapIndexedProps) {
-        NodeMapIndexedProps = nodeMapIndexedProps;
+        this.nodeMapIndexedProps = nodeMapIndexedProps;
     }
 
     /**
@@ -258,7 +259,7 @@ public class AAIResource {
      * @return the node key props
      */
     public Multimap<String, String> getNodeKeyProps() {
-        return NodeKeyProps;
+        return nodeKeyProps;
     }
 
     /**
@@ -267,7 +268,7 @@ public class AAIResource {
      * @param nodeKeyProps the node key props
      */
     public void setNodeKeyProps(Multimap<String, String> nodeKeyProps) {
-        this.NodeKeyProps = nodeKeyProps;
+        this.nodeKeyProps = nodeKeyProps;
     }
 
     /**
@@ -276,7 +277,7 @@ public class AAIResource {
      * @return the node name props
      */
     public Multimap<String, String> getNodeNameProps() {
-        return NodeNameProps;
+        return nodeNameProps;
     }
 
     /**
@@ -286,7 +287,7 @@ public class AAIResource {
      */
     public void setNodeNameProps(Multimap<String, String> nodeNameProps) {
 
-        NodeNameProps = nodeNameProps;
+        this.nodeNameProps = nodeNameProps;
     }
 
     /**
@@ -295,7 +296,7 @@ public class AAIResource {
      * @return the node unique props
      */
     public Multimap<String, String> getNodeUniqueProps() {
-        return NodeUniqueProps;
+        return nodeUniqueProps;
     }
 
     /**
@@ -304,7 +305,7 @@ public class AAIResource {
      * @param nodeUniqueProps the node unique props
      */
     public void setNodeUniqueProps(Multimap<String, String> nodeUniqueProps) {
-        NodeUniqueProps = nodeUniqueProps;
+        this.nodeUniqueProps = nodeUniqueProps;
     }
 
     /**
@@ -313,7 +314,7 @@ public class AAIResource {
      * @return the node req props
      */
     public Multimap<String, String> getNodeReqProps() {
-        return NodeReqProps;
+        return nodeReqProps;
     }
 
     /**
@@ -322,7 +323,7 @@ public class AAIResource {
      * @param nodeReqProps the node req props
      */
     public void setNodeReqProps(Multimap<String, String> nodeReqProps) {
-        NodeReqProps = nodeReqProps;
+        this.nodeReqProps = nodeReqProps;
     }
 
     /**
@@ -384,9 +385,9 @@ public class AAIResource {
      *
      * @return the string fields
      */
-    public ArrayList<String> getStringFields() {
+    public List<String> getStringFields() {
         if (this.stringFields == null) {
-            this.stringFields = new ArrayList<String>();
+            this.stringFields = new ArrayList<>();
         }
         return this.stringFields;
     }
@@ -396,7 +397,7 @@ public class AAIResource {
      *
      * @param stringFields the new string fields
      */
-    public void setStringFields(ArrayList<String> stringFields) {
+    public void setStringFields(List<String> stringFields) {
         this.stringFields = stringFields;
     }
 
@@ -405,9 +406,9 @@ public class AAIResource {
      *
      * @return the string list fields
      */
-    public ArrayList<String> getStringListFields() {
+    public List<String> getStringListFields() {
         if (this.stringListFields == null) {
-            this.stringListFields = new ArrayList<String>();
+            this.stringListFields = new ArrayList<>();
         }
         return this.stringListFields;
     }
@@ -417,7 +418,7 @@ public class AAIResource {
      *
      * @param stringListFields the new string list fields
      */
-    public void setStringListFields(ArrayList<String> stringListFields) {
+    public void setStringListFields(List<String> stringListFields) {
         this.stringListFields = stringListFields;
     }
 
@@ -426,9 +427,9 @@ public class AAIResource {
      *
      * @return the long fields
      */
-    public ArrayList<String> getLongFields() {
+    public List<String> getLongFields() {
         if (this.longFields == null) {
-            this.longFields = new ArrayList<String>();
+            this.longFields = new ArrayList<>();
         }
         return longFields;
     }
@@ -438,7 +439,7 @@ public class AAIResource {
      *
      * @param longFields the new long fields
      */
-    public void setLongFields(ArrayList<String> longFields) {
+    public void setLongFields(List<String> longFields) {
         this.longFields = longFields;
     }
 
@@ -447,9 +448,9 @@ public class AAIResource {
      *
      * @return the int fields
      */
-    public ArrayList<String> getIntFields() {
+    public List<String> getIntFields() {
         if (this.intFields == null) {
-            this.intFields = new ArrayList<String>();
+            this.intFields = new ArrayList<>();
         }
         return intFields;
     }
@@ -459,7 +460,7 @@ public class AAIResource {
      *
      * @param intFields the new int fields
      */
-    public void setIntFields(ArrayList<String> intFields) {
+    public void setIntFields(List<String> intFields) {
         this.intFields = intFields;
     }
 
@@ -468,9 +469,9 @@ public class AAIResource {
      *
      * @return the short fields
      */
-    public ArrayList<String> getShortFields() {
+    public List<String> getShortFields() {
         if (this.shortFields == null) {
-            this.shortFields = new ArrayList<String>();
+            this.shortFields = new ArrayList<>();
         }
         return shortFields;
     }
@@ -480,7 +481,7 @@ public class AAIResource {
      *
      * @param shortFields the new short fields
      */
-    public void setShortFields(ArrayList<String> shortFields) {
+    public void setShortFields(List<String> shortFields) {
         this.shortFields = shortFields;
     }
 
@@ -489,9 +490,9 @@ public class AAIResource {
      *
      * @return the boolean fields
      */
-    public ArrayList<String> getBooleanFields() {
+    public List<String> getBooleanFields() {
         if (this.booleanFields == null) {
-            this.booleanFields = new ArrayList<String>();
+            this.booleanFields = new ArrayList<>();
         }
         return booleanFields;
     }
@@ -501,7 +502,7 @@ public class AAIResource {
      *
      * @param booleanFields the new boolean fields
      */
-    public void setBooleanFields(ArrayList<String> booleanFields) {
+    public void setBooleanFields(List<String> booleanFields) {
         this.booleanFields = booleanFields;
     }
 
@@ -510,9 +511,9 @@ public class AAIResource {
      *
      * @return the required fields
      */
-    public ArrayList<String> getRequiredFields() {
+    public List<String> getRequiredFields() {
         if (this.requiredFields == null) {
-            this.requiredFields = new ArrayList<String>();
+            this.requiredFields = new ArrayList<>();
         }
         return requiredFields;
     }
@@ -522,7 +523,7 @@ public class AAIResource {
      *
      * @param requiredFields the new required fields
      */
-    public void setRequiredFields(ArrayList<String> requiredFields) {
+    public void setRequiredFields(List<String> requiredFields) {
         this.requiredFields = requiredFields;
     }
 
@@ -531,9 +532,9 @@ public class AAIResource {
      *
      * @return the ordered fields
      */
-    public ArrayList<String> getOrderedFields() {
+    public List<String> getOrderedFields() {
         if (this.orderedFields == null) {
-            this.orderedFields = new ArrayList<String>();
+            this.orderedFields = new ArrayList<>();
         }
         return this.orderedFields;
     }
@@ -543,9 +544,9 @@ public class AAIResource {
      *
      * @return the all fields
      */
-    public ArrayList<String> getAllFields() {
+    public List<String> getAllFields() {
 
-        ArrayList<String> allFields = new ArrayList<String>();
+        ArrayList<String> allFields = new ArrayList<>();
         allFields.addAll(getBooleanFields());
         allFields.addAll(getStringListFields());
         allFields.addAll(getStringFields());
@@ -572,10 +573,10 @@ public class AAIResource {
     /**
      * Sets the node alt key 1 props.
      *
-     * @param _dbRulesNodeAltKey1Props the db rules node alt key 1 props
+     * @param dbRulesNodeAltKey1Props the db rules node alt key 1 props
      */
-    public void setNodeAltKey1Props(Multimap<String, String> _dbRulesNodeAltKey1Props) {
-        this.NodeAltKey1Props = _dbRulesNodeAltKey1Props;
+    public void setNodeAltKey1Props(Multimap<String, String> dbRulesNodeAltKey1Props) {
+        this.nodeAltKey1Props = dbRulesNodeAltKey1Props;
     }
 
     /**
@@ -584,16 +585,16 @@ public class AAIResource {
      * @return the node alt key 1 props
      */
     public Multimap<String, String> getNodeAltKey1Props() {
-        return this.NodeAltKey1Props;
+        return this.nodeAltKey1Props;
     }
 
     /**
      * Sets the node dependencies.
      *
-     * @param _dbRulesNodeDependencies the db rules node dependencies
+     * @param dbRulesNodeDependencies the db rules node dependencies
      */
-    public void setNodeDependencies(Multimap<String, String> _dbRulesNodeDependencies) {
-        this.NodeDependencies = _dbRulesNodeDependencies;
+    public void setNodeDependencies(Multimap<String, String> dbRulesNodeDependencies) {
+        this.nodeDependencies = dbRulesNodeDependencies;
     }
 
     /**
@@ -602,7 +603,7 @@ public class AAIResource {
      * @return the node dependencies
      */
     public Multimap<String, String> getNodeDependencies() {
-        return this.NodeDependencies;
+        return this.nodeDependencies;
     }
 
     /**
@@ -665,9 +666,9 @@ public class AAIResource {
      *
      * @return the auto gen uuid fields
      */
-    public ArrayList<String> getAutoGenUuidFields() {
+    public List<String> getAutoGenUuidFields() {
         if (this.autoGenUuidFields == null) {
-            this.autoGenUuidFields = new ArrayList<String>();
+            this.autoGenUuidFields = new ArrayList<>();
         }
         return this.autoGenUuidFields;
     }