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 AccountStatus implements TEnum{
13
public enum AccountStatus implements org.apache.thrift.TEnum {
13
    ACTIVE(0),
14
  ACTIVE(0),
14
    DELETED(1),
15
  DELETED(1),
15
    INACTIVE(2),
16
  INACTIVE(2),
16
    INCOMPLETE(3);
17
  INCOMPLETE(3);
17
 
-
 
18
  private static final Map<Integer, AccountStatus> BY_VALUE = new HashMap<Integer,AccountStatus>() {{
-
 
19
    for(AccountStatus val : AccountStatus.values()) {
-
 
20
      put(val.getValue(), val);
-
 
21
    }
-
 
22
  }};
-
 
23
 
18
 
24
  private final int value;
19
  private final int value;
25
 
20
 
26
  private AccountStatus(int value) {
21
  private AccountStatus(int value) {
27
    this.value = value;
22
    this.value = value;
Line 37... Line 32...
37
  /**
32
  /**
38
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
33
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
39
   * @return null if the value is not found.
34
   * @return null if the value is not found.
40
   */
35
   */
41
  public static AccountStatus findByValue(int value) { 
36
  public static AccountStatus findByValue(int value) { 
-
 
37
    switch (value) {
-
 
38
      case 0:
-
 
39
        return ACTIVE;
-
 
40
      case 1:
-
 
41
        return DELETED;
-
 
42
      case 2:
-
 
43
        return INACTIVE;
-
 
44
      case 3:
42
    return BY_VALUE.get(value);
45
        return INCOMPLETE;
-
 
46
      default:
-
 
47
        return null;
-
 
48
    }
43
  }
49
  }
44
}
50
}