Subversion Repositories SmartDukaan

Rev

Rev 3850 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3850 chandransh 1
package in.shop2020.catalog.dashboard.shared;
2
 
11671 vikram.rag 3
 
4
public enum ItemStatus{
3850 chandransh 5
    PHASED_OUT(0),
6
    DELETED(1),
7
    PAUSED(2),
8
    ACTIVE(3),
9
    IN_PROCESS(4),
10
    CONTENT_COMPLETE(5),
11
    PAUSED_BY_RISK(6);
12
 
13
    private final int value;
11671 vikram.rag 14
 
15
    private static final long serialVersionUID = -2982668732181655697L;
3850 chandransh 16
 
17
    private ItemStatus(int value) {
18
      this.value = value;
19
    }
20
 
21
    /**
22
     * Get the integer value of this enum value, as defined in the Thrift IDL.
23
     */
24
    public int getValue() {
25
      return value;
26
    }
27
 
28
    /**
29
     * Find a the enum type by its integer value, as defined in the Thrift IDL.
30
     * @return null if the value is not found.
31
     */
32
    public static ItemStatus findByValue(int value) { 
33
      switch (value) {
34
        case 0:
35
          return PHASED_OUT;
36
        case 1:
37
          return DELETED;
38
        case 2:
39
          return PAUSED;
40
        case 3:
41
          return ACTIVE;
42
        case 4:
43
          return IN_PROCESS;
44
        case 5:
45
          return CONTENT_COMPLETE;
46
        case 6:
47
          return PAUSED_BY_RISK;
48
        default:
49
          return null;
50
      }
51
    }
52
}