Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
36619 amit 1
/**
2
 * Migrated from ThriftConfig - Thrift dependency removed
3
 *
4
 */
5
package in.shop2020.model.v1.catalog;
6
 
7
 
8
import java.util.Map;
9
import java.util.HashMap;
10
 
11
/**
12
 * Caution :- Never ever change the numbers in it. Please confirm from @Chandranshu or @Rajveer before any changes in enum and other entries in file.
13
 * *
14
 */
15
public enum status {
16
  PHASED_OUT(0),
17
  DELETED(1),
18
  PAUSED(2),
19
  ACTIVE(3),
20
  IN_PROCESS(4),
21
  CONTENT_COMPLETE(5),
22
  PAUSED_BY_RISK(6),
23
  COMING_SOON(7),
24
  PARTIALLY_ACTIVE(8);
25
 
26
  private final int value;
27
 
28
  private status(int value) {
29
    this.value = value;
30
  }
31
 
32
  /**
33
   * Get the integer value of this enum value, as defined in the Thrift IDL.
34
   */
35
  public int getValue() {
36
    return value;
37
  }
38
 
39
  /**
40
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
41
   * @return null if the value is not found.
42
   */
43
  public static status findByValue(int value) { 
44
    switch (value) {
45
      case 0:
46
        return PHASED_OUT;
47
      case 1:
48
        return DELETED;
49
      case 2:
50
        return PAUSED;
51
      case 3:
52
        return ACTIVE;
53
      case 4:
54
        return IN_PROCESS;
55
      case 5:
56
        return CONTENT_COMPLETE;
57
      case 6:
58
        return PAUSED_BY_RISK;
59
      case 7:
60
        return COMING_SOON;
61
      case 8:
62
        return PARTIALLY_ACTIVE;
63
      default:
64
        return null;
65
    }
66
  }
67
}