Subversion Repositories SmartDukaan

Rev

Rev 2219 | Rev 2538 | 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;
12
public enum OrderStatus implements TEnum{
2244 rajveer 13
    PAYMENT_PENDING(0, "Waiting for payment"),
14
    PAYMENT_FAILED(1, "Payment Failed"),
15
    INIT(2, "In Process"),
16
    SUBMITTED_FOR_PROCESSING(3, "In Process"),
17
    ACCEPTED(4, "In Process"),
18
    INVENTORY_LOW(5, "In Process"),
19
    REJECTED(6, "In Process"),
20
    BILLED(7, "Ready to Ship"),
21
    READY_FOR_SHIPPING(8, "Ready to Ship"),
22
    SHIPPED_FROM_WH(9, "In Transit"),
23
    SHIPPED_TO_LOGST(10, "In Transit"),
24
    IN_TRANSIT(11, "In Transit"),
25
    DELIVERY_SUCCESS(12, "Delivered"),
26
    DELIVERY_FAILED_FIRST_ATTEMPT(13, "Delivery Failed"),
27
    DELIVERY_FAILED_SECOND_ATTEMPT(14, "Delivery Failed"),
28
    DELIVERY_FAILED_THIRD_ATTEMPT(15, "Delivery Failed"),
29
    DELIVERY_FAILED_WORNG_ADDRESS(16, "Wrong Address"),
30
    COMPLETED(17, "Completed"),
31
    CANCELED(18, "In Process"),
32
    FAILED(19, "In Process");
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;
2244 rajveer 41
 
42
  private final String description;
43
 
44
  private OrderStatus(int value, String description) {
483 rajveer 45
    this.value = value;
2244 rajveer 46
    this.description = description;
483 rajveer 47
  }
48
 
49
  /**
2244 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
}