0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 package org.apache.hive.service.cli;
0020
0021 import org.apache.hive.service.cli.thrift.TOperationType;
0022
0023
0024
0025
0026
0027 public enum OperationType {
0028
0029 UNKNOWN_OPERATION(TOperationType.UNKNOWN),
0030 EXECUTE_STATEMENT(TOperationType.EXECUTE_STATEMENT),
0031 GET_TYPE_INFO(TOperationType.GET_TYPE_INFO),
0032 GET_CATALOGS(TOperationType.GET_CATALOGS),
0033 GET_SCHEMAS(TOperationType.GET_SCHEMAS),
0034 GET_TABLES(TOperationType.GET_TABLES),
0035 GET_TABLE_TYPES(TOperationType.GET_TABLE_TYPES),
0036 GET_COLUMNS(TOperationType.GET_COLUMNS),
0037 GET_FUNCTIONS(TOperationType.GET_FUNCTIONS);
0038
0039 private TOperationType tOperationType;
0040
0041 OperationType(TOperationType tOpType) {
0042 this.tOperationType = tOpType;
0043 }
0044
0045 public static OperationType getOperationType(TOperationType tOperationType) {
0046
0047 for (OperationType opType : values()) {
0048 if (tOperationType.equals(opType.tOperationType)) {
0049 return opType;
0050 }
0051 }
0052 return OperationType.UNKNOWN_OPERATION;
0053 }
0054
0055 public TOperationType toTOperationType() {
0056 return tOperationType;
0057 }
0058 }