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{
513 rajveer 13
    INIT(0, "In Process"),
510 rajveer 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, "In Process"),
513 rajveer 19
    READY_FOR_SHIPPING(6, "Ready to Ship"),
20
    SHIPPED_FROM_WH(7, "In Transit"),
510 rajveer 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
 
483 rajveer 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;
510 rajveer 39
 
40
  private final String description;
41
 
42
  private OrderStatus(int value, String description) {
483 rajveer 43
    this.value = value;
510 rajveer 44
    this.description = description;
483 rajveer 45
  }
46
 
47
  /**
510 rajveer 48
   * Get the description of this enum value.
49
   */
50
  public String getDescription()   { 
51
	  return description; 
52
  }
53
 
54
  /**
483 rajveer 55
   * Get the integer value of this enum value, as defined in the Thrift IDL.
56
   */
57
  public int getValue() {
58
    return value;
59
  }
60
 
61
  /**
62
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
63
   * @return null if the value is not found.
64
   */
65
  public static OrderStatus findByValue(int value) { 
66
    return BY_VALUE.get(value);
67
  }
68
}