Fixing warnings in the sal sub-project.
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / Tables.java
index 22cff90bb5dd3a9fc7f3852e7e100ab9b5fb65ff..724c8427f6edbe0003ed202930d0267cba04ede4 100644 (file)
@@ -9,6 +9,8 @@
 
 package org.opendaylight.controller.sal.core;
 
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
@@ -20,16 +22,17 @@ import javax.xml.bind.annotation.XmlRootElement;
  * Describes supported # of datapath tables
  */
 @XmlRootElement
+@XmlAccessorType(XmlAccessType.NONE)
 public class Tables extends Property {
-       private static final long serialVersionUID = 1L;
-    @XmlElement
+        private static final long serialVersionUID = 1L;
+    @XmlElement(name="value")
     private byte tablesValue;
-    
+
     public static final String TablesPropName = "tables";
     /**
      * Construct a Tables property
      *
-     * @param tables the Tables 
+     * @param tables the Tables
      * @return Constructed object
      */
     public Tables(byte tables) {
@@ -45,6 +48,7 @@ public class Tables extends Property {
         this.tablesValue = 0;
     }
 
+    @Override
     public Tables clone() {
         return new Tables(this.tablesValue);
     }
@@ -52,7 +56,7 @@ public class Tables extends Property {
     public byte getValue() {
         return this.tablesValue;
     }
-    
+
     @Override
     public int hashCode() {
         final int prime = 31;
@@ -79,4 +83,9 @@ public class Tables extends Property {
     public String toString() {
         return "Tables[" + tablesValue + "]";
     }
+
+    @Override
+    public String getStringValue() {
+        return String.format("%02x", tablesValue);
+    }
 }