| 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{
|
| 802 |
rajveer |
13 |
INIT(0, "In Process"),
|
|
|
14 |
SUBMITTED_FOR_PROCESSING(1, "In Process"),
|
|
|
15 |
ACCEPTED(2, "In Process"),
|
|
|
16 |
INVENTORY_LOW(3, "In Process"),
|
|
|
17 |
REJECTED(4, "In Process"),
|
|
|
18 |
BILLED(5, "Ready to Ship"),
|
|
|
19 |
READY_FOR_SHIPPING(6, "Ready to Ship"),
|
|
|
20 |
SHIPPED_FROM_WH(7, "In Transit"),
|
|
|
21 |
SHIPPED_TO_LOGST(8, "In Transit"),
|
|
|
22 |
IN_TRANSIT(9, "In Transit"),
|
|
|
23 |
DELIVERY_SUCCESS(10, "Delivered"),
|
|
|
24 |
DELIVERY_FAILED_FIRST_ATTEMPT(11, "Delivery Failed"),
|
|
|
25 |
DELIVERY_FAILED_SECOND_ATTEMPT(12, "Delivery Failed"),
|
|
|
26 |
DELIVERY_FAILED_THIRD_ATTEMPT(13, "Delivery Failed"),
|
|
|
27 |
DELIVERY_FAILED_WORNG_ADDRESS(14, "Wrong Address"),
|
|
|
28 |
COMPLETED(15, "Completed"),
|
|
|
29 |
CANCELED(16, "In Process"),
|
|
|
30 |
FAILED(17, "In Process"),
|
|
|
31 |
PAYMENT_PENDING(18, "Waiting for payment"),
|
|
|
32 |
PAYMENT_FAILED(19, "Payment Failed");
|
|
|
33 |
|
| 483 |
rajveer |
34 |
private static final Map<Integer, OrderStatus> BY_VALUE = new HashMap<Integer,OrderStatus>() {{
|
|
|
35 |
for(OrderStatus val : OrderStatus.values()) {
|
|
|
36 |
put(val.getValue(), val);
|
|
|
37 |
}
|
|
|
38 |
}};
|
|
|
39 |
|
|
|
40 |
private final int value;
|
| 802 |
rajveer |
41 |
|
|
|
42 |
private final String description;
|
|
|
43 |
|
|
|
44 |
private OrderStatus(int value, String description) {
|
| 483 |
rajveer |
45 |
this.value = value;
|
| 802 |
rajveer |
46 |
this.description = description;
|
| 483 |
rajveer |
47 |
}
|
|
|
48 |
|
|
|
49 |
/**
|
| 802 |
rajveer |
50 |
* Get the description of this enum value.
|
|
|
51 |
*/
|
|
|
52 |
public String getDescription() {
|
|
|
53 |
return description;
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
/**
|
| 483 |
rajveer |
57 |
* Get the integer value of this enum value, as defined in the Thrift IDL.
|
|
|
58 |
*/
|
|
|
59 |
public int getValue() {
|
|
|
60 |
return value;
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
/**
|
|
|
64 |
* Find a the enum type by its integer value, as defined in the Thrift IDL.
|
|
|
65 |
* @return null if the value is not found.
|
|
|
66 |
*/
|
|
|
67 |
public static OrderStatus findByValue(int value) {
|
|
|
68 |
return BY_VALUE.get(value);
|
|
|
69 |
}
|
|
|
70 |
}
|