Subversion Repositories SmartDukaan

Rev

Rev 4496 | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * Autogenerated by Thrift Compiler (0.7.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package in.shop2020.generic;


import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;

public enum ExceptionType implements org.apache.thrift.TEnum {
  NULL_POINTER(101),
  ILLEGAL_ARGUMENTS(102),
  DATABASE_ERROR(103),
  NOT_AUTHORIZED(104),
  MULTIPLE_ITEMS_FOUND(105);

  private final int value;

  private ExceptionType(int value) {
    this.value = value;
  }

  /**
   * Get the integer value of this enum value, as defined in the Thrift IDL.
   */
  public int getValue() {
    return value;
  }

  /**
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
   * @return null if the value is not found.
   */
  public static ExceptionType findByValue(int value) { 
    switch (value) {
      case 101:
        return NULL_POINTER;
      case 102:
        return ILLEGAL_ARGUMENTS;
      case 103:
        return DATABASE_ERROR;
      case 104:
        return NOT_AUTHORIZED;
      case 105:
        return MULTIPLE_ITEMS_FOUND;
      default:
        return null;
    }
  }
}