Subversion Repositories SmartDukaan

Rev

Rev 1013 | Rev 3430 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
123 ashish 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.payments;
7
 
8
 
9
import java.util.Map;
10
import java.util.HashMap;
11
import org.apache.thrift.TEnum;
12
public enum PaymentStatus implements TEnum{
13
    INIT(0),
14
    PENDING(1),
15
    SUCCESS(2),
1855 chandransh 16
    FAILED(3),
17
    AUTHORIZED(4);
123 ashish 18
 
19
  private static final Map<Integer, PaymentStatus> BY_VALUE = new HashMap<Integer,PaymentStatus>() {{
20
    for(PaymentStatus val : PaymentStatus.values()) {
21
      put(val.getValue(), val);
22
    }
23
  }};
24
 
25
  private final int value;
26
 
27
  private PaymentStatus(int value) {
28
    this.value = value;
29
  }
30
 
31
  /**
32
   * Get the integer value of this enum value, as defined in the Thrift IDL.
33
   */
34
  public int getValue() {
35
    return value;
36
  }
37
 
38
  /**
39
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
40
   * @return null if the value is not found.
41
   */
42
  public static PaymentStatus findByValue(int value) { 
43
    return BY_VALUE.get(value);
44
  }
45
}