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