Back to home page

OSCL-LXR

 
 

    


0001 /**
0002  * Autogenerated by Thrift Compiler (0.9.3)
0003  *
0004  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
0005  *  @generated
0006  */
0007 package org.apache.hive.service.rpc.thrift;
0008 
0009 
0010 import java.util.Map;
0011 import java.util.HashMap;
0012 import org.apache.thrift.TEnum;
0013 
0014 public enum TStatusCode implements org.apache.thrift.TEnum {
0015   SUCCESS_STATUS(0),
0016   SUCCESS_WITH_INFO_STATUS(1),
0017   STILL_EXECUTING_STATUS(2),
0018   ERROR_STATUS(3),
0019   INVALID_HANDLE_STATUS(4);
0020 
0021   private final int value;
0022 
0023   private TStatusCode(int value) {
0024     this.value = value;
0025   }
0026 
0027   /**
0028    * Get the integer value of this enum value, as defined in the Thrift IDL.
0029    */
0030   public int getValue() {
0031     return value;
0032   }
0033 
0034   /**
0035    * Find a the enum type by its integer value, as defined in the Thrift IDL.
0036    * @return null if the value is not found.
0037    */
0038   public static TStatusCode findByValue(int value) { 
0039     switch (value) {
0040       case 0:
0041         return SUCCESS_STATUS;
0042       case 1:
0043         return SUCCESS_WITH_INFO_STATUS;
0044       case 2:
0045         return STILL_EXECUTING_STATUS;
0046       case 3:
0047         return ERROR_STATUS;
0048       case 4:
0049         return INVALID_HANDLE_STATUS;
0050       default:
0051         return null;
0052     }
0053   }
0054 }