Subversion Repositories SmartDukaan

Rev

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

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