Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2820 chandransh 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.warehouse;
7
 
8
 
9
import java.util.Map;
10
import java.util.HashMap;
11
import org.apache.thrift.TEnum;
12
public enum Role implements TEnum{
13
    CATEGORY_MANAGER(0),
14
    WAREHOUSE_EXECUTIVE(1);
15
 
16
  private static final Map<Integer, Role> BY_VALUE = new HashMap<Integer,Role>() {{
17
    for(Role val : Role.values()) {
18
      put(val.getValue(), val);
19
    }
20
  }};
21
 
22
  private final int value;
23
 
24
  private Role(int value) {
25
    this.value = value;
26
  }
27
 
28
  /**
29
   * Get the integer value of this enum value, as defined in the Thrift IDL.
30
   */
31
  public int getValue() {
32
    return value;
33
  }
34
 
35
  /**
36
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
37
   * @return null if the value is not found.
38
   */
39
  public static Role findByValue(int value) { 
40
    return BY_VALUE.get(value);
41
  }
42
}