Back to home page

OSCL-LXR

 
 

    


0001 /**
0002  * Autogenerated by Thrift Compiler (0.9.0)
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.cli.thrift;
0008 
0009 
0010 import java.util.Map;
0011 import java.util.HashMap;
0012 import org.apache.thrift.TEnum;
0013 
0014 public enum TOperationState implements org.apache.thrift.TEnum {
0015   INITIALIZED_STATE(0),
0016   RUNNING_STATE(1),
0017   FINISHED_STATE(2),
0018   CANCELED_STATE(3),
0019   CLOSED_STATE(4),
0020   ERROR_STATE(5),
0021   UKNOWN_STATE(6),
0022   PENDING_STATE(7);
0023 
0024   private final int value;
0025 
0026   private TOperationState(int value) {
0027     this.value = value;
0028   }
0029 
0030   /**
0031    * Get the integer value of this enum value, as defined in the Thrift IDL.
0032    */
0033   public int getValue() {
0034     return value;
0035   }
0036 
0037   /**
0038    * Find a the enum type by its integer value, as defined in the Thrift IDL.
0039    * @return null if the value is not found.
0040    */
0041   public static TOperationState findByValue(int value) { 
0042     switch (value) {
0043       case 0:
0044         return INITIALIZED_STATE;
0045       case 1:
0046         return RUNNING_STATE;
0047       case 2:
0048         return FINISHED_STATE;
0049       case 3:
0050         return CANCELED_STATE;
0051       case 4:
0052         return CLOSED_STATE;
0053       case 5:
0054         return ERROR_STATE;
0055       case 6:
0056         return UKNOWN_STATE;
0057       case 7:
0058         return PENDING_STATE;
0059       default:
0060         return null;
0061     }
0062   }
0063 }