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.rpc.thrift.TFetchOrientation;
0022
0023
0024
0025
0026
0027 public enum FetchOrientation {
0028 FETCH_NEXT(TFetchOrientation.FETCH_NEXT),
0029 FETCH_PRIOR(TFetchOrientation.FETCH_PRIOR),
0030 FETCH_RELATIVE(TFetchOrientation.FETCH_RELATIVE),
0031 FETCH_ABSOLUTE(TFetchOrientation.FETCH_ABSOLUTE),
0032 FETCH_FIRST(TFetchOrientation.FETCH_FIRST),
0033 FETCH_LAST(TFetchOrientation.FETCH_LAST);
0034
0035 private TFetchOrientation tFetchOrientation;
0036
0037 FetchOrientation(TFetchOrientation tFetchOrientation) {
0038 this.tFetchOrientation = tFetchOrientation;
0039 }
0040
0041 public static FetchOrientation getFetchOrientation(TFetchOrientation tFetchOrientation) {
0042 for (FetchOrientation fetchOrientation : values()) {
0043 if (tFetchOrientation.equals(fetchOrientation.toTFetchOrientation())) {
0044 return fetchOrientation;
0045 }
0046 }
0047
0048 return FETCH_NEXT;
0049 }
0050
0051 public TFetchOrientation toTFetchOrientation() {
0052 return tFetchOrientation;
0053 }
0054 }