Subversion Repositories SmartDukaan

Rev

Rev 1384 | Rev 2244 | Go to most recent revision | Details | Compare with Previous | 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;
2219 varun.gupt 12
/**
13
 * *
14
 * Order objects.
15
 */
483 rajveer 16
public enum OrderStatus implements TEnum{
2219 varun.gupt 17
    PAYMENT_PENDING(0),
18
    PAYMENT_FAILED(1),
19
    INIT(2),
20
    SUBMITTED_FOR_PROCESSING(3),
21
    ACCEPTED(4),
22
    INVENTORY_LOW(5),
23
    REJECTED(6),
24
    BILLED(7),
25
    READY_FOR_SHIPPING(8),
26
    SHIPPED_FROM_WH(9),
27
    SHIPPED_TO_LOGST(10),
28
    IN_TRANSIT(11),
29
    DELIVERY_SUCCESS(12),
30
    DELIVERY_FAILED_FIRST_ATTEMPT(13),
31
    DELIVERY_FAILED_SECOND_ATTEMPT(14),
32
    DELIVERY_FAILED_THIRD_ATTEMPT(15),
33
    DELIVERY_FAILED_WORNG_ADDRESS(16),
34
    COMPLETED(17),
35
    CANCELED(18),
36
    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;
2219 varun.gupt 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
}