package com.ctrip.zeus.service.report.meta;

/**
 * Created by zhoumy on 2015/7/10.
 */
public enum ReportStatus {
    WAITING(0, "Waiting to be synced."),
    SUCCESS(1, "Success."),
    DELETED(2, "Deleted."),
    ERROR(-1, "Error");

    private int value;
    private String description;

    private ReportStatus(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public int getValue() {
        return value;
    }

    public static ReportStatus getReportStatus(int value) {
        switch (value) {
            case -1: return ERROR;
            case 0: return WAITING;
            case 1: return SUCCESS;
            case 2: return DELETED;
        }
        return ERROR;
    }
}

@@ -108,16 +108,93 @@
 tatus %7B%0A
+    DELETION_ERROR(-2, %22Deletion error.%22),%0A    SYNC_ERROR(-1, %22Sync Error%22),%0A
     WAIT
@@ -278,24 +278,100 @@
 Deleted.%22),%0A
+    WAITING_HUNG(5, %22Waiting hung.%22),%0A    DELETED_HUNG(6, %22Deleted hung.%22),%0A
     ERROR(-1
@@ -372,18 +372,26 @@
 ROR(
--1
+9
 , %22
+Unknown 
 Error
+.
 %22);%0A
@@ -812,26 +812,102 @@
   case -
-1:
+2:%0A                return DELETION_ERROR;%0A            case -1:%0A               
  return 
 ERROR;%0A 
@@ -890,32 +890,37 @@
          return 
+SYNC_
 ERROR;%0A         
@@ -929,16 +929,32 @@
  case 0:
+%0A               
  return 
@@ -981,16 +981,32 @@
  case 1:
+%0A               
  return 
@@ -1037,23 +1037,203 @@
 e 2:
- return DELETED
+%0A                return DELETED;%0A            case 5:%0A                return WAITING_HUNG;%0A            case 6:%0A                return DELETED_HUNG;%0A            case 9:%0A                return ERROR
 ;%0A  

add status