Add StatusCode.CREATED
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / utils / StatusCode.java
index ce91ff440d1f70f4dba814700e7d65c34c1873af..f8882bbd2f81663023c95dd2b8b980d2e9754687 100644 (file)
@@ -15,6 +15,7 @@ package org.opendaylight.controller.sal.utils;
  */
 public enum StatusCode {
         SUCCESS("Success"),
+        CREATED("Created"),
 
         BADREQUEST("Bad Request"),
         UNAUTHORIZED("UnAuthorized"),
@@ -41,8 +42,16 @@ public enum StatusCode {
         /**
          * Prints the description associated to the code value
          */
+        @Override
         public String toString() {
                 return description;
         }
 
+    public int calculateConsistentHashCode() {
+        if (this.description != null) {
+            return this.description.hashCode();
+        } else {
+            return 0;
+        }
+    }
 }