Subversion Repositories SmartDukaan

Rev

Rev 1013 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1013 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.user;
6
package in.shop2020.model.v1.user;
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
public enum LineStatus implements TEnum{
13
public enum LineStatus implements org.apache.thrift.TEnum {
13
    LINE_ACTIVE(0),
14
  LINE_ACTIVE(0),
14
    LINE_DELETED(1),
15
  LINE_DELETED(1),
15
    LINE_EXPIRED(2),
16
  LINE_EXPIRED(2),
16
    LINE_COMMITED(3),
17
  LINE_COMMITED(3),
17
    LINE_COMMIT_FAILED(4),
18
  LINE_COMMIT_FAILED(4),
18
    LINE_AUTO_DELETED(5);
19
  LINE_AUTO_DELETED(5);
19
 
-
 
20
  private static final Map<Integer, LineStatus> BY_VALUE = new HashMap<Integer,LineStatus>() {{
-
 
21
    for(LineStatus val : LineStatus.values()) {
-
 
22
      put(val.getValue(), val);
-
 
23
    }
-
 
24
  }};
-
 
25
 
20
 
26
  private final int value;
21
  private final int value;
27
 
22
 
28
  private LineStatus(int value) {
23
  private LineStatus(int value) {
29
    this.value = value;
24
    this.value = value;
Line 39... Line 34...
39
  /**
34
  /**
40
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
35
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
41
   * @return null if the value is not found.
36
   * @return null if the value is not found.
42
   */
37
   */
43
  public static LineStatus findByValue(int value) { 
38
  public static LineStatus findByValue(int value) { 
-
 
39
    switch (value) {
-
 
40
      case 0:
-
 
41
        return LINE_ACTIVE;
-
 
42
      case 1:
-
 
43
        return LINE_DELETED;
-
 
44
      case 2:
-
 
45
        return LINE_EXPIRED;
-
 
46
      case 3:
-
 
47
        return LINE_COMMITED;
-
 
48
      case 4:
-
 
49
        return LINE_COMMIT_FAILED;
-
 
50
      case 5:
44
    return BY_VALUE.get(value);
51
        return LINE_AUTO_DELETED;
-
 
52
      default:
-
 
53
        return null;
-
 
54
    }
45
  }
55
  }
46
}
56
}