Subversion Repositories SmartDukaan

Rev

Rev 2984 | Rev 5217 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2984 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.catalog;
6
package in.shop2020.model.v1.catalog;
7
 
7
 
8
 
8
 
9
import java.util.Map;
9
import java.util.Map;
10
import java.util.HashMap;
10
import java.util.HashMap;
11
import org.apache.thrift.TEnum;
11
import org.apache.thrift.TEnum;
-
 
12
 
12
/**
13
/**
13
 * Caution :- Never ever change the numbers in it. Please confirm from @Chandranshu or @Rajveer before any changes in enum and other entries in file.
14
 * Caution :- Never ever change the numbers in it. Please confirm from @Chandranshu or @Rajveer before any changes in enum and other entries in file.
14
 * *
15
 * *
15
 */
16
 */
16
public enum status implements TEnum{
17
public enum status implements org.apache.thrift.TEnum {
17
    PHASED_OUT(0),
18
  PHASED_OUT(0),
18
    DELETED(1),
19
  DELETED(1),
19
    PAUSED(2),
20
  PAUSED(2),
20
    ACTIVE(3),
21
  ACTIVE(3),
21
    IN_PROCESS(4),
22
  IN_PROCESS(4),
22
    CONTENT_COMPLETE(5),
23
  CONTENT_COMPLETE(5),
23
    PAUSED_BY_RISK(6);
24
  PAUSED_BY_RISK(6);
24
 
-
 
25
  private static final Map<Integer, status> BY_VALUE = new HashMap<Integer,status>() {{
-
 
26
    for(status val : status.values()) {
-
 
27
      put(val.getValue(), val);
-
 
28
    }
-
 
29
  }};
-
 
30
 
25
 
31
  private final int value;
26
  private final int value;
32
 
27
 
33
  private status(int value) {
28
  private status(int value) {
34
    this.value = value;
29
    this.value = value;
Line 44... Line 39...
44
  /**
39
  /**
45
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
40
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
46
   * @return null if the value is not found.
41
   * @return null if the value is not found.
47
   */
42
   */
48
  public static status findByValue(int value) { 
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:
49
    return BY_VALUE.get(value);
58
        return PAUSED_BY_RISK;
-
 
59
      default:
-
 
60
        return null;
-
 
61
    }
50
  }
62
  }
51
}
63
}