Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
483 rajveer 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.model.v1.order;
7
 
8
 
9
import java.util.Map;
10
import java.util.HashMap;
11
import org.apache.thrift.TEnum;
12
public enum OrderStatus implements TEnum{
13
    INIT(0),
14
    SUBMITTED_FOR_PROCESSING(1),
15
    ACCEPTED(2),
16
    INVENTORY_LOW(3),
17
    REJECT(4),
18
    BILLED(5),
19
    READY_FOR_SHIPPING(6),
20
    SHIPPED_FROM_WH(7),
21
    SHIPPED_TO_LOGST(8),
22
    IN_TRANSIT(9),
23
    DELIVERY_SUCCESS(10),
24
    DELIVERY_FAILED_FIRST_ATTEMPT(11),
25
    DELIVERY_FAILED_SECOND_ATTEMPT(12),
26
    DELIVERY_FAILED_THIRD_ATTEMPT(13),
27
    DELIVERY_FAILED_WORNG_ADDRESS(14),
28
    COMPLETED(15),
29
    CANCELED(16),
30
    FAILED(17);
31
 
32
  private static final Map<Integer, OrderStatus> BY_VALUE = new HashMap<Integer,OrderStatus>() {{
33
    for(OrderStatus val : OrderStatus.values()) {
34
      put(val.getValue(), val);
35
    }
36
  }};
37
 
38
  private final int value;
39
 
40
  private OrderStatus(int value) {
41
    this.value = value;
42
  }
43
 
44
  /**
45
   * Get the integer value of this enum value, as defined in the Thrift IDL.
46
   */
47
  public int getValue() {
48
    return value;
49
  }
50
 
51
  /**
52
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
53
   * @return null if the value is not found.
54
   */
55
  public static OrderStatus findByValue(int value) { 
56
    return BY_VALUE.get(value);
57
  }
58
}