Made config/mdsal/netconf features non-cyclic
[controller.git] / opendaylight / forwardingrulesmanager / api / src / main / java / org / opendaylight / controller / forwardingrulesmanager / PortGroupConfig.java
index b45f4898bfd076c8c551f99d6c968f55ce571968..d0878f982cda5d10142375dca91fa2f3380546ef 100644 (file)
@@ -13,6 +13,8 @@ import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.opendaylight.controller.configuration.ConfigurationObject;
+
 /**
  * PortGroupConfig class represents the User's Configuration with a Opaque
  * Regular Expression String that is parsed and handled by PortGroupProvider.
@@ -23,7 +25,7 @@ import java.util.List;
  *
  *
  */
-public class PortGroupConfig implements Serializable {
+public class PortGroupConfig extends ConfigurationObject implements Serializable {
     private static final long serialVersionUID = 1L;
     private static final String prettyFields[] = { "Name", "Match Criteria" };
 
@@ -129,37 +131,42 @@ public class PortGroupConfig implements Serializable {
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = prime * result
-                + ((matchString == null) ? 0 : matchString.hashCode());
+        result = prime * result + ((matchString == null) ? 0 : matchString.hashCode());
         result = prime * result + ((name == null) ? 0 : name.hashCode());
         return result;
     }
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         PortGroupConfig other = (PortGroupConfig) obj;
         if (matchString == null) {
-            if (other.matchString != null)
+            if (other.matchString != null) {
                 return false;
-        } else if (!matchString.equals(other.matchString))
+            }
+        } else if (!matchString.equals(other.matchString)) {
             return false;
+        }
         if (name == null) {
-            if (other.name != null)
+            if (other.name != null) {
                 return false;
-        } else if (!name.equals(other.name))
+            }
+        } else if (!name.equals(other.name)) {
             return false;
+        }
         return true;
     }
 
     @Override
     public String toString() {
-        return "PortGroupConfig [name=" + name + ", matchString=" + matchString
-                + "]";
+        return "PortGroupConfig [name=" + name + ", matchString=" + matchString + "]";
     }
 }