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.payments;
6
package in.shop2020.payments;
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
 * Various structures
14
 * Various structures
14
 * *
15
 * *
15
 */
16
 */
16
public enum PaymentGatewayStatus implements TEnum{
17
public enum PaymentGatewayStatus implements org.apache.thrift.TEnum {
17
    AVAILABLE(0),
18
  AVAILABLE(0),
18
    BLOCKED(1);
19
  BLOCKED(1);
19
 
-
 
20
  private static final Map<Integer, PaymentGatewayStatus> BY_VALUE = new HashMap<Integer,PaymentGatewayStatus>() {{
-
 
21
    for(PaymentGatewayStatus val : PaymentGatewayStatus.values()) {
-
 
22
      put(val.getValue(), val);
-
 
23
    }
-
 
24
  }};
-
 
25
 
20
 
26
  private final int value;
21
  private final int value;
27
 
22
 
28
  private PaymentGatewayStatus(int value) {
23
  private PaymentGatewayStatus(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 PaymentGatewayStatus findByValue(int value) { 
38
  public static PaymentGatewayStatus findByValue(int value) { 
-
 
39
    switch (value) {
-
 
40
      case 0:
44
    return BY_VALUE.get(value);
41
        return AVAILABLE;
-
 
42
      case 1:
-
 
43
        return BLOCKED;
-
 
44
      default:
-
 
45
        return null;
-
 
46
    }
45
  }
47
  }
46
}
48
}