Fix to remove camel case for Northbound API
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / Config.java
index 505cc61816c6895142cbc639834d2a740856782f..ef6efc58211577fb9799509c1d998949a44364dc 100644 (file)
@@ -8,22 +8,18 @@
 
 package org.opendaylight.controller.sal.core;
 
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-
-import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
 
 /**
  * The class represents Admin Config status
- * 
- * 
+ *
+ *
  */
 @XmlRootElement
 @SuppressWarnings("serial")
 public class Config extends Property {
-    @XmlElement
+    @XmlElement(name="value")
     private short configValue;
 
     public static final short ADMIN_DOWN = 0;
@@ -44,6 +40,7 @@ public class Config extends Property {
         this.configValue = config;
     }
 
+    @Override
     public Config clone() {
         return new Config(this.configValue);
     }
@@ -54,16 +51,28 @@ public class Config extends Property {
 
     @Override
     public int hashCode() {
-        return HashCodeBuilder.reflectionHashCode(this);
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + configValue;
+        return result;
     }
 
     @Override
     public boolean equals(Object obj) {
-        return EqualsBuilder.reflectionEquals(this, obj);
+        if (this == obj)
+            return true;
+        if (!super.equals(obj))
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        Config other = (Config) obj;
+        if (configValue != other.configValue)
+            return false;
+        return true;
     }
 
     @Override
     public String toString() {
-        return "Config["+ReflectionToStringBuilder.toString(this)+"]";
+        return "Config["+ configValue +"]";
     }
 }